Merge branch 'dev' of https://gitee.com/yudaocode/yudao-ui-admin-vben into reform-mp
This commit is contained in:
@@ -9,9 +9,11 @@ export namespace AiImageApi {
|
||||
label: string; // Make Variations 文本
|
||||
style: number; // 样式: 2(Primary)、3(Green)
|
||||
}
|
||||
// AI 绘图
|
||||
|
||||
/** AI 绘图 */
|
||||
export interface Image {
|
||||
id: number; // 编号
|
||||
userId: number;
|
||||
platform: string; // 平台
|
||||
model: string; // 模型
|
||||
prompt: string; // 提示词
|
||||
@@ -82,6 +84,7 @@ export function deleteImageMy(id: number) {
|
||||
}
|
||||
|
||||
// ================ midjourney 专属 ================
|
||||
|
||||
// 【Midjourney】生成图片
|
||||
export function midjourneyImagine(data: AiImageApi.ImageMidjourneyImagineReq) {
|
||||
return requestClient.post(`/ai/image/midjourney/imagine`, data);
|
||||
@@ -93,6 +96,7 @@ export function midjourneyAction(data: AiImageApi.ImageMidjourneyAction) {
|
||||
}
|
||||
|
||||
// ================ 绘图管理 ================
|
||||
|
||||
// 查询绘画分页
|
||||
export function getImagePage(params: any) {
|
||||
return requestClient.get<AiImageApi.Image[]>(`/ai/image/page`, { params });
|
||||
|
||||
@@ -27,6 +27,7 @@ export function getKnowledge(id: number) {
|
||||
`/ai/knowledge/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
// 新增知识库
|
||||
export function createKnowledge(data: AiKnowledgeKnowledgeApi.Knowledge) {
|
||||
return requestClient.post('/ai/knowledge/create', data);
|
||||
|
||||
@@ -48,9 +48,13 @@ export function updateKnowledgeSegment(
|
||||
}
|
||||
|
||||
// 修改知识库分段状态
|
||||
export function updateKnowledgeSegmentStatus(data: any) {
|
||||
return requestClient.put('/ai/knowledge/segment/update-status', data);
|
||||
export function updateKnowledgeSegmentStatus(id: number, status: number) {
|
||||
return requestClient.put('/ai/knowledge/segment/update-status', {
|
||||
id,
|
||||
status,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除知识库分段
|
||||
export function deleteKnowledgeSegment(id: number) {
|
||||
return requestClient.delete(`/ai/knowledge/segment/delete?id=${id}`);
|
||||
|
||||
@@ -2,28 +2,48 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export function getWorkflowPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<any>>('/ai/workflow/page', {
|
||||
params,
|
||||
});
|
||||
export namespace AiWorkflowApi {
|
||||
/** 工作流 */
|
||||
export interface Workflow {
|
||||
id?: number; // 编号
|
||||
name: string; // 工作流名称
|
||||
code: string; // 工作流标识
|
||||
graph: string; // 工作流模型 JSON 数据
|
||||
remark?: string; // 备注
|
||||
status: number; // 状态
|
||||
createTime?: Date; // 创建时间
|
||||
}
|
||||
}
|
||||
|
||||
export const getWorkflow = (id: number | string) => {
|
||||
return requestClient.get(`/ai/workflow/get?id=${id}`);
|
||||
};
|
||||
/** 查询工作流管理列表 */
|
||||
export function getWorkflowPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiWorkflowApi.Workflow>>(
|
||||
'/ai/workflow/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
export const createWorkflow = (data: any) => {
|
||||
/** 查询工作流详情 */
|
||||
export function getWorkflow(id: number) {
|
||||
return requestClient.get<AiWorkflowApi.Workflow>(`/ai/workflow/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增工作流 */
|
||||
export function createWorkflow(data: AiWorkflowApi.Workflow) {
|
||||
return requestClient.post('/ai/workflow/create', data);
|
||||
};
|
||||
}
|
||||
|
||||
export const updateWorkflow = (data: any) => {
|
||||
/** 修改工作流 */
|
||||
export function updateWorkflow(data: AiWorkflowApi.Workflow) {
|
||||
return requestClient.put('/ai/workflow/update', data);
|
||||
};
|
||||
}
|
||||
|
||||
export const deleteWorkflow = (id: number | string) => {
|
||||
/** 删除工作流 */
|
||||
export function deleteWorkflow(id: number) {
|
||||
return requestClient.delete(`/ai/workflow/delete?id=${id}`);
|
||||
};
|
||||
}
|
||||
|
||||
export const testWorkflow = (data: any) => {
|
||||
/** 测试工作流 */
|
||||
export function testWorkflow(data: any) {
|
||||
return requestClient.post('/ai/workflow/test', data);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,19 +5,6 @@ import type { CrmPermissionApi } from '#/api/crm/permission';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmBusinessApi {
|
||||
/** 商机产品信息 */
|
||||
export interface BusinessProduct {
|
||||
id: number;
|
||||
productId: number;
|
||||
productName: string;
|
||||
productNo: string;
|
||||
productUnit: number;
|
||||
productPrice: number;
|
||||
businessPrice: number;
|
||||
count: number;
|
||||
totalPrice: number;
|
||||
}
|
||||
|
||||
/** 商机信息 */
|
||||
export interface Business {
|
||||
id: number;
|
||||
@@ -49,7 +36,21 @@ export namespace CrmBusinessApi {
|
||||
products?: BusinessProduct[];
|
||||
}
|
||||
|
||||
export interface BusinessStatus {
|
||||
/** 商机产品信息 */
|
||||
export interface BusinessProduct {
|
||||
id: number;
|
||||
productId: number;
|
||||
productName: string;
|
||||
productNo: string;
|
||||
productUnit: number;
|
||||
productPrice: number;
|
||||
businessPrice: number;
|
||||
count: number;
|
||||
totalPrice: number;
|
||||
}
|
||||
|
||||
/** 商机更新状态请求 */
|
||||
export interface BusinessUpdateStatusReqVO {
|
||||
id: number;
|
||||
statusId: number | undefined;
|
||||
endStatus: number | undefined;
|
||||
@@ -97,7 +98,9 @@ export function updateBusiness(data: CrmBusinessApi.Business) {
|
||||
}
|
||||
|
||||
/** 修改商机状态 */
|
||||
export function updateBusinessStatus(data: CrmBusinessApi.BusinessStatus) {
|
||||
export function updateBusinessStatus(
|
||||
data: CrmBusinessApi.BusinessUpdateStatusReqVO,
|
||||
) {
|
||||
return requestClient.put('/crm/business/update-status', data);
|
||||
}
|
||||
|
||||
@@ -120,6 +123,6 @@ export function getBusinessPageByContact(params: PageParam) {
|
||||
}
|
||||
|
||||
/** 商机转移 */
|
||||
export function transferBusiness(data: CrmPermissionApi.TransferReq) {
|
||||
export function transferBusiness(data: CrmPermissionApi.BusinessTransferReqVO) {
|
||||
return requestClient.put('/crm/business/transfer', data);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmBusinessStatusApi {
|
||||
/** 商机状态信息 */
|
||||
export interface BusinessStatusType {
|
||||
[x: string]: any;
|
||||
id?: number;
|
||||
name: string;
|
||||
percent: number;
|
||||
}
|
||||
|
||||
/** 商机状态组信息 */
|
||||
export interface BusinessStatus {
|
||||
id?: number;
|
||||
@@ -21,6 +13,14 @@ export namespace CrmBusinessStatusApi {
|
||||
createTime?: Date;
|
||||
statuses?: BusinessStatusType[];
|
||||
}
|
||||
|
||||
/** 商机状态信息 */
|
||||
export interface BusinessStatusType {
|
||||
id?: number;
|
||||
name: string;
|
||||
percent: number;
|
||||
[x: string]: any;
|
||||
}
|
||||
}
|
||||
|
||||
/** 默认商机状态 */
|
||||
|
||||
@@ -71,7 +71,7 @@ export function exportClue(params: any) {
|
||||
}
|
||||
|
||||
/** 线索转移 */
|
||||
export function transferClue(data: CrmPermissionApi.TransferReq) {
|
||||
export function transferClue(data: CrmPermissionApi.BusinessTransferReqVO) {
|
||||
return requestClient.put('/crm/clue/transfer', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,13 +38,13 @@ export namespace CrmContactApi {
|
||||
}
|
||||
|
||||
/** 联系人商机关联请求 */
|
||||
export interface ContactBusinessReq {
|
||||
export interface ContactBusinessReqVO {
|
||||
contactId: number;
|
||||
businessIds: number[];
|
||||
}
|
||||
|
||||
/** 商机联系人关联请求 */
|
||||
export interface BusinessContactReq {
|
||||
export interface BusinessContactReqVO {
|
||||
businessId: number;
|
||||
contactIds: number[];
|
||||
}
|
||||
@@ -108,33 +108,33 @@ export function getSimpleContactList() {
|
||||
|
||||
/** 批量新增联系人商机关联 */
|
||||
export function createContactBusinessList(
|
||||
data: CrmContactApi.ContactBusinessReq,
|
||||
data: CrmContactApi.ContactBusinessReqVO,
|
||||
) {
|
||||
return requestClient.post('/crm/contact/create-business-list', data);
|
||||
}
|
||||
|
||||
/** 批量新增商机联系人关联 */
|
||||
export function createBusinessContactList(
|
||||
data: CrmContactApi.BusinessContactReq,
|
||||
data: CrmContactApi.BusinessContactReqVO,
|
||||
) {
|
||||
return requestClient.post('/crm/contact/create-business-list2', data);
|
||||
}
|
||||
|
||||
/** 解除联系人商机关联 */
|
||||
export function deleteContactBusinessList(
|
||||
data: CrmContactApi.ContactBusinessReq,
|
||||
data: CrmContactApi.ContactBusinessReqVO,
|
||||
) {
|
||||
return requestClient.delete('/crm/contact/delete-business-list', { data });
|
||||
}
|
||||
|
||||
/** 解除商机联系人关联 */
|
||||
export function deleteBusinessContactList(
|
||||
data: CrmContactApi.BusinessContactReq,
|
||||
data: CrmContactApi.BusinessContactReqVO,
|
||||
) {
|
||||
return requestClient.delete('/crm/contact/delete-business-list2', { data });
|
||||
}
|
||||
|
||||
/** 联系人转移 */
|
||||
export function transferContact(data: CrmPermissionApi.TransferReq) {
|
||||
export function transferContact(data: CrmPermissionApi.BusinessTransferReqVO) {
|
||||
return requestClient.put('/crm/contact/transfer', data);
|
||||
}
|
||||
|
||||
@@ -5,19 +5,6 @@ import type { CrmPermissionApi } from '#/api/crm/permission';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmContractApi {
|
||||
/** 合同产品信息 */
|
||||
export interface ContractProduct {
|
||||
id: number;
|
||||
productId: number;
|
||||
productName: string;
|
||||
productNo: string;
|
||||
productUnit: number;
|
||||
productPrice: number;
|
||||
contractPrice: number;
|
||||
count: number;
|
||||
totalPrice: number;
|
||||
}
|
||||
|
||||
/** 合同信息 */
|
||||
export interface Contract {
|
||||
id: number;
|
||||
@@ -50,6 +37,20 @@ export namespace CrmContractApi {
|
||||
creatorName: string;
|
||||
updateTime?: Date;
|
||||
products?: ContractProduct[];
|
||||
contactName?: string;
|
||||
}
|
||||
|
||||
/** 合同产品信息 */
|
||||
export interface ContractProduct {
|
||||
id: number;
|
||||
productId: number;
|
||||
productName: string;
|
||||
productNo: string;
|
||||
productUnit: number;
|
||||
productPrice: number;
|
||||
contractPrice: number;
|
||||
count: number;
|
||||
totalPrice: number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +118,7 @@ export function submitContract(id: number) {
|
||||
}
|
||||
|
||||
/** 合同转移 */
|
||||
export function transferContract(data: CrmPermissionApi.TransferReq) {
|
||||
export function transferContract(data: CrmPermissionApi.BusinessTransferReqVO) {
|
||||
return requestClient.put('/crm/contract/transfer', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export namespace CrmCustomerApi {
|
||||
ownerUserId: number; // 负责人的用户编号
|
||||
ownerUserName?: string; // 负责人的用户名称
|
||||
ownerUserDept?: string; // 负责人的部门名称
|
||||
ownerUserDeptName?: string; // 负责人的部门名称
|
||||
lockStatus?: boolean;
|
||||
dealStatus?: boolean;
|
||||
mobile: string; // 手机号
|
||||
@@ -34,8 +35,11 @@ export namespace CrmCustomerApi {
|
||||
creatorName?: string; // 创建人名称
|
||||
createTime: Date; // 创建时间
|
||||
updateTime: Date; // 更新时间
|
||||
poolDay?: number; // 距离进入公海天数
|
||||
}
|
||||
export interface CustomerImport {
|
||||
|
||||
/** 客户导入请求 */
|
||||
export interface CustomerImportReqVO {
|
||||
ownerUserId: number;
|
||||
file: File;
|
||||
updateSupport: boolean;
|
||||
@@ -83,7 +87,7 @@ export function importCustomerTemplate() {
|
||||
}
|
||||
|
||||
/** 导入客户 */
|
||||
export function importCustomer(data: CrmCustomerApi.CustomerImport) {
|
||||
export function importCustomer(data: CrmCustomerApi.CustomerImportReqVO) {
|
||||
return requestClient.upload('/crm/customer/import', data);
|
||||
}
|
||||
|
||||
@@ -95,7 +99,7 @@ export function getCustomerSimpleList() {
|
||||
}
|
||||
|
||||
/** 客户转移 */
|
||||
export function transferCustomer(data: CrmPermissionApi.TransferReq) {
|
||||
export function transferCustomer(data: CrmPermissionApi.BusinessTransferReqVO) {
|
||||
return requestClient.put('/crm/customer/transfer', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,18 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmFollowUpApi {
|
||||
/** 关联商机信息 */
|
||||
export interface Business {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** 关联联系人信息 */
|
||||
export interface Contact {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** 跟进记录信息 */
|
||||
export interface FollowUpRecord {
|
||||
id: number; // 编号
|
||||
@@ -32,6 +20,18 @@ export namespace CrmFollowUpApi {
|
||||
creator: string;
|
||||
creatorName?: string;
|
||||
}
|
||||
|
||||
/** 关联商机信息 */
|
||||
export interface Business {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** 关联联系人信息 */
|
||||
export interface Contact {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询跟进记录分页 */
|
||||
|
||||
@@ -5,12 +5,6 @@ import type { SystemOperateLogApi } from '#/api/system/operate-log';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmOperateLogApi {
|
||||
/** 操作日志查询参数 */
|
||||
export interface OperateLogQuery {
|
||||
bizType: number;
|
||||
bizId: number;
|
||||
}
|
||||
|
||||
/** 操作日志信息 */
|
||||
export interface OperateLog {
|
||||
id: number;
|
||||
@@ -22,10 +16,18 @@ export namespace CrmOperateLogApi {
|
||||
creatorName?: string;
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
/** 操作日志查询请求 */
|
||||
export interface OperateLogQueryReqVO {
|
||||
bizType: number;
|
||||
bizId: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得操作日志 */
|
||||
export function getOperateLogPage(params: CrmOperateLogApi.OperateLogQuery) {
|
||||
export function getOperateLogPage(
|
||||
params: CrmOperateLogApi.OperateLogQueryReqVO,
|
||||
) {
|
||||
return requestClient.get<PageResult<SystemOperateLogApi.OperateLog>>(
|
||||
'/crm/operate-log/page',
|
||||
{ params },
|
||||
|
||||
@@ -17,14 +17,15 @@ export namespace CrmPermissionApi {
|
||||
}
|
||||
|
||||
/** 数据权限转移请求 */
|
||||
export interface TransferReq {
|
||||
export interface BusinessTransferReqVO {
|
||||
id: number; // 模块编号
|
||||
newOwnerUserId: number; // 新负责人的用户编号
|
||||
oldOwnerPermissionLevel?: number; // 老负责人加入团队后的权限级别
|
||||
toBizTypes?: number[]; // 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择
|
||||
}
|
||||
|
||||
export interface PermissionListReq {
|
||||
/** 权限列表请求 */
|
||||
export interface PermissionListReqVO {
|
||||
bizId: number; // 模块数据编号
|
||||
bizType: number; // 模块类型
|
||||
}
|
||||
@@ -54,7 +55,9 @@ export enum PermissionLevelEnum {
|
||||
}
|
||||
|
||||
/** 获得数据权限列表(查询团队成员列表) */
|
||||
export function getPermissionList(params: CrmPermissionApi.PermissionListReq) {
|
||||
export function getPermissionList(
|
||||
params: CrmPermissionApi.PermissionListReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmPermissionApi.Permission[]>(
|
||||
'/crm/permission/list',
|
||||
{ params },
|
||||
|
||||
@@ -3,14 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmReceivableApi {
|
||||
/** 合同信息 */
|
||||
export interface Contract {
|
||||
id?: number;
|
||||
name?: string;
|
||||
no: string;
|
||||
totalPrice: number;
|
||||
}
|
||||
|
||||
/** 回款信息 */
|
||||
export interface Receivable {
|
||||
id: number;
|
||||
@@ -35,20 +27,17 @@ export namespace CrmReceivableApi {
|
||||
updateTime: Date; // 更新时间
|
||||
}
|
||||
|
||||
export interface ReceivablePageParam extends PageParam {
|
||||
no?: string;
|
||||
planId?: number;
|
||||
customerId?: number;
|
||||
contractId?: number;
|
||||
sceneType?: number;
|
||||
auditStatus?: number;
|
||||
/** 合同信息 */
|
||||
export interface Contract {
|
||||
id?: number;
|
||||
name?: string;
|
||||
no: string;
|
||||
totalPrice: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询回款列表 */
|
||||
export function getReceivablePage(
|
||||
params: CrmReceivableApi.ReceivablePageParam,
|
||||
) {
|
||||
export function getReceivablePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CrmReceivableApi.Receivable>>(
|
||||
'/crm/receivable/page',
|
||||
{ params },
|
||||
@@ -56,9 +45,7 @@ export function getReceivablePage(
|
||||
}
|
||||
|
||||
/** 查询回款列表,基于指定客户 */
|
||||
export function getReceivablePageByCustomer(
|
||||
params: CrmReceivableApi.ReceivablePageParam,
|
||||
) {
|
||||
export function getReceivablePageByCustomer(params: PageParam) {
|
||||
return requestClient.get<PageResult<CrmReceivableApi.Receivable>>(
|
||||
'/crm/receivable/page-by-customer',
|
||||
{ params },
|
||||
|
||||
@@ -29,20 +29,10 @@ export namespace CrmReceivablePlanApi {
|
||||
returnTime: Date;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PlanPageParam extends PageParam {
|
||||
customerId?: number;
|
||||
contractId?: number;
|
||||
contractNo?: string;
|
||||
sceneType?: number;
|
||||
remindType?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询回款计划列表 */
|
||||
export function getReceivablePlanPage(
|
||||
params: CrmReceivablePlanApi.PlanPageParam,
|
||||
) {
|
||||
export function getReceivablePlanPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<CrmReceivablePlanApi.Plan>>(
|
||||
'/crm/receivable-plan/page',
|
||||
{ params },
|
||||
@@ -50,9 +40,7 @@ export function getReceivablePlanPage(
|
||||
}
|
||||
|
||||
/** 查询回款计划列表(按客户) */
|
||||
export function getReceivablePlanPageByCustomer(
|
||||
params: CrmReceivablePlanApi.PlanPageParam,
|
||||
) {
|
||||
export function getReceivablePlanPageByCustomer(params: PageParam) {
|
||||
return requestClient.get<PageResult<CrmReceivablePlanApi.Plan>>(
|
||||
'/crm/receivable-plan/page-by-customer',
|
||||
{ params },
|
||||
@@ -98,7 +86,7 @@ export function deleteReceivablePlan(id: number) {
|
||||
}
|
||||
|
||||
/** 导出回款计划 Excel */
|
||||
export function exportReceivablePlan(params: PageParam) {
|
||||
export function exportReceivablePlan(params: any) {
|
||||
return requestClient.download('/crm/receivable-plan/export-excel', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmStatisticsCustomerApi {
|
||||
/** 客户总量分析(按日期) */
|
||||
export interface CustomerSummaryByDate {
|
||||
/** 客户统计请求 */
|
||||
export interface CustomerSummaryReqVO {
|
||||
times: string[];
|
||||
interval: number;
|
||||
deptId: number;
|
||||
userId: number;
|
||||
userIds: number[];
|
||||
}
|
||||
|
||||
/** 客户总量分析(按日期)响应 */
|
||||
export interface CustomerSummaryByDateRespVO {
|
||||
time: string;
|
||||
customerCreateCount: number;
|
||||
customerDealCount: number;
|
||||
}
|
||||
|
||||
/** 客户总量分析(按用户) */
|
||||
export interface CustomerSummaryByUser {
|
||||
/** 客户总量分析(按用户)响应 */
|
||||
export interface CustomerSummaryByUserRespVO {
|
||||
ownerUserName: string;
|
||||
customerCreateCount: number;
|
||||
customerDealCount: number;
|
||||
@@ -17,28 +26,28 @@ export namespace CrmStatisticsCustomerApi {
|
||||
receivablePrice: number;
|
||||
}
|
||||
|
||||
/** 客户跟进次数分析(按日期) */
|
||||
export interface FollowUpSummaryByDate {
|
||||
/** 客户跟进次数分析(按日期)响应 */
|
||||
export interface FollowUpSummaryByDateRespVO {
|
||||
time: string;
|
||||
followUpRecordCount: number;
|
||||
followUpCustomerCount: number;
|
||||
}
|
||||
|
||||
/** 客户跟进次数分析(按用户) */
|
||||
export interface FollowUpSummaryByUser {
|
||||
/** 客户跟进次数分析(按用户)响应 */
|
||||
export interface FollowUpSummaryByUserRespVO {
|
||||
ownerUserName: string;
|
||||
followupRecordCount: number;
|
||||
followupCustomerCount: number;
|
||||
}
|
||||
|
||||
/** 客户跟进方式统计 */
|
||||
export interface FollowUpSummaryByType {
|
||||
/** 客户跟进方式统计响应 */
|
||||
export interface FollowUpSummaryByTypeRespVO {
|
||||
followUpType: string;
|
||||
followUpRecordCount: number;
|
||||
}
|
||||
|
||||
/** 合同摘要信息 */
|
||||
export interface CustomerContractSummary {
|
||||
/** 合同摘要信息响应 */
|
||||
export interface CustomerContractSummaryRespVO {
|
||||
customerName: string;
|
||||
contractName: string;
|
||||
totalPrice: number;
|
||||
@@ -51,54 +60,46 @@ export namespace CrmStatisticsCustomerApi {
|
||||
orderDate: Date;
|
||||
}
|
||||
|
||||
/** 客户公海分析(按日期) */
|
||||
export interface PoolSummaryByDate {
|
||||
/** 客户公海分析(按日期)响应 */
|
||||
export interface PoolSummaryByDateRespVO {
|
||||
time: string;
|
||||
customerPutCount: number;
|
||||
customerTakeCount: number;
|
||||
}
|
||||
|
||||
/** 客户公海分析(按用户) */
|
||||
export interface PoolSummaryByUser {
|
||||
/** 客户公海分析(按用户)响应 */
|
||||
export interface PoolSummaryByUserRespVO {
|
||||
ownerUserName: string;
|
||||
customerPutCount: number;
|
||||
customerTakeCount: number;
|
||||
}
|
||||
|
||||
/** 客户成交周期(按日期) */
|
||||
export interface CustomerDealCycleByDate {
|
||||
/** 客户成交周期(按日期)响应 */
|
||||
export interface CustomerDealCycleByDateRespVO {
|
||||
time: string;
|
||||
customerDealCycle: number;
|
||||
}
|
||||
|
||||
/** 客户成交周期(按用户) */
|
||||
export interface CustomerDealCycleByUser {
|
||||
/** 客户成交周期(按用户)响应 */
|
||||
export interface CustomerDealCycleByUserRespVO {
|
||||
ownerUserName: string;
|
||||
customerDealCycle: number;
|
||||
customerDealCount: number;
|
||||
}
|
||||
|
||||
/** 客户成交周期(按地区) */
|
||||
export interface CustomerDealCycleByArea {
|
||||
/** 客户成交周期(按地区)响应 */
|
||||
export interface CustomerDealCycleByAreaRespVO {
|
||||
areaName: string;
|
||||
customerDealCycle: number;
|
||||
customerDealCount: number;
|
||||
}
|
||||
|
||||
/** 客户成交周期(按产品) */
|
||||
export interface CustomerDealCycleByProduct {
|
||||
/** 客户成交周期(按产品)响应 */
|
||||
export interface CustomerDealCycleByProductRespVO {
|
||||
productName: string;
|
||||
customerDealCycle: number;
|
||||
customerDealCount: number;
|
||||
}
|
||||
|
||||
export interface CustomerSummaryParams {
|
||||
times: string[];
|
||||
interval: number;
|
||||
deptId: number;
|
||||
userId: number;
|
||||
userIds: number[];
|
||||
}
|
||||
}
|
||||
|
||||
export function getDatas(activeTabName: any, params: any) {
|
||||
@@ -167,69 +168,63 @@ export function getChartDatas(activeTabName: any, params: any) {
|
||||
|
||||
/** 客户总量分析(按日期) */
|
||||
export function getCustomerSummaryByDate(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerSummaryByDate[]>(
|
||||
'/crm/statistics-customer/get-customer-summary-by-date',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerSummaryByDateRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-summary-by-date', { params });
|
||||
}
|
||||
|
||||
/** 客户总量分析(按用户) */
|
||||
export function getCustomerSummaryByUser(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerSummaryByUser[]>(
|
||||
'/crm/statistics-customer/get-customer-summary-by-user',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerSummaryByUserRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-summary-by-user', { params });
|
||||
}
|
||||
|
||||
/** 客户跟进次数分析(按日期) */
|
||||
export function getFollowUpSummaryByDate(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.FollowUpSummaryByDate[]>(
|
||||
'/crm/statistics-customer/get-follow-up-summary-by-date',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.FollowUpSummaryByDateRespVO[]
|
||||
>('/crm/statistics-customer/get-follow-up-summary-by-date', { params });
|
||||
}
|
||||
|
||||
/** 客户跟进次数分析(按用户) */
|
||||
export function getFollowUpSummaryByUser(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.FollowUpSummaryByUser[]>(
|
||||
'/crm/statistics-customer/get-follow-up-summary-by-user',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.FollowUpSummaryByUserRespVO[]
|
||||
>('/crm/statistics-customer/get-follow-up-summary-by-user', { params });
|
||||
}
|
||||
|
||||
/** 获取客户跟进方式统计数 */
|
||||
export function getFollowUpSummaryByType(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.FollowUpSummaryByType[]>(
|
||||
'/crm/statistics-customer/get-follow-up-summary-by-type',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.FollowUpSummaryByTypeRespVO[]
|
||||
>('/crm/statistics-customer/get-follow-up-summary-by-type', { params });
|
||||
}
|
||||
|
||||
/** 合同摘要信息(客户转化率页面) */
|
||||
export function getContractSummary(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerContractSummary[]>(
|
||||
'/crm/statistics-customer/get-contract-summary',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerContractSummaryRespVO[]
|
||||
>('/crm/statistics-customer/get-contract-summary', { params });
|
||||
}
|
||||
|
||||
/** 获取客户公海分析(按日期) */
|
||||
export function getPoolSummaryByDate(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.PoolSummaryByDate[]>(
|
||||
return requestClient.get<CrmStatisticsCustomerApi.PoolSummaryByDateRespVO[]>(
|
||||
'/crm/statistics-customer/get-pool-summary-by-date',
|
||||
{ params },
|
||||
);
|
||||
@@ -237,9 +232,9 @@ export function getPoolSummaryByDate(
|
||||
|
||||
/** 获取客户公海分析(按用户) */
|
||||
export function getPoolSummaryByUser(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.PoolSummaryByUser[]>(
|
||||
return requestClient.get<CrmStatisticsCustomerApi.PoolSummaryByUserRespVO[]>(
|
||||
'/crm/statistics-customer/get-pool-summary-by-user',
|
||||
{ params },
|
||||
);
|
||||
@@ -247,39 +242,36 @@ export function getPoolSummaryByUser(
|
||||
|
||||
/** 获取客户成交周期(按日期) */
|
||||
export function getCustomerDealCycleByDate(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerDealCycleByDate[]>(
|
||||
'/crm/statistics-customer/get-customer-deal-cycle-by-date',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerDealCycleByDateRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-deal-cycle-by-date', { params });
|
||||
}
|
||||
|
||||
/** 获取客户成交周期(按用户) */
|
||||
export function getCustomerDealCycleByUser(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerDealCycleByUser[]>(
|
||||
'/crm/statistics-customer/get-customer-deal-cycle-by-user',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerDealCycleByUserRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-deal-cycle-by-user', { params });
|
||||
}
|
||||
|
||||
/** 获取客户成交周期(按地区) */
|
||||
export function getCustomerDealCycleByArea(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsCustomerApi.CustomerDealCycleByArea[]>(
|
||||
'/crm/statistics-customer/get-customer-deal-cycle-by-area',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerDealCycleByAreaRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-deal-cycle-by-area', { params });
|
||||
}
|
||||
|
||||
/** 获取客户成交周期(按产品) */
|
||||
export function getCustomerDealCycleByProduct(
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryParams,
|
||||
params: CrmStatisticsCustomerApi.CustomerSummaryReqVO,
|
||||
) {
|
||||
return requestClient.get<
|
||||
CrmStatisticsCustomerApi.CustomerDealCycleByProduct[]
|
||||
CrmStatisticsCustomerApi.CustomerDealCycleByProductRespVO[]
|
||||
>('/crm/statistics-customer/get-customer-deal-cycle-by-product', { params });
|
||||
}
|
||||
|
||||
@@ -3,22 +3,22 @@ import type { PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmStatisticsFunnelApi {
|
||||
/** 销售漏斗统计数据 */
|
||||
export interface FunnelSummary {
|
||||
/** 销售漏斗统计数据响应 */
|
||||
export interface FunnelSummaryRespVO {
|
||||
customerCount: number; // 客户数
|
||||
businessCount: number; // 商机数
|
||||
businessWinCount: number; // 赢单数
|
||||
}
|
||||
|
||||
/** 商机分析(按日期) */
|
||||
export interface BusinessSummaryByDate {
|
||||
/** 商机分析(按日期)响应 */
|
||||
export interface BusinessSummaryByDateRespVO {
|
||||
time: string; // 时间
|
||||
businessCreateCount: number; // 商机数
|
||||
totalPrice: number | string; // 商机金额
|
||||
}
|
||||
|
||||
/** 商机转化率分析(按日期) */
|
||||
export interface BusinessInversionRateSummaryByDate {
|
||||
/** 商机转化率分析(按日期)响应 */
|
||||
export interface BusinessInversionRateSummaryByDateRespVO {
|
||||
time: string; // 时间
|
||||
businessCount: number; // 商机数量
|
||||
businessWinCount: number; // 赢单商机数
|
||||
@@ -61,7 +61,7 @@ export function getChartDatas(activeTabName: any, params: any) {
|
||||
|
||||
/** 获取销售漏斗统计数据 */
|
||||
export function getFunnelSummary(params: any) {
|
||||
return requestClient.get<CrmStatisticsFunnelApi.FunnelSummary>(
|
||||
return requestClient.get<CrmStatisticsFunnelApi.FunnelSummaryRespVO>(
|
||||
'/crm/statistics-funnel/get-funnel-summary',
|
||||
{ params },
|
||||
);
|
||||
@@ -77,16 +77,15 @@ export function getBusinessSummaryByEndStatus(params: any) {
|
||||
|
||||
/** 获取新增商机分析(按日期) */
|
||||
export function getBusinessSummaryByDate(params: any) {
|
||||
return requestClient.get<CrmStatisticsFunnelApi.BusinessSummaryByDate[]>(
|
||||
'/crm/statistics-funnel/get-business-summary-by-date',
|
||||
{ params },
|
||||
);
|
||||
return requestClient.get<
|
||||
CrmStatisticsFunnelApi.BusinessSummaryByDateRespVO[]
|
||||
>('/crm/statistics-funnel/get-business-summary-by-date', { params });
|
||||
}
|
||||
|
||||
/** 获取商机转化率分析(按日期) */
|
||||
export function getBusinessInversionRateSummaryByDate(params: any) {
|
||||
return requestClient.get<
|
||||
CrmStatisticsFunnelApi.BusinessInversionRateSummaryByDate[]
|
||||
CrmStatisticsFunnelApi.BusinessInversionRateSummaryByDateRespVO[]
|
||||
>('/crm/statistics-funnel/get-business-inversion-rate-summary-by-date', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmStatisticsPerformanceApi {
|
||||
/** 员工业绩统计 */
|
||||
export interface Performance {
|
||||
/** 员工业绩统计请求 */
|
||||
export interface PerformanceReqVO {
|
||||
times: string[];
|
||||
deptId: number;
|
||||
userId: number;
|
||||
}
|
||||
|
||||
/** 员工业绩统计响应 */
|
||||
export interface PerformanceRespVO {
|
||||
time: string;
|
||||
currentMonthCount: number;
|
||||
lastMonthCount: number;
|
||||
lastYearCount: number;
|
||||
}
|
||||
export interface PerformanceParams {
|
||||
times: string[];
|
||||
deptId: number;
|
||||
userId: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 员工获得合同金额统计 */
|
||||
export function getContractPricePerformance(
|
||||
params: CrmStatisticsPerformanceApi.PerformanceParams,
|
||||
params: CrmStatisticsPerformanceApi.PerformanceReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.PerformanceRespVO[]>(
|
||||
'/crm/statistics-performance/get-contract-price-performance',
|
||||
{ params },
|
||||
);
|
||||
@@ -27,9 +29,9 @@ export function getContractPricePerformance(
|
||||
|
||||
/** 员工获得回款统计 */
|
||||
export function getReceivablePricePerformance(
|
||||
params: CrmStatisticsPerformanceApi.PerformanceParams,
|
||||
params: CrmStatisticsPerformanceApi.PerformanceReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.PerformanceRespVO[]>(
|
||||
'/crm/statistics-performance/get-receivable-price-performance',
|
||||
{ params },
|
||||
);
|
||||
@@ -37,9 +39,9 @@ export function getReceivablePricePerformance(
|
||||
|
||||
/** 员工获得签约合同数量统计 */
|
||||
export function getContractCountPerformance(
|
||||
params: CrmStatisticsPerformanceApi.PerformanceParams,
|
||||
params: CrmStatisticsPerformanceApi.PerformanceReqVO,
|
||||
) {
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
|
||||
return requestClient.get<CrmStatisticsPerformanceApi.PerformanceRespVO[]>(
|
||||
'/crm/statistics-performance/get-contract-count-performance',
|
||||
{ params },
|
||||
);
|
||||
|
||||
@@ -3,33 +3,33 @@ import type { PageParam } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmStatisticsPortraitApi {
|
||||
/** 客户基础统计信息 */
|
||||
export interface CustomerBase {
|
||||
/** 客户基础统计响应 */
|
||||
export interface CustomerBaseRespVO {
|
||||
customerCount: number;
|
||||
dealCount: number;
|
||||
dealPortion: number | string;
|
||||
}
|
||||
|
||||
/** 客户行业统计信息 */
|
||||
export interface CustomerIndustry extends CustomerBase {
|
||||
/** 客户行业统计响应 */
|
||||
export interface CustomerIndustryRespVO extends CustomerBaseRespVO {
|
||||
industryId: number;
|
||||
industryPortion: number | string;
|
||||
}
|
||||
|
||||
/** 客户来源统计信息 */
|
||||
export interface CustomerSource extends CustomerBase {
|
||||
/** 客户来源统计响应 */
|
||||
export interface CustomerSourceRespVO extends CustomerBaseRespVO {
|
||||
source: number;
|
||||
sourcePortion: number | string;
|
||||
}
|
||||
|
||||
/** 客户级别统计信息 */
|
||||
export interface CustomerLevel extends CustomerBase {
|
||||
/** 客户级别统计响应 */
|
||||
export interface CustomerLevelRespVO extends CustomerBaseRespVO {
|
||||
level: number;
|
||||
levelPortion: number | string;
|
||||
}
|
||||
|
||||
/** 客户地区统计信息 */
|
||||
export interface CustomerArea extends CustomerBase {
|
||||
/** 客户地区统计响应 */
|
||||
export interface CustomerAreaRespVO extends CustomerBaseRespVO {
|
||||
areaId: number;
|
||||
areaName: string;
|
||||
areaPortion: number | string;
|
||||
@@ -58,7 +58,7 @@ export function getDatas(activeTabName: any, params: any) {
|
||||
|
||||
/** 获取客户行业统计数据 */
|
||||
export function getCustomerIndustry(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerIndustry[]>(
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerIndustryRespVO[]>(
|
||||
'/crm/statistics-portrait/get-customer-industry-summary',
|
||||
{ params },
|
||||
);
|
||||
@@ -66,7 +66,7 @@ export function getCustomerIndustry(params: PageParam) {
|
||||
|
||||
/** 获取客户来源统计数据 */
|
||||
export function getCustomerSource(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerSource[]>(
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerSourceRespVO[]>(
|
||||
'/crm/statistics-portrait/get-customer-source-summary',
|
||||
{ params },
|
||||
);
|
||||
@@ -74,7 +74,7 @@ export function getCustomerSource(params: PageParam) {
|
||||
|
||||
/** 获取客户级别统计数据 */
|
||||
export function getCustomerLevel(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerLevel[]>(
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerLevelRespVO[]>(
|
||||
'/crm/statistics-portrait/get-customer-level-summary',
|
||||
{ params },
|
||||
);
|
||||
@@ -82,7 +82,7 @@ export function getCustomerLevel(params: PageParam) {
|
||||
|
||||
/** 获取客户地区统计数据 */
|
||||
export function getCustomerArea(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerArea[]>(
|
||||
return requestClient.get<CrmStatisticsPortraitApi.CustomerAreaRespVO[]>(
|
||||
'/crm/statistics-portrait/get-customer-area-summary',
|
||||
{ params },
|
||||
);
|
||||
|
||||
@@ -3,8 +3,8 @@ import type { PageParam } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace CrmStatisticsRankApi {
|
||||
/** 排行统计数据 */
|
||||
export interface Rank {
|
||||
/** 排行统计响应 */
|
||||
export interface RankRespVO {
|
||||
count: number;
|
||||
nickname: string;
|
||||
deptName: string;
|
||||
@@ -45,7 +45,7 @@ export function getDatas(activeTabName: any, params: any) {
|
||||
|
||||
/** 获得合同排行榜 */
|
||||
export function getContractPriceRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-contract-price-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -53,7 +53,7 @@ export function getContractPriceRank(params: PageParam) {
|
||||
|
||||
/** 获得回款排行榜 */
|
||||
export function getReceivablePriceRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-receivable-price-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -61,7 +61,7 @@ export function getReceivablePriceRank(params: PageParam) {
|
||||
|
||||
/** 签约合同排行 */
|
||||
export function getContractCountRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-contract-count-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -69,7 +69,7 @@ export function getContractCountRank(params: PageParam) {
|
||||
|
||||
/** 产品销量排行 */
|
||||
export function getProductSalesRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-product-sales-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -77,7 +77,7 @@ export function getProductSalesRank(params: PageParam) {
|
||||
|
||||
/** 新增客户数排行 */
|
||||
export function getCustomerCountRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-customer-count-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -85,7 +85,7 @@ export function getCustomerCountRank(params: PageParam) {
|
||||
|
||||
/** 新增联系人数排行 */
|
||||
export function getContactsCountRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-contacts-count-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -93,7 +93,7 @@ export function getContactsCountRank(params: PageParam) {
|
||||
|
||||
/** 跟进次数排行 */
|
||||
export function getFollowCountRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-follow-count-rank',
|
||||
{ params },
|
||||
);
|
||||
@@ -101,7 +101,7 @@ export function getFollowCountRank(params: PageParam) {
|
||||
|
||||
/** 跟进客户数排行 */
|
||||
export function getFollowCustomerCountRank(params: PageParam) {
|
||||
return requestClient.get<CrmStatisticsRankApi.Rank[]>(
|
||||
return requestClient.get<CrmStatisticsRankApi.RankRespVO[]>(
|
||||
'/crm/statistics-rank/get-follow-customer-count-rank',
|
||||
{ params },
|
||||
);
|
||||
|
||||
61
apps/web-ele/src/api/erp/finance/account/index.ts
Normal file
61
apps/web-ele/src/api/erp/finance/account/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpAccountApi {
|
||||
/** 结算账户信息 */
|
||||
export interface Account {
|
||||
id?: number; // 结算账户编号
|
||||
no: string; // 账户编码
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
defaultStatus: boolean; // 是否默认
|
||||
name: string; // 账户名称
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询结算账户分页 */
|
||||
export function getAccountPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpAccountApi.Account>>(
|
||||
'/erp/account/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询结算账户精简列表 */
|
||||
export function getAccountSimpleList() {
|
||||
return requestClient.get<ErpAccountApi.Account[]>('/erp/account/simple-list');
|
||||
}
|
||||
|
||||
/** 查询结算账户详情 */
|
||||
export function getAccount(id: number) {
|
||||
return requestClient.get<ErpAccountApi.Account>(`/erp/account/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增结算账户 */
|
||||
export function createAccount(data: ErpAccountApi.Account) {
|
||||
return requestClient.post('/erp/account/create', data);
|
||||
}
|
||||
|
||||
/** 修改结算账户 */
|
||||
export function updateAccount(data: ErpAccountApi.Account) {
|
||||
return requestClient.put('/erp/account/update', data);
|
||||
}
|
||||
|
||||
/** 修改结算账户默认状态 */
|
||||
export function updateAccountDefaultStatus(id: number, defaultStatus: boolean) {
|
||||
return requestClient.put('/erp/account/update-default-status', null, {
|
||||
params: { id, defaultStatus },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除结算账户 */
|
||||
export function deleteAccount(id: number) {
|
||||
return requestClient.delete(`/erp/account/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出结算账户 Excel */
|
||||
export function exportAccount(params: any) {
|
||||
return requestClient.download('/erp/account/export-excel', { params });
|
||||
}
|
||||
95
apps/web-ele/src/api/erp/finance/payment/index.ts
Normal file
95
apps/web-ele/src/api/erp/finance/payment/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpFinancePaymentApi {
|
||||
/** 付款单信息 */
|
||||
export interface FinancePayment {
|
||||
id?: number; // 付款单编号
|
||||
no: string; // 付款单号
|
||||
supplierId?: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
paymentTime?: Date; // 付款时间
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPrice: number; // 优惠金额
|
||||
paymentPrice: number; // 实际付款金额
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
accountId?: number; // 付款账户
|
||||
accountName?: string; // 账户名称
|
||||
financeUserId?: number; // 财务人员
|
||||
financeUserName?: string; // 财务人员姓名
|
||||
creator?: string; // 创建人
|
||||
creatorName?: string; // 创建人姓名
|
||||
items?: FinancePaymentItem[]; // 付款明细
|
||||
bizNo?: string; // 业务单号
|
||||
}
|
||||
|
||||
/** 付款单项 */
|
||||
export interface FinancePaymentItem {
|
||||
id?: number;
|
||||
row_id?: number; // 前端使用的临时 ID
|
||||
bizId: number; // 业务ID
|
||||
bizType: number; // 业务类型
|
||||
bizNo: string; // 业务编号
|
||||
totalPrice: number; // 应付金额
|
||||
paidPrice: number; // 已付金额
|
||||
paymentPrice: number; // 本次付款
|
||||
remark?: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询付款单分页 */
|
||||
export function getFinancePaymentPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpFinancePaymentApi.FinancePayment>>(
|
||||
'/erp/finance-payment/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询付款单详情 */
|
||||
export function getFinancePayment(id: number) {
|
||||
return requestClient.get<ErpFinancePaymentApi.FinancePayment>(
|
||||
`/erp/finance-payment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增付款单 */
|
||||
export function createFinancePayment(
|
||||
data: ErpFinancePaymentApi.FinancePayment,
|
||||
) {
|
||||
return requestClient.post('/erp/finance-payment/create', data);
|
||||
}
|
||||
|
||||
/** 修改付款单 */
|
||||
export function updateFinancePayment(
|
||||
data: ErpFinancePaymentApi.FinancePayment,
|
||||
) {
|
||||
return requestClient.put('/erp/finance-payment/update', data);
|
||||
}
|
||||
|
||||
/** 更新付款单的状态 */
|
||||
export function updateFinancePaymentStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/finance-payment/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除付款单 */
|
||||
export function deleteFinancePayment(ids: number[]) {
|
||||
return requestClient.delete('/erp/finance-payment/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出付款单 Excel */
|
||||
export function exportFinancePayment(params: any) {
|
||||
return requestClient.download('/erp/finance-payment/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
95
apps/web-ele/src/api/erp/finance/receipt/index.ts
Normal file
95
apps/web-ele/src/api/erp/finance/receipt/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpFinanceReceiptApi {
|
||||
/** 收款单项 */
|
||||
export interface FinanceReceiptItem {
|
||||
id?: number;
|
||||
row_id?: number; // 前端使用的临时 ID
|
||||
bizId: number; // 业务ID
|
||||
bizType: number; // 业务类型
|
||||
bizNo: string; // 业务编号
|
||||
totalPrice: number; // 应收金额
|
||||
receiptedPrice: number; // 已收金额
|
||||
receiptPrice: number; // 本次收款
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 收款单信息 */
|
||||
export interface FinanceReceipt {
|
||||
id?: number; // 收款单编号
|
||||
no: string; // 收款单号
|
||||
customerId: number; // 客户编号
|
||||
customerName?: string; // 客户名称
|
||||
receiptTime: Date; // 收款时间
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPrice: number; // 优惠金额
|
||||
receiptPrice: number; // 实际收款金额
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
accountId?: number; // 收款账户
|
||||
accountName?: string; // 账户名称
|
||||
financeUserId?: number; // 财务人员
|
||||
financeUserName?: string; // 财务人员姓名
|
||||
creator?: string; // 创建人
|
||||
creatorName?: string; // 创建人姓名
|
||||
items?: FinanceReceiptItem[]; // 收款明细
|
||||
bizNo?: string; // 业务单号
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询收款单分页 */
|
||||
export function getFinanceReceiptPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpFinanceReceiptApi.FinanceReceipt>>(
|
||||
'/erp/finance-receipt/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询收款单详情 */
|
||||
export function getFinanceReceipt(id: number) {
|
||||
return requestClient.get<ErpFinanceReceiptApi.FinanceReceipt>(
|
||||
`/erp/finance-receipt/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增收款单 */
|
||||
export function createFinanceReceipt(
|
||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||
) {
|
||||
return requestClient.post('/erp/finance-receipt/create', data);
|
||||
}
|
||||
|
||||
/** 修改收款单 */
|
||||
export function updateFinanceReceipt(
|
||||
data: ErpFinanceReceiptApi.FinanceReceipt,
|
||||
) {
|
||||
return requestClient.put('/erp/finance-receipt/update', data);
|
||||
}
|
||||
|
||||
/** 更新收款单的状态 */
|
||||
export function updateFinanceReceiptStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/finance-receipt/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除收款单 */
|
||||
export function deleteFinanceReceipt(ids: number[]) {
|
||||
return requestClient.delete('/erp/finance-receipt/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出收款单 Excel */
|
||||
export function exportFinanceReceipt(params: any) {
|
||||
return requestClient.download('/erp/finance-receipt/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
62
apps/web-ele/src/api/erp/product/category/index.ts
Normal file
62
apps/web-ele/src/api/erp/product/category/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductCategoryApi {
|
||||
/** 产品分类信息 */
|
||||
export interface ProductCategory {
|
||||
id?: number; // 分类编号
|
||||
parentId?: number; // 父分类编号
|
||||
name: string; // 分类名称
|
||||
code?: string; // 分类编码
|
||||
sort?: number; // 分类排序
|
||||
status?: number; // 开启状态
|
||||
children?: ProductCategory[]; // 子分类
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品分类列表 */
|
||||
export function getProductCategoryList(params?: any) {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
||||
'/erp/product-category/list',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品分类精简列表 */
|
||||
export function getProductCategorySimpleList() {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory[]>(
|
||||
'/erp/product-category/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品分类详情 */
|
||||
export function getProductCategory(id: number) {
|
||||
return requestClient.get<ErpProductCategoryApi.ProductCategory>(
|
||||
`/erp/product-category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品分类 */
|
||||
export function createProductCategory(
|
||||
data: ErpProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.post('/erp/product-category/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品分类 */
|
||||
export function updateProductCategory(
|
||||
data: ErpProductCategoryApi.ProductCategory,
|
||||
) {
|
||||
return requestClient.put('/erp/product-category/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品分类 */
|
||||
export function deleteProductCategory(id: number) {
|
||||
return requestClient.delete(`/erp/product-category/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品分类 Excel */
|
||||
export function exportProductCategory(params: any) {
|
||||
return requestClient.download('/erp/product-category/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
61
apps/web-ele/src/api/erp/product/product/index.ts
Normal file
61
apps/web-ele/src/api/erp/product/product/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductApi {
|
||||
/** 产品信息 */
|
||||
export interface Product {
|
||||
id?: number; // 产品编号
|
||||
name: string; // 产品名称
|
||||
barCode: string; // 产品条码
|
||||
categoryId: number; // 产品类型编号
|
||||
unitId: number; // 单位编号
|
||||
unitName?: string; // 单位名字
|
||||
status: number; // 产品状态
|
||||
standard: string; // 产品规格
|
||||
remark: string; // 产品备注
|
||||
expiryDay: number; // 保质期天数
|
||||
weight: number; // 重量(kg)
|
||||
purchasePrice: number; // 采购价格,单位:元
|
||||
salePrice: number; // 销售价格,单位:元
|
||||
minPrice: number; // 最低价格,单位:元
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品分页 */
|
||||
export function getProductPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpProductApi.Product>>(
|
||||
'/erp/product/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品精简列表 */
|
||||
export function getProductSimpleList() {
|
||||
return requestClient.get<ErpProductApi.Product[]>('/erp/product/simple-list');
|
||||
}
|
||||
|
||||
/** 查询产品详情 */
|
||||
export function getProduct(id: number) {
|
||||
return requestClient.get<ErpProductApi.Product>(`/erp/product/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增产品 */
|
||||
export function createProduct(data: ErpProductApi.Product) {
|
||||
return requestClient.post('/erp/product/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品 */
|
||||
export function updateProduct(data: ErpProductApi.Product) {
|
||||
return requestClient.put('/erp/product/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品 */
|
||||
export function deleteProduct(id: number) {
|
||||
return requestClient.delete(`/erp/product/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品 Excel */
|
||||
export function exportProduct(params: any) {
|
||||
return requestClient.download('/erp/product/export-excel', { params });
|
||||
}
|
||||
54
apps/web-ele/src/api/erp/product/unit/index.ts
Normal file
54
apps/web-ele/src/api/erp/product/unit/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpProductUnitApi {
|
||||
/** 产品单位信息 */
|
||||
export interface ProductUnit {
|
||||
id?: number; // 单位编号
|
||||
name: string; // 单位名字
|
||||
status: number; // 单位状态
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品单位分页 */
|
||||
export function getProductUnitPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpProductUnitApi.ProductUnit>>(
|
||||
'/erp/product-unit/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位精简列表 */
|
||||
export function getProductUnitSimpleList() {
|
||||
return requestClient.get<ErpProductUnitApi.ProductUnit[]>(
|
||||
'/erp/product-unit/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询产品单位详情 */
|
||||
export function getProductUnit(id: number) {
|
||||
return requestClient.get<ErpProductUnitApi.ProductUnit>(
|
||||
`/erp/product-unit/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增产品单位 */
|
||||
export function createProductUnit(data: ErpProductUnitApi.ProductUnit) {
|
||||
return requestClient.post('/erp/product-unit/create', data);
|
||||
}
|
||||
|
||||
/** 修改产品单位 */
|
||||
export function updateProductUnit(data: ErpProductUnitApi.ProductUnit) {
|
||||
return requestClient.put('/erp/product-unit/update', data);
|
||||
}
|
||||
|
||||
/** 删除产品单位 */
|
||||
export function deleteProductUnit(id: number) {
|
||||
return requestClient.delete(`/erp/product-unit/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出产品单位 Excel */
|
||||
export function exportProductUnit(params: any) {
|
||||
return requestClient.download('/erp/product-unit/export-excel', { params });
|
||||
}
|
||||
100
apps/web-ele/src/api/erp/purchase/in/index.ts
Normal file
100
apps/web-ele/src/api/erp/purchase/in/index.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseInApi {
|
||||
/** 采购入库信息 */
|
||||
export interface PurchaseIn {
|
||||
id?: number; // 入库工单编号
|
||||
no?: string; // 采购入库号
|
||||
supplierId?: number; // 供应商编号
|
||||
inTime?: Date; // 入库时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
outCount?: number; // 采购出库数量
|
||||
returnCount?: number; // 采购退货数量
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
paymentPrice?: number; // 实际支付金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
items?: PurchaseInItem[]; // 采购入库明细
|
||||
}
|
||||
|
||||
/** 采购项信息 */
|
||||
export interface PurchaseInItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
inCount?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询采购入库分页 */
|
||||
export function getPurchaseInPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpPurchaseInApi.PurchaseIn>>(
|
||||
'/erp/purchase-in/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询采购入库详情 */
|
||||
export function getPurchaseIn(id: number) {
|
||||
return requestClient.get<ErpPurchaseInApi.PurchaseIn>(
|
||||
`/erp/purchase-in/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增采购入库 */
|
||||
export function createPurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
|
||||
return requestClient.post('/erp/purchase-in/create', data);
|
||||
}
|
||||
|
||||
/** 修改采购入库 */
|
||||
export function updatePurchaseIn(data: ErpPurchaseInApi.PurchaseIn) {
|
||||
return requestClient.put('/erp/purchase-in/update', data);
|
||||
}
|
||||
|
||||
/** 更新采购入库的状态 */
|
||||
export function updatePurchaseInStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-in/update-status', null, {
|
||||
params: {
|
||||
id,
|
||||
status,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除采购入库 */
|
||||
export function deletePurchaseIn(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-in/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出采购入库 Excel */
|
||||
export function exportPurchaseIn(params: any) {
|
||||
return requestClient.download('/erp/purchase-in/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
97
apps/web-ele/src/api/erp/purchase/order/index.ts
Normal file
97
apps/web-ele/src/api/erp/purchase/order/index.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseOrderApi {
|
||||
/** 采购订单信息 */
|
||||
export interface PurchaseOrder {
|
||||
id?: number; // 订单工单编号
|
||||
no?: string; // 采购订单号
|
||||
supplierId?: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
orderTime?: Date | string; // 订单时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
totalProductPrice?: number; // 产品金额,单位:元
|
||||
discountPercent?: number; // 优惠率,百分比
|
||||
discountPrice?: number; // 优惠金额,单位:元
|
||||
depositPrice?: number; // 定金金额,单位:元
|
||||
accountId?: number; // 结算账户编号
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
fileUrl?: string; // 附件地址
|
||||
inCount?: number; // 采购入库数量
|
||||
count?: number; // 数量
|
||||
returnCount?: number; // 采购退货数量
|
||||
inStatus?: number; // 入库状态
|
||||
returnStatus?: number; // 退货状态
|
||||
productNames?: string; // 产品名称列表
|
||||
creatorName?: string; // 创建人名称
|
||||
createTime?: Date; // 创建时间
|
||||
items?: PurchaseOrderItem[]; // 订单项列表
|
||||
}
|
||||
|
||||
/** 采购订单项信息 */
|
||||
export interface PurchaseOrderItem {
|
||||
id?: number; // 订单项编号
|
||||
orderId?: number; // 采购订单编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productBarCode?: string; // 产品条码
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productPrice?: number; // 产品单价,单位:元
|
||||
totalProductPrice?: number; // 产品总价,单位:元
|
||||
count?: number; // 数量
|
||||
totalPrice?: number; // 总价,单位:元
|
||||
taxPercent?: number; // 税率,百分比
|
||||
taxPrice?: number; // 税额,单位:元
|
||||
totalTaxPrice?: number; // 含税总价,单位:元
|
||||
remark?: string; // 备注
|
||||
stockCount?: number; // 库存数量(显示字段)
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询采购订单分页 */
|
||||
export function getPurchaseOrderPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpPurchaseOrderApi.PurchaseOrder>>(
|
||||
'/erp/purchase-order/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询采购订单详情 */
|
||||
export function getPurchaseOrder(id: number) {
|
||||
return requestClient.get<ErpPurchaseOrderApi.PurchaseOrder>(
|
||||
`/erp/purchase-order/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增采购订单 */
|
||||
export function createPurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
|
||||
return requestClient.post('/erp/purchase-order/create', data);
|
||||
}
|
||||
|
||||
/** 修改采购订单 */
|
||||
export function updatePurchaseOrder(data: ErpPurchaseOrderApi.PurchaseOrder) {
|
||||
return requestClient.put('/erp/purchase-order/update', data);
|
||||
}
|
||||
|
||||
/** 更新采购订单的状态 */
|
||||
export function updatePurchaseOrderStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-order/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除采购订单 */
|
||||
export function deletePurchaseOrder(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-order/delete', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出采购订单 Excel */
|
||||
export function exportPurchaseOrder(params: any) {
|
||||
return requestClient.download('/erp/purchase-order/export-excel', { params });
|
||||
}
|
||||
96
apps/web-ele/src/api/erp/purchase/return/index.ts
Normal file
96
apps/web-ele/src/api/erp/purchase/return/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
import type { PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseReturnApi {
|
||||
/** 采购退货信息 */
|
||||
export interface PurchaseReturn {
|
||||
id?: number; // 采购退货编号
|
||||
no?: string; // 采购退货号
|
||||
supplierId?: number; // 供应商编号
|
||||
returnTime?: Date; // 退货时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
otherPrice?: number; // 其他费用
|
||||
items?: PurchaseReturnItem[];
|
||||
}
|
||||
|
||||
/** 采购退货项 */
|
||||
export interface PurchaseReturnItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询采购退货分页 */
|
||||
export function getPurchaseReturnPage(params: any) {
|
||||
return requestClient.get<PageResult<ErpPurchaseReturnApi.PurchaseReturn>>(
|
||||
'/erp/purchase-return/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询采购退货详情 */
|
||||
export function getPurchaseReturn(id: number) {
|
||||
return requestClient.get<ErpPurchaseReturnApi.PurchaseReturn>(
|
||||
`/erp/purchase-return/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增采购退货 */
|
||||
export function createPurchaseReturn(
|
||||
data: ErpPurchaseReturnApi.PurchaseReturn,
|
||||
) {
|
||||
return requestClient.post('/erp/purchase-return/create', data);
|
||||
}
|
||||
|
||||
/** 修改采购退货 */
|
||||
export function updatePurchaseReturn(
|
||||
data: ErpPurchaseReturnApi.PurchaseReturn,
|
||||
) {
|
||||
return requestClient.put('/erp/purchase-return/update', data);
|
||||
}
|
||||
|
||||
/** 更新采购退货的状态 */
|
||||
export function updatePurchaseReturnStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/purchase-return/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除采购退货 */
|
||||
export function deletePurchaseReturn(ids: number[]) {
|
||||
return requestClient.delete('/erp/purchase-return/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出采购退货 Excel */
|
||||
export function exportPurchaseReturn(params: any) {
|
||||
return requestClient.download('/erp/purchase-return/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
66
apps/web-ele/src/api/erp/purchase/supplier/index.ts
Normal file
66
apps/web-ele/src/api/erp/purchase/supplier/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSupplierApi {
|
||||
/** 供应商信息 */
|
||||
export interface Supplier {
|
||||
id?: number; // 供应商编号
|
||||
name: string; // 供应商名称
|
||||
contact: string; // 联系人
|
||||
mobile: string; // 手机号码
|
||||
telephone: string; // 联系电话
|
||||
email: string; // 电子邮箱
|
||||
fax: string; // 传真
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
taxNo: string; // 纳税人识别号
|
||||
taxPercent: number; // 税率
|
||||
bankName: string; // 开户行
|
||||
bankAccount: string; // 开户账号
|
||||
bankAddress: string; // 开户地址
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询供应商分页 */
|
||||
export function getSupplierPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpSupplierApi.Supplier>>(
|
||||
'/erp/supplier/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得供应商精简列表 */
|
||||
export function getSupplierSimpleList() {
|
||||
return requestClient.get<ErpSupplierApi.Supplier[]>(
|
||||
'/erp/supplier/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询供应商详情 */
|
||||
export function getSupplier(id: number) {
|
||||
return requestClient.get<ErpSupplierApi.Supplier>(
|
||||
`/erp/supplier/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增供应商 */
|
||||
export function createSupplier(data: ErpSupplierApi.Supplier) {
|
||||
return requestClient.post('/erp/supplier/create', data);
|
||||
}
|
||||
|
||||
/** 修改供应商 */
|
||||
export function updateSupplier(data: ErpSupplierApi.Supplier) {
|
||||
return requestClient.put('/erp/supplier/update', data);
|
||||
}
|
||||
|
||||
/** 删除供应商 */
|
||||
export function deleteSupplier(id: number) {
|
||||
return requestClient.delete(`/erp/supplier/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出供应商 Excel */
|
||||
export function exportSupplier(params: any) {
|
||||
return requestClient.download('/erp/supplier/export-excel', { params });
|
||||
}
|
||||
66
apps/web-ele/src/api/erp/sale/customer/index.ts
Normal file
66
apps/web-ele/src/api/erp/sale/customer/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpCustomerApi {
|
||||
/** 客户信息 */
|
||||
export interface Customer {
|
||||
id?: number; // 客户编号
|
||||
name: string; // 客户名称
|
||||
contact: string; // 联系人
|
||||
mobile: string; // 手机号码
|
||||
telephone: string; // 联系电话
|
||||
email: string; // 电子邮箱
|
||||
fax: string; // 传真
|
||||
remark: string; // 备注
|
||||
status: number; // 开启状态
|
||||
sort: number; // 排序
|
||||
taxNo: string; // 纳税人识别号
|
||||
taxPercent: number; // 税率
|
||||
bankName: string; // 开户行
|
||||
bankAccount: string; // 开户账号
|
||||
bankAddress: string; // 开户地址
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询客户分页 */
|
||||
export function getCustomerPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpCustomerApi.Customer>>(
|
||||
'/erp/customer/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询客户精简列表 */
|
||||
export function getCustomerSimpleList() {
|
||||
return requestClient.get<ErpCustomerApi.Customer[]>(
|
||||
'/erp/customer/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询客户详情 */
|
||||
export function getCustomer(id: number) {
|
||||
return requestClient.get<ErpCustomerApi.Customer>(
|
||||
`/erp/customer/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增客户 */
|
||||
export function createCustomer(data: ErpCustomerApi.Customer) {
|
||||
return requestClient.post('/erp/customer/create', data);
|
||||
}
|
||||
|
||||
/** 修改客户 */
|
||||
export function updateCustomer(data: ErpCustomerApi.Customer) {
|
||||
return requestClient.put('/erp/customer/update', data);
|
||||
}
|
||||
|
||||
/** 删除客户 */
|
||||
export function deleteCustomer(id: number) {
|
||||
return requestClient.delete(`/erp/customer/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出客户 Excel */
|
||||
export function exportCustomer(params: any) {
|
||||
return requestClient.download('/erp/customer/export-excel', { params });
|
||||
}
|
||||
98
apps/web-ele/src/api/erp/sale/order/index.ts
Normal file
98
apps/web-ele/src/api/erp/sale/order/index.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleOrderApi {
|
||||
/** 销售订单信息 */
|
||||
export interface SaleOrder {
|
||||
id?: number; // 订单工单编号
|
||||
no: string; // 销售订单号
|
||||
customerId: number; // 客户编号
|
||||
accountId?: number; // 收款账户编号
|
||||
orderTime: Date; // 订单时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
outCount: number; // 销售出库数量
|
||||
fileUrl?: string; // 附件地址
|
||||
inCount?: number; // 采购入库数量
|
||||
returnCount: number; // 销售退货数量
|
||||
totalProductPrice?: number; // 产品金额,单位:元
|
||||
discountPercent?: number; // 优惠率,百分比
|
||||
discountPrice?: number; // 优惠金额,单位:元
|
||||
depositPrice?: number; // 定金金额,单位:元
|
||||
items?: SaleOrderItem[]; // 销售订单产品明细列表
|
||||
}
|
||||
|
||||
/** 销售订单项 */
|
||||
export interface SaleOrderItem {
|
||||
id?: number; // 订单项编号
|
||||
orderId?: number; // 采购订单编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productBarCode?: string; // 产品条码
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productPrice?: number; // 产品单价,单位:元
|
||||
totalProductPrice?: number; // 产品总价,单位:元
|
||||
count?: number; // 数量
|
||||
totalPrice?: number; // 总价,单位:元
|
||||
taxPercent?: number; // 税率,百分比
|
||||
taxPrice?: number; // 税额,单位:元
|
||||
totalTaxPrice?: number; // 含税总价,单位:元
|
||||
remark?: string; // 备注
|
||||
stockCount?: number; // 库存数量(显示字段)
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询销售订单分页 */
|
||||
export function getSaleOrderPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpSaleOrderApi.SaleOrder>>(
|
||||
'/erp/sale-order/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售订单详情 */
|
||||
export function getSaleOrder(id: number) {
|
||||
return requestClient.get<ErpSaleOrderApi.SaleOrder>(
|
||||
`/erp/sale-order/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售订单项列表 */
|
||||
export function getSaleOrderItemListByOrderId(orderId: number) {
|
||||
return requestClient.get<ErpSaleOrderApi.SaleOrderItem[]>(
|
||||
`/erp/sale-order/item/list-by-order-id?orderId=${orderId}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增销售订单 */
|
||||
export function createSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
||||
return requestClient.post('/erp/sale-order/create', data);
|
||||
}
|
||||
|
||||
/** 修改销售订单 */
|
||||
export function updateSaleOrder(data: ErpSaleOrderApi.SaleOrder) {
|
||||
return requestClient.put('/erp/sale-order/update', data);
|
||||
}
|
||||
|
||||
/** 更新销售订单的状态 */
|
||||
export function updateSaleOrderStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-order/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除销售订单 */
|
||||
export function deleteSaleOrder(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-order/delete', {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出销售订单 Excel */
|
||||
export function exportSaleOrder(params: any) {
|
||||
return requestClient.download('/erp/sale-order/export-excel', { params });
|
||||
}
|
||||
95
apps/web-ele/src/api/erp/sale/out/index.ts
Normal file
95
apps/web-ele/src/api/erp/sale/out/index.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleOutApi {
|
||||
/** 销售出库信息 */
|
||||
export interface SaleOut {
|
||||
id?: number; // 销售出库编号
|
||||
no?: string; // 销售出库号
|
||||
customerId?: number; // 客户编号
|
||||
saleUserId?: number; // 客户编号
|
||||
outTime?: Date; // 出库时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
fileUrl?: string; // 附件地址
|
||||
items?: SaleOutItem[];
|
||||
}
|
||||
|
||||
/** 销售出库项 */
|
||||
export interface SaleOutItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
outCount?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询销售出库分页 */
|
||||
export function getSaleOutPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpSaleOutApi.SaleOut>>(
|
||||
'/erp/sale-out/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售出库详情 */
|
||||
export function getSaleOut(id: number) {
|
||||
return requestClient.get<ErpSaleOutApi.SaleOut>(`/erp/sale-out/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增销售出库 */
|
||||
export function createSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||
return requestClient.post('/erp/sale-out/create', data);
|
||||
}
|
||||
|
||||
/** 修改销售出库 */
|
||||
export function updateSaleOut(data: ErpSaleOutApi.SaleOut) {
|
||||
return requestClient.put('/erp/sale-out/update', data);
|
||||
}
|
||||
|
||||
/** 更新销售出库的状态 */
|
||||
export function updateSaleOutStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-out/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除销售出库 */
|
||||
export function deleteSaleOut(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-out/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出销售出库 Excel */
|
||||
export function exportSaleOut(params: any) {
|
||||
return requestClient.download('/erp/sale-out/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
96
apps/web-ele/src/api/erp/sale/return/index.ts
Normal file
96
apps/web-ele/src/api/erp/sale/return/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleReturnApi {
|
||||
/** 销售退货信息 */
|
||||
export interface SaleReturn {
|
||||
id?: number; // 销售退货编号
|
||||
no?: string; // 销售退货号
|
||||
customerId?: number; // 客户编号
|
||||
returnTime?: Date; // 退货时间
|
||||
totalCount?: number; // 合计数量
|
||||
totalPrice?: number; // 合计金额,单位:元
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
discountPercent?: number; // 折扣百分比
|
||||
discountPrice?: number; // 折扣金额
|
||||
otherPrice?: number; // 其他费用
|
||||
totalProductPrice?: number; // 合计商品金额
|
||||
taxPrice?: number; // 合计税额
|
||||
totalTaxPrice?: number; // 合计税额
|
||||
fileUrl?: string; // 附件地址
|
||||
items?: SaleReturnItem[];
|
||||
}
|
||||
|
||||
/** 销售退货项 */
|
||||
export interface SaleReturnItem {
|
||||
count?: number;
|
||||
id?: number;
|
||||
orderItemId?: number;
|
||||
productBarCode?: string;
|
||||
productId?: number;
|
||||
productName: string;
|
||||
productPrice: number;
|
||||
productUnitId?: number;
|
||||
productUnitName?: string;
|
||||
totalProductPrice?: number;
|
||||
remark: string;
|
||||
stockCount?: number;
|
||||
taxPercent?: number;
|
||||
taxPrice?: number;
|
||||
totalPrice?: number;
|
||||
warehouseId?: number;
|
||||
returnCount?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询销售退货分页 */
|
||||
export function getSaleReturnPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpSaleReturnApi.SaleReturn>>(
|
||||
'/erp/sale-return/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询销售退货详情 */
|
||||
export function getSaleReturn(id: number) {
|
||||
return requestClient.get<ErpSaleReturnApi.SaleReturn>(
|
||||
`/erp/sale-return/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增销售退货 */
|
||||
export function createSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
|
||||
return requestClient.post('/erp/sale-return/create', data);
|
||||
}
|
||||
|
||||
/** 修改销售退货 */
|
||||
export function updateSaleReturn(data: ErpSaleReturnApi.SaleReturn) {
|
||||
return requestClient.put('/erp/sale-return/update', data);
|
||||
}
|
||||
|
||||
/** 更新销售退货的状态 */
|
||||
export function updateSaleReturnStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/sale-return/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除销售退货 */
|
||||
export function deleteSaleReturn(ids: number[]) {
|
||||
return requestClient.delete('/erp/sale-return/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出销售退货 Excel */
|
||||
export function exportSaleReturn(params: any) {
|
||||
return requestClient.download('/erp/sale-return/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
31
apps/web-ele/src/api/erp/statistics/purchase/index.ts
Normal file
31
apps/web-ele/src/api/erp/statistics/purchase/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpPurchaseStatisticsApi {
|
||||
/** 采购全局统计 */
|
||||
export interface PurchaseSummaryRespVO {
|
||||
todayPrice: number; // 今日采购金额
|
||||
yesterdayPrice: number; // 昨日采购金额
|
||||
monthPrice: number; // 本月采购金额
|
||||
yearPrice: number; // 今年采购金额
|
||||
}
|
||||
|
||||
/** 采购时间段统计 */
|
||||
export interface PurchaseTimeSummaryRespVO {
|
||||
time: string; // 时间
|
||||
price: number; // 采购金额
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得采购统计 */
|
||||
export function getPurchaseSummary() {
|
||||
return requestClient.get<ErpPurchaseStatisticsApi.PurchaseSummaryRespVO>(
|
||||
'/erp/purchase-statistics/summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得采购时间段统计 */
|
||||
export function getPurchaseTimeSummary() {
|
||||
return requestClient.get<
|
||||
ErpPurchaseStatisticsApi.PurchaseTimeSummaryRespVO[]
|
||||
>('/erp/purchase-statistics/time-summary');
|
||||
}
|
||||
31
apps/web-ele/src/api/erp/statistics/sale/index.ts
Normal file
31
apps/web-ele/src/api/erp/statistics/sale/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpSaleStatisticsApi {
|
||||
/** 销售全局统计 */
|
||||
export interface SaleSummaryRespVO {
|
||||
todayPrice: number; // 今日销售金额
|
||||
yesterdayPrice: number; // 昨日销售金额
|
||||
monthPrice: number; // 本月销售金额
|
||||
yearPrice: number; // 今年销售金额
|
||||
}
|
||||
|
||||
/** 销售时间段统计 */
|
||||
export interface SaleTimeSummaryRespVO {
|
||||
time: string; // 时间
|
||||
price: number; // 销售金额
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得销售统计 */
|
||||
export function getSaleSummary() {
|
||||
return requestClient.get<ErpSaleStatisticsApi.SaleSummaryRespVO>(
|
||||
'/erp/sale-statistics/summary',
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得销售时间段统计 */
|
||||
export function getSaleTimeSummary() {
|
||||
return requestClient.get<ErpSaleStatisticsApi.SaleTimeSummaryRespVO[]>(
|
||||
'/erp/sale-statistics/time-summary',
|
||||
);
|
||||
}
|
||||
87
apps/web-ele/src/api/erp/stock/check/index.ts
Normal file
87
apps/web-ele/src/api/erp/stock/check/index.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockCheckApi {
|
||||
/** 库存盘点单信息 */
|
||||
export interface StockCheck {
|
||||
id?: number; // 盘点编号
|
||||
no: string; // 盘点单号
|
||||
checkTime: Date; // 盘点时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
productNames?: string; // 产品信息
|
||||
creatorName?: string; // 创建人
|
||||
items?: StockCheckItem[]; // 盘点产品清单
|
||||
}
|
||||
|
||||
/** 库存盘点项 */
|
||||
export interface StockCheckItem {
|
||||
id?: number; // 编号
|
||||
warehouseId?: number; // 仓库编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count?: number; // 盈亏数量
|
||||
actualCount?: number; // 实际库存
|
||||
productPrice?: number; // 产品单价
|
||||
totalPrice?: number; // 总价
|
||||
stockCount?: number; // 账面库存
|
||||
remark?: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询库存盘点单分页 */
|
||||
export function getStockCheckPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockCheckApi.StockCheck>>(
|
||||
'/erp/stock-check/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询库存盘点单详情 */
|
||||
export function getStockCheck(id: number) {
|
||||
return requestClient.get<ErpStockCheckApi.StockCheck>(
|
||||
`/erp/stock-check/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增库存盘点单 */
|
||||
export function createStockCheck(data: ErpStockCheckApi.StockCheck) {
|
||||
return requestClient.post('/erp/stock-check/create', data);
|
||||
}
|
||||
|
||||
/** 修改库存盘点单 */
|
||||
export function updateStockCheck(data: ErpStockCheckApi.StockCheck) {
|
||||
return requestClient.put('/erp/stock-check/update', data);
|
||||
}
|
||||
|
||||
/** 更新库存盘点单的状态 */
|
||||
export function updateStockCheckStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-check/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除库存盘点 */
|
||||
export function deleteStockCheck(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-check/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出库存盘点单 Excel */
|
||||
export function exportStockCheck(params: any) {
|
||||
return requestClient.download('/erp/stock-check/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
86
apps/web-ele/src/api/erp/stock/in/index.ts
Normal file
86
apps/web-ele/src/api/erp/stock/in/index.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockInApi {
|
||||
/** 其它入库单信息 */
|
||||
export interface StockIn {
|
||||
id?: number; // 入库编号
|
||||
no: string; // 入库单号
|
||||
supplierId: number; // 供应商编号
|
||||
supplierName?: string; // 供应商名称
|
||||
inTime: Date; // 入库时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
productNames?: string; // 产品信息
|
||||
creatorName?: string; // 创建人
|
||||
items?: StockInItem[]; // 入库产品清单
|
||||
}
|
||||
|
||||
/** 其它入库单产品信息 */
|
||||
export interface StockInItem {
|
||||
id?: number; // 编号
|
||||
warehouseId: number; // 仓库编号
|
||||
productId: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count: number; // 数量
|
||||
productPrice: number; // 产品单价
|
||||
totalPrice: number; // 总价
|
||||
stockCount?: number; // 库存数量
|
||||
remark?: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询其它入库单分页 */
|
||||
export function getStockInPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockInApi.StockIn>>(
|
||||
'/erp/stock-in/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询其它入库单详情 */
|
||||
export function getStockIn(id: number) {
|
||||
return requestClient.get<ErpStockInApi.StockIn>(`/erp/stock-in/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增其它入库单 */
|
||||
export function createStockIn(data: ErpStockInApi.StockIn) {
|
||||
return requestClient.post('/erp/stock-in/create', data);
|
||||
}
|
||||
|
||||
/** 修改其它入库单 */
|
||||
export function updateStockIn(data: ErpStockInApi.StockIn) {
|
||||
return requestClient.put('/erp/stock-in/update', data);
|
||||
}
|
||||
|
||||
/** 更新其它入库单的状态 */
|
||||
export function updateStockInStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-in/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除其它入库单 */
|
||||
export function deleteStockIn(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-in/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出其它入库单 Excel */
|
||||
export function exportStockIn(params: any) {
|
||||
return requestClient.download('/erp/stock-in/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
87
apps/web-ele/src/api/erp/stock/move/index.ts
Normal file
87
apps/web-ele/src/api/erp/stock/move/index.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockMoveApi {
|
||||
/** 库存调拨单信息 */
|
||||
export interface StockMove {
|
||||
id?: number; // 调拨编号
|
||||
no: string; // 调拨单号
|
||||
outTime: Date; // 调拨时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
fromWarehouseId?: number; // 来源仓库编号
|
||||
createTime: Date; // 创建时间
|
||||
creator: string; // 创建人
|
||||
creatorName: string; // 创建人名称
|
||||
productNames: string; // 产品名称
|
||||
items?: StockMoveItem[]; // 子表信息
|
||||
}
|
||||
|
||||
/** 库存调拨单子表信息 */
|
||||
export interface StockMoveItem {
|
||||
count: number; // 数量
|
||||
fromWarehouseId?: number; // 来源仓库ID
|
||||
id?: number; // ID
|
||||
productBarCode: string; // 产品条形码
|
||||
productId?: number; // 产品ID
|
||||
productName?: string; // 产品名称
|
||||
productPrice: number; // 产品单价
|
||||
productUnitName?: string; // 产品单位
|
||||
remark?: string; // 备注
|
||||
stockCount: number; // 库存数量
|
||||
toWarehouseId?: number; // 目标仓库ID
|
||||
totalPrice?: number; // 总价
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询库存调拨单分页 */
|
||||
export function getStockMovePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockMoveApi.StockMove>>(
|
||||
'/erp/stock-move/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询库存调拨单详情 */
|
||||
export function getStockMove(id: number) {
|
||||
return requestClient.get<ErpStockMoveApi.StockMove>(
|
||||
`/erp/stock-move/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增库存调拨单 */
|
||||
export function createStockMove(data: ErpStockMoveApi.StockMove) {
|
||||
return requestClient.post('/erp/stock-move/create', data);
|
||||
}
|
||||
|
||||
/** 修改库存调拨单 */
|
||||
export function updateStockMove(data: ErpStockMoveApi.StockMove) {
|
||||
return requestClient.put('/erp/stock-move/update', data);
|
||||
}
|
||||
|
||||
/** 更新库存调拨单的状态 */
|
||||
export function updateStockMoveStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-move/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除库存调拨单 */
|
||||
export function deleteStockMove(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-move/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出库存调拨单 Excel */
|
||||
export function exportStockMove(params: any) {
|
||||
return requestClient.download('/erp/stock-move/export-excel', { params });
|
||||
}
|
||||
85
apps/web-ele/src/api/erp/stock/out/index.ts
Normal file
85
apps/web-ele/src/api/erp/stock/out/index.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockOutApi {
|
||||
/** 其它出库单信息 */
|
||||
export interface StockOut {
|
||||
id?: number; // 出库编号
|
||||
no: string; // 出库单号
|
||||
customerId: number; // 客户编号
|
||||
outTime: Date; // 出库时间
|
||||
totalCount: number; // 合计数量
|
||||
totalPrice: number; // 合计金额,单位:元
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
fileUrl?: string; // 附件
|
||||
items?: StockOutItem[]; // 出库产品清单
|
||||
}
|
||||
|
||||
/** 其它出库单产品信息 */
|
||||
export interface StockOutItem {
|
||||
id?: number; // 编号
|
||||
warehouseId?: number; // 仓库编号
|
||||
productId?: number; // 产品编号
|
||||
productName?: string; // 产品名称
|
||||
productUnitId?: number; // 产品单位编号
|
||||
productUnitName?: string; // 产品单位名称
|
||||
productBarCode?: string; // 产品条码
|
||||
count: number; // 数量
|
||||
productPrice: number; // 产品单价
|
||||
totalPrice: number; // 总价
|
||||
stockCount?: number; // 库存数量
|
||||
remark?: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询其它出库单分页 */
|
||||
export function getStockOutPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockOutApi.StockOut>>(
|
||||
'/erp/stock-out/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询其它出库单详情 */
|
||||
export function getStockOut(id: number) {
|
||||
return requestClient.get<ErpStockOutApi.StockOut>(
|
||||
`/erp/stock-out/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增其它出库单 */
|
||||
export function createStockOut(data: ErpStockOutApi.StockOut) {
|
||||
return requestClient.post('/erp/stock-out/create', data);
|
||||
}
|
||||
|
||||
/** 修改其它出库单 */
|
||||
export function updateStockOut(data: ErpStockOutApi.StockOut) {
|
||||
return requestClient.put('/erp/stock-out/update', data);
|
||||
}
|
||||
|
||||
/** 更新其它出库单的状态 */
|
||||
export function updateStockOutStatus(id: number, status: number) {
|
||||
return requestClient.put('/erp/stock-out/update-status', null, {
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除其它出库单 */
|
||||
export function deleteStockOut(ids: number[]) {
|
||||
return requestClient.delete('/erp/stock-out/delete', {
|
||||
params: {
|
||||
ids: ids.join(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出其它出库单 Excel */
|
||||
export function exportStockOut(params: any) {
|
||||
return requestClient.download('/erp/stock-out/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
31
apps/web-ele/src/api/erp/stock/record/index.ts
Normal file
31
apps/web-ele/src/api/erp/stock/record/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockRecordApi {
|
||||
/** 产品库存明细 */
|
||||
export interface StockRecord {
|
||||
id?: number; // 编号
|
||||
productId: number; // 产品编号
|
||||
warehouseId: number; // 仓库编号
|
||||
count: number; // 出入库数量
|
||||
totalCount: number; // 总库存量
|
||||
bizType: number; // 业务类型
|
||||
bizId: number; // 业务编号
|
||||
bizItemId: number; // 业务项编号
|
||||
bizNo: string; // 业务单号
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品库存明细分页 */
|
||||
export function getStockRecordPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockRecordApi.StockRecord>>(
|
||||
'/erp/stock-record/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出产品库存明细 Excel */
|
||||
export function exportStockRecord(params: any) {
|
||||
return requestClient.download('/erp/stock-record/export-excel', { params });
|
||||
}
|
||||
51
apps/web-ele/src/api/erp/stock/stock/index.ts
Normal file
51
apps/web-ele/src/api/erp/stock/stock/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpStockApi {
|
||||
/** 产品库存信息 */
|
||||
export interface Stock {
|
||||
id?: number; // 编号
|
||||
productId: number; // 产品编号
|
||||
warehouseId: number; // 仓库编号
|
||||
count: number; // 库存数量
|
||||
}
|
||||
|
||||
/** 产品库存查询参数 */
|
||||
export interface StockQueryReqVO {
|
||||
productId: number;
|
||||
warehouseId: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询产品库存分页 */
|
||||
export function getStockPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpStockApi.Stock>>('/erp/stock/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获得产品库存数量 */
|
||||
export function getStockCount(productId: number, warehouseId?: number) {
|
||||
const params: any = { productId };
|
||||
if (warehouseId !== undefined) {
|
||||
params.warehouseId = warehouseId;
|
||||
}
|
||||
return requestClient.get<number>('/erp/stock/get-count', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 导出产品库存 Excel */
|
||||
export function exportStock(params: any) {
|
||||
return requestClient.download('/erp/stock/export-excel', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取库存数量 */
|
||||
export function getWarehouseStockCount(params: ErpStockApi.StockQueryReqVO) {
|
||||
return requestClient.get<number>('/erp/stock/get-count', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
71
apps/web-ele/src/api/erp/stock/warehouse/index.ts
Normal file
71
apps/web-ele/src/api/erp/stock/warehouse/index.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace ErpWarehouseApi {
|
||||
/** 仓库信息 */
|
||||
export interface Warehouse {
|
||||
id?: number; // 仓库编号
|
||||
name: string; // 仓库名称
|
||||
address: string; // 仓库地址
|
||||
sort: number; // 排序
|
||||
remark: string; // 备注
|
||||
principal: string; // 负责人
|
||||
warehousePrice: number; // 仓储费,单位:元
|
||||
truckagePrice: number; // 搬运费,单位:元
|
||||
status: number; // 开启状态
|
||||
defaultStatus: boolean; // 是否默认
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询仓库分页 */
|
||||
export function getWarehousePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<ErpWarehouseApi.Warehouse>>(
|
||||
'/erp/warehouse/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询仓库精简列表 */
|
||||
export function getWarehouseSimpleList() {
|
||||
return requestClient.get<ErpWarehouseApi.Warehouse[]>(
|
||||
'/erp/warehouse/simple-list',
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询仓库详情 */
|
||||
export function getWarehouse(id: number) {
|
||||
return requestClient.get<ErpWarehouseApi.Warehouse>(
|
||||
`/erp/warehouse/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增仓库 */
|
||||
export function createWarehouse(data: ErpWarehouseApi.Warehouse) {
|
||||
return requestClient.post('/erp/warehouse/create', data);
|
||||
}
|
||||
|
||||
/** 修改仓库 */
|
||||
export function updateWarehouse(data: ErpWarehouseApi.Warehouse) {
|
||||
return requestClient.put('/erp/warehouse/update', data);
|
||||
}
|
||||
|
||||
/** 修改仓库默认状态 */
|
||||
export function updateWarehouseDefaultStatus(
|
||||
id: number,
|
||||
defaultStatus: boolean,
|
||||
) {
|
||||
return requestClient.put('/erp/warehouse/update-default-status', null, {
|
||||
params: { id, defaultStatus },
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除仓库 */
|
||||
export function deleteWarehouse(id: number) {
|
||||
return requestClient.delete(`/erp/warehouse/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出仓库 Excel */
|
||||
export function exportWarehouse(params: any) {
|
||||
return requestClient.download('/erp/warehouse/export-excel', { params });
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import type { PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallKefuConversationApi {
|
||||
@@ -28,7 +26,7 @@ export namespace MallKefuConversationApi {
|
||||
|
||||
/** 获得客服会话列表 */
|
||||
export function getConversationList() {
|
||||
return requestClient.get<PageResult<MallKefuConversationApi.Conversation>>(
|
||||
return requestClient.get<MallKefuConversationApi.Conversation[]>(
|
||||
'/promotion/kefu-conversation/list',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,18 +5,19 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MpAccountApi {
|
||||
/** 公众号账号信息 */
|
||||
export interface Account {
|
||||
id?: number;
|
||||
id: number;
|
||||
name: string;
|
||||
account: string;
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
token: string;
|
||||
account?: string;
|
||||
appId?: string;
|
||||
appSecret?: string;
|
||||
token?: string;
|
||||
aesKey?: string;
|
||||
qrCodeUrl?: string;
|
||||
remark?: string;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
// TODO @dylan:这个直接使用 Account,简化一点;
|
||||
export interface AccountSimple {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user