diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index fea5ecf0..2e1d4e64 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -32,9 +32,7 @@ export const getModelPage = async (params) => { export const getModel = async (id: number) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } -export const getModelByKey = async (key: string) => { - return await request.get({ url: '/bpm/model/get-by-key?key=' + key }) -} + export const updateModel = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } diff --git a/src/api/crm/bi/rank.ts b/src/api/crm/bi/rank.ts new file mode 100644 index 00000000..8c7f36e0 --- /dev/null +++ b/src/api/crm/bi/rank.ts @@ -0,0 +1,25 @@ +import request from '@/config/axios' + +export interface BiRankRespVO { + count: number + nickname: string + deptName: string +} + +// 排行 API +export const RankApi = { + // 获得合同排行榜 + getContractPriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-contract-price-rank', + params + }) + }, + // 获得回款排行榜 + getReceivablePriceRank: (params: any) => { + return request.get({ + url: '/crm/bi-rank/get-receivable-price-rank', + params + }) + } +} diff --git a/src/api/crm/bi/ranking.ts b/src/api/crm/bi/ranking.ts deleted file mode 100644 index 53c09e63..00000000 --- a/src/api/crm/bi/ranking.ts +++ /dev/null @@ -1,34 +0,0 @@ -import request from '@/config/axios' - -export interface BiContractRanKingRespVO { - price: number - nickname: string - deptName: string -} -export interface BiReceivablesRanKingRespVO { - price: number - nickname: string - deptName: string -} -export interface BiRankReqVO { - deptId: number - type: string -} - -// 排行 API -export const RankingStatisticsApi = { - // 获得合同排行榜 - contractAmountRanking: (params: any) => { - return request.get({ - url: '/bi/ranking/contract-ranking', - params - }) - }, - // 获得回款排行榜 - receivablesAmountRanking: (params: any) => { - return request.get({ - url: '/bi/ranking/receivables-ranking', - params - }) - } -} diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 314eb389..37304f5a 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -73,6 +73,6 @@ export const getBusinessListByIds = async (val: number[]) => { } // 商机转移 -export const transfer = async (data: TransferReqVO) => { +export const transferBusiness = async (data: TransferReqVO) => { return await request.put({ url: '/crm/business/transfer', data }) } diff --git a/src/api/crm/clue/index.ts b/src/api/crm/clue/index.ts index 39da03d3..4268c420 100644 --- a/src/api/crm/clue/index.ts +++ b/src/api/crm/clue/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import { TransferReqVO } from '@/api/crm/customer' export interface ClueVO { id: number @@ -44,3 +45,8 @@ export const deleteClue = async (id: number) => { export const exportClue = async (params) => { return await request.download({ url: `/crm/clue/export-excel`, params }) } + +// 线索转移 +export const transferClue = async (data: TransferReqVO) => { + return await request.put({ url: '/crm/clue/transfer', data }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 6edb90a1..2dab70bc 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -88,6 +88,6 @@ export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => { } // 联系人转移 -export const transfer = async (data: TransferReqVO) => { +export const transferContact = async (data: TransferReqVO) => { return await request.put({ url: '/crm/contact/transfer', data }) } diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index 731750c1..9d718c23 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -7,6 +7,7 @@ export interface ContractVO { name: string customerId: number businessId: number + businessName: string processInstanceId: number orderDate: Date ownerUserId: number @@ -18,8 +19,9 @@ export interface ContractVO { productPrice: number contactId: number signUserId: number + signUserName: string contactLastTime: Date - status: number + auditStatus: number remark: string productItems: ProductExpandVO[] creatorName: string @@ -66,11 +68,11 @@ export const exportContract = async (params) => { } // 提交审核 -export const handleApprove = async (id: number) => { - return await request.put({ url: `/crm/contract/approve?id=${id}` }) +export const submitContract = async (id: number) => { + return await request.put({ url: `/crm/contract/submit?id=${id}` }) } // 合同转移 -export const transfer = async (data: TransferReqVO) => { +export const transferContract = async (data: TransferReqVO) => { return await request.put({ url: '/crm/contract/transfer', data }) } diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index a6fb489b..2940934e 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -82,7 +82,7 @@ export interface TransferReqVO { } // 客户转移 -export const transfer = async (data: TransferReqVO) => { +export const transferCustomer = async (data: TransferReqVO) => { return await request.put({ url: '/crm/customer/transfer', data }) } diff --git a/src/api/erp/product/category/index.ts b/src/api/erp/product/category/index.ts new file mode 100644 index 00000000..945be207 --- /dev/null +++ b/src/api/erp/product/category/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +// ERP 商品分类 VO +export interface ProductCategoryVO { + // 分类编号 + id: number + // 父分类编号 + parentId: number + // 分类名称 + name: string + // 分类编码 + code: string + // 分类排序 + sort: number + // 开启状态 + status: number +} + +// ERP 商品分类 API +export const ProductCategoryApi = { + // 查询ERP 商品分类列表 + getProductCategoryList: async (params) => { + return await request.get({ url: `/erp/product-category/list`, params }) + }, + + // 查询ERP 商品分类详情 + getProductCategory: async (id: number) => { + return await request.get({ url: `/erp/product-category/get?id=` + id }) + }, + + // 新增ERP 商品分类 + createProductCategory: async (data: ProductCategoryVO) => { + return await request.post({ url: `/erp/product-category/create`, data }) + }, + + // 修改ERP 商品分类 + updateProductCategory: async (data: ProductCategoryVO) => { + return await request.put({ url: `/erp/product-category/update`, data }) + }, + + // 删除ERP 商品分类 + deleteProductCategory: async (id: number) => { + return await request.delete({ url: `/erp/product-category/delete?id=` + id }) + }, + + // 导出ERP 商品分类 Excel + exportProductCategory: async (params) => { + return await request.download({ url: `/erp/product-category/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/api/erp/product/index.ts b/src/api/erp/product/index.ts new file mode 100644 index 00000000..3729064c --- /dev/null +++ b/src/api/erp/product/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +// ERP 产品 VO +export interface ProductVO { + // 产品编号 + id: number + // 产品名称 + name: string + // 产品条码 + barCode: string + // 产品类型编号 + categoryId: number + // 单位编号 + unitId: number + // 产品状态 + status: number + // 产品规格 + standard: string + // 产品备注 + remark: string + // 保质期天数 + expiryDay: number + // 基础重量(kg) + weight: number + // 采购价格,单位:元 + purchasePrice: number + // 销售价格,单位:元 + salePrice: number + // 最低价格,单位:元 + minPrice: number +} + +// ERP 产品 API +export const ProductApi = { + // 查询ERP 产品分页 + getProductPage: async (params: any) => { + return await request.get({ url: `/erp/product/page`, params }) + }, + + // 查询ERP 产品详情 + getProduct: async (id: number) => { + return await request.get({ url: `/erp/product/get?id=` + id }) + }, + + // 新增ERP 产品 + createProduct: async (data: ProductVO) => { + return await request.post({ url: `/erp/product/create`, data }) + }, + + // 修改ERP 产品 + updateProduct: async (data: ProductVO) => { + return await request.put({ url: `/erp/product/update`, data }) + }, + + // 删除ERP 产品 + deleteProduct: async (id: number) => { + return await request.delete({ url: `/erp/product/delete?id=` + id }) + }, + + // 导出ERP 产品 Excel + exportProduct: async (params) => { + return await request.download({ url: `/erp/product/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/api/erp/product/unit/index.ts b/src/api/erp/product/unit/index.ts new file mode 100644 index 00000000..6a6682e4 --- /dev/null +++ b/src/api/erp/product/unit/index.ts @@ -0,0 +1,44 @@ +import request from '@/config/axios' + +// ERP 产品单位 VO +export interface ProductUnitVO { + // 单位编号 + id: number + // 单位名字 + name: string + // 单位状态 + status: number +} + +// ERP 产品单位 API +export const ProductUnitApi = { + // 查询ERP 产品单位分页 + getProductUnitPage: async (params: any) => { + return await request.get({ url: `/erp/product-unit/page`, params }) + }, + + // 查询ERP 产品单位详情 + getProductUnit: async (id: number) => { + return await request.get({ url: `/erp/product-unit/get?id=` + id }) + }, + + // 新增ERP 产品单位 + createProductUnit: async (data: ProductUnitVO) => { + return await request.post({ url: `/erp/product-unit/create`, data }) + }, + + // 修改ERP 产品单位 + updateProductUnit: async (data: ProductUnitVO) => { + return await request.put({ url: `/erp/product-unit/update`, data }) + }, + + // 删除ERP 产品单位 + deleteProductUnit: async (id: number) => { + return await request.delete({ url: `/erp/product-unit/delete?id=` + id }) + }, + + // 导出ERP 产品单位 Excel + exportProductUnit: async (params) => { + return await request.download({ url: `/erp/product-unit/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/components/Table/src/TableSelectForm.vue b/src/components/Table/src/TableSelectForm.vue index 55b2855e..7fece2d2 100644 --- a/src/components/Table/src/TableSelectForm.vue +++ b/src/components/Table/src/TableSelectForm.vue @@ -1,3 +1,4 @@ +