From 5c2489a7c711b8cb92fb89685191bc4119252b54 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Fri, 24 Nov 2023 07:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=20=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/faultReport/index.vue | 148 +++++++++++++---- src/views/device/repairOrder/index.vue | 80 ++++++++- .../repairOrder/selectSparePartsLedger.vue | 7 - src/views/device/repairOrderReport/index.vue | 156 ++++++++++++++---- 4 files changed, 308 insertions(+), 83 deletions(-) diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index a19ba46..d8fa578 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -312,11 +312,12 @@ - + + + + @@ -610,8 +631,9 @@ @@ -663,13 +685,9 @@ :column="1" border :contentStyle="CS" - :label-style="LSP2" + :label-style="LSP" > - + + + + + {{ + form.orderStatus + }} {{ form.repairDestination }} @@ -935,8 +978,9 @@ @@ -1009,6 +1053,26 @@ + + + @@ -1046,6 +1110,7 @@ export default { }, LS: { "text-align": "center", + width: "110px", }, LSP: { "text-align": "center", @@ -1270,7 +1335,9 @@ export default { // 表单重置 reset() { this.form = { - fileList: "", + //报修图片 + fileList: null, + // orderId: null, orderCode: null, equipmentCode: null, @@ -1354,27 +1421,28 @@ export default { const orderId = row.orderId || this.ids; getFaultReport(orderId).then((response) => { this.form = response.data; + //报修故障照片上传 if (response.data.files != null) { var newFiles = []; - console.log("1", response.data.files); response.data.files.forEach((item) => { var newFile = {}; - console.log("2", response.data.files); newFile.name = item.fileName; newFile.url = item.fileAddress; newFiles.push(newFile); }); this.form.fileList = newFiles; - + //报修故障照片 + this.urlLists = null; var urlLists = []; this.form.fileList.forEach((item) => { urlLists.push(item.url); }); this.urlLists = urlLists; - console.log("2222222222", this.urlLists); } else if (response.data.files == null) { this.urlLists = null; } + + //检查项 this.checkList = null; this.checkList = response.data.checkList; if (this.checkList != null) { @@ -1394,20 +1462,21 @@ export default { standard.detailReach = item.detailReach; standard.actualValue = item.actualValue; standard.standardType = item.standardType; - + //检查项图片 var standardUrlLists = []; - item.picturePaths.forEach((item2) => { - standardUrlLists.push(item2.fileAddress); - }); - standard.standardUrlLists = standardUrlLists; - - standards.push(standard); + if (item.picturePaths != null) { + item.picturePaths.forEach((item2) => { + standardUrlLists.push(item2.fileAddress); + }); + standard.standardUrlLists = standardUrlLists; + standards.push(standard); + } }); } }); this.checkList = standards; - console.log("1111111111", this.checkList); + console.log(this.checkList); } this.openView = true; @@ -1424,6 +1493,7 @@ export default { }); getFaultReport(orderId).then((response) => { this.form = response.data; + //报修故障照片上传 if (response.data.files != null) { var newFiles = []; response.data.files.forEach((item) => { @@ -1433,16 +1503,18 @@ export default { newFiles.push(newFile); }); this.form.fileList = newFiles; - + //报修故障照片 + this.urlLists = null; var urlLists = []; this.form.fileList.forEach((item) => { urlLists.push(item.url); }); this.urlLists = urlLists; - console.log("2222222222", this.urlLists); } else if (response.data.files == null) { this.urlLists = null; } + + //检查项 this.checkList = null; this.checkList = response.data.checkList; if (this.checkList != null) { @@ -1462,20 +1534,21 @@ export default { standard.detailReach = item.detailReach; standard.actualValue = item.actualValue; standard.standardType = item.standardType; - + //检查项图片 var standardUrlLists = []; - item.picturePaths.forEach((item2) => { - standardUrlLists.push(item2.fileAddress); - }); - standard.standardUrlLists = standardUrlLists; - - standards.push(standard); + if (item.picturePaths != null) { + item.picturePaths.forEach((item2) => { + standardUrlLists.push(item2.fileAddress); + }); + standard.standardUrlLists = standardUrlLists; + standards.push(standard); + } }); } }); this.checkList = standards; - console.log("1111111111", this.checkList); + console.log(this.checkList); } if ( @@ -1570,3 +1643,10 @@ export default { }, }; + + diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue index 2c15fc2..2e4a485 100644 --- a/src/views/device/repairOrder/index.vue +++ b/src/views/device/repairOrder/index.vue @@ -751,7 +751,7 @@ append-to-body > - + {{ form.equipmentCode }} @@ -794,13 +794,14 @@ - + {{ form.workCode }} @@ -863,7 +864,7 @@ }} - + - + - + @@ -935,6 +936,27 @@ + + + + @@ -1096,6 +1118,28 @@ export default { dicts: ["device_repair_status"], data() { return { + //委外表格格式 + WCS: { + "text-align": "center", + }, + WLS: { + "text-align": "center", + width: "200px", + }, + CS: { + "text-align": "center", + }, + LS: { + "text-align": "center", + width: "200px", + }, + //图片表格样式 + LSP: { + "text-align": "center", + width: "200px", + }, + //检查项表格数据 + detailList: [], //维修前照片 urlBeforeLists: [], //维修后照片 @@ -1448,9 +1492,9 @@ export default { var standards = []; this.detailList.forEach((item1) => { //检查项名字 + if (item1 != null) { item1.standardList.forEach((item) => { var standard = {}; - standard.id = item.id; standard.itemName = item1.itemName; standard.itemMethod = item1.itemMethod; standard.standardName = item.standardName; @@ -1459,10 +1503,23 @@ export default { standard.detailUnit = item.detailUnit; standard.detailReach = item.detailReach; standard.actualValue = item.actualValue; + //实际值 + standard.repairValue = item.repairValue; + standard.repairReach = item.repairReach; standard.standardType = item.standardType; - standards.push(standard); - }); + //检查项图片 + var standardUrlLists = []; + if (item.picturePaths != null) { + item.picturePaths.forEach((item2) => { + standardUrlLists.push(item2.fileAddress); + }); + standard.standardUrlLists = standardUrlLists; + standards.push(standard); + } + }); + } }); + this.detailList = standards; console.log("111111111111", this.detailList); } @@ -1605,6 +1662,11 @@ export default { .step-body { margin-top: 30px; } + +.standardUrl_body { + height: 400px; + overflow-y: auto; +} diff --git a/src/views/device/repairOrder/selectSparePartsLedger.vue b/src/views/device/repairOrder/selectSparePartsLedger.vue index 22712d0..7acffbf 100644 --- a/src/views/device/repairOrder/selectSparePartsLedger.vue +++ b/src/views/device/repairOrder/selectSparePartsLedger.vue @@ -55,13 +55,6 @@ > - - - - 导出 - @@ -346,13 +342,13 @@ - + {{ form.orderCode }} @@ -394,7 +390,7 @@ }} - + - + {{ form.workCode }} @@ -469,7 +465,7 @@ form.workReason }} - + + - + - + + + - + + - + + - + + + + @@ -497,9 +530,28 @@ - - + + + + @@ -527,6 +579,16 @@ export default { dicts: ["device_repair_status"], data() { return { + //表格样式 + CS: { + "text-align": "center", + }, + LS: { + "text-align": "center", + width: "200px", + }, + //检查项表格数据 + detailList: [], //维修前照片 urlBeforeLists: [], //维修后照片 @@ -554,6 +616,7 @@ export default { openView: false, // 查询参数 queryParams: { + workStatus:"1", pageNum: 1, pageSize: 10, orderId: null, @@ -759,25 +822,45 @@ export default { this.urlAfterLists = urlAfterLists; } + //重置 + this.detailList = null; this.detailList = response.data.detailList; - //检查项遍历 - var standards = []; - this.detailList.forEach((item1) => { - //检查项名字 - item1.standardList.forEach((item) => { - var standard = {}; - standard.itemName = item1.itemName; - standard.standardName = item.standardName; - standard.detailUpLimit = item.detailUpLimit; - standard.detailDownLimit = item.detailDownLimit; - standard.detailUnit = item.detailUnit; - standard.detailReach = item.detailReach; - standard.actualValue = item.actualValue; - standard.standardType = item.standardType; - standards.push(standard); + if (this.detailList != null) { + //检查项遍历 + var standards = []; + this.detailList.forEach((item1) => { + //检查项名字 + if (item1 != null) { + item1.standardList.forEach((item) => { + var standard = {}; + standard.itemName = item1.itemName; + standard.itemMethod = item1.itemMethod; + standard.standardName = item.standardName; + standard.detailUpLimit = item.detailUpLimit; + standard.detailDownLimit = item.detailDownLimit; + standard.detailUnit = item.detailUnit; + standard.detailReach = item.detailReach; + standard.actualValue = item.actualValue; + //实际值 + standard.repairValue = item.repairValue; + standard.repairReach = item.repairReach; + standard.standardType = item.standardType; + //检查项图片 + var standardUrlLists = []; + if (item.picturePaths != null) { + item.picturePaths.forEach((item2) => { + standardUrlLists.push(item2.fileAddress); + }); + standard.standardUrlLists = standardUrlLists; + standards.push(standard); + } + }); + } }); - }); - this.detailList = standards; + + this.detailList = standards; + console.log("111111111111", this.detailList); + } //展示 this.loading = false; @@ -800,3 +883,10 @@ export default { }; + +