|
@@ -43,14 +43,14 @@
|
|
|
待收:
|
|
|
<text class="fontColor">¥{{ chooseTotalPayPrice }}</text>
|
|
|
</view>
|
|
|
- <view v-if="chooseList.length > 0 && backDiscountVal&&backDiscountVal!=0">
|
|
|
+ <view v-if="chooseList.length > 0 && backDiscountVal">
|
|
|
折后:
|
|
|
<text class="fontColor">¥{{ backDiscountPrice }}</text>
|
|
|
</view>
|
|
|
<view class="u-flex" v-if="chooseList.length > 0">
|
|
|
<view>
|
|
|
折让:
|
|
|
- <text>¥{{ backDiscountVal || 0 }}</text>
|
|
|
+ <text>¥{{ backDiscountVal||0 }}</text>
|
|
|
</view>
|
|
|
<view class="costBtn" @click="costShow = true">打折</view>
|
|
|
</view>
|
|
@@ -95,7 +95,7 @@
|
|
|
</view>
|
|
|
<view class="tip" v-if="discountVal*1 > chooseTotalPayPrice*1">折让金额不能大于待收金额,请重新输入</view>
|
|
|
<view class="costText">折让后金额</view>
|
|
|
- <view class="costText">¥{{ settlement }}</view>
|
|
|
+ <view class="costText">¥{{ settlement<0?0:settlement }}</view>
|
|
|
</view>
|
|
|
<u-button type="primary" :custom-style="customStyle" shape="circle" @click="handleDisCount">确定</u-button>
|
|
|
</view>
|
|
@@ -195,7 +195,7 @@ export default {
|
|
|
shareShow: false,
|
|
|
verifySn:'',
|
|
|
backDiscountPrice:null,
|
|
|
- backDiscountVal:null,
|
|
|
+ backDiscountVal: 0,
|
|
|
cycleNameShow:''
|
|
|
};
|
|
|
},
|
|
@@ -272,7 +272,8 @@ export default {
|
|
|
let totalPrice=this.chooseTotalPayPrice?this.chooseTotalPayPrice:0;
|
|
|
let discountPrice=this.discountVal?this.discountVal:0
|
|
|
let priceNum=totalPrice - discountPrice;
|
|
|
- return formatDecimal(priceNum,2)
|
|
|
+ const ret = formatDecimal(priceNum,2)
|
|
|
+ return Number(this.chooseTotalPayPrice)>=Number(this.backDiscountVal) ? ret : 0
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -428,11 +429,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if(this.settlement *1 <0){
|
|
|
- this.backDiscountVal = '0.00'
|
|
|
+ this.backDiscountVal = 0
|
|
|
}else{
|
|
|
this.backDiscountVal = this.discountVal
|
|
|
}
|
|
|
this.backDiscountPrice = this.settlement
|
|
|
+
|
|
|
+ if(Number(this.chooseTotalPayPrice)<Number(this.backDiscountVal)){
|
|
|
+ this.backDiscountVal = 0
|
|
|
+ this.discountVal = 0
|
|
|
+ }
|
|
|
// 是否全选
|
|
|
this.allChecked = isAllChecked;
|
|
|
},
|