|
|
@@ -20,7 +20,6 @@
|
|
|
background: #3385ff;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
.refund-item-list{
|
|
|
@@ -51,7 +50,7 @@
|
|
|
}
|
|
|
.refund-item{
|
|
|
display: flex;
|
|
|
- padding: 30rpx 0;
|
|
|
+ padding: 20rpx 0;
|
|
|
.refund-label{width: 200rpx;text{color: red;}}
|
|
|
input{
|
|
|
border: 1px solid #ddd;
|
|
|
@@ -59,10 +58,10 @@
|
|
|
textarea{
|
|
|
width: calc(100% - 210rpx);
|
|
|
border: 1px solid #ddd;
|
|
|
+ height:150rpx;
|
|
|
}
|
|
|
}
|
|
|
.btn-box{
|
|
|
-
|
|
|
.btn{
|
|
|
width: 200rpx;
|
|
|
height: 60rpx;
|
|
|
@@ -74,7 +73,6 @@
|
|
|
border: 1px solid #3385ff;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
@@ -84,8 +82,6 @@
|
|
|
<view class="refund-label">退款方式:</view>
|
|
|
<view class="flex list">
|
|
|
<view class="flex" >{{refundType==1?'退货并退款':'仅退款'}}</view>
|
|
|
- <!--<view class="flex" @tap="refundType=1" ><view class="flex-center radioBtn" :class="refundType==1?'active':''"></view>退货并退款</view>-->
|
|
|
- <!--<view style="margin-left: 20rpx" class="flex" @tap="refundType=2"><view class="flex-center radioBtn" :class="refundType==1?'':'active'"></view>仅退款</view>-->
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="refund-item-list" v-if="refundType==1">
|
|
|
@@ -93,7 +89,6 @@
|
|
|
<view>
|
|
|
<view class="list" v-for="(res,i) in product" :key="i">
|
|
|
<view class="flex list-title" >
|
|
|
- <!--<view class="flex-center radioBtn" :class="res.isActive?'active':''"></view>-->
|
|
|
{{res.itemName}} {{`¥${res.itemPrice}`}}
|
|
|
</view>
|
|
|
<view class="flex list-val">
|
|
|
@@ -103,28 +98,34 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="flex refund-item">
|
|
|
+ <view class="refund-label">订单原价:</view>
|
|
|
+ <view class="list">{{parseFloat(prePrice)||0}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex refund-item" v-if="discountType == 4">
|
|
|
+ <view class="refund-label">红包优惠:</view>
|
|
|
+ <view class="list">
|
|
|
+ <text style="color:red;margin-right:20rpx;">-{{parseFloat(discountAmount) || 0}}</text>
|
|
|
+ <text v-if="parseFloat(realPrice) == parseFloat(refundMoney)" style="color:red;">红包已退还</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
<view class="flex refund-item">
|
|
|
- <view class="refund-label">订单金额:</view>
|
|
|
- <view class="list">{{totalMoney}}</view>
|
|
|
+ <view class="refund-label">实付金额:</view>
|
|
|
+ <view class="list">{{parseFloat(realPrice)||0}}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="flex refund-item">
|
|
|
<view class="refund-label"><text></text>退款金额:</view>
|
|
|
- <input type="text" disabled v-model="refundMoney">
|
|
|
+ <input type="text" disabled v-model="refundMoney">
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
<view class=" refund-item">
|
|
|
<view class="refund-label">备注:</view>
|
|
|
<textarea disabled v-model="remark" />
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import { refundDetail } from "@/api/refund/index";
|
|
|
export default {
|
|
|
@@ -132,26 +133,40 @@ export default {
|
|
|
return {
|
|
|
isMonitor:true,
|
|
|
product:'',
|
|
|
- totalMoney:'',
|
|
|
- refundMoney:null,
|
|
|
+ refundMoney:0,
|
|
|
refundType:1,
|
|
|
remark:'',
|
|
|
+ refundInfo:{},
|
|
|
+ realPrice:0,
|
|
|
+ prePrice:0,
|
|
|
+ discountType:0,
|
|
|
+ discountAmount:0
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
},
|
|
|
methods: {
|
|
|
- async init() {
|
|
|
- const res = await refundDetail({
|
|
|
+ init() {
|
|
|
+ refundDetail({
|
|
|
orderSn: this.option.orderSn
|
|
|
- });
|
|
|
- this.product = res.data.itemInfo;
|
|
|
- this.refundType = res.data.refundType;
|
|
|
- this.refundMoney = res.data.refundPrice;
|
|
|
- this.remark = res.data.remark;
|
|
|
- this.totalMoney = res.data.totalPrice
|
|
|
+ }).then(res=>{
|
|
|
+ this.refundInfo = res.data
|
|
|
+ this.product = res.data.itemInfo;
|
|
|
+ this.refundType = res.data.refundType;
|
|
|
+ this.refundMoney = res.data.refundPrice;
|
|
|
+ this.remark = res.data.remark;
|
|
|
+ this.prePrice = res.data.orderInfo.prePrice
|
|
|
+ this.discountType = res.data.orderInfo.discountType || 0
|
|
|
+ this.discountAmount = res.data.orderInfo.discountAmount || 0
|
|
|
+ if(this.discountType == 4){
|
|
|
+ let realPrice = (Number(res.data.orderInfo.prePrice) - Number(res.data.orderInfo.discountAmount)).toFixed(2)
|
|
|
+ this.realPrice = parseFloat(realPrice)
|
|
|
+ }else{
|
|
|
+ this.realPrice = parseFloat(res.data.orderInfo.realPrice)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
};
|
|
|
-</script>
|
|
|
-
|
|
|
+</script>
|