增加会员价展示

This commit is contained in:
2024-11-06 14:58:46 +08:00
parent dfe65e0ae6
commit ef8cd6da3a
5 changed files with 167 additions and 39 deletions

View File

@@ -30,9 +30,7 @@
</div>
<div class="" v-if="placeNum == 0">
<div class="note" v-if="item.note">
备注:{{ item.note || "" }}
</div>
<div class="note" v-if="item.note">备注:{{ item.note || "" }}</div>
<div class="note flex" v-else>
<span>备注:</span>
<span class="el-icon-edit u-font-12" @click="editNote"></span>
@@ -69,15 +67,22 @@
</div>
<div class="color-333 total-price">
<div v-if="item.isGift === 'true' || item.status == 'return'">0</div>
<div
:class="{
'free-price': item.isGift === 'true' || item.status == 'return',
}"
>
<span v-if="isSeatFee"> {{ item.totalAmount }}</span>
<span v-else> {{ (item.salePrice*item.number+(item.packAmount||0)).toFixed(2) }}</span>
</div>
<template v-if="item.isGift === 'true' || item.status == 'return'">
<div>0</div>
<div class="free-price">
<span v-if="isSeatFee"> {{ item.totalAmount }}</span>
<span v-else> {{ isShowVipPrice ? vipAllPrice : allPrice }}</span>
</div>
</template>
<template v-else>
<div v-if="isSeatFee">{{ item.totalAmount }}</div>
<div v-else>
<div v-if="isShowVipPrice&&vipAllPrice!=allPrice">{{ vipAllPrice }}</div>
<div :class="{ 'free-price': isShowVipPrice&&vipAllPrice!=allPrice }">
<span> {{ allPrice }}</span>
</div>
</div>
</template>
</div>
</div>
</div>
@@ -86,6 +91,10 @@
<script>
export default {
props: {
isShowVipPrice: {
type: Boolean,
default: false,
},
//是否是餐位费
isSeatFee: {
type: Boolean,
@@ -133,6 +142,23 @@ export default {
};
},
computed: {
vipAllPrice() {
const item = this.item;
const price =
this.isShowVipPrice &&
item.memberPrice != null &&
item.memberPrice != undefined
? (item.memberPrice<=0?item.salePrice:item.memberPrice)
: item.salePrice;
return (price * item.number + (item.packAmount || 0)).toFixed(2);
},
allPrice() {
const item = this.item;
const price = item.salePrice;
return (price * item.number + (item.packAmount || 0)).toFixed(2);
},
isActive() {
const isSel =
this.selIndex === this.index && this.placeNum === this.selPlaceNum;

View File

@@ -9,7 +9,7 @@
:data="quans.fullReductionCoupon"
@cell-click="fullReductionCouponClick"
>
<el-table-column type="index" width="80" label="">
<el-table-column type="index" width="80" label="" v-if="quans.fullReductionCoupon.length>0">
<template v-slot="scope">
<el-checkbox
@change="fullReductionCouponClick(scope.row)"