wangfukang 1 month ago
parent
commit
ca4fc4f2d5
  1. 15
      package1/buyFood/buyFood.vue
  2. 72
      package1/index/deliveryPersonList.vue
  3. 97
      package1/order/orderDetail.vue
  4. 205
      package1/order/orderList.vue
  5. 10
      package1/runErrand/runErrand.vue

15
package1/buyFood/buyFood.vue

@ -358,10 +358,10 @@
<uni-popup ref="remarkPopup" type="center" background-color="transparent">
<view class="remark-popup">
<view class="remark-popup-title">填写备注</view>
<view class="remark-popup-desc">最多输入 100 </view>
<view class="remark-popup-desc">最多输入 50 </view>
<view class="remark-popup-input">
<textarea v-model="remarkInputValue" maxlength="100" placeholder="口味、餐具等备注" />
<view class="remark-popup-count">{{remarkInputValue.length}}/100</view>
<textarea v-model="remarkInputValue" maxlength="50" placeholder="口味、餐具等备注" />
<view class="remark-popup-count">{{remarkInputValue.length}}/50</view>
</view>
<view class="remark-popup-actions">
<view class="remark-popup-cancel" @tap="$refs.remarkPopup.close()">取消</view>
@ -745,6 +745,13 @@
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.initAddress()
this.updateImmediateTimeStr();
let pendingWorker = uni.getStorageSync('pendingAssignWorker');
if (pendingWorker) {
uni.removeStorageSync('pendingAssignWorker');
this.assignedWorker = pendingWorker;
this.selected = 'zhiding';
this.refreshDeliveryTimeByModeChange();
}
uni.$on('updateDeliveryWorker', (worker) => {
this.assignedWorker = worker;
@ -843,7 +850,7 @@
this.$refs.remarkPopup.open('center');
},
confirmRemark() {
this.remark = this.remarkInputValue.slice(0, 100);
this.remark = this.remarkInputValue.slice(0, 50);
this.$refs.remarkPopup.close();
},
onCustomCommissionInput(e) {

72
package1/index/deliveryPersonList.vue

@ -1,18 +1,20 @@
<template>
<!-- 配送员列表 -->
<view class="page1">
<view class="title">
<view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'top': menuButtonInfo.top +'px'}">
选择配送员
<view class="fixed-header">
<view class="title">
<view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'top': menuButtonInfo.top +'px'}">
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'top': menuButtonInfo.top +'px'}">
选择配送员
</view>
</view>
</view>
<map id="map" class="worker-map" :latitude="latitude" scale="18" :longitude="longitude" :markers="markers"></map>
</view>
<map id="map" :latitude="latitude" scale="18" :longitude="longitude" :markers="markers"
style="width: 95%;height: 300rpx;margin: 0 auto;border-radius: 20rpx;overflow: hidden;position: absolute;top: 200rpx;left: 1%;border: 4rpx solid #fff;"></map>
<view class="fixed-header-placeholder"></view>
<view class="title-sort">
<view class="sort-member" style="position: relative;">
<view @tap="checkArea">
@ -37,6 +39,9 @@
@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-title">
<img :src="worker.icon || '/static/images/img/songshu.png'"
@ -143,6 +148,11 @@
return intNum
}
},
computed: {
hasCommissionAmount() {
return this.commissionAmount !== '' && this.commissionAmount !== undefined && this.commissionAmount !== null;
}
},
onReachBottom() {
if (this.pageNum >= this.totalPages) return;
// this.status = 'loading';
@ -308,10 +318,37 @@
position: relative;
}
.fixed-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 520rpx;
z-index: 99;
background: #F5F8F5;
}
.fixed-header-placeholder {
height: 520rpx;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 30%;
height: 100%;
background-size: 100% 100%;
}
.worker-map {
width: 95%;
height: 300rpx;
margin: 0 auto;
border-radius: 20rpx;
overflow: hidden;
position: absolute;
top: 200rpx;
left: 2.5%;
border: 4rpx solid #fff;
}
.title-sreach {
@ -338,7 +375,20 @@
.title-sort {
height: 60rpx;
display: flex;
margin-top: 50rpx;
margin-top: 20rpx;
}
.commission-tip {
width: 95%;
margin: 20rpx auto 0;
padding: 18rpx 22rpx;
line-height: 36rpx;
border-radius: 16rpx;
background: rgba(255, 184, 84, 0.14);
border: 1rpx solid rgba(255, 184, 84, 0.45);
color: #8A5200;
font-size: 24rpx;
box-sizing: border-box;
}
.sort-member {

97
package1/order/orderDetail.vue

@ -482,6 +482,24 @@
{{orderDetail.payTime | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.groupInfo && orderDetail.groupInfo.successTime">
<view style="flex: 1;color: #777;font-weight: 700;">
成团时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.groupInfo.successTime | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 2">
<view style="flex: 1;color: #777;font-weight: 700;">
核销时间
</view>
<view style="color: #000;font-weight: 700;">
{{orderDetail.shopMakeTime | formatTime}}
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;">
@ -676,6 +694,44 @@
选择退款原因
</view>
<scroll-view scroll-y class="cancel-scroll" @touchmove.stop>
<view class="guize-list">
<view class="cancel-warning-card">
<view class="cancel-warning-line">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text
v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null">
取消订单需要商家同意
</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-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">
<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">
<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">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
配送员配送时长{{peisongTime}}
</text>
</view>
</view>
</view>
</view>
<view style="padding: 0 20rpx;">
<view class="cancel-type-item" v-if="orderDetail.otherOrder != 1">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
@ -718,44 +774,7 @@
</view>
</view>
</view>
<view class="guize-list">
<view class="cancel-warning-card">
<view class="cancel-warning-line">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text
v-if="(((payData.orderType == 2 || payData.orderType == 3) && payData.status == 2) || ((payData.orderType == 2 || payData.orderType == 3) && payData.status == 3) || (payData.deliveryType == 1 && payData.status == 3) || payData.status == 4) && payData.otherOrder == null">
取消订单需要商家同意
</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-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">
<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">
<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">
<uni-icons type="info" size="14" color="#ff5722"></uni-icons>
<text>
配送员配送时长{{peisongTime}}
</text>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="btn cancel-confirm-btn" @tap="returnOrder()">
确认取消
@ -807,7 +826,7 @@
{{groupBuyCancelPopupType == 'cancel' ? '确定取消拼团订单吗?' : '确定要取消拼团吗'}}
</view>
<view class="group-buy-cancel-desc" v-if="groupBuyCancelPopupType != 'cancel'">
取消后将转为直接购买并跳转至普通订单结算
取消后本单金额将退回并转为直接购买
</view>
<view class="group-buy-cancel-actions">
<view class="group-buy-cancel-btn group-buy-cancel-btn-muted" @tap="$refs.returnPopupBuy.close()">

205
package1/order/orderList.vue

@ -56,48 +56,29 @@
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 8rpx;left: 32rpx;" />
</view>
</view>
<view class="tab2">
<view class="tabs2" @tap="checkTabs2(10)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==10?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==10?'#000':'#777'}">
全部</view>
<view class="tabs2" @tap="checkTabs2(0)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==0?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==0?'#000':'#777'}">
待支付</view>
<view class="tabs2" @tap="checkTabs2(1)" v-if="tab1Checked !='quanbu' && tab1Checked == 'fantuan'"
:style="{'background':tab2Checked==1?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==1?'#000':'#777'}">
待成团</view>
<view class="tabs2" @tap="checkTabs2(2)" v-if="tab1Checked !='quanbu' && tab1Checked == 'fantuan'"
:style="{'background':tab2Checked==2?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==2?'#000':'#777'}">
待消费</view>
<view class="tabs2" @tap="checkTabs2(3)" v-if="tab1Checked !='quanbu' && tab1Checked != 'ershou'"
:style="{'background':tab2Checked==3?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==3?'#000':'#777'}">
待接单</view>
<view class="tabs2" @tap="checkTabs2(4)" v-if="tab1Checked !='quanbu' && tab1Checked != 'ershou'"
:style="{'background':tab2Checked==4?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==4?'#000':'#777'}">
待取货</view>
<view class="tabs2" @tap="checkTabs2(5)" v-if="tab1Checked !='quanbu' && tab1Checked != 'ershou'"
:style="{'background':tab2Checked==5?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==5?'#000':'#777'}">
待送达</view>
<view class="tabs2" @tap="checkTabs2(6)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==6?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==6?'#000':'#777'}">
已完成</view>
<view class="tabs2" @tap="checkTabs2(7)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==7?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==7?'#000':'#777'}">
待退款</view>
<view class="tabs2" @tap="checkTabs2(8)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==8?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==8?'#000':'#777'}">
已退款</view>
<view class="tabs2" @tap="checkTabs2(9)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==9?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==9?'#000':'#777'}">
已取消</view>
<view class="tabs2" @tap="checkTabs2(11)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==11?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==8?'#000':'#777'}">
售后中</view>
<view class="tabs2" @tap="checkTabs2(12)" v-if="tab1Checked !='quanbu'"
:style="{'background':tab2Checked==12?'rgba(166, 255, 234, 1)':'rgba(247, 248, 248, 0.6)','color':tab2Checked==9?'#000':'#777'}">
已售后</view>
<view class="tab2" v-if="tab1Checked !='quanbu'">
<view class="status-current">
<text class="status-current-label">当前状态</text>
<text class="status-current-value">{{statusFilterText}}</text>
</view>
<view class="status-filter-btn" @tap="openStatusPopup">
<text>筛选状态</text>
<uni-icons type="bottom" size="14" color="#0d4d42"></uni-icons>
</view>
</view>
</view>
<uni-popup ref="statusPopup" background-color="#fff">
<view class="status-popup">
<view class="status-popup-title">选择订单状态</view>
<view class="status-popup-sub">选择后立即刷新订单列表</view>
<view class="status-popup-list">
<view class="status-popup-item" v-for="item in statusFilterOptions" :key="item.value"
:class="{'status-popup-item-active': tab2Checked == item.value}" @tap="selectStatus(item.value)">
{{item.label}}
</view>
</view>
</view>
</uni-popup>
<view class="content" :style="{top:tab1Checked =='quanbu'?'415rpx':'500rpx'}">
<view class="empty-order" v-if="orderList.length <= 0 && loadStatus != 'loading'">
<view class="empty-icon"></view>
@ -324,6 +305,34 @@
menuButtonInfo: {}
}
},
computed: {
statusFilterOptions() {
const allOptions = [
{ label: '全部', value: 10 },
{ label: '待支付', value: 0 },
{ label: '待成团', value: 1 },
{ label: '待消费', value: 2 },
{ label: '待接单', value: 3 },
{ label: '待取货', value: 4 },
{ label: '待送达', value: 5 },
{ label: '已完成', value: 6 },
{ label: '待退款', value: 7 },
{ label: '已退款', value: 8 },
{ label: '已取消', value: 9 },
{ label: '售后中', value: 11 },
{ label: '已售后', value: 12 }
];
if (this.tab1Checked == 'fantuan') return allOptions;
if (this.tab1Checked == 'ershou') {
return allOptions.filter(item => [10, 0, 6, 7, 8, 9, 11, 12].includes(item.value));
}
return allOptions.filter(item => ![1, 2].includes(item.value));
},
statusFilterText() {
const selected = this.statusFilterOptions.find(item => item.value == this.tab2Checked);
return selected ? selected.label : '全部';
}
},
onReachBottom() {
if (this.searchForm.pageNum >= this.totalPages) return;
// this.status = 'loading';
@ -389,6 +398,7 @@
this.tab1Checked = type
if(type == 'quanbu'){
this.searchForm.searchType = 0
delete this.searchForm.searchStatus
}else if(type == 'fantuan'){
this.searchForm.searchType = 1
}else if(type == 'paotui'){
@ -398,6 +408,10 @@
}else if(type == 'ershou'){
this.searchForm.searchType = 4
}
this.tab2Checked = 10
if(type != 'quanbu') {
this.searchForm.searchStatus = this.tab2Checked
}
this.searchForm.pageNum = 1
this.getOrderList()
},
@ -487,6 +501,13 @@
this.searchForm.pageNum = 1
this.getOrderList();
},
openStatusPopup() {
this.$refs.statusPopup.open('bottom');
},
selectStatus(type) {
this.checkTabs2(type);
this.$refs.statusPopup.close();
},
payAgain(item){
this.payData = item;
this.$refs.payPopup.open('bottom');
@ -612,8 +633,11 @@
border-bottom-left-radius: 48rpx;
border-bottom-right-radius: 48rpx;
box-shadow: 0 18rpx 44rpx rgba(0, 35, 28, 0.06);
position: relative;
position: fixed;
top: 0;
left: 0;
overflow: hidden;
z-index: 10;
}
.title::after {
@ -716,7 +740,7 @@
.nav-tab {
flex-shrink: 0;
position: absolute;
position: fixed;
top: 250rpx;
left: 2.5%;
background: rgba(255, 255, 255, 0.92);
@ -726,7 +750,7 @@
box-shadow: 0 18rpx 42rpx rgba(0, 35, 28, 0.07);
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 0.86);
z-index: 1;
z-index: 11;
}
.content {
@ -759,29 +783,98 @@
}
.tab2 {
height: auto;
height: 78rpx;
width: 100%;
overflow-x: scroll;
overflow-y: hidden;
margin-top: 16rpx;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: space-between;
}
.tabs2 {
width: 156rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
.status-current {
flex: 1;
height: 72rpx;
line-height: 72rpx;
background: rgba(248, 255, 250, 0.88);
border: 1px solid rgba(166, 255, 234, 0.4);
border: 1px solid rgba(166, 255, 234, 0.36);
border-radius: 999rpx;
padding: 0 24rpx;
box-sizing: border-box;
box-shadow: 0 8rpx 18rpx rgba(0, 35, 28, 0.04);
}
.status-current-label {
color: #7b8883;
font-weight: 800;
margin-right: 18rpx;
}
.status-current-value {
color: #0d4d42;
font-weight: 900;
margin-right: 20rpx;
display: inline-block;
-webkit-overflow-scrolling: touch;
}
.status-filter-btn {
width: 190rpx;
height: 72rpx;
line-height: 72rpx;
margin-left: 18rpx;
border-radius: 999rpx;
background: rgba(166, 255, 234, 0.88);
color: #0d4d42;
font-weight: 900;
text-align: center;
box-shadow: 0 8rpx 18rpx rgba(0, 35, 28, 0.04);
}
.status-popup {
background: linear-gradient(180deg, #ffffff 0%, #f7fffb 100%);
border-radius: 40rpx 40rpx 0 0;
padding: 36rpx 30rpx 46rpx;
box-sizing: border-box;
box-shadow: 0 -18rpx 44rpx rgba(0, 35, 28, 0.12);
}
.status-popup-title {
color: #173f36;
font-size: 34rpx;
font-weight: 900;
text-align: center;
}
.status-popup-sub {
margin-top: 10rpx;
color: #74817d;
font-size: 24rpx;
text-align: center;
}
.status-popup-list {
display: flex;
flex-wrap: wrap;
margin-top: 30rpx;
}
.status-popup-item {
width: 31.3%;
height: 74rpx;
line-height: 74rpx;
margin: 0 1% 18rpx;
border-radius: 999rpx;
background: rgba(248, 255, 250, 0.9);
border: 1px solid rgba(166, 255, 234, 0.42);
box-sizing: border-box;
color: #60706c;
font-weight: 900;
text-align: center;
}
.status-popup-item-active {
background: rgba(166, 255, 234, 1);
color: #0d4d42;
box-shadow: 0 10rpx 22rpx rgba(0, 35, 28, 0.08);
}
.ziqu-xuanfu {
position: absolute;
top: 0;

10
package1/runErrand/runErrand.vue

@ -207,7 +207,7 @@
订单备注
</view>
<view style="height: 200rpx;background: rgba(247, 248, 248, 0.6);border-radius: 40rpx;padding: 20rpx;margin-top: 20rpx;flex: 1;">
<textarea v-model="addFormData.remark" cols="30" rows="10" placeholder="请填写备注" style="height: 160rpx;width: 100%;"></textarea>
<textarea v-model="addFormData.remark" maxlength="50" cols="30" rows="10" placeholder="请填写备注" style="height: 160rpx;width: 100%;"></textarea>
</view>
</view>
<view style="display: flex;height: 80rpx;line-height: 80rpx;font-weight: 700; align-items:center;padding: 0 4%;border-top: 1px solid #eee;margin-top: 10px;" @tap="openCouponPopup">
@ -469,6 +469,12 @@
const startStr = `${startTime.getHours().toString().padStart(2, '0')}:${startTime.getMinutes().toString().padStart(2, '0')}`;
const endStr = `${endTime.getHours().toString().padStart(2, '0')}:${endTime.getMinutes().toString().padStart(2, '0')}`;
this.immediateTimeStr = `${startStr}-${endStr}`;
let pendingWorker = uni.getStorageSync('pendingAssignWorker');
if (pendingWorker) {
uni.removeStorageSync('pendingAssignWorker');
this.assignedWorker = pendingWorker;
this.selectedWorker = 'zhiding';
}
uni.$on('updateDeliveryWorker', (worker) => {
this.assignedWorker = worker;
@ -906,7 +912,7 @@
shopName : shopName,
shopId: uni.getStorageSync('id'),
shopPhone: shopPhone,
remark: this.addFormData.remark,
remark: this.addFormData.remark.slice(0, 50),
allCount: this.addFormData.num,
isBig: this.addFormData.isOverweightOrOvervolume ? 1 : 0,
phoneNumber: this.addFormData.phoneNumber,

Loading…
Cancel
Save