|
@@ -40,14 +40,15 @@ class _MyPageState extends State < MyPage > with AutomaticKeepAliveClientMixin {
|
|
|
"货物外": "6",
|
|
"货物外": "6",
|
|
|
"不打印": "7",
|
|
"不打印": "7",
|
|
|
};
|
|
};
|
|
|
- static var printTypeMapSecond = {
|
|
|
|
|
- "1":"全部",
|
|
|
|
|
- "2":"配件商",
|
|
|
|
|
- "3":"修理厂",
|
|
|
|
|
- "4":"司机",
|
|
|
|
|
- "5":"货物",
|
|
|
|
|
- "6":"货物外",
|
|
|
|
|
- "7":"不打印",
|
|
|
|
|
|
|
+ static
|
|
|
|
|
+ var printTypeMapSecond = {
|
|
|
|
|
+ "1": "全部",
|
|
|
|
|
+ "2": "配件商",
|
|
|
|
|
+ "3": "修理厂",
|
|
|
|
|
+ "4": "司机",
|
|
|
|
|
+ "5": "货物",
|
|
|
|
|
+ "6": "货物外",
|
|
|
|
|
+ "7": "不打印",
|
|
|
};
|
|
};
|
|
|
String printType = '全部';
|
|
String printType = '全部';
|
|
|
@override
|
|
@override
|
|
@@ -73,7 +74,7 @@ class _MyPageState extends State < MyPage > with AutomaticKeepAliveClientMixin {
|
|
|
name = value;
|
|
name = value;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
- getKey('printType').then((value){
|
|
|
|
|
|
|
+ getKey('printType').then((value) {
|
|
|
printType = printTypeMapSecond[value];
|
|
printType = printTypeMapSecond[value];
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -102,6 +103,36 @@ class _MyPageState extends State < MyPage > with AutomaticKeepAliveClientMixin {
|
|
|
), ),
|
|
), ),
|
|
|
centerTitle: true,
|
|
centerTitle: true,
|
|
|
backgroundColor: Color.fromRGBO(64, 98, 254, 1),
|
|
backgroundColor: Color.fromRGBO(64, 98, 254, 1),
|
|
|
|
|
+ actions: < Widget > [
|
|
|
|
|
+ InkWell(
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.only(right: ScreenUtil.getInstance().setWidth(30)),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text('退出'),
|
|
|
|
|
+ )
|
|
|
|
|
+ ),
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ showDialog < Null > (
|
|
|
|
|
+ context: context, //BuildContext对象
|
|
|
|
|
+ barrierDismissible: false,
|
|
|
|
|
+ builder: (BuildContext context) {
|
|
|
|
|
+ return new LoadingDialog( //调用对话框
|
|
|
|
|
+ text: '确认退出?', childCallback: (val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ clearKey();
|
|
|
|
|
+ Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) {
|
|
|
|
|
+ return LoginPage();
|
|
|
|
|
+ }));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
body: Container(
|
|
body: Container(
|
|
|
color: Color.fromRGBO(246, 246, 254, 1),
|
|
color: Color.fromRGBO(246, 246, 254, 1),
|
|
@@ -149,7 +180,7 @@ class _MyPageState extends State < MyPage > with AutomaticKeepAliveClientMixin {
|
|
|
_passWordWidget(),
|
|
_passWordWidget(),
|
|
|
_linkPrint(check),
|
|
_linkPrint(check),
|
|
|
_printType(),
|
|
_printType(),
|
|
|
- _quitWidget(context)
|
|
|
|
|
|
|
+ //_quitWidget(context)
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|