|
|
@ -197,10 +197,16 @@ const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const updateRow = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
// if(type=='add'){//新增的时候让动态模版置灰 |
|
|
|
// InspectionTemplateMain.allSchemas.formSchema.find(item => item.field == 'programmeTemplateCode').componentProps.disabled = true//动态规则来源于模版新增置灰之后选择模版之后赋值之后才能自由选择 |
|
|
|
// } |
|
|
|
if('update' == type){ |
|
|
|
updateRow.value = row |
|
|
|
}else{ |
|
|
|
updateRow.value = null |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
@ -240,6 +246,12 @@ const submitForm = async (formType, data) => { |
|
|
|
await InspectionSchemeApi.InspectionSchemeCreat(data1) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
if('update' == formType&&updateRow.value&&updateRow.value.dynamicUpdateCode!=data1.dynamicUpdateCode){ |
|
|
|
await ElMessageBox.alert( |
|
|
|
'请在物料检验计数器管理中,确认对应物料的检验阶段', |
|
|
|
'重要提示' |
|
|
|
) |
|
|
|
} |
|
|
|
await InspectionSchemeApi.InspectionSchemeUpdate(data1) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|