2.0.0相关修改更新
This commit is contained in:
@@ -99,19 +99,21 @@
|
||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="favorable_right" :class="{column:item.value.length>0}" v-if="item.type=='product'">
|
||||
<view class="favorable_right_text" v-for="(items,indexs) in item.value" :key="indexs">
|
||||
<text>{{items.name}}</text>
|
||||
<text>X{{items.num}}</text>
|
||||
<text>-¥{{items.discountAmount || 0}}</text>
|
||||
<view :class="{column:item.value.length>0}">
|
||||
<view class="favorable_right_text" v-for="(items,indexs) in item.value" :key="indexs">
|
||||
<text>{{items.name}}</text>
|
||||
<text>X{{items.num}}</text>
|
||||
<text>-¥{{items.discountAmount || 0}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-icon v-if="item.value.length <= 0" name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
<u-icon name="arrow-right" color="#575B66" size="28" style="margin-top: 5rpx;"></u-icon>
|
||||
</view>
|
||||
<view class="favorable_right" v-if="item.type=='points'" @click.stop="pointsChange">
|
||||
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;" v-if="calcUsablePointsData.usable">
|
||||
使用 {{ calcUsablePointsData.pointsNum}} 积分抵扣¥{{calcUsablePointsData.pointsNum/calcUsablePointsData.equivalentPoints}}
|
||||
</text>
|
||||
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;color: #DE4D3A;" v-else>
|
||||
{{calcUsablePointsData.unusableReason}}
|
||||
{{calcUsablePointsData.unusableReason||''}}
|
||||
</text>
|
||||
|
||||
<u-checkbox-group iconPlacement="right" @change="pointsChange">
|
||||
@@ -140,7 +142,7 @@
|
||||
|
||||
<!-- 充值免单 -->
|
||||
<view style="padding: 0 20rpx;">
|
||||
<rechargeFree v-if="freeDingConfig.enable == 1&&storeInfo.registerType == 'munchies'" ref="rechargeFree" :rechargeFreeChecked="rechargeFreeChecked" :freeDisabled="freeDisabled" :payAmount="listinfo.payAmount" :freeDingConfig="freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
|
||||
<rechargeFree v-if="freeDingConfig&&freeDingConfig.enable == 1&&storeInfo.registerType == 'munchies'" ref="rechargeFree" :rechargeFreeChecked="rechargeFreeChecked" :freeDisabled="freeDisabled" :payAmount="listinfo.payAmount" :freeDingConfig="freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
|
||||
</view>
|
||||
<!-- 充值活动 -->
|
||||
<topUpActivity v-if="storeInfo.registerType == 'munchies'" ref="topUpActivity" :shopUserInfo="amountVIP" ></topUpActivity>
|
||||
@@ -293,7 +295,6 @@
|
||||
this.is_type = 1;
|
||||
}
|
||||
this.getProductqueryShop();
|
||||
this.getchoseEatModel('index',0);
|
||||
uni.cache.set('selectCouponData',[])
|
||||
},
|
||||
onShow() {
|
||||
@@ -308,7 +309,7 @@
|
||||
item.show = true;
|
||||
}
|
||||
})
|
||||
|
||||
this.getAount()
|
||||
this.getchoseEatModel('index',this.is_type)
|
||||
},
|
||||
methods: {
|
||||
@@ -329,7 +330,7 @@
|
||||
let currentPayAmount = (this.userCouponInfos.filter(v => v.type == 1).length > 0 ? Number(this.listinfo.payAmount) + couponData.discountAmount : this.listinfo.payAmount)
|
||||
console.log(this.listinfo.payAmount)
|
||||
// 判断优惠金额不能大于支付金额
|
||||
if ( couponData.discountAmount < currentPayAmount) {
|
||||
if ( couponData.discountAmount <= currentPayAmount) {
|
||||
console.log(this.calcUsablePointsData)
|
||||
// if ( this.isPointsChecked && this.calcUsablePointsData) {
|
||||
// this.listinfo.payAmount = (Number(this.listinfo.payAmount)-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
|
||||
@@ -363,7 +364,7 @@
|
||||
//商品券使用数量
|
||||
|
||||
|
||||
|
||||
let payAmount = this.listinfo.payAmount
|
||||
productList.map((item,index)=>{
|
||||
// 筛选选中商品券商品列表
|
||||
let productDetails = this.listinfo.details.filter(v => v.productId == item.proId);
|
||||
@@ -383,14 +384,14 @@
|
||||
productDetailsNum += v.number;
|
||||
})
|
||||
for (let i = 0; i < v.number; i++){
|
||||
if ( productAllNum < productDetailsNum && productNum < item.num && ((v.memberPrice > 0 ? v.memberPrice : v.salePrice) <= (this.listinfo.payAmount - productPayAmount) )) {
|
||||
if ( productAllNum < productDetailsNum && productNum < item.num && ((v.memberPrice > 0 ? v.memberPrice : v.salePrice) <= (payAmount - productPayAmount) )) {
|
||||
productNum++
|
||||
productAllNum++
|
||||
productPayAmount += v.memberPrice > 0 ? v.memberPrice : v.salePrice
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
payAmount = payAmount - productPayAmount
|
||||
})
|
||||
if ( productNum > 0 ) {
|
||||
this.userCouponInfos.push({
|
||||
@@ -622,6 +623,7 @@
|
||||
this.freeDingConfig = res.data.freeDingConfig;
|
||||
this.shopTableInfo = res.data.shopTableInfo;
|
||||
this.storeInfo = res.data.storeInfo;
|
||||
this.getchoseEatModel('index',this.is_type)
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1494,9 +1496,11 @@
|
||||
}
|
||||
|
||||
}
|
||||
.favorable_right.column{
|
||||
.favorable_right{
|
||||
>.column{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
.favorable_right_text{
|
||||
margin-bottom: 10rpx;
|
||||
text:nth-child(1){
|
||||
@@ -1514,6 +1518,10 @@
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.favorable_right.column{
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
.favorable.column{
|
||||
|
||||
Reference in New Issue
Block a user