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

514
components/tab-bar/delivery.vue

@ -36,15 +36,21 @@
</view>
<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>
饭团
</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>
快递
</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>
跑腿
</view>
@ -64,7 +70,7 @@
</view>
<view class="content">
<scroll-view @scrolltolower="onReachPage" scroll-y style="width:100%;height: 620px;overflow: scroll;">
<view class="box1" v-for="(item,index) in pageData" :key="index">
<view class="box1" v-for="(item,index) in pageData" :key="index">
<view class="maotou" v-if="item.deliveryType == 1">
<text>{{item.numberCode.length>14 ?'多订单':item.numberCode}}</text>
</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;">
外卖
</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 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 class="" :style="{'color':shouldNotify(item.mustFinishTime)?'red':''}">
@ -105,7 +113,9 @@
</view>
<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 style="display: flex;padding: 10px 0;">
<view class="code-box" style="margin-right:10px;">
@ -118,7 +128,7 @@
</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-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
@ -151,7 +161,7 @@
<view class="">
{{item.receiverName}}
</view>
<view style="color: #777;">
<view class="shop-address" style="color: #777;">
{{item.receiverAddress}}
</view>
</view>
@ -163,10 +173,10 @@
</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-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="color: #777;display: flex;">
配送佣金
@ -175,7 +185,8 @@
</view>
</view>
<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>
@ -187,13 +198,19 @@
</view>
</view>
<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"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,1)"/>
<img v-if="item.status == 1 && item.arriveTime == null"
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> -->
<img v-if="item.status == 1 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @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)" />
<img v-if="item.status == 1 && item.arriveTime != null"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;"
@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>
</scroll-view>
@ -201,7 +218,8 @@
<!-- 设置指派单规则弹窗 -->
<uni-popup ref="carPopup" background-color="#fff" style="height: 1600rpx !important;">
<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 class="zhipai-box">
@ -214,14 +232,17 @@
<scroll-view scroll-y="true" style="min-height: 500rpx;">
<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 class="guize1" v-for="(item, index) in waimaRuleList" :key="index"
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 class="guize1-qusong">
<view class="qusong1">
@ -249,14 +270,17 @@
</view>
<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 class="guize1" v-for="(item, index) in paotuiRuleList" :key="index"
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 class="guize1-qusong">
<view class="qusong1">
@ -300,19 +324,40 @@
</view>
</uni-popup>
<uni-popup ref="productPopup" background-color="#fff">
<view class="popup-area-content" style="height: 1200rpx;overflow: scroll;">
<view class="popup-area-title">
<text>订单详情</text>
<uni-popup ref="productPopup" background-color="transparent">
<view class="product-popup-content">
<view class="product-popup-header">
<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="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="popup-area-container" v-for="(item,index) in productData" :key="index">
<text style="display: inline-block">{{item.productName}} {{item.specs}} * {{item.quantity}}</text>
<view class="product-popup-empty" v-else>
暂无商品详情
</view>
</view>
</uni-popup>
<view style="width: 100%;height: 160rpx;"></view>
<uni-load-more :status="loadStatus" @change="onChange" />
<uni-load-more :status="loadStatus" @change="onChange" />
</view>
</view>
</template>
@ -321,31 +366,31 @@
export default {
data() {
return {
isOnLine:1,
bigImg:'',
isOnLine: 1,
bigImg: '',
zhipaiCheck: false,
tab1Checked: 'daiqu',
menuButtonInfo: {},
isArea: false,
latitude: 39.909, //
longitude: 116.39742, //
productData:{},
searchForm:{
productData: {},
searchForm: {
status: 1,
pageNum:1,
pageNum: 1,
pageSize: 10,
order:'',
regionId:'',
order: '',
regionId: '',
deliveryType: null,
workerId: uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : ''
},
waimaRuleList: [],
tab1Checked1:'',
pageData:[],
deliveryItem:[],
deliveryItem1:[],
tab1Checked1: '',
pageData: [],
deliveryItem: [],
deliveryItem1: [],
selectRuleList: [],
totalPages:1,
totalPages: 1,
paotuiRuleList: [],
lineStatus: [{
title: '上线',
@ -371,23 +416,40 @@
this.getDelivery();
},
filters: {
formatHourMinute(value) {
if (!value) return '';
formatHourMinute(value) {
if (!value) return '';
const date = new Date(value);
const date = new Date(value);
// (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getHours)0
const hour = String(date.getHours()).padStart(2, '0');
// (getHours)0
const hour = String(date.getHours()).padStart(2, '0');
// (getMinutes)0
const minute = String(date.getMinutes()).padStart(2, '0');
// (getMinutes)0
const minute = String(date.getMinutes()).padStart(2, '0');
// --:
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);
}
// --:
return `${day}${hour}:${minute}`;
}
// 2. { } "
const result = str.replace(/[{}"]/g, '');
return result;
}
},
methods: {
init() {
@ -398,10 +460,10 @@
console.log("配送初始化")
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.isOnLine = uni.getStorageSync('worker').isOnLine
if(uni.getStorageSync('area')){
if (uni.getStorageSync('area')) {
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.$forceUpdate()
@ -413,13 +475,16 @@
let that = this;
uni.getLocation({
type: 'gcj02',
isHighAccuracy:true,
isHighAccuracy: true,
success: (res) => {
console.log('位置', res)
that.latitude = res.latitude;
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) => {});
},
@ -428,23 +493,23 @@
}
});
},
onReachPage(){
onReachPage() {
console.log("11111")
if (this.searchForm.pageNum >= this.totalPages) return;
this.searchForm.pageNum++;
this.getDelivery();
},
chooseType(type){
if(this.tab1Checked1 == type){
chooseType(type) {
if (this.tab1Checked1 == type) {
this.tab1Checked1 = ''
this.searchForm.deliveryType = null
}else{
} else {
this.tab1Checked1 = type;
if(type == 'fantuan'){
if (type == 'fantuan') {
this.searchForm.deliveryType = 1
}else if(type == 'kuaidi'){
} else if (type == 'kuaidi') {
this.searchForm.deliveryType = 2
}else if(type == 'paotui'){
} else if (type == 'paotui') {
this.searchForm.deliveryType = 3
}
}
@ -453,33 +518,33 @@
this.$forceUpdate();
},
shouldNotify(mustFinishTimeStr) {
// ISO 8601
const targetTime = new Date(mustFinishTimeStr);
//
if (isNaN(targetTime.getTime())) {
throw new Error('Invalid date format: ' + mustFinishTimeStr);
}
const currentTime = new Date();
const diffMs = targetTime - currentTime; //
// diffMs <= 0 100 < diffMs < 600000
return diffMs <= 0 || diffMs < 10 * 60 * 1000;
// ISO 8601
const targetTime = new Date(mustFinishTimeStr);
//
if (isNaN(targetTime.getTime())) {
throw new Error('Invalid date format: ' + mustFinishTimeStr);
}
const currentTime = new Date();
const diffMs = targetTime - currentTime; //
// diffMs <= 0 100 < diffMs < 600000
return diffMs <= 0 || diffMs < 10 * 60 * 1000;
},
getDelivery(){
getDelivery() {
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) => {
that.loadStatus = 'nomore';
if (res.code == 200) {
if(this.searchForm.status == 1){
if (this.searchForm.status == 1) {
if (that.searchForm.pageNum == 1) {
that.deliveryItem1 = res.result.records;
} else {
that.deliveryItem1 = [...that.deliveryItem1, ...res.result.records]
}
that.pageData = that.deliveryItem1
}else{
} else {
if (that.searchForm.pageNum == 1) {
that.deliveryItem = res.result.records;
} else {
@ -491,7 +556,7 @@
that.totalPages = res.result.pages; // pages =
that.$forceUpdate();
} else {
that.tui.toast(res.message,1000);
that.tui.toast(res.message, 1000);
return;
}
uni.hideLoading();
@ -505,21 +570,21 @@
zhipaiChange(e) {
this.zhipaiCheck = e.detail.value
},
checkVoucher(index,type) {
if (type == 'waimai'){
checkVoucher(index, type) {
if (type == 'waimai') {
this.waimaRuleList[index].isChecked = !this.waimaRuleList[index].isChecked
}else{
} else {
this.paotuiRuleList[index].isChecked = !this.paotuiRuleList[index].isChecked
}
},
productDetail(item){
productDetail(item) {
this.productData = item.goodsList;
this.$refs.productPopup.open()
},
buchong(){
buchong() {
this.$refs.carPopup.close()
uni.navigateTo({
url:'/package1/myCenter/partTimeJobRegister'
url: '/package1/myCenter/partTimeJobRegister'
})
},
@ -533,26 +598,26 @@
this.selectRuleList = []
this.waimaiData = []
this.kuaidiData = []
for(let i=0;i<this.waimaRuleList.length;i++){
for (let i = 0; i < this.waimaRuleList.length; i++) {
let rule = {
id: this.waimaRuleList[i].id,
getPushOrder: 1
}
if(!this.waimaRuleList[i].isChecked){
if (!this.waimaRuleList[i].isChecked) {
rule.getPushOrder = 0
}else{
} else {
this.waimaiData.push(this.waimaRuleList[i])
}
this.selectRuleList.push(rule)
}
for(let i=0;i<this.paotuiRuleList.length;i++){
for (let i = 0; i < this.paotuiRuleList.length; i++) {
let rule = {
id: this.paotuiRuleList[i].id,
getPushOrder: 1
}
if(!this.paotuiRuleList[i].isChecked){
if (!this.paotuiRuleList[i].isChecked) {
rule.getPushOrder = 0
}else{
} else {
this.kuaidiData.push(this.paotuiRuleList[i])
}
this.selectRuleList.push(rule)
@ -560,7 +625,7 @@
let submitData = {
userId: uni.getStorageSync('id'),
workerRelaPriceList: this.selectRuleList,
getPushOrder: this.zhipaiCheck?1:0
getPushOrder: this.zhipaiCheck ? 1 : 0
};
let that = this;
this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => {
@ -569,9 +634,9 @@
let worker = uni.getStorageSync('worker') || {}; //
worker.getPushOrder = that.zhipaiCheck ? 1 : 0;
uni.setStorageSync('worker', worker);
uni.setStorageSync('waimaiData',that.waimaiData)
uni.setStorageSync('kuaidiData',that.kuaidiData)
if(that.zhipaiCheck == false){
uni.setStorageSync('waimaiData', that.waimaiData)
uni.setStorageSync('kuaidiData', that.kuaidiData)
if (that.zhipaiCheck == false) {
uni.removeStorageSync('waimaiData')
uni.removeStorageSync('kuaidiData')
}
@ -589,20 +654,20 @@
uni.hideLoading();
});
},
allCheck(type){
allCheck(type) {
let data = []
if(type=='waimai'){
if (type == 'waimai') {
data = this.waimaRuleList
}else{
} else {
data = this.paotuiRuleList
}
for(let i=0;i<data.length;i++){
for (let i = 0; i < data.length; i++) {
data[i].isChecked = true
}
},
openPopup() {
if(this.isOnLine != 1){
this.tui.toast('请先上线后配置',1000);
if (this.isOnLine != 1) {
this.tui.toast('请先上线后配置', 1000);
return;
}
let that = this
@ -612,7 +677,7 @@
if (res.result != null) {
let data = res.result;
let list = data.workerRelaPriceList || [];
for(let i=0;i<list.length;i++){
for (let i = 0; i < list.length; i++) {
list[i].isChecked = false
}
let waimaList = list.filter(item => item.orderType == 0);
@ -627,7 +692,7 @@
that.$forceUpdate();
}
this.zhipaiCheck = uni.getStorageSync('worker').getPushOrder==1?true:false
this.zhipaiCheck = uni.getStorageSync('worker').getPushOrder == 1 ? true : false
/* if(uni.getStorageSync('waimaiData')){
let waimaiData = uni.getStorageSync('waimaiData')
for(let i=0;i<waimaiData.length;i++){
@ -638,13 +703,13 @@
}
}
} */
for(let m=0;m<that.waimaRuleList.length;m++){
if(that.waimaRuleList[m].getPushOrder == 1){
for (let m = 0; m < that.waimaRuleList.length; m++) {
if (that.waimaRuleList[m].getPushOrder == 1) {
that.waimaRuleList[m].isChecked = true
}
}
for(let m=0;m<that.paotuiRuleList.length;m++){
if(that.paotuiRuleList[m].getPushOrder == 1){
for (let m = 0; m < that.paotuiRuleList.length; m++) {
if (that.paotuiRuleList[m].getPushOrder == 1) {
that.paotuiRuleList[m].isChecked = true
}
}
@ -660,7 +725,7 @@
} */
this.$refs.carPopup.open()
} else {
that.tui.toast(res.message,1000)
that.tui.toast(res.message, 1000)
return
}
}).catch((res) => {})
@ -668,32 +733,36 @@
checkArea() {
this.isArea = !this.isArea
},
changeStatus(index,item,status){
changeStatus(index, item, status) {
let regionId = JSON.parse(uni.getStorageSync('area')).id
let url = ''
if(status == 2){
if (status == 2) {
url = "/mall/delivery/pickup"
}else if(status == 3){
} else if (status == 3) {
url = "/mall/delivery/complete"
}else if(status == 1){
} else if (status == 1) {
url = "/mall/delivery/arriveShop"
}
let that = this
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(status == 2 || status == 3){
if (status == 2 || status == 3) {
that.pageData.splice(index, 1)
}else{
} else {
that.pageData[index].arriveTime = "qq"
}
that.tui.toast(res.message,200);
that.tui.toast(res.message, 200);
/* that.searchForm.pageNum = 1
that.getDelivery() */
that.$forceUpdate();
} else {
that.tui.toast(res.message,200);
that.tui.toast(res.message, 200);
return;
}
uni.hideLoading();
@ -701,22 +770,22 @@
},
checkTab1(type) {
this.tab1Checked = type
if(type == 'daiqu'){
if (type == 'daiqu') {
this.searchForm.status = 1
}else{
} else {
this.searchForm.status = 2
}
this.searchForm.pageNum = 1
this.getDelivery()
},
makeCall(phone){
makeCall(phone) {
uni.makePhoneCall({
phoneNumber: phone
});
},
changeOnline(value) {
let url = ''
if(this.isOnLine == value){
if (this.isOnLine == value) {
if (value == 0) {
url = '/worker/offLine'
value = 1
@ -724,7 +793,7 @@
url = '/worker/onLine'
value = 0
}
}else{
} else {
if (value == 0) {
url = '/worker/offLine'
} else {
@ -740,9 +809,9 @@
worker.isOnLine = value;
this.isOnLine = value
uni.setStorageSync('worker', worker);
this.tui.toast(res.message,1000)
this.tui.toast(res.message, 1000)
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message, 1000)
}
})
@ -759,7 +828,7 @@
if (res.code == 200) {
} else {
this.tui.toast(res.message,1000)
this.tui.toast(res.message, 1000)
}
})
@ -772,7 +841,7 @@
}
</script>
<style>
<style lang="scss">
page {
width: 100%;
height: 100%;
@ -895,9 +964,10 @@
flex: 1;
min-width: 0;
color: #777;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 40rpx;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
}
.refund-status {
@ -921,12 +991,12 @@
.guize-list {
width: 600rpx;
padding: 20rpx 20rpx 0;
padding: 20rpx 20rpx 0;
background: #fff;
border-radius: 20rpx;
max-height: 1000rpx;
min-height: 640rpx;
position: relative;
max-height: 1000rpx;
min-height: 640rpx;
position: relative;
}
.zhipai-box {
@ -942,6 +1012,7 @@
flex: 1;
text-align: right;
}
.radio-check {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
width: 48rpx;
@ -951,6 +1022,7 @@
line-height: 48rpx;
margin: 16rpx 20rpx 0 0;
}
.radio-no-check {
width: 48rpx;
height: 48rpx;
@ -958,6 +1030,7 @@
border: 1px solid #eee;
margin: 16rpx 20rpx 0 0;
}
.guize1-qusong {
display: flex;
flex: 1;
@ -1001,6 +1074,7 @@
padding: 10rpx 20rpx;
flex: 1;
}
.btn {
width: 95%;
height: 100rpx;
@ -1010,10 +1084,11 @@
border-radius: 100rpx;
line-height: 100rpx;
text-align: center;
margin: 20rpx 20rpx;
flex: 1;
margin: 20rpx 20rpx;
flex: 1;
}
.code-box{
.code-box {
display: inline-block;
height: 32rpx;
line-height: 32rpx;
@ -1023,11 +1098,13 @@
color: #000;
border: 1px solid rgba(2, 251, 221, 1);
}
.img-popup-content {
width: 500rpx;
height: 500rpx;
}
.chaoda{
.chaoda {
height: 30rpx;
line-height: 30rpx;
margin: 10rpx 0 0 20rpx;
@ -1036,23 +1113,27 @@
color: #fff;
border-radius: 10rpx;
}
.shangxian-btn{
.shangxian-btn {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/7620b3eed7b14bb69d3c456ed0be72b3.png') no-repeat;
padding-left: 16rpx;
}
.lixian-btn{
.lixian-btn {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/462cacb9682f4919a3e750700bbc5f3e.png') no-repeat;
text-align: right;
padding-right: 16rpx;
text-align: right;
padding-right: 16rpx;
}
.shangxia-btn{
.shangxia-btn {
width: 132rpx;
height: 50rpx;
background-size: 100%;
font-size: 20rpx;
font-weight: 700;
}
.guize-box{
.guize-box {
font-size: 20rpx;
font-weight: 700;
background: rgba(166, 255, 234, 1);
@ -1062,7 +1143,8 @@
margin-right: 15rpx;
padding-left: 10rpx;
}
.guize-box1{
.guize-box1 {
font-size: 20rpx;
font-weight: 700;
text-align: center;
@ -1072,4 +1154,142 @@
margin-right: 15rpx;
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>

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

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

Loading…
Cancel
Save