navigator_util.dart
39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:one_key/constant/state.dart';
import 'package:one_key/models/check_seller_acc_model.dart';
import 'package:one_key/models/cookbook_model.dart';
import 'package:one_key/models/coupon_model.dart';
import 'package:one_key/models/customer_by_seller_model.dart';
import 'package:one_key/models/customer_list_model.dart';
import 'package:one_key/models/guest_info_model.dart';
import 'package:one_key/models/integral_model.dart';
import 'package:one_key/models/marketing_by_id_model.dart';
import 'package:one_key/models/marketing_by_uid_model.dart';
import 'package:one_key/models/notebook.dart';
import 'package:one_key/models/notebook_detail.dart';
import 'package:one_key/models/personnel_manage_model.dart';
import 'package:one_key/models/sms_info.dart';
import 'package:one_key/models/statics_model.dart';
import 'package:one_key/models/table_list.dart';
import 'package:one_key/models/user_history_entity.dart';
import 'package:one_key/provider/customer_provider.dart';
import 'package:one_key/provider/my_table_manage_home_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/routes.dart';
import 'package:one_key/utils/fluro_convert_utils.dart';
import 'package:one_key/utils/utils.dart';
import 'package:sqflite/sqlite_api.dart';
import '../app.dart';
import '../models/get_banquet_by_id_new_model.dart';
import '../models/get_banquet_deposit_model.dart';
import '../models/otherset_model.dart';
import '../models/set_xuan_tai_model.dart';
import '../models/wine_model.dart';
class NavigatorUtil {
static Future _navigateTo(BuildContext context, String path,
{bool replace = false,
bool clearStack = false,
TransitionType transitionType = TransitionType.material,
Duration transitionDuration = const Duration(milliseconds: 250),
RouteTransitionsBuilder transitionBuilder}) {
Utils.changeStatusColor(color: MyColours.color_ffffff);
return App.router.navigateTo(context, path,
replace: replace,
clearStack: clearStack,
transitionDuration: transitionDuration,
transitionBuilder: transitionBuilder,
transition: transitionType);
}
/// 登录页
static void goLoginPage(BuildContext context) {
_navigateTo(context, Routes.login, clearStack: true);
}
/// 账号登录页
static void goAccountLoginPage(BuildContext context) {
_navigateTo(context, Routes.account_login_page);
}
/// 首页
static void goHomePage(BuildContext context,
{int initialIndex = 1,
needRefresh = true,
mine = false,
int dateTime,
String solt}) {
// if (dateTime == null) {
// _navigateTo(context,
// "${Routes.home}?initialIndex=$initialIndex&needRefresh=$needRefresh&mine=$mine&dateTime=&solt=$solt",
// clearStack: true);
// } else {
_navigateTo(context,
"${Routes.home}?initialIndex=$initialIndex&needRefresh=$needRefresh&mine=$mine&dateTime=$dateTime&solt=$solt",
clearStack: true);
// }
}
/// 订单详情
static void goNotebookDetailPage(BuildContext context, String rid, String uid,
{String mid = "", bool fromNotify = false, replace = false}) {
_navigateTo(context,
"${Routes.reserve_detail}?rid=$rid&mid=$mid&uid=$uid&fromNotify=$fromNotify",
replace: replace);
}
/// 处理在线预订
static Future goHandleOnlinePage(BuildContext context, String rid, String mid,
{fromNotify = false, replace = false}) {
return _navigateTo(context,
"${Routes.handle_online_page}?rid=$rid&mid=$mid&fromNotify=$fromNotify",
replace: replace);
}
/// 选择桌位
static Future goSelectTablePage(
BuildContext context, String rid, int dateTime, String ddate_slot,
{bool canChoose = false,
Map object,
String fromPage = 'change',
String tid = ''}) {
if (object != null) {
return _navigateTo(context,
"${Routes.select_table}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");
}
// object = {'object': [], "tid": ''};
return _navigateTo(context,
"${Routes.select_table}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose");
}
/// 选择桌位-照片管理
static Future goPhotoManagerSelectTablePage(
BuildContext context, String rid, int dateTime, String ddate_slot,
{bool canChoose = false,
Map object,
String fromPage = 'change',
String tid = ''}) {
if (object != null) {
return _navigateTo(context,
"${Routes.photo_manager_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");
}
// object = {'object': [], "tid": ''};
return _navigateTo(context,
"${Routes.photo_manager_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose");
}
/// 选择桌位——方硕新修改的选择桌位页面
static Future goSelectTableFPage(
BuildContext context, String rid, int dateTime, String ddate_slot,
{bool canChoose = false,
Map object,
String fromPage = 'change',
String tid = ''}) {
if (object != null) {
return _navigateTo(context,
"${Routes.select_table_f}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");
}
// object = {'object': [], "tid": ''};
return _navigateTo(context,
"${Routes.select_table_f}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose");
}
/// 邀请函
static void goInvicationPage(BuildContext context, String rid,
{bool replace = false}) {
_navigateTo(context, "${Routes.invication}?rid=$rid", replace: replace);
}
/// 发短信
static void goSmsPage(BuildContext context, String rid) {
_navigateTo(context, "${Routes.sms}?rid=$rid");
}
/// 浏览器
static void goWebviewPage(BuildContext context) {
_navigateTo(context, "${Routes.webview}");
}
///协议
static Future<dynamic> goWebPage(
BuildContext context, String title, String url,
{bool need = false}) {
return _navigateTo(
context,
"${Routes.web_page}?title=${Uri.encodeComponent(title)}&url=$url&need=${need}",
);
}
// /// 变更预订
// static void goNoteBookChangePage(
// BuildContext context, NotebookDetail detailEntity, String rid,
// {replace = false}) {
// if (detailEntity.type == "0") {
// //内部预订
// detailEntity.is_set_ddate = "1";
// }
// _navigateTo(context,
// "${Routes.change_detail}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid",
// replace: replace);
// }
/// 变更预订——方硕新修改页面
static void goNoteBookChangeFPage(
BuildContext context,
NotebookDetail detailEntity,
String rid, {
replace = false,
bool back = false,
}) {
if (detailEntity.type == "0") {
//内部预订
detailEntity.is_set_ddate = "1";
}
_navigateTo(context,
"${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid&back=${back}",
replace: replace);
}
/// 可订时段管理
static void goBookTimeSetPage(BuildContext context) {
_navigateTo(context, "${Routes.book_time_set}");
}
/// 可订时段管理
static void goReceiveOrdersTimeSetPage(BuildContext context) {
_navigateTo(context, "${Routes.receive_orders_time_set}");
}
/// 常用备注管理
static void goRemarkManagerPage(BuildContext context) {
_navigateTo(context, "${Routes.remark_manager}");
}
/// 已选菜品
static void goHasOrderFoodPage(BuildContext context,
{String rid, fromNotify = false, replace = false}) {
_navigateTo(
context, "${Routes.has_order_food}?rid=${rid}&fromNotify=${fromNotify}",
replace: replace);
}
/// 提前买单编辑页面
static Future goOnlineCheckEditPage(BuildContext context,
{String rid, String mid, fromNotify = false, replace = false}) {
return _navigateTo(context,
"${Routes.online_check_edit}?fromNotify=${fromNotify}&rid=${rid}&mid=$mid",
replace: replace);
}
/// 提前买单查看页面
static void goOnlineCheckDetailPage(BuildContext context,
{String rid, fromNotify = false, replace = false}) {
_navigateTo(context,
"${Routes.online_check_detail}?fromNotify=${fromNotify}&rid=${rid}",
replace: replace);
}
/// 发票详情
static void goInvoiceDetailPage(BuildContext context,
{String rid, fromNotify = false, replace = false}) {
_navigateTo(
context, "${Routes.invoice_detail}?fromNotify=${fromNotify}&rid=${rid}",
replace: replace);
}
/// 优惠券列表
static void goCouponPage(BuildContext context,
{replace = false, needRefrsh = false}) {
_navigateTo(context, "${Routes.coupon}?needRefrsh=${needRefrsh}",
replace: replace);
}
/// 优惠券历史列表
static void goCouponHistoryPage(BuildContext context, {replace = false}) {
_navigateTo(context, "${Routes.coupon_history}", replace: replace);
}
/// 创建优惠券
static Future<dynamic> goCouponEditPage(BuildContext context,
{replace = false, bool isMine = true}) {
return _navigateTo(context, "${Routes.coupon_edit}?isMine=${isMine}",
replace: replace);
}
/// 选择优惠券
static Future<dynamic> goCouponSelectPage(BuildContext context,
{String from, bool hasModify, replace = false}) {
return _navigateTo(
context, "${Routes.coupon_select}?from=${from}&hasModify=${hasModify}",
replace: replace);
}
/// 优惠券详情页
static Future<dynamic> goCouponDetailPage(
BuildContext context, CouponSunModel couponSunModel,
{replace = false}) {
return _navigateTo(context,
"${Routes.coupon_detail}?couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}",
replace: replace);
}
/// 个人资料页面
static Future<dynamic> goBaseInfoPage(BuildContext context, FromPage fromPage,
{replace = false, CheckSellerAccSunModel sunModel}) {
if (sunModel != null) {
return _navigateTo(context,
"${Routes.base_info}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&sunModel=${FluroConvertUtils.object2string(sunModel)}",
replace: replace);
} else {
return _navigateTo(context,
"${Routes.base_info}?fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
}
/// 员工管理---个人资料页面
static Future<dynamic> goPersonnalBaseInfoPage(
BuildContext context,
PersonnelManageSunModel sunModel,
String position, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.base_info_personnal_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}&position=${Uri.encodeComponent(position)}",
replace: replace);
}
/// 绑定手机号吗页面
static Future<dynamic> goBindingPhonePage(BuildContext context,
{replace = false, bool wechat = true}) {
return _navigateTo(context, "${Routes.binding_phone}?wechat=${wechat}",
replace: replace);
}
/// 是否新建店铺页面
static Future<dynamic> goIfNeedCreateStorePage(BuildContext context,
{replace = false, bool noStore, bool changeStatus = false}) {
return _navigateTo(context,
"${Routes.if_need_create_store}?noStore=${noStore}&changeStatus=${changeStatus}",
replace: replace);
}
/// 新建店铺页面
static Future<dynamic> goCreateStorePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.create_store}", replace: replace);
}
/// 播放视频页
static Future<dynamic> goPlayVideoPage(BuildContext context,
{replace = false, String urlStr}) {
return _navigateTo(context,
"${Routes.play_video}?urlStr=${FluroConvertUtils.fluroCnParamsEncode(urlStr)}",
replace: replace,
transitionType: TransitionType.materialFullScreenDialog);
}
/// 地图选择页
static Future<dynamic> goMapChoicePointPage(BuildContext context,
{replace = false, String urlStr}) {
return _navigateTo(context, "${Routes.map_choice_point}", replace: replace);
}
/// 店铺名称
static Future<dynamic> goEnterStoreNamePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_name}", replace: replace);
}
/// 店铺地址
static Future<dynamic> goEnterStoreAddressPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_address}",
replace: replace);
}
/// 店铺担任角色
static Future<dynamic> goEnterStorePositionPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_position}",
replace: replace);
}
/// 店铺营业时间
static Future<dynamic> goEnterStoreTimePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_time}", replace: replace);
}
/// 店铺接单电话
static Future<dynamic> goEnterStorePhonePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_phone}",
replace: replace);
}
/// 店铺门头照片
static Future<dynamic> goEnterStoreFrontPhotoPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_front_photo}",
replace: replace);
}
/// 店铺环境
static Future<dynamic> goEnterStoreEnvironmentPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.enter_store_environment}",
replace: replace);
}
/// 新建店铺完成页面
static Future<dynamic> goCompleteStorePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.complete_create_store}",
replace: replace);
}
/// 我的积分页面
static Future<dynamic> goMyIntegralPage(BuildContext context,
{replace = false, IntegralSunModel sunModel}) {
return _navigateTo(context,
"${Routes.my_integral_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}",
replace: replace);
}
/// 我的联系人页面
static Future<dynamic> goMyContantPage(BuildContext context,
{replace = false, IntegralSunModel sunModel}) {
return _navigateTo(context, "${Routes.my_contant_page}", replace: replace);
}
/// 桌位照片管理
static Future<dynamic> goTablePhotoManagerPage(BuildContext context,
{replace = false,
String tid,
String tname,
FromPage fromPage = FromPage.FromPagePhotoManagerPage}) {
return _navigateTo(context,
"${Routes.table_photo_manager}?tid=${tid}&tname=${Uri.encodeComponent(tname)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
/// 统计
static Future<dynamic> goStatisticsPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.statistics_page}", replace: replace);
}
/// 统计发短信
static Future<dynamic> goStatisticsSmsPage(BuildContext context,
{replace = false, Map<String, List> selectData}) {
return _navigateTo(context,
"${Routes.statistics_sms_page}?selectData=${FluroConvertUtils.object2string(selectData)}",
replace: replace);
}
/// 包间类型置满
static Future<dynamic> goStoreTypeFillManagePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.store_type_fill_manage_page}",
replace: replace);
}
/// 短信余额显示
static Future<dynamic> goSmsManagePage(BuildContext context,
{replace = false, SmsInfoData smsInfoData}) {
return _navigateTo(context,
"${Routes.sms_manager_page}?smsInfoData=${FluroConvertUtils.object2string(smsInfoData)}",
replace: replace);
}
/// 短信充值
static Future<dynamic> goSmsRechargePage(BuildContext context,
{replace = false, SmsInfoData smsInfoData}) {
return _navigateTo(context,
"${Routes.sms_recharge_page}?smsInfoData=${FluroConvertUtils.object2string(smsInfoData)}",
replace: replace);
}
/// 店铺信息
static Future<dynamic> goStoreBaseInfoPage(BuildContext context,
{replace = false, SmsInfoData smsInfoData}) {
return _navigateTo(context, "${Routes.store_base_info_page}",
replace: replace);
}
/// 包间类型管理
static Future<dynamic> goRoomTypeManagePage(BuildContext context,
{replace = false, SmsInfoData smsInfoData}) {
return _navigateTo(context, "${Routes.room_type_manage_page}",
replace: replace);
}
/// 包间类型创建
static Future<dynamic> goRoomTypeCreatePage(BuildContext context,
{replace = false,
SmsInfoData smsInfoData,
bool isNew = true,
String tableClassId}) {
return _navigateTo(context,
"${Routes.room_type_create_page}?isnew=${isNew}&tableClassId=${tableClassId}",
replace: replace);
}
///包间管理中 ------ 选择桌位
static Future goRoomTypeSelectTablePage(
BuildContext context, String rid, int dateTime, String ddate_slot,
{bool canChoose = false,
String object,
String oldobject,
String fromPage = 'change',
String tid = ''}) {
if (object != null) {
return _navigateTo(context,
"${Routes.room_type_select_table_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&object=${object}&oldobject=${oldobject}");
}
// object = {'object': [], "tid": ''};
return _navigateTo(context,
"${Routes.room_type_select_table_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose");
}
/// 菜单管理
static Future<dynamic> goMenuManagePage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.menu_manage_page}", replace: replace);
}
/// 菜单分类管理
static Future<dynamic> goMenuCategoryPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.menu_category_page}",
replace: replace);
}
/// 添加菜品页面
static Future<dynamic> goMenuAddDishesPage(BuildContext context,
{replace = false, bool isNew = true, String idstr}) {
return _navigateTo(
context, "${Routes.menu_add_dishes_page}?isNew=$isNew&idstr=${idstr}",
replace: replace);
}
/// 员工管理页面
static Future<dynamic> goPersonnelManagePage(BuildContext context,
{replace = false, bool isNew = true, String idstr}) {
return _navigateTo(context, "${Routes.personnel_manage_page}",
replace: replace);
}
/// 员工管理页面
static Future<dynamic> goPersonnelDetailPage(BuildContext context,
{replace = false, int index, String position}) {
return _navigateTo(context,
"${Routes.personnel_detail_page}?index=$index&position=${Uri.encodeComponent(position)}",
replace: replace);
}
/// 密码展示页
static Future<dynamic> goPersonnelPasswordPage(BuildContext context,
{replace = false, String idstr, String account}) {
return _navigateTo(context,
"${Routes.personnel_password_page}?account=$account&idstr=${idstr}",
replace: replace);
}
/// 密码修改页
static Future<dynamic> goPersonnelPasswordEditPage(
BuildContext context, {
replace = false,
String idstr,
}) {
return _navigateTo(
context, "${Routes.personnel_password_edit_page}?idstr=${idstr}",
replace: replace);
}
/// 填写预订联系人页面
static Future<dynamic> goEditReserverPage(
BuildContext context, String rid, String name, String sex,
{replace = false, bool needBtn = false}) {
return _navigateTo(context,
"${Routes.edit_reserver_page}?rid=${rid}&needBtn=$needBtn&name=${Uri.encodeComponent(name)}&sex=$sex",
replace: replace);
}
/// 全店客情页面
static Future<dynamic> goStoreCustomerPage(BuildContext context,
{replace = false, bool needBtn = false}) {
return _navigateTo(context, "${Routes.store_customer_page}",
replace: replace);
}
/// 我的客情页面
static Future<dynamic> goMyCustomerPage(BuildContext context,
{replace = false, bool needBtn = false}) {
return _navigateTo(context, "${Routes.my_customer_page}", replace: replace);
}
/// 客情列表
static Future<dynamic> goCustomerListPage(
BuildContext context, FromPage fromPage, String uid,
{replace = false, bool needBtn = false, String index = '0'}) {
return _navigateTo(context,
"${Routes.customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=$index&uid=$uid",
replace: replace);
}
/// 仅展示客情列表 --- 商家
static Future<dynamic> goShowCustomerListPage(
BuildContext context, FromPage fromPage, String gid,
{replace = false, bool needBtn = false}) {
return _navigateTo(context,
"${Routes.show_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&gid=$gid",
replace: replace);
}
/// 仅展示客情列表 --- 我的
static Future<dynamic> goMyShowCustomerListPage(
BuildContext context, FromPage fromPage, String gid,
{replace = false, bool needBtn = false}) {
return _navigateTo(context,
"${Routes.my_show_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&gid=$gid",
replace: replace);
}
/// 客情设置
static Future<dynamic> goCustomerSetPage(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.customer_set_page}",
replace: replace);
}
/// 全店营销记录
static Future<dynamic> goMarketingRecordsPage(
BuildContext context, FromPage fromPage,
{replace = false}) {
return _navigateTo(context,
"${Routes.marketing_records_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
/// 全店营销记录详情
static Future<dynamic> goMarketingRecordsDetailPage(
BuildContext context, String idstr,
{replace = false}) {
return _navigateTo(
context, "${Routes.marketing_records_detail_page}?idstr=${idstr}",
replace: replace);
}
/// 创建营销
static Future<dynamic> goMakeMarkingPage(
BuildContext context, {
replace = false,
MarketingByIdSunModel marketingByIdSunModel,
FromPage fromPage,
}) {
return _navigateTo(context,
"${Routes.make_marketing_page}?marketingByIdSunModel=${FluroConvertUtils.object2string(marketingByIdSunModel)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
/// 客户详情
static Future<dynamic> goCustomerDetailPage(
BuildContext context,
CustomerBySellerSunModel userHistoryEntity,
FromPage fromPage, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.customer_detail_page}?userHistoryEntity=${FluroConvertUtils.object2string(userHistoryEntity)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
///编辑客户详情
static Future<dynamic> goCustomerDetailEditPage(
BuildContext context,
Guest guest,
FromPage fromPage, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.customer_edit_detail_page}?guest=${FluroConvertUtils.object2string(guest)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
///纪念日
static Future<dynamic> goFestivalEditPage(
BuildContext context,
Guest guest,
String id,
String phone, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.festival_edit_page}?guest=${FluroConvertUtils.object2string(guest)}&idstr=${id}&phone=${phone}",
replace: replace);
}
///客户订单
static Future<dynamic> goCustomerOrderPage(
BuildContext context,
String id,
String phone, {
replace = false,
}) {
return _navigateTo(
context, "${Routes.customer_order_page}?idstr=${id}&phone=${phone}",
replace: replace);
}
//////
///
///
///
/// 我的客情列表
static Future<dynamic> goMyCustomerListPage(
BuildContext context, FromPage fromPage,
{replace = false, bool needBtn = false, String index = '0'}) {
return _navigateTo(context,
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}",
replace: replace);
}
/// 我的营销记录
static Future<dynamic> goMyMarketingRecordsPage(
BuildContext context, FromPage fromPage,
{replace = false}) {
return _navigateTo(context,
"${Routes.my_marketing_records_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
/// 我的营销记录详情 --- 个人任务
static Future<dynamic> goMyMarketingRecordsDetailPage(
BuildContext context, String idstr, SelfList selfList,
{replace = false}) {
return _navigateTo(context,
"${Routes.my_marketing_records_detail_page}?idstr=${idstr}&selfList=${FluroConvertUtils.object2string(selfList)}",
replace: replace);
}
/// 我的营销记录详情 --- 全店任务
static Future<dynamic> goSellerMyMarketingRecordsDetailPage(
BuildContext context, String idstr,
{fromNotify = false, replace = false}) {
return _navigateTo(context,
"${Routes.seller_my_marketing_records_detail_page}?idstr=${idstr}&fromNotify=$fromNotify",
replace: replace);
}
/// 我的创建营销
static Future<dynamic> goMyMakeMarkingPage(
BuildContext context, {
replace = false,
SelfList selfList,
FromPage fromPage,
String homeGid = '',
}) {
return _navigateTo(context,
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid",
replace: replace);
}
/// 我的创建营销 ---- 完成全店营销任务
static Future<dynamic> goMyMakeMarkingPageOnlyShow(
BuildContext context, SellerList sellerList,
{replace = false}) {
return _navigateTo(context,
"${Routes.my_make_marketing_page_only_show}?sellerList=${FluroConvertUtils.object2string(sellerList)}",
replace: replace);
}
/// 我的客户详情
static Future<dynamic> goMyCustomerDetailPage(
BuildContext context,
CustomerListSunModel userHistoryEntity,
FromPage fromPage, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.my_customer_detail_page}?userHistoryEntity=${FluroConvertUtils.object2string(userHistoryEntity)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
///编辑客户详情
static Future<dynamic> goMyCustomerDetailEditPage(
BuildContext context,
Guest guest,
FromPage fromPage, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.my_customer_edit_detail_page}?guest=${FluroConvertUtils.object2string(guest)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}",
replace: replace);
}
///纪念日
static Future<dynamic> goMyFestivalEditPage(
BuildContext context,
Guest guest,
String id,
String phone, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.my_festival_edit_page}?guest=${FluroConvertUtils.object2string(guest)}&idstr=${id}&phone=${phone}",
replace: replace);
}
///我的客户订单
static Future<dynamic> goMyCustomerOrderPage(
BuildContext context,
String id,
String phone, {
replace = false,
}) {
return _navigateTo(
context, "${Routes.my_customer_order_page}?idstr=${id}&phone=${phone}",
replace: replace);
}
///客情详情----再次预订
static Future<dynamic> goTableManagerPage(
BuildContext context,
Guest guest, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.table_manager_page}?guest=${FluroConvertUtils.object2string(guest)}",
replace: replace);
}
///我的----桌位管理
static Future<dynamic> goMyTableManagerHomePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.my_table_manager_home_page}",
replace: replace);
}
///我的----区域管理
static Future<dynamic> goMyAreaManagerHomePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.my_area_manage_page}",
replace: replace);
}
///优惠券选择页面
static Future<dynamic> goCouponCreateSelectTypePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.coupon_create_select_type_page}",
replace: replace);
}
///优惠券----可发放员工
static Future<dynamic> goCouponToPersonnalPage(
BuildContext context, String uids,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context,
"${Routes.coupon_to_personnel_page}?uids=$uids&onlyShow=$onlyShow",
replace: replace);
}
///宴会----宴会看板
static Future<dynamic> goFeastBoardPage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_board_page}", replace: replace);
}
///宴会----新建宴会
static Future<dynamic> goFeastCreatePage(BuildContext context,
{replace = false,
bool onlyShow = false,
GetBanquetByIdNewSunModel banquetDetail}) {
if (banquetDetail != null) {
return _navigateTo(context,
"${Routes.feast_create_page}?banquetDetail=${FluroConvertUtils.object2string(banquetDetail)}",
replace: replace);
}
return _navigateTo(context, "${Routes.feast_create_page}",
replace: replace);
}
///宴会----添加定金
static Future<dynamic> goFeastDepositPage(BuildContext context, String rid,
{replace = false,
bool onlyShow = false,
bool isNew = true,
GetBanquetDepositSunModel getBanquetDepositSunModel}) {
return _navigateTo(context,
"${Routes.feast_deposit_page}?rid=$rid&getBanquetDepositSunModel=${FluroConvertUtils.object2string(getBanquetDepositSunModel)}&isNew=$isNew",
replace: replace);
}
///宴会----调菜
static Future<dynamic> goFeastMenuPage(BuildContext context, String setmealId,
{replace = false, bool onlyShow = false, Map justSelData}) {
if (justSelData == null) {
return _navigateTo(
context, "${Routes.feast_menu_page}?setmealId=$setmealId",
replace: replace);
}
return _navigateTo(context,
"${Routes.feast_menu_page}?setmealId=$setmealId&object=${FluroConvertUtils.object2string(justSelData)}",
replace: replace);
}
///宴会----添加套餐
static Future<dynamic> goFeastSetmealPage(
BuildContext context, String dateData,
{replace = false, bool onlyShow = false, Map justSelData}) {
if (justSelData == null) {
return _navigateTo(context,
"${Routes.feast_setmeal_page}?dateData=${Uri.encodeComponent(dateData)}",
replace: replace);
}
return _navigateTo(context,
"${Routes.feast_setmeal_page}?object=${FluroConvertUtils.object2string(justSelData)}&dateData=${Uri.encodeComponent(dateData)}",
replace: replace);
}
///宴会----添加酒水
static Future<dynamic> goFeastWinePage(BuildContext context,
{replace = false, bool onlyShow = false, Map justSelData}) {
if (justSelData != null) {
return _navigateTo(context,
"${Routes.feast_wine_page}?object=${FluroConvertUtils.object2string(justSelData)}",
replace: replace);
}
return _navigateTo(context, "${Routes.feast_wine_page}", replace: replace);
}
///宴会----添加配置
static Future<dynamic> goFeastSetPage(BuildContext context,
{replace = false, bool onlyShow = false, Map justSelData}) {
if (justSelData != null) {
return _navigateTo(context,
"${Routes.feast_set_page}?object=${FluroConvertUtils.object2string(justSelData)}",
replace: replace);
}
return _navigateTo(context, "${Routes.feast_set_page}", replace: replace);
}
///宴会----添加发票
static Future<dynamic> goFeastInvoicePage(BuildContext context,
{replace = false, bool onlyShow = false, Invoice invoice}) {
if (invoice != null) {
return _navigateTo(context,
"${Routes.feast_invoice_page}?invoice=${FluroConvertUtils.object2string(invoice)}",
replace: replace);
}
return _navigateTo(context, "${Routes.feast_invoice_page}",
replace: replace);
}
///宴会----宴会管理
static Future<dynamic> goFeastManageHomePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_manage_home_page}",
replace: replace);
}
///宴会----宴会管理 --- 宴会类型
static Future<dynamic> goFeasTypePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_type_page}", replace: replace);
}
///宴会----宴会管理 --- 宴会员工
static Future<dynamic> goFeastPersonalPage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_personal_page}",
replace: replace);
}
///宴会----宴会管理 --- 套餐管理
static Future<dynamic> goFeastSetmealManagePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_setmeal_manage_page}",
replace: replace);
}
///宴会----宴会管理 --- 套餐添加
static Future<dynamic> goFeastSetmealManageEditPage(
BuildContext context, String setmealId,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context,
"${Routes.feast_setmeal_manage_edit_page}?setmealId=$setmealId",
replace: replace);
}
///宴会----宴会管理 --- 套餐---菜品
static Future<dynamic> goFeastDishPage(
BuildContext context, String setmealId, String classId,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context,
"${Routes.feast_dish_page}?setmealId=$setmealId&classId=$classId",
replace: replace);
}
///宴会----宴会管理 --- 酒水管理
static Future<dynamic> goFeastWineManagePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_wine_manage_page}",
replace: replace);
}
///宴会----宴会管理 --- 酒水添加
static Future<dynamic> goFeastWineManageEditPage(BuildContext context,
{replace = false, bool isNew = true, WineSunModel wineSunModel}) {
return _navigateTo(context,
"${Routes.feast_wine_manage_edit_page}?wineSunModel=${FluroConvertUtils.object2string(wineSunModel)}&isNew=$isNew",
replace: replace);
}
///宴会----宴会管理 --- 其他配置管理
static Future<dynamic> goFeastOthersetManagePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_otherset_manage_page}",
replace: replace);
}
///宴会----宴会管理 --- 其他配置添加
static Future<dynamic> goFeastOthersetManageEditPage(BuildContext context,
{replace = false, bool isNew = true, OthersetSunModel othersetSunModel}) {
return _navigateTo(context,
"${Routes.feast_otherset_manage_edit_page}?othersetSunModel=${FluroConvertUtils.object2string(othersetSunModel)}&isNew=$isNew",
replace: replace);
}
///宴会----宴会管理 --- 定金管理
static Future<dynamic> goFeastDepositManagePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_deposit_manage_page}",
replace: replace);
}
///宴会----宴会管理 --- 定金类型
static Future<dynamic> goFeastDepositTypePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_deposit_type_page}",
replace: replace);
}
///宴会----待跟进宴会
static Future<dynamic> goFeastFollowUpPage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_follow_up_page}",
replace: replace);
}
///宴会----定金数据
static Future<dynamic> goFeastDepositDataPage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_deposit_data_page}",
replace: replace);
}
///宴会---不待餐---- 选择桌位——方硕新修改的选择桌位页面
static Future goFeastSelectTablePage(BuildContext context,
{Map object, String tid = ''}) {
if (object != null) {
return _navigateTo(context,
"${Routes.feast_select_table_page}?tid=$tid&object=${FluroConvertUtils.object2string(object)}");
}
// object = {'object': [], "tid": ''};
return _navigateTo(context, "${Routes.feast_select_table_page}?tid=$tid");
}
///宴会----菜单信息
static Future<dynamic> goFeastMenuShowPage(BuildContext context,
String setmealId, String mealName, String dateData, String needtable,
{replace = false, bool onlyShow = false, Map justSelData}) {
if (justSelData == null) {
return _navigateTo(context,
"${Routes.feast_menu_show_page}?setmealId=$setmealId&mealName=${Uri.encodeComponent(mealName)}&dateData=${Uri.encodeComponent(dateData)}&needtable=${Uri.encodeComponent(needtable)}",
replace: replace);
}
return _navigateTo(context,
"${Routes.feast_menu_show_page}?setmealId=$setmealId&object=${FluroConvertUtils.object2string(justSelData)}&mealName=${Uri.encodeComponent(mealName)}&dateData=${Uri.encodeComponent(dateData)}&needtable=${Uri.encodeComponent(needtable)}",
replace: replace);
}
///宴会--签约--菜单信息
static Future<dynamic> goFeastMenuQYShowPage(BuildContext context,
{replace = false, bool onlyShow = false, Map object}) {
if (object == null) {
return _navigateTo(context, "${Routes.feast_qy_menu_show_page}",
replace: replace);
}
return _navigateTo(context,
"${Routes.feast_qy_menu_show_page}?object=${FluroConvertUtils.object2string(object)}",
replace: replace);
}
///宴会--详情
static Future<dynamic> goFeastDetailPage(
BuildContext context,
String rid, {
replace = false,
}) {
return _navigateTo(context, "${Routes.feast_detail_page}?rid=$rid",
replace: replace);
}
///宴会----发票详情
static Future<dynamic> goFeastInvoiceDetailPage(BuildContext context,
{replace = false, bool onlyShow = false, Invoice invoice}) {
if (invoice != null) {
return _navigateTo(context,
"${Routes.feast_invoice_detail_page}?invoice=${FluroConvertUtils.object2string(invoice)}",
replace: replace);
}
return _navigateTo(context, "${Routes.feast_invoice_detail_page}",
replace: replace);
}
}