Commit 5ed7172c authored by youjie's avatar youjie

幸福存折

parent 0566e19d
......@@ -372,6 +372,31 @@
</view>
</view>
</view>
<template v-if="happinessPassbook.client_Balance>0">
<view class="empty-block"></view>
<view style="padding: 50rpx 40rpx">
<view class="big-title">
<text>幸福存折</text>
</view>
<view style="margin-top: 30px;display: flex; align-items: center;">
<view style="font-size: 12px;width:1px;flex:1">
<u-number-box
size="28" :min="0"
:max="happinessPassbook.max"
@change="ChangeUse"
@blur="ChangeUse"
v-model="happinessPassbook.RedEnvelopeMoney"
value="0"
inputWidth="150"></u-number-box>
</view>
<view style="display: flex;align-items: center;">
<text style="color:#F20707;font-size: 12px;">
<text class="content" :style="{ color: mainColor }">余额 {{ happinessPassbook.client_Balance-happinessPassbook.RedEnvelopeMoney}}</text>
</text>
</view>
</view>
</view>
</template>
<view class="empty-block"></view>
<view style="padding: 50rpx 40rpx">
<view class="big-title">
......@@ -464,6 +489,13 @@
<view style="text-align: right">
-¥{{currentCoupon.discountMoney}}</view>
</view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :style="{'color':mainColor+' !important'}" v-if="happinessPassbook.RedEnvelopeMoney>0">
<view style="flex: 1">
<text style="margin-right: 30rpx">幸福存折</text>
</view>
<view style="text-align: right">
-¥{{happinessPassbook.RedEnvelopeMoney}}</view>
</view>
<view v-if="userVipRights && vipDiscountMoney>0" class="flex f12 grey" style="margin-bottom: 40rpx" :style="{'color':mainColor+' !important'}">
<view style="flex: 1">
<text style="margin-right: 30rpx">印象会员福利优惠({{userVipRights.DiscountType==1?`${userVipRights.DiscountValue*10}折`:`减${userVipRights.DiscountValue}/人`}})</text>
......@@ -476,7 +508,7 @@
<text style="margin-right: 30rpx">小计</text>
</view>
<view style="text-align: right">
¥{{parseFloat((price-currentCoupon.discountMoney-vipDiscountMoney)).toFixed(2)}}</view>
¥{{parseFloat((price-currentCoupon.discountMoney-vipDiscountMoney-happinessPassbook.RedEnvelopeMoney)).toFixed(2)}}</view>
</view>
<view class="f12" style="color:#ff3166;margin-bottom: 40rpx" v-if="activity && activity.Id">
......@@ -505,7 +537,7 @@
<view style="color: #ff3166; font-weight: bold">
<text style="font-size: 22rpx">¥</text>
<text style="font-size: 40rpx; margin: 0 20rpx 0 5rpx;font-family: nav-font;">{{
(price-currentCoupon.discountMoney-vipDiscountMoney).toFixed(2)
(price-currentCoupon.discountMoney-vipDiscountMoney-happinessPassbook.RedEnvelopeMoney).toFixed(2)
}}</text>
<text style="color: #6e6e6e; font-size: 24rpx;font-family: microsoft yahei ui light;">共计{{ total }}人</text>
</view>
......@@ -614,6 +646,7 @@
userVipRights:null,
vipDiscountMoney:0,
successVisible: false,
happinessPassbook: {}
};
},
created() {
......@@ -652,9 +685,30 @@
if (option.CreateBy) {
this.CreateBy = option.CreateBy
}
// #ifdef MP-AG
this.GetCustoemrBalance()
// #endif
},
methods: {
GetCustoemrBalance(){
this.apipost("b2b_get_GetCustoemrBalance", {}, (res) => {
if (res.resultCode == 1) {
this.happinessPassbook = {
...res.data,
RedEnvelopeMoney:0
}
}
},
(err) => {
uni.hideLoading()
}
);
},
ChangeUse(e) {
if(e.value>0) this.happinessPassbook.RedEnvelopeMoney = e.value;
else this.happinessPassbook.RedEnvelopeMoney = 0;
},
navigatorToHomeHandle() {
uni.redirectTo({
url: '/pages/index/index'
......@@ -1142,21 +1196,17 @@
var ContactMobile = this.customer.contactNumber; //联系电话
var CustomerType = 0;
var CustomerId = 0
// #ifdef MP-DI
CustomerType = 4;
// #endif
// #ifdef MP-AG
CustomerType = this.customer.isMember
// #endif
var CustomerCreateBy = this.customer.createBy;
var price = 0;
var CreateBy = 0
var DirectCustomerId = 0
// #ifdef MP-DI
CustomerType = 4;
price = this.currentPriceInfo.b2CPrice;
DirectCustomerId = this.customer.customerId
// #endif
// #ifdef MP-AG
CustomerType = this.customer.isMember
price = this.currentPriceInfo.b2BPrice;
CreateBy = this.CreateBy
CustomerId = this.customer.customerId
......@@ -1224,6 +1274,7 @@
// #endif
// #ifdef MP-AG
OrderSource: 5,
RedEnvelopeMoney: this.happinessPassbook.RedEnvelopeMoney,
// #endif
// // #ifdef MP-WEIXIN
// OrderSource: 5,
......
......@@ -525,6 +525,13 @@
<view style="text-align: right">
-{{ orderData.model.DiscountMoney-orderData.model.DisValue}} </view>
</view>
<view class="flex f12" :style="{'color':mainColor+' !important'}" style="margin-bottom: 40rpx" v-if="orderData.model.RedEnvelopeMoney>0">
<view style="flex: 1">
<text style="margin-right: 30rpx">幸福存折</text>
</view>
<view style="text-align: right">
-{{ orderData.model.RedEnvelopeMoney}} </view>
</view>
<view class="flex f12" :style="{'color':mainColor+' !important'}" style="margin-bottom: 40rpx" v-if="orderData.model.DisValue>0">
<view style="flex: 1">
<text style="margin-right: 30rpx">VIP专享优惠</text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment