diff --git a/src/api/qms/inspectionPlan/index.ts b/src/api/qms/inspectionPlan/index.ts index e0938f648..78d729cb7 100644 --- a/src/api/qms/inspectionPlan/index.ts +++ b/src/api/qms/inspectionPlan/index.ts @@ -16,7 +16,7 @@ export const inspectionPlanPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return request.post({ url: '/wms/accountcalendar/senior', data }) + return request.post({ url: '/qms/type-template/senior', data }) } else { return await request.get({ url: `/qms/type-template/page`, params }) } diff --git a/src/api/qms/inspectionTemplate/index.ts b/src/api/qms/inspectionTemplate/index.ts index 1c07a30d3..8443de973 100644 --- a/src/api/qms/inspectionTemplate/index.ts +++ b/src/api/qms/inspectionTemplate/index.ts @@ -23,7 +23,7 @@ export const inspectionTemplatePage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return request.post({ url: '/wms/accountcalendar/senior', data }) + return request.post({ url: '/qms/programme-template/senior', data }) } else { return await request.get({ url: `/qms/programme-template/page`, params }) } diff --git a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue index 8b584fb2c..960130cb6 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue @@ -18,7 +18,7 @@
- + - +
+ + +
+ + +
+
+
@@ -190,6 +226,42 @@ :label="item.description" :name="item.name" > +
检验工序
@@ -246,122 +318,83 @@
- -
- - -
-
-
- - -
- - -
-
-
- - -
- - -
-
-
+ +
+ + +
+
+ + + +
+ + +
+
+
@@ -523,7 +556,7 @@ { name: newTabName, inspectionCode: '', sequenceCode: '', + dynamicUpdateCode:'', inspectionCharCode: '', inspectionCharacteristicsBaseVO: { describe: '', @@ -1020,23 +1056,30 @@ const opensearchTable = ( // 弹层确定返回所选数据 // val : 弹层列表row 数据 const searchTableSuccess = async (formField, searchField, val, type, row) => { - if(type == 'features'){ + if (type == 'features') { row.inspectionCharacteristicsBaseVO[formField] = val[0].code - if(formField == 'inspectionMethodCode'){ + if (formField == 'inspectionMethodCode') { row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description - }else if(formField == 'dynamicUpdateCode'){ - row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description - }else if(formField == 'inspectionMethod'){ - row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description } - } else if(type == 'main'){ + // else if(formField == 'dynamicUpdateCode'){ + // row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description + // } + else if (formField == 'samplingProcessCode') { + row.inspectionCharacteristicsBaseVO.samplingProcessName = val[0].description + } else if (formField == 'quantifyQuantifyCode') { + row.inspectionCharacteristicsBaseVO.quantifyQuantifyName = val[0].description + } + } else if (type == 'main') { data.value[formField] = val[0].code - if(formField == 'itemCode'){ + if (formField == 'itemCode') { data.value.itemName = val[0].name - }else if(formField == 'testTypeCode'){ + } else if (formField == 'testTypeCode') { data.value.testTypeName = val[0].description - }else if(formField == 'programmeTemplateCode'){ + } else if (formField == 'programmeTemplateCode') { data.value.programmeTemplateName = val[0].description + data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode + data.value.dynamicUpdateName = val[0].dynamicUpdateName + } if (formField == 'programmeTemplateCode') { let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) @@ -1062,6 +1105,11 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { }) data.value.process = list } + + if (formField == 'dynamicUpdateCode') { + data.value[formField] = val[0].code + data.value.dynamicUpdateName = val[0].description + } } // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) diff --git a/src/views/qms/basicDataManage/inspectionPlan/index.vue b/src/views/qms/basicDataManage/inspectionPlan/index.vue index 787063cb2..3100b2887 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/index.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/index.vue @@ -135,6 +135,9 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + // if(type=='add'){//新增的时候让动态模版置灰 + // InspectionTemplateMain.allSchemas.formSchema.find(item => item.field == 'programmeTemplateCode').componentProps.disabled = true//动态规则来源于模版新增置灰之后选择模版之后赋值之后才能自由选择 + // } basicFormRef.value.open(type, row) } @@ -151,6 +154,7 @@ const submitForm = async (formType,data) => { } const data1 = { id: data.id, + dynamicUpdateCode:data.dynamicUpdateCode, code: data.code, itemCode: data.itemCode, version: data.version, diff --git a/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts b/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts index e1e8da612..d09caed25 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts +++ b/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts @@ -77,6 +77,7 @@ export const InspectionPlanMain = useCrudSchemas(reactive([ width: 220, fixed: 'left' }, + isSearch:true, form:{ componentProps:{ disabled:true, @@ -90,7 +91,8 @@ export const InspectionPlanMain = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - } + }, + isSearch:true, },{ label: '版本', field: 'version', @@ -139,6 +141,7 @@ export const InspectionPlanMain = useCrudSchemas(reactive([ table: { width: 150 }, + isSearch:true, },{ label: '生效时间', field: 'effectiveDate', diff --git a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts index 769da9224..b5958e6bb 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts +++ b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts @@ -73,6 +73,7 @@ export const InspectionTemplateMain = useCrudSchemas(reactive([ label: '编码', field: 'code', sort: 'custom', + isSearch:true, form:{ componentProps:{ disabled:true, @@ -127,7 +128,12 @@ export const InspectionTemplateProcess = useCrudSchemas(reactive([ label: '检验特性编码', field: 'inspectionCharCode', sort: 'custom', - } + }, + { + label: '动态修改规则编码', + field: 'dynamicUpdateCode', + sort: 'custom', + }, ])) export const InspectionTemplateFeatures= useCrudSchemas(reactive([ { @@ -153,10 +159,6 @@ export const InspectionTemplateFeatures= useCrudSchemas(reactive([ label: '采样过程编码', field: 'inspectionMethod', sort: 'custom', - },{ - label: '动态修改规则编码', - field: 'dynamicUpdateCode', - sort: 'custom', },{ label: '是否允许修改特征值', field: 'isCanUpdate',