Commit 4ced3d8a authored by youjie's avatar youjie

包车优惠券

parent 6c2c7b01
......@@ -329,11 +329,8 @@
<u-toast ref="uToast" />
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys"
@confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker>
<!-- <coupon v-if="couponList.length > 0 && showCoupon" :price="getPrice(orderMsg.Money)" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon>-->
<coupon v-if="couponList.length > 0 && showCoupon" :price="orderMsg.Money" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="orderMsg.peoples">
</coupon>
</view>
</template>
......@@ -496,6 +493,7 @@
},
getPeoples(){
this.orderMsg.peoples = Number(this.orderMsg.ManNum) + Number(this.orderMsg.ChildNum) +Number(this.orderMsg.BabyNum);
this.calcMaxCouponHandle()
},
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
......@@ -705,15 +703,16 @@
let maxCouponId = 0
let discount = 0
const money = this.price
this.couponList.forEach(x => {
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.PeopleNum >= x
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.peoples >= x
.orderGuestNum || !x.orderGuestNum)&&this.price>=x.useCondition) {
discount = x.denomination
maxCouponId = x.id
}
if (x.couponsType == 2) {
let disMoney = money * (1 - x.denomination)
if (discount < disMoney && (this.orderMsg.PeopleNum >= x.orderGuestNum || !x
if (discount < disMoney && (this.orderMsg.peoples >= x.orderGuestNum || !x
.orderGuestNum)&&this.price>=x.useCondition) {
discount = disMoney
maxCouponId = x.id
......
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