|
@ -163,7 +163,7 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="isShowField !=0"> |
|
|
<el-form-item label="aql" prop="aql"> |
|
|
<el-form-item label="aql" prop="aql"> |
|
|
<el-select v-model="data.aql" placeholder="请选择aql"> |
|
|
<el-select v-model="data.aql" placeholder="请选择aql"> |
|
|
<el-option |
|
|
<el-option |
|
@ -175,7 +175,7 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="isShowField!=0"> |
|
|
<el-form-item label="检验水平" prop="inspectionLevel"> |
|
|
<el-form-item label="检验水平" prop="inspectionLevel"> |
|
|
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平"> |
|
|
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平"> |
|
|
<el-option |
|
|
<el-option |
|
@ -761,6 +761,7 @@ const rules = ref({ |
|
|
{ required: true, message: '请输入选定集', trigger: 'blur' } |
|
|
{ required: true, message: '请输入选定集', trigger: 'blur' } |
|
|
] |
|
|
] |
|
|
}) |
|
|
}) |
|
|
|
|
|
const isShowField = ref(0)//是否显示aql和检验水平字段 0隐藏 大于0显示 |
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
let tabIndex = 1 |
|
|
let tabIndex = 1 |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
@ -771,6 +772,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
dialogTitle.value = t('action.' + type) |
|
|
dialogTitle.value = t('action.' + type) |
|
|
} |
|
|
} |
|
|
formType.value = type |
|
|
formType.value = type |
|
|
|
|
|
isShowField.value=0//设置isShowField == 0隐藏aql和检验水平字段 |
|
|
if (row) { |
|
|
if (row) { |
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
let list = [] |
|
|
let list = [] |
|
@ -779,7 +781,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
} else { |
|
|
} else { |
|
|
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) |
|
|
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
@ -797,7 +798,18 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
} |
|
|
} |
|
|
|
|
|
if(item.inspectionCharacteristicsBaseVO.sampleType == 4){ |
|
|
|
|
|
isShowField.value+=1//设置isShowField > 0显示aql和检验水平字段 |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
// 显示aql和检验水平字段的时候添加必填规则 |
|
|
|
|
|
if( isShowField.value>0){ |
|
|
|
|
|
rules.value.aql[0].required = true |
|
|
|
|
|
rules.value.aql[0].required = true |
|
|
|
|
|
}else{ |
|
|
|
|
|
rules.value.aql[0].required = false |
|
|
|
|
|
rules.value.aql[0].required = false |
|
|
|
|
|
} |
|
|
data.value.process = list |
|
|
data.value.process = list |
|
|
} else { |
|
|
} else { |
|
|
data.value = { |
|
|
data.value = { |
|
@ -1085,14 +1097,10 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
} else if (formField == 'inspectionType') { |
|
|
} else if (formField == 'inspectionType') { |
|
|
data.value.testTypeName = val[0].description |
|
|
data.value.testTypeName = val[0].description |
|
|
} else if (formField == 'programmeTemplateCode') { |
|
|
} else if (formField == 'programmeTemplateCode') { |
|
|
|
|
|
isShowField.value=0//设置isShowField == 0隐藏aql和检验水平字段 |
|
|
data.value.programmeTemplateName = val[0].description |
|
|
data.value.programmeTemplateName = val[0].description |
|
|
data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode |
|
|
data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode |
|
|
data.value.dynamicUpdateName = val[0].dynamicUpdateName |
|
|
data.value.dynamicUpdateName = val[0].dynamicUpdateName |
|
|
console.log(val[0]) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if (formField == 'programmeTemplateCode') { |
|
|
|
|
|
|
|
|
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) |
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
@ -1111,11 +1119,20 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
} |
|
|
} |
|
|
|
|
|
if(item.inspectionCharacteristicsBaseVO.sampleType == 4){ |
|
|
|
|
|
isShowField.value+=1//设置isShowField > 0显示aql和检验水平字段 |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
// 显示aql和检验水平字段的时候添加必填规则 |
|
|
|
|
|
if( isShowField.value>0){ |
|
|
|
|
|
rules.value.aql[0].required = true |
|
|
|
|
|
rules.value.aql[0].required = true |
|
|
|
|
|
}else{ |
|
|
|
|
|
rules.value.aql[0].required = false |
|
|
|
|
|
rules.value.aql[0].required = false |
|
|
|
|
|
} |
|
|
data.value.process = list |
|
|
data.value.process = list |
|
|
} |
|
|
}else if (formField == 'dynamicUpdateCode') { |
|
|
|
|
|
|
|
|
if (formField == 'dynamicUpdateCode') { |
|
|
|
|
|
data.value[formField] = val[0].code |
|
|
data.value[formField] = val[0].code |
|
|
data.value.dynamicUpdateName = val[0].description |
|
|
data.value.dynamicUpdateName = val[0].description |
|
|
} |
|
|
} |
|
|