|
@@ -280,7 +280,6 @@ export default {
|
|
|
methods: {
|
|
|
closeCost(){
|
|
|
this.costShow = false
|
|
|
- this.discountVal= ''
|
|
|
},
|
|
|
chooseCycleData() {
|
|
|
uni.setStorageSync('chooseList', this.chooseList);
|
|
@@ -392,7 +391,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;
|
|
|
- if (!reg.test(this.discountVal)) {
|
|
|
+ if (this.discountVal && !reg.test(this.discountVal)) {
|
|
|
uni.showToast({
|
|
|
title: '折让金额格式不正确,请重新输入',
|
|
|
icon: 'none'
|
|
@@ -401,7 +400,7 @@ export default {
|
|
|
}
|
|
|
this.costShow = false;
|
|
|
this.backDiscountPrice = this.settlement
|
|
|
- this.backDiscountVal = Number(this.discountVal).toFixed(2)
|
|
|
+ this.backDiscountVal = Number(this.discountVal||0).toFixed(2)
|
|
|
},
|
|
|
submitOrder() {
|
|
|
//发送对账单
|
|
@@ -435,7 +434,7 @@ export default {
|
|
|
} else {
|
|
|
if (row.checked) {
|
|
|
this.chooseList.push(row);
|
|
|
- this.backDiscountVal = 0
|
|
|
+ // this.backDiscountVal = 0
|
|
|
}
|
|
|
}
|
|
|
this.backDiscountPrice = this.settlement
|