From bb5e57f5ff03c7bb016180dca50cdc38c669f089 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 19 四月 2024 18:36:35 +0800 Subject: [PATCH] 修改产品数量报错的问题修改 --- src/views/overview/AddOverviewDialog.vue | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue index 20e670e..a02fc4b 100644 --- a/src/views/overview/AddOverviewDialog.vue +++ b/src/views/overview/AddOverviewDialog.vue @@ -481,10 +481,10 @@ @clearupProduct="clearupProduct" > <template v-if="showFooter" slot="tableButton"> + <!-- fixed="right" --> <el-table-column label="鎿嶄綔" width="60" - fixed="right" align="center" > <template slot-scope="scope"> @@ -1498,16 +1498,16 @@ return { ...res, amount: 1, - productName: res.name, - productId: res.id, + productName: res.productId?res.productName:res.name, + productId: res.productId?res.productId:res.id, auxiliaryUnit:adjunctUnit, - auxiliaryAmount:adjunctAmount?Number(adjunctAmount)*1:0, + auxiliaryAmount:adjunctAmount?(1/Number(adjunctAmount)).toFixed(2):0, auxiliaryAmountInfo:adjunctAmount?Number(adjunctAmount):0, inputFloatAuxiliaryAmount:isValue, grossWeight:res.grossWeight==0?null:res.grossWeight, - totalGrossWeight:res.grossWeight?Number(res.grossWeight)*1:null, + totalGrossWeight:res.grossWeight==0?null:Number(res.grossWeight)*1, netWeight:res.netWeight==0?null:res.netWeight, - totalNetWeight:res.netWeight?Number(res.netWeight)*1:null, + totalNetWeight:res.netWeight==0?null:Number(res.netWeight)*1, }; } }); @@ -1555,7 +1555,7 @@ if(prop=='amount'){ item.totalGrossWeight=item[prop]&&item.grossWeight?Number(item.grossWeight)*Number(item[prop]):null item.totalNetWeight=item[prop]&&item.netWeight?Number(item.netWeight)*Number(item[prop]):null - item.auxiliaryAmount=item[prop]&&auxiliaryAmountObject.auxiliaryAmount?Number(auxiliaryAmountObject.auxiliaryAmount)*Number(item[prop]):'' + item.auxiliaryAmount=item[prop]&&auxiliaryAmountObject.auxiliaryAmount?(Number(item[prop])/Number(auxiliaryAmountObject.auxiliaryAmount)).toFixed(2):null } } }); @@ -1613,7 +1613,6 @@ }, // 鏂板鏂瑰紡淇敼 getSelectArray(val, index) { - debugger if (this.tableData.length == 1 && this.tableData[0].number&&this.tableData[0].number.length == 0) { this.tableData = []; } @@ -1750,7 +1749,7 @@ baseOperationType: this.editConfig.infomation.baseOperationType || undefined, // 1鏄槈鑱� - cutAfterWidth:name=='jialian'?52.6: + cutAfterWidth:name=='jialian'?53.9: (this.editConfig.infomation.baseOperationType == 2 ? 50.8 : 53.3), -- Gitblit v1.8.0