Merge branch 'ymf_1.0.0' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into dev
This commit is contained in:
@@ -21,6 +21,9 @@ export function canTuiKuan(orderInfo, item) {
|
||||
return orderInfo.status == 'closed' && item.status != 'return' && item.status != 'refund' && item.status !=
|
||||
'refunding' && !item.userCouponId
|
||||
}
|
||||
export function isTuiCai(item) {
|
||||
return item.status == 'return'
|
||||
}
|
||||
export function isTui(item) {
|
||||
return item.status == 'return' || item.status == 'refund' || item.status == 'refunding'
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="boxconstantbox_tow">
|
||||
<text>用户消费结账时,成功充值</text>
|
||||
<input class="text" v-model="form.rechargeTimes"></input>
|
||||
<input class="number" v-model="form.rechargeTimes"></input>
|
||||
<text>倍的金额本单即可享受免单</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -17,7 +17,7 @@
|
||||
</view>
|
||||
<view class="boxconstantbox_tow">
|
||||
<text>订单支付金额需满</text>
|
||||
<input class="text" v-model="form.rechargeThreshold"></input>
|
||||
<input class="number" v-model="form.rechargeThreshold"></input>
|
||||
<text> 元,才能使用</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="user.isVip&&item.isMember&&returnVipMoney(item)>0&&returnVipMoney(item)!=returnTotalMoney(item)">
|
||||
<template
|
||||
v-if="user.isVip&&item.isMember&&returnVipMoney(item)>0&&returnVipMoney(item)!=returnTotalMoney(item)">
|
||||
<view>¥{{returnVipMoney(item)}}</view>
|
||||
<view class=" color-666 line-th">
|
||||
¥{{returnTotalMoney(item)}}</view>
|
||||
@@ -134,7 +135,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template v-if="orderInfo.status=='refund'">
|
||||
<template v-if="orderInfo.refundAmount">
|
||||
<view class="u-flex u-row-between u-m-t-32">
|
||||
<view>退款金额</view>
|
||||
<view class="color-999">
|
||||
@@ -169,39 +170,40 @@
|
||||
<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 u-m-b-18">
|
||||
<view class="u-flex u-row-between u-m-b-18">
|
||||
<view>会员优惠</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
<text>{{vipDiscountPrice}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-b-18" v-if="orderInfo.discountAmount*1>0">
|
||||
<view>打折</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
<text>{{orderInfo.discountAmount}}</text>
|
||||
<text>{{to2(orderInfo.discountAmount) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between " v-if="orderInfo.fullCouponDiscountAmount*1>0">
|
||||
<view>满减券抵扣</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
<text>{{orderInfo.fullCouponDiscountAmount}}</text>
|
||||
<text>{{to2(orderInfo.fullCouponDiscountAmount) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-18" v-if="orderInfo.productCouponDiscountAmount||productCoupPrice">
|
||||
<view class="u-flex u-row-between u-m-t-18"
|
||||
v-if="orderInfo.productCouponDiscountAmount||productCoupPrice">
|
||||
<view>商品券抵扣</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
<text>{{orderInfo.productCouponDiscountAmount||productCoupPrice}}</text>
|
||||
<text> {{to2(orderInfo.productCouponDiscountAmount||productCoupPrice) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-18" v-if="orderInfo.pointsDiscountAmount">
|
||||
<view>积分抵扣</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
<text>{{orderInfo.pointsDiscountAmount}}</text>
|
||||
<text>{{to2(orderInfo.pointsDiscountAmount) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -213,14 +215,17 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
computed, reactive
|
||||
computed,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js'
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js'
|
||||
import {
|
||||
isTui,isGift,
|
||||
isTui,
|
||||
isTuiCai,
|
||||
isGift,
|
||||
canTuiKuan,
|
||||
canTuicai,
|
||||
numSum
|
||||
@@ -228,9 +233,11 @@
|
||||
const pop = reactive({
|
||||
youhui: false
|
||||
})
|
||||
|
||||
function youhuiDetailShow() {
|
||||
pop.youhui = true
|
||||
}
|
||||
|
||||
function youhuiDetailHide() {
|
||||
pop.youhui = false
|
||||
}
|
||||
@@ -314,9 +321,10 @@
|
||||
|
||||
const freePrice = computed(() => {
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
const curTotal = cur.info.filter(v => v.gift == true || isTui(v)).reduce((a,
|
||||
const curTotal = cur.info.filter(v => v.gift == true || isGift(v)).reduce((a,
|
||||
b) => {
|
||||
return a + (b.num * b.price)
|
||||
const price = (b.isMember && b.memberPrice) ? b.memberPrice : b.price
|
||||
return a + (b.num * price)
|
||||
}, 0)
|
||||
return prve + curTotal
|
||||
}, 0)
|
||||
@@ -327,7 +335,9 @@
|
||||
return 0
|
||||
}
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return" &&!v.userCouponId&&(v.isMember&&v.memberPrice)&&(v.memberPrice!=v.price)).reduce((a,
|
||||
const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return" && !v
|
||||
.userCouponId && (v.isMember && v.memberPrice) && (v.memberPrice != v.price)).reduce((
|
||||
a,
|
||||
b) => {
|
||||
return a + (b.num * (b.price - b.memberPrice))
|
||||
}, 0)
|
||||
@@ -355,7 +365,13 @@
|
||||
})
|
||||
|
||||
const youhuiAllPrice = computed(() => {
|
||||
return (freePrice.value*1+vipDiscountPrice.value*1+props.orderInfo.fullCouponDiscountAmount+props.orderInfo.pointsDiscountAmount+productCoupPrice.value*1+(props.orderInfo.discountAmount||0)).toFixed(2)
|
||||
// console.log(freePrice.value * 1 , vipDiscountPrice.value * 1 , props.orderInfo.fullCouponDiscountAmount ,props
|
||||
// .orderInfo.pointsDiscountAmount , productCoupPrice.value * 1 , props.orderInfo.discountAmount);
|
||||
return (freePrice.value * 1 + vipDiscountPrice.value * 1 + props.orderInfo.fullCouponDiscountAmount + props
|
||||
.orderInfo.pointsDiscountAmount + productCoupPrice.value * 1 + (props.orderInfo.discountAmount ||
|
||||
0)).toFixed(2)
|
||||
|
||||
|
||||
})
|
||||
const packFee = computed(() => {
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
|
||||
Reference in New Issue
Block a user