拨打区分为约为排

This commit is contained in:
donqi 2023-06-04 01:51:17 +08:00
parent 8083b98dfa
commit 349a606919
3 changed files with 29 additions and 8 deletions

View File

@ -15,7 +15,7 @@ export default {
// request 触发前拼接 url
args.url = 'https://www.opsoul.com:8881' + args.url;
// args.url = 'http://127.0.0.1:80' + args.url;
// args.url = 'http://192.168.2.41:80' + args.url;
// args.url = 'http://192.168.2.74:80' + args.url;
if (!args.data) {
args.data = {}
@ -756,5 +756,14 @@ export default {
// res.latitude, res.longitude
console.log(res)
return res;
},
async callCustomer(params = {}) {
let res = await uni.request({
url: '/order/master/callCustomer',
method: 'POST',
data: params
})
return res[1].data;
}
}

View File

@ -12,7 +12,7 @@
<text class="text-xxl text-main-color"><text class="cuIcon-phone"></text></text>
<text class="text-bold text-lg margin-lr-xs">{{data.customerPhone.substring(0, 3) + "****" + data.customerPhone.substring(7)}}</text>
</view>
<button class="cu-btn line-main-color" @click="makePhoneCall(data.customerPhone)">拨打</button>
<button class="cu-btn line-main-color" @click="makePhoneCall(data)">拨打</button>
</view>
<view class="text-sm">
拨打电话按与客户约定的时间填入完成排单未完成排单将导致排单超时
@ -156,9 +156,15 @@
this.$emit('editServTime', this.data.orderMasterId, [this.expectTimeStart, this.expectTimeEnd], false, this.data);
this.hideModal(e);
},
makePhoneCall(phoneNum) {
makePhoneCall(order) {
if (order.orderDetailId == null) {
this.$request.callCustomer({
id: order.orderMasterId,
isCall: '02'
});
}
uni.makePhoneCall({
phoneNumber: phoneNum
phoneNumber: order.customerPhone
})
}
}

View File

@ -221,7 +221,7 @@
</view>
<view v-if="order.orderStatus === 2">
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">修改时间</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showOnDoorNoticeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">立即上门</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId != null" @click="rejectDetailOrder(order)">退单</button>
@ -234,7 +234,7 @@
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.clockInLocation && order.payType === 0">报价/完单</button>
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOffline" data-modal="showNewServPriceOfflineModal" v-show="order.orderDetailId != null && order.payType === 1">报价/完单</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.payType === 0">报价/完单</button> -->
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">重新排期</button>
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="finishOrder(order)" v-if="order.payStatus === 1" v-show="order.orderDetailId != null">发起完单</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" v-if="order.payStatus === 0" @tap="makePayQrcode($event, order)" v-show="order.orderDetailId != null">生成收款码</button> -->
@ -1059,9 +1059,15 @@
changePopupState(e) {
this.ifShowPageMeta = e.show;
},
makePhoneCall(phoneNum) {
makePhoneCall(order) {
if (order.orderDetailId == null) {
this.$request.callCustomer({
id: order.orderMasterId,
isCall: '02'
});
}
uni.makePhoneCall({
phoneNumber: phoneNum
phoneNumber: order.customerPhone
})
},
async makePayQrcode(e, orderInfo) {