diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopColPage.vue b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopColPage.vue new file mode 100644 index 00000000..eb6b932f --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopColPage.vue @@ -0,0 +1,79 @@ + + + + + + + + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopSidebarList.vue b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopSidebarList.vue new file mode 100644 index 00000000..6e537c4e --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/components/PddShopSidebarList.vue @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ shopPagination.current }}/{{ shopTotalPages }} + + + + + + + + + + + + 拼多多店铺 + + + + + + + + + + + + + + + 搜索 + + 重置 + + + + + + + + + + + + 全部店铺 + 全部记录 + + + + + + + + + + + + + + + {{ shopLabel(shop) }} + + + mall_id: {{ shop.mallId }} + + + + + 添加 + + + + + + + + + + + 上一页 + + + {{ shopPagination.current }} / {{ shopTotalPages }} + ({{ shopPagination.total }}) + + + 下一页 + + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/components/PddShopSidebarList.vue b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/components/PddShopSidebarList.vue deleted file mode 100644 index 0a1b8afc..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/components/PddShopSidebarList.vue +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - 渠道店铺 - - - - - - - 搜索 - - 重置 - - - - - - - 全部店铺 - 全部记录 - - - - - - - - - - - {{ shop.mallName || `店铺 #${shop.id}` }} - - - mall_id: {{ shop.mallId }} - - - - - 添加 - - - - - - - - - - 上一页 - - - {{ shopPagination.current }} / {{ shopTotalPages }} - ({{ shopPagination.total }}) - - - 下一页 - - - - - diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/index.vue index ca87ee32..a5725e35 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods-ad-fee/index.vue @@ -1,18 +1,17 @@ - - - - 左侧选择拼多多渠道店铺筛选右侧按日广告费;未选店铺时展示全部记录。可在店铺行快捷新增。 - - + + + + 广告费记录 + - - - - - 新增广告费 - - - + + + refreshTable()" + @change="() => refreshTable()" + /> + refreshTable()" + /> + — + refreshTable()" + /> + + + 新增广告费 + + + - - - - - - 广告费记录 - - - - refreshTable()" - @change="() => refreshTable()" - /> - refreshTable()" - /> - — - refreshTable()" - /> - - + + + + {{ formatAmount(row.feeAmount) }} + + - - 当前:{{ selectedShopLabel }} - - - - - - - 使用上方 goods_id 与日期筛选 - - - - - - {{ formatAmount(row.feeAmount) }} - - - - - - {{ row.goodsName || '—' }} - - {{ row.goodsId }} - + + + {{ row.goodsName || '—' }} + + {{ row.goodsId }} - + + - - - 编辑 - - 删除 - - - - - - - + + + 编辑 + + 删除 + + + + + + `¥${Number(amount || 0).toFixed(2)}`; @success="handleFormSuccess" @cancel="handleFormCancel" /> - + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods/index.vue index 6946a059..e91c3820 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/channel/pdd/goods/index.vue @@ -4,11 +4,9 @@ import type { PddGoodsDTO, PddGoodsVO } from '#/api/channel/pdd/goods'; import type { PddShopVO } from '#/api/channel/pdd/shop'; import type { PageQueryDTO } from '#/types/common'; -import { computed, onMounted, ref } from 'vue'; +import { computed, onMounted, ref, watch } from 'vue'; -import { Page } from '@vben/common-ui'; - -import { Button, Image, Popconfirm, Space, Tag, message } from 'ant-design-vue'; +import { Button, Card, Image, Popconfirm, Space, Tag, message } from 'ant-design-vue'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { @@ -16,18 +14,20 @@ import { getPddGoodsPageApi, } from '#/api/channel/pdd/goods'; import { getPddShopPageApi } from '#/api/channel/pdd/shop'; - -import PddGoodsDetailDrawer from './components/PddGoodsDetailDrawer.vue'; +import PddShopColPage from '#/views/channel/pdd/components/PddShopColPage.vue'; import PddShopDetailModal from '#/views/channel/pdd/shop/components/PddShopDetailModal.vue'; import ProductDetailDrawer from '#/views/ec/product/list/components/ProductDetailDrawer.vue'; +import PddGoodsDetailDrawer from './components/PddGoodsDetailDrawer.vue'; + defineOptions({ name: 'PddGoodsManagement' }); const loading = ref(false); const detailDrawerRef = ref>(); const shopDetailModalRef = ref>(); const productDetailDrawerRef = ref>(); -const shopOptions = ref<{ label: string; value: number }[]>([]); +/** 左侧选中的拼多多渠道店铺 ID */ +const selectedShopId = ref(undefined); const shopNameById = ref>({}); const searchForm = ref({ @@ -39,35 +39,34 @@ const searchForm = ref({ const gridReloadRef = ref void)>(null); -async function loadShops() { +async function loadShopNames() { try { const data = await getPddShopPageApi({ page: 1, pageSize: 500, filters: {}, }); - const list = data.records ?? []; - shopOptions.value = list.map((s: PddShopVO.Info) => ({ - label: s.mallName || `店铺#${s.id}`, - value: s.id, - })); const map: Record = {}; - for (const s of list) { + for (const s of data.records ?? []) { map[s.id] = s.mallName || `店铺#${s.id}`; } shopNameById.value = map; - - await gridApi.formApi?.updateSchema([ - { - fieldName: 'shopId', - componentProps: { options: shopOptions.value }, - }, - ]); } catch { message.error('获取渠道店铺失败'); } } +function onShopSelect(shop: PddShopVO.Info | null) { + if (!shop) { + selectedShopId.value = undefined; + searchForm.value.shopId = undefined; + return; + } + selectedShopId.value = shop.id; + searchForm.value.shopId = shop.id; + shopNameById.value[shop.id] = shop.mallName || `店铺#${shop.id}`; +} + const gridOptions: VxeGridProps = { columns: [ { type: 'seq' as const, width: 56, title: '序号' }, @@ -134,7 +133,7 @@ const gridOptions: VxeGridProps = { slots: { default: 'action' }, }, ], - height: 'auto', + height: '100%', border: true, stripe: true, rowConfig: { isHover: true, height: 72 }, @@ -203,22 +202,6 @@ const gridOptions: VxeGridProps = { const formOptions = computed(() => ({ schema: [ - { - component: 'Select', - componentProps: { - placeholder: '全部店铺', - options: shopOptions.value, - allowClear: true, - showSearch: true, - optionFilterProp: 'label', - onChange: (val: number | undefined) => { - searchForm.value.shopId = val; - gridReloadRef.value?.(); - }, - }, - fieldName: 'shopId', - label: '渠道店铺', - }, { component: 'Input', componentProps: { @@ -283,11 +266,15 @@ const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, formOptions: formOptions.value, showSearchForm: true, - tableTitle: '拼多多渠道商品', + tableTitle: '', }); gridReloadRef.value = () => gridApi.reload(); +watch(selectedShopId, () => { + gridApi.reload(); +}); + function openDetail(row: PddGoodsVO.Info) { const shopLabel = row.shopId ? shopNameById.value[row.shopId] @@ -322,13 +309,30 @@ async function handleDelete(row: PddGoodsVO.Info) { } onMounted(async () => { - await loadShops(); + await loadShopNames(); }); - - + + + + 拼多多商品 + + + + { - + + + { /> - + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/company/components/CompanySidebarList.vue b/ecom-dmb-frontend/apps/web-antd/src/views/company/components/CompanySidebarList.vue new file mode 100644 index 00000000..f4930a4b --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/views/company/components/CompanySidebarList.vue @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ companyPagination.current }}/{{ companyTotalPages }} + + + + + + + + + + + + 公司 + + + + + + + + + + + + + + + + + 搜索 + + 重置 + + + + + + + + + + + + + + {{ company.name }} + + + {{ company.status === 1 ? '启用' : '禁用' }} + + + + + + + + + + + 上一页 + + + {{ companyPagination.current }} / {{ companyTotalPages }} + ({{ companyPagination.total }}) + + + 下一页 + + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/company/menu/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/company/menu/index.vue index 274835bb..9737505e 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/company/menu/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/company/menu/index.vue @@ -1,19 +1,13 @@ - - - - 左侧选择公司,右侧勾选并保存该公司可访问的菜单。 - - + + + + 菜单分配 + - - - 取消全选 - - 一键全选 - - - 保存配置 - - - - - - - - - - - 公司 - - - - - - - - - 搜索 - - 重置 - - - - - - - - - - - - {{ company.name }} - - - {{ company.status === 1 ? '启用' : '禁用' }} - - - - - - - - - - 上一页 - - - {{ companyPagination.current }} / {{ companyTotalPages }} - ({{ companyPagination.total }}) - - - 下一页 - - - - - - - - - 菜单分配 - - - - 当前:{{ selectedCompanyLabel }} + + - + {{ currentCompany.status === 1 ? '启用' : '禁用' }} - + 系统菜单 {{ stats.total }} · 已配置 - {{ stats.company }} · 当前选择 + {{ stats.company }} · 当前 {{ stats.selected }} - (有未保存更改) + (未保存) - + 取消全选 + + 一键全选 + + + 保存配置 + + + - - - + + + - - - - - - {{ title }} - - 已禁用 - - - - - - - - - + + + + + + {{ title }} + + 已禁用 + + + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/company/permission/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/company/permission/index.vue index 31d0a8fc..4291b586 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/company/permission/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/company/permission/index.vue @@ -4,17 +4,11 @@ import type { PermissionVO } from '#/api/sys/permission/types'; import { computed, onMounted, ref } from 'vue'; -import { Page } from '@vben/common-ui'; -import { createIconifyIcon } from '@vben/icons'; - import { Button, Card, Empty, - Flex, - Input, message, - Select, Space, Spin, Tag, @@ -25,13 +19,11 @@ import { batchUpdateCompanyPermissionsApi, getCompanyPermissionIdsApi, } from '#/api/company/permission/apis'; -import { getCompanyPageApi } from '#/api/company'; import { getPermissionTreeApi } from '#/api/sys/permission'; +import CompanyColPage from '#/views/company/components/CompanyColPage.vue'; defineOptions({ name: 'CompanyPermissionManagePage' }); -const BuildingIcon = createIconifyIcon('lucide:building-2'); - type PermissionTreeNode = { key: number; title: string; @@ -40,15 +32,7 @@ type PermissionTreeNode = { children?: PermissionTreeNode[]; }; -const companySearchForm = ref({ - name: '', - status: undefined as number | undefined, -}); - -const companyList = ref([]); -const companyLoading = ref(false); -const companyPagination = ref({ current: 1, pageSize: 20, total: 0 }); - +const selectedCompanyId = ref(undefined); const currentCompany = ref(null); const permissionTree = ref([]); @@ -57,13 +41,6 @@ const companyPermissionIds = ref([]); const selectedPermissionIds = ref([]); const expandedKeys = ref([]); -const selectedCompanyLabel = computed(() => { - if (!currentCompany.value) { - return '请先选择公司'; - } - return currentCompany.value.name; -}); - const permissionTreeData = computed(() => mapPermissionToTreeData(permissionTree.value), ); @@ -118,29 +95,10 @@ function collectExpandableKeys(nodes: PermissionVO.PermissionInfoVO[]): number[] return keys; } -async function searchCompanies() { - companyLoading.value = true; - try { - const result = await getCompanyPageApi({ - page: companyPagination.value.current, - pageSize: companyPagination.value.pageSize, - filters: { - name: companySearchForm.value.name || undefined, - status: companySearchForm.value.status, - }, - }); - companyList.value = result.records; - companyPagination.value.total = result.total; - } catch (error: any) { - message.error(error?.message || '获取公司列表失败'); - } finally { - companyLoading.value = false; - } -} - -async function selectCompany(company: CompanyVO.CompanyInfoVO) { +function onCompanySelect(company: CompanyVO.CompanyInfoVO) { currentCompany.value = company; - await loadCompanyPermissions(); + selectedCompanyId.value = company.id; + void loadCompanyPermissions(); } async function loadCompanyPermissions() { @@ -191,31 +149,6 @@ async function handleSave() { } } -function resetCompanySearch() { - companySearchForm.value = { name: '', status: undefined }; - companyPagination.value.current = 1; - searchCompanies(); -} - -function handleCompanyPageChange(page: number, pageSize: number) { - companyPagination.value.current = page; - companyPagination.value.pageSize = pageSize; - searchCompanies(); -} - -const companyTotalPages = computed(() => { - const { total, pageSize } = companyPagination.value; - return Math.max(1, Math.ceil(total / pageSize) || 1); -}); - -function goCompanyPage(page: number) { - const next = Math.min(companyTotalPages.value, Math.max(1, page)); - if (next === companyPagination.value.current) { - return; - } - handleCompanyPageChange(next, companyPagination.value.pageSize); -} - function countLeafPermissions(nodes: PermissionVO.PermissionInfoVO[]): number { let count = 0; for (const node of nodes) { @@ -246,237 +179,101 @@ function selectNone() { } onMounted(() => { - searchCompanies(); - loadPermissionTree(); + void loadPermissionTree(); }); - - - - 左侧选择公司,右侧勾选并保存该公司可分配的权限。 - - + + + + 权限分配 + - - - 取消全选 - - 一键全选 - - - 保存配置 - - - - - - - - - - - 公司 - - - - - - - - - 搜索 - - 重置 - - - - - - - - - - - - {{ company.name }} - - - {{ company.status === 1 ? '启用' : '禁用' }} - - - - - - - - - - 上一页 - - - {{ companyPagination.current }} / {{ companyTotalPages }} - ({{ companyPagination.total }}) - - - 下一页 - - - - - - - - - 权限分配 - - - - 当前:{{ selectedCompanyLabel }} + + - + {{ currentCompany.status === 1 ? '启用' : '禁用' }} - - 全部叶子权限 {{ stats.total }} · 已配置 - {{ stats.company }} · 当前选择 + + 叶子权限 {{ stats.total }} · 已配置 + {{ stats.company }} · 当前 {{ stats.selected }} - (有未保存更改) + (未保存) - + 取消全选 + + 一键全选 + + + 保存配置 + + + - - - + + + - - - - - - {{ title }} - - {{ code }} - - - 模块 - - - - - - - - - - + + + + + + {{ title }} + + {{ code }} + + + 模块 + + + + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ec/ad-fee/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ec/ad-fee/index.vue index 0d343f0b..cd6e782c 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ec/ad-fee/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ec/ad-fee/index.vue @@ -1,32 +1,25 @@ - - - - 左侧选择店铺筛选右侧推广记录;未选店铺时展示全部记录。可在店铺行快捷新增该店铺广告费。 - - + + + + 推广记录 + - - - - - 新增广告费 - - - + + + refreshTable()" + /> + — + refreshTable()" + /> + + + 新增广告费 + + + - - - - - - 推广记录 - - - - refreshTable()" - /> - — - refreshTable()" - /> - - + + + + {{ formatAmount(row.feeAmount) }} + + - - 当前:{{ selectedShopLabel }} - - - - - - - 使用上方日期筛选;表格在区域内滚动 - - - - - - {{ formatAmount(row.feeAmount) }} - - - - - - {{ row.productName || '—' }} - - {{ row.productCode }} - + + + {{ row.productName || '—' }} + + {{ row.productCode }} - + + - - - 编辑 - - 删除 - - - - - - - + + + 编辑 + + 删除 + + + + + + `¥${amount.toFixed(2)}`; @success="handleFormSuccess" @cancel="handleFormCancel" /> - + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ec/brush-order/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ec/brush-order/index.vue index 92bef178..2b9ecc5e 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ec/brush-order/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ec/brush-order/index.vue @@ -2,18 +2,17 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; import type { BrushOrderDTO, BrushOrderVO } from '#/api/ec/brush-order'; import type { ProductDTO, ProductVO } from '#/api/ec/product/types'; +import type { ShopVO } from '#/api/ec/shop/types'; import type { PageQueryDTO } from '#/types/common'; -import { computed, ref, watch } from 'vue'; +import { ref, watch } from 'vue'; -import { Page } from '@vben/common-ui'; import { createIconifyIcon } from '@vben/icons'; import { Button, Card, DatePicker, - Flex, InputNumber, message, Popconfirm, @@ -27,7 +26,7 @@ import { getBrushOrderPageApi, } from '#/api/ec/brush-order'; import { getProductPageApi } from '#/api/ec/product'; -import ShopSidebarList from '#/views/ec/components/ShopSidebarList.vue'; +import EcShopColPage from '#/views/ec/components/EcShopColPage.vue'; import BrushOrderFormModal from './components/BrushOrderFormModal.vue'; @@ -39,7 +38,6 @@ const loading = ref(false); /** 未选店铺:undefined 表示全部 */ const selectedShopId = ref(undefined); -const selectedShopName = ref(undefined); const formModalVisible = ref(false); const currentBrushOrderData = ref(null); @@ -114,21 +112,8 @@ function handleProductPopupScroll(e: Event) { } } -const selectedShopLabel = computed(() => { - if (selectedShopId.value == null) { - return '全部店铺'; - } - return selectedShopName.value || `店铺 #${selectedShopId.value}`; -}); - -function onShopSelect(shop: { id: number; name: string } | null) { - if (!shop) { - selectedShopId.value = undefined; - selectedShopName.value = undefined; - return; - } - selectedShopId.value = shop.id; - selectedShopName.value = shop.name; +function onShopSelect(shop: ShopVO.Info | null) { + selectedShopId.value = shop?.id; } function handleAddForShop(shopId: number) { @@ -254,7 +239,7 @@ function refreshTable() { const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, showSearchForm: false, - tableTitle: '刷单记录', + tableTitle: '', }); watch(selectedShopId, () => { @@ -301,136 +286,118 @@ const formatAmount = (amount: number) => `¥${amount.toFixed(2)}`; - - - - 左侧选择店铺筛选右侧记录;未选店铺时展示全部。可在店铺行快捷新增该店铺刷单记录。 - - + + + + 刷单记录 + - - + - + 新增刷单记录 - - + - - - - - - 刷单记录 - - - - - - 商品 - { - if (!productLoaded) void fetchProducts(1, false); - } - " - @change="() => refreshTable()" - /> - - - 金额 ≥ - - - - 金额 ≤ - - - - 刷单时间起 - refreshTable()" - /> - - - 刷单时间止 - refreshTable()" - /> - - - 查询 - + + + + 商品 + { + if (!productLoaded) void fetchProducts(1, false); + } + " + @change="() => refreshTable()" + /> - - 当前:{{ selectedShopLabel }} + + 金额 ≥ + + + 金额 ≤ + + + + 刷单时间起 + refreshTable()" + /> + + + 刷单时间止 + refreshTable()" + /> + + + 查询 + + - - - - - 修改筛选后点击「查询」或失焦/回车刷新;左侧切换店铺立即刷新 - - + + @@ -465,7 +432,6 @@ const formatAmount = (amount: number) => `¥${amount.toFixed(2)}`; - `¥${amount.toFixed(2)}`; @success="handleFormSuccess" @cancel="handleFormCancel" /> - + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/monthly-target/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/monthly-target/index.vue index df19806e..bc8aa1f1 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/monthly-target/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ec/shop/monthly-target/index.vue @@ -4,18 +4,17 @@ import type { ShopMonthlyTargetDTO, ShopMonthlyTargetVO, } from '#/api/ec/shop/monthly-target'; +import type { ShopVO } from '#/api/ec/shop/types'; import type { PageQueryDTO } from '#/types/common'; -import { computed, ref, watch } from 'vue'; +import { ref, watch } from 'vue'; -import { Page } from '@vben/common-ui'; import { createIconifyIcon } from '@vben/icons'; import { Button, Card, DatePicker, - Flex, message, Popconfirm, Space, @@ -26,7 +25,7 @@ import { deleteShopMonthlyTargetApi, getShopMonthlyTargetPageApi, } from '#/api/ec/shop/monthly-target'; -import ShopSidebarList from '#/views/ec/components/ShopSidebarList.vue'; +import EcShopColPage from '#/views/ec/components/EcShopColPage.vue'; import ShopMonthlyTargetFormModal from './components/ShopMonthlyTargetFormModal.vue'; @@ -35,10 +34,7 @@ defineOptions({ name: 'ShopMonthlyTargetManagement' }); const PlusIcon = createIconifyIcon('lucide:plus'); const loading = ref(false); - -/** 未选择具体店铺:undefined 表示全部店铺 */ const selectedShopId = ref(undefined); -const selectedShopName = ref(undefined); const formModalVisible = ref(false); const currentShopMonthlyTargetData = ref(null); @@ -49,21 +45,8 @@ const searchForm = ref({ endTargetMonth: undefined as string | undefined, }); -const selectedShopLabel = computed(() => { - if (selectedShopId.value == null) { - return '全部店铺'; - } - return selectedShopName.value || `店铺 #${selectedShopId.value}`; -}); - -function onShopSelect(shop: { id: number; name: string } | null) { - if (!shop) { - selectedShopId.value = undefined; - selectedShopName.value = undefined; - return; - } - selectedShopId.value = shop.id; - selectedShopName.value = shop.name; +function onShopSelect(shop: ShopVO.Info | null) { + selectedShopId.value = shop?.id; } function handleAddForShop(shopId: number) { @@ -74,43 +57,27 @@ function handleAddForShop(shopId: number) { const gridOptions: VxeGridProps = { columns: [ - { - type: 'seq' as const, - minWidth: 56, - title: '序号', - }, + { type: 'seq' as const, minWidth: 56, title: '序号' }, { field: 'shopName', title: '店铺名称', minWidth: 120, showOverflow: 'tooltip' as const, }, - { - field: 'targetMonth', - title: '目标月份', - minWidth: 110, - }, + { field: 'targetMonth', title: '目标月份', minWidth: 110 }, { title: '目标销售额', minWidth: 120, slots: { default: 'targetAmount' }, }, - { - field: 'targetOrderCount', - title: '目标订单数', - minWidth: 100, - }, + { field: 'targetOrderCount', title: '目标订单数', minWidth: 100 }, { field: 'remark', title: '备注', minWidth: 140, showOverflow: 'tooltip' as const, }, - { - field: 'createTime', - title: '创建时间', - minWidth: 160, - }, + { field: 'createTime', title: '创建时间', minWidth: 160 }, { title: '操作', minWidth: 140, @@ -124,11 +91,7 @@ const gridOptions: VxeGridProps = { rowConfig: { isHover: true }, showOverflow: true, size: 'small', - toolbarConfig: { - custom: true, - refresh: true, - zoom: true, - }, + toolbarConfig: { custom: true, refresh: true, zoom: true }, data: [], pagerConfig: { enabled: true, @@ -187,7 +150,7 @@ function refreshTable() { const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, showSearchForm: false, - tableTitle: '月销量目标', + tableTitle: '', }); watch(selectedShopId, () => { @@ -198,17 +161,17 @@ function resetModalPreset() { presetShopIdForModal.value = null; } -const handleAdd = () => { +function handleAdd() { currentShopMonthlyTargetData.value = null; resetModalPreset(); formModalVisible.value = true; -}; +} -const handleEdit = (record: ShopMonthlyTargetVO.Info) => { +function handleEdit(record: ShopMonthlyTargetVO.Info) { resetModalPreset(); currentShopMonthlyTargetData.value = record; formModalVisible.value = true; -}; +} async function handleDelete(id: number) { try { @@ -220,115 +183,92 @@ async function handleDelete(id: number) { } } -const handleFormSuccess = () => { +function handleFormSuccess() { resetModalPreset(); refreshTable(); -}; +} -const handleFormCancel = () => { +function handleFormCancel() { resetModalPreset(); formModalVisible.value = false; -}; +} const formatAmount = (amount: number) => `¥${amount.toFixed(2)}`; - - - - 左侧选择店铺筛选右侧月销量目标记录;未选店铺时展示全部记录。可在店铺行快捷新增该店铺月销量目标。 - - + + + + 月销量目标 + - - - - - 新增月销量目标 - - - + + + refreshTable()" + /> + — + refreshTable()" + /> + + + 新增月销量目标 + + + - - - - - - 月销量目标 - - - - refreshTable()" - /> - — - refreshTable()" - /> - - + + + + {{ formatAmount(row.targetAmount) }} + + - - 当前:{{ selectedShopLabel }} - - - - - - - 使用上方月份筛选;表格在区域内滚动 - - - - - - {{ formatAmount(row.targetAmount) }} - - - - - - 编辑 - - 删除 - - - - - - - + + + 编辑 + + 删除 + + + + + + `¥${amount.toFixed(2)}`; @success="handleFormSuccess" @cancel="handleFormCancel" /> - + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/org/company/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/org/company/index.vue index 9a3e6e3d..0543d11c 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/org/company/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/org/company/index.vue @@ -17,6 +17,7 @@ import { } from '#/api/company'; import CompanyMenuDrawer from '#/components/CompanyMenuDrawer.vue'; import CompanyPermissionDrawer from '#/components/CompanyPermissionDrawer.vue'; +import CompanyLogoAvatar from '#/views/company/components/CompanyLogoAvatar.vue'; import CompanyFormModal from './components/CompanyFormModal.vue'; @@ -53,6 +54,12 @@ const gridOptions: VxeGridProps = { minWidth: 'auto', title: '序号', }, + { + title: 'Logo', + width: 72, + align: 'center' as const, + slots: { default: 'logo' }, + }, { field: 'name', title: '公司名称', @@ -81,11 +88,6 @@ const gridOptions: VxeGridProps = { minWidth: 200, showOverflow: 'tooltip' as const, }, - { - title: 'Logo', - minWidth: 100, - slots: { default: 'logo' }, - }, { title: '状态', minWidth: 100, @@ -341,20 +343,10 @@ gridReloadRef.value = () => gridApi.reload(); - - - + + + - 暂无Logo