From 0e9d59b1ebfadba7ea4a6e0c54b239a6ba0bb744 Mon Sep 17 00:00:00 2001 From: liushiwei <499672082@qq.com> Date: Wed, 8 Nov 2023 13:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AiProductDropDown.vue | 25 +- src/manifest.production.json | 2 +- src/router/index.js | 21 +- src/utils/date.js | 1 + src/view/ExportSaleData.vue | 6 +- src/view/Home.vue | 9 + src/view/Welcome.vue | 17 +- src/view/product/ReducePrice.vue | 395 ------------------ src/view/selection/favoritetrack/Index.vue | 42 ++ .../favoritetrack/components/Detail.vue | 221 ++++++++++ .../indextrack/components/Detail.vue | 4 +- .../keywordtrack/components/Detail.vue | 10 +- .../keywordtrack/components/List.vue | 2 +- .../storetrack/components/Detail.vue | 10 +- src/view/shipping/NormalSendGoods.vue | 44 +- src/view/shipping/ShippingDesk.vue | 44 +- src/view/stock/ReturnDetail.vue | 277 ++++++++++++ src/view/stock/ReturnPackage.vue | 252 +++++++++++ 18 files changed, 939 insertions(+), 443 deletions(-) delete mode 100644 src/view/product/ReducePrice.vue create mode 100644 src/view/selection/favoritetrack/Index.vue create mode 100644 src/view/selection/favoritetrack/components/Detail.vue create mode 100644 src/view/stock/ReturnDetail.vue create mode 100644 src/view/stock/ReturnPackage.vue diff --git a/src/components/AiProductDropDown.vue b/src/components/AiProductDropDown.vue index 0460783..cb96f8a 100644 --- a/src/components/AiProductDropDown.vue +++ b/src/components/AiProductDropDown.vue @@ -6,6 +6,8 @@ 查看详情 + 加入收藏 + 取消收藏 商品采集 访问商品 访问店铺 @@ -26,10 +28,12 @@ - - diff --git a/src/view/selection/favoritetrack/Index.vue b/src/view/selection/favoritetrack/Index.vue new file mode 100644 index 0000000..fd40e4f --- /dev/null +++ b/src/view/selection/favoritetrack/Index.vue @@ -0,0 +1,42 @@ + + + + + + diff --git a/src/view/selection/favoritetrack/components/Detail.vue b/src/view/selection/favoritetrack/components/Detail.vue new file mode 100644 index 0000000..b7600c4 --- /dev/null +++ b/src/view/selection/favoritetrack/components/Detail.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/view/selection/indextrack/components/Detail.vue b/src/view/selection/indextrack/components/Detail.vue index 5e6b4b2..cf67f4e 100644 --- a/src/view/selection/indextrack/components/Detail.vue +++ b/src/view/selection/indextrack/components/Detail.vue @@ -38,14 +38,14 @@
- +
${{ item.price }}
{{ item.saleTotal }}
- +
diff --git a/src/view/selection/keywordtrack/components/Detail.vue b/src/view/selection/keywordtrack/components/Detail.vue index 472b232..1af31fe 100644 --- a/src/view/selection/keywordtrack/components/Detail.vue +++ b/src/view/selection/keywordtrack/components/Detail.vue @@ -34,14 +34,17 @@
- +
${{ item.price }}
{{ item.saleTotal }}
- +
+
日均销量: {{ item.averageSale }}
+ +
@@ -105,6 +108,9 @@ import AiProductDropDown from '@/components/AiProductDropDown.vue'; },{ value: '3', label: '按价格排序' + },{ + value: '4', + label: '按日均销量排序' }], tableData: [], total: 0, diff --git a/src/view/selection/keywordtrack/components/List.vue b/src/view/selection/keywordtrack/components/List.vue index b5db170..ca45f98 100644 --- a/src/view/selection/keywordtrack/components/List.vue +++ b/src/view/selection/keywordtrack/components/List.vue @@ -332,7 +332,7 @@ import { Message } from 'element-ui' } else { this.isLoading = false } - if (res.indexOf("rawData") == -1) { + if (res.indexOf("window.rawData") == -1) { Message.error("采集失败,请检查https://www.temu.com是否能正常访问") return } diff --git a/src/view/selection/storetrack/components/Detail.vue b/src/view/selection/storetrack/components/Detail.vue index 5fc01be..823db05 100644 --- a/src/view/selection/storetrack/components/Detail.vue +++ b/src/view/selection/storetrack/components/Detail.vue @@ -38,14 +38,17 @@
- +
${{ item.price }}
{{ item.saleTotal }}
- +
+
日均销量: {{ item.averageSale }}
+ +
@@ -107,6 +110,9 @@ import AiProductDropDown from '@/components/AiProductDropDown.vue'; },{ value: '3', label: '按价格排序' + },{ + value: '4', + label: '按日均销量排序' }], tableData: [], total: 0, diff --git a/src/view/shipping/NormalSendGoods.vue b/src/view/shipping/NormalSendGoods.vue index c03b2c0..1264c3e 100644 --- a/src/view/shipping/NormalSendGoods.vue +++ b/src/view/shipping/NormalSendGoods.vue @@ -346,7 +346,7 @@ }, activated () { this.addressList = [] - this.getAddressInfo(); + this.toGetAddressInfo(); }, methods: { @@ -370,25 +370,39 @@ console.log(err) }) }, - getAddressInfo() { - this.mallList.map(item => { - sendChromeAPIMessage({ - url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo', - needMallId: true, - mallId: item.mallId, - data: {}}).then((res) => { - if (res.errorCode == 1000000) { - let addressArr = res.result.deliveryAddressInfoList.filter(i => { - return i.isDefault - }) + toGetAddressInfo() { + this.addressList = [] + this.getAddressInfo(0) + }, + getAddressInfo(index) { + if (!this.mallList) { + Message.error('获取默认发货地址失败,请刷新重试') + return + } + if (index == this.mallList.length) return + let mallInfo = this.mallList[index] + sendChromeAPIMessage({ + url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo', + needMallId: true, + mallId: mallInfo.mallId, + data: {}}).then((res) => { + if (res.errorCode == 1000000) { + let addressArr = res.result.deliveryAddressInfoList.filter(i => { + return i.isDefault + }) + if (addressArr.length > 0) { this.addressList.push({ - mallId: item.mallId, + mallId: mallInfo.mallId, addressId: addressArr[0].id }) + } else { + Message.error("店铺【" + mallInfo.name + "】未设置默认发货地址,将无法自动创建发货单") } - }) + this.getAddressInfo(index + 1) + } else { + this.getAddressInfo(index) + } }) - }, onConfirm () { if (this.arr.length == 0) { diff --git a/src/view/shipping/ShippingDesk.vue b/src/view/shipping/ShippingDesk.vue index 0121c02..d553a01 100644 --- a/src/view/shipping/ShippingDesk.vue +++ b/src/view/shipping/ShippingDesk.vue @@ -235,7 +235,7 @@ ...mapState(['mallList']) }, created () { - this.getAddressInfo(); + this.toGetAddressInfo(); }, methods: { @@ -259,25 +259,39 @@ console.log(err) }) }, - getAddressInfo() { - this.mallList.map(item => { - sendChromeAPIMessage({ - url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo', - needMallId: true, - mallId: item.mallId, - data: {}}).then((res) => { - if (res.errorCode == 1000000) { - let addressArr = res.result.deliveryAddressInfoList.filter(i => { - return i.isDefault - }) + toGetAddressInfo() { + this.addressList = [] + this.getAddressInfo(0) + }, + getAddressInfo(index) { + if (!this.mallList) { + Message.error('获取默认发货地址失败,请刷新重试') + return + } + if (index == this.mallList.length) return + let mallInfo = this.mallList[index] + sendChromeAPIMessage({ + url: 'bgSongbird-api/supplier/address/queryDeliveryAddressInfo', + needMallId: true, + mallId: mallInfo.mallId, + data: {}}).then((res) => { + if (res.errorCode == 1000000) { + let addressArr = res.result.deliveryAddressInfoList.filter(i => { + return i.isDefault + }) + if (addressArr.length > 0) { this.addressList.push({ - mallId: item.mallId, + mallId: mallInfo.mallId, addressId: addressArr[0].id }) + } else { + Message.error("店铺【" + mallInfo.name + "】未设置默认发货地址,将无法自动创建发货单") } - }) + this.getAddressInfo(index + 1) + } else { + this.getAddressInfo(index) + } }) - }, onConfirm () { if (this.arr.length == 0) { diff --git a/src/view/stock/ReturnDetail.vue b/src/view/stock/ReturnDetail.vue new file mode 100644 index 0000000..00c238f --- /dev/null +++ b/src/view/stock/ReturnDetail.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/src/view/stock/ReturnPackage.vue b/src/view/stock/ReturnPackage.vue new file mode 100644 index 0000000..fb79b69 --- /dev/null +++ b/src/view/stock/ReturnPackage.vue @@ -0,0 +1,252 @@ + + + + +