|
@@ -89,7 +89,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="乐器提供方式"
|
|
|
- width="200"
|
|
|
+ width="300"
|
|
|
align="center"
|
|
|
prop="fangshi">
|
|
|
<template slot-scope="scope">
|
|
@@ -293,53 +293,48 @@
|
|
|
v-if="courseScheduleInfo ">
|
|
|
<h2 class="title line_bottom">课程</h2>
|
|
|
<div class="options classInfo">
|
|
|
- <div class="option"
|
|
|
- v-if="courseScheduleInfo.soundInfo.ischeck">
|
|
|
- <div class="0_hd">
|
|
|
- <i class="check_default check_active"></i>
|
|
|
- </div>
|
|
|
- <div class="o_bd">乐团声部训练</div>
|
|
|
- <span class="o_ft">现价:¥{{ courseScheduleInfo.soundInfo.value ? courseScheduleInfo.soundInfo.value : 0 }}</span>
|
|
|
- </div>
|
|
|
- <div class="option"
|
|
|
- v-if="courseScheduleInfo.allInfo.ischeck">
|
|
|
- <div class="0_hd">
|
|
|
- <i class="check_default check_active"></i>
|
|
|
- </div>
|
|
|
- <div class="o_bd">乐团合奏训练</div>
|
|
|
- <span class="o_ft">现价:¥{{ courseScheduleInfo.allInfo.value ? courseScheduleInfo.allInfo.value : 0 }}</span>
|
|
|
- </div>
|
|
|
- <div class="option"
|
|
|
- v-if="courseScheduleInfo.baseInfo.ischeck">
|
|
|
- <div class="0_hd">
|
|
|
- <i class="check_default check_active"></i>
|
|
|
- </div>
|
|
|
- <div class="o_bd">网络基础训练</div>
|
|
|
- <span class="o_ft">现价:¥{{ courseScheduleInfo.baseInfo.value ? courseScheduleInfo.baseInfo.value : 0 }}</span>
|
|
|
- </div>
|
|
|
- <div class="option"
|
|
|
- v-if="courseScheduleInfo.holidayInfo.ischeck">
|
|
|
- <div class="0_hd">
|
|
|
- <i class="check_default check_active"></i>
|
|
|
- </div>
|
|
|
- <div class="o_bd">假期集中训练</div>
|
|
|
- <span class="o_ft">现价:¥{{ courseScheduleInfo.holidayInfo.value ? courseScheduleInfo.holidayInfo.value : 0 }}</span>
|
|
|
- </div>
|
|
|
- <div class="option"
|
|
|
- v-if="courseScheduleInfo.networkInfo.ischeck">
|
|
|
- <div class="0_hd">
|
|
|
- <i class="check_default check_active"></i>
|
|
|
- </div>
|
|
|
- <div class="o_bd">乐团云课堂</div>
|
|
|
- <span class="o_ft">现价:¥{{ courseScheduleInfo.networkInfo.value ? courseScheduleInfo.networkInfo.value : 0 }}</span>
|
|
|
- </div>
|
|
|
+ <div class="option" v-if="courseScheduleInfo.soundInfo.ischeck" @click="onCourseChange(courseScheduleInfo.soundInfo)">
|
|
|
+ <div class="0_hd" :style="courseScheduleInfo.soundInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.soundInfo.isStatus ? 'check_active' : '']"></i></div>
|
|
|
+ <div class="o_bd">乐团声部训练</div>
|
|
|
+ <span class="o_ft">
|
|
|
+ 原价:¥{{ courseScheduleInfo.soundInfo.value ? courseScheduleInfo.soundInfo.value : 0 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="option" v-if="courseScheduleInfo.allInfo.ischeck" @click="onCourseChange(courseScheduleInfo.allInfo)">
|
|
|
+ <div class="0_hd" :style="courseScheduleInfo.allInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.allInfo.isStatus ? 'check_active' : '']"></i></div>
|
|
|
+ <div class="o_bd">乐团合奏训练</div>
|
|
|
+ <span class="o_ft">
|
|
|
+ 原价:¥{{ courseScheduleInfo.allInfo.value ? courseScheduleInfo.allInfo.value : 0 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="option" v-if="courseScheduleInfo.holidayInfo.ischeck" @click="onCourseChange(courseScheduleInfo.holidayInfo)">
|
|
|
+ <div class="0_hd" :style="courseScheduleInfo.holidayInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.holidayInfo.isStatus ? 'check_active' : '']"></i></div>
|
|
|
+ <div class="o_bd">假期集中训练</div>
|
|
|
+ <span class="o_ft">
|
|
|
+ 原价:¥{{ courseScheduleInfo.holidayInfo.value ? courseScheduleInfo.holidayInfo.value : 0 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="option" v-if="courseScheduleInfo.networkInfo && courseScheduleInfo.networkInfo.ischeck" @click="onCourseChange(courseScheduleInfo.networkInfo)">
|
|
|
+ <div class="0_hd" :style="courseScheduleInfo.networkInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.networkInfo.isStatus ? 'check_active' : '']"></i></div>
|
|
|
+ <div class="o_bd">乐团云课堂</div>
|
|
|
+ <span class="o_ft">
|
|
|
+ 原价:¥{{ courseScheduleInfo.networkInfo.value ? courseScheduleInfo.networkInfo.value : 0 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="option" v-if="courseScheduleInfo.baseInfo.ischeck" @click="onCourseChange(courseScheduleInfo.baseInfo)">
|
|
|
+ <div class="0_hd" :style="courseScheduleInfo.baseInfo.checkBuy ? null : 'opacity: 0.5'"><i class="check_default" :class="[courseScheduleInfo.baseInfo.isStatus ? 'check_active' : '']"></i></div>
|
|
|
+ <div class="o_bd">网络基础训练</div>
|
|
|
+ <span class="o_ft">
|
|
|
+ 原价:¥{{ courseScheduleInfo.baseInfo.value ? courseScheduleInfo.baseInfo.value : 0 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="options sale"
|
|
|
v-if="lookPreviewRow&&lookPreviewRow.yuji"
|
|
|
:class="[courseScheduleStatus?'lines':'']">
|
|
|
<div class="option">
|
|
|
- <div class="o_bd">课程费用</div>
|
|
|
- <span class="o_ft">¥{{ lookPreviewRow.yuji }}</span>
|
|
|
+ <div class="o_bd">现价</div>
|
|
|
+ <span class="o_ft">¥{{ orderInfo.coursePrice }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="coutInfo"
|
|
@@ -605,7 +600,8 @@
|
|
|
<div class="item">{{ item.shopName}}</div>
|
|
|
<div class="item">提供方式</div>
|
|
|
<div class="item">提供方式对应金额</div>
|
|
|
- <div class="item">减免金额</div>
|
|
|
+ <div class="item">乐器费用减免</div>
|
|
|
+ <div class="item">课程费用减免</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="lineWrap">
|
|
@@ -627,6 +623,13 @@
|
|
|
v-model.trim="item.mode.GROUP"
|
|
|
@input="groupInput(item)"></el-input>
|
|
|
</div>
|
|
|
+ <div class="item">
|
|
|
+ <el-input style="width:80%"
|
|
|
+ type="number"
|
|
|
+ @mousewheel.native.prevent
|
|
|
+ v-model.trim="item.mode.courseGroup"
|
|
|
+ @input="groupCourseInput(item)"></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="lineWrap">
|
|
@@ -651,6 +654,10 @@
|
|
|
@input="deposiInput(item)"
|
|
|
v-model.trim="item.mode.LEASE"></el-input>
|
|
|
</div>
|
|
|
+ <div class="item">
|
|
|
+ <el-input style="width:80%" disabled
|
|
|
+ type="number"></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="lineWrap">
|
|
@@ -668,6 +675,10 @@
|
|
|
@mousewheel.native.prevent
|
|
|
disabled></el-input>
|
|
|
</div>
|
|
|
+ <div class="item">
|
|
|
+ <el-input style="width:80%" disabled
|
|
|
+ type="number"></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -745,6 +756,13 @@ export default {
|
|
|
// this.init();
|
|
|
// },
|
|
|
methods: {
|
|
|
+ onCourseChange(item) {
|
|
|
+ // 判断用户是否可以选择
|
|
|
+ if(item.checkBuy) {
|
|
|
+ item.isStatus = !item.isStatus
|
|
|
+ this.calcPrice()
|
|
|
+ }
|
|
|
+ },
|
|
|
init () {
|
|
|
if (this.$route.query.search) {
|
|
|
this.Fsearch = this.$route.query.search;
|
|
@@ -820,13 +838,14 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
this.activeSoundList = res.data.musicGroupSubjectPlans.map(
|
|
|
item => {
|
|
|
+ console.log(item)
|
|
|
let fangshi = [];
|
|
|
res.data.musicGroupSubjectGoodsGroups.forEach(sub => {
|
|
|
if (
|
|
|
sub.subjectId == item.subjectId &&
|
|
|
sub.type == "INSTRUMENT"
|
|
|
) {
|
|
|
- let FREE, LEASE, GROUP;
|
|
|
+ let FREE, courseFree, LEASE, courseLease, GROUP, courseGroup;
|
|
|
let isFREE = false;
|
|
|
let isLEASE = false;
|
|
|
let isGROUP = false;
|
|
@@ -838,35 +857,42 @@ export default {
|
|
|
sub.kitGroupPurchaseTypeJson
|
|
|
);
|
|
|
|
|
|
- if (
|
|
|
- expectJson &&
|
|
|
- expectJson.hasOwnProperty("FREE")
|
|
|
- ) {
|
|
|
+ if (expectJson && expectJson.hasOwnProperty("FREE")) {
|
|
|
FREE = expectJson.FREE;
|
|
|
isFREE = true;
|
|
|
}
|
|
|
- if (
|
|
|
- expectJson &&
|
|
|
- expectJson.hasOwnProperty("LEASE")
|
|
|
- ) {
|
|
|
+ if (expectJson && expectJson.hasOwnProperty("LEASE")) {
|
|
|
LEASE = expectJson.LEASE;
|
|
|
isLEASE = true;
|
|
|
}
|
|
|
- if (
|
|
|
- expectJson &&
|
|
|
- expectJson.hasOwnProperty("GROUP")
|
|
|
- ) {
|
|
|
+ if (expectJson && expectJson.hasOwnProperty("GROUP")) {
|
|
|
GROUP = expectJson.GROUP;
|
|
|
isGROUP = true;
|
|
|
}
|
|
|
}
|
|
|
+ if(sub.coursePurchaseTypeJson) {
|
|
|
+ let courseJson = JSON.parse(sub.coursePurchaseTypeJson)
|
|
|
+ if (courseJson && courseJson.hasOwnProperty("FREE")) {
|
|
|
+ courseFree = courseJson.FREE;
|
|
|
+ }
|
|
|
+ if (courseJson && courseJson.hasOwnProperty("LEASE")) {
|
|
|
+ courseLease = courseJson.LEASE;
|
|
|
+ }
|
|
|
+ if (courseJson && courseJson.hasOwnProperty("GROUP")) {
|
|
|
+ courseGroup = courseJson.GROUP;
|
|
|
+ }
|
|
|
+ }
|
|
|
fangshi.push({
|
|
|
shopName: sub.name,
|
|
|
id: sub.goodsIdList,
|
|
|
mode: {
|
|
|
+ courseFree: courseFree || 0,
|
|
|
+ courseLease: courseLease || null,
|
|
|
+ courseGroup: courseGroup || 0,
|
|
|
+ yuji: item.fee,
|
|
|
FREE: FREE || 0,
|
|
|
GROUP: GROUP || 0,
|
|
|
- LEASE: LEASE || 0,
|
|
|
+ LEASE: LEASE || null,
|
|
|
depositFee: depositFee || 0, // 保证金
|
|
|
price: price || 0, // 团购价
|
|
|
marketPrice: marketPrice || 0, // 商品原价
|
|
@@ -994,8 +1020,14 @@ export default {
|
|
|
this.topfor = this.$store.getters.topinfo;
|
|
|
this.checkfor = this.$store.getters.checkinfo;
|
|
|
this.$nextTick(res => {
|
|
|
- // console.log(this.$store.getters.checkinfo);
|
|
|
- this.courseScheduleInfo = this.$store.getters.checkinfo;
|
|
|
+ let tempInfo = this.$store.getters.checkinfo
|
|
|
+ // 默认课程都选中
|
|
|
+ tempInfo.soundInfo.isStatus = true
|
|
|
+ tempInfo.allInfo.isStatus = true
|
|
|
+ tempInfo.baseInfo.isStatus = true
|
|
|
+ tempInfo.holidayInfo.isStatus = true
|
|
|
+ tempInfo.networkInfo.isStatus = true
|
|
|
+ this.courseScheduleInfo = tempInfo;
|
|
|
// console.log(this.courseScheduleInfo)
|
|
|
});
|
|
|
// console.log(this.$store.getters.payList)
|
|
@@ -1203,6 +1235,7 @@ export default {
|
|
|
});
|
|
|
let kitGroupPurchaseTypeJson = null;
|
|
|
let depositFee, price;
|
|
|
+ let coursePurchaseTypeJson = null;
|
|
|
active.fangshi.forEach(fs => {
|
|
|
if (fs.id == zl) {
|
|
|
depositFee = fs.mode.depositFee;
|
|
@@ -1221,6 +1254,21 @@ export default {
|
|
|
if (kitGroupPurchaseTypeJson.length <= 0) {
|
|
|
kitGroupPurchaseTypeJson = null;
|
|
|
}
|
|
|
+
|
|
|
+ let courseTypes = {}
|
|
|
+ if(fs.mode.courseFree) {
|
|
|
+ courseTypes.FREE = fs.mode.courseFree
|
|
|
+ }
|
|
|
+ if(fs.mode.courseGroup) {
|
|
|
+ courseTypes.GROUP = fs.mode.courseGroup ? fs.mode.courseGroup : 0
|
|
|
+ }
|
|
|
+ if(fs.mode.courseLease) {
|
|
|
+ courseTypes.LEASE = fs.mode.courseLease
|
|
|
+ }
|
|
|
+ coursePurchaseTypeJson = JSON.stringify(courseTypes)
|
|
|
+ if (coursePurchaseTypeJson.length <= 0) {
|
|
|
+ coursePurchaseTypeJson = null;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
let some = {
|
|
@@ -1230,6 +1278,7 @@ export default {
|
|
|
name: goodsItem.name,
|
|
|
price,
|
|
|
kitGroupPurchaseTypeJson,
|
|
|
+ coursePurchaseTypeJson,
|
|
|
depositFee
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
@@ -1306,6 +1355,7 @@ export default {
|
|
|
});
|
|
|
let kitGroupPurchaseTypeJson = null;
|
|
|
let depositFee, price;
|
|
|
+ let coursePurchaseTypeJson = null;
|
|
|
active.fangshi.forEach(fs => {
|
|
|
if (fs.id == zl) {
|
|
|
depositFee = fs.mode.depositFee;
|
|
@@ -1316,7 +1366,7 @@ export default {
|
|
|
types.FREE = fs.mode.FREE;
|
|
|
}
|
|
|
if (fs.mode.isGROUP) {
|
|
|
- types.GROUP = fs.mode.GROUP;
|
|
|
+ types.GROUP = fs.mode.GROUP ? fs.mode.GROUP : 0;
|
|
|
}
|
|
|
if (fs.mode.isLEASE) {
|
|
|
types.LEASE = fs.mode.LEASE;
|
|
@@ -1325,6 +1375,21 @@ export default {
|
|
|
if (kitGroupPurchaseTypeJson.length <= 0) {
|
|
|
kitGroupPurchaseTypeJson = null;
|
|
|
}
|
|
|
+
|
|
|
+ let courseTypes = {}
|
|
|
+ if(fs.mode.courseFree) {
|
|
|
+ courseTypes.FREE = fs.mode.courseFree
|
|
|
+ }
|
|
|
+ if(fs.mode.courseGroup) {
|
|
|
+ courseTypes.GROUP = fs.mode.courseGroup ? fs.mode.courseGroup : 0
|
|
|
+ }
|
|
|
+ if(fs.mode.courseLease) {
|
|
|
+ courseTypes.LEASE = fs.mode.courseLease
|
|
|
+ }
|
|
|
+ coursePurchaseTypeJson = JSON.stringify(courseTypes)
|
|
|
+ if (coursePurchaseTypeJson.length <= 0) {
|
|
|
+ coursePurchaseTypeJson = null;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
let some = {
|
|
@@ -1333,6 +1398,7 @@ export default {
|
|
|
goodsIdList: zl,
|
|
|
name: goodsItem.name,
|
|
|
kitGroupPurchaseTypeJson,
|
|
|
+ coursePurchaseTypeJson,
|
|
|
depositFee,
|
|
|
price
|
|
|
};
|
|
@@ -1445,6 +1511,7 @@ export default {
|
|
|
// 设置乐器提供方式
|
|
|
setGiveMode (row) {
|
|
|
// goodsList
|
|
|
+ console.log(row)
|
|
|
if (row.zhonglei.length <= 0) {
|
|
|
this.$message.error("请先选择乐器规格");
|
|
|
return;
|
|
@@ -1452,7 +1519,11 @@ export default {
|
|
|
// row.fangshi = []
|
|
|
// row.zhonglei
|
|
|
// row.goodsList
|
|
|
+ const tyuji = row.yuji
|
|
|
if (row.fangshi[0] && row.fangshi[0].mode) {
|
|
|
+ row.fangshi.forEach(item => {
|
|
|
+ item.mode.yuji = tyuji
|
|
|
+ })
|
|
|
} else {
|
|
|
for (let i in row.goodsList) {
|
|
|
for (let j in row.zhonglei) {
|
|
@@ -1461,9 +1532,13 @@ export default {
|
|
|
shopName: row.goodsList[i].name,
|
|
|
id: row.goodsList[i].id,
|
|
|
mode: {
|
|
|
+ yuji: tyuji,
|
|
|
FREE: 0,
|
|
|
GROUP: 0,
|
|
|
LEASE: 0,
|
|
|
+ courseFree: 0,
|
|
|
+ courseLease: null,
|
|
|
+ courseGroup: 0,
|
|
|
depositFee: 1500, // 保证金
|
|
|
price: row.goodsList[i].groupPurchasePrice, // 团购价
|
|
|
marketPrice: row.goodsList[i].marketPrice, // 原价
|
|
@@ -1476,7 +1551,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ console.log(row)
|
|
|
this.editSound = row;
|
|
|
this.reductionVisible = true;
|
|
|
},
|
|
@@ -1493,6 +1568,13 @@ export default {
|
|
|
item.mode.GROUP = item.mode.price;
|
|
|
}
|
|
|
},
|
|
|
+ groupCourseInput(item) {
|
|
|
+ console.log(item)
|
|
|
+ let mode = item.mode
|
|
|
+ if(mode.yuji - mode.courseGroup < 0) {
|
|
|
+ mode.courseGroup = mode.yuji
|
|
|
+ }
|
|
|
+ },
|
|
|
deposiInput (item) {
|
|
|
if (item.mode.depositFee - item.mode.LEASE < 0) {
|
|
|
item.mode.LEASE = item.mode.depositFee;
|
|
@@ -1540,40 +1622,67 @@ export default {
|
|
|
goodsIds = [],
|
|
|
contractGoodsIds = ""; // 合同所需要的商品Id (只需要乐器编号)
|
|
|
// 课程 this.topfor payfor checkfor
|
|
|
-
|
|
|
let mgs = this.lookPreviewRow.yuji;
|
|
|
+ let coursePrice = Number(mgs)
|
|
|
let csi = this.checkfor;
|
|
|
// 加上判断是否有课程信息
|
|
|
if (mgs) {
|
|
|
- amount += parseFloat(mgs);
|
|
|
- if (csi.allInfo.ischeck) {
|
|
|
- marketPrice += parseFloat(csi.allInfo.value ? csi.allInfo.value : 0);
|
|
|
+ console.log(csi)
|
|
|
+ // amount += parseFloat(mgs);
|
|
|
+ const allInfo = csi.allInfo
|
|
|
+ if (allInfo.ischeck) {
|
|
|
+ const value = Number(parseFloat(allInfo.value ? allInfo.value : 0))
|
|
|
+ if(allInfo.isStatus) {
|
|
|
+ marketPrice += value;
|
|
|
+ }
|
|
|
+ if(allInfo.isStatus && allInfo.checkBuy) {
|
|
|
+ coursePrice += parseFloat(allInfo.checkBuy ? value : 0)
|
|
|
+ }
|
|
|
}
|
|
|
- if (csi.baseInfo.ischeck) {
|
|
|
- marketPrice += parseFloat(
|
|
|
- csi.baseInfo.value ? csi.baseInfo.value : 0
|
|
|
- );
|
|
|
+ const baseInfo = csi.baseInfo
|
|
|
+ if (baseInfo.ischeck) {
|
|
|
+ const value = parseFloat(baseInfo.value ? baseInfo.value : 0)
|
|
|
+ if(baseInfo.isStatus) {
|
|
|
+ marketPrice += value;
|
|
|
+ }
|
|
|
+ if(baseInfo.isStatus && baseInfo.checkBuy) {
|
|
|
+ coursePrice += parseFloat(baseInfo.checkBuy ? value : 0)
|
|
|
+ }
|
|
|
}
|
|
|
- if (csi.holidayInfo.ischeck) {
|
|
|
- marketPrice += parseFloat(
|
|
|
- csi.holidayInfo.value ? csi.holidayInfo.value : 0
|
|
|
- );
|
|
|
+ const holidayInfo = csi.holidayInfo
|
|
|
+ if (holidayInfo.ischeck) {
|
|
|
+ const value = parseFloat(holidayInfo.value ? holidayInfo.value : 0)
|
|
|
+ if(holidayInfo.isStatus) {
|
|
|
+ marketPrice += value
|
|
|
+ }
|
|
|
+ if(holidayInfo.isStatus && holidayInfo.checkBuy) {
|
|
|
+ coursePrice += parseFloat(holidayInfo.checkBuy ? value : 0)
|
|
|
+ }
|
|
|
}
|
|
|
- if (csi.soundInfo.ischeck) {
|
|
|
- marketPrice += parseFloat(
|
|
|
- csi.soundInfo.value ? csi.soundInfo.value : 0
|
|
|
- );
|
|
|
+ const soundInfo = csi.soundInfo
|
|
|
+ if (soundInfo.ischeck) {
|
|
|
+ const value = parseFloat(soundInfo.value ? soundInfo.value : 0)
|
|
|
+ if(soundInfo.isStatus) {
|
|
|
+ marketPrice += value;
|
|
|
+ }
|
|
|
+ if(soundInfo.isStatus && soundInfo.checkBuy) {
|
|
|
+ coursePrice += parseFloat(soundInfo.checkBuy ? value : 0)
|
|
|
+ }
|
|
|
}
|
|
|
- if (csi.networkInfo.ischeck) {
|
|
|
- marketPrice += parseFloat(
|
|
|
- csi.networkInfo.value ? csi.networkInfo.value : 0
|
|
|
- );
|
|
|
+ const networkInfo = csi.networkInfo
|
|
|
+ if (networkInfo.ischeck) {
|
|
|
+ const value = parseFloat(networkInfo.value ? networkInfo.value : 0)
|
|
|
+ if(networkInfo.isStatus) {
|
|
|
+ marketPrice += value;
|
|
|
+ }
|
|
|
+ if(networkInfo.isStatus && networkInfo.checkBuy) {
|
|
|
+ coursePrice += parseFloat(networkInfo.checkBuy ? value : 0)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- // 乐器
|
|
|
|
|
|
let ir = this.lookPreviewRow.fangshi;
|
|
|
-
|
|
|
+ let courseCouponPrice = 0
|
|
|
if (ir.length > 0) {
|
|
|
ir.forEach(item => {
|
|
|
if (item.checked) {
|
|
@@ -1584,9 +1693,11 @@ export default {
|
|
|
// 免费
|
|
|
amount += 0;
|
|
|
couponPrice = 0; // 优惠金额
|
|
|
+ courseCouponPrice = 0
|
|
|
} else if (item.chiosetype == "LEASE") {
|
|
|
// 租赁
|
|
|
couponPrice = parseFloat(item.mode.LEASE); // 优惠金额
|
|
|
+ courseCouponPrice = parseFloat(item.mode.courseLease || 0)
|
|
|
if (item.name != "自备") {
|
|
|
amount += parseFloat(item.mode.depositFee);
|
|
|
} else {
|
|
@@ -1596,16 +1707,18 @@ export default {
|
|
|
//团购
|
|
|
amount += parseFloat(item.mode.price);
|
|
|
couponPrice = parseFloat(item.mode.GROUP);
|
|
|
+ courseCouponPrice = parseFloat(item.mode.courseGroup)
|
|
|
}
|
|
|
- marketPrice += parseFloat(item.mode.marketPrice);
|
|
|
- // item.id ? goodsGroupIds[item.id] : null
|
|
|
- // if (item.id) {
|
|
|
- // goodsGroupIds[item.id] = item.kitType;
|
|
|
- // }
|
|
|
+ marketPrice += parseFloat(item.mode.marketPrice)
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ if(coursePrice - Number(courseCouponPrice) >= 0) {
|
|
|
+ coursePrice = Number((coursePrice - courseCouponPrice).toFixed(2))
|
|
|
+ } else {
|
|
|
+ coursePrice = 0
|
|
|
+ }
|
|
|
+ amount += parseFloat(coursePrice);
|
|
|
// console.log(this.lookPreviewRow.markList)
|
|
|
// 辅件
|
|
|
if (this.lookPreviewRow.markList.length > 0) {
|
|
@@ -1673,7 +1786,8 @@ export default {
|
|
|
couponPrice: couponPrice,
|
|
|
goodsGroupIds: goodsGroupIds,
|
|
|
goodsIds: goodsIds.join(","),
|
|
|
- contractGoodsIds: contractGoodsIds
|
|
|
+ contractGoodsIds: contractGoodsIds,
|
|
|
+ coursePrice: coursePrice
|
|
|
};
|
|
|
},
|
|
|
getAccessoryPrice (val) {
|
|
@@ -1731,15 +1845,16 @@ export default {
|
|
|
fangshiFilter (val, price) {
|
|
|
let str = "";
|
|
|
for (let i in val) {
|
|
|
- str += `${val[i].shopName}:`;
|
|
|
- if (val[i].mode.isFREE) {
|
|
|
- str += `免费:减免金额${val[i].mode["FREE"]}\n`;
|
|
|
+ let vals = val[i]
|
|
|
+ str += `${vals.shopName}:`;
|
|
|
+ if (vals.mode.isFREE) {
|
|
|
+ str += `免费:减免金额${vals.mode["FREE"]},课程减免${vals.mode['courseFree'] ? vals.mode['courseFree'] : 0}\n`;
|
|
|
}
|
|
|
- if (val[i].mode.isGROUP) {
|
|
|
- str += `团购:团购价${val[i].mode["price"]},减免金额${val[i].mode["GROUP"]}\n`;
|
|
|
+ if (vals.mode.isGROUP) {
|
|
|
+ str += `团购:团购价${vals.mode["price"]},减免金额${vals.mode["GROUP"] ? vals.mode["GROUP"] : 0},课程减免${vals.mode['courseGroup'] ? vals.mode['courseGroup'] : 0}\n`;
|
|
|
}
|
|
|
- if (val[i].mode.isLEASE) {
|
|
|
- str += `租赁:${val[i].mode.depositFee},减免金额${val[i].mode["LEASE"]}\n`;
|
|
|
+ if (vals.mode.isLEASE) {
|
|
|
+ str += `租赁:${vals.mode.depositFee},减免金额${vals.mode["LEASE"] ? vals.mode["LEASE"] : 0},课程减免${vals.mode['courseLease'] ? vals.mode['courseLease'] : 0}\n`;
|
|
|
}
|
|
|
}
|
|
|
// if (val == 'FREE') {
|