From dfbfaae2ec9405be64cc3a41b9cc134332805ced 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, 13 Jul 2023 10:06:23 +0800 Subject: [PATCH] =?UTF-8?q?2023-07-13=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 --- .../modules/eam/eamWorkOrderForCheck.vue | 148 +++++++----- .../eam/eamWorkOrderForMaintenance.vue | 179 +++++++++------ src/views/modules/eam/eamWorkPlanForCheck.vue | 216 ++++++++++-------- .../modules/eam/eamWorkPlanForMaintenance.vue | 106 ++++----- .../reportWorkOrder/reportDefectOrder.vue | 23 +- .../reportWorkOrder/report_image_upload.vue | 2 +- 6 files changed, 380 insertions(+), 294 deletions(-) diff --git a/src/views/modules/eam/eamWorkOrderForCheck.vue b/src/views/modules/eam/eamWorkOrderForCheck.vue index 612f5d1..fe9c0cd 100644 --- a/src/views/modules/eam/eamWorkOrderForCheck.vue +++ b/src/views/modules/eam/eamWorkOrderForCheck.vue @@ -5,7 +5,7 @@ - + @@ -35,7 +35,7 @@ - + - + 查询 更改机修人员 @@ -130,9 +130,9 @@ width="100" label="操作"> @@ -146,23 +146,33 @@ layout="total, sizes, prev, pager, next, jumper"> - + - + - + - + + + + + + + - + - + + + + 取消审核 + 审核
@@ -183,7 +193,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -255,7 +265,7 @@ - +
@@ -551,6 +561,13 @@ planOperatorName:'', workTime:'', remark:'', + actualOperatorName: '', + checkResult: '', + planID: '', + objectID: '', + checker: '', + checkerName: '', + status: '' }, columnDetailList: [ { @@ -691,7 +708,8 @@ checker: '', checkerName: '', difficultyLevel: '', - difficultyRemark: '' + difficultyRemark: '', + status: '' }, submitModelFlag: false } @@ -715,10 +733,8 @@ console.log(this.$route.meta.menuId) userFavoriteList(userFavorite).then(({data}) => { for (let i = 0; i < data.list.length; i++) { - // let flag=false; if(this.$route.meta.menuId==data.list[i].menuId){ this.favorite = true - // flag=true; } } }) @@ -730,17 +746,10 @@ functionId: this.$route.meta.menuId, } if (this.favorite) { - // 取消收藏 - // this.$confirm(`确定取消收藏`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - removeUserFavorite(userFavorite).then(({data}) => { - this.$message.success(data.msg) - this.favorite = false - }) - // }) + removeUserFavorite(userFavorite).then(({data}) => { + this.$message.success(data.msg) + this.favorite = false + }) } else { // 收藏 saveUserFavorite(userFavorite).then(({data}) => { @@ -767,7 +776,6 @@ this.planOperator = val.AdminID this.planOperatorName = val.AdminName } - }, //导出excel async createExportData() { @@ -779,7 +787,7 @@ return this.exportList; }, startDownload() { - // this.exportData = this.dataList + }, finishDownload() { @@ -832,33 +840,28 @@ this.dataListSelections = val }, // 审核按钮 - checkModal(row){ - this.submitData.site = row.site - this.submitData.orderNo = row.orderNo - this.submitData.planID = row.planID - this.submitData.objectID = row.objectID - this.submitData.checker = row.checker - this.submitData.checkerName = row.checkerName + checkModal(){ + this.submitData.site = this.saveData.site + this.submitData.orderNo = this.saveData.orderNo + this.submitData.planID = this.saveData.planID + this.submitData.objectID = this.saveData.objectID + this.submitData.checker = this.saveData.checker + this.submitData.checkerName = this.saveData.checkerName + this.submitData.status = this.saveData.status let tempData = { site: this.$store.state.user.site, mesUser: this.$store.state.user.name } - selectNameByMes(tempData).then(({data}) => { - if (data.rows[0].adminName != this.submitData.checkerName){ - this.$alert('审核人员与计划不符!', '错误', { - confirmButtonText: '确定', - type: 'warning' - }) - return false - } - this.$confirm(`是否确认审核?`, '提示', { + if (this.submitData.status === '已完工'){ + this.$confirm(`是否取消审核?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { checkWorkOrder(this.submitData).then(({data}) => { - if (data && data.code == 0) { - this.getDataList() + if (data && data.code === 0) { + this.getDataList(); + this.detailModelFlag = false; this.$message({ message: '操作成功', type: 'success', @@ -874,8 +877,41 @@ }) }).catch(() => { }) - }) - // this.submitModelFlag = true + }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(`是否确认审核?`, '提示', { + 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(() => { + }) + }) + } }, // 确认审核 submitModel(){ @@ -904,7 +940,7 @@ }) }, - // 实测值按钮 + // 详情 reportModal(row){ let indata = { site: row.site, @@ -923,7 +959,13 @@ planOperatorName: row.planOperatorName, workTime: row.workTime, remark: row.remark, - }, + actualOperatorName: row.actualOperatorName, + checkResult: row.checkResult, + objectID: row.objectID, + checker: row.checker, + checkerName: row.checkerName, + status: row.status + } this.detailModelFlag = true; }, cancelOrder(row){ diff --git a/src/views/modules/eam/eamWorkOrderForMaintenance.vue b/src/views/modules/eam/eamWorkOrderForMaintenance.vue index d13001e..a3f390a 100644 --- a/src/views/modules/eam/eamWorkOrderForMaintenance.vue +++ b/src/views/modules/eam/eamWorkOrderForMaintenance.vue @@ -7,13 +7,13 @@ - + - + - + @@ -35,7 +35,7 @@ - + - + 查询 更改机修人员 @@ -111,9 +111,9 @@ width="100" label="操作"> @@ -144,16 +144,20 @@ - +
- + - + + + + 取消审核 + 审核
@@ -212,10 +216,10 @@ 计划执行人员 - + - + @@ -224,7 +228,7 @@ - +
@@ -261,9 +265,9 @@ } }, data () { - return { // 是否收藏 + return { + // 是否收藏 favorite: false, - // 导出 start exportData: [], exportName: "维保工单" + this.dayjs().format('YYYYMMDDHHmmss'), @@ -290,7 +294,6 @@ pageIndex: 1, pageSize: 100, totalPage: 0, - dataList: [], dataListLoading: false, dataListSelections: [], @@ -593,7 +596,12 @@ remark:'', actualOperatorName: '', checkResult: '', - disposalMeasures: '' + disposalMeasures: '', + planID: '', + objectID: '', + checker: '', + checkerName: '', + status: '' }, columnDetailList: [ { @@ -752,13 +760,10 @@ 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++) { - // let flag=false; if(this.$route.meta.menuId==data.list[i].menuId){ this.favorite = true - // flag=true; } } }) @@ -770,17 +775,10 @@ functionId: this.$route.meta.menuId, } if (this.favorite) { - // 取消收藏 - // this.$confirm(`确定取消收藏`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - removeUserFavorite(userFavorite).then(({data}) => { - this.$message.success(data.msg) - this.favorite = false - }) - // }) + removeUserFavorite(userFavorite).then(({data}) => { + this.$message.success(data.msg) + this.favorite = false + }) } else { // 收藏 saveUserFavorite(userFavorite).then(({data}) => { @@ -818,7 +816,7 @@ return this.exportList; }, startDownload() { - // this.exportData = this.dataList + }, finishDownload() { @@ -938,6 +936,7 @@ } }) }, + // 详情 reportModal(row){ let indata = { site: row.site, @@ -958,56 +957,88 @@ remark: row.remark, actualOperatorName: row.actualOperatorName, checkResult: row.checkResult, - disposalMeasures: row.disposalMeasures + disposalMeasures: row.disposalMeasures, + objectID: row.objectID, + checker: row.checker, + checkerName: row.checkerName, + status: row.status }, this.detailModelFlag = true; }, // 审核按钮 - checkModal(row){ - this.submitData.site = row.site - this.submitData.orderNo = row.orderNo - this.submitData.planID = row.planID - this.submitData.objectID = row.objectID - this.submitData.checker = row.checker - this.submitData.checkerName = row.checkerName + checkModal(){ + this.submitData.site = this.saveData.site + this.submitData.orderNo = this.saveData.orderNo + this.submitData.planID = this.saveData.planID + this.submitData.objectID = this.saveData.objectID + this.submitData.checker = this.saveData.checker + this.submitData.checkerName = this.saveData.checkerName + this.submitData.status = this.saveData.status let tempData = { site: this.$store.state.user.site, mesUser: this.$store.state.user.name } - selectNameByMes(tempData).then(({data}) => { - if (data.rows[0].adminName != this.submitData.checkerName){ - this.$alert('审核人员与计划不符!', '错误', { - confirmButtonText: '确定', - type: 'warning' + if (this.submitData.status === '已完工'){ + 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: '确定' + }) + } }) - return false - }else { - this.$confirm(`是否确认审核?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - checkWorkOrder(this.submitData).then(({data}) => { - if (data && data.code == 0) { - this.getDataList() - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } + }).catch(() => { + }) + }else if (this.submitData.status === '待审核'){ + selectNameByMes(tempData).then(({data}) => { + if (data.rows[0].adminName != this.submitData.checkerName){ + this.$alert('审核人员与计划不符!', '错误', { + confirmButtonText: '确定', + type: 'warning' }) - }).catch(() => { - }) - } - }) - + 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 e497c76..a822524 100644 --- a/src/views/modules/eam/eamWorkPlanForCheck.vue +++ b/src/views/modules/eam/eamWorkPlanForCheck.vue @@ -5,7 +5,7 @@ - + @@ -27,7 +27,7 @@ - + - + 查询 - 新增计划 + 新增计划 @@ -106,10 +106,10 @@ width="200" label="操作"> @@ -146,18 +146,24 @@ + format='yyyy-MM-dd' + placeholder="必选" + :editable=false + > + format='yyyy-MM-dd' + placeholder="必选" + :editable=false + > @@ -166,6 +172,10 @@ + + + + @@ -177,6 +187,11 @@ + + + + +
----------------------------------------------------选择设备----------------------------------------------------
@@ -332,16 +347,6 @@ min-width="30" label="设备区域"> - - - - - - - - - - 保存 @@ -368,9 +373,6 @@
- - -
- + @@ -437,13 +439,13 @@ - + - + @@ -454,7 +456,7 @@ - + @@ -463,7 +465,7 @@ - 新增 + 新增 - + @@ -510,12 +512,12 @@
- + - + - + 查询 @@ -548,7 +550,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -563,12 +565,12 @@
- + - + - + 查询 @@ -601,7 +603,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -738,30 +740,7 @@ Chooselist }, watch: { - // searchData: { - // deep: true, - // handler: function (newV, oldV) { - // this.searchData.planID = this.searchData.planID.toUpperCase() - // this.searchData.objectID = this.searchData.objectID.toUpperCase() - // } - // }, - // modalData: { - // deep: true, - // handler: function (newV, oldV) { - // this.modalData.planID = this.modalData.planID.toUpperCase() - // this.modalData.objectID = this.modalData.objectID.toUpperCase() - // this.modalData.propertiesCode = this.modalData.propertiesCode.toUpperCase() - // this.modalData.operator = this.modalData.operator.toUpperCase() - // } - // }, - // detailData: { - // deep: true, - // handler: function (newV, oldV) { - // this.modalData.planID = this.modalData.planID.toUpperCase() - // this.modalData.itemNo = this.modalData.itemNo.toUpperCase() - // this.modalData.codeNo = this.modalData.codeNo.toUpperCase() - // } - // } + }, data () { return { @@ -1539,7 +1518,13 @@ trigger: 'change' } ], - } + }, + // 日期限制 + pickerOptions: { + disabledDate(time) { + return time < this.dayjs().format("yyyy-MM-dd"); + }, + }, } }, mounted () { @@ -1552,6 +1537,60 @@ this.getDataList() }, methods: { + // 时间处理函数 + getStandTime(data) { + let value = + data.getFullYear() + + "-" + + this.checkTime(data.getMonth() + 1) + + "-" + + this.checkTime(data.getDate()) + + " " + + this.checkTime(data.getHours()) + + ":" + + this.checkTime(data.getMinutes()) + + ":" + + this.checkTime(data.getSeconds()); + return value; + }, + // 时间处理,如果时间小于10 ,则再前面加一个'0' + checkTime(i) { + if (i < 10) { + i = "0" + i; + } + return i; + }, + // 日期时间选择器改变 + handleChangeTime() { + // 当选择的时间大于当前时间,自动填充为当前时间 + // 设备开始时间 + let start = (new Date(this.modalData.planStartDate) * 1000) / 1000; + if (start < Date.now()) { + this.modalData.planStartDate = this.getStandTime(new Date()); + this.$message({ + message: "时间超出范围!", + type: "warning", + }); + } + // 设备结束时间 + let end = (new Date(this.modalData.planEndDate) * 1000) / 1000; + if (end < Date.now()) { + this.modalData.planEndDate = this.getStandTime(new Date()); + this.$message({ + message: "时间超出范围!", + type: "warning", + }); + } + // 结束时间小于开始时间 + if (start > end) { + this.modalData.planEndDate = this.modalData.planStartDate; + this.$message({ + message: "结束时间小于开始时间!", + type: "warning", + }); + } + }, + // 点击行选中复选框 // 机修人员 operatorClickRow(row){ @@ -1589,12 +1628,6 @@ }) this.fastAddFlag = true; }, - // clickObject1(row){ - // this.objectListRow1 = JSON.parse(JSON.stringify(row)); - // }, - // clickObject2(row){ - // this.objectListRow2 = JSON.parse(JSON.stringify(row)); - // }, // 添加设备 addObject(){ if(this.objectSelections1.length == 0){ @@ -1795,7 +1828,7 @@ return this.exportList; }, startDownload() { - // this.exportData = this.dataList + }, finishDownload() { @@ -1819,7 +1852,7 @@ this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex eamWorkPlanOverviewSearch(this.searchData).then(({data}) => { - if (data.code == 0) { + if (data.code === 0) { this.dataList = data.page.list this.pageIndex = data.page.currPage this.pageSize = data.page.pageSize @@ -1921,7 +1954,7 @@ type: 'warning' }).then(() => { eamWorkPlanDelete(row).then(({data}) => { - if (data && data.code ==0) { + if (data && data.code === 0) { this.getDataList() this.$message({ message: '操作成功', @@ -1940,37 +1973,37 @@ }) }, saveData(){ - if (this.modalData.planDesc == '' || this.modalData.planDesc == null) { + if (this.modalData.planDesc === '' || this.modalData.planDesc == null) { this.$alert('请输入计划描述 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.operator == '' || this.modalData.operator == null) { + if (this.modalData.operator === '' || this.modalData.operator == null) { this.$alert('请选择机修人员 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.checker == '' || this.modalData.checker == null) { + if (this.modalData.checker === '' || this.modalData.checker == null) { this.$alert('请选择审核人员 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.propertiesCode == '' || this.modalData.propertiesCode == null) { + if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) { this.$alert('请选择点检模板!', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.planPeriod == '' || this.modalData.planPeriod == null) { + if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) { this.$alert('选择点检周期!', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.planStartDate == '' || this.modalData.planStartDate == null) { + if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) { this.$alert('请选择开始日期!', '错误', { confirmButtonText: '确定' }) @@ -1982,7 +2015,7 @@ }) return } - if (this.modalData.planEndDate == '' || this.modalData.planEndDate == null) { + if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) { this.$alert('请选择结束日期!', '错误', { confirmButtonText: '确定' }) @@ -2000,8 +2033,8 @@ }) return } - if(this.modalData.flag=='1'){ - if(this.dataListSelections.length == 0){ + if(this.modalData.flag === '1'){ + if(this.dataListSelections.length === 0){ this.$alert('请勾选设备!', '错误', { confirmButtonText: '确定' }) @@ -2295,6 +2328,7 @@ }).catch(() => { }) }, + objectIDBlur(){ let inData={ site:this.$store.state.user.site, @@ -2332,7 +2366,6 @@ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(() => { planOrder(row).then(({data}) => { if (data && data.code === 0) { @@ -2389,10 +2422,8 @@ console.log(this.$route.meta.menuId) userFavoriteList(userFavorite).then(({data}) => { for (let i = 0; i < data.list.length; i++) { - // let flag=false; if(this.$route.meta.menuId==data.list[i].menuId){ this.favorite = true - // flag=true; } } }) @@ -2404,17 +2435,10 @@ functionId: this.$route.meta.menuId, } if (this.favorite) { - // 取消收藏 - // this.$confirm(`确定取消收藏`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - removeUserFavorite(userFavorite).then(({data}) => { - this.$message.success(data.msg) - this.favorite = false - }) - // }) + removeUserFavorite(userFavorite).then(({data}) => { + this.$message.success(data.msg) + this.favorite = false + }) } else { // 收藏 saveUserFavorite(userFavorite).then(({data}) => { diff --git a/src/views/modules/eam/eamWorkPlanForMaintenance.vue b/src/views/modules/eam/eamWorkPlanForMaintenance.vue index 711b2bc..5b09621 100644 --- a/src/views/modules/eam/eamWorkPlanForMaintenance.vue +++ b/src/views/modules/eam/eamWorkPlanForMaintenance.vue @@ -5,15 +5,15 @@
- + - + - + - + - + 查询 - 新增计划 + 新增计划 @@ -118,7 +118,7 @@ - + 维保模板 @@ -169,10 +169,10 @@
- + - + 查询 @@ -265,10 +265,10 @@ - + - + @@ -327,12 +327,12 @@
- + - + - + @@ -345,7 +345,7 @@ - + @@ -377,7 +377,7 @@ label="操作"> @@ -402,7 +402,7 @@ - + @@ -413,13 +413,13 @@ - + - + @@ -430,7 +430,7 @@ - + @@ -439,7 +439,7 @@ - 新增 + 新增 - + @@ -485,12 +485,12 @@
- + - + - + 查询 @@ -523,7 +523,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -538,12 +538,12 @@
- + - + - + 查询 @@ -576,7 +576,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -673,7 +673,7 @@ - +
@@ -1685,7 +1685,6 @@ }) }, - // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { @@ -1695,10 +1694,8 @@ console.log(this.$route.meta.menuId) userFavoriteList(userFavorite).then(({data}) => { for (let i = 0; i < data.list.length; i++) { - // let flag=false; if(this.$route.meta.menuId==data.list[i].menuId){ this.favorite = true - // flag=true; } } }) @@ -1710,17 +1707,10 @@ functionId: this.$route.meta.menuId, } if (this.favorite) { - // 取消收藏 - // this.$confirm(`确定取消收藏`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - removeUserFavorite(userFavorite).then(({data}) => { - this.$message.success(data.msg) - this.favorite = false - }) - // }) + removeUserFavorite(userFavorite).then(({data}) => { + this.$message.success(data.msg) + this.favorite = false + }) } else { // 收藏 saveUserFavorite(userFavorite).then(({data}) => { @@ -1728,7 +1718,6 @@ this.favorite = true }) } - }, // 获取基础数据列表S @@ -1781,7 +1770,7 @@ return this.exportList; }, startDownload() { - // this.exportData = this.dataList + }, finishDownload() { @@ -1797,7 +1786,6 @@ }) json += "}" let s = eval("(" + json + ")") - return s }, // 导出 end @@ -1926,37 +1914,37 @@ }) }, saveData(){ - if (this.modalData.planDesc == '' || this.modalData.planDesc == null) { + if (this.modalData.planDesc === '' || this.modalData.planDesc == null) { this.$alert('请输入计划描述 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.operator == '' || this.modalData.operator == null) { + if (this.modalData.operator === '' || this.modalData.operator == null) { this.$alert('请选择机修人员 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.checker == '' || this.modalData.checker == null) { + if (this.modalData.checker === '' || this.modalData.checker == null) { this.$alert('请选择审核人员 !', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.propertiesCode == '' || this.modalData.propertiesCode == null) { + if (this.modalData.propertiesCode === '' || this.modalData.propertiesCode == null) { this.$alert('请选择维保模板!', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.planPeriod == '' || this.modalData.planPeriod == null) { + if (this.modalData.planPeriod === '' || this.modalData.planPeriod == null) { this.$alert('选择维保周期!', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.planStartDate == '' || this.modalData.planStartDate == null) { + if (this.modalData.planStartDate === '' || this.modalData.planStartDate == null) { this.$alert('请选择开始日期!', '错误', { confirmButtonText: '确定' }) @@ -1968,7 +1956,7 @@ }) return } - if (this.modalData.planEndDate == '' || this.modalData.planEndDate == null) { + if (this.modalData.planEndDate === '' || this.modalData.planEndDate == null) { this.$alert('请选择结束日期!', '错误', { confirmButtonText: '确定' }) @@ -1986,8 +1974,8 @@ }) return } - if(this.modalData.flag=='1'){ - if(this.dataListSelections.length==0){ + if(this.modalData.flag === '1'){ + if(this.dataListSelections.length === 0){ this.$alert('请勾选设备!', '错误', { confirmButtonText: '确定' }) diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue index eb18321..4306909 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue @@ -131,7 +131,7 @@ type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' - placeholder="开始日期" + placeholder="开始时间" @change="handleChangeTime" > @@ -143,7 +143,7 @@ type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' - placeholder="结束日期" + placeholder="结束时间" @change="handleChangeTime" > @@ -776,6 +776,7 @@ } }, + // 点击行选中复选框 operatorClickRow(row){ this.$refs.operatorTable.toggleRowSelection(row); @@ -804,7 +805,7 @@ }, // 确认多选机修人员 confirmOperator(){ - if(this.dataListSelections2.length == 0){ + if(this.dataListSelections2.length === 0){ this.$alert('请勾选人员!', '错误', { confirmButtonText: '确定' }) @@ -955,25 +956,25 @@ this.detailModelFlag = true; }, saveCheckReport(){ - if(this.saveData.defectID == '' || this.saveData.defectID == null){ + if(this.saveData.defectID === '' || this.saveData.defectID == null){ this.$alert('请选择故障编码!', '错误', { confirmButtonText: '确定' }) return false } - if(this.saveData.startDate == '' || this.saveData.startDate == null){ + if(this.saveData.startDate === '' || this.saveData.startDate == null){ this.$alert('请输入开始时间!', '错误', { confirmButtonText: '确定' }) return false } - if(this.saveData.endDate == '' || this.saveData.endDate == null){ + if(this.saveData.endDate === '' || this.saveData.endDate == null){ this.$alert('请输入结束时间!', '错误', { confirmButtonText: '确定' }) return false } - if(this.saveData.workTime == 0){ + if(this.saveData.workTime === 0){ this.$alert('工作时长不能为0!', '错误', { confirmButtonText: '确定' }) @@ -985,19 +986,19 @@ }) return false } - if(this.saveData.result==''||this.saveData.result==null){ + if(this.saveData.result === '' || this.saveData.result == null){ this.$alert('请选择维修结果!', '错误', { confirmButtonText: '确定' }) return false } - if(this.saveData.result == '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures == '')){ + if(this.saveData.result === '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')){ this.$alert('请选择处置措施!', '错误', { confirmButtonText: '确定' }) return false } - if(this.saveData.operator == null || this.saveData.operator == ''){ + if(this.saveData.operator == null || this.saveData.operator === ''){ this.$alert('请选择维修人员!', '错误', { confirmButtonText: '确定' }) @@ -1011,7 +1012,7 @@ // return false // }else { saveOrderReportForDefect(this.saveData).then(({data}) => { - if (data && data.code == '0') { + if (data && data.code === 0) { this.getDataList() this.detailModelFlag = false this.$message({ diff --git a/src/views/modules/reportWorkOrder/report_image_upload.vue b/src/views/modules/reportWorkOrder/report_image_upload.vue index 2c83acb..e4995c8 100644 --- a/src/views/modules/reportWorkOrder/report_image_upload.vue +++ b/src/views/modules/reportWorkOrder/report_image_upload.vue @@ -1,6 +1,6 @@