From 044754cdb4cd78543ce9550d8b45923dd82ef8bf Mon Sep 17 00:00:00 2001 From: Wanwan <913752709@qq.com> Date: Wed, 25 Oct 2023 00:24:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E8=A1=A8=E7=9A=84=20?= =?UTF-8?q?crud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/index.ts | 51 +++++ src/views/crm/customer/CustomerForm.vue | 195 +++++++++++++++++++ src/views/crm/customer/index.vue | 238 ++++++++++++++++++++++++ 3 files changed, 484 insertions(+) create mode 100644 src/api/crm/customer/index.ts create mode 100644 src/views/crm/customer/CustomerForm.vue create mode 100644 src/views/crm/customer/index.vue diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts new file mode 100644 index 00000000..16ccb355 --- /dev/null +++ b/src/api/crm/customer/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface CustomerVO { + id: number + name: string + followUpStatus: boolean + lockStatus: boolean + mobile: string + telephone: string + website: string + remark: string + ownerUserId: number + roUserIds: string + rwUserIds: string + areaId: number + detailAddress: string + longitude: string + latitude: string + contactLastTime: Date + contactNextTime: Date +} + +// 查询客户列表 +export const getCustomerPage = async (params) => { + return await request.get({ url: `/crm/customer/page`, params }) +} + +// 查询客户详情 +export const getCustomer = async (id: number) => { + return await request.get({ url: `/crm/customer/get?id=` + id }) +} + +// 新增客户 +export const createCustomer = async (data: CustomerVO) => { + return await request.post({ url: `/crm/customer/create`, data }) +} + +// 修改客户 +export const updateCustomer = async (data: CustomerVO) => { + return await request.put({ url: `/crm/customer/update`, data }) +} + +// 删除客户 +export const deleteCustomer = async (id: number) => { + return await request.delete({ url: `/crm/customer/delete?id=` + id }) +} + +// 导出客户 Excel +export const exportCustomer = async (params) => { + return await request.download({ url: `/crm/customer/export-excel`, params }) +} diff --git a/src/views/crm/customer/CustomerForm.vue b/src/views/crm/customer/CustomerForm.vue new file mode 100644 index 00000000..52ff923a --- /dev/null +++ b/src/views/crm/customer/CustomerForm.vue @@ -0,0 +1,195 @@ + + diff --git a/src/views/crm/customer/index.vue b/src/views/crm/customer/index.vue new file mode 100644 index 00000000..15a0d144 --- /dev/null +++ b/src/views/crm/customer/index.vue @@ -0,0 +1,238 @@ + + +