shish 2 лет назад
Родитель
Сommit
e225c35f1d
1 измененных файлов с 9 добавлено и 4 удалено
  1. 9 4
      ghsApp/src/pagesOrder/refund.vue

+ 9 - 4
ghsApp/src/pagesOrder/refund.vue

@@ -29,9 +29,10 @@
 			</view>
 		</view>
 		<view class="flex refund-item">
-			<view class="refund-label">订单金额:</view>
+			<view class="refund-label">{{orderInfo.book==0?'订单金额':'预付金额'}}:</view>
 			<view class="list">
-				¥{{parseFloat(orderInfo.orderPrice)||0}}
+				<block v-if="orderInfo.book == 0">¥{{orderInfo.orderPrice ? parseFloat(orderInfo.orderPrice):0}}</block>
+				<block v-else>¥{{orderInfo.bookPrice ? parseFloat(orderInfo.bookPrice):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>
@@ -51,7 +52,7 @@
 			<view class="refund-label">备注:</view>
 			<textarea v-model="remark" />
 		</view>
-		<view style="padding:20upx 0 20upx 0;font-size:32upx;font-weight:bold;">
+		<view style="padding:20upx 0 20upx 0;font-size:30upx;font-weight:bold;">
 			<text v-if="orderInfo.onlinePay == 2" style="color:green;">此单线上付款,提交后,钱会原路自动退回给客户</text>
 			<block v-else>
 				<text v-if="Number(orderInfo.debtPrice)>0" style="color:#3385ff;">
@@ -188,7 +189,11 @@ export default {
 			const res = await getDetail({ id: this.option.id,getOriginalItem:1 })
 			this.orderInfo = res.data
 			
-			this.couldRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
+			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 = this.couldRefundPrice.toFixed(2)
 			this.couldRefundPrice = parseFloat(this.couldRefundPrice)