|
|
@ -221,11 +221,11 @@ export default class MultiSpec { |
|
|
|
for (const index in newSkuList) { |
|
|
|
for (const index in newSkuList) { |
|
|
|
// 查找符合的旧记录
|
|
|
|
// 查找符合的旧记录
|
|
|
|
let oldSkuItem = {} |
|
|
|
let oldSkuItem = {} |
|
|
|
if (oldSkuList.length === newSkuList.length) { |
|
|
|
// if (oldSkuList.length === newSkuList.length) {
|
|
|
|
oldSkuItem = _.cloneDeep(oldSkuList[index]) |
|
|
|
oldSkuItem = _.cloneDeep(oldSkuList[index]) |
|
|
|
} else { |
|
|
|
// } else {
|
|
|
|
oldSkuItem = oldSkuList.find(item => item.tempId === newSkuList[index].tempId) |
|
|
|
// oldSkuItem = oldSkuList.find(item => item.tempId === newSkuList[index].tempId)
|
|
|
|
} |
|
|
|
// }
|
|
|
|
// 写入新纪录
|
|
|
|
// 写入新纪录
|
|
|
|
if (oldSkuItem) { |
|
|
|
if (oldSkuItem) { |
|
|
|
newSkuList[index] = { |
|
|
|
newSkuList[index] = { |
|
|
@ -378,10 +378,10 @@ export default class MultiSpec { |
|
|
|
const skuItem = skuList[skuIndex] |
|
|
|
const skuItem = skuList[skuIndex] |
|
|
|
for (const colIndex in columns) { |
|
|
|
for (const colIndex in columns) { |
|
|
|
const value = skuItem[columns[colIndex].field] |
|
|
|
const value = skuItem[columns[colIndex].field] |
|
|
|
if (value === '' || value === null) { |
|
|
|
// if (value === '' || value === null) {
|
|
|
|
this.error = `${columns[colIndex].name}不能为空` |
|
|
|
// this.error = `${columns[colIndex].name}不能为空`
|
|
|
|
return false |
|
|
|
// return false
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return true |
|
|
|
return true |
|
|
|