|
@@ -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
|
);
|