|
@@ -1,7 +1,7 @@
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'order_management_page/order_detail_page.dart';
|
|
import 'order_management_page/order_detail_page.dart';
|
|
|
-
|
|
|
|
|
|
|
+import '../showDialog.dart';
|
|
|
class OrderManagementPage extends StatefulWidget {
|
|
class OrderManagementPage extends StatefulWidget {
|
|
|
final Widget child;
|
|
final Widget child;
|
|
|
|
|
|
|
@@ -56,14 +56,17 @@ class QueryWidget extends StatefulWidget { //搜索栏
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class _QueryWidgetState extends State < QueryWidget > {
|
|
class _QueryWidgetState extends State < QueryWidget > {
|
|
|
- GlobalKey _globalKey = GlobalKey();//搜索栏key
|
|
|
|
|
|
|
+ //单号的输入框控制器
|
|
|
|
|
+ TextEditingController _orderController = TextEditingController();
|
|
|
|
|
+
|
|
|
|
|
+ GlobalKey _globalKey = GlobalKey(); //搜索栏key
|
|
|
List < bool > statusList = [true, false, false];
|
|
List < bool > statusList = [true, false, false];
|
|
|
double inputPostX = 0;
|
|
double inputPostX = 0;
|
|
|
double inputPostY = 0;
|
|
double inputPostY = 0;
|
|
|
double inputWidth = 0;
|
|
double inputWidth = 0;
|
|
|
double inputHeight = 0;
|
|
double inputHeight = 0;
|
|
|
bool showStatus = true; //提示层显示状态
|
|
bool showStatus = true; //提示层显示状态
|
|
|
- String orderNo;
|
|
|
|
|
|
|
+ String _orderNo = "";
|
|
|
|
|
|
|
|
@override
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
@@ -89,14 +92,17 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
children: < Widget > [
|
|
children: < Widget > [
|
|
|
Expanded(
|
|
Expanded(
|
|
|
child: TextField(
|
|
child: TextField(
|
|
|
|
|
+ controller: _orderController,
|
|
|
keyboardType: TextInputType.number,
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
+ autofocus: true,
|
|
|
|
|
+ autocorrect: true,
|
|
|
decoration: InputDecoration(
|
|
decoration: InputDecoration(
|
|
|
border: InputBorder.none,
|
|
border: InputBorder.none,
|
|
|
hintText: "输入运单号后6位查询物流",
|
|
hintText: "输入运单号后6位查询物流",
|
|
|
hintStyle: TextStyle(fontSize: ScreenUtil.getInstance().setSp(26), color: Color.fromRGBO(155, 155, 155, 1)),
|
|
hintStyle: TextStyle(fontSize: ScreenUtil.getInstance().setSp(26), color: Color.fromRGBO(155, 155, 155, 1)),
|
|
|
contentPadding: EdgeInsets.fromLTRB(ScreenUtil.getInstance().setWidth(30), 0, ScreenUtil.getInstance().setWidth(30), 0)
|
|
contentPadding: EdgeInsets.fromLTRB(ScreenUtil.getInstance().setWidth(30), 0, ScreenUtil.getInstance().setWidth(30), 0)
|
|
|
),
|
|
),
|
|
|
- onTap: (){
|
|
|
|
|
|
|
+ onTap: () {
|
|
|
RenderObject inputObj = _globalKey.currentContext.findRenderObject();
|
|
RenderObject inputObj = _globalKey.currentContext.findRenderObject();
|
|
|
setState(() {
|
|
setState(() {
|
|
|
inputWidth = inputObj.paintBounds.size.width;
|
|
inputWidth = inputObj.paintBounds.size.width;
|
|
@@ -106,10 +112,11 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
onChanged: ((value) {
|
|
onChanged: ((value) {
|
|
|
|
|
+ print(value);
|
|
|
setState(() {
|
|
setState(() {
|
|
|
- orderNo = value;
|
|
|
|
|
|
|
+ _orderNo = value;
|
|
|
});
|
|
});
|
|
|
- if (orderNo.length >= 6) {
|
|
|
|
|
|
|
+ if (_orderNo.length >= 6) {
|
|
|
setState(() {
|
|
setState(() {
|
|
|
showStatus = false;
|
|
showStatus = false;
|
|
|
});
|
|
});
|
|
@@ -257,30 +264,20 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
),
|
|
),
|
|
|
child: ListView(
|
|
child: ListView(
|
|
|
children: < Widget > [
|
|
children: < Widget > [
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
- Padding(
|
|
|
|
|
- padding: EdgeInsets.all(10),
|
|
|
|
|
- child: Text("11012312312312312313123131"),
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ InkWell(
|
|
|
|
|
+ child: Padding(
|
|
|
|
|
+ padding: EdgeInsets.all(10),
|
|
|
|
|
+ child: Text("11012312312312312313123131"),
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ setState(() {
|
|
|
|
|
+ _orderController.text = ('11122223333333');
|
|
|
|
|
+ showStatus = true;
|
|
|
|
|
+ FocusScope.of(context).requestFocus(FocusNode());
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -350,38 +347,173 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: < Widget > [
|
|
children: < Widget > [
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
- child: Container(
|
|
|
|
|
- width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
- height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
- ),
|
|
|
|
|
- child: Center(
|
|
|
|
|
- child: Text('作废', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
|
|
+ child: Offstage(
|
|
|
|
|
+ offstage: false,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('作废', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
onTap: () {
|
|
onTap: () {
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text:'是否确认作废',childCallback: (val){
|
|
|
|
|
+ if(val){
|
|
|
|
|
+ //widget.callback(widget.index);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
print("作废");
|
|
print("作废");
|
|
|
},
|
|
},
|
|
|
),
|
|
),
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
- child: Container(
|
|
|
|
|
- width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
- height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
|
|
+ child: Offstage(
|
|
|
|
|
+ offstage: false,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('拒收', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- child: Center(
|
|
|
|
|
- child: Text('寄件', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text:'是否确认拒收',childCallback: (val){
|
|
|
|
|
+ if(val){
|
|
|
|
|
+ //widget.callback(widget.index);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ print("拒收");
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ child: Offstage(
|
|
|
|
|
+ offstage: false,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('签收', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
onTap: () {
|
|
onTap: () {
|
|
|
- print("寄件");
|
|
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text:'是否确认签收',childCallback: (val){
|
|
|
|
|
+ if(val){
|
|
|
|
|
+ //widget.callback(widget.index);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ print("签收");
|
|
|
},
|
|
},
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
|
|
+ ),
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ child: Offstage(
|
|
|
|
|
+ offstage: false,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('改单', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text:'是否确认改单',childCallback: (val){
|
|
|
|
|
+ if(val){
|
|
|
|
|
+ print(val);
|
|
|
|
|
+ Navigator.push(context, MaterialPageRoute(builder: (context) {
|
|
|
|
|
+ return OrderDetailPage(orderId: 123456, );
|
|
|
|
|
+ }));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ print("改单");
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ child: Offstage(
|
|
|
|
|
+ offstage: false,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(94),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(48),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Color.fromRGBO(239, 243, 249, 1),
|
|
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('打印', style: TextStyle(fontSize: ScreenUtil.getInstance().setSp(24), color: Color.fromRGBO(64, 98, 254, 1))),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text:'是否确认打印',childCallback: (val){
|
|
|
|
|
+ if(val){
|
|
|
|
|
+ //widget.callback(widget.index);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ print("打印");
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
)
|
|
)
|
|
|
],
|
|
],
|
|
@@ -389,9 +521,7 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
)
|
|
)
|
|
|
),
|
|
),
|
|
|
onTap: () {
|
|
onTap: () {
|
|
|
- Navigator.push(context, MaterialPageRoute(builder: (context) {
|
|
|
|
|
- return OrderDetailPage(orderId: 123456, );
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|