投诉处理完成

This commit is contained in:
java110 2020-07-27 15:53:45 +08:00
parent 2b62df2325
commit 76d93e6f51
5 changed files with 168 additions and 56 deletions

View File

@ -23,3 +23,27 @@ export function loadTodoCompaint(_that,_data){
})
});
}
/**
* 投诉处理
* @param {Object} _that 上下文对象
* @param {Object} _data 请求报文
*/
export function auditComplaint(_that,_data){
return new Promise(function(reslove,reject){
_that.context.post({
url: url.auditComplaint,
data:_data,
success: function(res) {
reslove(res);
},
fail: function(e) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
})
}
})
});
}

View File

@ -207,6 +207,18 @@
"navigationBarTitleText": "工单评价"
}
}
,{
"path" : "pages/complaintDispatch/complaintDispatch",
"style" : {
"navigationBarTitleText": "投诉待办单"
}
}
,{
"path" : "pages/complaintHandle/complaintHandle",
"style" : {
"navigationBarTitleText": "投诉处理"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "white",

View File

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

View File

@ -0,0 +1,102 @@
<template>
<view>
<view class="cu-form-group margin-top">
<view class="title">审核</view>
<picker bindchange="PickerChange" :value="stateIndex" :range="stateCloums" :range-key="'name'" @change="stateChange">
<view class="picker">
{{stateCloums[stateIndex].name}}
</view>
</picker>
</view>
<view class="cu-form-group margin-top">
<textarea v-model="content" placeholder="请输入处理意见"></textarea>
</view>
<view class="flex flex-direction margin-top">
<button class="cu-btn bg-green margin-tb-sm lg" @click="_dispatchComplaint()">提交</button>
</view>
</view>
</template>
<script>
import {auditComplaint} from '../../api/complaint/complaint.js'
export default {
data() {
return {
stateCloums: [{
id: '0',
name: '请选择'
},{
id: '1100',
name: '接受'
},
{
id: '1200',
name: '不接受'
}
],
state:'',
content: '',
complaintId:'',
stateIndex:0,
taskId:'',
storeId:'',
userId:'',
userName:''
}
},
onLoad(options) {
this.complaintId = options.complaintId;
this.taskId = options.taskId;
let _userInfo = this.java110Context.getUserInfo();
this.storeId = _userInfo.storeId;
this.userId = _userInfo.userId;
this.userName = _userInfo.userName;
},
methods: {
_dispatchComplaint: function() {
let _data = {
state:this.state,
remark:this.content,
communityId:this.java110Context.getCurrentCommunity().communityId,
taskId:this.taskId,
complaintId:this.complaintId,
storeId:this.storeId,
userId:this.userId,
userName:this.userName
}
auditComplaint(this,_data)
.then(function(res){
if (res.statusCode != 200) {
uni.showToast({
icon:'none',
title:res.data
});
return;
}
uni.navigateBack({
delta:1
})
})
},
stateChange:function(e){
this.stateIndex = e.target.value //
if (this.stateIndex == 0) {
this.state = '' //id
return;
}
let selected = this.stateCloums[this.stateIndex] //
this.state = selected.id //id
}
}
}
</script>
<style>
</style>

View File

@ -26,7 +26,8 @@
<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="repairDetail(item)">详情</button>
<button class="cu-btn sm line-gray" @click="_complaintDetail(item)">详情</button>
<button class="cu-btn sm bg-green margin-left" @click="_complaintDispatch(item)">办结</button>
</view>
</view>
@ -65,7 +66,6 @@
loadTodoCompaint(this,_objData)
.then(function(res){
console.log("请求返回信息:", res);
if (res.statusCode != 200) {
uni.showToast({
icon:'none',
@ -83,65 +83,17 @@
});
})
},
_loadOrder:function(){
//
let _that = this;
let _userInfo = this.java110Context.getUserInfo();
let storeId = _userInfo.storeId;
let _objData = {
page: 1,
row: 15,
storeId: storeId,
userId: _userInfo.userId,
process:'AUDIT',
communityId:_that.java110Context.getCurrentCommunity().communityId
};
this.java110Context.request({
url: _that.java110Constant.url.listAuditHistoryComplaints,
header: _that.java110Context.getHeaders(),
method: "GET",
data: _objData, //
success: function(res) {
console.log("请求返回信息:", res);
if (res.statusCode != 200) {
uni.showToast({
icon:'none',
title:res.data
});
return;
}
let _data = res.data;
_data.complaints.forEach(function(item){
let dateStr = item.createTime;
let _startTime = dateStr.replace(/\-/g, "/")
let _date=new Date(_startTime);
item.createTime = (_date.getMonth()+1) +'-'+_date.getDate();
});
_that.orders = _data.complaints;
},
fail: function(e) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
});
}
});
},
_toAuditComplaintOrder:function(_item){
console.log('_item',_item);
wx.setStorageSync("_auditComplaint_"+_item.complaintId, _item);
uni.navigateTo({
url:"/pages/auditComplaintOrder/auditComplaintOrder?complaintId="+_item.complaintId
});
},
_toAuditComplaintHistoryOrder:function(_item){
_complaintDetail:function(_item){
console.log('_item',_item);
uni.setStorageSync("_complaintOrderDetail_"+_item.complaintId, _item);
uni.navigateTo({
url:"/pages/complaintOrderDetail/complaintOrderDetail?complaintId="+_item.complaintId
});
},
_complaintDispatch:function(_item){
uni.navigateTo({
url:"/pages/complaintHandle/complaintHandle?complaintId="+_item.complaintId+"&taskId="+_item.taskId
});
}
}
}