wangfukang 2 weeks ago
parent
commit
2da9824884
  1. 5
      package3/shop/businessInfo.vue
  2. 47
      package3/shop/orderDetail.vue
  3. 16
      package3/shop/shopOrderList.vue

5
package3/shop/businessInfo.vue

@ -57,6 +57,10 @@
<view class="name">单独购买佣金</view>
<view class="text">{{shop.commissionRateOne || 0}}%</view>
</view>
<view class="value">
<view class="name">虚拟成团佣金</view>
<view class="text">{{shop.virtualGroupCommissionRate || 0}}%</view>
</view>
<view class="value">
<view class="name">经营品类</view>
<view class="text">{{shop.type || '暂无'}}</view>
@ -82,6 +86,7 @@
status: 0,
commissionRateMore: '',
commissionRateOne: '',
virtualGroupCommissionRate: '',
type: '',
isDelivery: 0,
cookingTime: ''

47
package3/shop/orderDetail.vue

@ -29,6 +29,7 @@
<view style="border: 1px solid #48D1CC;height: 50rpx;line-height: 50rpx;padding: 0 20rpx;border-radius: 20rpx;margin-top: auto;margin-bottom: auto;color: #48D1CC;font-weight: 700;">
{{(data.deliveryType == 1 && data.orderType != 3)?'普通配送单':(data.deliveryType == 1 && data.orderType == 3)?'面对面配送单':(data.isPack == 1 && data.otherOrder == null)?'自取-打包':(data.isPack == 0 && data.otherOrder == null)?'自取-堂食':'到店消费'}}
</view>
<view class="virtual-group-tag" v-if="isVirtualGroupOrder(data)">虚拟成团</view>
<view v-if="data.deliveryType == 1" style="display: flex;flex: 1;padding-left: 20rpx;">
<text style="flex: 1;">{{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}{{getWorkerName(data)}}</text>
<view class="" v-if="data.deliveryInfo && data.deliveryInfo.workerPhone">
@ -107,7 +108,7 @@
-{{formatAmount(data.freeAmount)}}
</view>
</view>
<view style="display: flex;height: 60rpx;line-height: 60rpx;" v-if="data.userCoupon.length > 0">
<view style="display: flex;height: 60rpx;line-height: 60rpx;" v-if="data.userCoupon && data.userCoupon.length > 0">
<view style="flex: 1;">
优惠券
</view>
@ -150,7 +151,7 @@
<view class="refund-value refund-amount">{{formatMoney(getMerchantRefundDisplayAmount(item))}}</view>
</view>
<view class="refund-goods-card" v-for="(goods,goodsIndex) in item.items" :key="goodsIndex"
v-if="item.items != null && item.items.length > 0">
v-if="item.items != null && item.items != undefined && item.items.length > 0">
<view class="refund-goods-img">
<img :src="goods.productPicture" alt="">
</view>
@ -208,7 +209,7 @@
</view>
<view class="income-formula">商品金额 {{formatMoney(data.goodsAmount)}} + 餐盒/打包费 {{formatMoney(data.packageFee)}}</view>
<view class="income-row">
<text>抽佣比例</text>
<text>{{data.incomeSummary.commissionRateLabel || '抽佣比例'}}</text>
<text>{{formatMoney(data.incomeSummary.commissionRate)}}%</text>
</view>
<view class="income-row">
@ -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);

16
package3/shop/shopOrderList.vue

@ -42,6 +42,7 @@
<view class="order-main">
<view class="order-code" v-if="item.numberCode">{{'#' + item.numberCode}}</view>
<view class="seckill-order-tag" v-if="isSeckillOrder(item)">秒杀</view>
<view class="virtual-group-order-tag" v-if="isVirtualGroupOrder(item)">虚拟成团</view>
<view class="order-time">{{item.createTime | formatISOTime}}</view>
</view>
<view class="order-status">
@ -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;

Loading…
Cancel
Save