From df655015b1228a1d312fbc1a7fdd73293622eda3 Mon Sep 17 00:00:00 2001 From: lighua <877312980@qq.com> Date: Fri, 8 Aug 2025 15:31:31 +0800 Subject: [PATCH 001/544] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8B=E8=BD=BD=E5=99=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../effects/request/src/request-client/modules/downloader.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/effects/request/src/request-client/modules/downloader.ts b/packages/effects/request/src/request-client/modules/downloader.ts index 77e72c6c5..f5bd101a4 100644 --- a/packages/effects/request/src/request-client/modules/downloader.ts +++ b/packages/effects/request/src/request-client/modules/downloader.ts @@ -28,11 +28,12 @@ class FileDownloader { ): Promise { const finalConfig: DownloadRequestConfig = { responseReturn: 'body', + method: 'GET', ...config, responseType: 'blob', }; - const response = await this.client.get(url, finalConfig); + const response = await this.client.request(url, finalConfig); return response; } From fddfc6d4940aa0a7332b5ff3a33a3fcabf5092eb Mon Sep 17 00:00:00 2001 From: lighua <877312980@qq.com> Date: Thu, 21 Aug 2025 11:13:02 +0800 Subject: [PATCH 002/544] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=20HTTP=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request-client/modules/downloader.test.ts | 71 +++++++++++++++++++ .../src/request-client/modules/downloader.ts | 22 +++++- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/packages/effects/request/src/request-client/modules/downloader.test.ts b/packages/effects/request/src/request-client/modules/downloader.test.ts index d44dcbb7b..27e8a30cb 100644 --- a/packages/effects/request/src/request-client/modules/downloader.test.ts +++ b/packages/effects/request/src/request-client/modules/downloader.test.ts @@ -30,6 +30,7 @@ describe('fileDownloader', () => { expect(result).toBeInstanceOf(Blob); expect(result).toEqual(mockBlob); expect(mockAxiosInstance.get).toHaveBeenCalledWith(url, { + method: 'GET', responseType: 'blob', responseReturn: 'body', }); @@ -51,6 +52,7 @@ describe('fileDownloader', () => { expect(result).toEqual(mockBlob); expect(mockAxiosInstance.get).toHaveBeenCalledWith(url, { ...customConfig, + method: 'GET', responseType: 'blob', responseReturn: 'body', }); @@ -84,3 +86,72 @@ describe('fileDownloader', () => { ); }); }); + +describe('fileDownloader use other method', () => { + let fileDownloader: FileDownloader; + + it('should call request using get', async () => { + const url = 'https://example.com/file'; + const mockBlob = new Blob(['file content'], { type: 'text/plain' }); + const mockResponse: Blob = mockBlob; + + const mockAxiosInstance = { + request: vi.fn(), + } as any; + + fileDownloader = new FileDownloader(mockAxiosInstance); + + mockAxiosInstance.request.mockResolvedValueOnce(mockResponse); + + const result = await fileDownloader.download(url); + + expect(result).toBeInstanceOf(Blob); + expect(result).toEqual(mockBlob); + expect(mockAxiosInstance.request).toHaveBeenCalledWith(url, { + method: 'GET', + responseType: 'blob', + responseReturn: 'body', + }); + }); + + it('should call post', async () => { + const url = 'https://example.com/file'; + + const mockAxiosInstance = { + post: vi.fn(), + } as any; + + fileDownloader = new FileDownloader(mockAxiosInstance); + + const customConfig: AxiosRequestConfig = { + method: 'POST', + data: { name: 'aa' }, + }; + + await fileDownloader.download(url, customConfig); + + expect(mockAxiosInstance.post).toHaveBeenCalledWith( + url, + { name: 'aa' }, + { + method: 'POST', + responseType: 'blob', + responseReturn: 'body', + }, + ); + }); + + it('should handle errors gracefully', async () => { + const url = 'https://example.com/file'; + const mockAxiosInstance = { + post: vi.fn(), + } as any; + + fileDownloader = new FileDownloader(mockAxiosInstance); + await expect(() => + fileDownloader.download(url, { method: 'postt' }), + ).rejects.toThrow( + 'RequestClient does not support method "POSTT". Please ensure the method is properly implemented in your RequestClient instance.', + ); + }); +}); diff --git a/packages/effects/request/src/request-client/modules/downloader.ts b/packages/effects/request/src/request-client/modules/downloader.ts index f5bd101a4..6c3000589 100644 --- a/packages/effects/request/src/request-client/modules/downloader.ts +++ b/packages/effects/request/src/request-client/modules/downloader.ts @@ -33,9 +33,27 @@ class FileDownloader { responseType: 'blob', }; - const response = await this.client.request(url, finalConfig); + // Prefer a generic request if available; otherwise, dispatch to method-specific calls. + const method = (finalConfig.method || 'GET').toUpperCase(); + const clientAny = this.client as any; - return response; + if (typeof clientAny.request === 'function') { + return await clientAny.request(url, finalConfig); + } + const lower = method.toLowerCase(); + + if (typeof clientAny[lower] === 'function') { + if (['POST', 'PUT'].includes(method)) { + const { data, ...rest } = finalConfig as Record; + return await clientAny[lower](url, data, rest); + } + + return await clientAny[lower](url, finalConfig); + } + + throw new Error( + `RequestClient does not support method "${method}". Please ensure the method is properly implemented in your RequestClient instance.`, + ); } } From 2b0079580b38782354174f909dacfd9a6852398d Mon Sep 17 00:00:00 2001 From: zoumingjun <846027729@qq.com> Date: Sat, 18 Oct 2025 16:32:21 +0800 Subject: [PATCH 003/544] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dmock-data.ts?= =?UTF-8?q?=E7=88=B6id=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/backend-mock/utils/mock-data.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/backend-mock/utils/mock-data.ts b/apps/backend-mock/utils/mock-data.ts index 192f30a00..689de2a16 100644 --- a/apps/backend-mock/utils/mock-data.ts +++ b/apps/backend-mock/utils/mock-data.ts @@ -276,7 +276,7 @@ export const MOCK_MENU_LIST = [ children: [ { id: 20_401, - pid: 201, + pid: 202, name: 'SystemDeptCreate', status: 1, type: 'button', @@ -285,7 +285,7 @@ export const MOCK_MENU_LIST = [ }, { id: 20_402, - pid: 201, + pid: 202, name: 'SystemDeptEdit', status: 1, type: 'button', @@ -294,7 +294,7 @@ export const MOCK_MENU_LIST = [ }, { id: 20_403, - pid: 201, + pid: 202, name: 'SystemDeptDelete', status: 1, type: 'button', From 32051e9ca0aa4577ea79b4d89d011b8dd7498621 Mon Sep 17 00:00:00 2001 From: zoumingjun <846027729@qq.com> Date: Sat, 18 Oct 2025 20:52:24 +0800 Subject: [PATCH 004/544] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=92=8C=E5=8F=B3=E4=BE=A7=E8=AE=A4=E8=AF=81=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@core/base/design/src/css/ui.css | 10 +++++----- .../layouts/src/authentication/authentication.vue | 15 ++++++++++++--- .../effects/layouts/src/authentication/form.vue | 7 ++++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/packages/@core/base/design/src/css/ui.css b/packages/@core/base/design/src/css/ui.css index 0cf842a07..a1bf02423 100644 --- a/packages/@core/base/design/src/css/ui.css +++ b/packages/@core/base/design/src/css/ui.css @@ -1,5 +1,5 @@ .side-content { - animation-duration: 0.2s; + animation-duration: 0.3s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } @@ -37,7 +37,7 @@ @keyframes slide-down { from { opacity: 0; - transform: translateY(-10px); + transform: translateY(50px); } to { @@ -49,7 +49,7 @@ @keyframes slide-left { from { opacity: 0; - transform: translateX(-10px); + transform: translateX(-50px); } to { @@ -61,7 +61,7 @@ @keyframes slide-right { from { opacity: 0; - transform: translateX(-10px); + transform: translateX(50px); } to { @@ -73,7 +73,7 @@ @keyframes slide-up { from { opacity: 0; - transform: translateY(10px); + transform: translateY(-50px); } to { diff --git a/packages/effects/layouts/src/authentication/authentication.vue b/packages/effects/layouts/src/authentication/authentication.vue index e66954278..72e31bd3a 100644 --- a/packages/effects/layouts/src/authentication/authentication.vue +++ b/packages/effects/layouts/src/authentication/authentication.vue @@ -50,7 +50,7 @@ const { authPanelCenter, authPanelLeft, authPanelRight, isDark } = + Date: Tue, 28 Oct 2025 20:31:12 +0800 Subject: [PATCH 034/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20hot-zone=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8870%=EF=BC=89=E4=BD=BF=E7=94=A8=20Modal=20?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20el-dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/hot-zone-edit-dialog/index.vue | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue index ee2b85a08..175f36866 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue @@ -6,9 +6,10 @@ import type { AppLink } from '#/views/mall/promotion/components/app-link-input/d import { ref } from 'vue'; +import { useVbenModal } from '@vben/common-ui'; import { IconifyIcon } from '@vben/icons'; -import { ElButton, ElDialog, ElImage } from 'element-plus'; +import { ElButton, ElImage } from 'element-plus'; import { AppLinkSelectDialog } from '#/views/mall/promotion/components'; @@ -40,14 +41,19 @@ const emit = defineEmits(['update:modelValue']); const formData = ref([]); -const dialogVisible = ref(false); // 弹窗的是否显示 +const [Modal, modalApi] = useVbenModal({ + onClosed() { + const list = zoomOut(formData.value); + emit('update:modelValue', list); + }, +}); /** 打开弹窗 */ -const open = () => { +function open() { // 放大 formData.value = zoomIn(props.modelValue); - dialogVisible.value = true; -}; + modalApi.open(); +} defineExpose({ open }); // 提供 open 方法,用于打开弹窗 @@ -156,16 +162,9 @@ const setHeight = (item: HotZoneItemProperty, height: number) => { } }; -/** 处理对话框关闭 */ +/** 处理对话框确定 */ const handleSubmit = () => { - dialogVisible.value = false; -}; - -/** 处理对话框关闭 */ -const handleClose = () => { - // 缩小 - const list = zoomOut(formData.value); - emit('update:modelValue', list); + modalApi.close(); }; const activeHotZone = ref(); @@ -186,12 +185,7 @@ const handleAppLinkChange = (appLink: AppLink) => { - + Date: Tue, 28 Oct 2025 21:03:18 +0800 Subject: [PATCH 035/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20hot-zone=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8870%=EF=BC=89=E4=BD=BF=E7=94=A8=20Modal=20?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20el-dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app-link-input/select-dialog.vue | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue index 7962dc165..818f8764b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue +++ b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue @@ -5,9 +5,10 @@ import type { AppLink } from './data'; import { nextTick, ref } from 'vue'; +import { useVbenModal } from '@vben/common-ui'; import { getUrlNumberValue } from '@vben/utils'; -import { ElScrollbar } from 'element-plus'; +import { ElButton, ElScrollbar, ElTooltip } from 'element-plus'; import ProductCategorySelect from '#/views/mall/product/category/components/product-category-select.vue'; @@ -39,12 +40,20 @@ const detailSelectDialog = ref<{ type: undefined, }); // 详情选择对话框 -const dialogVisible = ref(false); +const [Modal, modalApi] = useVbenModal({ + onConfirm() { + emit('change', activeAppLink.value.path); + emit('appLinkChange', activeAppLink.value); + modalApi.close(); + }, +}); + +defineExpose({ open }); /** 打开弹窗 */ -function open(link: string) { +async function open(link: string) { activeAppLink.value.path = link; - dialogVisible.value = true; + modalApi.open(); // 滚动到当前的链接 const group = APP_LINK_GROUP_LIST.find((group) => group.links.some((linkItem) => { @@ -56,14 +65,12 @@ function open(link: string) { }), ); if (group) { - // TODO @AI:await 方式; // 使用 nextTick 的原因:可能 Dom 还没生成,导致滚动失败 - nextTick(() => handleGroupSelected(group.name)); + await nextTick(); + handleGroupSelected(group.name); } } -defineExpose({ open }); - /** 处理 APP 链接选中 */ function handleAppLinkSelected(appLink: AppLink) { if (!isSameLink(appLink.path, activeAppLink.value.path)) { @@ -87,12 +94,6 @@ function handleAppLinkSelected(appLink: AppLink) { } } -function handleSubmit() { - dialogVisible.value = false; - emit('change', activeAppLink.value.path); - emit('appLinkChange', activeAppLink.value); -} - /** * 处理右侧链接列表滚动 * @@ -156,15 +157,17 @@ function handleProductCategorySelected(id: number) { } - From 05dc2c7eb2ddf6015fa448700b526d475f3f92ec Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 28 Oct 2025 22:56:01 +0800 Subject: [PATCH 036/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20hot-zone=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8880%=EF=BC=89=E8=BF=9B=E4=B8=80=E6=AD=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20Modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/app-link-input/select-dialog.vue | 8 +++----- .../components/hot-zone-edit-dialog/index.vue | 15 ++++----------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue index 818f8764b..445060aee 100644 --- a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue +++ b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue @@ -48,8 +48,6 @@ const [Modal, modalApi] = useVbenModal({ }, }); -defineExpose({ open }); - /** 打开弹窗 */ async function open(link: string) { activeAppLink.value.path = link; @@ -71,6 +69,8 @@ async function open(link: string) { } } +defineExpose({ open }); + /** 处理 APP 链接选中 */ function handleAppLinkSelected(appLink: AppLink) { if (!isSameLink(appLink.path, activeAppLink.value.path)) { @@ -139,7 +139,7 @@ function scrollToGroupBtn(group: string) { /** 是否为相同的链接(不比较参数,只比较链接) */ function isSameLink(link1: string, link2: string) { - return link2 ? link1.split('?')[0] === link2.split('?')[0] : false; + return link2 ? link1?.split('?')[0] === link2.split('?')[0] : false; } /** 处理详情选择 */ @@ -166,7 +166,6 @@ function handleProductCategorySelected(id: number) { view-class="flex flex-col" class="border-r border-gray-200 pr-2" > - - ([]); const [Modal, modalApi] = useVbenModal({ - onClosed() { + showCancelButton: false, + onConfirm() { const list = zoomOut(formData.value); emit('update:modelValue', list); + modalApi.close(); }, }); @@ -162,11 +164,6 @@ const setHeight = (item: HotZoneItemProperty, height: number) => { } }; -/** 处理对话框确定 */ -const handleSubmit = () => { - modalApi.close(); -}; - const activeHotZone = ref(); const appLinkDialogRef = ref(); @@ -224,15 +221,11 @@ const handleAppLinkChange = (appLink: AppLink) => { > - - - From fa383159ea89af03414dfc77befc853caf35ac1b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 29 Oct 2025 09:52:01 +0800 Subject: [PATCH 039/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20magic-cube=20=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/magic-cube/config.ts | 41 +++++++------------ .../components/mobile/magic-cube/index.vue | 8 ++-- .../components/mobile/magic-cube/property.vue | 10 ++--- 3 files changed, 23 insertions(+), 36 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/config.ts index ef03fc9a6..13b1c4721 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/config.ts @@ -2,39 +2,26 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 广告魔方属性 */ export interface MagicCubeProperty { - // 上圆角 - borderRadiusTop: number; - // 下圆角 - borderRadiusBottom: number; - // 间隔 - space: number; - // 导航菜单列表 - list: MagicCubeItemProperty[]; - // 组件样式 - style: ComponentStyle; + borderRadiusTop: number; // 上圆角 + borderRadiusBottom: number; // 下圆角 + space: number; // 间隔 + list: MagicCubeItemProperty[]; // 导航菜单列表 + style: ComponentStyle; // 组件样式 } /** 广告魔方项目属性 */ export interface MagicCubeItemProperty { - // 图标链接 - imgUrl: string; - // 链接 - url: string; - // 宽 - width: number; - // 高 - height: number; - // 上 - top: number; - // 左 - left: number; - // 右 - right: number; - // 下 - bottom: number; + imgUrl: string; // 图标链接 + url: string; // 链接 + width: number; // 宽 + height: number; // 高 + top: number; // 上 + left: number; // 左 + right: number; // 右 + bottom: number; // 下 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'MagicCube', name: '广告魔方', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/index.vue index 5a3aa7e57..1965bde82 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/index.vue @@ -9,9 +9,11 @@ import { ElImage } from 'element-plus'; /** 广告魔方 */ defineOptions({ name: 'MagicCube' }); + const props = defineProps<{ property: MagicCubeProperty }>(); -// 一个方块的大小 -const CUBE_SIZE = 93.75; + +const CUBE_SIZE = 93.75; // 一个方块的大小 + /** * 计算方块的行数 * 行数用于计算魔方的总体高度,存在以下情况: @@ -80,5 +82,3 @@ const rowCount = computed(() => { - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/property.vue index 1f23095c6..ddccd8d0f 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/magic-cube/property.vue @@ -18,11 +18,14 @@ import ComponentContainerProperty from '../../component-container-property.vue'; defineOptions({ name: 'MagicCubeProperty' }); const props = defineProps<{ modelValue: MagicCubeProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); -// 选中的热区 -const selectedHotAreaIndex = ref(-1); +const selectedHotAreaIndex = ref(-1); // 选中的热区 + +/** 处理热区被选中事件 */ const handleHotAreaSelected = (_: any, index: number) => { selectedHotAreaIndex.value = index; }; @@ -30,7 +33,6 @@ const handleHotAreaSelected = (_: any, index: number) => { - - From cb9fc7ad3ff80b704f9aeaa51c77bc1dfe3e6a3b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 29 Oct 2025 13:56:10 +0800 Subject: [PATCH 040/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20magic-cube-editor=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/magic-cube-editor/index.vue | 58 +++++++++---------- .../components/magic-cube-editor/util.ts | 38 ++++++------ 2 files changed, 43 insertions(+), 53 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue index d260ded9c..0e30219f3 100644 --- a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue @@ -7,16 +7,16 @@ import { IconifyIcon } from '@vben/icons'; import { createRect, isContains, isOverlap } from './util'; -// TODO @AI: 改成标准注释 -// 魔方编辑器 -// 有两部分组成: -// 1. 魔方矩阵:位于底层,由方块组件的二维表格,用于创建热区 -// 操作方法: -// 1.1 点击其中一个方块就会进入热区选择模式 -// 1.2 再次点击另外一个方块时,结束热区选择模式 -// 1.3 在两个方块中间的区域创建热区 -// 如果两次点击的都是同一方块,就只创建一个格子的热区 -// 2. 热区:位于顶层,采用绝对定位,覆盖在魔方矩阵上面。 +/** + * 魔方编辑器,有两部分组成: + * 1. 魔方矩阵:位于底层,由方块组件的二维表格,用于创建热区 + * 操作方法: + * 1.1 点击其中一个方块就会进入热区选择模式 + * 1.2 再次点击另外一个方块时,结束热区选择模式 + * 1.3 在两个方块中间的区域创建热区 + * 如果两次点击的都是同一方块,就只创建一个格子的热区 + * 2. 热区:位于顶层,采用绝对定位,覆盖在魔方矩阵上面。 + */ defineOptions({ name: 'MagicCubeEditor' }); /** 定义属性 */ @@ -29,12 +29,10 @@ const props = defineProps({ type: Number, default: 4, }, // 行数,默认 4 行 - cols: { type: Number, default: 4, }, // 列数,默认 4 列 - cubeSize: { type: Number, default: 75, @@ -70,6 +68,7 @@ watch( ); const hotAreas = ref([]); // 热区列表 + /** 初始化热区 */ watch( () => props.modelValue, @@ -86,20 +85,20 @@ const isHotAreaSelectMode = () => !!hotAreaBeginCube.value; // 是否开启了 * @param currentRow 当前行号 * @param currentCol 当前列号 */ -const handleCubeClick = (currentRow: number, currentCol: number) => { +function handleCubeClick(currentRow: number, currentCol: number) { const currentCube = cubes.value[currentRow]?.[currentCol]; if (!currentCube) { return; } - // 情况1:进入热区选择模式 + // 情况 1:进入热区选择模式 if (!isHotAreaSelectMode()) { hotAreaBeginCube.value = currentCube; hotAreaBeginCube.value!.active = true; return; } - // 情况2:结束热区选择模式 + // 情况 2:结束热区选择模式 hotAreas.value.push(createRect(hotAreaBeginCube.value!, currentCube)); // 结束热区选择模式 exitHotAreaSelectMode(); @@ -111,7 +110,7 @@ const handleCubeClick = (currentRow: number, currentCol: number) => { } // 发送热区变动通知 emitUpdateModelValue(); -}; +} /** * 处理鼠标经过方块 @@ -119,7 +118,7 @@ const handleCubeClick = (currentRow: number, currentCol: number) => { * @param currentRow 当前行号 * @param currentCol 当前列号 */ -const handleCellHover = (currentRow: number, currentCol: number) => { +function handleCellHover(currentRow: number, currentCol: number) { // 当前没有进入热区选择模式 if (!isHotAreaSelectMode()) { return; @@ -138,7 +137,6 @@ const handleCellHover = (currentRow: number, currentCol: number) => { if (isOverlap(hotArea, currentSelectedArea)) { // 结束热区选择模式 exitHotAreaSelectMode(); - return; } } @@ -147,13 +145,9 @@ const handleCellHover = (currentRow: number, currentCol: number) => { eachCube((_, __, cube) => { cube.active = isContains(currentSelectedArea, cube); }); -}; +} -/** - * 处理热区删除 - * - * @param index 热区索引 - */ +/** 处理热区删除 */ function handleDeleteHotArea(index: number) { hotAreas.value.splice(index, 1); // 结束热区选择模式 @@ -165,14 +159,14 @@ function handleDeleteHotArea(index: number) { const emitUpdateModelValue = () => emit('update:modelValue', hotAreas.value); // 发送热区变动通知 const selectedHotAreaIndex = ref(0); // 热区选中 -const handleHotAreaSelected = (hotArea: Rect, index: number) => { + +/** 处理热区选中 */ +function handleHotAreaSelected(hotArea: Rect, index: number) { selectedHotAreaIndex.value = index; emit('hotAreaSelected', hotArea, index); -}; +} -/** - * 结束热区选择模式 - */ +/** 结束热区选择模式 */ function exitHotAreaSelectMode() { // 移除方块激活标记 eachCube((_, __, cube) => { @@ -246,9 +240,9 @@ const eachCube = (callback: (x: number, y: number, cube: Cube) => void) => { > - {{ - `${hotArea.width}×${hotArea.height}` - }} + + {{ `${hotArea.width}×${hotArea.height}`}} + diff --git a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/util.ts b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/util.ts index 1ee8fb5a4..152ce0cbe 100644 --- a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/util.ts +++ b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/util.ts @@ -1,52 +1,49 @@ -// 坐标点 +/** 坐标点 */ export interface Point { x: number; y: number; } -// 矩形 +/** 矩形 */ export interface Rect { - // 左上角 X 轴坐标 - left: number; - // 左上角 Y 轴坐标 - top: number; - // 右下角 X 轴坐标 - right: number; - // 右下角 Y 轴坐标 - bottom: number; - // 矩形宽度 - width: number; - // 矩形高度 - height: number; + left: number; // 左上角 X 轴坐标 + top: number; // 左上角 Y 轴坐标 + right: number; // 右下角 X 轴坐标 + bottom: number; // 右下角 Y 轴坐标 + width: number; // 矩形宽度 + height: number; // 矩形高度 } /** * 判断两个矩形是否重叠 + * * @param a 矩形 A * @param b 矩形 B */ -export const isOverlap = (a: Rect, b: Rect): boolean => { +export function isOverlap(a: Rect, b: Rect): boolean { return ( a.left < b.left + b.width && a.left + a.width > b.left && a.top < b.top + b.height && a.height + a.top > b.top ); -}; +} + /** * 检查坐标点是否在矩形内 * @param hotArea 矩形 * @param point 坐标 */ -export const isContains = (hotArea: Rect, point: Point): boolean => { +export function isContains(hotArea: Rect, point: Point): boolean { return ( point.x >= hotArea.left && point.x < hotArea.right && point.y >= hotArea.top && point.y < hotArea.bottom ); -}; +} +// TODO @AI:linter 修复 /** * 在两个坐标点中间,创建一个矩形 * @@ -59,7 +56,7 @@ export const isContains = (hotArea: Rect, point: Point): boolean => { * @param a 坐标点一 * @param b 坐标点二 */ -export const createRect = (a: Point, b: Point): Rect => { +export function createRect(a: Point, b: Point): Rect { // 计算矩形的范围 const [left, left2] = [a.x, b.x].sort(); const [top, top2] = [a.y, b.y].sort(); @@ -67,6 +64,5 @@ export const createRect = (a: Point, b: Point): Rect => { const bottom = top2 + 1; const height = bottom - top; const width = right - left; - return { left, right, top, bottom, height, width }; -}; +} From 4d713db546c832da452dfe8455614de5f43ff49e Mon Sep 17 00:00:00 2001 From: zhongming4762 Date: Wed, 29 Oct 2025 19:47:10 +0800 Subject: [PATCH 041/544] feat: increase support for multiple time zones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 优化实现方法 --- .../timezone.ts => timezone/getTimezone.ts} | 0 .../getTimezoneOptions.ts} | 0 .../api/{user => timezone}/setTimezone.ts | 2 +- apps/backend-mock/utils/mock-data.ts | 4 +- apps/web-antd/src/api/core/index.ts | 1 - apps/web-antd/src/api/core/user-profile.ts | 23 ---- apps/web-antd/src/layouts/basic.vue | 43 +----- apps/web-antd/src/store/index.ts | 1 - apps/web-antd/src/store/user-profile.ts | 58 -------- apps/web-ele/src/api/core/index.ts | 1 - apps/web-ele/src/api/core/user-profile.ts | 23 ---- apps/web-ele/src/layouts/basic.vue | 43 +----- apps/web-ele/src/store/index.ts | 1 - apps/web-ele/src/store/user-profile.ts | 58 -------- apps/web-naive/src/api/core/index.ts | 1 - apps/web-naive/src/api/core/user-profile.ts | 23 ---- apps/web-naive/src/layouts/basic.vue | 44 +----- apps/web-naive/src/store/index.ts | 1 - apps/web-naive/src/store/user-profile.ts | 58 -------- packages/@core/base/typings/src/app.d.ts | 10 ++ packages/@core/base/typings/src/index.ts | 1 - .../@core/base/typings/src/user-profile.d.ts | 9 -- packages/@core/preferences/src/constants.ts | 35 ++++- .../layouts/src/basic/header/header.vue | 4 + .../src/widgets/timezone/timezone-button.vue | 71 +++++----- packages/stores/src/modules/index.ts | 1 + packages/stores/src/modules/timezone.ts | 125 ++++++++++++++++++ playground/src/api/core/index.ts | 1 + playground/src/api/core/timezone.ts | 30 +++++ playground/src/bootstrap.ts | 4 + playground/src/timezone-init.ts | 20 +++ 31 files changed, 273 insertions(+), 423 deletions(-) rename apps/backend-mock/api/{user/timezone.ts => timezone/getTimezone.ts} (100%) rename apps/backend-mock/api/{profile/timezone.ts => timezone/getTimezoneOptions.ts} (100%) rename apps/backend-mock/api/{user => timezone}/setTimezone.ts (93%) delete mode 100644 apps/web-antd/src/api/core/user-profile.ts delete mode 100644 apps/web-antd/src/store/user-profile.ts delete mode 100644 apps/web-ele/src/api/core/user-profile.ts delete mode 100644 apps/web-ele/src/store/user-profile.ts delete mode 100644 apps/web-naive/src/api/core/user-profile.ts delete mode 100644 apps/web-naive/src/store/user-profile.ts delete mode 100644 packages/@core/base/typings/src/user-profile.d.ts create mode 100644 packages/stores/src/modules/timezone.ts create mode 100644 playground/src/api/core/timezone.ts create mode 100644 playground/src/timezone-init.ts diff --git a/apps/backend-mock/api/user/timezone.ts b/apps/backend-mock/api/timezone/getTimezone.ts similarity index 100% rename from apps/backend-mock/api/user/timezone.ts rename to apps/backend-mock/api/timezone/getTimezone.ts diff --git a/apps/backend-mock/api/profile/timezone.ts b/apps/backend-mock/api/timezone/getTimezoneOptions.ts similarity index 100% rename from apps/backend-mock/api/profile/timezone.ts rename to apps/backend-mock/api/timezone/getTimezoneOptions.ts diff --git a/apps/backend-mock/api/user/setTimezone.ts b/apps/backend-mock/api/timezone/setTimezone.ts similarity index 93% rename from apps/backend-mock/api/user/setTimezone.ts rename to apps/backend-mock/api/timezone/setTimezone.ts index 2265e3cb6..9ec00a504 100644 --- a/apps/backend-mock/api/user/setTimezone.ts +++ b/apps/backend-mock/api/timezone/setTimezone.ts @@ -10,5 +10,5 @@ export default eventHandler(async (event) => { } const { timezone } = await readBody(event); setTimezone(timezone); - return useResponseSuccess(); + return useResponseSuccess({}); }); diff --git a/apps/backend-mock/utils/mock-data.ts b/apps/backend-mock/utils/mock-data.ts index 5c5344377..54cfa506e 100644 --- a/apps/backend-mock/utils/mock-data.ts +++ b/apps/backend-mock/utils/mock-data.ts @@ -7,7 +7,7 @@ export interface UserInfo { homePath?: string; } -export interface TimeZoneOption { +export interface TimezoneOption { offset: number; timeZone: string; } @@ -397,7 +397,7 @@ export function getMenuIds(menus: any[]) { /** * 时区选项 */ -export const TIME_ZONE_OPTIONS: TimeZoneOption[] = [ +export const TIME_ZONE_OPTIONS: TimezoneOption[] = [ { offset: -5, timezone: 'America/New_York', diff --git a/apps/web-antd/src/api/core/index.ts b/apps/web-antd/src/api/core/index.ts index e5d52a404..28a5aef47 100644 --- a/apps/web-antd/src/api/core/index.ts +++ b/apps/web-antd/src/api/core/index.ts @@ -1,4 +1,3 @@ export * from './auth'; export * from './menu'; export * from './user'; -export * from './user-profile'; diff --git a/apps/web-antd/src/api/core/user-profile.ts b/apps/web-antd/src/api/core/user-profile.ts deleted file mode 100644 index eefa9ab76..000000000 --- a/apps/web-antd/src/api/core/user-profile.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { TimezoneOption } from '@vben/types'; - -import { requestClient } from '#/api/request'; - -/** - * 获取系统支持的时区列表 - */ -export async function getTimezoneOptionsApi() { - return requestClient.get('/profile/timezone'); -} -/** - * 获取用户时区 - */ -export async function getUserTimezoneApi(): Promise { - return requestClient.get('/user/timezone'); -} -/** - * 设置用户时区 - * @param timezone 时区 - */ -export async function setUserTimezoneApi(timezone: string) { - return requestClient.post('/user/setTimezone', { timezone }); -} diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 742378f98..805b8a73d 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -1,8 +1,7 @@ \ No newline at end of file From 48292b1a9832e4fc662b9836d1656dbd5f16dbc1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 10:07:25 +0800 Subject: [PATCH 065/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20page-config=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/notice-bar/property.vue | 2 +- .../components/mobile/page-config/config.ts | 11 ++++------- .../components/mobile/page-config/property.vue | 12 ++++-------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/notice-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/notice-bar/property.vue index 35a936ec7..5fdb1f06b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/notice-bar/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/notice-bar/property.vue @@ -58,4 +58,4 @@ const rules = { - \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/config.ts index 73032a84a..a00e6458b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/config.ts @@ -2,15 +2,12 @@ import type { DiyComponent } from '../../../util'; /** 页面设置属性 */ export interface PageConfigProperty { - // 页面描述 - description: string; - // 页面背景颜色 - backgroundColor: string; - // 页面背景图片 - backgroundImage: string; + description: string; // 页面描述 + backgroundColor: string; // 页面背景颜色 + backgroundImage: string; // 页面背景图片 } -// 定义页面组件 +/** 定义页面组件 */ export const component = { id: 'PageConfig', name: '页面设置', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/property.vue index 9d904c0e8..27aa37bec 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/page-config/property.vue @@ -7,24 +7,22 @@ import { ElForm, ElFormItem, ElInput } from 'element-plus'; import UploadImg from '#/components/upload/image-upload.vue'; import { ColorInput } from '#/views/mall/promotion/components'; -// 导航栏属性面板 +/** 导航栏属性面板 */ defineOptions({ name: 'PageConfigProperty' }); + const props = defineProps<{ modelValue: PageConfigProperty }>(); const emit = defineEmits(['update:modelValue']); -// 表单校验 -const rules = {}; - const formData = useVModel(props, 'modelValue', emit); - - From 98e30787844378a7b0365c52d0c48e939c6559b6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 10:16:40 +0800 Subject: [PATCH 066/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20popover=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/{Popover => popover}/config.ts | 14 ++++++-------- .../mobile/{Popover => popover}/index.vue | 18 +++++++++--------- .../mobile/{Popover => popover}/property.vue | 6 +++--- 3 files changed, 18 insertions(+), 20 deletions(-) rename apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/{Popover => popover}/config.ts (58%) rename apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/{Popover => popover}/index.vue (81%) rename apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/{Popover => popover}/property.vue (96%) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts similarity index 58% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts index 6f365b735..52bbeacdb 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts @@ -2,19 +2,17 @@ import type { DiyComponent } from '../../../util'; /** 弹窗广告属性 */ export interface PopoverProperty { - list: PopoverItemProperty[]; + list: PopoverItemProperty[]; // 弹窗列表 } +/** 弹窗广告项目属性 */ export interface PopoverItemProperty { - // 图片地址 - imgUrl: string; - // 跳转连接 - url: string; - // 显示类型:仅显示一次、每次启动都会显示 - showType: 'always' | 'once'; + imgUrl: string; // 图片地址 + url: string; // 跳转连接 + showType: 'always' | 'once'; // 显示类型:仅显示一次、每次启动都会显示 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'Popover', name: '弹窗广告', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue similarity index 81% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue index bc724eca9..694f77ed2 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue @@ -9,18 +9,20 @@ import { ElImage } from 'element-plus'; /** 弹窗广告 */ defineOptions({ name: 'Popover' }); -// 定义属性 -defineProps<{ property: PopoverProperty }>(); -// 处理选中 -const activeIndex = ref(0); -const handleActive = (index: number) => { +const props = defineProps<{ property: PopoverProperty }>(); + +const activeIndex = ref(0); // 选中 index + +/** 处理选中 */ +function handleActive(index: number) { activeIndex.value = index; -}; +} + - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue similarity index 96% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue index 7f41d413c..189b6b068 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue @@ -13,11 +13,13 @@ import { import UploadImg from '#/components/upload/image-upload.vue'; import { AppLinkInput, Draggable } from '#/views/mall/promotion/components'; -// 弹窗广告属性面板 +/** 弹窗广告属性面板 */ defineOptions({ name: 'PopoverProperty' }); const props = defineProps<{ modelValue: PopoverProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); @@ -53,5 +55,3 @@ const formData = useVModel(props, 'modelValue', emit); - - From 1a8b9873e017f7d800a869da6a8e53361a392663 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 10:45:06 +0800 Subject: [PATCH 067/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20product-card=20=E4=BC=98=E5=8C=96=2050%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/product-card/config.ts | 81 +++++++------------ .../components/mobile/product-card/index.vue | 36 ++++----- .../mobile/product-card/property.vue | 8 +- 3 files changed, 48 insertions(+), 77 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/config.ts index d165b01f6..a9e84977b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/config.ts @@ -2,63 +2,40 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 商品卡片属性 */ export interface ProductCardProperty { - // 布局类型:单列大图 | 单列小图 | 双列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'; - // 商品字段 + layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'; // 布局类型:单列大图 | 单列小图 | 双列 fields: { - // 商品简介 - introduction: ProductCardFieldProperty; - // 商品市场价 - marketPrice: ProductCardFieldProperty; - // 商品名称 - name: ProductCardFieldProperty; - // 商品价格 - price: ProductCardFieldProperty; - // 商品销量 - salesCount: ProductCardFieldProperty; - // 商品库存 - stock: ProductCardFieldProperty; - }; - // 角标 + introduction: ProductCardFieldProperty; // 商品简介 + marketPrice: ProductCardFieldProperty; // 商品市场价 + name: ProductCardFieldProperty; // 商品名称 + price: ProductCardFieldProperty; // 商品价格 + salesCount: ProductCardFieldProperty; // 商品销量 + stock: ProductCardFieldProperty; // 商品库存 + }; // 商品字段 badge: { - // 角标图片 - imgUrl: string; - // 是否显示 - show: boolean; - }; - // 按钮 + imgUrl: string; // 角标图片 + show: boolean; // 是否显示 + }; // 角标 btnBuy: { - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string; - // 文字按钮:背景渐变结束颜色 - bgEndColor: string; - // 图片按钮:图片地址 - imgUrl: string; - // 文字 - text: string; - // 类型:文字 | 图片 - type: 'img' | 'text'; - }; - // 上圆角 - borderRadiusTop: number; - // 下圆角 - borderRadiusBottom: number; - // 间距 - space: number; - // 商品编号列表 - spuIds: number[]; - // 组件样式 - style: ComponentStyle; -} -// 商品字段 -export interface ProductCardFieldProperty { - // 是否显示 - show: boolean; - // 颜色 - color: string; + bgBeginColor: string; // 文字按钮:背景渐变起始颜色 + bgEndColor: string; // 文字按钮:背景渐变结束颜色 + imgUrl: string; // 图片按钮:图片地址 + text: string; // 文字 + type: 'img' | 'text'; // 类型:文字 | 图片 + }; // 按钮 + borderRadiusTop: number; // 上圆角 + borderRadiusBottom: number; // 下圆角 + space: number; // 间距 + spuIds: number[]; // 商品编号列表 + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 商品字段属性 */ +export interface ProductCardFieldProperty { + show: boolean; // 是否显示 + color: string; // 颜色 +} + +/** 定义组件 */ export const component = { id: 'ProductCard', name: '商品卡片', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/index.vue index b1cf736e8..b66c27c6a 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/index.vue @@ -13,10 +13,11 @@ import * as ProductSpuApi from '#/api/mall/product/spu'; /** 商品卡片 */ defineOptions({ name: 'ProductCard' }); -// 定义属性 + const props = defineProps<{ property: ProductCardProperty }>(); -// 商品列表 + const spuList = ref([]); + watch( () => props.property.spuIds, async () => { @@ -28,28 +29,21 @@ watch( }, ); -/** - * 计算商品的间距 - * @param index 商品索引 - */ -const calculateSpace = (index: number) => { - // 商品的列数 - const columns = props.property.layoutType === 'twoCol' ? 2 : 1; - // 第一列没有左边距 - const marginLeft = index % columns === 0 ? '0' : `${props.property.space}px`; - // 第一行没有上边距 - const marginTop = index < columns ? '0' : `${props.property.space}px`; - +/** 计算商品的间距 */ +function calculateSpace(index: number) { + const columns = props.property.layoutType === 'twoCol' ? 2 : 1; // 商品的列数 + const marginLeft = index % columns === 0 ? '0' : `${props.property.space}px`; // 第一列没有左边距 + const marginTop = index < columns ? '0' : `${props.property.space}px`; // 第一行没有上边距 return { marginLeft, marginTop }; -}; +} -// 容器 const containerRef = ref(); -// 计算商品的宽度 + +/** 计算商品的宽度 */ const calculateWidth = () => { let width = '100%'; - // 双列时每列的宽度为:(总宽度 - 间距)/ 2 if (props.property.layoutType === 'twoCol') { + // 双列时每列的宽度为:(总宽度 - 间距)/ 2 width = `${(containerRef.value.offsetWidth - props.property.space) / 2}px`; } return { width }; @@ -136,14 +130,14 @@ const calculateWidth = () => { class="text-[16px]" :style="{ color: property.fields.price.color }" > - ¥{{ fenToYuan(spu.price as any) }} + ¥{{ fenToYuan(spu.price!) }} ¥{{ fenToYuan(spu.marketPrice) }} + >¥{{ fenToYuan(spu.marketPrice!) }}
@@ -186,5 +180,3 @@ const calculateWidth = () => {
- - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/property.vue index 728ae7827..a05a4bc85 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/product-card/property.vue @@ -22,11 +22,15 @@ import { ColorInput } from '#/views/mall/promotion/components'; // TODO: 添加组件 // import SpuShowcase from '#/views/mall/product/spu/components/spu-showcase.vue'; -// 商品卡片属性面板 +import ComponentContainerProperty from '../../component-container-property.vue'; + +/** 商品卡片属性面板 */ defineOptions({ name: 'ProductCardProperty' }); const props = defineProps<{ modelValue: ProductCardProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); @@ -174,5 +178,3 @@ const formData = useVModel(props, 'modelValue', emit); - - From 7f192823d73b6fc72e6bc0c4efa67c1b7a63db06 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 11:05:04 +0800 Subject: [PATCH 068/544] =?UTF-8?q?review=EF=BC=9A=E3=80=90antd=E3=80=91?= =?UTF-8?q?=E3=80=90mall=E3=80=91=E5=95=86=E5=93=81=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/reward/rewardActivity.ts | 1 + .../spu/components/sku-table-select.vue | 21 ++++++------------- .../product/spu/components/spu-showcase.vue | 12 ++++++----- .../spu/components/spu-table-select.vue | 20 ++++++++++-------- .../src/views/mall/product/spu/form/data.ts | 1 + .../product/spu/form/modules/sku-list.vue | 6 +++--- .../coupon/components/coupon-select.vue | 1 + .../mall/promotion/rewardActivity/data.ts | 8 ------- .../mall/promotion/rewardActivity/index.vue | 7 +++---- .../promotion/rewardActivity/modules/form.vue | 4 ++-- .../mall/promotion/seckill/activity/data.ts | 1 - 11 files changed, 35 insertions(+), 47 deletions(-) diff --git a/apps/web-antd/src/api/mall/promotion/reward/rewardActivity.ts b/apps/web-antd/src/api/mall/promotion/reward/rewardActivity.ts index 2faf443b8..e59cad300 100644 --- a/apps/web-antd/src/api/mall/promotion/reward/rewardActivity.ts +++ b/apps/web-antd/src/api/mall/promotion/reward/rewardActivity.ts @@ -18,6 +18,7 @@ export namespace MallRewardActivityApi { export interface RewardActivity { id?: number; // 活动编号 name?: string; // 活动名称 + status?: number; // 活动状态 startTime?: Date; // 开始时间 endTime?: Date; // 结束时间 startAndEndTime?: Date[]; // 开始和结束时间(仅前端使用) diff --git a/apps/web-antd/src/views/mall/product/spu/components/sku-table-select.vue b/apps/web-antd/src/views/mall/product/spu/components/sku-table-select.vue index 3ff82032f..2679a9d4f 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/sku-table-select.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/sku-table-select.vue @@ -8,8 +8,6 @@ import { computed, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; import { fenToYuan } from '@vben/utils'; -import { message } from 'ant-design-vue'; - import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getSpu } from '#/api/mall/product/spu'; @@ -61,6 +59,7 @@ const gridColumns = computed(() => [ }, ]); +// TODO @芋艿:要不要直接非 pager? const [Grid, gridApi] = useVbenVxeGrid({ gridOptions: { columns: gridColumns.value, @@ -76,17 +75,11 @@ const [Grid, gridApi] = useVbenVxeGrid({ if (!spuId.value) { return { items: [], total: 0 }; } - try { - const spu = await getSpu(spuId.value); - return { - items: spu.skus || [], - total: spu.skus?.length || 0, - }; - } catch (error) { - message.error('加载 SKU 数据失败'); - console.error(error); - return { items: [], total: 0 }; - } + const spu = await getSpu(spuId.value); + return { + items: spu.skus || [], + total: spu.skus?.length || 0, + }; }, }, }, @@ -113,12 +106,10 @@ const [Modal, modalApi] = useVbenModal({ spuId.value = undefined; return; } - const data = modalApi.getData(); if (!data?.spuId) { return; } - spuId.value = data.spuId; await gridApi.query(); }, diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue index 1d75f8a8f..6b0547c20 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue @@ -28,17 +28,19 @@ const emit = defineEmits(['update:modelValue', 'change']); const productSpus = ref([]); const spuTableSelectRef = ref>(); +const isMultiple = computed(() => props.limit !== 1); // 是否为多选模式 /** 计算是否可以添加 */ const canAdd = computed(() => { - if (props.disabled) return false; - if (!props.limit) return true; + if (props.disabled) { + return false; + } + if (!props.limit) { + return true; + } return productSpus.value.length < props.limit; }); -/** 是否为多选模式 */ -const isMultiple = computed(() => props.limit !== 1); - /** 监听 modelValue 变化,加载商品详情 */ watch( () => props.modelValue, diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue index e503a95f8..46bfb1e92 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue @@ -26,6 +26,7 @@ const emit = defineEmits<{ change: [spu: MallSpuApi.Spu | MallSpuApi.Spu[]]; }>(); +// TODO @芋艿:要不要加类型; const categoryList = ref([]); const categoryTreeList = ref([]); @@ -71,13 +72,11 @@ const formSchema = computed(() => [ /** 表格列配置 */ const gridColumns = computed(() => { const columns: VxeGridProps['columns'] = []; - if (props.multiple) { columns.push({ type: 'checkbox', width: 55 }); } else { columns.push({ type: 'radio', width: 55 }); } - columns.push( { field: 'id', @@ -109,7 +108,6 @@ const gridColumns = computed(() => { }, }, ); - return columns; }); @@ -129,14 +127,15 @@ const [Grid, gridApi] = useVbenVxeGrid({ reserve: true, } : undefined, - radioConfig: !props.multiple - ? { + radioConfig: props.multiple + ? undefined + : { reserve: true, - } - : undefined, + }, proxyConfig: { ajax: { async query({ page }: any, formValues: any) { + // TODO @芋艿:怎么简化下。 const data = await getSpuPage({ pageNo: page.currentPage, pageSize: page.pageSize, @@ -145,7 +144,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ categoryId: formValues.categoryId || undefined, createTime: formValues.createTime || undefined, }); - return { items: data.list || [], total: data.total || 0, @@ -165,6 +163,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }); /** 多选:处理选中变化 */ +// TODO @芋艿:要不要清理掉? function handleCheckboxChange() { // vxe-table 自动管理选中状态,无需手动处理 } @@ -180,13 +179,16 @@ function handleRadioChange() { const [Modal, modalApi] = useVbenModal({ destroyOnClose: true, + // TODO @芋艿:看看怎么简化 onConfirm: props.multiple ? () => { - const selectedRows = gridApi.grid.getCheckboxRecords() as MallSpuApi.Spu[]; + const selectedRows = + gridApi.grid.getCheckboxRecords() as MallSpuApi.Spu[]; emit('change', selectedRows); modalApi.close(); } : undefined, + // TODO @芋艿:看看怎么简化? async onOpenChange(isOpen: boolean) { if (!isOpen) { gridApi.grid.clearCheckboxRow(); diff --git a/apps/web-antd/src/views/mall/product/spu/form/data.ts b/apps/web-antd/src/views/mall/product/spu/form/data.ts index d2ff7eeb5..3ca6e5c79 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/data.ts +++ b/apps/web-antd/src/views/mall/product/spu/form/data.ts @@ -102,6 +102,7 @@ export function useInfoFormSchema(): VbenFormSchema[] { } /** 价格库存的表单 */ +// TODO @puhui999:貌似太宽了。。。屏幕小的,整个 table 展示补全哈~~ export function useSkuFormSchema( propertyList: any[] = [], isDetail: boolean = false, diff --git a/apps/web-antd/src/views/mall/product/spu/form/modules/sku-list.vue b/apps/web-antd/src/views/mall/product/spu/form/modules/sku-list.vue index 8c3b4a1f1..348f5f22a 100644 --- a/apps/web-antd/src/views/mall/product/spu/form/modules/sku-list.vue +++ b/apps/web-antd/src/views/mall/product/spu/form/modules/sku-list.vue @@ -212,7 +212,9 @@ function build( const result: MallSpuApi.Property[][] = []; const rest = build(propertyValuesList.slice(1)); const firstList = propertyValuesList[0]; - if (!firstList) return []; + if (!firstList) { + return []; + } for (const element of firstList) { for (const element_ of rest) { @@ -289,8 +291,6 @@ defineExpose({ - - From 2e505269220c1e9b3085f83b2e52e3e655e18fe1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 12:09:10 +0800 Subject: [PATCH 071/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20promotion-article=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/promotion-article/config.ts | 8 +++---- .../mobile/promotion-article/index.vue | 10 ++++----- .../mobile/promotion-article/property.vue | 21 +++++++++---------- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts index 9a1fc4194..ac47bf4b5 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/config.ts @@ -2,13 +2,11 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 营销文章属性 */ export interface PromotionArticleProperty { - // 文章编号 - id: number; - // 组件样式 - style: ComponentStyle; + id: number; // 文章编号 + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'PromotionArticle', name: '营销文章', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue index 10e9f5aa3..09f1ff673 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/index.vue @@ -9,10 +9,10 @@ import * as ArticleApi from '#/api/mall/promotion/article/index'; /** 营销文章 */ defineOptions({ name: 'PromotionArticle' }); -// 定义属性 -const props = defineProps<{ property: PromotionArticleProperty }>(); -// 商品列表 -const article = ref(); + +const props = defineProps<{ property: PromotionArticleProperty }>(); // 定义属性 + +const article = ref(); // 商品列表 watch( () => props.property.id, @@ -29,5 +29,3 @@ watch( - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue index 7a701c54f..d70503b17 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue @@ -12,18 +12,19 @@ import * as ArticleApi from '#/api/mall/promotion/article/index'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 营销文章属性面板 +/** 营销文章属性面板 */ defineOptions({ name: 'PromotionArticleProperty' }); const props = defineProps<{ modelValue: PromotionArticleProperty }>(); -const emit = defineEmits(['update:modelValue']); -const formData = useVModel(props, 'modelValue', emit); -// 文章列表 -const articles = ref([]); -// 加载中 -const loading = ref(false); -// 查询文章列表 +const emit = defineEmits(['update:modelValue']); + +const formData = useVModel(props, 'modelValue', emit); + +const articles = ref([]); // 文章列表 +const loading = ref(false); // 加载中 + +/** 查询文章列表 */ const queryArticleList = async (title?: string) => { loading.value = true; const { list } = await ArticleApi.getArticlePage({ @@ -35,7 +36,7 @@ const queryArticleList = async (title?: string) => { loading.value = false; }; -// 初始化 +/** 初始化 */ onMounted(() => { queryArticleList(); }); @@ -65,5 +66,3 @@ onMounted(() => { - - From 4bb631fb24fd755b380002e564f95270e81654a6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 19:58:34 +0800 Subject: [PATCH 072/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20promotion-combination=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/promotion-combination/config.ts | 76 +++++++------------ .../mobile/promotion-combination/index.vue | 39 ++++------ .../mobile/promotion-combination/property.vue | 42 +++++----- 3 files changed, 59 insertions(+), 98 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/config.ts index f0497dc19..f9db86b73 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/config.ts @@ -2,64 +2,40 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 拼团属性 */ export interface PromotionCombinationProperty { - // 布局类型:单列 | 三列 - layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'; - // 商品字段 + layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'; // 布局类型:单列 | 三列 fields: { - // 商品简介 - introduction: PromotionCombinationFieldProperty; - // 市场价 - marketPrice: PromotionCombinationFieldProperty; - // 商品名称 - name: PromotionCombinationFieldProperty; - // 商品价格 - price: PromotionCombinationFieldProperty; - // 商品销量 - salesCount: PromotionCombinationFieldProperty; - // 商品库存 - stock: PromotionCombinationFieldProperty; - }; - // 角标 + introduction: PromotionCombinationFieldProperty; // 商品简介 + marketPrice: PromotionCombinationFieldProperty; // 市场价 + name: PromotionCombinationFieldProperty; // 商品名称 + price: PromotionCombinationFieldProperty; // 商品价格 + salesCount: PromotionCombinationFieldProperty; // 商品销量 + stock: PromotionCombinationFieldProperty; // 商品库存 + }; // 商品字段 badge: { - // 角标图片 - imgUrl: string; - // 是否显示 - show: boolean; - }; - // 按钮 + imgUrl: string; // 角标图片 + show: boolean; // 是否显示 + }; // 角标 btnBuy: { - // 文字按钮:背景渐变起始颜色 - bgBeginColor: string; - // 文字按钮:背景渐变结束颜色 - bgEndColor: string; - // 图片按钮:图片地址 - imgUrl: string; - // 文字 - text: string; - // 类型:文字 | 图片 - type: 'img' | 'text'; - }; - // 上圆角 - borderRadiusTop: number; - // 下圆角 - borderRadiusBottom: number; - // 间距 - space: number; - // 拼团活动编号 - activityIds: number[]; - // 组件样式 - style: ComponentStyle; + bgBeginColor: string; // 文字按钮:背景渐变起始颜色 + bgEndColor: string; // 文字按钮:背景渐变结束颜色 + imgUrl: string; // 图片按钮:图片地址 + text: string; // 文字 + type: 'img' | 'text'; // 类型:文字 | 图片 + }; // 按钮 + borderRadiusTop: number; // 上圆角 + borderRadiusBottom: number; // 下圆角 + space: number; // 间距 + activityIds: number[]; // 拼团活动编号 + style: ComponentStyle; // 组件样式 } -// 商品字段 +/** 商品字段属性 */ export interface PromotionCombinationFieldProperty { - // 是否显示 - show: boolean; - // 颜色 - color: string; + show: boolean; // 是否显示 + color: string; // 颜色 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'PromotionCombination', name: '拼团', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/index.vue index 82f1f5bd7..4be26abf4 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/index.vue @@ -15,9 +15,9 @@ import * as CombinationActivityApi from '#/api/mall/promotion/combination/combin /** 拼团卡片 */ defineOptions({ name: 'PromotionCombination' }); -// 定义属性 + const props = defineProps<{ property: PromotionCombinationProperty }>(); -// 商品列表 + const spuList = ref([]); const spuIdList = ref([]); const combinationActivityList = ref< @@ -30,7 +30,7 @@ watch( try { // 新添加的拼团组件,是没有活动ID的 const activityIds = props.property.activityIds; - // 检查活动ID的有效性 + // 检查活动 ID 的有效性 if (Array.isArray(activityIds) && activityIds.length > 0) { // 获取拼团活动详情列表 combinationActivityList.value = @@ -70,28 +70,21 @@ watch( }, ); -/** - * 计算商品的间距 - * @param index 商品索引 - */ -const calculateSpace = (index: number) => { - // 商品的列数 - const columns = props.property.layoutType === 'twoCol' ? 2 : 1; - // 第一列没有左边距 - const marginLeft = index % columns === 0 ? '0' : `${props.property.space}px`; - // 第一行没有上边距 - const marginTop = index < columns ? '0' : `${props.property.space}px`; - +/** 计算商品的间距 */ +function calculateSpace(index: number) { + const columns = props.property.layoutType === 'twoCol' ? 2 : 1; // 商品的列数 + const marginLeft = index % columns === 0 ? '0' : `${props.property.space}px`; // 第一列没有左边距 + const marginTop = index < columns ? '0' : `${props.property.space}px`; // 第一行没有上边距 return { marginLeft, marginTop }; -}; +} -// 容器 const containerRef = ref(); -// 计算商品的宽度 + +/** 计算商品的宽度 */ const calculateWidth = () => { let width = '100%'; - // 双列时每列的宽度为:(总宽度 - 间距)/ 2 if (props.property.layoutType === 'twoCol') { + // 双列时每列的宽度为:(总宽度 - 间距)/ 2 width = `${(containerRef.value.offsetWidth - props.property.space) / 2}px`; } return { width }; @@ -117,7 +110,7 @@ const calculateWidth = () => { >
{
- ¥{{ fenToYuan(spu.marketPrice) }} + ¥{{ fenToYuan(spu.marketPrice!) }}
@@ -229,5 +222,3 @@ const calculateWidth = () => {
- - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/property.vue index 273580f44..fe222be0b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-combination/property.vue @@ -1,17 +1,15 @@ @@ -186,5 +182,3 @@ onMounted(async () => { - - From b3e1dab487f6858d7a67152b969f5fe936332dac Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:09:29 +0800 Subject: [PATCH 073/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90mall=E3=80=91product/spu=20=E7=9A=84=20components=20?= =?UTF-8?q?=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/spu/components/spu-showcase.vue | 27 +--- .../spu/components/spu-table-select.vue | 135 ++++++++---------- apps/web-ele/src/api/mall/product/category.ts | 2 +- .../mall/product/spu/components/index.ts | 1 - .../spu/components/sku-table-select.vue | 18 +-- .../product/spu/components/spu-showcase.vue | 22 +-- .../spu/components/spu-table-select.vue | 127 +++++++--------- .../src/views/mall/product/spu/data.ts | 2 - 8 files changed, 134 insertions(+), 200 deletions(-) diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue index 6b0547c20..e1abcb255 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue @@ -26,8 +26,8 @@ const props = withDefaults(defineProps(), { const emit = defineEmits(['update:modelValue', 'change']); -const productSpus = ref([]); -const spuTableSelectRef = ref>(); +const productSpus = ref([]); // 已选择的商品列表 +const spuTableSelectRef = ref>(); // 商品选择表格组件引用 const isMultiple = computed(() => props.limit !== 1); // 是否为多选模式 /** 计算是否可以添加 */ @@ -47,12 +47,10 @@ watch( async (newValue) => { // eslint-disable-next-line unicorn/no-nested-ternary const ids = Array.isArray(newValue) ? newValue : newValue ? [newValue] : []; - if (ids.length === 0) { productSpus.value = []; return; } - // 只有商品发生变化时才重新查询 if ( productSpus.value.length === 0 || @@ -103,16 +101,16 @@ function emitSpuChange() {
+
+
@@ -140,17 +139,3 @@ function emitSpuChange() { @change="handleSpuSelected" /> - - diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue index 46bfb1e92..236d4c264 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-table-select.vue @@ -2,6 +2,7 @@ diff --git a/apps/web-ele/src/api/mall/product/category.ts b/apps/web-ele/src/api/mall/product/category.ts index 12d7202f4..7ec8bf833 100644 --- a/apps/web-ele/src/api/mall/product/category.ts +++ b/apps/web-ele/src/api/mall/product/category.ts @@ -50,7 +50,7 @@ export function getCategoryList(params: any) { ); } -// 获得商品分类列表 +/** 获得商品分类列表 */ export function getCategorySimpleList() { return requestClient.get( '/product/category/list', diff --git a/apps/web-ele/src/views/mall/product/spu/components/index.ts b/apps/web-ele/src/views/mall/product/spu/components/index.ts index f73d34334..122cbcea0 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/index.ts +++ b/apps/web-ele/src/views/mall/product/spu/components/index.ts @@ -1,4 +1,3 @@ export { default as SkuTableSelect } from './sku-table-select.vue'; export { default as SpuShowcase } from './spu-showcase.vue'; export { default as SpuTableSelect } from './spu-table-select.vue'; - diff --git a/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue b/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue index af6fdbc1c..11f9f887d 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/sku-table-select.vue @@ -59,6 +59,15 @@ const gridColumns = computed(() => [ }, ]); +/** 处理选中 */ +function handleRadioChange() { + const selectedRow = gridApi.grid.getRadioRecord() as MallSpuApi.Sku; + if (selectedRow) { + emit('change', selectedRow); + modalApi.close(); + } +} + // TODO @芋艿:要不要直接非 pager? const [Grid, gridApi] = useVbenVxeGrid({ gridOptions: { @@ -89,15 +98,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, }); -/** 处理选中 */ -function handleRadioChange() { - const selectedRow = gridApi.grid.getRadioRecord() as MallSpuApi.Sku; - if (selectedRow) { - emit('change', selectedRow); - modalApi.close(); - } -} - const [Modal, modalApi] = useVbenModal({ destroyOnClose: true, onOpenChange: async (isOpen: boolean) => { diff --git a/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue index dfa305aad..05568e5b0 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue @@ -26,8 +26,8 @@ const props = withDefaults(defineProps(), { const emit = defineEmits(['update:modelValue', 'change']); -const productSpus = ref([]); -const spuTableSelectRef = ref>(); +const productSpus = ref([]); // 已选择的商品列表 +const spuTableSelectRef = ref>(); // 商品选择表格组件引用 const isMultiple = computed(() => props.limit !== 1); // 是否为多选模式 /** 计算是否可以添加 */ @@ -101,7 +101,7 @@ function emitSpuChange() {
@@ -125,7 +125,7 @@ function emitSpuChange() {
@@ -140,17 +140,3 @@ function emitSpuChange() { @change="handleSpuSelected" /> - - diff --git a/apps/web-ele/src/views/mall/product/spu/components/spu-table-select.vue b/apps/web-ele/src/views/mall/product/spu/components/spu-table-select.vue index 76e2d9294..84a5b44c4 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/spu-table-select.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/spu-table-select.vue @@ -2,6 +2,7 @@ diff --git a/apps/web-ele/src/views/mall/product/spu/data.ts b/apps/web-ele/src/views/mall/product/spu/data.ts index 1037fa4f3..f667c6948 100644 --- a/apps/web-ele/src/views/mall/product/spu/data.ts +++ b/apps/web-ele/src/views/mall/product/spu/data.ts @@ -7,8 +7,6 @@ import { handleTree } from '@vben/utils'; import { getCategoryList } from '#/api/mall/product/category'; import { getRangePickerDefaultProps } from '#/utils'; -// TODO @霖:所有 mall 的 search 少了,请输入 xxx;表单也是类似 - /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { return [ From c6d6d1c1e87e9f93b853fa0ae7ec9af0f6c15bff Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:18:49 +0800 Subject: [PATCH 074/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90mall=E3=80=91draggable=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/components/draggable/index.vue | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/draggable/index.vue b/apps/web-ele/src/views/mall/promotion/components/draggable/index.vue index ad7f9f3df..d2901f395 100644 --- a/apps/web-ele/src/views/mall/promotion/components/draggable/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/draggable/index.vue @@ -1,6 +1,4 @@ - - + 添加 - - + + - - From b88004390013d826e5e0aff452ec1f9fb483d222 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:19:05 +0800 Subject: [PATCH 075/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy?= =?UTF-8?q?=20editor=20=E7=9A=84=20search-bar=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/search-bar/config.ts | 4 +- .../components/mobile/search-bar/index.vue | 48 +++---------------- .../components/mobile/search-bar/property.vue | 18 +++---- 3 files changed, 18 insertions(+), 52 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts index 01d5894d1..c471780e1 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/config.ts @@ -13,10 +13,10 @@ export interface SearchProperty { style: ComponentStyle; } -// 文字位置 +/** 文字位置 */ export type PlaceholderPosition = 'center' | 'left'; -// 定义组件 +/** 定义组件 */ export const component = { id: 'SearchBar', name: '搜索框', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue index e7c770304..7463d7db6 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/index.vue @@ -5,19 +5,19 @@ import { IconifyIcon } from '@vben/icons'; /** 搜索框 */ defineOptions({ name: 'SearchBar' }); + defineProps<{ property: SearchProperty }>(); - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue index 5e1822078..4dca02da7 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue @@ -11,6 +11,7 @@ import { ElCard, ElForm, ElFormItem, + ElInput, ElRadioButton, ElRadioGroup, ElSlider, @@ -18,7 +19,7 @@ import { ElTooltip, } from 'element-plus'; -import { Draggable } from '#/views/mall/promotion/components'; +import { ColorInput, Draggable } from '#/views/mall/promotion/components'; import ComponentContainerProperty from '../../component-container-property.vue'; @@ -26,10 +27,12 @@ import ComponentContainerProperty from '../../component-container-property.vue'; defineOptions({ name: 'SearchProperty' }); const props = defineProps<{ modelValue: SearchProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); -// 监听热词数组变化 +/** 监听热词数组变化 */ watch( () => formData.value.hotKeywords, (newVal) => { @@ -45,8 +48,7 @@ watch( \ No newline at end of file diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/property.vue index 79a7eb080..46a0e16c5 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/property.vue @@ -5,16 +5,16 @@ import { useVModel } from '@vueuse/core'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 用户卡片属性面板 +/** 用户卡片属性面板 */ defineOptions({ name: 'UserCardProperty' }); const props = defineProps<{ modelValue: UserCardProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/config.ts index 25ca85065..e149b22f1 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/config.ts @@ -2,11 +2,10 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 用户订单属性 */ export interface UserOrderProperty { - // 组件样式 - style: ComponentStyle; + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'UserOrder', name: '用户订单', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue index ab527acee..1c171b3eb 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue @@ -5,13 +5,12 @@ import { ElImage } from 'element-plus'; /** 用户订单 */ defineOptions({ name: 'UserOrder' }); -// 定义属性 + +/** 定义属性 */ defineProps<{ property: UserOrderProperty }>(); - - + \ No newline at end of file diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue index 48f0c0a41..2f9abe556 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue @@ -5,16 +5,16 @@ import { useVModel } from '@vueuse/core'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 用户订单属性面板 +/** 用户订单属性面板 */ defineOptions({ name: 'UserOrderProperty' }); const props = defineProps<{ modelValue: UserOrderProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); - - + \ No newline at end of file diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/config.ts index 2b10d32fb..71d8d0245 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/config.ts @@ -2,11 +2,10 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 用户资产属性 */ export interface UserWalletProperty { - // 组件样式 - style: ComponentStyle; + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'UserWallet', name: '用户资产', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue index 7581e54c9..4eabad045 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue @@ -5,13 +5,12 @@ import { ElImage } from 'element-plus'; /** 用户资产 */ defineOptions({ name: 'UserWallet' }); -// 定义属性 + +/** 定义属性 */ defineProps<{ property: UserWalletProperty }>(); - - + \ No newline at end of file diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/property.vue index 5c01b828e..74b374535 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/property.vue @@ -5,11 +5,13 @@ import { useVModel } from '@vueuse/core'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 用户资产属性面板 +/** 用户资产属性面板 */ defineOptions({ name: 'UserWalletProperty' }); const props = defineProps<{ modelValue: UserWalletProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); From d7cea8be392b0f3c5fef0171df0422b8f70a58ed Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:42:23 +0800 Subject: [PATCH 080/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91vide?= =?UTF-8?q?o-player=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/video-player/config.ts | 19 +++++++------------ .../components/mobile/video-player/index.vue | 13 ++----------- .../mobile/video-player/property.vue | 8 ++++---- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts index bc9195575..ab7ccd311 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts @@ -2,23 +2,18 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 视频播放属性 */ export interface VideoPlayerProperty { - // 视频链接 - videoUrl: string; - // 封面链接 - posterUrl: string; - // 是否自动播放 - autoplay: boolean; - // 组件样式 - style: VideoPlayerStyle; + videoUrl: string; // 视频链接 + posterUrl: string; // 封面链接 + autoplay: boolean; // 是否自动播放 + style: VideoPlayerStyle; // 组件样式 } -// 视频播放样式 +/** 视频播放样式 */ export interface VideoPlayerStyle extends ComponentStyle { - // 视频高度 - height: number; + height: number; // 视频高度 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'VideoPlayer', name: '视频播放', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue index ddd448d96..b58577d5b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue @@ -11,13 +11,13 @@ defineProps<{ property: VideoPlayerProperty }>(); - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue index 67c355905..c576d8f76 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue @@ -9,11 +9,13 @@ import UploadImg from '#/components/upload/image-upload.vue'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 视频播放属性面板 +/** 视频播放属性面板 */ defineOptions({ name: 'VideoPlayerProperty' }); const props = defineProps<{ modelValue: VideoPlayerProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); @@ -58,6 +60,4 @@ const formData = useVModel(props, 'modelValue', emit); - - - + \ No newline at end of file From 66c9398760a18637dcd734bd564f073af1b22b05 Mon Sep 17 00:00:00 2001 From: haohao <1036606149@qq.com> Date: Sat, 1 Nov 2025 21:53:22 +0800 Subject: [PATCH 081/544] =?UTF-8?q?fix:=20=E3=80=90antd=E3=80=91=E3=80=90i?= =?UTF-8?q?ot=E3=80=91=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=AD=97=E5=85=B8=E4=B8=BA=20IOT=5FDEVICE=5FSTATE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/iot/device/device/data.ts | 6 +++--- apps/web-antd/src/views/iot/device/device/index.vue | 2 +- .../device/device/modules/components/DeviceTableSelect.vue | 4 ++-- .../iot/device/device/modules/detail/DeviceDetailsInfo.vue | 2 +- packages/constants/src/dict-enum.ts | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/web-antd/src/views/iot/device/device/data.ts b/apps/web-antd/src/views/iot/device/device/data.ts index 424f0ef92..5edd1cc0d 100644 --- a/apps/web-antd/src/views/iot/device/device/data.ts +++ b/apps/web-antd/src/views/iot/device/device/data.ts @@ -239,7 +239,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '设备状态', component: 'Select', componentProps: { - options: getDictOptions(DICT_TYPE.IOT_DEVICE_STATUS, 'number'), + options: getDictOptions(DICT_TYPE.IOT_DEVICE_STATE, 'number'), placeholder: '请选择设备状态', allowClear: true, }, @@ -295,12 +295,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { slots: { default: 'groups' }, }, { - field: 'status', + field: 'state', title: '设备状态', minWidth: 100, cellRender: { name: 'CellDict', - props: { type: DICT_TYPE.IOT_DEVICE_STATUS }, + props: { type: DICT_TYPE.IOT_DEVICE_STATE }, }, }, { diff --git a/apps/web-antd/src/views/iot/device/device/index.vue b/apps/web-antd/src/views/iot/device/device/index.vue index f83a7c14a..d06649d66 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -307,7 +307,7 @@ onMounted(async () => { style="width: 200px" > diff --git a/apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue b/apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue index efaad5976..8f8afc3e0 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/components/DeviceTableSelect.vue @@ -294,7 +294,7 @@ onMounted(async () => { style="width: 240px" > @@ -373,7 +373,7 @@ onMounted(async () => { diff --git a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue index d4b6b06cb..5ba870c61 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/detail/DeviceDetailsInfo.vue @@ -106,7 +106,7 @@ function handleAuthInfoDialogClose() { diff --git a/packages/constants/src/dict-enum.ts b/packages/constants/src/dict-enum.ts index c2ffca955..73a5c57dc 100644 --- a/packages/constants/src/dict-enum.ts +++ b/packages/constants/src/dict-enum.ts @@ -155,7 +155,6 @@ const IOT_DICT = { IOT_DATA_SINK_TYPE_ENUM: 'iot_data_sink_type_enum', // IoT 数据流转目的类型 IOT_DATA_TYPE: 'iot_data_type', // IOT 数据类型 IOT_DEVICE_STATE: 'iot_device_state', // IOT 设备状态 - IOT_DEVICE_STATUS: 'iot_device_status', // IOT 设备状态 IOT_LOCATION_TYPE: 'iot_location_type', // IOT 定位类型 IOT_NET_TYPE: 'iot_net_type', // IOT 联网方式 IOT_OTA_TASK_DEVICE_SCOPE: 'iot_ota_task_device_scope', // IoT OTA任务设备范围 From cc5477dc48bee73a3fcb4e40028411a4bcf85332 Mon Sep 17 00:00:00 2001 From: haohao <1036606149@qq.com> Date: Sat, 1 Nov 2025 21:55:01 +0800 Subject: [PATCH 082/544] =?UTF-8?q?feat:=20=E3=80=90antd=E3=80=91=E3=80=90?= =?UTF-8?q?iot=E3=80=91=E5=90=AF=E7=94=A8=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/modules/ProductCardView.vue | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/views/iot/product/product/modules/ProductCardView.vue b/apps/web-antd/src/views/iot/product/product/modules/ProductCardView.vue index 411ff50c1..255f3f335 100644 --- a/apps/web-antd/src/views/iot/product/product/modules/ProductCardView.vue +++ b/apps/web-antd/src/views/iot/product/product/modules/ProductCardView.vue @@ -195,16 +195,33 @@ defineExpose({ /> 物模型 + + +
From 4412d455a30f0b97a34a940b1fedee7b5e3633d6 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 22:50:24 +0800 Subject: [PATCH 083/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91?= =?UTF-8?q?=E3=80=90ele=E3=80=91=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/infra/apiAccessLog/modules/detail.vue | 1 - .../views/infra/apiErrorLog/modules/detail.vue | 1 - .../views/infra/job/logger/modules/detail.vue | 1 - .../src/views/infra/job/modules/detail.vue | 1 - .../views/mall/trade/afterSale/detail/index.vue | 1 + .../src/views/mall/trade/order/detail/index.vue | 3 ++- .../src/views/pay/notify/modules/detail.vue | 1 - .../src/views/pay/order/modules/detail.vue | 1 - .../src/views/pay/refund/modules/detail.vue | 1 - .../src/views/pay/transfer/modules/detail.vue | 1 - .../src/views/system/loginlog/modules/detail.vue | 1 - .../src/views/system/mail/log/modules/detail.vue | 1 - .../system/notify/message/modules/detail.vue | 1 - .../views/system/notify/my/modules/detail.vue | 1 - .../views/system/operatelog/modules/detail.vue | 1 - .../src/views/system/sms/log/modules/detail.vue | 1 - .../views/system/social/user/modules/detail.vue | 3 --- .../web-ele/src/views/infra/apiAccessLog/data.ts | 4 ++-- .../views/infra/apiAccessLog/modules/detail.vue | 1 - .../views/infra/apiErrorLog/modules/detail.vue | 1 - .../views/infra/job/logger/modules/detail.vue | 2 +- .../src/views/infra/job/modules/detail.vue | 1 - .../mall/home/modules/operation-data-card.vue | 6 +++--- .../mall/statistics/trade/modules/trend-card.vue | 3 ++- .../trade/afterSale/modules/disagree-form.vue | 4 ++-- .../views/mall/trade/brokerage/user/index.vue | 14 +++++--------- .../src/views/mall/trade/order/detail/index.vue | 16 ++++++---------- apps/web-ele/src/views/pay/notify/data.ts | 1 - .../src/views/pay/notify/modules/detail.vue | 2 -- .../src/views/pay/order/modules/detail.vue | 1 - .../src/views/pay/refund/modules/detail.vue | 2 +- .../src/views/pay/transfer/modules/detail.vue | 2 +- .../src/views/system/loginlog/modules/detail.vue | 2 +- .../src/views/system/mail/log/modules/detail.vue | 2 +- .../system/notify/message/modules/detail.vue | 1 - .../views/system/notify/my/modules/detail.vue | 1 - .../views/system/operatelog/modules/detail.vue | 1 - .../src/views/system/sms/log/modules/detail.vue | 3 +-- .../views/system/social/user/modules/detail.vue | 2 -- 39 files changed, 29 insertions(+), 64 deletions(-) diff --git a/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue b/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue index b3de99cc7..badc9376c 100644 --- a/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue +++ b/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/infra/apiErrorLog/modules/detail.vue b/apps/web-antd/src/views/infra/apiErrorLog/modules/detail.vue index 9c4e44c9f..da52c17fa 100644 --- a/apps/web-antd/src/views/infra/apiErrorLog/modules/detail.vue +++ b/apps/web-antd/src/views/infra/apiErrorLog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/infra/job/logger/modules/detail.vue b/apps/web-antd/src/views/infra/job/logger/modules/detail.vue index 18c868de4..ceb1b5bf1 100644 --- a/apps/web-antd/src/views/infra/job/logger/modules/detail.vue +++ b/apps/web-antd/src/views/infra/job/logger/modules/detail.vue @@ -15,7 +15,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/infra/job/modules/detail.vue b/apps/web-antd/src/views/infra/job/modules/detail.vue index 145a19dab..f23149e2d 100644 --- a/apps/web-antd/src/views/infra/job/modules/detail.vue +++ b/apps/web-antd/src/views/infra/job/modules/detail.vue @@ -16,7 +16,6 @@ const nextTimes = ref([]); // 下一次执行时间 const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/mall/trade/afterSale/detail/index.vue b/apps/web-antd/src/views/mall/trade/afterSale/detail/index.vue index c2a1fd9ac..85c513261 100644 --- a/apps/web-antd/src/views/mall/trade/afterSale/detail/index.vue +++ b/apps/web-antd/src/views/mall/trade/afterSale/detail/index.vue @@ -48,6 +48,7 @@ const afterSale = ref({ logs: [], }); +// TODO @xingyu:貌似 antd 相比 antd 来说,多了一个框?有啥办法只有 1 个么? const [OrderDescriptions] = useDescription({ title: '订单信息', bordered: false, diff --git a/apps/web-antd/src/views/mall/trade/order/detail/index.vue b/apps/web-antd/src/views/mall/trade/order/detail/index.vue index 89a2a1bfa..14c0db8c5 100644 --- a/apps/web-antd/src/views/mall/trade/order/detail/index.vue +++ b/apps/web-antd/src/views/mall/trade/order/detail/index.vue @@ -60,6 +60,7 @@ const deliveryExpressList = ref( const expressTrackList = ref([]); const pickUpStore = ref(); +// TODO @xingyu:貌似 antd 相比 antd 来说,多了一个框?有啥办法只有 1 个么? const [OrderInfoDescriptions] = useDescription({ title: '订单信息', bordered: false, @@ -337,7 +338,7 @@ onMounted(async () => {
diff --git a/apps/web-antd/src/views/pay/notify/modules/detail.vue b/apps/web-antd/src/views/pay/notify/modules/detail.vue index fb79db80a..90a6a67b0 100644 --- a/apps/web-antd/src/views/pay/notify/modules/detail.vue +++ b/apps/web-antd/src/views/pay/notify/modules/detail.vue @@ -19,7 +19,6 @@ const formData = ref(); const [Description] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/pay/order/modules/detail.vue b/apps/web-antd/src/views/pay/order/modules/detail.vue index 68b5426c2..2d4d84b10 100644 --- a/apps/web-antd/src/views/pay/order/modules/detail.vue +++ b/apps/web-antd/src/views/pay/order/modules/detail.vue @@ -15,7 +15,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/pay/refund/modules/detail.vue b/apps/web-antd/src/views/pay/refund/modules/detail.vue index 79adf6d65..d78ea529d 100644 --- a/apps/web-antd/src/views/pay/refund/modules/detail.vue +++ b/apps/web-antd/src/views/pay/refund/modules/detail.vue @@ -15,7 +15,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/pay/transfer/modules/detail.vue b/apps/web-antd/src/views/pay/transfer/modules/detail.vue index ea9fb84b6..83150697c 100644 --- a/apps/web-antd/src/views/pay/transfer/modules/detail.vue +++ b/apps/web-antd/src/views/pay/transfer/modules/detail.vue @@ -15,7 +15,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/loginlog/modules/detail.vue b/apps/web-antd/src/views/system/loginlog/modules/detail.vue index a0970c5c2..4982a32b3 100644 --- a/apps/web-antd/src/views/system/loginlog/modules/detail.vue +++ b/apps/web-antd/src/views/system/loginlog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/mail/log/modules/detail.vue b/apps/web-antd/src/views/system/mail/log/modules/detail.vue index e9fe28d76..3b04a9d04 100644 --- a/apps/web-antd/src/views/system/mail/log/modules/detail.vue +++ b/apps/web-antd/src/views/system/mail/log/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/notify/message/modules/detail.vue b/apps/web-antd/src/views/system/notify/message/modules/detail.vue index 7b4afe83e..a0e100dd4 100644 --- a/apps/web-antd/src/views/system/notify/message/modules/detail.vue +++ b/apps/web-antd/src/views/system/notify/message/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/notify/my/modules/detail.vue b/apps/web-antd/src/views/system/notify/my/modules/detail.vue index 7b4afe83e..a0e100dd4 100644 --- a/apps/web-antd/src/views/system/notify/my/modules/detail.vue +++ b/apps/web-antd/src/views/system/notify/my/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/operatelog/modules/detail.vue b/apps/web-antd/src/views/system/operatelog/modules/detail.vue index e69d8b20d..5ada4818a 100644 --- a/apps/web-antd/src/views/system/operatelog/modules/detail.vue +++ b/apps/web-antd/src/views/system/operatelog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/sms/log/modules/detail.vue b/apps/web-antd/src/views/system/sms/log/modules/detail.vue index 71cfb2c3a..2831f6ff5 100644 --- a/apps/web-antd/src/views/system/sms/log/modules/detail.vue +++ b/apps/web-antd/src/views/system/sms/log/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 2, - class: 'mx-4', schema: useDetailSchema(), }); diff --git a/apps/web-antd/src/views/system/social/user/modules/detail.vue b/apps/web-antd/src/views/system/social/user/modules/detail.vue index df24c9bab..de2b35cbf 100644 --- a/apps/web-antd/src/views/system/social/user/modules/detail.vue +++ b/apps/web-antd/src/views/system/social/user/modules/detail.vue @@ -16,9 +16,6 @@ const formData = ref(); const [Descriptions] = useDescription({ bordered: true, column: 1, - size: 'middle', - class: 'mx-4', - labelStyle: { width: '185px' }, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/infra/apiAccessLog/data.ts b/apps/web-ele/src/views/infra/apiAccessLog/data.ts index 0abdede2d..fb59f59b6 100644 --- a/apps/web-ele/src/views/infra/apiAccessLog/data.ts +++ b/apps/web-ele/src/views/infra/apiAccessLog/data.ts @@ -226,7 +226,7 @@ export function useDetailSchema(): DescriptionItemSchema[] { label: '请求时间', field: 'beginTime', render: (val, data) => { - if (data?.beginTime && data?.endTime) { + if (val && data?.endTime) { return `${formatDateTime(val)} ~ ${formatDateTime(data.endTime)}`; } return ''; @@ -245,7 +245,7 @@ export function useDetailSchema(): DescriptionItemSchema[] { render: (val, data) => { if (val === 0) { return '正常'; - } else if (data && data.resultMsg) { + } else if (val > 0 && data?.resultMsg) { return `失败 | ${val} | ${data.resultMsg}`; } return ''; diff --git a/apps/web-ele/src/views/infra/apiAccessLog/modules/detail.vue b/apps/web-ele/src/views/infra/apiAccessLog/modules/detail.vue index f5b3c65a3..0b3c4c7fa 100644 --- a/apps/web-ele/src/views/infra/apiAccessLog/modules/detail.vue +++ b/apps/web-ele/src/views/infra/apiAccessLog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 110, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/infra/apiErrorLog/modules/detail.vue b/apps/web-ele/src/views/infra/apiErrorLog/modules/detail.vue index bfe5fbd23..705cfdcd0 100644 --- a/apps/web-ele/src/views/infra/apiErrorLog/modules/detail.vue +++ b/apps/web-ele/src/views/infra/apiErrorLog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 110, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/infra/job/logger/modules/detail.vue b/apps/web-ele/src/views/infra/job/logger/modules/detail.vue index 5a5e7a7ad..3fd440e47 100644 --- a/apps/web-ele/src/views/infra/job/logger/modules/detail.vue +++ b/apps/web-ele/src/views/infra/job/logger/modules/detail.vue @@ -13,8 +13,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 1, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/infra/job/modules/detail.vue b/apps/web-ele/src/views/infra/job/modules/detail.vue index 01528a091..4774573d1 100644 --- a/apps/web-ele/src/views/infra/job/modules/detail.vue +++ b/apps/web-ele/src/views/infra/job/modules/detail.vue @@ -16,7 +16,6 @@ const nextTimes = ref([]); // 下一次执行时间 const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/mall/home/modules/operation-data-card.vue b/apps/web-ele/src/views/mall/home/modules/operation-data-card.vue index 4f6354bfe..4e98089db 100644 --- a/apps/web-ele/src/views/mall/home/modules/operation-data-card.vue +++ b/apps/web-ele/src/views/mall/home/modules/operation-data-card.vue @@ -95,9 +95,9 @@ onActivated(() => { /** 初始化 */ onMounted(() => { - getOrderData(); - getProductData(); - getWalletRechargeData(); + loadOrderData(); + loadProductData(); + loadWalletRechargeData(); }); diff --git a/apps/web-ele/src/views/mall/statistics/trade/modules/trend-card.vue b/apps/web-ele/src/views/mall/statistics/trade/modules/trend-card.vue index 3173e0bdd..9aa2d279a 100644 --- a/apps/web-ele/src/views/mall/statistics/trade/modules/trend-card.vue +++ b/apps/web-ele/src/views/mall/statistics/trade/modules/trend-card.vue @@ -27,6 +27,7 @@ import { getTradeStatisticsList, } from '#/api/mall/statistics/trade'; import ShortcutDateRangePicker from '#/components/shortcut-date-range-picker/shortcut-date-range-picker.vue'; +import { $t } from '#/locales'; import { getTradeTrendChartOptions } from './trend-chart-options'; @@ -138,7 +139,7 @@ async function handleExport() { - 导出 + {{ $t('page.action.export') }}
diff --git a/apps/web-ele/src/views/mall/trade/afterSale/modules/disagree-form.vue b/apps/web-ele/src/views/mall/trade/afterSale/modules/disagree-form.vue index 47f8a365a..8675c0553 100644 --- a/apps/web-ele/src/views/mall/trade/afterSale/modules/disagree-form.vue +++ b/apps/web-ele/src/views/mall/trade/afterSale/modules/disagree-form.vue @@ -9,7 +9,7 @@ import { $t } from '@vben/locales'; import { ElMessage } from 'element-plus'; import { useVbenForm } from '#/adapter/form'; -import * as AfterSaleApi from '#/api/mall/trade/afterSale/index'; +import { disagreeAfterSale } from '#/api/mall/trade/afterSale'; import { useDisagreeFormSchema } from '../data'; @@ -40,7 +40,7 @@ const [Modal, modalApi] = useVbenModal({ try { const data = (await formApi.getValues()) as MallAfterSaleApi.DisagreeRequest; - await AfterSaleApi.disagreeAfterSale(data); + await disagreeAfterSale(data); // 关闭并提示 await modalApi.close(); emit('success'); diff --git a/apps/web-ele/src/views/mall/trade/brokerage/user/index.vue b/apps/web-ele/src/views/mall/trade/brokerage/user/index.vue index d66be3c56..5b7d958dc 100644 --- a/apps/web-ele/src/views/mall/trade/brokerage/user/index.vue +++ b/apps/web-ele/src/views/mall/trade/brokerage/user/index.vue @@ -93,18 +93,14 @@ async function handleBrokerageEnabledChange( }) .then(async () => { // 更新推广资格 - const res = await updateBrokerageEnabled({ + await updateBrokerageEnabled({ id: row.id!, enabled: newEnabled, }); - if (res) { - // 提示并返回成功 - ElMessage.success($t('ui.actionMessage.operationSuccess')); - handleRefresh(); - resolve(true); - } else { - reject(new Error('更新失败')); - } + // 提示并返回成功 + ElMessage.success($t('ui.actionMessage.operationSuccess')); + handleRefresh(); + resolve(true); }) .catch(() => { reject(new Error('取消操作')); diff --git a/apps/web-ele/src/views/mall/trade/order/detail/index.vue b/apps/web-ele/src/views/mall/trade/order/detail/index.vue index d0700e91c..bb4629305 100644 --- a/apps/web-ele/src/views/mall/trade/order/detail/index.vue +++ b/apps/web-ele/src/views/mall/trade/order/detail/index.vue @@ -18,9 +18,10 @@ import { useTabs } from '@vben/hooks'; import { ElCard, ElLoading, ElMessage, ElTag } from 'element-plus'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; -import * as DeliveryExpressApi from '#/api/mall/trade/delivery/express'; -import * as DeliveryPickUpStoreApi from '#/api/mall/trade/delivery/pickUpStore'; +import { getSimpleDeliveryExpressList } from '#/api/mall/trade/delivery/express'; +import { getDeliveryPickUpStore } from '#/api/mall/trade/delivery/pickUpStore'; import * as TradeOrderApi from '#/api/mall/trade/order'; +import { getExpressTrackList } from '#/api/mall/trade/order'; import { useDescription } from '#/components/description'; import { DictTag } from '#/components/dict-tag'; import { TableAction } from '#/components/table-action'; @@ -169,12 +170,9 @@ async function getDetail() { // 如果配送方式为快递,则查询物流公司 if (res.deliveryType === DeliveryTypeEnum.EXPRESS.type) { - deliveryExpressList.value = - await DeliveryExpressApi.getSimpleDeliveryExpressList(); + deliveryExpressList.value = await getSimpleDeliveryExpressList(); if (res.logisticsId) { - expressTrackList.value = await TradeOrderApi.getExpressTrackList( - res.id!, - ); + expressTrackList.value = await getExpressTrackList(res.id!); expressTrackGridApi.setGridOptions({ data: expressTrackList.value || [], }); @@ -183,9 +181,7 @@ async function getDetail() { res.deliveryType === DeliveryTypeEnum.PICK_UP.type && res.pickUpStoreId ) { - pickUpStore.value = await DeliveryPickUpStoreApi.getDeliveryPickUpStore( - res.pickUpStoreId, - ); + pickUpStore.value = await getDeliveryPickUpStore(res.pickUpStoreId); } } finally { loading.value = false; diff --git a/apps/web-ele/src/views/pay/notify/data.ts b/apps/web-ele/src/views/pay/notify/data.ts index d94c31865..5917b416c 100644 --- a/apps/web-ele/src/views/pay/notify/data.ts +++ b/apps/web-ele/src/views/pay/notify/data.ts @@ -90,7 +90,6 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { ...getRangePickerDefaultProps(), clearable: true, - placeholder: ['开始日期', '结束日期'], }, }, ]; diff --git a/apps/web-ele/src/views/pay/notify/modules/detail.vue b/apps/web-ele/src/views/pay/notify/modules/detail.vue index 0375c6fa3..d5b7bb71c 100644 --- a/apps/web-ele/src/views/pay/notify/modules/detail.vue +++ b/apps/web-ele/src/views/pay/notify/modules/detail.vue @@ -19,8 +19,6 @@ const formData = ref(); const [Description] = useDescription({ border: true, column: 2, - direction: 'horizontal', - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/pay/order/modules/detail.vue b/apps/web-ele/src/views/pay/order/modules/detail.vue index 452e63e18..99c261d77 100644 --- a/apps/web-ele/src/views/pay/order/modules/detail.vue +++ b/apps/web-ele/src/views/pay/order/modules/detail.vue @@ -15,7 +15,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 2, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/pay/refund/modules/detail.vue b/apps/web-ele/src/views/pay/refund/modules/detail.vue index 7b02d9889..1b93a77e6 100644 --- a/apps/web-ele/src/views/pay/refund/modules/detail.vue +++ b/apps/web-ele/src/views/pay/refund/modules/detail.vue @@ -13,8 +13,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 2, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/pay/transfer/modules/detail.vue b/apps/web-ele/src/views/pay/transfer/modules/detail.vue index deb23fabf..86dd91569 100644 --- a/apps/web-ele/src/views/pay/transfer/modules/detail.vue +++ b/apps/web-ele/src/views/pay/transfer/modules/detail.vue @@ -13,8 +13,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 2, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/loginlog/modules/detail.vue b/apps/web-ele/src/views/system/loginlog/modules/detail.vue index 773069b9f..d1c9bea00 100644 --- a/apps/web-ele/src/views/system/loginlog/modules/detail.vue +++ b/apps/web-ele/src/views/system/loginlog/modules/detail.vue @@ -12,8 +12,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 1, - labelWidth: 110, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/mail/log/modules/detail.vue b/apps/web-ele/src/views/system/mail/log/modules/detail.vue index e70243d8b..ab0daa76e 100644 --- a/apps/web-ele/src/views/system/mail/log/modules/detail.vue +++ b/apps/web-ele/src/views/system/mail/log/modules/detail.vue @@ -12,8 +12,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 2, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/notify/message/modules/detail.vue b/apps/web-ele/src/views/system/notify/message/modules/detail.vue index 0db8555f5..f7dbc8f58 100644 --- a/apps/web-ele/src/views/system/notify/message/modules/detail.vue +++ b/apps/web-ele/src/views/system/notify/message/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/notify/my/modules/detail.vue b/apps/web-ele/src/views/system/notify/my/modules/detail.vue index 0db8555f5..f7dbc8f58 100644 --- a/apps/web-ele/src/views/system/notify/my/modules/detail.vue +++ b/apps/web-ele/src/views/system/notify/my/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/operatelog/modules/detail.vue b/apps/web-ele/src/views/system/operatelog/modules/detail.vue index d9d224f55..f4d8ae922 100644 --- a/apps/web-ele/src/views/system/operatelog/modules/detail.vue +++ b/apps/web-ele/src/views/system/operatelog/modules/detail.vue @@ -14,7 +14,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - labelWidth: 110, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/sms/log/modules/detail.vue b/apps/web-ele/src/views/system/sms/log/modules/detail.vue index 4fcd48df9..37af10f7e 100644 --- a/apps/web-ele/src/views/system/sms/log/modules/detail.vue +++ b/apps/web-ele/src/views/system/sms/log/modules/detail.vue @@ -12,9 +12,8 @@ import { useDetailSchema } from '../data'; const formData = ref(); const [Descriptions] = useDescription({ + border: true, column: 2, - direction: 'horizontal', - labelWidth: 140, schema: useDetailSchema(), }); diff --git a/apps/web-ele/src/views/system/social/user/modules/detail.vue b/apps/web-ele/src/views/system/social/user/modules/detail.vue index a70a29247..a4edf0018 100644 --- a/apps/web-ele/src/views/system/social/user/modules/detail.vue +++ b/apps/web-ele/src/views/system/social/user/modules/detail.vue @@ -16,8 +16,6 @@ const formData = ref(); const [Descriptions] = useDescription({ border: true, column: 1, - size: 'large', - labelWidth: 185, schema: useDetailSchema(), }); From cbe7797a1c998d180469fcffd973734245b97480 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sat, 1 Nov 2025 22:55:45 +0800 Subject: [PATCH 084/544] =?UTF-8?q?feat:=20[antd]=20[bpm]=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=AF=84=E5=AE=A1=20todo=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bpm/model/definition/index.vue | 9 ++++--- .../src/views/bpm/model/form/index.vue | 2 -- .../model/form/modules/bpm-model-editor.vue | 10 +++---- .../modules/category-draggable-model.vue | 26 +++++++------------ .../bpm/processInstance/detail/index.vue | 11 ++++---- .../detail/modules/operation-button.vue | 6 +---- 6 files changed, 26 insertions(+), 38 deletions(-) diff --git a/apps/web-antd/src/views/bpm/model/definition/index.vue b/apps/web-antd/src/views/bpm/model/definition/index.vue index 759086bbb..d1c8bb7fb 100644 --- a/apps/web-antd/src/views/bpm/model/definition/index.vue +++ b/apps/web-antd/src/views/bpm/model/definition/index.vue @@ -32,15 +32,18 @@ function handleRefresh() { } /** 查看表单详情 */ -function handleFormDetail(row: BpmProcessDefinitionApi.ProcessDefinition) { +async function handleFormDetail( + row: BpmProcessDefinitionApi.ProcessDefinition, +) { if (row.formType === BpmModelFormType.NORMAL) { const data = { id: row.formId, }; formCreateDetailModalApi.setData(data).open(); } else { - // TODO 待实现 jason 这里要改么? - console.warn('业务表单待实现', row); + await router.push({ + path: row.formCustomCreatePath, + }); } } diff --git a/apps/web-antd/src/views/bpm/model/form/index.vue b/apps/web-antd/src/views/bpm/model/form/index.vue index 713bd440b..0a706750f 100644 --- a/apps/web-antd/src/views/bpm/model/form/index.vue +++ b/apps/web-antd/src/views/bpm/model/form/index.vue @@ -309,8 +309,6 @@ async function handleSave() { } } catch (error: any) { console.error('保存失败:', error); - // TODO @jason:这个提示,还要么??? - // message.warning(error.msg || '请完善所有步骤的必填信息'); } } diff --git a/apps/web-antd/src/views/bpm/model/form/modules/bpm-model-editor.vue b/apps/web-antd/src/views/bpm/model/form/modules/bpm-model-editor.vue index 781ab2a92..782c8974d 100644 --- a/apps/web-antd/src/views/bpm/model/form/modules/bpm-model-editor.vue +++ b/apps/web-antd/src/views/bpm/model/form/modules/bpm-model-editor.vue @@ -121,11 +121,9 @@ onBeforeUnmount(() => { /> - diff --git a/apps/web-antd/src/views/bpm/model/modules/category-draggable-model.vue b/apps/web-antd/src/views/bpm/model/modules/category-draggable-model.vue index e285077d2..1188b4ea7 100644 --- a/apps/web-antd/src/views/bpm/model/modules/category-draggable-model.vue +++ b/apps/web-antd/src/views/bpm/model/modules/category-draggable-model.vue @@ -238,15 +238,16 @@ async function handleDeleteCategory() { } /** 处理表单详情点击 */ -function handleFormDetail(row: any) { +async function handleFormDetail(row: any) { if (row.formType === BpmModelFormType.NORMAL) { const data = { id: row.formId, }; formCreateDetailModalApi.setData(data).open(); } else { - // TODO 待实现 jason:是不是已经 ok 啦? - console.warn('业务表单待实现', row); + await router.push({ + path: row.formCustomCreatePath, + }); } } @@ -547,7 +548,7 @@ function handleRenameSuccess() { - diff --git a/apps/web-antd/src/views/bpm/processInstance/detail/index.vue b/apps/web-antd/src/views/bpm/processInstance/detail/index.vue index 578f9aaaf..d22cb7288 100644 --- a/apps/web-antd/src/views/bpm/processInstance/detail/index.vue +++ b/apps/web-antd/src/views/bpm/processInstance/detail/index.vue @@ -183,14 +183,13 @@ function setFieldPermission(field: string, permission: string) { } } -// TODO @jason:这个还要么? /** * 操作成功后刷新 */ -// const refresh = () => { -// // 重新获取详情 -// getDetail(); -// }; +const refresh = () => { + // 重新获取详情 + getDetail(); +}; /** 监听 Tab 切换,当切换到 "record" 标签时刷新任务列表 */ watch( @@ -369,7 +368,7 @@ onMounted(async () => { :normal-form="detailForm" :normal-form-api="fApi" :writable-fields="writableFields" - @success="getDetail" + @success="refresh" />
diff --git a/apps/web-antd/src/views/bpm/processInstance/detail/modules/operation-button.vue b/apps/web-antd/src/views/bpm/processInstance/detail/modules/operation-button.vue index b6ab093fd..c7536dc15 100644 --- a/apps/web-antd/src/views/bpm/processInstance/detail/modules/operation-button.vue +++ b/apps/web-antd/src/views/bpm/processInstance/detail/modules/operation-button.vue @@ -700,9 +700,6 @@ defineExpose({ loadTodoTask }); - - diff --git a/apps/web-antd/src/views/mall/promotion/kefu/components/message/MessageItem.vue b/apps/web-antd/src/views/mall/promotion/kefu/components/message/MessageItem.vue index 22464b134..ceaefc0e3 100644 --- a/apps/web-antd/src/views/mall/promotion/kefu/components/message/MessageItem.vue +++ b/apps/web-antd/src/views/mall/promotion/kefu/components/message/MessageItem.vue @@ -3,14 +3,15 @@ import type { MallKefuMessageApi } from '#/api/mall/promotion/kefu/message'; import { UserTypeEnum } from '@vben/constants'; +/** 消息组件 */ defineOptions({ name: 'MessageItem' }); + defineProps<{ message: MallKefuMessageApi.Message; }>(); diff --git a/apps/web-antd/src/views/mall/promotion/kefu/components/tools/constants.ts b/apps/web-antd/src/views/mall/promotion/kefu/components/tools/constants.ts index a4d747ede..266a6cf02 100644 --- a/apps/web-antd/src/views/mall/promotion/kefu/components/tools/constants.ts +++ b/apps/web-antd/src/views/mall/promotion/kefu/components/tools/constants.ts @@ -1,4 +1,4 @@ -// 客服消息类型枚举类 +/** 客服消息类型枚举类 */ export const KeFuMessageContentTypeEnum = { TEXT: 1, // 文本消息 IMAGE: 2, // 图片消息 @@ -10,7 +10,7 @@ export const KeFuMessageContentTypeEnum = { ORDER: 11, // 订单消息" }; -// Promotion 的 WebSocket 消息类型枚举类 +/** Promotion 的 WebSocket 消息类型枚举类 */ export const WebSocketMessageTypeConstants = { KEFU_MESSAGE_TYPE: 'kefu_message_type', // 客服消息类型 KEFU_MESSAGE_ADMIN_READ: 'kefu_message_read_status_change', // 客服消息管理员已读 diff --git a/apps/web-antd/src/views/mall/promotion/kefu/components/tools/emoji.ts b/apps/web-antd/src/views/mall/promotion/kefu/components/tools/emoji.ts index 5481ce065..628696807 100644 --- a/apps/web-antd/src/views/mall/promotion/kefu/components/tools/emoji.ts +++ b/apps/web-antd/src/views/mall/promotion/kefu/components/tools/emoji.ts @@ -101,11 +101,7 @@ export const useEmoji = () => { return newData; }; - /** - * 获得所有表情 - * - * @return 表情列表 - */ + /** 获得所有表情 */ function getEmojiList(): Emoji[] { return emojiList.map((item) => ({ url: getEmojiFileByName(item.name), diff --git a/apps/web-antd/src/views/mall/promotion/kefu/index.vue b/apps/web-antd/src/views/mall/promotion/kefu/index.vue index 4197d7fde..1d52a1179 100644 --- a/apps/web-antd/src/views/mall/promotion/kefu/index.vue +++ b/apps/web-antd/src/views/mall/promotion/kefu/index.vue @@ -5,7 +5,7 @@ import { Page } from '@vben/common-ui'; import { useAccessStore } from '@vben/stores'; import { useWebSocket } from '@vueuse/core'; -import message from 'ant-design-vue'; +import { message } from 'ant-design-vue'; import { useMallKefuStore } from '#/store/mall/kefu'; @@ -80,6 +80,7 @@ watch( /** 加载指定会话的消息列表 */ const keFuChatBoxRef = ref>(); const memberInfoRef = ref>(); +// TODO @jawe:这里没导入 const handleChange = (conversation: KeFuConversationRespVO) => { keFuChatBoxRef.value?.getNewMessageList(conversation); memberInfoRef.value?.initHistory(conversation); @@ -88,7 +89,7 @@ const handleChange = (conversation: KeFuConversationRespVO) => { const keFuConversationRef = ref>(); /** 初始化 */ onMounted(() => { - /** 加载会话列表 */ + // 加载会话列表 kefuStore.setConversationList().then(() => { keFuConversationRef.value?.calculationLastMessageTime(); }); @@ -105,6 +106,7 @@ onBeforeUnmount(() => { - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/image-bar/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/image-bar/index.vue index 08cf5ba34..5e9d2a53d 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/image-bar/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/image-bar/index.vue @@ -17,5 +17,5 @@ defineProps<{ property: ImageBarProperty }>(); >
- + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue index e1cd58bc6..1092b097b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-card/index.vue @@ -13,8 +13,8 @@ defineProps<{ property: UserCardProperty }>(); \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue index 1c171b3eb..b22c9e576 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue @@ -13,4 +13,4 @@ defineProps<{ property: UserOrderProperty }>(); - \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue index 2f9abe556..e670a1e44 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/property.vue @@ -17,4 +17,4 @@ const formData = useVModel(props, 'modelValue', emit); \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue index 4eabad045..f23986193 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/user-wallet/index.vue @@ -13,4 +13,4 @@ defineProps<{ property: UserWalletProperty }>(); - \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue index c576d8f76..248777f55 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue @@ -40,7 +40,7 @@ const formData = useVModel(props, 'modelValue', emit); :file-type="['mp4']" :limit="1" :file-size="100" - class="min-w-[80px]" + class="min-w-20" /> @@ -49,7 +49,7 @@ const formData = useVModel(props, 'modelValue', emit); draggable="false" height="80px" width="100%" - class="min-w-[80px]" + class="min-w-20" :show-description="false" > @@ -60,4 +60,4 @@ const formData = useVModel(props, 'modelValue', emit); - \ No newline at end of file + diff --git a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue index b985a8142..9223bb11c 100644 --- a/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/magic-cube-editor/index.vue @@ -255,11 +255,11 @@ const eachCube = (callback: (x: number, y: number, cube: Cube) => void) => { .cube { box-sizing: border-box; + line-height: 1; color: var(--el-text-color-secondary); text-align: center; cursor: pointer; border: 1px solid var(--el-border-color); - line-height: 1; :deep(.iconify) { display: inline-block; From 1a3ce89f4b2a54c1dd21a6a672acfc0fbd5ebf23 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 2 Nov 2025 12:10:46 +0800 Subject: [PATCH 092/544] =?UTF-8?q?review=EF=BC=9A=E3=80=90antd=E3=80=91?= =?UTF-8?q?=E3=80=90ele=E3=80=91member=20=E5=A2=9E=E5=8A=A0=20order-list?= =?UTF-8?q?=20=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/mall/trade/order/index.vue | 2 +- .../src/views/member/user/detail/index.vue | 6 +- .../user/detail/modules/account-info.vue | 4 +- .../member/user/detail/modules/basic-info.vue | 14 +- .../member/user/detail/modules/order-list.vue | 128 +++++++++ .../src/views/mall/trade/order/index.vue | 4 +- .../src/views/member/user/detail/index.vue | 8 +- .../user/detail/modules/account-info.vue | 1 - .../member/user/detail/modules/basic-info.vue | 1 - .../member/user/detail/modules/order-list.vue | 133 +++++++++ .../user/detail/modules/user-order-list.vue | 264 ------------------ 11 files changed, 280 insertions(+), 285 deletions(-) create mode 100644 apps/web-antd/src/views/member/user/detail/modules/order-list.vue create mode 100644 apps/web-ele/src/views/member/user/detail/modules/order-list.vue delete mode 100644 apps/web-ele/src/views/member/user/detail/modules/user-order-list.vue diff --git a/apps/web-antd/src/views/mall/trade/order/index.vue b/apps/web-antd/src/views/mall/trade/order/index.vue index 84387940e..dbd2e2145 100644 --- a/apps/web-antd/src/views/mall/trade/order/index.vue +++ b/apps/web-antd/src/views/mall/trade/order/index.vue @@ -117,7 +117,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ {{ property.propertyName }} : {{ property.valueName }} diff --git a/apps/web-antd/src/views/member/user/detail/index.vue b/apps/web-antd/src/views/member/user/detail/index.vue index 991c3fa49..b0c0d322f 100644 --- a/apps/web-antd/src/views/member/user/detail/index.vue +++ b/apps/web-antd/src/views/member/user/detail/index.vue @@ -20,6 +20,7 @@ import AddressList from './modules/address-list.vue'; import BalanceList from './modules/balance-list.vue'; import BasicInfo from './modules/basic-info.vue'; import ExperienceRecordList from './modules/experience-record-list.vue'; +import OrderList from './modules/order-list.vue'; import PointList from './modules/point-list.vue'; import SignList from './modules/sign-list.vue'; @@ -100,10 +101,7 @@ onMounted(async () => { - -
-

订单管理

-
+
diff --git a/apps/web-antd/src/views/member/user/detail/modules/account-info.vue b/apps/web-antd/src/views/member/user/detail/modules/account-info.vue index d148e5158..1bc7a0c9c 100644 --- a/apps/web-antd/src/views/member/user/detail/modules/account-info.vue +++ b/apps/web-antd/src/views/member/user/detail/modules/account-info.vue @@ -8,7 +8,7 @@ import { Card } from 'ant-design-vue'; import { useDescription } from '#/components/description'; -withDefaults( +const props = withDefaults( defineProps<{ mode?: 'kefu' | 'member'; user: MemberUserApi.User; @@ -20,6 +20,8 @@ withDefaults( ); const [Descriptions] = useDescription({ + bordered: false, + column: props.mode === 'member' ? 2 : 1, schema: [ { field: 'levelName', diff --git a/apps/web-antd/src/views/member/user/detail/modules/basic-info.vue b/apps/web-antd/src/views/member/user/detail/modules/basic-info.vue index e19dd298f..c3a8b4294 100644 --- a/apps/web-antd/src/views/member/user/detail/modules/basic-info.vue +++ b/apps/web-antd/src/views/member/user/detail/modules/basic-info.vue @@ -11,7 +11,7 @@ import { Avatar, Card, Col, Row } from 'ant-design-vue'; import { useDescription } from '#/components/description'; import { DictTag } from '#/components/dict-tag'; -withDefaults( +const props = withDefaults( defineProps<{ mode?: 'kefu' | 'member'; user: MemberUserApi.User }>(), { mode: 'member', @@ -19,6 +19,8 @@ withDefaults( ); const [Descriptions] = useDescription({ + bordered: false, + column: props.mode === 'member' ? 2 : 1, schema: [ { field: 'name', @@ -35,10 +37,10 @@ const [Descriptions] = useDescription({ { field: 'sex', label: '性别', - content: (data) => + render: (val) => h(DictTag, { type: DICT_TYPE.SYSTEM_USER_SEX, - value: data.sex, + value: val, }), }, { @@ -52,17 +54,17 @@ const [Descriptions] = useDescription({ { field: 'birthday', label: '生日', - content: (data) => formatDate(data.birthday)?.toString() || '-', + render: (val) => formatDate(val)?.toString() || '-', }, { field: 'createTime', label: '注册时间', - content: (data) => formatDate(data.createTime)?.toString() || '-', + render: (val) => formatDate(val)?.toString() || '-', }, { field: 'loginDate', label: '最后登录时间', - content: (data) => formatDate(data.loginDate)?.toString() || '-', + render: (val) => formatDate(val)?.toString() || '-', }, ], }); diff --git a/apps/web-antd/src/views/member/user/detail/modules/order-list.vue b/apps/web-antd/src/views/member/user/detail/modules/order-list.vue new file mode 100644 index 000000000..23b5e1b30 --- /dev/null +++ b/apps/web-antd/src/views/member/user/detail/modules/order-list.vue @@ -0,0 +1,128 @@ + + + diff --git a/apps/web-ele/src/views/mall/trade/order/index.vue b/apps/web-ele/src/views/mall/trade/order/index.vue index ac9a14238..c19b0fdf4 100644 --- a/apps/web-ele/src/views/mall/trade/order/index.vue +++ b/apps/web-ele/src/views/mall/trade/order/index.vue @@ -122,7 +122,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ {{ item.spuName }} @@ -133,7 +133,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ class="flex items-center justify-between text-xs text-gray-500" > - 原价:{{ fenToYuan(item.price) }} 元 / 数量:{{ + 原价:{{ fenToYuan(item.price!) }} 元 / 数量:{{ item.count }}个 diff --git a/apps/web-ele/src/views/member/user/detail/index.vue b/apps/web-ele/src/views/member/user/detail/index.vue index 19d3b5e69..1fdb3d4ff 100644 --- a/apps/web-ele/src/views/member/user/detail/index.vue +++ b/apps/web-ele/src/views/member/user/detail/index.vue @@ -19,6 +19,7 @@ import AccountInfo from './modules/account-info.vue'; import BalanceList from './modules/balance-list.vue'; import BasicInfo from './modules/basic-info.vue'; import ExperienceRecordList from './modules/experience-record-list.vue'; +import OrderList from './modules/order-list.vue'; import PointList from './modules/point-list.vue'; import SignList from './modules/sign-list.vue'; import UserAddressList from './modules/user-address-list.vue'; @@ -26,7 +27,6 @@ import UserAfterSaleList from './modules/user-after-sale-list.vue'; import UserBrokerageList from './modules/user-brokerage-list.vue'; import UserCouponList from './modules/user-coupon-list.vue'; import UserFavoriteList from './modules/user-favorite-list.vue'; -import UserOrderList from './modules/user-order-list.vue'; const route = useRoute(); const { closeCurrentTab, refreshTab } = useTabs(); @@ -70,6 +70,7 @@ onMounted(async () => {
+ From cb9aaa338c4f218b216da5f73848ade107c9c68c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 18:36:53 +0800 Subject: [PATCH 353/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91stock=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=8850%=EF=BC=89-=20in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/erp/stock/check/index.vue | 2 ++ apps/web-antd/src/views/erp/stock/in/index.vue | 2 ++ apps/web-antd/src/views/erp/stock/move/index.vue | 2 ++ apps/web-antd/src/views/erp/stock/out/index.vue | 2 ++ apps/web-ele/src/views/erp/stock/check/index.vue | 2 +- .../src/views/erp/stock/check/modules/item-form.vue | 1 - apps/web-ele/src/views/erp/stock/in/index.vue | 13 ++++++++++++- .../src/views/erp/stock/in/modules/item-form.vue | 1 - .../src/views/erp/stock/move/modules/item-form.vue | 1 - .../src/views/erp/stock/out/modules/item-form.vue | 1 - 10 files changed, 21 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/erp/stock/check/index.vue b/apps/web-antd/src/views/erp/stock/check/index.vue index de34ab122..3edef5eb3 100644 --- a/apps/web-antd/src/views/erp/stock/check/index.vue +++ b/apps/web-antd/src/views/erp/stock/check/index.vue @@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-check:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -210,6 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:stock-check:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-antd/src/views/erp/stock/in/index.vue b/apps/web-antd/src/views/erp/stock/in/index.vue index a7045c392..4b362c25f 100644 --- a/apps/web-antd/src/views/erp/stock/in/index.vue +++ b/apps/web-antd/src/views/erp/stock/in/index.vue @@ -193,6 +193,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-in:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -207,6 +208,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:stock-in:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-antd/src/views/erp/stock/move/index.vue b/apps/web-antd/src/views/erp/stock/move/index.vue index ee9b6177b..f5da612cd 100644 --- a/apps/web-antd/src/views/erp/stock/move/index.vue +++ b/apps/web-antd/src/views/erp/stock/move/index.vue @@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-move:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -210,6 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:stock-move:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-antd/src/views/erp/stock/out/index.vue b/apps/web-antd/src/views/erp/stock/out/index.vue index bcaa9cc26..8cd238561 100644 --- a/apps/web-antd/src/views/erp/stock/out/index.vue +++ b/apps/web-antd/src/views/erp/stock/out/index.vue @@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-out:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -210,6 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:stock-out:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-ele/src/views/erp/stock/check/index.vue b/apps/web-ele/src/views/erp/stock/check/index.vue index cbfe22f1b..144ab7619 100644 --- a/apps/web-ele/src/views/erp/stock/check/index.vue +++ b/apps/web-ele/src/views/erp/stock/check/index.vue @@ -196,7 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.AUDIT : ACTION_ICON.REJECT, + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-check:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/stock/check/modules/item-form.vue b/apps/web-ele/src/views/erp/stock/check/modules/item-form.vue index 010326580..0239140c5 100644 --- a/apps/web-ele/src/views/erp/stock/check/modules/item-form.vue +++ b/apps/web-ele/src/views/erp/stock/check/modules/item-form.vue @@ -275,7 +275,6 @@ onMounted(async () => { label: '删除', type: 'danger', link: true, - icon: 'ant-design:delete-outlined', popConfirm: { title: '确认删除该产品吗?', confirm: handleDelete.bind(null, row), diff --git a/apps/web-ele/src/views/erp/stock/in/index.vue b/apps/web-ele/src/views/erp/stock/in/index.vue index e610753b1..4f6e1da26 100644 --- a/apps/web-ele/src/views/erp/stock/in/index.vue +++ b/apps/web-ele/src/views/erp/stock/in/index.vue @@ -155,6 +155,17 @@ const [Grid, gridApi] = useVbenVxeGrid({ auth: ['erp:stock-in:export'], onClick: handleExport, }, + { + label: '批量删除', + type: 'danger', + disabled: isEmpty(checkedIds), + icon: ACTION_ICON.DELETE, + auth: ['erp:stock-in:delete'], + popConfirm: { + title: `是否删除所选中数据?`, + confirm: handleDelete.bind(null, checkedIds), + }, + }, ]" /> @@ -182,7 +193,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.AUDIT : ACTION_ICON.REJECT, + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-in:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/stock/in/modules/item-form.vue b/apps/web-ele/src/views/erp/stock/in/modules/item-form.vue index b239ae826..5cda5f879 100644 --- a/apps/web-ele/src/views/erp/stock/in/modules/item-form.vue +++ b/apps/web-ele/src/views/erp/stock/in/modules/item-form.vue @@ -264,7 +264,6 @@ onMounted(async () => { label: '删除', type: 'danger', link: true, - icon: 'ant-design:delete-outlined', popConfirm: { title: '确认删除该产品吗?', confirm: handleDelete.bind(null, row), diff --git a/apps/web-ele/src/views/erp/stock/move/modules/item-form.vue b/apps/web-ele/src/views/erp/stock/move/modules/item-form.vue index 3a06d56a1..4e94d1d44 100644 --- a/apps/web-ele/src/views/erp/stock/move/modules/item-form.vue +++ b/apps/web-ele/src/views/erp/stock/move/modules/item-form.vue @@ -285,7 +285,6 @@ onMounted(async () => { label: '删除', type: 'danger', link: true, - icon: 'ant-design:delete-outlined', popConfirm: { title: '确认删除该产品吗?', confirm: handleDelete.bind(null, row), diff --git a/apps/web-ele/src/views/erp/stock/out/modules/item-form.vue b/apps/web-ele/src/views/erp/stock/out/modules/item-form.vue index 36c96a398..fb363f80f 100644 --- a/apps/web-ele/src/views/erp/stock/out/modules/item-form.vue +++ b/apps/web-ele/src/views/erp/stock/out/modules/item-form.vue @@ -262,7 +262,6 @@ onMounted(async () => { label: '删除', type: 'danger', link: true, - icon: 'ant-design:delete-outlined', popConfirm: { title: '确认删除该产品吗?', confirm: handleDelete.bind(null, row), From bb749844fe77b497684133566fbb036fb0b0cbb4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 18:41:46 +0800 Subject: [PATCH 354/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91stock=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=88100%=EF=BC=89-=20move=E3=80=81out?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/erp/stock/move/data.ts | 2 +- apps/web-antd/src/views/erp/stock/out/data.ts | 2 +- apps/web-ele/src/views/erp/stock/move/index.vue | 13 ++++++++++++- apps/web-ele/src/views/erp/stock/out/index.vue | 13 ++++++++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/erp/stock/move/data.ts b/apps/web-antd/src/views/erp/stock/move/data.ts index 74c2db117..89a148a17 100644 --- a/apps/web-antd/src/views/erp/stock/move/data.ts +++ b/apps/web-antd/src/views/erp/stock/move/data.ts @@ -307,7 +307,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 220, + width: 260, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/erp/stock/out/data.ts b/apps/web-antd/src/views/erp/stock/out/data.ts index 3fb67b704..4a2668d93 100644 --- a/apps/web-antd/src/views/erp/stock/out/data.ts +++ b/apps/web-antd/src/views/erp/stock/out/data.ts @@ -331,7 +331,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 220, + width: 260, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-ele/src/views/erp/stock/move/index.vue b/apps/web-ele/src/views/erp/stock/move/index.vue index 67c91a326..c0a64812b 100644 --- a/apps/web-ele/src/views/erp/stock/move/index.vue +++ b/apps/web-ele/src/views/erp/stock/move/index.vue @@ -158,6 +158,17 @@ const [Grid, gridApi] = useVbenVxeGrid({ auth: ['erp:stock-move:export'], onClick: handleExport, }, + { + label: '批量删除', + type: 'danger', + disabled: isEmpty(checkedIds), + icon: ACTION_ICON.DELETE, + auth: ['erp:stock-move:delete'], + popConfirm: { + title: `是否删除所选中数据?`, + confirm: handleDelete.bind(null, checkedIds), + }, + }, ]" /> @@ -185,7 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.AUDIT : ACTION_ICON.REJECT, + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-move:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/stock/out/index.vue b/apps/web-ele/src/views/erp/stock/out/index.vue index a44a8d93f..96c244e09 100644 --- a/apps/web-ele/src/views/erp/stock/out/index.vue +++ b/apps/web-ele/src/views/erp/stock/out/index.vue @@ -158,6 +158,17 @@ const [Grid, gridApi] = useVbenVxeGrid({ auth: ['erp:stock-out:export'], onClick: handleExport, }, + { + label: '批量删除', + type: 'danger', + disabled: isEmpty(checkedIds), + icon: ACTION_ICON.DELETE, + auth: ['erp:stock-out:delete'], + popConfirm: { + title: `是否删除所选中数据?`, + confirm: handleDelete.bind(null, checkedIds), + }, + }, ]" /> @@ -185,7 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.AUDIT : ACTION_ICON.REJECT, + icon: ACTION_ICON.AUDIT, auth: ['erp:stock-out:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, From 6e2e357feddd851b957ee5b178ac6f1ca48f33d1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 19:02:31 +0800 Subject: [PATCH 355/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91sale=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=8810%=EF=BC=89-=20=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/erp/sale/customer/data.ts | 241 +++++++ .../src/views/erp/sale/customer/index.vue | 149 ++++ .../views/erp/sale/customer/modules/form.vue | 86 +++ apps/web-ele/src/views/erp/sale/order/data.ts | 465 +++++++++++++ .../src/views/erp/sale/order/index.vue | 226 +++++++ .../src/views/erp/sale/order/modules/form.vue | 162 +++++ .../erp/sale/order/modules/item-form.vue | 328 +++++++++ apps/web-ele/src/views/erp/sale/out/data.ts | 636 ++++++++++++++++++ apps/web-ele/src/views/erp/sale/out/index.vue | 223 ++++++ .../src/views/erp/sale/out/modules/form.vue | 226 +++++++ .../views/erp/sale/out/modules/item-form.vue | 310 +++++++++ .../sale/out/modules/sale-order-select.vue | 123 ++++ .../web-ele/src/views/erp/sale/return/data.ts | 623 +++++++++++++++++ .../src/views/erp/sale/return/index.vue | 226 +++++++ .../views/erp/sale/return/modules/form.vue | 231 +++++++ .../erp/sale/return/modules/item-form.vue | 310 +++++++++ .../sale/return/modules/sale-order-select.vue | 123 ++++ 17 files changed, 4688 insertions(+) create mode 100644 apps/web-ele/src/views/erp/sale/customer/data.ts create mode 100644 apps/web-ele/src/views/erp/sale/customer/index.vue create mode 100644 apps/web-ele/src/views/erp/sale/customer/modules/form.vue create mode 100644 apps/web-ele/src/views/erp/sale/order/data.ts create mode 100644 apps/web-ele/src/views/erp/sale/order/index.vue create mode 100644 apps/web-ele/src/views/erp/sale/order/modules/form.vue create mode 100644 apps/web-ele/src/views/erp/sale/order/modules/item-form.vue create mode 100644 apps/web-ele/src/views/erp/sale/out/data.ts create mode 100644 apps/web-ele/src/views/erp/sale/out/index.vue create mode 100644 apps/web-ele/src/views/erp/sale/out/modules/form.vue create mode 100644 apps/web-ele/src/views/erp/sale/out/modules/item-form.vue create mode 100644 apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue create mode 100644 apps/web-ele/src/views/erp/sale/return/data.ts create mode 100644 apps/web-ele/src/views/erp/sale/return/index.vue create mode 100644 apps/web-ele/src/views/erp/sale/return/modules/form.vue create mode 100644 apps/web-ele/src/views/erp/sale/return/modules/item-form.vue create mode 100644 apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue diff --git a/apps/web-ele/src/views/erp/sale/customer/data.ts b/apps/web-ele/src/views/erp/sale/customer/data.ts new file mode 100644 index 000000000..adfdd5675 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/customer/data.ts @@ -0,0 +1,241 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; + +import { z } from '#/adapter/form'; + +/** 新增/修改的表单 */ +export function useFormSchema(): VbenFormSchema[] { + return [ + { + component: 'Input', + fieldName: 'id', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + component: 'Input', + fieldName: 'name', + label: '客户名称', + rules: 'required', + componentProps: { + placeholder: '请输入客户名称', + }, + }, + { + fieldName: 'contact', + label: '联系人', + component: 'Input', + componentProps: { + placeholder: '请输入联系人', + }, + }, + { + fieldName: 'mobile', + label: '手机号码', + component: 'Input', + componentProps: { + placeholder: '请输入手机号码', + }, + }, + { + fieldName: 'telephone', + label: '联系电话', + component: 'Input', + componentProps: { + placeholder: '请输入联系电话', + }, + }, + { + fieldName: 'email', + label: '电子邮箱', + component: 'Input', + componentProps: { + placeholder: '请输入电子邮箱', + }, + }, + { + fieldName: 'fax', + label: '传真', + component: 'Input', + componentProps: { + placeholder: '请输入传真', + }, + }, + { + fieldName: 'status', + label: '状态', + component: 'RadioGroup', + componentProps: { + options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), + }, + rules: z.number().default(CommonStatusEnum.ENABLE), + }, + { + fieldName: 'sort', + label: '排序', + component: 'InputNumber', + componentProps: { + placeholder: '请输入排序', + precision: 0, + controlsPosition: 'right', + class: '!w-full', + }, + rules: 'required', + }, + { + fieldName: 'taxNo', + label: '纳税人识别号', + component: 'Input', + componentProps: { + placeholder: '请输入纳税人识别号', + }, + }, + { + fieldName: 'taxPercent', + label: '税率(%)', + component: 'InputNumber', + componentProps: { + placeholder: '请输入税率', + precision: 2, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).max(100).optional(), + }, + { + fieldName: 'bankName', + label: '开户行名称', + component: 'Input', + componentProps: { + placeholder: '请输入开户行名称', + }, + }, + { + fieldName: 'bankAccount', + label: '开户行账号', + component: 'Input', + componentProps: { + placeholder: '请输入开户行账号', + }, + }, + { + fieldName: 'bankAddress', + label: '开户行地址', + component: 'Input', + componentProps: { + placeholder: '请输入开户行地址', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + rows: 3, + }, + formItemClass: 'col-span-2', + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'name', + label: '客户名称', + component: 'Input', + componentProps: { + placeholder: '请输入客户名称', + allowClear: true, + }, + }, + { + fieldName: 'mobile', + label: '手机号码', + component: 'Input', + componentProps: { + placeholder: '请输入手机号码', + allowClear: true, + }, + }, + { + fieldName: 'email', + label: '邮箱', + component: 'Input', + componentProps: { + placeholder: '请输入邮箱', + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'name', + title: '客户名称', + minWidth: 150, + }, + { + field: 'contact', + title: '联系人', + minWidth: 120, + }, + { + field: 'mobile', + title: '手机号码', + minWidth: 130, + }, + { + field: 'telephone', + title: '联系电话', + minWidth: 130, + }, + { + field: 'email', + title: '电子邮箱', + minWidth: 180, + }, + { + field: 'status', + title: '状态', + minWidth: 100, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.COMMON_STATUS }, + }, + }, + { + field: 'sort', + title: '排序', + minWidth: 80, + }, + { + field: 'remark', + title: '备注', + minWidth: 150, + showOverflow: 'tooltip', + }, + { + field: 'createTime', + title: '创建时间', + minWidth: 180, + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 130, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-ele/src/views/erp/sale/customer/index.vue b/apps/web-ele/src/views/erp/sale/customer/index.vue new file mode 100644 index 000000000..c2e3bc90a --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/customer/index.vue @@ -0,0 +1,149 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/customer/modules/form.vue b/apps/web-ele/src/views/erp/sale/customer/modules/form.vue new file mode 100644 index 000000000..d7445569d --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/customer/modules/form.vue @@ -0,0 +1,86 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/order/data.ts b/apps/web-ele/src/views/erp/sale/order/data.ts new file mode 100644 index 000000000..36a472ff3 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/order/data.ts @@ -0,0 +1,465 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; +import { erpPriceInputFormatter } from '@vben/utils'; + +import { z } from '#/adapter/form'; +import { getAccountSimpleList } from '#/api/erp/finance/account'; +import { getProductSimpleList } from '#/api/erp/product/product'; +import { getCustomerSimpleList } from '#/api/erp/sale/customer'; +import { getSimpleUserList } from '#/api/system/user'; +import { getRangePickerDefaultProps } from '#/utils'; + +/** 表单的配置项 */ +export function useFormSchema(formType: string): VbenFormSchema[] { + return [ + { + fieldName: 'id', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + fieldName: 'no', + label: '订单单号', + component: 'Input', + componentProps: { + placeholder: '系统自动生成', + disabled: true, + }, + }, + { + fieldName: 'orderTime', + label: '订单时间', + component: 'DatePicker', + componentProps: { + placeholder: '选择订单时间', + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + class: '!w-full', + }, + rules: 'required', + }, + { + label: '客户', + fieldName: 'customerId', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + labelField: 'name', + valueField: 'id', + }, + rules: 'required', + }, + { + fieldName: 'saleUserId', + label: '销售人员', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择销售人员', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + labelField: 'nickname', + valueField: 'id', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + autoSize: { minRows: 1, maxRows: 1 }, + disabled: formType === 'detail', + }, + formItemClass: 'col-span-2', + }, + { + fieldName: 'fileUrl', + label: '附件', + component: 'FileUpload', + componentProps: { + maxNumber: 1, + maxSize: 10, + accept: [ + 'pdf', + 'doc', + 'docx', + 'xls', + 'xlsx', + 'txt', + 'jpg', + 'jpeg', + 'png', + ], + showDescription: formType !== 'detail', + disabled: formType === 'detail', + }, + formItemClass: 'col-span-3', + }, + { + fieldName: 'items', + label: '销售产品清单', + component: 'Input', + formItemClass: 'col-span-3', + }, + { + fieldName: 'discountPercent', + label: '优惠率(%)', + component: 'InputNumber', + componentProps: { + placeholder: '请输入优惠率', + min: 0, + max: 100, + precision: 2, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).optional(), + }, + { + fieldName: 'discountPrice', + label: '付款优惠', + component: 'InputNumber', + componentProps: { + placeholder: '收款优惠', + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'totalPrice', + label: '优惠后金额', + component: 'InputNumber', + componentProps: { + placeholder: '优惠后金额', + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'accountId', + label: '结算账户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择结算账户', + allowClear: true, + showSearch: true, + api: getAccountSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + component: 'InputNumber', + componentProps: { + placeholder: '请输入收取订金', + precision: 2, + min: 0, + controlsPosition: 'right', + class: '!w-full', + }, + fieldName: 'depositPrice', + label: '收取订金', + rules: z.number().min(0).optional(), + }, + ]; +} + +/** 表单的明细表格列 */ +export function useFormItemColumns(): VxeTableGridOptions['columns'] { + return [ + { type: 'seq', title: '序号', minWidth: 50, fixed: 'left' }, + { + field: 'productId', + title: '产品名称', + minWidth: 200, + slots: { default: 'productId' }, + }, + { + field: 'stockCount', + title: '库存', + minWidth: 80, + formatter: 'formatAmount3', + }, + { + field: 'productBarCode', + title: '条码', + minWidth: 120, + }, + { + field: 'productUnitName', + title: '单位', + minWidth: 80, + }, + { + field: 'remark', + title: '备注', + minWidth: 150, + slots: { default: 'remark' }, + }, + { + field: 'count', + title: '数量', + minWidth: 120, + fixed: 'right', + slots: { default: 'count' }, + }, + { + field: 'productPrice', + title: '产品单价', + minWidth: 120, + fixed: 'right', + slots: { default: 'productPrice' }, + }, + { + field: 'totalProductPrice', + title: '金额', + minWidth: 120, + fixed: 'right', + formatter: 'formatAmount2', + }, + { + field: 'taxPercent', + title: '税率(%)', + minWidth: 105, + fixed: 'right', + slots: { default: 'taxPercent' }, + }, + { + field: 'taxPrice', + title: '税额', + minWidth: 120, + fixed: 'right', + formatter: 'formatAmount2', + }, + { + field: 'totalPrice', + title: '税额合计', + minWidth: 120, + fixed: 'right', + formatter: 'formatAmount2', + }, + { + title: '操作', + width: 50, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'no', + label: '订单单号', + component: 'Input', + componentProps: { + placeholder: '请输入订单单号', + allowClear: true, + }, + }, + { + fieldName: 'productId', + label: '产品', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择产品', + allowClear: true, + showSearch: true, + api: getProductSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'orderTime', + label: '订单时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + { + fieldName: 'supplierId', + label: '客户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'creator', + label: '创建人', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择创建人', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + labelField: 'nickname', + valueField: 'id', + }, + }, + { + fieldName: 'status', + label: '状态', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.ERP_AUDIT_STATUS, 'number'), + placeholder: '请选择状态', + allowClear: true, + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Input', + componentProps: { + placeholder: '请输入备注', + allowClear: true, + }, + }, + { + fieldName: 'outStatus', + label: '出库状态', + component: 'Select', + componentProps: { + options: [ + { label: '未出库', value: 0 }, + { label: '部分出库', value: 1 }, + { label: '全部出库', value: 2 }, + ], + placeholder: '请选择出库状态', + allowClear: true, + }, + }, + { + fieldName: 'returnStatus', + label: '退货状态', + component: 'Select', + componentProps: { + options: [ + { label: '未退货', value: 0 }, + { label: '部分退货', value: 1 }, + { label: '全部退货', value: 2 }, + ], + placeholder: '请选择退货状态', + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + type: 'checkbox', + width: 50, + fixed: 'left', + }, + { + field: 'no', + title: '订单单号', + width: 200, + fixed: 'left', + }, + { + field: 'productNames', + title: '产品信息', + showOverflow: 'tooltip', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户', + minWidth: 120, + }, + { + field: 'orderTime', + title: '订单时间', + width: 160, + formatter: 'formatDate', + }, + { + field: 'creatorName', + title: '创建人', + minWidth: 120, + }, + { + field: 'totalCount', + title: '总数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'outCount', + title: '出库数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'returnCount', + title: '退货数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'totalProductPrice', + title: '金额合计', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'totalPrice', + title: '含税金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'depositPrice', + title: '收取订金', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'status', + title: '状态', + minWidth: 120, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.ERP_AUDIT_STATUS }, + }, + }, + { + title: '操作', + width: 260, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-ele/src/views/erp/sale/order/index.vue b/apps/web-ele/src/views/erp/sale/order/index.vue new file mode 100644 index 000000000..592078854 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/order/index.vue @@ -0,0 +1,226 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/order/modules/form.vue b/apps/web-ele/src/views/erp/sale/order/modules/form.vue new file mode 100644 index 000000000..53dd591fe --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/order/modules/form.vue @@ -0,0 +1,162 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/order/modules/item-form.vue b/apps/web-ele/src/views/erp/sale/order/modules/item-form.vue new file mode 100644 index 000000000..282e5d7c5 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/order/modules/item-form.vue @@ -0,0 +1,328 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/out/data.ts b/apps/web-ele/src/views/erp/sale/out/data.ts new file mode 100644 index 000000000..824c14a46 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/out/data.ts @@ -0,0 +1,636 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; +import { erpNumberFormatter, erpPriceInputFormatter } from '@vben/utils'; + +import { z } from '#/adapter/form'; +import { getAccountSimpleList } from '#/api/erp/finance/account'; +import { getProductSimpleList } from '#/api/erp/product/product'; +import { getCustomerSimpleList } from '#/api/erp/sale/customer'; +import { getWarehouseSimpleList } from '#/api/erp/stock/warehouse'; +import { getSimpleUserList } from '#/api/system/user'; +import { getRangePickerDefaultProps } from '#/utils'; + +/** 表单的配置项 */ +export function useFormSchema(formType: string): VbenFormSchema[] { + return [ + { + fieldName: 'id', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + fieldName: 'no', + label: '出库单号', + component: 'Input', + componentProps: { + placeholder: '系统自动生成', + disabled: true, + }, + }, + { + fieldName: 'outTime', + label: '出库时间', + component: 'DatePicker', + componentProps: { + disabled: formType === 'detail', + placeholder: '选择出库时间', + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + class: '!w-full', + }, + rules: 'required', + }, + { + fieldName: 'orderNo', + label: '关联订单', + component: 'Input', + formItemClass: 'col-span-1', + rules: 'required', + componentProps: { + placeholder: '请选择关联订单', + disabled: formType === 'detail', + }, + }, + { + fieldName: 'customerId', + label: '客户', + component: 'ApiSelect', + componentProps: { + disabled: true, + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + fieldNames: { + label: 'name', + value: 'id', + }, + }, + rules: 'required', + }, + { + fieldName: 'saleUserId', + label: '销售人员', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择销售人员', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + fieldNames: { + label: 'nickname', + value: 'id', + }, + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + autoSize: { minRows: 1, maxRows: 1 }, + disabled: formType === 'detail', + }, + formItemClass: 'col-span-2', + }, + { + fieldName: 'fileUrl', + label: '附件', + component: 'FileUpload', + componentProps: { + maxNumber: 1, + maxSize: 10, + accept: [ + 'pdf', + 'doc', + 'docx', + 'xls', + 'xlsx', + 'txt', + 'jpg', + 'jpeg', + 'png', + ], + showDescription: formType !== 'detail', + disabled: formType === 'detail', + }, + formItemClass: 'col-span-3', + }, + { + fieldName: 'items', + label: '出库产品清单', + component: 'Input', + formItemClass: 'col-span-3', + }, + { + fieldName: 'discountPercent', + label: '优惠率(%)', + component: 'InputNumber', + componentProps: { + placeholder: '请输入优惠率', + min: 0, + max: 100, + precision: 2, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).optional(), + }, + { + fieldName: 'discountPrice', + label: '收款优惠', + component: 'InputNumber', + componentProps: { + placeholder: '付款优惠', + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'discountedPrice', + label: '优惠后金额', + component: 'InputNumber', + componentProps: { + placeholder: '优惠后金额', + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + dependencies: { + triggerFields: ['totalPrice', 'otherPrice'], + componentProps: (values) => { + const totalPrice = values.totalPrice || 0; + const otherPrice = values.otherPrice || 0; + values.discountedPrice = totalPrice - otherPrice; + return {}; + }, + }, + }, + { + fieldName: 'otherPrice', + label: '其他费用', + component: 'InputNumber', + componentProps: { + disabled: formType === 'detail', + placeholder: '请输入其他费用', + precision: 2, + formatter: erpPriceInputFormatter, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'accountId', + label: '结算账户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择结算账户', + disabled: true, + allowClear: true, + showSearch: true, + api: getAccountSimpleList, + fieldNames: { + label: 'name', + value: 'id', + }, + }, + }, + { + fieldName: 'totalPrice', + label: '应收金额', + component: 'InputNumber', + componentProps: { + precision: 2, + min: 0, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).optional(), + }, + ]; +} + +/** 表单的明细表格列 */ +export function useFormItemColumns( + formData?: any[], +): VxeTableGridOptions['columns'] { + return [ + { type: 'seq', title: '序号', minWidth: 50, fixed: 'left' }, + { + field: 'warehouseId', + title: '仓库名称', + minWidth: 200, + slots: { default: 'warehouseId' }, + }, + { + field: 'productId', + title: '产品名称', + minWidth: 200, + slots: { default: 'productId' }, + }, + { + field: 'stockCount', + title: '库存', + minWidth: 80, + formatter: 'formatAmount3', + }, + { + field: 'productBarCode', + title: '条码', + minWidth: 120, + }, + { + field: 'productUnitName', + title: '单位', + minWidth: 80, + }, + { + field: 'remark', + title: '备注', + minWidth: 150, + slots: { default: 'remark' }, + }, + { + field: 'totalCount', + title: '原数量', + formatter: 'formatAmount3', + minWidth: 120, + fixed: 'right', + visible: formData && formData[0]?.outCount !== undefined, + }, + { + field: 'outCount', + title: '已出库', + formatter: 'formatAmount3', + minWidth: 120, + fixed: 'right', + visible: formData && formData[0]?.returnCount !== undefined, + }, + { + field: 'count', + title: '数量', + minWidth: 120, + fixed: 'right', + slots: { default: 'count' }, + }, + { + field: 'productPrice', + title: '产品单价', + fixed: 'right', + minWidth: 120, + slots: { default: 'productPrice' }, + }, + { + field: 'totalProductPrice', + fixed: 'right', + title: '产品金额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + fixed: 'right', + field: 'taxPercent', + title: '税率(%)', + minWidth: 105, + slots: { default: 'taxPercent' }, + }, + { + fixed: 'right', + field: 'taxPrice', + title: '税额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + field: 'totalPrice', + fixed: 'right', + title: '合计金额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + title: '操作', + width: 50, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'no', + label: '出库单号', + component: 'Input', + componentProps: { + placeholder: '请输入出库单号', + allowClear: true, + }, + }, + { + fieldName: 'productId', + label: '产品', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择产品', + allowClear: true, + showSearch: true, + api: getProductSimpleList, + fieldNames: { + label: 'name', + value: 'id', + }, + }, + }, + { + fieldName: 'outTime', + label: '出库时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + { + fieldName: 'customerId', + label: '客户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + fieldNames: { + label: 'name', + value: 'id', + }, + }, + }, + { + fieldName: 'warehouseId', + label: '仓库', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择仓库', + allowClear: true, + showSearch: true, + api: getWarehouseSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'creator', + label: '创建人', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择创建人', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + fieldNames: { + label: 'nickname', + value: 'id', + }, + }, + }, + { + fieldName: 'orderNo', + label: '关联订单', + component: 'Input', + componentProps: { + placeholder: '请输入关联订单号', + allowClear: true, + }, + }, + { + fieldName: 'receiptStatus', + label: '收款状态', + component: 'Select', + componentProps: { + options: [ + { label: '未收款', value: 0 }, + { label: '部分收款', value: 1 }, + { label: '全部收款', value: 2 }, + ], + placeholder: '请选择收款状态', + allowClear: true, + }, + }, + { + fieldName: 'status', + label: '审批状态', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.ERP_AUDIT_STATUS, 'number'), + placeholder: '请选择审批状态', + allowClear: true, + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Input', + componentProps: { + placeholder: '请输入备注', + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + type: 'checkbox', + width: 50, + fixed: 'left', + }, + { + field: 'no', + title: '出库单号', + width: 200, + fixed: 'left', + }, + { + field: 'productNames', + title: '产品信息', + showOverflow: 'tooltip', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户', + minWidth: 120, + }, + { + field: 'outTime', + title: '出库时间', + width: 160, + formatter: 'formatDate', + }, + { + field: 'creatorName', + title: '创建人', + minWidth: 120, + }, + { + field: 'totalCount', + title: '总数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'totalPrice', + title: '应收金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'receiptPrice', + title: '已收金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'unReceiptPrice', + title: '未收金额', + formatter: ({ row }) => { + return `${erpNumberFormatter(row.totalPrice - row.receiptPrice, 2)}元`; + }, + minWidth: 120, + }, + { + field: 'status', + title: '审批状态', + minWidth: 120, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.ERP_AUDIT_STATUS }, + }, + }, + { + title: '操作', + width: 260, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useOrderGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'no', + label: '订单单号', + component: 'Input', + componentProps: { + placeholder: '请输入订单单号', + allowClear: true, + }, + }, + { + fieldName: 'productId', + label: '产品', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择产品', + allowClear: true, + showSearch: true, + api: getProductSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'orderTime', + label: '订单时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useOrderGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + type: 'radio', + width: 50, + fixed: 'left', + }, + { + field: 'no', + title: '订单单号', + width: 200, + fixed: 'left', + }, + { + field: 'productNames', + title: '产品信息', + showOverflow: 'tooltip', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户', + minWidth: 120, + }, + { + field: 'orderTime', + title: '订单时间', + width: 160, + formatter: 'formatDate', + }, + { + field: 'creatorName', + title: '创建人', + minWidth: 120, + }, + { + field: 'totalCount', + title: '总数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'outCount', + title: '出库数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'totalProductPrice', + title: '金额合计', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'totalPrice', + title: '含税金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + ]; +} diff --git a/apps/web-ele/src/views/erp/sale/out/index.vue b/apps/web-ele/src/views/erp/sale/out/index.vue new file mode 100644 index 000000000..360bddc71 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/out/index.vue @@ -0,0 +1,223 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/out/modules/form.vue b/apps/web-ele/src/views/erp/sale/out/modules/form.vue new file mode 100644 index 000000000..123f2f38b --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/out/modules/form.vue @@ -0,0 +1,226 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/out/modules/item-form.vue b/apps/web-ele/src/views/erp/sale/out/modules/item-form.vue new file mode 100644 index 000000000..958349c54 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/out/modules/item-form.vue @@ -0,0 +1,310 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue b/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue new file mode 100644 index 000000000..250244e74 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue @@ -0,0 +1,123 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/return/data.ts b/apps/web-ele/src/views/erp/sale/return/data.ts new file mode 100644 index 000000000..36309ef51 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/return/data.ts @@ -0,0 +1,623 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; +import { erpNumberFormatter, erpPriceInputFormatter } from '@vben/utils'; + +import { z } from '#/adapter/form'; +import { getAccountSimpleList } from '#/api/erp/finance/account'; +import { getProductSimpleList } from '#/api/erp/product/product'; +import { getCustomerSimpleList } from '#/api/erp/sale/customer'; +import { getWarehouseSimpleList } from '#/api/erp/stock/warehouse'; +import { getSimpleUserList } from '#/api/system/user'; +import { getRangePickerDefaultProps } from '#/utils'; + +/** 表单的配置项 */ +export function useFormSchema(formType: string): VbenFormSchema[] { + return [ + { + fieldName: 'id', + component: 'Input', + dependencies: { + triggerFields: [''], + show: () => false, + }, + }, + { + fieldName: 'no', + label: '退货单号', + component: 'Input', + componentProps: { + placeholder: '系统自动生成', + disabled: true, + }, + }, + { + fieldName: 'returnTime', + label: '退货时间', + component: 'DatePicker', + componentProps: { + disabled: formType === 'detail', + placeholder: '选择退货时间', + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + class: '!w-full', + }, + rules: 'required', + }, + { + fieldName: 'orderNo', + label: '关联订单', + component: 'Input', + formItemClass: 'col-span-1', + rules: 'required', + componentProps: { + placeholder: '请选择关联订单', + disabled: formType === 'detail', + }, + }, + { + fieldName: 'customerId', + label: '客户', + component: 'ApiSelect', + componentProps: { + disabled: true, + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + labelField: 'name', + valueField: 'id', + }, + rules: 'required', + }, + { + fieldName: 'saleUserId', + label: '销售人员', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择销售人员', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + labelField: 'nickname', + valueField: 'id', + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + autoSize: { minRows: 1, maxRows: 1 }, + disabled: formType === 'detail', + }, + formItemClass: 'col-span-2', + }, + { + fieldName: 'fileUrl', + label: '附件', + component: 'FileUpload', + componentProps: { + maxNumber: 1, + maxSize: 10, + accept: [ + 'pdf', + 'doc', + 'docx', + 'xls', + 'xlsx', + 'txt', + 'jpg', + 'jpeg', + 'png', + ], + showDescription: formType !== 'detail', + disabled: formType === 'detail', + }, + formItemClass: 'col-span-3', + }, + { + fieldName: 'items', + label: '退货产品清单', + component: 'Input', + formItemClass: 'col-span-3', + }, + { + fieldName: 'discountPercent', + label: '优惠率(%)', + component: 'InputNumber', + componentProps: { + placeholder: '请输入优惠率', + min: 0, + max: 100, + precision: 2, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).optional(), + }, + { + fieldName: 'discountPrice', + label: '退款优惠', + component: 'InputNumber', + componentProps: { + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'discountedPrice', + label: '优惠后金额', + component: 'InputNumber', + componentProps: { + placeholder: '优惠后金额', + precision: 2, + formatter: erpPriceInputFormatter, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + dependencies: { + triggerFields: ['totalPrice', 'otherPrice'], + componentProps: (values) => { + const totalPrice = values.totalPrice || 0; + const otherPrice = values.otherPrice || 0; + values.discountedPrice = totalPrice - otherPrice; + return {}; + }, + }, + }, + { + fieldName: 'otherPrice', + label: '其他费用', + component: 'InputNumber', + componentProps: { + disabled: formType === 'detail', + placeholder: '请输入其他费用', + precision: 2, + formatter: erpPriceInputFormatter, + controlsPosition: 'right', + class: '!w-full', + }, + }, + { + fieldName: 'accountId', + label: '结算账户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择结算账户', + disabled: true, + allowClear: true, + showSearch: true, + api: getAccountSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'totalPrice', + label: '应收金额', + component: 'InputNumber', + componentProps: { + precision: 2, + min: 0, + disabled: true, + controlsPosition: 'right', + class: '!w-full', + }, + rules: z.number().min(0).optional(), + }, + ]; +} + +/** 表单的明细表格列 */ +export function useFormItemColumns( + formData?: any[], +): VxeTableGridOptions['columns'] { + return [ + { type: 'seq', title: '序号', minWidth: 50, fixed: 'left' }, + { + field: 'warehouseId', + title: '仓库名称', + minWidth: 200, + slots: { default: 'warehouseId' }, + }, + { + field: 'productId', + title: '产品名称', + minWidth: 200, + slots: { default: 'productId' }, + }, + { + field: 'stockCount', + title: '库存', + minWidth: 80, + formatter: 'formatAmount3', + }, + { + field: 'productBarCode', + title: '条码', + minWidth: 120, + }, + { + field: 'productUnitName', + title: '单位', + minWidth: 80, + }, + { + field: 'remark', + title: '备注', + minWidth: 150, + slots: { default: 'remark' }, + }, + { + field: 'totalCount', + title: '已出库', + formatter: 'formatAmount3', + minWidth: 120, + fixed: 'right', + visible: formData && formData[0]?.outCount !== undefined, + }, + { + field: 'returnCount', + title: '已退货', + formatter: 'formatAmount3', + minWidth: 120, + fixed: 'right', + visible: formData && formData[0]?.returnCount !== undefined, + }, + { + field: 'count', + title: '数量', + minWidth: 120, + fixed: 'right', + slots: { default: 'count' }, + }, + { + field: 'productPrice', + title: '产品单价', + fixed: 'right', + minWidth: 120, + slots: { default: 'productPrice' }, + }, + { + field: 'totalProductPrice', + fixed: 'right', + title: '产品金额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + fixed: 'right', + field: 'taxPercent', + title: '税率(%)', + minWidth: 105, + slots: { default: 'taxPercent' }, + }, + { + fixed: 'right', + field: 'taxPrice', + title: '税额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + field: 'totalPrice', + fixed: 'right', + title: '合计金额', + minWidth: 120, + formatter: 'formatAmount2', + }, + { + title: '操作', + width: 50, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'no', + label: '退货单号', + component: 'Input', + componentProps: { + placeholder: '请输入退货单号', + allowClear: true, + }, + }, + { + fieldName: 'productId', + label: '产品', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择产品', + allowClear: true, + showSearch: true, + api: getProductSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'returnTime', + label: '退货时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + { + fieldName: 'customerId', + label: '客户', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择客户', + allowClear: true, + showSearch: true, + api: getCustomerSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'warehouseId', + label: '仓库', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择仓库', + allowClear: true, + showSearch: true, + api: getWarehouseSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'creator', + label: '创建人', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择创建人', + allowClear: true, + showSearch: true, + api: getSimpleUserList, + labelField: 'nickname', + valueField: 'id', + }, + }, + { + fieldName: 'orderNo', + label: '关联订单', + component: 'Input', + componentProps: { + placeholder: '请输入关联订单号', + allowClear: true, + }, + }, + { + fieldName: 'refundStatus', + label: '退款状态', + component: 'Select', + componentProps: { + options: [ + { label: '未退款', value: 0 }, + { label: '部分退款', value: 1 }, + { label: '全部退款', value: 2 }, + ], + placeholder: '请选择退款状态', + allowClear: true, + }, + }, + { + fieldName: 'status', + label: '审批状态', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.ERP_AUDIT_STATUS, 'number'), + placeholder: '请选择审批状态', + allowClear: true, + }, + }, + { + fieldName: 'remark', + label: '备注', + component: 'Input', + componentProps: { + placeholder: '请输入备注', + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + type: 'checkbox', + width: 50, + fixed: 'left', + }, + { + field: 'no', + title: '退货单号', + width: 200, + fixed: 'left', + }, + { + field: 'productNames', + title: '退货产品信息', + showOverflow: 'tooltip', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户', + minWidth: 120, + }, + { + field: 'returnTime', + title: '退货时间', + width: 160, + formatter: 'formatDate', + }, + { + field: 'creatorName', + title: '创建人', + minWidth: 120, + }, + { + field: 'totalCount', + title: '总数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'totalPrice', + title: '应收金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'refundPrice', + title: '已退金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'unRefundPrice', + title: '未退金额', + formatter: ({ row }) => { + return `${erpNumberFormatter(row.totalPrice - row.refundPrice, 2)}元`; + }, + minWidth: 120, + }, + { + field: 'status', + title: '审批状态', + minWidth: 120, + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.ERP_AUDIT_STATUS }, + }, + }, + { + title: '操作', + width: 260, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useOrderGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'no', + label: '订单单号', + component: 'Input', + componentProps: { + placeholder: '请输入订单单号', + allowClear: true, + }, + }, + { + fieldName: 'productId', + label: '产品', + component: 'ApiSelect', + componentProps: { + placeholder: '请选择产品', + allowClear: true, + showSearch: true, + api: getProductSimpleList, + labelField: 'name', + valueField: 'id', + }, + }, + { + fieldName: 'orderTime', + label: '订单时间', + component: 'RangePicker', + componentProps: { + ...getRangePickerDefaultProps(), + allowClear: true, + }, + }, + ]; +} + +/** 列表的字段 */ +export function useOrderGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + type: 'radio', + width: 50, + fixed: 'left', + }, + { + field: 'no', + title: '订单单号', + width: 200, + fixed: 'left', + }, + { + field: 'productNames', + title: '产品信息', + showOverflow: 'tooltip', + minWidth: 120, + }, + { + field: 'customerName', + title: '客户', + minWidth: 120, + }, + { + field: 'orderTime', + title: '订单时间', + width: 160, + formatter: 'formatDate', + }, + { + field: 'creatorName', + title: '创建人', + minWidth: 120, + }, + { + field: 'totalCount', + title: '总数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'returnCount', + title: '已退货数量', + formatter: 'formatAmount3', + minWidth: 120, + }, + { + field: 'totalProductPrice', + title: '金额合计', + formatter: 'formatAmount2', + minWidth: 120, + }, + { + field: 'totalPrice', + title: '含税金额', + formatter: 'formatAmount2', + minWidth: 120, + }, + ]; +} diff --git a/apps/web-ele/src/views/erp/sale/return/index.vue b/apps/web-ele/src/views/erp/sale/return/index.vue new file mode 100644 index 000000000..b62d479b1 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/return/index.vue @@ -0,0 +1,226 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/return/modules/form.vue b/apps/web-ele/src/views/erp/sale/return/modules/form.vue new file mode 100644 index 000000000..35f59a95d --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/return/modules/form.vue @@ -0,0 +1,231 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/return/modules/item-form.vue b/apps/web-ele/src/views/erp/sale/return/modules/item-form.vue new file mode 100644 index 000000000..90ca380b3 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/return/modules/item-form.vue @@ -0,0 +1,310 @@ + + + diff --git a/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue b/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue new file mode 100644 index 000000000..0b8628d78 --- /dev/null +++ b/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue @@ -0,0 +1,123 @@ + + + From 94a0c2e5812a8191a5cee2a273a898ff21902403 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 19:10:11 +0800 Subject: [PATCH 356/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91sale=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=8830%=EF=BC=89-=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/erp/sale/order/data.ts | 2 +- apps/web-antd/src/views/erp/sale/order/index.vue | 2 ++ apps/web-antd/src/views/erp/sale/out/data.ts | 2 +- apps/web-antd/src/views/erp/sale/out/index.vue | 2 ++ apps/web-antd/src/views/erp/sale/return/data.ts | 2 +- apps/web-antd/src/views/erp/sale/return/index.vue | 2 ++ apps/web-ele/src/views/erp/finance/payment/data.ts | 1 - apps/web-ele/src/views/erp/finance/receipt/data.ts | 1 - apps/web-ele/src/views/erp/sale/order/data.ts | 1 - apps/web-ele/src/views/erp/sale/order/index.vue | 2 +- apps/web-ele/src/views/erp/sale/out/data.ts | 1 - apps/web-ele/src/views/erp/sale/return/data.ts | 1 - apps/web-ele/src/views/erp/stock/check/data.ts | 1 - apps/web-ele/src/views/erp/stock/in/data.ts | 1 - apps/web-ele/src/views/erp/stock/move/data.ts | 1 - apps/web-ele/src/views/erp/stock/out/data.ts | 1 - 16 files changed, 10 insertions(+), 13 deletions(-) diff --git a/apps/web-antd/src/views/erp/sale/order/data.ts b/apps/web-antd/src/views/erp/sale/order/data.ts index 03f0686a1..0bc3f4649 100644 --- a/apps/web-antd/src/views/erp/sale/order/data.ts +++ b/apps/web-antd/src/views/erp/sale/order/data.ts @@ -448,7 +448,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 220, + width: 260, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/erp/sale/order/index.vue b/apps/web-antd/src/views/erp/sale/order/index.vue index 4f85d4d16..f0fa24c08 100644 --- a/apps/web-antd/src/views/erp/sale/order/index.vue +++ b/apps/web-antd/src/views/erp/sale/order/index.vue @@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-order:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -210,6 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:sale-order:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-antd/src/views/erp/sale/out/data.ts b/apps/web-antd/src/views/erp/sale/out/data.ts index 54e0f56d0..d567994bf 100644 --- a/apps/web-antd/src/views/erp/sale/out/data.ts +++ b/apps/web-antd/src/views/erp/sale/out/data.ts @@ -517,7 +517,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 220, + width: 260, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/erp/sale/out/index.vue b/apps/web-antd/src/views/erp/sale/out/index.vue index 79c1c923a..06f21645b 100644 --- a/apps/web-antd/src/views/erp/sale/out/index.vue +++ b/apps/web-antd/src/views/erp/sale/out/index.vue @@ -193,6 +193,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-out:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -207,6 +208,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:sale-out:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-antd/src/views/erp/sale/return/data.ts b/apps/web-antd/src/views/erp/sale/return/data.ts index 47540944f..a3390c872 100644 --- a/apps/web-antd/src/views/erp/sale/return/data.ts +++ b/apps/web-antd/src/views/erp/sale/return/data.ts @@ -504,7 +504,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { }, { title: '操作', - width: 220, + width: 260, fixed: 'right', slots: { default: 'actions' }, }, diff --git a/apps/web-antd/src/views/erp/sale/return/index.vue b/apps/web-antd/src/views/erp/sale/return/index.vue index 3e874b429..9d63d0dd0 100644 --- a/apps/web-antd/src/views/erp/sale/return/index.vue +++ b/apps/web-antd/src/views/erp/sale/return/index.vue @@ -196,6 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ { label: row.status === 10 ? '审批' : '反审批', type: 'link', + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-return:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, @@ -210,6 +211,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: $t('common.delete'), type: 'link', danger: true, + icon: ACTION_ICON.DELETE, auth: ['erp:sale-return:delete'], popConfirm: { title: $t('ui.actionMessage.deleteConfirm', [row.no]), diff --git a/apps/web-ele/src/views/erp/finance/payment/data.ts b/apps/web-ele/src/views/erp/finance/payment/data.ts index d51c1d087..f81f932ef 100644 --- a/apps/web-ele/src/views/erp/finance/payment/data.ts +++ b/apps/web-ele/src/views/erp/finance/payment/data.ts @@ -37,7 +37,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { componentProps: { disabled: formType === 'detail', placeholder: '选择付款时间', - type: 'datetime', format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/finance/receipt/data.ts b/apps/web-ele/src/views/erp/finance/receipt/data.ts index 28f23c400..de929dfd7 100644 --- a/apps/web-ele/src/views/erp/finance/receipt/data.ts +++ b/apps/web-ele/src/views/erp/finance/receipt/data.ts @@ -37,7 +37,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { componentProps: { disabled: formType === 'detail', placeholder: '选择收款时间', - type: 'datetime', format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/sale/order/data.ts b/apps/web-ele/src/views/erp/sale/order/data.ts index 36a472ff3..43c6bbc5b 100644 --- a/apps/web-ele/src/views/erp/sale/order/data.ts +++ b/apps/web-ele/src/views/erp/sale/order/data.ts @@ -38,7 +38,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { component: 'DatePicker', componentProps: { placeholder: '选择订单时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/sale/order/index.vue b/apps/web-ele/src/views/erp/sale/order/index.vue index 592078854..e681b8696 100644 --- a/apps/web-ele/src/views/erp/sale/order/index.vue +++ b/apps/web-ele/src/views/erp/sale/order/index.vue @@ -196,7 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.CHECK : ACTION_ICON.CLOSE, + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-order:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/sale/out/data.ts b/apps/web-ele/src/views/erp/sale/out/data.ts index 824c14a46..8b53f113f 100644 --- a/apps/web-ele/src/views/erp/sale/out/data.ts +++ b/apps/web-ele/src/views/erp/sale/out/data.ts @@ -40,7 +40,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { componentProps: { disabled: formType === 'detail', placeholder: '选择出库时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/sale/return/data.ts b/apps/web-ele/src/views/erp/sale/return/data.ts index 36309ef51..b7729a921 100644 --- a/apps/web-ele/src/views/erp/sale/return/data.ts +++ b/apps/web-ele/src/views/erp/sale/return/data.ts @@ -40,7 +40,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { componentProps: { disabled: formType === 'detail', placeholder: '选择退货时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/stock/check/data.ts b/apps/web-ele/src/views/erp/stock/check/data.ts index 685e940ef..a3c4a3ad9 100644 --- a/apps/web-ele/src/views/erp/stock/check/data.ts +++ b/apps/web-ele/src/views/erp/stock/check/data.ts @@ -35,7 +35,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { component: 'DatePicker', componentProps: { placeholder: '选择盘点时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/stock/in/data.ts b/apps/web-ele/src/views/erp/stock/in/data.ts index caa252a4a..47ec60a76 100644 --- a/apps/web-ele/src/views/erp/stock/in/data.ts +++ b/apps/web-ele/src/views/erp/stock/in/data.ts @@ -36,7 +36,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { component: 'DatePicker', componentProps: { placeholder: '选择入库时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/stock/move/data.ts b/apps/web-ele/src/views/erp/stock/move/data.ts index 5830a7a8d..3bbbf24b6 100644 --- a/apps/web-ele/src/views/erp/stock/move/data.ts +++ b/apps/web-ele/src/views/erp/stock/move/data.ts @@ -35,7 +35,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { component: 'DatePicker', componentProps: { placeholder: '选择调度时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', diff --git a/apps/web-ele/src/views/erp/stock/out/data.ts b/apps/web-ele/src/views/erp/stock/out/data.ts index 481e5ccbf..804c99758 100644 --- a/apps/web-ele/src/views/erp/stock/out/data.ts +++ b/apps/web-ele/src/views/erp/stock/out/data.ts @@ -36,7 +36,6 @@ export function useFormSchema(formType: string): VbenFormSchema[] { component: 'DatePicker', componentProps: { placeholder: '选择出库时间', - showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', class: '!w-full', From 6fa33f4a6296cb0139972c35ee79ede45b15a189 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 19:53:41 +0800 Subject: [PATCH 357/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91sale=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=88100%=EF=BC=89-=20return?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-ele/src/views/erp/sale/out/index.vue | 2 +- .../views/erp/sale/out/modules/sale-order-select.vue | 11 ++++++----- apps/web-ele/src/views/erp/sale/return/index.vue | 2 +- .../erp/sale/return/modules/sale-order-select.vue | 11 ++++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/apps/web-ele/src/views/erp/sale/out/index.vue b/apps/web-ele/src/views/erp/sale/out/index.vue index 360bddc71..528e7f5b3 100644 --- a/apps/web-ele/src/views/erp/sale/out/index.vue +++ b/apps/web-ele/src/views/erp/sale/out/index.vue @@ -193,7 +193,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.CHECK : ACTION_ICON.CLOSE, + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-out:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue b/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue index 250244e74..de1912674 100644 --- a/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue +++ b/apps/web-ele/src/views/erp/sale/out/modules/sale-order-select.vue @@ -6,7 +6,7 @@ import { ref } from 'vue'; import { IconifyIcon } from '@vben/icons'; -import { ElInput, ElMessage } from 'element-plus'; +import { ElButton, ElDialog, ElInput, ElMessage } from 'element-plus'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getSaleOrderPage } from '#/api/erp/sale/order'; @@ -107,17 +107,18 @@ function handleOk() {
- - + diff --git a/apps/web-ele/src/views/erp/sale/return/index.vue b/apps/web-ele/src/views/erp/sale/return/index.vue index b62d479b1..5a76a96b3 100644 --- a/apps/web-ele/src/views/erp/sale/return/index.vue +++ b/apps/web-ele/src/views/erp/sale/return/index.vue @@ -196,7 +196,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ label: row.status === 10 ? '审批' : '反审批', type: 'primary', link: true, - icon: row.status === 10 ? ACTION_ICON.CHECK : ACTION_ICON.CLOSE, + icon: ACTION_ICON.AUDIT, auth: ['erp:sale-return:update-status'], popConfirm: { title: `确认${row.status === 10 ? '审批' : '反审批'}${row.no}吗?`, diff --git a/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue b/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue index 0b8628d78..05d4746cd 100644 --- a/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue +++ b/apps/web-ele/src/views/erp/sale/return/modules/sale-order-select.vue @@ -6,7 +6,7 @@ import { ref } from 'vue'; import { IconifyIcon } from '@vben/icons'; -import { ElInput, ElMessage } from 'element-plus'; +import { ElButton, ElDialog, ElInput, ElMessage } from 'element-plus'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getSaleOrderPage } from '#/api/erp/sale/order'; @@ -107,17 +107,18 @@ function handleOk() { - - + From e9164912e527e7d22bd0a1cce8e225287743f7bb Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 20:02:53 +0800 Subject: [PATCH 358/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91home=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=88100%=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/erp/statistics/purchase/index.ts | 16 +- .../src/api/erp/statistics/sale/index.ts | 12 +- apps/web-antd/src/views/erp/home/index.vue | 6 +- .../{SummaryCard.vue => summary-card.vue} | 0 ...ummaryChart.vue => time-summary-chart.vue} | 8 +- .../src/api/erp/statistics/purchase/index.ts | 31 ++++ .../src/api/erp/statistics/sale/index.ts | 31 ++++ apps/web-ele/src/views/erp/home/index.vue | 51 ++++++ .../views/erp/home/modules/summary-card.vue | 69 ++++++++ .../erp/home/modules/time-summary-chart.vue | 161 ++++++++++++++++++ 10 files changed, 364 insertions(+), 21 deletions(-) rename apps/web-antd/src/views/erp/home/modules/{SummaryCard.vue => summary-card.vue} (100%) rename apps/web-antd/src/views/erp/home/modules/{TimeSummaryChart.vue => time-summary-chart.vue} (93%) create mode 100644 apps/web-ele/src/api/erp/statistics/purchase/index.ts create mode 100644 apps/web-ele/src/api/erp/statistics/sale/index.ts create mode 100644 apps/web-ele/src/views/erp/home/index.vue create mode 100644 apps/web-ele/src/views/erp/home/modules/summary-card.vue create mode 100644 apps/web-ele/src/views/erp/home/modules/time-summary-chart.vue diff --git a/apps/web-antd/src/api/erp/statistics/purchase/index.ts b/apps/web-antd/src/api/erp/statistics/purchase/index.ts index 170b9c117..126b6f283 100644 --- a/apps/web-antd/src/api/erp/statistics/purchase/index.ts +++ b/apps/web-antd/src/api/erp/statistics/purchase/index.ts @@ -1,16 +1,16 @@ import { requestClient } from '#/api/request'; export namespace ErpPurchaseStatisticsApi { - /** ERP 采购全局统计 */ - export interface PurchaseSummary { + /** 采购全局统计 */ + export interface PurchaseSummaryRespVO { todayPrice: number; // 今日采购金额 yesterdayPrice: number; // 昨日采购金额 monthPrice: number; // 本月采购金额 yearPrice: number; // 今年采购金额 } - /** ERP 采购时间段统计 */ - export interface PurchaseTimeSummary { + /** 采购时间段统计 */ + export interface PurchaseTimeSummaryRespVO { time: string; // 时间 price: number; // 采购金额 } @@ -18,14 +18,14 @@ export namespace ErpPurchaseStatisticsApi { /** 获得采购统计 */ export function getPurchaseSummary() { - return requestClient.get( + return requestClient.get( '/erp/purchase-statistics/summary', ); } /** 获得采购时间段统计 */ export function getPurchaseTimeSummary() { - return requestClient.get( - '/erp/purchase-statistics/time-summary', - ); + return requestClient.get< + ErpPurchaseStatisticsApi.PurchaseTimeSummaryRespVO[] + >('/erp/purchase-statistics/time-summary'); } diff --git a/apps/web-antd/src/api/erp/statistics/sale/index.ts b/apps/web-antd/src/api/erp/statistics/sale/index.ts index c4c7986a8..209c1c938 100644 --- a/apps/web-antd/src/api/erp/statistics/sale/index.ts +++ b/apps/web-antd/src/api/erp/statistics/sale/index.ts @@ -1,16 +1,16 @@ import { requestClient } from '#/api/request'; export namespace ErpSaleStatisticsApi { - /** ERP 销售全局统计 */ - export interface SaleSummary { + /** 销售全局统计 */ + export interface SaleSummaryRespVO { todayPrice: number; // 今日销售金额 yesterdayPrice: number; // 昨日销售金额 monthPrice: number; // 本月销售金额 yearPrice: number; // 今年销售金额 } - /** ERP 销售时间段统计 */ - export interface SaleTimeSummary { + /** 销售时间段统计 */ + export interface SaleTimeSummaryRespVO { time: string; // 时间 price: number; // 销售金额 } @@ -18,14 +18,14 @@ export namespace ErpSaleStatisticsApi { /** 获得销售统计 */ export function getSaleSummary() { - return requestClient.get( + return requestClient.get( '/erp/sale-statistics/summary', ); } /** 获得销售时间段统计 */ export function getSaleTimeSummary() { - return requestClient.get( + return requestClient.get( '/erp/sale-statistics/time-summary', ); } diff --git a/apps/web-antd/src/views/erp/home/index.vue b/apps/web-antd/src/views/erp/home/index.vue index 7b9d86e26..efb49045b 100644 --- a/apps/web-antd/src/views/erp/home/index.vue +++ b/apps/web-antd/src/views/erp/home/index.vue @@ -5,10 +5,10 @@ import { DocAlert, Page } from '@vben/common-ui'; import { Col, Row, Spin } from 'ant-design-vue'; -import SummaryCard from './modules/SummaryCard.vue'; -import TimeSummaryChart from './modules/TimeSummaryChart.vue'; +import SummaryCard from './modules/summary-card.vue'; +import TimeSummaryChart from './modules/time-summary-chart.vue'; -/** ERP首页 */ +/** ERP 首页 */ defineOptions({ name: 'ErpHome' }); const loading = ref(false); // 加载中 diff --git a/apps/web-antd/src/views/erp/home/modules/SummaryCard.vue b/apps/web-antd/src/views/erp/home/modules/summary-card.vue similarity index 100% rename from apps/web-antd/src/views/erp/home/modules/SummaryCard.vue rename to apps/web-antd/src/views/erp/home/modules/summary-card.vue diff --git a/apps/web-antd/src/views/erp/home/modules/TimeSummaryChart.vue b/apps/web-antd/src/views/erp/home/modules/time-summary-chart.vue similarity index 93% rename from apps/web-antd/src/views/erp/home/modules/TimeSummaryChart.vue rename to apps/web-antd/src/views/erp/home/modules/time-summary-chart.vue index 9bdc96eed..ef15eaaf1 100644 --- a/apps/web-antd/src/views/erp/home/modules/TimeSummaryChart.vue +++ b/apps/web-antd/src/views/erp/home/modules/time-summary-chart.vue @@ -26,17 +26,17 @@ const props = withDefaults(defineProps(), { }); /** 销售统计数据 */ -const saleSummary = ref(); // 销售概况统计 -const saleTimeSummaryList = ref(); // 销售时段统计 +const saleSummary = ref(); // 销售概况统计 +const saleTimeSummaryList = ref(); // 销售时段统计 const getSaleStatistics = async () => { saleSummary.value = await getSaleSummary(); saleTimeSummaryList.value = await getSaleTimeSummary(); }; /** 采购统计数据 */ -const purchaseSummary = ref(); // 采购概况统计 +const purchaseSummary = ref(); // 采购概况统计 const purchaseTimeSummaryList = - ref(); // 采购时段统计 + ref(); // 采购时段统计 const getPurchaseStatistics = async () => { purchaseSummary.value = await getPurchaseSummary(); purchaseTimeSummaryList.value = await getPurchaseTimeSummary(); diff --git a/apps/web-ele/src/api/erp/statistics/purchase/index.ts b/apps/web-ele/src/api/erp/statistics/purchase/index.ts new file mode 100644 index 000000000..126b6f283 --- /dev/null +++ b/apps/web-ele/src/api/erp/statistics/purchase/index.ts @@ -0,0 +1,31 @@ +import { requestClient } from '#/api/request'; + +export namespace ErpPurchaseStatisticsApi { + /** 采购全局统计 */ + export interface PurchaseSummaryRespVO { + todayPrice: number; // 今日采购金额 + yesterdayPrice: number; // 昨日采购金额 + monthPrice: number; // 本月采购金额 + yearPrice: number; // 今年采购金额 + } + + /** 采购时间段统计 */ + export interface PurchaseTimeSummaryRespVO { + time: string; // 时间 + price: number; // 采购金额 + } +} + +/** 获得采购统计 */ +export function getPurchaseSummary() { + return requestClient.get( + '/erp/purchase-statistics/summary', + ); +} + +/** 获得采购时间段统计 */ +export function getPurchaseTimeSummary() { + return requestClient.get< + ErpPurchaseStatisticsApi.PurchaseTimeSummaryRespVO[] + >('/erp/purchase-statistics/time-summary'); +} diff --git a/apps/web-ele/src/api/erp/statistics/sale/index.ts b/apps/web-ele/src/api/erp/statistics/sale/index.ts new file mode 100644 index 000000000..209c1c938 --- /dev/null +++ b/apps/web-ele/src/api/erp/statistics/sale/index.ts @@ -0,0 +1,31 @@ +import { requestClient } from '#/api/request'; + +export namespace ErpSaleStatisticsApi { + /** 销售全局统计 */ + export interface SaleSummaryRespVO { + todayPrice: number; // 今日销售金额 + yesterdayPrice: number; // 昨日销售金额 + monthPrice: number; // 本月销售金额 + yearPrice: number; // 今年销售金额 + } + + /** 销售时间段统计 */ + export interface SaleTimeSummaryRespVO { + time: string; // 时间 + price: number; // 销售金额 + } +} + +/** 获得销售统计 */ +export function getSaleSummary() { + return requestClient.get( + '/erp/sale-statistics/summary', + ); +} + +/** 获得销售时间段统计 */ +export function getSaleTimeSummary() { + return requestClient.get( + '/erp/sale-statistics/time-summary', + ); +} diff --git a/apps/web-ele/src/views/erp/home/index.vue b/apps/web-ele/src/views/erp/home/index.vue new file mode 100644 index 000000000..9f6f2ea14 --- /dev/null +++ b/apps/web-ele/src/views/erp/home/index.vue @@ -0,0 +1,51 @@ + + + diff --git a/apps/web-ele/src/views/erp/home/modules/summary-card.vue b/apps/web-ele/src/views/erp/home/modules/summary-card.vue new file mode 100644 index 000000000..ff98e556a --- /dev/null +++ b/apps/web-ele/src/views/erp/home/modules/summary-card.vue @@ -0,0 +1,69 @@ + + + diff --git a/apps/web-ele/src/views/erp/home/modules/time-summary-chart.vue b/apps/web-ele/src/views/erp/home/modules/time-summary-chart.vue new file mode 100644 index 000000000..fe164eb29 --- /dev/null +++ b/apps/web-ele/src/views/erp/home/modules/time-summary-chart.vue @@ -0,0 +1,161 @@ + + + From 2973e0b70fc058b338f42f378dd9b5ec4739ad68 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 16 Nov 2025 20:27:30 +0800 Subject: [PATCH 359/544] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91?= =?UTF-8?q?=E3=80=90erp=E3=80=91purchase=20=E7=9A=84=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=EF=BC=8820%=EF=BC=89-=20supplier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/erp/purchase/supplier/index.vue | 1 - .../views/erp/purchase/in/modules/form.vue | 231 +++++++++++++++++ .../src/views/erp/purchase/supplier/data.ts | 234 ++++++++++++++++++ .../src/views/erp/purchase/supplier/index.vue | 153 ++++++++++++ .../erp/purchase/supplier/modules/form.vue | 90 +++++++ 5 files changed, 708 insertions(+), 1 deletion(-) create mode 100644 apps/web-ele/src/views/erp/purchase/in/modules/form.vue create mode 100644 apps/web-ele/src/views/erp/purchase/supplier/data.ts create mode 100644 apps/web-ele/src/views/erp/purchase/supplier/index.vue create mode 100644 apps/web-ele/src/views/erp/purchase/supplier/modules/form.vue diff --git a/apps/web-antd/src/views/erp/purchase/supplier/index.vue b/apps/web-antd/src/views/erp/purchase/supplier/index.vue index 64cb81aaf..e012568b8 100644 --- a/apps/web-antd/src/views/erp/purchase/supplier/index.vue +++ b/apps/web-antd/src/views/erp/purchase/supplier/index.vue @@ -124,7 +124,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ ]" /> -