feat(pl): 按运输段产品维护合法使用证明并隔离异步会话。
This commit is contained in:
1 parent
722076fb3f
commit
4cb2d88dab
8 files changed
+1103
-404
No files matched your search
@@ -159,7 +159,70 @@ export const quotaCertApi = {
|
||||
request.get(`${base}/${kind}/${id}/contracts`).then(pickBxData<ContractOption[]>)
|
||||
}
|
||||
const legalBase = '/transport/legal-use-documents'
|
||||
export interface StopLegalDocumentItem {
|
||||
stopType: 'load' | 'delivery'
|
||||
stopId: string
|
||||
stopOrder: number
|
||||
stopProductId: string
|
||||
productId: string
|
||||
productName: string
|
||||
model?: string
|
||||
unit?: string
|
||||
contractId?: string | null
|
||||
contractNo?: string | null
|
||||
contractProductId?: string | null
|
||||
partyName?: string | null
|
||||
address?: string | null
|
||||
legalUseCertUrl: string
|
||||
documentStatus: 'pending' | 'uploaded'
|
||||
uploadedBy?: string | null
|
||||
uploadedTime?: string | null
|
||||
}
|
||||
export interface StopLegalDocument {
|
||||
id: string
|
||||
planNo: string
|
||||
planDate?: string
|
||||
licensePlate?: string
|
||||
transportStatus: string
|
||||
archiveStatus: string
|
||||
requiredCount: number
|
||||
uploadedCount: number
|
||||
documentStatus: 'pending' | 'uploaded' | 'not_required'
|
||||
items: StopLegalDocumentItem[]
|
||||
legacyProducts: {
|
||||
id: string
|
||||
productId: string
|
||||
productName: string
|
||||
model?: string
|
||||
legalUseCertUrl?: string | null
|
||||
}[]
|
||||
}
|
||||
export const legalDocumentApi = {
|
||||
listStops: (params: {
|
||||
keyword?: string
|
||||
planNo?: string
|
||||
status?: 'pending' | 'uploaded'
|
||||
contractId?: string
|
||||
page?: number
|
||||
pageSize?: number
|
||||
}) =>
|
||||
request
|
||||
.get(`${legalBase}/stops`, { params })
|
||||
.then(
|
||||
pickBxData<{ list: StopLegalDocument[]; total: number; page: number; pageSize: number }>
|
||||
),
|
||||
getStops: (id: string, contractId?: string) =>
|
||||
request
|
||||
.get(`${legalBase}/stops/${id}`, { params: { contractId } })
|
||||
.then(pickBxData<StopLegalDocument>),
|
||||
saveStops: (
|
||||
id: string,
|
||||
items: Pick<StopLegalDocumentItem, 'stopType' | 'stopProductId' | 'legalUseCertUrl'>[],
|
||||
contractId?: string
|
||||
) =>
|
||||
request
|
||||
.patch(`${legalBase}/stops/${id}`, { items }, { params: { contractId } })
|
||||
.then(pickBxData<StopLegalDocument>),
|
||||
list: (params: { keyword?: string; status?: string }) =>
|
||||
request.get(legalBase, { params }).then(pickBxData<LegalDocument[]>),
|
||||
get: (id: string) => request.get(`${legalBase}/${id}`).then(pickBxData<LegalDocument>),
|
||||
|
||||
Reference in new issue
Block a user