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