From 09abc9cead5c0b310ed447220a2d253020faab57 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 27 Sep 2025 16:36:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90crm?= =?UTF-8?q?=E3=80=91=E5=AE=A2=E6=88=B7=E7=9A=84=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/crm/customer/index.ts | 2 + .../web-antd/src/router/routes/modules/crm.ts | 2 +- apps/web-antd/src/views/crm/contact/index.vue | 12 +- .../web-antd/src/views/crm/contract/index.vue | 19 +- apps/web-antd/src/views/crm/customer/data.ts | 166 ++++++--- apps/web-antd/src/views/crm/customer/index.ts | 10 +- .../web-antd/src/views/crm/customer/index.vue | 51 +-- .../views/crm/customer/modules/detail-data.ts | 101 ------ .../crm/customer/modules/detail-info.vue | 42 --- .../src/views/crm/customer/modules/detail.vue | 321 ------------------ .../src/views/crm/customer/modules/form.vue | 1 + .../crm/customer/modules/import-form.vue | 40 +-- 12 files changed, 174 insertions(+), 593 deletions(-) delete mode 100644 apps/web-antd/src/views/crm/customer/modules/detail-data.ts delete mode 100644 apps/web-antd/src/views/crm/customer/modules/detail-info.vue delete mode 100644 apps/web-antd/src/views/crm/customer/modules/detail.vue diff --git a/apps/web-antd/src/api/crm/customer/index.ts b/apps/web-antd/src/api/crm/customer/index.ts index 5faf62df..8ef8503c 100644 --- a/apps/web-antd/src/api/crm/customer/index.ts +++ b/apps/web-antd/src/api/crm/customer/index.ts @@ -16,6 +16,7 @@ export namespace CrmCustomerApi { ownerUserId: number; // 负责人的用户编号 ownerUserName?: string; // 负责人的用户名称 ownerUserDept?: string; // 负责人的部门名称 + ownerUserDeptName?: string; // 负责人的部门名称 lockStatus?: boolean; dealStatus?: boolean; mobile: string; // 手机号 @@ -34,6 +35,7 @@ export namespace CrmCustomerApi { creatorName?: string; // 创建人名称 createTime: Date; // 创建时间 updateTime: Date; // 更新时间 + poolDay?: number; // 距离进入公海天数 } export interface CustomerImport { ownerUserId: number; diff --git a/apps/web-antd/src/router/routes/modules/crm.ts b/apps/web-antd/src/router/routes/modules/crm.ts index 9936204d..9d752b89 100644 --- a/apps/web-antd/src/router/routes/modules/crm.ts +++ b/apps/web-antd/src/router/routes/modules/crm.ts @@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [ title: '客户详情', activePath: '/crm/customer', }, - component: () => import('#/views/crm/customer/modules/detail.vue'), + component: () => import('#/views/crm/customer/detail/index.vue'), }, { path: 'business/detail/:id', diff --git a/apps/web-antd/src/views/crm/contact/index.vue b/apps/web-antd/src/views/crm/contact/index.vue index de6d1b8a..5cd0b528 100644 --- a/apps/web-antd/src/views/crm/contact/index.vue +++ b/apps/web-antd/src/views/crm/contact/index.vue @@ -34,6 +34,12 @@ function handleRefresh() { gridApi.query(); } +/** 处理场景类型的切换 */ +function handleChangeSceneType(key: number | string) { + sceneType.value = key.toString(); + gridApi.query(); +} + /** 导出表格 */ async function handleExport() { const formValues = await gridApi.formApi.getValues(); @@ -79,12 +85,6 @@ function handleCustomerDetail(row: CrmContactApi.Contact) { push({ name: 'CrmCustomerDetail', params: { id: row.customerId } }); } -/** 处理场景类型的切换 */ -function handleChangeSceneType(key: number | string) { - sceneType.value = key.toString(); - gridApi.query(); -} - const [Grid, gridApi] = useVbenVxeGrid({ formOptions: { schema: useGridFormSchema(), diff --git a/apps/web-antd/src/views/crm/contract/index.vue b/apps/web-antd/src/views/crm/contract/index.vue index 8b1ecd30..c89af36d 100644 --- a/apps/web-antd/src/views/crm/contract/index.vue +++ b/apps/web-antd/src/views/crm/contract/index.vue @@ -35,9 +35,19 @@ function onRefresh() { gridApi.query(); } +/** 处理场景类型的切换 */ +function handleChangeSceneType(key: number | string) { + sceneType.value = key.toString(); + gridApi.query(); +} + /** 导出表格 */ async function handleExport() { - const data = await exportContract(await gridApi.formApi.getValues()); + const formValues = await gridApi.formApi.getValues(); + const data = await exportContract({ + sceneType: sceneType.value, + ...formValues, + }); downloadFileFromBlobPart({ fileName: '合同.xls', source: data }); } @@ -142,11 +152,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, } as VxeTableGridOptions, }); - -function onChangeSceneType(key: number | string) { - sceneType.value = key.toString(); - gridApi.query(); -}