|
@@ -841,7 +841,7 @@ export default {
|
|
|
let start = new Date(val[1]); // 将起始日期字符串转换为Date对象
|
|
|
let end = new Date(val[0]); // 将结束日期字符串转换为Date对象
|
|
|
let timeDiff = Math.abs(end.getTime() - start.getTime()); // 获取时间差(单位:毫秒)
|
|
|
- this.monthDiff = Math.ceil(timeDiff / (24 * 60 * 60 * 1000))+1;
|
|
|
+ this.monthDiff = Math.ceil(timeDiff / (24 * 60 * 60 * 1000)) + 1;
|
|
|
this.OrderForm.product_list.map(el => {
|
|
|
el.day_num = this.monthDiff
|
|
|
})
|
|
@@ -1565,14 +1565,21 @@ export default {
|
|
|
discount: {
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
- this.OrderForm.real_price = this.price * newVal / 10;
|
|
|
+ if (newVal) {
|
|
|
+ this.OrderForm.real_price = this.price * newVal / 10;
|
|
|
+ this.totalAmount = this.TO_Cmoney + this.OrderForm.real_price
|
|
|
+ } else {
|
|
|
+ this.OrderForm.real_price = this.OrderForm.real_price
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
price: {
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
- this.OrderForm.real_price = newVal * this.discount / 10;
|
|
|
- this.totalAmount = this.TO_Cmoney + this.OrderForm.real_price
|
|
|
+ if (this.OrderForm.reduction) {
|
|
|
+ this.OrderForm.real_price = newVal * this.discount / 10;
|
|
|
+ this.totalAmount = this.TO_Cmoney + this.OrderForm.real_price
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
"OrderForm.product_list": {
|