多单位开启关闭时不会校验单位列表里的数据

jg-waiwang-pro
mhsnet 7 months ago
parent a582950711
commit 7ecb8107c3

@ -786,13 +786,18 @@ export default {
watch: {
'dataForm.manyUnitFlag': function (nManyUnitFlag, oManyUnitFlag) {
if (nManyUnitFlag == '1') {
if (this.dataForm.productUnitList.length > 0) {
this.dataForm.inventoryUnitId = this.productUnitList[0]['id']
this.dataForm.orderMainUnitId = this.productUnitList[0]['id']
this.dataForm.salesMainUnitId = this.productUnitList[0]['id']
this.dataForm.operateUnitId = this.productUnitList[0]['id']
this.dataForm.pricingUnitId = this.productUnitList[0]['id']
if (this.dataForm.productUnitList.length > 1) {
this.dataForm.productUnitList = [this.dataForm.productUnitList[0]]
}
// if (this.dataForm.productUnitList.length > 0) {
// console.log(this.dataForm.productUnitList)
// console.log(this.dataForm.productUnitList.length)
// this.dataForm.inventoryUnitId = this.productUnitList[0]['id']
// this.dataForm.orderMainUnitId = this.productUnitList[0]['id']
// this.dataForm.salesMainUnitId = this.productUnitList[0]['id']
// this.dataForm.operateUnitId = this.productUnitList[0]['id']
// this.dataForm.pricingUnitId = this.productUnitList[0]['id']
// }
}
}
},

Loading…
Cancel
Save