Browse Source

检验模版和检验方案添加选择编码

master_hella_20240701
songguoqiang 8 months ago
parent
commit
8f47f44464
  1. 140
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  2. 17
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

140
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -162,7 +162,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="是否可用" prop="available">
<el-switch v-model="data.available" active-value="TRUE" inactive-value='FALSE'/>
<el-switch v-model="data.available" active-value="TRUE" inactive-value="FALSE" />
</el-form-item>
</el-col>
</el-row>
@ -257,9 +257,15 @@
'inspectionMethodCode',
null,
'检验方法',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
InspectionMethod.allSchemas,
InspectionMethodApi.getInspectionMethodPage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -292,7 +298,13 @@
'采样过程编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -323,9 +335,15 @@
'inspectionMethod',
null,
'动态修改规则编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
DynamicRule.allSchemas,
DynamicRuleApi.getDynamicRulePage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -341,7 +359,10 @@
label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled/>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -390,8 +411,11 @@
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
@change="changeIsCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -412,9 +436,11 @@
label="是否设定下限"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
@change="changeLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -435,8 +461,11 @@
label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/>
<el-switch
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
@change="changeIsTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -497,9 +526,15 @@
'quantifyQuantifyCode',
null,
'选择集编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
SelectedSet.allSchemas,
SelectedSetApi.getSelectedSetPage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -520,7 +555,12 @@
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false">
<Dialog
title="修改名称"
v-model="dialogVisibleName"
width="500px"
:close-on-click-modal="false"
>
<div style="padding: 0px 20px">
<el-form ref="nameRef" :model="nameForm">
<el-form-item
@ -536,7 +576,7 @@
</template>
</Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</div>
</div>
</template>
<script setup lang="ts">
@ -546,11 +586,18 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
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'
import * as SamplingProcessApi from '@/api/qms/samplingProcess' //
import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //
import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //
import * as DynamicRuleApi from '@/api/qms/dynamicRule' //
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
const message = useMessage() //
const props = defineProps({
@ -599,13 +646,13 @@ const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode:'',
programmeTemplateCode:'',
splitRule:'',
aql:'',
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
process: []
})
@ -624,12 +671,14 @@ const rules = ref({
itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }],
version: [{ 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']}],
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'] }
],
@ -679,10 +728,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
let list =[]
if(row.content){
let list = []
if (row.content) {
list = JSON.parse(row.content)
}else{
} else {
list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode)
}
@ -712,13 +761,13 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
code: '',
itemCode: '',
version: '',
testTypeCode:'',
programmeTemplateCode:'',
splitRule:'',
aql:'',
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
process: []
}
@ -962,7 +1011,6 @@ const opensearchTable = (
//
// val row
const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]

17
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -124,7 +124,7 @@
'inspectionMethodCode',
null,
'检验方法',
SamplingProcess.allSchemas,
InspectionMethod.allSchemas,
InspectionMethodApi.getInspectionMethodPage,
[
{
@ -202,7 +202,7 @@
'inspectionMethod',
null,
'动态修改规则编码',
SamplingProcess.allSchemas,
DynamicRule.allSchemas,
DynamicRuleApi.getDynamicRulePage,
[
{
@ -366,7 +366,7 @@
'quantifyQuantifyCode',
null,
'选择集编码',
SamplingProcess.allSchemas,
SelectedSet.allSchemas,
SelectedSetApi.getSelectedSetPage,
[
{
@ -419,10 +419,13 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
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 * as InspectionMethodApi from '@/api/qms/inspectionMethod'//
import * as DynamicRuleApi from '@/api/qms/dynamicRule'//
import * as SelectedSetApi from '@/api/qms/selectedSet'//
import * as SamplingProcessApi from '@/api/qms/samplingProcess' //
import * as InspectionMethodApi from '@/api/qms/inspectionMethod' //
import { InspectionMethod } from '@/views/qms/inspectionMethod/inspectionMethod.data' //
import * as DynamicRuleApi from '@/api/qms/dynamicRule' //
import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule.data' //
import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
const message = useMessage() //
const props = defineProps({

Loading…
Cancel
Save