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

+ 3 - 11
ghsApp/src/pagesOrder/refund.vue

@@ -97,7 +97,7 @@
 						<!--<view class="flex list-title" @tap="selectProduct(i)">-->
 						<view class="flex list-title" >
 							<!--<view class="flex-center radioBtn" :class="res.isActive?'active':''"></view>-->
-							{{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} {{`¥${res.price}`}}
+							{{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} 单价 {{`¥${res.discountPrice}`}}
 						</view>
 						<view class="flex list-val">
 							<input type="number" @blur="inputFun" v-model="res.big"><text>扎</text>
@@ -164,20 +164,14 @@ export default {
 	},
 	computed:{
 		refundMoneyFun(){
-			// if(!this.isMonitor){return;}
 			this.refundPrice = 0
 			if(!this.$util.isEmpty(this.product)){
 				this.product.forEach(ele=>{
-					let unitPrice = ele.unitPrice; //单价
+					let unitPrice = ele.discountPrice; //单价
 					let big = ele.big * unitPrice; //输入的扎
-					let ratio = ele.ratio==0?1:ele.ratio; //比例
-					let small = (ele.small/ratio * unitPrice).toFixed(2); //输入的支
-
-					// if(ele.isActive){}
+					let small = (ele.small * ele.discountSmallPrice).toFixed(2); //输入的支
 					this.refundPrice = (Number(this.refundPrice) + big + Number(small)).toFixed(2);
-
 				})
-
 			}
 			this.refundMoney = this.refundPrice
 		},
@@ -234,7 +228,6 @@ export default {
 
 		},
 		inputFun(e){
-			// this.isMonitor = false
 			this.product.forEach(ele=>{
 				if(Number(ele.big)>Number(ele.bigNum)){
 					uni.showToast({title:'不能大于总数量',icon:'none'})
@@ -247,7 +240,6 @@ export default {
 			})
 		},
 		selectProduct(index){
-			// this.isMonitor = true
 			this.product[index].isActive = !this.product[index].isActive;
 		},
 		async init() {