tianyi 1 month ago
parent
commit
fcff98db19
  1. 446
      components/tab-bar/delivery.vue
  2. 2
      components/tab-bar/tab-bar.vue

446
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>
<view class="popup-area-container" v-for="(item,index) in productData" :key="index"> <view class="product-popup-quantity">
<text style="display: inline-block">{{item.productName}} {{item.specs}} * {{item.quantity}}</text> <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>
@ -321,31 +366,31 @@
export default { export default {
data() { data() {
return { return {
isOnLine:1, isOnLine: 1,
bigImg:'', bigImg: '',
zhipaiCheck: false, zhipaiCheck: false,
tab1Checked: 'daiqu', tab1Checked: 'daiqu',
menuButtonInfo: {}, menuButtonInfo: {},
isArea: false, isArea: false,
latitude: 39.909, // latitude: 39.909, //
longitude: 116.39742, // longitude: 116.39742, //
productData:{}, productData: {},
searchForm:{ searchForm: {
status: 1, status: 1,
pageNum:1, pageNum: 1,
pageSize: 10, pageSize: 10,
order:'', order: '',
regionId:'', regionId: '',
deliveryType: null, deliveryType: null,
workerId: uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : '' workerId: uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : ''
}, },
waimaRuleList: [], waimaRuleList: [],
tab1Checked1:'', tab1Checked1: '',
pageData:[], pageData: [],
deliveryItem:[], deliveryItem: [],
deliveryItem1:[], deliveryItem1: [],
selectRuleList: [], selectRuleList: [],
totalPages:1, totalPages: 1,
paotuiRuleList: [], paotuiRuleList: [],
lineStatus: [{ lineStatus: [{
title: '上线', title: '上线',
@ -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: {
@ -398,10 +460,10 @@
console.log("配送初始化") console.log("配送初始化")
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.isOnLine = uni.getStorageSync('worker').isOnLine this.isOnLine = uni.getStorageSync('worker').isOnLine
if(uni.getStorageSync('area')){ if (uni.getStorageSync('area')) {
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id; this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id;
} }
if(uni.getStorageSync('worker')){ if (uni.getStorageSync('worker')) {
this.searchForm.workerId = uni.getStorageSync('worker').workerId this.searchForm.workerId = uni.getStorageSync('worker').workerId
} }
this.$forceUpdate() this.$forceUpdate()
@ -413,13 +475,16 @@
let that = this; let that = this;
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
isHighAccuracy:true, isHighAccuracy: true,
success: (res) => { success: (res) => {
console.log('位置', res) console.log('位置', res)
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) => {});
}, },
@ -428,23 +493,23 @@
} }
}); });
}, },
onReachPage(){ onReachPage() {
console.log("11111") console.log("11111")
if (this.searchForm.pageNum >= this.totalPages) return; if (this.searchForm.pageNum >= this.totalPages) return;
this.searchForm.pageNum++; this.searchForm.pageNum++;
this.getDelivery(); this.getDelivery();
}, },
chooseType(type){ chooseType(type) {
if(this.tab1Checked1 == type){ if (this.tab1Checked1 == type) {
this.tab1Checked1 = '' this.tab1Checked1 = ''
this.searchForm.deliveryType = null this.searchForm.deliveryType = null
}else{ } else {
this.tab1Checked1 = type; this.tab1Checked1 = type;
if(type == 'fantuan'){ if (type == 'fantuan') {
this.searchForm.deliveryType = 1 this.searchForm.deliveryType = 1
}else if(type == 'kuaidi'){ } else if (type == 'kuaidi') {
this.searchForm.deliveryType = 2 this.searchForm.deliveryType = 2
}else if(type == 'paotui'){ } else if (type == 'paotui') {
this.searchForm.deliveryType = 3 this.searchForm.deliveryType = 3
} }
} }
@ -466,20 +531,20 @@
// diffMs <= 0 100 < diffMs < 600000 // diffMs <= 0 100 < diffMs < 600000
return diffMs <= 0 || diffMs < 10 * 60 * 1000; return diffMs <= 0 || diffMs < 10 * 60 * 1000;
}, },
getDelivery(){ getDelivery() {
let that = this let that = this
console.log('1111',uni.getStorageSync('worker')) console.log('1111', uni.getStorageSync('worker'))
this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => { this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => {
that.loadStatus = 'nomore'; that.loadStatus = 'nomore';
if (res.code == 200) { if (res.code == 200) {
if(this.searchForm.status == 1){ if (this.searchForm.status == 1) {
if (that.searchForm.pageNum == 1) { if (that.searchForm.pageNum == 1) {
that.deliveryItem1 = res.result.records; that.deliveryItem1 = res.result.records;
} else { } else {
that.deliveryItem1 = [...that.deliveryItem1, ...res.result.records] that.deliveryItem1 = [...that.deliveryItem1, ...res.result.records]
} }
that.pageData = that.deliveryItem1 that.pageData = that.deliveryItem1
}else{ } else {
if (that.searchForm.pageNum == 1) { if (that.searchForm.pageNum == 1) {
that.deliveryItem = res.result.records; that.deliveryItem = res.result.records;
} else { } else {
@ -491,7 +556,7 @@
that.totalPages = res.result.pages; // pages = that.totalPages = res.result.pages; // pages =
that.$forceUpdate(); that.$forceUpdate();
} else { } else {
that.tui.toast(res.message,1000); that.tui.toast(res.message, 1000);
return; return;
} }
uni.hideLoading(); uni.hideLoading();
@ -505,21 +570,21 @@
zhipaiChange(e) { zhipaiChange(e) {
this.zhipaiCheck = e.detail.value this.zhipaiCheck = e.detail.value
}, },
checkVoucher(index,type) { checkVoucher(index, type) {
if (type == 'waimai'){ if (type == 'waimai') {
this.waimaRuleList[index].isChecked = !this.waimaRuleList[index].isChecked this.waimaRuleList[index].isChecked = !this.waimaRuleList[index].isChecked
}else{ } else {
this.paotuiRuleList[index].isChecked = !this.paotuiRuleList[index].isChecked this.paotuiRuleList[index].isChecked = !this.paotuiRuleList[index].isChecked
} }
}, },
productDetail(item){ productDetail(item) {
this.productData = item.goodsList; this.productData = item.goodsList;
this.$refs.productPopup.open() this.$refs.productPopup.open()
}, },
buchong(){ buchong() {
this.$refs.carPopup.close() this.$refs.carPopup.close()
uni.navigateTo({ uni.navigateTo({
url:'/package1/myCenter/partTimeJobRegister' url: '/package1/myCenter/partTimeJobRegister'
}) })
}, },
@ -533,26 +598,26 @@
this.selectRuleList = [] this.selectRuleList = []
this.waimaiData = [] this.waimaiData = []
this.kuaidiData = [] this.kuaidiData = []
for(let i=0;i<this.waimaRuleList.length;i++){ for (let i = 0; i < this.waimaRuleList.length; i++) {
let rule = { let rule = {
id: this.waimaRuleList[i].id, id: this.waimaRuleList[i].id,
getPushOrder: 1 getPushOrder: 1
} }
if(!this.waimaRuleList[i].isChecked){ if (!this.waimaRuleList[i].isChecked) {
rule.getPushOrder = 0 rule.getPushOrder = 0
}else{ } else {
this.waimaiData.push(this.waimaRuleList[i]) this.waimaiData.push(this.waimaRuleList[i])
} }
this.selectRuleList.push(rule) this.selectRuleList.push(rule)
} }
for(let i=0;i<this.paotuiRuleList.length;i++){ for (let i = 0; i < this.paotuiRuleList.length; i++) {
let rule = { let rule = {
id: this.paotuiRuleList[i].id, id: this.paotuiRuleList[i].id,
getPushOrder: 1 getPushOrder: 1
} }
if(!this.paotuiRuleList[i].isChecked){ if (!this.paotuiRuleList[i].isChecked) {
rule.getPushOrder = 0 rule.getPushOrder = 0
}else{ } else {
this.kuaidiData.push(this.paotuiRuleList[i]) this.kuaidiData.push(this.paotuiRuleList[i])
} }
this.selectRuleList.push(rule) this.selectRuleList.push(rule)
@ -560,7 +625,7 @@
let submitData = { let submitData = {
userId: uni.getStorageSync('id'), userId: uni.getStorageSync('id'),
workerRelaPriceList: this.selectRuleList, workerRelaPriceList: this.selectRuleList,
getPushOrder: this.zhipaiCheck?1:0 getPushOrder: this.zhipaiCheck ? 1 : 0
}; };
let that = this; let that = this;
this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => { this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => {
@ -569,9 +634,9 @@
let worker = uni.getStorageSync('worker') || {}; // let worker = uni.getStorageSync('worker') || {}; //
worker.getPushOrder = that.zhipaiCheck ? 1 : 0; worker.getPushOrder = that.zhipaiCheck ? 1 : 0;
uni.setStorageSync('worker', worker); uni.setStorageSync('worker', worker);
uni.setStorageSync('waimaiData',that.waimaiData) uni.setStorageSync('waimaiData', that.waimaiData)
uni.setStorageSync('kuaidiData',that.kuaidiData) uni.setStorageSync('kuaidiData', that.kuaidiData)
if(that.zhipaiCheck == false){ if (that.zhipaiCheck == false) {
uni.removeStorageSync('waimaiData') uni.removeStorageSync('waimaiData')
uni.removeStorageSync('kuaidiData') uni.removeStorageSync('kuaidiData')
} }
@ -589,20 +654,20 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
allCheck(type){ allCheck(type) {
let data = [] let data = []
if(type=='waimai'){ if (type == 'waimai') {
data = this.waimaRuleList data = this.waimaRuleList
}else{ } else {
data = this.paotuiRuleList data = this.paotuiRuleList
} }
for(let i=0;i<data.length;i++){ for (let i = 0; i < data.length; i++) {
data[i].isChecked = true data[i].isChecked = true
} }
}, },
openPopup() { openPopup() {
if(this.isOnLine != 1){ if (this.isOnLine != 1) {
this.tui.toast('请先上线后配置',1000); this.tui.toast('请先上线后配置', 1000);
return; return;
} }
let that = this let that = this
@ -612,7 +677,7 @@
if (res.result != null) { if (res.result != null) {
let data = res.result; let data = res.result;
let list = data.workerRelaPriceList || []; let list = data.workerRelaPriceList || [];
for(let i=0;i<list.length;i++){ for (let i = 0; i < list.length; i++) {
list[i].isChecked = false list[i].isChecked = false
} }
let waimaList = list.filter(item => item.orderType == 0); let waimaList = list.filter(item => item.orderType == 0);
@ -627,7 +692,7 @@
that.$forceUpdate(); that.$forceUpdate();
} }
this.zhipaiCheck = uni.getStorageSync('worker').getPushOrder==1?true:false this.zhipaiCheck = uni.getStorageSync('worker').getPushOrder == 1 ? true : false
/* if(uni.getStorageSync('waimaiData')){ /* if(uni.getStorageSync('waimaiData')){
let waimaiData = uni.getStorageSync('waimaiData') let waimaiData = uni.getStorageSync('waimaiData')
for(let i=0;i<waimaiData.length;i++){ for(let i=0;i<waimaiData.length;i++){
@ -638,13 +703,13 @@
} }
} }
} */ } */
for(let m=0;m<that.waimaRuleList.length;m++){ for (let m = 0; m < that.waimaRuleList.length; m++) {
if(that.waimaRuleList[m].getPushOrder == 1){ if (that.waimaRuleList[m].getPushOrder == 1) {
that.waimaRuleList[m].isChecked = true that.waimaRuleList[m].isChecked = true
} }
} }
for(let m=0;m<that.paotuiRuleList.length;m++){ for (let m = 0; m < that.paotuiRuleList.length; m++) {
if(that.paotuiRuleList[m].getPushOrder == 1){ if (that.paotuiRuleList[m].getPushOrder == 1) {
that.paotuiRuleList[m].isChecked = true that.paotuiRuleList[m].isChecked = true
} }
} }
@ -660,7 +725,7 @@
} */ } */
this.$refs.carPopup.open() this.$refs.carPopup.open()
} else { } else {
that.tui.toast(res.message,1000) that.tui.toast(res.message, 1000)
return return
} }
}).catch((res) => {}) }).catch((res) => {})
@ -668,32 +733,36 @@
checkArea() { checkArea() {
this.isArea = !this.isArea this.isArea = !this.isArea
}, },
changeStatus(index,item,status){ changeStatus(index, item, status) {
let regionId = JSON.parse(uni.getStorageSync('area')).id let regionId = JSON.parse(uni.getStorageSync('area')).id
let url = '' let url = ''
if(status == 2){ if (status == 2) {
url = "/mall/delivery/pickup" url = "/mall/delivery/pickup"
}else if(status == 3){ } else if (status == 3) {
url = "/mall/delivery/complete" url = "/mall/delivery/complete"
}else if(status == 1){ } else if (status == 1) {
url = "/mall/delivery/arriveShop" url = "/mall/delivery/arriveShop"
} }
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)
}else{ } else {
that.pageData[index].arriveTime = "qq" that.pageData[index].arriveTime = "qq"
} }
that.tui.toast(res.message,200); that.tui.toast(res.message, 200);
/* that.searchForm.pageNum = 1 /* that.searchForm.pageNum = 1
that.getDelivery() */ that.getDelivery() */
that.$forceUpdate(); that.$forceUpdate();
} else { } else {
that.tui.toast(res.message,200); that.tui.toast(res.message, 200);
return; return;
} }
uni.hideLoading(); uni.hideLoading();
@ -701,22 +770,22 @@
}, },
checkTab1(type) { checkTab1(type) {
this.tab1Checked = type this.tab1Checked = type
if(type == 'daiqu'){ if (type == 'daiqu') {
this.searchForm.status = 1 this.searchForm.status = 1
}else{ } else {
this.searchForm.status = 2 this.searchForm.status = 2
} }
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.getDelivery() this.getDelivery()
}, },
makeCall(phone){ makeCall(phone) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phone phoneNumber: phone
}); });
}, },
changeOnline(value) { changeOnline(value) {
let url = '' let url = ''
if(this.isOnLine == value){ if (this.isOnLine == value) {
if (value == 0) { if (value == 0) {
url = '/worker/offLine' url = '/worker/offLine'
value = 1 value = 1
@ -724,7 +793,7 @@
url = '/worker/onLine' url = '/worker/onLine'
value = 0 value = 0
} }
}else{ } else {
if (value == 0) { if (value == 0) {
url = '/worker/offLine' url = '/worker/offLine'
} else { } else {
@ -740,9 +809,9 @@
worker.isOnLine = value; worker.isOnLine = value;
this.isOnLine = value this.isOnLine = value
uni.setStorageSync('worker', worker); uni.setStorageSync('worker', worker);
this.tui.toast(res.message,1000) this.tui.toast(res.message, 1000)
} else { } else {
this.tui.toast(res.message,1000) this.tui.toast(res.message, 1000)
} }
}) })
@ -759,7 +828,7 @@
if (res.code == 200) { if (res.code == 200) {
} else { } else {
this.tui.toast(res.message,1000) this.tui.toast(res.message, 1000)
} }
}) })
@ -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,7 +1087,8 @@
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
flex: 1; flex: 1;
} }
.code-box{
.code-box {
display: inline-block; display: inline-block;
height: 32rpx; height: 32rpx;
line-height: 32rpx; line-height: 32rpx;
@ -1023,11 +1098,13 @@
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;
margin: 10rpx 0 0 20rpx; margin: 10rpx 0 0 20rpx;
@ -1036,23 +1113,27 @@
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;
background-size: 100%; background-size: 100%;
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;
background: rgba(166, 255, 234, 1); background: rgba(166, 255, 234, 1);
@ -1062,7 +1143,8 @@
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;
text-align: center; text-align: center;
@ -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