|
@@ -279,6 +279,8 @@
|
|
|
</div>
|
|
|
<el-dialog title="乐团预览"
|
|
|
:visible.sync="previewVisible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ @close="onPreviewClose"
|
|
|
width="450px">
|
|
|
<div class="reductionWrap1 reductionWrap">
|
|
|
<header style="background:#14928A;color:#fff">乐团缴费</header>
|
|
@@ -365,7 +367,7 @@
|
|
|
</div>
|
|
|
<div class="o_bd">{{ con.shopName }}</div>
|
|
|
<span class="o_ft">
|
|
|
- <del>原价:¥{{ con.mode.price }}</del>
|
|
|
+ <del>原价:¥{{ con.mode.marketPrice }}</del>
|
|
|
现价:¥{{ (con.mode.price - con.mode.GROUP).toFixed(2) }}
|
|
|
</span>
|
|
|
</div>
|
|
@@ -377,7 +379,9 @@
|
|
|
<span>配置参数</span>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <p>{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ <template v-for="(goods, index) in lookPreviewRow.goodsList">
|
|
|
+ <p :key="goods.id" v-if="con.id == goods.id">{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -392,8 +396,7 @@
|
|
|
<div class="o_bd">{{ con.shopName }}</div>
|
|
|
<template>
|
|
|
<span class="o_ft">
|
|
|
- <del>减免金额:¥{{ con.mode.LEASE }}</del>
|
|
|
- 押金:¥{{ (con.mode.depositFee - con.mode.LEASE).toFixed(2) }}
|
|
|
+ 押金:¥{{ (con.mode.depositFee).toFixed(2) }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -405,7 +408,10 @@
|
|
|
<span>配置参数</span>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <p>{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ <!-- <p>{{ lookPreviewRow.goodsList[index].specification }}</p> -->
|
|
|
+ <template v-for="(goods, index) in lookPreviewRow.goodsList">
|
|
|
+ <p :key="goods.id" v-if="con.id == goods.id">{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -420,7 +426,7 @@
|
|
|
<div class="o_bd">{{ con.shopName }}</div>
|
|
|
<template>
|
|
|
<span class="o_ft">
|
|
|
- <del>原价:¥{{ con.mode.price }}</del>
|
|
|
+ <del>原价:¥{{ con.mode.marketPrice }}</del>
|
|
|
免费领用
|
|
|
</span>
|
|
|
</template>
|
|
@@ -433,7 +439,10 @@
|
|
|
<span>配置参数</span>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <p>{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ <!-- <p>{{ lookPreviewRow.goodsList[index].specification }}</p> -->
|
|
|
+ <template v-for="(goods, index) in lookPreviewRow.goodsList">
|
|
|
+ <p :key="goods.id" v-if="con.id == goods.id">{{ lookPreviewRow.goodsList[index].specification }}</p>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -557,10 +566,14 @@
|
|
|
<del>原价</del>
|
|
|
<del>¥{{ orderInfo.marketPrice }}</del>
|
|
|
</div>
|
|
|
- <!-- <div class="couponprice markerprice" v-if="orderInfo.couponPrice > 0">
|
|
|
- <span>优惠</span>
|
|
|
- <span>¥{{ orderInfo.couponPrice }}</span>
|
|
|
- </div>-->
|
|
|
+ <!-- <div class="needprice markerprice">
|
|
|
+ <p>现价</p>
|
|
|
+ <p>¥{{ orderInfo.groupPurchasePrice }}</p>
|
|
|
+ </div> -->
|
|
|
+ <!-- <div class="needprice markerprice" v-if="orderInfo.couponPrice > 0">
|
|
|
+ <p>优惠</p>
|
|
|
+ <p>¥{{ orderInfo.couponPrice }}</p>
|
|
|
+ </div> -->
|
|
|
<div class="needprice grouopprice">
|
|
|
<span>仅需支付</span>
|
|
|
<span>¥{{ orderInfo.amount }}</span>
|
|
@@ -573,7 +586,6 @@
|
|
|
<img class="logo"
|
|
|
src="@/assets/images/mycard.png"
|
|
|
alt />
|
|
|
- 还需支付:
|
|
|
<span>¥{{ needPrice }}</span>
|
|
|
</p>
|
|
|
</div>
|
|
@@ -634,6 +646,7 @@
|
|
|
<div class="item">
|
|
|
<el-input style="width:80%"
|
|
|
type="number"
|
|
|
+ disabled
|
|
|
@mousewheel.native.prevent
|
|
|
@input="deposiInput(item)"
|
|
|
v-model.trim="item.mode.LEASE"></el-input>
|
|
@@ -717,7 +730,8 @@ export default {
|
|
|
goodsGroupIds: null,
|
|
|
goodsIds: null,
|
|
|
contractGoodsIds: null, // 选中所有商品ID
|
|
|
- couponPrice: 0 //
|
|
|
+ couponPrice: 0, //
|
|
|
+ groupPurchasePrice: 0
|
|
|
}, // 金额列表,金额计算
|
|
|
needPrice: 0
|
|
|
};
|
|
@@ -799,7 +813,6 @@ export default {
|
|
|
findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
|
|
|
res => {
|
|
|
if (res.code == 200) {
|
|
|
- // console.log(res.data)
|
|
|
this.activeSoundList = res.data.musicGroupSubjectPlans.map(
|
|
|
item => {
|
|
|
let fangshi = [];
|
|
@@ -814,6 +827,7 @@ export default {
|
|
|
let isGROUP = false;
|
|
|
let depositFee = sub.depositFee;
|
|
|
let price = sub.price;
|
|
|
+ let marketPrice = sub.goodsList[0].marketPrice;
|
|
|
if (sub.kitGroupPurchaseTypeJson) {
|
|
|
let expectJson = JSON.parse(
|
|
|
sub.kitGroupPurchaseTypeJson
|
|
@@ -841,7 +855,6 @@ export default {
|
|
|
isGROUP = true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
fangshi.push({
|
|
|
shopName: sub.name,
|
|
|
id: sub.goodsIdList,
|
|
@@ -851,6 +864,7 @@ export default {
|
|
|
LEASE: LEASE || 0,
|
|
|
depositFee: depositFee || 0, // 保证金
|
|
|
price: price || 0, // 团购价
|
|
|
+ marketPrice: marketPrice || 0, // 商品原价
|
|
|
isFREE: isFREE,
|
|
|
isGROUP: isGROUP,
|
|
|
isLEASE: isLEASE
|
|
@@ -1087,7 +1101,7 @@ export default {
|
|
|
},
|
|
|
// 添加教辅
|
|
|
addMark (row) {
|
|
|
- row.markList.push({ name: "", goods: [], price: "" });
|
|
|
+ row.markList.push({ name: "", goods: [], price: "", marketPrice: 0 });
|
|
|
},
|
|
|
// 删除教辅
|
|
|
removeMartItem (row, index) {
|
|
@@ -1224,7 +1238,8 @@ export default {
|
|
|
type: "ACCESSORIES",
|
|
|
goodsIdList: mark.goods.join(","),
|
|
|
name: mark.name,
|
|
|
- price: mark.price
|
|
|
+ price: mark.price,
|
|
|
+ marketPrice: mark.marketPrice
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
}
|
|
@@ -1327,7 +1342,8 @@ export default {
|
|
|
type: "ACCESSORIES",
|
|
|
goodsIdList: mark.goods.join(","),
|
|
|
name: mark.name,
|
|
|
- price: mark.price
|
|
|
+ price: mark.price,
|
|
|
+ marketPrice: mark.marketPrice
|
|
|
};
|
|
|
obj.musicGroupSubjectGoodsGroups.push(some);
|
|
|
}
|
|
@@ -1445,6 +1461,7 @@ export default {
|
|
|
LEASE: 0,
|
|
|
depositFee: 1500, // 保证金
|
|
|
price: row.goodsList[i].groupPurchasePrice, // 团购价
|
|
|
+ marketPrice: row.goodsList[i].marketPrice, // 原价
|
|
|
isFREE: false,
|
|
|
isGROUP: false,
|
|
|
isLEASE: false
|
|
@@ -1483,6 +1500,7 @@ export default {
|
|
|
lookPreview (row) {
|
|
|
this.lookPreviewRow = row;
|
|
|
this.previewVisible = true;
|
|
|
+ this.calcPrice()
|
|
|
},
|
|
|
onAuxiliarie (item) {
|
|
|
// 辅件切换状态
|
|
@@ -1500,6 +1518,15 @@ export default {
|
|
|
// 重新计算金额
|
|
|
this.calcPrice();
|
|
|
},
|
|
|
+ onPreviewClose() {
|
|
|
+ this.lookPreviewRow.fangshi.forEach(item => {
|
|
|
+ item.checked = false;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.lookPreviewRow.markList.forEach(item => {
|
|
|
+ item.checked = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
calcPrice () {
|
|
|
let amount = 0,
|
|
|
marketPrice = 0,
|
|
@@ -1565,7 +1592,7 @@ export default {
|
|
|
amount += parseFloat(item.mode.price);
|
|
|
couponPrice = parseFloat(item.mode.GROUP);
|
|
|
}
|
|
|
- marketPrice += parseFloat(amount + couponPrice);
|
|
|
+ marketPrice += parseFloat(item.mode.marketPrice);
|
|
|
// item.id ? goodsGroupIds[item.id] : null
|
|
|
// if (item.id) {
|
|
|
// goodsGroupIds[item.id] = item.kitType;
|
|
@@ -1580,8 +1607,11 @@ export default {
|
|
|
this.lookPreviewRow.markList.forEach(item => {
|
|
|
if (item.checked) {
|
|
|
amount += parseFloat(item.price);
|
|
|
- marketPrice += parseFloat(item.price);
|
|
|
-
|
|
|
+ let tempPrice = 0
|
|
|
+ item.goods.forEach(item => {
|
|
|
+ tempPrice += this.getAccessoryPrice(item)
|
|
|
+ })
|
|
|
+ marketPrice += parseFloat(tempPrice);
|
|
|
// if (item.goodsList && item.goodsList.length > 0) {
|
|
|
// item.goodsList.forEach(childGoods => {
|
|
|
// marketPrice += parseFloat(childGoods.marketPrice);
|
|
@@ -1611,6 +1641,7 @@ export default {
|
|
|
// // contractGoodsIds += ',' + item.id
|
|
|
// });
|
|
|
// }
|
|
|
+ let tempGroupPurchasePrice = amount || 0
|
|
|
// 判断减去优惠金额,是否大于0(这里有可能出现负数)
|
|
|
if (amount - couponPrice >= 0) {
|
|
|
amount = Number((amount - couponPrice).toFixed(2));
|
|
@@ -1633,12 +1664,24 @@ export default {
|
|
|
this.orderInfo = {
|
|
|
amount: Number(amount.toFixed(2)),
|
|
|
marketPrice: Number(marketPrice.toFixed(2)),
|
|
|
+ groupPurchasePrice: Number(tempGroupPurchasePrice.toFixed(2)),
|
|
|
couponPrice: couponPrice,
|
|
|
goodsGroupIds: goodsGroupIds,
|
|
|
goodsIds: goodsIds.join(","),
|
|
|
contractGoodsIds: contractGoodsIds
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
+ getAccessoryPrice (val) {
|
|
|
+ const lookPreviewRow = this.lookPreviewRow
|
|
|
+ if (lookPreviewRow && lookPreviewRow.markChioseList) {
|
|
|
+ for (let i in lookPreviewRow.markChioseList) {
|
|
|
+ if (lookPreviewRow.markChioseList[i].id == val) {
|
|
|
+ return lookPreviewRow.markChioseList[i].marketPrice;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ },
|
|
|
},
|
|
|
filters: {
|
|
|
AccessoryName (val, lookPreviewRow) {
|
|
@@ -1739,6 +1782,7 @@ export default {
|
|
|
if (!val) {
|
|
|
this.orderInfo = {
|
|
|
marketPrice: 0,
|
|
|
+ groupPurchasePrice: 0,
|
|
|
amount: 0, // 现价总金额
|
|
|
goodsGroupIds: null,
|
|
|
goodsIds: null,
|