diff --git a/package3/shop/businessInfo.vue b/package3/shop/businessInfo.vue
index 69d814d..a849d18 100644
--- a/package3/shop/businessInfo.vue
+++ b/package3/shop/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/package3/shop/orderDetail.vue b/package3/shop/orderDetail.vue
index aa7377d..671010a 100644
--- a/package3/shop/orderDetail.vue
+++ b/package3/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)}}%
@@ -411,7 +412,11 @@
return {
Ptype:'',
menuButtonInfo: {},
- data:{},
+ data:{
+ goodsList: [],
+ userCoupon: [],
+ mallRefundRecord: []
+ },
mealServingLoading: false
}
},
@@ -513,8 +518,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 commissionAmount = this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100;
let commission = Math.round((commissionAmount + Number.EPSILON) * 100) / 100;
@@ -545,6 +559,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));
@@ -603,10 +618,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,
@@ -665,7 +684,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 !== '');
}
@@ -735,7 +754,13 @@
let that = this
that.tui.request("/mall/order/detail/"+ this.shopId, "get", {}, false, false).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)
@@ -984,6 +1009,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/package3/shop/shopOrderList.vue b/package3/shop/shopOrderList.vue
index cc8a978..6fdf027 100644
--- a/package3/shop/shopOrderList.vue
+++ b/package3/shop/shopOrderList.vue
@@ -42,6 +42,7 @@
{{'#' + item.numberCode}}
秒杀
+ 虚拟成团
{{item.createTime | formatISOTime}}
@@ -345,6 +346,9 @@
isSeckillOrder(item) {
return !!item && item.seckillOrder == 1
},
+ isVirtualGroupOrder(item) {
+ return !!item && item.isVirtualGroup == 1
+ },
isEmptyShopMakeTime(value) {
return value === null || value === undefined || value === ''
},
@@ -719,6 +723,18 @@
font-size: 24rpx;
font-weight: 800;
}
+ .virtual-group-order-tag {
+ display: inline-block;
+ height: 42rpx;
+ line-height: 42rpx;
+ padding: 0 16rpx;
+ margin: 0 0 8rpx 10rpx;
+ border-radius: 999rpx;
+ background: linear-gradient(90deg, #FF4500, #FFA07A);
+ color: #fff;
+ font-size: 24rpx;
+ font-weight: 800;
+ }
.order-time {
color: #7a8582;