From ad91f5fe152cba624a088b13b44e0dff2a0337fa Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 14 Mar 2025 11:24:06 +0800 Subject: [PATCH] =?UTF-8?q?2025-03-14=20=E5=A4=87=E5=93=81=E5=A4=87?= =?UTF-8?q?=E4=BB=B6=E4=BC=98=E5=8C=96=EF=BC=8CBom=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/eam/eamWorkOrderForDefect.vue | 247 +++++++------- .../modules/eam/eamWorkOrderForDefect2.vue | 244 +++++++------- src/views/modules/part/part_create.vue | 81 +++++ src/views/modules/part/quicklyCreateBom.vue | 12 +- .../reportWorkOrder/reportDefectOrder.vue | 313 +++++++++--------- .../reportWorkOrder/reportDefectOrder2.vue | 313 +++++++++--------- 6 files changed, 641 insertions(+), 569 deletions(-) diff --git a/src/views/modules/eam/eamWorkOrderForDefect.vue b/src/views/modules/eam/eamWorkOrderForDefect.vue index 616d969..6fa65ac 100644 --- a/src/views/modules/eam/eamWorkOrderForDefect.vue +++ b/src/views/modules/eam/eamWorkOrderForDefect.vue @@ -44,9 +44,6 @@ - - - @@ -315,9 +312,9 @@ 取消审核 审核 - - 核心配件 - + + + @@ -503,6 +500,31 @@ + +
+ + + + + +
+
@@ -511,13 +533,20 @@ - + - + + + + - + @@ -732,7 +761,6 @@ export default { site: '', userName: this.$store.state.user.name, orderNo: '', - corePartNo: '', planID: '', objectID: '', planOperator: '', @@ -809,7 +837,7 @@ export default { tableName: "维修工单表", columnProp: 'orderNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '工单编码', columnHidden: false, columnImage: false, @@ -827,7 +855,7 @@ export default { tableName: "维修工单表", columnProp: 'planID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈单号', columnHidden: false, columnImage: false, @@ -845,7 +873,7 @@ export default { tableName: "维修工单表", columnProp: 'feedBackDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈描述', columnHidden: false, columnImage: false, @@ -853,7 +881,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -863,7 +891,7 @@ export default { tableName: "维修工单表", columnProp: 'defectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障编码', columnHidden: false, columnImage: false, @@ -871,7 +899,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -881,7 +909,7 @@ export default { tableName: "维修工单表", columnProp: 'defectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障名称', columnHidden: false, columnImage: false, @@ -889,7 +917,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -899,7 +927,7 @@ export default { tableName: "维修工单表", columnProp: 'objectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备编码', columnHidden: false, columnImage: false, @@ -907,7 +935,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -917,7 +945,7 @@ export default { tableName: "维修工单表", columnProp: 'objectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备名称', columnHidden: false, columnImage: false, @@ -925,7 +953,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 120, + columnWidth: 150, }, { userId: this.$store.state.user.name, @@ -935,7 +963,7 @@ export default { tableName: "维修工单表", columnProp: 'resourceDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '机台名称', columnHidden: false, columnImage: false, @@ -953,7 +981,7 @@ export default { tableName: "维修工单表", columnProp: 'departmentName', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备部门', columnHidden: false, columnImage: false, @@ -979,7 +1007,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -1069,7 +1097,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1087,7 +1115,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1105,7 +1133,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1143,24 +1171,6 @@ export default { fixed: '', columnWidth: 80, }, - { - userId: this.$store.state.user.name, - functionId: 101004002, - serialNumber: '101004002Table1Remark', - tableId: "101004002Table1", - tableName: "维修工单表", - columnProp: 'remark', - headerAlign: "center", - align: "center", - columnLabel: '备注说明', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, { userId: this.$store.state.user.name, functionId: 101004002, @@ -1187,7 +1197,7 @@ export default { tableName: "维修工单表", columnProp: 'difficultyRemark', headerAlign: "center", - align: "center", + align: "left", columnLabel: '难度备注', columnHidden: false, columnImage: false, @@ -1287,78 +1297,6 @@ export default { fixed: '', columnWidth: 200, }, - { - userId: this.$store.state.user.name, - functionId: 101004002, - serialNumber: '101004002Table1CorePartNo', - tableId: "101004002Table1", - tableName: "维修执行表", - columnProp: 'corePartNo', - headerAlign: "center", - align: "center", - columnLabel: '更换配件编码', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004002, - serialNumber: '101004002Table1CorePartDescription', - tableId: "101004002Table1", - tableName: "维修执行表", - columnProp: 'corePartDescription', - headerAlign: "center", - align: "left", - columnLabel: '更换配件名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004002, - serialNumber: '101004002Table1OldSerialNo', - tableId: "101004002Table1", - tableName: "维修执行表", - columnProp: 'oldSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '老序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, - { - userId: this.$store.state.user.name, - functionId: 101004002, - serialNumber: '101004002Table1NewSerialNo', - tableId: "101004002Table1", - tableName: "维修执行表", - columnProp: 'newSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '新序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, ], changeModelFlag: false, planOperator: '', @@ -1732,7 +1670,54 @@ export default { fixed: '', }, ], - knowledgeFlag: '' + columnCoreComponent: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'left', + columnLabel: '备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 200, + }, + { + columnProp: 'oldSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '老序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'newSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '新序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + ], + knowledgeFlag: '', + corePartSpareList: [] } }, @@ -2372,6 +2357,8 @@ export default { this.queryKnowledgeRecord() } else if (this.activeTable === 'spar_part_img') { this.getSparPartImages() + } else if (this.activeTable === 'core_component') { + this.getCorePartSpareList() } }, @@ -2446,7 +2433,6 @@ export default { }) }, - // 预览 previewFile (row) { // 预览文件 @@ -2536,7 +2522,7 @@ export default { languageCode: this.$i18n.locale } await getTableDefaultListLanguage(queryTable).then(({data}) => { - if (!data.rows.length == 0) { + if (!data.rows.length === 0) { switch (columnId) { case 1: this.columnList = data.rows @@ -2575,6 +2561,23 @@ export default { } this.coreComponentFlag = true }, + + getCorePartSpareList () { + let tempData = { + site: this.detailData.site, + buNo: this.detailData.buNo, + objectID: this.detailData.objectID, + orderNo: this.detailData.orderNo, + } + getDeviceCorePartList(tempData).then(({data}) => { + if (data && data.code === 200) { + this.corePartSpareList = data.rows + } else { + this.corePartSpareList = [] + } + }) + }, + } } diff --git a/src/views/modules/eam/eamWorkOrderForDefect2.vue b/src/views/modules/eam/eamWorkOrderForDefect2.vue index b8c4481..bfb8438 100644 --- a/src/views/modules/eam/eamWorkOrderForDefect2.vue +++ b/src/views/modules/eam/eamWorkOrderForDefect2.vue @@ -44,9 +44,6 @@
- - - @@ -315,9 +312,9 @@ 取消审核 审核 - - 核心配件 - + + + @@ -503,6 +500,31 @@ + +
+ + + + + +
+
@@ -511,13 +533,20 @@ - + - + + + + - + @@ -732,7 +761,6 @@ export default { site: '', userName: this.$store.state.user.name, orderNo: '', - corePartNo: '', planID: '', objectID: '', planOperator: '', @@ -809,7 +837,7 @@ export default { tableName: "维修工单表", columnProp: 'orderNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '工单编码', columnHidden: false, columnImage: false, @@ -827,7 +855,7 @@ export default { tableName: "维修工单表", columnProp: 'planID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈单号', columnHidden: false, columnImage: false, @@ -845,7 +873,7 @@ export default { tableName: "维修工单表", columnProp: 'feedBackDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈描述', columnHidden: false, columnImage: false, @@ -853,7 +881,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -863,7 +891,7 @@ export default { tableName: "维修工单表", columnProp: 'defectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障编码', columnHidden: false, columnImage: false, @@ -871,7 +899,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -881,7 +909,7 @@ export default { tableName: "维修工单表", columnProp: 'defectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障名称', columnHidden: false, columnImage: false, @@ -889,7 +917,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -899,7 +927,7 @@ export default { tableName: "维修工单表", columnProp: 'objectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备编码', columnHidden: false, columnImage: false, @@ -907,7 +935,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -917,7 +945,7 @@ export default { tableName: "维修工单表", columnProp: 'objectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备名称', columnHidden: false, columnImage: false, @@ -925,7 +953,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 120, + columnWidth: 150, }, { userId: this.$store.state.user.name, @@ -935,7 +963,7 @@ export default { tableName: "维修工单表", columnProp: 'resourceDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '机台名称', columnHidden: false, columnImage: false, @@ -953,7 +981,7 @@ export default { tableName: "维修工单表", columnProp: 'departmentName', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备部门', columnHidden: false, columnImage: false, @@ -979,7 +1007,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 80, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -1069,7 +1097,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1087,7 +1115,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1105,7 +1133,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 130, + columnWidth: 140, }, { userId: this.$store.state.user.name, @@ -1143,24 +1171,6 @@ export default { fixed: '', columnWidth: 80, }, - { - userId: this.$store.state.user.name, - functionId: 101004006, - serialNumber: '101004006Table1Remark', - tableId: "101004006Table1", - tableName: "维修工单表", - columnProp: 'remark', - headerAlign: "center", - align: "center", - columnLabel: '备注说明', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, { userId: this.$store.state.user.name, functionId: 101004006, @@ -1187,7 +1197,7 @@ export default { tableName: "维修工单表", columnProp: 'difficultyRemark', headerAlign: "center", - align: "center", + align: "left", columnLabel: '难度备注', columnHidden: false, columnImage: false, @@ -1287,78 +1297,6 @@ export default { fixed: '', columnWidth: 200, }, - { - userId: this.$store.state.user.name, - functionId: 101004006, - serialNumber: '101004006Table1CorePartNo', - tableId: "101004006Table1", - tableName: "维修执行表", - columnProp: 'corePartNo', - headerAlign: "center", - align: "center", - columnLabel: '更换配件编码', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004006, - serialNumber: '101004006Table1CorePartDescription', - tableId: "101004006Table1", - tableName: "维修执行表", - columnProp: 'corePartDescription', - headerAlign: "center", - align: "left", - columnLabel: '更换配件名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004006, - serialNumber: '101004006Table1OldSerialNo', - tableId: "101004006Table1", - tableName: "维修执行表", - columnProp: 'oldSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '老序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, - { - userId: this.$store.state.user.name, - functionId: 101004006, - serialNumber: '101004006Table1NewSerialNo', - tableId: "101004006Table1", - tableName: "维修执行表", - columnProp: 'newSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '新序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, ], changeModelFlag: false, planOperator: '', @@ -1732,7 +1670,54 @@ export default { fixed: '', }, ], - knowledgeFlag: '' + columnCoreComponent: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'left', + columnLabel: '备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 200, + }, + { + columnProp: 'oldSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '老序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'newSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '新序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + ], + knowledgeFlag: '', + corePartSpareList: [] } }, @@ -2372,6 +2357,8 @@ export default { this.queryKnowledgeRecord() } else if (this.activeTable === 'spar_part_img') { this.getSparPartImages() + } else if (this.activeTable === 'core_component') { + this.getCorePartSpareList() } }, @@ -2575,6 +2562,23 @@ export default { } this.coreComponentFlag = true }, + + getCorePartSpareList () { + let tempData = { + site: this.detailData.site, + buNo: this.detailData.buNo, + objectID: this.detailData.objectID, + orderNo: this.detailData.orderNo, + } + getDeviceCorePartList(tempData).then(({data}) => { + if (data && data.code === 200) { + this.corePartSpareList = data.rows + } else { + this.corePartSpareList = [] + } + }) + }, + } } diff --git a/src/views/modules/part/part_create.vue b/src/views/modules/part/part_create.vue index 14bdb11..d059163 100644 --- a/src/views/modules/part/part_create.vue +++ b/src/views/modules/part/part_create.vue @@ -349,6 +349,10 @@ 应用 保存 +
+ 应用 + 保存 +
保存 关闭 @@ -1969,6 +1973,7 @@ export default { }, methods: { + // 初始化组件的参数 init () { this.modalData = { @@ -2010,6 +2015,55 @@ export default { // 物料信息编辑模态框 updateModal (data) { + // 如果物料编码为*,说明是询价传过来的 走新增方法 + if (data.partNo === '*') { + this.addModal(data) + } else { + this.updateModalByNo(data) + } + }, + + // mainPart 新增模态框 + addModal (data) { + this.modalData = { + flag: '3', + title: '物料新增', + site: data.site, + buNo: data.buNo, + bu: data.site + '_' + data.buNo, + partNo: data.partNo, + partDesc: data.partDesc, + umId2: '', + umName: '', + spec: '', + active: 'Y', + partType2: 'Manufactured', + standardBoxQty: '', + productGroupId1: '', + productGroupName1: '', + productGroupId2: '', + productGroupName2: '', + productGroupId3: '', + productGroupName3: '', + familyID: '', + familyName: '', + partDesceEn: '', + remark: '', + codeNo: '', + codeDesc: '', + tblBaseFlag: '', + createBy: this.$store.state.user.name, + templateNo: '', + templateName: '' + } + this.inventoryPartTable = 'General' + this.modalDisableFlag = false + this.modalFlag = true + this.getPreviousPartNo() + }, + + // 修改 + updateModalByNo (data) { getPartInfoByNo(data).then(({data}) => { if (data && data.code === 0) { this.modalData = { @@ -2130,6 +2184,33 @@ export default { }).catch(() => { this.saveLoading = false }) + } else if (this.modalData.flag === '3') { + savePartInfo(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.modalData = data.rows + this.modalData.title = '物料编辑' + if (isClose) { + // 保存 + this.modalFlag = false + } + // 刷新页面数据 + this.$emit('refreshPageTables2', data.rows) + this.modalDisableFlag = true + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.saveLoading = false + }).catch(() => { + this.saveLoading = false + }) } else { // mainPart维护 saveMainPartInfo(this.modalData).then(({data}) => { diff --git a/src/views/modules/part/quicklyCreateBom.vue b/src/views/modules/part/quicklyCreateBom.vue index 7d6248b..cf1cdc1 100644 --- a/src/views/modules/part/quicklyCreateBom.vue +++ b/src/views/modules/part/quicklyCreateBom.vue @@ -327,8 +327,6 @@ export default { columnWidth: 100 }, ], - // loading - // 控制 nodeModalFlag: false, nodeModalDisableFlag: false, @@ -346,6 +344,12 @@ export default { this.favoriteIsOk() // 获取树形结构 this.getNodeTree() + // this.searchData = { + // site: '2', + // buNo: '03-RFID', + // partNo: '*', + // partDesc: '***' + // } }, mounted () { this.$nextTick(() => { @@ -707,7 +711,9 @@ export default { } let templateData = { site: this.searchData.site, - partNo: this.searchData.partNo + buNo: this.searchData.buNo, + partNo: this.searchData.partNo, + partDesc: this.searchData.partDesc } //打开组件 去做编辑业务 this.$nextTick(() => { diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue index 2c4d0e8..1e9d58d 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue @@ -45,9 +45,6 @@ - - - @@ -251,7 +248,7 @@ 备件图片 - 核心配件 + 核心备件 @@ -427,6 +424,31 @@
+ +
+ + + + + +
+
@@ -555,20 +577,20 @@
- + - + - + @@ -726,17 +748,17 @@ title: '', orderNo: '' }, - corePartSpareList:[], - coreComponentData:{ - site:'', - orderNo:'', - buNo:'', - objectID:'', - partNo:'', - partDescription:'', - createdBy:'', - oldSerialNo:'', - newSerialNo:'', + corePartSpareList: [], + coreComponentData: { + site: '', + orderNo: '', + buNo: '', + objectID: '', + partNo: '', + partDescription: '', + createdBy: '', + oldSerialNo: '', + newSerialNo: '', }, fileData: { file: [], @@ -758,7 +780,6 @@ exportList: [], // 导出 end searchData: { - corePartNo: '', site: '', userName: this.$store.state.user.name, orderNo: '', @@ -805,7 +826,7 @@ tableName: "维修执行表", columnProp: 'orderNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '工单编码', columnHidden: false, columnImage: false, @@ -813,7 +834,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -823,7 +844,7 @@ tableName: "维修执行表", columnProp: 'planID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈单号', columnHidden: false, columnImage: false, @@ -831,7 +852,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -841,7 +862,7 @@ tableName: "维修执行表", columnProp: 'feedBackDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈描述', columnHidden: false, columnImage: false, @@ -849,7 +870,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -859,7 +880,7 @@ tableName: "维修执行表", columnProp: 'defectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障编码', columnHidden: false, columnImage: false, @@ -867,7 +888,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -877,7 +898,7 @@ tableName: "维修执行表", columnProp: 'defectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障名称', columnHidden: false, columnImage: false, @@ -885,7 +906,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -895,7 +916,7 @@ tableName: "维修执行表", columnProp: 'objectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备编码', columnHidden: false, columnImage: false, @@ -903,7 +924,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -913,7 +934,7 @@ tableName: "维修执行表", columnProp: 'objectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备名称', columnHidden: false, columnImage: false, @@ -921,7 +942,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 150, }, { userId: this.$store.state.user.name, @@ -939,7 +960,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -957,7 +978,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -975,7 +996,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -993,7 +1014,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -1011,7 +1032,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -1029,80 +1050,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 107, - }, - { - userId: this.$store.state.user.name, - functionId: 101004003, - serialNumber: '101004003Table1CorePartNo', - tableId: "101004003Table1", - tableName: "维修执行表", - columnProp: 'corePartNo', - headerAlign: "center", - align: "center", - columnLabel: '更换配件编码', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', columnWidth: 100, }, - { - userId: this.$store.state.user.name, - functionId: 101004003, - serialNumber: '101004003Table1CorePartDescription', - tableId: "101004003Table1", - tableName: "维修执行表", - columnProp: 'corePartDescription', - headerAlign: "center", - align: "left", - columnLabel: '更换配件名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004003, - serialNumber: '101004003Table1OldSerialNo', - tableId: "101004003Table1", - tableName: "维修执行表", - columnProp: 'oldSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '老序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, - { - userId: this.$store.state.user.name, - functionId: 101004003, - serialNumber: '101004003Table1NewSerialNo', - tableId: "101004003Table1", - tableName: "维修执行表", - columnProp: 'newSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '新序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, ], detailModelFlag: false, detailList: [], @@ -1135,10 +1084,6 @@ feedBackDesc: '', faultReason: '', preventiveMeasure: '', - corePartNo: '', - corePartDescription: '', - oldSerialNo: '', - newSerialNo: '', repairReportingType: '', repairType: '', createBy: '', @@ -1331,6 +1276,52 @@ columnWidth: 100, }, ], + columnCoreComponent: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'left', + columnLabel: '备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 200, + }, + { + columnProp: 'oldSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '老序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'newSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '新序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + ], // 日期限制 pickerOptions: { disabledDate(time) { @@ -1342,6 +1333,7 @@ feedBackImages: [], sparPartImages: [], partSpareList: [], + coreComponentList: [], columnHistoryList: [ { columnWidth: 100, @@ -2250,10 +2242,6 @@ faultReason: row.faultReason, preventiveMeasure: row.preventiveMeasure, result: row.result, - corePartNo: row.corePartNo, - corePartDescription: row.corePartDescription, - oldSerialNo: row.oldSerialNo, - newSerialNo: row.newSerialNo, repairReportingType: row.repairReportingType, repairType: row.repairType, createBy: row.createBy, @@ -2362,6 +2350,8 @@ this.queryKnowledgeRecord() } else if (this.activeTable === 'spar_part_img') { this.getSparPartImages() + } else if (this.activeTable === 'core_component') { + this.getCorePartSpareList() } }, @@ -2649,7 +2639,6 @@ } await getTableUserListLanguage(queryTableUser).then(({data}) => { if (data.rows.length > 0) { - //this.columnList1 = [] switch (columnId) { case 1: this.columnList = data.rows @@ -2657,12 +2646,6 @@ case 2: this.columnHistoryList = data.rows break; - // case 3: - // this.columnList2 = data.rows - // break; - // case 4: - // this.columnList3 = data.rows - // break; } } else { this.getColumnList(tableId, columnId) @@ -2678,7 +2661,7 @@ languageCode: this.$i18n.locale } await getTableDefaultListLanguage(queryTable).then(({data}) => { - if (!data.rows.length == 0) { + if (!data.rows.length === 0) { switch (columnId) { case 1: this.columnList = data.rows @@ -2686,15 +2669,7 @@ case 2: this.columnHistoryList = data.rows break; - // case 3: - // this.columnList2 = data.rows - // break; - // case 4: - // this.columnList3 = data.rows - // break; } - } else { - // this.showDefault = true. } }) }, @@ -2709,13 +2684,15 @@ this.authReach = !reachFlag this.authReport = !reportFlag }, - getCorePartSpareList(){ + + getCorePartSpareList () { let tempData = { site: this.saveData.site, - objectID: this.saveData.objectID + buNo: this.saveData.buNo, + objectID: this.saveData.objectID, + orderNo: this.saveData.orderNo, } getDeviceCorePartList(tempData).then(({data}) => { - // 区分请求成功和失败的状况 if (data && data.code === 200) { this.corePartSpareList = data.rows } else { @@ -2723,29 +2700,35 @@ } }) }, - coreComponentModal(){ - this.getCorePartSpareList(); - this.coreComponentData={ - site:this.saveData.site, - buNo:this.saveData.buNo, - orderNo:this.saveData.orderNo, - objectID:this.saveData.objectID, - partNo:this.saveData.corePartNo, - partDescription:this.saveData.corePartDescription, - createdBy:this.$store.state.user.name, - oldSerialNo:this.saveData.oldSerialNo, - newSerialNo:this.saveData.newSerialNo, + + coreComponentModal () { + this.getCorePartSpareList() + this.coreComponentData = { + site: this.saveData.site, + buNo: this.saveData.buNo, + orderNo: this.saveData.orderNo, + objectID: this.saveData.objectID, + createdBy: this.$store.state.user.name, + partNo: '', + partDescription: '', + oldSerialNo: '', + newSerialNo: '', } - this.coreComponentFlag=true; + this.coreComponentFlag = true }, - saveCoreComponent(){ + + saveCoreComponent () { + if (this.coreComponentData.orderNo === '' || this.coreComponentData.orderNo == null) { + this.$message.warning('未绑定维修工单号!') + return + } + if (this.coreComponentData.partNo === '' || this.coreComponentData.partNo == null) { + this.$message.warning('请选择备件!') + return + } saveCoreComponent(this.coreComponentData).then(({data}) => { if (data && data.code === 0) { - this.saveData.corePartNo=this.coreComponentData.partNo - this.saveData.corePartDescription=this.coreComponentData.partDescription - this.saveData.oldSerialNo=this.coreComponentData.oldSerialNo - this.saveData.newSerialNo=this.coreComponentData.newSerialNo - this.getDataList() + this.getCorePartSpareList() this.coreComponentFlag = false this.$message({ message: '操作成功', @@ -2760,11 +2743,17 @@ } }) }, - componentChange(value){ - if(value&&value!==''){ - this.coreComponentData.partDescription=this.corePartSpareList.filter(item => item.partNo === value)[0].partDescription; - }else { - this.coreComponentData.partDescription='' + + componentChange (value) { + if (value && value !== '') { + let tempData = this.corePartSpareList.filter(item => item.partNo === value)[0] + this.coreComponentData.partDescription = tempData.partDescription + this.coreComponentData.oldSerialNo = tempData.oldSerialNo + this.coreComponentData.newSerialNo = tempData.newSerialNo + } else { + this.coreComponentData.partDescription = '' + this.coreComponentData.oldSerialNo = '' + this.coreComponentData.newSerialNo = '' } } } diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue index 96f44ea..dcfb297 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue @@ -45,9 +45,6 @@
- - - @@ -251,7 +248,7 @@ 备件图片 - 核心配件 + 核心备件
@@ -427,6 +424,31 @@ + +
+ + + + + +
+
@@ -555,20 +577,20 @@ - + - + - + @@ -726,17 +748,17 @@ export default { title: '', orderNo: '' }, - corePartSpareList:[], - coreComponentData:{ - site:'', - orderNo:'', - buNo:'', - objectID:'', - partNo:'', - partDescription:'', - createdBy:'', - oldSerialNo:'', - newSerialNo:'', + corePartSpareList: [], + coreComponentData: { + site: '', + orderNo: '', + buNo: '', + objectID: '', + partNo: '', + partDescription: '', + createdBy: '', + oldSerialNo: '', + newSerialNo: '', }, fileData: { file: [], @@ -758,7 +780,6 @@ export default { exportList: [], // 导出 end searchData: { - corePartNo: '', site: '', userName: this.$store.state.user.name, orderNo: '', @@ -805,7 +826,7 @@ export default { tableName: "维修执行表", columnProp: 'orderNo', headerAlign: "center", - align: "center", + align: "left", columnLabel: '工单编码', columnHidden: false, columnImage: false, @@ -813,7 +834,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -823,7 +844,7 @@ export default { tableName: "维修执行表", columnProp: 'planID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈单号', columnHidden: false, columnImage: false, @@ -831,7 +852,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -841,7 +862,7 @@ export default { tableName: "维修执行表", columnProp: 'feedBackDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '反馈描述', columnHidden: false, columnImage: false, @@ -849,7 +870,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -859,7 +880,7 @@ export default { tableName: "维修执行表", columnProp: 'defectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障编码', columnHidden: false, columnImage: false, @@ -867,7 +888,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -877,7 +898,7 @@ export default { tableName: "维修执行表", columnProp: 'defectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '故障名称', columnHidden: false, columnImage: false, @@ -885,7 +906,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -895,7 +916,7 @@ export default { tableName: "维修执行表", columnProp: 'objectID', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备编码', columnHidden: false, columnImage: false, @@ -903,7 +924,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -913,7 +934,7 @@ export default { tableName: "维修执行表", columnProp: 'objectDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '设备名称', columnHidden: false, columnImage: false, @@ -921,7 +942,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 150, }, { userId: this.$store.state.user.name, @@ -939,7 +960,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -957,7 +978,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -975,7 +996,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -993,7 +1014,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -1011,7 +1032,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, + columnWidth: 200, }, { userId: this.$store.state.user.name, @@ -1029,80 +1050,8 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 107, - }, - { - userId: this.$store.state.user.name, - functionId: 101004005, - serialNumber: '101004005Table1CorePartNo', - tableId: "101004005Table1", - tableName: "维修执行表", - columnProp: 'corePartNo', - headerAlign: "center", - align: "center", - columnLabel: '更换配件编码', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', columnWidth: 100, }, - { - userId: this.$store.state.user.name, - functionId: 101004005, - serialNumber: '101004005Table1CorePartDescription', - tableId: "101004005Table1", - tableName: "维修执行表", - columnProp: 'corePartDescription', - headerAlign: "center", - align: "left", - columnLabel: '更换配件名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 101004005, - serialNumber: '101004005Table1OldSerialNo', - tableId: "101004005Table1", - tableName: "维修执行表", - columnProp: 'oldSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '老序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, - { - userId: this.$store.state.user.name, - functionId: 101004005, - serialNumber: '101004005Table1NewSerialNo', - tableId: "101004005Table1", - tableName: "维修执行表", - columnProp: 'newSerialNo', - headerAlign: "center", - align: "left", - columnLabel: '新序列号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 120, - }, ], detailModelFlag: false, detailList: [], @@ -1135,10 +1084,6 @@ export default { feedBackDesc: '', faultReason: '', preventiveMeasure: '', - corePartNo: '', - corePartDescription: '', - oldSerialNo: '', - newSerialNo: '', repairReportingType: '', repairType: '', createBy: '', @@ -1331,6 +1276,52 @@ export default { columnWidth: 100, }, ], + columnCoreComponent: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'left', + columnLabel: '备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 200, + }, + { + columnProp: 'oldSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '老序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'newSerialNo', + headerAlign: 'center', + align: 'left', + columnLabel: '新序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + ], // 日期限制 pickerOptions: { disabledDate(time) { @@ -1342,6 +1333,7 @@ export default { feedBackImages: [], sparPartImages: [], partSpareList: [], + coreComponentList: [], columnHistoryList: [ { columnWidth: 100, @@ -2250,10 +2242,6 @@ export default { faultReason: row.faultReason, preventiveMeasure: row.preventiveMeasure, result: row.result, - corePartNo: row.corePartNo, - corePartDescription: row.corePartDescription, - oldSerialNo: row.oldSerialNo, - newSerialNo: row.newSerialNo, repairReportingType: row.repairReportingType, repairType: row.repairType, createBy: row.createBy, @@ -2362,6 +2350,8 @@ export default { this.queryKnowledgeRecord() } else if (this.activeTable === 'spar_part_img') { this.getSparPartImages() + } else if (this.activeTable === 'core_component') { + this.getCorePartSpareList() } }, @@ -2649,7 +2639,6 @@ export default { } await getTableUserListLanguage(queryTableUser).then(({data}) => { if (data.rows.length > 0) { - //this.columnList1 = [] switch (columnId) { case 1: this.columnList = data.rows @@ -2657,12 +2646,6 @@ export default { case 2: this.columnHistoryList = data.rows break; - // case 3: - // this.columnList2 = data.rows - // break; - // case 4: - // this.columnList3 = data.rows - // break; } } else { this.getColumnList(tableId, columnId) @@ -2678,7 +2661,7 @@ export default { languageCode: this.$i18n.locale } await getTableDefaultListLanguage(queryTable).then(({data}) => { - if (!data.rows.length == 0) { + if (!data.rows.length === 0) { switch (columnId) { case 1: this.columnList = data.rows @@ -2686,15 +2669,7 @@ export default { case 2: this.columnHistoryList = data.rows break; - // case 3: - // this.columnList2 = data.rows - // break; - // case 4: - // this.columnList3 = data.rows - // break; } - } else { - // this.showDefault = true. } }) }, @@ -2709,13 +2684,15 @@ export default { this.authReach = !reachFlag this.authReport = !reportFlag }, - getCorePartSpareList(){ + + getCorePartSpareList () { let tempData = { site: this.saveData.site, - objectID: this.saveData.objectID + buNo: this.saveData.buNo, + objectID: this.saveData.objectID, + orderNo: this.saveData.orderNo, } getDeviceCorePartList(tempData).then(({data}) => { - // 区分请求成功和失败的状况 if (data && data.code === 200) { this.corePartSpareList = data.rows } else { @@ -2723,29 +2700,35 @@ export default { } }) }, - coreComponentModal(){ - this.getCorePartSpareList(); - this.coreComponentData={ - site:this.saveData.site, - buNo:this.saveData.buNo, - orderNo:this.saveData.orderNo, - objectID:this.saveData.objectID, - partNo:this.saveData.corePartNo, - partDescription:this.saveData.corePartDescription, - createdBy:this.$store.state.user.name, - oldSerialNo:this.saveData.oldSerialNo, - newSerialNo:this.saveData.newSerialNo, + + coreComponentModal () { + this.getCorePartSpareList() + this.coreComponentData = { + site: this.saveData.site, + buNo: this.saveData.buNo, + orderNo: this.saveData.orderNo, + objectID: this.saveData.objectID, + createdBy: this.$store.state.user.name, + partNo: '', + partDescription: '', + oldSerialNo: '', + newSerialNo: '', } - this.coreComponentFlag=true; + this.coreComponentFlag = true }, - saveCoreComponent(){ + + saveCoreComponent () { + if (this.coreComponentData.orderNo === '' || this.coreComponentData.orderNo == null) { + this.$message.warning('未绑定维修工单号!') + return + } + if (this.coreComponentData.partNo === '' || this.coreComponentData.partNo == null) { + this.$message.warning('请选择备件!') + return + } saveCoreComponent(this.coreComponentData).then(({data}) => { if (data && data.code === 0) { - this.saveData.corePartNo=this.coreComponentData.partNo - this.saveData.corePartDescription=this.coreComponentData.partDescription - this.saveData.oldSerialNo=this.coreComponentData.oldSerialNo - this.saveData.newSerialNo=this.coreComponentData.newSerialNo - this.getDataList() + this.getCorePartSpareList() this.coreComponentFlag = false this.$message({ message: '操作成功', @@ -2760,11 +2743,17 @@ export default { } }) }, - componentChange(value){ - if(value&&value!==''){ - this.coreComponentData.partDescription=this.corePartSpareList.filter(item => item.partNo === value)[0].partDescription; - }else { - this.coreComponentData.partDescription='' + + componentChange (value) { + if (value && value !== '') { + let tempData = this.corePartSpareList.filter(item => item.partNo === value)[0] + this.coreComponentData.partDescription = tempData.partDescription + this.coreComponentData.oldSerialNo = tempData.oldSerialNo + this.coreComponentData.newSerialNo = tempData.newSerialNo + } else { + this.coreComponentData.partDescription = '' + this.coreComponentData.oldSerialNo = '' + this.coreComponentData.newSerialNo = '' } } }