Commit 03d99ecf by Jaxon

feat: 调整 删除 ShelfManage模块后带来的引用问题

1 parent 9b87b410
import Vue from "vue";
import Vuex from "vuex";
import ShelfManage from "@/views/goods/shelfManage/store/index.js";
import performanceFormStore from "@/views/residentManage/salaryPerformance/performanceScheme/store/performanceFormStore.js";
import cacheStore from "./modules/cacheStore";
......@@ -30,6 +29,5 @@ export default new Vuex.Store({
goodsInfoData,
FinancialRules,
PerformanceFormStore: performanceFormStore,
ShelfManage,
},
});
<template>
<div class="special-category-wrapper">
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:goods-list="options.productType"
:base-scene-code="baseSceneCode"
v-on="$listeners" />
<Modify v-if="editState === VIEW_MODE.EDIT"
ref="modifyRef"
v-bind="$attrs"
:goods-list="options.productType"
:base-scene-code="baseSceneCode" />
</div>
<div class="special-category-wrapper">
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:base-scene-code="baseSceneCode"
:goods-list="options.productType"
v-on="$listeners" />
<Modify v-if="editState === VIEW_MODE.EDIT"
ref="modifyRef"
v-bind="$attrs"
:base-scene-code="baseSceneCode"
:goods-list="options.productType" />
</div>
</template>
<script>
......
<template>
<!-- 分账配置 - 特殊品类 - 编辑状态 -->
<div class="detail-wrapper ">
<Descriptions :schema="getSchema" :data="getSchemaData" />
<CostAttributionSetting :value="owningMerchantDistributionRulesMap"
prop-prefix="owningMerchantDistributionRulesMap"
title="费用归属设置"
disabled
:shelf-type="shelfType"
:table-cols="tableCols"
:table-rows="tableRows" />
<CostAttributionSetting :value="merchantDistributionRulesMap"
prop-prefix="merchantDistributionRulesMap"
title="实际分账设置"
disabled
:shelf-type="shelfType"
:table-cols="tableCols"
:table-rows="tableRows" />
</div>
<!-- 分账配置 - 特殊品类 - 编辑状态 -->
<div class="detail-wrapper ">
<Descriptions :data="getSchemaData" :schema="getSchema" />
<CostAttributionSetting prop-prefix="owningMerchantDistributionRulesMap"
title="费用归属设置"
disabled
:shelf-type="shelfType"
:table-cols="tableCols"
:table-rows="tableRows"
:value="owningMerchantDistributionRulesMap" />
<CostAttributionSetting prop-prefix="merchantDistributionRulesMap"
title="实际分账设置"
disabled
:shelf-type="shelfType"
:table-cols="tableCols"
:table-rows="tableRows"
:value="merchantDistributionRulesMap" />
</div>
</template>
<script>
......@@ -26,8 +26,8 @@ import {
otherSelectOptions,
severSelectOptions,
} from "@/common/constant/merchant";
import Descriptions from "@/components/descriptions/index.vue";
import { isZeroOrNumber } from "@/libs/number.js";
import Descriptions from "@/views/goods/shelfManage/components/descriptions/index.vue";
import CostAttributionSetting from "@/views/goods/shelfProduct/components/profitSharingConfig/components/costAttributionSetting/index.vue";
import {
getTableCols,
......@@ -163,10 +163,12 @@ export default {
goodsStr = this.specialDetail.goodsTypeGroupRelationList.map((item) => {
// if (this.specialDetail.categoryType === 1)
// return item.goodsTypeName;
if (this.specialDetail.categoryType === 2)
if (this.specialDetail.categoryType === 2) {
return `${item.upgradeGoodsName}(${item.merchantGoodsCode})`;
if (this.specialDetail.categoryType === 3)
}
if (this.specialDetail.categoryType === 3) {
return `${item.packageName}(${item.packageCode})`;
}
return "-";
});
}
......@@ -184,8 +186,9 @@ export default {
col: 24,
render: (h, { data, schemaItem }) => {
const info = data[schemaItem.descKey];
if (!info)
if (!info) {
return h("span", "-");
}
return h("span", info.typeLabel ? `${info.calculateModeLabel}:${info.typeLabel}:${info.text}` : info.text);
},
};
......
......@@ -3,19 +3,13 @@ import { cloneDeep, isArray, sortBy, uniqBy } from "lodash-es";
import { getMerchantLevelApi } from "@/api/shelfManage";
import { queryFeeCategoryByType as getFeeCategoryByTypeApi } from "@/api/sys.base";
import { attrToVal as attrToValOptions, userType } from "@/common/constants";
import { isSingleShopMode } from "@/views/goods/shelfManage/components/profitSharingConfig/utils/feeCategoryHelper";
import {
getProfitSharingConfigBaseDetailApi,
getProfitSharingConfigSpecialCategoryDetailApi,
getProfitSharingConfigSpecialCategoryListApi,
postProfitSharingConfigBaseDetailApi,
} from "@/views/goods/shelfProduct/api";
import {
getMemberRightsUpgradeValue,
getSelectFilterIds,
getTableFilterIds,
isMemberRightsUpgrade,
} from "@/views/goods/shelfProduct/utils/status";
import { getMemberRightsUpgradeValue, getSelectFilterIds, getTableFilterIds, isMemberRightsUpgrade, isSingleShopMode } from "@/views/goods/shelfProduct/utils/status";
// 获取渠道列表, 这里的数据不真实. 仅做循环展示用 .
// 具体的值需要 获取品类详情后 再设置
......@@ -331,8 +325,9 @@ export function mapToRules({
export function filerExpenseCategoryValuePlaceholder(value) {
// value? :''
if (!value)
if (!value) {
return "请选择上级";
}
return value === 3 || value === 10 ? "请输入金额" : "请输入比例";
}
......
<template>
<div class="">
<Descriptions :schema="getSchema" :data="getSchemaData" />
</div>
<div class="">
<Descriptions :data="getSchemaData" :schema="getSchema" />
</div>
</template>
<script>
......@@ -10,17 +10,10 @@ import {
otherSelectOptions,
severSelectOptions,
} from "@/common/constant/merchant";
import Descriptions from "@/components/descriptions/index.vue";
import { isZeroOrNumber } from "@/libs/number.js";
import { baseConfig } from "@/main";
import Descriptions from "@/views/goods/shelfManage/components/descriptions/index.vue";
import { categoryTypeOptions } from "@/views/goods/shelfProduct/constant/index.js";
import {
isEdit,
isMemberRightsUpgrade,
isQualityUpgrade,
isSolarFilm,
isView,
} from "@/views/goods/shelfProduct/utils/status.js";
export default {
name: "",
......@@ -59,12 +52,15 @@ export default {
let goodsStr = "-";
if (this.specialDetail.goodsTypeGroupRelationList && this.specialDetail.goodsTypeGroupRelationList.length) {
goodsStr = this.specialDetail.goodsTypeGroupRelationList.map((item) => {
if (this.specialDetail.categoryType === 1)
if (this.specialDetail.categoryType === 1) {
return item.goodsTypeName || item.goodsType;
if (this.specialDetail.categoryType === 2)
}
if (this.specialDetail.categoryType === 2) {
return `${item.upgradeGoodsName}(${item.merchantGoodsCode})`;
if (this.specialDetail.categoryType === 3)
}
if (this.specialDetail.categoryType === 3) {
return `${item.packageName}(${item.packageCode})`;
}
return "-";
});
}
......@@ -145,8 +141,9 @@ export default {
col: 24,
render: (h, { data, schemaItem }) => {
const info = data[schemaItem.descKey];
if (!info)
if (!info) {
return h("span", "-");
}
return h("span", `${info.calculateModeText}:${info.typeLabel}:${info.text}`);
// if (isSunshineIncentive) {
// return h("span", `${info.calculateModeText}:${info.typeLabel}:${info.text}`);
......@@ -166,12 +163,15 @@ export default {
},
methods: {
getExpenseCategoryCalculateTypeOptions(targetType) {
if (targetType === 1)
if (targetType === 1) {
return [...defaultSelectOptions, ...otherSelectOptions];
if (targetType === 2)
}
if (targetType === 2) {
return severSelectOptions;
}
if (targetType === 3) {
return severSelectOptions;
if (targetType === 3)
return severSelectOptions; // reconciliation中的platformFeeList用的是severSelectOptions
} // reconciliation中的platformFeeList用的是severSelectOptions
return [];
},
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!