import { request } from '@eciol/request'; import { replaceVariables } from '@eciol/shared'; import { useUserStoreWithOut } from '@/store/modules/user'; import type { AdjustmentService } from './typing'; enum Api { GetAdjustmentList = '/api/PaybillChange/QueryPage', GetAdjustmentDetail = '/api/PaybillChange/{orgId}/{id}', } /** * 获取调整单列表 */ function getAdjustmentList(data: AdjustmentService.GetPayApplyListParams) { const { getCompanyId } = useUserStoreWithOut(); return request.post( { url: Api.GetAdjustmentList, data: { ...data, orgId: getCompanyId }, }, { showLoading: true, }, ); } /** * 获取调整单详情 */ function getAdjustmentDetail(id: number) { const { getCompanyId } = useUserStoreWithOut(); return request.get( { url: replaceVariables(Api.GetAdjustmentDetail, { id, orgId: getCompanyId }), }, { showLoading: true, }, ); } export { getAdjustmentDetail, getAdjustmentList }; export type { AdjustmentService } from './typing';