import { stringify } from 'qs'; import request from '../shared/request'; import { PostAndPutModel } from '../store/models/inspection'; interface GetRateParams { shipownerCode: string; } export async function postInspection(body:PostAndPutModel, type:string = 'add') { return request(`/yms/ctn-apply/${type === 'add' ? 'appCheck' : 'updateCheck'}`, { method: 'POST', loadingText: '正在保存...', body }); } export async function queryRateByCtnOwner(params:GetRateParams) { return request(`/bms/fee-shipowner-rate/checkGetList?${stringify(params)}`, { onlyData: true }); } export async function queryApplyByCtnNo(ctnNo: string) { return request(`/yms/ctn-apply/checkGetByCtnNo?ctnNo=${ctnNo}`, { onlyData: true }); }