add countAvailable flutter
This commit is contained in:
parent
a719927536
commit
910670c0cd
|
|
@ -6,9 +6,8 @@ class BaseDio {
|
|||
static Dio instance() {
|
||||
if (!initializeComplete) {
|
||||
final options = BaseOptions(
|
||||
// http://10.50.222.152:19990',
|
||||
// baseUrl: 'http://localhost:8080',
|
||||
baseUrl: 'http://10.0.2.2:9990',
|
||||
// baseUrl: 'http://10.0.2.2:9990',
|
||||
baseUrl: 'http://192.168.1.3:9990',
|
||||
connectTimeout: const Duration(seconds: 10),
|
||||
receiveTimeout: const Duration(seconds: 5),
|
||||
);
|
||||
|
|
|
|||
25
lib/api_client/monitor.dart
Normal file
25
lib/api_client/monitor.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'baseDio.dart';
|
||||
|
||||
import 'package:logger/logger.dart';
|
||||
|
||||
class MonitorApi {
|
||||
static var logger = Logger(
|
||||
printer: PrettyPrinter(),
|
||||
);
|
||||
|
||||
static Future<dynamic> countAvailable({int timeOut = 5000}) async {
|
||||
final response =
|
||||
await BaseDio.instance().get<String>("/app/location/count",
|
||||
options: Options(
|
||||
responseType: ResponseType.json,
|
||||
sendTimeout: Duration(milliseconds: timeOut),
|
||||
receiveTimeout: Duration(milliseconds: timeOut),
|
||||
));
|
||||
logger.e("yuqili $response");
|
||||
return {"code": response.statusCode, "data": response.data};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:logger/logger.dart';
|
||||
import 'package:wms_app/api_client/monitor.dart';
|
||||
import 'package:wms_app/page/stockIn/stock_in_normal.dart';
|
||||
import '../../common/user/login_user.dart';
|
||||
import '../../utils/dialogUtils.dart';
|
||||
import '/common/colorCom.dart';
|
||||
import 'package:bruno/bruno.dart';
|
||||
import 'package:wms_app/page/stockIn/stock_in_empty.dart';
|
||||
|
|
@ -11,12 +15,16 @@ 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> {
|
||||
var logger = Logger(
|
||||
printer: PrettyPrinter(),
|
||||
);
|
||||
List<BrnDoughnutDataItem> stockChartsData = []; // 库存占用情况
|
||||
int available = 0, all = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -52,15 +60,30 @@ class _HomePageState extends State<Home> {
|
|||
ListTile(
|
||||
title: const Text("货位信息码盘"),
|
||||
trailing: const Icon(Icons.add_box),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInNormal()));}),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const StockInNormal()));
|
||||
}),
|
||||
ListTile(
|
||||
title: const Text("采购有货入库"),
|
||||
trailing: const Icon(Icons.add_box),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInBuy()));}),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const StockInBuy()));
|
||||
}),
|
||||
ListTile(
|
||||
title: const Text("其他物料入库"),
|
||||
trailing: const Icon(Icons.add_box),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const StockInNormal()));}),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const StockInNormal()));
|
||||
}),
|
||||
ListTile(
|
||||
title: const Text("生产配盘入库"),
|
||||
trailing: const Icon(Icons.add_box),
|
||||
|
|
@ -68,7 +91,12 @@ class _HomePageState extends State<Home> {
|
|||
ListTile(
|
||||
title: const Text("呼叫空托"),
|
||||
trailing: const Icon(Icons.ac_unit),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const StockOutEmpty()));}),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const StockOutEmpty()));
|
||||
}),
|
||||
ListTile(
|
||||
title: const Text("出库拣货"),
|
||||
trailing: const Icon(Icons.back_hand),
|
||||
|
|
@ -79,7 +107,12 @@ class _HomePageState extends State<Home> {
|
|||
ListTile(
|
||||
title: const Text("物料盘点"),
|
||||
trailing: const Icon(Icons.checklist),
|
||||
onTap: () {Navigator.push(context, MaterialPageRoute(builder: (context) => const InventoryCheckPage()));}),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const InventoryCheckPage()));
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -107,17 +140,49 @@ class _HomePageState extends State<Home> {
|
|||
])));
|
||||
}
|
||||
|
||||
count() async {
|
||||
BrnLoadingDialog.show(context); // 显示加载动画
|
||||
|
||||
MonitorApi.countAvailable().then((response) {
|
||||
if (response["code"] != 200) {
|
||||
DialogUtils.showWarningMessage(context, "警告", "服务器请求失败",
|
||||
btnLabel: "我知道了");
|
||||
return;
|
||||
}
|
||||
final data = jsonDecode(response["data"]);
|
||||
if (response["code"] == 200) {
|
||||
setState(() {
|
||||
available = data["data"]["available_count"];
|
||||
all = data["data"]["total_count"];
|
||||
stockChartsData = [
|
||||
BrnDoughnutDataItem(value: available * 1.0, title: "空闲", color: Colors.green),
|
||||
BrnDoughnutDataItem(value: (all - available) * 1.0, title: "占用", color: Colors.orange)
|
||||
];
|
||||
});
|
||||
DialogUtils.showSuccessMessage(context, "计数成功", "", btnLabel: "我知道了");
|
||||
} else {
|
||||
DialogUtils.showWarningMessage(
|
||||
context, "警告", "服务器返回失败:${response["message"]}",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
}).catchError((err) {
|
||||
DialogUtils.showErrorMessage(
|
||||
context, "请求发生错误", "请求服务器发生错误:${err.toString()}",
|
||||
btnLabel: "我知道了");
|
||||
}).whenComplete(() {
|
||||
BrnLoadingDialog.dismiss(context); // 隐藏加载动画
|
||||
});
|
||||
}
|
||||
|
||||
/// 刷新界面数据
|
||||
refreshData() {}
|
||||
refreshData() {
|
||||
count();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
setState(() {
|
||||
stockChartsData = [
|
||||
BrnDoughnutDataItem(value: 40, title: "空闲", color: Colors.green),
|
||||
BrnDoughnutDataItem(value: 60, title: "占用", color: Colors.orange)
|
||||
];
|
||||
});
|
||||
count(); // 在初始化时调用count方法,加载数据并显示缓冲动画
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ import 'package:wms_app/utils/dialogUtils.dart';
|
|||
|
||||
class StockInWheelEBS extends StatefulWidget {
|
||||
const StockInWheelEBS({super.key});
|
||||
|
||||
@override
|
||||
State<StockInWheelEBS> createState() => _StockInWheelEBSPageState();
|
||||
}
|
||||
|
||||
/// EBS码盘入库
|
||||
class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
||||
|
||||
final _vehicleTextController = TextEditingController(); // 载具号输入框
|
||||
final _goodsCodeController = TextEditingController(); // 条码输入框
|
||||
List<dynamic> packageData = []; // 已经码盘的数据
|
||||
|
|
@ -31,12 +31,12 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
iconTheme: const IconThemeData(
|
||||
color: Colors.white
|
||||
),
|
||||
leading: IconButton(onPressed: () {
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
}, icon: const Icon(Icons.arrow_back)),
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back)),
|
||||
centerTitle: true,
|
||||
backgroundColor: ColorCommon.colorScheme,
|
||||
title: const Text(
|
||||
|
|
@ -45,49 +45,50 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
),
|
||||
),
|
||||
body: Center(
|
||||
child: Padding(padding: const EdgeInsets.only(top: 5, left: 10, right: 10),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 5, left: 10, right: 10),
|
||||
child: ListView(
|
||||
children: [
|
||||
BrnTextInputFormItem(
|
||||
controller: _vehicleTextController,
|
||||
title: "载具号:", hint: "请扫描或输入",
|
||||
title: "载具号:",
|
||||
hint: "请扫描或输入",
|
||||
isRequire: true,
|
||||
),
|
||||
BrnTextInputFormItem(
|
||||
controller: _goodsCodeController,
|
||||
title: "条码:", hint: "请扫描物料二维码",
|
||||
title: "条码:",
|
||||
hint: "请扫描物料二维码",
|
||||
isRequire: true,
|
||||
),
|
||||
Padding(padding: const EdgeInsets.only(
|
||||
top: 5
|
||||
), child: ElevatedButton(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 5),
|
||||
child: ElevatedButton(
|
||||
onPressed: resolveCode,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme),
|
||||
backgroundColor:
|
||||
WidgetStateProperty.all(ColorCommon.colorScheme),
|
||||
),
|
||||
child: const Text(
|
||||
"添加物料",
|
||||
style: TextStyle(
|
||||
color: Colors.white
|
||||
))
|
||||
)),
|
||||
Padding(padding: const EdgeInsets.only(top: 0),
|
||||
child: const Text("添加物料",
|
||||
style: TextStyle(color: Colors.white)))),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 0),
|
||||
child: ElevatedButton(
|
||||
onPressed: wheelComplete,
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(ColorCommon.colorScheme),
|
||||
backgroundColor:
|
||||
WidgetStateProperty.all(ColorCommon.colorScheme),
|
||||
),
|
||||
child: const Text("码盘完成",
|
||||
style: TextStyle(
|
||||
color: Colors.white
|
||||
))
|
||||
)),
|
||||
const Padding(padding: EdgeInsets.only(top: 10, bottom: 10),
|
||||
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
|
||||
border: Border.all(
|
||||
color: const Color(0x4D0C0C05), width: 0.3), // border
|
||||
borderRadius: BorderRadius.circular((5)), // 圆角
|
||||
),
|
||||
child: TDTable(
|
||||
|
|
@ -102,23 +103,100 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
align: TDTableColAlign.center,
|
||||
cellBuilder: (BuildContext context) {
|
||||
return const SizedBox(
|
||||
child: Icon(TDIcons.delete, color: Colors.redAccent, size: 10),
|
||||
child: Icon(TDIcons.delete,
|
||||
color: Colors.redAccent, size: 10),
|
||||
);
|
||||
},
|
||||
),
|
||||
TDTableCol(title: '序号', colKey: 'id', align: TDTableColAlign.center, width: 80),
|
||||
TDTableCol(title: '采购单号', colKey: 'segment1', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '物料号', colKey: 'itemId', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '批次号', colKey: 'batch', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '数量', colKey: 'quantity', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '重量', colKey: 'weight', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '生产日期', colKey: 'productData', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '送货单号', colKey: 'sendOrderId', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '物料描述', colKey: 'goodsName', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '单位', colKey: 'unit', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '订单头主键', colKey: 'poHeaderId', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '订单行主键', colKey: 'poLineId', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(title: '发运行主键', colKey: 'lineLocationId', align: TDTableColAlign.center, ellipsis: true, ellipsisTitle: true, width: 100),
|
||||
TDTableCol(
|
||||
title: '序号',
|
||||
colKey: 'id',
|
||||
align: TDTableColAlign.center,
|
||||
width: 80),
|
||||
TDTableCol(
|
||||
title: '采购单号',
|
||||
colKey: 'segment1',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '物料号',
|
||||
colKey: 'itemId',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '批次号',
|
||||
colKey: 'batch',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '数量',
|
||||
colKey: 'quantity',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '重量',
|
||||
colKey: 'weight',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '生产日期',
|
||||
colKey: 'productData',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '送货单号',
|
||||
colKey: 'sendOrderId',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '物料描述',
|
||||
colKey: 'goodsName',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '单位',
|
||||
colKey: 'unit',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '订单头主键',
|
||||
colKey: 'poHeaderId',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '订单行主键',
|
||||
colKey: 'poLineId',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
TDTableCol(
|
||||
title: '发运行主键',
|
||||
colKey: 'lineLocationId',
|
||||
align: TDTableColAlign.center,
|
||||
ellipsis: true,
|
||||
ellipsisTitle: true,
|
||||
width: 100),
|
||||
],
|
||||
data: packageData,
|
||||
onCellTap: (index, dynamic, cell) {
|
||||
|
|
@ -133,11 +211,13 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
|
||||
/// 行数据点击事件
|
||||
void clickLine(index, dynamic, cell) {
|
||||
if(cell.colKey == "action") { // 点击删除
|
||||
if (cell.colKey == "action") {
|
||||
// 点击删除
|
||||
delete(dynamic);
|
||||
return;
|
||||
}
|
||||
if(cell.colKey == "quantity") { // 点击数量
|
||||
if (cell.colKey == "quantity") {
|
||||
// 点击数量
|
||||
modifyNumber(index, dynamic);
|
||||
return;
|
||||
}
|
||||
|
|
@ -168,7 +248,8 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
if (response["code"] != 200) {
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showWarningMessage(thisContext, "警告", "服务器请求失败", btnLabel: "我知道了");
|
||||
DialogUtils.showWarningMessage(thisContext, "警告", "服务器请求失败",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -198,13 +279,17 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
}
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showWarningMessage(thisContext, "数据异常", "服务器返回错误:${data["message"]} ", btnLabel: "我知道了");
|
||||
DialogUtils.showWarningMessage(
|
||||
thisContext, "数据异常", "服务器返回错误:${data["message"]} ",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}).catchError((err) {
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showErrorMessage(thisContext, "请求发生错误", "请求服务器发生错误:${err.toString()} ", btnLabel: "我知道了");
|
||||
DialogUtils.showErrorMessage(
|
||||
thisContext, "请求发生错误", "请求服务器发生错误:${err.toString()} ",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}).whenComplete(() {
|
||||
|
|
@ -229,13 +314,15 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
|
||||
/// 修改数量
|
||||
void modifyNumber(index, dynamic) {
|
||||
DialogUtils.showInputMessage(context, "请输入要修改的数量", message: "仅支持数字", confirm: (value) {
|
||||
DialogUtils.showInputMessage(context, "请输入要修改的数量", message: "仅支持数字",
|
||||
confirm: (value) {
|
||||
if (!StringUtils.isNumber(value)) {
|
||||
DialogUtils.showWarningMessage(context, "警告", "该文本框仅支持数字");
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
packageData.where((w)=>w["id"] == dynamic["id"]).first["quantity"] = value;
|
||||
packageData.where((w) => w["id"] == dynamic["id"]).first["quantity"] =
|
||||
value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -255,7 +342,8 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
message.add({"label": "单位:", "msg": tableRow["unit"].toString()});
|
||||
message.add({"label": "订单头主键:", "msg": tableRow["poHeaderId"].toString()});
|
||||
message.add({"label": "订单行主键:", "msg": tableRow["poLineId"].toString()});
|
||||
message.add({"label":"发运行主键:", "msg":tableRow["lineLocationId"].toString()});
|
||||
message
|
||||
.add({"label": "发运行主键:", "msg": tableRow["lineLocationId"].toString()});
|
||||
DialogUtils.showMessageList(context, "数据详情", message, btnLabel: "我知道了");
|
||||
}
|
||||
|
||||
|
|
@ -267,25 +355,22 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
}
|
||||
String vehicleNo = _vehicleTextController.text;
|
||||
if (StringUtils.isEmpty(vehicleNo)) {
|
||||
DialogUtils.showWarningMessage(context, "警告", "请先扫描载具号", btnLabel: "返回填写");
|
||||
DialogUtils.showWarningMessage(context, "警告", "请先扫描载具号",
|
||||
btnLabel: "返回填写");
|
||||
return;
|
||||
}
|
||||
int dataCount = packageData.length;
|
||||
DialogUtils.showConfirmMessage(context, "码盘完成", "载具:$vehicleNo 码盘 $dataCount 条数据,是否继续?", confirmBtn: "继续", confirm: ()
|
||||
{
|
||||
DialogUtils.showConfirmMessage(
|
||||
context, "码盘完成", "载具:$vehicleNo 码盘 $dataCount 条数据,是否继续?",
|
||||
confirmBtn: "继续", confirm: () {
|
||||
int taskType = 1; // 1 表示进库,2 表示进站台
|
||||
BrnLoadingDialog.show(context, content: "正在请求入库");
|
||||
StockInApi.stockInComplete({
|
||||
"vehicleNo": vehicleNo,
|
||||
"inArea": taskType.toString(),
|
||||
"storageArea" : "",
|
||||
"goods": packageData
|
||||
}).then((response) {
|
||||
StockInApi.stockInComplete(packageData).then((response) {
|
||||
if (response["code"] != 200) {
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showWarningMessage(
|
||||
thisContext, "警告", "服务器请求失败", btnLabel: "我知道了");
|
||||
DialogUtils.showWarningMessage(thisContext, "警告", "服务器请求失败",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -298,8 +383,8 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
});
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showSuccessMessage(
|
||||
thisContext, "码盘成功", "", btnLabel: "我知道了");
|
||||
DialogUtils.showSuccessMessage(thisContext, "码盘成功", "",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -313,8 +398,9 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
}).catchError((err) {
|
||||
var thisContext = context;
|
||||
if (thisContext.mounted) {
|
||||
DialogUtils.showErrorMessage(thisContext, "请求发生错误",
|
||||
"请求服务器发生错误:${err.toString()}", btnLabel: "我知道了");
|
||||
DialogUtils.showErrorMessage(
|
||||
thisContext, "请求发生错误", "请求服务器发生错误:${err.toString()}",
|
||||
btnLabel: "我知道了");
|
||||
}
|
||||
return;
|
||||
}).whenComplete(() {
|
||||
|
|
@ -325,5 +411,4 @@ class _StockInWheelEBSPageState extends State<StockInWheelEBS> {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ packages:
|
|||
source: hosted
|
||||
version: "0.2.1+1"
|
||||
intl:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: intl
|
||||
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user