订单支付增加优惠券积分

This commit is contained in:
2024-11-18 11:03:39 +08:00
parent d5dbd51c80
commit c9825f8df7
6 changed files with 455 additions and 159 deletions

View File

@@ -119,9 +119,13 @@
</view>
<view class="u-flex">
<view class="color-red u-m-r-24" v-if="youhuiAllPrice>0">
已优惠{{youhuiAllPrice}}
<view class="u-flex u-m-r-24" v-if="youhuiAllPrice>0">
<view class="color-red u-m-r-6 " >
已优惠{{youhuiAllPrice}}
</view>
<up-icon name="info-circle" color="#999" :size="14" @click="youhuiDetailShow"></up-icon>
</view>
<view>
<text>小计</text>
<text class="font-bold u-font-32">{{allPrice}}</text>
@@ -161,12 +165,41 @@
<my-button @tap="printOrder" type="cancel" :color="color.ColorMain">重新打印</my-button>
</view>
</view>
<up-popup :round="10" :show="pop.youhui" mode="center" closeOnClickOverlay @close="youhuiDetailHide" >
<view class="u-p-30" style="width: 80vw;">
<view class="font-bold u-text-center">优惠详情</view>
<view class="u-m-t-32">
<view class="u-flex u-row-between">
<view>满减券抵扣</view>
<view class="color-red">
<text></text>
<text>{{orderInfo.fullCouponDiscountAmount}}</text>
</view>
</view>
<view class="u-flex u-row-between u-m-t-18">
<view>商品券抵扣</view>
<view class="color-red">
<text></text>
<text>{{orderInfo.productCouponDiscountAmount}}</text>
</view>
</view>
<view class="u-flex u-row-between u-m-t-18">
<view>积分抵扣</view>
<view class="color-red">
<text></text>
<text>{{orderInfo.pointsDiscountAmount}}</text>
</view>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed
computed, reactive
} from 'vue';
import color from '@/commons/color.js'
import {
@@ -178,6 +211,15 @@
canTuicai,
numSum
} from '@/commons/utils/goodsUtil.js'
const pop=reactive({
youhui:false
})
function youhuiDetailShow(){
pop.youhui=true
}
function youhuiDetailHide(){
pop.youhui=false
}
const props = defineProps({
orderInfo: {
type: Object,

View File

@@ -33,7 +33,7 @@
<view class="color-666 u-m-t-8 u-font-24">余额</view>
</view>
<view class="">
<view class="font-bold">{{user.totalScore}}</view>
<view class="font-bold">{{user.accountPoints}}</view>
<view class="color-666 u-m-t-8 u-font-24">积分</view>
</view>
<view class="">
@@ -61,7 +61,7 @@
headImg:'',
telephone:'',
amount:'0.00',
totalScore:'0.00'
accountPoints:'0.00'
}
}
}

View File

@@ -316,7 +316,7 @@
headImg:'',
telephone:'',
amount:'0.00',
totalScore:'0.00'
accountPoints:'0.00'
})
//更新选择用户
async function setUser(par) {