// @ts-ignore
/* eslint-disable */
import request from '../request';

/** 创建订单成本项 POST /operation/createOrderCost */
export async function createOrderCost(
	body: BusinessAPI.OrderCostCreateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseOrderCostVO>(
		'/operation/createOrderCost',
		{
			method: 'POST',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 订单成本项列表 GET /operation/pageOrderCost */
export async function pageOrderCost(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.pageOrderCostParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.PageResponseOrderCostVO>(
		'/operation/pageOrderCost',
		{
			method: 'GET',
			params: {
				...params,
				orderCostPageQry: undefined,
				...params['orderCostPageQry'],
			},
			...(options || {}),
		},
	);
}
