Commit 3875ee58 by Jaxon

fix(performanceScheme): 修复业务类型切换时商品品类未清空的问题

- 新增业务类型与品类选项的映射枚举
- 重构品类数据存储结构,按业务类型分类存储
- 业务类型变更时自动清空相关商品选择
- 优化品类选择器组件,根据业务类型动态加载选项
- 调整样式布局,修复输入框宽度问题
1 parent 80e0c3a3
import { BrowserTracing } from "@sentry/tracing";
// 接入sentry
import * as Sentry from "@sentry/vue";
import { Request } from "glsk-toolkit";
// Vue // Vue
import Vue from "vue" import Vue from "vue";
// import axios from 'axios' // import { GLCombiForm } from "glsx-components" // 权限按钮 (根据权限动态创建)
// import i18n from './i18n' import VueLazyload from "vue-lazyload";
import App from "./App"
import { config } from "@/common/baseConfig";
import GLMapSdk from "@/common/glsk-mapapi-sdk";
import notice from "@/common/notice";
import util from "@/libs/util.js";
// 针对template模板中使用可选链操作符
import chaining from "@/plugin/chaining";
// 核心插件 // 核心插件
import d2Admin from "@/plugin/d2admin" import d2Admin from "@/plugin/d2admin";
// store // store
import store from "@/store/index" import store from "@/store/index";
// 针对template模板中使用可选链操作符 // import axios from 'axios'
import chaining from "@/plugin/chaining" // import i18n from './i18n'
import App from "./App";
// 接入sentry
import * as Sentry from "@sentry/vue"
import { BrowserTracing } from "@sentry/tracing"
// import D2Crud from '@d2-projects/d2-crud' // import D2Crud from '@d2-projects/d2-crud'
// 菜单和路由设置 // 菜单和路由设置
import router from "./router" import router from "./router";
import "default-passive-events" import "default-passive-events";
import notice from "@/common/notice" import "element-ui/lib/theme-chalk/index.css";
import "element-ui/lib/theme-chalk/index.css"
import { config } from "@/common/baseConfig"
import GLMapSdk from "@/common/glsk-mapapi-sdk"
// import { GLCombiForm } from "glsx-components" // 权限按钮 (根据权限动态创建)
import VueLazyload from "vue-lazyload"
import { Request } from "glsk-toolkit"
import util from "@/libs/util.js"
Vue.prototype.$mapapi = new GLMapSdk() Vue.prototype.$mapapi = new GLMapSdk();
Vue.use(VueLazyload, { Vue.use(VueLazyload, {
// 懒加载默认加载图片 // 懒加载默认加载图片
loading: loading:
"https://img02.glsx.com.cn/weapp/resource/saas/dj/images/img_loading.png", "https://img02.glsx.com.cn/weapp/resource/saas/dj/images/img_loading.png",
attempt: 3 // 尝试加载次数 attempt: 3, // 尝试加载次数
}) });
// 实例化 // 实例化
process.env.NODE_ENV === "production" && process.env.NODE_ENV === "production"
Sentry.init({ && Sentry.init({
Vue, Vue,
dsn: "https://39bc80d3bb0a419a8d7d9bf5a39678e3@sentry.glsx.com.cn/24", dsn: "https://39bc80d3bb0a419a8d7d9bf5a39678e3@sentry.glsx.com.cn/24",
// dsn: 'http://6225fb8e73fb453a8455a9371f3517da@192.168.3.115:9000/4', // dsn: 'http://6225fb8e73fb453a8455a9371f3517da@192.168.3.115:9000/4',
integrations: [ integrations: [
new BrowserTracing({ new BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router), routingInstrumentation: Sentry.vueRouterInstrumentation(router),
tracingOrigins: ["localhost", "my-site-url.com", /^\//] tracingOrigins: ["localhost", "my-site-url.com", /^\//],
}) }),
], ],
// Set tracesSampleRate to 1.0 to capture 100% // Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring. // of transactions for performance monitoring.
...@@ -52,119 +52,119 @@ process.env.NODE_ENV === "production" && ...@@ -52,119 +52,119 @@ process.env.NODE_ENV === "production" &&
logErrors: true, logErrors: true,
// 解决火狐浏览器 无法捕获错误的问题 // 解决火狐浏览器 无法捕获错误的问题
beforeSend(event, hint) { beforeSend(event, hint) {
const isNonErrorException = const isNonErrorException
event.exception.values[0].value.startsWith( = event.exception.values[0].value.startsWith(
"Non-Error exception captured" "Non-Error exception captured",
) ||
hint.originalException.message.startsWith(
"Non-Error exception captured"
) )
|| hint.originalException.message.startsWith(
"Non-Error exception captured",
);
if (isNonErrorException) { if (isNonErrorException) {
// We want to ignore those kind of errors // We want to ignore those kind of errors
return null return null;
}
return event
} }
return event;
},
// "send-default-pii": true // "send-default-pii": true
}) });
// d2Admin 已导入 // d2Admin 已导入
// import ElementUI from 'element-ui' // import ElementUI from 'element-ui'
// Vue.use(ElementUI) // Vue.use(ElementUI)
// 核心插件 // 核心插件
Vue.use(d2Admin) Vue.use(d2Admin);
Vue.use(chaining) Vue.use(chaining);
// Vue.use(GLCombiForm) // Vue.use(GLCombiForm)
Vue.prototype.notice = notice Vue.prototype.notice = notice;
const isProd = process.env.NODE_ENV === "production" const isProd = process.env.NODE_ENV === "production";
// console.log(isProd) // console.log(isProd)
if (!isProd) { if (!isProd) {
Vue.config.devtools = true Vue.config.devtools = true;
} }
Vue.prototype.$EventBus = new Vue() Vue.prototype.$EventBus = new Vue();
Vue.directive("preventReClick", { Vue.directive("preventReClick", {
bind: (el, binding) => { bind: (el, binding) => {
let time = binding.value // 防抖时间 let time = binding.value; // 防抖时间
if (!time) { if (!time) {
// 用户若不设置防抖时间,则默认1s // 用户若不设置防抖时间,则默认1s
time = 1000 time = 1000;
} }
let fun let fun;
el.addEventListener( el.addEventListener(
"click", "click",
(event) => { (event) => {
if (!fun) { if (!fun) {
// 第一次执行 // 第一次执行
fun = setTimeout(() => { fun = setTimeout(() => {
fun = null fun = null;
}, time) }, time);
} else { } else {
// 直接取消当前事件 // 直接取消当前事件
event && event.stopImmediatePropagation() event && event.stopImmediatePropagation();
} }
}, },
true true,
) );
} },
}) });
let baseConfig = config let baseConfig = config;
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取 // 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
fetch( fetch(
"https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config" "https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config-sj",
) )
.then( .then(
(response) => { (response) => {
// 处理http响应 // 处理http响应
return response.json() return response.json();
}, },
(error) => { (error) => {
// 处理错误 // 处理错误
console.log(error) console.log(error);
} },
) )
.then((response) => { .then((response) => {
const { code, data } = response const { code, data } = response;
console.log("response", code, response) console.log("response", code, response);
if (code == "200") { if (code == "200") {
console.log(data) console.log(data);
baseConfig = data baseConfig = data;
// console.log("baseConfig", baseConfig) // console.log("baseConfig", baseConfig)
// window.$fetchConfig = data // window.$fetchConfig = data
} else { } else {
baseConfig = response baseConfig = response;
window.$fetchConfig = response window.$fetchConfig = response;
console.log(response) console.log(response);
window.$gscApi = new Request({ window.$gscApi = new Request({
...response.gsc, ...response.gsc,
// baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade', // baseURL:'http://192.168.3.145:9898/gsc-vcp-web-facade',
// baseURL: 'http://gsc.test.glsx.com.cn/gsc-vcp-web-facade', // baseURL: 'http://gsc.test.glsx.com.cn/gsc-vcp-web-facade',
session: { session: {
requiresSession: true, requiresSession: true,
sessionId: (_) => util.cookies.get("token") sessionId: _ => util.cookies.get("token"),
}, },
events: { events: {
error: (error, config) => { error: (error, config) => {
Vue.prototype.$message.error(error.msg) Vue.prototype.$message.error(error.msg);
}, },
logout: (response, config) => { logout: (response, config) => {
store.dispatch("d2admin/user/clear") store.dispatch("d2admin/user/clear");
util.cookies.remove("token") util.cookies.remove("token");
router.replace("/login") router.replace("/login");
Vue.prototype.$message.error("登录超时,请重新登录") Vue.prototype.$message.error("登录超时,请重新登录");
} },
} },
}) });
console.log(window.$gscApi, "========") console.log(window.$gscApi, "========");
} }
}) })
.finally(() => { .finally(() => {
init() init();
}) });
function init() { function init() {
new Vue({ new Vue({
router, router,
...@@ -174,22 +174,22 @@ function init() { ...@@ -174,22 +174,22 @@ function init() {
// baseConfig.axios.baseURL = 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router' // baseConfig.axios.baseURL = 'http://dj.test.glsx.com.cn/rop-dj-smartcarlife/router'
// data // data
// console.log(data) // console.log(data)
Vue.prototype.baseConfig = baseConfig Vue.prototype.baseConfig = baseConfig;
return h(App) return h(App);
}, },
created() { created() {
// 系统配置 // 系统配置
Vue.config.devtools = true Vue.config.devtools = true;
// 展示系统信息 // 展示系统信息
this.$store.commit("d2admin/releases/versionShow") this.$store.commit("d2admin/releases/versionShow");
// 用户登录后从数据库加载一系列的设置 // 用户登录后从数据库加载一系列的设置
this.$store.dispatch("d2admin/account/load") this.$store.dispatch("d2admin/account/load");
// 获取并记录用户 UA // 获取并记录用户 UA
this.$store.commit("d2admin/ua/get") this.$store.commit("d2admin/ua/get");
// 初始化全屏监听 // 初始化全屏监听
this.$store.dispatch("d2admin/fullscreen/listen") this.$store.dispatch("d2admin/fullscreen/listen");
}, },
mounted() {} mounted() {},
}).$mount("#app") }).$mount("#app");
} }
export { baseConfig } export { baseConfig };
<template> <template>
<div class=""> <div class="">
<el-cascader clearable <el-cascader clearable
:options="options" :options="getOptions"
placeholder="请选择商品品类" placeholder="请选择商品品类"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }"
:show-all-levels="false" :show-all-levels="false"
...@@ -13,13 +13,14 @@ ...@@ -13,13 +13,14 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import { bizAdaptationOptionsEnum } from "../../utils/enum.js";
export default { export default {
name: "", name: "",
props: { props: {
options: { goodsCategory: {
type: Array, type: Number,
default: () => [], require: true,
}, },
value: { value: {
type: Array, type: Array,
...@@ -32,7 +33,10 @@ export default { ...@@ -32,7 +33,10 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("PerformanceFormStore", ["formData", "goodsCategory"]), ...mapState("PerformanceFormStore", ["formData", "options"]),
getOptions() {
return this.options[bizAdaptationOptionsEnum[this.formData.businessType]] || [];
},
}, },
mounted() { mounted() {
......
...@@ -32,15 +32,21 @@ ...@@ -32,15 +32,21 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-right: 10px; padding-right: 10px;
> .el-input_showing {
width: 135px;
flex-shrink: 0;
}
> .el-input-number {
width: 135px;
flex-shrink: 0;
.el-input { .el-input {
min-width: 80px; width: 135px;
} }
.el-input-number {
min-width: 80px;
} }
.el-input_showing { .el-input {
min-width: 80px; min-width: 80px;
} }
.tag { .tag {
margin: 0 6px; margin: 0 6px;
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</el-button> --> </el-button> -->
<GoodsCategoryCascader v-if="goodsCategory === 0" <GoodsCategoryCascader v-if="goodsCategory === 0"
v-model="curParamsConfig.ParamsType1Products[index].productLabel" v-model="curParamsConfig.ParamsType1Products[index].productLabel"
:options="goodsCategoryOptions" :goods-category="goodsCategory"
@change="handleProductChange" /> @change="handleProductChange" />
<el-cascader v-else <el-cascader v-else
...@@ -144,7 +144,6 @@ export default { ...@@ -144,7 +144,6 @@ export default {
...mapState("PerformanceFormStore", { ...mapState("PerformanceFormStore", {
formData: "formData", formData: "formData",
commissionTypesOptions: "commissionTypesOptions", commissionTypesOptions: "commissionTypesOptions",
goodsCategoryOptions: "goodsCategory",
}), }),
...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]), ...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]),
productDefineListOptions() { productDefineListOptions() {
...@@ -216,8 +215,6 @@ export default { ...@@ -216,8 +215,6 @@ export default {
// 验证价格范围:结束值必须大于起始值 // 验证价格范围:结束值必须大于起始值
handlePriceRangeChange(rowIndex, rangeIndex) { handlePriceRangeChange(rowIndex, rangeIndex) {
console.log("asda");
const priceRange = this.curParamsConfig.ParamsType1[rowIndex].priceRange; const priceRange = this.curParamsConfig.ParamsType1[rowIndex].priceRange;
const startValue = Number(priceRange[0]); const startValue = Number(priceRange[0]);
const endValue = Number(priceRange[1]); const endValue = Number(priceRange[1]);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-table border :data="curParamsConfig.ParamsType2"> <el-table border :data="curParamsConfig.ParamsType2">
<el-table-column align="center" <el-table-column align="center"
:label="`考核因子${curParamsConfig.sort}:${curParamsConfig.title}`" :label="`考核因子${curParamsConfig.sort}:${curParamsConfig.title}`"
width="270px"> width="320px">
<template #default="{ $index }"> <template #default="{ $index }">
<div class="assessment-factor-column"> <div class="assessment-factor-column">
<EditableText v-model="curParamsConfig.ParamsType2[$index].priceRange[0]" <EditableText v-model="curParamsConfig.ParamsType2[$index].priceRange[0]"
...@@ -32,11 +32,13 @@ ...@@ -32,11 +32,13 @@
<!-- 品类cascader --> <!-- 品类cascader -->
<GoodsCategoryCascader v-if="goodsCategory === 0" <GoodsCategoryCascader v-if="goodsCategory === 0"
v-model="curParamsConfig.ParamsType2[$index].productLabel" v-model="curParamsConfig.ParamsType2[$index].productLabel"
:options="goodsCategoryOptions" clearable
:goods-category="goodsCategory"
@change="handleProductChange" /> @change="handleProductChange" />
<!-- 圈定套餐/商品 cascader --> <!-- 圈定套餐/商品 cascader -->
<el-cascader v-else <el-cascader v-else
v-model="curParamsConfig.ParamsType2[$index].productLabel" v-model="curParamsConfig.ParamsType2[$index].productLabel"
clearable
:options="getProductDefineListOptions" :options="getProductDefineListOptions"
:show-all-levels="false" :show-all-levels="false"
@change="handleProductChange"> @change="handleProductChange">
...@@ -142,7 +144,6 @@ export default { ...@@ -142,7 +144,6 @@ export default {
formData: "formData", formData: "formData",
productDefineList: "productDefineList", productDefineList: "productDefineList",
commissionTypesOptions: "commissionTypesOptions", commissionTypesOptions: "commissionTypesOptions",
goodsCategoryOptions: "goodsCategory",
}), }),
...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]), ...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]),
goodsCategory: { goodsCategory: {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<GoodsCategoryCascader v-if="goodsCategory === 0" <GoodsCategoryCascader v-if="goodsCategory === 0"
v-model="productValue" v-model="productValue"
clearable clearable
:options="goodsCategoryOptions" :goods-category="goodsCategory"
@change="handleProductChange" /> @change="handleProductChange" />
<el-cascader v-else <el-cascader v-else
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<GoodsCategoryCascader v-if="goodsCategory === 0" <GoodsCategoryCascader v-if="goodsCategory === 0"
v-model="productValue1" v-model="productValue1"
clearable clearable
:options="goodsCategoryOptions" :goods-category="goodsCategory"
@change="handleProductChange" /> @change="handleProductChange" />
<el-cascader v-else <el-cascader v-else
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
...mapState("PerformanceFormStore", { ...mapState("PerformanceFormStore", {
formData: "formData", formData: "formData",
productDefineList: "productDefineList", productDefineList: "productDefineList",
goodsCategoryOptions: "goodsCategory",
}), }),
...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]), ...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]),
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<GoodsCategoryCascader v-if="goodsCategory === 0" <GoodsCategoryCascader v-if="goodsCategory === 0"
v-model="productValue" v-model="productValue"
clearable clearable
:options="goodsCategoryOptions" :goods-category="goodsCategory"
@change="handleProductChange" /> @change="handleProductChange" />
<!-- 圈定套餐/商品 cascader --> <!-- 圈定套餐/商品 cascader -->
<el-cascader v-else <el-cascader v-else
...@@ -62,7 +62,6 @@ export default { ...@@ -62,7 +62,6 @@ export default {
...mapState("PerformanceFormStore", { ...mapState("PerformanceFormStore", {
formData: "formData", formData: "formData",
productDefineList: "productDefineList", productDefineList: "productDefineList",
goodsCategoryOptions: "goodsCategory",
}), }),
...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]), ...mapGetters("PerformanceFormStore", ["getProductDefineListOptions"]),
// 路径太长 简化 // 路径太长 简化
......
...@@ -153,6 +153,7 @@ export default { ...@@ -153,6 +153,7 @@ export default {
]), ]),
...mapActions("PerformanceFormStore", [ ...mapActions("PerformanceFormStore", [
"setCommissionTypesOptions", "setCommissionTypesOptions",
"onBusinessTypeChange",
]), ]),
handleGoodsConfigTypesGroupChange(e) { handleGoodsConfigTypesGroupChange(e) {
...@@ -193,12 +194,12 @@ export default { ...@@ -193,12 +194,12 @@ export default {
handleAssessmentFactorChange(value) { handleAssessmentFactorChange(value) {
this.touchAssessment(value); this.touchAssessment(value);
// 只验证当前字段 // // 只验证当前字段
this.validateCurrentField("assessmentFactorValue"); // this.validateCurrentField("assessmentFactorValue");
}, },
handleBusinessTypeChange() { handleBusinessTypeChange(e) {
// 只验证当前字段 // 清空所有商品值
this.validateCurrentField("businessType"); this.onBusinessTypeChange(e);
}, },
// 验证当前字段(只验证单个字段,不触发全表单验证) // 验证当前字段(只验证单个字段,不触发全表单验证)
validateCurrentField(prop) { validateCurrentField(prop) {
......
import { isArray, set } from "lodash-es"; import { isArray, set } from "lodash-es";
import { normalizeTree } from "@/common/treeData"; import { normalizeTree } from "@/common/treeData";
import { baseConfig } from "@/main";
import { commissionTypeEnum, paramConfigListTemplate, assessmentFactorOptions as staticAssessmentFactorOptions } from "../components/performanceRuleSelection/options.js"; import { commissionTypeEnum, paramConfigListTemplate, assessmentFactorOptions as staticAssessmentFactorOptions } from "../components/performanceRuleSelection/options.js";
export default { export default {
...@@ -40,6 +41,15 @@ export default { ...@@ -40,6 +41,15 @@ export default {
], ],
storeConfig: { table: [], effectiveTime: "" }, storeConfig: { table: [], effectiveTime: "" },
}, },
options: {
// 品类 -> 轻改
lightModification: [],
// 品类 -> 权益
benefitProduct: [],
// 品类 -> 延保
extendedWarrantyProduct: [],
},
// 品类数据 // 品类数据
goodsCategory: [ goodsCategory: [
], ],
...@@ -177,8 +187,33 @@ export default { ...@@ -177,8 +187,33 @@ export default {
}); });
}, },
// 设置品类数据 // 设置品类数据
setGoodsCategory(state, goodsCategory) { setGoodsCategory(state, goodsCategoryOptions) {
state.goodsCategory = goodsCategory; const { goodsCategoryType } = baseConfig;
if (!goodsCategoryType) {
console.error("main.baseConfig 未配置 goodsCategoryType, 无法生成品类数据");
return;
}
// #延保类商品分类
const extendedInsurance = goodsCategoryType["smartcarlife.goodsType.extendedInsurance"];
const extendedWarrantyProduct = [];
// 权益
const equityType = goodsCategoryType["smartcarlife.goodsType.equity.type"];
const benefitProduct = [];
// 轻改
const lightModification = [];
for (const item of goodsCategoryOptions) {
if (item.categoryType === extendedInsurance) {
extendedWarrantyProduct.push(item);
} else if (item.categoryType === equityType) {
benefitProduct.push(item);
} else {
lightModification.push(item);
}
}
state.options.lightModification = lightModification;
state.options.benefitProduct = benefitProduct;
state.options.extendedWarrantyProduct = extendedWarrantyProduct;
}, },
setFormData(state, formData) { setFormData(state, formData) {
Object.assign(state.formData, formData); Object.assign(state.formData, formData);
...@@ -213,7 +248,7 @@ export default { ...@@ -213,7 +248,7 @@ export default {
clearParamsType2Condition(state, params2Index) { clearParamsType2Condition(state, params2Index) {
const params2Table = state.formData.paramConfigList[params2Index].ParamsType2; const params2Table = state.formData.paramConfigList[params2Index].ParamsType2;
if (isArray(params2Table) && params2Table.length) { if (isArray(params2Table) && params2Table.length) {
const { conditionType0, conditionType1, conditionType2, conditionType3, conditionType4 } = structuredClone(paramConfigListTemplate); const { ParamsType2: [{ conditionType0, conditionType1, conditionType2, conditionType3, conditionType4 }] } = structuredClone(paramConfigListTemplate);
for (const rows of params2Table) { for (const rows of params2Table) {
Object.assign(rows, { Object.assign(rows, {
...@@ -233,14 +268,41 @@ export default { ...@@ -233,14 +268,41 @@ export default {
const params1Table = state.formData.paramConfigList[params1Index].ParamsType1Products; const params1Table = state.formData.paramConfigList[params1Index].ParamsType1Products;
if (isArray(params1Table) && params1Table.length) { if (isArray(params1Table) && params1Table.length) {
params1Table.forEach((item, index) => { params1Table.forEach((item, index) => {
item.productValue[row] = undefined; item.productValue.splice(row, 1, undefined);
}); });
} }
}, },
}, },
actions: { actions: {
// 设置提成方式的下拉框选项 onBusinessTypeChange({ state, commit }, options) {
if (isArray(state.formData.paramConfigList)) {
for (const [tableIndex, table] of state.formData.paramConfigList.entries()) {
// 如果处于品类,全清
if (table.goodsCategory === 0) {
if (table.templateType === "ParamsType1" && isArray(table.ParamsType1) && isArray(table.ParamsType1Products)) {
// 清空列的 商品
for (const colItem of table.ParamsType1Products) {
colItem.productLabel = [];
}
// 清空 列的 商品值
for (const [rowIndex, rowItem] of table.ParamsType1.entries()) {
console.log("rowIndex", rowIndex);
commit("clearParamsType1ProductValue", { params1Index: tableIndex, row: rowIndex });
}
}
if (table.templateType === "ParamsType2" && isArray(table.ParamsType2)) {
for (const [rowIndex, rowItem] of table.ParamsType2.entries()) {
// 清空 行首的商品
rowItem.productLabel = [];
}
commit("clearParamsType2Condition", tableIndex);
}
}
}
}
},
// 提成方式改变的时候 设置提成方式的下拉框选项
setCommissionTypesOptions({ state, commit }, options) { setCommissionTypesOptions({ state, commit }, options) {
state.commissionTypesOptions = options.map((item, index) => ({ state.commissionTypesOptions = options.map((item, index) => ({
label: commissionTypeEnum[item].label, label: commissionTypeEnum[item].label,
......
// 适配业务的值 对应的 vuex中 options 的 对应品类的名字
export const bizAdaptationOptionsEnum = {
0: "lightModification",
1: "extendedWarrantyProduct",
2: "benefitProduct",
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!