feat(pl): frontend API for plan contract gaps
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
58fbafa2ac
commit
62bdf48b63
1 file changed
+36
-6
@@ -425,11 +425,6 @@ export interface PlanProduct {
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface PlanContractLink {
|
||||
contractId: string
|
||||
contractNo?: string
|
||||
}
|
||||
|
||||
export interface Plan {
|
||||
id: string
|
||||
planNo: string
|
||||
@@ -659,6 +654,33 @@ export interface PlanSiteFeedbackUpdateBody {
|
||||
siteFeedbackTime?: string | null
|
||||
}
|
||||
|
||||
export interface PlanContractGapItem {
|
||||
id: string
|
||||
planNo: string
|
||||
planDate?: string
|
||||
followStatus: string
|
||||
supplierId?: string
|
||||
supplierName?: string
|
||||
customerId?: string
|
||||
customerName?: string
|
||||
gapSides: Array<'supplier' | 'demander'>
|
||||
supplierContractExempt: boolean
|
||||
demanderContractExempt: boolean
|
||||
supplierContracts: PlanContractLink[]
|
||||
demanderContracts: PlanContractLink[]
|
||||
}
|
||||
|
||||
export interface PlanContractGapQuery {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
planNo?: string
|
||||
gapType?: 'supplier' | 'demander' | 'both' | ''
|
||||
customerKeyword?: string
|
||||
planDateFrom?: string
|
||||
planDateTo?: string
|
||||
q?: string
|
||||
}
|
||||
|
||||
export const planApi = {
|
||||
list: (params?: PlanQuery) => request.get<PlanListResponse>('/transport/plan/', { params }),
|
||||
get: (id: string) => request.get<Plan>(`/transport/plan/${id}`),
|
||||
@@ -713,7 +735,15 @@ export const planApi = {
|
||||
saveSubpackSlipTemplate: (id: string, slipTemplateContent: string) =>
|
||||
request.put(`/transport/plan/${id}/subpack-slip-template`, { slipTemplateContent }),
|
||||
ensureSubpackSlipNo: (id: string) =>
|
||||
request.post<string>(`/transport/plan/${id}/subpack-slip-no`)
|
||||
request.post<string>(`/transport/plan/${id}/subpack-slip-no`),
|
||||
listContractGaps: (params?: PlanContractGapQuery) =>
|
||||
request.get<PlListResponse<PlanContractGapItem>>('/transport/plan/contract-gaps', { params }),
|
||||
updateSideContracts: (
|
||||
id: string,
|
||||
side: 'supplier' | 'demander',
|
||||
contracts: PlanContractLink[]
|
||||
) =>
|
||||
request.put<PlanContractGapItem>(`/transport/plan/${id}/contracts/${side}`, { contracts })
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Reference in new issue
Block a user