wangfukang 1 month ago
parent
commit
9a0b224b29
  1. 64
      package1/address/addressList.vue
  2. 38
      package1/buyFood/buyFood.vue
  3. 13
      package1/index/deliveryPersonList.vue
  4. 260
      package1/order/orderDetail.vue
  5. 4
      package1/order/orderList.vue
  6. 9
      package1/order/returnOrder.vue
  7. 11
      package1/runErrand/runErrand.vue

64
package1/address/addressList.vue

@ -6,17 +6,17 @@
</view> </view>
<view style="padding-bottom: 140rpx;"> <view style="padding-bottom: 140rpx;">
<view v-for="(item, index) in addressList" :key="index" @tap="selectAddress(item)" <view v-for="(item, index) in addressList" :key="index" @tap="selectAddress(item)"
style="margin-bottom: 20rpx;display: flex;padding: 20rpx 40rpx 40rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;"> class="address-item">
<view style="flex: 1;"> <view class="address-info">
<view style="height: 70rpx;line-height: 70rpx;display: flex;align-items: center;"> <view class="address-title-row">
<text v-if="item.isDefault == 1" style="font-size: 20rpx;color: white;background: red;padding: 4rpx 12rpx;border-radius: 8rpx;margin-right: 10rpx;line-height:1;">默认</text> <text v-if="item.isDefault == 1" class="address-default-tag">默认</text>
<text style="font-size: 30rpx;font-weight: 700;">{{item.areaName || ''}}{{item.floor ? item.floor + '层' : ''}}{{item.roomNum || ''}}</text> <text class="address-title">{{item.areaName || ''}}{{item.floor ? item.floor + '层' : ''}}{{item.roomNum || ''}}</text>
</view> </view>
<view style="color: #777;"> <view style="color: #777;">
{{item.receiverName}} {{item.receiverPhone}} {{item.receiverName}} {{item.receiverPhone}}
</view> </view>
</view> </view>
<view style="display: flex; align-items: center; gap: 20rpx;"> <view class="address-actions">
<view @tap.stop="openEdit(item)" <view @tap.stop="openEdit(item)"
style="width: 88rpx;height: 50rpx;line-height: 50rpx;text-align: center;border: 1px solid #777;border-radius: 50rpx;color: #777;"> style="width: 88rpx;height: 50rpx;line-height: 50rpx;text-align: center;border: 1px solid #777;border-radius: 50rpx;color: #777;">
编辑 编辑
@ -319,6 +319,58 @@
height: 1200rpx; height: 1200rpx;
} }
.address-item {
margin-bottom: 20rpx;
display: flex;
align-items: flex-start;
padding: 20rpx 40rpx 40rpx;
background: rgba(247, 248, 248, 0.6);
border-radius: 20rpx;
}
.address-info {
flex: 1;
min-width: 0;
padding-right: 20rpx;
}
.address-title-row {
min-height: 70rpx;
display: flex;
align-items: flex-start;
padding-top: 10rpx;
}
.address-default-tag {
flex-shrink: 0;
margin-top: 8rpx;
margin-right: 10rpx;
padding: 4rpx 12rpx;
border-radius: 8rpx;
background: red;
color: #fff;
font-size: 20rpx;
line-height: 1;
}
.address-title {
flex: 1;
min-width: 0;
font-size: 30rpx;
font-weight: 700;
line-height: 42rpx;
word-break: break-all;
overflow-wrap: break-word;
}
.address-actions {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 20rpx;
padding-top: 25rpx;
}
.bottom-btn { .bottom-btn {
width: 90%; width: 90%;
height: 100rpx; height: 100rpx;

38
package1/buyFood/buyFood.vue

@ -279,9 +279,9 @@
<view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;"> <view class="fee-label" style="color: #ff5722;font-size: 24rpx;padding: 14rpx 0 18rpx;">
立即出餐-(拼团单拼团成功后立即出餐) 立即出餐-(拼团单拼团成功后立即出餐)
</view> </view>
<view class="fee-value"> <view class="fee-value" @tap="nowMakeMethod">
<view :class="nowMake ? 'radio-check' : 'radio-no-check'"> <view :class="nowMake ? 'radio-check' : 'radio-no-check'">
<uni-icons type="checkmarkempty" @tap="nowMakeMethod" size="12"></uni-icons> <uni-icons type="checkmarkempty" size="14"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
@ -292,13 +292,13 @@
<view class="pack-options"> <view class="pack-options">
<view class="pack-option" @tap="isPack = 0"> <view class="pack-option" @tap="isPack = 0">
<view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'"> <view :class="isPack === 0 ? 'radio-check' : 'radio-no-check'">
<uni-icons v-if="isPack === 0" type="checkmarkempty" size="12"></uni-icons> <uni-icons v-if="isPack === 0" type="checkmarkempty" size="14"></uni-icons>
</view> </view>
堂食 堂食
</view> </view>
<view class="pack-option" @tap="isPack = 1"> <view class="pack-option" @tap="isPack = 1">
<view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'"> <view :class="isPack === 1 ? 'radio-check' : 'radio-no-check'">
<uni-icons v-if="isPack === 1" type="checkmarkempty" size="12"></uni-icons> <uni-icons v-if="isPack === 1" type="checkmarkempty" size="14"></uni-icons>
</view> </view>
打包 打包
</view> </view>
@ -343,7 +343,7 @@
<uni-popup ref="commissionPopup" type="center" background-color="transparent"> <uni-popup ref="commissionPopup" type="center" background-color="transparent">
<view class="commission-popup"> <view class="commission-popup">
<view class="commission-popup-title">填写配送佣金</view> <view class="commission-popup-title">填写配送佣金</view>
<view class="commission-popup-desc">最低 0.1 最多输入 2 位小数</view> <view class="commission-popup-desc">最低 0.1 200 多输入 2 位小数</view>
<view class="commission-popup-input"> <view class="commission-popup-input">
<text></text> <text></text>
<input type="digit" :value="commissionInputValue" placeholder="请输入佣金" <input type="digit" :value="commissionInputValue" placeholder="请输入佣金"
@ -457,7 +457,7 @@
结束 结束
</view> </view>
<view class="kaituan4"> <view class="kaituan4">
<button open-type="share" style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;"> <button open-type="share" class="share-btn">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons> 分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</button> </button>
</view> </view>
@ -828,6 +828,11 @@
}); });
}, },
confirmCommission() { confirmCommission() {
let commission = parseFloat(this.commissionInputValue);
if (commission > 200) {
this.tui.toast('配送佣金不得超过200元');
return;
}
const value = this.formatCommissionValue(this.commissionInputValue); const value = this.formatCommissionValue(this.commissionInputValue);
this.customCommission = value; this.customCommission = value;
this.$refs.commissionPopup.close(); this.$refs.commissionPopup.close();
@ -951,6 +956,10 @@
this.$refs.warnPopup.open(); this.$refs.warnPopup.open();
return; return;
} }
if (comm > 200) {
this.tui.toast('配送佣金不得超过200元');
return;
}
} }
if (this.isPaotui && this.selected === 'zhiding' && !this.assignedWorker && !isJoiningFaceToFace) { if (this.isPaotui && this.selected === 'zhiding' && !this.assignedWorker && !isJoiningFaceToFace) {
@ -2417,6 +2426,23 @@
border: 0; border: 0;
} }
.share-btn {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: transparent;
border: none;
color: inherit;
font-size: inherit;
font-weight: inherit;
line-height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: inherit;
}
.free-order-mask { .free-order-mask {
position: fixed; position: fixed;
left: 0; left: 0;

13
package1/index/deliveryPersonList.vue

@ -128,6 +128,7 @@
regionId: JSON.parse(uni.getStorageSync('area')).id, regionId: JSON.parse(uni.getStorageSync('area')).id,
sortField: "score", sortField: "score",
putAreaId: '', putAreaId: '',
commissionAmount: '',
workerList: [], workerList: [],
orderType: null, orderType: null,
pageNum: 1, // pageNum: 1, //
@ -159,6 +160,7 @@
}); });
this.shopAreaId = option.shopAreaId || ''; this.shopAreaId = option.shopAreaId || '';
this.putAreaId = option.putAreaId || ''; this.putAreaId = option.putAreaId || '';
this.commissionAmount = option.commissionAmount || '';
this.orderType = option.orderType || 0; this.orderType = option.orderType || 0;
this.getShopList(); this.getShopList();
}, },
@ -204,6 +206,7 @@
xiangtong: this.xiangtong, xiangtong: this.xiangtong,
sortField: this.sortField, sortField: this.sortField,
regionId: this.regionId, regionId: this.regionId,
commissionAmount: this.commissionAmount,
keyword: this.keyword, keyword: this.keyword,
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize pageSize: this.pageSize
@ -221,6 +224,9 @@
} }
that.markers = [] that.markers = []
for (let i = 0; i < that.workerList.length; i++) { for (let i = 0; i < that.workerList.length; i++) {
if (!that.workerList[i].geolocation) {
continue;
}
that.workerList[i].geolocation = that.workerList[i].geolocation.split(","); that.workerList[i].geolocation = that.workerList[i].geolocation.split(",");
// // // //
that.markers.push({ that.markers.push({
@ -243,8 +249,10 @@
}); });
} }
that.latitude = that.markers[0].latitude if (that.markers.length > 0) {
that.longitude = that.markers[0].longitude that.latitude = that.markers[0].latitude
that.longitude = that.markers[0].longitude
}
that.totalPages = res.result.pages; // pages = that.totalPages = res.result.pages; // pages =
that.$forceUpdate(); that.$forceUpdate();
} }
@ -253,7 +261,6 @@
}, },
selectWorker(worker) { selectWorker(worker) {
uni.setStorageSync('pendingAssignWorker', worker); uni.setStorageSync('pendingAssignWorker', worker);
uni.$emit('updateDeliveryWorker', worker);
uni.navigateBack(); uni.navigateBack();
}, },
searchShop(type, value) { searchShop(type, value) {

260
package1/order/orderDetail.vue

@ -16,6 +16,14 @@
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;"> <view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
{{orderDetail.shopName}} {{orderDetail.shopName}}
</view> </view>
<view v-if="orderDetail.payTime != null" style="height: 64rpx;line-height: 64rpx;display: flex;">
<view style="flex: 1;color: #777;font-weight: 700;">
支付时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.payTime | formatTime}}
</view>
</view>
<view class="pintuan-goods-card" v-for="(item1,index1) in orderDetail.goodsList" :key="index1" <view class="pintuan-goods-card" v-for="(item1,index1) in orderDetail.goodsList" :key="index1"
v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0"> v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0">
<view class="goods-img1"> <view class="goods-img1">
@ -74,8 +82,7 @@
</view> </view>
<view class="pintuan-actions"> <view class="pintuan-actions">
<view class="kaituan41 kaituan41-share"> <view class="kaituan41 kaituan41-share">
<button open-type="share" class="share-btn" <button open-type="share" class="share-btn">
style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons> 分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</button> </button>
</view> </view>
@ -145,7 +152,11 @@
<text v-if="orderDetail.status == 11">售后中</text> <text v-if="orderDetail.status == 11">售后中</text>
<text v-if="orderDetail.status == 12">订单已售后</text> <text v-if="orderDetail.status == 12">订单已售后</text>
</view> </view>
<view class="status-fu" v-if="orderDetail.deliveryInfo"> <view class="status-fu" v-if="orderDetail.status == 0">
<view class="">
创建时间 <text style="color:red;font-weight: 700;">{{orderDetail.createTime | formatTime}}</text></view>
</view>
<view class="status-fu" v-else-if="orderDetail.deliveryInfo">
<view class=""> <view class="">
预计<text style="color:red;font-weight: 700;">{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达</view> 预计<text style="color:red;font-weight: 700;">{{orderDetail.deliveryInfo.mustFinishTime | formatHourMinute }}</text>送达</view>
<!-- <view class="">超过15分钟未支付订单自动取消</view> <!-- <view class="">超过15分钟未支付订单自动取消</view>
@ -154,7 +165,8 @@
<view class="">商家已拒绝取消订单将会继续为您配送</view> --> <view class="">商家已拒绝取消订单将会继续为您配送</view> -->
</view> </view>
<view class="status-address" v-if="orderDetail.deliveryInfo"> <view class="status-address" v-if="orderDetail.deliveryInfo">
送至 <text>{{orderDetail.deliveryInfo.receiverAddress}}</text> <text class="status-address-label">送至</text>
<text class="status-address-text">{{orderDetail.deliveryInfo.receiverAddress}}</text>
</view> </view>
<view class="status-btn" style="top: 0;" v-if="orderStatus(orderDetail)" <view class="status-btn" style="top: 0;" v-if="orderStatus(orderDetail)"
@tap="returnPopupProp(orderDetail)"> @tap="returnPopupProp(orderDetail)">
@ -175,7 +187,7 @@
<view class="order-flow"> <view class="order-flow">
<view class="flow-item active"> <view class="flow-item active">
<view class="flow-dot"></view> <view class="flow-dot"></view>
<view class="flow-name">已下单</view> <view class="flow-name">{{orderDetail.status == 0 ? '待支付' : '已下单'}}</view>
</view> </view>
<view class="flow-line" :class="{'active': orderDetail.status >= 3 || orderDetail.status == 5}"></view> <view class="flow-line" :class="{'active': orderDetail.status >= 3 || orderDetail.status == 5}"></view>
<view class="flow-item" :class="{'active': orderDetail.status >= 3 || orderDetail.status == 5}"> <view class="flow-item" :class="{'active': orderDetail.status >= 3 || orderDetail.status == 5}">
@ -461,6 +473,15 @@
{{orderDetail.createTime | formatTime}} {{orderDetail.createTime | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.payTime != null">
<view style="flex: 1;color: #777;font-weight: 700;">
支付时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.payTime | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1"> v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
@ -647,7 +668,7 @@
</uni-popup> </uni-popup>
<uni-popup ref="returnPopup" background-color="#fff" @change="onCancelPopupChange"> <uni-popup ref="returnPopup" background-color="#fff" @change="onCancelPopupChange">
<view class="car-content cancel-popup" v-if="orderDetail.status != 10"> <view class="car-content cancel-popup">
<view class="car-close" @tap="$refs.returnPopup.close()"> <view class="car-close" @tap="$refs.returnPopup.close()">
<uni-icons type="close" size="30" color="#fff"></uni-icons> <uni-icons type="close" size="30" color="#fff"></uni-icons>
</view> </view>
@ -744,8 +765,8 @@
<!-- 待支付订单支付弹出层 --> <!-- 待支付订单支付弹出层 -->
<uni-popup ref="payPopup" background-color="#fff"> <uni-popup ref="payPopup" background-color="#fff">
<view class="pay-popup" style="height: 580rpx;background: #fff;border-radius: 40rpx 40rpx 0 0;"> <view class="pay-popup">
<view class="content" style="height: 100%;margin-top:0;top:0"> <view class="pay-popup-content">
<view class="box1"> <view class="box1">
<view style="height: 70rpx;line-height: 70rpx;text-align: center;"> <view style="height: 70rpx;line-height: 70rpx;text-align: center;">
微信支付 微信支付
@ -780,18 +801,19 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="returnPopupBuy" background-color="#fff" style="height: 1600rpx !important;"> <uni-popup ref="returnPopupBuy" background-color="#fff">
<view class="group-buy-cancel-popup">
<view class="guize-list" style="height: 600rpx;width:300rpx;padding: 20rpx;background: #fff;"> <view class="group-buy-cancel-title">
<view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;"> {{groupBuyCancelPopupType == 'cancel' ? '确定取消拼团订单吗?' : '确定要取消拼团吗'}}
确定要取消拼团吗
</view> </view>
<view class="group-buy-cancel-desc" v-if="groupBuyCancelPopupType != 'cancel'">
<view style="display:flex;margin-top:80px;"> 取消后将转为直接购买并跳转至普通订单结算
<view class="btn" @tap="returnOrderBuy()" style="background: #777;color:#eee;"> </view>
<view class="group-buy-cancel-actions">
<view class="group-buy-cancel-btn group-buy-cancel-btn-muted" @tap="$refs.returnPopupBuy.close()">
取消 取消
</view> </view>
<view class="btn" @tap="returnOrderBuy()"> <view class="group-buy-cancel-btn group-buy-cancel-btn-confirm" @tap="confirmGroupBuyCancelPopup()">
确认 确认
</view> </view>
</view> </view>
@ -801,7 +823,7 @@
<uni-popup ref="addFeePopup" type="center" background-color="transparent"> <uni-popup ref="addFeePopup" type="center" background-color="transparent">
<view class="commission-popup"> <view class="commission-popup">
<view class="commission-popup-title">增加配送佣金</view> <view class="commission-popup-title">增加配送佣金</view>
<view class="commission-popup-desc">最低 0.1 最多输入 2 位小数</view> <view class="commission-popup-desc">最低 0.1 200 多输入 2 位小数</view>
<view class="commission-popup-input"> <view class="commission-popup-input">
<text></text> <text></text>
<input type="digit" :value="additionalFee" placeholder="请输入金额" <input type="digit" :value="additionalFee" placeholder="请输入金额"
@ -816,8 +838,8 @@
<!-- 增加佣金支付弹出层 --> <!-- 增加佣金支付弹出层 -->
<uni-popup ref="addFeePayPopup" background-color="#fff"> <uni-popup ref="addFeePayPopup" background-color="#fff">
<view class="pay-popup" style="height: 580rpx;background: #fff;border-radius: 40rpx 40rpx 0 0;"> <view class="pay-popup">
<view class="content" style="height: 100%;margin-top:0"> <view class="pay-popup-content">
<view class="box1"> <view class="box1">
<view style="height: 70rpx;line-height: 70rpx;text-align: center;"> <view style="height: 70rpx;line-height: 70rpx;text-align: center;">
增加配送佣金 增加配送佣金
@ -885,7 +907,10 @@
codeImg: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg', codeImg: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg',
additionalFee: '', additionalFee: '',
addFeeTradeNo: '', addFeeTradeNo: '',
isRefreshing: false isRefreshing: false,
groupBuyCancelPopupType: 'buy',
assignWorkerModalVisible: false,
assignWorkerSelectionKey: ''
} }
}, },
computed: { computed: {
@ -962,7 +987,6 @@
onLoad(option) { onLoad(option) {
if (option.id) { if (option.id) {
this.orderId = option.id this.orderId = option.id
this.getOrderDetail(this.orderId)
} }
// onLoad // onLoad
uni.$on('updateDeliveryWorker', (worker) => { uni.$on('updateDeliveryWorker', (worker) => {
@ -977,6 +1001,9 @@
uni.removeStorageSync('pendingAssignWorker'); uni.removeStorageSync('pendingAssignWorker');
this.handleWorkerSelected(pendingWorker); this.handleWorkerSelected(pendingWorker);
} }
if (this.orderId) {
this.getOrderDetail(this.orderId);
}
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
let that = this let that = this
@ -1173,6 +1200,10 @@
}, },
returnPopupProp(item) { returnPopupProp(item) {
this.payData = item; this.payData = item;
if (item.status == 0) {
this.cancelUnpaidOrder(item);
return;
}
if (this.payData.otherOrder == 1) { if (this.payData.otherOrder == 1) {
this.refundType = 3 this.refundType = 3
@ -1213,15 +1244,35 @@
this.peisongTime = `${fmt(hours1)}${fmt(minutes1)}${fmt(seconds1)}`; this.peisongTime = `${fmt(hours1)}${fmt(minutes1)}${fmt(seconds1)}`;
} }
if(this.orderDetail.status != 10){ if (item.status == 10) {
this.groupBuyCancelPopupType = 'cancel';
this.$refs.returnPopupBuy.open('bottom');
} else {
this.$refs.returnPopup.open('bottom'); this.$refs.returnPopup.open('bottom');
}else{
this.$refs.returnPopupBuy.open()
} }
}, },
cancelUnpaidOrder(item) {
let that = this;
that.tui.request("/mall/order/cancel", "POST", {
refundType: 3,
refundTypeStatus: 1,
orderId: item.id,
userId: uni.getStorageSync('id')
}, false, true).then((res) => {
uni.hideLoading();
if (res.code == 200) {
that.tui.toast("操作成功");
that.getOrderDetail(item.id);
that.$forceUpdate();
} else {
that.tui.toast(res.message, 2000);
}
}).catch((res) => {});
},
returnPopupPropBuy(item) { returnPopupPropBuy(item) {
this.payData = item; this.payData = item;
this.groupBuyCancelPopupType = 'buy';
if (this.payData.shopMakeTime != null) { if (this.payData.shopMakeTime != null) {
const date1 = new Date(this.payData.deliveryInfo.acceptTime); const date1 = new Date(this.payData.deliveryInfo.acceptTime);
const date2 = new Date(this.payData.shopMakeTime); const date2 = new Date(this.payData.shopMakeTime);
@ -1286,6 +1337,33 @@
}).catch((res) => {}); }).catch((res) => {});
}, },
confirmGroupBuyCancelPopup() {
if (this.groupBuyCancelPopupType == 'cancel') {
this.returnGroupOrder();
return;
}
this.returnOrderBuy();
},
returnGroupOrder() {
this.$refs.returnPopupBuy.close();
let item = this.payData;
let that = this;
that.tui.request("/mall/order/cancel", "POST", {
refundType: 3,
refundTypeStatus: 1,
orderId: item.id,
userId: uni.getStorageSync('id')
}, false, true).then((res) => {
uni.hideLoading();
if (res.code == 200) {
that.tui.toast("操作成功");
that.getOrderDetail(item.id);
that.$forceUpdate();
} else {
that.tui.toast(res.message, 2000);
}
}).catch((res) => {});
},
returnOrderBuy() { returnOrderBuy() {
this.$refs.returnPopupBuy.close(); this.$refs.returnPopupBuy.close();
let item = this.payData let item = this.payData
@ -1431,13 +1509,25 @@
} }
}, },
goAssignWorker() { goAssignWorker() {
let shopAreaId = this.orderDetail.getAreaId || ''; let deliveryInfo = this.orderDetail.deliveryInfo || {};
let putAreaId = this.orderDetail.putAreaId || ''; let shopAreaId = deliveryInfo.getAreaId || this.orderDetail.getAreaId || '';
let putAreaId = deliveryInfo.putAreaId || this.orderDetail.putAreaId || '';
let commissionAmount = deliveryInfo.deliveryFee != null
? deliveryInfo.deliveryFee
: '';
uni.navigateTo({ uni.navigateTo({
url: `/package1/index/deliveryPersonList?shopAreaId=${shopAreaId}&putAreaId=${putAreaId}` url: `/package1/index/deliveryPersonList?shopAreaId=${shopAreaId}&putAreaId=${putAreaId}&commissionAmount=${commissionAmount}`
}); });
}, },
handleWorkerSelected(worker) { handleWorkerSelected(worker) {
if (!worker) return;
uni.removeStorageSync('pendingAssignWorker');
let workerKey = this.getWorkerSelectionKey(worker);
if (this.assignWorkerModalVisible && workerKey == this.assignWorkerSelectionKey) {
return;
}
this.assignWorkerModalVisible = true;
this.assignWorkerSelectionKey = workerKey;
let that = this; let that = this;
uni.showModal({ uni.showModal({
title: '指派配送员', title: '指派配送员',
@ -1446,9 +1536,15 @@
if (res.confirm) { if (res.confirm) {
that.reassignWorker(worker); that.reassignWorker(worker);
} }
},
complete: function() {
that.assignWorkerModalVisible = false;
} }
}); });
}, },
getWorkerSelectionKey(worker) {
return String(worker.workerId || worker.id || worker.mobile || worker.workerName || '');
},
reassignWorker(worker) { reassignWorker(worker) {
let that = this; let that = this;
let deliveryId = ''; let deliveryId = '';
@ -1570,6 +1666,10 @@
this.tui.toast('请输入有效的金额'); this.tui.toast('请输入有效的金额');
return; return;
} }
if (fee > 200) {
this.tui.toast('增加配送佣金不得超过200元');
return;
}
// //
this.$refs.addFeePopup.close(); this.$refs.addFeePopup.close();
const now = Date.now(); // (13) const now = Date.now(); // (13)
@ -1584,6 +1684,10 @@
this.additionalFee = this.formatAdditionalFee(this.additionalFee); this.additionalFee = this.formatAdditionalFee(this.additionalFee);
let fee = parseFloat(this.additionalFee); let fee = parseFloat(this.additionalFee);
if (!fee || fee < 0.1) return; if (!fee || fee < 0.1) return;
if (fee > 200) {
this.tui.toast('增加配送佣金不得超过200元');
return;
}
let amountInCents = Math.round(fee * 100); let amountInCents = Math.round(fee * 100);
this.tui.request("/api/wechat/pay/unified-order", "POST", { this.tui.request("/api/wechat/pay/unified-order", "POST", {
@ -1916,8 +2020,11 @@
.status-text { .status-text {
flex: 1; flex: 1;
min-width: 0;
position: relative; position: relative;
padding-left: 20rpx; padding-left: 20rpx;
padding-right: 160rpx;
box-sizing: border-box;
} }
.status-zhu { .status-zhu {
@ -1933,8 +2040,24 @@
} }
.status-address { .status-address {
display: flex;
align-items: flex-start;
font-weight: 700; font-weight: 700;
color: #243f38; color: #243f38;
line-height: 40rpx;
word-break: break-all;
}
.status-address-label {
flex-shrink: 0;
margin-right: 8rpx;
}
.status-address-text {
flex: 1;
min-width: 0;
word-break: break-all;
overflow-wrap: break-word;
} }
.status-btn { .status-btn {
@ -2069,11 +2192,81 @@
.evaluate-content, .evaluate-content,
.car-content, .car-content,
.guize-list, .guize-list,
.group-buy-cancel-popup,
.pay-popup { .pay-popup {
border-radius: 36rpx 36rpx 0 0 !important; border-radius: 36rpx 36rpx 0 0 !important;
box-shadow: 0 -18rpx 44rpx rgba(0, 35, 28, 0.12); box-shadow: 0 -18rpx 44rpx rgba(0, 35, 28, 0.12);
} }
.pay-popup {
width: 100vw;
min-height: 580rpx;
padding: 30rpx 0 calc(28rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
background: #fff;
}
.pay-popup-content {
position: relative;
width: 100%;
height: auto;
margin-top: 0;
top: auto;
padding-bottom: 1rpx;
box-sizing: border-box;
}
.group-buy-cancel-popup {
width: 100vw;
padding: 46rpx 42rpx calc(42rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
background: #fff;
}
.group-buy-cancel-title {
color: #243f38;
font-size: 36rpx;
font-weight: 900;
line-height: 52rpx;
text-align: center;
}
.group-buy-cancel-desc {
margin-top: 16rpx;
color: #7b8883;
font-size: 26rpx;
font-weight: 700;
line-height: 38rpx;
text-align: center;
}
.group-buy-cancel-actions {
display: flex;
gap: 22rpx;
margin-top: 52rpx;
}
.group-buy-cancel-btn {
flex: 1;
height: 88rpx;
border-radius: 999rpx;
font-size: 28rpx;
font-weight: 900;
line-height: 88rpx;
text-align: center;
}
.group-buy-cancel-btn-muted {
background: #f0f2f1;
color: #7b8883;
}
.group-buy-cancel-btn-confirm {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
box-shadow: 0 14rpx 28rpx rgba(0, 191, 160, 0.12);
}
.cancel-popup { .cancel-popup {
max-height: 86vh; max-height: 86vh;
padding: 20rpx 20rpx 0 !important; padding: 20rpx 20rpx 0 !important;
@ -2577,9 +2770,20 @@
} }
.share-btn { .share-btn {
width: 100%;
height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
background: transparent;
border: none;
color: inherit;
font-size: inherit;
font-weight: inherit;
line-height: 88rpx; line-height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: inherit;
} }
.evaluate-list { .evaluate-list {

4
package1/order/orderList.vue

@ -195,10 +195,10 @@
取消订单 取消订单
</view> --> </view> -->
<view class="btn1" v-if="item.status == 0" @tap="payAgain(item)" <!-- <view class="btn1" v-if="item.status == 0" @tap="payAgain(item)"
style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));color: #000;"> style="background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));color: #000;">
去支付 去支付
</view> </view> -->
<view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;" @tap.stop="orderDetail(item.id)"> <view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;" @tap.stop="orderDetail(item.id)">
查看订单 查看订单
</view> </view>

9
package1/order/returnOrder.vue

@ -65,6 +65,15 @@
{{orderDetail.packageFee}} {{orderDetail.packageFee}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.freeAmount != null && orderDetail.freeAmount > 0">
<view style="flex: 1;color: #ff6f2c;font-weight: 700;">
锦鲤免单
</view>
<view style="color: #ff6f2c;font-weight:700;">
{{orderDetail.freeAmount == undefined ? '' : orderDetail.freeAmount}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1"> v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">

11
package1/runErrand/runErrand.vue

@ -315,7 +315,7 @@
<uni-popup ref="commissionPopup" type="center" background-color="transparent"> <uni-popup ref="commissionPopup" type="center" background-color="transparent">
<view class="commission-popup"> <view class="commission-popup">
<view class="commission-popup-title">填写配送佣金</view> <view class="commission-popup-title">填写配送佣金</view>
<view class="commission-popup-desc">最低 0.1 最多输入 2 位小数</view> <view class="commission-popup-desc">最低 0.1 200 多输入 2 位小数</view>
<view class="commission-popup-input"> <view class="commission-popup-input">
<text></text> <text></text>
<input type="digit" :value="commissionInputValue" placeholder="请输入佣金" <input type="digit" :value="commissionInputValue" placeholder="请输入佣金"
@ -510,6 +510,11 @@
return value; return value;
}, },
confirmCommission() { confirmCommission() {
let commission = parseFloat(this.commissionInputValue);
if (commission > 200) {
this.tui.toast('配送佣金不得超过200元');
return;
}
this.customCommission = this.formatCommissionValue(this.commissionInputValue); this.customCommission = this.formatCommissionValue(this.commissionInputValue);
this.$refs.commissionPopup.close(); this.$refs.commissionPopup.close();
this.fetchCoupons(); this.fetchCoupons();
@ -848,6 +853,10 @@
this.$refs.warnPopup.open(); this.$refs.warnPopup.open();
return; return;
} }
if (comm > 200) {
this.tui.toast('配送佣金不得超过200元');
return;
}
} }
if (this.selectedWorker === 'zhiding' && !this.assignedWorker) { if (this.selectedWorker === 'zhiding' && !this.assignedWorker) {
this.warnPopup = 'psy'; this.warnPopup = 'psy';

Loading…
Cancel
Save