From b927ef661b7cf3f8eb1c498ea844eb13e5907fc7 Mon Sep 17 00:00:00 2001 From: icewint Date: Sat, 7 Dec 2024 18:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8B=A3=E8=B4=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=9B=E4=BF=AE=E9=A5=B0=E5=85=B6=E4=BB=96=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/page/layout/home.dart | 6 +- lib/page/pick/pick.dart | 81 ++++++++++-- lib/page/stock/stockCheck.dart | 122 ++++++++++++++++++ .../stock/{stock.dart => stockSearch.dart} | 36 +++--- lib/page/stockIn/StackInWheelEBS.dart | 2 +- lib/page/stockIn/StackInWheelMes.dart | 5 +- lib/page/stockIn/StockInEmpty.dart | 4 +- 7 files changed, 218 insertions(+), 38 deletions(-) create mode 100644 lib/page/stock/stockCheck.dart rename lib/page/stock/{stock.dart => stockSearch.dart} (59%) diff --git a/lib/page/layout/home.dart b/lib/page/layout/home.dart index 85cd7dc..ba5a558 100644 --- a/lib/page/layout/home.dart +++ b/lib/page/layout/home.dart @@ -1,10 +1,11 @@ import 'package:flutter/material.dart'; import 'package:wms_app/page/stockIn/StackInWheelEBS.dart'; +import '../stock/stockCheck.dart'; import '/common/colorCom.dart'; import 'package:bruno/bruno.dart'; import 'package:wms_app/page/stockIn/StackInWheelMes.dart'; import 'package:wms_app/page/stockIn/StockInEmpty.dart'; -import 'package:wms_app/page/stock/stock.dart'; +import 'package:wms_app/page/stock/stockSearch.dart'; import 'package:wms_app/page/pick/pick.dart'; class Home extends StatefulWidget { @@ -58,9 +59,10 @@ class _HomePageState extends State { Navigator.push(context, MaterialPageRoute(builder: (context) => const Pick())); }), ListTile(title: const Text("库存盘点"), trailing: const Icon(Icons.checklist), onTap: () { + Navigator.push(context, MaterialPageRoute(builder: (context) => const StockCheck())); }), ListTile(title: const Text("库存查询"), trailing: const Icon(Icons.list_alt), onTap: () { - Navigator.push(context, MaterialPageRoute(builder: (context) => const Stock())); + Navigator.push(context, MaterialPageRoute(builder: (context) => const StockSearch())); }) ], ), diff --git a/lib/page/pick/pick.dart b/lib/page/pick/pick.dart index bbdbac8..a9d6c82 100644 --- a/lib/page/pick/pick.dart +++ b/lib/page/pick/pick.dart @@ -1,4 +1,6 @@ +import 'package:bruno/bruno.dart'; import 'package:flutter/material.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; import '/common/colorCom.dart'; class Pick extends StatefulWidget { @@ -11,6 +13,7 @@ class Pick extends StatefulWidget { class _PickPageState extends State { final _vehicleNoTextController = TextEditingController(); // 查询输入框 + List tableData = []; @override Widget build(BuildContext context) { @@ -32,19 +35,17 @@ class _PickPageState extends State { ), body: Center( child: Padding(padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 10 + left: 10, + right: 10, + top: 5 ), child: ListView( children: [ - TextField( - decoration: const InputDecoration( - labelText: "要拣货的载具号:", - ), - controller: _vehicleNoTextController, + BrnTextInputFormItem( + controller: _vehicleNoTextController, + title: "载具号:", hint: "请扫描或输入需要拣货的载具号" ), Padding(padding: const EdgeInsets.only( - top: 10 + top: 5 ), child: ElevatedButton( onPressed: search, style: ButtonStyle( @@ -55,15 +56,67 @@ class _PickPageState extends State { style: TextStyle( color: Colors.white )) - )) + )), + Padding(padding: const EdgeInsets.only( + ), child: ElevatedButton( + onPressed: search, + style: ButtonStyle( + backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme), + ), + child: const Text( + "拣货完成", + style: TextStyle( + color: Colors.white + )) + )), + const Padding(padding: EdgeInsets.only( + top: 10, + bottom: 10 + ), child: Text("需要拣货的物料(点击数据行修改拣货数):"), + ), + Container( + decoration: BoxDecoration( + border: Border.all(color: const Color(0x4D0C0C05), width: 0.3),// border + borderRadius: BorderRadius.circular((5)), // 圆角 + ), + child: TDTable( + bordered: true, + width: MediaQuery.of(context).size.width, + backgroundColor: Colors.transparent, + columns: [ + TDTableCol(title: '序号', colKey: 'id', align: TDTableColAlign.center, width: 60), + TDTableCol(title: '载具号', colKey: 'vehicleNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '物料号', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '拣货数', colKey: 'goodsNum', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '实际拣货数', colKey: 'goodsId', align: TDTableColAlign.center, ellipsis: true, width: 100), + TDTableCol(title: '物料名称', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '物料描述', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '任务标识', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80) + ], + data: tableData, + onCellTap: (index, dynamic, cell) { + }), + ) ], - ),), - ), - ); + ) + )), + ); } - + /// 查询拣货数 void search() { } + + /// 展示拣货的弹窗 + void showPickForm() { + + + } + + /// 拣货完成 + void pickComplete() { + + } + } \ No newline at end of file diff --git a/lib/page/stock/stockCheck.dart b/lib/page/stock/stockCheck.dart new file mode 100644 index 0000000..15a40ab --- /dev/null +++ b/lib/page/stock/stockCheck.dart @@ -0,0 +1,122 @@ +import 'package:bruno/bruno.dart'; +import 'package:flutter/material.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; +import '/common/colorCom.dart'; + +class StockCheck extends StatefulWidget { + const StockCheck({super.key}); + @override + State createState() => _StockCheckPageState(); +} + + +class _StockCheckPageState extends State { + + final _vehicleNoTextController = TextEditingController(); // 查询输入框 + List tableData = []; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + iconTheme: const IconThemeData( + color: Colors.white + ), + leading: IconButton(onPressed: () { + Navigator.of(context).pop(); + }, icon: const Icon(Icons.arrow_back)), + centerTitle: true, + backgroundColor: ColorCommon.colorScheme, + title: const Text( + "库存盘点", + style: TextStyle( + color: Colors.white + )), + ), + body: Center( + child: Padding(padding: const EdgeInsets.only( + left: 10, + right: 10, + top: 5 + ), child: ListView( + children: [ + BrnTextInputFormItem( + controller: _vehicleNoTextController, + title: "载具号:", hint: "请扫描或输入需要盘点的载具号" + ), + Padding(padding: const EdgeInsets.only( + top: 5 + ), child: ElevatedButton( + onPressed: search, + style: ButtonStyle( + backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme), + ), + child: const Text( + "查询盘点任务", + style: TextStyle( + color: Colors.white + )) + )), + Padding(padding: const EdgeInsets.only( + ), child: ElevatedButton( + onPressed: search, + style: ButtonStyle( + backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme), + ), + child: const Text( + "盘点确认", + style: TextStyle( + color: Colors.white + )) + )), + const Padding(padding: EdgeInsets.only( + top: 10, + bottom: 10 + ), child: Text("需要盘点的物料(点击数据行修改库存数):"), + ), + Container( + decoration: BoxDecoration( + border: Border.all(color: const Color(0x4D0C0C05), width: 0.3),// border + borderRadius: BorderRadius.circular((5)), // 圆角 + ), + child: TDTable( + bordered: true, + width: MediaQuery.of(context).size.width, + backgroundColor: Colors.transparent, + columns: [ + TDTableCol(title: '序号', colKey: 'id', align: TDTableColAlign.center, width: 60), + TDTableCol(title: '载具号', colKey: 'vehicleNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '物料号', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '库存数', colKey: 'goodsNum', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '实际库存数', colKey: 'goodsId', align: TDTableColAlign.center, ellipsis: true, width: 100), + TDTableCol(title: '物料名称', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '物料描述', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80), + TDTableCol(title: '任务标识', colKey: 'boxNo', align: TDTableColAlign.center, ellipsis: true, width: 80) + ], + data: tableData, + onCellTap: (index, dynamic, cell) { + }), + ) + ], + ) + )), + ); + } + + /// 查询库存数 + void search() { + + } + + /// 展示盘点的弹窗 + void showPickForm() { + + + } + + /// 盘点确认 + void pickComplete() { + + } + +} \ No newline at end of file diff --git a/lib/page/stock/stock.dart b/lib/page/stock/stockSearch.dart similarity index 59% rename from lib/page/stock/stock.dart rename to lib/page/stock/stockSearch.dart index a7e1812..ab5e98c 100644 --- a/lib/page/stock/stock.dart +++ b/lib/page/stock/stockSearch.dart @@ -1,16 +1,18 @@ +import 'package:bruno/bruno.dart'; import 'package:flutter/material.dart'; import '/common/colorCom.dart'; -class Stock extends StatefulWidget { - const Stock({super.key}); +class StockSearch extends StatefulWidget { + const StockSearch({super.key}); @override - State createState() => _StockPageState(); + State createState() => _StockSearchPageState(); } -class _StockPageState extends State { +class _StockSearchPageState extends State { - final _searchTextController = TextEditingController(); // 查询输入框 + final _vehicleNoTextController = TextEditingController(); // 查询输入框 + final _goodsIdTextController = TextEditingController(); // 查询输入框 @override Widget build(BuildContext context) { @@ -32,26 +34,28 @@ class _StockPageState extends State { ), body: Center( child: Padding(padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 10 + left: 10, + right: 10, + top: 5 ), child: ListView( children: [ - TextField( - decoration: const InputDecoration( - labelText: "查询参数:", - ), - controller: _searchTextController, + BrnTextInputFormItem( + controller: _vehicleNoTextController, + title: "载具号:", hint: "请输入载具号" + ), + BrnTextInputFormItem( + controller: _goodsIdTextController, + title: "物料号:", hint: "请输入物料号" ), Padding(padding: const EdgeInsets.only( - top: 10 + top: 5 ), child: ElevatedButton( onPressed: search, style: ButtonStyle( backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme), ), child: const Text( - "查询", + "查询库存", style: TextStyle( color: Colors.white )) @@ -62,7 +66,7 @@ class _StockPageState extends State { ); } - + /// 查询库存 void search() { } diff --git a/lib/page/stockIn/StackInWheelEBS.dart b/lib/page/stockIn/StackInWheelEBS.dart index 1d43f54..5f7208b 100644 --- a/lib/page/stockIn/StackInWheelEBS.dart +++ b/lib/page/stockIn/StackInWheelEBS.dart @@ -53,7 +53,7 @@ class _StockInWheelEBSPageState extends State { ), body: Center( child: Padding(padding: const EdgeInsets.only( - top: 10, + top: 5, left: 10, right: 10, ), child: ListView( diff --git a/lib/page/stockIn/StackInWheelMes.dart b/lib/page/stockIn/StackInWheelMes.dart index e52364f..4ed1471 100644 --- a/lib/page/stockIn/StackInWheelMes.dart +++ b/lib/page/stockIn/StackInWheelMes.dart @@ -53,7 +53,7 @@ class _StockInWheelMesPageState extends State { ), body: Center( child: Padding(padding: const EdgeInsets.only( - top: 10, + top: 5, left: 10, right: 10, ), child: ListView( @@ -67,7 +67,7 @@ class _StockInWheelMesPageState extends State { title: "箱号:", hint: "请扫描或输入" ), Padding(padding: const EdgeInsets.only( - top: 20 + top: 5 ), child: ElevatedButton( onPressed: addGoods, style: ButtonStyle( @@ -80,7 +80,6 @@ class _StockInWheelMesPageState extends State { )) )), Padding(padding: const EdgeInsets.only( - top: 5 ), child: ElevatedButton( onPressed: wheelComplete, style: ButtonStyle( diff --git a/lib/page/stockIn/StockInEmpty.dart b/lib/page/stockIn/StockInEmpty.dart index 43fd1e5..88a1879 100644 --- a/lib/page/stockIn/StockInEmpty.dart +++ b/lib/page/stockIn/StockInEmpty.dart @@ -38,7 +38,7 @@ class _StockInEmptyPageState extends State { ), body: Center( child: Padding(padding: const EdgeInsets.only( - top: 20, + top: 5, left: 10, right: 10, ), child: ListView( @@ -48,7 +48,7 @@ class _StockInEmptyPageState extends State { title: "载具号:", hint: "请扫描或输入" ), Padding(padding: const EdgeInsets.only( - top: 10 + top: 5 ), child: ElevatedButton( onPressed: emptyIn, style: ButtonStyle(