feat(pl): show available contract qty before plan qty in stop products
Add contract-product-arrange-qty API and form UI with green available qty, red plan qty over-hint, and click-through dialog for usage and plan list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3011cb9dae
commit
81b1cb9b1d
10 files changed
+1227
-11
No files matched your search
@@ -866,6 +866,29 @@ export interface PlanContractGapQuery {
|
||||
q?: string
|
||||
}
|
||||
|
||||
export interface ContractProductArrangeQtyPlanItem {
|
||||
planId: string
|
||||
planNo?: string
|
||||
planDate?: string | null
|
||||
planQty: number
|
||||
followStatus?: string
|
||||
transportStatus?: string
|
||||
archiveStatus?: string
|
||||
}
|
||||
|
||||
export interface ContractProductArrangeQtyDetail {
|
||||
contractId: string
|
||||
contractNo?: string | null
|
||||
customerName?: string | null
|
||||
productId: string
|
||||
productName?: string | null
|
||||
hasFixedQty: boolean
|
||||
contractQty?: number | null
|
||||
arrangedQty: number
|
||||
availableQty?: number | null
|
||||
plans: ContractProductArrangeQtyPlanItem[]
|
||||
}
|
||||
|
||||
export const planApi = {
|
||||
list: (params?: PlanQuery) => request.get<PlanListResponse>('/transport/plan/', { params }),
|
||||
export: (data: Record<string, any>) =>
|
||||
@@ -875,6 +898,16 @@ export const planApi = {
|
||||
request.get<{ counts: Record<string, number> }>('/transport/plan/count-by-contract', {
|
||||
params: { contractIds: contractIds.join(',') }
|
||||
}),
|
||||
/** 表单可安排数量 / 问号弹窗 */
|
||||
getContractProductArrangeQty: (params: {
|
||||
contractId: string
|
||||
productId: string
|
||||
excludePlanId?: string
|
||||
}) =>
|
||||
request.get<ContractProductArrangeQtyDetail>(
|
||||
'/transport/plan/contract-product-arrange-qty',
|
||||
{ params }
|
||||
),
|
||||
create: (data: Partial<Plan>) => request.post<Plan>('/transport/plan/', data),
|
||||
createFull: (data: PlanCreateFullPayload) =>
|
||||
request.post<Plan>('/transport/plan/create-full', data),
|
||||
@@ -1108,9 +1141,12 @@ export interface ContractQtyReminderItem {
|
||||
contractId: string
|
||||
contractNo?: string
|
||||
contractType?: string
|
||||
customerName?: string
|
||||
stopKind: string
|
||||
productId: string
|
||||
productName?: string
|
||||
model?: string
|
||||
unit?: string
|
||||
mode: 'remaining' | 'framework_cumulative' | string
|
||||
contractQty?: number
|
||||
arrangedTotalQty: number
|
||||
|
||||
Reference in new issue
Block a user