调整
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user