40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import request from '@/utils/http'
|
|
|
|
export type SfExpressSettlement = {
|
|
id: string
|
|
waybillNo: string
|
|
createByName: string
|
|
createTime: string
|
|
settleStatus: string
|
|
settleStatusLabel: string
|
|
freightAmount: number | null
|
|
freightAmountLabel: string
|
|
settleTime: string
|
|
}
|
|
|
|
export function fetchSfExpressSettlements(params: Record<string, unknown>) {
|
|
return request.get<{ list: SfExpressSettlement[]; total: number }>({
|
|
url: '/web/admin/sample-freights/sf-settlements',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchSfExpressSettlementExport(params: Record<string, unknown>) {
|
|
return request.get<{ list: SfExpressSettlement[] }>({
|
|
url: '/web/admin/sample-freights/sf-settlements/export',
|
|
params,
|
|
showErrorMessage: false
|
|
})
|
|
}
|
|
|
|
export function settleSfExpressSettlements(data: { ids: string[]; freightAmount?: number }) {
|
|
return request.post({ url: '/web/admin/sample-freights/sf-settlements/settle', data })
|
|
}
|
|
|
|
export function fillSfExpressSettlementAmount(id: string, freightAmount: number) {
|
|
return request.post({
|
|
url: `/web/admin/sample-freights/sf-settlements/${id}/fill-amount`,
|
|
data: { freightAmount }
|
|
})
|
|
}
|