tianyi 3 weeks ago
parent
commit
fcff98db19
  1. 288
      components/tab-bar/delivery.vue
  2. 2
      components/tab-bar/tab-bar.vue

288
components/tab-bar/delivery.vue

@ -36,15 +36,21 @@
</view> </view>
<view style="height: 50rpx;width: 95%;margin: -200rpx auto 0;display: flex;line-height: 50rpx;"> <view style="height: 50rpx;width: 95%;margin: -200rpx auto 0;display: flex;line-height: 50rpx;">
<view class="guize-box1" :style="{'background':tab1Checked1 == 'fantuan'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('fantuan')"> <view class="guize-box1"
:style="{'background':tab1Checked1 == 'fantuan'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}"
@tap="chooseType('fantuan')">
<uni-icons type="info" size="10"></uni-icons> <uni-icons type="info" size="10"></uni-icons>
饭团 饭团
</view> </view>
<view class="guize-box1" :style="{'background':tab1Checked1 == 'kuaidi'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('kuaidi')"> <view class="guize-box1"
:style="{'background':tab1Checked1 == 'kuaidi'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}"
@tap="chooseType('kuaidi')">
<uni-icons type="info" size="10"></uni-icons> <uni-icons type="info" size="10"></uni-icons>
快递 快递
</view> </view>
<view class="guize-box1" :style="{'background':tab1Checked1 == 'paotui'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('paotui')"> <view class="guize-box1"
:style="{'background':tab1Checked1 == 'paotui'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}"
@tap="chooseType('paotui')">
<uni-icons type="info" size="10"></uni-icons> <uni-icons type="info" size="10"></uni-icons>
跑腿 跑腿
</view> </view>
@ -73,10 +79,12 @@
style="height: 40rpx;line-height: 40rpx;background: rgba(255, 233, 89, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;"> style="height: 40rpx;line-height: 40rpx;background: rgba(255, 233, 89, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;">
外卖 外卖
</view> </view>
<view v-if="item.deliveryType == 2" style="height: 40rpx;line-height: 40rpx;background: rgba(255, 220, 199, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;"> <view v-if="item.deliveryType == 2"
style="height: 40rpx;line-height: 40rpx;background: rgba(255, 220, 199, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;">
代取快递 代取快递
</view> </view>
<view v-if="item.deliveryType == 3" style="height: 40rpx;line-height: 40rpx;background: rgba(130, 255, 130, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;"> <view v-if="item.deliveryType == 3"
style="height: 40rpx;line-height: 40rpx;background: rgba(130, 255, 130, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;">
代跑腿 代跑腿
</view> </view>
<view class="" :style="{'color':shouldNotify(item.mustFinishTime)?'red':''}"> <view class="" :style="{'color':shouldNotify(item.mustFinishTime)?'red':''}">
@ -105,7 +113,9 @@
</view> </view>
<view style="display: flex;padding: 20rpx 0;"> <view style="display: flex;padding: 20rpx 0;">
<img @tap="largeImg" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png" alt="" style="width: 90rpx;height: 106rpx;background-size: 100%;margin-right:20rpx;"/> <img @tap="largeImg"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
alt="" style="width: 90rpx;height: 106rpx;background-size: 100%;margin-right:20rpx;" />
</view> </view>
<!-- <view style="display: flex;padding: 10px 0;"> <!-- <view style="display: flex;padding: 10px 0;">
<view class="code-box" style="margin-right:10px;"> <view class="code-box" style="margin-right:10px;">
@ -118,7 +128,7 @@
</view> </view>
</view> --> </view> -->
</view> </view>
<view style="display: flex;border-radius: 20rpx;margin-top: 32rpx;"> <view style="display: flex;border-radius: 20rpx;margin-top: 32rpx;border: 1px solid rgba(166, 255, 234, 0.78);padding: 10px;">
<view class="goods-content"> <view class="goods-content">
<view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;"> <view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png" <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
@ -151,7 +161,7 @@
<view class=""> <view class="">
{{item.receiverName}} {{item.receiverName}}
</view> </view>
<view style="color: #777;"> <view class="shop-address" style="color: #777;">
{{item.receiverAddress}} {{item.receiverAddress}}
</view> </view>
</view> </view>
@ -163,10 +173,10 @@
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;border-radius: 20rpx;margin-top: 10rpx;"> <view style="display: flex;border-radius: 20rpx;margin-top: 20rpx;">
<view class="goods-content"> <view class="goods-content">
<view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;"> <view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;">
<img src="" alt="" style="width: 50rpx;height: 50rpx;" />
<view style="flex: 1;display: flex;"> <view style="flex: 1;display: flex;">
<view style="color: #777;display: flex;"> <view style="color: #777;display: flex;">
配送佣金 配送佣金
@ -175,7 +185,8 @@
</view> </view>
</view> </view>
<view style="flex: 1;text-align: right;"> <view style="flex: 1;text-align: right;">
{{item.deliveryFee}} <text style="color: #777;font-size: 20rpx;"v-if="item.deliveryFeeMarketplace != null">包含{{item.deliveryFeeMarketplace}}平台佣金</text> {{item.deliveryFee}} <text style="color: #777;font-size: 20rpx;"
v-if="item.deliveryFeeMarketplace != null">包含{{item.deliveryFeeMarketplace}}平台佣金</text>
</view> </view>
</view> </view>
</view> </view>
@ -187,13 +198,19 @@
</view> </view>
</view> </view>
<view v-else style="width: 100%;height: 100rpx;margin-top: 32rpx;"> <view v-else style="width: 100%;height: 100rpx;margin-top: 32rpx;">
<img v-if="item.status == 1 && item.arriveTime == null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d649c22310874f19a74cf8dfbb1c7240.png" <img v-if="item.status == 1 && item.arriveTime == null"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,1)"/> src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d649c22310874f19a74cf8dfbb1c7240.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;"
@tap="changeStatus(index,item,1)" />
<!-- <view style="width: 20%;" @tap="changeOthers(item,1)">转单</view> --> <!-- <view style="width: 20%;" @tap="changeOthers(item,1)">转单</view> -->
<img v-if="item.status == 1 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png" <img v-if="item.status == 1 && item.arriveTime != null"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,2)"/> src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
<img v-if="item.status == 2 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a8cdd6d86e9140df86d3c3c60356bd53.png" alt="" style="width: 100%;height: 100rpx;background-size: 100%;"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,3)" /> @tap="changeStatus(index,item,2)" />
<img v-if="item.status == 2 && item.arriveTime != null"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a8cdd6d86e9140df86d3c3c60356bd53.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;"
@tap="changeStatus(index,item,3)" />
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -201,7 +218,8 @@
<!-- 设置指派单规则弹窗 --> <!-- 设置指派单规则弹窗 -->
<uni-popup ref="carPopup" background-color="#fff" style="height: 1600rpx !important;"> <uni-popup ref="carPopup" background-color="#fff" style="height: 1600rpx !important;">
<view class="guize-list"> <view class="guize-list">
<view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;"> <view
style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;">
设置指派单规则 设置指派单规则
</view> </view>
<view class="zhipai-box"> <view class="zhipai-box">
@ -214,14 +232,17 @@
<scroll-view scroll-y="true" style="min-height: 500rpx;"> <scroll-view scroll-y="true" style="min-height: 500rpx;">
<view style="height: 50rpx;line-height: 50rpx;font-weight: 700;display: flex;"> <view style="height: 50rpx;line-height: 50rpx;font-weight: 700;display: flex;">
外卖规则 外卖规则
<view @tap="allCheck('waimai')" v-if="zhipaiCheck" style="color: #1E90FF;flex:1;text-align: right;padding-right: 20rpx;"> <view @tap="allCheck('waimai')" v-if="zhipaiCheck"
style="color: #1E90FF;flex:1;text-align: right;padding-right: 20rpx;">
全选 全选
</view> </view>
</view> </view>
<view class="guize1" v-for="(item, index) in waimaRuleList" :key="index" <view class="guize1" v-for="(item, index) in waimaRuleList" :key="index"
style="flex-direction: column; padding-bottom: 20rpx; border-bottom: 1px solid #ddd;position: relative;"> style="flex-direction: column; padding-bottom: 20rpx; border-bottom: 1px solid #ddd;position: relative;">
<view v-if="!zhipaiCheck" style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(255, 255, 255, 0.5);"></view> <view v-if="!zhipaiCheck"
style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(255, 255, 255, 0.5);">
</view>
<view style="display: flex; width: 100%;" @tap="checkVoucher(index,'waimai')"> <view style="display: flex; width: 100%;" @tap="checkVoucher(index,'waimai')">
<view class="guize1-qusong"> <view class="guize1-qusong">
<view class="qusong1"> <view class="qusong1">
@ -249,14 +270,17 @@
</view> </view>
<view style="height: 50rpx;line-height: 50rpx;font-weight: 700;display: flex;"> <view style="height: 50rpx;line-height: 50rpx;font-weight: 700;display: flex;">
跑腿规则 跑腿规则
<view @tap="allCheck('paotui')" v-if="zhipaiCheck" style="color: #1E90FF;flex:1;text-align: right;padding-right: 20rpx;"> <view @tap="allCheck('paotui')" v-if="zhipaiCheck"
style="color: #1E90FF;flex:1;text-align: right;padding-right: 20rpx;">
全选 全选
</view> </view>
</view> </view>
<view class="guize1" v-for="(item, index) in paotuiRuleList" :key="index" <view class="guize1" v-for="(item, index) in paotuiRuleList" :key="index"
style="flex-direction: column; padding-bottom: 20rpx; border-bottom: 1px solid #ddd;position: relative;"> style="flex-direction: column; padding-bottom: 20rpx; border-bottom: 1px solid #ddd;position: relative;">
<view v-if="!zhipaiCheck" style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(255, 255, 255, 0.5);"></view> <view v-if="!zhipaiCheck"
style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(255, 255, 255, 0.5);">
</view>
<view style="display: flex; width: 100%;" @tap="checkVoucher(index,'paotui')"> <view style="display: flex; width: 100%;" @tap="checkVoucher(index,'paotui')">
<view class="guize1-qusong"> <view class="guize1-qusong">
<view class="qusong1"> <view class="qusong1">
@ -300,13 +324,34 @@
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="productPopup" background-color="#fff"> <uni-popup ref="productPopup" background-color="transparent">
<view class="popup-area-content" style="height: 1200rpx;overflow: scroll;"> <view class="product-popup-content">
<view class="popup-area-title"> <view class="product-popup-header">
<text>订单详情</text> <view class="product-popup-title">商品详情</view>
<view class="product-popup-subtitle">请核对商品规格和数量</view>
</view>
<view class="product-popup-list" v-if="productData != null && productData.length > 0">
<view class="product-popup-card" v-for="(item1,index1) in productData" :key="index1">
<view class="product-popup-img">
<img :src="item1.productPicture" alt="">
</view>
<view class="product-popup-info">
<view class="product-popup-name">
{{item1.productName}}
</view>
<view class="product-popup-spec">
<text class="product-popup-label">规格</text>
<text class="product-popup-spec-text">{{item1.specs | delNode}}</text>
</view> </view>
<view class="popup-area-container" v-for="(item,index) in productData" :key="index"> </view>
<text style="display: inline-block">{{item.productName}} {{item.specs}} * {{item.quantity}}</text> <view class="product-popup-quantity">
<view class="product-popup-quantity-num">x{{item1.quantity}}</view>
<view class="product-popup-quantity-label">数量</view>
</view>
</view>
</view>
<view class="product-popup-empty" v-else>
暂无商品详情
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -387,6 +432,23 @@
// --: // --:
return `${day}${hour}:${minute}`; return `${day}${hour}:${minute}`;
},
delNode(data) {
// 1.
let str;
if (typeof data === 'object' && data !== null) {
// JSON
str = JSON.stringify(data);
} else if (typeof data === 'string') {
str = data;
} else {
//
str = String(data);
}
// 2. { } "
const result = str.replace(/[{}"]/g, '');
return result;
} }
}, },
methods: { methods: {
@ -419,7 +481,10 @@
that.latitude = res.latitude; that.latitude = res.latitude;
that.longitude = res.longitude; that.longitude = res.longitude;
that.tui.request('/worker/admin/editLocation', "POST", {workerId:item.workerId,geolocation:that.latitude + ',' + that.longitude}, false, false,true).then((res) => { that.tui.request('/worker/admin/editLocation', "POST", {
workerId: item.workerId,
geolocation: that.latitude + ',' + that.longitude
}, false, false, true).then((res) => {
}).catch((res) => {}); }).catch((res) => {});
}, },
@ -681,7 +746,11 @@
let that = this let that = this
this.getUserLocation(item) this.getUserLocation(item)
that.tui.request(url, "POST", {regionId:regionId,deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => { that.tui.request(url, "POST", {
regionId: regionId,
deliveryId: item.id,
workerId: item.workerId
}, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (status == 2 || status == 3) { if (status == 2 || status == 3) {
that.pageData.splice(index, 1) that.pageData.splice(index, 1)
@ -772,7 +841,7 @@
} }
</script> </script>
<style> <style lang="scss">
page { page {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -895,9 +964,10 @@
flex: 1; flex: 1;
min-width: 0; min-width: 0;
color: #777; color: #777;
overflow: hidden; line-height: 40rpx;
text-overflow: ellipsis; word-wrap: break-word;
white-space: nowrap; word-break: break-all;
white-space: normal;
} }
.refund-status { .refund-status {
@ -942,6 +1012,7 @@
flex: 1; flex: 1;
text-align: right; text-align: right;
} }
.radio-check { .radio-check {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
width: 48rpx; width: 48rpx;
@ -951,6 +1022,7 @@
line-height: 48rpx; line-height: 48rpx;
margin: 16rpx 20rpx 0 0; margin: 16rpx 20rpx 0 0;
} }
.radio-no-check { .radio-no-check {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
@ -958,6 +1030,7 @@
border: 1px solid #eee; border: 1px solid #eee;
margin: 16rpx 20rpx 0 0; margin: 16rpx 20rpx 0 0;
} }
.guize1-qusong { .guize1-qusong {
display: flex; display: flex;
flex: 1; flex: 1;
@ -1001,6 +1074,7 @@
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
flex: 1; flex: 1;
} }
.btn { .btn {
width: 95%; width: 95%;
height: 100rpx; height: 100rpx;
@ -1013,6 +1087,7 @@
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
flex: 1; flex: 1;
} }
.code-box { .code-box {
display: inline-block; display: inline-block;
height: 32rpx; height: 32rpx;
@ -1023,10 +1098,12 @@
color: #000; color: #000;
border: 1px solid rgba(2, 251, 221, 1); border: 1px solid rgba(2, 251, 221, 1);
} }
.img-popup-content { .img-popup-content {
width: 500rpx; width: 500rpx;
height: 500rpx; height: 500rpx;
} }
.chaoda { .chaoda {
height: 30rpx; height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
@ -1036,15 +1113,18 @@
color: #fff; color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
} }
.shangxian-btn { .shangxian-btn {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/7620b3eed7b14bb69d3c456ed0be72b3.png') no-repeat; background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/7620b3eed7b14bb69d3c456ed0be72b3.png') no-repeat;
padding-left: 16rpx; padding-left: 16rpx;
} }
.lixian-btn { .lixian-btn {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/462cacb9682f4919a3e750700bbc5f3e.png') no-repeat; background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/462cacb9682f4919a3e750700bbc5f3e.png') no-repeat;
text-align: right; text-align: right;
padding-right: 16rpx; padding-right: 16rpx;
} }
.shangxia-btn { .shangxia-btn {
width: 132rpx; width: 132rpx;
height: 50rpx; height: 50rpx;
@ -1052,6 +1132,7 @@
font-size: 20rpx; font-size: 20rpx;
font-weight: 700; font-weight: 700;
} }
.guize-box { .guize-box {
font-size: 20rpx; font-size: 20rpx;
font-weight: 700; font-weight: 700;
@ -1062,6 +1143,7 @@
margin-right: 15rpx; margin-right: 15rpx;
padding-left: 10rpx; padding-left: 10rpx;
} }
.guize-box1 { .guize-box1 {
font-size: 20rpx; font-size: 20rpx;
font-weight: 700; font-weight: 700;
@ -1072,4 +1154,142 @@
margin-right: 15rpx; margin-right: 15rpx;
padding-left: 10rpx; padding-left: 10rpx;
} }
.product-popup-content {
width: 680rpx;
max-height: 880rpx;
padding: 34rpx 28rpx 30rpx;
box-sizing: border-box;
overflow: scroll;
border-radius: 36rpx;
background:
radial-gradient(circle at 92% 4%, rgba(166, 255, 234, 0.38) 0, rgba(166, 255, 234, 0) 180rpx),
linear-gradient(180deg, #ffffff 0%, #f8fffc 100%);
box-shadow: 0 24rpx 56rpx rgba(0, 35, 28, 0.18);
}
.product-popup-header {
margin-bottom: 26rpx;
text-align: center;
}
.product-popup-title {
color: #143d35;
font-size: 36rpx;
font-weight: 900;
line-height: 48rpx;
}
.product-popup-subtitle {
margin-top: 8rpx;
color: #7b8a85;
font-size: 24rpx;
line-height: 34rpx;
}
.product-popup-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.product-popup-card {
display: flex;
align-items: center;
padding: 22rpx;
border: 1px solid rgba(166, 255, 234, 0.58);
border-radius: 28rpx;
background: rgba(255, 255, 255, 0.88);
box-shadow: 0 12rpx 28rpx rgba(0, 35, 28, 0.06);
}
.product-popup-img {
width: 128rpx;
height: 128rpx;
flex-shrink: 0;
overflow: hidden;
border-radius: 22rpx;
background: #f0f5f3;
img {
width: 100%;
height: 100%;
background-size: 100%;
}
}
.product-popup-info {
flex: 1;
min-width: 0;
padding: 0 22rpx;
}
.product-popup-name {
color: #172f2a;
font-size: 30rpx;
font-weight: 900;
line-height: 42rpx;
}
.product-popup-spec {
display: flex;
align-items: flex-start;
margin-top: 16rpx;
}
.product-popup-label {
flex-shrink: 0;
height: 34rpx;
padding: 0 14rpx;
border-radius: 999rpx;
background: rgba(166, 255, 234, 0.72);
color: #126255;
font-size: 20rpx;
font-weight: 800;
line-height: 34rpx;
}
.product-popup-spec-text {
flex: 1;
margin-left: 12rpx;
color: #65736f;
font-size: 24rpx;
line-height: 34rpx;
word-break: break-all;
}
.product-popup-quantity {
width: 92rpx;
height: 92rpx;
flex-shrink: 0;
border-radius: 28rpx;
background: linear-gradient(135deg, #fff4ce 0%, #a6ffea 100%);
color: #103f36;
text-align: center;
box-shadow: 0 10rpx 20rpx rgba(0, 35, 28, 0.08);
}
.product-popup-quantity-num {
padding-top: 16rpx;
font-size: 30rpx;
font-weight: 900;
line-height: 34rpx;
}
.product-popup-quantity-label {
margin-top: 2rpx;
color: #52736b;
font-size: 20rpx;
line-height: 28rpx;
}
.product-popup-empty {
padding: 80rpx 20rpx;
border-radius: 28rpx;
background: rgba(247, 255, 251, 0.9);
color: #7b8a85;
font-size: 28rpx;
font-weight: 700;
text-align: center;
}
</style> </style>

2
components/tab-bar/tab-bar.vue

@ -197,7 +197,7 @@
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
z-index: 9; z-index: 998;
border-top: 1px solid #eee; border-top: 1px solid #eee;
border-top-left-radius: 60rpx; border-top-left-radius: 60rpx;
border-top-right-radius: 60rpx; border-top-right-radius: 60rpx;

Loading…
Cancel
Save