From 6c95b8e2c3d69d7a36d4f94ba486fd3a50aeddb1 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Fri, 22 Nov 2024 10:18:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AF=95=E5=90=8E=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/repair/repair.js | 7 + .../repair/repairManage/component/home.vue | 313 +++++++++--- .../material/repair/testedInBound/index.vue | 465 ++++++++++++++++++ 3 files changed, 718 insertions(+), 67 deletions(-) create mode 100644 src/views/material/repair/testedInBound/index.vue diff --git a/src/api/repair/repair.js b/src/api/repair/repair.js index 6156b27a..6a773ab3 100644 --- a/src/api/repair/repair.js +++ b/src/api/repair/repair.js @@ -73,3 +73,10 @@ export function auditPass(data) { }) } +//获取维修任务单信息 +export function getRepairInfo(taskId) { + return request({ + url: '/material/repair/getRepairTicketInfo/?taskId=' + taskId, + method: 'get', + }) +} \ No newline at end of file diff --git a/src/views/material/repair/repairManage/component/home.vue b/src/views/material/repair/repairManage/component/home.vue index 6ec3ef6e..8f435ae3 100644 --- a/src/views/material/repair/repairManage/component/home.vue +++ b/src/views/material/repair/repairManage/component/home.vue @@ -141,6 +141,7 @@ " > 日期: + {{ repairTicketlLevelOne.createTime }}
单号: + {{ repairTicketlLevelOne.repairCode }}
承修单位: + {{ repairTicketlLevelOne.backUnit }}
操作人: + {{ repairTicketlLevelOne.repairer }}
项目名称: + {{ repairTicketlLevelOne.backPro }}
委托单位: + {{ repairTicketlLevelOne.backUnit }}
-
+
验收人:
- - - + + + + + - - - - + + + + + + + + +
总计
-
报修数量
-
修复数量
-
报废数量
-
维修费小计
+
+ {{ repairNum1 }} +
+
+ {{ repairNum2 }} +
+
+ {{ repairNum3 }} +
+
+ {{ "¥"+" "+repairNum4 }} +
+
+
- - - - + + + + + +
-
合计
-
合计金额
+
合计
+
+ {{ "¥"+" "+acountAll }} +
-
-
报废图片
-
试验记录
-
- -
+
负责人: @@ -296,19 +313,13 @@
完成日期: + {{ repairTicketlLevelOne.finishTime }}
-
+
维修人员: @@ -334,6 +345,77 @@ 打 印 关 闭
+ + + + +
+ +
+ 维修任务单编号明细 +
+ + + + + + + + + +
+
+ +
+ + + +
+
+ +
+
+ +
+
+ +
+
+
@@ -344,6 +426,7 @@ import { getRepairTaskList, rejectRepair, sendList, + getRepairInfo, } from '@/api/repair/repair.js' import { getInfo, h } from '@/api/login' @@ -398,6 +481,32 @@ export default { //选择的taskId数组 ids:[], taskList:[], + //维修任务单上部分数据 + repairTicketlLevelOne:{}, + //中间维修设备 + repairTicketDevice:[], + //下方维修内容 + repairTicketPart:[], + //报修数量计和 + repairNum1:0, + //修复数量计和 + repairNum2:0, + //报废数量计和 + repairNum3:0, + //维修费小计计和 + repairNum4:0, + //维修任务单详见附件 + showView:false, + //维修任务单详见附件标题 + titleView:'', + //维修任务单详见附件列表 + getListViewInfo:[], + //维修内容列表合计金额 + acountAll:0, + //多图片查看弹窗 + dialogImageUrls: [], + dialogVisibles: false, + imgIndex:0, } }, created() { @@ -444,12 +553,6 @@ export default { this.$refs.queryForm.resetFields() this.handleQuery() }, - // // 多选框选中数据 - // handleSelectionChange(selection) { - // this.ids = selection.map((item) => item.taskId) - // this.single = selection.length != 1 - // this.multiple = !selection.length - // }, /** 新增按钮操作 */ handleAdd() { this.$emit('handelAdd') @@ -486,7 +589,38 @@ export default { ) }, //查看维修任务单 - handlePrint(row) { + async handlePrint(row) { + const res = await getRepairInfo(row.taskId); + this.repairTicketlLevelOne = res.data.repairTaskInfo; + this.repairTicketDevice = res.data.repairDeviceArray; + //维修设备列表计算 + if(this.repairTicketDevice.length>0){ + let num1 = 0; //报废数量 + let num2 = 0; //修复数量 + let num3 = 0; //报废数量 + let num4 = 0.0; //维修费小计 + this.repairTicketDevice.forEach(item=>{ + num1 = num1 + Number(item.repairNum) + num2 = num2 + Number(item.repairedNum) + num3 = num3 + Number(item.scrapNum) + num4 = num4 + item.totalCost + }) + this.repairNum1 = num1 + this.repairNum2 = num2 + this.repairNum3 = num3 + this.repairNum4 = num4 + } + + //维修内容列表计算 + this.repairTicketPart = res.data.repairPartArray; + if(this.repairTicketPart.length>0){ + let acount = 0.0 //维修费用 + this.repairTicketPart.forEach(item=>{ + acount = acount + item.partCost + }) + this.acountAll = acount; + } + this.openPrint = true; this.title = "机具设备维修任务单"; }, @@ -510,15 +644,45 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { - this.taskList = []; - this.ids = selection.map((item) => item.taskId); - selection.forEach((item) => { - this.taskList.push({ taskId: item.taskId }); - }); - this.single = selection.length != 1; - this.multiple = !selection.length; + this.taskList = []; + this.ids = selection.map((item) => item.taskId); + selection.forEach((item) => { + this.taskList.push({ taskId: item.taskId }); + }); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + + //维修任务单打印 + print() { + this.$refs.remarksPrintRef.print(); }, - }, + + //详见附件打印 + printView() { + this.$refs.remarksPrintRefView.print(); + }, + + handleView(row){ + this.getListViewInfo = row.repairDeviceList + console.log('this.getListViewInfo',this.getListViewInfo) + this.titleView = "查看" + this.showView = true; + }, + + //多图片查看 + picturesPreview(row) { + this.dialogImageUrls = []; + row.fileList.forEach(item => { + this.dialogImageUrls.push({ + name: item.name, + url: item.url + }) + }); + this.imgIndex=0 + this.dialogVisibles = true; + }, + }, } \ No newline at end of file