fix: unify input field widths and fix button spacing in boxing page

- Unify all input fields (box number and quantity) to width 52 in both
  single-code and multi-code boxing modes
- Flatten nested Row layout in multi-code submit row to ensure equal
  8px spacing between quantity input, confirm button, and complete-box
  button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-05-20 18:58:50 +08:00
parent b17e0e7e62
commit 0ae4017eee

View File

@@ -2164,7 +2164,7 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
),
const SizedBox(width: 4),
SizedBox(
width: 70,
width: 52,
height: 34,
child: TextField(
controller: _quantityController,
@@ -2762,12 +2762,6 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
Widget _buildManyToOneSubmitRow(bool hasScan, bool hasItems) {
return Padding(
padding: const EdgeInsets.fromLTRB(12, 7, 12, 8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Left half: quantity label + input + confirm
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@@ -2780,8 +2774,8 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
),
),
const SizedBox(width: 6),
Expanded(
child: SizedBox(
SizedBox(
width: 52,
height: 34,
child: TextField(
controller: _quantityController,
@@ -2789,11 +2783,12 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
enabled: hasScan && !_isSubmitting,
keyboardType: TextInputType.none,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
textAlign: TextAlign.center,
onChanged: (_) => setState(() {}),
onEditingComplete: () {},
onSubmitted: (_) => _submitFromKeyboard(),
decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(6),
),
@@ -2818,7 +2813,6 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
),
),
),
),
const SizedBox(width: 8),
SizedBox(
height: 34,
@@ -2854,13 +2848,8 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
),
),
),
],
),
),
const SizedBox(width: 8),
// Right half: 完成本箱
Expanded(
flex: 1,
child: SizedBox(
height: 34,
child: OutlinedButton(