维修人员:
@@ -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