特惠专区占比

This commit is contained in:
faiz 2024-11-19 11:45:59 +08:00
parent 5e57aaab53
commit 4014376426
1 changed files with 92 additions and 1 deletions

View File

@ -1169,6 +1169,18 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="特惠专区产品:">
<el-radio-group
v-model="formValidate.is_benefit"
:disabled="virStatus"
@change="onChangeBenefit(formValidate.is_benefit)"
>
<el-radio :label="1" class="radio"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="商品规格:" props="spec_type">
<el-radio-group
@ -4042,6 +4054,45 @@ export default {
},
//
onChangeBenefit(val) {
let proportionList = [
{
value: "0.45",
label: "0.45",
coupon: 0.45,
growth: 0.65
},
{
value: "0.40",
label: "0.40",
coupon: 0.5,
growth: 0.7
},
{
value: "0.35",
label: "0.35",
coupon: 0.55,
growth: 0.75
},
{
value: "0.30",
label: "0.30",
coupon: 0.6,
growth: 0.8
},
{
value: "0.25",
label: "0.25",
coupon: 0.65,
growth: 0.85
},
{
value: "0.20",
label: "0.20",
coupon: 0.7,
growth: 0.9
}
];
this.proportionList = val?proportionList:this.proportionList;
this.OneattrValue.map(item => {
let obj = this.proportionList.find(
items => items.value == item.proportion
@ -4049,8 +4100,9 @@ export default {
let growth = val
? Math.floor(item.price * 0.2)
: Math.floor(item.price * obj.growth);
let proportion = val ? "0.45" : item.proportion;
this.$set(item, "growth", growth);
this.$set(item, "proportion", proportion);
});
this.ManyAttrValue.map(item => {
let obj = this.proportionList.find(
@ -4447,6 +4499,45 @@ export default {
is_huimei: info.is_huimei || 0,
is_benefit: info.is_benefit || 0
};
let proportionList = [
{
value: "0.45",
label: "0.45",
coupon: 0.45,
growth: 0.65
},
{
value: "0.40",
label: "0.40",
coupon: 0.5,
growth: 0.7
},
{
value: "0.35",
label: "0.35",
coupon: 0.55,
growth: 0.75
},
{
value: "0.30",
label: "0.30",
coupon: 0.6,
growth: 0.8
},
{
value: "0.25",
label: "0.25",
coupon: 0.65,
growth: 0.85
},
{
value: "0.20",
label: "0.20",
coupon: 0.7,
growth: 0.9
}
];
this.proportionList = this.formValidate.is_benefit ? proportionList : this.proportionList;
console.log(info.qualification);
if (info.svip_price_type != 0 && info.mer_svip_status)
this.attrVal = {