Commit e7d1e4e34e6f6574edff2eea23d245d127b9b451

Authored by “gaiyaguang”
1 parent ea4333cc

uiui

@@ -366,7 +366,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -366,7 +366,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
366 VEmptyView(20), 366 VEmptyView(20),
367 Container( 367 Container(
368 width: ScreenUtil().setWidth(669), 368 width: ScreenUtil().setWidth(669),
369 - height: ScreenUtil().setHeight(84), 369 + height: ScreenUtil().setWidth(84),
370 decoration: BoxDecoration( 370 decoration: BoxDecoration(
371 border: Border.all( 371 border: Border.all(
372 color: MyColours.color_199095), 372 color: MyColours.color_199095),
@@ -400,7 +400,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { @@ -400,7 +400,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
400 child: Container( 400 child: Container(
401 // color: Colors.red, 401 // color: Colors.red,
402 // height: ScreenUtil().setHeight(178), 402 // height: ScreenUtil().setHeight(178),
403 - height: ScreenUtil().setHeight(180), 403 + height: ScreenUtil().setWidth(185),
404 child: ListView.builder( 404 child: ListView.builder(
405 physics: const NeverScrollableScrollPhysics(), 405 physics: const NeverScrollableScrollPhysics(),
406 itemBuilder: (BuildContext contxt, int index) { 406 itemBuilder: (BuildContext contxt, int index) {
@@ -773,7 +773,6 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { @@ -773,7 +773,6 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
773 height: 84, 773 height: 84,
774 fontSize: 34, 774 fontSize: 34,
775 content: "确定修改", 775 content: "确定修改",
776 - fontWeight: FontWeight.bold,  
777 state: 2, 776 state: 2,
778 onPress: () async { 777 onPress: () async {
779 String name = 778 String name =
@@ -111,7 +111,6 @@ class MessageItem extends StatelessWidget { @@ -111,7 +111,6 @@ class MessageItem extends StatelessWidget {
111 width: 152, 111 width: 152,
112 height: 50, 112 height: 50,
113 fontSize: 30, 113 fontSize: 30,
114 - fontWeight: FontWeight.bold,  
115 content:message.message_type=="10"?"立即处理":"立即查看", 114 content:message.message_type=="10"?"立即处理":"立即查看",
116 state: 1, 115 state: 1,
117 onPress: () { 116 onPress: () {
@@ -64,7 +64,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -64,7 +64,7 @@ class NotebookItemState extends State<NoteBookItem> {
64 notebook.tableinfoStr?.trim(), 64 notebook.tableinfoStr?.trim(),
65 style: TextStyle( 65 style: TextStyle(
66 color: textColor, 66 color: textColor,
67 - fontWeight: FontWeight.bold, 67 + // fontWeight: FontWeight.bold,
68 fontSize: ScreenUtil().setSp(30)), 68 fontSize: ScreenUtil().setSp(30)),
69 ), 69 ),
70 ), 70 ),
@@ -83,7 +83,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -83,7 +83,7 @@ class NotebookItemState extends State<NoteBookItem> {
83 notebook.rnameStr, 83 notebook.rnameStr,
84 style: TextStyle( 84 style: TextStyle(
85 color: textColor, 85 color: textColor,
86 - fontWeight: FontWeight.bold, 86 + // fontWeight: FontWeight.bold,
87 fontSize: ScreenUtil().setSp(30)), 87 fontSize: ScreenUtil().setSp(30)),
88 ), 88 ),
89 VEmptyView(10), 89 VEmptyView(10),
@@ -91,7 +91,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -91,7 +91,7 @@ class NotebookItemState extends State<NoteBookItem> {
91 notebook.phoneStr, 91 notebook.phoneStr,
92 style: TextStyle( 92 style: TextStyle(
93 color: textColor, 93 color: textColor,
94 - fontWeight: FontWeight.bold, 94 + // fontWeight: FontWeight.bold,
95 fontSize: ScreenUtil().setSp(26)), 95 fontSize: ScreenUtil().setSp(26)),
96 ) 96 )
97 ], 97 ],
@@ -109,7 +109,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -109,7 +109,7 @@ class NotebookItemState extends State<NoteBookItem> {
109 notebook.ddateStr, 109 notebook.ddateStr,
110 style: TextStyle( 110 style: TextStyle(
111 color: textColor, 111 color: textColor,
112 - fontWeight: FontWeight.bold, 112 + // fontWeight: FontWeight.bold,
113 fontSize: ScreenUtil().setSp(30)), 113 fontSize: ScreenUtil().setSp(30)),
114 ), 114 ),
115 ), 115 ),
@@ -134,7 +134,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -134,7 +134,7 @@ class NotebookItemState extends State<NoteBookItem> {
134 notebook.status == "6") 134 notebook.status == "6")
135 ? MyColours.color_bfbfbf 135 ? MyColours.color_bfbfbf
136 : MyColours.color_2bb5b7, 136 : MyColours.color_2bb5b7,
137 - fontWeight: FontWeight.bold, 137 + // fontWeight: FontWeight.bold,
138 fontSize: ScreenUtil().setSp(30)), 138 fontSize: ScreenUtil().setSp(30)),
139 ), 139 ),
140 ), 140 ),
@@ -80,7 +80,7 @@ class CommonButton extends StatelessWidget { @@ -80,7 +80,7 @@ class CommonButton extends StatelessWidget {
80 onTap: onPress, 80 onTap: onPress,
81 child: Container( 81 child: Container(
82 width: ScreenUtil().setWidth(width), 82 width: ScreenUtil().setWidth(width),
83 - height: ScreenUtil().setHeight(height), 83 + height: ScreenUtil().setWidth(height),
84 decoration: boxDecoration, 84 decoration: boxDecoration,
85 child: Align( 85 child: Align(
86 alignment: Alignment.center, 86 alignment: Alignment.center,
@@ -5,15 +5,15 @@ import 'package:one_key/res/colors.dart'; @@ -5,15 +5,15 @@ import 'package:one_key/res/colors.dart';
5 import 'package:one_key/models/table.dart' as t; 5 import 'package:one_key/models/table.dart' as t;
6 import 'package:one_key/widgets/v_empty_view.dart'; 6 import 'package:one_key/widgets/v_empty_view.dart';
7 7
8 -class NeedItem extends StatefulWidget{  
9 - 8 +class NeedItem extends StatefulWidget {
10 final t.Table table; 9 final t.Table table;
11 - final bool canSelected;//是否能选中 10 + final bool canSelected; //是否能选中
12 final ValueChanged onSelected; 11 final ValueChanged onSelected;
13 12
14 - final int height;//高度 13 + final int height; //高度
15 14
16 - NeedItem(this.table,{this.onSelected,this.canSelected=false,this.height=183}); 15 + NeedItem(this.table,
  16 + {this.onSelected, this.canSelected = false, this.height = 183});
17 17
18 @override 18 @override
19 State<StatefulWidget> createState() { 19 State<StatefulWidget> createState() {
@@ -22,19 +22,18 @@ class NeedItem extends StatefulWidget{ @@ -22,19 +22,18 @@ class NeedItem extends StatefulWidget{
22 } 22 }
23 } 23 }
24 24
25 -class NeedItemState extends State<NeedItem>{  
26 - 25 +class NeedItemState extends State<NeedItem> {
27 @override 26 @override
28 Widget build(BuildContext context) { 27 Widget build(BuildContext context) {
29 // TODO: implement build 28 // TODO: implement build
30 29
31 - t.Table table=widget.table; 30 + t.Table table = widget.table;
32 31
33 return GestureDetector( 32 return GestureDetector(
34 - onTap: (){  
35 - if(widget.canSelected&&table.signStr.isEmpty){ 33 + onTap: () {
  34 + if (widget.canSelected && table.signStr.isEmpty) {
36 setState(() { 35 setState(() {
37 - table.selected=!(table.selected??false); 36 + table.selected = !(table.selected ?? false);
38 }); 37 });
39 widget.onSelected(table); 38 widget.onSelected(table);
40 } 39 }
@@ -42,44 +41,68 @@ class NeedItemState extends State<NeedItem>{ @@ -42,44 +41,68 @@ class NeedItemState extends State<NeedItem>{
42 child: Stack( 41 child: Stack(
43 children: <Widget>[ 42 children: <Widget>[
44 Container( 43 Container(
45 - width: ScreenUtil().setWidth(190),  
46 - height: ScreenUtil().setWidth(widget.height),  
47 - alignment: Alignment.center,  
48 - margin:EdgeInsets.all( ScreenUtil().setWidth(9)),  
49 - decoration: BoxDecoration(  
50 - color: MyColours.color_a8e2e4,  
51 - borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))  
52 - ),  
53 - child:Column(  
54 - mainAxisSize: MainAxisSize.min,  
55 - crossAxisAlignment: CrossAxisAlignment.center,  
56 - children: <Widget>[  
57 - Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(30),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),  
58 - Offstage(  
59 - offstage: table.maxText.isEmpty?true:false,  
60 - child: Column(  
61 - mainAxisSize: MainAxisSize.min,  
62 - children: <Widget>[  
63 - VEmptyView(5),  
64 - Text(table.maxText,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),  
65 - ], 44 + width: ScreenUtil().setWidth(190),
  45 + height: ScreenUtil().setWidth(widget.height),
  46 + alignment: Alignment.center,
  47 + margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
  48 + decoration: BoxDecoration(
  49 + color: MyColours.color_a8e2e4,
  50 + borderRadius: BorderRadius.all(
  51 + Radius.circular(ScreenUtil().setWidth(8)))),
  52 + child: Column(
  53 + mainAxisSize: MainAxisSize.min,
  54 + crossAxisAlignment: CrossAxisAlignment.center,
  55 + children: <Widget>[
  56 + Text(
  57 + table.name,
  58 + style: TextStyle(
  59 + color: MyColours.color_131313,
  60 + fontSize: ScreenUtil().setSp(30),
  61 + decoration: TextDecoration.none,
  62 + fontWeight: FontWeight.normal),
  63 + overflow: TextOverflow.ellipsis,
66 ), 64 ),
67 - ),  
68 - Offstage(  
69 - offstage: table.lowStr.isEmpty?true:false,  
70 - child: Column(  
71 - mainAxisSize: MainAxisSize.min,  
72 - children: <Widget>[  
73 - VEmptyView(5),  
74 - Text(table.lowStr,style: TextStyle(color: MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,)  
75 - ], 65 + Offstage(
  66 + offstage: table.maxText.isEmpty ? true : false,
  67 + child: Column(
  68 + mainAxisSize: MainAxisSize.min,
  69 + children: <Widget>[
  70 + VEmptyView(5),
  71 + Text(
  72 + table.maxText,
  73 + style: TextStyle(
  74 + color: MyColours.color_777777,
  75 + fontSize: ScreenUtil().setSp(26),
  76 + decoration: TextDecoration.none,
  77 + fontWeight: FontWeight.normal),
  78 + overflow: TextOverflow.ellipsis,
  79 + ),
  80 + ],
  81 + ),
76 ), 82 ),
77 - )  
78 - ],  
79 - )  
80 - ), 83 + Offstage(
  84 + offstage: table.lowStr.isEmpty ? true : false,
  85 + child: Column(
  86 + mainAxisSize: MainAxisSize.min,
  87 + children: <Widget>[
  88 + VEmptyView(5),
  89 + Text(
  90 + table.lowStr,
  91 + textAlign: TextAlign.center,
  92 + style: TextStyle(
  93 + color: MyColours.color_2bb5b7,
  94 + fontSize: ScreenUtil().setSp(24),
  95 + decoration: TextDecoration.none,
  96 + fontWeight: FontWeight.normal),
  97 + overflow: TextOverflow.ellipsis,
  98 + )
  99 + ],
  100 + ),
  101 + )
  102 + ],
  103 + )),
81 ], 104 ],
82 ), 105 ),
83 ); 106 );
84 } 107 }
85 -}  
  108 +}
@@ -16,7 +16,7 @@ class NewTableItem extends StatefulWidget { @@ -16,7 +16,7 @@ class NewTableItem extends StatefulWidget {
16 NewTableItem(this.table, 16 NewTableItem(this.table,
17 {this.onSelected, 17 {this.onSelected,
18 this.canSelected = false, 18 this.canSelected = false,
19 - this.height = 180, 19 + this.height = 185,
20 this.isRegionName = false}); 20 this.isRegionName = false});
21 21
22 @override 22 @override
@@ -47,7 +47,7 @@ class NewTableItemState extends State<NewTableItem> { @@ -47,7 +47,7 @@ class NewTableItemState extends State<NewTableItem> {
47 Container( 47 Container(
48 width: ScreenUtil().setWidth(160), 48 width: ScreenUtil().setWidth(160),
49 height: ScreenUtil().setWidth(widget.height), 49 height: ScreenUtil().setWidth(widget.height),
50 - margin: EdgeInsets.only(left:ScreenUtil().setWidth(40)), 50 + margin: EdgeInsets.only(left: ScreenUtil().setWidth(40)),
51 decoration: BoxDecoration( 51 decoration: BoxDecoration(
52 color: MyColours.color_a8e2e4, 52 color: MyColours.color_a8e2e4,
53 borderRadius: BorderRadius.all( 53 borderRadius: BorderRadius.all(
@@ -84,7 +84,7 @@ class NewTableItemState extends State<NewTableItem> { @@ -84,7 +84,7 @@ class NewTableItemState extends State<NewTableItem> {
84 Container( 84 Container(
85 alignment: Alignment.center, 85 alignment: Alignment.center,
86 padding: EdgeInsets.symmetric( 86 padding: EdgeInsets.symmetric(
87 - horizontal: ScreenUtil().setWidth(24)), 87 + horizontal: ScreenUtil().setWidth(20)),
88 // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)), 88 // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
89 child: Column( 89 child: Column(
90 mainAxisSize: MainAxisSize.min, 90 mainAxisSize: MainAxisSize.min,
@@ -92,17 +92,39 @@ class NewTableItemState extends State<NewTableItem> { @@ -92,17 +92,39 @@ class NewTableItemState extends State<NewTableItem> {
92 mainAxisAlignment: MainAxisAlignment.center, 92 mainAxisAlignment: MainAxisAlignment.center,
93 children: <Widget>[ 93 children: <Widget>[
94 VEmptyView(38), 94 VEmptyView(38),
95 - Text(  
96 - table.name,  
97 - maxLines: 2,  
98 - style: TextStyle(  
99 - color: MyColours.color_353535,  
100 - fontSize: ScreenUtil().setSp(28),  
101 - decoration: TextDecoration.none,  
102 - fontWeight: FontWeight.normal),  
103 - overflow: TextOverflow.ellipsis,  
104 - ),  
105 - VEmptyView(12), 95 + Container(
  96 + alignment: Alignment.center,
  97 + child: Transform.translate(
  98 + offset:
  99 + Offset(0, 1 / 2), //1为 StrutStyle 的 leading的值
  100 + child: Text(
  101 + table.name,
  102 + maxLines: 2,
  103 + style: TextStyle(
  104 + color: MyColours.color_353535,
  105 + fontSize: ScreenUtil().setSp(28),
  106 + decoration: TextDecoration.none,
  107 + fontWeight: FontWeight.normal),
  108 + overflow: TextOverflow.ellipsis,
  109 + strutStyle: StrutStyle(
  110 + forceStrutHeight: true,
  111 + height: 1,
  112 + leading: 0.2),
  113 + ),
  114 + )
  115 +
  116 + ),
  117 + // Text(
  118 + // table.name,
  119 + // maxLines: 2,
  120 + // style: TextStyle(
  121 + // color: MyColours.color_353535,
  122 + // fontSize: ScreenUtil().setSp(28),
  123 + // decoration: TextDecoration.none,
  124 + // fontWeight: FontWeight.normal),
  125 + // overflow: TextOverflow.ellipsis,
  126 + // ),
  127 + VEmptyView(8),
106 Text( 128 Text(
107 (table.reserver == null || table.reserver.isEmpty) 129 (table.reserver == null || table.reserver.isEmpty)
108 ? '${table.tablePnum}人' 130 ? '${table.tablePnum}人'
@@ -19,7 +19,7 @@ class TableItem extends StatefulWidget { @@ -19,7 +19,7 @@ class TableItem extends StatefulWidget {
19 TableItem(this.table, 19 TableItem(this.table,
20 {this.onSelected, 20 {this.onSelected,
21 this.canSelected = false, 21 this.canSelected = false,
22 - this.height = 180, 22 + this.height = 185,
23 this.canChoose = false, 23 this.canChoose = false,
24 this.rid, 24 this.rid,
25 this.tableMap}); 25 this.tableMap});
@@ -118,7 +118,7 @@ class TableItemState extends State<TableItem> { @@ -118,7 +118,7 @@ class TableItemState extends State<TableItem> {
118 Container( 118 Container(
119 alignment: Alignment.center, 119 alignment: Alignment.center,
120 padding: EdgeInsets.symmetric( 120 padding: EdgeInsets.symmetric(
121 - horizontal: ScreenUtil().setWidth(24)), 121 + horizontal: ScreenUtil().setWidth(20)),
122 // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)), 122 // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
123 child: Column( 123 child: Column(
124 mainAxisSize: MainAxisSize.min, 124 mainAxisSize: MainAxisSize.min,
@@ -126,19 +126,43 @@ class TableItemState extends State<TableItem> { @@ -126,19 +126,43 @@ class TableItemState extends State<TableItem> {
126 mainAxisAlignment: MainAxisAlignment.center, 126 mainAxisAlignment: MainAxisAlignment.center,
127 children: <Widget>[ 127 children: <Widget>[
128 VEmptyView(38), 128 VEmptyView(38),
129 - Text(  
130 - table.name,  
131 - maxLines: 2,  
132 - style: TextStyle(  
133 - color: table.signStr == '已停用'  
134 - ? MyColours.color_999999  
135 - : MyColours.color_353535,  
136 - fontSize: ScreenUtil().setSp(28),  
137 - decoration: TextDecoration.none,  
138 - fontWeight: FontWeight.normal),  
139 - overflow: TextOverflow.ellipsis,  
140 - ),  
141 - VEmptyView(12), 129 + Container(
  130 + alignment: Alignment.center,
  131 + child: Transform.translate(
  132 + offset:
  133 + Offset(0, 1 / 2), //1为 StrutStyle 的 leading的值
  134 + child: Text(
  135 + table.name,
  136 + maxLines: 2,
  137 + style: TextStyle(
  138 + color: table.signStr == '已停用'
  139 + ? MyColours.color_999999
  140 + : MyColours.color_353535,
  141 + fontSize: ScreenUtil().setSp(28),
  142 + decoration: TextDecoration.none,
  143 + fontWeight: FontWeight.normal),
  144 + overflow: TextOverflow.ellipsis,
  145 + strutStyle: StrutStyle(
  146 + forceStrutHeight: true,
  147 + height: 1,
  148 + leading: 0.2),
  149 + ),
  150 + )
  151 + // Text(
  152 + // table.name,
  153 + // // textAlign: TextAlign.center,
  154 + // maxLines: 2,
  155 + // style: TextStyle(
  156 + // color: table.signStr == '已停用'
  157 + // ? MyColours.color_999999
  158 + // : MyColours.color_353535,
  159 + // fontSize: ScreenUtil().setSp(28),
  160 + // decoration: TextDecoration.none,
  161 + // fontWeight: FontWeight.normal),
  162 + // overflow: TextOverflow.ellipsis,
  163 + // ),
  164 + ),
  165 + VEmptyView(6),
142 Text( 166 Text(
143 (table.reserver == null || table.reserver.isEmpty) 167 (table.reserver == null || table.reserver.isEmpty)
144 ? table.tableNum 168 ? table.tableNum