mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-24 05:46:09 +08:00
投诉处理完成
This commit is contained in:
parent
2b62df2325
commit
76d93e6f51
@ -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
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
12
pages.json
12
pages.json
@ -207,6 +207,18 @@
|
||||
"navigationBarTitleText": "工单评价"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/complaintDispatch/complaintDispatch",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "投诉待办单"
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/complaintHandle/complaintHandle",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "投诉处理"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
22
pages/complaintDispatch/complaintDispatch.vue
Normal file
22
pages/complaintDispatch/complaintDispatch.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
102
pages/complaintHandle/complaintHandle.vue
Normal file
102
pages/complaintHandle/complaintHandle.vue
Normal 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>
|
||||
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user