Files
geg-gas-web/src/api/ship/ShipSchedule/index.ts
‘huanghaiixia’ 90fd1c6f98 代码生成
2026-03-03 17:48:45 +08:00

90 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { LngShipSchedulePageModel, LngShipSchedulePageParams, LngShipSchedulePageResult } from './model/ShipScheduleModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
Page = '/ship/shipSchedule/page',
List = '/ship/shipSchedule/list',
Info = '/ship/shipSchedule/info',
LngShipSchedule = '/ship/shipSchedule',
DataLog = '/ship/shipSchedule/datalog',
}
/**
* @description: 查询LngShipSchedule分页列表
*/
export async function getLngShipSchedulePage(params: LngShipSchedulePageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngShipSchedulePageResult>(
{
url: Api.Page,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取LngShipSchedule信息
*/
export async function getLngShipSchedule(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngShipSchedulePageModel>(
{
url: Api.Info,
params: { id },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 新增LngShipSchedule
*/
export async function addLngShipSchedule(lngShipSchedule: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.LngShipSchedule,
params: lngShipSchedule,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 更新LngShipSchedule
*/
export async function updateLngShipSchedule(lngShipSchedule: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.LngShipSchedule,
params: lngShipSchedule,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 删除LngShipSchedule批量删除
*/
export async function deleteLngShipSchedule(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.LngShipSchedule,
data: ids,
},
{
errorMessageMode: mode,
},
);
}