From 6778362442a1a38f9c392762fdba1998dfbb3edd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 21 Feb 2024 21:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=95=86=E6=9C=BA=E7=8A=B6=E6=80=81=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 6baeadc87ad68b32b3d5601ffcaa8cc9e1a038a5) --- src/api/crm/business/status/index.ts | 37 ++++++++++++ src/api/crm/businessStatusType/index.ts | 48 --------------- src/views/crm/business/BusinessForm.vue | 4 +- .../status/BusinessStatusForm.vue} | 59 +++++++++++-------- .../status}/index.vue | 40 ++++++------- 5 files changed, 92 insertions(+), 96 deletions(-) create mode 100644 src/api/crm/business/status/index.ts delete mode 100644 src/api/crm/businessStatusType/index.ts rename src/views/crm/{businessStatusType/BusinessStatusTypeForm.vue => business/status/BusinessStatusForm.vue} (71%) rename src/views/crm/{businessStatusType => business/status}/index.vue (74%) diff --git a/src/api/crm/business/status/index.ts b/src/api/crm/business/status/index.ts new file mode 100644 index 00000000..567dae31 --- /dev/null +++ b/src/api/crm/business/status/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface BusinessStatusTypeVO { + id: number + name: string + deptIds: number[] + statuses?: { + id: number + name: string + percent: number + } +} + +// 查询商机状态组列表 +export const getBusinessStatusPage = async (params: any) => { + return await request.get({ url: `/crm/business-status/page`, params }) +} + +// 新增商机状态组 +export const createBusinessStatus = async (data: BusinessStatusTypeVO) => { + return await request.post({ url: `/crm/business-status/create`, data }) +} + +// 修改商机状态组 +export const updateBusinessStatus = async (data: BusinessStatusTypeVO) => { + return await request.put({ url: `/crm/business-status/update`, data }) +} + +// 查询商机状态类型详情 +export const getBusinessStatus = async (id: number) => { + return await request.get({ url: `/crm/business-status/get?id=` + id }) +} + +// 获得商机状态组列表 +export const getBusinessStatusTypeSimpleList = async () => { + return await request.get({ url: `/crm/business-status/type-simple-list` }) +} diff --git a/src/api/crm/businessStatusType/index.ts b/src/api/crm/businessStatusType/index.ts deleted file mode 100644 index cc4b46aa..00000000 --- a/src/api/crm/businessStatusType/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import request from '@/config/axios' - -export interface BusinessStatusTypeVO { - id: number - name: string - deptIds: number[] - status: boolean -} - -// 查询商机状态类型列表 -export const getBusinessStatusTypePage = async (params) => { - return await request.get({ url: `/crm/business-status-type/page`, params }) -} - -// 查询商机状态类型详情 -export const getBusinessStatusType = async (id: number) => { - return await request.get({ url: `/crm/business-status-type/get?id=` + id }) -} - -// 新增商机状态类型 -export const createBusinessStatusType = async (data: BusinessStatusTypeVO) => { - return await request.post({ url: `/crm/business-status-type/create`, data }) -} - -// 修改商机状态类型 -export const updateBusinessStatusType = async (data: BusinessStatusTypeVO) => { - return await request.put({ url: `/crm/business-status-type/update`, data }) -} - -// 删除商机状态类型 -export const deleteBusinessStatusType = async (id: number) => { - return await request.delete({ url: `/crm/business-status-type/delete?id=` + id }) -} - -// 导出商机状态类型 Excel -export const exportBusinessStatusType = async (params) => { - return await request.download({ url: `/crm/business-status-type/export-excel`, params }) -} - -// 获取商机状态类型信息列表 -export const getBusinessStatusTypeList = async () => { - return await request.get({ url: `/crm/business-status-type/get-simple-list` }) -} - -// 根据类型ID获取商机状态信息列表 -export const getBusinessStatusListByTypeId = async (typeId: number) => { - return await request.get({ url: `/crm/business-status-type/get-status-list?typeId=` + typeId }) -} diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index 7b03755a..48efea98 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -131,7 +131,7 @@ diff --git a/src/views/crm/businessStatusType/index.vue b/src/views/crm/business/status/index.vue similarity index 74% rename from src/views/crm/businessStatusType/index.vue rename to src/views/crm/business/status/index.vue index 3f7389be..b4eb8458 100644 --- a/src/views/crm/businessStatusType/index.vue +++ b/src/views/crm/business/status/index.vue @@ -9,25 +9,14 @@ label-width="68px" > - 搜索 - 重置 新增 - - 导出 - @@ -35,8 +24,15 @@ - - + + + + 编辑 @@ -59,7 +55,7 @@ link type="danger" @click="handleDelete(scope.row.id)" - v-hasPermi="['crm:business-status-type:delete']" + v-hasPermi="['crm:business-status:delete']" > 删除 @@ -76,16 +72,16 @@ - +