|
|
@ -1,4 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<Dialog |
|
|
|
:title="dialogTitle" |
|
|
|
v-model="dialogVisible" |
|
|
@ -15,8 +16,29 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="描述" prop="description"> |
|
|
|
<el-input v-model="data.description" placeholder="请填写描述" /> |
|
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.itemCode" disabled placeholder="请选择物料编码" /> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'itemCode', |
|
|
|
null, |
|
|
|
'物料编码', |
|
|
|
Itembasic.allSchemas, |
|
|
|
ItemBasicApi.getItembasicPage, |
|
|
|
null, |
|
|
|
false, |
|
|
|
'form', |
|
|
|
null |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -25,46 +47,66 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检验类型编码" prop="testTypeCode" > |
|
|
|
<el-form-item label="检验类型编码" prop="testTypeCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.testTypeCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验类型编码" |
|
|
|
/> |
|
|
|
<el-input v-model="data.testTypeCode" disabled placeholder="请选择检验类型编码" /> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click="opensearchTable('testTypeCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApi.getSamplingProcessPage,null,false,null,item)" |
|
|
|
><Icon icon="ep:search"/> |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'testTypeCode', |
|
|
|
null, |
|
|
|
'检验类型', |
|
|
|
SamplingProcess.allSchemas, |
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
null, |
|
|
|
false, |
|
|
|
'form', |
|
|
|
null |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检验模板编码" prop="programmeTemplateCode" > |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.testTypeCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验模板编码" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click="opensearchTable('programmeTemplateCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApigetSamplingProcessPage,null,false,null,item)" |
|
|
|
><Icon icon="ep:search"/> |
|
|
|
</el-button> |
|
|
|
<el-form-item label="检验模板编码" prop="programmeTemplateCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.programmeTemplateCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验模板编码" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'programmeTemplateCode', |
|
|
|
null, |
|
|
|
'检验模板编码', |
|
|
|
InspectionTemplateMain.allSchemas, |
|
|
|
InspectionTemplateApi.inspectionTemplatePage, |
|
|
|
null, |
|
|
|
false, |
|
|
|
'form', |
|
|
|
null |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="拆分规则" prop="splitRule"> |
|
|
|
<el-select v-model="data.splitRule" placeholder="请选择拆分规则" > |
|
|
|
<el-select v-model="data.splitRule" placeholder="请选择拆分规则"> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( DICT_TYPE.SPLIT_RULES )" |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.SPLIT_RULES)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -74,9 +116,9 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="aql" prop="aql"> |
|
|
|
<el-select v-model="data.aql" placeholder="请选择aql" > |
|
|
|
<el-select v-model="data.aql" placeholder="请选择aql"> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( DICT_TYPE.BASIC_AQL )" |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.BASIC_AQL)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -86,9 +128,9 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检验水平" prop="inspectionLevel"> |
|
|
|
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平" > |
|
|
|
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平"> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_LEVEL )" |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_LEVEL)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -102,7 +144,8 @@ |
|
|
|
v-model="data.effectiveDate" |
|
|
|
type="datetime" |
|
|
|
placeholder="请选择生效时间" |
|
|
|
style="width:100%" |
|
|
|
style="width: 100%" |
|
|
|
value-format="x" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -112,7 +155,8 @@ |
|
|
|
v-model="data.expirationDate" |
|
|
|
type="datetime" |
|
|
|
placeholder="请选择失效时间" |
|
|
|
style="width:100%" |
|
|
|
style="width: 100%" |
|
|
|
value-format="x" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -297,17 +341,7 @@ |
|
|
|
label="是否允许修改特征值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
placeholder="请选择是否允许修改特征值" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in isYesList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -337,6 +371,7 @@ |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|
|
|
placeholder="请选择特征类型" |
|
|
|
@change="changeFeatureType" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( |
|
|
@ -355,18 +390,8 @@ |
|
|
|
label="是否设定上限" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
placeholder="请选择是否设定上限" |
|
|
|
@change="changeIsCapping" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in isYesList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -375,7 +400,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" /> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -384,18 +412,9 @@ |
|
|
|
label="是否设定下限" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
placeholder="请选择是否设定下限" |
|
|
|
@change="changeLowlimit" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in isYesList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -404,7 +423,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" /> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -413,18 +435,8 @@ |
|
|
|
label="是否设定目标值" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
placeholder="请选择是否设定目标值" |
|
|
|
@change="changeIsTarget" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in isYesList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -433,7 +445,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" /> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
@ -443,7 +458,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" /> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -452,7 +470,10 @@ |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" /> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -484,6 +505,7 @@ |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
><Icon icon="ep:search" |
|
|
|
/></el-button> |
|
|
|
</div> |
|
|
@ -514,6 +536,7 @@ |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -524,6 +547,10 @@ import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' |
|
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
|
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data' |
|
|
|
import * as SamplingProcessApi from '@/api/qms/samplingProcess' |
|
|
|
import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data' |
|
|
|
import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate' |
|
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
|
import * as ItemBasicApi from '@/api/wms/itembasic' |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
@ -570,21 +597,19 @@ const formProcessRef = ref() |
|
|
|
|
|
|
|
const data = ref({ |
|
|
|
code: '', |
|
|
|
description: '', |
|
|
|
itemCode: '', |
|
|
|
version: '', |
|
|
|
available:true, |
|
|
|
testTypeCode:'', |
|
|
|
programmeTemplateCode:'', |
|
|
|
splitRule:'', |
|
|
|
aql:'', |
|
|
|
inspectionLevel:'', |
|
|
|
effectiveDate:'', |
|
|
|
expirationDate:'', |
|
|
|
available: true, |
|
|
|
process: [] |
|
|
|
}) |
|
|
|
const isYesList = [ |
|
|
|
{ |
|
|
|
value: true, |
|
|
|
label: '是' |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: false, |
|
|
|
label: '否' |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
const dialogVisibleName = ref(false) |
|
|
|
const nameForm = ref({ |
|
|
|
name: '' |
|
|
@ -596,11 +621,15 @@ if (props.basicFormWidth) { |
|
|
|
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|
|
|
} |
|
|
|
const rules = ref({ |
|
|
|
description: [{ required: true, message: '请填写描述', trigger: 'blur' }], |
|
|
|
itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }], |
|
|
|
version: [{ required: true, message: '请填写版本', trigger: 'blur' }], |
|
|
|
inspectionCode: [{ required: true, message: '请选择检验方案模板编码', trigger: 'blur' }], |
|
|
|
sequenceCode: [{ required: true, message: '请填写顺序号', trigger: 'blur' }], |
|
|
|
inspectionCharCode: [{ required: true, message: '请选择检验特性编码', trigger: 'blur' }], |
|
|
|
testTypeCode: [{ required: true, message: '请选择检验类型编码', trigger: ['blur', 'change'] }], |
|
|
|
programmeTemplateCode: [{ required: true, message: '请选择检验模板编码', trigger:['blur', 'change'] }], |
|
|
|
splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change']}], |
|
|
|
aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change']}], |
|
|
|
inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change']}], |
|
|
|
effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change']}], |
|
|
|
expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change']}], |
|
|
|
'inspectionCharacteristicsBaseVO.description': [ |
|
|
|
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
@ -672,22 +701,21 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if(item.quantifyIsCapping){ |
|
|
|
if (item.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if(item.quantifyIsLowlimit){ |
|
|
|
if (item.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if(item.quantifyIsTarget){ |
|
|
|
if (item.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} else { |
|
|
@ -695,7 +723,14 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
code: '', |
|
|
|
description: '', |
|
|
|
version: '', |
|
|
|
available:true, |
|
|
|
testTypeCode:'', |
|
|
|
programmeTemplateCode:'', |
|
|
|
splitRule:'', |
|
|
|
aql:'', |
|
|
|
inspectionLevel:'', |
|
|
|
effectiveDate:'', |
|
|
|
expirationDate:'', |
|
|
|
available: true, |
|
|
|
process: [] |
|
|
|
} |
|
|
|
} |
|
|
@ -809,27 +844,33 @@ const submitForm = async () => { |
|
|
|
await formMainRef.value.validate() |
|
|
|
if (!data.value.process || data.value.process.length == 0) { |
|
|
|
message.error(`请添加工序`) |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
const bol1 = await validateForm(formProcessRef.value) |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol1 || !bol2) { |
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
const arr = data.value.process.filter(item=>(!item.inspectionCharacteristicsBaseVO.quantifyIsCapping&&!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit&&!item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&item.inspectionCharacteristicsBaseVO.featureType == 0)) |
|
|
|
const arr = data.value.process.filter( |
|
|
|
(item) => |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 |
|
|
|
) |
|
|
|
console.log(arr) |
|
|
|
if(arr&&arr.length>0){ |
|
|
|
const str = arr.map(item=>item.description).join(',') |
|
|
|
if (arr && arr.length > 0) { |
|
|
|
const str = arr.map((item) => item.description).join(',') |
|
|
|
message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
if (formType.value == 'create') { |
|
|
|
// 主子表——提交请求 |
|
|
|
emit('submitForm', formType.value, data) |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|
} else { |
|
|
|
// 编辑 |
|
|
|
emit('submitForm', formType.value, data) |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|
} |
|
|
|
} catch { |
|
|
|
console.log(111) |
|
|
@ -866,7 +907,6 @@ const opensearchTable = ( |
|
|
|
type, |
|
|
|
row |
|
|
|
) => { |
|
|
|
console.log(988, row) |
|
|
|
const _searchCondition = {} |
|
|
|
// 判断查询条件中,是否存在指向主表的数据 |
|
|
|
if (searchCondition && searchCondition.length > 0) { |
|
|
@ -932,15 +972,42 @@ const opensearchTable = ( |
|
|
|
} |
|
|
|
// 弹层确定返回所选数据 |
|
|
|
// val : 弹层列表row 数据 |
|
|
|
const searchTableSuccess = (formField, searchField, val, type, row) => { |
|
|
|
console.log(row) |
|
|
|
data.value.process.forEach((item) => { |
|
|
|
if (item.description == row.description) { |
|
|
|
item.inspectionCharacteristicsBaseVO[formField] = val[0].code |
|
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
|
|
|
|
if (type == 'tableForm') { |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} else { |
|
|
|
console.log(formField) |
|
|
|
console.log(val[0].code) |
|
|
|
console.log(type) |
|
|
|
data.value[formField] = val[0].code |
|
|
|
if (formField == 'programmeTemplateCode') { |
|
|
|
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// row.inspectionCharacteristicsBaseVO.inspectionMethodCode = val[0].code |
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
} |
|
|
|
// 选择是否设定上限值 |
|
|
|