Merge branch 'ymf' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into dev
This commit is contained in:
commit
270c7350d3
|
|
@ -168,6 +168,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
|
console.log(this.form.discount / 100)
|
||||||
this.$emit("confirm", (this.form.discount / 100));
|
this.$emit("confirm", (this.form.discount / 100));
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
discount:1,
|
||||||
orderPrice: 0,
|
orderPrice: 0,
|
||||||
fullReductionCouponSel: {
|
fullReductionCouponSel: {
|
||||||
id: "",
|
id: "",
|
||||||
|
|
@ -286,11 +287,12 @@ export default {
|
||||||
const arr = this.quans.productCoupon.filter((v) => v.proId == row.proId);
|
const arr = this.quans.productCoupon.filter((v) => v.proId == row.proId);
|
||||||
const index = arr.findIndex((v) => v.id == row.id);
|
const index = arr.findIndex((v) => v.id == row.id);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
return returnProductCoupAllPrice(
|
const n=returnProductCoupAllPrice(
|
||||||
$goodsPayPriceMap[row.proId],
|
$goodsPayPriceMap[row.proId],
|
||||||
index,
|
index,
|
||||||
row.num
|
row.num
|
||||||
).toFixed(2);
|
)
|
||||||
|
return (n*this.discount).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -439,6 +441,7 @@ export default {
|
||||||
async open(data, propSelCoup) {
|
async open(data, propSelCoup) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.orderPrice = data.orderPrice;
|
this.orderPrice = data.orderPrice;
|
||||||
|
this.discount=data.discount||1
|
||||||
this.quansSelArr = [...propSelCoup];
|
this.quansSelArr = [...propSelCoup];
|
||||||
$goodsPayPriceMap = returnGoodsPayPriceMap(this.goodsArr || []);
|
$goodsPayPriceMap = returnGoodsPayPriceMap(this.goodsArr || []);
|
||||||
if (data.memberId) {
|
if (data.memberId) {
|
||||||
|
|
|
||||||
|
|
@ -1725,11 +1725,11 @@ export default {
|
||||||
return this.vipUser.isVip ? true : false;
|
return this.vipUser.isVip ? true : false;
|
||||||
},
|
},
|
||||||
coupdiscount() {
|
coupdiscount() {
|
||||||
return returnCouponAllPrice(
|
return (this.createOrder.discount*returnCouponAllPrice(
|
||||||
this.quansSelArr,
|
this.quansSelArr,
|
||||||
this.createOrder.data.detailList || [],
|
this.createOrder.data.detailList || [],
|
||||||
this.vipUser
|
this.vipUser
|
||||||
);
|
)).toFixed(2)
|
||||||
},
|
},
|
||||||
goodsDisCount() {
|
goodsDisCount() {
|
||||||
const goodsQuanArr = this.quansSelArr.filter((v) => v.type == 2);
|
const goodsQuanArr = this.quansSelArr.filter((v) => v.type == 2);
|
||||||
|
|
@ -2195,11 +2195,12 @@ export default {
|
||||||
const arr = this.quansSelArr.filter((v) => v.proId == row.proId);
|
const arr = this.quansSelArr.filter((v) => v.proId == row.proId);
|
||||||
const index = arr.findIndex((v) => v.id == row.id);
|
const index = arr.findIndex((v) => v.id == row.id);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
return returnProductCoupAllPrice(
|
const n=returnProductCoupAllPrice(
|
||||||
$goodsPayPriceMap[row.proId],
|
$goodsPayPriceMap[row.proId],
|
||||||
index,
|
index,
|
||||||
row.num
|
row.num
|
||||||
).toFixed(2);
|
)
|
||||||
|
return (n*this.createOrder.discount).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2265,6 +2266,7 @@ export default {
|
||||||
id: this.createOrder.data.id,
|
id: this.createOrder.data.id,
|
||||||
memberId: this.createOrder.data.memberId || this.vipUser.id,
|
memberId: this.createOrder.data.memberId || this.vipUser.id,
|
||||||
orderPrice: (this.yinFuJinE * 1 + this.coupdiscount * 1).toFixed(2),
|
orderPrice: (this.yinFuJinE * 1 + this.coupdiscount * 1).toFixed(2),
|
||||||
|
discount:this.createOrder.discount
|
||||||
},
|
},
|
||||||
[...this.quansSelArr]
|
[...this.quansSelArr]
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue