优化工单回访、优化工单评价
parent
2e8aaea60f
commit
0c28fdc693
16
App.vue
16
App.vue
|
@ -31,21 +31,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// uniapp设置消息提醒(调用手机系统静音或铃声)
|
|
||||||
openSettings() {
|
|
||||||
uni.getSystemInfo({
|
|
||||||
success(res) {
|
|
||||||
if(res.platform == 'ios'){
|
|
||||||
plus.runtime.openURL("app-settings://");
|
|
||||||
} else if (res.platform == 'android'){
|
|
||||||
var main = plus.android.runtimeMainActivity();
|
|
||||||
var Intent = plus.android.importClass("android.content.Intent");
|
|
||||||
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
|
|
||||||
main.startActivity(mIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -62,13 +62,13 @@
|
||||||
return {
|
return {
|
||||||
windowHeight: uni.getSystemInfoSync().windowHeight,
|
windowHeight: uni.getSystemInfoSync().windowHeight,
|
||||||
ifPhone:false,
|
ifPhone:false,
|
||||||
login_phone:'',//登录手机号
|
login_phone:'17366921088',//登录手机号
|
||||||
ifCode:false,
|
ifCode:false,
|
||||||
login_code:'',//登录验证码
|
login_code:'',//登录验证码
|
||||||
ifunitName:false,
|
ifunitName:false,
|
||||||
login_unitName:'',//登录单位名称
|
login_unitName:'1',//登录单位名称
|
||||||
ifPassword:false,
|
ifPassword:false,
|
||||||
login_password:'',//登录密码
|
login_password:'123456',//登录密码
|
||||||
codeText:'获取验证码' ,// 获取验证码按钮文字
|
codeText:'获取验证码' ,// 获取验证码按钮文字
|
||||||
flagCode:true ,// 允许点击获取验证码
|
flagCode:true ,// 允许点击获取验证码
|
||||||
countDown:null,
|
countDown:null,
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
'/pagesB/personal-information/personal-information',
|
'/pagesB/personal-information/personal-information',
|
||||||
'/pagesB/electronic-certificate/electronic-certificate',
|
'/pagesB/electronic-certificate/electronic-certificate',
|
||||||
'/pagesB/service-range/service-range',
|
'/pagesB/service-range/service-range',
|
||||||
'/pagesA/workOrder/workOrderLlsit?is_evaluate=1',
|
'/pagesA/workOrder/workOrderLlsit?status=待评价&statusId=9',
|
||||||
'/pagesB/my-account/my-account?index=0',
|
'/pagesB/my-account/my-account?index=0',
|
||||||
'/pagesB/set-up/set-up',
|
'/pagesB/set-up/set-up',
|
||||||
];
|
];
|
||||||
|
|
|
@ -426,11 +426,30 @@
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title:'您有新消息!'
|
// title:'您有新消息!'
|
||||||
// })
|
// })
|
||||||
this.bofang(msg);
|
// this.bofang(msg);
|
||||||
|
this.openSettings();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// uniapp设置消息提醒(调用手机系统静音或铃声)
|
||||||
|
openSettings() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success(res) {
|
||||||
|
if(res.platform == 'ios'){
|
||||||
|
plus.runtime.openURL("app-settings://");
|
||||||
|
} else if (res.platform == 'android'){
|
||||||
|
var main = plus.android.runtimeMainActivity();
|
||||||
|
var Intent = plus.android.importClass("android.content.Intent");
|
||||||
|
var mIntent = new Intent('android.settings.SOUND_SETTINGS');
|
||||||
|
main.startActivity(mIntent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
// 播放音乐
|
||||||
bofang(msg){
|
bofang(msg){
|
||||||
this.bgmMusic.autoplay = true;//自动播放
|
this.bgmMusic.autoplay = true;//自动播放
|
||||||
// this.bgmMusic.loop = true;//循环播放
|
// this.bgmMusic.loop = true;//循环播放
|
||||||
|
|
|
@ -294,12 +294,12 @@
|
||||||
if (op.orderId != undefined) {
|
if (op.orderId != undefined) {
|
||||||
this.orderId = op.orderId;
|
this.orderId = op.orderId;
|
||||||
// 调取获取工单详情事件
|
// 调取获取工单详情事件
|
||||||
this.getDetail(1);
|
this.getDetail(1,op.statusText,op.statusColor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取工单详情事件
|
// 获取工单详情事件
|
||||||
getDetail(type) {
|
getDetail(type,text,color) {
|
||||||
let params = {
|
let params = {
|
||||||
order_id: this.orderId,
|
order_id: this.orderId,
|
||||||
type:type
|
type:type
|
||||||
|
@ -307,8 +307,8 @@
|
||||||
this.$requst.get('/universal/api.order/order_info', params).then(res => {
|
this.$requst.get('/universal/api.order/order_info', params).then(res => {
|
||||||
console.log(res.data,'工单详情')
|
console.log(res.data,'工单详情')
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
this.statusText = res.data.btn.attributes.text;
|
this.statusText = res.data.btn?res.data.btn.attributes.text:text;
|
||||||
this.statusColor = res.data.btn.attributes.color;
|
this.statusColor = res.data.btn?res.data.btn.attributes.color:color;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
this.detailObj = res.data;
|
this.detailObj = res.data;
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
// 工单详情切换事件
|
// 工单详情切换事件
|
||||||
detailSwitch(index) {
|
detailSwitch(index) {
|
||||||
let type = [1, 2, 3, 4][index];
|
let type = [1, 2, 3, 4][index];
|
||||||
this.getDetail(type);
|
this.getDetail(type,this.statusText,this.statusColor);
|
||||||
},
|
},
|
||||||
// 前往评价页面
|
// 前往评价页面
|
||||||
goEvaluate() {
|
goEvaluate() {
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
<text>系</text>
|
<text>系</text>
|
||||||
<text>人</text>
|
<text>人</text>
|
||||||
</view>
|
</view>
|
||||||
<input class="input" v-model="name" placeholder="请填写联系人称呼" type="text" placeholder-class="placeClass" />
|
<input class="input" disabled v-model="name" placeholder="请填写联系人称呼" type="text" placeholder-class="placeClass" />
|
||||||
</view>
|
</view>
|
||||||
<view class="payReturnVisit-input">
|
<view class="payReturnVisit-input">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
联系电话
|
联系电话
|
||||||
</view>
|
</view>
|
||||||
<input class="input" maxlength="11" v-model="phone" placeholder="请输入手机号码" type="number" placeholder-class="placeClass" />
|
<input class="input" disabled maxlength="11" v-model="phone" placeholder="请输入手机号码" type="number" placeholder-class="placeClass" />
|
||||||
</view>
|
</view>
|
||||||
<view class="payReturnVisit-input">
|
<view class="payReturnVisit-input">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<text>信</text>
|
<text>信</text>
|
||||||
<text>号</text>
|
<text>号</text>
|
||||||
</view>
|
</view>
|
||||||
<input class="input" v-model="wxcode" placeholder="请输入微信号码" type="text" placeholder-class="placeClass" />
|
<input class="input" disabled v-model="wxcode" placeholder="请输入微信号码" type="text" placeholder-class="placeClass" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="payReturnVisit-textarea">
|
<view class="payReturnVisit-textarea">
|
||||||
|
@ -77,14 +77,36 @@
|
||||||
custmerphone:'400-765-9876',//客服电话
|
custmerphone:'400-765-9876',//客服电话
|
||||||
custmertime:'',//回访时间
|
custmertime:'',//回访时间
|
||||||
workId:'',//工单id
|
workId:'',//工单id
|
||||||
flag:true
|
flag:true,
|
||||||
|
visitTypeList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
if(op.id) {this.workId = op.id}
|
this.getVisitType();
|
||||||
|
if(op.order_id) {this.workId = op.order_id}
|
||||||
|
this.getVisitInfo(this.workId);
|
||||||
this.custmertime = this.$toolAll.tools.returnCurrentTime('/',1);
|
this.custmertime = this.$toolAll.tools.returnCurrentTime('/',1);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取回访方式
|
||||||
|
getVisitType(){
|
||||||
|
this.$requst.get('/universal/api.order/visit_type').then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
this.visitTypeList = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取回访信息
|
||||||
|
getVisitInfo(id){
|
||||||
|
this.$requst.get('/universal/api.order/visit',{order_id:id}).then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
this.name = res.data.order_contact;
|
||||||
|
this.phone = res.data.order_contact_phone;
|
||||||
|
this.wxcode = res.data.order_contact_wechat;
|
||||||
|
this.custmerphone = res.data.consumer_hotline;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 工单回访提交事件
|
// 工单回访提交事件
|
||||||
setVisit() {
|
setVisit() {
|
||||||
if(this.checkEmpty() && this.flag) {
|
if(this.checkEmpty() && this.flag) {
|
||||||
|
@ -94,32 +116,30 @@
|
||||||
mask:true
|
mask:true
|
||||||
})
|
})
|
||||||
let parmas = {
|
let parmas = {
|
||||||
id:this.workId,
|
order_id:this.workId,
|
||||||
a:this.name,
|
return_visit:this.content,
|
||||||
b:this.phone,
|
type_id:this.visitTypeList[0].type_id
|
||||||
c:this.wxcode,
|
|
||||||
d:this.custmerphone,
|
|
||||||
e:this.custmertime,
|
|
||||||
f:this.content
|
|
||||||
}
|
}
|
||||||
this.$request.post('',parmas).then(res=>{
|
this.$requst.post('/universal/api.order/visit',parmas).then(res=>{
|
||||||
if(res.code) {
|
if(res.code) {
|
||||||
// 接口调用成功,自动返回上一级
|
this.$toolAll.tools.showToast('回访成功');
|
||||||
this.$toolAll.tools.automaticBack();
|
setTimeout(()=>{
|
||||||
|
// 接口调用成功,自动返回上一级
|
||||||
|
this.$toolAll.tools.automaticBack();
|
||||||
|
},1000)
|
||||||
|
} else {
|
||||||
|
this.$toolAll.tools.showToast(res.msg);
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
|
||||||
this.flag = true;
|
|
||||||
})
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.flag = true;
|
||||||
|
},2000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 判空
|
// 判空
|
||||||
checkEmpty() {
|
checkEmpty() {
|
||||||
let result = false;
|
let result = false;
|
||||||
if(!this.name) {
|
if(!this.content) {
|
||||||
this.$toolAll.tools.showToast('请填写联系人称呼');
|
|
||||||
} else if(this.$toolAll.tools.isPhone(this.phone)) {
|
|
||||||
this.$toolAll.tools.showToast('请正确填写手机号码');
|
|
||||||
} else if(!this.content) {
|
|
||||||
this.$toolAll.tools.showToast('请输入回访内容');
|
this.$toolAll.tools.showToast('请输入回访内容');
|
||||||
} else {
|
} else {
|
||||||
result = true;
|
result = true;
|
||||||
|
|
|
@ -32,14 +32,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="project-list">
|
<view class="project-list">
|
||||||
<!-- 列表循环体 -->
|
<!-- 列表循环体 -->
|
||||||
<view class="li animated fadeIn" @click="projectDetailsFun(item.order_status,item.order_id,item.btn.attributes.text,item.btn.attributes.color)" v-for="(item,index) in dataList" :key="index">
|
<view class="li animated fadeIn" @click="projectDetailsFun(item.order_status,item.order_id,item.btn?item.btn.attributes.text:item.order_status_view,item.btn?item.btn.attributes.color:'#DDDDDD')" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class="work-order-code">工单编号:{{item.order_number}}</view>
|
<view class="work-order-code">工单编号:{{item.order_number}}</view>
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<image class="img" :src="item.cover_picture" mode="aspectFill" lazy-load></image>
|
<image class="img" :src="item.cover_picture" mode="aspectFill" lazy-load></image>
|
||||||
<view class="text disjb fc" style="height: 180rpx;">
|
<view class="text disjb fc" style="height: 180rpx;">
|
||||||
<view class="title flexs">
|
<view class="title flexs">
|
||||||
<view class="text clips1">{{item.project_name}}</view>
|
<view class="text clips1">{{item.project_name}}</view>
|
||||||
<view class="icon" :style="{backgroundColor: item.btn.attributes.color || '#DDDDDD'}">{{item.btn.attributes.text}}</view>
|
<view v-if="item.btn" class="icon" :style="{backgroundColor: item.btn.attributes.color || '#DDDDDD'}">{{item.btn.attributes.text}}</view>
|
||||||
|
<view v-else class="icon" style="background-color: #DDDDDD;color: #333333;">{{item.order_status_view}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjb fc line-h36" style="margin-left: -20rpx;">
|
<view class="disjb fc line-h36" style="margin-left: -20rpx;">
|
||||||
<view class="serial-number scal09">
|
<view class="serial-number scal09">
|
||||||
|
@ -61,7 +62,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单不等于已完成和待回访,并且访问人不是工程师 -->
|
<!-- 订单不等于已完成和待回访,并且访问人不是工程师 -->
|
||||||
<view class="" v-if="role==1 || role==2">
|
<view class="" v-if="role==1 || role==2">
|
||||||
<view @tap.stop="hurryUpEv(item.order_id)" class="date" v-if="item.order_status!=5 && item.order_status!=6 && item.order_status!=7 && item.order_status!=8">
|
<view @tap.stop="hurryUpEv(item.order_id)" class="date" v-if="item.order_status!=5 && item.order_status!=6 && item.order_status!=7 && item.order_status!=8 && item.order_status!=9">
|
||||||
催一催 <image class="img" src="../../static/iocn/ld.png" mode="" lazy-load></image>
|
催一催 <image class="img" src="../../static/iocn/ld.png" mode="" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -211,30 +212,32 @@
|
||||||
},
|
},
|
||||||
// 查看工单详情和进入接单页面
|
// 查看工单详情和进入接单页面
|
||||||
projectDetailsFun(status,id,statusText,statusColor) {
|
projectDetailsFun(status,id,statusText,statusColor) {
|
||||||
if (uni.getStorageSync('type_id')==4 && status == 2) {
|
if (uni.getStorageSync('type_id')==4) {
|
||||||
// 工程师点击待接单工单
|
// 工程师
|
||||||
uni.showModal({
|
if(status == 2) {
|
||||||
cancelText:'取消',
|
// 待接单
|
||||||
cancelColor:'#999999',
|
uni.showModal({
|
||||||
confirmColor:'#03affb',
|
cancelText:'取消',
|
||||||
confirmText:'确认',
|
cancelColor:'#999999',
|
||||||
content:'确认接单',
|
confirmColor:'#03affb',
|
||||||
success: (res) => {
|
confirmText:'确认',
|
||||||
if(res.confirm){
|
content:'确认接单',
|
||||||
this.$requst.post('/universal/api.order/accept_order',{order_id:id,is_order:1}).then(res=>{
|
success: (res) => {
|
||||||
if(res.code){
|
if(res.confirm){
|
||||||
this.$toolAll.tools.showToast('接单成功');
|
this.$requst.post('/universal/api.order/accept_order',{order_id:id,is_order:1}).then(res=>{
|
||||||
setTimeout(()=>{
|
if(res.code){
|
||||||
uni.navigateTo({
|
this.$toolAll.tools.showToast('接单成功');
|
||||||
url: `/pagesA/workOrder/workOrder?id=${id}`
|
setTimeout(()=>{
|
||||||
})
|
uni.navigateTo({
|
||||||
},1000)
|
url: `/pagesA/workOrder/workOrder?id=${id}`
|
||||||
}
|
})
|
||||||
})
|
},1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}else if(uni.getStorageSync('type_id')==4) {
|
|
||||||
if(status==3){
|
if(status==3){
|
||||||
// 待维修
|
// 待维修
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -248,8 +251,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if(uni.getStorageSync('type_id')==5){
|
} else if(uni.getStorageSync('type_id')==5){
|
||||||
|
// 财务
|
||||||
if(status==6){
|
if(status==6){
|
||||||
// 财务点击审核工单
|
// 审核工单
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
|
url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
|
||||||
})
|
})
|
||||||
|
@ -260,18 +264,26 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if(uni.getStorageSync('type_id')==3){
|
} else if(uni.getStorageSync('type_id')==3){
|
||||||
|
// 客服
|
||||||
if(status==1){
|
if(status==1){
|
||||||
// 客服点击待指派工单
|
// 待指派工单
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesA/peopleManagement/peopleManagement?orderId=${id}`
|
url: `/pagesA/peopleManagement/peopleManagement?orderId=${id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(status==8){
|
if(status==8){
|
||||||
// 客服点击待指派工单
|
// 工单回访
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesA/workOrder/payReturnVisit?order_id=${id}`
|
url: `/pagesA/workOrder/payReturnVisit?order_id=${id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else if(uni.getStorageSync('type_id')==1 || uni.getStorageSync('type_id')==2){
|
||||||
|
// 客户、业务员待评价
|
||||||
|
if(status == 9){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pagesB/i-want-evaluate/i-want-evaluate?orderId=${id}`
|
||||||
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 客户、客服、业务员、工程师点击查看详情
|
// 客户、客服、业务员、工程师点击查看详情
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -140,8 +140,6 @@
|
||||||
this.agreementArr.push(obj)
|
this.agreementArr.push(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.agreementArr,77777);
|
|
||||||
// uni.navigateBack({delta:1})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue