diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index fe8e7a0..786b1b2 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -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; },