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 @@ - +