From 38e1fb138d2d50f6e4bd4228c72fb1f59774518c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com> Date: Thu, 2 Nov 2023 15:42:30 +0800 Subject: [PATCH] =?UTF-8?q?2023-11-02=20=E8=AE=BE=E5=A4=87=E5=92=8C?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/eam.js | 1 + src/api/partspare/inventorystock.js | 2 +- .../modules/eam/eamWorkOrderForCheck.vue | 111 +++++++++++++----- .../modules/eam/eamWorkOrderForDefect.vue | 110 +++++++++++++---- .../eam/eamWorkOrderForMaintenance.vue | 38 ++++-- .../modules/partspare/inventorystock.vue | 10 +- .../modules/partspare/partSpareLocation.vue | 14 +-- .../partspare/partspare-add-or-update.vue | 6 +- src/views/modules/partspare/partspare.vue | 17 +++ .../modules/partspare/repairtransdetail.vue | 4 +- 10 files changed, 233 insertions(+), 80 deletions(-) diff --git a/src/api/eam/eam.js b/src/api/eam/eam.js index 51bd871..64d4b9b 100644 --- a/src/api/eam/eam.js +++ b/src/api/eam/eam.js @@ -166,6 +166,7 @@ export const cancelFeedBack= data => createAPI(`/pms/eam/cancelFeedBack`,'post', export const saveDefectOrder= data => createAPI(`/pms/eam/saveDefectOrder`,'post',data) export const imageDelete= data => createAPI(`/pms/eam/imageDelete`,'post',data) export const getDeptList= data => createAPI(`/pms/eam/getDeptList`,'post',data) +export const updateReportResult= data => createAPI(`/pms/eam/updateReportResult`,'post',data) //---------------快速添加------------------- diff --git a/src/api/partspare/inventorystock.js b/src/api/partspare/inventorystock.js index 337947e..8a139f8 100644 --- a/src/api/partspare/inventorystock.js +++ b/src/api/partspare/inventorystock.js @@ -25,7 +25,7 @@ export function partSpareTemp(dataList) { LODOP.ADD_PRINT_TEXT(50, 189, 141, 21, row.umid); LODOP.ADD_PRINT_TEXT(95, 6, 68, 20, "规格型号:"); LODOP.ADD_PRINT_TEXT(95, 73, 241, 21, row.spec); - LODOP.ADD_PRINT_TEXT(69, 98, 92, 20, "库位编码:"); + LODOP.ADD_PRINT_TEXT(69, 98, 92, 20, "货位编码:"); LODOP.ADD_PRINT_TEXT(70, 188, 141, 21, row.locationId); } // LODOP.PRINT_DESIGN(); diff --git a/src/views/modules/eam/eamWorkOrderForCheck.vue b/src/views/modules/eam/eamWorkOrderForCheck.vue index 75600b2..e91369f 100644 --- a/src/views/modules/eam/eamWorkOrderForCheck.vue +++ b/src/views/modules/eam/eamWorkOrderForCheck.vue @@ -11,6 +11,9 @@ + + + @@ -87,33 +90,14 @@ prop="checkResult" header-align="center" align="center" - label="点检结论"> + label="点检结论" + width="80"> - - - - - - { checkWorkOrder(this.submitData).then(({data}) => { if (data && data.code === 0) { - this.getDataList(); + this.getDataList() this.saveData.status = '待审核' this.$message({ message: '操作成功', type: 'success', duration: 1500, - onClose: () => { - } + onClose: () => {} }) } else { this.$alert(data.msg, '错误', { @@ -996,8 +1045,7 @@ }) }).catch(() => { }) - }else if (this.submitData.status === '待审核'){ - console.log(this.$store.state.user) + } else if (this.submitData.status === '待审核'){ if (!this.submitData.checker.split(';').includes(tempData.mesUser)){ this.$message.warning('审核人员与计划不符!') return @@ -1009,14 +1057,13 @@ }).then(() => { checkWorkOrder(this.submitData).then(({data}) => { if (data && data.code === 0) { - this.getDataList(); + this.getDataList() this.saveData.status = '已完工' this.$message({ message: '操作成功', type: 'success', duration: 1500, - onClose: () => { - } + onClose: () => {} }) } else { this.$alert(data.msg, '错误', { diff --git a/src/views/modules/eam/eamWorkOrderForDefect.vue b/src/views/modules/eam/eamWorkOrderForDefect.vue index 05d566b..ca068d7 100644 --- a/src/views/modules/eam/eamWorkOrderForDefect.vue +++ b/src/views/modules/eam/eamWorkOrderForDefect.vue @@ -8,13 +8,16 @@ - + + + + - + - + @@ -196,10 +199,10 @@ - + - + @@ -234,6 +237,7 @@ + 保存 关闭 @@ -314,10 +318,12 @@ submitDefect, searchFileUrl, getEmpyDeptList, - getDeptList + getDeptList, + updateReportResult, // 修改执行结果 } from "@/api/eam/eam.js" import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import Chooselist from '@/views/modules/common/Chooselist_eam' + import {isAuth} from '../../../utils' export default { components: { Chooselist @@ -394,11 +400,11 @@ columnLabel: '紧急程度', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', - columnWidth: 60, + columnWidth: 90, }, { userId: this.$store.state.user.name, @@ -412,10 +418,11 @@ columnLabel: '工单编码', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -429,10 +436,11 @@ columnLabel: '反馈单号', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -450,6 +458,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -467,6 +476,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -484,6 +494,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -501,6 +512,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -518,6 +530,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -535,6 +548,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -552,6 +566,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -565,10 +580,11 @@ columnLabel: '状态', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -582,10 +598,11 @@ columnLabel: '维修结果', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -603,6 +620,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -620,6 +638,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -637,6 +656,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -650,10 +670,11 @@ columnLabel: '计划执行日期', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 100, }, { userId: this.$store.state.user.name, @@ -667,10 +688,11 @@ columnLabel: '故障时间', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 130, }, { userId: this.$store.state.user.name, @@ -684,10 +706,11 @@ columnLabel: '到达时间', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 130, }, { userId: this.$store.state.user.name, @@ -701,10 +724,11 @@ columnLabel: '实际执行时间', columnHidden: false, columnImage: false, - columnSortable: false, + columnSortable: true, sortLv: 0, status: true, fixed: '', + columnWidth: 130, }, { userId: this.$store.state.user.name, @@ -722,6 +746,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 110, }, { userId: this.$store.state.user.name, @@ -739,6 +764,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -756,6 +782,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 120, }, { userId: this.$store.state.user.name, @@ -773,6 +800,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 80, }, { userId: this.$store.state.user.name, @@ -790,6 +818,7 @@ sortLv: 0, status: true, fixed: '', + columnWidth: 120, }, ], changeModelFlag:false, @@ -870,7 +899,7 @@ controlRowStyle({row, rowIndex}) { // 区分不同的样式对应不同的颜色 if (row.status === '待审核') { - return "background-color: #E2F1F5" + return "background-color: #D8ECF1" } }, @@ -1077,6 +1106,10 @@ // 审核按钮 checkModal(){ + if (!this.isAuth(this.$route.meta.menuId+":check")) { + this.$message.warning('无审核权限!') + return + } this.submitData.site = this.detailData.site this.submitData.orderNo = this.detailData.orderNo this.submitData.planID = this.detailData.planID @@ -1096,14 +1129,13 @@ this.submitData.status = '待审核' submitDefect(this.submitData).then(({data}) => { if (data && data.code === 0) { - this.getDataList(); + this.getDataList() this.detailData.status = '待审核' this.$message({ message: '操作成功', type: 'success', duration: 1500, - onClose: () => { - } + onClose: () => {} }) } else { this.$alert(data.msg, '错误', { @@ -1166,11 +1198,47 @@ actualDate: row.actualDate, planDesc: row.planDesc, disposalMeasures: row.disposalMeasures, - handlingMethod: row.handlingMethod + handlingMethod: row.handlingMethod, + functionType: row.functionType } this.detailModelFlag = true; }, + updateResult () { + if (!this.isAuth(this.$route.meta.menuId+":check")) { + this.$message.warning('无审核权限!') + return + } + if(this.detailData.reachDate === '' || this.detailData.reachDate == null){ + this.$message.warning('请选择到达时间!') + return + } + if(this.detailData.actualDate === '' || this.detailData.actualDate == null){ + this.$message.warning('请选择实际执行时间!') + return + } + if (this.detailData.reachDate > this.detailData.actualDate) { + this.$message.warning('到达时间不能小于实际执行时间!') + return + } + updateReportResult(this.detailData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.detailModelFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + /** * 查看故障图片 */ diff --git a/src/views/modules/eam/eamWorkOrderForMaintenance.vue b/src/views/modules/eam/eamWorkOrderForMaintenance.vue index c5a2f00..929ae59 100644 --- a/src/views/modules/eam/eamWorkOrderForMaintenance.vue +++ b/src/views/modules/eam/eamWorkOrderForMaintenance.vue @@ -9,6 +9,9 @@ + + + @@ -86,7 +89,7 @@ header-align="center" align="center" label="维保结论" - width="60"> + width="80">