|
|
@ -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;"> |
|
|
<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)?'自取-堂食':'到店消费'}} |
|
|
{{(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> |
|
|
|
|
|
<view class="virtual-group-tag" v-if="isVirtualGroupOrder(data)">虚拟成团</view> |
|
|
<view v-if="data.deliveryType == 1" style="display: flex;flex: 1;padding-left: 20rpx;"> |
|
|
<view v-if="data.deliveryType == 1" style="display: flex;flex: 1;padding-left: 20rpx;"> |
|
|
<text style="flex: 1;">{{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}:{{getWorkerName(data)}}</text> |
|
|
<text style="flex: 1;">{{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}:{{getWorkerName(data)}}</text> |
|
|
<view class="" v-if="data.deliveryInfo && data.deliveryInfo.workerPhone"> |
|
|
<view class="" v-if="data.deliveryInfo && data.deliveryInfo.workerPhone"> |
|
|
@ -107,7 +108,7 @@ |
|
|
-¥{{formatAmount(data.freeAmount)}} |
|
|
-¥{{formatAmount(data.freeAmount)}} |
|
|
</view> |
|
|
</view> |
|
|
</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 style="flex: 1;"> |
|
|
优惠券 |
|
|
优惠券 |
|
|
</view> |
|
|
</view> |
|
|
@ -150,7 +151,7 @@ |
|
|
<view class="refund-value refund-amount">¥{{formatMoney(getMerchantRefundDisplayAmount(item))}}</view> |
|
|
<view class="refund-value refund-amount">¥{{formatMoney(getMerchantRefundDisplayAmount(item))}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="refund-goods-card" v-for="(goods,goodsIndex) in item.items" :key="goodsIndex" |
|
|
<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"> |
|
|
<view class="refund-goods-img"> |
|
|
<img :src="goods.productPicture" alt=""> |
|
|
<img :src="goods.productPicture" alt=""> |
|
|
</view> |
|
|
</view> |
|
|
@ -208,7 +209,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="income-formula">商品金额 ¥{{formatMoney(data.goodsAmount)}} + 餐盒/打包费 ¥{{formatMoney(data.packageFee)}}</view> |
|
|
<view class="income-formula">商品金额 ¥{{formatMoney(data.goodsAmount)}} + 餐盒/打包费 ¥{{formatMoney(data.packageFee)}}</view> |
|
|
<view class="income-row"> |
|
|
<view class="income-row"> |
|
|
<text>抽佣比例</text> |
|
|
<text>{{data.incomeSummary.commissionRateLabel || '抽佣比例'}}</text> |
|
|
<text>{{formatMoney(data.incomeSummary.commissionRate)}}%</text> |
|
|
<text>{{formatMoney(data.incomeSummary.commissionRate)}}%</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="income-row"> |
|
|
<view class="income-row"> |
|
|
@ -411,7 +412,11 @@ |
|
|
return { |
|
|
return { |
|
|
Ptype:'', |
|
|
Ptype:'', |
|
|
menuButtonInfo: {}, |
|
|
menuButtonInfo: {}, |
|
|
data:{}, |
|
|
data:{ |
|
|
|
|
|
goodsList: [], |
|
|
|
|
|
userCoupon: [], |
|
|
|
|
|
mallRefundRecord: [] |
|
|
|
|
|
}, |
|
|
mealServingLoading: false |
|
|
mealServingLoading: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -513,8 +518,17 @@ |
|
|
if (order && order.orderType == 1) { |
|
|
if (order && order.orderType == 1) { |
|
|
return this.toAmount(shopTakeaway.commissionRateOne); |
|
|
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); |
|
|
return this.toAmount(shopTakeaway.commissionRateMore); |
|
|
}, |
|
|
}, |
|
|
|
|
|
isVirtualGroupOrder(order) { |
|
|
|
|
|
return !!order && order.isVirtualGroup == 1; |
|
|
|
|
|
}, |
|
|
getSettlementNet(baseAmount, commissionBaseAmount, commissionRate) { |
|
|
getSettlementNet(baseAmount, commissionBaseAmount, commissionRate) { |
|
|
let commissionAmount = this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100; |
|
|
let commissionAmount = this.toAmount(commissionBaseAmount) * this.toAmount(commissionRate) / 100; |
|
|
let commission = Math.round((commissionAmount + Number.EPSILON) * 100) / 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 baseAmount = this.roundAmount(this.toAmount(order.goodsAmount) + this.toAmount(order.packageFee)); |
|
|
let commissionRate = this.getCommissionRate(order); |
|
|
let commissionRate = this.getCommissionRate(order); |
|
|
|
|
|
let commissionRateLabel = order.orderType == 1 ? '单独购买抽佣比例' : (this.isVirtualGroupOrder(order) ? '虚拟成团抽佣比例' : '拼团抽佣比例'); |
|
|
let refundRecords = Array.isArray(order.mallRefundRecord) ? order.mallRefundRecord : []; |
|
|
let refundRecords = Array.isArray(order.mallRefundRecord) ? order.mallRefundRecord : []; |
|
|
let approvedRefundRecords = refundRecords.filter(item => this.isApprovedRefundRecord(item)); |
|
|
let approvedRefundRecords = refundRecords.filter(item => this.isApprovedRefundRecord(item)); |
|
|
let hasWorkerReasonRefund = approvedRefundRecords.some(item => item.status == 1 && item.refundTypeStatus == 2 && this.isWorkerRefundRecord(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) { |
|
|
} else if (order.status == 8 && hasBothReasonRefund) { |
|
|
remark = '商家/配送员都有原因全额退款,商家不产生收入'; |
|
|
remark = '商家/配送员都有原因全额退款,商家不产生收入'; |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.isVirtualGroupOrder(order)) { |
|
|
|
|
|
remark = '虚拟成团订单,' + remark; |
|
|
|
|
|
} |
|
|
return { |
|
|
return { |
|
|
show: true, |
|
|
show: true, |
|
|
baseAmount, |
|
|
baseAmount, |
|
|
commissionRate, |
|
|
commissionRate, |
|
|
|
|
|
commissionRateLabel, |
|
|
normalBaseAmount, |
|
|
normalBaseAmount, |
|
|
normalCommissionAmount: normalNet.commission, |
|
|
normalCommissionAmount: normalNet.commission, |
|
|
normalSettlementAmount: normalNet.settlement, |
|
|
normalSettlementAmount: normalNet.settlement, |
|
|
@ -665,7 +684,7 @@ |
|
|
return Number(amount.toFixed(2)); |
|
|
return Number(amount.toFixed(2)); |
|
|
}, |
|
|
}, |
|
|
getPictureList(pictures) { |
|
|
getPictureList(pictures) { |
|
|
if (pictures == null || pictures === '') return []; |
|
|
if (pictures == null || pictures === '' || pictures == undefined) return []; |
|
|
if (Array.isArray(pictures)) { |
|
|
if (Array.isArray(pictures)) { |
|
|
return pictures.filter(item => item != null && item !== ''); |
|
|
return pictures.filter(item => item != null && item !== ''); |
|
|
} |
|
|
} |
|
|
@ -735,7 +754,13 @@ |
|
|
let that = this |
|
|
let that = this |
|
|
that.tui.request("/mall/order/detail/"+ this.shopId, "get", {}, false, false).then((res) => { |
|
|
that.tui.request("/mall/order/detail/"+ this.shopId, "get", {}, false, false).then((res) => { |
|
|
if (res.code == 200) { |
|
|
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) |
|
|
that.data.incomeSummary = that.buildMerchantIncomeSummary(that.data) |
|
|
@ -984,6 +1009,16 @@ |
|
|
color: #ff6b35; |
|
|
color: #ff6b35; |
|
|
font-weight: 700; |
|
|
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 { |
|
|
.remark-box { |
|
|
display: flex; |
|
|
display: flex; |
|
|
border: 1px solid rgba(255, 107, 53, 0.22); |
|
|
border: 1px solid rgba(255, 107, 53, 0.22); |
|
|
|