增加商品券限制,过滤不满足使用条件的商品券
This commit is contained in:
@@ -30,8 +30,7 @@
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-font-32">{{goosZhonglei}}种商品,共{{goodsNumber}}件</view>
|
||||
<view class="border-bottom u-p-b-32">
|
||||
<view class="" v-for="(item,index) in data.detailList"
|
||||
:key="index">
|
||||
<view class="" v-for="(item,index) in data.detailList" :key="index">
|
||||
<view class="u-flex u-row-between u-col-top u-m-t-32" v-if="item.productId!=-999">
|
||||
<view>
|
||||
<view class=""> {{item.productName}}</view>
|
||||
@@ -44,7 +43,7 @@
|
||||
<template v-if="item.gift">
|
||||
<view class="u-text-right u-relative" :style="computedPriceStyle()">
|
||||
<text class="line-th">¥{{goodsPriceAmount(item)}}</text>
|
||||
<view class="u-absolute" style="bottom: 100%;right: 0;" >
|
||||
<view class="u-absolute" style="bottom: 100%;right: 0;">
|
||||
¥0
|
||||
</view>
|
||||
</view>
|
||||
@@ -52,24 +51,25 @@
|
||||
<template v-else-if="data.memberId&&item.memberPrice&&item.memberPrice!=item.price">
|
||||
<view class="u-text-right u-relative" :style="computedPriceStyle()">
|
||||
<text class="line-th">¥{{goodsPriceAmount(item)}}</text>
|
||||
<view class="u-absolute" style="bottom: 100%;right: 0;" >
|
||||
<view class="u-absolute" style="bottom: 100%;right: 0;">
|
||||
¥{{goodsVipPriceAmount(item)}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="u-text-right u-relative" :style="computedPriceStyle()">
|
||||
<text >¥{{goodsPriceAmount(item)}}</text>
|
||||
<text>¥{{goodsPriceAmount(item)}}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="border-bottom u-p-t-32 u-p-b-32" v-if="data.packFee>0||(data.seatInfo&&data.seatInfo.priceAmount>0)">
|
||||
<view class="border-bottom u-p-t-32 u-p-b-32"
|
||||
v-if="data.packFee>0||(data.seatInfo&&data.seatInfo.priceAmount>0)">
|
||||
<view class="u-flex u-row-between u-col-top" v-if="data.packFee>0">
|
||||
<view class="no-wrap u-m-r-32">打包费</view>
|
||||
<view>¥{{data.packFee||0}}</view>
|
||||
@@ -80,8 +80,24 @@
|
||||
<view>¥{{data.seatInfo.priceAmount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="border-bottom u-p-b-32 u-m-t-32"
|
||||
v-if="data.fullCouponDiscountAmount>0||data.productCouponDiscountAmount>0||data.pointsDiscountAmount>0">
|
||||
<view class="u-flex u-row-between u-col-top" v-if="data.fullCouponDiscountAmount>0">
|
||||
<view class="no-wrap u-m-r-32">满减券抵扣</view>
|
||||
<view class="color-red">-¥{{data.fullCouponDiscountAmount||0}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-32 u-col-top" v-if="data.productCouponDiscountAmount>0">
|
||||
<view class="no-wrap u-m-r-32">商品券抵扣</view>
|
||||
<view class="color-red">-¥{{data.productCouponDiscountAmount||0}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-32 u-col-top" v-if="data.pointsDiscountAmount>0">
|
||||
<view class="no-wrap u-m-r-32">积分抵扣</view>
|
||||
<view class="color-red">-¥{{data.pointsDiscountAmount||0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="u-flex u-row-between border-bottom u-m-t-32 u-p-b-32 u-col-top">
|
||||
<view class="no-wrap u-m-r-32">订单备注</view>
|
||||
<view>{{data.remark||'无'}}</view>
|
||||
@@ -103,7 +119,11 @@
|
||||
import dayjs from 'dayjs';
|
||||
import orderEnum from '@/commons/orderEnum.js'
|
||||
import go from '@/commons/utils/go.js'
|
||||
import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
|
||||
import {
|
||||
isTui,
|
||||
canTuiKuan,
|
||||
canTuicai
|
||||
} from '@/commons/utils/goodsUtil.js'
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
@@ -115,11 +135,11 @@
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return{
|
||||
packFee:0,
|
||||
seatInfo:{
|
||||
productName:'客座费',
|
||||
priceAmount:0
|
||||
return {
|
||||
packFee: 0,
|
||||
seatInfo: {
|
||||
productName: '客座费',
|
||||
priceAmount: 0
|
||||
},
|
||||
detailList: []
|
||||
}
|
||||
@@ -133,14 +153,16 @@
|
||||
let $goodsMap = {}
|
||||
let goosZhonglei = ref(0)
|
||||
let goodsNumber = ref(0)
|
||||
|
||||
|
||||
const priceSize = 9
|
||||
function goodsPriceAmount(item){
|
||||
return (item.price*item.num).toFixed(2)
|
||||
|
||||
function goodsPriceAmount(item) {
|
||||
return (item.price * item.num).toFixed(2)
|
||||
}
|
||||
function goodsVipPriceAmount(item){
|
||||
const price=props.data.memberId?item.memberPrice: item.price
|
||||
return (price*item.num).toFixed(2)
|
||||
|
||||
function goodsVipPriceAmount(item) {
|
||||
const price = props.data.memberId ? item.memberPrice : item.price
|
||||
return (price * item.num).toFixed(2)
|
||||
}
|
||||
// const packeFee=computed(()=>{
|
||||
// return props.data.detailList.reduce((prve,cur)=>{
|
||||
@@ -153,9 +175,9 @@
|
||||
if (!item) {
|
||||
return ''
|
||||
}
|
||||
const minW=`${item.price}`.length * priceSize + 15
|
||||
const minW = `${item.price}`.length * priceSize + 15
|
||||
return {
|
||||
'min-width':(minW<36?36:minW) + 'px'
|
||||
'min-width': (minW < 36 ? 36 : minW) + 'px'
|
||||
}
|
||||
}
|
||||
// const computedPriceStyle = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user