This commit is contained in:
liushiwei
2023-09-25 10:13:54 +08:00
parent 2fb3f13787
commit 794ac780ae
11 changed files with 749 additions and 46 deletions

View File

@@ -160,7 +160,7 @@ import { Message } from 'element-ui'
mallName: '',
type: '0',
isLoading: false,
pageSize: 10,
pageSize: 100,
currentPage: 1,
todayTotal: 0,
todayMoney: 0.0,
@@ -171,9 +171,11 @@ import { Message } from 'element-ui'
allProductList: [],
startDate: '',
endDate: '',
skuIds: [],
jsonFields: {
"商品名称": "productName",
"店铺名称": "mallName",
"评分": "mark",
"SPU": "productId",
"SKC": "productSkcId",
"SKU ID": "productSkuId",
@@ -241,6 +243,13 @@ import { Message } from 'element-ui'
width: '120px',
align: 'left'
},
{
prop: 'mark',
label: '评分',
"show-overflow-tooltip": true,
width: '80px',
align: 'left'
},
{
prop: 'productId',
label: 'SPU',
@@ -596,6 +605,7 @@ import { Message } from 'element-ui'
data.skcExtCode = item.skcExtCode;
data.purchaseConfig = item.purchaseConfig;
data.productSkcPicture = item.productSkcPicture;
data.mark = item.mark.toFixed(1)
data.mallName = this.mallName;
this.last30DaySkcList.push({
@@ -678,7 +688,10 @@ import { Message } from 'element-ui'
}
return temp
})
this.getSkuDetailList()
this.skuIds = this.list.map(item => {
return item.productSkuId
})
this.getSkuDetailList(0)
}
} else {
setTimeout(() => {
@@ -690,17 +703,24 @@ import { Message } from 'element-ui'
this.isLoading = false
})
},
getSkuDetailList () {
let skuIds = this.list.map(item => {
return item.productSkuId
})
getSkuDetailList (page) {
let tempSkuId = []
let i = page * 500
let j = 0
for (; i < this.skuIds.length; i++) {
tempSkuId.push(this.skuIds[i])
j ++
if (j == 500) break
}
if (tempSkuId.length == 0) return
sendChromeAPIMessage({
url: 'oms/bg/venom/api/supplier/sales/management/querySkuSalesNumber',
needMallId: true,
mallId: this.mallId,
data: {
"productSkuIds": skuIds,
"productSkuIds": tempSkuId,
"startDate": this.startDate,
// "startDate": '2023-01-17',
"endDate": this.endDate
}}).then((res) => {
if (res.errorCode == 1000000) {
@@ -719,9 +739,10 @@ import { Message } from 'element-ui'
}
}
}
this.getSkuDetailList(page + 1)
} else {
setTimeout(() => {
this.getSkuDetailList()
this.getSkuDetailList(page)
}, 1500)
}
})