完成投诉处理功能

This commit is contained in:
java110 2020-07-27 16:48:08 +08:00
parent 76d93e6f51
commit ba8f17f2e7
5 changed files with 134 additions and 24 deletions

View File

@ -46,4 +46,29 @@ export function auditComplaint(_that,_data){
}
})
});
}
/**
* 查询投诉待办
* @param {Object} _that 上下文对象
* @param {Object} _data 请求报文
*/
export function loadCompaintFinish(_that,_data){
return new Promise(function(reslove,reject){
_that.context.get({
url: url.listAuditHistoryComplaints,
data:_data,
success: function(res) {
reslove(res);
},
fail: function(e) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
})
}
})
});
}

View File

@ -208,9 +208,9 @@
}
}
,{
"path" : "pages/complaintDispatch/complaintDispatch",
"path" : "pages/complaintFinish/complaintFinish",
"style" : {
"navigationBarTitleText": "投诉办单"
"navigationBarTitleText": "投诉办单"
}
}
,{

View File

@ -1,22 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,95 @@
<template>
<view>
<view v-for="(item,index) in orders" :key="index" class="bg-white margin-top margin-right-xs radius margin-left-xs padding">
<view class="flex padding-bottom-xs solid-bottom justify-between">
<view>{{item.complaintId}}</view>
<view class="text-gray">{{item.tel}}</view>
</view>
<view class="flex margin-top justify-between">
<view class="text-gray">投诉类型</view>
<view class="text-gray">{{item.typeCdName}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">投诉人</view>
<view class="text-gray">{{item.complaintName}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">房间</view>
<view class="text-gray">{{item.floorNum}}{{item.unitNum}}单元{{item.roomNum}}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">投诉时间</view>
<view class="text-gray">{{item.createTime }}</view>
</view>
<view class="flex margin-top-xs justify-between">
<view class="text-gray">投诉内容</view>
<view class="text-gray">{{item.context}}</view>
</view>
<view class="solid-top flex justify-end margin-top padding-top-sm ">
<button class="cu-btn sm line-gray" @click="_complaintDetail(item)">详情</button>
</view>
</view>
</view>
</template>
<script>
import {loadCompaintFinish} from '../../api/complaint/complaint.js'
export default {
data() {
return {
state: '10001',
orderImg:this.java110Constant.url.baseUrl + 'img/order.png',
orders:[]
}
},
onLoad() {
this._loadComplaintOrder();
},
methods: {
_loadComplaintOrder:function(){
//
let _that = this;
let _userInfo = this.java110Context.getUserInfo();
let storeId = _userInfo.storeId;
let _objData = {
page: 1,
row: 15,
storeId: storeId,
userId: _userInfo.userId,
communityId:_that.java110Context.getCurrentCommunity().communityId
};
loadCompaintFinish(this,_objData)
.then(function(res){
if (res.statusCode != 200) {
uni.showToast({
icon:'none',
title:res.data
});
return;
}
let _data = res.data;
_that.orders = _data.complaints;
_that.orders.forEach(function(item){
let dateStr = item.createTime;
let _startTime = dateStr.replace(/\-/g, "/")
let _date=new Date(_startTime);
item.createTime = (_date.getMonth()+1) +'-'+_date.getDate();
});
})
},
_complaintDetail:function(_item){
console.log('_item',_item);
uni.setStorageSync("_complaintOrderDetail_"+_item.complaintId, _item);
uni.navigateTo({
url:"/pages/complaintOrderDetail/complaintOrderDetail?complaintId="+_item.complaintId
});
},
}
}
</script>
<style>
</style>

View File

@ -30,6 +30,12 @@
<text class="text-grey">维修已办</text>
</view>
</view>
<view class="cu-item arrow" @tap="_complaintFinish()">
<view class="content">
<text class="lg text-gray cuIcon-favor"></text>
<text class="text-grey">投诉已办</text>
</view>
</view>
<view class="cu-item arrow" @tap="_changePwd()">
<view class="content">
<text class="lg text-gray cuIcon-lock"></text>
@ -124,6 +130,12 @@
url:"/pages/repairDispatchFinish/repairDispatchFinish"
})
},
//
_complaintFinish:function(){
this.context.navigateTo({
url:'/pages/complaintFinish/complaintFinish'
})
},
//
_changePwd:function(){
uni.navigateTo({