mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
commit
b500d2403d
@ -287,12 +287,13 @@ export default {
|
|||||||
checkResult = false;
|
checkResult = false;
|
||||||
}
|
}
|
||||||
if(checkResult) {
|
if(checkResult) {
|
||||||
|
this.discountedProductCode = this.goldmedal[0].productCode
|
||||||
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount>0) {
|
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount>0) {
|
||||||
this.discountAmount = this.curCoupon.couponAmount;
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
return this.sumPrice - this.curCoupon.couponAmount;
|
return this.sumPrice - this.curCoupon.couponAmount;
|
||||||
} else if(this.curCoupon.discount && this.curCoupon.discount>0) {
|
} else if(this.curCoupon.discount && this.curCoupon.discount>0) {
|
||||||
this.discountAmount = this.sumPrice*(1-this.curCoupon.discount);
|
this.discountAmount = this.sumPrice*this.curCoupon.discount;
|
||||||
return this.sumPrice * this.curCoupon.discount;
|
return this.sumPrice * ( 1 - this.curCoupon.discount );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return this.sumPrice;
|
return this.sumPrice;
|
||||||
@ -330,7 +331,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 3: //Limited product % discount
|
case 3: //Limited product % discount
|
||||||
case 4: //% discount
|
case 4: //% discount
|
||||||
total = total + (itemInCart.productPrice * itemInCart.buyCount) * (1-this.curCoupon.discount);
|
total = total + (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount );
|
||||||
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||||
this.discountedProductCode = itemInCart.productCode;
|
this.discountedProductCode = itemInCart.productCode;
|
||||||
couponUsed=true;
|
couponUsed=true;
|
||||||
@ -536,6 +537,8 @@ export default {
|
|||||||
addressDetailInfo: orderAddress[0].detailAddress,
|
addressDetailInfo: orderAddress[0].detailAddress,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
console.log(this.curCoupon,item.productCode,this.discountedProductCode);
|
||||||
|
debugger;
|
||||||
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
|
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
|
||||||
oneProduct.couponId = this.curCoupon.couponId;
|
oneProduct.couponId = this.curCoupon.couponId;
|
||||||
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
|
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
|
||||||
|
@ -317,8 +317,8 @@ export default {
|
|||||||
this.obligation=[];
|
this.obligation=[];
|
||||||
this.receiving=[];
|
this.receiving=[];
|
||||||
this.pending=[];
|
this.pending=[];
|
||||||
for (let i = (this.goldmedal.length-1); i >= 0; i--) {
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
this.useralllist.unshift(this.goldmedal[i].orderDetailList[0]);
|
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||||
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
||||||
if(this.goldmedal[i].status==0){
|
if(this.goldmedal[i].status==0){
|
||||||
@ -330,7 +330,7 @@ export default {
|
|||||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = (this.goldmedal.length-1); i >0; i--) {
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||||
this.useralllist[i].status = this.goldmedal[i].status;
|
this.useralllist[i].status = this.goldmedal[i].status;
|
||||||
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
||||||
|
@ -12,7 +12,8 @@ Vue.prototype.formatConversion = function (te){
|
|||||||
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
//var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
var timedate = y + '-' + m + '-' + d;
|
||||||
return timedate;
|
return timedate;
|
||||||
}else{
|
}else{
|
||||||
var time = new Date(te);
|
var time = new Date(te);
|
||||||
@ -22,7 +23,8 @@ Vue.prototype.formatConversion = function (te){
|
|||||||
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
//var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
var timedate = y + '-' + m + '-' + d;
|
||||||
return timedate;
|
return timedate;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user