From b269ddc4b9f015265386519233854162d30aaa73 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Sun, 26 Apr 2020 20:56:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=B4=E4=BF=AE=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constant/UrlConstant.js | 6 +++-- pages/repairOrder/repairOrder.vue | 43 +++++++++++++++---------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/constant/UrlConstant.js b/constant/UrlConstant.js index 1ead9fa..cd88994 100644 --- a/constant/UrlConstant.js +++ b/constant/UrlConstant.js @@ -14,9 +14,9 @@ const GetNoticeListUrl = baseUrl + 'app/api.queryNotices'; //报修接口 const listMyEnteredCommunitys = baseUrl + 'app/community.listMyEnteredCommunitys'; //查看员工小区 -const listOwnerRepairs = baseUrl + 'app/ownerRepair.listOwnerRepairs'; //维修 +const listOwnerRepairs = baseUrl + 'app/ownerRepair.listOwnerRepairs'; //查看报修 -const saveOwnerRepair = baseUrl + 'app/ownerRepair.saveOwnerRepair'; //查看报修 +const saveOwnerRepair = baseUrl + 'app/ownerRepair.saveOwnerRepair'; //维修 const queryStaffInfos = baseUrl + 'app/query.staff.infos'; //查询员工信息 @@ -57,6 +57,8 @@ const listCommunitys = baseUrl + "app/community.listCommunitys"; //查询小区 const listActivitiess = baseUrl + "app/activities.listActivitiess"; //查询小区广告 const listAdvertPhoto = baseUrl + "app/advert.listAdvertPhoto"; + + module.exports = { baseUrl: baseUrl, hcBaseUrl: hcBaseUrl, diff --git a/pages/repairOrder/repairOrder.vue b/pages/repairOrder/repairOrder.vue index ba13595..d2d1fe1 100644 --- a/pages/repairOrder/repairOrder.vue +++ b/pages/repairOrder/repairOrder.vue @@ -18,14 +18,14 @@ - {{item.complaintId}} + {{item.repairId}} - {{item.complaintName}} + {{item.repairName}} - {{item.createTime}} + {{item.appointmentTime}} @@ -68,9 +68,9 @@
报修类型 - + - {{typeCdIndex>-1?typeCds[typeCdIndex]:'请选择'}} + {{typeName?typeName:'请选择'}} @@ -157,7 +157,9 @@ roomId: '', roomNum: '', typeCd: '', - typeCds: ['卧室报修', '管道报修','客厅报修'], + typeCds: ['卧室报修', '管道报修', '客厅报修'], + repairIdAttr:['10001','10002','10003'], + typeName:'请选择', typeCdIndex: -1, context:'', repairName:'', @@ -209,7 +211,7 @@ communityId:_that.java110Context.getCurrentCommunity().communityId }; this.java110Context.request({ - url: _that.java110Constant.url.listComplaints, + url: _that.java110Constant.url.listOwnerRepairs, header: _that.java110Context.getHeaders(), method: "GET", data: _objData, //动态数据 @@ -223,13 +225,13 @@ return; } let _data = res.data; - _that.myOrders = _data.complaints; + _that.myRepairOrders = _data.ownerRepairs; - _data.complaints.forEach(function(item){ - let dateStr = item.createTime; + _data.ownerRepairs.forEach(function(item){ + let dateStr = item.appointmentTime; console.log(dateStr); let _date=new Date(dateStr); - item.createTime = (_date.getMonth()+1) +'-'+_date.getDate(); + item.appointmentTime = (_date.getMonth()+1) +'-'+_date.getDate(); }); }, fail: function(e) { @@ -303,13 +305,10 @@ "&floorId=" + this.floorId + "&floorNum=" + this.floorNum + "&unitId=" + this.unitId + "&unitNum=" + this.unitNum }); }, - _changeResult: function(e) { - this.typeCdIndex = e.detail.value; - console.log(e, this.typeCdIndex); - }, + repairChange: function(e) { - this.typeName = this.columns[e.detail.value]; - this.typeId = this.repairIdAttr[e.detail.value]; + this.typeName = this.typeCds[e.detail.value]; + this.typeCd = this.repairIdAttr[e.detail.value]; }, dateChange:function(e){ this.bindDate = e.detail.value; @@ -331,7 +330,7 @@ "photos": [], "context": this.context, "userId": _userInfo.userId, - "communityId": this.communityId, + "communityId": _that.java110Context.getCurrentCommunity().communityId, "bindDate": this.bindDate, "bindTime": this.bindTime } @@ -357,7 +356,7 @@ } else if (obj.bindTime == "") { msg = "请选择预约时间"; } else if (obj.context == "") { - msg = "请填写投诉内容"; + msg = "请填写报修内容"; } console.log(obj.roomId); @@ -368,9 +367,9 @@ duration: 2000 }); } else { - context.request({ - url: constant.url.saveOwnerRepair, // http://hc.demo.winqi.cn:8012/appApi/ownerRepair.saveOwnerRepair - header: context.getHeaders(), + this.java110Context.request({ + url: this.java110Constant.url.saveOwnerRepair, // http://hc.demo.winqi.cn:8012/appApi/ownerRepair.saveOwnerRepair + header: this.java110Context.getHeaders(), method: "POST", data: obj, //动态数据 success: function(res) {