优化工单回访、优化工单评价

master
chen 2022-08-17 17:41:52 +08:00
parent 2e8aaea60f
commit 0c28fdc693
8 changed files with 113 additions and 78 deletions

16
App.vue
View File

@ -31,21 +31,7 @@
},
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>

View File

@ -62,13 +62,13 @@
return {
windowHeight: uni.getSystemInfoSync().windowHeight,
ifPhone:false,
login_phone:'',//
login_phone:'17366921088',//
ifCode:false,
login_code:'',//
ifunitName:false,
login_unitName:'',//
login_unitName:'1',//
ifPassword:false,
login_password:'',//
login_password:'123456',//
codeText:'获取验证码' ,//
flagCode:true ,//
countDown:null,

View File

@ -248,7 +248,7 @@
'/pagesB/personal-information/personal-information',
'/pagesB/electronic-certificate/electronic-certificate',
'/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/set-up/set-up',
];

View File

@ -426,11 +426,30 @@
// uni.showToast({
// 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){
this.bgmMusic.autoplay = true;//
// this.bgmMusic.loop = true;//

View File

@ -294,12 +294,12 @@
if (op.orderId != undefined) {
this.orderId = op.orderId;
//
this.getDetail(1);
this.getDetail(1,op.statusText,op.statusColor);
}
},
methods: {
//
getDetail(type) {
getDetail(type,text,color) {
let params = {
order_id: this.orderId,
type:type
@ -307,8 +307,8 @@
this.$requst.get('/universal/api.order/order_info', params).then(res => {
console.log(res.data,'工单详情')
if (res.code) {
this.statusText = res.data.btn.attributes.text;
this.statusColor = res.data.btn.attributes.color;
this.statusText = res.data.btn?res.data.btn.attributes.text:text;
this.statusColor = res.data.btn?res.data.btn.attributes.color:color;
switch (type) {
case 1:
this.detailObj = res.data;
@ -371,7 +371,7 @@
//
detailSwitch(index) {
let type = [1, 2, 3, 4][index];
this.getDetail(type);
this.getDetail(type,this.statusText,this.statusColor);
},
//
goEvaluate() {

View File

@ -13,13 +13,13 @@
<text></text>
<text></text>
</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 class="payReturnVisit-input">
<view class="title">
联系电话
</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 class="payReturnVisit-input">
<view class="title">
@ -27,7 +27,7 @@
<text></text>
<text></text>
</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 class="payReturnVisit-textarea">
@ -77,14 +77,36 @@
custmerphone:'400-765-9876',//
custmertime:'',//访
workId:'',//id
flag:true
flag:true,
visitTypeList:[]
}
},
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);
},
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() {
if(this.checkEmpty() && this.flag) {
@ -94,32 +116,30 @@
mask:true
})
let parmas = {
id:this.workId,
a:this.name,
b:this.phone,
c:this.wxcode,
d:this.custmerphone,
e:this.custmertime,
f:this.content
order_id:this.workId,
return_visit:this.content,
type_id:this.visitTypeList[0].type_id
}
this.$request.post('',parmas).then(res=>{
this.$requst.post('/universal/api.order/visit',parmas).then(res=>{
if(res.code) {
this.$toolAll.tools.showToast('回访成功');
setTimeout(()=>{
// ,
this.$toolAll.tools.automaticBack();
},1000)
} else {
this.$toolAll.tools.showToast(res.msg);
}
uni.hideLoading();
this.flag = true;
})
setTimeout(()=>{
this.flag = true;
},2000)
}
},
//
checkEmpty() {
let result = false;
if(!this.name) {
this.$toolAll.tools.showToast('请填写联系人称呼');
} else if(this.$toolAll.tools.isPhone(this.phone)) {
this.$toolAll.tools.showToast('请正确填写手机号码');
} else if(!this.content) {
if(!this.content) {
this.$toolAll.tools.showToast('请输入回访内容');
} else {
result = true;

View File

@ -32,14 +32,15 @@
</view>
<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="message">
<image class="img" :src="item.cover_picture" mode="aspectFill" lazy-load></image>
<view class="text disjb fc" style="height: 180rpx;">
<view class="title flexs">
<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 class="disjb fc line-h36" style="margin-left: -20rpx;">
<view class="serial-number scal09">
@ -61,7 +62,7 @@
</view>
<!-- 订单不等于已完成和待回访并且访问人不是工程师 -->
<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>
</view>
</view>
@ -211,8 +212,10 @@
},
//
projectDetailsFun(status,id,statusText,statusColor) {
if (uni.getStorageSync('type_id')==4 && status == 2) {
//
if (uni.getStorageSync('type_id')==4) {
//
if(status == 2) {
//
uni.showModal({
cancelText:'取消',
cancelColor:'#999999',
@ -234,7 +237,7 @@
}
}
})
}else if(uni.getStorageSync('type_id')==4) {
}
if(status==3){
//
uni.navigateTo({
@ -248,8 +251,9 @@
})
}
} else if(uni.getStorageSync('type_id')==5){
//
if(status==6){
//
//
uni.navigateTo({
url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
})
@ -260,18 +264,26 @@
})
}
} else if(uni.getStorageSync('type_id')==3){
//
if(status==1){
//
//
uni.navigateTo({
url: `/pagesA/peopleManagement/peopleManagement?orderId=${id}`
})
}
if(status==8){
//
// 访
uni.navigateTo({
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 {
//
uni.navigateTo({

View File

@ -140,8 +140,6 @@
this.agreementArr.push(obj)
}
}
console.log(this.agreementArr,77777);
// uni.navigateBack({delta:1})
}
})
},