2024-11-30 20:45:12 +08:00
|
|
|
|
import 'package:flutter/material.dart';
|
2024-12-29 13:05:26 +08:00
|
|
|
|
import 'package:wms_app/page/stockIn/stackInWheelEBS.dart';
|
2024-12-07 18:14:44 +08:00
|
|
|
|
import '../stock/stockCheck.dart';
|
2024-11-30 20:45:12 +08:00
|
|
|
|
import '/common/colorCom.dart';
|
|
|
|
|
|
import 'package:bruno/bruno.dart';
|
2024-12-29 13:05:26 +08:00
|
|
|
|
import 'package:wms_app/page/stockIn/stockInEmpty.dart';
|
2024-12-07 18:14:44 +08:00
|
|
|
|
import 'package:wms_app/page/stock/stockSearch.dart';
|
2024-11-30 20:45:12 +08:00
|
|
|
|
import 'package:wms_app/page/pick/pick.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class Home extends StatefulWidget {
|
|
|
|
|
|
const Home({super.key});
|
|
|
|
|
|
@override
|
|
|
|
|
|
State<Home> createState() => _HomePageState();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _HomePageState extends State<Home> {
|
|
|
|
|
|
|
|
|
|
|
|
List<BrnDoughnutDataItem> stockChartsData = [];
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
|
iconTheme: const IconThemeData(
|
|
|
|
|
|
color: Colors.white
|
|
|
|
|
|
),
|
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
|
backgroundColor: ColorCommon.colorScheme,
|
|
|
|
|
|
title: const Text(
|
2024-12-29 13:05:26 +08:00
|
|
|
|
"景旺WMS移动终端(冷冻)",
|
2024-11-30 20:45:12 +08:00
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: Colors.white
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
drawer: Drawer(
|
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
|
child: ListView(
|
|
|
|
|
|
padding: const EdgeInsets.all(0),
|
|
|
|
|
|
children: [
|
|
|
|
|
|
UserAccountsDrawerHeader(
|
2024-12-06 08:13:16 +08:00
|
|
|
|
accountName: const Text("景旺电子"),
|
|
|
|
|
|
accountEmail: const Text("欢迎使用WMS移动终端"),
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
color: ColorCommon.colorScheme
|
|
|
|
|
|
)
|
2024-11-30 20:45:12 +08:00
|
|
|
|
),
|
|
|
|
|
|
ListTile(title: const Text("空载具入库"), trailing: const Icon(Icons.grain), onTap: () {
|
2024-12-06 08:13:16 +08:00
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInEmpty()));
|
|
|
|
|
|
}),
|
2024-12-29 13:05:26 +08:00
|
|
|
|
// ListTile(title: const Text("MES成品入库"), trailing: const Icon(Icons.add_box), onTap: () {
|
|
|
|
|
|
// Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInWheelMes()));
|
|
|
|
|
|
// }),
|
|
|
|
|
|
ListTile(title: const Text("码盘入库"), trailing: const Icon(Icons.add_box), onTap: () {
|
2024-12-06 08:13:16 +08:00
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInWheelEBS()));
|
2024-11-30 20:45:12 +08:00
|
|
|
|
}),
|
|
|
|
|
|
ListTile(title: const Text("出库拣货"), trailing: const Icon(Icons.back_hand), onTap: () {
|
2024-12-06 08:13:16 +08:00
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const Pick()));
|
2024-11-30 20:45:12 +08:00
|
|
|
|
}),
|
|
|
|
|
|
ListTile(title: const Text("库存盘点"), trailing: const Icon(Icons.checklist), onTap: () {
|
2024-12-07 18:14:44 +08:00
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const StockCheck()));
|
2024-11-30 20:45:12 +08:00
|
|
|
|
}),
|
|
|
|
|
|
ListTile(title: const Text("库存查询"), trailing: const Icon(Icons.list_alt), onTap: () {
|
2024-12-07 18:14:44 +08:00
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const StockSearch()));
|
2024-11-30 20:45:12 +08:00
|
|
|
|
})
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
body: Padding(padding: const EdgeInsets.only(
|
|
|
|
|
|
top: 10,
|
|
|
|
|
|
left: 20,
|
|
|
|
|
|
right: 20
|
2024-12-06 08:13:16 +08:00
|
|
|
|
), child: ListView(
|
2024-11-30 20:45:12 +08:00
|
|
|
|
children: [
|
|
|
|
|
|
const Text("库存占用情况:"),
|
|
|
|
|
|
Row(
|
|
|
|
|
|
children: [
|
|
|
|
|
|
Column(
|
|
|
|
|
|
children: [
|
|
|
|
|
|
BrnDoughnutChart(
|
|
|
|
|
|
padding: const EdgeInsets.all(50),
|
|
|
|
|
|
width: 150,
|
|
|
|
|
|
height: 150,
|
|
|
|
|
|
data: stockChartsData,
|
|
|
|
|
|
showTitleWhenSelected: false
|
|
|
|
|
|
),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
Column(
|
|
|
|
|
|
children: [
|
|
|
|
|
|
DoughnutChartLegend(data: stockChartsData, legendStyle: BrnDoughnutChartLegendStyle.list),
|
|
|
|
|
|
],
|
|
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
))
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
void initState() {
|
|
|
|
|
|
super.initState();
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
stockChartsData = [
|
|
|
|
|
|
BrnDoughnutDataItem(
|
|
|
|
|
|
value: 40,
|
|
|
|
|
|
title: "空闲", color: Colors.green
|
|
|
|
|
|
),
|
|
|
|
|
|
BrnDoughnutDataItem(
|
|
|
|
|
|
value: 60,
|
|
|
|
|
|
title: "占用", color: Colors.orange
|
|
|
|
|
|
)
|
|
|
|
|
|
];
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|