|
|
@ -450,111 +450,106 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
label="是否设定上限" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
label="计量单位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
@change="changeIsCapping" |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
label="上限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
label="小数位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
label="是否设定下限" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
label="是否设定上限" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
@change="changeLowlimit" |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
@change="changeIsCapping($event,item)" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
label="下限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
label="是否设定下限" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
@change="changeLowlimit($event,item)" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
label="是否设定目标值" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
@change="changeIsTarget" |
|
|
|
@change="changeIsTarget($event,item)" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsCapping"> |
|
|
|
<el-form-item |
|
|
|
label="目标值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
label="上限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"> |
|
|
|
<el-form-item |
|
|
|
label="计量单位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
label="下限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsTarget"> |
|
|
|
<el-form-item |
|
|
|
label="小数位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
label="目标值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|
|
|
<el-form-item |
|
|
|
label="选择集" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 1" |
|
|
|
|
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
@ -751,7 +746,7 @@ const rules = ref({ |
|
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
{ required: true, message: '请输入上限值', trigger: ['blur','change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
@ -785,26 +780,24 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) |
|
|
|
} |
|
|
|
|
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index+1 |
|
|
|
item.name = index + 1 |
|
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} else { |
|
|
|
data.value = { |
|
|
@ -1090,26 +1083,25 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
|
|
|
|
} |
|
|
|
if (formField == 'programmeTemplateCode') { |
|
|
|
|
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
editableTabsValue.value = index+1 |
|
|
|
item.name = index + 1 |
|
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
if (item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} |
|
|
@ -1123,15 +1115,18 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
} |
|
|
|
// 选择是否设定上限值 |
|
|
|
const changeIsCapping = (e) => { |
|
|
|
const changeIsCapping = (e,item) => { |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyCapping = '' |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// 选择是否设定下限值 |
|
|
|
const changeLowlimit = (e) => { |
|
|
|
const changeLowlimit = (e,item) => { |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = '' |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
@ -1139,7 +1134,8 @@ const changeLowlimit = (e) => { |
|
|
|
} |
|
|
|
} |
|
|
|
// 选择是否设定目标值 |
|
|
|
const changeIsTarget = (e) => { |
|
|
|
const changeIsTarget = (e,item) => { |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyTarget = '' |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|