|
@ -27,7 +27,7 @@ |
|
|
:stretch="false" |
|
|
:stretch="false" |
|
|
> |
|
|
> |
|
|
<el-tab-pane |
|
|
<el-tab-pane |
|
|
v-for="(item,index) in data.subList" |
|
|
v-for="item in data.subList" |
|
|
:key="item.name" |
|
|
:key="item.name" |
|
|
:label="item.processCode" |
|
|
:label="item.processCode" |
|
|
:name="item.name" |
|
|
:name="item.name" |
|
@ -37,7 +37,11 @@ |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="编码" prop="processCode"> |
|
|
<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-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
@ -83,8 +87,14 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description"> |
|
|
<el-form-item |
|
|
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" /> |
|
|
label="描述" |
|
|
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.description" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" |
|
|
|
|
|
:disabled="true" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
@ -148,7 +158,7 @@ |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" |
|
|
placeholder="请选择结果录入方式" |
|
|
placeholder="请选择结果录入方式" |
|
|
@change="resultEntryMethodChange($event,item)" |
|
|
@change="resultEntryMethodChange($event, item)" |
|
|
disabled |
|
|
disabled |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
@ -163,14 +173,20 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> |
|
|
<el-form-item |
|
|
|
|
|
label="特征类型" |
|
|
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
|
|
|
> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
placeholder="请选择特征类型" |
|
|
placeholder="请选择特征类型" |
|
|
@change="changeFeatureType" |
|
|
@change="changeFeatureType" |
|
|
disabled |
|
|
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" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
@ -179,7 +195,10 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"> |
|
|
<el-form-item |
|
|
|
|
|
label="开始时间" |
|
|
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
|
|
|
> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" |
|
|
type="datetime" |
|
|
type="datetime" |
|
@ -190,7 +209,10 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"> |
|
|
<el-form-item |
|
|
|
|
|
label="结束时间" |
|
|
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
|
|
|
> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" |
|
|
type="datetime" |
|
|
type="datetime" |
|
@ -200,17 +222,37 @@ |
|
|
/> |
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</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-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-form-item label="合格数量"> |
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> |
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</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-form-item label="不合格数量"> |
|
|
<el-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/> |
|
|
<el-input |
|
|
|
|
|
v-model="cur.unqualifiedQuantity" |
|
|
|
|
|
placeholder="请输入不合格数量" |
|
|
|
|
|
/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<!-- 手动评估的时候显示 --> |
|
|
<!-- 手动评估的时候显示 --> |
|
@ -219,43 +261,54 @@ |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="cur.estimateCode" |
|
|
v-model="cur.estimateCode" |
|
|
placeholder="请选择评估代码" |
|
|
placeholder="请选择评估代码" |
|
|
@change="changeFeatureType"> |
|
|
@change="changeFeatureType" |
|
|
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE )" |
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" |
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value"/> |
|
|
:value="dict.value" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</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-form-item label="检验值" prop="inspectionValue"> |
|
|
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值"/> |
|
|
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</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-form-item label="选定集" prop="qualitativeCode"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="cur.qualitativeCode" |
|
|
v-model="cur.qualitativeCode" |
|
|
placeholder="请选择选定集" |
|
|
placeholder="请选择选定集" |
|
|
@change="changeQualitativeCode($event,item,cur)"> |
|
|
@change="changeQualitativeCode($event, item, cur)" |
|
|
<el-option v-for="dict in item.selectedProjectRespVOList" |
|
|
> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="dict in item.selectedProjectRespVOList" |
|
|
:key="dict.dictionaryValue" |
|
|
:key="dict.dictionaryValue" |
|
|
:label="dict.dictionaryLabel" |
|
|
:label="dict.dictionaryLabel" |
|
|
:value="dict.dictionaryValue"/> |
|
|
:value="dict.dictionaryValue" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> |
|
|
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> |
|
|
<el-form-item label="缺陷级别"> |
|
|
<el-form-item label="缺陷级别"> |
|
|
<el-select |
|
|
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled> |
|
|
v-model="cur.defectLevel" |
|
|
<el-option |
|
|
placeholder="请选择缺陷级别" |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" |
|
|
disabled> |
|
|
|
|
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" |
|
|
|
|
|
:key="dict.value" |
|
|
:key="dict.value" |
|
|
:label="dict.label" |
|
|
:label="dict.label" |
|
|
:value="dict.value"/> |
|
|
:value="dict.value" |
|
|
|
|
|
/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
@ -313,7 +366,6 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule |
|
|
import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 |
|
|
import * as SelectedSetApi from '@/api/qms/selectedSet' //选择集 |
|
|
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //选择集 |
|
|
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //选择集 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
@ -359,7 +411,7 @@ const props = defineProps({ |
|
|
type: Object, |
|
|
type: Object, |
|
|
required: true, |
|
|
required: true, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
} |
|
|
}) |
|
|
}) |
|
|
const { t } = useI18n() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
@ -437,22 +489,17 @@ const rules = ref({ |
|
|
{ required: true, message: '请输入选择集编码', trigger: 'change' } |
|
|
{ required: true, message: '请输入选择集编码', trigger: 'change' } |
|
|
], |
|
|
], |
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [ |
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [ |
|
|
{ required: true, message: '请输入选择开始时间', trigger: 'change'} |
|
|
{ required: true, message: '请输入选择开始时间', trigger: 'change' } |
|
|
], |
|
|
], |
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ |
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ |
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
qualifiedQuantity: [ |
|
|
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }] |
|
|
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
/** 打开弹窗 */ |
|
|
let tabIndex = 1 |
|
|
let tabIndex = 1 |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { |
|
|
dialogVisible.value = true |
|
|
|
|
|
if (titleName) { |
|
|
if (titleName) { |
|
|
dialogTitle.value = t('action.' + titleName) |
|
|
dialogTitle.value = t('action.' + titleName) |
|
|
} else { |
|
|
} else { |
|
@ -468,30 +515,32 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
editableTabsValue.value = index + 1 |
|
|
editableTabsValue.value = index + 1 |
|
|
item.name = index + 1 |
|
|
item.name = index + 1 |
|
|
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO |
|
|
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] |
|
|
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) { |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
for(let i=0;i<data.value.sampleTotalAmount;i++){ |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
|
|
for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) { |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
inspectionValue:'',//检验值 |
|
|
inspectionValue: '', //检验值 |
|
|
qualitativeCode:'',//定性字典项值 |
|
|
qualitativeCode: '', //定性字典项值 |
|
|
estimateCode:'',//评估代码 |
|
|
estimateCode: '', //评估代码 |
|
|
defectLevel:'',//缺陷级别 |
|
|
defectLevel: '', //缺陷级别 |
|
|
qualifiedQuantity:'',//合格数量 |
|
|
qualifiedQuantity: '', //合格数量 |
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
inspectionValue:'',//检验值 |
|
|
// inspectionValue: '', //检验值 |
|
|
qualitativeCode:'',//定性字典项值 |
|
|
// qualitativeCode: '', //定性字典项值 |
|
|
estimateCode:'',//评估代码 |
|
|
// estimateCode: '', //评估代码 |
|
|
defectLevel:'',//缺陷级别 |
|
|
// defectLevel: '', //缺陷级别 |
|
|
qualifiedQuantity:'',//合格数量 |
|
|
// qualifiedQuantity: '', //合格数量 |
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
// unqualifiedQuantity: '' //不合格数量 |
|
|
}] |
|
|
// } |
|
|
|
|
|
// ) |
|
|
} |
|
|
} |
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
@ -511,7 +560,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
data.value.subList = list |
|
|
data.value.subList = list |
|
|
|
|
|
|
|
|
|
|
|
dialogVisible.value = true |
|
|
|
|
|
nextTick(() => { |
|
|
formMainRef.value.setValues(row) |
|
|
formMainRef.value.setValues(row) |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
data.value = { |
|
|
data.value = { |
|
|
code: '', |
|
|
code: '', |
|
@ -528,7 +581,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
subList: [] |
|
|
subList: [] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
dialogVisible.value = true |
|
|
tabIndex = data.value.subList.length + 1 |
|
|
tabIndex = data.value.subList.length + 1 |
|
|
} |
|
|
} |
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
@ -633,7 +686,6 @@ const validateForm = (formRef) => { |
|
|
|
|
|
|
|
|
const submitForm = async () => { |
|
|
const submitForm = async () => { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
console.log(data.value.subList) |
|
|
console.log(data.value.subList) |
|
|
// const validateForm1 = await validateForm(formMainRef.value) |
|
|
// const validateForm1 = await validateForm(formMainRef.value) |
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
|
const elForm = unref(formMainRef)?.getElFormRef() |
|
@ -648,39 +700,60 @@ const submitForm = async () => { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
// 判断附加费用数组是否有未填的选项 |
|
|
let arrBol = data.value.subList.map((item, index) => { |
|
|
let arrBol = [] |
|
|
let arr1 = [] |
|
|
let isOutweigh = []//结束时间是否大于开始时间 |
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){ |
|
|
data.value.subList.forEach((item, index) => { |
|
|
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) { |
|
|
|
|
|
arrBol.push( |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
(cur, key) => { |
|
|
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity |
|
|
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.inspectionJobCharacteristicsUpdateReqVO.featureType == 0){ |
|
|
if (item.samplingProcessRespVO.evaluationMode == 1) { |
|
|
arr1.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
arrBol.push( |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
(cur, key) => { |
|
|
|
|
|
return !cur.estimateCode || !cur.defectLevel |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) { |
|
|
|
|
|
arrBol.push( |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
(cur, key) => { |
|
|
return !cur.inspectionValue |
|
|
return !cur.inspectionValue |
|
|
})) |
|
|
|
|
|
} |
|
|
} |
|
|
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1){ |
|
|
) |
|
|
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ |
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) { |
|
|
|
|
|
arrBol.push( |
|
|
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some( |
|
|
|
|
|
(cur, key) => { |
|
|
return !cur.qualitativeCode |
|
|
return !cur.qualitativeCode |
|
|
})) |
|
|
|
|
|
} |
|
|
} |
|
|
return arr1 |
|
|
) |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
// 开始时间大于结束时间放入数组中 |
|
|
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) { |
|
|
|
|
|
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
// console.log(arrBol) |
|
|
let isEmpty1 = arrBol.some(item=>item == true) |
|
|
// let isEmpty1 = arrBol.filter(item=>item == true) |
|
|
if(isEmpty1){ |
|
|
// arrBol.forEach(item=>{ |
|
|
message.error('检验工序和检验特性有字段未填写完全') |
|
|
// console.log('1q1q') |
|
|
return; |
|
|
// console.log(typeof item) |
|
|
} |
|
|
// }) |
|
|
if(isOutweigh.length>0){ |
|
|
// setTimeout(()=>{ |
|
|
message.error('检验特性中有开始时间大于结束时间') |
|
|
// console.log(arrBol.includes(true)) |
|
|
return; |
|
|
// },2000) |
|
|
} |
|
|
|
|
|
return; |
|
|
if (formType.value == 'create') { |
|
|
if (formType.value == 'create') { |
|
|
// 主子表——提交请求 |
|
|
// 主子表——提交请求 |
|
|
emit('submitForm', formType.value, data.value) |
|
|
emit('submitForm', formType.value, data.value) |
|
@ -789,22 +862,22 @@ const opensearchTable = ( |
|
|
// 弹层确定返回所选数据 |
|
|
// 弹层确定返回所选数据 |
|
|
// val : 弹层列表row 数据 |
|
|
// val : 弹层列表row 数据 |
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
if(type == 'features'){ |
|
|
if (type == 'features') { |
|
|
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code |
|
|
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code |
|
|
if(formField == 'inspectionMethodCode'){ |
|
|
if (formField == 'inspectionMethodCode') { |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description |
|
|
}else if(formField == 'dynamicUpdateCode'){ |
|
|
} else if (formField == 'dynamicUpdateCode') { |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description |
|
|
}else if(formField == 'inspectionMethod'){ |
|
|
} else if (formField == 'inspectionMethod') { |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description |
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description |
|
|
} |
|
|
} |
|
|
} else if(type == 'main'){ |
|
|
} else if (type == 'main') { |
|
|
data.value[formField] = val[0].code |
|
|
data.value[formField] = val[0].code |
|
|
if(formField == 'itemCode'){ |
|
|
if (formField == 'itemCode') { |
|
|
data.value.itemName = val[0].name |
|
|
data.value.itemName = val[0].name |
|
|
}else if(formField == 'testTypeCode'){ |
|
|
} else if (formField == 'testTypeCode') { |
|
|
data.value.testTypeName = val[0].description |
|
|
data.value.testTypeName = val[0].description |
|
|
}else if(formField == 'programmeTemplateCode'){ |
|
|
} else if (formField == 'programmeTemplateCode') { |
|
|
data.value.programmeTemplateName = val[0].description |
|
|
data.value.programmeTemplateName = val[0].description |
|
|
} |
|
|
} |
|
|
if (formField == 'programmeTemplateCode') { |
|
|
if (formField == 'programmeTemplateCode') { |
|
@ -821,7 +894,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
} else { |
|
|
} else { |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = |
|
|
|
|
|
false |
|
|
} |
|
|
} |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
@ -836,36 +910,38 @@ 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 resultEntryMethodChange = (e,item) => { |
|
|
const resultEntryMethodChange = (e, item) => { |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
if (e==0) { |
|
|
if (e == 0) { |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
// 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({ |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
inspectionValue:'',//检验值 |
|
|
inspectionValue: '', //检验值 |
|
|
qualitativeCode:'',//定性字典项值 |
|
|
qualitativeCode: '', //定性字典项值 |
|
|
estimateCode:'',//评估代码 |
|
|
estimateCode: '', //评估代码 |
|
|
defectLevel:'',//缺陷级别 |
|
|
defectLevel: '', //缺陷级别 |
|
|
qualifiedQuantity:'',//合格数量 |
|
|
qualifiedQuantity: '', //合格数量 |
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [ |
|
|
inspectionValue:'',//检验值 |
|
|
{ |
|
|
qualitativeCode:'',//定性字典项值 |
|
|
inspectionValue: '', //检验值 |
|
|
estimateCode:'',//评估代码 |
|
|
qualitativeCode: '', //定性字典项值 |
|
|
defectLevel:'',//缺陷级别 |
|
|
estimateCode: '', //评估代码 |
|
|
qualifiedQuantity:'',//合格数量 |
|
|
defectLevel: '', //缺陷级别 |
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
qualifiedQuantity: '', //合格数量 |
|
|
}] |
|
|
unqualifiedQuantity: '' //不合格数量 |
|
|
} |
|
|
} |
|
|
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
} |
|
|
} |
|
|
// 选择选定级 |
|
|
// 选择选定级 |
|
|
const changeQualitativeCode= (e,item,cur)=>{ |
|
|
const changeQualitativeCode = (e, item, cur) => { |
|
|
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) |
|
|
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e) |
|
|
console.log(obj) |
|
|
console.log(obj) |
|
|
cur.defectLevel = obj.defectLevel |
|
|
cur.defectLevel = obj.defectLevel |
|
|
} |
|
|
} |
|
|