195 lines
4.2 KiB
TypeScript
195 lines
4.2 KiB
TypeScript
import { LngPngApproPageModel, LngPngApproPageParams, LngPngApproPageResult } from './model/PngApproModel';
|
||
import { defHttp } from '/@/utils/http/axios';
|
||
import { ErrorMessageMode } from '/#/axios';
|
||
|
||
enum Api {
|
||
// Page = '/dayPlan/pngAppro/page',
|
||
Page = '/magic-api/dayPlan/pngApproXs/page',
|
||
PageJsz = '/magic-api/dayPlan/pngApproJsz/page',
|
||
PageGd = '/magic-api/dayPlan/pngApproGd/page',
|
||
List = '/dayPlan/pngAppro/list',
|
||
Info = '/dayPlan/pngAppro/info',
|
||
LngPngAppro = '/dayPlan/pngAppro',
|
||
approve = '/dayPlan/pngAppro/approveXS',
|
||
approveSZ = '/dayPlan/pngAppro/approveJSZ',
|
||
approveGD = '/dayPlan/pngAppro/approveGD',
|
||
|
||
records = '/magic-api/approve/records',
|
||
compare = '/dayPlan/pngAppro/compare'
|
||
|
||
}
|
||
/**
|
||
* @description: 审批LngPngAppro
|
||
*/
|
||
export async function approveLngPngApproSZ(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.approveSZ,
|
||
params: lngPngAppro,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 审批LngPngAppro
|
||
*/
|
||
export async function approveLngPngApproGD(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.approveGD,
|
||
params: lngPngAppro,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 查询LngPngAppro分页列表
|
||
*/
|
||
export async function getLngPngApproPageGd(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageResult>(
|
||
{
|
||
url: Api.PageGd,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 查询LngPngAppro分页列表
|
||
*/
|
||
export async function getLngPngApproPageJsz(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageResult>(
|
||
{
|
||
url: Api.PageJsz,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
|
||
/**
|
||
* @description: 获取LngPngAppro信息
|
||
*/
|
||
export async function getLngPngApproCompare(demandOrgId: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageModel>(
|
||
{
|
||
url: Api.compare,
|
||
params: { demandOrgId },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 审批LngPngAppro
|
||
*/
|
||
export async function approveLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.approve,
|
||
params: lngPngAppro,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 获取LngPngAppro审批记录
|
||
*/
|
||
export async function getLngPngApproRecords(id: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageModel>(
|
||
{
|
||
url: Api.records,
|
||
params: { id },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 查询LngPngAppro分页列表
|
||
*/
|
||
export async function getLngPngApproPage(params: LngPngApproPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageResult>(
|
||
{
|
||
url: Api.Page,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 获取LngPngAppro信息
|
||
*/
|
||
export async function getLngPngAppro(id: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngPngApproPageModel>(
|
||
{
|
||
url: Api.Info,
|
||
params: { id },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 新增LngPngAppro
|
||
*/
|
||
export async function addLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.LngPngAppro,
|
||
params: lngPngAppro,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 更新LngPngAppro
|
||
*/
|
||
export async function updateLngPngAppro(lngPngAppro: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.put<boolean>(
|
||
{
|
||
url: Api.LngPngAppro,
|
||
params: lngPngAppro,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 删除LngPngAppro(批量删除)
|
||
*/
|
||
export async function deleteLngPngAppro(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.delete<boolean>(
|
||
{
|
||
url: Api.LngPngAppro,
|
||
data: ids,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
} |