|
|
@@ -28,6 +28,34 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="refund-item-list" v-if="Number(orderInfo.packCost)>0||Number(orderInfo.sendCost)>0">
|
|
|
+ <view class="refund-label"><text></text>其他可退:</view>
|
|
|
+ <view>
|
|
|
+ <view class="list" v-if="Number(orderInfo.packCost)>0">
|
|
|
+ <view class="flex list-title" >
|
|
|
+ <text class="product-name">打包费</text>
|
|
|
+ <text class="product-num">{{ orderInfo.packCost?parseFloat(orderInfo.packCost):0 }}元</text>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
+ <input type="digit" placeholder="金额" v-model="orderInfo.refundPackCostAmount" placeholder-style="color:#CCCCCC" />
|
|
|
+ <text style="margin-left:10upx;">元</text>
|
|
|
+ <text style="color:green;margin-left:20upx;">可退{{parseFloat((Number(orderInfo.packCost)-Number(orderInfo.refundPackCost)).toFixed(2))}}元</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="list" v-if="Number(orderInfo.sendCost)>0">
|
|
|
+ <view class="flex list-title" >
|
|
|
+ <text class="product-name">运费</text>
|
|
|
+ <text class="product-num">{{ orderInfo.sendCost?parseFloat(orderInfo.sendCost):0 }}元</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex list-val" style="font-size:26upx;font-weight:bold;">
|
|
|
+ <input type="digit" placeholder="金额" v-model="orderInfo.refundSendCostAmount" placeholder-style="color:#CCCCCC" />
|
|
|
+ <text style="margin-left:10upx;">元</text>
|
|
|
+ <text style="color:green;margin-left:20upx;">可退{{parseFloat((Number(orderInfo.sendCost)-Number(orderInfo.refundSendCost)).toFixed(2))}}元</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="flex refund-item">
|
|
|
<view class="refund-label">退款原因:</view>
|
|
|
<view class="flex list">
|
|
|
@@ -39,10 +67,9 @@
|
|
|
</view>多开错开</view></view>
|
|
|
</view>
|
|
|
<view class="flex refund-item">
|
|
|
- <view class="refund-label">{{orderInfo.book==0?'订单金额':'预付金额'}}:</view>
|
|
|
+ <view class="refund-label">订单金额:</view>
|
|
|
<view class="list">
|
|
|
- <block v-if="orderInfo.book == 0">¥{{orderInfo.orderPrice ? parseFloat(orderInfo.orderPrice):0}}</block>
|
|
|
- <block v-else>¥{{orderInfo.bookPrice ? parseFloat(orderInfo.bookPrice):0}}</block>
|
|
|
+ <block>¥{{orderInfo.orderPrice ? parseFloat(orderInfo.orderPrice):0}}</block>
|
|
|
<text style="margin-left:25upx;font-size:25upx;color:green;" v-if="Number(orderInfo.tkPrice)>0">已退¥{{orderInfo.tkPrice ? parseFloat(orderInfo.tkPrice) : 0}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -124,6 +151,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(Number(this.orderInfo.refundSendCostAmount)>0){
|
|
|
+ price = Number(this.orderInfo.refundSendCostAmount) + Number(price)
|
|
|
+ }
|
|
|
+ if(Number(this.orderInfo.refundPackCostAmount)>0){
|
|
|
+ price = Number(this.orderInfo.refundPackCostAmount) + Number(price)
|
|
|
+ }
|
|
|
price = parseFloat(price.toFixed(2))
|
|
|
this.refundMoney = price
|
|
|
return price
|
|
|
@@ -167,6 +200,20 @@ export default {
|
|
|
uni.showToast({title:'请选择商品',icon:'none'})
|
|
|
return;
|
|
|
}
|
|
|
+ if(Number(this.orderInfo.refundPackCostAmount)>0){
|
|
|
+ let couldRefundPackCost = parseFloat((Number(this.orderInfo.packCost)-Number(this.orderInfo.refundPackCost)).toFixed(2))
|
|
|
+ if(Number(this.orderInfo.refundPackCostAmount)>Number(couldRefundPackCost)){
|
|
|
+ uni.showToast({title:'打包费超出可退金额',icon:'none'})
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(Number(this.orderInfo.refundSendCostAmount)>0){
|
|
|
+ let couldRefundSendCost = parseFloat((Number(this.orderInfo.sendCost)-Number(this.orderInfo.refundSendCost)).toFixed(2))
|
|
|
+ if(Number(this.orderInfo.refundSendCostAmount)>Number(couldRefundSendCost)){
|
|
|
+ uni.showToast({title:'运费超出可退金额',icon:'none'})
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
let refundParams = {
|
|
|
id:this.option.id,
|
|
|
product:JSON.stringify(product),
|
|
|
@@ -174,7 +221,9 @@ export default {
|
|
|
remark:this.remark,
|
|
|
refundType:this.refundType,
|
|
|
getOriginalItem:1,
|
|
|
- cause:this.cause
|
|
|
+ cause:this.cause,
|
|
|
+ refundSendCost:this.orderInfo.refundSendCostAmount,
|
|
|
+ refundPackCost:this.orderInfo.refundPackCostAmount
|
|
|
};
|
|
|
that.$util.confirmModal({content:'确认退款?'},() => {
|
|
|
uni.showLoading({title: "提交中",mask:true})
|
|
|
@@ -199,13 +248,11 @@ export default {
|
|
|
async init() {
|
|
|
//getOriginalItem 取原有的花材结构(小菊的花材结构有变化)
|
|
|
const res = await getDetail({ id: this.option.id,getOriginalItem:1 })
|
|
|
- this.orderInfo = res.data
|
|
|
+ this.orderInfo = {...res.data,refundPackCostAmount:'',refundSendCostAmount:''}
|
|
|
|
|
|
- if(this.orderInfo.book == 0){
|
|
|
- this.couldRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
|
|
|
- }else{
|
|
|
- this.couldRefundPrice = Number(res.data.bookPrice) - Number(res.data.tkPrice)
|
|
|
- }
|
|
|
+
|
|
|
+ this.couldRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
|
|
|
+
|
|
|
this.couldRefundPrice = this.couldRefundPrice.toFixed(2)
|
|
|
this.couldRefundPrice = parseFloat(this.couldRefundPrice)
|
|
|
|