|
@@ -878,22 +878,35 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -878,22 +878,35 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
878
|
context, table.notebookId, data.reserveList.uid);
|
878
|
context, table.notebookId, data.reserveList.uid);
|
|
879
|
}
|
879
|
}
|
|
880
|
} else {
|
880
|
} else {
|
|
881
|
- setState(() {
|
|
|
|
882
|
- if (table.selected) {
|
|
|
|
883
|
- tableManagerModel.selectTablesOrReserve.add(table);
|
|
|
|
884
|
- } else {
|
|
|
|
885
|
- tableManagerModel.selectTablesOrReserve
|
|
|
|
886
|
- .removeWhere((t) => t.id == table.id);
|
|
|
|
887
|
- }
|
|
|
|
888
|
- if (tableManagerModel.selectTablesOrReserve.length == 0) {
|
|
|
|
889
|
- // wechatNotification = true;
|
|
|
|
890
|
- _clearData();
|
|
|
|
891
|
- }
|
|
|
|
892
|
- // if (tableManagerModel.selectTables.length > 1) {
|
|
|
|
893
|
- // _scrollCrl.position
|
|
|
|
894
|
- // .didUpdateScrollPositionBy(0); //这里触发更新滚动条
|
|
|
|
895
|
- // }
|
|
|
|
896
|
- });
|
881
|
+ if (table.selected) {
|
|
|
|
882
|
+ tableManagerModel.selectTablesOrReserve.add(table);
|
|
|
|
883
|
+ tableManagerModel.tablesOrReserveDataShow.forEach((element) {
|
|
|
|
884
|
+ element.tableList.forEach((element1) {
|
|
|
|
885
|
+ if (element1.id == table.id) {
|
|
|
|
886
|
+ element1.selected = true;
|
|
|
|
887
|
+ }
|
|
|
|
888
|
+ });
|
|
|
|
889
|
+ });
|
|
|
|
890
|
+ } else {
|
|
|
|
891
|
+ tableManagerModel.selectTablesOrReserve
|
|
|
|
892
|
+ .removeWhere((t) => t.id == table.id);
|
|
|
|
893
|
+ tableManagerModel.tablesOrReserveDataShow.forEach((element) {
|
|
|
|
894
|
+ element.tableList.forEach((element1) {
|
|
|
|
895
|
+ if (element1.id == table.id) {
|
|
|
|
896
|
+ element1.selected = false;
|
|
|
|
897
|
+ }
|
|
|
|
898
|
+ });
|
|
|
|
899
|
+ });
|
|
|
|
900
|
+ }
|
|
|
|
901
|
+ if (tableManagerModel.selectTablesOrReserve.length == 0) {
|
|
|
|
902
|
+ // wechatNotification = true;
|
|
|
|
903
|
+ _clearData();
|
|
|
|
904
|
+ }
|
|
|
|
905
|
+ // if (tableManagerModel.selectTables.length > 1) {
|
|
|
|
906
|
+ // _scrollCrl.position
|
|
|
|
907
|
+ // .didUpdateScrollPositionBy(0); //这里触发更新滚动条
|
|
|
|
908
|
+ // }
|
|
|
|
909
|
+ setState(() {});
|
|
897
|
}
|
910
|
}
|
|
898
|
// DialogUtil.showTableManagerDialog(context, table).then((value) {
|
911
|
// DialogUtil.showTableManagerDialog(context, table).then((value) {
|
|
899
|
// if (value != null) {
|
912
|
// if (value != null) {
|
|
@@ -2616,10 +2629,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2616,10 +2629,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2616
|
element.tableList.forEach((elementn) {
|
2629
|
element.tableList.forEach((elementn) {
|
|
2617
|
if (elementn.id == table.id) {
|
2630
|
if (elementn.id == table.id) {
|
|
2618
|
elementn.selected = false;
|
2631
|
elementn.selected = false;
|
|
2619
|
- setState(() {});
|
|
|
|
2620
|
}
|
2632
|
}
|
|
2621
|
});
|
2633
|
});
|
|
2622
|
});
|
2634
|
});
|
|
|
|
2635
|
+ setState(() {});
|
|
2623
|
|
2636
|
|
|
2624
|
// for (t.Table item
|
2637
|
// for (t.Table item
|
|
2625
|
// in tableManagerModel.tablesShow) {
|
2638
|
// in tableManagerModel.tablesShow) {
|
|
@@ -2674,7 +2687,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2674,7 +2687,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2674
|
radius: ScreenUtil().setWidth(8),
|
2687
|
radius: ScreenUtil().setWidth(8),
|
|
2675
|
isBold: false,
|
2688
|
isBold: false,
|
|
2676
|
onPressed: () async {
|
2689
|
onPressed: () async {
|
|
2677
|
- if(currTimeIndex == null){
|
2690
|
+ if (currTimeIndex == null) {
|
|
2678
|
Utils.showToast('请选择餐段或检查您的网络!');
|
2691
|
Utils.showToast('请选择餐段或检查您的网络!');
|
|
2679
|
return;
|
2692
|
return;
|
|
2680
|
}
|
2693
|
}
|
|
@@ -2728,10 +2741,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2728,10 +2741,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2728
|
radius: ScreenUtil().setWidth(8),
|
2741
|
radius: ScreenUtil().setWidth(8),
|
|
2729
|
isBold: false,
|
2742
|
isBold: false,
|
|
2730
|
onPressed: () async {
|
2743
|
onPressed: () async {
|
|
2731
|
- if(currTimeIndex == null){
|
|
|
|
2732
|
- Utils.showToast('请选择餐段或检查您的网络!');
|
|
|
|
2733
|
- return;
|
|
|
|
2734
|
- }
|
2744
|
+ if (currTimeIndex == null) {
|
|
|
|
2745
|
+ Utils.showToast('请选择餐段或检查您的网络!');
|
|
|
|
2746
|
+ return;
|
|
|
|
2747
|
+ }
|
|
2735
|
Loading.showLoading(
|
2748
|
Loading.showLoading(
|
|
2736
|
context,
|
2749
|
context,
|
|
2737
|
);
|
2750
|
);
|
|
@@ -3526,7 +3539,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -3526,7 +3539,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
3526
|
}
|
3539
|
}
|
|
3527
|
*/
|
3540
|
*/
|
|
3528
|
Guest guest = Guest(null, null, null, null, null, null, null, null, null,
|
3541
|
Guest guest = Guest(null, null, null, null, null, null, null, null, null,
|
|
3529
|
- null, null, null, null, null, null, null, null, null,null);
|
3542
|
+ null, null, null, null, null, null, null, null, null, null);
|
|
3530
|
// if (widget.guest == null) {
|
3543
|
// if (widget.guest == null) {
|
|
3531
|
|
3544
|
|
|
3532
|
guest.phone =
|
3545
|
guest.phone =
|
|
@@ -4251,7 +4264,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -4251,7 +4264,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
4251
|
},
|
4264
|
},
|
|
4252
|
)),
|
4265
|
)),
|
|
4253
|
InkWell(
|
4266
|
InkWell(
|
|
4254
|
- onTap: () {
|
4267
|
+ onTap: () async {
|
|
4255
|
setState(() {
|
4268
|
setState(() {
|
|
4256
|
swichState = !swichState;
|
4269
|
swichState = !swichState;
|
|
4257
|
});
|
4270
|
});
|
|
@@ -4289,11 +4302,27 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -4289,11 +4302,27 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
4289
|
});
|
4302
|
});
|
|
4290
|
setState(() {});
|
4303
|
setState(() {});
|
|
4291
|
} else {
|
4304
|
} else {
|
|
4292
|
- tableManagerModel.getTableListOrReserve(
|
|
|
|
4293
|
- context,
|
|
|
|
4294
|
- currTimeIndex,
|
|
|
|
4295
|
- dateTime,
|
|
|
|
4296
|
- selectNumber);
|
4305
|
+
|
|
|
|
4306
|
+ await tableManagerModel
|
|
|
|
4307
|
+ .getTableListOrReserve(
|
|
|
|
4308
|
+ context,
|
|
|
|
4309
|
+ currTimeIndex,
|
|
|
|
4310
|
+ dateTime,
|
|
|
|
4311
|
+ selectNumber);
|
|
|
|
4312
|
+ tableManagerModel.selectTablesOrReserve
|
|
|
|
4313
|
+ .forEach((element1) {
|
|
|
|
4314
|
+ tableManagerModel
|
|
|
|
4315
|
+ .tablesOrReserveDataShow
|
|
|
|
4316
|
+ .forEach((element) {
|
|
|
|
4317
|
+ element.tableList
|
|
|
|
4318
|
+ .forEach((elementn) {
|
|
|
|
4319
|
+ if (elementn.id == element1.id) {
|
|
|
|
4320
|
+ elementn.selected = true;
|
|
|
|
4321
|
+ }
|
|
|
|
4322
|
+ });
|
|
|
|
4323
|
+ });
|
|
|
|
4324
|
+ });
|
|
|
|
4325
|
+ setState(() {});
|
|
4297
|
// model.tablesOrReserveDataShow = [];
|
4326
|
// model.tablesOrReserveDataShow = [];
|
|
4298
|
// model.tablesOrReserveData
|
4327
|
// model.tablesOrReserveData
|
|
4299
|
// .forEach((element) {
|
4328
|
// .forEach((element) {
|