From 888f8e49a372f232931b9ae1b7648dfeb0d4a4f9 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 16 Jul 2026 16:43:18 +0800 Subject: [PATCH] 1 --- components/tab-bar/delivery.vue | 273 +++++++++++++++++++++++++------- 1 file changed, 217 insertions(+), 56 deletions(-) diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue index 5bb85ab..10c9bfa 100644 --- a/components/tab-bar/delivery.vue +++ b/components/tab-bar/delivery.vue @@ -86,67 +86,44 @@ - - - - 订单{{index + 1}} + + + + 拼团详情 + 共{{tuanzhangOrder.length}}个订单 {{groupOrderCheck && (groupOrderCheck.deliveryType == 1 && groupOrderCheck.orderType == 3) ? ',可一并出餐' :''}} - - - - 配送信息 - - - - 配送编号: - - - {{item.numberCode}} - - - - - 订单号: - - - {{item.id}} - - - - - - 订单时间: - - - {{item.createTime | formatISOTime}} - - + × + + + + + 订单-{{item.numberCode || item.id}} + {{getStatusText(item)}} - - - 商品信息 - - - - 商品名:{{item1.productName}} - - - X{{item1.quantity}} - - - ¥{{item1.price}} - - + + 订单号 + {{item.id}} - - - 餐盒费:¥{{item.packageFee}} 配送费:¥{{item.deliveryFee}} - - - 总计:¥{{item.totalAmount}} + + 订单时间 + {{item.createTime | formatISOTime}} + + + + {{item1.productName}} + X{{item1.quantity}} + ¥{{item1.price}} + + 餐盒费:¥{{item.packageFee || 0}} 配送费:¥{{item.deliveryFee || 0}} + + + 暂无拼团订单 + + + 已全部出餐 @@ -157,6 +134,7 @@ export default { data() { return { + groupOrderCheck:{}, tuanzhangOrder:[], searchForm:{ pageNum:1, @@ -250,6 +228,8 @@ this.searchForm.searchStatus = index this.currentIndex = index } + this.searchForm.pageNum = 1 + this.orderList = [] this.getList() }, isAppointmentDelivery(item) { @@ -270,6 +250,10 @@ formatMoney(value) { return this.toNumber(value).toFixed(2) }, + getStatusText(item) { + if (!item) return '' + return item.status == 0?'待支付':item.status == 2?'待接单':(item.status == 3 && item.deliveryType == 1 && item.shopMakeTime == null) || (item.status == 3 && item.deliveryType == 2 && item.userRequireMake == 1)?'待出餐':(item.status == 3 && item.deliveryType == 1 && item.shopMakeTime != null)?'待取货':(item.status == 3 && item.deliveryType == 2)?'待消费':item.status == 4?'待送达':item.status == 5?'已完成':item.status == 7?'待同意退款':item.status == 8?'已退款':item.status == 6?'已取消':item.status == 11?'售后中':item.status == 12?'已售后':'' + }, toNumber(value) { let amount = parseFloat(value) return isNaN(amount) ? 0 : amount @@ -301,6 +285,9 @@ this.searchForm.pageNum++; this.getList(); }, + canShowBatchMealServingButton(item) { + return this.isFaceDeliveryOrder(item) && this.canShowMealServingButton(item) + }, mealServing(item){ let that = this uni.showModal({ @@ -334,7 +321,8 @@ }); }, getGroupOrders(id){ - this.NB.sendRequest("/mall/order/selectAllOrderByOrderId/"+id, {}, false, 'GET', 'application/json').then((res) => { + this.groupOrderCheck = id + this.NB.sendRequest("/mall/order/selectAllOrderByOrderId/"+id.id, {}, false, 'GET', 'application/json').then((res) => { if (res.code == 200) { this.tuanzhangOrder = res.result; this.$refs.pintuanPopup.open() @@ -394,6 +382,40 @@ uni.hideLoading(); }).catch((res) => {}); }, + batchMealServing() { + if (!this.canShowBatchMealServingButton(this.groupOrderCheck)) { + this.tui.toast('当前订单不可出餐') + return + } + const orderIdList = (Array.isArray(this.tuanzhangOrder) ? this.tuanzhangOrder : []) + .map(item => this.getOrderId(item)) + .filter(id => !!id) + if (orderIdList.length == 0) { + this.tui.toast('未找到拼团订单') + return + } + let that = this + uni.showModal({ + title: '提示', + content: '确定全部出餐吗?', + success: function (res) { + if (!res.confirm) return + that.tui.request('/mall/order/shopMakeTimeBatch', 'POST', { + orderIdList: orderIdList + }, false, false).then((res) => { + if (res.code == 200) { + that.$refs.pintuanPopup.close() + that.searchForm.pageNum = 1 + that.getList() + } else { + that.tui.toast(res.message) + return + } + uni.hideLoading() + }).catch((res) => {}) + } + }) + }, goDetail(id){ uni.navigateTo({ url:'/pages/shop/orderDetail?id=' + id @@ -787,6 +809,145 @@ .uni-popup__wrapper{ border-radius: 20rpx !important; } + .group-popup { + width: 660rpx; + max-height: 880rpx; + padding: 28rpx 24rpx 32rpx; + box-sizing: border-box; + border-radius: 32rpx; + background: #f7faf8; + box-shadow: 0 24rpx 60rpx rgba(0, 35, 28, 0.22); + } + .group-popup-header { + display: flex; + align-items: center; + padding-bottom: 22rpx; + } + .group-popup-title { + color: #00231C; + font-size: 36rpx; + font-weight: 900; + line-height: 48rpx; + } + .group-popup-subtitle { + margin-top: 6rpx; + color: red; + font-size: 24rpx; + } + .group-popup-close { + width: 56rpx; + height: 56rpx; + margin-left: auto; + border-radius: 56rpx; + background: #fff; + color: #7a8582; + font-size: 42rpx; + line-height: 50rpx; + text-align: center; + } + .group-popup-scroll { + max-height: 690rpx; + height: 690rpx; + } + .group-popup-scroll-with-footer { + max-height: 600rpx; + height: 600rpx; + } + .group-popup-footer { + padding-top: 18rpx; + } + .group-all-meal-btn { + height: 72rpx; + line-height: 72rpx; + border-radius: 18rpx; + background: linear-gradient(90deg, #FF4500, #FFA07A); + color: #fff; + font-size: 28rpx; + font-weight: 900; + text-align: center; + } + .group-order-card { + margin-bottom: 18rpx; + padding: 22rpx; + border-radius: 24rpx; + background: #fff; + box-shadow: 0 10rpx 26rpx rgba(0, 35, 28, 0.08); + } + .group-order-head { + display: flex; + align-items: center; + padding-bottom: 16rpx; + border-bottom: 1px solid #eef2ef; + } + .group-order-code { + flex: 1; + color: #00231C; + font-size: 32rpx; + font-weight: 900; + } + .group-order-status { + padding: 6rpx 14rpx; + border-radius: 999rpx; + background: rgba(255, 107, 53, 0.1); + color: #ff6b35; + font-size: 24rpx; + font-weight: 800; + } + .group-info-row { + display: flex; + justify-content: space-between; + padding-top: 14rpx; + color: #6b7773; + font-size: 24rpx; + line-height: 34rpx; + } + .group-info-row text:last-child { + color: #00231C; + font-weight: 700; + } + .group-goods-list { + margin-top: 16rpx; + padding: 12rpx 0; + border-top: 1px dashed #e4ebe7; + border-bottom: 1px dashed #e4ebe7; + } + .group-goods-row { + display: flex; + align-items: center; + min-height: 46rpx; + color: #00231C; + font-size: 26rpx; + font-weight: 700; + } + .group-goods-name { + flex: 1; + padding-right: 12rpx; + } + .group-goods-num { + width: 80rpx; + text-align: center; + } + .group-goods-price { + width: 120rpx; + text-align: right; + } + .group-fee-row { + margin-top: 14rpx; + color: #7a8582; + text-align: right; + } + .group-total-row { + margin-top: 8rpx; + color: red; + font-size: 30rpx; + font-weight: 900; + text-align: right; + } + .group-popup-empty { + padding: 80rpx 20rpx; + color: #7a8582; + text-align: center; + } .pituan-text{ flex:1; text-align:right;