Commit 1f2b73d823f4a074bb448b5bcdb1507b7a039163

Authored by gaiyaguang
2 parents a139ce4f 15e3d534

2020-10-30

@@ -28,8 +28,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -28,8 +28,7 @@ class NotebookItemState extends State<NoteBookItem> {
28 widget.notebook.tableinfoStr, 28 widget.notebook.tableinfoStr,
29 widget.notebook.ddate, 29 widget.notebook.ddate,
30 widget.notebook.ddateStr, 30 widget.notebook.ddateStr,
31 - widget.notebook.phone  
32 - ); 31 + widget.notebook.phone);
33 } 32 }
34 } 33 }
35 34
@@ -46,7 +45,7 @@ class NotebookItemState extends State<NoteBookItem> { @@ -46,7 +45,7 @@ class NotebookItemState extends State<NoteBookItem> {
46 45
47 return Container( 46 return Container(
48 width: double.infinity, 47 width: double.infinity,
49 - height: ScreenUtil().setWidth(120), 48 + // height: ScreenUtil().setWidth(120),
50 color: (widget.index % 2 == 0) 49 color: (widget.index % 2 == 0)
51 ? MyColours.color_f7fdfd 50 ? MyColours.color_f7fdfd
52 : MyColours.color_ffffff, 51 : MyColours.color_ffffff,
@@ -62,11 +61,12 @@ class NotebookItemState extends State<NoteBookItem> { @@ -62,11 +61,12 @@ class NotebookItemState extends State<NoteBookItem> {
62 Container( 61 Container(
63 width: ScreenUtil().setWidth(171), 62 width: ScreenUtil().setWidth(171),
64 padding: EdgeInsets.symmetric( 63 padding: EdgeInsets.symmetric(
65 - horizontal: ScreenUtil().setWidth(24)), 64 + horizontal: ScreenUtil().setWidth(24),
  65 + vertical: ScreenUtil().setWidth(20)),
66 alignment: Alignment.center, 66 alignment: Alignment.center,
67 child: Text( 67 child: Text(
68 notebook.tableinfoStr?.trim(), 68 notebook.tableinfoStr?.trim(),
69 - maxLines: 3, 69 + maxLines: 30,
70 overflow: TextOverflow.ellipsis, 70 overflow: TextOverflow.ellipsis,
71 style: TextStyle( 71 style: TextStyle(
72 color: textColor, 72 color: textColor,
@@ -431,12 +431,12 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -431,12 +431,12 @@ class NoteBookPageState extends State<NoteBookPage> {
431 return EasyRefresh.custom( 431 return EasyRefresh.custom(
432 controller: _controller, 432 controller: _controller,
433 slivers: [ 433 slivers: [
434 - SliverFixedExtentList( 434 + SliverList(
435 delegate: SliverChildBuilderDelegate( 435 delegate: SliverChildBuilderDelegate(
436 (BuildContext context, int index) { 436 (BuildContext context, int index) {
437 return NoteBookItem(model.notebooks[index], index); 437 return NoteBookItem(model.notebooks[index], index);
438 }, childCount: model.notebooks.length), 438 }, childCount: model.notebooks.length),
439 - itemExtent: ScreenUtil().setWidth(112), 439 + // itemExtent: ScreenUtil().setWidth(112),
440 ) 440 )
441 ], 441 ],
442 onRefresh: () async { 442 onRefresh: () async {
@@ -199,7 +199,7 @@ class DialogUtil { @@ -199,7 +199,7 @@ class DialogUtil {
199 TableCalendar( 199 TableCalendar(
200 calendarController: _calendarController, 200 calendarController: _calendarController,
201 initialSelectedDay: selectDateTime, 201 initialSelectedDay: selectDateTime,
202 - onDaySelected: (day, events,holidays) { 202 + onDaySelected: (day, events) {
203 Navigator.of(dialogContext).pop(day); 203 Navigator.of(dialogContext).pop(day);
204 }, 204 },
205 availableGestures: AvailableGestures.none, 205 availableGestures: AvailableGestures.none,
@@ -527,7 +527,8 @@ class DialogUtil { @@ -527,7 +527,8 @@ class DialogUtil {
527 } 527 }
528 528
529 //显示桌位管理弹框 529 //显示桌位管理弹框
530 - static Future<int> showTableManagerDialog(BuildContext context,t.Table table) { 530 + static Future<int> showTableManagerDialog(
  531 + BuildContext context, t.Table table) {
531 return showModalBottomSheet( 532 return showModalBottomSheet(
532 context: context, 533 context: context,
533 builder: (context) { 534 builder: (context) {
@@ -540,43 +541,60 @@ class DialogUtil { @@ -540,43 +541,60 @@ class DialogUtil {
540 Container( 541 Container(
541 width: double.infinity, 542 width: double.infinity,
542 alignment: Alignment.center, 543 alignment: Alignment.center,
543 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),  
544 - child: Text("${table.name}",style: TextStyle(fontSize: ScreenUtil().setSp(30),color: MyColours.color_999999),), 544 + padding:
  545 + EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),
  546 + child: Text(
  547 + "${table.name}",
  548 + style: TextStyle(
  549 + fontSize: ScreenUtil().setSp(30),
  550 + color: MyColours.color_999999),
  551 + ),
545 ), 552 ),
546 Offstage( 553 Offstage(
547 - offstage: table.enable=="0", 554 + offstage: table.enable == "0",
548 child: Column( 555 child: Column(
549 mainAxisSize: MainAxisSize.min, 556 mainAxisSize: MainAxisSize.min,
550 children: [ 557 children: [
551 Offstage( 558 Offstage(
552 - offstage: !(table.signStr=="已预订"||table.signStr=="用餐中"),  
553 - child: GestureDetector(  
554 - behavior: HitTestBehavior.opaque,  
555 - onTap: (){  
556 - Navigator.of(context).pop(1);  
557 - },  
558 - child: Container(  
559 - width: double.infinity,  
560 - alignment: Alignment.center,  
561 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),  
562 - child: Text("查看详情",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),  
563 - ),  
564 - )  
565 - ), 559 + offstage: !(table.signStr == "已预订" ||
  560 + table.signStr == "用餐中"),
  561 + child: GestureDetector(
  562 + behavior: HitTestBehavior.opaque,
  563 + onTap: () {
  564 + Navigator.of(context).pop(1);
  565 + },
  566 + child: Container(
  567 + width: double.infinity,
  568 + alignment: Alignment.center,
  569 + padding: EdgeInsets.symmetric(
  570 + vertical: ScreenUtil().setWidth(40)),
  571 + child: Text(
  572 + "查看详情",
  573 + style: TextStyle(
  574 + fontSize: ScreenUtil().setSp(34),
  575 + color: MyColours.color_353535),
  576 + ),
  577 + ),
  578 + )),
566 Offstage( 579 Offstage(
567 - offstage: table.signStr!="", 580 + offstage: table.signStr != "",
568 child: GestureDetector( 581 child: GestureDetector(
569 - behavior: HitTestBehavior.opaque,  
570 - onTap: (){  
571 - Navigator.of(context).pop(2);  
572 - },  
573 - child: Container(  
574 - width: double.infinity,  
575 - alignment: Alignment.center,  
576 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),  
577 - child: Text("订座",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),  
578 - )  
579 - ), 582 + behavior: HitTestBehavior.opaque,
  583 + onTap: () {
  584 + Navigator.of(context).pop(2);
  585 + },
  586 + child: Container(
  587 + width: double.infinity,
  588 + alignment: Alignment.center,
  589 + padding: EdgeInsets.symmetric(
  590 + vertical: ScreenUtil().setWidth(40)),
  591 + child: Text(
  592 + "订座",
  593 + style: TextStyle(
  594 + fontSize: ScreenUtil().setSp(34),
  595 + color: MyColours.color_353535),
  596 + ),
  597 + )),
580 ), 598 ),
581 Container( 599 Container(
582 width: double.infinity, 600 width: double.infinity,
@@ -588,16 +606,21 @@ class DialogUtil { @@ -588,16 +606,21 @@ class DialogUtil {
588 ), 606 ),
589 GestureDetector( 607 GestureDetector(
590 behavior: HitTestBehavior.opaque, 608 behavior: HitTestBehavior.opaque,
591 - onTap: (){ 609 + onTap: () {
592 Navigator.of(context).pop(3); 610 Navigator.of(context).pop(3);
593 }, 611 },
594 child: Container( 612 child: Container(
595 width: double.infinity, 613 width: double.infinity,
596 alignment: Alignment.center, 614 alignment: Alignment.center,
597 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),  
598 - child: Text("${table.enable=='1'?'停用桌位':'启用桌位'}",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),  
599 - )  
600 - ), 615 + padding: EdgeInsets.symmetric(
  616 + vertical: ScreenUtil().setWidth(40)),
  617 + child: Text(
  618 + "${table.enable == '1' ? '停用桌位' : '启用桌位'}",
  619 + style: TextStyle(
  620 + fontSize: ScreenUtil().setSp(34),
  621 + color: MyColours.color_353535),
  622 + ),
  623 + )),
601 Container( 624 Container(
602 width: double.infinity, 625 width: double.infinity,
603 height: ScreenUtil().setWidth(10), 626 height: ScreenUtil().setWidth(10),
@@ -605,16 +628,21 @@ class DialogUtil { @@ -605,16 +628,21 @@ class DialogUtil {
605 ), 628 ),
606 GestureDetector( 629 GestureDetector(
607 behavior: HitTestBehavior.opaque, 630 behavior: HitTestBehavior.opaque,
608 - onTap: (){ 631 + onTap: () {
609 Navigator.of(context).pop(); 632 Navigator.of(context).pop();
610 }, 633 },
611 child: Container( 634 child: Container(
612 width: double.infinity, 635 width: double.infinity,
613 alignment: Alignment.center, 636 alignment: Alignment.center,
614 - padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),  
615 - child: Text("取消",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),  
616 - )  
617 - ), 637 + padding: EdgeInsets.symmetric(
  638 + vertical: ScreenUtil().setWidth(40)),
  639 + child: Text(
  640 + "取消",
  641 + style: TextStyle(
  642 + fontSize: ScreenUtil().setSp(34),
  643 + color: MyColours.color_353535),
  644 + ),
  645 + )),
618 ], 646 ],
619 ), 647 ),
620 ); 648 );