wangfukang 13 hours ago
parent
commit
3b3d3f0b34
  1. 57
      components/tab-bar/delivery.vue

57
components/tab-bar/delivery.vue

@ -21,6 +21,7 @@
alt=""
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 4rpx;left: 32rpx;" />
</view>
<view v-if="tab1Checked == 'daisong'" style="font-size:24rpx;color:#0b9b73;line-height:60rpx;margin-left:10rpx;" @tap.stop="refreshCurrentTab">刷新</view>
<!-- <view class="tabs1" @tap="checkTab1('zhuandan')"
:style="{'color':tab1Checked == 'zhuandan'?'#000':'#777','font-size':tab1Checked== 'zhuandan'?'36rpx':'30rpx'}">
转单<text>()</text>
@ -149,6 +150,11 @@
alt="" style="width: 60rpx;height: 60rpx;" />
</view>
</view>
<view v-if="item.transferDelivery == 1" style="margin-top: 12rpx;background:#fff7ed;border-radius:16rpx;padding:12rpx;color:#b45309;">
<view>中转点{{item.transferAddressName || item.shopName}}</view>
<view>送达中转点{{item.transferArriveTime ? formatTimeText(item.transferArriveTime) : '商家未确认送达'}}</view>
<image v-if="item.transferArriveImage" :src="item.transferArriveImage" mode="aspectFill" style="width:120rpx;height:120rpx;border-radius:12rpx;margin-top:8rpx;" @tap.stop="previewImage(item.transferArriveImage)"></image>
</view>
<view class="goods-name"
style="font-size: 24rpx;line-height: 50rpx;display: flex;margin-top: 14rpx;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d0764fb4138747769538cf1cafa3b017.png"
@ -457,6 +463,25 @@
}
},
methods: {
formatTimeText(value) {
if (!value) return '';
const date = new Date(value);
if (isNaN(date.getTime())) return '';
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hour = String(date.getHours()).padStart(2, '0');
const minute = String(date.getMinutes()).padStart(2, '0');
const second = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
},
previewImage(url) {
if (!url) return;
uni.previewImage({
current: url,
urls: [url]
});
},
init() {
let worker = uni.getStorageSync('worker')
if (worker == '' || worker == undefined || worker == null) {
@ -609,7 +634,7 @@
}
},
productDetail(item) {
this.productData = item.goodsList;
this.productData = item.goodsList || item.mallOrderGoodsList || item.orderGoodsList || [];
this.$refs.productPopup.open()
},
buchong() {
@ -768,6 +793,31 @@
let regionId = JSON.parse(uni.getStorageSync('area')).id
let url = ''
if (status == 2) {
if (item.transferDelivery == 1) {
uni.showModal({
title: '输入取餐码',
editable: true,
placeholderText: '请输入4位取餐码',
success: (modalRes) => {
if (!modalRes.confirm) return
this.tui.request('/mall/delivery/transferPickup', 'POST', {
regionId: regionId,
deliveryId: item.id,
workerId: item.workerId,
pickupCode: modalRes.content
}, false, true).then((res) => {
if (res.code == 200) {
this.pageData.splice(index, 1)
this.tui.toast(res.message, 200)
this.$forceUpdate()
} else {
this.tui.toast(res.message, 200)
}
})
}
})
return
}
url = "/mall/delivery/pickup"
} else if (status == 3) {
url = "/mall/delivery/complete"
@ -810,6 +860,11 @@
this.scrollToTop()
this.getDelivery()
},
refreshCurrentTab() {
this.searchForm.pageNum = 1
this.scrollToTop()
this.getDelivery()
},
makeCall(phone) {
uni.makePhoneCall({
phoneNumber: phone

Loading…
Cancel
Save