修改规格提示空回显问题

feature/0423
fanfan 11 months ago
parent b94f457bd3
commit 04912ecf4b
  1. 16
      src/common/model/goods/MultiSpec.js
  2. 1
      src/views/goods/Update.vue

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

@ -598,6 +598,7 @@ export default {
this.$nextTick(() => {
this.form.setFieldsValue(GoodsModel.getFieldsValue2())
this.onForceUpdate()
// console.log(this.formData.formData.goods.skuList)
})
}
this.isLoading = false

Loading…
Cancel
Save