mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
minQuantity minPrice checked via settlement.vue
This commit is contained in:
parent
201f9fa9bf
commit
ae9f2e34e6
@ -408,16 +408,16 @@ export default {
|
|||||||
let avaliableCouponNum = 0;
|
let avaliableCouponNum = 0;
|
||||||
if (data) {
|
if (data) {
|
||||||
this.drawlist=[];
|
this.drawlist=[];
|
||||||
avaliableCouponNum = data.length;
|
//avaliableCouponNum = data.length;
|
||||||
this.drawlist = data.data;
|
//this.drawlist = data.data;
|
||||||
/*
|
|
||||||
for(let itemInCart of this.goldmedal) {
|
for(let itemInCart of this.goldmedal) {
|
||||||
let tmpIndex=0;
|
let tmpIndex=0;
|
||||||
for(let myCoupon of data.data) {
|
for(let myCoupon of data.data) {
|
||||||
valDateFromTime=0;
|
valDateFromTime=0;
|
||||||
valDateToTime=0;
|
valDateToTime=0;
|
||||||
dateChecked=true;
|
dateChecked=true;
|
||||||
|
/*
|
||||||
if(myCoupon.fValidFrom) {
|
if(myCoupon.fValidFrom) {
|
||||||
//Fix ios date issue
|
//Fix ios date issue
|
||||||
myCoupon.fValidFrom = myCoupon.fValidFrom.replace(/-/g, '/');
|
myCoupon.fValidFrom = myCoupon.fValidFrom.replace(/-/g, '/');
|
||||||
@ -435,6 +435,7 @@ export default {
|
|||||||
if(valDateToTime && curTime > valDateToTime) {
|
if(valDateToTime && curTime > valDateToTime) {
|
||||||
dateChecked=false;
|
dateChecked=false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if(myCoupon.minQuantity && myCoupon.minQuantity>itemInCart.buyCount) {
|
if(myCoupon.minQuantity && myCoupon.minQuantity>itemInCart.buyCount) {
|
||||||
dateChecked=false;
|
dateChecked=false;
|
||||||
}
|
}
|
||||||
@ -444,16 +445,17 @@ export default {
|
|||||||
if(myCoupon.udf2!='H5') {
|
if(myCoupon.udf2!='H5') {
|
||||||
dateChecked=false;
|
dateChecked=false;
|
||||||
}
|
}
|
||||||
//TODO add more checking
|
|
||||||
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
//if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||||
data.data.splice(tmpIndex,1);
|
if(dateChecked) {
|
||||||
|
//data.data.splice(tmpIndex,1);
|
||||||
_self.drawlist.push(myCoupon);
|
_self.drawlist.push(myCoupon);
|
||||||
avaliableCouponNum++;
|
avaliableCouponNum++;
|
||||||
}
|
}
|
||||||
tmpIndex++;
|
tmpIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
if(avaliableCouponNum > 0) {
|
if(avaliableCouponNum > 0) {
|
||||||
this.curCoupon.couponName = '有 '+avaliableCouponNum+' 张优惠券可以使用';
|
this.curCoupon.couponName = '有 '+avaliableCouponNum+' 张优惠券可以使用';
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,6 @@ export default {
|
|||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
let returnMessage='';
|
let returnMessage='';
|
||||||
if(data.type==1) {
|
if(data.type==1) {
|
||||||
debugger;
|
|
||||||
if(data.data.memberName===undefined){
|
if(data.data.memberName===undefined){
|
||||||
returnMessage = '欢迎回来';
|
returnMessage = '欢迎回来';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user