feat: extend boxing page for accessory boxing support
Add pending accessories section to both single-code and multi-code boxing modes. Accessories display with orange styling and a "加入本箱" button that calls saveBoxRecord with item_type=accessory. Extend API service with PendingAccessory model, itemType fields on data classes, and optional accessory_id parameter on saveBoxRecord. Show accessories with visual indicator (wrench icon + orange background) in boxing detail page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,9 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
||||
// 多码凑箱:已完成装箱时可跳转的箱号
|
||||
int? _completedJumpBoxNo;
|
||||
|
||||
// 待装箱附件
|
||||
List<PendingAccessory> _pendingAccessories = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -244,6 +247,7 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
||||
_isDuplicateBoxNo = false;
|
||||
_statusOverrideText = null;
|
||||
_statusOverrideDot = null;
|
||||
_pendingAccessories = [];
|
||||
}
|
||||
|
||||
// === 重复箱号检测 ===
|
||||
@@ -415,6 +419,9 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
||||
this._deletePackedItem(item),
|
||||
onCancelDeletePackedItem: () =>
|
||||
setState(() => _deletingPackedItemId = null),
|
||||
pendingAccessories: _pendingAccessories,
|
||||
onSubmitAccessory: (accessory) =>
|
||||
this._submitAccessory(accessory),
|
||||
)
|
||||
: SingleCodeBody(
|
||||
isWaiting:
|
||||
@@ -465,6 +472,9 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
||||
this._deleteAssignedItem(item),
|
||||
onCancelDeleteAssigned: () =>
|
||||
setState(() => _deletingAssignedItemId = null),
|
||||
pendingAccessories: _pendingAccessories,
|
||||
onSubmitAccessory: (accessory) =>
|
||||
this._submitAccessory(accessory),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user