fix: 完成本箱后新箱号基于最大箱号递增而非当前箱号
单码装箱和多码凑箱模式统一优化:完成装箱后,下一个箱号 设置为最大箱号+1,避免在查看历史箱号时产生重复箱号。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -701,7 +701,7 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
_phase = _Phase.scanned;
|
_phase = _Phase.scanned;
|
||||||
_boxNoController.text = (boxNo + 1).toString();
|
_boxNoController.text = (_maxBoxNo + 1).toString();
|
||||||
_quantityController.text = remaining.toString();
|
_quantityController.text = remaining.toString();
|
||||||
_quantityController.selection = TextSelection(
|
_quantityController.selection = TextSelection(
|
||||||
baseOffset: 0,
|
baseOffset: 0,
|
||||||
@@ -846,7 +846,6 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _finishManyToOneBox() {
|
void _finishManyToOneBox() {
|
||||||
final currentBoxNo = int.tryParse(_boxNoController.text.trim());
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_manyToOnePackedItems.clear();
|
_manyToOnePackedItems.clear();
|
||||||
_editingPackedItemId = null;
|
_editingPackedItemId = null;
|
||||||
@@ -855,9 +854,7 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
_zongpaiNo = null;
|
_zongpaiNo = null;
|
||||||
_phase = _Phase.waiting;
|
_phase = _Phase.waiting;
|
||||||
_quantityController.clear();
|
_quantityController.clear();
|
||||||
if (currentBoxNo != null && currentBoxNo > 0) {
|
_boxNoController.text = (_maxBoxNo + 1).toString();
|
||||||
_boxNoController.text = (currentBoxNo + 1).toString();
|
|
||||||
}
|
|
||||||
_statusOverrideText = null;
|
_statusOverrideText = null;
|
||||||
_statusOverrideDot = null;
|
_statusOverrideDot = null;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user