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) } }