From 1171c8fffa2a2cb5d8379411d8bc13a754ca2774 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 6 Sep 2026 12:21:37 +0800 Subject: [PATCH] 1 --- pages/myCenter/businessInfo.vue | 5 ++++ pages/shop/orderDetail.vue | 47 ++++++++++++++++++++++++++++----- pages/shop/shopOrderList.vue | 24 +++++++++++++++++ 3 files changed, 70 insertions(+), 6 deletions(-) diff --git a/pages/myCenter/businessInfo.vue b/pages/myCenter/businessInfo.vue index 800a189..34bbaa9 100644 --- a/pages/myCenter/businessInfo.vue +++ b/pages/myCenter/businessInfo.vue @@ -57,6 +57,10 @@ 单独购买佣金 {{shop.commissionRateOne || 0}}% + + 虚拟成团佣金 + {{shop.virtualGroupCommissionRate || 0}}% + 经营品类 {{shop.type || '暂无'}} @@ -82,6 +86,7 @@ status: 0, commissionRateMore: '', commissionRateOne: '', + virtualGroupCommissionRate: '', type: '', isDelivery: 0, cookingTime: '' diff --git a/pages/shop/orderDetail.vue b/pages/shop/orderDetail.vue index ccb2c08..a00c3ed 100644 --- a/pages/shop/orderDetail.vue +++ b/pages/shop/orderDetail.vue @@ -29,6 +29,7 @@ {{(data.deliveryType == 1 && data.orderType != 3)?'普通配送单':(data.deliveryType == 1 && data.orderType == 3)?'面对面配送单':(data.isPack == 1 && data.otherOrder == null)?'自取-打包':(data.isPack == 0 && data.otherOrder == null)?'自取-堂食':'到店消费'}} + 虚拟成团 {{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}:{{getWorkerName(data)}} @@ -107,7 +108,7 @@ -¥{{formatAmount(data.freeAmount)}} - + 优惠券 @@ -150,7 +151,7 @@ ¥{{formatMoney(getMerchantRefundDisplayAmount(item))}} + v-if="item.items != null && item.items != undefined && item.items.length > 0"> @@ -208,7 +209,7 @@ 商品金额 ¥{{formatMoney(data.goodsAmount)}} + 餐盒/打包费 ¥{{formatMoney(data.packageFee)}} - 抽佣比例 + {{data.incomeSummary.commissionRateLabel || '抽佣比例'}} {{formatMoney(data.incomeSummary.commissionRate)}}% @@ -416,7 +417,11 @@ data() { return { Ptype:'', - data:{}, + data:{ + goodsList: [], + userCoupon: [], + mallRefundRecord: [] + }, mealServingLoading: false } }, @@ -518,8 +523,17 @@ if (order && order.orderType == 1) { return this.toAmount(shopTakeaway.commissionRateOne); } + if (this.isVirtualGroupOrder(order)) { + const virtualRate = shopTakeaway.virtualGroupCommissionRate; + if (virtualRate !== undefined && virtualRate !== null && virtualRate !== '') { + return this.toAmount(virtualRate); + } + } return this.toAmount(shopTakeaway.commissionRateMore); }, + isVirtualGroupOrder(order) { + return !!order && order.isVirtualGroup == 1; + }, getSettlementNet(baseAmount, commissionBaseAmount, commissionRate) { let commission = this.roundAmount(this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100); let settlement = this.roundAmount(this.toAmount(baseAmount) - commission); @@ -549,6 +563,7 @@ } let baseAmount = this.roundAmount(this.toAmount(order.goodsAmount) + this.toAmount(order.packageFee)); let commissionRate = this.getCommissionRate(order); + let commissionRateLabel = order.orderType == 1 ? '单独购买抽佣比例' : (this.isVirtualGroupOrder(order) ? '虚拟成团抽佣比例' : '拼团抽佣比例'); let refundRecords = Array.isArray(order.mallRefundRecord) ? order.mallRefundRecord : []; let approvedRefundRecords = refundRecords.filter(item => this.isApprovedRefundRecord(item)); let hasWorkerReasonRefund = approvedRefundRecords.some(item => item.status == 1 && item.refundTypeStatus == 2 && this.isWorkerRefundRecord(item)); @@ -607,10 +622,14 @@ } else if (order.status == 8 && hasBothReasonRefund) { remark = '商家/配送员都有原因全额退款,商家不产生收入'; } + if (this.isVirtualGroupOrder(order)) { + remark = '虚拟成团订单,' + remark; + } return { show: true, baseAmount, commissionRate, + commissionRateLabel, normalBaseAmount, normalCommissionAmount: normalNet.commission, normalSettlementAmount: normalNet.settlement, @@ -669,7 +688,7 @@ return Number(amount.toFixed(2)); }, getPictureList(pictures) { - if (pictures == null || pictures === '') return []; + if (pictures == null || pictures === '' || pictures == undefined) return []; if (Array.isArray(pictures)) { return pictures.filter(item => item != null && item !== ''); } @@ -739,7 +758,13 @@ let that = this this.NB.sendRequest("/mall/order/detail/"+ this.shopId, {}, false, 'get', 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { - that.data = res.result + that.data = res.result || {} + if (!Array.isArray(that.data.userCoupon)) { + that.data.userCoupon = [] + } + if (!Array.isArray(that.data.mallRefundRecord)) { + that.data.mallRefundRecord = [] + } //商家预计收入的计算 that.data.incomeSummary = that.buildMerchantIncomeSummary(that.data) @@ -1042,6 +1067,16 @@ color: #ff6b35; font-weight: 700; } + .virtual-group-tag { + height: 50rpx; + line-height: 50rpx; + margin: auto 0 auto 14rpx; + padding: 0 18rpx; + border-radius: 20rpx; + background: linear-gradient(90deg, #FF4500, #FFA07A); + color: #fff; + font-weight: 800; + } .remark-box { display: flex; border: 1px solid rgba(255, 107, 53, 0.22); diff --git a/pages/shop/shopOrderList.vue b/pages/shop/shopOrderList.vue index ae88049..7fdb8f5 100644 --- a/pages/shop/shopOrderList.vue +++ b/pages/shop/shopOrderList.vue @@ -28,6 +28,7 @@ {{'#' + item.numberCode}} 秒杀 + 虚拟成团 {{item.createTime | formatISOTime}} @@ -202,6 +203,12 @@ uni.hideLoading(); }).catch((res) => {}) }, + isSeckillOrder(item) { + return !!item && item.seckillOrder == 1 + }, + isVirtualGroupOrder(item) { + return !!item && item.isVirtualGroup == 1 + }, mealServing(item){ let that = this uni.showModal({ @@ -296,6 +303,23 @@ font-weight: 700; margin-top: 20rpx; } + .seckill-order-tag, + .virtual-group-order-tag { + height: 40rpx; + line-height: 40rpx; + padding: 0 14rpx; + margin-left: 10rpx; + border-radius: 999rpx; + color: #fff; + font-size: 22rpx; + font-weight: 800; + } + .seckill-order-tag { + background: linear-gradient(90deg, #ff3d2e, #ff9d2f); + } + .virtual-group-order-tag { + background: linear-gradient(90deg, #FF4500, #FFA07A); + } .title-name { padding-top: 110rpx;