Commit 596f8281 authored by 刘用法's avatar 刘用法

接单前监测是否加了客服

parent 9a7963f9
......@@ -170,6 +170,8 @@ let orderApiFun = function(vm){
let allowLogin = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/allow/login', params);
// 特殊登录切换师傅
let otherUser = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/other/user', params);
// 是否添加客服
let checkAddCustomer = async (params = {}) => await vm.$u.get(prefix + 'order/revision/' + vm.vuex_token + '/checkAddCustomer', params);
const orderApi = {
listByRecommendOrder,
......@@ -209,7 +211,8 @@ let orderApiFun = function(vm){
payableRecord,
workerApplyPay,
allowLogin,
otherUser
otherUser,
checkAddCustomer
}
return orderApi
}
......
......@@ -149,7 +149,7 @@
<view>
<u-toast ref="uToast" />
</view>
<view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 500)" class="button" :class="['center-button-view', btnClass]">
<view v-if="showCenterBtn" @click="$u.throttle(handleClickSure, 500)" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime && showTimeOut" class="time-view">
<text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
......@@ -448,9 +448,9 @@
if(this.showTimeOut && this.order.currentOverTime && nowTime.getTime() > this.order.currentOverTime){
this.btnClass='timeOut-btn'
}
if(self.order.isFirstOrder){
this.visible = true
}
// if(self.order.isFirstOrder){
// this.visible = true
// }
// 格式化时间
this.settlementInfo.formatTime = this.order.settleCenterSyncDatetime ? this.$u.timeFormat(this.order.settleCenterSyncDatetime, 'yyyy.mm.dd hh:MM:ss') : '-'
} else {
......@@ -640,6 +640,21 @@
this.isAllowDianhuaAndDaohang = true
}
},
handleClickSure() {
if (this.submitType == 'orderAccept' || this.submitType == 'orderGan') {
this.$u.api.checkAddCustomer().then((res) => {
if (res.code == 200) {
if(res.data.data === true){
this.handleBtn()
} else {
this.visible = true
}
} else {}
})
} else {
this.handleBtn()
}
},
handleBtn() {
console.log('click button')
if(!this.submitType){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment