Enable a contract product line to carry multiple package specifications that share one quantity pool, while transport-plan arrange checks and contract detail arranged-qty displays consume and present that pool correctly (with per-package consumption breakdown).
The system SHALL allow each contract product line to store one or more package specifications and exactly one line quantity. The line quantity SHALL be the shared quota for all package specifications on that line. The system SHALL still allow the same product to appear on multiple lines. Within one contract, for the same productId, each distinct package specification MUST appear on at most one line (no duplicate package specs across lines for that product). Each line MUST have at least one package specification.
25kg/桶 and 槽罐车 and quantity 715715 as the shared pool槽罐车25kg/桶 quantity 15 and line B with only 槽罐车 quantity 700 for the same productWhen a transport plan is bound to a contract, arranging a stop product with a given package specification SHALL locate the unique contract product line whose package-spec set contains that specification (for the same product). Available quantity and arrange hard-checks SHALL use that line's quantity minus the sum of arranged quantities for all package specifications belonging to that line (across counted plans), not a per-package independent quota. Plan stop products SHALL continue to carry exactly one package specification per plan line.
[25kg/桶, 槽罐车] and quantity 715, and counted plans have arranged 10 for 25kg/桶 and 10 for 槽罐车695 (same pool), and arranging additional quantity that would exceed 695 is rejected at arrange time25kg/桶/15 and 槽罐车/700槽罐车 does not reduce the available quantity of the 25kg/桶 lineContract detail (and equivalent product tables that show plan qty columns) SHALL display arranged / archived quantities broken down by package specification under each multi-package line, and SHALL show contract quantity and remaining only at the line aggregate level. Remaining MUST equal line quantity minus the sum of arranged totals across that line's packages. The system MUST NOT present an independent "remaining" per package that implies a separate quota.
[25kg/桶, 槽罐车], quantity 715, arranged 10 + 1020 with remaining 695 (or equivalent line-level remaining presentation)Contract print / PDF generation SHALL render each product line's package specifications (all values on the line) and SHALL aggregate contract-level {{packageSpecs}} from the union of all line package specs (deduplicated), without treating a multi-package line as a single opaque string that breaks dedupe.
25kg/桶 and 槽罐车Contract product create/update/detail APIs SHALL accept and return packageSpecs as a non-empty string array. For backward compatibility, responses MAY also include scalar packageSpec equal to the first package in the list (or the sole value). Legacy stored single scalar values MUST be readable as a one-element packageSpecs list.
packageSpecs is a one-element array containing that value and clients can edit/save without data loss