Commit efa69c6a authored by youjie's avatar youjie

no message

parent 872e4f4d
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="err" v-if="x.err"> <view class="err" v-if="x.err">
{{x.err}} {{x.err}}
</view> </view>
<view style="color: #dfbe6e;font-size: 22rpx;" <view v-else style="color: #dfbe6e;font-size: 22rpx;"
:style="{'padding-top':x.err?'':'30rpx'}"> :style="{'padding-top':x.err?'':'30rpx'}">
{{x.overlapUse==1?'可叠加使用':'不可叠加使用'}} {{x.overlapUse==1?'可叠加使用':'不可叠加使用'}}
</view> </view>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<script> <script>
export default { export default {
props: ["list", "current","price","currentPrice","order"], props: ["list", "current","price","currentPrice","order","numberPeople"],
data() { data() {
return { return {
mc: "", mc: "",
...@@ -83,6 +83,8 @@ ...@@ -83,6 +83,8 @@
console.log(!x.err || x.err=='订单金额不满足') console.log(!x.err || x.err=='订单金额不满足')
if(!x.err || x.err=='订单金额不满足'){ if(!x.err || x.err=='订单金额不满足'){
x.err = x.useCondition>this.price?'订单金额不满足':null x.err = x.useCondition>this.price?'订单金额不满足':null
}else if(!x.err || x.err=='订单人数不满足'){
x.err = x.orderGuestNum>this.numberPeople?'订单金额不满足':null
} }
}) })
this.OverlayCalculation() this.OverlayCalculation()
...@@ -139,6 +141,8 @@ ...@@ -139,6 +141,8 @@
this.ts.forEach((x)=>{ this.ts.forEach((x)=>{
if(!x.err && x.useCondition>this.price){ if(!x.err && x.useCondition>this.price){
x.err = '订单金额不满足' x.err = '订单金额不满足'
}else if(!x.err && x.orderGuestNum>this.numberPeople){
x.err = '订单人数不满足'
} }
}) })
}, },
...@@ -209,7 +213,9 @@ ...@@ -209,7 +213,9 @@
if(x.overlapUse){ if(x.overlapUse){
if(!x.check&&x.denomination>this.money){ if(!x.check&&x.denomination>this.money){
x.err = '订单金额不满足' x.err = '订单金额不满足'
}else { }else if(!x.check&&x.orderGuestNum>this.numberPeople){
x.err = '订单人数不满足'
} else {
x.err = null x.err = null
} }
} }
......
...@@ -485,7 +485,10 @@ ...@@ -485,7 +485,10 @@
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<coupon v-if="couponList.length > 0 && showCoupon" :price="price" :list="couponList" :current="useCouponIds" @close="closeCouponHandler" :current-price="realCurrentPriceInfo" :order="orderMsg"></coupon> <coupon v-if="couponList.length > 0 && showCoupon" :price="price"
:list="couponList" :current="useCouponIds" @close="closeCouponHandler"
:current-price="realCurrentPriceInfo" :order="orderMsg"
:numberPeople="total"></coupon>
<view style="padding: 50rpx 40rpx" v-if="tips != ''"> <view style="padding: 50rpx 40rpx" v-if="tips != ''">
<view class="big-title"> <view class="big-title">
...@@ -824,21 +827,24 @@ ...@@ -824,21 +827,24 @@
if(this.couponList && this.couponList.length>0){ if(this.couponList && this.couponList.length>0){
let maxCouponId = 0 let maxCouponId = 0
let discount = 0 let discount = 0
let current = null
const money = this.price const money = this.price
this.couponList.forEach(x=>{ this.couponList.forEach(x=>{
if(x.couponsType==1 && x.denomination>discount) { if(x.couponsType==1 && x.denomination>discount) {
discount=x.denomination discount=x.denomination
maxCouponId = x.id maxCouponId = x.id
current = x
} }
if(x.couponsType==2){ if(x.couponsType==2){
let disMoney = money*(1-x.denomination) let disMoney = money*(1-x.denomination)
if(discount<disMoney){ if(discount<disMoney){
discount=disMoney discount=disMoney
maxCouponId = x.id maxCouponId = x.id
current = x
} }
} }
}) })
if(maxCouponId>0) this.closeCouponHandler([maxCouponId]) if(maxCouponId>0&&this.total>=current.orderGuestNum) this.closeCouponHandler([maxCouponId])
} }
}, },
calcVipDisscountHandle(){ calcVipDisscountHandle(){
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
销售:{{ b2b_user_info.salesBaseInfo.emName }} 销售:{{ b2b_user_info.salesBaseInfo.emName }}
</template> </template>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-AG -->销售:{{ statistics.saleList[0].saleName }}<template v-if="statistics.saleList.length>1">{{statistics.saleList.length}}</template><!-- #endif --> <!-- #ifdef MP-AG -->销售:{{ statistics.saleList[0].saleName }}<template v-if="statistics.saleList&&statistics.saleList.length>1">{{statistics.saleList.length}}</template><!-- #endif -->
</text> </text>
</view> </view>
</view> </view>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<!-- #ifdef MP-DI --> <!-- #ifdef MP-DI -->
<template v-if="b2b_user_info.salesBaseInfo&&b2b_user_info.salesBaseInfo.emName">销售:{{ b2b_user_info.salesBaseInfo.emName }}</template> <template v-if="b2b_user_info.salesBaseInfo&&b2b_user_info.salesBaseInfo.emName">销售:{{ b2b_user_info.salesBaseInfo.emName }}</template>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-AG -->销售:{{ statistics.saleList[0].saleName }}<template v-if="statistics.saleList.length>1">{{statistics.saleList.length}}</template><!-- #endif --> <!-- #ifdef MP-AG -->销售:{{ statistics.saleList[0].saleName }}<template v-if="statistics.saleList&&statistics.saleList.length>1">{{statistics.saleList.length}}</template><!-- #endif -->
</view> </view>
<image class="userHeadInfo_vip" mode="aspectFit" <image class="userHeadInfo_vip" mode="aspectFit"
style="width: 385rpx;height: 49rpx;" style="width: 385rpx;height: 49rpx;"
......
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