From 262465ab29e1c4a0af645c85cabe0599679076e9 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 11 Aug 2022 22:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BE=E5=8D=95=20=E6=9F=A5=E7=9C=8B=20?= =?UTF-8?q?=E6=B4=BE=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- order/order/orderInfo/orderInfo.vue | 295 +++++++++++++++++++++------- order/order/orderList/orderList.vue | 184 ++++++++--------- 2 files changed, 321 insertions(+), 158 deletions(-) diff --git a/order/order/orderInfo/orderInfo.vue b/order/order/orderInfo/orderInfo.vue index 07f227f..b76f6d6 100644 --- a/order/order/orderInfo/orderInfo.vue +++ b/order/order/orderInfo/orderInfo.vue @@ -4,17 +4,17 @@ - - + + - 所属片区: + 接收日期: - {{lists.arealName}} + {{tableList.worksheet_info.accept_date}} @@ -22,39 +22,39 @@ 来源: - {{lists.accept_date}} + {{tableList.worksheet_info.from_detail?tableList.worksheet_info.from_detail.value:""}} - 来源编号: + 所属片区: - {{lists.fromName}} + {{tableList.worksheet_info.area?tableList.worksheet_info.area.name:""}} - - 要求完成时间: + + 处理时限: - - {{lists.time}} + + {{tableList.worksheet_info.deal_detail?tableList.worksheet_info.deal_detail.value:""}} - 工作内容: + 地址: - {{lists.content}} + {{tableList.worksheet_info.address}} - 地址: + 内容: - {{lists.address}} + {{tableList.worksheet_info.content}} @@ -63,7 +63,7 @@ 投诉人姓名: - {{lists.people}} + {{tableList.worksheet_info.complain_name}} @@ -71,15 +71,201 @@ 投诉人电话: - {{lists.phone}} + {{tableList.worksheet_info.complain_mobile}} + + + + + 现场图片: + + + + + + + + 是否转派: - + + {{tableList.worksheet_info.is_change==0?"否":"是"}} + + + + + 要求完成时间: + + + {{tableList.worksheet_info.end_time}} + + + + + 备注: + + + {{tableList.worksheet_info.remark}} + + + + - + + + + + + + + + + 所属道路: + + + {{rainEquipmentInfo.road?rainEquipmentInfo.road.name:""}} + + + + + 巡查内容: + + + {{rainEquipmentInfo.ask_content_detail?rainEquipmentInfo.ask_content_detail.value:""}} + + + + + 覆盖范围: + + + {{rainEquipmentInfo.scope}}米 + + + + + 所在点位: + + + {{rainEquipmentInfo.point_name}} + + + + + 所在位置: + + + {{rainEquipmentInfo.address}} + + + + + 经度: + + + {{rainEquipmentInfo.longitude}} + + + + + + 纬度: + + + {{rainEquipmentInfo.latitude}} + + + + + 描述: + + + {{rainEquipmentInfo.content}} + + + + + 现场照片: + + + + + + + + 是否异常: + + + {{rainEquipmentInfo.is_unusual==0?"否":(rainEquipmentInfo.is_unusual==0?"丢失":"破损")}} + + + + + 异常处置建议: + + + {{rainEquipmentInfo.tip}} + + + + + 是否现场处理: + + + {{rainEquipmentInfo.is_scene==0?"否":"是"}} + + + + + 现场处理结果: + + + {{rainEquipmentInfo.result}} + + + + + 处理后照片: + + + + + + + + 转办类型: + + + {{tableList.rain_inspection_info.end_type==0?"无":(tableList.rain_inspection_info.end_type==1?"养护转办":"违法转办")}} + + + + + 要求完成时间: + + + {{tableList.rain_inspection_info.end_time}} + + + + + 备注: + + + {{tableList.rain_inspection_info.remark}} + + + + + + + + + + + @@ -94,9 +280,13 @@ return { lists:{}, filesList:[], - dealFilesList:[], - depList:[] - + dealFilesList:[], + tableList:{ + rain_inspection_info:{}, + worksheet_info:{} + }, + rainEquipmentInfo:{}, + isShowGd:false, } }, @@ -106,7 +296,6 @@ if(options.id){ this.loadInfo(options.id) } - this.loadDep() }, methods: { imgListPreview(item){ @@ -119,39 +308,8 @@ }) }, - loadDep(){ - var that = this - that.util.request({ - api: '/api/mobile/other/department-list', - method: "get", - data: { - is_tree:0 - }, - utilSuccess: function(res) { - that.depList = res - }, - utilFail: function(res) { - that.util.alert(res); - } - }); - }, loadInfo: function(id) { - var that = this; - that.lists={ - accept_date:"12345", - fromName:"来源编号", - content:"内容", - arealName:"沧浪", - time:"2022-08-08 09:56:12", - admin_id:"admin", - address:"suzhou", - created_at:"2022-08-08 09:56:12", - people:"某某", - mobile:"1891207" - - - } - return; + var that = this; this.util.request({ method:"get", api: '/api/mobile/mobile-worksheet/show', @@ -161,18 +319,21 @@ }, utilSuccess: function(r) { - - that.lists = r - that.filesList = r.worksheet_files - that.dealFilesList = r.worksheet_end_files - for(var m of that.depList){ - if(r.feedback_department_id==m.id){ - that.lists.depName = m.name - } - } - - that.lists.is_rain_name = r.is_rain==0 ? "否" : "是" - that.lists.is_scene_name = r.is_scene==0?"否":"是" + that.lists = r + for(var m in that.tableList){ + that.tableList[m] = {} + if(that.lists[m]){ + that.tableList[m] = that.lists[m] + if(m=='worksheet_info'){ + that.isShowGd = true + }else{ + that.rainEquipmentInfo = Object.assign(that.rainEquipmentInfo, that.lists[m].rain_equipment_info) + that.isShowGd = false + } + } + } + console.log(that.tableList) + }, utilFail: function(res) { diff --git a/order/order/orderList/orderList.vue b/order/order/orderList/orderList.vue index c8e1517..9d9cf5a 100644 --- a/order/order/orderList/orderList.vue +++ b/order/order/orderList/orderList.vue @@ -24,29 +24,37 @@ - + + + + 转办来源: + + + {{item.name}} + + 所属片区: - {{item.arealName}} + {{item.areaName}} - - - 来源: - - - {{item.accept_date}} - + + + 工作内容: + + + {{item.content}} + - 来源编号: + 地址: - - {{item.fromName}} + + {{item.address}} @@ -54,48 +62,43 @@ 要求完成时间: - {{item.time}} + {{item.end_time}} - 工作内容: + 提交人: - - {{item.content}} + + {{item.adminName}} - - - - 地址: - - - {{item.address}} - - + + + + - + 查看 - + 签收 - + 去巡查 - + 去养护 - + 确认完成 @@ -158,7 +161,12 @@ },{ id:1, value:'已处理' - }] + }], + tableList:{ + rain_inspection_info:{}, + worksheet_info:{} + }, + rainEquipmentInfo:{}, } }, @@ -178,27 +186,10 @@ onShow: function() { var that = this; }, - onLoad(options) { - this.loadDep() + onLoad(options) { + this.loadPage(1); }, methods: { - loadDep(){ - var that = this - that.util.request({ - api: '/api/mobile/other/department-list', - method: "get", - data: { - is_tree:0 - }, - utilSuccess: function(res) { - that.depList = res - that.loadPage(1); - }, - utilFail: function(res) { - that.util.alert(res); - } - }); - }, tosearch() { @@ -217,15 +208,27 @@ content: '是否确定签收?', success(res) { if(res.confirm){ - uni.showToast({ - icon: "none", - title: "签收成功", - complete() { - that.dataList[0].status = 1 - that.dataList[0].statusName="已签收" + that.util.request({ + api: "/api/mobile/mobile-worksheet/save", + method: "POST", + data: { + id:id, + accept_status:1 }, - duration: 2000 - }) + utilSuccess: function(res) { + uni.showToast({ + icon: "none", + title: "签收成功", + complete() { + that.loadPage(1) + }, + duration: 2000 + }) + }, + utilFail: function(res) { + that.util.alert(res); + } + }); }else if(res.cancel){ } @@ -236,18 +239,30 @@ var that = this uni.showModal({ title: '提示', - content: '是否确定完成?', + content: '是否确定已完成?', success(res) { if(res.confirm){ - uni.showToast({ - icon: "none", - title: "工单已完成", - complete() { - that.dataList[0].status = 3 - that.dataList[0].statusName="已结束" + that.util.request({ + api: "/api/mobile/mobile-worksheet/save", + method: "POST", + data: { + id:id, + accept_status:2 }, - duration: 2000 - }) + utilSuccess: function(res) { + uni.showToast({ + icon: "none", + title: "确认成功", + complete() { + that.loadPage(1) + }, + duration: 2000 + }) + }, + utilFail: function(res) { + that.util.alert(res); + } + }); }else if(res.cancel){ } @@ -270,20 +285,7 @@ }, loadPage: function(page) { uni.hideKeyboard() - var that = this; - that.dataList = [{ - status:0, - accept_date:"12345", - fromName:"来源编号", - content:"内容", - arealName:"沧浪", - time:"2022-08-08 09:56:12", - admin_id:"admin", - address:"suzhou", - statusName:"已派发", - created_at:"2022-08-08 09:56:12" - }] - return + var that = this; this.util.request({ bindThis: that, api: '/api/mobile/mobile-worksheet/index', @@ -319,19 +321,19 @@ } for (var m of dataList) { m.created_at = m.created_at.split("T")[0] - for(var k of that.statusList){ - if(m.status==k.id){ - m.statusName = k.value - } - } - for(var l of that.depList){ - if(m.feedback_department_id==l.id){ - m.feedbackName = l.name - } + for(var k in that.tableList){ + if(m[k]){ + m.areaName = m[k].area ? m[k].area.name : (m[k].area_info?m[k].area_info.name:"") + m.adminName = m.admin?m.admin.name:"" + m.address = m[k].address + m.end_time =m[k].end_time + m.content = m[k].content + m.statusName = m.accept_status==0?"待签收":(m.accept_status==1?"已签收":"已完成") + } } } - + console.log(that.dataList) that.currentPage = page; that.dataList = dataList; },