Commit bdaef0ae by Jaxon

feat(绩效方案): 新增品类配置组件并重构商品选择逻辑

- 新增 GoodsCategoryCascader 组件用于品类级联选择
- 将业务适配字段从 checkList 重命名为 businessType
- 在 store 中新增 goodsCategory 状态管理品类数据
- 重构参数配置表,将商品选择从圈定商品切换为品类选择
- 优化 type2 条件类型的表单组件,使用 EditableText 替代原生输入框
- 移除冗余的 getDetail API 调用,优化初始化加载逻辑
1 parent 0887b676
<template> <template>
<div> <div>
<el-form-item label="适配业务:" prop="checkList"> <el-form-item label="适配业务:" prop="businessType">
<el-radio-group v-model="checkList"> <el-radio-group v-model="businessType">
<el-radio label="0"> <el-radio label="0">
轻改 轻改
</el-radio> </el-radio>
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
}; };
}, },
computed: { computed: {
checkList: bindFormFields("checkList"), businessType: bindFormFields("businessType"),
}, },
mounted() { mounted() {
......
<template>
<div class="">
<el-cascader :options="goodsCategory"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }"
:show-all-levels="false"
:value="value"
@change="handleProductChange">
</el-cascader>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "",
props: {
value: {
type: Array,
default: () => [],
},
},
data() {
return {
};
},
computed: {
...mapState("PerformanceFormStore", ["formData", "productDefineList", "commissionTypesOptions", "goodsCategory"]),
},
mounted() {
},
methods: {
handleProductChange(value) {
this.$emit("input", value);
this.$emit("change", value);
},
},
};
</script>
...@@ -73,11 +73,12 @@ export default { ...@@ -73,11 +73,12 @@ export default {
}, },
methods: { methods: {
// 为ParamConfigTyp1 添加列
handleAppendTableColProduct() { handleAppendTableColProduct() {
if (this.curParamsConfig.templateType !== "ParamsType1") { if (this.curParamsConfig.templateType !== "ParamsType1") {
return; return;
} }
if (this.curParamsConfig.products.length >= 10) { if (this.curParamsConfig.ParamsType1Products.length >= 10) {
this.$message.warning("最多添加列商品"); this.$message.warning("最多添加列商品");
} }
this.curParamsConfig.ParamsType1Products.push({ this.curParamsConfig.ParamsType1Products.push({
...@@ -85,19 +86,11 @@ export default { ...@@ -85,19 +86,11 @@ export default {
}); });
}, },
// 提成方式改变 // 新增一行
handleCommissionTypesChange(row) {
// TODO: 清空当前行的所有 products[index].productValue[$index] 的值
this.curParamsConfig.ParamsType1Products.forEach((product) => {
this.$set(product.productValue, row, undefined);
});
},
handleProductChange(value) {
console.log("product change", value);
},
handleAppendTableRow() { handleAppendTableRow() {
const templateType = this.curParamsConfig.templateType; const templateType = this.curParamsConfig.templateType;
const lastPriceRange = last(this.curParamsConfig.priceRange);
const lastPriceRange = last(this.curParamsConfig[templateType])?.priceRange || [0, 0];
const nPriceRange = [undefined, undefined]; const nPriceRange = [undefined, undefined];
if (lastPriceRange && lastPriceRange[1]) { if (lastPriceRange && lastPriceRange[1]) {
nPriceRange[0] = lastPriceRange[1] + (this.curParamsConfig.priceRangeProps.precision ? 1 : 0.01); nPriceRange[0] = lastPriceRange[1] + (this.curParamsConfig.priceRangeProps.precision ? 1 : 0.01);
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<el-table border <el-table border
class="params-config-table" class="params-config-table"
:data="curParamsConfig.ParamsType1"> :data="curParamsConfig.ParamsType1">
<el-table-column align="center" <el-table-column align="center"
:label="`考核因子${curParamsConfig.sort}:${curParamsConfig.title}`" :label="`考核因子${curParamsConfig.sort}:${curParamsConfig.title}`"
width="270px"> width="270px">
...@@ -50,11 +49,14 @@ ...@@ -50,11 +49,14 @@
width="180px"> width="180px">
<template #header="{ $index }"> <template #header="{ $index }">
<div> <div>
<el-cascader v-model="curParamsConfig.ParamsType1Products[index].productLabel"
<GoodsCategoryCascader v-model="curParamsConfig.ParamsType1Products[index].productLabel" @change="handleProductChange" />
<!-- <el-cascader v-model="curParamsConfig.ParamsType1Products[index].productLabel"
:options="getProductDefineListOptions" :options="getProductDefineListOptions"
:show-all-levels="false" :show-all-levels="false"
@change="handleProductChange"> @change="handleProductChange">
</el-cascader> </el-cascader> -->
<el-button style="position: absolute;right:6px;" <el-button style="position: absolute;right:6px;"
title="删除列" title="删除列"
...@@ -94,12 +96,14 @@ ...@@ -94,12 +96,14 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import EditableText from "@/components/editableText/index.vue"; import EditableText from "@/components/editableText/index.vue";
import GoodsCategoryCascader from "../goodsCategoryCascader/index.vue";
import { commissionTypeEnum } from "../performanceRuleSelection/options"; import { commissionTypeEnum } from "../performanceRuleSelection/options";
export default { export default {
name: "", name: "",
components: { components: {
EditableText, EditableText,
GoodsCategoryCascader,
}, },
props: { props: {
......
...@@ -30,17 +30,27 @@ ...@@ -30,17 +30,27 @@
label="商品分类" label="商品分类"
width="180"> width="180">
<template #default="{ $index }"> <template #default="{ $index }">
<el-cascader v-model="curParamsConfig.ParamsType2[$index].productLabel" <div>
<!-- 品类cascader -->
<!-- <el-cascader v-model="curParamsConfig.ParamsType2[$index].productLabel"
:options="getProductDefineListOptions" :options="getProductDefineListOptions"
:show-all-levels="false" :show-all-levels="false"
@change="handleProductChange"> @change="handleProductChange">
</el-cascader> </el-cascader> -->
<!-- 圈定套餐/商品 cascader -->
<GoodsCategoryCascader v-model="curParamsConfig.ParamsType2[$index].productLabel" @change="handleProductChange" />
<span class="el-icon-sort icon"
style="line-height:normal;height:14px; vertical-align: middle;"
@click="handleChangeGoodsConfigTypes($index)">
</span>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center"> <el-table-column align="center">
<template #header> <template #header>
<el-form-item>
<el-select v-model="curParamsConfig.ParamsType2CommissionTypes" <el-select v-model="curParamsConfig.ParamsType2CommissionTypes"
placeholder="请选择" placeholder="请选择"
style="width:120px" style="width:120px"
...@@ -50,7 +60,6 @@ ...@@ -50,7 +60,6 @@
:label="subItem.label" :label="subItem.label"
:value="subItem.value" /> :value="subItem.value" />
</el-select> </el-select>
</el-form-item>
</template> </template>
<template #default="{ $index }"> <template #default="{ $index }">
...@@ -96,6 +105,7 @@ ...@@ -96,6 +105,7 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import EditableText from "@/components/editableText/index.vue"; import EditableText from "@/components/editableText/index.vue";
import GoodsCategoryCascader from "../goodsCategoryCascader/index.vue";
import { paramConfigConditionType } from "../performanceRuleSelection/options.js"; import { paramConfigConditionType } from "../performanceRuleSelection/options.js";
import { Type0, Type1, Type2 } from "./type2components/index.js"; import { Type0, Type1, Type2 } from "./type2components/index.js";
...@@ -103,6 +113,7 @@ export default { ...@@ -103,6 +113,7 @@ export default {
name: "", name: "",
components: { components: {
EditableText, EditableText,
GoodsCategoryCascader,
Type0, Type0,
Type1, Type1,
Type2, Type2,
...@@ -120,7 +131,7 @@ export default { ...@@ -120,7 +131,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("PerformanceFormStore", ["formData", "productDefineList", "commissionTypesOptions"]), ...mapState("PerformanceFormStore", ["formData", "productDefineList", "commissionTypesOptions", "goodsCategory"]),
curParamsConfig() { curParamsConfig() {
return this.formData.paramConfigList[this.configIndex]; return this.formData.paramConfigList[this.configIndex];
}, },
...@@ -150,8 +161,12 @@ export default { ...@@ -150,8 +161,12 @@ export default {
}, },
methods: { methods: {
// 提成方式改变
handleCommissionTypesChange() {}, handleCommissionTypesChange() {},
handleRemoveTableRow() {}, // 删除行
handleRemoveTableRow(row) {
this.curParamsConfig.ParamsType2.splice(row, 1);
},
// 取消设置条件 // 取消设置条件
handleCancelConditionSetting(row) { handleCancelConditionSetting(row) {
this.curParamsConfig.ParamsType2[row].condition = 0; this.curParamsConfig.ParamsType2[row].condition = 0;
......
<template> <template>
<div class="param-config-type-2-condition-type"> <div class="param-config-type-2-condition-type">
<el-form-item> <EditableText v-model="conditionTypeValue"
<el-input v-model="conditionTypeValue"></el-input> :controls="false"
</el-form-item> type="number"
v-bind="getComponentsProp">
</EditableText>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import EditableText from "@/components/editableText/index.vue";
import { commissionTypeEnum } from "../../performanceRuleSelection/options";
export default { export default {
name: "", name: "",
components: {
EditableText,
},
props: { props: {
configIndex: { configIndex: {
type: Number, type: Number,
...@@ -27,12 +34,25 @@ export default { ...@@ -27,12 +34,25 @@ export default {
}; };
}, },
// v-bind="curParamsConfig.ParamsType1[$index].commissionTypes && commissionTypeEnum[curParamsConfig.ParamsType1[$index].commissionTypes].componentProps"
computed: { computed: {
...mapState("PerformanceFormStore", ["formData"]), ...mapState("PerformanceFormStore", ["formData"]),
conditionTypeValue() { paramsType2CommissionTypes() {
return this.formData.paramConfigList[this.configIndex].ParamsType2CommissionTypes;
},
getComponentsProp() {
return this.paramsType2CommissionTypes ? commissionTypeEnum[this.paramsType2CommissionTypes].componentProps : {};
},
conditionTypeValue: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType0; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType0;
}, },
set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType0 = value;
},
},
}, },
mounted() { mounted() {
console.log("当前组件所有 inject 内容:", this.$parent); // Vue2 内部属性,存储注入的内容 console.log("当前组件所有 inject 内容:", this.$parent); // Vue2 内部属性,存储注入的内容
...@@ -44,5 +64,10 @@ export default { ...@@ -44,5 +64,10 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.param-config-type-2-condition-type {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>
<template> <template>
<div class="param-config-type-2-condition-type"> <div class="param-config-type-2-condition-type">
<el-input v-model="triggerCondition"></el-input> <EditableText v-model="triggerCondition"
<span>且</span> :controls="false"
<el-select v-model="productValue"></el-select> type="number"
<span>渗透率在</span> v-bind="getComponentsProp">
<el-input v-model="permeabilityMin"></el-input> </EditableText>
<span>~</span> <span class="label">且</span>
<el-input v-model="permeabilityMax"></el-input> <el-cascader v-model="productValue"
<span>区间时执行</span> :options="getProductDefineListOptions"
:show-all-levels="false"
@change="handleProductChange">
</el-cascader>
<span class="label">渗透率在</span>
<EditableText v-model="permeabilityMin"
:controls="false"
:max="100"
:min="0"
:precision="2"
type="number">
</EditableText>
<span class="label">~</span>
<EditableText v-model="permeabilityMax"
:controls="false"
:max="100"
:min="0"
:precision="2"
type="number">
</EditableText>
<span class="label">区间时执行</span>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import EditableText from "@/components/editableText/index.vue";
import { commissionTypeEnum } from "../../performanceRuleSelection/options";
export default { export default {
name: "", name: "",
components: {
EditableText,
},
props: { props: {
configIndex: { configIndex: {
type: Number, type: Number,
...@@ -33,34 +58,99 @@ export default { ...@@ -33,34 +58,99 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("PerformanceFormStore", ["formData"]), ...mapState("PerformanceFormStore", ["formData", "productDefineList"]),
// 商品选择项
getProductDefineListOptions() {
const res = [];
if (this.formData.goodsConfigTypes.includes("0")) {
res.push({
label: "品类",
value: -2,
children: [],
});
}
if (this.formData.goodsConfigTypes.includes("-1")) {
res.push({
label: "商品/套餐",
value: -1,
children: this.productDefineList,
});
}
triggerCondition() { return res;
},
// 路径太长 简化
paramsType2CommissionTypes() {
return this.formData.paramConfigList[this.configIndex].ParamsType2CommissionTypes;
},
// 提成方式 的值 决定 的 组件传参
getComponentsProp() {
return this.paramsType2CommissionTypes ? commissionTypeEnum[this.paramsType2CommissionTypes].componentProps : {};
},
triggerCondition: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.triggerCondition; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.triggerCondition;
}, },
productLabel() { set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.triggerCondition = value;
},
},
productLabel: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productLabel; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productLabel;
}, },
productValue() { set(value) {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productValue; this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productLabel = value;
},
}, },
permeabilityMin() { productValue: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productValue;
},
set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.productValue = value;
},
},
permeabilityMin: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMin; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMin;
}, },
permeabilityMax() { set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMin = value;
},
},
permeabilityMax: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMax; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMax;
}, },
set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType1.permeabilityMax = value;
},
},
}, },
mounted() { mounted() {
}, },
methods: { methods: {
// TODO: 商品切换
handleProductChange() {
},
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.param-config-type-2-condition-type {
> span.label {
color: #666666;
font-size: 14px;
font-weight: 400;
line-height: 18px;
margin: 0 6px;
}
}
</style> </style>
<template> <template>
<div class="param-config-type-2-condition-type"> <div class="param-config-type-2-condition-type">
<el-input v-model="triggerCondition"></el-input> <EditableText v-model="triggerCondition"
<span>且按不足</span> :controls="false"
<el-input v-model="deductRate"></el-input> type="number"
<span>订单数每单扣减</span> v-bind="getComponentsProp">
<el-input v-model="perOrderDeductAmount"></el-input> </EditableText>
<span>元.区间时执行</span> <span class="label">且按不足</span>
<EditableText v-model="deductRate"
:controls="false"
:max="100"
:min="0"
:precision="2"
type="number">
</EditableText>
<span class="label">订单数每单扣减</span>
<EditableText v-model="perOrderDeductAmount"
:controls="false"
:max="999999"
:min="0"
:precision="2"
type="number">
</EditableText>
<span class="label">元.区间时执行</span>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import EditableText from "@/components/editableText/index.vue";
import { commissionTypeEnum } from "../../performanceRuleSelection/options";
export default { export default {
name: "", name: "",
components: {
EditableText,
},
props: { props: {
configIndex: { configIndex: {
type: Number, type: Number,
...@@ -32,16 +53,39 @@ export default { ...@@ -32,16 +53,39 @@ export default {
}, },
computed: { computed: {
...mapState("PerformanceFormStore", ["formData"]), ...mapState("PerformanceFormStore", ["formData"]),
// 路径太长 简化
triggerCondition() { paramsType2CommissionTypes() {
return this.formData.paramConfigList[this.configIndex].ParamsType2CommissionTypes;
},
// 提成方式 的值 决定 的 组件传参
getComponentsProp() {
return this.paramsType2CommissionTypes ? commissionTypeEnum[this.paramsType2CommissionTypes].componentProps : {};
},
triggerCondition: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.triggerCondition; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.triggerCondition;
}, },
deductRate() { set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.triggerCondition = value;
},
},
deductRate: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.deductRate; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.deductRate;
}, },
perOrderDeductAmount() { set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.deductRate = value;
},
},
perOrderDeductAmount: {
get() {
return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.perOrderDeductAmount; return this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.perOrderDeductAmount;
}, },
set(value) {
this.formData.paramConfigList[this.configIndex].ParamsType2[this.row].conditionType2.perOrderDeductAmount = value;
},
},
}, },
mounted() { mounted() {
...@@ -54,5 +98,13 @@ export default { ...@@ -54,5 +98,13 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.param-config-type-2-condition-type {
> span.label {
color: #666666;
font-size: 14px;
font-weight: 400;
line-height: 18px;
margin: 0 6px;
}
}
</style> </style>
...@@ -176,7 +176,7 @@ export const paramConfigListTemplate = { ...@@ -176,7 +176,7 @@ export const paramConfigListTemplate = {
// 如果 // 如果
ParamsType1Products: [ ParamsType1Products: [
{ {
productLabel: "", productLabel: [],
productValue: [undefined], productValue: [undefined],
optionList: [], optionList: [],
}, },
...@@ -215,31 +215,17 @@ export const paramConfigListTemplate = { ...@@ -215,31 +215,17 @@ export const paramConfigListTemplate = {
deductRate: undefined, deductRate: undefined,
// 每单扣减金额 // 每单扣减金额
perOrderDeductAmount: undefined, perOrderDeductAmount: undefined,
}, },
// 渗透率的条件 // 渗透率的条件
condition: 0, condition: 0,
priceRange: [0, undefined], priceRange: [0, undefined],
commissionTypes: undefined, commissionTypes: undefined,
productLabel: "", productLabel: [],
productValue: [undefined], productValue: [undefined],
optionList: [], optionList: [],
}, },
], ],
// 渗透率的条件
condition: 0,
priceRange: [
[0, undefined],
],
commissionTypes: [undefined],
products: [
{
productLabel: "",
productValue: [undefined],
optionList: [],
},
],
}; };
// 模板对象 // 模板对象
......
...@@ -7,6 +7,8 @@ export default { ...@@ -7,6 +7,8 @@ export default {
state: { state: {
formData: { formData: {
checkList: [], checkList: [],
// 适配业务
businessType: undefined,
// 考核因子 // 考核因子
assessmentFactor: [], assessmentFactor: [],
schemaName: "", schemaName: "",
...@@ -39,11 +41,14 @@ export default { ...@@ -39,11 +41,14 @@ export default {
effectiveTime: "", effectiveTime: "",
}, },
}, },
// 品类数据
goodsCategory: [],
// 圈定商品/套餐的数据 // 圈定商品/套餐的数据
productDefineList: [], productDefineList: [],
// 提成方式 下拉选择框数据
commissionTypesOptions: [], commissionTypesOptions: [],
// 门店和品牌 // 门店和品牌
merchantBrandRefList: [] merchantBrandRefList: [],
}, },
getters: { getters: {
getMerchantBrandRefList(state) { getMerchantBrandRefList(state) {
...@@ -109,6 +114,10 @@ export default { ...@@ -109,6 +114,10 @@ export default {
}; };
}); });
}, },
// 设置品类数据
setGoodsCategory(state, goodsCategory) {
state.goodsCategory = goodsCategory;
},
}, },
actions: { actions: {
......
...@@ -71,16 +71,14 @@ ...@@ -71,16 +71,14 @@
<script> <script>
import { mapMutations, mapState } from "vuex"; import { mapMutations, mapState } from "vuex";
import { getTargetProductConfigListAPI, getPerformanceConfigDetailAPI } from "@/api/resident"; import { getAllCategory } from "@/api/product.js";
import { getTargetProductConfigListAPI } from "@/api/resident";
import ChannelConfig from "../components/channelConfig/index.vue"; import ChannelConfig from "../components/channelConfig/index.vue";
import ParamConfigList from "../components/paramConfigList/index.vue"; import ParamConfigList from "../components/paramConfigList/index.vue";
import PerformanceRuleSelection from "../components/performanceRuleSelection/index.vue"; import PerformanceRuleSelection from "../components/performanceRuleSelection/index.vue";
import StoreApply from "../components/storeApply/index.vue"; import StoreApply from "../components/storeApply/index.vue";
import { bindFormFields } from "../store/helper.js"; import { bindFormFields } from "../store/helper.js";
console.log("StoreApply", StoreApply);
console.log("PerformanceRuleSelection", PerformanceRuleSelection);
export default { export default {
name: "PerformanceScheme", name: "PerformanceScheme",
components: { components: {
...@@ -105,10 +103,9 @@ export default { ...@@ -105,10 +103,9 @@ export default {
}, },
async mounted() { async mounted() {
await this.initLoad(); await this.initLoad();
await this.getDetail();
}, },
methods: { methods: {
...mapMutations("PerformanceFormStore", ["setProductDefineList"]), ...mapMutations("PerformanceFormStore", ["setProductDefineList", "setGoodsCategory"]),
submitTest() { submitTest() {
this.$refs.formTest1.validate((valid) => { this.$refs.formTest1.validate((valid) => {
if (valid) { if (valid) {
...@@ -119,22 +116,13 @@ export default { ...@@ -119,22 +116,13 @@ export default {
handleSubmit() { handleSubmit() {
console.log(this.formData); console.log(this.formData);
}, },
async getDetail() {
const res = await getPerformanceConfigDetailAPI({ configId: this.formData.id });
console.log("res", res);
},
async initLoad() { async initLoad() {
// 获取品类
const { list } = await getAllCategory({ pageSize: 9999, currentPage: 1 });
this.setGoodsCategory(list);
// 获取圈定商品/套餐
const res = await getTargetProductConfigListAPI({ currentPage: 1, pageSize: 999 }); const res = await getTargetProductConfigListAPI({ currentPage: 1, pageSize: 999 });
const productDefineList = res?.list.map(item => ({ this.setProductDefineList(res?.list);
id: item.id,
defineType: item.defineType,
defineName: item.defineName,
itemList: (item.itemList || []).map(it => ({
itemId: it.itemId,
itemName: it.itemName,
})),
}));
this.setProductDefineList(productDefineList);
}, },
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!