From 46eff879a8485181d94f8b8e3a21e517d8a4a6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=83=E6=B0=94=E6=BB=A1=E6=BB=A1=28jgy=29?= Date: Thu, 9 Jan 2025 17:11:19 +0800 Subject: [PATCH] =?UTF-8?q?2024-01-09=20=E8=AE=BE=E5=A4=87-=E6=8A=A5?= =?UTF-8?q?=E4=BF=AE=E5=AE=A1=E6=A0=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/faultReport/index.vue | 178 ++++++++++++++++++------- 1 file changed, 131 insertions(+), 47 deletions(-) diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index 17c571b..11dcd38 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -228,10 +228,7 @@ fixed > - + - + - 计划性维修 - 立即维修 + 计划性维修 + 立即维修 不维修 委外维修 - + @@ -539,7 +539,9 @@ - + @@ -617,11 +619,19 @@ - + - + - + @@ -947,11 +963,43 @@ > - + + + + + + + + + + + + + + + { - this.form = response.data; - if (response.data.files != null) { - var newFiles = []; - response.data.files.forEach((item) => { - var newFile = {}; - newFile.name = item.fileName; - newFile.url = item.fileAddress; - newFiles.push(newFile); - }); - this.form.fileList = newFiles; - } + const orderStatus = row.orderStatus; + const orderSource = row.orderSource; + if (orderStatus === "1" || orderStatus === "0") { + Message.warning("该报修单已经审核过,不可修改!"); + } else if (orderSource === "点检" || orderSource === "巡检") { + Message.warning("点检、巡检报修信息自动生成,不可修改!"); + } else { + getFaultReport(orderId).then((response) => { + this.form = response.data; + if (response.data.files != null) { + var newFiles = []; + response.data.files.forEach((item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + }); + this.form.fileList = newFiles; + } + }); - if ( - this.form.orderSource == "点检" || - this.form.orderSource == "巡检" - ) { - Message.warning("点检、巡检报修信息自动生成,不可修改!"); - } else { - this.open = true; - this.title = "修改故障报修"; - } - }); + this.open = true; + this.openUpdate = true; + this.openAdd = false; + this.title = "修改故障报修"; + } + + // if ( + // this.form.orderSource == "点检" || + // this.form.orderSource == "巡检" + // ) { + // Message.warning("点检、巡检报修信息自动生成,不可修改!"); + // } else { + // this.open = true; + // this.title = "修改故障报修"; + // } + + // if (this.form.orderStatus != "2" ) { + // Message.warning("该报修单已经审核过,不可修改!"); + // } else { + // this.open = true; + // this.title = "修改故障报修"; + // } }, + /** 查看按钮操作 */ handleView(row) { this.reset(); @@ -1781,7 +1861,11 @@ export default { if (valid) { if (this.form.orderId != null) { checkFaultReport(this.form).then((response) => { - this.$modal.msgSuccess("审核成功"); + if(response.code == 200){ + this.$modal.msgSuccess("审核成功"); + }else{ + Message.warning(response.msg); + } this.openCheck = false; this.getList(); });