From b3a1cb7392083aa6d407872d8cb6da7ab044c28c Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Tue, 11 Aug 2026 15:06:58 +0800 Subject: [PATCH] 1 --- package3/shop/selfDeliveryOrderList.vue | 39 +++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/package3/shop/selfDeliveryOrderList.vue b/package3/shop/selfDeliveryOrderList.vue index 3cbfac8..524d587 100644 --- a/package3/shop/selfDeliveryOrderList.vue +++ b/package3/shop/selfDeliveryOrderList.vue @@ -8,6 +8,7 @@ 自配送订单 + 待取货 待送达 已送达 @@ -49,7 +50,7 @@ 备注:{{item.remark}} 配送费 ¥{{item.deliveryFee || 0}} - + {{buttonText(item)}} @@ -89,14 +90,14 @@ export default { data() { return { - tab: 'wait', + tab: 'pickup', list: [], loadStatus: 'more', totalPages: 1, searchForm: { pageNum: 1, pageSize: 10, - status: 2, + status: 1, deliveryType: 1, shopDelivery: 1, shopId: '', @@ -107,7 +108,12 @@ navHeight: 120, backTop: 88, listTop: 150, - productData: [] + productData: [], + worker: { + workerId: '', + workerName: '', + workerPhone: '' + } } }, filters: { @@ -164,7 +170,12 @@ this.searchForm.pageNum = 1; this.totalPages = 1; this.loadStatus = 'more'; - this.searchForm.status = this.tab === 'wait' ? 2 : 3; + const statusMap = { + pickup: 1, + wait: 2, + done: 3 + }; + this.searchForm.status = statusMap[this.tab]; this.getList(); }, loadMore() { @@ -190,10 +201,18 @@ }); }, handleOrder(index, item) { - if (this.tab !== 'wait') return; - this.changeStatus(index, item, 3); + if (this.tab === 'pickup') { + this.changeStatus(index, item, item.arriveTime == null ? 1 : 2); + return; + } + if (this.tab === 'wait') { + this.changeStatus(index, item, 3); + } }, buttonText(item) { + if (this.tab === 'pickup') { + return item.arriveTime == null ? '已到店' : '已取货'; + } return '确认送达'; }, changeStatus(index, item, status) { @@ -204,12 +223,8 @@ workerId: this.worker.workerId }, false, true).then((res) => { if (res.code == 200) { - if (status === 1) { - this.$set(this.list[index], 'arriveTime', new Date()); - } else { - this.list.splice(index, 1); - } this.tui.toast(res.message || '操作成功'); + this.resetList(); } else { this.tui.toast(res.message); }