|
|
|
@ -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']
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|