Commit ebd42b62c48bf91df0757abe7190f848c97e32c8

Authored by “gaiyaguang”
1 parent 718ad81f

可订时段管理

  1 +import 'package:json_annotation/json_annotation.dart';
  2 +
  3 +part 'set_seller_info_model.g.dart';
  4 +
  5 +
  6 +@JsonSerializable()
  7 + class SetSellerInfoModel extends Object {
  8 +
  9 + @JsonKey(name: 'ret')
  10 + int ret;
  11 +
  12 + @JsonKey(name: 'data')
  13 + SetSellerInfoSunModel data;
  14 +
  15 + @JsonKey(name: 'msg')
  16 + String msg;
  17 +
  18 + SetSellerInfoModel(this.ret,this.data,this.msg,);
  19 +
  20 + factory SetSellerInfoModel.fromJson(Map<String, dynamic> srcJson) => _$SetSellerInfoModelFromJson(srcJson);
  21 +
  22 + Map<String, dynamic> toJson() => _$SetSellerInfoModelToJson(this);
  23 +
  24 +}
  25 +
  26 +
  27 +@JsonSerializable()
  28 + class SetSellerInfoSunModel extends Object {
  29 +
  30 + @JsonKey(name: 'sellerid')
  31 + int sellerid;
  32 +
  33 + SetSellerInfoSunModel(this.sellerid,);
  34 +
  35 + factory SetSellerInfoSunModel.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);
  36 +
  37 + Map<String, dynamic> toJson() => _$DataToJson(this);
  38 +
  39 +}
  40 +
  41 +
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of 'set_seller_info_model.dart';
  4 +
  5 +// **************************************************************************
  6 +// JsonSerializableGenerator
  7 +// **************************************************************************
  8 +
  9 +SetSellerInfoModel _$SetSellerInfoModelFromJson(Map<String, dynamic> json) {
  10 + return SetSellerInfoModel(
  11 + json['ret'] as int,
  12 + json['data'] == null
  13 + ? null
  14 + : SetSellerInfoSunModel.fromJson(
  15 + json['data'] as Map<String, dynamic>),
  16 + json['msg'] as String);
  17 +}
  18 +
  19 +Map<String, dynamic> _$SetSellerInfoModelToJson(SetSellerInfoModel instance) =>
  20 + <String, dynamic>{
  21 + 'ret': instance.ret,
  22 + 'data': instance.data,
  23 + 'msg': instance.msg
  24 + };
  25 +
  26 +SetSellerInfoSunModel _$DataFromJson(Map<String, dynamic> json) {
  27 + return SetSellerInfoSunModel(json['sellerid'] as int);
  28 +}
  29 +
  30 +Map<String, dynamic> _$DataToJson(SetSellerInfoSunModel instance) =>
  31 + <String, dynamic>{'sellerid': instance.sellerid};
@@ -38,4 +38,5 @@ class HttpUrl { @@ -38,4 +38,5 @@ class HttpUrl {
38 static const String set_switch_status = 38 static const String set_switch_status =
39 "?service=App.Reserve.SetSwitchStatus"; //启用/停用桌位 39 "?service=App.Reserve.SetSwitchStatus"; //启用/停用桌位
40 static const String sms_info = "?service=App.SendSMS.SmsInfo"; //短信余量查询及套餐查询接口 40 static const String sms_info = "?service=App.SendSMS.SmsInfo"; //短信余量查询及套餐查询接口
  41 + static const String set_seller_info = "?service=App.Seller.SetSellerById"; // 根据商家ID获取商家信息
41 } 42 }
1 import 'package:common_utils/common_utils.dart'; 1 import 'package:common_utils/common_utils.dart';
  2 +import 'package:flutter/cupertino.dart';
2 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
3 import 'package:flutter_screenutil/screenutil.dart'; 4 import 'package:flutter_screenutil/screenutil.dart';
  5 +import 'package:one_key/models/seller_info.dart';
  6 +import 'package:one_key/models/set_seller_info_model.dart';
4 import 'package:one_key/models/settime.dart'; 7 import 'package:one_key/models/settime.dart';
  8 +import 'package:one_key/provider/book_set_time_model.dart';
5 import 'package:one_key/res/colors.dart'; 9 import 'package:one_key/res/colors.dart';
6 import 'package:one_key/utils/dialog_util.dart'; 10 import 'package:one_key/utils/dialog_util.dart';
7 import 'package:one_key/utils/utils.dart'; 11 import 'package:one_key/utils/utils.dart';
8 import 'package:one_key/widgets/MyDivider.dart'; 12 import 'package:one_key/widgets/MyDivider.dart';
9 -import 'package:one_key/widgets/app_bar.dart'; 13 +import 'package:one_key/widgets/common_button.dart';
10 import 'package:one_key/widgets/h_empty_view.dart'; 14 import 'package:one_key/widgets/h_empty_view.dart';
  15 +import 'package:one_key/widgets/system_app_bar.dart';
11 import 'package:one_key/widgets/v_empty_view.dart'; 16 import 'package:one_key/widgets/v_empty_view.dart';
  17 +import 'package:provider/provider.dart';
12 18
13 typedef BookTimeSetCallback = void Function(bool needChange); 19 typedef BookTimeSetCallback = void Function(bool needChange);
14 20
@@ -26,6 +32,7 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -26,6 +32,7 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
26 SetTime morning = SetTime(); 32 SetTime morning = SetTime();
27 SetTime noon = SetTime(); 33 SetTime noon = SetTime();
28 SetTime night = SetTime(); 34 SetTime night = SetTime();
  35 + BookSetTimeModel bookSetTimeModel;
29 36
30 @override 37 @override
31 void initState() { 38 void initState() {
@@ -36,18 +43,7 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -36,18 +43,7 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
36 noon.end = '14:30'; 43 noon.end = '14:30';
37 night.start = '16:00'; 44 night.start = '16:00';
38 night.end = '21:00'; 45 night.end = '21:00';
39 - swichState = [  
40 - {  
41 - 'on': false,  
42 - },  
43 - {  
44 - 'on': true,  
45 - },  
46 - {  
47 - 'on': true,  
48 - }  
49 - ];  
50 - 46 + swichState = [false, true, true];
51 dateData = [ 47 dateData = [
52 { 48 {
53 '深夜00时': [00, 30] 49 '深夜00时': [00, 30]
@@ -122,6 +118,139 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -122,6 +118,139 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
122 '晚上23时': [00, 30] 118 '晚上23时': [00, 30]
123 } 119 }
124 ]; 120 ];
  121 + WidgetsBinding.instance.addPostFrameCallback((_) {
  122 + _getDailyTime();
  123 + });
  124 + }
  125 +
  126 + _getDailyTime() async {
  127 + SunSellerInfoModel model = await bookSetTimeModel.getManagersInfo(context);
  128 + setState(() {
  129 + if (model.daily.morning.isNotEmpty) {
  130 + List temp = model.daily.morning.split('-');
  131 + morning.start = temp.length > 0 ? temp[0] : '07:00';
  132 + morning.end = temp.length > 1 ? temp[1] : '10:00';
  133 + swichState[0] = true;
  134 + } else {
  135 + swichState[0] = false;
  136 + }
  137 + if (model.daily.noon.isNotEmpty) {
  138 + List temp = model.daily.noon.split('-');
  139 + noon.start = temp.length > 0 ? temp[0] : '11:00';
  140 + noon.end = temp.length > 1 ? temp[1] : '14:30';
  141 + swichState[1] = true;
  142 + } else {
  143 + swichState[1] = false;
  144 + noon.start = '11:00';
  145 + noon.end = '14:30';
  146 + }
  147 + if (model.daily.night.isNotEmpty) {
  148 + List temp = model.daily.night.split('-');
  149 + night.start = temp.length > 0 ? temp[0] : '16:00';
  150 + night.end = temp.length > 1 ? temp[1] : '21:00';
  151 + swichState[2] = true;
  152 + } else {
  153 + swichState[2] = false;
  154 + night.start = '16:00';
  155 + night.end = '21:00';
  156 + }
  157 + if (swichState[0] == false) {
  158 + if (model.daily.noon.isNotEmpty) {
  159 + _compareDateTime(noon.start, morning.end, (needChange) {
  160 + if (needChange) {
  161 + morning.end = noon.start;
  162 + } else {
  163 + morning.end = '10:00';
  164 + }
  165 + });
  166 + _compareDateTime(noon.start, morning.start, (needChange) {
  167 + if (needChange) {
  168 + morning.start = noon.start;
  169 + } else {
  170 + morning.start = '07:00';
  171 + }
  172 + });
  173 + } else if (model.daily.night.isNotEmpty) {
  174 + _compareDateTime(night.start, morning.end, (needChange) {
  175 + if (needChange) {
  176 + morning.end = night.start;
  177 + } else {
  178 + morning.end = '10:00';
  179 + }
  180 + });
  181 + _compareDateTime(night.start, morning.start, (needChange) {
  182 + if (needChange) {
  183 + morning.start = night.start;
  184 + } else {
  185 + morning.start = '07:00';
  186 + }
  187 + });
  188 + }
  189 + }
  190 + if (swichState[1] == false) {
  191 + if (model.daily.morning.isNotEmpty) {
  192 + _compareDateTime(noon.start, morning.end, (needChange) {
  193 + if (needChange) {
  194 + noon.start = morning.end;
  195 + } else {
  196 + noon.start = '11:00';
  197 + }
  198 + });
  199 + _compareDateTime(noon.end, morning.end, (needChange) {
  200 + if (needChange) {
  201 + noon.end = morning.end;
  202 + } else {
  203 + _compareDateTime(noon.end, night.start, (needChange) {
  204 + if (needChange) {
  205 + noon.end = '14:30';
  206 + } else {
  207 + noon.end = night.start;
  208 + }
  209 + });
  210 + }
  211 + });
  212 + }
  213 + if (model.daily.night.isNotEmpty) {
  214 + _compareDateTime(noon.start, night.start, (needChange) {
  215 + if (!needChange) {
  216 + noon.start = night.start;
  217 + }
  218 + });
  219 + _compareDateTime(noon.end, morning.start, (needChange) {
  220 + if (!needChange) {
  221 + noon.end = night.start;
  222 + }
  223 + });
  224 + }
  225 + }
  226 + if (swichState[2] == false) {
  227 + if (model.daily.noon.isNotEmpty) {
  228 + _compareDateTime(night.start, noon.end, (needChange) {
  229 + if (needChange) {
  230 + night.start = noon.end;
  231 + night.end = noon.end;
  232 + }
  233 + });
  234 + _compareDateTime(night.end, noon.start, (needChange) {
  235 + if (needChange) {
  236 + night.end = noon.start;
  237 + }
  238 + });
  239 + } else if (model.daily.morning.isNotEmpty) {
  240 + _compareDateTime(night.start, morning.end, (needChange) {
  241 + if (needChange) {
  242 + night.start = morning.end;
  243 + night.end = morning.end;
  244 + }
  245 + });
  246 + _compareDateTime(night.start, morning.start, (needChange) {
  247 + if (needChange) {
  248 + night.start = morning.start;
  249 + }
  250 + });
  251 + }
  252 + }
  253 + });
125 } 254 }
126 255
127 ///item 256 ///item
@@ -147,11 +276,11 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -147,11 +276,11 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
147 InkWell( 276 InkWell(
148 onTap: () { 277 onTap: () {
149 setState(() { 278 setState(() {
150 - swichState[tag]["on"] = !swichState[tag]["on"]; 279 + swichState[tag] = !swichState[tag];
151 }); 280 });
152 }, 281 },
153 child: Image.asset( 282 child: Image.asset(
154 - swichState[tag]["on"] 283 + swichState[tag]
155 ? Utils.getImgPath('swich_on') 284 ? Utils.getImgPath('swich_on')
156 : Utils.getImgPath('swich_off'), 285 : Utils.getImgPath('swich_off'),
157 width: ScreenUtil().setWidth(122), 286 width: ScreenUtil().setWidth(122),
@@ -166,9 +295,8 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -166,9 +295,8 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
166 ScreenUtil().setWidth(2), 295 ScreenUtil().setWidth(2),
167 color: MyColours.color_f3f3f3, 296 color: MyColours.color_f3f3f3,
168 ), 297 ),
169 - _timeWidget('开始时间', startTime, highted: swichState[tag]["on"],  
170 - onTap: () {  
171 - if (swichState[tag]["on"]) { 298 + timeWidget('开始时间', startTime, highted: swichState[tag], onTap: () {
  299 + if (swichState[tag]) {
172 List data = dateData; 300 List data = dateData;
173 if (tag == 0) { 301 if (tag == 0) {
174 //早市 302 //早市
@@ -184,11 +312,16 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -184,11 +312,16 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
184 DialogUtil.showSelectCusmanDialog(context, data, (value) { 312 DialogUtil.showSelectCusmanDialog(context, data, (value) {
185 if (value != null) { 313 if (value != null) {
186 String temp; 314 String temp;
187 - if (value[1] == 0) {  
188 - temp = '00';  
189 - } else { 315 + if (data.length == 1) {
190 temp = '30'; 316 temp = '30';
  317 + } else {
  318 + if (value[1] == 0) {
  319 + temp = '00';
  320 + } else {
  321 + temp = '30';
  322 + }
191 } 323 }
  324 +
192 print(data[value[0]].keys.first); 325 print(data[value[0]].keys.first);
193 String time = _getTimeString( 326 String time = _getTimeString(
194 _getHourFromTitle(data[value[0]].keys.first), temp); 327 _getHourFromTitle(data[value[0]].keys.first), temp);
@@ -196,16 +329,66 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -196,16 +329,66 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
196 if (tag == 0) { 329 if (tag == 0) {
197 //早市 330 //早市
198 morning.start = time; 331 morning.start = time;
  332 + setState(() {
  333 + _compareDateTime(morning.end, time, (needChange) {
  334 + if (needChange) {
  335 + morning.end = time;
  336 + }
  337 + });
  338 + _compareDateTime(noon.start, time, (needChange) {
  339 + if (needChange) {
  340 + noon.start = time;
  341 + }
  342 + });
  343 + _compareDateTime(noon.end, time, (needChange) {
  344 + if (needChange) {
  345 + noon.end = time;
  346 + }
  347 + });
  348 + _compareDateTime(night.start, time, (needChange) {
  349 + if (needChange) {
  350 + night.start = time;
  351 + }
  352 + });
  353 + _compareDateTime(night.end, time, (needChange) {
  354 + if (needChange) {
  355 + night.end = time;
  356 + }
  357 + });
  358 + });
199 } else if (tag == 1) { 359 } else if (tag == 1) {
200 //午市 360 //午市
201 noon.start = time; 361 noon.start = time;
  362 + setState(() {
  363 + _compareDateTime(noon.end, time, (needChange) {
  364 + if (needChange) {
  365 + noon.end = time;
  366 + }
  367 + });
  368 + _compareDateTime(night.start, time, (needChange) {
  369 + if (needChange) {
  370 + night.start = time;
  371 + }
  372 + });
  373 + _compareDateTime(night.end, time, (needChange) {
  374 + if (needChange) {
  375 + night.end = time;
  376 + }
  377 + });
  378 + });
202 } else if (tag == 2) { 379 } else if (tag == 2) {
203 //晚市 380 //晚市
204 night.start = time; 381 night.start = time;
  382 + setState(() {
  383 + _compareDateTime(night.end, time, (needChange) {
  384 + if (needChange) {
  385 + night.end = time;
  386 + }
  387 + });
  388 + });
205 } 389 }
206 }); 390 });
207 print(value); 391 print(value);
208 - _compare(time);  
209 } 392 }
210 }, selecteds: [ 393 }, selecteds: [
211 _getFirSelected(startTime, data), 394 _getFirSelected(startTime, data),
@@ -223,9 +406,8 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -223,9 +406,8 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
223 ScreenUtil().setWidth(2), 406 ScreenUtil().setWidth(2),
224 color: MyColours.color_f3f3f3, 407 color: MyColours.color_f3f3f3,
225 )), 408 )),
226 - _timeWidget('结束时间', endTime, highted: swichState[tag]["on"],  
227 - onTap: () {  
228 - if (swichState[tag]["on"]) { 409 + timeWidget('结束时间', endTime, highted: swichState[tag], onTap: () {
  410 + if (swichState[tag]) {
229 List data = dateData; 411 List data = dateData;
230 if (tag == 0) { 412 if (tag == 0) {
231 //早市 413 //早市
@@ -240,10 +422,14 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -240,10 +422,14 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
240 DialogUtil.showSelectCusmanDialog(context, data, (value) { 422 DialogUtil.showSelectCusmanDialog(context, data, (value) {
241 if (value != null) { 423 if (value != null) {
242 String temp; 424 String temp;
243 - if (value[1] == 0) {  
244 - temp = '00';  
245 - } else { 425 + if (data.length == 1) {
246 temp = '30'; 426 temp = '30';
  427 + } else {
  428 + if (value[1] == 0) {
  429 + temp = '00';
  430 + } else {
  431 + temp = '30';
  432 + }
247 } 433 }
248 String time = _getTimeString( 434 String time = _getTimeString(
249 _getHourFromTitle(data[value[0]].keys.first), temp); 435 _getHourFromTitle(data[value[0]].keys.first), temp);
@@ -251,16 +437,49 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -251,16 +437,49 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
251 if (tag == 0) { 437 if (tag == 0) {
252 //早市 438 //早市
253 morning.end = time; 439 morning.end = time;
  440 + setState(() {
  441 + _compareDateTime(noon.start, time, (needChange) {
  442 + if (needChange) {
  443 + noon.start = time;
  444 + }
  445 + });
  446 + _compareDateTime(noon.end, time, (needChange) {
  447 + if (needChange) {
  448 + noon.end = time;
  449 + }
  450 + });
  451 + _compareDateTime(night.start, time, (needChange) {
  452 + if (needChange) {
  453 + night.start = time;
  454 + }
  455 + });
  456 + _compareDateTime(night.end, time, (needChange) {
  457 + if (needChange) {
  458 + night.end = time;
  459 + }
  460 + });
  461 + });
254 } else if (tag == 1) { 462 } else if (tag == 1) {
255 //午市 463 //午市
256 noon.end = time; 464 noon.end = time;
  465 + setState(() {
  466 + _compareDateTime(night.start, time, (needChange) {
  467 + if (needChange) {
  468 + night.start = time;
  469 + }
  470 + });
  471 + _compareDateTime(night.end, time, (needChange) {
  472 + if (needChange) {
  473 + night.end = time;
  474 + }
  475 + });
  476 + });
257 } else if (tag == 2) { 477 } else if (tag == 2) {
258 //晚市 478 //晚市
259 night.end = time; 479 night.end = time;
260 } 480 }
261 }); 481 });
262 print(value); 482 print(value);
263 - _compare(time);  
264 } 483 }
265 }, selecteds: [ 484 }, selecteds: [
266 _getFirSelected(endTime, data), 485 _getFirSelected(endTime, data),
@@ -274,52 +493,17 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -274,52 +493,17 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
274 )); 493 ));
275 } 494 }
276 495
277 - /// 开始时间和结束时间widget  
278 - _timeWidget(String title, String time,  
279 - {bool highted = true, GestureTapCallback onTap}) {  
280 - return InkWell(  
281 - onTap: onTap,  
282 - child: Padding(  
283 - padding:  
284 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)),  
285 - child: Container(  
286 - height: ScreenUtil().setWidth(124),  
287 - child: Row(  
288 - crossAxisAlignment: CrossAxisAlignment.center,  
289 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
290 - children: [  
291 - Text(title,  
292 - style: TextStyle(  
293 - color: highted  
294 - ? MyColours.color_353535  
295 - : MyColours.color_999999,  
296 - fontSize: ScreenUtil().setSp(30),  
297 - )),  
298 - Spacer(),  
299 - Text(time,  
300 - style: TextStyle(  
301 - color: highted  
302 - ? MyColours.color_353535  
303 - : MyColours.color_999999,  
304 - fontSize: ScreenUtil().setSp(30),  
305 - )),  
306 - HEmptyView(20),  
307 - Image.asset(  
308 - Utils.getImgPath('arrow_right_new'),  
309 - width: ScreenUtil().setWidth(16),  
310 - height: ScreenUtil().setWidth(28),  
311 - )  
312 - ],  
313 - ),  
314 - )));  
315 - }  
316 -  
317 ///工具 496 ///工具
318 /// 组装成07:00 497 /// 组装成07:00
319 _getTimeString(dynamic hour, String minute) { 498 _getTimeString(dynamic hour, String minute) {
320 return '${hour}:${minute}'; 499 return '${hour}:${minute}';
321 } 500 }
322 501
  502 + /// 组装成 07:00-10:00
  503 + _getTimelLongString(String start, String end) {
  504 + return '${start}-${end}';
  505 + }
  506 +
323 /// 从07:00中获取07 507 /// 从07:00中获取07
324 _getHourFromhourAndMinute(String hourAndMinute) { 508 _getHourFromhourAndMinute(String hourAndMinute) {
325 return hourAndMinute.substring(0, 2); 509 return hourAndMinute.substring(0, 2);
@@ -368,79 +552,177 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> { @@ -368,79 +552,177 @@ class _BookTimeSetPageState extends State<BookTimeSetPage> {
368 List tempList = List(); 552 List tempList = List();
369 tempList.addAll(dateData); 553 tempList.addAll(dateData);
370 tempList.removeRange(0, int.parse(hour)); 554 tempList.removeRange(0, int.parse(hour));
  555 + if (tempList.length == 0) {
  556 + tempList = [
  557 + {
  558 + '晚上23时': [30]
  559 + }
  560 + ];
  561 + }
371 return tempList; 562 return tempList;
372 } 563 }
373 564
374 ///判断时间大小 565 ///判断时间大小
375 - /// a > b 566 + /// a < b 则 a = b
376 _compareDateTime(String a, String b, BookTimeSetCallback callback) { 567 _compareDateTime(String a, String b, BookTimeSetCallback callback) {
377 String tempa = '${DateUtil.getNowDateStr().substring(0, 10)} ${a}:00'; 568 String tempa = '${DateUtil.getNowDateStr().substring(0, 10)} ${a}:00';
378 String tempb = '${DateUtil.getNowDateStr().substring(0, 10)} ${b}:00'; 569 String tempb = '${DateUtil.getNowDateStr().substring(0, 10)} ${b}:00';
379 int aMs = DateUtil.getDateMsByTimeStr(tempa); 570 int aMs = DateUtil.getDateMsByTimeStr(tempa);
380 int bMs = DateUtil.getDateMsByTimeStr(tempb); 571 int bMs = DateUtil.getDateMsByTimeStr(tempb);
381 if (aMs < bMs) { 572 if (aMs < bMs) {
382 - a = b;  
383 callback(true); 573 callback(true);
384 } else { 574 } else {
385 callback(false); 575 callback(false);
386 } 576 }
387 } 577 }
388 578
389 - _compare(String time) {  
390 - setState(() {  
391 - _compareDateTime(morning.start, time, (needChange) {  
392 - if (needChange) {  
393 - morning.start = time;  
394 - }  
395 - });  
396 - _compareDateTime(morning.end, time, (needChange) {  
397 - if (needChange) {  
398 - morning.end = time;  
399 - }  
400 - });  
401 - _compareDateTime(noon.start, time, (needChange) {  
402 - if (needChange) {  
403 - noon.start = time;  
404 - }  
405 - });  
406 - _compareDateTime(noon.end, time, (needChange) {  
407 - if (needChange) {  
408 - noon.end = time;  
409 - }  
410 - });  
411 - _compareDateTime(night.start, time, (needChange) {  
412 - if (needChange) {  
413 - night.start = time;  
414 - }  
415 - });  
416 - _compareDateTime(night.end, time, (needChange) {  
417 - if (needChange) {  
418 - night.end = time;  
419 - }  
420 - });  
421 - }); 579 + ///底部widget
  580 + ///
  581 + _bottomWidget() {
  582 + return Container(
  583 + padding: EdgeInsets.fromLTRB(
  584 + ScreenUtil().setWidth(40),
  585 + ScreenUtil().setWidth(60),
  586 + ScreenUtil().setWidth(40),
  587 + ScreenUtil().setWidth(60),
  588 + ),
  589 + child: Column(
  590 + crossAxisAlignment: CrossAxisAlignment.start,
  591 + children: [
  592 + textWidget('温馨提示:'),
  593 + VEmptyView(10),
  594 + textWidget('1.时段停用,表示餐厅将不支持该时段的预订;'),
  595 + VEmptyView(10),
  596 + textWidget('2.修改起始时间后,为确保正常生效,建议重启话机。'),
  597 + ],
  598 + ),
  599 + );
422 } 600 }
423 601
424 @override 602 @override
425 Widget build(BuildContext context) { 603 Widget build(BuildContext context) {
  604 + bookSetTimeModel = Provider.of<BookSetTimeModel>(context, listen: true);
426 return Scaffold( 605 return Scaffold(
427 key: _scaffoldKey, 606 key: _scaffoldKey,
  607 + backgroundColor: MyColours.color_f5f5f5,
  608 + appBar: SystemAppBar('可订时段'),
428 body: SafeArea( 609 body: SafeArea(
429 - child: SingleChildScrollView(  
430 - child: Column(  
431 - children: [  
432 - MyAppBar(  
433 - "可订时段",  
434 - showBack: true, 610 + child: Column(
  611 + children: [
  612 + Expanded(
  613 + child: SingleChildScrollView(
  614 + child: Column(
  615 + children: [
  616 + _itemWidget('早市', morning.start, morning.end, 0),
  617 + VEmptyView(20),
  618 + _itemWidget('午市', noon.start, noon.end, 1),
  619 + VEmptyView(20),
  620 + _itemWidget('晚市', night.start, night.end, 2),
  621 + _bottomWidget()
  622 + ],
435 ), 623 ),
436 - _itemWidget('早市', morning.start, morning.end, 0),  
437 - VEmptyView(20),  
438 - _itemWidget('午市', noon.start, noon.end, 1),  
439 - VEmptyView(20),  
440 - _itemWidget('晚市', night.start, night.end, 2),  
441 - ],  
442 - ), 624 + )),
  625 + Padding(
  626 + padding: EdgeInsets.fromLTRB(
  627 + ScreenUtil().setWidth(40),
  628 + ScreenUtil().setWidth(0),
  629 + ScreenUtil().setWidth(40),
  630 + ScreenUtil().setWidth(60)),
  631 + child: CommonButton(
  632 + width: double.infinity,
  633 + height: 84,
  634 + fontSize: 34,
  635 + content: '保存',
  636 + state: 2,
  637 + onPress: () async {
  638 + String morningStr = '';
  639 + String noonStr = '';
  640 + String nightStr = '';
  641 + if (swichState[0]) {
  642 + morningStr =
  643 + _getTimelLongString(morning.start, morning.end);
  644 + }
  645 + if (swichState[1]) {
  646 + noonStr = _getTimelLongString(noon.start, noon.end);
  647 + }
  648 + if (swichState[2]) {
  649 + nightStr = _getTimelLongString(night.start, night.end);
  650 + }
  651 +
  652 + DialogUtil.confirmTimeAlertDialog(
  653 + context, morningStr, noonStr, nightStr, () async {
  654 + ///接口
  655 + ///
  656 + SetSellerInfoSunModel sunModel = await bookSetTimeModel
  657 + .setSellerInfoById(context, {
  658 + 'morning': morningStr,
  659 + 'noon': noonStr,
  660 + 'night': nightStr
  661 + });
  662 + if (sunModel != null) {
  663 + //修改成功
  664 + Utils.showToast('保存成功');
  665 + Navigator.pop(context);
  666 + } else {
  667 + // Utils.showToast('保存失败');
  668 + }
  669 + });
  670 + },
  671 + ))
  672 + ],
443 )), 673 )),
444 ); 674 );
445 } 675 }
446 } 676 }
  677 +
  678 +/// 开始时间和结束时间widget
  679 +timeWidget(String title, String time,
  680 + {bool highted = true, GestureTapCallback onTap}) {
  681 + return InkWell(
  682 + onTap: onTap,
  683 + child: Padding(
  684 + padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)),
  685 + child: Container(
  686 + height: ScreenUtil().setWidth(124),
  687 + child: Row(
  688 + crossAxisAlignment: CrossAxisAlignment.center,
  689 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  690 + children: [
  691 + Text(title,
  692 + style: TextStyle(
  693 + color: highted
  694 + ? MyColours.color_353535
  695 + : MyColours.color_999999,
  696 + fontSize: ScreenUtil().setSp(30),
  697 + )),
  698 + Spacer(),
  699 + Text(time,
  700 + style: TextStyle(
  701 + color: highted
  702 + ? MyColours.color_353535
  703 + : MyColours.color_999999,
  704 + fontSize: ScreenUtil().setSp(30),
  705 + )),
  706 + HEmptyView(20),
  707 + Image.asset(
  708 + Utils.getImgPath('arrow_right_new'),
  709 + width: ScreenUtil().setWidth(16),
  710 + height: ScreenUtil().setWidth(28),
  711 + )
  712 + ],
  713 + ),
  714 + )));
  715 +}
  716 +
  717 +///文本widget
  718 +///
  719 +textWidget(String title) {
  720 + return Container(
  721 + height: ScreenUtil().setWidth(40),
  722 + child: Text(
  723 + title,
  724 + style: TextStyle(
  725 + color: MyColours.color_353535, fontSize: ScreenUtil().setSp(28)),
  726 + ),
  727 + );
  728 +}
@@ -206,7 +206,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -206,7 +206,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
206 MyItem( 206 MyItem(
207 title: "接单时间管理", 207 title: "接单时间管理",
208 content: "", 208 content: "",
209 - callback: () {}, 209 + callback: () {
  210 + NavigatorUtil.goReceiveOrdersTimeSetPage(context);
  211 + },
210 ), 212 ),
211 VEmptyView(40), 213 VEmptyView(40),
212 MyItem( 214 MyItem(
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_screenutil/screenutil.dart';
  3 +import 'package:one_key/models/settime.dart';
  4 +import 'package:one_key/pages/my/book_time_set.dart';
  5 +import 'package:one_key/res/colors.dart';
  6 +import 'package:one_key/widgets/MyDivider.dart';
  7 +import 'package:one_key/widgets/common_button.dart';
  8 +import 'package:one_key/widgets/system_app_bar.dart';
  9 +import 'package:one_key/widgets/v_empty_view.dart';
  10 +
  11 +class ReceiveOrdersTimeSetPage extends StatefulWidget {
  12 + ReceiveOrdersTimeSetPage({Key key}) : super(key: key);
  13 +
  14 + @override
  15 + _ReceiveOrdersTimeSetPageState createState() =>
  16 + _ReceiveOrdersTimeSetPageState();
  17 +}
  18 +
  19 +class _ReceiveOrdersTimeSetPageState extends State<ReceiveOrdersTimeSetPage> {
  20 + SetTime receiveOrdersTime = SetTime();
  21 +
  22 + @override
  23 + void initState() {
  24 + super.initState();
  25 + WidgetsBinding.instance.addPostFrameCallback((_) {
  26 + // _getDailyTime();
  27 + });
  28 + }
  29 +
  30 + @override
  31 + Widget build(BuildContext context) {
  32 + return Scaffold(
  33 + backgroundColor: MyColours.color_f5f5f5,
  34 + appBar: SystemAppBar('接单时间'),
  35 + body: SafeArea(
  36 + child: Column(
  37 + children: [
  38 + Expanded(
  39 + child: SingleChildScrollView(
  40 + child: Column(
  41 + crossAxisAlignment: CrossAxisAlignment.start,
  42 + children: [
  43 + Container(
  44 + height: ScreenUtil().setWidth(126 * 2),
  45 + color: MyColours.color_ffffff,
  46 + child: Column(
  47 + children: [
  48 + timeWidget('开始时间', '07:00', highted: true, onTap: () {}),
  49 + Padding(
  50 + padding: EdgeInsets.symmetric(
  51 + horizontal: ScreenUtil().setWidth(40)),
  52 + child: MyDivider(
  53 + double.infinity,
  54 + ScreenUtil().setWidth(2),
  55 + color: MyColours.color_f3f3f3,
  56 + )),
  57 + timeWidget('结束时间', '07:00', highted: true, onTap: () {}),
  58 + ],
  59 + ),
  60 + ),
  61 + VEmptyView(60),
  62 + Padding(
  63 + padding: EdgeInsets.symmetric(
  64 + horizontal: ScreenUtil().setWidth(40)),
  65 + child: textWidget('温馨提示:'),
  66 + ),
  67 + VEmptyView(10),
  68 + Padding(
  69 + padding: EdgeInsets.symmetric(
  70 + horizontal: ScreenUtil().setWidth(40)),
  71 + child: textWidget('修改接单时间后,必须重启话机才能正常生效。'))
  72 + ],
  73 + ),
  74 + )),
  75 + Padding(
  76 + padding: EdgeInsets.fromLTRB(
  77 + ScreenUtil().setWidth(40),
  78 + ScreenUtil().setWidth(0),
  79 + ScreenUtil().setWidth(40),
  80 + ScreenUtil().setWidth(60)),
  81 + child: CommonButton(
  82 + width: double.infinity,
  83 + height: 84,
  84 + fontSize: 34,
  85 + content: '保存',
  86 + state: 2,
  87 + onPress: () async {},
  88 + ))
  89 + ],
  90 + )),
  91 + );
  92 + }
  93 +}
  1 +import 'dart:convert';
  2 +
  3 +import 'package:flutter/material.dart';
  4 +import 'package:one_key/constant/constant.dart';
  5 +import 'package:one_key/models/seller_info.dart';
  6 +import 'package:one_key/models/set_seller_info_model.dart';
  7 +import 'package:one_key/models/settime.dart';
  8 +import 'package:one_key/net/base_resp.dart';
  9 +import 'package:one_key/net/dio_util.dart';
  10 +import 'package:one_key/net/http_url.dart';
  11 +import 'package:one_key/provider/user_model.dart';
  12 +import 'package:one_key/utils/utils.dart';
  13 +import 'package:provider/provider.dart';
  14 +
  15 +class BookSetTimeModel with ChangeNotifier {
  16 + //构造函数,初始化
  17 + BookSetTimeModel() {}
  18 +
  19 + ///获取某个商家下所有服务员信息 **** 取得某个商家的早市、午市、晚市营业时间
  20 + Future<SunSellerInfoModel> getManagersInfo(BuildContext context) async {
  21 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  22 + Map<String, String> params = {
  23 + "seller_id": userModel.user.sellerid,
  24 + "seller_openid": userModel.user.openid
  25 + };
  26 + BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  27 + .request<Map<String, dynamic>>(context, Method.get, HttpUrl.sellerinfo,
  28 + data: params)
  29 + .catchError((error) {
  30 + print(error.toString());
  31 + });
  32 + SunSellerInfoModel itemModel;
  33 + if (baseResp == null) return itemModel;
  34 + if (baseResp.code == Constant.status_success) {
  35 + if (int.parse(baseResp.status) != Constant.status_success) {
  36 + Utils.showToast(baseResp.msg ?? "");
  37 + return itemModel;
  38 + }
  39 + if (baseResp.responseData['data'] != null) {
  40 + itemModel = SellerInfoModel.fromJson(baseResp.responseData).data;
  41 + } else {
  42 + Utils.showToast(baseResp.msg ?? "");
  43 + }
  44 + return itemModel;
  45 + }
  46 + }
  47 +
  48 + ///根据商家ID修改商家信息
  49 + Future<SetSellerInfoSunModel> setSellerInfoById(
  50 + BuildContext context, Map daily) async {
  51 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  52 + Map<String, String> params = {
  53 + "id": userModel.user.sellerid,
  54 + "daily": jsonEncode(daily)
  55 + };
  56 + BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
  57 + .request<Map<String, dynamic>>(
  58 + context, Method.get, HttpUrl.set_seller_info,
  59 + data: params)
  60 + .catchError((error) {
  61 + print(error.toString());
  62 + });
  63 + SetSellerInfoSunModel itemModel;
  64 + if (baseResp == null) return itemModel;
  65 + if (baseResp.code == Constant.status_success) {
  66 + if (int.parse(baseResp.status) != Constant.status_success) {
  67 + Utils.showToast(baseResp.msg ?? "");
  68 + return itemModel;
  69 + }
  70 + if (baseResp.responseData['data'] != null) {
  71 + itemModel = SetSellerInfoModel.fromJson(baseResp.responseData).data;
  72 + } else {
  73 + Utils.showToast(baseResp.msg ?? "");
  74 + }
  75 + return itemModel;
  76 + }
  77 + }
  78 +}
@@ -48,4 +48,5 @@ class MyColours { @@ -48,4 +48,5 @@ class MyColours {
48 static const Color color_A9E3E6 = Color(0xffA9E3E6); 48 static const Color color_A9E3E6 = Color(0xffA9E3E6);
49 static const Color color_e5e5e5 = Color(0xffe5e5e5); 49 static const Color color_e5e5e5 = Color(0xffe5e5e5);
50 static const Color color_efefef = Color(0xffefefef); 50 static const Color color_efefef = Color(0xffefefef);
  51 + static const Color color_0A0A0A = Color(0xff0A0A0A);
51 } 52 }
@@ -13,9 +13,11 @@ import 'package:one_key/pages/detail/handle_online_page.dart'; @@ -13,9 +13,11 @@ import 'package:one_key/pages/detail/handle_online_page.dart';
13 import 'package:one_key/pages/detail/notebook_detail_page.dart'; 13 import 'package:one_key/pages/detail/notebook_detail_page.dart';
14 import 'package:one_key/pages/login/web_page.dart'; 14 import 'package:one_key/pages/login/web_page.dart';
15 import 'package:one_key/pages/my/book_time_set.dart'; 15 import 'package:one_key/pages/my/book_time_set.dart';
  16 +import 'package:one_key/pages/my/receive_orders_time_set.dart';
16 import 'package:one_key/pages/sms/sms_page.dart'; 17 import 'package:one_key/pages/sms/sms_page.dart';
17 import 'package:one_key/pages/table/select_table_page.dart'; 18 import 'package:one_key/pages/table/select_table_page.dart';
18 import 'package:one_key/pages/webview/webview_page.dart'; 19 import 'package:one_key/pages/webview/webview_page.dart';
  20 +import 'package:one_key/provider/book_set_time_model.dart';
19 import 'package:one_key/provider/choose_table_model.dart'; 21 import 'package:one_key/provider/choose_table_model.dart';
20 import 'package:one_key/provider/notebook_detail_change_model.dart'; 22 import 'package:one_key/provider/notebook_detail_change_model.dart';
21 import 'package:one_key/provider/notebook_detail_model.dart'; 23 import 'package:one_key/provider/notebook_detail_model.dart';
@@ -139,5 +141,13 @@ var handleChangeDetailHandler = new Handler( @@ -139,5 +141,13 @@ var handleChangeDetailHandler = new Handler(
139 // 跳转可订时段管理页面 141 // 跳转可订时段管理页面
140 var handleBookTimeSetHandler = new Handler( 142 var handleBookTimeSetHandler = new Handler(
141 handlerFunc: (BuildContext context, Map<String, List<Object>> params) { 143 handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
142 - return BookTimeSetPage(); 144 + return ChangeNotifierProvider<BookSetTimeModel>(
  145 + create: (_) => BookSetTimeModel(), child: BookTimeSetPage());
  146 +});
  147 +
  148 +// 跳转可订时段管理页面
  149 +var handleReceiveOrdersTimeSetHandler = new Handler(
  150 + handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  151 + return ChangeNotifierProvider<BookSetTimeModel>(
  152 + create: (_) => BookSetTimeModel(), child: ReceiveOrdersTimeSetPage());
143 }); 153 });
@@ -15,7 +15,8 @@ class Routes { @@ -15,7 +15,8 @@ class Routes {
15 static String webview = "/webview"; //网页 15 static String webview = "/webview"; //网页
16 static String web_page = '/web_page'; //隐私协议 16 static String web_page = '/web_page'; //隐私协议
17 static String change_detail = "/change_detail"; //变更预订 17 static String change_detail = "/change_detail"; //变更预订
18 - static String book_time_set = "/book_time_set"; //可订时段管理 18 + static String book_time_set = "/book_time_set"; //可订时段管理
  19 + static String receive_orders_time_set = "/receive_orders_time_set"; //接单时间管理
19 20
20 static void configureRoutes(Router router) { 21 static void configureRoutes(Router router) {
21 router.notFoundHandler = new Handler( 22 router.notFoundHandler = new Handler(
@@ -34,5 +35,7 @@ class Routes { @@ -34,5 +35,7 @@ class Routes {
34 router.define(web_page, handler: webPageHandler); 35 router.define(web_page, handler: webPageHandler);
35 router.define(change_detail, handler: handleChangeDetailHandler); 36 router.define(change_detail, handler: handleChangeDetailHandler);
36 router.define(book_time_set, handler: handleBookTimeSetHandler); 37 router.define(book_time_set, handler: handleBookTimeSetHandler);
  38 + router.define(receive_orders_time_set,
  39 + handler: handleReceiveOrdersTimeSetHandler);
37 } 40 }
38 } 41 }
@@ -759,18 +759,155 @@ class DialogUtil { @@ -759,18 +759,155 @@ class DialogUtil {
759 ), 759 ),
760 ), 760 ),
761 ); 761 );
762 - // return AlertDialog(  
763 - // title: Text('未获得通讯录权限'),  
764 - // content: Text('请在手机的权限管理里,将联系人权限开启'),  
765 - // actions: <Widget>[  
766 - // FlatButton(  
767 - // child: Text('去设置'),  
768 - // onPressed: () {  
769 - // Navigator.pop(context, '确认');  
770 - // },  
771 - // ),  
772 - // ],  
773 - // ); 762 + },
  763 + );
  764 +
  765 + switch (action) {
  766 + // case Action.Ok:
  767 + // setState(() {
  768 + // _choice = 'Ok';
  769 + // });
  770 + // break;
  771 + // case Action.Cancel:
  772 + // setState(() {
  773 + // _choice = 'Cancel';
  774 + // });
  775 + // break;
  776 + // default:
  777 + }
  778 + }
  779 +
  780 + ///时段设置提示弹框
  781 + static Future confirmTimeAlertDialog(BuildContext context, String morning,
  782 + String noon, String night, VoidCallback callback) async {
  783 + int space = 52;
  784 + List temp = [morning, noon, night];
  785 + int tempHeight = 0;
  786 + for (int i = 0; i < temp.length; i++) {
  787 + if (temp[i] == '') {
  788 + if (i == 2) {
  789 + space = 42;
  790 + }
  791 + tempHeight += space;
  792 + }
  793 + }
  794 + int height = 166 * 2 + 20 + 15 * 2 + 20 - tempHeight;
  795 + final action = await showDialog(
  796 + context: context,
  797 + barrierDismissible: true,
  798 + builder: (BuildContext context) {
  799 + return Center(
  800 + child: Container(
  801 + height: ScreenUtil().setWidth(height),
  802 + width: ScreenUtil().setWidth(280 * 2),
  803 + decoration: BoxDecoration(
  804 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20))),
  805 + child: Card(
  806 + shape: RoundedRectangleBorder(
  807 + borderRadius: BorderRadius.all(
  808 + Radius.circular(ScreenUtil().setWidth(20)))), //设置圆角
  809 + child: Column(
  810 + children: [
  811 + VEmptyView(40),
  812 + Container(
  813 + height: ScreenUtil().setWidth(42),
  814 + alignment: Alignment.center,
  815 + child: Text(
  816 + "请确认时段信息",
  817 + style: TextStyle(
  818 + color: MyColours.color_353535,
  819 + fontSize: ScreenUtil().setSp(30),
  820 + fontWeight: FontWeight.bold),
  821 + ),
  822 + ),
  823 + VEmptyView(20),
  824 + Column(
  825 + children: [
  826 + morning.isNotEmpty
  827 + ? Container(
  828 + height: ScreenUtil().setWidth(42),
  829 + child: Text("早市:${morning}",
  830 + style: TextStyle(
  831 + color: MyColours.color_353535,
  832 + fontSize: ScreenUtil().setSp(30),
  833 + )))
  834 + : Container(),
  835 + morning.isNotEmpty ? VEmptyView(10) : VEmptyView(0),
  836 + noon.isNotEmpty
  837 + ? Container(
  838 + height: ScreenUtil().setWidth(42),
  839 + child: Text(
  840 + "午市:${noon}",
  841 + style: TextStyle(
  842 + color: MyColours.color_353535,
  843 + fontSize: ScreenUtil().setSp(30),
  844 + ),
  845 + ))
  846 + : Container(),
  847 + noon.isNotEmpty ? VEmptyView(10) : VEmptyView(0),
  848 + night.isNotEmpty
  849 + ? Container(
  850 + height: ScreenUtil().setWidth(42),
  851 + child: Text(
  852 + "晚市:${night}",
  853 + style: TextStyle(
  854 + color: MyColours.color_353535,
  855 + fontSize: ScreenUtil().setSp(30),
  856 + ),
  857 + ))
  858 + : Container(),
  859 + ],
  860 + ),
  861 + VEmptyView(40),
  862 + MyDivider(
  863 + ScreenUtil().setWidth(280 * 2), ScreenUtil().setWidth(2),
  864 + color: MyColours.color_efefef),
  865 + Row(
  866 + mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  867 + children: [
  868 + InkWell(
  869 + child: Container(
  870 + height: ScreenUtil().setWidth(47 * 2),
  871 + alignment: Alignment.center,
  872 + child: Text(
  873 + "信息有误",
  874 + style: TextStyle(
  875 + color: MyColours.color_666666,
  876 + fontSize: ScreenUtil().setSp(34)),
  877 + ),
  878 + ),
  879 + onTap: () {
  880 + Navigator.pop(context, '');
  881 + },
  882 + ),
  883 + Container(
  884 + color: MyColours.color_efefef,
  885 + width: ScreenUtil().setWidth(2),
  886 + height: ScreenUtil().setWidth(47 * 2),
  887 + ),
  888 + InkWell(
  889 + child: Container(
  890 + height: ScreenUtil().setWidth(47 * 2),
  891 + alignment: Alignment.center,
  892 + child: Text(
  893 + "确认无误",
  894 + style: TextStyle(
  895 + color: MyColours.color_199095,
  896 + fontSize: ScreenUtil().setSp(34)),
  897 + ),
  898 + ),
  899 + onTap: () {
  900 + Navigator.pop(context, '');
  901 + callback();
  902 + },
  903 + )
  904 + ],
  905 + )
  906 + ],
  907 + ),
  908 + ),
  909 + ),
  910 + );
774 }, 911 },
775 ); 912 );
776 913
@@ -110,4 +110,9 @@ class NavigatorUtil { @@ -110,4 +110,9 @@ class NavigatorUtil {
110 static void goBookTimeSetPage(BuildContext context) { 110 static void goBookTimeSetPage(BuildContext context) {
111 _navigateTo(context, "${Routes.book_time_set}"); 111 _navigateTo(context, "${Routes.book_time_set}");
112 } 112 }
  113 +
  114 + /// 可订时段管理
  115 + static void goReceiveOrdersTimeSetPage(BuildContext context) {
  116 + _navigateTo(context, "${Routes.receive_orders_time_set}");
  117 + }
113 } 118 }