Browse Source

检验模板和方案的校验修改

master_hella_20240701
zhang_li 8 months ago
parent
commit
1108f3c4e8
  1. 22
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  2. 23
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

22
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -436,7 +436,7 @@
<el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
@change="changeFeatureType($event,item)"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-option
@ -971,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)
// if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// }
if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
}
}
const searchTableRef = ref()
const opensearchTable = (

23
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -257,7 +257,7 @@
<el-select
v-model="item.inspectionCharacteristicsBaseVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
@change="changeFeatureType($event,item)"
>
<el-option
v-for="dict in getStrDictOptions(
@ -766,6 +766,7 @@ const submitForm = async () => {
//
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && ((item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyLowlimit)||(item.inspectionCharacteristicsBaseVO.quantifyCapping <=item.inspectionCharacteristicsBaseVO.quantifyTarget)||(item.inspectionCharacteristicsBaseVO.quantifyLowlimit >= item.inspectionCharacteristicsBaseVO.quantifyTarget)))
)
console.log(99,arr2)
if (arr2 && arr2.length > 0) {
const str = arr2.map((item) => item.description).join(',')
message.error(`${str}上限值应大目标值大于下限值`)
@ -793,13 +794,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)
// if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// }
if (e) {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
}
}
const searchTableRef = ref()
const opensearchTable = (

Loading…
Cancel
Save