客户组

This commit is contained in:
‘huanghaiixia’
2025-12-16 17:30:03 +08:00
parent e5a9545c55
commit 1eee4dcd60
15 changed files with 1708 additions and 49 deletions

View File

@ -0,0 +1,90 @@
import { LngCustomerGroupPageModel, LngCustomerGroupPageParams, LngCustomerGroupPageResult } from './model/CustomerGroupModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/sales/customerGroup/page',
List = '/sales/customerGroup/list',
Info = '/sales/customerGroup/info',
LngCustomerGroup = '/sales/customerGroup',
DataLog = '/sales/customerGroup/datalog',
}
/**
* @description: 查询LngCustomerGroup分页列表
*/
export async function getLngCustomerGroupPage(params: LngCustomerGroupPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngCustomerGroupPageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取LngCustomerGroup信息
*/
export async function getLngCustomerGroup(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngCustomerGroupPageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增LngCustomerGroup
*/
export async function addLngCustomerGroup(lngCustomerGroup: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.LngCustomerGroup,
params: lngCustomerGroup,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新LngCustomerGroup
*/
export async function updateLngCustomerGroup(lngCustomerGroup: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.LngCustomerGroup,
params: lngCustomerGroup,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除LngCustomerGroup批量删除
*/
export async function deleteLngCustomerGroup(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.LngCustomerGroup,
data: ids,
},
{
errorMessageMode: mode,
},
);
}

View File

@ -0,0 +1,44 @@
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: LngCustomerGroup分页参数 模型
*/
export interface LngCustomerGroupPageParams extends BasicPageParams {
grpCode: string;
typeCode: string;
dateFrom: string;
dateTo: string;
grpName: string;
note: string;
}
/**
* @description: LngCustomerGroup分页返回值模型
*/
export interface LngCustomerGroupPageModel {
id: string;
grpCode: string;
typeCode: string;
dateFrom: string;
dateTo: string;
grpName: string;
note: string;
}
0;
/**
* @description: LngCustomerGroup分页返回值结构
*/
export type LngCustomerGroupPageResult = BasicFetchResult<LngCustomerGroupPageModel>;