fix: 修复优惠金额空值判断,默认为空字符串
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -177,7 +177,7 @@ export default {
|
|||||||
|
|
||||||
// 金额相关
|
// 金额相关
|
||||||
discountRate: 100, // 折扣率(保留逻辑,默认100%不打折)
|
discountRate: 100, // 折扣率(保留逻辑,默认100%不打折)
|
||||||
discountMoney: 0, // 优惠金额
|
discountMoney: '', // 优惠金额(空字符串,这样parseFloat后为NaN)
|
||||||
totalAmount: 0, // 原价
|
totalAmount: 0, // 原价
|
||||||
discountAmount: 0, // 优惠金额(计算结果)
|
discountAmount: 0, // 优惠金额(计算结果)
|
||||||
actualAmount: 0, // 实付金额
|
actualAmount: 0, // 实付金额
|
||||||
@@ -299,7 +299,7 @@ export default {
|
|||||||
price: item.price
|
price: item.price
|
||||||
})),
|
})),
|
||||||
discountRate: 100, // 保留折扣率逻辑,默认100%
|
discountRate: 100, // 保留折扣率逻辑,默认100%
|
||||||
discountMoney: parseFloat(this.discountMoney) || 0,
|
discountMoney: this.discountMoney ? parseFloat(this.discountMoney) : 0,
|
||||||
remark: this.remark,
|
remark: this.remark,
|
||||||
paymentMethod: this.paymentMethod
|
paymentMethod: this.paymentMethod
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user