|
|
|
@ -109,9 +109,9 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="group-fee-row"> |
|
|
|
餐盒费:¥{{item.packageFee || 0}} 配送费:¥{{item.deliveryFee || 0}} |
|
|
|
<text v-if="shouldShowPackageFee(item)">餐盒费:¥{{formatMoney(item.packageFee)}} </text>配送费:¥{{formatMoney(item.deliveryFee)}} |
|
|
|
</view> |
|
|
|
<view class="group-total-row">总计:¥{{item.totalAmount || 0}}</view> |
|
|
|
<!-- <view class="group-total-row">总计:¥{{getGroupTotalAmount(item)}}</view> --> |
|
|
|
</view> |
|
|
|
<view class="group-popup-empty" v-if="tuanzhangOrder.length == 0">暂无拼团订单</view> |
|
|
|
</scroll-view> |
|
|
|
@ -138,7 +138,7 @@ |
|
|
|
</view> |
|
|
|
<view class="product-popup-price-row"> |
|
|
|
<text>单价:¥{{item1.price != null ? item1.price : 0}}</text> |
|
|
|
<text v-if="item1.packageFee != null && item1.packageFee !== ''" class="product-popup-package-fee">餐盒费:¥{{item1.packageFee}}</text> |
|
|
|
<text v-if="shouldShowPackageFee(orderDetail) && item1.packageFee != null && item1.packageFee !== ''" class="product-popup-package-fee">餐盒费:¥{{formatMoney(item1.packageFee)}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="product-popup-quantity"> |
|
|
|
@ -172,6 +172,17 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<uni-popup ref="rejectPopup" background-color="transparent"> |
|
|
|
<view class="reject-popup"> |
|
|
|
<view class="reject-popup-title">拒绝原因</view> |
|
|
|
<textarea class="reject-textarea" placeholder="请输入拒绝原因" maxlength="100" |
|
|
|
v-model="rejectReason"></textarea> |
|
|
|
<view class="reject-popup-actions"> |
|
|
|
<view class="reject-popup-btn reject-popup-cancel" @tap="closeRejectPopup">取消</view> |
|
|
|
<view class="reject-popup-btn reject-popup-confirm" @tap="confirmReject">确认拒绝</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -197,7 +208,9 @@ |
|
|
|
returnCount:0, |
|
|
|
submitLoading:false, |
|
|
|
submitRefundId:'', |
|
|
|
contactItem:{} |
|
|
|
contactItem:{}, |
|
|
|
rejectItem:null, |
|
|
|
rejectReason:'' |
|
|
|
} |
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
@ -256,6 +269,23 @@ |
|
|
|
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; |
|
|
|
}, |
|
|
|
formatMoney(value) { |
|
|
|
return this.toNumber(value).toFixed(2); |
|
|
|
}, |
|
|
|
shouldShowPackageFee(order) { |
|
|
|
return !!order && (order.deliveryType == 1 || order.isPack == 1); |
|
|
|
}, |
|
|
|
getGroupTotalAmount(item) { |
|
|
|
let total = this.toNumber(item && item.totalAmount); |
|
|
|
if (this.shouldShowPackageFee(item)) { |
|
|
|
total += this.toNumber(item && item.packageFee); |
|
|
|
} |
|
|
|
return this.formatMoney(total); |
|
|
|
}, |
|
|
|
orderDetailOpen(item){ |
|
|
|
this.returnFormData.id = item.id; |
|
|
|
this.returnFormData.linkId = item.linkId; |
|
|
|
@ -333,6 +363,33 @@ |
|
|
|
}, |
|
|
|
returnAmountAllow(item,status){ |
|
|
|
if (this.submitLoading) return; |
|
|
|
if (status == 0) { |
|
|
|
this.openRejectPopup(item); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.submitReturnAmountAllow(item, status); |
|
|
|
}, |
|
|
|
openRejectPopup(item) { |
|
|
|
this.rejectItem = item; |
|
|
|
this.rejectReason = ''; |
|
|
|
this.$refs.rejectPopup.open('center'); |
|
|
|
}, |
|
|
|
closeRejectPopup() { |
|
|
|
this.rejectItem = null; |
|
|
|
this.rejectReason = ''; |
|
|
|
this.$refs.rejectPopup.close(); |
|
|
|
}, |
|
|
|
confirmReject() { |
|
|
|
const reason = (this.rejectReason || '').trim(); |
|
|
|
if (reason === '') { |
|
|
|
this.tui.toast('请输入拒绝原因'); |
|
|
|
return; |
|
|
|
} |
|
|
|
const item = this.rejectItem; |
|
|
|
this.$refs.rejectPopup.close(); |
|
|
|
this.submitReturnAmountAllow(item, 0, reason); |
|
|
|
}, |
|
|
|
submitReturnAmountAllow(item,status,rejectReason){ |
|
|
|
let titleText = status == 1 ? '确定同意该申请吗?' : '确定拒绝该申请吗?'; |
|
|
|
//退款提示 |
|
|
|
this.groupOrderIdList = []; |
|
|
|
@ -362,10 +419,10 @@ |
|
|
|
let requestList = []; |
|
|
|
if(this.groupOrderIdList != [] && this.groupOrderIdList.length > 0){ |
|
|
|
for(let i = 0; i < this.groupOrderIdList.length;i++){ |
|
|
|
requestList.push(this.processReturn(this.groupOrderIdList[i], status)); |
|
|
|
requestList.push(this.processReturn(this.groupOrderIdList[i], status, rejectReason)); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
requestList.push(this.processReturn(item, status)); |
|
|
|
requestList.push(this.processReturn(item, status, rejectReason)); |
|
|
|
} |
|
|
|
Promise.all(requestList).then((messageList) => { |
|
|
|
const successMessage = messageList[0] || '操作成功'; |
|
|
|
@ -384,7 +441,7 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
processReturn(item,status){ |
|
|
|
processReturn(item,status,rejectReason){ |
|
|
|
let returnFormData = {} |
|
|
|
//退款 |
|
|
|
if(item.status == 0){ |
|
|
|
@ -410,6 +467,9 @@ |
|
|
|
returnFormData.refundAmount = item.refundAmount; |
|
|
|
returnFormData.refundType = item.refundType; |
|
|
|
returnFormData.refundTypeStatus = item.refundTypeStatus; |
|
|
|
if (status == 0) { |
|
|
|
returnFormData.rejectReason = rejectReason; |
|
|
|
} |
|
|
|
|
|
|
|
return this.tui.request("/mall/refund/allowOrReject", "POST", returnFormData, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
@ -940,4 +1000,51 @@ |
|
|
|
font-weight: 700; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.reject-popup { |
|
|
|
width: 620rpx; |
|
|
|
padding: 34rpx 28rpx 30rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
border-radius: 28rpx; |
|
|
|
background: #fff; |
|
|
|
} |
|
|
|
.reject-popup-title { |
|
|
|
color: #00231C; |
|
|
|
font-size: 34rpx; |
|
|
|
font-weight: 900; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.reject-textarea { |
|
|
|
width: 100%; |
|
|
|
height: 180rpx; |
|
|
|
margin-top: 26rpx; |
|
|
|
padding: 20rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
border-radius: 18rpx; |
|
|
|
background: #F5F8F5; |
|
|
|
color: #00231C; |
|
|
|
font-size: 28rpx; |
|
|
|
line-height: 38rpx; |
|
|
|
} |
|
|
|
.reject-popup-actions { |
|
|
|
display: flex; |
|
|
|
gap: 18rpx; |
|
|
|
margin-top: 28rpx; |
|
|
|
} |
|
|
|
.reject-popup-btn { |
|
|
|
flex: 1; |
|
|
|
height: 72rpx; |
|
|
|
border-radius: 16rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: 800; |
|
|
|
line-height: 72rpx; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.reject-popup-cancel { |
|
|
|
background: #eef3f1; |
|
|
|
color: #55716a; |
|
|
|
} |
|
|
|
.reject-popup-confirm { |
|
|
|
background: rgba(0, 35, 28, 1); |
|
|
|
color: rgba(166, 255, 234, 1); |
|
|
|
} |
|
|
|
</style> |