add stock_out_empty
This commit is contained in:
parent
f5f9a34c7a
commit
ec2039d173
|
|
@ -5,6 +5,7 @@ import '/common/colorCom.dart';
|
|||
import 'package:bruno/bruno.dart';
|
||||
import 'package:wms_app/page/stockIn/stock_in_empty.dart';
|
||||
import 'package:wms_app/page/stockIn/stock_in_buy.dart';
|
||||
import 'package:wms_app/page/stockOut/stock_out_empty.dart';
|
||||
import 'package:wms_app/page/pick/pick.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
|
|
@ -66,7 +67,7 @@ class _HomePageState extends State<Home> {
|
|||
ListTile(
|
||||
title: const Text("呼叫空托"),
|
||||
trailing: const Icon(Icons.ac_unit),
|
||||
onTap: () {}),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const StockOutEmpty()));}),
|
||||
ListTile(
|
||||
title: const Text("出库拣货"),
|
||||
trailing: const Icon(Icons.back_hand),
|
||||
|
|
|
|||
96
lib/page/stockOut/stock_out_empty.dart
Normal file
96
lib/page/stockOut/stock_out_empty.dart
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import '/common/colorCom.dart';
|
||||
import 'package:wms_app/utils/dialogUtils.dart';
|
||||
|
||||
class StockOutEmpty extends StatefulWidget {
|
||||
const StockOutEmpty({super.key});
|
||||
|
||||
@override
|
||||
State<StockOutEmpty> createState() => _CallEmptyCartPageState();
|
||||
}
|
||||
|
||||
class _CallEmptyCartPageState extends State<StockOutEmpty> {
|
||||
String selectedOption = "1";
|
||||
String status = "可用";
|
||||
bool isLoading = false;
|
||||
|
||||
void callEmptyCart() {
|
||||
if (selectedOption == "2") {
|
||||
DialogUtils.showWarningMessage(context, "警告", "选中的空托不可用",
|
||||
btnLabel: "我知道了");
|
||||
} else {
|
||||
DialogUtils.showSuccessMessage(context, "成功", "空托已呼叫", btnLabel: "我知道了");
|
||||
}
|
||||
}
|
||||
|
||||
@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(top: 5, left: 10, right: 10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: DropdownButton<String>(
|
||||
value: selectedOption,
|
||||
isExpanded: true,
|
||||
items: [
|
||||
DropdownMenuItem(
|
||||
value: "1",
|
||||
child: Text("1 - 可用"),
|
||||
),
|
||||
DropdownMenuItem(
|
||||
value: "2",
|
||||
child: Text("2 - 不可用"),
|
||||
),
|
||||
],
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
selectedOption = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: ElevatedButton(
|
||||
onPressed: isLoading ? null : callEmptyCart,
|
||||
style: ButtonStyle(
|
||||
backgroundColor:
|
||||
WidgetStateProperty.all(ColorCommon.colorScheme),
|
||||
),
|
||||
child: Text("出库", style: TextStyle(color: Colors.white)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (isLoading)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user