|
@@ -1693,7 +1693,7 @@ export default {
|
|
|
lookPreview (row) {
|
|
|
this.lookPreviewRow = row;
|
|
|
// 判断商品里的最高价 选中
|
|
|
- console.log(this.lookPreviewRow)
|
|
|
+ // console.log(this.lookPreviewRow)
|
|
|
this.previewVisible = true;
|
|
|
this.setChioseMusic(this.lookPreviewRow)
|
|
|
this.calcPrice()
|
|
@@ -1771,12 +1771,12 @@ export default {
|
|
|
},
|
|
|
calcPrice () {
|
|
|
|
|
|
- let amount = 0,
|
|
|
- marketPrice = 0,
|
|
|
- goodsGroupIds = {},
|
|
|
- couponPrice = 0, // 优惠金额
|
|
|
- goodsIds = [],
|
|
|
- contractGoodsIds = ""; // 合同所需要的商品Id (只需要乐器编号)
|
|
|
+ let amount = 0
|
|
|
+ let marketPrice = 0
|
|
|
+ let goodsGroupIds = {}
|
|
|
+ let couponPrice = 0// 优惠金额
|
|
|
+ let goodsIds = []
|
|
|
+ let contractGoodsIds = ""; // 合同所需要的商品Id (只需要乐器编号)
|
|
|
// 课程 this.topfor payfor checkfor
|
|
|
let mgs = this.lookPreviewRow.yuji;
|
|
|
|
|
@@ -1786,7 +1786,7 @@ export default {
|
|
|
let newStudent = this.newStudentfor
|
|
|
// 加上判断是否有课程信息
|
|
|
if (mgs) {
|
|
|
- console.log(csi)
|
|
|
+ // console.log(csi)
|
|
|
// amount += parseFloat(mgs);s
|
|
|
const sbaseInfo = newStudent.baseInfo
|
|
|
if (sbaseInfo.ischeck && sbaseInfo.isStatus) {
|
|
@@ -1794,6 +1794,7 @@ export default {
|
|
|
marketPrice += value;
|
|
|
amount += Number(parseFloat(sbaseInfo.value ? sbaseInfo.value : 0))
|
|
|
}
|
|
|
+
|
|
|
const allInfo = csi.allInfo
|
|
|
if (allInfo.ischeck) {
|
|
|
const value = Number(parseFloat(allInfo.value ? allInfo.value : 0))
|
|
@@ -1847,7 +1848,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
let ir = this.lookPreviewRow.fangshi;
|
|
|
- console.log(ir)
|
|
|
let courseCouponPrice = 0
|
|
|
if (ir.length > 0) {
|
|
|
ir.forEach(item => {
|
|
@@ -1860,28 +1860,46 @@ export default {
|
|
|
amount += 0;
|
|
|
couponPrice = 0; // 优惠金额
|
|
|
courseCouponPrice = 0
|
|
|
+ marketPrice += parseFloat(item.mode.marketPrice)
|
|
|
} else if (item.chiosetype == "LEASE") {
|
|
|
// 租赁
|
|
|
// couponPrice = parseFloat(item.mode.LEASE); // 优惠金额
|
|
|
// courseCouponPrice = parseFloat(item.mode.courseLease || 0)
|
|
|
+ // console.log(parseFloat(item.mode.depositFee), 'lease')
|
|
|
amount += parseFloat(item.mode.depositFee);
|
|
|
marketPrice += parseFloat(item.mode.depositFee);
|
|
|
-
|
|
|
} else {
|
|
|
//团购
|
|
|
amount += parseFloat(item.mode.price);
|
|
|
couponPrice = parseFloat(item.mode.GROUP);
|
|
|
courseCouponPrice = parseFloat(item.mode.courseGroup)
|
|
|
+ marketPrice += parseFloat(item.mode.marketPrice)
|
|
|
}
|
|
|
- marketPrice += parseFloat(item.mode.marketPrice)
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
if (coursePrice - Number(courseCouponPrice) >= 0) {
|
|
|
coursePrice = Number((coursePrice - courseCouponPrice).toFixed(2))
|
|
|
} else {
|
|
|
coursePrice = 0
|
|
|
}
|
|
|
+ let check = [];
|
|
|
+ for (let i in this.checkfor) {
|
|
|
+ if (this.checkfor[i] && i != 'submit') {
|
|
|
+ check.push(this.checkfor[i].ischeck)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let checkFlag = false
|
|
|
+ check.forEach(item => {
|
|
|
+ checkFlag = checkFlag || item
|
|
|
+ })
|
|
|
+
|
|
|
+ if (!checkFlag) {
|
|
|
+ marketPrice += Number(parseFloat(coursePrice))
|
|
|
+ //
|
|
|
+ }
|
|
|
amount += parseFloat(coursePrice);
|
|
|
// console.log(this.lookPreviewRow.markList)
|
|
|
// 辅件
|
|
@@ -1943,21 +1961,6 @@ export default {
|
|
|
} else {
|
|
|
this.needPrice = Number(amount.toFixed(2));
|
|
|
}
|
|
|
- let check = [];
|
|
|
- for (let i in this.checkfor) {
|
|
|
- if (this.checkfor[i] && i != 'submit') {
|
|
|
- check.push(this.checkfor[i].ischeck)
|
|
|
- }
|
|
|
- }
|
|
|
- let checkFlag = false
|
|
|
- check.forEach(item => {
|
|
|
- checkFlag = checkFlag || item
|
|
|
- })
|
|
|
- console.log(mgs, couponPrice, 'yuji')
|
|
|
- if (!checkFlag) {
|
|
|
- marketPrice += Number(parseFloat(coursePrice))
|
|
|
- //
|
|
|
- }
|
|
|
this.orderInfo = {
|
|
|
amount: Number(amount.toFixed(2)),
|
|
|
marketPrice: Number(marketPrice.toFixed(2)),
|