From d9c71a1a7f7cefd437eddcbc37a76a70534ec9b8 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 29 Apr 2024 17:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=90=88=E6=A0=BC=EF=BC=8C?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E6=95=B0=E9=87=8F=E7=AD=89=E4=BA=8E=E6=95=B0?= =?UTF-8?q?=E9=87=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/inspectionRecord/addForm.vue | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/qms/inspection/inspectionRecord/addForm.vue b/src/views/qms/inspection/inspectionRecord/addForm.vue index 2cf053675..4891365bc 100644 --- a/src/views/qms/inspection/inspectionRecord/addForm.vue +++ b/src/views/qms/inspection/inspectionRecord/addForm.vue @@ -136,14 +136,20 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any tableSchemas.value.tableFormColumns.map(item=>{ item.tableForm.disabled = true }) + // 评估代码值是1,接收时候,使用决策下拉列表是全部合格 + if(row.estimateCode == 1){ + data.value.useDecision = '1' + }else{ + data.value.useDecision ='' + } // 全部合格时合格数量==数量 - if(row.useDecision == 1){ + if(data.value.useDecision == 1){ data.value.packageList.forEach(item=>{ item.qualifiedAmount = item.amount }) } // 让步接收和部分合格 - else if(row.useDecision == 2 || row.useDecision == 6){ + else if(data.value.useDecision == 2 || data.value.useDecision == 6){ tableSchemas.value.tableFormColumns.map(item=>{ if(item.field == 'noQualifiedAmount'){ item.tableForm.disabled = false @@ -153,20 +159,17 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any }) } // 全不合格只能输入不合格数量 - else if(row.useDecision == 3){ + else if(data.value.useDecision == 3){ data.value.packageList.forEach(item=>{ item.noQualifiedAmount = item.amount }) } - else if(row.useDecision == 4){ + else if(data.value.useDecision == 4){ data.value.packageList.forEach(item=>{ item.frozenAmount = item.amount }) } - // 评估代码值是1,接收时候,使用决策下拉列表是全部合格 - if(row.estimateCode == 1){ - data.value.useDecision = '1' - } + nextTick(() => { formMainRef.value.setValues( data.value) }) @@ -241,6 +244,7 @@ const tableFormBlur = (field, val,row)=>{ row.qualifiedAmount = 0 }else{ row.qualifiedAmount = row.amount - val + row.qualifiedAmount = row.qualifiedAmount.toFixed(2) } }