客户组
This commit is contained in:
@ -3,10 +3,12 @@ import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/sales/customerGroup/page',
|
||||
// Page = '/sales/customerGroup/page',
|
||||
List = '/sales/customerGroup/list',
|
||||
Info = '/sales/customerGroup/info',
|
||||
LngCustomerGroup = '/sales/customerGroup',
|
||||
|
||||
Page = '/magic-api/sales/customerGroupPage',
|
||||
|
||||
|
||||
|
||||
|
||||
121
src/api/supplier/Supplier/index.ts
Normal file
121
src/api/supplier/Supplier/index.ts
Normal file
@ -0,0 +1,121 @@
|
||||
import { LngSupplierPageModel, LngSupplierPageParams, LngSupplierPageResult } from './model/SupplierModel';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/supplier/supplier/page',
|
||||
List = '/supplier/supplier/list',
|
||||
Info = '/supplier/supplier/info',
|
||||
LngSupplier = '/supplier/supplier',
|
||||
|
||||
|
||||
|
||||
Enable = '/supplier/supplier/enable',
|
||||
Disable= '/supplier/supplier/disable',
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询LngSupplier分页列表
|
||||
*/
|
||||
export async function getLngSupplierPage(params: LngSupplierPageParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<LngSupplierPageResult>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取LngSupplier信息
|
||||
*/
|
||||
export async function getLngSupplier(id: String, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<LngSupplierPageModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增LngSupplier
|
||||
*/
|
||||
export async function addLngSupplier(lngSupplier: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.LngSupplier,
|
||||
params: lngSupplier,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新LngSupplier
|
||||
*/
|
||||
export async function updateLngSupplier(lngSupplier: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<boolean>(
|
||||
{
|
||||
url: Api.LngSupplier,
|
||||
params: lngSupplier,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除LngSupplier(批量删除)
|
||||
*/
|
||||
export async function deleteLngSupplier(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<boolean>(
|
||||
{
|
||||
url: Api.LngSupplier,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 启用数据LngSupplier
|
||||
*/
|
||||
export async function enableLngSupplier(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.Enable,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @description: 作废数据LngSupplier
|
||||
*/
|
||||
export async function disableLngSupplier(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.Disable,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
226
src/api/supplier/Supplier/model/SupplierModel.ts
Normal file
226
src/api/supplier/Supplier/model/SupplierModel.ts
Normal file
@ -0,0 +1,226 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
/**
|
||||
* @description: LngSupplier分页参数 模型
|
||||
*/
|
||||
export interface LngSupplierPageParams extends BasicPageParams {
|
||||
suName: string;
|
||||
|
||||
suSname: string;
|
||||
|
||||
natureCode: string;
|
||||
|
||||
typeCode: string;
|
||||
|
||||
classCode: string;
|
||||
|
||||
dI: string;
|
||||
|
||||
valid: string;
|
||||
|
||||
approCode: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplier分页返回值模型
|
||||
*/
|
||||
export interface LngSupplierPageModel {
|
||||
id: string;
|
||||
|
||||
suName: string;
|
||||
|
||||
suSname: string;
|
||||
|
||||
natureCode: string;
|
||||
|
||||
typeCode: string;
|
||||
|
||||
classCode: string;
|
||||
|
||||
dI: string;
|
||||
|
||||
valid: string;
|
||||
|
||||
approCode: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplier表类型
|
||||
*/
|
||||
export interface LngSupplierModel {
|
||||
id: number;
|
||||
|
||||
suMcode: string;
|
||||
|
||||
suCode: string;
|
||||
|
||||
suName: string;
|
||||
|
||||
suSname: string;
|
||||
|
||||
dI: string;
|
||||
|
||||
natureCode: string;
|
||||
|
||||
parentName: string;
|
||||
|
||||
creditNo: string;
|
||||
|
||||
tiNo: string;
|
||||
|
||||
representative: string;
|
||||
|
||||
amtReg: string;
|
||||
|
||||
addrReg: string;
|
||||
|
||||
addrMail: string;
|
||||
|
||||
dateEstab: string;
|
||||
|
||||
dateEntry: string;
|
||||
|
||||
classCode: string;
|
||||
|
||||
typeCode: string;
|
||||
|
||||
orgCode: string;
|
||||
|
||||
valid: string;
|
||||
|
||||
approCode: string;
|
||||
|
||||
note: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
|
||||
lngSupplierBankList?: LngSupplierBankModel;
|
||||
|
||||
lngSupplierContactList?: LngSupplierContactModel;
|
||||
|
||||
lngSupplierDocList?: LngSupplierDocModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplierBank表类型
|
||||
*/
|
||||
export interface LngSupplierBankModel {
|
||||
id: number;
|
||||
|
||||
suCode: string;
|
||||
|
||||
bankCode: string;
|
||||
|
||||
accountName: string;
|
||||
|
||||
account: string;
|
||||
|
||||
defaultSign: string;
|
||||
|
||||
note: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplierContact表类型
|
||||
*/
|
||||
export interface LngSupplierContactModel {
|
||||
id: number;
|
||||
|
||||
suCode: string;
|
||||
|
||||
contactName: string;
|
||||
|
||||
tel: string;
|
||||
|
||||
addrMail: string;
|
||||
|
||||
email: string;
|
||||
|
||||
position: string;
|
||||
|
||||
valid: string;
|
||||
|
||||
note: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplierDoc表类型
|
||||
*/
|
||||
export interface LngSupplierDocModel {
|
||||
id: number;
|
||||
|
||||
suCode: string;
|
||||
|
||||
docTypeCode: string;
|
||||
|
||||
docNo: string;
|
||||
|
||||
dateFrom: string;
|
||||
|
||||
dateTo: string;
|
||||
|
||||
sort: number;
|
||||
|
||||
valid: string;
|
||||
|
||||
note: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: LngSupplier分页返回值结构
|
||||
*/
|
||||
export type LngSupplierPageResult = BasicFetchResult<LngSupplierPageModel>;
|
||||
Reference in New Issue
Block a user