Showing
12 changed files
with
1694 additions
and
858 deletions
lib/models/message_menu_model.dart
0 → 100644
| @@ -19,6 +19,7 @@ import 'package:one_key/widgets/h_empty_view.dart'; | @@ -19,6 +19,7 @@ import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 19 | import 'package:one_key/widgets/need_item.dart'; | 19 | import 'package:one_key/widgets/need_item.dart'; |
| 20 | import 'package:one_key/widgets/page_exception.dart'; | 20 | import 'package:one_key/widgets/page_exception.dart'; |
| 21 | import 'package:one_key/widgets/row_multi_text.dart'; | 21 | import 'package:one_key/widgets/row_multi_text.dart'; |
| 22 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 22 | import 'package:one_key/widgets/table_item.dart'; | 23 | import 'package:one_key/widgets/table_item.dart'; |
| 23 | import 'package:one_key/models/table.dart' as t; | 24 | import 'package:one_key/models/table.dart' as t; |
| 24 | import 'package:one_key/widgets/v_empty_view.dart'; | 25 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -398,314 +399,293 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { | @@ -398,314 +399,293 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { | ||
| 398 | Widget build(BuildContext context) { | 399 | Widget build(BuildContext context) { |
| 399 | detailModel = Provider.of<NotebookDetailModel>(context, listen: true); | 400 | detailModel = Provider.of<NotebookDetailModel>(context, listen: true); |
| 400 | return Scaffold( | 401 | return Scaffold( |
| 402 | + appBar: SystemAppBar( | ||
| 403 | + "在线预订详情", | ||
| 404 | + onTap: () { | ||
| 405 | + if (widget.fromNotify) { | ||
| 406 | + NavigatorUtil.goHomePage(context, initialIndex: 0); | ||
| 407 | + } else { | ||
| 408 | + Navigator.of(context).pop(); | ||
| 409 | + } | ||
| 410 | + }, | ||
| 411 | + ), | ||
| 401 | body: SafeArea( | 412 | body: SafeArea( |
| 402 | child: WillPopScope( | 413 | child: WillPopScope( |
| 403 | - child: Column( | ||
| 404 | - children: <Widget>[ | ||
| 405 | - MyAppBar( | ||
| 406 | - "在线预订详情", | ||
| 407 | - showBack: true, | ||
| 408 | - callback: () { | ||
| 409 | - if (widget.fromNotify) { | ||
| 410 | - NavigatorUtil.goHomePage(context, initialIndex: 0); | ||
| 411 | - } else { | ||
| 412 | - Navigator.of(context).pop(); | ||
| 413 | - } | ||
| 414 | - }, | ||
| 415 | - ), | ||
| 416 | - Expanded(child: Consumer<NotebookDetailModel>( | ||
| 417 | - builder: (context, model, _) { | ||
| 418 | - if (model.pageState != PageState.Success) { | ||
| 419 | - return ExceptionPage( | ||
| 420 | - pageState: model.pageState, | ||
| 421 | - callback: () { | ||
| 422 | - _getOrderListData(); | ||
| 423 | - }, | ||
| 424 | - emptyMsg: "暂时没有预订列表信息哦", | ||
| 425 | - emptyImg: "empty_search", | ||
| 426 | - showMsg: "加载中,请稍后...", | ||
| 427 | - ); | ||
| 428 | - } else { | ||
| 429 | - return Expanded( | ||
| 430 | - child: DefaultTextStyle( | ||
| 431 | - style: TextStyle(decoration: TextDecoration.none), | ||
| 432 | - child: Container( | ||
| 433 | - color: MyColours.color_ffffff, | ||
| 434 | - child: Column( | ||
| 435 | - children: <Widget>[ | ||
| 436 | - Expanded( | ||
| 437 | - child: SingleChildScrollView( | ||
| 438 | - child: Container( | ||
| 439 | - color: MyColours.color_ffffff, | ||
| 440 | - padding: EdgeInsets.symmetric( | ||
| 441 | - horizontal: | ||
| 442 | - ScreenUtil().setWidth(43)), | ||
| 443 | - child: Column( | ||
| 444 | - children: <Widget>[ | ||
| 445 | - RowMultiText( | ||
| 446 | - "用餐时段", detailEntity.ddateMd), | ||
| 447 | - Stack( | ||
| 448 | - alignment: Alignment.center, | ||
| 449 | - children: <Widget>[ | ||
| 450 | - Column( | ||
| 451 | - children: <Widget>[ | ||
| 452 | - RowMultiText("用餐时间", | ||
| 453 | - detailEntity.ddateHm), | ||
| 454 | - Offstage( | ||
| 455 | - offstage: | ||
| 456 | - detailEntity.type == "0" | ||
| 457 | - ? false | ||
| 458 | - : true, | ||
| 459 | - child: RowMultiText("用餐人数", | ||
| 460 | - detailEntity.pnum), | ||
| 461 | - ) | ||
| 462 | - ], | ||
| 463 | - ), | ||
| 464 | - Image.asset( | ||
| 465 | - detailEntity.statuImgAssets, | ||
| 466 | - width: | ||
| 467 | - ScreenUtil().setWidth(100), | ||
| 468 | - height: | ||
| 469 | - ScreenUtil().setWidth(30), | ||
| 470 | - ) | ||
| 471 | - ], | ||
| 472 | - ), | ||
| 473 | - RowMultiText( | ||
| 474 | - "包间需求", | ||
| 475 | - (detailEntity.demands.length | ||
| 476 | - .toString() + | ||
| 477 | - "个") ?? | ||
| 478 | - ""), | ||
| 479 | - Align( | ||
| 480 | - alignment: Alignment.centerRight, | ||
| 481 | - child: Offstage( | ||
| 482 | - offstage: detailEntity | ||
| 483 | - .demands.length > | ||
| 484 | - 0 | ||
| 485 | - ? false | ||
| 486 | - : true, | ||
| 487 | - child: Container( | ||
| 488 | - height: ScreenUtil() | ||
| 489 | - .setHeight(210), | ||
| 490 | - child: ListView.builder( | ||
| 491 | - itemBuilder: | ||
| 492 | - (BuildContext contxt, | ||
| 493 | - int index) { | ||
| 494 | - return NeedItem( | ||
| 495 | - detailEntity | ||
| 496 | - .demands[index]); | ||
| 497 | - }, | ||
| 498 | - itemCount: detailEntity | ||
| 499 | - .demands.length, | ||
| 500 | - shrinkWrap: true, | ||
| 501 | - scrollDirection: | ||
| 502 | - Axis.horizontal, | ||
| 503 | - ), | ||
| 504 | - ), | ||
| 505 | - )), | ||
| 506 | - RowMultiText( | ||
| 507 | - "客户姓名", detailEntity.rnameStr), | ||
| 508 | - RowMultiText("客户电话", formatPhone), | ||
| 509 | - RowMultiText("备注信息", | ||
| 510 | - detailEntity.cusdem ?? ""), | ||
| 511 | - MyDivider(double.infinity, | ||
| 512 | - ScreenUtil().setHeight(1)), | ||
| 513 | - Container( | ||
| 514 | - color: MyColours.color_ffffff, | ||
| 515 | - width: double.infinity, | ||
| 516 | - height: ScreenUtil().setHeight(80), | ||
| 517 | - alignment: Alignment.center, | ||
| 518 | - child: Stack( | ||
| 519 | - alignment: Alignment.center, | 414 | + child: Consumer<NotebookDetailModel>(builder: (context, model, _) { |
| 415 | + if (model.pageState != PageState.Success) { | ||
| 416 | + return ExceptionPage( | ||
| 417 | + pageState: model.pageState, | ||
| 418 | + callback: () { | ||
| 419 | + _getOrderListData(); | ||
| 420 | + }, | ||
| 421 | + emptyMsg: "暂时没有预订列表信息哦", | ||
| 422 | + emptyImg: "empty_search", | ||
| 423 | + showMsg: "加载中,请稍后...", | ||
| 424 | + ); | ||
| 425 | + } else { | ||
| 426 | + return Expanded( | ||
| 427 | + child: DefaultTextStyle( | ||
| 428 | + style: TextStyle(decoration: TextDecoration.none), | ||
| 429 | + child: Container( | ||
| 430 | + color: MyColours.color_ffffff, | ||
| 431 | + child: Column( | ||
| 432 | + children: <Widget>[ | ||
| 433 | + Expanded( | ||
| 434 | + child: SingleChildScrollView( | ||
| 435 | + child: Container( | ||
| 436 | + color: MyColours.color_ffffff, | ||
| 437 | + padding: EdgeInsets.symmetric( | ||
| 438 | + horizontal: ScreenUtil().setWidth(43)), | ||
| 439 | + child: Column( | ||
| 440 | + children: <Widget>[ | ||
| 441 | + RowMultiText( | ||
| 442 | + "用餐时段", detailEntity.ddateMd), | ||
| 443 | + Stack( | ||
| 444 | + alignment: Alignment.center, | ||
| 445 | + children: <Widget>[ | ||
| 446 | + Column( | ||
| 520 | children: <Widget>[ | 447 | children: <Widget>[ |
| 521 | - Positioned( | ||
| 522 | - left: 0, | ||
| 523 | - child: Text( | ||
| 524 | - "客户经理", | ||
| 525 | - style: TextStyle( | ||
| 526 | - color: MyColours | ||
| 527 | - .color_828282, | ||
| 528 | - fontSize: ScreenUtil() | ||
| 529 | - .setSp(30)), | ||
| 530 | - ), | ||
| 531 | - ), | ||
| 532 | - Positioned( | ||
| 533 | - right: 0, | ||
| 534 | - child: GestureDetector( | ||
| 535 | - onTap: () async { | ||
| 536 | - List<String> list = []; | ||
| 537 | - for (Manager manager | ||
| 538 | - in managers) { | ||
| 539 | - list.add(manager | ||
| 540 | - .roleUserName); | ||
| 541 | - } | ||
| 542 | - DialogUtil | ||
| 543 | - .showSelectCusmanDialog( | ||
| 544 | - context, list, | ||
| 545 | - (value) { | ||
| 546 | - if (value != null) { | ||
| 547 | - setState(() { | ||
| 548 | - cusmanText = | ||
| 549 | - managers[value | ||
| 550 | - .first] | ||
| 551 | - .userName; | ||
| 552 | - }); | ||
| 553 | - _setCurrManager(); | ||
| 554 | - } | ||
| 555 | - }).then((value) {}); | ||
| 556 | - }, | ||
| 557 | - child: Text( | ||
| 558 | - cusmanText, | ||
| 559 | - style: TextStyle( | ||
| 560 | - color: MyColours | ||
| 561 | - .color_353535, | ||
| 562 | - fontSize: ScreenUtil() | ||
| 563 | - .setSp(30), | ||
| 564 | - decoration: | ||
| 565 | - TextDecoration | ||
| 566 | - .underline, | ||
| 567 | - ), | ||
| 568 | - ), | ||
| 569 | - ), | 448 | + RowMultiText("用餐时间", |
| 449 | + detailEntity.ddateHm), | ||
| 450 | + Offstage( | ||
| 451 | + offstage: | ||
| 452 | + detailEntity.type == "0" | ||
| 453 | + ? false | ||
| 454 | + : true, | ||
| 455 | + child: RowMultiText("用餐人数", | ||
| 456 | + detailEntity.pnum), | ||
| 570 | ) | 457 | ) |
| 571 | ], | 458 | ], |
| 572 | ), | 459 | ), |
| 573 | - ), | ||
| 574 | - ], | ||
| 575 | - )), | ||
| 576 | - ), | ||
| 577 | - ), | ||
| 578 | - Offstage( | ||
| 579 | - offstage: detailEntity.status != "0", | ||
| 580 | - child: Container( | ||
| 581 | - margin: EdgeInsets.only( | ||
| 582 | - top: ScreenUtil().setHeight(30), | ||
| 583 | - bottom: ScreenUtil().setHeight(30)), | ||
| 584 | - child: Column( | ||
| 585 | - children: <Widget>[ | ||
| 586 | - CommonButton( | ||
| 587 | - content: "安排包间", | ||
| 588 | - width: 669, | ||
| 589 | - height: 84, | ||
| 590 | - fontSize: 34, | ||
| 591 | - onPress: () async { | ||
| 592 | - Map map = await NavigatorUtil | ||
| 593 | - .goSelectTablePage( | ||
| 594 | - context, | ||
| 595 | - widget.rid, | ||
| 596 | - int.parse( | ||
| 597 | - detailEntity.ddate) * | ||
| 598 | - 1000, | ||
| 599 | - detailEntity.ddate_solt); | ||
| 600 | - if (map != null && | ||
| 601 | - map['tid'] != null) { | ||
| 602 | - setReserveStatus("5", | ||
| 603 | - tid: map['tid']); | ||
| 604 | - } | ||
| 605 | - }, | ||
| 606 | - ), | ||
| 607 | - VEmptyView(20), | ||
| 608 | - Container( | ||
| 609 | - width: ScreenUtil().setWidth(669), | ||
| 610 | - height: ScreenUtil().setWidth(84), | ||
| 611 | - decoration: BoxDecoration( | ||
| 612 | - border: Border.all( | ||
| 613 | - color: MyColours.color_199095), | ||
| 614 | - borderRadius: BorderRadius.circular( | ||
| 615 | - ScreenUtil().setWidth(10)), | 460 | + Image.asset( |
| 461 | + detailEntity.statuImgAssets, | ||
| 462 | + width: ScreenUtil().setWidth(100), | ||
| 463 | + height: ScreenUtil().setWidth(30), | ||
| 464 | + ) | ||
| 465 | + ], | ||
| 616 | ), | 466 | ), |
| 617 | - child: Row( | ||
| 618 | - crossAxisAlignment: | ||
| 619 | - CrossAxisAlignment.center, | ||
| 620 | - children: <Widget>[ | ||
| 621 | - Expanded( | ||
| 622 | - child: GestureDetector( | ||
| 623 | - child: Center( | 467 | + RowMultiText( |
| 468 | + "包间需求", | ||
| 469 | + (detailEntity.demands.length | ||
| 470 | + .toString() + | ||
| 471 | + "个") ?? | ||
| 472 | + ""), | ||
| 473 | + Align( | ||
| 474 | + alignment: Alignment.centerRight, | ||
| 475 | + child: Offstage( | ||
| 476 | + offstage: | ||
| 477 | + detailEntity.demands.length > | ||
| 478 | + 0 | ||
| 479 | + ? false | ||
| 480 | + : true, | ||
| 481 | + child: Container( | ||
| 482 | + height: | ||
| 483 | + ScreenUtil().setHeight(210), | ||
| 484 | + child: ListView.builder( | ||
| 485 | + itemBuilder: | ||
| 486 | + (BuildContext contxt, | ||
| 487 | + int index) { | ||
| 488 | + return NeedItem(detailEntity | ||
| 489 | + .demands[index]); | ||
| 490 | + }, | ||
| 491 | + itemCount: detailEntity | ||
| 492 | + .demands.length, | ||
| 493 | + shrinkWrap: true, | ||
| 494 | + scrollDirection: | ||
| 495 | + Axis.horizontal, | ||
| 496 | + ), | ||
| 497 | + ), | ||
| 498 | + )), | ||
| 499 | + RowMultiText( | ||
| 500 | + "客户姓名", detailEntity.rnameStr), | ||
| 501 | + RowMultiText("客户电话", formatPhone), | ||
| 502 | + RowMultiText( | ||
| 503 | + "备注信息", detailEntity.cusdem ?? ""), | ||
| 504 | + MyDivider(double.infinity, | ||
| 505 | + ScreenUtil().setHeight(1)), | ||
| 506 | + Container( | ||
| 507 | + color: MyColours.color_ffffff, | ||
| 508 | + width: double.infinity, | ||
| 509 | + height: ScreenUtil().setHeight(80), | ||
| 510 | + alignment: Alignment.center, | ||
| 511 | + child: Stack( | ||
| 512 | + alignment: Alignment.center, | ||
| 513 | + children: <Widget>[ | ||
| 514 | + Positioned( | ||
| 515 | + left: 0, | ||
| 624 | child: Text( | 516 | child: Text( |
| 625 | - "拒绝订单", | 517 | + "客户经理", |
| 626 | style: TextStyle( | 518 | style: TextStyle( |
| 627 | color: MyColours | 519 | color: MyColours |
| 628 | - .color_199095, | 520 | + .color_828282, |
| 629 | fontSize: ScreenUtil() | 521 | fontSize: ScreenUtil() |
| 630 | - .setSp(34)), | 522 | + .setSp(30)), |
| 631 | ), | 523 | ), |
| 632 | ), | 524 | ), |
| 633 | - onTap: () { | ||
| 634 | - _showRefuseDialog2(); | ||
| 635 | - }, | ||
| 636 | - )), | ||
| 637 | - Offstage( | ||
| 638 | - offstage: !isCallTel, | ||
| 639 | - child: SizedBox( | ||
| 640 | - width: | ||
| 641 | - ScreenUtil().setWidth(335), | ||
| 642 | - height: | ||
| 643 | - ScreenUtil().setWidth(84), | ||
| 644 | - child: Row( | ||
| 645 | - children: [ | ||
| 646 | - MyDivider( | ||
| 647 | - ScreenUtil().setWidth(2), | ||
| 648 | - ScreenUtil() | ||
| 649 | - .setHeight(52), | 525 | + Positioned( |
| 526 | + right: 0, | ||
| 527 | + child: GestureDetector( | ||
| 528 | + onTap: () async { | ||
| 529 | + List<String> list = []; | ||
| 530 | + for (Manager manager | ||
| 531 | + in managers) { | ||
| 532 | + list.add( | ||
| 533 | + manager.roleUserName); | ||
| 534 | + } | ||
| 535 | + DialogUtil | ||
| 536 | + .showSelectCusmanDialog( | ||
| 537 | + context, list, | ||
| 538 | + (value) { | ||
| 539 | + if (value != null) { | ||
| 540 | + setState(() { | ||
| 541 | + cusmanText = managers[ | ||
| 542 | + value.first] | ||
| 543 | + .userName; | ||
| 544 | + }); | ||
| 545 | + _setCurrManager(); | ||
| 546 | + } | ||
| 547 | + }).then((value) {}); | ||
| 548 | + }, | ||
| 549 | + child: Text( | ||
| 550 | + cusmanText, | ||
| 551 | + style: TextStyle( | ||
| 650 | color: MyColours | 552 | color: MyColours |
| 651 | - .color_199095, | 553 | + .color_353535, |
| 554 | + fontSize: ScreenUtil() | ||
| 555 | + .setSp(30), | ||
| 556 | + decoration: TextDecoration | ||
| 557 | + .underline, | ||
| 652 | ), | 558 | ), |
| 653 | - Expanded( | ||
| 654 | - child: GestureDetector( | ||
| 655 | - child: Center( | ||
| 656 | - child: Text( | ||
| 657 | - "联系顾客", | ||
| 658 | - style: TextStyle( | ||
| 659 | - color: MyColours | ||
| 660 | - .color_199095, | ||
| 661 | - fontSize: | ||
| 662 | - ScreenUtil() | ||
| 663 | - .setSp( | ||
| 664 | - 34)), | ||
| 665 | - ), | ||
| 666 | - ), | ||
| 667 | - onTap: () { | ||
| 668 | - if (detailEntity | ||
| 669 | - .phone != | ||
| 670 | - null && | ||
| 671 | - detailEntity.phone | ||
| 672 | - .isNotEmpty) { | ||
| 673 | - Utils.goPhone( | ||
| 674 | - detailEntity | ||
| 675 | - .phone); | ||
| 676 | - } else { | ||
| 677 | - Utils.showToast( | ||
| 678 | - "没有客户电话!"); | ||
| 679 | - } | ||
| 680 | - }, | ||
| 681 | - )), | ||
| 682 | - ], | 559 | + ), |
| 683 | ), | 560 | ), |
| 684 | - ), | ||
| 685 | - ) | ||
| 686 | - ], | 561 | + ) |
| 562 | + ], | ||
| 563 | + ), | ||
| 687 | ), | 564 | ), |
| 688 | - ) | ||
| 689 | - ], | ||
| 690 | - ), | 565 | + ], |
| 566 | + )), | ||
| 567 | + ), | ||
| 568 | + ), | ||
| 569 | + Offstage( | ||
| 570 | + offstage: detailEntity.status != "0", | ||
| 571 | + child: Container( | ||
| 572 | + margin: EdgeInsets.only( | ||
| 573 | + top: ScreenUtil().setHeight(30), | ||
| 574 | + bottom: ScreenUtil().setHeight(30)), | ||
| 575 | + child: Column( | ||
| 576 | + children: <Widget>[ | ||
| 577 | + CommonButton( | ||
| 578 | + content: "安排包间", | ||
| 579 | + width: 669, | ||
| 580 | + height: 84, | ||
| 581 | + fontSize: 34, | ||
| 582 | + onPress: () async { | ||
| 583 | + Map map = await NavigatorUtil | ||
| 584 | + .goSelectTablePage( | ||
| 585 | + context, | ||
| 586 | + widget.rid, | ||
| 587 | + int.parse(detailEntity.ddate) * | ||
| 588 | + 1000, | ||
| 589 | + detailEntity.ddate_solt); | ||
| 590 | + if (map != null && map['tid'] != null) { | ||
| 591 | + setReserveStatus("5", | ||
| 592 | + tid: map['tid']); | ||
| 593 | + } | ||
| 594 | + }, | ||
| 595 | + ), | ||
| 596 | + VEmptyView(20), | ||
| 597 | + Container( | ||
| 598 | + width: ScreenUtil().setWidth(669), | ||
| 599 | + height: ScreenUtil().setWidth(84), | ||
| 600 | + decoration: BoxDecoration( | ||
| 601 | + border: Border.all( | ||
| 602 | + color: MyColours.color_199095), | ||
| 603 | + borderRadius: BorderRadius.circular( | ||
| 604 | + ScreenUtil().setWidth(10)), | ||
| 605 | + ), | ||
| 606 | + child: Row( | ||
| 607 | + crossAxisAlignment: | ||
| 608 | + CrossAxisAlignment.center, | ||
| 609 | + children: <Widget>[ | ||
| 610 | + Expanded( | ||
| 611 | + child: GestureDetector( | ||
| 612 | + child: Center( | ||
| 613 | + child: Text( | ||
| 614 | + "拒绝订单", | ||
| 615 | + style: TextStyle( | ||
| 616 | + color: | ||
| 617 | + MyColours.color_199095, | ||
| 618 | + fontSize: | ||
| 619 | + ScreenUtil().setSp(34)), | ||
| 620 | + ), | ||
| 621 | + ), | ||
| 622 | + onTap: () { | ||
| 623 | + _showRefuseDialog2(); | ||
| 624 | + }, | ||
| 625 | + )), | ||
| 626 | + Offstage( | ||
| 627 | + offstage: !isCallTel, | ||
| 628 | + child: SizedBox( | ||
| 629 | + width: ScreenUtil().setWidth(335), | ||
| 630 | + height: ScreenUtil().setWidth(84), | ||
| 631 | + child: Row( | ||
| 632 | + children: [ | ||
| 633 | + MyDivider( | ||
| 634 | + ScreenUtil().setWidth(2), | ||
| 635 | + ScreenUtil().setHeight(52), | ||
| 636 | + color: | ||
| 637 | + MyColours.color_199095, | ||
| 638 | + ), | ||
| 639 | + Expanded( | ||
| 640 | + child: GestureDetector( | ||
| 641 | + child: Center( | ||
| 642 | + child: Text( | ||
| 643 | + "联系顾客", | ||
| 644 | + style: TextStyle( | ||
| 645 | + color: MyColours | ||
| 646 | + .color_199095, | ||
| 647 | + fontSize: | ||
| 648 | + ScreenUtil() | ||
| 649 | + .setSp(34)), | ||
| 650 | + ), | ||
| 651 | + ), | ||
| 652 | + onTap: () { | ||
| 653 | + if (detailEntity.phone != | ||
| 654 | + null && | ||
| 655 | + detailEntity.phone | ||
| 656 | + .isNotEmpty) { | ||
| 657 | + Utils.goPhone( | ||
| 658 | + detailEntity.phone); | ||
| 659 | + } else { | ||
| 660 | + Utils.showToast( | ||
| 661 | + "没有客户电话!"); | ||
| 662 | + } | ||
| 663 | + }, | ||
| 664 | + )), | ||
| 665 | + ], | ||
| 666 | + ), | ||
| 667 | + ), | ||
| 668 | + ) | ||
| 669 | + ], | ||
| 670 | + ), | ||
| 671 | + ) | ||
| 672 | + ], | ||
| 691 | ), | 673 | ), |
| 692 | - ) | ||
| 693 | - ], | ||
| 694 | - ))), | ||
| 695 | - ); | ||
| 696 | - } | ||
| 697 | - }, | ||
| 698 | - )) | ||
| 699 | - ], | ||
| 700 | - ), | ||
| 701 | - onWillPop: () async { | ||
| 702 | - if (widget.fromNotify) { | ||
| 703 | - NavigatorUtil.goHomePage(context, initialIndex: 0); | ||
| 704 | - return true; | ||
| 705 | - } | ||
| 706 | - Navigator.of(context).pop(); | ||
| 707 | - return true; | ||
| 708 | - }, | ||
| 709 | - ))); | 674 | + ), |
| 675 | + ) | ||
| 676 | + ], | ||
| 677 | + ))), | ||
| 678 | + ); | ||
| 679 | + } | ||
| 680 | + }), | ||
| 681 | + onWillPop: () async { | ||
| 682 | + if (widget.fromNotify) { | ||
| 683 | + NavigatorUtil.goHomePage(context, initialIndex: 0); | ||
| 684 | + return true; | ||
| 685 | + } | ||
| 686 | + Navigator.of(context).pop(); | ||
| 687 | + return true; | ||
| 688 | + }, | ||
| 689 | + ))); | ||
| 710 | } | 690 | } |
| 711 | } | 691 | } |
| @@ -37,6 +37,7 @@ import 'package:one_key/widgets/need_item.dart'; | @@ -37,6 +37,7 @@ import 'package:one_key/widgets/need_item.dart'; | ||
| 37 | import 'package:one_key/widgets/page_exception.dart'; | 37 | import 'package:one_key/widgets/page_exception.dart'; |
| 38 | import 'package:one_key/widgets/round_button.dart'; | 38 | import 'package:one_key/widgets/round_button.dart'; |
| 39 | import 'package:one_key/widgets/row_multi_text.dart'; | 39 | import 'package:one_key/widgets/row_multi_text.dart'; |
| 40 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 40 | import 'package:one_key/widgets/table_item.dart'; | 41 | import 'package:one_key/widgets/table_item.dart'; |
| 41 | import 'package:one_key/models/table.dart' as t; | 42 | import 'package:one_key/models/table.dart' as t; |
| 42 | import 'package:one_key/widgets/v_empty_view.dart'; | 43 | import 'package:one_key/widgets/v_empty_view.dart'; |
| @@ -1188,22 +1189,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1188,22 +1189,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1188 | }, | 1189 | }, |
| 1189 | child: SafeArea( | 1190 | child: SafeArea( |
| 1190 | child: WillPopScope( | 1191 | child: WillPopScope( |
| 1191 | - child: Container( | ||
| 1192 | - color: MyColours.color_ffffff, | ||
| 1193 | - child: Column( | ||
| 1194 | - children: <Widget>[ | ||
| 1195 | - MyAppBar( | ||
| 1196 | - "订座详情", | ||
| 1197 | - showBack: true, | ||
| 1198 | - callback: () { | ||
| 1199 | - if (widget.fromNotify) { | 1192 | + child: Scaffold( |
| 1193 | + appBar: SystemAppBar( "订座详情",onTap: (){ | ||
| 1194 | + if (widget.fromNotify) { | ||
| 1200 | NavigatorUtil.goHomePage(context, initialIndex: 0); | 1195 | NavigatorUtil.goHomePage(context, initialIndex: 0); |
| 1201 | } else { | 1196 | } else { |
| 1202 | Navigator.of(context).pop(); | 1197 | Navigator.of(context).pop(); |
| 1203 | } | 1198 | } |
| 1204 | - }, | ||
| 1205 | - ), | ||
| 1206 | - Expanded(child: Consumer<NotebookDetailModel>( | 1199 | + },), |
| 1200 | + body: Consumer<NotebookDetailModel>( | ||
| 1207 | builder: (context1, model, _) { | 1201 | builder: (context1, model, _) { |
| 1208 | if (model.pageState != PageState.Success) { | 1202 | if (model.pageState != PageState.Success) { |
| 1209 | return ExceptionPage( | 1203 | return ExceptionPage( |
| @@ -3083,9 +3077,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -3083,9 +3077,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 3083 | ], | 3077 | ], |
| 3084 | ); | 3078 | ); |
| 3085 | } | 3079 | } |
| 3086 | - })), | ||
| 3087 | - ], | ||
| 3088 | - ), | 3080 | + }) |
| 3089 | ), | 3081 | ), |
| 3090 | onWillPop: () async { | 3082 | onWillPop: () async { |
| 3091 | if (widget.fromNotify) { | 3083 | if (widget.fromNotify) { |
lib/pages/message/message_dialog_item_f.dart
0 → 100644
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 4 | +import 'package:one_key/models/message.dart'; | ||
| 5 | +import 'package:one_key/pages/detail/handle_online_page.dart'; | ||
| 6 | +import 'package:one_key/pages/home/home_page.dart'; | ||
| 7 | +import 'package:one_key/provider/message_dialog_model.dart'; | ||
| 8 | +import 'package:one_key/provider/user_model.dart'; | ||
| 9 | +import 'package:one_key/res/colors.dart'; | ||
| 10 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 11 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 12 | +import 'package:one_key/utils/utils.dart'; | ||
| 13 | +import 'package:one_key/widgets/common_button.dart'; | ||
| 14 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 15 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 16 | +import 'package:provider/provider.dart'; | ||
| 17 | + | ||
| 18 | +import '../../app.dart'; | ||
| 19 | + | ||
| 20 | +class MessageDialogItemF extends StatelessWidget { | ||
| 21 | + final Message message; | ||
| 22 | + final bool isTreated; | ||
| 23 | + MessageDialogItemF(this.message, {this.isTreated = false}); | ||
| 24 | + | ||
| 25 | + @override | ||
| 26 | + Widget build(BuildContext context) { | ||
| 27 | + // TODO: implement build | ||
| 28 | + Color textColor = | ||
| 29 | + isTreated ? MyColours.color_999999 : MyColours.color_353535; | ||
| 30 | + String titleText = ""; | ||
| 31 | + String subTitleTextFir = ""; | ||
| 32 | + String subTitleTextSec = ""; | ||
| 33 | + String attr = ''; | ||
| 34 | + Color bgcolor = MyColours.color_438E93; | ||
| 35 | + String btnname = 'online_go'; | ||
| 36 | + if (message.message_type == "10") { | ||
| 37 | + titleText = "在线\n预订"; | ||
| 38 | + subTitleTextFir = '包间需求'; | ||
| 39 | + subTitleTextSec = '就餐时间'; | ||
| 40 | + } else if (message.message_type == "11") { | ||
| 41 | + titleText = "取消\n预订"; | ||
| 42 | + bgcolor = MyColours.color_999999; | ||
| 43 | + btnname = 'cancel_go'; | ||
| 44 | + } else if (message.message_type == "1") { | ||
| 45 | + titleText = "提前\n点餐"; | ||
| 46 | + subTitleTextFir = '桌位信息'; | ||
| 47 | + subTitleTextSec = '就餐时间'; | ||
| 48 | + bgcolor = MyColours.color_F78D94; | ||
| 49 | + btnname = 'order_go'; | ||
| 50 | + } else if (message.message_type == "12") { | ||
| 51 | + titleText = "在线\n买单"; | ||
| 52 | + subTitleTextFir = '桌位信息'; | ||
| 53 | + subTitleTextSec = '申请时间'; | ||
| 54 | + bgcolor = MyColours.color_F2995F; | ||
| 55 | + btnname = 'online_order_go'; | ||
| 56 | + } else if (message.message_type == "13") { | ||
| 57 | + titleText = "买单\n通知"; | ||
| 58 | + subTitleTextFir = '桌位信息'; | ||
| 59 | + subTitleTextSec = '申请时间'; | ||
| 60 | + } else if (message.message_type == "14") { | ||
| 61 | + titleText = "发票\n申请"; | ||
| 62 | + subTitleTextFir = '桌位信息'; | ||
| 63 | + subTitleTextSec = '申请时间'; | ||
| 64 | + } else if (message.message_type == "店内消息") { | ||
| 65 | + titleText = "店内\n消息"; | ||
| 66 | + bgcolor = MyColours.color_5F7292; | ||
| 67 | + btnname = 'store_info_go'; | ||
| 68 | + } | ||
| 69 | + if (isTreated) { | ||
| 70 | + bgcolor = MyColours.color_BFC4D4; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + MessageDialogModel messageDialogModel = | ||
| 74 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 75 | + return GestureDetector( | ||
| 76 | + onTap: () async { | ||
| 77 | + messageDialogModel.removeMessage(message.id); | ||
| 78 | + if (messageDialogModel.messages.length == 0) { | ||
| 79 | + Navigator.pop(context); | ||
| 80 | + } | ||
| 81 | + //message_type:10 跳转在线预订 11 取消订单 1 提前点餐 | ||
| 82 | + if (message.message_type == "10") { | ||
| 83 | + NavigatorUtil.goHandleOnlinePage( | ||
| 84 | + context, message.rid.toString(), message.id); | ||
| 85 | + } else if (message.message_type == "11") { | ||
| 86 | + NavigatorUtil.goNotebookDetailPage( | ||
| 87 | + context, message.rid.toString(), message.uid); | ||
| 88 | + bus.emit("remove_untreated_message", message.id); | ||
| 89 | + | ||
| 90 | + Map<String, String> params = { | ||
| 91 | + "sid": | ||
| 92 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 93 | + "id": message.id, | ||
| 94 | + "status": message.message_type == "1" ? "is_read" : "is_handle" | ||
| 95 | + }; | ||
| 96 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 97 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 98 | + } else if (message.message_type == "1") { | ||
| 99 | + //提前点餐 | ||
| 100 | + NavigatorUtil.goHasOrderFoodPage(context, rid: message.rid); | ||
| 101 | + bus.emit("remove_untreated_message", message.id); | ||
| 102 | + | ||
| 103 | + Map<String, String> params = { | ||
| 104 | + "sid": | ||
| 105 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 106 | + "id": message.id, | ||
| 107 | + "status": message.message_type == "1" ? "is_read" : "is_handle" | ||
| 108 | + }; | ||
| 109 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 110 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 111 | + } else if ('${message.message_type}' == "12") { | ||
| 112 | + //在线买单消息 去处理 跳转在线买单处理页面 | ||
| 113 | + NavigatorUtil.goOnlineCheckEditPage(context, | ||
| 114 | + rid: '${message.rid}', mid: message.id); | ||
| 115 | + } else if ('${message.message_type}' == "13") { | ||
| 116 | + //在线买单消息 去查看 跳转在线买单详情页面 | ||
| 117 | + NavigatorUtil.goOnlineCheckDetailPage(context, | ||
| 118 | + rid: '${message.rid}'); | ||
| 119 | + bus.emit("remove_untreated_message", message.id); | ||
| 120 | + | ||
| 121 | + Map<String, String> params = { | ||
| 122 | + "sid": | ||
| 123 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 124 | + "id": message.id, | ||
| 125 | + "status": message.message_type == "1" ? "is_read" : "is_handle" | ||
| 126 | + }; | ||
| 127 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 128 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 129 | + } else if (message.message_type == "14") { | ||
| 130 | + //发票详情页面跳转 | ||
| 131 | + NavigatorUtil.goInvoiceDetailPage(context, rid: '${message.rid}'); | ||
| 132 | + bus.emit("remove_untreated_message", message.id); | ||
| 133 | + | ||
| 134 | + Map<String, String> params = { | ||
| 135 | + "sid": | ||
| 136 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 137 | + "id": message.id, | ||
| 138 | + "status": message.message_type == "1" ? "is_read" : "is_handle" | ||
| 139 | + }; | ||
| 140 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 141 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 142 | + } | ||
| 143 | + }, | ||
| 144 | + child: Stack( | ||
| 145 | + children: <Widget>[ | ||
| 146 | + Container( | ||
| 147 | + margin: EdgeInsets.symmetric( | ||
| 148 | + horizontal: ScreenUtil().setWidth(24 * 2), | ||
| 149 | + vertical: ScreenUtil().setWidth(20)), | ||
| 150 | + padding: EdgeInsets.only( | ||
| 151 | + right: ScreenUtil().setWidth(32), | ||
| 152 | + ), | ||
| 153 | + decoration: BoxDecoration( | ||
| 154 | + border: Border.all( | ||
| 155 | + width: ScreenUtil().setWidth(2), color: bgcolor), | ||
| 156 | + borderRadius: BorderRadius.all( | ||
| 157 | + Radius.circular(ScreenUtil().setWidth(18)))), | ||
| 158 | + child: Row( | ||
| 159 | + // mainAxisSize: MainAxisSize.min, | ||
| 160 | + // crossAxisAlignment: CrossAxisAlignment.start, | ||
| 161 | + children: <Widget>[ | ||
| 162 | + Container( | ||
| 163 | + width: ScreenUtil().setWidth(128), | ||
| 164 | + height: ScreenUtil().setWidth(160), | ||
| 165 | + alignment: Alignment.center, | ||
| 166 | + decoration: BoxDecoration( | ||
| 167 | + color: bgcolor, | ||
| 168 | + borderRadius: BorderRadius.only( | ||
| 169 | + topLeft: Radius.circular(ScreenUtil().setWidth(16)), | ||
| 170 | + bottomLeft: | ||
| 171 | + Radius.circular(ScreenUtil().setWidth(16)))), | ||
| 172 | + child: Transform.translate( | ||
| 173 | + offset: Offset(0, 0.1 / 2), //1为 StrutStyle 的 leading的值 | ||
| 174 | + child: Text( | ||
| 175 | + titleText, | ||
| 176 | + style: TextStyle( | ||
| 177 | + color: MyColours.color_ffffff, | ||
| 178 | + fontSize: ScreenUtil().setSp(24), | ||
| 179 | + ), | ||
| 180 | + strutStyle: StrutStyle( | ||
| 181 | + forceStrutHeight: true, height: 1, leading: 0.1), | ||
| 182 | + ), | ||
| 183 | + ), | ||
| 184 | + ), | ||
| 185 | + HEmptyView(34), | ||
| 186 | + message.message_type == "10" || message.message_type == "12" | ||
| 187 | + ? Expanded( | ||
| 188 | + child: Column( | ||
| 189 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 190 | + children: <Widget>[ | ||
| 191 | + Container( | ||
| 192 | + height: ScreenUtil().setWidth(40), | ||
| 193 | + child: ListView.builder( | ||
| 194 | + itemCount: 1, | ||
| 195 | + shrinkWrap: true, | ||
| 196 | + scrollDirection: Axis.horizontal, | ||
| 197 | + itemBuilder: | ||
| 198 | + (BuildContext contxt, int index) { | ||
| 199 | + return Row(children: [ | ||
| 200 | + Padding( | ||
| 201 | + padding: EdgeInsets.only( | ||
| 202 | + right: | ||
| 203 | + ScreenUtil().setWidth(12)), | ||
| 204 | + child: Text( | ||
| 205 | + message.rnameStr, | ||
| 206 | + style: TextStyle( | ||
| 207 | + color: isTreated | ||
| 208 | + ? MyColours.color_BFC4D4 | ||
| 209 | + : MyColours.color_515151, | ||
| 210 | + fontSize: | ||
| 211 | + ScreenUtil().setSp(32)), | ||
| 212 | + )), | ||
| 213 | + attr == '' || attr == null | ||
| 214 | + ? Container( | ||
| 215 | + margin: EdgeInsets.only( | ||
| 216 | + right: ScreenUtil() | ||
| 217 | + .setWidth(12)), | ||
| 218 | + padding: EdgeInsets.symmetric( | ||
| 219 | + horizontal: ScreenUtil() | ||
| 220 | + .setWidth(16), | ||
| 221 | + vertical: ScreenUtil() | ||
| 222 | + .setWidth(6)), | ||
| 223 | + decoration: BoxDecoration( | ||
| 224 | + color: isTreated | ||
| 225 | + ? MyColours.color_BFC4D4 | ||
| 226 | + : attr == '沉睡' | ||
| 227 | + ? Color.fromRGBO( | ||
| 228 | + 223, 33, 81, 1) | ||
| 229 | + : attr == '活跃' | ||
| 230 | + ? Color | ||
| 231 | + .fromRGBO( | ||
| 232 | + 81, | ||
| 233 | + 170, | ||
| 234 | + 94, | ||
| 235 | + 1) | ||
| 236 | + : attr == '流失' | ||
| 237 | + ? Color | ||
| 238 | + .fromRGBO( | ||
| 239 | + 109, | ||
| 240 | + 101, | ||
| 241 | + 248, | ||
| 242 | + 1) | ||
| 243 | + : Color | ||
| 244 | + .fromRGBO( | ||
| 245 | + 239, | ||
| 246 | + 143, | ||
| 247 | + 49, | ||
| 248 | + 1), | ||
| 249 | + borderRadius: | ||
| 250 | + BorderRadius.circular( | ||
| 251 | + 8)), | ||
| 252 | + child: Text( | ||
| 253 | + '活跃', | ||
| 254 | + style: TextStyle( | ||
| 255 | + color: MyColours | ||
| 256 | + .color_ffffff, | ||
| 257 | + fontSize: ScreenUtil() | ||
| 258 | + .setSp(24)), | ||
| 259 | + ), | ||
| 260 | + ) | ||
| 261 | + : SizedBox(), | ||
| 262 | + Container( | ||
| 263 | + padding: EdgeInsets.symmetric( | ||
| 264 | + horizontal: | ||
| 265 | + ScreenUtil().setWidth(16), | ||
| 266 | + vertical: | ||
| 267 | + ScreenUtil().setWidth(6)), | ||
| 268 | + decoration: BoxDecoration( | ||
| 269 | + border: Border.all( | ||
| 270 | + width: ScreenUtil().setWidth(2), | ||
| 271 | + color: isTreated | ||
| 272 | + ? MyColours.color_BFC4D4 | ||
| 273 | + : MyColours.color_F2995F, | ||
| 274 | + ), | ||
| 275 | + borderRadius: | ||
| 276 | + BorderRadius.circular(8)), | ||
| 277 | + child: Text( | ||
| 278 | + 'biaoqianvipdsds', | ||
| 279 | + // overflow: TextOverflow.ellipsis, | ||
| 280 | + style: TextStyle( | ||
| 281 | + color: isTreated | ||
| 282 | + ? MyColours.color_BFC4D4 | ||
| 283 | + : MyColours.color_F2995F, | ||
| 284 | + fontSize: | ||
| 285 | + ScreenUtil().setSp(24)), | ||
| 286 | + ), | ||
| 287 | + ) | ||
| 288 | + ]); | ||
| 289 | + })), | ||
| 290 | + VEmptyView(16), | ||
| 291 | + Text( | ||
| 292 | + '${message.ddateStr}', | ||
| 293 | + style: TextStyle( | ||
| 294 | + color: isTreated | ||
| 295 | + ? MyColours.color_BFC4D4 | ||
| 296 | + : MyColours.color_999999, | ||
| 297 | + fontSize: ScreenUtil().setSp(24)), | ||
| 298 | + ), | ||
| 299 | + VEmptyView(8), | ||
| 300 | + Container( | ||
| 301 | + padding: EdgeInsets.symmetric( | ||
| 302 | + horizontal: ScreenUtil().setWidth(16), | ||
| 303 | + vertical: ScreenUtil().setWidth(6)), | ||
| 304 | + decoration: BoxDecoration( | ||
| 305 | + color: bgcolor, | ||
| 306 | + borderRadius: BorderRadius.circular(8)), | ||
| 307 | + child: Text( | ||
| 308 | + '${message.message_type == '1' ? message.room_info : message.room_demand}', | ||
| 309 | + style: TextStyle( | ||
| 310 | + color: MyColours.color_ffffff, | ||
| 311 | + fontSize: ScreenUtil().setSp(20)), | ||
| 312 | + ), | ||
| 313 | + ) | ||
| 314 | + ], | ||
| 315 | + )) | ||
| 316 | + : SizedBox(), | ||
| 317 | + message.message_type == "11" || message.message_type == "1" | ||
| 318 | + ? Column( | ||
| 319 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 320 | + children: [ | ||
| 321 | + Text( | ||
| 322 | + "预订日期:${message.ddateStr}", | ||
| 323 | + style: TextStyle( | ||
| 324 | + color: MyColours.color_BFC4D4, | ||
| 325 | + fontSize: ScreenUtil().setSp(28)), | ||
| 326 | + ), | ||
| 327 | + VEmptyView(8), | ||
| 328 | + message.room_demand == '' | ||
| 329 | + ? SizedBox() | ||
| 330 | + : Container( | ||
| 331 | + padding: EdgeInsets.symmetric( | ||
| 332 | + horizontal: ScreenUtil().setWidth(16), | ||
| 333 | + vertical: ScreenUtil().setWidth(6)), | ||
| 334 | + decoration: BoxDecoration( | ||
| 335 | + color: bgcolor, | ||
| 336 | + borderRadius: BorderRadius.circular(8)), | ||
| 337 | + child: Text( | ||
| 338 | + '${message.room_demand}', | ||
| 339 | + style: TextStyle( | ||
| 340 | + color: MyColours.color_ffffff, | ||
| 341 | + fontSize: ScreenUtil().setSp(20)), | ||
| 342 | + ), | ||
| 343 | + ), | ||
| 344 | + message.message_type == "1" | ||
| 345 | + ? SizedBox() | ||
| 346 | + : Text( | ||
| 347 | + true ? '取消操作人:顾客在线取消' : '取消操作人:方硕', | ||
| 348 | + style: TextStyle( | ||
| 349 | + color: isTreated | ||
| 350 | + ? MyColours.color_BFC4D4 | ||
| 351 | + : MyColours.color_999999, | ||
| 352 | + fontSize: ScreenUtil().setSp(24)), | ||
| 353 | + ) | ||
| 354 | + ], | ||
| 355 | + ) | ||
| 356 | + : SizedBox(), | ||
| 357 | + message.message_type == "店内消息" | ||
| 358 | + ? Column( | ||
| 359 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 360 | + children: [ | ||
| 361 | + Text( | ||
| 362 | + "请确认 2022-04-02 午餐 客人是否会如约到店!", | ||
| 363 | + style: TextStyle( | ||
| 364 | + color: isTreated | ||
| 365 | + ? MyColours.color_BFC4D4 | ||
| 366 | + : MyColours.color_515151, | ||
| 367 | + fontSize: ScreenUtil().setSp(28)), | ||
| 368 | + ), | ||
| 369 | + VEmptyView(8), | ||
| 370 | + Text( | ||
| 371 | + "发起人:系统自动", | ||
| 372 | + style: TextStyle( | ||
| 373 | + color: isTreated | ||
| 374 | + ? MyColours.color_BFC4D4 | ||
| 375 | + : MyColours.color_999999, | ||
| 376 | + fontSize: ScreenUtil().setSp(24)), | ||
| 377 | + ), | ||
| 378 | + ], | ||
| 379 | + ) | ||
| 380 | + : SizedBox() | ||
| 381 | + ], | ||
| 382 | + ), | ||
| 383 | + ), | ||
| 384 | + Positioned( | ||
| 385 | + right: ScreenUtil().setWidth(24 * 2 + 16 * 2), | ||
| 386 | + top: ScreenUtil().setWidth(28 + 24 * 2), | ||
| 387 | + child: Offstage( | ||
| 388 | + offstage: isTreated ? true : false, | ||
| 389 | + child: InkWell( | ||
| 390 | + onTap: () async { | ||
| 391 | + messageDialogModel.removeMessage(message.id); | ||
| 392 | + if (messageDialogModel.messages.length == 0) { | ||
| 393 | + Navigator.pop(context); | ||
| 394 | + } | ||
| 395 | + //message_type:10 跳转在线预订 11 取消订单 1 提前点餐 | ||
| 396 | + if (message.message_type == "10") { | ||
| 397 | + NavigatorUtil.goHandleOnlinePage( | ||
| 398 | + context, message.rid.toString(), message.id); | ||
| 399 | + } else if (message.message_type == "11") { | ||
| 400 | + NavigatorUtil.goNotebookDetailPage( | ||
| 401 | + context, message.rid.toString(), message.uid); | ||
| 402 | + bus.emit("remove_untreated_message", message.id); | ||
| 403 | + | ||
| 404 | + Map<String, String> params = { | ||
| 405 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 406 | + .user | ||
| 407 | + .sellerid, | ||
| 408 | + "id": message.id, | ||
| 409 | + "status": message.message_type == "1" | ||
| 410 | + ? "is_read" | ||
| 411 | + : "is_handle" | ||
| 412 | + }; | ||
| 413 | + await messageDialogModel.setMessageStatus( | ||
| 414 | + context, params); | ||
| 415 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 416 | + } else if (message.message_type == "1") { | ||
| 417 | + //提前点餐 | ||
| 418 | + NavigatorUtil.goHasOrderFoodPage(context, | ||
| 419 | + rid: message.rid); | ||
| 420 | + bus.emit("remove_untreated_message", message.id); | ||
| 421 | + | ||
| 422 | + Map<String, String> params = { | ||
| 423 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 424 | + .user | ||
| 425 | + .sellerid, | ||
| 426 | + "id": message.id, | ||
| 427 | + "status": message.message_type == "1" | ||
| 428 | + ? "is_read" | ||
| 429 | + : "is_handle" | ||
| 430 | + }; | ||
| 431 | + await messageDialogModel.setMessageStatus( | ||
| 432 | + context, params); | ||
| 433 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 434 | + } else if ('${message.message_type}' == "12") { | ||
| 435 | + //在线买单消息 去处理 跳转在线买单处理页面 | ||
| 436 | + NavigatorUtil.goOnlineCheckEditPage(context, | ||
| 437 | + rid: '${message.rid}', mid: message.id); | ||
| 438 | + } else if ('${message.message_type}' == "13") { | ||
| 439 | + //在线买单消息 去查看 跳转在线买单详情页面 | ||
| 440 | + NavigatorUtil.goOnlineCheckDetailPage(context, | ||
| 441 | + rid: '${message.rid}'); | ||
| 442 | + bus.emit("remove_untreated_message", message.id); | ||
| 443 | + | ||
| 444 | + Map<String, String> params = { | ||
| 445 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 446 | + .user | ||
| 447 | + .sellerid, | ||
| 448 | + "id": message.id, | ||
| 449 | + "status": message.message_type == "1" | ||
| 450 | + ? "is_read" | ||
| 451 | + : "is_handle" | ||
| 452 | + }; | ||
| 453 | + await messageDialogModel.setMessageStatus( | ||
| 454 | + context, params); | ||
| 455 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 456 | + } else if (message.message_type == "14") { | ||
| 457 | + //发票详情页面跳转 | ||
| 458 | + NavigatorUtil.goInvoiceDetailPage(context, | ||
| 459 | + rid: '${message.rid}'); | ||
| 460 | + bus.emit("remove_untreated_message", message.id); | ||
| 461 | + | ||
| 462 | + Map<String, String> params = { | ||
| 463 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 464 | + .user | ||
| 465 | + .sellerid, | ||
| 466 | + "id": message.id, | ||
| 467 | + "status": message.message_type == "1" | ||
| 468 | + ? "is_read" | ||
| 469 | + : "is_handle" | ||
| 470 | + }; | ||
| 471 | + await messageDialogModel.setMessageStatus( | ||
| 472 | + context, params); | ||
| 473 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 474 | + } | ||
| 475 | + }, | ||
| 476 | + child: Image.asset( | ||
| 477 | + Utils.getImgPath('$btnname'), | ||
| 478 | + width: ScreenUtil().setWidth(24 * 2), | ||
| 479 | + height: ScreenUtil().setWidth(24 * 2), | ||
| 480 | + ), | ||
| 481 | + ), | ||
| 482 | + ), | ||
| 483 | + ) | ||
| 484 | + ], | ||
| 485 | + )); | ||
| 486 | + } | ||
| 487 | +} |
| @@ -61,6 +61,9 @@ class MessageItemF extends StatelessWidget { | @@ -61,6 +61,9 @@ class MessageItemF extends StatelessWidget { | ||
| 61 | bgcolor = MyColours.color_5F7292; | 61 | bgcolor = MyColours.color_5F7292; |
| 62 | btnname = 'store_info_go'; | 62 | btnname = 'store_info_go'; |
| 63 | } | 63 | } |
| 64 | + if (isTreated) { | ||
| 65 | + bgcolor = MyColours.color_BFC4D4; | ||
| 66 | + } | ||
| 64 | 67 | ||
| 65 | MessageDialogModel messageDialogModel = | 68 | MessageDialogModel messageDialogModel = |
| 66 | Provider.of<MessageDialogModel>(context, listen: false); | 69 | Provider.of<MessageDialogModel>(context, listen: false); |
| @@ -201,70 +204,116 @@ class MessageItemF extends StatelessWidget { | @@ -201,70 +204,116 @@ class MessageItemF extends StatelessWidget { | ||
| 201 | ), | 204 | ), |
| 202 | HEmptyView(34), | 205 | HEmptyView(34), |
| 203 | message.message_type == "10" || message.message_type == "12" | 206 | message.message_type == "10" || message.message_type == "12" |
| 204 | - ? Column( | 207 | + ? Expanded( |
| 208 | + child: Column( | ||
| 205 | crossAxisAlignment: CrossAxisAlignment.start, | 209 | crossAxisAlignment: CrossAxisAlignment.start, |
| 206 | children: <Widget>[ | 210 | children: <Widget>[ |
| 207 | - Row(children: [ | ||
| 208 | - Padding( | ||
| 209 | - padding: EdgeInsets.only( | ||
| 210 | - right: ScreenUtil().setWidth(12)), | ||
| 211 | - child: Text( | ||
| 212 | - message.rnameStr, | ||
| 213 | - style: TextStyle( | ||
| 214 | - color: MyColours.color_515151, | ||
| 215 | - fontSize: ScreenUtil().setSp(32)), | ||
| 216 | - )), | ||
| 217 | - attr == '' || attr == null | ||
| 218 | - ? Container( | ||
| 219 | - margin: EdgeInsets.only( | ||
| 220 | - right: ScreenUtil().setWidth(12)), | ||
| 221 | - padding: EdgeInsets.symmetric( | ||
| 222 | - horizontal: ScreenUtil().setWidth(16), | ||
| 223 | - vertical: ScreenUtil().setWidth(6)), | ||
| 224 | - decoration: BoxDecoration( | ||
| 225 | - color: attr == '沉睡' | ||
| 226 | - ? Color.fromRGBO(223, 33, 81, 1) | ||
| 227 | - : attr == '活跃' | ||
| 228 | - ? Color.fromRGBO( | ||
| 229 | - 81, 170, 94, 1) | ||
| 230 | - : attr == '流失' | ||
| 231 | - ? Color.fromRGBO( | ||
| 232 | - 109, 101, 248, 1) | ||
| 233 | - : Color.fromRGBO( | ||
| 234 | - 239, 143, 49, 1), | ||
| 235 | - borderRadius: | ||
| 236 | - BorderRadius.circular(8)), | ||
| 237 | - child: Text( | ||
| 238 | - '活跃', | ||
| 239 | - style: TextStyle( | ||
| 240 | - color: MyColours.color_ffffff, | ||
| 241 | - fontSize: ScreenUtil().setSp(24)), | ||
| 242 | - ), | ||
| 243 | - ) | ||
| 244 | - : SizedBox(), | ||
| 245 | - Container( | ||
| 246 | - padding: EdgeInsets.symmetric( | ||
| 247 | - horizontal: ScreenUtil().setWidth(16), | ||
| 248 | - vertical: ScreenUtil().setWidth(6)), | ||
| 249 | - decoration: BoxDecoration( | ||
| 250 | - border: Border.all( | ||
| 251 | - width: ScreenUtil().setWidth(2), | ||
| 252 | - color: MyColours.color_F2995F, | ||
| 253 | - ), | ||
| 254 | - borderRadius: BorderRadius.circular(8)), | ||
| 255 | - child: Text( | ||
| 256 | - 'biaoqianvipdsds', | ||
| 257 | - style: TextStyle( | ||
| 258 | - color: MyColours.color_F2995F, | ||
| 259 | - fontSize: ScreenUtil().setSp(24)), | ||
| 260 | - ), | ||
| 261 | - ) | ||
| 262 | - ]), | 211 | + Container( |
| 212 | + height: ScreenUtil().setWidth(40), | ||
| 213 | + child: ListView.builder( | ||
| 214 | + itemCount: 1, | ||
| 215 | + shrinkWrap: true, | ||
| 216 | + scrollDirection: Axis.horizontal, | ||
| 217 | + itemBuilder: | ||
| 218 | + (BuildContext contxt, int index) { | ||
| 219 | + return Row(children: [ | ||
| 220 | + Padding( | ||
| 221 | + padding: EdgeInsets.only( | ||
| 222 | + right: | ||
| 223 | + ScreenUtil().setWidth(12)), | ||
| 224 | + child: Text( | ||
| 225 | + message.rnameStr, | ||
| 226 | + style: TextStyle( | ||
| 227 | + color: isTreated | ||
| 228 | + ? MyColours.color_BFC4D4 | ||
| 229 | + : MyColours.color_515151, | ||
| 230 | + fontSize: | ||
| 231 | + ScreenUtil().setSp(32)), | ||
| 232 | + )), | ||
| 233 | + attr == '' || attr == null | ||
| 234 | + ? Container( | ||
| 235 | + margin: EdgeInsets.only( | ||
| 236 | + right: ScreenUtil() | ||
| 237 | + .setWidth(12)), | ||
| 238 | + padding: EdgeInsets.symmetric( | ||
| 239 | + horizontal: ScreenUtil() | ||
| 240 | + .setWidth(16), | ||
| 241 | + vertical: ScreenUtil() | ||
| 242 | + .setWidth(6)), | ||
| 243 | + decoration: BoxDecoration( | ||
| 244 | + color: isTreated | ||
| 245 | + ? MyColours.color_BFC4D4 | ||
| 246 | + : attr == '沉睡' | ||
| 247 | + ? Color.fromRGBO( | ||
| 248 | + 223, 33, 81, 1) | ||
| 249 | + : attr == '活跃' | ||
| 250 | + ? Color | ||
| 251 | + .fromRGBO( | ||
| 252 | + 81, | ||
| 253 | + 170, | ||
| 254 | + 94, | ||
| 255 | + 1) | ||
| 256 | + : attr == '流失' | ||
| 257 | + ? Color | ||
| 258 | + .fromRGBO( | ||
| 259 | + 109, | ||
| 260 | + 101, | ||
| 261 | + 248, | ||
| 262 | + 1) | ||
| 263 | + : Color | ||
| 264 | + .fromRGBO( | ||
| 265 | + 239, | ||
| 266 | + 143, | ||
| 267 | + 49, | ||
| 268 | + 1), | ||
| 269 | + borderRadius: | ||
| 270 | + BorderRadius.circular( | ||
| 271 | + 8)), | ||
| 272 | + child: Text( | ||
| 273 | + '活跃', | ||
| 274 | + style: TextStyle( | ||
| 275 | + color: MyColours | ||
| 276 | + .color_ffffff, | ||
| 277 | + fontSize: ScreenUtil() | ||
| 278 | + .setSp(24)), | ||
| 279 | + ), | ||
| 280 | + ) | ||
| 281 | + : SizedBox(), | ||
| 282 | + Container( | ||
| 283 | + padding: EdgeInsets.symmetric( | ||
| 284 | + horizontal: | ||
| 285 | + ScreenUtil().setWidth(16), | ||
| 286 | + vertical: | ||
| 287 | + ScreenUtil().setWidth(6)), | ||
| 288 | + decoration: BoxDecoration( | ||
| 289 | + border: Border.all( | ||
| 290 | + width: ScreenUtil().setWidth(2), | ||
| 291 | + color: isTreated | ||
| 292 | + ? MyColours.color_BFC4D4 | ||
| 293 | + : MyColours.color_F2995F, | ||
| 294 | + ), | ||
| 295 | + borderRadius: | ||
| 296 | + BorderRadius.circular(8)), | ||
| 297 | + child: Text( | ||
| 298 | + 'biaoqianvipdsds', | ||
| 299 | + // overflow: TextOverflow.ellipsis, | ||
| 300 | + style: TextStyle( | ||
| 301 | + color: isTreated | ||
| 302 | + ? MyColours.color_BFC4D4 | ||
| 303 | + : MyColours.color_F2995F, | ||
| 304 | + fontSize: | ||
| 305 | + ScreenUtil().setSp(24)), | ||
| 306 | + ), | ||
| 307 | + ) | ||
| 308 | + ]); | ||
| 309 | + })), | ||
| 263 | VEmptyView(16), | 310 | VEmptyView(16), |
| 264 | Text( | 311 | Text( |
| 265 | '${message.ddateStr}', | 312 | '${message.ddateStr}', |
| 266 | style: TextStyle( | 313 | style: TextStyle( |
| 267 | - color: MyColours.color_999999, | 314 | + color: isTreated |
| 315 | + ? MyColours.color_BFC4D4 | ||
| 316 | + : MyColours.color_999999, | ||
| 268 | fontSize: ScreenUtil().setSp(24)), | 317 | fontSize: ScreenUtil().setSp(24)), |
| 269 | ), | 318 | ), |
| 270 | VEmptyView(8), | 319 | VEmptyView(8), |
| @@ -283,7 +332,7 @@ class MessageItemF extends StatelessWidget { | @@ -283,7 +332,7 @@ class MessageItemF extends StatelessWidget { | ||
| 283 | ), | 332 | ), |
| 284 | ) | 333 | ) |
| 285 | ], | 334 | ], |
| 286 | - ) | 335 | + )) |
| 287 | : SizedBox(), | 336 | : SizedBox(), |
| 288 | message.message_type == "11" || message.message_type == "1" | 337 | message.message_type == "11" || message.message_type == "1" |
| 289 | ? Column( | 338 | ? Column( |
| @@ -317,7 +366,9 @@ class MessageItemF extends StatelessWidget { | @@ -317,7 +366,9 @@ class MessageItemF extends StatelessWidget { | ||
| 317 | : Text( | 366 | : Text( |
| 318 | true ? '取消操作人:顾客在线取消' : '取消操作人:方硕', | 367 | true ? '取消操作人:顾客在线取消' : '取消操作人:方硕', |
| 319 | style: TextStyle( | 368 | style: TextStyle( |
| 320 | - color: MyColours.color_999999, | 369 | + color: isTreated |
| 370 | + ? MyColours.color_BFC4D4 | ||
| 371 | + : MyColours.color_999999, | ||
| 321 | fontSize: ScreenUtil().setSp(24)), | 372 | fontSize: ScreenUtil().setSp(24)), |
| 322 | ) | 373 | ) |
| 323 | ], | 374 | ], |
| @@ -330,14 +381,18 @@ class MessageItemF extends StatelessWidget { | @@ -330,14 +381,18 @@ class MessageItemF extends StatelessWidget { | ||
| 330 | Text( | 381 | Text( |
| 331 | "请确认 2022-04-02 午餐 客人是否会如约到店!", | 382 | "请确认 2022-04-02 午餐 客人是否会如约到店!", |
| 332 | style: TextStyle( | 383 | style: TextStyle( |
| 333 | - color: MyColours.color_515151, | 384 | + color: isTreated |
| 385 | + ? MyColours.color_BFC4D4 | ||
| 386 | + : MyColours.color_515151, | ||
| 334 | fontSize: ScreenUtil().setSp(28)), | 387 | fontSize: ScreenUtil().setSp(28)), |
| 335 | ), | 388 | ), |
| 336 | VEmptyView(8), | 389 | VEmptyView(8), |
| 337 | Text( | 390 | Text( |
| 338 | "发起人:系统自动", | 391 | "发起人:系统自动", |
| 339 | style: TextStyle( | 392 | style: TextStyle( |
| 340 | - color: MyColours.color_999999, | 393 | + color: isTreated |
| 394 | + ? MyColours.color_BFC4D4 | ||
| 395 | + : MyColours.color_999999, | ||
| 341 | fontSize: ScreenUtil().setSp(24)), | 396 | fontSize: ScreenUtil().setSp(24)), |
| 342 | ), | 397 | ), |
| 343 | ], | 398 | ], |
| @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; | @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 3 | import 'package:one_key/constant/state.dart'; | 3 | import 'package:one_key/constant/state.dart'; |
| 4 | import 'package:one_key/pages/message/message_online_check_page.dart'; | 4 | import 'package:one_key/pages/message/message_online_check_page.dart'; |
| 5 | +import 'package:one_key/pages/message/message_treated_page.dart'; | ||
| 5 | import 'package:one_key/pages/message/message_untreated_page.dart'; | 6 | import 'package:one_key/pages/message/message_untreated_page.dart'; |
| 6 | import 'package:one_key/provider/message_dialog_model.dart'; | 7 | import 'package:one_key/provider/message_dialog_model.dart'; |
| 7 | import 'package:one_key/provider/message_model.dart'; | 8 | import 'package:one_key/provider/message_model.dart'; |
| @@ -245,10 +246,9 @@ class MessagePageState extends State<MessagePage> | @@ -245,10 +246,9 @@ class MessagePageState extends State<MessagePage> | ||
| 245 | )), | 246 | )), |
| 246 | VEmptyView(11), | 247 | VEmptyView(11), |
| 247 | Expanded( | 248 | Expanded( |
| 248 | - flex: 1, | ||
| 249 | child: TabBarView(controller: tabController, children: [ | 249 | child: TabBarView(controller: tabController, children: [ |
| 250 | MessageUntreatedPage(), | 250 | MessageUntreatedPage(), |
| 251 | - MessageOrderPage(), | 251 | + MessageTreatedPage(), |
| 252 | // MessageOnlineCheckPage() | 252 | // MessageOnlineCheckPage() |
| 253 | ]), | 253 | ]), |
| 254 | ) | 254 | ) |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_easyrefresh/easy_refresh.dart'; | ||
| 3 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 4 | +import 'package:one_key/constant/state.dart'; | ||
| 5 | +import 'package:one_key/models/message.dart'; | ||
| 6 | +import 'package:one_key/models/message_menu_model.dart'; | ||
| 7 | +import 'package:one_key/pages/message/message_item_f.dart'; | ||
| 8 | +import 'package:one_key/pages/message/messsage_item.dart'; | ||
| 9 | +import 'package:one_key/provider/message_dialog_model.dart'; | ||
| 10 | +import 'package:one_key/provider/message_model.dart'; | ||
| 11 | +import 'package:one_key/provider/user_model.dart'; | ||
| 12 | +import 'package:one_key/res/colors.dart'; | ||
| 13 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 14 | +import 'package:one_key/widgets/page_error.dart'; | ||
| 15 | +import 'package:one_key/widgets/page_exception.dart'; | ||
| 16 | +import 'package:provider/provider.dart'; | ||
| 17 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * 已处理消息 | ||
| 21 | + */ | ||
| 22 | +class MessageTreatedPage extends StatefulWidget { | ||
| 23 | + @override | ||
| 24 | + State<StatefulWidget> createState() { | ||
| 25 | + // TODO: implement createState | ||
| 26 | + return new MessageTreatedPageState(); | ||
| 27 | + } | ||
| 28 | +} | ||
| 29 | + | ||
| 30 | +class MessageTreatedPageState extends State<MessageTreatedPage> { | ||
| 31 | + EasyRefreshController _controller; | ||
| 32 | + | ||
| 33 | + Color selectedColor = MyColours.color_199095; | ||
| 34 | + Color unSelectedColor = MyColours.color_999999; | ||
| 35 | + | ||
| 36 | + int selectedIndex = 0; | ||
| 37 | + | ||
| 38 | + int offset = 0; | ||
| 39 | + MessageModel messageModel; | ||
| 40 | + UserModel userModel; | ||
| 41 | + MessageDialogModel messageDialogModel; | ||
| 42 | + List<MessageMenuModel> menuTitle = []; | ||
| 43 | + | ||
| 44 | + @override | ||
| 45 | + void initState() { | ||
| 46 | + // TODO: implement initState | ||
| 47 | + super.initState(); | ||
| 48 | + _initMenu(); | ||
| 49 | + // //移除在线预订消息 | ||
| 50 | + // bus.on("remove_untreated_message", (args) { | ||
| 51 | + // messageModel.removeUntreatedMessageByMid(args.toString()); | ||
| 52 | + // messageDialogModel.removeMessage(args.toString()); | ||
| 53 | + // }); | ||
| 54 | + _controller = EasyRefreshController(); | ||
| 55 | + // messageModel.pageState = PageState.Loading; | ||
| 56 | + WidgetsBinding.instance.addPostFrameCallback((_) { | ||
| 57 | + getMessage(); | ||
| 58 | + setState(() { | ||
| 59 | + messageModel.pageState = PageState.Loading; | ||
| 60 | + }); | ||
| 61 | + messageModel.pageState = PageState.Loading; | ||
| 62 | + messageModel.notifyListeners(); | ||
| 63 | + }); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + _initMenu() { | ||
| 67 | + MessageMenuModel model1 = MessageMenuModel(); | ||
| 68 | + model1.title = '全部'; | ||
| 69 | + model1.select = true; | ||
| 70 | + MessageMenuModel model2 = MessageMenuModel(); | ||
| 71 | + model2.title = '店内消息'; | ||
| 72 | + model2.select = false; | ||
| 73 | + MessageMenuModel model3 = MessageMenuModel(); | ||
| 74 | + model3.title = '在线预订'; | ||
| 75 | + model3.select = false; | ||
| 76 | + MessageMenuModel model4 = MessageMenuModel(); | ||
| 77 | + model4.title = '提前点餐'; | ||
| 78 | + model4.select = false; | ||
| 79 | + MessageMenuModel model5 = MessageMenuModel(); | ||
| 80 | + model5.title = '在线买单'; | ||
| 81 | + model5.select = false; | ||
| 82 | + MessageMenuModel model6 = MessageMenuModel(); | ||
| 83 | + model6.title = '完成买单'; | ||
| 84 | + model6.select = false; | ||
| 85 | + MessageMenuModel model7 = MessageMenuModel(); | ||
| 86 | + model7.title = '申请发票'; | ||
| 87 | + model7.select = false; | ||
| 88 | + menuTitle = [model1, model2, model3, model4, model5, model6, model7]; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + @override | ||
| 92 | + void dispose() { | ||
| 93 | + // TODO: implement dispose | ||
| 94 | + super.dispose(); | ||
| 95 | + // bus.off("remove_untreated_message"); | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + //三种分类各自的未读消息数目 | ||
| 99 | + _getUnMsgNum() async { | ||
| 100 | + Map<String, String> params = {"sid": userModel.user.sellerid}; | ||
| 101 | + await messageModel.getUnMsgNum(context, params); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + //获取在线预订消息status 0未处理 1已处理 | ||
| 105 | + getMessage({bool showLoading = true}) async { | ||
| 106 | + Map<String, String> params = { | ||
| 107 | + "sid": userModel.user.sellerid, | ||
| 108 | + "type_id": "10", //1提前点餐2内部预订10在线预订 | ||
| 109 | + "status": '1', | ||
| 110 | + "offset": offset.toString(), | ||
| 111 | + "limit": "20", | ||
| 112 | + }; | ||
| 113 | + | ||
| 114 | + await messageModel.getMessages(context, params, showLoading: showLoading); | ||
| 115 | + _getUnMsgNum(); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + @override | ||
| 119 | + Widget build(BuildContext context) { | ||
| 120 | + messageModel = Provider.of<MessageModel>(context, listen: true); | ||
| 121 | + userModel = Provider.of<UserModel>(context, listen: false); | ||
| 122 | + messageDialogModel = | ||
| 123 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 124 | + return Container( | ||
| 125 | + color: MyColours.color_ffffff, | ||
| 126 | + margin: EdgeInsets.only(top: ScreenUtil().setWidth(10)), | ||
| 127 | + child: Consumer<MessageModel>( | ||
| 128 | + builder: (context, model, _) { | ||
| 129 | + return Column(children: [ | ||
| 130 | + Container( | ||
| 131 | + color: MyColours.color_ffffff, | ||
| 132 | + height: ScreenUtil().setWidth(50), | ||
| 133 | + margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)), | ||
| 134 | + child: Row( | ||
| 135 | + children: [ | ||
| 136 | + HEmptyView(48), | ||
| 137 | + Expanded( | ||
| 138 | + child: SizedBox( | ||
| 139 | + height: ScreenUtil().setWidth(50), | ||
| 140 | + child: ListView.builder( | ||
| 141 | + itemCount: menuTitle.length, | ||
| 142 | + shrinkWrap: true, | ||
| 143 | + scrollDirection: Axis.horizontal, | ||
| 144 | + itemBuilder: (BuildContext contxt, int index) { | ||
| 145 | + return InkWell( | ||
| 146 | + onTap: () { | ||
| 147 | + for (MessageMenuModel item in menuTitle) { | ||
| 148 | + item.select = false; | ||
| 149 | + } | ||
| 150 | + menuTitle[index].select = true; | ||
| 151 | + setState(() {}); | ||
| 152 | + offset = 0; | ||
| 153 | + getMessage(showLoading: true); | ||
| 154 | + }, | ||
| 155 | + child: Container( | ||
| 156 | + // width: ScreenUtil().setWidth(104 * 2), | ||
| 157 | + // height: ScreenUtil().setWidth(80), | ||
| 158 | + margin: EdgeInsets.only( | ||
| 159 | + right: ScreenUtil().setWidth(15), | ||
| 160 | + ), | ||
| 161 | + padding: EdgeInsets.symmetric( | ||
| 162 | + horizontal: ScreenUtil().setWidth(16), | ||
| 163 | + vertical: ScreenUtil().setWidth(8)), | ||
| 164 | + alignment: Alignment.center, | ||
| 165 | + decoration: BoxDecoration( | ||
| 166 | + borderRadius: BorderRadius.circular( | ||
| 167 | + ScreenUtil().setWidth(16)), | ||
| 168 | + color: menuTitle[index].select | ||
| 169 | + ? MyColours.color_438E93 | ||
| 170 | + : MyColours.color_ffffff, | ||
| 171 | + border: Border.all( | ||
| 172 | + color: menuTitle[index].select | ||
| 173 | + ? MyColours.color_438E93 | ||
| 174 | + : MyColours.color_BFC4D4, | ||
| 175 | + width: ScreenUtil().setWidth(2))), | ||
| 176 | + child: Text( | ||
| 177 | + menuTitle[index].title, | ||
| 178 | + overflow: TextOverflow.ellipsis, | ||
| 179 | + style: TextStyle( | ||
| 180 | + color: menuTitle[index].select | ||
| 181 | + ? MyColours.color_ffffff | ||
| 182 | + : MyColours.color_BFC4D4, | ||
| 183 | + fontSize: ScreenUtil().setSp(24), | ||
| 184 | + decoration: TextDecoration.none, | ||
| 185 | + fontWeight: FontWeight.normal), | ||
| 186 | + ), | ||
| 187 | + ), | ||
| 188 | + ); | ||
| 189 | + }))) | ||
| 190 | + ], | ||
| 191 | + ), | ||
| 192 | + ), | ||
| 193 | + Expanded( | ||
| 194 | + child: Container( | ||
| 195 | + color: MyColours.color_ffffff, | ||
| 196 | + child: model.pageState != PageState.Success | ||
| 197 | + ? ExceptionPage( | ||
| 198 | + pageState: model.pageState, | ||
| 199 | + callback: () { | ||
| 200 | + offset = 0; | ||
| 201 | + getMessage(showLoading: true); | ||
| 202 | + }, | ||
| 203 | + emptyMsg: "暂时没有已处理的消息哦", | ||
| 204 | + emptyImg: "empty_search", | ||
| 205 | + showMsg: "加载中,请稍后...", | ||
| 206 | + ) | ||
| 207 | + : EasyRefresh.custom( | ||
| 208 | + controller: _controller, | ||
| 209 | + slivers: [ | ||
| 210 | + SliverList( | ||
| 211 | + delegate: SliverChildBuilderDelegate( | ||
| 212 | + (BuildContext context, int index) { | ||
| 213 | + return MessageItemF( | ||
| 214 | + model.messages[index], | ||
| 215 | + isTreated: true, | ||
| 216 | + ); | ||
| 217 | + }, childCount: model.messages.length), | ||
| 218 | + ) | ||
| 219 | + ], | ||
| 220 | + onRefresh: () async { | ||
| 221 | + offset = 0; | ||
| 222 | + getMessage(showLoading: false); | ||
| 223 | + }, | ||
| 224 | + onLoad: () async { | ||
| 225 | + offset++; | ||
| 226 | + getMessage(showLoading: false); | ||
| 227 | + }, | ||
| 228 | + ))) | ||
| 229 | + ]); | ||
| 230 | + }, | ||
| 231 | + ), | ||
| 232 | + ); | ||
| 233 | + } | ||
| 234 | +} |
| @@ -54,7 +54,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | @@ -54,7 +54,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | ||
| 54 | // setState(() { | 54 | // setState(() { |
| 55 | // messageModel.pageState = PageState.Loading; | 55 | // messageModel.pageState = PageState.Loading; |
| 56 | // }); | 56 | // }); |
| 57 | - messageModel.pageState = PageState.Loading; | 57 | + messageModel.pageStateUn = PageState.Loading; |
| 58 | messageModel.notifyListeners(); | 58 | messageModel.notifyListeners(); |
| 59 | }); | 59 | }); |
| 60 | } | 60 | } |
| @@ -77,7 +77,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | @@ -77,7 +77,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | ||
| 77 | Map<String, String> params = { | 77 | Map<String, String> params = { |
| 78 | "sid": userModel.user.sellerid, | 78 | "sid": userModel.user.sellerid, |
| 79 | "type_id": "10", //1提前点餐2内部预订10在线预订 | 79 | "type_id": "10", //1提前点餐2内部预订10在线预订 |
| 80 | - "status": selectedIndex.toString(), | 80 | + "status": '0', |
| 81 | "offset": offset.toString(), | 81 | "offset": offset.toString(), |
| 82 | "limit": "20", | 82 | "limit": "20", |
| 83 | }; | 83 | }; |
| @@ -96,9 +96,9 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | @@ -96,9 +96,9 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | ||
| 96 | color: MyColours.color_ffffff, | 96 | color: MyColours.color_ffffff, |
| 97 | child: Consumer<MessageModel>( | 97 | child: Consumer<MessageModel>( |
| 98 | builder: (context, model, _) { | 98 | builder: (context, model, _) { |
| 99 | - if (model.pageState != PageState.Success) { | 99 | + if (model.pageStateUn != PageState.Success) { |
| 100 | return ExceptionPage( | 100 | return ExceptionPage( |
| 101 | - pageState: model.pageState, | 101 | + pageState: model.pageStateUn, |
| 102 | callback: () { | 102 | callback: () { |
| 103 | offset = 0; | 103 | offset = 0; |
| 104 | getMessage(showLoading: true); | 104 | getMessage(showLoading: true); |
| @@ -135,7 +135,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | @@ -135,7 +135,7 @@ class MessageUntreatedPageState extends State<MessageUntreatedPage> { | ||
| 135 | } | 135 | } |
| 136 | return MessageItemF( | 136 | return MessageItemF( |
| 137 | model.messages[index], | 137 | model.messages[index], |
| 138 | - isTreated: selectedIndex == 1, | 138 | + isTreated: false, |
| 139 | ); | 139 | ); |
| 140 | }, childCount: model.messages.length), | 140 | }, childCount: model.messages.length), |
| 141 | ) | 141 | ) |
| @@ -7,6 +7,7 @@ import 'package:one_key/provider/store_detail_model.dart'; | @@ -7,6 +7,7 @@ import 'package:one_key/provider/store_detail_model.dart'; | ||
| 7 | import 'package:one_key/provider/user_model.dart'; | 7 | import 'package:one_key/provider/user_model.dart'; |
| 8 | import 'package:one_key/res/colors.dart'; | 8 | import 'package:one_key/res/colors.dart'; |
| 9 | import 'package:one_key/route/navigator_util.dart'; | 9 | import 'package:one_key/route/navigator_util.dart'; |
| 10 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 10 | import 'package:one_key/utils/event_bus.dart'; | 11 | import 'package:one_key/utils/event_bus.dart'; |
| 11 | import 'package:one_key/utils/utils.dart'; | 12 | import 'package:one_key/utils/utils.dart'; |
| 12 | import 'package:one_key/widgets/h_empty_view.dart'; | 13 | import 'package:one_key/widgets/h_empty_view.dart'; |
| @@ -40,6 +41,8 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -40,6 +41,8 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 40 | 41 | ||
| 41 | bool swichState = true; | 42 | bool swichState = true; |
| 42 | StoreDetailModel detailModel; | 43 | StoreDetailModel detailModel; |
| 44 | + int selectIndex = 0; | ||
| 45 | + String selectNum = '0'; | ||
| 43 | 46 | ||
| 44 | @override | 47 | @override |
| 45 | void initState() { | 48 | void initState() { |
| @@ -196,28 +199,10 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -196,28 +199,10 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 196 | } | 199 | } |
| 197 | 200 | ||
| 198 | ///关联包间选择 | 201 | ///关联包间选择 |
| 199 | - Widget _select(String title, String hintText) { | 202 | + Widget _select(String title, String hintText, |
| 203 | + {textColor = MyColours.color_333333, GestureTapCallback ontap}) { | ||
| 200 | return InkWell( | 204 | return InkWell( |
| 201 | - onTap: () async { | ||
| 202 | - Map temp = await NavigatorUtil.goRoomTypeSelectTablePage( | ||
| 203 | - context, | ||
| 204 | - "", | ||
| 205 | - DateTime.now().millisecondsSinceEpoch, | ||
| 206 | - "1", | ||
| 207 | - canChoose: true, | ||
| 208 | - fromPage: 'room_manage', | ||
| 209 | - object: tableListSel, | ||
| 210 | - ); | ||
| 211 | - if (temp != null) { | ||
| 212 | - print(temp['tid']); | ||
| 213 | - print(temp['tname']); | ||
| 214 | - String tname = temp['tname']; | ||
| 215 | - String tid = temp['tid']; | ||
| 216 | - tableListSel = temp['tid']; | ||
| 217 | - setState(() {}); | ||
| 218 | - // _getTablePhoto(context, temp['tid'], showLoading: true); | ||
| 219 | - } | ||
| 220 | - }, | 205 | + onTap: ontap, |
| 221 | child: Container( | 206 | child: Container( |
| 222 | child: Row( | 207 | child: Row( |
| 223 | crossAxisAlignment: CrossAxisAlignment.center, | 208 | crossAxisAlignment: CrossAxisAlignment.center, |
| @@ -227,7 +212,7 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -227,7 +212,7 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 227 | child: Text( | 212 | child: Text( |
| 228 | title, | 213 | title, |
| 229 | style: TextStyle( | 214 | style: TextStyle( |
| 230 | - color: MyColours.color_333333, | 215 | + color: textColor, |
| 231 | fontWeight: FontWeight.bold, | 216 | fontWeight: FontWeight.bold, |
| 232 | fontSize: ScreenUtil().setSp(34)), | 217 | fontSize: ScreenUtil().setSp(34)), |
| 233 | ), | 218 | ), |
| @@ -236,9 +221,8 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -236,9 +221,8 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 236 | Spacer(), | 221 | Spacer(), |
| 237 | Text(hintText, | 222 | Text(hintText, |
| 238 | style: TextStyle( | 223 | style: TextStyle( |
| 239 | - color: hintText == '选择包间' | ||
| 240 | - ? MyColours.color_999999 | ||
| 241 | - : MyColours.color_333333, | 224 | + color: |
| 225 | + hintText == '选择包间' ? MyColours.color_999999 : textColor, | ||
| 242 | fontWeight: | 226 | fontWeight: |
| 243 | hintText == '选择包间' ? FontWeight.normal : FontWeight.bold, | 227 | hintText == '选择包间' ? FontWeight.normal : FontWeight.bold, |
| 244 | fontSize: ScreenUtil().setSp(32), | 228 | fontSize: ScreenUtil().setSp(32), |
| @@ -416,11 +400,29 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -416,11 +400,29 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 416 | horizontal: ScreenUtil().setWidth(40), | 400 | horizontal: ScreenUtil().setWidth(40), |
| 417 | vertical: ScreenUtil().setWidth(40), | 401 | vertical: ScreenUtil().setWidth(40), |
| 418 | ), | 402 | ), |
| 419 | - child: _select( | ||
| 420 | - '关联包间', | ||
| 421 | - tableListSel.length == 0 | ||
| 422 | - ? '选择包间' | ||
| 423 | - : '查看包间')), | 403 | + child: _select('关联包间', |
| 404 | + tableListSel.length == 0 ? '选择包间' : '查看包间', | ||
| 405 | + ontap: () async { | ||
| 406 | + Map temp = await NavigatorUtil | ||
| 407 | + .goRoomTypeSelectTablePage( | ||
| 408 | + context, | ||
| 409 | + "", | ||
| 410 | + DateTime.now().millisecondsSinceEpoch, | ||
| 411 | + "1", | ||
| 412 | + canChoose: true, | ||
| 413 | + fromPage: 'room_manage', | ||
| 414 | + object: tableListSel, | ||
| 415 | + ); | ||
| 416 | + if (temp != null) { | ||
| 417 | + print(temp['tid']); | ||
| 418 | + print(temp['tname']); | ||
| 419 | + String tname = temp['tname']; | ||
| 420 | + String tid = temp['tid']; | ||
| 421 | + tableListSel = temp['tid']; | ||
| 422 | + setState(() {}); | ||
| 423 | + // _getTablePhoto(context, temp['tid'], showLoading: true); | ||
| 424 | + } | ||
| 425 | + })), | ||
| 424 | VEmptyView(10), | 426 | VEmptyView(10), |
| 425 | Container( | 427 | Container( |
| 426 | height: ScreenUtil().setWidth(2), | 428 | height: ScreenUtil().setWidth(2), |
| @@ -430,6 +432,80 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | @@ -430,6 +432,80 @@ class _RoomTypeCreatePageState extends State<RoomTypeCreatePage> { | ||
| 430 | right: ScreenUtil().setWidth(40)), | 432 | right: ScreenUtil().setWidth(40)), |
| 431 | ), | 433 | ), |
| 432 | VEmptyView(10), | 434 | VEmptyView(10), |
| 435 | + tableListSel.length == 0 | ||
| 436 | + ? SizedBox() | ||
| 437 | + : Padding( | ||
| 438 | + padding: EdgeInsets.symmetric( | ||
| 439 | + horizontal: ScreenUtil().setWidth(40), | ||
| 440 | + vertical: ScreenUtil().setWidth(40), | ||
| 441 | + ), | ||
| 442 | + child: _select('核实通知', '当剩余 $selectNum 间时', | ||
| 443 | + textColor: MyColours.color_000000, | ||
| 444 | + ontap: () async { | ||
| 445 | + List<String> numList = []; | ||
| 446 | + for (int i = 0; | ||
| 447 | + i < tableListSel.split(',').length; | ||
| 448 | + i++) { | ||
| 449 | + numList.add('$i'); | ||
| 450 | + } | ||
| 451 | + DialogUtil.showSelectCusmanDialog( | ||
| 452 | + context, numList, (value) async { | ||
| 453 | + if (value != null) { | ||
| 454 | + selectIndex = value.first; | ||
| 455 | + selectNum = numList[value.first]; | ||
| 456 | + | ||
| 457 | + // bool sucess = | ||
| 458 | + // await detailModel.upReserveInfo( | ||
| 459 | + // context, widget.rid, | ||
| 460 | + // actualPum: | ||
| 461 | + // detailModel.selectNum); | ||
| 462 | + | ||
| 463 | + // if (sucess) { | ||
| 464 | + // EventBus().emit( | ||
| 465 | + // "refresh_tablemanager"); //刷新桌位 | ||
| 466 | + // await _getReserveDetail( | ||
| 467 | + // showCicle: false); | ||
| 468 | + // } | ||
| 469 | + } | ||
| 470 | + }, | ||
| 471 | + selecteds: selectIndex == null | ||
| 472 | + ? [] | ||
| 473 | + : [selectIndex]) | ||
| 474 | + .then((value) {}); | ||
| 475 | + })), | ||
| 476 | + tableListSel.length == 0 | ||
| 477 | + ? SizedBox() | ||
| 478 | + : Padding( | ||
| 479 | + padding: EdgeInsets.symmetric( | ||
| 480 | + horizontal: ScreenUtil().setWidth(38)), | ||
| 481 | + child: Row( | ||
| 482 | + crossAxisAlignment: | ||
| 483 | + CrossAxisAlignment.start, | ||
| 484 | + children: [ | ||
| 485 | + Image.asset( | ||
| 486 | + Utils.getImgPath('error-circle'), | ||
| 487 | + width: ScreenUtil().setWidth(40)), | ||
| 488 | + HEmptyView(20), | ||
| 489 | + Flexible( | ||
| 490 | + child: Transform.translate( | ||
| 491 | + offset: Offset( | ||
| 492 | + 0, | ||
| 493 | + 0.3 / | ||
| 494 | + 2), //1为 StrutStyle 的 leading的值 | ||
| 495 | + child: Text( | ||
| 496 | + '给员工发送核实通知,核实顾客是否如约到店,如不能,及时释放包间', | ||
| 497 | + style: TextStyle( | ||
| 498 | + color: MyColours.color_438E93, | ||
| 499 | + fontSize: ScreenUtil().setSp(24), | ||
| 500 | + ), | ||
| 501 | + strutStyle: StrutStyle( | ||
| 502 | + forceStrutHeight: true, | ||
| 503 | + height: 1, | ||
| 504 | + leading: 0.3), | ||
| 505 | + ), | ||
| 506 | + )) | ||
| 507 | + ], | ||
| 508 | + )) | ||
| 433 | ], | 509 | ], |
| 434 | )), | 510 | )), |
| 435 | ), | 511 | ), |
| @@ -109,33 +109,33 @@ class TableManagerPageState extends State<TableManagerPage> { | @@ -109,33 +109,33 @@ class TableManagerPageState extends State<TableManagerPage> { | ||
| 109 | } | 109 | } |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | - Widget list(List data) => ScrollablePositionedList.builder( | ||
| 113 | - itemCount: data.length, | ||
| 114 | - itemBuilder: (context, index) => item(index), | ||
| 115 | - itemScrollController: itemScrollController, | ||
| 116 | - itemPositionsListener: itemPositionsListener, | ||
| 117 | - reverse: false, | ||
| 118 | - scrollDirection: Axis.vertical, | ||
| 119 | - ); | 112 | + // Widget list(List data) => ScrollablePositionedList.builder( |
| 113 | + // itemCount: data.length, | ||
| 114 | + // itemBuilder: (context, index) => item(index), | ||
| 115 | + // itemScrollController: itemScrollController, | ||
| 116 | + // itemPositionsListener: itemPositionsListener, | ||
| 117 | + // reverse: false, | ||
| 118 | + // scrollDirection: Axis.vertical, | ||
| 119 | + // ); | ||
| 120 | 120 | ||
| 121 | - void scrollTo(int index) => itemScrollController | ||
| 122 | - .scrollTo( | ||
| 123 | - index: index, | ||
| 124 | - duration: scrollDuration, | ||
| 125 | - curve: Curves.easeInOutCubic, | ||
| 126 | - alignment: 0) | ||
| 127 | - .then((value) { | ||
| 128 | - print(_selectIndex); | ||
| 129 | - // _selectIndex = _selectIndex; | ||
| 130 | - // // } | ||
| 131 | - // isTap = false; | ||
| 132 | - this.setState(() {}); | ||
| 133 | - }).whenComplete(() { | ||
| 134 | - // print(''); | ||
| 135 | - }); | 121 | + // void scrollTo(int index) => itemScrollController |
| 122 | + // .scrollTo( | ||
| 123 | + // index: index, | ||
| 124 | + // duration: scrollDuration, | ||
| 125 | + // curve: Curves.easeInOutCubic, | ||
| 126 | + // alignment: 0) | ||
| 127 | + // .then((value) { | ||
| 128 | + // print(_selectIndex); | ||
| 129 | + // // _selectIndex = _selectIndex; | ||
| 130 | + // // // } | ||
| 131 | + // // isTap = false; | ||
| 132 | + // this.setState(() {}); | ||
| 133 | + // }).whenComplete(() { | ||
| 134 | + // // print(''); | ||
| 135 | + // }); | ||
| 136 | 136 | ||
| 137 | - void jumpTo(int index) => | ||
| 138 | - itemScrollController.jumpTo(index: index, alignment: 0); | 137 | + // void jumpTo(int index) => |
| 138 | + // itemScrollController.jumpTo(index: index, alignment: 0); | ||
| 139 | 139 | ||
| 140 | /// Generate item number [i]. | 140 | /// Generate item number [i]. |
| 141 | Widget item(int i) { | 141 | Widget item(int i) { |
| @@ -9,7 +9,8 @@ import 'package:one_key/net/http_url.dart'; | @@ -9,7 +9,8 @@ import 'package:one_key/net/http_url.dart'; | ||
| 9 | 9 | ||
| 10 | class MessageModel extends ChangeNotifier { | 10 | class MessageModel extends ChangeNotifier { |
| 11 | List<Message> messages = []; //消息 | 11 | List<Message> messages = []; //消息 |
| 12 | - PageState pageState = PageState.Loading; | 12 | + PageState pageStateUn = PageState.Loading; //未处理 |
| 13 | + PageState pageState = PageState.Loading; //已处理 | ||
| 13 | // 未处理消息总数 | 14 | // 未处理消息总数 |
| 14 | int onlineTotal = 0; //在线消息 | 15 | int onlineTotal = 0; //在线消息 |
| 15 | int inlineTotal = 0; //内部消息 | 16 | int inlineTotal = 0; //内部消息 |
| @@ -18,14 +19,21 @@ class MessageModel extends ChangeNotifier { | @@ -18,14 +19,21 @@ class MessageModel extends ChangeNotifier { | ||
| 18 | 19 | ||
| 19 | initData() { | 20 | initData() { |
| 20 | messages = []; //消息 | 21 | messages = []; //消息 |
| 21 | - pageState = PageState.Loading; | 22 | + pageStateUn = PageState.Loading; //未处理 |
| 23 | + pageState = PageState.Loading; //已处理 | ||
| 22 | } | 24 | } |
| 23 | 25 | ||
| 24 | //获取消息 | 26 | //获取消息 |
| 25 | getMessages(BuildContext context, Map<String, String> params, | 27 | getMessages(BuildContext context, Map<String, String> params, |
| 26 | {showLoading = true}) async { | 28 | {showLoading = true}) async { |
| 27 | if (showLoading) { | 29 | if (showLoading) { |
| 28 | - pageState = PageState.Loading; | 30 | + if (params['status'] == '0') { |
| 31 | + //未处理 | ||
| 32 | + pageStateUn = PageState.Loading; | ||
| 33 | + } else { | ||
| 34 | + pageState = PageState.Loading; | ||
| 35 | + } | ||
| 36 | + | ||
| 29 | messages = []; | 37 | messages = []; |
| 30 | notifyListeners(); | 38 | notifyListeners(); |
| 31 | } | 39 | } |
| @@ -34,19 +42,26 @@ class MessageModel extends ChangeNotifier { | @@ -34,19 +42,26 @@ class MessageModel extends ChangeNotifier { | ||
| 34 | data: params, showLoading: false) | 42 | data: params, showLoading: false) |
| 35 | .catchError((error) { | 43 | .catchError((error) { |
| 36 | print(error.toString()); | 44 | print(error.toString()); |
| 45 | + PageState pageStateTemp; | ||
| 37 | if (error is MyError) { | 46 | if (error is MyError) { |
| 38 | switch (error.type) { | 47 | switch (error.type) { |
| 39 | case 1: | 48 | case 1: |
| 40 | - pageState = PageState.ConnectivityError; | 49 | + pageStateTemp = PageState.ConnectivityError; |
| 41 | break; | 50 | break; |
| 42 | case 2: | 51 | case 2: |
| 43 | - pageState = PageState.ConnectivityTimeOut; | 52 | + pageStateTemp = PageState.ConnectivityTimeOut; |
| 44 | break; | 53 | break; |
| 45 | default: | 54 | default: |
| 46 | - pageState = PageState.ConnectivityError; | 55 | + pageStateTemp = PageState.ConnectivityError; |
| 47 | break; | 56 | break; |
| 48 | } | 57 | } |
| 49 | } | 58 | } |
| 59 | + if (params['status'] == '0') { | ||
| 60 | + //未处理 | ||
| 61 | + pageStateUn = pageStateTemp; | ||
| 62 | + } else { | ||
| 63 | + pageState = pageStateTemp; | ||
| 64 | + } | ||
| 50 | notifyListeners(); | 65 | notifyListeners(); |
| 51 | }); | 66 | }); |
| 52 | if (baseResp != null && baseResp.code == Constant.status_success) { | 67 | if (baseResp != null && baseResp.code == Constant.status_success) { |
| @@ -74,9 +89,19 @@ class MessageModel extends ChangeNotifier { | @@ -74,9 +89,19 @@ class MessageModel extends ChangeNotifier { | ||
| 74 | // }); | 89 | // }); |
| 75 | // } | 90 | // } |
| 76 | if (messages.isEmpty) { | 91 | if (messages.isEmpty) { |
| 77 | - pageState = PageState.Empty; | 92 | + if (params['status'] == '0') { |
| 93 | + //未处理 | ||
| 94 | + pageStateUn = PageState.Empty; | ||
| 95 | + } else { | ||
| 96 | + pageState = PageState.Empty; | ||
| 97 | + } | ||
| 78 | } else { | 98 | } else { |
| 79 | - pageState = PageState.Success; | 99 | + if (params['status'] == '0') { |
| 100 | + //未处理 | ||
| 101 | + pageStateUn = PageState.Success; | ||
| 102 | + } else { | ||
| 103 | + pageState = PageState.Success; | ||
| 104 | + } | ||
| 80 | } | 105 | } |
| 81 | notifyListeners(); | 106 | notifyListeners(); |
| 82 | } | 107 | } |
| @@ -12,6 +12,7 @@ import 'package:one_key/constant/constant.dart'; | @@ -12,6 +12,7 @@ import 'package:one_key/constant/constant.dart'; | ||
| 12 | import 'package:one_key/models/remark.dart'; | 12 | import 'package:one_key/models/remark.dart'; |
| 13 | import 'package:one_key/models/table_list.dart'; | 13 | import 'package:one_key/models/table_list.dart'; |
| 14 | import 'package:one_key/pages/message/message_dialog_item.dart'; | 14 | import 'package:one_key/pages/message/message_dialog_item.dart'; |
| 15 | +import 'package:one_key/pages/message/message_dialog_item_f.dart'; | ||
| 15 | import 'package:one_key/provider/message_dialog_model.dart'; | 16 | import 'package:one_key/provider/message_dialog_model.dart'; |
| 16 | import 'package:one_key/provider/table_manager_model.dart'; | 17 | import 'package:one_key/provider/table_manager_model.dart'; |
| 17 | import 'package:one_key/res/colors.dart'; | 18 | import 'package:one_key/res/colors.dart'; |
| @@ -827,435 +828,414 @@ class DialogUtil { | @@ -827,435 +828,414 @@ class DialogUtil { | ||
| 827 | context: context, | 828 | context: context, |
| 828 | barrierDismissible: false, | 829 | barrierDismissible: false, |
| 829 | builder: (BuildContext context) { | 830 | builder: (BuildContext context) { |
| 830 | - return | ||
| 831 | - // Scaffold( | ||
| 832 | - // resizeToAvoidBottomInset: false, | ||
| 833 | - // backgroundColor: Colors.transparent, | ||
| 834 | - // body: | 831 | + return |
| 832 | + // Scaffold( | ||
| 833 | + // resizeToAvoidBottomInset: false, | ||
| 834 | + // backgroundColor: Colors.transparent, | ||
| 835 | + // body: | ||
| 835 | Center(child: StatefulBuilder(builder: (context, state) { | 836 | Center(child: StatefulBuilder(builder: (context, state) { |
| 836 | - // globalState = state; | 837 | + // globalState = state; |
| 837 | 838 | ||
| 838 | - return Material( | ||
| 839 | - color: Colors.transparent, | ||
| 840 | - child: Stack( | ||
| 841 | - clipBehavior: Clip.none, | ||
| 842 | - children: [ | ||
| 843 | - Container( | ||
| 844 | - margin: EdgeInsets.only( | ||
| 845 | - bottom: ScreenUtil().setWidth(150)), | ||
| 846 | - padding: EdgeInsets.symmetric( | ||
| 847 | - horizontal: ScreenUtil().setWidth(50)), | ||
| 848 | - height: mulCreate | ||
| 849 | - ? ScreenUtil().setWidth(310 * 2) | ||
| 850 | - : ScreenUtil().setWidth(346 * 2), | ||
| 851 | - decoration: BoxDecoration( | ||
| 852 | - borderRadius: BorderRadius.circular( | ||
| 853 | - ScreenUtil().setWidth(10))), | ||
| 854 | - child: Card( | ||
| 855 | - shape: RoundedRectangleBorder( | ||
| 856 | - borderRadius: BorderRadius.all( | ||
| 857 | - Radius.circular( | ||
| 858 | - ScreenUtil().setWidth(10)))), //设置圆角 | ||
| 859 | - child: Column( | ||
| 860 | - children: [ | ||
| 861 | - VEmptyView(40), | ||
| 862 | - Container( | 839 | + return Material( |
| 840 | + color: Colors.transparent, | ||
| 841 | + child: Stack( | ||
| 842 | + clipBehavior: Clip.none, | ||
| 843 | + children: [ | ||
| 844 | + Container( | ||
| 845 | + margin: | ||
| 846 | + EdgeInsets.only(bottom: ScreenUtil().setWidth(150)), | ||
| 847 | + padding: EdgeInsets.symmetric( | ||
| 848 | + horizontal: ScreenUtil().setWidth(50)), | ||
| 849 | + height: mulCreate | ||
| 850 | + ? ScreenUtil().setWidth(310 * 2) | ||
| 851 | + : ScreenUtil().setWidth(346 * 2), | ||
| 852 | + decoration: BoxDecoration( | ||
| 853 | + borderRadius: BorderRadius.circular( | ||
| 854 | + ScreenUtil().setWidth(10))), | ||
| 855 | + child: Card( | ||
| 856 | + shape: RoundedRectangleBorder( | ||
| 857 | + borderRadius: BorderRadius.all(Radius.circular( | ||
| 858 | + ScreenUtil().setWidth(10)))), //设置圆角 | ||
| 859 | + child: Column( | ||
| 860 | + children: [ | ||
| 861 | + VEmptyView(40), | ||
| 862 | + Container( | ||
| 863 | + padding: EdgeInsets.symmetric( | ||
| 864 | + horizontal: ScreenUtil().setWidth(44)), | ||
| 865 | + // height: ScreenUtil().setWidth(48), | ||
| 866 | + alignment: Alignment.center, | ||
| 867 | + child: Text('新建桌位', | ||
| 868 | + style: TextStyle( | ||
| 869 | + fontWeight: FontWeight.bold, | ||
| 870 | + fontSize: ScreenUtil().setSp(34), | ||
| 871 | + color: MyColours.color_333333)), | ||
| 872 | + ), | ||
| 873 | + VEmptyView(40), | ||
| 874 | + InkWell( | ||
| 875 | + onTap: () { | ||
| 876 | + state(() { | ||
| 877 | + mulCreate = !mulCreate; | ||
| 878 | + }); | ||
| 879 | + }, | ||
| 880 | + child: Container( | ||
| 863 | padding: EdgeInsets.symmetric( | 881 | padding: EdgeInsets.symmetric( |
| 864 | horizontal: ScreenUtil().setWidth(44)), | 882 | horizontal: ScreenUtil().setWidth(44)), |
| 865 | - // height: ScreenUtil().setWidth(48), | ||
| 866 | - alignment: Alignment.center, | ||
| 867 | - child: Text('新建桌位', | ||
| 868 | - style: TextStyle( | ||
| 869 | - fontWeight: FontWeight.bold, | ||
| 870 | - fontSize: ScreenUtil().setSp(34), | ||
| 871 | - color: MyColours.color_333333)), | ||
| 872 | - ), | ||
| 873 | - VEmptyView(40), | ||
| 874 | - InkWell( | ||
| 875 | - onTap: () { | ||
| 876 | - state(() { | ||
| 877 | - mulCreate = !mulCreate; | ||
| 878 | - }); | ||
| 879 | - }, | ||
| 880 | - child: Container( | ||
| 881 | - padding: EdgeInsets.symmetric( | ||
| 882 | - horizontal: | ||
| 883 | - ScreenUtil().setWidth(44)), | ||
| 884 | - height: ScreenUtil().setWidth(30 * 2), | ||
| 885 | - child: Row( | ||
| 886 | - mainAxisAlignment: | ||
| 887 | - MainAxisAlignment.spaceBetween, | ||
| 888 | - crossAxisAlignment: | ||
| 889 | - CrossAxisAlignment.center, | ||
| 890 | - children: [ | ||
| 891 | - HEmptyView(32), | ||
| 892 | - Text('批量创建', | ||
| 893 | - style: TextStyle( | ||
| 894 | - fontSize: | ||
| 895 | - ScreenUtil().setSp(32), | ||
| 896 | - color: MyColours | ||
| 897 | - .color_000000)), | ||
| 898 | - Spacer(), | ||
| 899 | - Image.asset( | ||
| 900 | - mulCreate | ||
| 901 | - ? Utils.getImgPath( | ||
| 902 | - 'table_manage_swich_on') | ||
| 903 | - : Utils.getImgPath( | ||
| 904 | - 'table_manage_swich_off'), | ||
| 905 | - width: ScreenUtil().setWidth(60), | ||
| 906 | - // height: ScreenUtil().setWidth(82), | ||
| 907 | - ), | ||
| 908 | - HEmptyView(32), | ||
| 909 | - ], | ||
| 910 | - ), | ||
| 911 | - )), | ||
| 912 | - VEmptyView(30), | ||
| 913 | - // MyDivider(double.infinity, | ||
| 914 | - // ScreenUtil().setWidth(2), | ||
| 915 | - // color: MyColours.color_E7E7E7), | ||
| 916 | - // VEmptyView(30), | ||
| 917 | - mulCreate | ||
| 918 | - ? Padding( | ||
| 919 | - padding: EdgeInsets.symmetric( | ||
| 920 | - horizontal: | ||
| 921 | - ScreenUtil().setWidth(72), | ||
| 922 | - ), | ||
| 923 | - child: textfield( | ||
| 924 | - context, | ||
| 925 | - '数量', | ||
| 926 | - '填写个数', | ||
| 927 | - _norNumController, | ||
| 928 | - _norNumFocusNode, | ||
| 929 | - '个', | ||
| 930 | - state)) | ||
| 931 | - : Container( | ||
| 932 | - margin: EdgeInsets.symmetric( | ||
| 933 | - horizontal: | ||
| 934 | - ScreenUtil().setWidth(44)), | ||
| 935 | - height: ScreenUtil().setWidth(48 * 2), | ||
| 936 | - // margin: EdgeInsets.symmetric( | ||
| 937 | - // horizontal: | ||
| 938 | - // ScreenUtil().setWidth(40)), | ||
| 939 | - decoration: BoxDecoration( | ||
| 940 | - color: MyColours.color_f3f3f3, | ||
| 941 | - borderRadius: | ||
| 942 | - BorderRadius.circular( | ||
| 943 | - ScreenUtil() | ||
| 944 | - .setWidth(10))), | ||
| 945 | - child: Row( | ||
| 946 | - crossAxisAlignment: | ||
| 947 | - CrossAxisAlignment.center, | ||
| 948 | - children: [ | ||
| 949 | - HEmptyView(20), | ||
| 950 | - Expanded( | ||
| 951 | - child: TextField( | ||
| 952 | - controller: controller, | ||
| 953 | - maxLines: 1, | ||
| 954 | - // //光标颜色 | ||
| 955 | - // cursorColor: | ||
| 956 | - // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 957 | - //输入文本的样式 | ||
| 958 | - style: TextStyle( | ||
| 959 | - fontSize: ScreenUtil() | ||
| 960 | - .setSp(32), | ||
| 961 | - color: MyColours | ||
| 962 | - .color_515151), | ||
| 963 | - | ||
| 964 | - decoration: InputDecoration( | ||
| 965 | - contentPadding: EdgeInsets.only( | ||
| 966 | - bottom: ScreenUtil() | ||
| 967 | - .setWidth( | ||
| 968 | - 40)), //设置文字内容与边框距离 | ||
| 969 | - // enabledBorder: UnderlineInputBorder( | ||
| 970 | - // borderSide: BorderSide( | ||
| 971 | - // color: MyColours.color_efefef), | ||
| 972 | - // ), | ||
| 973 | - // focusedBorder: UnderlineInputBorder( | ||
| 974 | - // borderSide: BorderSide( | ||
| 975 | - // color: MyColours.color_efefef, | ||
| 976 | - // width: ScreenUtil().setWidth(2)), | ||
| 977 | - // ), | ||
| 978 | - // prefixText: '*', | ||
| 979 | - // prefixStyle: TextStyle( | ||
| 980 | - // fontSize: ScreenUtil().setSp(32), | ||
| 981 | - // color: MyColours.color_E95750), | ||
| 982 | - border: OutlineInputBorder( | ||
| 983 | - borderSide: | ||
| 984 | - BorderSide.none), | ||
| 985 | - hintText: '桌位名称', | ||
| 986 | - hintStyle: TextStyle( | ||
| 987 | - color: MyColours | ||
| 988 | - .color_BFC4D4, | ||
| 989 | - fontSize: ScreenUtil() | ||
| 990 | - .setSp(32), | ||
| 991 | - ), | ||
| 992 | - ), | ||
| 993 | - onChanged: (value) { | ||
| 994 | - state(() {}); | ||
| 995 | - }, | ||
| 996 | - onEditingComplete: () { | ||
| 997 | - FocusScope.of(context) | ||
| 998 | - .requestFocus( | ||
| 999 | - FocusNode()); //点击空白处隐藏键盘 | ||
| 1000 | - }, | ||
| 1001 | - keyboardType: | ||
| 1002 | - TextInputType.text, | ||
| 1003 | - ), | ||
| 1004 | - ) | ||
| 1005 | - ], | ||
| 1006 | - ), | 883 | + height: ScreenUtil().setWidth(30 * 2), |
| 884 | + child: Row( | ||
| 885 | + mainAxisAlignment: | ||
| 886 | + MainAxisAlignment.spaceBetween, | ||
| 887 | + crossAxisAlignment: | ||
| 888 | + CrossAxisAlignment.center, | ||
| 889 | + children: [ | ||
| 890 | + HEmptyView(32), | ||
| 891 | + Text('批量创建', | ||
| 892 | + style: TextStyle( | ||
| 893 | + fontSize: | ||
| 894 | + ScreenUtil().setSp(32), | ||
| 895 | + color: MyColours.color_000000)), | ||
| 896 | + Spacer(), | ||
| 897 | + Image.asset( | ||
| 898 | + mulCreate | ||
| 899 | + ? Utils.getImgPath( | ||
| 900 | + 'table_manage_swich_on') | ||
| 901 | + : Utils.getImgPath( | ||
| 902 | + 'table_manage_swich_off'), | ||
| 903 | + width: ScreenUtil().setWidth(60), | ||
| 904 | + // height: ScreenUtil().setWidth(82), | ||
| 1007 | ), | 905 | ), |
| 1008 | - VEmptyView(32), | ||
| 1009 | - InkWell( | ||
| 1010 | - onTap: () { | ||
| 1011 | - state(() { | ||
| 1012 | - showPnumMax = true; | ||
| 1013 | - showPnumMin = true; | ||
| 1014 | - showBaojian = !showBaojian; | ||
| 1015 | - }); | ||
| 1016 | - }, | ||
| 1017 | - child: Container( | ||
| 1018 | - padding: EdgeInsets.symmetric( | ||
| 1019 | - horizontal: | ||
| 1020 | - ScreenUtil().setWidth(44)), | ||
| 1021 | - height: ScreenUtil().setWidth(30 * 2), | ||
| 1022 | - child: Row( | ||
| 1023 | - crossAxisAlignment: | ||
| 1024 | - CrossAxisAlignment.center, | ||
| 1025 | - children: [ | ||
| 1026 | - HEmptyView(32), | ||
| 1027 | - Text( | ||
| 1028 | - '桌位类型', | 906 | + HEmptyView(32), |
| 907 | + ], | ||
| 908 | + ), | ||
| 909 | + )), | ||
| 910 | + VEmptyView(30), | ||
| 911 | + // MyDivider(double.infinity, | ||
| 912 | + // ScreenUtil().setWidth(2), | ||
| 913 | + // color: MyColours.color_E7E7E7), | ||
| 914 | + // VEmptyView(30), | ||
| 915 | + mulCreate | ||
| 916 | + ? Padding( | ||
| 917 | + padding: EdgeInsets.symmetric( | ||
| 918 | + horizontal: ScreenUtil().setWidth(72), | ||
| 919 | + ), | ||
| 920 | + child: textfield( | ||
| 921 | + context, | ||
| 922 | + '数量', | ||
| 923 | + '填写个数', | ||
| 924 | + _norNumController, | ||
| 925 | + _norNumFocusNode, | ||
| 926 | + '个', | ||
| 927 | + state)) | ||
| 928 | + : Container( | ||
| 929 | + margin: EdgeInsets.symmetric( | ||
| 930 | + horizontal: | ||
| 931 | + ScreenUtil().setWidth(44)), | ||
| 932 | + height: ScreenUtil().setWidth(48 * 2), | ||
| 933 | + // margin: EdgeInsets.symmetric( | ||
| 934 | + // horizontal: | ||
| 935 | + // ScreenUtil().setWidth(40)), | ||
| 936 | + decoration: BoxDecoration( | ||
| 937 | + color: MyColours.color_f3f3f3, | ||
| 938 | + borderRadius: BorderRadius.circular( | ||
| 939 | + ScreenUtil().setWidth(10))), | ||
| 940 | + child: Row( | ||
| 941 | + crossAxisAlignment: | ||
| 942 | + CrossAxisAlignment.center, | ||
| 943 | + children: [ | ||
| 944 | + HEmptyView(20), | ||
| 945 | + Expanded( | ||
| 946 | + child: TextField( | ||
| 947 | + controller: controller, | ||
| 948 | + maxLines: 1, | ||
| 949 | + // //光标颜色 | ||
| 950 | + // cursorColor: | ||
| 951 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 952 | + //输入文本的样式 | ||
| 1029 | style: TextStyle( | 953 | style: TextStyle( |
| 1030 | fontSize: | 954 | fontSize: |
| 1031 | ScreenUtil().setSp(32), | 955 | ScreenUtil().setSp(32), |
| 1032 | color: | 956 | color: |
| 1033 | - MyColours.color_000000), | ||
| 1034 | - ), | ||
| 1035 | - Spacer(), | ||
| 1036 | - // Stack( | ||
| 1037 | - // overflow: Overflow.visible, | ||
| 1038 | - // children: [ | ||
| 1039 | - Text( | ||
| 1040 | - baojian, | ||
| 1041 | - style: TextStyle( | ||
| 1042 | - color: MyColours.color_515151, | 957 | + MyColours.color_515151), |
| 958 | + | ||
| 959 | + decoration: InputDecoration( | ||
| 960 | + contentPadding: EdgeInsets.only( | ||
| 961 | + bottom: ScreenUtil() | ||
| 962 | + .setWidth( | ||
| 963 | + 40)), //设置文字内容与边框距离 | ||
| 964 | + // enabledBorder: UnderlineInputBorder( | ||
| 965 | + // borderSide: BorderSide( | ||
| 966 | + // color: MyColours.color_efefef), | ||
| 967 | + // ), | ||
| 968 | + // focusedBorder: UnderlineInputBorder( | ||
| 969 | + // borderSide: BorderSide( | ||
| 970 | + // color: MyColours.color_efefef, | ||
| 971 | + // width: ScreenUtil().setWidth(2)), | ||
| 972 | + // ), | ||
| 973 | + // prefixText: '*', | ||
| 974 | + // prefixStyle: TextStyle( | ||
| 975 | + // fontSize: ScreenUtil().setSp(32), | ||
| 976 | + // color: MyColours.color_E95750), | ||
| 977 | + border: OutlineInputBorder( | ||
| 978 | + borderSide: | ||
| 979 | + BorderSide.none), | ||
| 980 | + hintText: '桌位名称', | ||
| 981 | + hintStyle: TextStyle( | ||
| 982 | + color: MyColours.color_BFC4D4, | ||
| 1043 | fontSize: | 983 | fontSize: |
| 1044 | - ScreenUtil().setSp(32)), | 984 | + ScreenUtil().setSp(32), |
| 985 | + ), | ||
| 986 | + ), | ||
| 987 | + onChanged: (value) { | ||
| 988 | + state(() {}); | ||
| 989 | + }, | ||
| 990 | + onEditingComplete: () { | ||
| 991 | + FocusScope.of(context) | ||
| 992 | + .requestFocus( | ||
| 993 | + FocusNode()); //点击空白处隐藏键盘 | ||
| 994 | + }, | ||
| 995 | + keyboardType: TextInputType.text, | ||
| 1045 | ), | 996 | ), |
| 1046 | - HEmptyView(12), | ||
| 1047 | - Image.asset( | ||
| 1048 | - Utils.getImgPath( | ||
| 1049 | - 'table_manage_arrow_down'), | ||
| 1050 | - width: | ||
| 1051 | - ScreenUtil().setWidth(40)), | ||
| 1052 | - HEmptyView(32), | ||
| 1053 | - ], | 997 | + ) |
| 998 | + ], | ||
| 999 | + ), | ||
| 1000 | + ), | ||
| 1001 | + VEmptyView(32), | ||
| 1002 | + InkWell( | ||
| 1003 | + onTap: () { | ||
| 1004 | + state(() { | ||
| 1005 | + showPnumMax = true; | ||
| 1006 | + showPnumMin = true; | ||
| 1007 | + showBaojian = !showBaojian; | ||
| 1008 | + }); | ||
| 1009 | + }, | ||
| 1010 | + child: Container( | ||
| 1011 | + padding: EdgeInsets.symmetric( | ||
| 1012 | + horizontal: ScreenUtil().setWidth(44)), | ||
| 1013 | + height: ScreenUtil().setWidth(30 * 2), | ||
| 1014 | + child: Row( | ||
| 1015 | + crossAxisAlignment: | ||
| 1016 | + CrossAxisAlignment.center, | ||
| 1017 | + children: [ | ||
| 1018 | + HEmptyView(32), | ||
| 1019 | + Text( | ||
| 1020 | + '桌位类型', | ||
| 1021 | + style: TextStyle( | ||
| 1022 | + fontSize: ScreenUtil().setSp(32), | ||
| 1023 | + color: MyColours.color_000000), | ||
| 1054 | ), | 1024 | ), |
| 1055 | - )), | ||
| 1056 | - | ||
| 1057 | - mulCreate | ||
| 1058 | - ? SizedBox() | ||
| 1059 | - : Container( | ||
| 1060 | - margin: EdgeInsets.only( | ||
| 1061 | - top: ScreenUtil().setWidth(30)), | ||
| 1062 | - padding: EdgeInsets.only( | ||
| 1063 | - left: ScreenUtil().setWidth(44), | ||
| 1064 | - right: ScreenUtil().setWidth(44)), | ||
| 1065 | - height: ScreenUtil().setWidth(30 * 2), | ||
| 1066 | - child: Row( | ||
| 1067 | - crossAxisAlignment: | ||
| 1068 | - CrossAxisAlignment.center, | ||
| 1069 | - children: [ | ||
| 1070 | - HEmptyView(32), | ||
| 1071 | - Text( | ||
| 1072 | - '人数', | ||
| 1073 | - style: TextStyle( | ||
| 1074 | - fontSize: | ||
| 1075 | - ScreenUtil().setSp(32), | ||
| 1076 | - color: | ||
| 1077 | - MyColours.color_000000), | ||
| 1078 | - ), | ||
| 1079 | - Spacer(), | ||
| 1080 | - // Stack( | ||
| 1081 | - // overflow: Overflow.visible, | ||
| 1082 | - // children: [ | ||
| 1083 | - btnChooseTableManagePnum( | ||
| 1084 | - pnumMin, | ||
| 1085 | - 'min', | ||
| 1086 | - ScreenUtil().setWidth(54 * 2), | ||
| 1087 | - (value) { | ||
| 1088 | - state(() { | ||
| 1089 | - showBaojian = true; | ||
| 1090 | - showPnumMax = true; | ||
| 1091 | - showPnumMin = !showPnumMin; | ||
| 1092 | - }); | ||
| 1093 | - }), | ||
| 1094 | - HEmptyView(40), | ||
| 1095 | - Text( | ||
| 1096 | - '至', | ||
| 1097 | - style: TextStyle( | ||
| 1098 | - fontSize: | ||
| 1099 | - ScreenUtil().setSp(32), | ||
| 1100 | - color: | ||
| 1101 | - MyColours.color_000000), | ||
| 1102 | - ), | ||
| 1103 | - HEmptyView(40), | ||
| 1104 | - btnChooseTableManagePnum( | ||
| 1105 | - pnumMax, | ||
| 1106 | - 'max', | ||
| 1107 | - ScreenUtil().setWidth(54 * 2), | ||
| 1108 | - (value) { | ||
| 1109 | - state(() { | ||
| 1110 | - showBaojian = true; | ||
| 1111 | - showPnumMin = true; | ||
| 1112 | - showPnumMax = !showPnumMax; | ||
| 1113 | - }); | ||
| 1114 | - }), | ||
| 1115 | - HEmptyView(32), | ||
| 1116 | - ], | ||
| 1117 | - ), | 1025 | + Spacer(), |
| 1026 | + // Stack( | ||
| 1027 | + // overflow: Overflow.visible, | ||
| 1028 | + // children: [ | ||
| 1029 | + Text( | ||
| 1030 | + baojian, | ||
| 1031 | + style: TextStyle( | ||
| 1032 | + color: MyColours.color_515151, | ||
| 1033 | + fontSize: ScreenUtil().setSp(32)), | ||
| 1118 | ), | 1034 | ), |
| 1119 | - VEmptyView(60), | ||
| 1120 | - MyDivider( | ||
| 1121 | - double.infinity, ScreenUtil().setWidth(2), | ||
| 1122 | - color: MyColours.color_f3f3f3), | ||
| 1123 | - Row( | ||
| 1124 | - // mainAxisAlignment: | ||
| 1125 | - // MainAxisAlignment.spaceBetween, | ||
| 1126 | - children: [ | ||
| 1127 | - RoundButton( | ||
| 1128 | - text: '取消', | ||
| 1129 | - width: (ScreenUtil.screenWidthDp - | ||
| 1130 | - ScreenUtil().setWidth(62) * | ||
| 1131 | - 2) / | ||
| 1132 | - 2, | ||
| 1133 | - height: ScreenUtil().setWidth(112), | ||
| 1134 | - // radius: ScreenUtil().setWidth(10), | ||
| 1135 | - gradientStart: Colors.transparent, | ||
| 1136 | - gradientEnd: Colors.transparent, | ||
| 1137 | - textColor: MyColours.color_000000, | ||
| 1138 | - isBold: false, | ||
| 1139 | - fontSize: 34, | ||
| 1140 | - onPressed: () { | ||
| 1141 | - Navigator.pop(context); | ||
| 1142 | - }), | ||
| 1143 | - MyDivider(ScreenUtil().setWidth(2), | ||
| 1144 | - ScreenUtil().setWidth(112), | ||
| 1145 | - color: MyColours.color_f3f3f3), | ||
| 1146 | - RoundButton( | ||
| 1147 | - text: '确定', | ||
| 1148 | - width: (ScreenUtil.screenWidthDp - | ||
| 1149 | - ScreenUtil().setWidth(62) * | ||
| 1150 | - 2) / | ||
| 1151 | - 2, | ||
| 1152 | - height: ScreenUtil().setWidth(112), | ||
| 1153 | - // radius: ScreenUtil().setWidth(10), | ||
| 1154 | - gradientStart: Colors.transparent, | ||
| 1155 | - gradientEnd: Colors.transparent, | ||
| 1156 | - textColor: (!mulCreate && | ||
| 1157 | - controller.text == | ||
| 1158 | - '') || | ||
| 1159 | - (mulCreate && | ||
| 1160 | - _norNumController.text | ||
| 1161 | - .trim() == | ||
| 1162 | - '') | ||
| 1163 | - ? MyColours.color_999999 | ||
| 1164 | - : MyColours.color_438E93, | ||
| 1165 | - fontSize: 34, | ||
| 1166 | - onPressed: () { | ||
| 1167 | - if (mulCreate && | ||
| 1168 | - _norNumController.text | ||
| 1169 | - .trim() | ||
| 1170 | - .length == | ||
| 1171 | - 0) { | ||
| 1172 | - Utils.showToast('请输入数量!'); | ||
| 1173 | - return; | ||
| 1174 | - } | ||
| 1175 | - if (mulCreate && | ||
| 1176 | - !Utils.isNumber( | ||
| 1177 | - _norNumController.text)) { | ||
| 1178 | - Utils.showToast('请输入数字!'); | ||
| 1179 | - return; | ||
| 1180 | - } | ||
| 1181 | - if (mulCreate && | ||
| 1182 | - int.parse(_norNumController | ||
| 1183 | - .text) > | ||
| 1184 | - 20) { | ||
| 1185 | - Utils.showToast('最多可创建20个桌位!'); | ||
| 1186 | - return; | ||
| 1187 | - } | ||
| 1188 | - if (!mulCreate && | ||
| 1189 | - controller.text.trim() == | ||
| 1190 | - '') { | ||
| 1191 | - Utils.showToast('请输入桌位名称!'); | ||
| 1192 | - return; | ||
| 1193 | - } | ||
| 1194 | - // 当前选中区域 | ||
| 1195 | - // areas[currentAreaIndex] | ||
| 1196 | - //最低人数 | ||
| 1197 | - // pnumMin | ||
| 1198 | - //最高人数 | ||
| 1199 | - // pnumMax | 1035 | + HEmptyView(12), |
| 1036 | + Image.asset( | ||
| 1037 | + Utils.getImgPath( | ||
| 1038 | + 'table_manage_arrow_down'), | ||
| 1039 | + width: ScreenUtil().setWidth(40)), | ||
| 1040 | + HEmptyView(32), | ||
| 1041 | + ], | ||
| 1042 | + ), | ||
| 1043 | + )), | ||
| 1200 | 1044 | ||
| 1201 | - onTap({ | ||
| 1202 | - 'bjtype': baojianList[ | ||
| 1203 | - currentBaojianIndex], | ||
| 1204 | - 'name': controller.text, | ||
| 1205 | - 'pnumMin': pnumMin, | ||
| 1206 | - 'pnumMax': pnumMax, | ||
| 1207 | - 'mulcreate': | ||
| 1208 | - mulCreate.toString(), | ||
| 1209 | - 'tablenum': | 1045 | + mulCreate |
| 1046 | + ? SizedBox() | ||
| 1047 | + : Container( | ||
| 1048 | + margin: EdgeInsets.only( | ||
| 1049 | + top: ScreenUtil().setWidth(30)), | ||
| 1050 | + padding: EdgeInsets.only( | ||
| 1051 | + left: ScreenUtil().setWidth(44), | ||
| 1052 | + right: ScreenUtil().setWidth(44)), | ||
| 1053 | + height: ScreenUtil().setWidth(30 * 2), | ||
| 1054 | + child: Row( | ||
| 1055 | + crossAxisAlignment: | ||
| 1056 | + CrossAxisAlignment.center, | ||
| 1057 | + children: [ | ||
| 1058 | + HEmptyView(32), | ||
| 1059 | + Text( | ||
| 1060 | + '人数', | ||
| 1061 | + style: TextStyle( | ||
| 1062 | + fontSize: | ||
| 1063 | + ScreenUtil().setSp(32), | ||
| 1064 | + color: MyColours.color_000000), | ||
| 1065 | + ), | ||
| 1066 | + Spacer(), | ||
| 1067 | + // Stack( | ||
| 1068 | + // overflow: Overflow.visible, | ||
| 1069 | + // children: [ | ||
| 1070 | + btnChooseTableManagePnum( | ||
| 1071 | + pnumMin, | ||
| 1072 | + 'min', | ||
| 1073 | + ScreenUtil().setWidth(54 * 2), | ||
| 1074 | + (value) { | ||
| 1075 | + state(() { | ||
| 1076 | + showBaojian = true; | ||
| 1077 | + showPnumMax = true; | ||
| 1078 | + showPnumMin = !showPnumMin; | ||
| 1079 | + }); | ||
| 1080 | + }), | ||
| 1081 | + HEmptyView(40), | ||
| 1082 | + Text( | ||
| 1083 | + '至', | ||
| 1084 | + style: TextStyle( | ||
| 1085 | + fontSize: | ||
| 1086 | + ScreenUtil().setSp(32), | ||
| 1087 | + color: MyColours.color_000000), | ||
| 1088 | + ), | ||
| 1089 | + HEmptyView(40), | ||
| 1090 | + btnChooseTableManagePnum( | ||
| 1091 | + pnumMax, | ||
| 1092 | + 'max', | ||
| 1093 | + ScreenUtil().setWidth(54 * 2), | ||
| 1094 | + (value) { | ||
| 1095 | + state(() { | ||
| 1096 | + showBaojian = true; | ||
| 1097 | + showPnumMin = true; | ||
| 1098 | + showPnumMax = !showPnumMax; | ||
| 1099 | + }); | ||
| 1100 | + }), | ||
| 1101 | + HEmptyView(32), | ||
| 1102 | + ], | ||
| 1103 | + ), | ||
| 1104 | + ), | ||
| 1105 | + VEmptyView(60), | ||
| 1106 | + MyDivider( | ||
| 1107 | + double.infinity, ScreenUtil().setWidth(2), | ||
| 1108 | + color: MyColours.color_f3f3f3), | ||
| 1109 | + Row( | ||
| 1110 | + // mainAxisAlignment: | ||
| 1111 | + // MainAxisAlignment.spaceBetween, | ||
| 1112 | + children: [ | ||
| 1113 | + RoundButton( | ||
| 1114 | + text: '取消', | ||
| 1115 | + width: (ScreenUtil.screenWidthDp - | ||
| 1116 | + ScreenUtil().setWidth(62) * 2) / | ||
| 1117 | + 2, | ||
| 1118 | + height: ScreenUtil().setWidth(112), | ||
| 1119 | + // radius: ScreenUtil().setWidth(10), | ||
| 1120 | + gradientStart: Colors.transparent, | ||
| 1121 | + gradientEnd: Colors.transparent, | ||
| 1122 | + textColor: MyColours.color_000000, | ||
| 1123 | + isBold: false, | ||
| 1124 | + fontSize: 34, | ||
| 1125 | + onPressed: () { | ||
| 1126 | + Navigator.pop(context); | ||
| 1127 | + }), | ||
| 1128 | + MyDivider(ScreenUtil().setWidth(2), | ||
| 1129 | + ScreenUtil().setWidth(112), | ||
| 1130 | + color: MyColours.color_f3f3f3), | ||
| 1131 | + RoundButton( | ||
| 1132 | + text: '确定', | ||
| 1133 | + width: (ScreenUtil.screenWidthDp - | ||
| 1134 | + ScreenUtil().setWidth(62) * 2) / | ||
| 1135 | + 2, | ||
| 1136 | + height: ScreenUtil().setWidth(112), | ||
| 1137 | + // radius: ScreenUtil().setWidth(10), | ||
| 1138 | + gradientStart: Colors.transparent, | ||
| 1139 | + gradientEnd: Colors.transparent, | ||
| 1140 | + textColor: (!mulCreate && | ||
| 1141 | + controller.text == '') || | ||
| 1142 | + (mulCreate && | ||
| 1210 | _norNumController.text | 1143 | _norNumController.text |
| 1211 | - }); | ||
| 1212 | - Navigator.pop(context); | ||
| 1213 | - }), | ||
| 1214 | - ]) | ||
| 1215 | - ], | ||
| 1216 | - ), | ||
| 1217 | - )), | ||
| 1218 | - Positioned( | ||
| 1219 | - right: ScreenUtil().setWidth(0), | ||
| 1220 | - top: ScreenUtil().setWidth(194 * 2), | ||
| 1221 | - child: Offstage( | ||
| 1222 | - offstage: showBaojian, | ||
| 1223 | - child: tableManageSelectWidget(baojianList, 210, | ||
| 1224 | - (index) { | ||
| 1225 | - state(() { | ||
| 1226 | - showBaojian = !showBaojian; | ||
| 1227 | - currentBaojianIndex = index; | ||
| 1228 | - baojian = baojianList[currentBaojianIndex]; | ||
| 1229 | - }); | ||
| 1230 | - }), | ||
| 1231 | - )), | ||
| 1232 | - Positioned( | ||
| 1233 | - left: ScreenUtil().setWidth(190 * 2), | ||
| 1234 | - top: ScreenUtil().setWidth(242 * 2), | ||
| 1235 | - child: Offstage( | ||
| 1236 | - offstage: showPnumMin, | ||
| 1237 | - child: selectWidgetTableManage(pnum, (index) { | ||
| 1238 | - state(() { | ||
| 1239 | - showPnumMin = !showPnumMin; | ||
| 1240 | - pnumMin = pnum[index]; | ||
| 1241 | - }); | ||
| 1242 | - }), | ||
| 1243 | - )), | ||
| 1244 | - Positioned( | ||
| 1245 | - right: ScreenUtil().setWidth(0), | ||
| 1246 | - top: ScreenUtil().setWidth(242 * 2), | ||
| 1247 | - child: Offstage( | ||
| 1248 | - offstage: showPnumMax, | ||
| 1249 | - child: selectWidgetTableManage(pnum, (index) { | ||
| 1250 | - state(() { | ||
| 1251 | - showPnumMax = !showPnumMax; | ||
| 1252 | - pnumMax = pnum[index]; | ||
| 1253 | - }); | ||
| 1254 | - }), | ||
| 1255 | - )), | ||
| 1256 | - ], | ||
| 1257 | - )); | ||
| 1258 | - })); | 1144 | + .trim() == |
| 1145 | + '') | ||
| 1146 | + ? MyColours.color_999999 | ||
| 1147 | + : MyColours.color_438E93, | ||
| 1148 | + fontSize: 34, | ||
| 1149 | + onPressed: () { | ||
| 1150 | + if (mulCreate && | ||
| 1151 | + _norNumController.text | ||
| 1152 | + .trim() | ||
| 1153 | + .length == | ||
| 1154 | + 0) { | ||
| 1155 | + Utils.showToast('请输入数量!'); | ||
| 1156 | + return; | ||
| 1157 | + } | ||
| 1158 | + if (mulCreate && | ||
| 1159 | + !Utils.isNumber( | ||
| 1160 | + _norNumController.text)) { | ||
| 1161 | + Utils.showToast('请输入数字!'); | ||
| 1162 | + return; | ||
| 1163 | + } | ||
| 1164 | + if (mulCreate && | ||
| 1165 | + int.parse( | ||
| 1166 | + _norNumController.text) > | ||
| 1167 | + 20) { | ||
| 1168 | + Utils.showToast('最多可创建20个桌位!'); | ||
| 1169 | + return; | ||
| 1170 | + } | ||
| 1171 | + if (!mulCreate && | ||
| 1172 | + controller.text.trim() == '') { | ||
| 1173 | + Utils.showToast('请输入桌位名称!'); | ||
| 1174 | + return; | ||
| 1175 | + } | ||
| 1176 | + // 当前选中区域 | ||
| 1177 | + // areas[currentAreaIndex] | ||
| 1178 | + //最低人数 | ||
| 1179 | + // pnumMin | ||
| 1180 | + //最高人数 | ||
| 1181 | + // pnumMax | ||
| 1182 | + | ||
| 1183 | + onTap({ | ||
| 1184 | + 'bjtype': baojianList[ | ||
| 1185 | + currentBaojianIndex], | ||
| 1186 | + 'name': controller.text, | ||
| 1187 | + 'pnumMin': pnumMin, | ||
| 1188 | + 'pnumMax': pnumMax, | ||
| 1189 | + 'mulcreate': mulCreate.toString(), | ||
| 1190 | + 'tablenum': _norNumController.text | ||
| 1191 | + }); | ||
| 1192 | + Navigator.pop(context); | ||
| 1193 | + }), | ||
| 1194 | + ]) | ||
| 1195 | + ], | ||
| 1196 | + ), | ||
| 1197 | + )), | ||
| 1198 | + Positioned( | ||
| 1199 | + right: ScreenUtil().setWidth(0), | ||
| 1200 | + top: ScreenUtil().setWidth(194 * 2), | ||
| 1201 | + child: Offstage( | ||
| 1202 | + offstage: showBaojian, | ||
| 1203 | + child: tableManageSelectWidget(baojianList, 210, | ||
| 1204 | + (index) { | ||
| 1205 | + state(() { | ||
| 1206 | + showBaojian = !showBaojian; | ||
| 1207 | + currentBaojianIndex = index; | ||
| 1208 | + baojian = baojianList[currentBaojianIndex]; | ||
| 1209 | + }); | ||
| 1210 | + }), | ||
| 1211 | + )), | ||
| 1212 | + Positioned( | ||
| 1213 | + left: ScreenUtil().setWidth(190 * 2), | ||
| 1214 | + top: ScreenUtil().setWidth(242 * 2), | ||
| 1215 | + child: Offstage( | ||
| 1216 | + offstage: showPnumMin, | ||
| 1217 | + child: selectWidgetTableManage(pnum, (index) { | ||
| 1218 | + state(() { | ||
| 1219 | + showPnumMin = !showPnumMin; | ||
| 1220 | + pnumMin = pnum[index]; | ||
| 1221 | + }); | ||
| 1222 | + }), | ||
| 1223 | + )), | ||
| 1224 | + Positioned( | ||
| 1225 | + right: ScreenUtil().setWidth(0), | ||
| 1226 | + top: ScreenUtil().setWidth(242 * 2), | ||
| 1227 | + child: Offstage( | ||
| 1228 | + offstage: showPnumMax, | ||
| 1229 | + child: selectWidgetTableManage(pnum, (index) { | ||
| 1230 | + state(() { | ||
| 1231 | + showPnumMax = !showPnumMax; | ||
| 1232 | + pnumMax = pnum[index]; | ||
| 1233 | + }); | ||
| 1234 | + }), | ||
| 1235 | + )), | ||
| 1236 | + ], | ||
| 1237 | + )); | ||
| 1238 | + })); | ||
| 1259 | }); | 1239 | }); |
| 1260 | } | 1240 | } |
| 1261 | 1241 | ||
| @@ -2994,7 +2974,7 @@ class DialogUtil { | @@ -2994,7 +2974,7 @@ class DialogUtil { | ||
| 2994 | isScrollControlled: true, | 2974 | isScrollControlled: true, |
| 2995 | builder: (BuildContext dialogContext) { | 2975 | builder: (BuildContext dialogContext) { |
| 2996 | Widget widget = Container( | 2976 | Widget widget = Container( |
| 2997 | - color: MyColours.app_main, | 2977 | + color: MyColours.color_ffffff, |
| 2998 | child: Column( | 2978 | child: Column( |
| 2999 | mainAxisSize: MainAxisSize.min, | 2979 | mainAxisSize: MainAxisSize.min, |
| 3000 | children: <Widget>[ | 2980 | children: <Widget>[ |
| @@ -3006,8 +2986,8 @@ class DialogUtil { | @@ -3006,8 +2986,8 @@ class DialogUtil { | ||
| 3006 | children: <Widget>[ | 2986 | children: <Widget>[ |
| 3007 | Container( | 2987 | Container( |
| 3008 | margin: EdgeInsets.only( | 2988 | margin: EdgeInsets.only( |
| 3009 | - top: ScreenUtil().setWidth(21), | ||
| 3010 | - bottom: ScreenUtil().setWidth(12)), | 2989 | + top: ScreenUtil().setWidth(31), |
| 2990 | + bottom: ScreenUtil().setWidth(2)), | ||
| 3011 | width: double.infinity, | 2991 | width: double.infinity, |
| 3012 | child: Stack( | 2992 | child: Stack( |
| 3013 | alignment: Alignment.center, | 2993 | alignment: Alignment.center, |
| @@ -3015,7 +2995,7 @@ class DialogUtil { | @@ -3015,7 +2995,7 @@ class DialogUtil { | ||
| 3015 | Text( | 2995 | Text( |
| 3016 | "您有一条新的消息", | 2996 | "您有一条新的消息", |
| 3017 | style: TextStyle( | 2997 | style: TextStyle( |
| 3018 | - color: MyColours.color_ffffff, | 2998 | + color: MyColours.color_333333, |
| 3019 | fontSize: ScreenUtil().setSp(32)), | 2999 | fontSize: ScreenUtil().setSp(32)), |
| 3020 | ), | 3000 | ), |
| 3021 | Positioned( | 3001 | Positioned( |
| @@ -3028,7 +3008,7 @@ class DialogUtil { | @@ -3028,7 +3008,7 @@ class DialogUtil { | ||
| 3028 | padding: EdgeInsets.all( | 3008 | padding: EdgeInsets.all( |
| 3029 | ScreenUtil().setWidth(12)), | 3009 | ScreenUtil().setWidth(12)), |
| 3030 | child: Image.asset( | 3010 | child: Image.asset( |
| 3031 | - "assets/icon_close.png", | 3011 | + "assets/close1.png", |
| 3032 | width: ScreenUtil().setWidth(28), | 3012 | width: ScreenUtil().setWidth(28), |
| 3033 | height: ScreenUtil().setWidth(28), | 3013 | height: ScreenUtil().setWidth(28), |
| 3034 | ), | 3014 | ), |
| @@ -3104,7 +3084,8 @@ class DialogUtil { | @@ -3104,7 +3084,8 @@ class DialogUtil { | ||
| 3104 | ) | 3084 | ) |
| 3105 | : ListView.builder( | 3085 | : ListView.builder( |
| 3106 | itemBuilder: (context, index) { | 3086 | itemBuilder: (context, index) { |
| 3107 | - return MessageDialogItem(model.messages[index]); | 3087 | + return MessageDialogItemF( |
| 3088 | + model.messages[index]); | ||
| 3108 | }, | 3089 | }, |
| 3109 | itemCount: model.messages.length, | 3090 | itemCount: model.messages.length, |
| 3110 | shrinkWrap: true) | 3091 | shrinkWrap: true) |
-
Please register or login to post a comment