- boxing_models.dart: add BoxingMode, BoxingPhase, BoxingPageArguments - boxing_box_mutations.dart: box item add/replace/remove operations - boxing_calculations.dart: pure calculation helpers (quantities, validation) - boxing_status_presenter.dart: status bar text/dot determination - dialogs/cross_paichan_dialog.dart: cross-paichan confirmation dialog - widgets/boxing_notice_banners.dart: notice banner widgets - Add unit tests for mutations, calculations, and status presenter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
57 lines
1.2 KiB
Dart
57 lines
1.2 KiB
Dart
enum BoxingMode {
|
|
singleCode, // 单码装箱
|
|
multiCode, // 多码凑箱
|
|
}
|
|
|
|
enum BoxingPhase {
|
|
waiting, // 等待扫码
|
|
scanned, // 已扫码,显示信息
|
|
submitted, // 已提交成功
|
|
}
|
|
|
|
class BoxingPageArguments {
|
|
final BoxingMode initialMode;
|
|
final List<String> autoScanCodes;
|
|
|
|
const BoxingPageArguments({
|
|
required this.initialMode,
|
|
required this.autoScanCodes,
|
|
});
|
|
}
|
|
|
|
class ManyToOnePackedItem {
|
|
final int boxItemId;
|
|
final String zongpaiNo;
|
|
final String? paichanNo;
|
|
final String? workOrderNo;
|
|
final int boxNo;
|
|
final int quantity;
|
|
final int? totalQuantity;
|
|
|
|
const ManyToOnePackedItem({
|
|
required this.boxItemId,
|
|
required this.zongpaiNo,
|
|
this.paichanNo,
|
|
required this.workOrderNo,
|
|
required this.boxNo,
|
|
required this.quantity,
|
|
this.totalQuantity,
|
|
});
|
|
|
|
ManyToOnePackedItem copyWith({
|
|
int? boxNo,
|
|
int? quantity,
|
|
int? totalQuantity,
|
|
}) {
|
|
return ManyToOnePackedItem(
|
|
boxItemId: boxItemId,
|
|
zongpaiNo: zongpaiNo,
|
|
paichanNo: paichanNo,
|
|
workOrderNo: workOrderNo,
|
|
boxNo: boxNo ?? this.boxNo,
|
|
quantity: quantity ?? this.quantity,
|
|
totalQuantity: totalQuantity ?? this.totalQuantity,
|
|
);
|
|
}
|
|
}
|