This commit is contained in:
liushiwei
2024-10-19 17:44:22 +08:00
parent 4a90536696
commit 9c2b6c434c
21 changed files with 1679 additions and 33 deletions

View File

@@ -255,16 +255,26 @@ import { saveAs } from 'file-saver'
}
},
async getPriceInfo(skcList) {
let res = await sendGeiwohuoAPIMessage({
url: `idms/goods-skc/price`,
method: 'POST',
data: skcList})
if (res.code == '0') {
for (let key in res.info) {
for (let i = 0; i < this.list.length; i++) {
if (key == this.list[i].sku) {
this.list[i].price = res.info[key]
break
let i = 0, len = 100
while(i < skcList.length) {
let tempSkcList = []
for (; i < skcList.length; i++) {
tempSkcList.push(skcList[i])
if (tempSkcList.length % len == 0) {
break
}
}
let res = await sendGeiwohuoAPIMessage({
url: `idms/goods-skc/price`,
method: 'POST',
data: tempSkcList})
if (res.code == '0') {
for (let key in res.info) {
for (let i = 0; i < this.list.length; i++) {
if (key == this.list[i].sku) {
this.list[i].price = res.info[key]
break
}
}
}
}
@@ -313,6 +323,7 @@ import { saveAs } from 'file-saver'
this.costDlgShow = true
},
importConfirm() {
this.isLoading = true
this.$refs.costForm.validate((valid) => {
const data = new FormData()
data.append('file', this.costForm.file[0].raw);
@@ -322,8 +333,10 @@ import { saveAs } from 'file-saver'
this.$message.success('导入成功')
this.currentPage = 1
this.list = []
this.isLoading = true
this.isLoading = false
this.getList()
} else {
this.isLoading = false
}
})
})