|
@ -436,7 +436,7 @@ |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|
|
placeholder="请选择特征类型" |
|
|
placeholder="请选择特征类型" |
|
|
@change="changeFeatureType" |
|
|
@change="changeFeatureType($event,item)" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
@ -450,111 +450,106 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</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 |
|
|
<el-form-item |
|
|
label="是否设定上限" |
|
|
label="计量单位" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
> |
|
|
> |
|
|
<el-switch |
|
|
<el-input |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
@change="changeIsCapping" |
|
|
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="上限值" |
|
|
label="小数位" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
label="是否设定上限" |
|
|
label="是否设定下限" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-switch |
|
|
<el-switch |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
@change="changeLowlimit" |
|
|
@change="changeIsCapping($event,item)" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="下限值" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
label="是否设定下限" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-switch |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
|
|
@change="changeLowlimit($event,item)" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
label="是否设定目标值" |
|
|
label="是否设定目标值" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-switch |
|
|
<el-switch |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
@change="changeIsTarget" |
|
|
@change="changeIsTarget($event,item)" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsCapping"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="目标值" |
|
|
label="上限值" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="计量单位" |
|
|
label="下限值" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsTarget"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="小数位" |
|
|
label="目标值" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
label="选择集" |
|
|
label="选择集" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 1" |
|
|
|
|
|
> |
|
|
> |
|
|
<div style="display: flex; width: 100%"> |
|
|
<div style="display: flex; width: 100%"> |
|
|
<el-input |
|
|
<el-input |
|
@ -751,7 +746,7 @@ const rules = ref({ |
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
{ required: true, message: '请输入上限值', trigger: ['blur','change'] } |
|
|
], |
|
|
], |
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
{ 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 = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
list.forEach((item, index) => { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
editableTabsValue.value = index + 1 |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
item.name = index + 1 |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
list.forEach((item, index) => { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
editableTabsValue.value = index+1 |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
item.name = index + 1 |
|
|
} else { |
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
} |
|
|
if (item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
} |
|
|
} else { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
} |
|
|
} |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
} else { |
|
|
} |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
}) |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
data.value.process = list |
|
|
data.value.process = list |
|
|
} else { |
|
|
} else { |
|
|
data.value = { |
|
|
data.value = { |
|
@ -978,13 +971,21 @@ if (props.footButttondata) { |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
// 选择特征类型 |
|
|
// 选择特征类型 |
|
|
const changeFeatureType = (e) => { |
|
|
const changeFeatureType = (e,item) => { |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsCapping = false |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit = false |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsTarget = false |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyCapping = '' |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = '' |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyTarget= '' |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode= '' |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyQuantifyName= '' |
|
|
console.log(e) |
|
|
console.log(e) |
|
|
// if (e) { |
|
|
if (e) { |
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true |
|
|
// } else { |
|
|
} else { |
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false |
|
|
// } |
|
|
} |
|
|
} |
|
|
} |
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
const opensearchTable = ( |
|
|
const opensearchTable = ( |
|
@ -1090,25 +1091,24 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
if (formField == 'programmeTemplateCode') { |
|
|
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.quantifyLowlimit'][0].required = false |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
list.forEach((item, index) => { |
|
|
list.forEach((item, index) => { |
|
|
editableTabsValue.value = index + 1 |
|
|
editableTabsValue.value = index+1 |
|
|
item.name = 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 |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
|
|
} |
|
|
} |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
|
|
} |
|
|
} |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
} else { |
|
|
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
data.value.process = list |
|
|
data.value.process = list |
|
@ -1123,15 +1123,18 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
} |
|
|
} |
|
|
// 选择是否设定上限值 |
|
|
// 选择是否设定上限值 |
|
|
const changeIsCapping = (e) => { |
|
|
const changeIsCapping = (e,item) => { |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyCapping = '' |
|
|
if (e) { |
|
|
if (e) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
} else { |
|
|
} else { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 选择是否设定下限值 |
|
|
// 选择是否设定下限值 |
|
|
const changeLowlimit = (e) => { |
|
|
const changeLowlimit = (e,item) => { |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyLowlimit = '' |
|
|
if (e) { |
|
|
if (e) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
} else { |
|
|
} else { |
|
@ -1139,7 +1142,8 @@ const changeLowlimit = (e) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 选择是否设定目标值 |
|
|
// 选择是否设定目标值 |
|
|
const changeIsTarget = (e) => { |
|
|
const changeIsTarget = (e,item) => { |
|
|
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyTarget = '' |
|
|
if (e) { |
|
|
if (e) { |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
} else { |
|
|
} else { |
|
|