shish 5 лет назад
Родитель
Сommit
6c3b231b03
1 измененных файлов с 16 добавлено и 16 удалено
  1. 16 16
      ghsApp/src/pagesOrder/refund.vue

+ 16 - 16
ghsApp/src/pagesOrder/refund.vue

@@ -128,7 +128,7 @@
 			<view>每个订单只能发起一次退款操作</view>
 		</view>
 
-		<view class="flex-center btn-box">
+		<view class="flex-center btn-box" style="margin-bottom:50rpx;">
 			<view class="flex-center btn" @tap="retreatPage">取消</view>
 			<view class="flex-center btn active" @tap="refundFun" style="margin-left: 50rpx">确定</view>
 		</view>
@@ -158,6 +158,7 @@ export default {
 			refundMoney:null,
 			refundType:1,
 			remark:'',
+			refundPrice:0
 		};
 	},
 	onShow() {
@@ -165,7 +166,7 @@ export default {
 	computed:{
 		refundMoneyFun(){
 			// if(!this.isMonitor){return;}
-			this.refundMoney = null;
+			this.refundPrice = 0
 			if(!this.$util.isEmpty(this.product)){
 				this.product.forEach(ele=>{
 					let unitPrice = ele.unitPrice; //单价
@@ -174,11 +175,12 @@ export default {
 					let small = (ele.small/ratio * unitPrice).toFixed(2); //输入的支
 
 					// if(ele.isActive){}
-						this.refundMoney = (Number(this.refundMoney) + big + Number(small)).toFixed(2);
+					this.refundPrice = (Number(this.refundPrice) + big + Number(small)).toFixed(2);
 
 				})
-			}
 
+			}
+			this.refundMoney = this.refundPrice
 		},
 	},
 	methods: {
@@ -230,18 +232,16 @@ export default {
 		},
 		inputFun(e){
 			// this.isMonitor = false
-				this.product.forEach(ele=>{
-					if(Number(ele.big)>Number(ele.bigNum)){
-						uni.showToast({title:'不能大于总数量',icon:'none'})
-						ele.big = ele.bigNum;
-					}
-					if(Number(ele.small)>Number(ele.smallNum)){
-						uni.showToast({title:'不能大于总数量',icon:'none'})
-						ele.small = ele.smallNum;
-					}
-				})
-
-
+			this.product.forEach(ele=>{
+				if(Number(ele.big)>Number(ele.bigNum)){
+					uni.showToast({title:'不能大于总数量',icon:'none'})
+					ele.big = ele.bigNum;
+				}
+				if(Number(ele.small)>Number(ele.smallNum)){
+					uni.showToast({title:'不能大于总数量',icon:'none'})
+					ele.small = ele.smallNum;
+				}
+			})
 		},
 		selectProduct(index){
 			// this.isMonitor = true