|
|
@ -26,6 +26,7 @@ |
|
|
|
:tableData="data.packageList" |
|
|
|
:isShowButton="false" |
|
|
|
:isShowReduceButton="false" |
|
|
|
@inputStringBlur="tableFormBlur" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -126,10 +127,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id) |
|
|
|
data.value.packageList.forEach(item=>{ |
|
|
|
item.qualifiedAmount =0 |
|
|
|
item.noQualifiedAmount =0 |
|
|
|
item.destroyAmount =0 |
|
|
|
item.frozenAmount =0 |
|
|
|
item.qualifiedAmount = item.qualifiedAmount?item.qualifiedAmount:0 |
|
|
|
item.noQualifiedAmount = item.noQualifiedAmount?item.noQualifiedAmount:0 |
|
|
|
item.destroyAmount = item.destroyAmount?item.destroyAmount:0 |
|
|
|
item.frozenAmount = item.frozenAmount?item.frozenAmount:0 |
|
|
|
}) |
|
|
|
dialogVisible.value = true |
|
|
|
tableSchemas.value.tableFormColumns.map(item=>{ |
|
|
@ -141,10 +142,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
item.qualifiedAmount = item.amount |
|
|
|
}) |
|
|
|
} |
|
|
|
// 全不合格只能输入不合格数量 |
|
|
|
// 让步接收和部分合格 |
|
|
|
else if(row.useDecision == 2 || row.useDecision == 6){ |
|
|
|
tableSchemas.value.tableFormColumns.map(item=>{ |
|
|
|
if(item.field == 'qualifiedAmount' ||item.field == 'noQualifiedAmount'){ |
|
|
|
if(item.field == 'noQualifiedAmount'){ |
|
|
|
item.tableForm.disabled = false |
|
|
|
}else{ |
|
|
|
item.tableForm.disabled = true |
|
|
@ -162,8 +163,12 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
item.frozenAmount = item.amount |
|
|
|
}) |
|
|
|
} |
|
|
|
// 评估代码值是1,接收时候,使用决策下拉列表是全部合格 |
|
|
|
if(row.estimateCode == 1){ |
|
|
|
data.value.useDecision = '1' |
|
|
|
} |
|
|
|
nextTick(() => { |
|
|
|
formMainRef.value.setValues(row) |
|
|
|
formMainRef.value.setValues( data.value) |
|
|
|
}) |
|
|
|
} |
|
|
|
dialogVisible.value = true |
|
|
@ -205,8 +210,11 @@ const onChange = (field, cur)=>{ |
|
|
|
} |
|
|
|
// 全不合格只能输入不合格数量 |
|
|
|
else if(cur == 2 || cur == 6){ |
|
|
|
data.value.packageList.forEach(item=>{ |
|
|
|
item.qualifiedAmount = item.amount |
|
|
|
}) |
|
|
|
tableSchemas.value.tableFormColumns.map(item=>{ |
|
|
|
if(item.field == 'qualifiedAmount' ||item.field == 'noQualifiedAmount'){ |
|
|
|
if(item.field == 'noQualifiedAmount'){ |
|
|
|
item.tableForm.disabled = false |
|
|
|
}else{ |
|
|
|
item.tableForm.disabled = true |
|
|
@ -226,6 +234,16 @@ const onChange = (field, cur)=>{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 失去焦点 |
|
|
|
const tableFormBlur = (field, val,row)=>{ |
|
|
|
if( row.amount < val){ |
|
|
|
row.noQualifiedAmount = row.amount |
|
|
|
row.qualifiedAmount = 0 |
|
|
|
}else{ |
|
|
|
row.qualifiedAmount = row.amount - val |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
const buttonBaseClick = (val) => { |
|
|
|
// 保存 |
|
|
|
if (val == 'save') { |
|
|
|