Commit 5868d21c by Jaxon

feat(商品上架): 业务开发

1 parent 3a496b55
...@@ -724,6 +724,11 @@ export const routerName = { ...@@ -724,6 +724,11 @@ export const routerName = {
parentId: "9031803", parentId: "9031803",
name: "商品查看", name: "商品查看",
}, },
{
authId: "90318102",
parentId: "9031803",
name: "常规商品详情",
},
], ],
}, },
{ {
...@@ -737,6 +742,11 @@ export const routerName = { ...@@ -737,6 +742,11 @@ export const routerName = {
name: "商品编辑", name: "商品编辑",
parentId: "90318", parentId: "90318",
}, },
{
authId: "90318101",
parentId: "9031803",
name: "常规上架",
},
], ],
}, },
{ {
...@@ -766,6 +776,19 @@ export const routerName = { ...@@ -766,6 +776,19 @@ export const routerName = {
}, },
component: _import("goods/shelfProduct/view/normalModify/index"), component: _import("goods/shelfProduct/view/normalModify/index"),
}, },
// 常规商品详情
90318102: {
path: "/goods-shelf/normal-detail",
name: "goodsShelfNormalDetail",
meta: {
title: "常规上架详情",
authId: "90318102",
parentId: "90318",
sideHidden: true,
activePath: "/goods-shelf",
},
component: _import("goods/shelfProduct/view/normalDetail/index"),
},
9031802: { 9031802: {
path: "/goods-shelf/modify", path: "/goods-shelf/modify",
...@@ -779,6 +802,7 @@ export const routerName = { ...@@ -779,6 +802,7 @@ export const routerName = {
}, },
component: _import("goods/shelfProduct/view/modify/index"), component: _import("goods/shelfProduct/view/modify/index"),
}, },
// 特殊商品详情
9031805: { 9031805: {
path: "/goods-shelf/detail", path: "/goods-shelf/detail",
name: "goodsShelfDetail", name: "goodsShelfDetail",
......
...@@ -189,12 +189,18 @@ export function postReconciliationConfigOtherGoodsApi(data = {}) { ...@@ -189,12 +189,18 @@ export function postReconciliationConfigOtherGoodsApi(data = {}) {
return request(data, RequestMethods.POST); return request(data, RequestMethods.POST);
} }
// 获取 product 的 原上架id用的列表 // 获取 product 的 原上架id用的列表 - 商品
export function postProductOldMerchantGoodsCodeList(data = {}) { export function postProductOldMerchantGoodsCodeList(data = {}) {
data.method = "dj.api.marketing.goods.page"; data.method = "dj.api.marketing.goods.page";
return request(data, RequestMethods.POST); return request(data, RequestMethods.POST);
} }
// 获取 product 的 原上架id用的列表 - 套餐
export function postComboOldMerchantGoodsCodeList(data = {}) {
data.method = "dj.api.marketing.package.page";
return request(data, RequestMethods.POST);
}
// 获取 服务项目 // 获取 服务项目
export function postProductServiceList(data = {}) { export function postProductServiceList(data = {}) {
// 只要膜类 // 只要膜类
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
<div v-if="form.groupType !== 1" style="display: flex"> <div v-if="form.groupType !== 1" style="display: flex">
<el-form-item label="分账品类" <el-form-item label="分账品类"
prop="specialDetail.categoryType"> prop="specialDetail.categoryType">
<!-- 5.8.4 禁止修改 -->
<el-select v-model="form.categoryType" <el-select v-model="form.categoryType"
style="width:414px" style="width:414px"
disabled
@change="handleCategoryTypeChange"> @change="handleCategoryTypeChange">
<el-option v-for="item in options.categoryType" <el-option v-for="item in options.categoryType"
:key="item.value" :key="item.value"
...@@ -17,12 +19,14 @@ ...@@ -17,12 +19,14 @@
label-width="12px" label-width="12px"
prop="specialDetail.goodsTypeGroupRelationList" prop="specialDetail.goodsTypeGroupRelationList"
required> required>
<!-- 5.8.4 禁止修改 -->
<RemoteSelect v-if="form.categoryType === 2" <RemoteSelect v-if="form.categoryType === 2"
:key="form.categoryType" :key="form.categoryType"
v-model="form.goodsTypeGroupRelationList" v-model="form.goodsTypeGroupRelationList"
placeholder="请选择商品" placeholder="请选择商品"
style="width:390px" style="width:390px"
value-key="merchantGoodsCode" value-key="merchantGoodsCode"
disabled
:fetch-api="fetchUpgradeGoodsList" :fetch-api="fetchUpgradeGoodsList"
:field-name="{ :field-name="{
value: 'merchantGoodsCode', value: 'merchantGoodsCode',
...@@ -37,6 +41,7 @@ ...@@ -37,6 +41,7 @@
}" }"
:options.sync="options.upgradeGoods"> :options.sync="options.upgradeGoods">
</RemoteSelect> </RemoteSelect>
<!-- 5.8.4 禁止修改 -->
<RemoteSelect v-if="form.categoryType === 3" <RemoteSelect v-if="form.categoryType === 3"
:key="form.categoryType" :key="form.categoryType"
ref="packageGoods" ref="packageGoods"
...@@ -44,6 +49,7 @@ ...@@ -44,6 +49,7 @@
placeholder="请选择套餐" placeholder="请选择套餐"
style="width:390px" style="width:390px"
value-key="packageCode" value-key="packageCode"
disabled
:fetch-api="getPackagesGoodsList" :fetch-api="getPackagesGoodsList"
:field-name="{ :field-name="{
value: 'packageCode', value: 'packageCode',
......
...@@ -135,23 +135,24 @@ ...@@ -135,23 +135,24 @@
<span class="label"> <span class="label">
{{ item.title }} {{ item.title }}
</span> </span>
<span v-if="(item.groupType !== 1) && useEdit && isView(editState)" <!-- 5.8.4 取消删除 -->
<!-- <span v-if="(item.groupType !== 1) && useEdit && isView(editState)"
class="actions el-icon-close" class="actions el-icon-close"
@click.stop="handleRemoveTitleSelectItem(item)"> @click.stop="handleRemoveTitleSelectItem(item)">
</span> </span> -->
</div> </div>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<!-- 5.8.4 取消新增 -->
<span v-if="useEdit && editState === VIEW_MODE.VIEW" class="actions-wrapper"> <!-- <span v-if="useEdit && editState === VIEW_MODE.VIEW" class="actions-wrapper">
<el-button icon="el-icon-plus" <el-button icon="el-icon-plus"
size="small" size="small"
plain plain
@click="handleAppendSpecialCategory"> @click="handleAppendSpecialCategory">
新增 新增
</el-button> </el-button>
</span> </span> -->
</div> </div>
<div v-if="tabsActive" class="public-container"> <div v-if="tabsActive" class="public-container">
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
<div v-if="form.groupType !== 1" style="display: flex"> <div v-if="form.groupType !== 1" style="display: flex">
<el-form-item label="分账品类" <el-form-item label="分账品类"
prop="specialDetail.categoryType"> prop="specialDetail.categoryType">
<!-- 5.8.4 禁止修改 -->
<el-select v-model="form.categoryType" <el-select v-model="form.categoryType"
style="width:414px" style="width:414px"
disabled
@change="handleCategoryTypeChange"> @change="handleCategoryTypeChange">
<el-option v-for="item in options.categoryType" <el-option v-for="item in options.categoryType"
:key="item.value" :key="item.value"
...@@ -18,13 +20,14 @@ ...@@ -18,13 +20,14 @@
label-width="12px" label-width="12px"
prop="specialDetail.goodsTypeGroupRelationList" prop="specialDetail.goodsTypeGroupRelationList"
required> required>
<!-- 5.8.4 取消修改 -->
<RemoteSelect v-if="form.categoryType === 2" <RemoteSelect v-if="form.categoryType === 2"
:key="form.categoryType" :key="form.categoryType"
v-model="form.goodsTypeGroupRelationList" v-model="form.goodsTypeGroupRelationList"
placeholder="请选择商品" placeholder="请选择商品"
style="width:390px" style="width:390px"
value-key="merchantGoodsCode" value-key="merchantGoodsCode"
disabled
:fetch-api="fetchUpgradeGoodsList" :fetch-api="fetchUpgradeGoodsList"
:field-name="{ :field-name="{
value: 'merchantGoodsCode', value: 'merchantGoodsCode',
...@@ -39,6 +42,7 @@ ...@@ -39,6 +42,7 @@
}" }"
:options.sync="options.upgradeGoods"> :options.sync="options.upgradeGoods">
</RemoteSelect> </RemoteSelect>
<!-- 5.8.4 取消修改 -->
<RemoteSelect v-if="form.categoryType === 3" <RemoteSelect v-if="form.categoryType === 3"
:key="form.categoryType" :key="form.categoryType"
ref="packageGoods" ref="packageGoods"
...@@ -46,6 +50,7 @@ ...@@ -46,6 +50,7 @@
placeholder="请选择套餐商品" placeholder="请选择套餐商品"
style="width:390px" style="width:390px"
value-key="packageCode" value-key="packageCode"
disabled
:fetch-api="fetchPackagesGoodsList" :fetch-api="fetchPackagesGoodsList"
:field-name="{ :field-name="{
value: 'packageCode', value: 'packageCode',
......
...@@ -102,23 +102,26 @@ ...@@ -102,23 +102,26 @@
<span class="label"> <span class="label">
{{ item.title }} {{ item.title }}
</span> </span>
<span v-if="useEdit && isView(editState) && item.groupType !== 1" <!-- 5.8.4 取消删除功能 -->
<!-- <span v-if="useEdit && isView(editState) && item.groupType !== 1"
class="actions el-icon-close" class="actions el-icon-close"
@click.stop="handleRemoveTitleSelectItem(item)"> @click.stop="handleRemoveTitleSelectItem(item)">
</span> </span> -->
</div> </div>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<span v-if="useEdit && isView(editState)" class="actions-wrapper"> <!-- 5.8.4 取消删除新增 -->
<!-- <span v-if="useEdit && isView(editState)" class="actions-wrapper">
<el-button icon="el-icon-plus" <el-button icon="el-icon-plus"
size="small" size="small"
plain plain
@click="handleAppendSpecialCategory"> @click="handleAppendSpecialCategory">
新增 新增
</el-button> </el-button>
</span> </span> -->
</div> </div>
<div v-if="tabsActive" class="public-container"> <div v-if="tabsActive" class="public-container">
...@@ -232,6 +235,8 @@ export default { ...@@ -232,6 +235,8 @@ export default {
form: { form: {
firstLineSunshineOnlinePointsFlag: "N", firstLineSunshineOnlinePointsFlag: "N",
firstLineSunshine2OnlinePointsFlag: "N", firstLineSunshine2OnlinePointsFlag: "N",
managementMarketingFeesPrerequisite: "N",
firstLineSunshinePrerequisite: "N",
operationMode: undefined, operationMode: undefined,
specialDetail: { specialDetail: {
categoryType: undefined, categoryType: undefined,
...@@ -241,17 +246,20 @@ export default { ...@@ -241,17 +246,20 @@ export default {
}, },
}, },
rules: { rules: {
// 一线阳光是否开启线上积分
"firstLineSunshineOnlinePointsFlag": [ "firstLineSunshineOnlinePointsFlag": [
{ required: true, trigger: "change" }, { required: true, message: "请选择一线阳光是否开启线上积分", trigger: "change" },
], ],
"firstLineSunshine2OnlinePointsFlag": [ "firstLineSunshine2OnlinePointsFlag": [
{ required: true, trigger: "change" }, { required: true, message: "请选择一线阳光2是否开启线上积分", trigger: "change" },
], ],
// 管理层市场费是否前置
"managementMarketingFeesPrerequisite": [ "managementMarketingFeesPrerequisite": [
{ required: true, trigger: "change" }, { required: true, message: "请选择管理层市场费是否前置", trigger: "change" },
], ],
// 请选择一线阳光是否前置
"firstLineSunshinePrerequisite": [ "firstLineSunshinePrerequisite": [
{ required: true, trigger: "change" }, { required: true, message: "请选择一线阳光是否前置", trigger: "change" },
], ],
"specialDetail.categoryType": [ "specialDetail.categoryType": [
{ required: true, message: "请选择分账品类", trigger: "change" }, { required: true, message: "请选择分账品类", trigger: "change" },
......
...@@ -39,20 +39,23 @@ ...@@ -39,20 +39,23 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- TODO: 且上架类型的值 为 修改 才显示 --> <!-- 单店模式 且 类型 为修改 -->
<el-col v-if="isSingleShopMode(shelfType) && isShelfStyleEdit(packageForm.shelfStyle)" :span="12"> <el-col v-if="isSingleShopMode(shelfType) && isShelfStyleEdit(packageForm.shelfStyle)" :span="12">
<el-form-item label="原上架ID:" <el-form-item label="原上架ID:"
prop="oldMerchantGoodsCode" prop="oldMerchantGoodsCode"
:rules="[{ required: true, message: '请选择原上架ID', trigger: 'change' }]"> :rules="[{ required: true, message: '请选择原上架ID', trigger: 'change' }]">
<el-select v-model="packageForm.oldMerchantGoodsCode"
placeholder="请选择"> <RemoteSelect v-model="packageForm.oldMerchantGoodsCode"
<el-option v-for="item in options.serviceList" placeholder="原上架ID"
:key="item.id" :fetch-api="fetchMerchantGoodsCode"
:label="item.serviceItemsName" :field-name="{
:value="item.id"> value: 'goodsCode',
</el-option> label: 'productName',
</el-select> }"
:immediate="true"
:multiple="false"
:options.sync="options.oldMerchantGoodsCode">
</RemoteSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -68,20 +71,6 @@ ...@@ -68,20 +71,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12">
<el-form-item label="销售占比:" prop="salesProportionPercent">
<div class="form-item-append-fix">
<VenusNumberInput v-model="packageForm.salesProportionPercent"
placeholder="请输入销售占比"
:controls="false"
:max="100"
:min="0"
:precision="2">
</VenusNumberInput>
<span class="fix-symbol">%</span>
</div>
</el-form-item>
</el-col> -->
<el-col title="按子商品的售价进行累计,实时计算" :span="12"> <el-col title="按子商品的售价进行累计,实时计算" :span="12">
<el-form-item label="售价/件:" prop="sellPrice"> <el-form-item label="售价/件:" prop="sellPrice">
...@@ -180,6 +169,7 @@ ...@@ -180,6 +169,7 @@
:base-scene-code="baseSceneCode" :base-scene-code="baseSceneCode"
:disabled-positions="getProductDisabledPositions(goodsForm.upgradeGoodsId, goodsForm.merchantGoodsCode)" :disabled-positions="getProductDisabledPositions(goodsForm.upgradeGoodsId, goodsForm.merchantGoodsCode)"
:edit-state="VIEW_MODE.EDIT" :edit-state="VIEW_MODE.EDIT"
:merchant-id="merchantId"
:merchant-id-list="merchantIdList" :merchant-id-list="merchantIdList"
:product.sync="goodsForm" :product.sync="goodsForm"
:shelf-type="shelfType" :shelf-type="shelfType"
...@@ -204,6 +194,7 @@ import { nanoid } from "nanoid"; ...@@ -204,6 +194,7 @@ import { nanoid } from "nanoid";
import { settlementTypeOpt } from "@/common/constants.js"; import { settlementTypeOpt } from "@/common/constants.js";
import VenusNumberInput from "@/components/venusNumberInput/index.vue"; import VenusNumberInput from "@/components/venusNumberInput/index.vue";
import { baseConfig } from "@/main"; import { baseConfig } from "@/main";
import { postComboOldMerchantGoodsCodeList } from "@/views/goods/shelfProduct/api";
import { shelfStyleOptions, VIEW_MODE } from "@/views/goods/shelfProduct/constant/index"; import { shelfStyleOptions, VIEW_MODE } from "@/views/goods/shelfProduct/constant/index";
import { isMemberRightsUpgrade, isQualityUpgrade, isShelfStyleEdit, isSingleShopMode, isSolarFilm, isUpgradeProductCostStyleCustom, isUpgradeProductCostStyleDefault } from "@/views/goods/shelfProduct/utils/status.js"; import { isMemberRightsUpgrade, isQualityUpgrade, isShelfStyleEdit, isSingleShopMode, isSolarFilm, isUpgradeProductCostStyleCustom, isUpgradeProductCostStyleDefault } from "@/views/goods/shelfProduct/utils/status.js";
import Product from "../../../product/index.vue"; import Product from "../../../product/index.vue";
...@@ -219,6 +210,10 @@ export default { ...@@ -219,6 +210,10 @@ export default {
type: Array, type: Array,
required: true, required: true,
}, },
merchantId: {
type: Number,
required: true,
},
baseSceneCode: { baseSceneCode: {
type: String, type: String,
required: true, required: true,
...@@ -241,6 +236,7 @@ export default { ...@@ -241,6 +236,7 @@ export default {
options: { options: {
settlementType: settlementTypeOpt, settlementType: settlementTypeOpt,
shelfStyleOptions, shelfStyleOptions,
oldMerchantGoodsCode: [],
}, },
dialog: { dialog: {
selectGoods: { selectGoods: {
...@@ -308,6 +304,21 @@ export default { ...@@ -308,6 +304,21 @@ export default {
isQualityUpgrade, isQualityUpgrade,
isSolarFilm, isSolarFilm,
isSingleShopMode, isSingleShopMode,
async fetchMerchantGoodsCode({ pageQuery }) {
const res = await postComboOldMerchantGoodsCodeList({
...pageQuery,
merchantIds: [this.merchantId],
baseSceneCode: this.baseSceneCode,
productName: pageQuery.searchValue,
});
return {
list: res.list,
query: {
pages: res.pages,
total: res.total,
},
};
},
getProductDisabledPositions(upgradeGoodsId, excludeMerchantGoodsCode) { getProductDisabledPositions(upgradeGoodsId, excludeMerchantGoodsCode) {
return this.productList.filter(item => item.upgradeGoodsId === upgradeGoodsId && item.merchantGoodsCode !== excludeMerchantGoodsCode).map(item => item.detailList?.[0]?.position); return this.productList.filter(item => item.upgradeGoodsId === upgradeGoodsId && item.merchantGoodsCode !== excludeMerchantGoodsCode).map(item => item.detailList?.[0]?.position);
}, },
...@@ -324,7 +335,6 @@ export default { ...@@ -324,7 +335,6 @@ export default {
upgradeCommodityCode: upgradeGoods.commodityCode, upgradeCommodityCode: upgradeGoods.commodityCode,
upgradeGoodsId: upgradeGoods.id, upgradeGoodsId: upgradeGoods.id,
upgradeGoodsName: upgradeGoods.upgradeGoodsName, upgradeGoodsName: upgradeGoods.upgradeGoodsName,
}); });
} }
}, },
......
...@@ -189,7 +189,6 @@ ...@@ -189,7 +189,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- TODO: 为空默认为0 , 这里需要前端修改还是后端直接改为0 ? -->
<el-col v-if="isMemberRightsUpgrade(baseSceneCode)" :span="12"> <el-col v-if="isMemberRightsUpgrade(baseSceneCode)" :span="12">
<el-form-item label="嘀加成本/件:" <el-form-item label="嘀加成本/件:"
prop="djCost"> prop="djCost">
...@@ -235,22 +234,6 @@ ...@@ -235,22 +234,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col v-if="isQualityUpgrade(baseSceneCode)" :span="12">
<el-form-item label="回收成本:"
prop="detailList[0].recoveryCost">
<div class="form-item-append-fix">
<VenusNumberInput v-model="product.detailList[0].recoveryCost"
placeholder="请输入回收成本"
:controls="false"
:max="999999"
:min="0"
:precision="2">
</VenusNumberInput>
<span class="fix-symbol">元</span>
</div>
</el-form-item>
</el-col> -->
<!-- ●赠送成本(仅精品升级场景存在) --> <!-- ●赠送成本(仅精品升级场景存在) -->
<!-- TODO 5.8.6 ○若否则默认为空 --> <!-- TODO 5.8.6 ○若否则默认为空 -->
<!-- TODO 5.8.6 ○若是则自动带入对应的产品、升级成本,成本的获取方式与产品、升级成本一致; --> <!-- TODO 5.8.6 ○若是则自动带入对应的产品、升级成本,成本的获取方式与产品、升级成本一致; -->
......
<template>
<d2-container v-loading="!isReadyForNextStep" class="detail-wrapper">
<FormProvider v-if="isReadyForNextStep"
class="form-provide-wrapper"
:use-edit="false">
<template #default="{ data }">
<FormStep name="ProductImport">
<ShelfProductImport ref="shelfProductImportRef"
:business-code="businessCode"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProductConfirm')"
name="ProductConfirm"
style="margin-top:20px">
<ShelfProductConfirm :base-scene-code="baseSceneCode"
:business-code="businessCode"
:merchant-id="merchantId"
:shelf-type="shelfType"
:use-edit="false" />
</FormStep>
<!-- 5.8.4 批量模式没有这个 -->
<FormStep v-if="isSingleShopMode(shelfType)"
v-loading="data.getSomeItemStepLoading('ProfitMarginTable')"
name="ProfitMarginTable"
style="height:100%;margin-top:20px">
<ProfitMarginTable style="height:680px;overflow:hidden"
:business-code="businessCode"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('OperateOperateList')"
name="OperateList"
style="margin-top:20px">
<OperateList :log-list="logList" />
</FormStep>
<div style="text-align:center">
<el-button size="small"
style="width:60px"
type="info"
@click="handleBack">
返回
</el-button>
</div>
</template>
</FormProvider>
</d2-container>
</template>
<script>
import {
getShelfProductBaseInfoApi,
} from "@/views/goods/shelfProduct/api";
import { sceneTypeOptions } from "@/views/goods/shelfProduct/constant/index";
import { getMemberRightsUpgradeValue, isMemberRightsUpgrade, isQualityUpgrade, isSingleShopMode } from "@/views/goods/shelfProduct/utils/status";
import FormStep from "../../components/formProvider/formStep.vue";
import FormProvider from "../../components/formProvider/index.vue";
import OperateList from "../../components/operateList/index.vue";
import ProfitMarginTable from "../../components/profitMarginTable/index.vue";
import ProfitSharingConfig from "../../components/profitSharingConfig/index.vue";
import ReconciliationConfig from "../../components/reconciliationConfig/index.vue";
import ShelfProductConfirm from "../../components/shelfProductConfirm/index.vue";
import ShelfProductImport from "../../components/shelfProductImport/index.vue";
export default {
name: "",
components: {
OperateList,
ShelfProductImport,
ShelfProductConfirm,
ProfitMarginTable,
FormProvider,
FormStep,
},
props: {
},
data() {
return {
sceneTypeOptions,
baseSceneCode: undefined,
businessCode: undefined,
shelfType: undefined,
merchantId: undefined,
logList: [],
};
},
computed: {
isReadyForNextStep() {
return this.baseSceneCode && this.businessCode && this.shelfType;
},
},
async created() {
this.baseSceneCode = this.$route.query.baseSceneCode;
this.businessCode = this.$route.query.businessCode;
this.shelfType = Number(this.$route.query.shelfType);
await this.$nextTick();
await this.getStep(this.businessCode);
},
mounted() {
},
methods: {
isSingleShopMode,
getMemberRightsUpgradeValue,
isMemberRightsUpgrade,
isQualityUpgrade,
async getStep(businessCode) {
const res = await getShelfProductBaseInfoApi({ businessCode });
if (!res.logList) {
res.logList = [];
}
Object.assign(this.$data, res);
},
handleBack() {
this.$router.back();
},
},
};
</script>
<style scoped lang="scss">
.detail-wrapper {
}
</style>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
:merchant-id="merchantId" :merchant-id="merchantId"
:shelf-type="shelfType" /> :shelf-type="shelfType" />
</FormStep> </FormStep>
<FormStep v-loading="data.isStepLeoading" <FormStep v-loading="data.isStepLoading"
name="ProfitMarginTable" name="ProfitMarginTable"
style="height:100%"> style="height:100%">
<ProfitMarginTable :business-code="businessCode" /> <ProfitMarginTable :business-code="businessCode" />
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
@click="handlePreviousSteps"> @click="handlePreviousSteps">
上一步 上一步
</VenusButton> </VenusButton>
<VenusButton v-if="step.confirmStep < 2" <VenusButton v-if="step.confirmStep < (isSingleShopMode(shelfType) ? 2 : 1)"
size="small" size="small"
type="primary" type="primary"
:disabled="data.isEditing || data.isSaving" :disabled="data.isEditing || data.isSaving"
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
<span style=" display:flex; gap:8px; "> <span style=" display:flex; gap:8px; ">
<!-- 常规上架 handleNormalModify --> <!-- 常规上架 handleNormalModify -->
<auth-button category="Button" <auth-button category="Button"
:data="{ operate: 'create' }" :data="{ operate: 'create', record: { shelfModel: 2 } }"
:show-btn-ids="['9031810']" /> :show-btn-ids="['9031810']" />
<!-- 特殊商品上架 handleModify --> <!-- 特殊商品上架 handleModify -->
<auth-button category="Button" <auth-button category="Button"
:data="{ operate: 'create' }" :data="{ operate: 'create', record: { shelfModel: 1 } }"
:show-btn-ids="['9031801']" /> :show-btn-ids="['9031801']" />
</span> </span>
</d2-table-header> </d2-table-header>
...@@ -189,6 +189,8 @@ export default { ...@@ -189,6 +189,8 @@ export default {
}, },
// 查看 // 查看
handleDetail(row) { handleDetail(row) {
if (row.shelfModel === 1) {
// 特殊上架详情
this.$router.push({ this.$router.push({
name: "goodsShelfDetail", name: "goodsShelfDetail",
query: { query: {
...@@ -197,13 +199,26 @@ export default { ...@@ -197,13 +199,26 @@ export default {
shelfType: row.shelfType, shelfType: row.shelfType,
}, },
}); });
}
if (row.shelfModel === 2) {
// 常规上架详情
this.$router.push({
name: "goodsShelfNormalDetail",
query: {
baseSceneCode: row.baseSceneCode,
businessCode: row.businessCode,
shelfType: row.shelfType,
shelfModel: row.shelfModel,
},
});
}
}, },
// 新增 或 修改 // 新增 或 修改
handleModify({ operate, record }) { handleModify({ operate, record }) {
console.log(record); console.log(record);
// 特殊上架编辑 // 特殊上架编辑
if (record.shelfModel === 1) { if (record?.shelfModel === 1) {
if (operate === "create") { if (operate === "create") {
this.$router.push({ this.$router.push({
name: "goodsShelfCreate", name: "goodsShelfCreate",
...@@ -222,7 +237,7 @@ export default { ...@@ -222,7 +237,7 @@ export default {
} }
} }
if (record.shelfModel === 2) { if (record?.shelfModel === 2) {
if (operate === "create") { if (operate === "create") {
this.$router.push({ this.$router.push({
name: "goodsShelfNormalModify", name: "goodsShelfNormalModify",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!