From 055cc509d079c36510e01430f7a79d58e8262155 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 3 Apr 2024 17:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=9B=9E=E6=98=BE=E6=98=BE=E7=A4=BA=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionPlan/addForm.vue | 256 +++++++++--------- .../inspectionTemplate/addForm.vue | 41 +-- .../inspectionTemplate.data.ts | 4 +- .../qms/inspection/inspectionJob/index.vue | 6 +- .../inspectionJob/inspectionJobMain.data.ts | 8 +- 5 files changed, 164 insertions(+), 151 deletions(-) diff --git a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue index f8cf4ff51..591a4a6cb 100644 --- a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue @@ -18,7 +18,7 @@
- +
- +
@@ -93,7 +93,7 @@ InspectionTemplateApi.inspectionTemplatePage, null, false, - 'form', + 'main', null ) " @@ -238,122 +238,122 @@ - -
- - -
-
-
- - -
- - -
-
-
- - -
- - +
+ + -
- - + false, + 'features', + item + ) + " + >
+
+
+
+ + +
+ + +
+
+
+ + +
+ + +
+
+
{ - if (type == 'tableForm') { - // 明细查询页赋值 - row[formField] = val[0][searchField] - } else { - console.log(formField) - console.log(val[0].code) - console.log(type) + if(type == 'features'){ + row.inspectionCharacteristicsBaseVO[formField] = val[0].code + 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'){ data.value[formField] = val[0].code + if(formField == 'itemCode'){ + data.value.itemName = val[0].name + }else if(formField == 'testTypeCode'){ + data.value.testTypeName = val[0].description + }else if(formField == 'programmeTemplateCode'){ + data.value.programmeTemplateName = val[0].description + } if (formField == 'programmeTemplateCode') { let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code) list.forEach((item, index) => { diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue index 686f41670..28d00ba06 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue +++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue @@ -106,14 +106,14 @@
@@ -160,7 +160,7 @@ style="width: 40px" @click=" opensearchTable( - 'dynamicUpdateCode', + 'inspectionMethod', null, '采样过程编码', SamplingProcess.allSchemas, @@ -173,7 +173,7 @@ } ], false, - null, + 'features', item ) " @@ -185,11 +185,11 @@
@@ -199,7 +199,7 @@ style="width: 40px" @click=" opensearchTable( - 'inspectionMethod', + 'dynamicUpdateCode', null, '动态修改规则编码', DynamicRule.allSchemas, @@ -212,7 +212,7 @@ } ], false, - null, + 'features', item ) " @@ -813,14 +813,17 @@ 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 + if(type == 'features'){ + row.inspectionCharacteristicsBaseVO[formField] = val[0].code + 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 } - }) - - // row.inspectionCharacteristicsBaseVO.inspectionMethodCode = val[0].code - // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) + } + } // 选择是否设定上限值 const changeIsCapping = (e) => { diff --git a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts index 62e6c9f7c..769da9224 100644 --- a/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts +++ b/src/views/qms/basicDataManage/inspectionTemplate/inspectionTemplate.data.ts @@ -151,11 +151,11 @@ export const InspectionTemplateFeatures= useCrudSchemas(reactive([ sort: 'custom', },{ label: '采样过程编码', - field: 'dynamicUpdateCode', + field: 'inspectionMethod', sort: 'custom', },{ label: '动态修改规则编码', - field: 'inspectionMethod', + field: 'dynamicUpdateCode', sort: 'custom', },{ label: '是否允许修改特征值', diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index e893d4510..48b31afaa 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -117,8 +117,8 @@ // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn(null), // 新增 - // defaultButtons.defaultExportBtn(null), // 导出 + // defaultButtons.defaultAddBtn(null), // 新增 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -284,6 +284,6 @@ /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() + // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() }) diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts index dc1afae72..42da7a50d 100644 --- a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts @@ -5,18 +5,18 @@ import { dateFormatter } from '@/utils/formatTime' const { t } = useI18n() // 国际化 /** - * @returns {Array} 备件申请主表 + * @returns {Array} 检验任务主表 */ export const InspectionJobMain = useCrudSchemas(reactive([ { - label: '工序编号', + label: '编码', field: 'number', sort: 'custom', isSearch: true, }, { - label: '申请编码', - field: 'inspectionCode', + label: '申请单号', + field: 'requestNumber', sort: 'custom', isSearch: true, },