Browse Source

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

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

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

@ -162,7 +162,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否可用" prop="available"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -257,9 +257,15 @@
'inspectionMethodCode', 'inspectionMethodCode',
null, null,
'检验方法', '检验方法',
SamplingProcess.allSchemas, InspectionMethod.allSchemas,
SamplingProcessApi.getSamplingProcessPage, InspectionMethodApi.getInspectionMethodPage,
null, [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false, false,
null, null,
item item
@ -292,7 +298,13 @@
'采样过程编码', '采样过程编码',
SamplingProcess.allSchemas, SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage, SamplingProcessApi.getSamplingProcessPage,
null, [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false, false,
null, null,
item item
@ -323,9 +335,15 @@
'inspectionMethod', 'inspectionMethod',
null, null,
'动态修改规则编码', '动态修改规则编码',
SamplingProcess.allSchemas, DynamicRule.allSchemas,
SamplingProcessApi.getSamplingProcessPage, DynamicRuleApi.getDynamicRulePage,
null, [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false, false,
null, null,
item item
@ -341,7 +359,10 @@
label="是否允许修改特征值" label="是否允许修改特征值"
prop="inspectionCharacteristicsBaseVO.isCanUpdate" prop="inspectionCharacteristicsBaseVO.isCanUpdate"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" disabled/> <el-switch
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -390,8 +411,11 @@
label="是否设定上限" label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping" <el-switch
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
@change="changeIsCapping"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -412,9 +436,11 @@
label="是否设定下限" label="是否设定下限"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-switch
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit" v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> @change="changeLowlimit"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -435,8 +461,11 @@
label="是否设定目标值" label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
> >
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget" <el-switch
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"/> v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
@change="changeIsTarget"
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -497,9 +526,15 @@
'quantifyQuantifyCode', 'quantifyQuantifyCode',
null, null,
'选择集编码', '选择集编码',
SamplingProcess.allSchemas, SelectedSet.allSchemas,
SamplingProcessApi.getSamplingProcessPage, SelectedSetApi.getSelectedSetPage,
null, [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false, false,
null, null,
item item
@ -520,7 +555,12 @@
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> <ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template> </template>
</Dialog> </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"> <div style="padding: 0px 20px">
<el-form ref="nameRef" :model="nameForm"> <el-form ref="nameRef" :model="nameForm">
<el-form-item <el-form-item
@ -546,11 +586,18 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' 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 { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain } from '@/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data'
import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate' import * as InspectionTemplateApi from '@/api/qms/inspectionTemplate'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItemBasicApi from '@/api/wms/itembasic' 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 message = useMessage() //
const props = defineProps({ const props = defineProps({
@ -624,7 +671,9 @@ const rules = ref({
itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }], itemCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }],
version: [{ required: true, message: '请填写版本', trigger: 'blur' }], version: [{ required: true, message: '请填写版本', trigger: 'blur' }],
testTypeCode: [{ required: true, message: '请选择检验类型编码', trigger: ['blur', 'change'] }], testTypeCode: [{ required: true, message: '请选择检验类型编码', trigger: ['blur', 'change'] }],
programmeTemplateCode: [{ required: true, message: '请选择检验模板编码', trigger:['blur', 'change'] }], programmeTemplateCode: [
{ required: true, message: '请选择检验模板编码', trigger: ['blur', 'change'] }
],
splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change'] }], splitRule: [{ required: true, message: '请选择拆分规则', trigger: ['blur', 'change'] }],
aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }], aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }],
inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }],
@ -962,7 +1011,6 @@ const opensearchTable = (
// //
// val row // val row
const searchTableSuccess = async (formField, searchField, val, type, row) => { const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]

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

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

Loading…
Cancel
Save