From fc475c128cc8d94b01772f52a593fd078cb275ab Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 22 Oct 2025 10:22:51 +0800 Subject: [PATCH] feat: mall detail --- apps/web-antd/src/router/routes/modules/mall.ts | 4 ++-- .../src/views/mall/product/spu/form/index.vue | 16 +++++++++++++++- .../mall/product/spu/form/modules/sku-list.vue | 2 +- .../views/mall/product/spu/modules/detail.vue | 10 ---------- 4 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 apps/web-antd/src/views/mall/product/spu/modules/detail.vue diff --git a/apps/web-antd/src/router/routes/modules/mall.ts b/apps/web-antd/src/router/routes/modules/mall.ts index 2638a0f3a..870c111f5 100644 --- a/apps/web-antd/src/router/routes/modules/mall.ts +++ b/apps/web-antd/src/router/routes/modules/mall.ts @@ -34,9 +34,9 @@ const routes: RouteRecordRaw[] = [ name: 'ProductSpuDetail', meta: { title: '商品详情', - activePath: '/crm/business', + activePath: '/mall/product/spu', }, - component: () => import('#/views/mall/product/spu/modules/detail.vue'), + component: () => import('#/views/mall/product/spu/form/index.vue'), }, ], }, diff --git a/apps/web-antd/src/views/mall/product/spu/form/index.vue b/apps/web-antd/src/views/mall/product/spu/form/index.vue index 462d1262e..4d6b052e4 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/index.vue +++ b/apps/web-antd/src/views/mall/product/spu/form/index.vue @@ -7,6 +7,7 @@ import { onMounted, ref, watch } from 'vue'; import { useRoute } from 'vue-router'; import { Page, useVbenModal } from '@vben/common-ui'; +import { useTabs } from '@vben/hooks'; import { convertToInteger, floatToFixed2, formatToFraction } from '@vben/utils'; import { Button, Card, message } from 'ant-design-vue'; @@ -28,6 +29,7 @@ import SkuList from './modules/sku-list.vue'; const spuId = ref(); const { params, name } = useRoute(); +const { closeCurrentTab } = useTabs(); const activeTabName = ref('info'); function onTabChange(key: string) { @@ -239,6 +241,11 @@ async function onSubmit() { async function getDetail() { if (name === 'ProductSpuDetail') { isDetail.value = true; + infoFormApi.setDisabled(true); + skuFormApi.setDisabled(true); + deliveryFormApi.setDisabled(true); + descriptionFormApi.setDisabled(true); + otherFormApi.setDisabled(true); } const id = params.id as unknown as number; if (id) { @@ -351,7 +358,12 @@ onMounted(async () => { @tab-change="onTabChange" > @@ -359,6 +371,7 @@ onMounted(async () => {