|
|
@ -26,15 +26,13 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="动态修改规则编码" |
|
|
|
prop="dynamicUpdateCode" |
|
|
|
> |
|
|
|
<el-form-item label="动态修改规则编码" prop="dynamicUpdateCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.dynamicUpdateCode" |
|
|
|
placeholder="请选择动态修改规则编码" |
|
|
|
@blur='dynamicUpdateCodeBlur' |
|
|
|
@blur="mainblur('dynamicUpdate', DynamicRuleApi.getDynamicRulePage)" |
|
|
|
@focus="mainFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -65,10 +63,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="动态修改规则描述" |
|
|
|
prop="dynamicUpdateName" |
|
|
|
> |
|
|
|
<el-form-item label="动态修改规则描述" prop="dynamicUpdateName"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.dynamicUpdateName" |
|
|
@ -97,7 +92,6 @@ |
|
|
|
> |
|
|
|
<template #label> |
|
|
|
<span class="custom-tabs-label" style="display: flex; align-items: center"> |
|
|
|
|
|
|
|
<span>{{ item.description }}</span> |
|
|
|
<Icon |
|
|
|
icon="ep:document-copy" |
|
|
@ -150,7 +144,6 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> --> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div class="small-title">检验特性</div> |
|
|
@ -179,8 +172,14 @@ |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|
|
|
placeholder="请选择检验方法编码" |
|
|
|
disabled |
|
|
|
@blur='inspectionMethodCodeBlur(item)' |
|
|
|
@blur=" |
|
|
|
mainblur( |
|
|
|
'inspectionMethod', |
|
|
|
InspectionMethodApi.getInspectionMethodPage, |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
@focus="mainFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -219,7 +218,7 @@ |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法编码" |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
@ -231,9 +230,12 @@ |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessName" |
|
|
|
disabled |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode" |
|
|
|
placeholder="请选择采样过程" |
|
|
|
@blur=" |
|
|
|
mainblur('samplingProcess', SamplingProcessApi.getSamplingProcessPage, item) |
|
|
|
" |
|
|
|
@focus="mainFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -263,7 +265,20 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程描述" |
|
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程描述" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="是否允许修改特征值" |
|
|
@ -322,9 +337,7 @@ |
|
|
|
placeholder="请选择结果录入方式" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( |
|
|
|
DICT_TYPE.UOM |
|
|
|
)" |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.UOM)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -338,8 +351,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
type="number"/> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
type="number" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
@ -347,7 +362,10 @@ |
|
|
|
label="是否设定上限" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
> |
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping($event,item)"/> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
@change="changeIsCapping($event, item)" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
@ -356,56 +374,80 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
label="是否设定下限" |
|
|
|
> |
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit($event,item)"/> |
|
|
|
|
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
@change="changeLowlimit($event, item)" |
|
|
|
/> |
|
|
|
</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($event,item)" /> |
|
|
|
|
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
@change="changeIsTarget($event, item)" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO. quantifyIsCapping"> |
|
|
|
<el-form-item |
|
|
|
label="上限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if=" |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsCapping |
|
|
|
" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" type="number"/> |
|
|
|
<el-form-item label="上限值" prop="inspectionCharacteristicsBaseVO.quantifyCapping"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
type="number" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if=" |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit |
|
|
|
" |
|
|
|
> |
|
|
|
<el-form-item |
|
|
|
label="下限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" type="number"/> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
type="number" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0 && item.inspectionCharacteristicsBaseVO.quantifyIsTarget"> |
|
|
|
<el-form-item |
|
|
|
label="目标值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if=" |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsTarget |
|
|
|
" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" type="number"/> |
|
|
|
<el-form-item label="目标值" prop="inspectionCharacteristicsBaseVO.quantifyTarget"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
type="number" |
|
|
|
/> |
|
|
|
</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 |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|
|
|
disabled |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
placeholder="请选择选定集" |
|
|
|
@blur="mainblur('quantifyQuantify', SelectedSetApi.getSelectedSetPage, item)" |
|
|
|
@focus="mainFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -435,13 +477,31 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|
|
|
<el-form-item |
|
|
|
label="选定集描述" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|
|
|
disabled |
|
|
|
placeholder="请选择选定集描述" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="Butttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:key="count" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false"> |
|
|
@ -476,7 +536,12 @@ import * as DynamicRuleApi from '@/api/qms/dynamicRule' //动态修改规则 |
|
|
|
import { DynamicRule } from '@/views/qms/dynamicRule/dynamicRule.data' //动态修改规则 |
|
|
|
import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 |
|
|
|
import { SelectedSet } from '@/views/qms/selectedSet/selectedSet.data' //选择集 |
|
|
|
import { validateInteger,validateTwoNum,validateMaxNumber5,validateNumSix } from '@/utils/validator' |
|
|
|
import { |
|
|
|
validateInteger, |
|
|
|
validateTwoNum, |
|
|
|
validateMaxNumber5, |
|
|
|
validateNumSix |
|
|
|
} from '@/utils/validator' |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
@ -571,13 +636,13 @@ const rules = ref({ |
|
|
|
{ required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyTarget': [ |
|
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' }, |
|
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' }, |
|
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' }, |
|
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyUom': [ |
|
|
|
{ required: true, message: '请选择计量单位', trigger: 'blur' } |
|
|
@ -592,7 +657,6 @@ const rules = ref({ |
|
|
|
] |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
|
let tabIndex = 1 |
|
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
@ -644,7 +708,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom, |
|
|
|
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|
|
|
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName, |
|
|
|
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -667,7 +731,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
arr.push(obj) |
|
|
|
}) |
|
|
|
data.value.process = arr |
|
|
|
|
|
|
|
} else { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
data.value.version = String(data.value.version) |
|
|
@ -694,7 +757,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
data.value = { |
|
|
|
code: '', |
|
|
@ -786,6 +848,7 @@ const buttonBaseClick1 = (val) => { |
|
|
|
} |
|
|
|
} |
|
|
|
const buttonBaseClick = (val) => { |
|
|
|
console.log(val) |
|
|
|
// 保存 |
|
|
|
if (val == 'save') { |
|
|
|
submitForm() |
|
|
@ -813,10 +876,7 @@ const validateForm = (formRef) => { |
|
|
|
return array.some((item, index) => { |
|
|
|
return ( |
|
|
|
array.findIndex((v, i) => { |
|
|
|
return ( |
|
|
|
i !== index && |
|
|
|
JSON.stringify(v.sequenceCode) === JSON.stringify(item.sequenceCode) |
|
|
|
) |
|
|
|
return i !== index && JSON.stringify(v.sequenceCode) === JSON.stringify(item.sequenceCode) |
|
|
|
}) !== -1 |
|
|
|
) |
|
|
|
}) |
|
|
@ -824,7 +884,6 @@ const validateForm = (formRef) => { |
|
|
|
|
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
|
|
|
|
// 检验主表字段 |
|
|
|
await validateForm(formProcessRef.value) |
|
|
|
await formMainRef.value.validate() |
|
|
@ -862,9 +921,15 @@ const submitForm = async () => { |
|
|
|
console.log(data.value.process) |
|
|
|
const arr1 = data.value.process.filter( |
|
|
|
(item) => |
|
|
|
((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))|| |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1]?.length>Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)))) && |
|
|
|
((item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
String(item.inspectionCharacteristicsBaseVO.quantifyCapping).split('.')[1]?.length > |
|
|
|
Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)) || |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
String(item.inspectionCharacteristicsBaseVO.quantifyLowlimit).split('.')[1]?.length > |
|
|
|
Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal)) || |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
String(item.inspectionCharacteristicsBaseVO.quantifyTarget).split('.')[1]?.length > |
|
|
|
Number(item.inspectionCharacteristicsBaseVO.quantifyDecimal))) && |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 |
|
|
|
) |
|
|
|
if (arr1 && arr1.length > 0) { |
|
|
@ -873,19 +938,38 @@ const submitForm = async () => { |
|
|
|
return |
|
|
|
} |
|
|
|
// 检验上限值应大目标值大于下限值 |
|
|
|
const arr2 = data.value.process.filter( |
|
|
|
(item) => |
|
|
|
{ |
|
|
|
const arr2 = data.value.process.filter((item) => { |
|
|
|
// 上限值存在并且下限值存在时,目标值不存在,上限值应大于下限值 |
|
|
|
return (item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && !item.inspectionCharacteristicsBaseVO.quantifyIsTarget && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit)))|| |
|
|
|
return ( |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit)) || |
|
|
|
// 上限值存在并且目标值存在时,下限值不存在,上限值应大于目标值 |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && !item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))|| |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)) || |
|
|
|
// 下限值存在并且目标值存在时,上限值不存在,下限值应小于目标值 |
|
|
|
( item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&!item.inspectionCharacteristicsBaseVO.quantifyIsCapping && (parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))|| |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)) || |
|
|
|
// 上限值,下限值,目标值都存在时,上限值应大于目标值大于下限值 |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && item.inspectionCharacteristicsBaseVO.quantifyIsTarget && ((parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) )||(parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <=parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget))||(parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget)))) |
|
|
|
} |
|
|
|
(item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
(parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) || |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyCapping) <= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget) || |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyLowlimit) >= |
|
|
|
parseFloat(item.inspectionCharacteristicsBaseVO.quantifyTarget))) |
|
|
|
) |
|
|
|
}) |
|
|
|
console.log(99, arr2) |
|
|
|
if (arr2 && arr2.length > 0) { |
|
|
|
const str = arr2.map((item) => item.description).join(',') |
|
|
@ -1025,7 +1109,6 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { |
|
|
|
data.value.dynamicUpdateName = val[0].description |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// 选择是否设定上限值 |
|
|
|
const changeIsCapping = (e, item) => { |
|
|
@ -1035,7 +1118,6 @@ const changeIsCapping = (e,item) => { |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// 选择是否设定下限值 |
|
|
|
const changeLowlimit = (e, item) => { |
|
|
@ -1061,7 +1143,9 @@ const copy = (item)=>{ |
|
|
|
newItem.name = data.value.process[data.value.process.length - 1].name + 1 |
|
|
|
newItem.code = '' |
|
|
|
newItem.id = '' |
|
|
|
newItem.sequenceCode =data.value?.process[data.value?.process?.length-1]?.sequenceCode? parseInt(data.value.process[data.value.process.length-1].sequenceCode) + 1 : '' |
|
|
|
newItem.sequenceCode = data.value?.process[data.value?.process?.length - 1]?.sequenceCode |
|
|
|
? parseInt(data.value.process[data.value.process.length - 1].sequenceCode) + 1 |
|
|
|
: '' |
|
|
|
newItem.inspectionCharacteristicsBaseVO.code = '' |
|
|
|
newItem.inspectionCharacteristicsBaseVO.id = '' |
|
|
|
newItem.inspectionCharacteristicsBaseVO.concurrencyStamp = 1 |
|
|
@ -1069,7 +1153,9 @@ const copy = (item)=>{ |
|
|
|
editableTabsValue.value = newItem.name |
|
|
|
} |
|
|
|
// 动态修改规则失去焦点 |
|
|
|
const dynamicUpdateCodeBlur = async () => { |
|
|
|
const mainblur = async (field, pageApi, item) => { |
|
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|
|
if (dataObj[field + 'Code']) { |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
|
filters.push( |
|
|
@ -1081,27 +1167,43 @@ const dynamicUpdateCodeBlur = async () => { |
|
|
|
{ |
|
|
|
column: 'code', |
|
|
|
action: '==', |
|
|
|
value: data.value?.dynamicUpdateCode?.trim() |
|
|
|
value: dataObj[field + 'Code']?.trim() |
|
|
|
} |
|
|
|
) |
|
|
|
// 参数整理 |
|
|
|
_searchCondition.isSearch = true |
|
|
|
_searchCondition.filters = filters |
|
|
|
const array = await DynamicRuleApi.getDynamicRulePage(_searchCondition) |
|
|
|
const array = await pageApi(_searchCondition) |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
const obj = array.list[0] |
|
|
|
if (obj) { |
|
|
|
data.value.dynamicUpdateName = obj.description |
|
|
|
dataObj[field + 'Name'] = obj.description |
|
|
|
} else { |
|
|
|
message.alert('暂无数据') |
|
|
|
data.value.dynamicUpdateCode ='' |
|
|
|
data.value.dynamicUpdateName ='' |
|
|
|
dataObj[field + 'Code'] = '' |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
} |
|
|
|
} else { |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
// 检验方法失去焦点 |
|
|
|
const inspectionMethodCodeBlur = async () => { |
|
|
|
|
|
|
|
const count = ref(0) |
|
|
|
const mainFocus = () => { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn({ disabled: true }), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.small-title { |
|
|
|