特惠产品对各规格操作

This commit is contained in:
faiz 2024-11-19 16:13:09 +08:00
parent e3e58d395d
commit 8f48413b22
1 changed files with 35 additions and 3 deletions

View File

@ -4180,7 +4180,7 @@ export default {
let growth = val
? Math.floor(item.price * 0.2)
: Math.floor(item.price * obj.growth);
let proportion = val ? "0.45" : item.proportion;
let proportion = val ? "0.45" : "0.60";
this.$set(item, "growth", growth);
this.$set(item, "proportion", proportion);
});
@ -4191,8 +4191,20 @@ export default {
let growth = val
? Math.floor(item.price * 0.2)
: Math.floor(item.price * obj.growth);
let proportion = val ? "0.45" : "0.60";
this.$set(item, "growth", growth);
this.$set(item, "proportion", proportion);
});
this.oneFormBatch.map(item => {
let obj = this.proportionList.find(
items => items.value == item.proportion
);
let growth = val
? Math.floor(item.price * 0.2)
: Math.floor(item.price * obj.growth);
let proportion = val ? "0.45" : "0.60";
this.$set(item, "growth", growth);
this.$set(item, "proportion", proportion);
});
console.log(this.OneattrValue);
console.log(this.ManyAttrValue);
@ -4475,6 +4487,14 @@ export default {
this.oneFormBatch[0].image =
this.oneFormBatch[0].image || this.formValidate.slider_image[0];
}
this.ManyAttrValue.map(item => {
let proportion = this.formValidate.is_benefit ? "0.45" : "0.60";
this.$set(item, "proportion", proportion);
});
this.oneFormBatch.map(item => {
let proportion = this.formValidate.is_benefit ? "0.45" : "0.60";
this.$set(item, "proportion", proportion);
});
this.getAttr();
})
.catch(res => {
@ -4620,7 +4640,7 @@ export default {
this.proportionList = this.formValidate.is_benefit
? proportionList
: this.isProportionList;
console.log(info.qualification);
if (info.svip_price_type != 0 && info.mer_svip_status)
this.attrVal = {
price: null,
@ -4663,6 +4683,18 @@ export default {
if (this.formValidate.is_good === 1) {
this.checkboxGroup.push("is_good");
}
this.OneattrValue.map(item => {
let proportion = this.formValidate.is_benefit ? "0.45" : "0.60";
this.$set(item, "proportion", proportion);
});
this.ManyAttrValue.map(item => {
let proportion = this.formValidate.is_benefit ? "0.45" : "0.60";
this.$set(item, "proportion", proportion);
});
this.oneFormBatch.map(item => {
let proportion = this.formValidate.is_benefit ? "0.45" : "0.60";
this.$set(item, "proportion", proportion);
});
this.getAttr();
this.fullscreenLoading = false;
},