diff --git a/src/api/eam/eam.js b/src/api/eam/eam.js index 609ae0f..fe7ff3e 100644 --- a/src/api/eam/eam.js +++ b/src/api/eam/eam.js @@ -112,7 +112,7 @@ export const modalCodeBlur = data => createAPI(`/pms/eam/modalCodeBlur`,'post',d export const planOrder = data => createAPI(`/pms/eam/planOrder`,'post',data) export const cancelPlan = data => createAPI(`/pms/eam/cancelPlan`,'post',data) export const getOperatorList = data => createAPI(`/pms/eam/getOperatorList`,'post',data) // 获取机修人员列表 -export const getCheckerList = data => createAPI(`/pms/eam/getOperatorList`,'post',data) // 获取审核人员列表 +export const getCheckerList = data => createAPI(`/pms/eam/getCheckerList`,'post',data) // 获取审核人员列表 //---------------点检工单------------------- export const eamWorkOrderSearch = data => createAPI(`/pms/eam/eamWorkOrderSearch`,'post',data) export const cancelOrder= data => createAPI(`/pms/eam/cancelOrder`,'post',data) diff --git a/src/views/modules/eam/eamAdmin.vue b/src/views/modules/eam/eamAdmin.vue index 4a73369..94da985 100644 --- a/src/views/modules/eam/eamAdmin.vue +++ b/src/views/modules/eam/eamAdmin.vue @@ -810,7 +810,6 @@ getMesList(inData).then(({data}) => { this.mesList = data.rows }) - console.log(this.modalData) this.modalDisableFlag = true; this.modalFlag = true; }, diff --git a/src/views/modules/eam/eamWorkOrderForCheck.vue b/src/views/modules/eam/eamWorkOrderForCheck.vue index b027efb..2002299 100644 --- a/src/views/modules/eam/eamWorkOrderForCheck.vue +++ b/src/views/modules/eam/eamWorkOrderForCheck.vue @@ -186,6 +186,16 @@ border v-loading="dataListLoading" style="width: 100%;"> + + + + +
+ +
+ + 关闭 + +
+ @@ -294,7 +313,8 @@ cancelOrder, changeOrderOperator, checkWorkOrder, // 审核 - selectNameByMes // 检查系统操作人和审核人员是否一致 + selectNameByMes, // 检查系统操作人和审核人员是否一致 + searchFileUrl } from "@/api/eam/eam.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -742,7 +762,9 @@ cancelAll: '', planID: '', status: '' - } + }, + descImages: [], + imageModalFlag: false } }, mounted () { @@ -755,13 +777,33 @@ this.getDataList() }, methods: { + /** + * 查看项目图片 + */ + checkItemImageModal (row){ + this.descImages = []; + let tempData = { + site: this.$store.state.user.site, + orderNo: row.orderNo, + folder: row.itemNo, + }; + searchFileUrl(tempData).then(({data}) => { + if (data.code === 0) { + for (let i = 0; i < data.rows.length; i++) { + this.descImages.push(data.rows[i].url) + } + }else { + this.$message.warning(data.msg); + } + }) + this.imageModalFlag = true + }, // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { userId: this.$store.state.user.id, languageCode: this.$i18n.locale } - console.log(this.$route.meta.menuId) userFavoriteList(userFavorite).then(({data}) => { for (let i = 0; i < data.list.length; i++) { if(this.$route.meta.menuId==data.list[i].menuId){ @@ -879,6 +921,7 @@ this.submitData.checker = this.saveData.checker this.submitData.checkerName = this.saveData.checkerName this.submitData.status = this.saveData.status + console.log(this.submitData) let tempData = { site: this.$store.state.user.site, mesUser: this.$store.state.user.name @@ -909,39 +952,70 @@ }).catch(() => { }) }else if (this.submitData.status === '待审核'){ - selectNameByMes(tempData).then(({data}) => { - if (data.rows[0].adminName != this.submitData.checkerName){ - this.$alert('审核人员与计划不符!', '错误', { - confirmButtonText: '确定', - type: 'warning' - }) - return false - } - this.$confirm(`是否确认审核?`, '提示', { + if (!this.submitData.checker.split(';').includes(tempData.mesUser)){ + this.$alert('审核人员与计划不符!', '错误', { confirmButtonText: '确定', - cancelButtonText: '取消', type: 'warning' - }).then(() => { - checkWorkOrder(this.submitData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList(); - this.saveData.status = '已完工' - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - }).catch(() => { }) + return false + } + this.$confirm(`是否确认审核?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + checkWorkOrder(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + this.saveData.status = '已完工' + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { }) + // selectNameByMes(tempData).then(({data}) => { + // if (data.rows[0].adminName != this.submitData.checkerName){ + // this.$alert('审核人员与计划不符!', '错误', { + // confirmButtonText: '确定', + // type: 'warning' + // }) + // return false + // } + // this.$confirm(`是否确认审核?`, '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { + // checkWorkOrder(this.submitData).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList(); + // this.saveData.status = '已完工' + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => { + // } + // }) + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) + // }).catch(() => { + // }) + // }) } }, // 确认审核 @@ -972,14 +1046,14 @@ }, // 详情 reportModal(row){ - let indata = { + let inData = { site: row.site, itemNo: row.itemNo, planID: row.planID, orderNo: row.orderNo, itemType: row.functionType, } - eamWorkOrderReportSearch(indata).then(({data}) => { + eamWorkOrderReportSearch(inData).then(({data}) => { this.detailList = data.rows }) this.saveData = { diff --git a/src/views/modules/eam/eamWorkOrderForMaintenance.vue b/src/views/modules/eam/eamWorkOrderForMaintenance.vue index 6cac39f..1df6487 100644 --- a/src/views/modules/eam/eamWorkOrderForMaintenance.vue +++ b/src/views/modules/eam/eamWorkOrderForMaintenance.vue @@ -170,6 +170,16 @@ border v-loading="dataListLoading" style="width: 100%;"> + + + + +
+ +
+ + 关闭 + +
+ @@ -258,7 +277,8 @@ changeOrderOperator, eamWorkOrderReportSearch, selectNameByMes, - checkWorkOrder + checkWorkOrder, + searchFileUrl } from "@/api/eam/eam.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -774,7 +794,9 @@ cancelAll: '', planID: '', status: '' - } + }, + descImages: [], + imageModalFlag: false } }, mounted () { @@ -787,6 +809,27 @@ this.favoriteIsOk() }, methods: { + /** + * 查看项目图片 + */ + checkItemImageModal (row){ + this.descImages = []; + let tempData = { + site: this.$store.state.user.site, + orderNo: row.orderNo, + folder: row.itemNo, + }; + searchFileUrl(tempData).then(({data}) => { + if (data.code === 0) { + for (let i = 0; i < data.rows.length; i++) { + this.descImages.push(data.rows[i].url) + } + }else { + this.$message.warning(data.msg); + } + }) + this.imageModalFlag = true + }, // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { @@ -795,7 +838,7 @@ } userFavoriteList(userFavorite).then(({data}) => { for (let i = 0; i < data.list.length; i++) { - if(this.$route.meta.menuId==data.list[i].menuId){ + if(this.$route.meta.menuId == data.list[i].menuId){ this.favorite = true } } @@ -1000,14 +1043,14 @@ }, // 详情 reportModal(row){ - let indata = { + let inData = { site: row.site, itemNo: row.itemNo, planID: row.planID, orderNo: row.orderNo, itemType: row.functionType, } - eamWorkOrderReportSearch(indata).then(({data}) => { + eamWorkOrderReportSearch(inData).then(({data}) => { this.detailList = data.rows }) this.saveData = { @@ -1049,7 +1092,7 @@ checkWorkOrder(this.submitData).then(({data}) => { if (data && data.code === 0) { this.getDataList(); - this.detailModelFlag = false; + this.saveData.status = '待审核' this.$message({ message: '操作成功', type: 'success', @@ -1066,40 +1109,71 @@ }).catch(() => { }) }else if (this.submitData.status === '待审核'){ - selectNameByMes(tempData).then(({data}) => { - if (data.rows[0].adminName != this.submitData.checkerName){ - this.$alert('审核人员与计划不符!', '错误', { - confirmButtonText: '确定', - type: 'warning' - }) - return false - }else { - this.$confirm(`是否确认审核?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - checkWorkOrder(this.submitData).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: '确定' - }) + if (!this.submitData.checker.split(';').includes(tempData.mesUser)){ + this.$alert('审核人员与计划不符!', '错误', { + confirmButtonText: '确定', + type: 'warning' + }) + return false + } + this.$confirm(`是否确认审核?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + checkWorkOrder(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList(); + this.saveData.status = '已完工' + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { } }) - }).catch(() => { - }) - } + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { }) + // selectNameByMes(tempData).then(({data}) => { + // if (data.rows[0].adminName != this.submitData.checkerName){ + // this.$alert('审核人员与计划不符!', '错误', { + // confirmButtonText: '确定', + // type: 'warning' + // }) + // return false + // }else { + // this.$confirm(`是否确认审核?`, '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { + // checkWorkOrder(this.submitData).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: '确定' + // }) + // } + // }) + // }).catch(() => { + // }) + // } + // }) } }, diff --git a/src/views/modules/eam/eamWorkPlanForCheck.vue b/src/views/modules/eam/eamWorkPlanForCheck.vue index 3379cce..d13073c 100644 --- a/src/views/modules/eam/eamWorkPlanForCheck.vue +++ b/src/views/modules/eam/eamWorkPlanForCheck.vue @@ -1365,7 +1365,7 @@ columnProp: 'adminID', headerAlign: "center", align: "center", - columnLabel: '编码', + columnLabel: '人员编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -1377,31 +1377,7 @@ columnProp: 'adminName', headerAlign: "center", align: "center", - columnLabel: '名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'phone', - headerAlign: "center", - align: "center", - columnLabel: '手机号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'department', - headerAlign: "center", - align: "center", - columnLabel: '部门', + columnLabel: '人员名称', columnHidden: false, columnImage: false, columnSortable: false, @@ -1422,41 +1398,17 @@ fixed: '', }, { - columnProp: 'tel', - headerAlign: "center", - align: "center", - columnLabel: '座机号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'adminLevelDesc', - headerAlign: "center", - align: "center", - columnLabel: '等级', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'mesUser', + columnProp: 'phone', headerAlign: "center", align: "center", - columnLabel: 'MES账号', + columnLabel: '手机号', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - }, + } ], dataListSelections2: [], dataListSelections3: [], @@ -1660,7 +1612,7 @@ }, // 添加设备 addObject(){ - if(this.objectSelections1.length == 0){ + if(this.objectSelections1.length === 0){ this.$alert('请勾选要添加的设备!', '错误', { confirmButtonText: '确定' }) @@ -1777,11 +1729,9 @@ }, // 确认多选机修人员 confirmOperator(){ - if(this.dataListSelections2.length == 0){ - this.$alert('请勾选人员!', '错误', { - confirmButtonText: '确定' - }) - return false + if(this.dataListSelections2.length === 0){ + this.$message.warning("请勾选人员!") + return } for (let i = 0; i < this.dataListSelections2.length; i++) { this.modalData.operatorName = this.modalData.operatorName + ";" + this.dataListSelections2[i].adminName @@ -1793,11 +1743,9 @@ }, // 确认多选审核人员 confirmOperator2(){ - if(this.dataListSelections3.length == 0){ - this.$alert('请勾选人员!', '错误', { - confirmButtonText: '确定' - }) - return false + if(this.dataListSelections3.length === 0){ + this.$message.warning("请勾选人员!") + return } for (let i = 0; i < this.dataListSelections3.length; i++) { this.modalData.checkerName = this.modalData.checkerName + ";" + this.dataListSelections3[i].adminName @@ -2138,6 +2086,8 @@ //----------项目清单----------------start //打开项目清单 itemModal(row){ + this.options = [] + this.detailData.objectID = '' this.detailData.site = row.site this.detailData.planID = row.planID this.detailData.codeNo = row.propertiesCode diff --git a/src/views/modules/eam/eamWorkPlanForMaintenance.vue b/src/views/modules/eam/eamWorkPlanForMaintenance.vue index ca61a9a..b83b891 100644 --- a/src/views/modules/eam/eamWorkPlanForMaintenance.vue +++ b/src/views/modules/eam/eamWorkPlanForMaintenance.vue @@ -1296,7 +1296,7 @@ columnProp: 'adminID', headerAlign: "center", align: "center", - columnLabel: '编码', + columnLabel: '人员编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -1308,31 +1308,7 @@ columnProp: 'adminName', headerAlign: "center", align: "center", - columnLabel: '名称', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'phone', - headerAlign: "center", - align: "center", - columnLabel: '手机号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'department', - headerAlign: "center", - align: "center", - columnLabel: '部门', + columnLabel: '人员名称', columnHidden: false, columnImage: false, columnSortable: false, @@ -1353,41 +1329,17 @@ fixed: '', }, { - columnProp: 'tel', - headerAlign: "center", - align: "center", - columnLabel: '座机号', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'adminLevelDesc', - headerAlign: "center", - align: "center", - columnLabel: '等级', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - }, - { - columnProp: 'mesUser', + columnProp: 'phone', headerAlign: "center", align: "center", - columnLabel: 'MES账号', + columnLabel: '手机号', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - }, + } ], operatorDetailList: [ { @@ -1634,11 +1586,9 @@ }, // 确认多选机修人员 confirmOperator(){ - if(this.dataListSelections2.length == 0){ - this.$alert('请勾选人员!', '错误', { - confirmButtonText: '确定' - }) - return false + if(this.dataListSelections2.length === 0){ + this.$message.warning("请勾选人员!") + return } for (let i = 0; i < this.dataListSelections2.length; i++) { this.modalData.operatorName = this.modalData.operatorName + ";" + this.dataListSelections2[i].adminName @@ -1650,11 +1600,9 @@ }, // 确认多选审核人员 confirmOperator2(){ - if(this.dataListSelections3.length == 0){ - this.$alert('请勾选人员!', '错误', { - confirmButtonText: '确定' - }) - return false + if(this.dataListSelections3.length === 0){ + this.$message.warning("请勾选人员!") + return } for (let i = 0; i < this.dataListSelections3.length; i++) { this.modalData.checkerName = this.modalData.checkerName + ";" + this.dataListSelections3[i].adminName @@ -2086,6 +2034,8 @@ //----------项目清单----------------start //打开项目清单 itemModal (row) { + this.options = [] + this.detailData.objectID = '' this.detailData.site = row.site this.detailData.planID = row.planID this.detailData.codeNo = row.propertiesCode