wangfukang 1 month ago
parent
commit
4d2e73ea66
  1. 2
      package1/buyFood/buyFood.vue
  2. 111
      package1/index/deliveryPersonList.vue
  3. 246
      package1/order/orderDetail.vue
  4. 2
      package1/order/orderList.vue
  5. 2
      package1/order/returnOrder.vue
  6. 32
      package1/runErrand/runErrand.vue

2
package1/buyFood/buyFood.vue

@ -783,7 +783,7 @@
let shopId = this.createdOrderInfo.shopId || this.shopItem.id || this.shopItem.shopId || '';
return {
title: '我发起了一个拼团,快来一起拼单吧!',
title: '天灵灵地灵灵,这个价格不拼真的不行!😭',
path: buildGroupHomeSharePath({
shopId: shopId,
groupId: groupId,

111
package1/index/deliveryPersonList.vue

@ -39,10 +39,7 @@
@confirm="getShopList">
</view>
</view>
<view class="commission-tip" v-if="hasCommissionAmount">
当前可指派配送员列表是按照不超过您的总配送佣金筛选的增加配送佣金可筛选更多配送员
</view>
<view class="man-box" v-for="(worker, index) in workerList" :key="index" @tap="selectWorker(worker)">
<view class="man-box" v-for="(worker, index) in workerList" :key="index" @tap="getCommissionDiff(worker) > 0 ? makeUpCommission(worker) : selectWorker(worker)">
<view class="man-title">
<img :src="worker.icon || '/static/images/img/songshu.png'"
alt="" style="width: 120rpx;height: 120rpx;border-radius:60rpx;" />
@ -56,8 +53,14 @@
alt="" style="width: 140rpx;height: 32rpx;margin-top: 18rpx;"
v-if="worker.rebateAmount > 0" />
</view>
<view class="worker-price">
¥{{worker.orderBkge}}
<view class="worker-price-wrap">
<view class="make-up-btn" v-if="getCommissionDiff(worker) > 0"
@tap.stop="makeUpCommission(worker)">
需补¥{{formatAmount(getCommissionDiff(worker))}}
</view>
<view class="worker-price">
¥{{formatAmount(getWorkerCommission(worker))}}
</view>
</view>
</view>
<view class="man-rate">
@ -134,6 +137,8 @@
sortField: "score",
putAreaId: '',
commissionAmount: '',
addressId: '',
isHighFloorAddress: false,
workerList: [],
orderType: null,
pageNum: 1, //
@ -171,14 +176,82 @@
this.shopAreaId = option.shopAreaId || '';
this.putAreaId = option.putAreaId || '';
this.commissionAmount = option.commissionAmount || '';
this.addressId = option.addressId || '';
this.orderType = option.orderType || 0;
this.getShopList();
if (this.addressId) {
this.getAddressInfo().then(() => {
this.getShopList();
});
} else {
this.getShopList();
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.regionId = JSON.parse(uni.getStorageSync('area')).id
},
methods: {
toAmount(value) {
let amount = parseFloat(value);
return isNaN(amount) ? 0 : amount;
},
formatAmount(value) {
let amount = Math.ceil(this.toAmount(value) * 100) / 100;
return amount.toFixed(2).replace(/\.?0+$/, '');
},
getWorkerCommission(worker) {
if (!worker) return 0;
let commission = this.toAmount(worker.orderBkge);
if (this.isHighFloorAddress) {
commission += this.toAmount(worker.highFloorFee);
}
return Math.ceil(commission * 100) / 100;
},
getCommissionDiff(worker) {
if (!this.hasCommissionAmount || !worker) return 0;
let currentAmount = this.toAmount(this.commissionAmount);
let workerAmount = this.getWorkerCommission(worker);
let diff = workerAmount - currentAmount;
return diff > 0 ? Math.ceil(diff * 100) / 100 : 0;
},
normalizeWorkerCommission(worker) {
if (!worker) return worker;
let assignedWorker = Object.assign({}, worker);
assignedWorker.orderBkge = this.formatAmount(this.getWorkerCommission(worker));
return assignedWorker;
},
makeUpCommission(worker) {
let diff = this.getCommissionDiff(worker);
if (diff <= 0) return;
uni.setStorageSync('pendingAddCommissionWorker', {
worker: this.normalizeWorkerCommission(worker),
additionalFee: this.formatAmount(diff)
});
this.commissionAmount = '';
uni.navigateBack();
},
getAddressInfo() {
if (!this.addressId) return Promise.resolve();
return this.tui.request("/app/userAddress/get", "GET", {
id: this.addressId
}, false, true).then((res) => {
if (res.code == 200 && res.result) {
this.isHighFloorAddress = this.isAddressAboveThirdFloor(res.result);
}
}).catch(() => {});
},
isAddressAboveThirdFloor(address) {
let floor = this.extractFloor(address.floor);
if (!floor && address.address) {
floor = this.extractFloor(address.address);
}
return floor > 3;
},
extractFloor(value) {
if (value === undefined || value === null) return 0;
let match = String(value).match(/\d+/);
return match ? parseInt(match[0]) || 0 : 0;
},
getLoca(item){
this.markers = [{
@ -216,7 +289,6 @@
xiangtong: this.xiangtong,
sortField: this.sortField,
regionId: this.regionId,
commissionAmount: this.commissionAmount,
keyword: this.keyword,
pageNum: this.pageNum,
pageSize: this.pageSize
@ -270,7 +342,8 @@
});
},
selectWorker(worker) {
uni.setStorageSync('pendingAssignWorker', worker);
uni.setStorageSync('pendingAssignWorker', this.normalizeWorkerCommission(worker));
this.commissionAmount = '';
uni.navigateBack();
},
searchShop(type, value) {
@ -555,6 +628,26 @@
white-space: nowrap;
}
.worker-price-wrap {
display: flex;
align-items: center;
flex-shrink: 0;
}
.make-up-btn {
height: 48rpx;
line-height: 48rpx;
padding: 0 14rpx;
margin-right: 10rpx;
border-radius: 999rpx;
background: #fff5ec;
border: 1rpx solid rgba(255, 112, 67, 0.42);
color: #f0441f;
font-size: 21rpx;
font-weight: 800;
white-space: nowrap;
}
.worker-price {
display: flex;
align-items: center;

246
package1/order/orderDetail.vue

@ -245,8 +245,11 @@
</view>
<view class="box1"
v-if="orderDetail.mallRefundRecord != null && orderDetail.mallRefundRecord.length > 0">
<view style="width: 100%;line-height: 70rpx;font-size: 30rpx;font-weight: 700;">
退款/售后
<view style="width: 100%;line-height: 70rpx;font-size: 30rpx;font-weight: 700;display: flex;align-items: center;">
<text style="flex: 1;">退款/售后</text>
<view class="refund-service-btn" @tap="callPlatformService">
平台介入
</view>
</view>
<view class="refund-card"
v-for="(item2,index2) in orderDetail.mallRefundRecord" :key="index2">
@ -309,7 +312,7 @@
<view class="refund-info-value">
{{item2.refundType == 1 ? '退商品 ' : item2.refundType == 2 ? '退配送费 ' : '全额退款 ' }}
<text v-if="item2.refundTypeStatus != null">
| {{item2.refundTypeStatus == 1 ? '商家原因' : item2.refundTypeStatus == 2 ? '配送员原因' : (item2.refundTypeStatus == 3 && item2.linkId.indexOf("W") == -1) ? '商家原因' : (item2.refundTypeStatus == 3 && item2.linkId.indexOf("W") != -1) ? '配送员原因' : '平台退款' }}
| {{item2.refundTypeStatus == 1 ? '商家退款' : item2.refundTypeStatus == 2 ? '配送员退款' : (item2.refundTypeStatus == 3 && item2.linkId.indexOf("W") == -1) ? '商家退款' : (item2.refundTypeStatus == 3 && item2.linkId.indexOf("W") != -1) ? '配送员退款' : '平台退款' }}
</text>
</view>
</view>
@ -321,6 +324,14 @@
{{item2.status == 0 ? '处理退款中' : item2.status == 1 ? '同意退款' : item2.status == 2 ? '拒绝退款' : item2.status == 3 ? '处理售后中' : item2.status == 4 ? '同意售后' : '拒绝售后' }}
</view>
</view>
<view class="refund-info-row" v-if="(item2.status == 2 || item2.status == 5) && item2.rejectReason">
<view class="refund-info-label">
拒绝原因
</view>
<view class="refund-info-value">
{{item2.rejectReason}}
</view>
</view>
<view class="auto-refund-tip" v-if="isRefundPending(item2)">
{{getAutoRefundTime(item2.createTime)}} 之前对方未处理系统会自动退款
</view>
@ -572,8 +583,8 @@
<view style="flex: 1;color: #777;font-weight: 700;">
{{orderDetail.shopDelivery == 1 ? '商家到店时间' : '配送员到店时间'}}
</view>
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo">
{{orderDetail.deliveryInfo.arriveTime ? orderDetail.deliveryInfo.arriveTime : '' | formatTime}}
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo != null">
{{formatTimeText(orderDetail.deliveryInfo.arriveTime)}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
@ -612,16 +623,6 @@
查看评价 >
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="hasRefund">
<view style="flex: 1;color: #777;font-weight: 700;">
申请平台介入
</view>
<view style="color: #000;font-weight: 700;" @tap="checkEvaluate">
<img @tap="makeCall('15533910775')"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
alt="" style="width: 40rpx;height: 40rpx;margin: 20rpx 0 0 20rpx;" />
</view>
</view>
</view>
</view>
</view>
@ -704,26 +705,32 @@
</text>
<text v-else>请选择退款原因</text>
</view>
<view class="cancel-time-tips" v-if="(payData.status == 3 && payData.deliveryType ==1) || payData.status == 4">
<view class="cancel-time-tips">
<view class="cancel-warning-line" v-if="payData.shopMakeTime == null && payData.otherOrder == null">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
商家还未出餐
</text>
</view>
<view class="cancel-warning-line" v-if="payData.shopMakeTime == null && payData.otherOrder == null">
<view class="cancel-warning-line" v-if="payData.shopMakeTime != null">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
配送员到店时间{{shopTime}}
商家已出餐
</text>
</view>
<view class="cancel-warning-line" v-if="payData.shopMakeTime != null && payData.otherOrder == null">
<view class="cancel-warning-line" v-if="payData.otherOrder == null && payData.deliveryType == 1">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
配送员到店时间{{arriveTime}}
</text>
</view>
<view class="cancel-warning-line" v-if="payData.shopMakeTime != null && payData.otherOrder == null && payData.deliveryType == 1">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
本单商家备餐时长{{shopTime}}
</text>
</view>
<view class="cancel-warning-line" v-if="payData.shopMakeTime != null && payData.otherOrder == null">
<view class="cancel-warning-line" v-if="payData.shopMakeTime != null && payData.otherOrder == null && payData.deliveryType == 1">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
配送员配送时长{{peisongTime}}
@ -735,15 +742,15 @@
<view style="padding: 0 20rpx;">
<view class="cancel-type-item" v-if="orderDetail.otherOrder != 1">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
全额退款商家原因
全额退款商家退款
</view>
<view class="cancel-type-item" v-if="payData.deliveryType ==1">
<radio :checked="sellTime==3" name="sellTime" @click="checkSellTime(3)" />
全额退款配送员原因
全额退款配送员退款
</view>
<view class="cancel-type-item" v-if="payData.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" />
全额退款商家+配送员原因
全额退款商家退商品+配送员退配送费
</view>
<!-- <view class="cancel-type-item">
<radio :checked="sellTime==5" name="sellTime" @click="checkSellTime(5)" />
@ -930,10 +937,11 @@
reason: '',
pictures: ''
},
cancelReasonOptions: ['配送超时', '收到的商品少了', '骑手送错地址', '收到的商品错了', '商家出餐超时', '餐品损坏或撒了', '商品质量问题'],
cancelReasonOptions: [ '不想要了','配送超时', '收到的商品少了', '骑手送错地址', '收到的商品错了', '商家出餐超时', '餐品损坏或撒了', '商品质量问题'],
selectedCancelReasonOptions: [],
popupPageStyle: '',
shopTime: '',
arriveTime:'',
hasRefund: false,
peisongTime: '',
shopItem: {},
@ -945,6 +953,9 @@
codeImg: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg',
additionalFee: '',
addFeeTradeNo: '',
pendingAddFeeWorker: null,
addFeeAutoPayOpened: false,
addFeePollTimer: null,
isRefreshing: false,
groupBuyCancelPopupType: 'buy',
assignWorkerModalVisible: false,
@ -984,7 +995,12 @@
formatTime(value) {
if (!value) return '';
if (value == '尽快送达') return '尽快送达';
const date = new Date(value);
let date = new Date(value);
if (isNaN(date.getTime())) {
const normalized = String(value).replace(/-/g, '/').replace('T', ' ').split('.')[0];
date = new Date(normalized);
}
if (isNaN(date.getTime())) return '';
//
const year = date.getFullYear();
@ -1036,6 +1052,11 @@
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
let pendingAddCommissionWorker = uni.getStorageSync('pendingAddCommissionWorker');
if (pendingAddCommissionWorker) {
uni.removeStorageSync('pendingAddCommissionWorker');
this.prepareAddFeeForWorker(pendingAddCommissionWorker);
}
//
let pendingWorker = uni.getStorageSync('pendingAssignWorker');
if (pendingWorker) {
@ -1073,6 +1094,7 @@
onUnload() {
uni.$off('updateDeliveryWorker');
this.stopPayCountdown();
this.stopAddFeePolling();
},
methods: {
@ -1130,8 +1152,8 @@
formatTimeText(value) {
if (!value) return '';
if (value == '尽快送达') return '尽快送达';
const date = new Date(value);
if (isNaN(date.getTime())) return '';
const date = this.parseOrderTime(value);
if (!date) return '';
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
@ -1280,10 +1302,45 @@
return this.returnData.reason;
},
makeCall(phone) {
if (!phone) {
this.tui.toast("暂无联系电话");
return;
}
uni.makePhoneCall({
phoneNumber: phone
});
},
callPlatformService() {
let regionId = this.getCurrentRegionId();
if (!regionId) {
this.tui.toast("请选择校区");
return;
}
let that = this;
that.tui.request("/mall/admin/seckillGroup/customerPhone/get", "GET", {
regionId: regionId
}, false, true).then((res) => {
if (res.code == 200) {
that.makeCall(res.result);
} else {
that.tui.toast(res.message || "获取客服电话失败");
}
}).catch((res) => {
that.tui.toast("获取客服电话失败");
});
},
getCurrentRegionId() {
let area = uni.getStorageSync('area');
if (!area) return '';
if (typeof area === 'object') {
return area.id || '';
}
try {
return JSON.parse(area).id || '';
} catch (e) {
return '';
}
},
checkEvaluate() {
if (this.orderDetail.comments != null && this.orderDetail.comments.length > 0) {
this.$refs.evaluatePopup.open()
@ -1305,7 +1362,7 @@
return false;
},
hasNoDeliveryWorker(item) {
return !item || !item.deliveryInfo || !item.deliveryInfo.workerId;
return !item || !item.deliveryInfo || !item.deliveryInfo.workerId || item.deliveryInfo.status === 0;
},
isGroupSuccess(item) {
return item && item.groupInfo && (item.groupInfo.status == 1 || item.groupInfo.successTime);
@ -1327,6 +1384,10 @@
const isGroupDeliveryOrder = item.deliveryType == 1 && item.otherOrder == null && this.isGroupSuccess(item);
const isSelfPickupNoMake = item.deliveryType == 2 && item.status == 3 && isNormalOrder &&
(item.userRequireMake == null || item.userRequireMake == 0) && !item.shopMakeTime;
if(item.otherOrder == 2 && (item.orderType != 1)){
return false;
}
if (isNormalOrder && item.deliveryType == 1 && this.hasNoDeliveryWorker(item)) {
return true;
@ -1366,6 +1427,7 @@
this.refundTypeStatus = 2
this.sellTime = 3
}
this.arriveTime = this.orderDetail.deliveryInfo.arriveTime ? this.formatTimeText(this.orderDetail.deliveryInfo.arriveTime) : '未到店'
if (this.payData.shopMakeTime != null) {
const date1 = new Date(this.payData.deliveryInfo.acceptTime);
const date2 = new Date(this.payData.shopMakeTime);
@ -1683,6 +1745,7 @@
if (res.code == 200) {
that.orderDetail = res.result;
that.startPayCountdown();
that.openPendingAddFeePayPopup();
if (that.orderDetail.mallRefundRecord != null && that.orderDetail.mallRefundRecord.length >
0) {
for (let i = 0; i < that.orderDetail.mallRefundRecord.length; i++) {
@ -1733,10 +1796,30 @@
let commissionAmount = deliveryInfo.deliveryFee != null
? deliveryInfo.deliveryFee
: '';
let addressId = this.orderDetail.addressId || '';
uni.navigateTo({
url: `/package1/index/deliveryPersonList?shopAreaId=${shopAreaId}&putAreaId=${putAreaId}&commissionAmount=${commissionAmount}`
url: `/package1/index/deliveryPersonList?shopAreaId=${shopAreaId}&putAreaId=${putAreaId}&commissionAmount=${commissionAmount}&addressId=${addressId}`
});
},
prepareAddFeeForWorker(data) {
if (!data || !data.worker) return;
this.pendingAddFeeWorker = data.worker;
this.additionalFee = this.formatAdditionalFee(data.additionalFee);
this.addFeeAutoPayOpened = false;
this.openPendingAddFeePayPopup();
},
openPendingAddFeePayPopup() {
if (!this.pendingAddFeeWorker || this.addFeeAutoPayOpened || !this.orderDetail.id) return;
this.additionalFee = this.formatAdditionalFee(this.additionalFee);
if (!this.additionalFee) {
this.pendingAddFeeWorker = null;
return;
}
this.addFeeAutoPayOpened = true;
setTimeout(() => {
this.$refs.addFeePayPopup.open('bottom');
}, 300);
},
handleWorkerSelected(worker) {
if (!worker) return;
uni.removeStorageSync('pendingAssignWorker');
@ -1888,11 +1971,8 @@
this.tui.toast('增加配送佣金不得超过200元');
return;
}
//
//
this.$refs.addFeePopup.close();
const now = Date.now(); // (13)
const randomPart = Math.floor(Math.random() * 1000000); // 6
//this.addFeeTradeNo = `${now}${randomPart.toString().padStart(6, '0')}`;
setTimeout(() => {
this.$refs.addFeePayPopup.open('bottom');
}, 300);
@ -1915,6 +1995,7 @@
outTradeNo: that.orderDetail.id
}, false, false).then((res) => {
if (res.code == 200) {
that.addFeeTradeNo = res.wxOrderId || res.outTradeNo || '';
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.timeStamp,
@ -1924,10 +2005,14 @@
paySign: res.paySign,
success: function(res2) {
that.$refs.addFeePayPopup.close();
that.getOrderDetail(that.orderId);
that.$forceUpdate();
if (that.addFeeTradeNo) {
that.waitAddFeeRecordAndAssign();
} else {
that.finishAddFeeSuccess();
}
},
fail: function(err) {
that.cancelPendingAddFeeAssign();
that.tui.toast('支付失败取消');
}
});
@ -1940,7 +2025,7 @@
icon: 'none'
});
setTimeout(() => {
that.callAddFeeApi();
that.callAddFeeApi(true);
}, 1500);
} else {
that.tui.toast(res.message);
@ -1948,7 +2033,72 @@
}
});
},
callAddFeeApi() {
waitAddFeeRecordAndAssign() {
this.stopAddFeePolling();
uni.showLoading({
title: '确认支付中...',
mask: true
});
this.pollAddFeeRecord(0);
},
pollAddFeeRecord(times) {
if (!this.addFeeTradeNo) {
this.finishAddFeeSuccess();
return;
}
if (times >= 30) {
uni.hideLoading();
this.cancelPendingAddFeeAssign();
this.tui.toast('未确认到支付成功,请稍后刷新后重试');
this.getOrderDetail(this.orderId);
return;
}
this.tui.request("/api/wechat/pay/delivery-fee-record/exists", "GET", {
wxOrderId: this.addFeeTradeNo
}, false, false).then((res) => {
if (res.code == 200 && (res.exists === true || res.exists == 'true')) {
this.finishAddFeeSuccess();
} else {
this.addFeePollTimer = setTimeout(() => {
this.pollAddFeeRecord(times + 1);
}, 1000);
}
}).catch(() => {
this.addFeePollTimer = setTimeout(() => {
this.pollAddFeeRecord(times + 1);
}, 1000);
});
},
stopAddFeePolling() {
if (this.addFeePollTimer) {
clearTimeout(this.addFeePollTimer);
this.addFeePollTimer = null;
}
},
cancelPendingAddFeeAssign() {
this.stopAddFeePolling();
this.pendingAddFeeWorker = null;
this.addFeeAutoPayOpened = false;
this.addFeeTradeNo = '';
this.additionalFee = '';
},
finishAddFeeSuccess() {
this.stopAddFeePolling();
uni.hideLoading();
let worker = this.pendingAddFeeWorker;
this.pendingAddFeeWorker = null;
this.addFeeAutoPayOpened = false;
this.addFeeTradeNo = '';
this.additionalFee = '';
if (worker) {
this.reassignWorker(worker);
} else {
this.tui.toast("增加佣金成功");
this.getOrderDetail(this.orderId);
this.$forceUpdate();
}
},
callAddFeeApi(assignAfterSuccess) {
let that = this;
let fee = parseFloat(this.additionalFee);
let deliveryId = '';
@ -1963,8 +2113,12 @@
}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("增加佣金成功");
that.getOrderDetail(that.orderId);
that.$forceUpdate();
if (assignAfterSuccess) {
that.finishAddFeeSuccess();
} else {
that.getOrderDetail(that.orderId);
that.$forceUpdate();
}
} else {
that.tui.toast(res.message || '增加佣金失败');
}
@ -2071,6 +2225,20 @@
border-radius: 20rpx;
}
.refund-service-btn {
width: 136rpx;
height: 54rpx;
text-align: center;
line-height: 54rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.72);
border: 1px solid rgba(0, 35, 28, 0.1);
color: #60706c;
font-size: 20rpx;
font-weight: 800;
box-shadow: 0 8rpx 18rpx rgba(0, 35, 28, 0.05);
}
.refund-goods-card {
display: flex;
padding: 18rpx;

2
package1/order/orderList.vue

@ -128,7 +128,7 @@
</view>
{{item.otherOrder == 1 ? '快递/跑腿' : item.otherOrder == 3 ? '鱼塘订单' : item.shopName}}
</view>
<view v-if="item.otherOrder == 1" style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;">
<view v-if="item.otherOrder == 1" @tap.stop="orderDetail(item.id)" style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;">
<view class="goods-img">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4130b6a412584c71949b3a03e5834453.png" alt="">
<!-- <view class="jiaobiao">

2
package1/order/returnOrder.vue

@ -242,7 +242,7 @@
</view>
<view class="reason-type-item" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" />
全额退款商家+配送员原因
全额退款商家退商品+配送员退配送费
</view>
</view>
<view class="reason-section">

32
package1/runErrand/runErrand.vue

@ -282,7 +282,7 @@
<delivery-time-op @timeCallback="timeCallback" :dodge="true" ref='model' :content="content" :barHidth='600' title="选择预送达时间">> </delivery-time-op>
<!-- 支付弹出层 -->
<uni-popup ref="payPopup" background-color="#fff">
<uni-popup ref="payPopup" background-color="#fff" @change="onPayPopupChange">
<view class="pay-popup">
<view class="content2">
<view class="box1">
@ -434,7 +434,8 @@
isCreatingOrder: false,
warnPopup: '',
availableCoupons: [],
selectedCoupon: null
selectedCoupon: null,
navigatingFromPayPopup: false
}
},
components: {
@ -580,6 +581,18 @@
this.selectedCoupon = item;
this.$refs.couponPopup.close();
},
onPayPopupChange(e) {
if (!e.show && this.currentOrderId && !this.navigatingFromPayPopup) {
this.goPayOrderDetail();
}
},
goPayOrderDetail() {
if (!this.currentOrderId) return;
this.navigatingFromPayPopup = true;
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + this.currentOrderId
});
},
getShopArea(){
if (this.shopAreaLoaded || this.shopAreaLoading) return Promise.resolve(this.shopArea);
this.shopAreaLoading = true;
@ -860,8 +873,8 @@
},
submitPay() {
uni.hideKeyboard();
if (this.currentOrderId && this.backendTotalAmount) {
this.$refs.payPopup.open('bottom');
if (this.currentOrderId) {
this.goPayOrderDetail();
return;
}
if (this.isCreatingOrder) return;
@ -959,6 +972,7 @@
getPictures: pics,
regionId: JSON.parse(uni.getStorageSync('area')).id,
deliveryFee: this.deliveryFeeCalc,
appointmentDelivery: this.formData.isImmediately === false ? 1 : 0,
userCouponId: this.selectedCoupon ? this.selectedCoupon.id : null
};
@ -989,6 +1003,7 @@
if (res.success && res.result) {
this.currentOrderId = res.result.id;
this.backendTotalAmount = res.result.deliveryFee || this.deliveryFeeCalc;
this.navigatingFromPayPopup = false;
this.$refs.payPopup.open('bottom');
} else {
uni.showToast({ title: res.message || '下单失败', icon: 'none' });
@ -1033,19 +1048,16 @@
that.handlePaymentSuccess();
},
fail: function(err) {
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + that.currentOrderId
});
that.goPayOrderDetail();
}
});
} else {
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + that.currentOrderId
});
that.goPayOrderDetail();
}
})
},
handlePaymentSuccess() {
this.navigatingFromPayPopup = true;
uni.redirectTo({
url: '/package1/order/orderDetail?id=' + this.currentOrderId
});

Loading…
Cancel
Save