Commit 18f8a936 by Jaxon

feat: 嘀加上架 - 运营查看 - 同步"编辑" 的内容

1 parent 93c53774
......@@ -35,8 +35,7 @@
</template>
</RemoteSelect>
</div>
<span class="actions-wrapper">
<span v-if="useEdit" class="actions-wrapper">
<el-dropdown @command="handleAppendProductPackages">
<el-button plain>
新增
......@@ -53,7 +52,7 @@
</div>
<div class="content-wrapper">
<template v-if="tabsActive && tabs.list && tabs.list.length || (!isEmpty(productDetail) || productDetail.productType)">
<div class="actions-wrapper">
<div v-if="useEdit" class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW"
plain
style="width:160px"
......@@ -134,6 +133,10 @@ export default {
},
props: {
useEdit: {
type: Boolean,
default: true,
},
shelveId: {
type: [String, Number],
required: true,
......
......@@ -29,7 +29,7 @@
</el-select>
</div>
<span class="actions-wrapper">
<span v-if="useEdit" class="actions-wrapper">
<el-button plain
size="small"
icon="el-icon-plus"
......@@ -41,7 +41,7 @@
</div>
<div v-if="specialCategory.active" class="public-container">
<div class="actions-wrapper">
<div v-if="useEdit" class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW"
plain
style="width:160px"
......@@ -209,6 +209,10 @@ export default {
SpecialCategory,
},
props: {
useEdit: {
type: Boolean,
default: true,
},
shelveId: {
type: [String, Number],
required: true,
......
......@@ -38,7 +38,7 @@
</el-button>
</div> -->
<span class="actions-wrapper">
<span v-if="useEdit" class="actions-wrapper">
<el-button plain
size="small"
icon="el-icon-plus"
......@@ -50,7 +50,7 @@
</div>
<template v-if="specialCategoryActive">
<div class="actions-wrapper">
<div v-if="useEdit" class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW"
plain
style="width:160px"
......@@ -115,6 +115,10 @@ export default {
// RuleUpdateDialog: ruleUpdateDialog,
},
props: {
useEdit: {
type: Boolean,
default: true,
},
shelveId: {
type: [String, Number],
required: true,
......
......@@ -41,7 +41,7 @@
</div> -->
</div>
<div class="content-wrapper">
<div class="actions-wrapper">
<div v-if="useEdit" class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW"
plain
style="width:160px"
......@@ -97,6 +97,10 @@ export default {
RemoteSelect,
},
props: {
useEdit: {
type: Boolean,
default: true,
},
shelveId: {
type: [String, Number],
required: true,
......
......@@ -186,8 +186,9 @@ export default {
this.close({ tagName: "/contractDetail" });
this.$router.push({
name: "contractDetail",
params: {
query: {
id: row.id,
businessCode: row.businessCode,
},
});
},
......
<!-- 编辑 - 运营确认 -->
<template>
<d2-container v-loading="isLoad" class="edit-contract">
<!-- 基础信息 -->
<BaseInfo :basic-info="basicInfo"></BaseInfo>
<!-- 流量方信息 -->
<!-- <shop-merchant-info :merchantInfo="merchantInfo"></shop-merchant-info> -->
<!-- 流量方信息 -->
<MultilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData">
</MultilateralShopMerchant>
<!-- 上架商品及测算 -->
<GoodsInfo></GoodsInfo>
<!-- 分账配置 -->
<DivisionConfig :basic-info="basicInfo" :divisi-obj="divisiObj"></DivisionConfig>
<!-- 对账配置 -->
<FinanceConfig :finance-obj="financialObj"></FinanceConfig>
<div v-if="shelveId && shelvingData.shelfType && businessCode" class="wrapper">
<div>
<BaseInfo :shelve-id="shelveId" />
<TrafficSource ref="trafficSourceRef"
:shelve-id="shelveId"
:use-edit="false"
:shelf-type="shelvingData.shelfType"
:business-code="businessCode" />
</div>
<div>
<!-- 上架商品及测算 -->
<ProductShelving ref="productShelvingRef"
:shelve-id="shelveId"
:use-edit="false"
:scene-type="shelvingData.sceneType"
:shelf-type="shelvingData.shelfType"
:business-code="businessCode" />
</div>
<div style="margin-top:20px">
<!-- 分账配置 -->
<ProfitSharingConfig ref="profitSharingConfigRef"
:shelve-id="shelveId"
:use-edit="false"
:scene-type="shelvingData.sceneType"
:shelf-type="shelvingData.shelfType"
:business-code="businessCode" />
</div>
<div>
<!-- 对账配置 -->
<ReconciliationConfig ref="reconciliationConfigRef"
:shelve-id="shelveId"
:use-edit="false"
:scene-type="shelvingData.sceneType"
:shelf-type="shelvingData.shelfType"
:business-code="businessCode" />
</div>
<div style="height:100%;overflow:hidden;height:600px">
<!-- 预估利润率 -->
<ProfitMarginTable ref="profitMarginTableRef"
:shelve-id="shelveId"
:scene-type="shelvingData.sceneType"
:shelf-type="shelvingData.shelfType"
:business-code="businessCode" />
</div>
<div style="margin-top:20px">
<OperateList :log-list="logList"></OperateList>
</div>
</div>
<!-- 操作记录 -->
<OperateList :log-list="logList"></OperateList>
<div style="margin-top: 40px; text-align: center">
<el-button type="primary" @click="handleBack()">
返回
......@@ -27,35 +65,52 @@
<script>
import {
getBusisDetailBasic,
merchantSettleDistributeRuleLastRule,
getShelveBaseDetailApi,
} from "@api/shelfManage";
import { mapActions } from "vuex";
import DivisionConfig from "../components/detailCon/DivisionConfig.vue";
import FinanceConfig from "../components/detailCon/FinanceConfig.vue";
import GoodsInfo from "../components/detailCon/GoodsInfo.vue";
import multilateralShopMerchant from "../components/detailCon/multilateralShopMerchant.vue";
// 基础信息
import BaseInfo from "../components/baseInfo/index.vue";
import OperateList from "../components/detailCon/OperateList.vue";
import ShopMerchantInfo from "../components/detailCon/ShopMerchantInfo.vue";
import BaseInfo from "../components/editCon/BaseInfo.vue";
// 商品上架
import ProductShelving from "../components/productShelving/index.vue";
import ProfitMarginTable from "../components/profitMarginTable/index.vue";
// 分账配置
import ProfitSharingConfig from "../components/profitSharingConfig/index.vue";
// 对账配置
import ReconciliationConfig from "../components/reconciliationConfig/index.vue";
// 流量方
import TrafficSource from "../components/trafficSource/index.vue";
export default {
name: "ContractDetail",
components: {
BaseInfo,
MultilateralShopMerchant: multilateralShopMerchant,
ShopMerchantInfo,
GoodsInfo,
DivisionConfig,
FinanceConfig,
ProductShelving,
TrafficSource,
ProfitSharingConfig,
ReconciliationConfig,
ProfitMarginTable,
OperateList,
},
data() {
return {
shelveId: undefined,
businessCode: "",
shelvingData: {
confirmStep: -1,
// 上架类型 1-单店模式 2-项目制批量上架
shelfType: 1,
// 业务场景
sceneType: 1,
// { confId: 1, confValue: "精品升级" },
// { confId: 0, confValue: "会员权益升级" },
approveType: 1,
businessCode: "",
},
isLoad: true,
merchantEditData: [],
logList: [],
editData: {},
basicInfo: {},
merchantInfo: {},
divisiObj: {},
......@@ -68,12 +123,17 @@ export default {
},
},
created() {
this.shelveId = this.$route.query.id;
this.businessCode = this.$route.query.businessCode;
this.refreshCategoryList();
},
mounted() {
this.getDetail();
this.getBasicDetail();
this.getFinaceObj();
async mounted() {
try {
await this.getBasicDetail();
await this.init();
} finally {
this.isLoad = false;
}
},
// 方法集合
methods: {
......@@ -81,42 +141,15 @@ export default {
...mapActions({
close: "d2admin/page/close",
}),
getBasicDetail() {
getBusisDetailBasic({ id: this.routerInfo.id }).then((res) => {
console.log(res, "res11111");
this.basicInfo = res.basicInfo || {};
this.logList = res.logList;
this.merchantInfo = res.createBusinessApproveMerchant || {};
this.merchantEditData = res.createBusinessApproveMerchantList || [];
});
},
getDetail() {
this.isLoad = false;
async getBasicDetail() {
const { logList } = await getBusisDetailBasic({ id: this.shelveId });
this.logList = logList;
},
getFinaceObj() {
const { id } = this.routerInfo;
id
&& merchantSettleDistributeRuleLastRule({
id,
}).then((result) => {
console.log(result, "result");
const realityShopMerchantName = result.basicInfo.shelfType == 1 ? result.merchantSettleDistributeRule.realityShopMerchantName : result.merchantSettleDistributeRule.realityShopLevel == 1 ? "流量方" : "上级流量方";
console.log(result.createBusinessApproveMerchantList[0].parentMerchantId, "partnerMerchantName");
this.divisiObj = Object.assign(result.merchantSettleDistributeRule, {
realityShopMerchantName,
partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName,
partnerMerchantId: result.createBusinessApproveMerchantList[0].partnerMerchantId,
});
const operationMode = result.createBusinessApproveMerchantList[0].operationMode;
if (operationMode == 0) { // 非直营过滤掉人力成本
result.merchantReconciliationRule.goodsTypeGroupReconciliationRules = result.merchantReconciliationRule.goodsTypeGroupReconciliationRules.map((item) => {
item.expenseCategoryRules = item.expenseCategoryRules.filter(el => el.expenseCategoryId != 807);
return item;
});
}
// result.merchantReconciliationRule
this.financialObj = result.merchantReconciliationRule;
});
async init() {
// 获取该上架详情的基础数据
const data = await getShelveBaseDetailApi({ id: this.shelveId });
data.confirmStep = data.confirmStep - 1 || 0;
Object.assign(this.shelvingData, data);
},
handleBack() {
this.close({ tagName: "/shelfManage" });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!