商品单位带入出错|选择商品单位(销售单位、订货单位)不显示

jg-waiwang-pro
mhsnet 7 months ago
parent 16e97bd3ae
commit 39e97b07ee

@ -492,7 +492,7 @@ export default {
barCode: undefined,
spec: undefined,
inventoryType: undefined,
brandId: "520546789800018053",
brandId: "",
productCategoryId: undefined,
area: ["354094489370697", "354094489370698", "354094489403463"],
dangerousFlag: "1",
@ -782,6 +782,13 @@ export default {
})
return arrB
},
productUnitBase() {
if (this.dataForm.productUnitList.length > 0) {
return this.dataForm.productUnitList[0]['productUnitwarehouseId']
} else {
return ''
}
},
},
watch: {
'dataForm.manyUnitFlag': function (nManyUnitFlag, oManyUnitFlag) {
@ -789,16 +796,24 @@ export default {
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']
// }
}
},
'productUnitBase': function (nUnitId, oUnitId) {
if (nUnitId != '') {
this.dataForm.inventoryUnitId = this.dataForm.productUnitList[0]['productUnitCode']
this.dataForm.orderMainUnitId = [this.dataForm.productUnitList[0]['productUnitCode']]
this.dataForm.salesMainUnitId = [this.dataForm.productUnitList[0]['productUnitCode']]
this.dataForm.operateUnitId = this.dataForm.productUnitList[0]['productUnitCode']
this.dataForm.pricingUnitId = this.dataForm.productUnitList[0]['productUnitCode']
} else {
this.dataForm.inventoryUnitId = ''
this.dataForm.orderMainUnitId = []
this.dataForm.salesMainUnitId = []
this.dataForm.operateUnitId = ''
this.dataForm.pricingUnitId = ''
}
}
},
created() {

Loading…
Cancel
Save