127 lines
3.4 KiB
TypeScript
127 lines
3.4 KiB
TypeScript
import { LngContractSalesPngPointPageModel, LngContractSalesPngPointPageParams, LngContractSalesPngPointPageResult } from './model/ContractSalesPngPurModel';
|
||
import { defHttp } from '/@/utils/http/axios';
|
||
import { ErrorMessageMode } from '/#/axios';
|
||
|
||
enum Api {
|
||
// Page = '/contract/contractSalesPngPur/page',
|
||
Page = '/magic-api/contract/contractSalesPngPoint/pageList',
|
||
List = '/contract/contractSalesPngPur/list',
|
||
Info = '/contract/contractSalesPngPur/info',
|
||
LngContractSalesPngPoint = '/contract/contractSalesPngPur',
|
||
selectPcPageList = '/magic-api/contract/contractSalesPngPoint/selectPcPageList',
|
||
selectScPageList = '/magic-api/contract/contractSalesPngPoint/selectScPageList',
|
||
selectTcPageList = '/magic-api/contract/contractSalesPngPoint/selectTcPageList',
|
||
|
||
|
||
DataLog = '/contract/contractSalesPngPur/datalog',
|
||
}
|
||
// 销售合同
|
||
export async function getContractScPageList(ksppId: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngContractSalesPngPointPageModel>(
|
||
{
|
||
url: Api.selectScPageList,
|
||
params: { ksppId },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
// 管输合同
|
||
export async function getContractSalesPngPointTc(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngContractSalesPngPointPageResult>(
|
||
{
|
||
url: Api.selectTcPageList,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
// 采购合同
|
||
export async function getContractSalesPngPoint(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngContractSalesPngPointPageResult>(
|
||
{
|
||
url: Api.selectPcPageList,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
/**
|
||
* @description: 查询LngContractSalesPngPoint分页列表
|
||
*/
|
||
export async function getLngContractSalesPngPointPage(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngContractSalesPngPointPageResult>(
|
||
{
|
||
url: Api.Page,
|
||
params,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 获取LngContractSalesPngPoint信息
|
||
*/
|
||
export async function getLngContractSalesPngPoint(id: String, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.get<LngContractSalesPngPointPageModel>(
|
||
{
|
||
url: Api.Info,
|
||
params: { id },
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 新增LngContractSalesPngPoint
|
||
*/
|
||
export async function addLngContractSalesPngPoint(lngContractSalesPngPoint: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.post<boolean>(
|
||
{
|
||
url: Api.LngContractSalesPngPoint,
|
||
params: lngContractSalesPngPoint,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 更新LngContractSalesPngPoint
|
||
*/
|
||
export async function updateLngContractSalesPngPoint(lngContractSalesPngPoint: Recordable, mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.put<boolean>(
|
||
{
|
||
url: Api.LngContractSalesPngPoint,
|
||
params: lngContractSalesPngPoint,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
}
|
||
|
||
/**
|
||
* @description: 删除LngContractSalesPngPoint(批量删除)
|
||
*/
|
||
export async function deleteLngContractSalesPngPoint(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||
return defHttp.delete<boolean>(
|
||
{
|
||
url: Api.LngContractSalesPngPoint,
|
||
data: ids,
|
||
},
|
||
{
|
||
errorMessageMode: mode,
|
||
},
|
||
);
|
||
} |