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: "请扫描或输入需要盘点的载具号", isRequire: true, ), 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() { } }