|
|
@ -27,7 +27,7 @@ |
|
|
|
:stretch="false" |
|
|
|
> |
|
|
|
<el-tab-pane |
|
|
|
v-for="(item,index) in data.subList" |
|
|
|
v-for="item in data.subList" |
|
|
|
:key="item.name" |
|
|
|
:label="item.processCode" |
|
|
|
:name="item.name" |
|
|
@ -37,7 +37,11 @@ |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="编码" prop="processCode"> |
|
|
|
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> |
|
|
|
<el-input |
|
|
|
v-model="item.processCode" |
|
|
|
placeholder="根据系统生成" |
|
|
|
:disabled="true" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -51,12 +55,12 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="描述" prop="processDescribe"> |
|
|
|
<el-input v-model="item.processDescribe" :disabled="true" /> |
|
|
|
<el-input v-model="item.processDescribe" :disabled="true" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="顺序号" prop="sequenceCode"> |
|
|
|
<el-input v-model="item.sequenceCode" :disabled="true" /> |
|
|
|
<el-input v-model="item.sequenceCode" :disabled="true" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -83,39 +87,45 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description"> |
|
|
|
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" /> |
|
|
|
<el-form-item |
|
|
|
label="描述" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.description" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" |
|
|
|
:disabled="true" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="检验方法" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程编码" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程编码" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="检验方法" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程编码" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程编码" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="动态修改规则编码" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode" |
|
|
@ -148,7 +158,7 @@ |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" |
|
|
|
placeholder="请选择结果录入方式" |
|
|
|
@change="resultEntryMethodChange($event,item)" |
|
|
|
@change="resultEntryMethodChange($event, item)" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option |
|
|
@ -163,14 +173,20 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> |
|
|
|
<el-form-item |
|
|
|
label="特征类型" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
|
placeholder="请选择特征类型" |
|
|
|
@change="changeFeatureType" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( |
|
|
|
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE |
|
|
|
)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -179,7 +195,10 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"> |
|
|
|
<el-form-item |
|
|
|
label="开始时间" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
|
> |
|
|
|
<el-date-picker |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
|
type="datetime" |
|
|
@ -190,7 +209,10 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"> |
|
|
|
<el-form-item |
|
|
|
label="结束时间" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
|
> |
|
|
|
<el-date-picker |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
|
type="datetime" |
|
|
@ -200,17 +222,37 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,i) in data.subList[index].inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"> |
|
|
|
<el-col |
|
|
|
:span="24" |
|
|
|
style=" |
|
|
|
border: 1px solid #dedede; |
|
|
|
border-radius: 4px; |
|
|
|
padding-top: 16px; |
|
|
|
margin-bottom: 10px; |
|
|
|
" |
|
|
|
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO |
|
|
|
.recordInspectionQuantifyList" |
|
|
|
:key="i" |
|
|
|
> |
|
|
|
<el-row> |
|
|
|
<!-- 汇总录入的时候显示 --> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1" |
|
|
|
> |
|
|
|
<el-form-item label="合格数量"> |
|
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> |
|
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1" |
|
|
|
> |
|
|
|
<el-form-item label="不合格数量"> |
|
|
|
<el-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/> |
|
|
|
<el-input |
|
|
|
v-model="cur.unqualifiedQuantity" |
|
|
|
placeholder="请输入不合格数量" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- 手动评估的时候显示 --> |
|
|
@ -219,43 +261,54 @@ |
|
|
|
<el-select |
|
|
|
v-model="cur.estimateCode" |
|
|
|
placeholder="请选择评估代码" |
|
|
|
@change="changeFeatureType"> |
|
|
|
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE )" |
|
|
|
@change="changeFeatureType" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value"/> |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-form-item label="检验值" prop="inspectionValue"> |
|
|
|
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值"/> |
|
|
|
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1" |
|
|
|
> |
|
|
|
<el-form-item label="选定集" prop="qualitativeCode"> |
|
|
|
<el-select |
|
|
|
v-model="cur.qualitativeCode" |
|
|
|
placeholder="请选择选定集" |
|
|
|
@change="changeQualitativeCode($event,item,cur)"> |
|
|
|
<el-option v-for="dict in item.selectedProjectRespVOList" |
|
|
|
@change="changeQualitativeCode($event, item, cur)" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in item.selectedProjectRespVOList" |
|
|
|
:key="dict.dictionaryValue" |
|
|
|
:label="dict.dictionaryLabel" |
|
|
|
:value="dict.dictionaryValue"/> |
|
|
|
:value="dict.dictionaryValue" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> |
|
|
|
<el-form-item label="缺陷级别"> |
|
|
|
<el-select |
|
|
|
v-model="cur.defectLevel" |
|
|
|
placeholder="请选择缺陷级别" |
|
|
|
disabled> |
|
|
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" |
|
|
|
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value"/> |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -313,7 +366,6 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule |
|
|
|
import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 |
|
|
|
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //选择集 |
|
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -354,12 +406,12 @@ const props = defineProps({ |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 校验rules |
|
|
|
rules: { |
|
|
|
// 校验rules |
|
|
|
rules: { |
|
|
|
type: Object, |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
@ -400,7 +452,7 @@ if (props.basicFormWidth) { |
|
|
|
} |
|
|
|
const rules = ref({ |
|
|
|
...props.rules, |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ |
|
|
@ -437,22 +489,17 @@ const rules = ref({ |
|
|
|
{ required: true, message: '请输入选择集编码', trigger: 'change' } |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [ |
|
|
|
{ required: true, message: '请输入选择开始时间', trigger: 'change'} |
|
|
|
{ required: true, message: '请输入选择开始时间', trigger: 'change' } |
|
|
|
], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ |
|
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
|
], |
|
|
|
qualifiedQuantity: [ |
|
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
], |
|
|
|
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }] |
|
|
|
}) |
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
|
let tabIndex = 1 |
|
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
|
dialogVisible.value = true |
|
|
|
if (titleName) { |
|
|
|
dialogTitle.value = t('action.' + titleName) |
|
|
|
} else { |
|
|
@ -468,30 +515,32 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for(let i=0;i<data.value.sampleTotalAmount;i++){ |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}) |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for (let i = 0; i < data.value.sampleTotalAmount; i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
|
estimateCode: '', //评估代码 |
|
|
|
defectLevel: '', //缺陷级别 |
|
|
|
qualifiedQuantity: '', //合格数量 |
|
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}] |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [ |
|
|
|
{ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
|
estimateCode: '', //评估代码 |
|
|
|
defectLevel: '', //缺陷级别 |
|
|
|
qualifiedQuantity: '', //合格数量 |
|
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
@ -511,7 +560,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.subList = list |
|
|
|
formMainRef.value.setValues(row) |
|
|
|
|
|
|
|
dialogVisible.value = true |
|
|
|
nextTick(() => { |
|
|
|
formMainRef.value.setValues(row) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
data.value = { |
|
|
|
code: '', |
|
|
@ -528,7 +581,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
subList: [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
dialogVisible.value = true |
|
|
|
tabIndex = data.value.subList.length + 1 |
|
|
|
} |
|
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
@ -633,51 +686,66 @@ const validateForm = (formRef) => { |
|
|
|
|
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
|
|
|
|
console.log(data.value.subList) |
|
|
|
// const validateForm1 = await validateForm(formMainRef.value) |
|
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
|
const valid = await elForm.validate() |
|
|
|
if (!valid) return |
|
|
|
// const bol1 = await validateForm(formProcessRef.value) |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol2) { |
|
|
|
// 校验表单 |
|
|
|
if (!elForm) return |
|
|
|
const valid = await elForm.validate() |
|
|
|
if (!valid) return |
|
|
|
// const bol1 = await validateForm(formProcessRef.value) |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol2) { |
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
return |
|
|
|
} |
|
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
|
let arrBol = data.value.subList.map((item, index) => { |
|
|
|
let arr1 = [] |
|
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){ |
|
|
|
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
|
})) |
|
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
|
let arrBol = data.value.subList.map((item, index) => { |
|
|
|
let arr1 = [] |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
|
arr1.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
if(item.samplingProcessRespVO.evaluationMode == 1){ |
|
|
|
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
|
return !cur.estimateCode ||!cur.defectLevel |
|
|
|
})) |
|
|
|
if (item.samplingProcessRespVO.evaluationMode == 1) { |
|
|
|
arr1.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.estimateCode || !cur.defectLevel |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0){ |
|
|
|
arr1.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
|
return !cur.inspectionValue |
|
|
|
})) |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { |
|
|
|
arr1.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.inspectionValue |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1){ |
|
|
|
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
|
return !cur.qualitativeCode |
|
|
|
})) |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) { |
|
|
|
arr1.push( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
(cur, key) => { |
|
|
|
return !cur.qualitativeCode |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
return arr1 |
|
|
|
}) |
|
|
|
// console.log(arrBol) |
|
|
|
// let isEmpty1 = arrBol.filter(item=>item == true) |
|
|
|
// arrBol.forEach(item=>{ |
|
|
|
// console.log('1q1q') |
|
|
|
// console.log(typeof item) |
|
|
|
// }) |
|
|
|
}) |
|
|
|
// console.log(arrBol) |
|
|
|
// let isEmpty1 = arrBol.filter(item=>item == true) |
|
|
|
// arrBol.forEach(item=>{ |
|
|
|
// console.log('1q1q') |
|
|
|
// console.log(typeof item) |
|
|
|
// }) |
|
|
|
// setTimeout(()=>{ |
|
|
|
// console.log(arrBol.includes(true)) |
|
|
|
// },2000) |
|
|
@ -789,22 +857,22 @@ const opensearchTable = ( |
|
|
|
// 弹层确定返回所选数据 |
|
|
|
// val : 弹层列表row 数据 |
|
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if(type == 'features'){ |
|
|
|
if (type == 'features') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code |
|
|
|
if(formField == 'inspectionMethodCode'){ |
|
|
|
if (formField == 'inspectionMethodCode') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description |
|
|
|
}else if(formField == 'dynamicUpdateCode'){ |
|
|
|
} else if (formField == 'dynamicUpdateCode') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description |
|
|
|
}else if(formField == 'inspectionMethod'){ |
|
|
|
} else if (formField == 'inspectionMethod') { |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description |
|
|
|
} |
|
|
|
} else if(type == 'main'){ |
|
|
|
} else if (type == 'main') { |
|
|
|
data.value[formField] = val[0].code |
|
|
|
if(formField == 'itemCode'){ |
|
|
|
if (formField == 'itemCode') { |
|
|
|
data.value.itemName = val[0].name |
|
|
|
}else if(formField == 'testTypeCode'){ |
|
|
|
} else if (formField == 'testTypeCode') { |
|
|
|
data.value.testTypeName = val[0].description |
|
|
|
}else if(formField == 'programmeTemplateCode'){ |
|
|
|
} else if (formField == 'programmeTemplateCode') { |
|
|
|
data.value.programmeTemplateName = val[0].description |
|
|
|
} |
|
|
|
if (formField == 'programmeTemplateCode') { |
|
|
@ -821,7 +889,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = |
|
|
|
false |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
@ -836,36 +905,38 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
} |
|
|
|
// 请选择结果录入方式 |
|
|
|
const resultEntryMethodChange = (e,item) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] |
|
|
|
if (e==0) { |
|
|
|
const resultEntryMethodChange = (e, item) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
if (e == 0) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for(let i=0;i<data.value.sampleTotalAmount;i++){ |
|
|
|
for (let i = 0; i < data.value.sampleTotalAmount; i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
|
estimateCode: '', //评估代码 |
|
|
|
defectLevel: '', //缺陷级别 |
|
|
|
qualifiedQuantity: '', //合格数量 |
|
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}] |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [ |
|
|
|
{ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
|
estimateCode: '', //评估代码 |
|
|
|
defectLevel: '', //缺陷级别 |
|
|
|
qualifiedQuantity: '', //合格数量 |
|
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
|
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
|
} |
|
|
|
// 选择选定级 |
|
|
|
const changeQualitativeCode= (e,item,cur)=>{ |
|
|
|
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) |
|
|
|
const changeQualitativeCode = (e, item, cur) => { |
|
|
|
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e) |
|
|
|
console.log(obj) |
|
|
|
cur.defectLevel = obj.defectLevel |
|
|
|
} |
|
|
|