Commit 7e7f0a1acccfd63ce65d0c7ce4d76f76558ccd1e

Authored by wdn127929
1 parent 4c457a82

已预订 xxx 订

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 50; 6 + objectVersion = 46;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -510,7 +510,7 @@ @@ -510,7 +510,7 @@
510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
511 CODE_SIGN_IDENTITY = "Apple Development"; 511 CODE_SIGN_IDENTITY = "Apple Development";
512 CODE_SIGN_STYLE = Automatic; 512 CODE_SIGN_STYLE = Automatic;
513 - CURRENT_PROJECT_VERSION = 490; 513 + CURRENT_PROJECT_VERSION = 491;
514 DEVELOPMENT_TEAM = 8J59HM8B82; 514 DEVELOPMENT_TEAM = 8J59HM8B82;
515 ENABLE_BITCODE = NO; 515 ENABLE_BITCODE = NO;
516 FLUTTER_BUILD_MODE = release; 516 FLUTTER_BUILD_MODE = release;
@@ -656,10 +656,10 @@ @@ -656,10 +656,10 @@
656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
657 CODE_SIGN_IDENTITY = "Apple Development"; 657 CODE_SIGN_IDENTITY = "Apple Development";
658 CODE_SIGN_STYLE = Automatic; 658 CODE_SIGN_STYLE = Automatic;
659 - CURRENT_PROJECT_VERSION = 490; 659 + CURRENT_PROJECT_VERSION = 491;
660 DEVELOPMENT_TEAM = 8J59HM8B82; 660 DEVELOPMENT_TEAM = 8J59HM8B82;
661 ENABLE_BITCODE = NO; 661 ENABLE_BITCODE = NO;
662 - FLUTTER_BUILD_MODE = debug; 662 + FLUTTER_BUILD_MODE = release;
663 FRAMEWORK_SEARCH_PATHS = ( 663 FRAMEWORK_SEARCH_PATHS = (
664 "$(inherited)", 664 "$(inherited)",
665 "$(PROJECT_DIR)/Flutter", 665 "$(PROJECT_DIR)/Flutter",
@@ -692,7 +692,7 @@ @@ -692,7 +692,7 @@
692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
693 CODE_SIGN_IDENTITY = "Apple Development"; 693 CODE_SIGN_IDENTITY = "Apple Development";
694 CODE_SIGN_STYLE = Automatic; 694 CODE_SIGN_STYLE = Automatic;
695 - CURRENT_PROJECT_VERSION = 490; 695 + CURRENT_PROJECT_VERSION = 491;
696 DEVELOPMENT_TEAM = 8J59HM8B82; 696 DEVELOPMENT_TEAM = 8J59HM8B82;
697 ENABLE_BITCODE = NO; 697 ENABLE_BITCODE = NO;
698 FLUTTER_BUILD_MODE = release; 698 FLUTTER_BUILD_MODE = release;
@@ -28,12 +28,13 @@ class UserHistoryEntity extends Object with ISuspensionBean { @@ -28,12 +28,13 @@ class UserHistoryEntity extends Object with ISuspensionBean {
28 String pinyinFirst; //首字母 28 String pinyinFirst; //首字母
29 String tagIndex; //abcdefg 29 String tagIndex; //abcdefg
30 String get rnameStr { 30 String get rnameStr {
31 - if (rname == null || rname == '' || rname == ' ') return ""; 31 + if (rname == null || rname == ' ' || rname.replaceAll(' ', '') == '')
  32 + return "";
32 return rname + sexStr; 33 return rname + sexStr;
33 } 34 }
34 35
35 String get sexStr { 36 String get sexStr {
36 - if (sex == null || sex == '') return ""; 37 + if (sex != '1' && sex != '2' && sex != '3') return "";
37 switch (sex.toString()) { 38 switch (sex.toString()) {
38 case "1": //先生 39 case "1": //先生
39 case "男": 40 case "男":
@@ -710,7 +710,7 @@ class _EditReserverPageState extends State<EditReserverPage> { @@ -710,7 +710,7 @@ class _EditReserverPageState extends State<EditReserverPage> {
710 detailModel 710 detailModel
711 .userHistorys[ 711 .userHistorys[
712 index] 712 index]
713 - .rname == 713 + .rnameStr ==
714 null 714 null
715 ? '' 715 ? ''
716 : detailModel 716 : detailModel
@@ -2050,7 +2050,7 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { @@ -2050,7 +2050,7 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> {
2050 "1" 2050 "1"
2051 ? //判断是否在线预订 2051 ? //判断是否在线预订
2052 await _notebookDetailChangeModel 2052 await _notebookDetailChangeModel
2053 - .updateOnlineReserveInfo(context, nameStr) 2053 + .updateOnlineReserveInfo(context, nameStr,widget.detailEntity.uid)
2054 : await _notebookDetailChangeModel 2054 : await _notebookDetailChangeModel
2055 .setReserveInfo(context, nameStr, 2055 .setReserveInfo(context, nameStr,
2056 widget.detailEntity.uid); 2056 widget.detailEntity.uid);
@@ -951,6 +951,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -951,6 +951,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
951 cusdem: _cusdemController.text); 951 cusdem: _cusdemController.text);
952 952
953 if (sucess) { 953 if (sucess) {
  954 + bus.emit("refresh_book_list"); //刷新已预订列表
  955 +
954 await _getReserveDetail(showCicle: false); 956 await _getReserveDetail(showCicle: false);
955 Navigator.pop(context); 957 Navigator.pop(context);
956 } 958 }
@@ -1526,6 +1528,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1526,6 +1528,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1526 pnumC.text); 1528 pnumC.text);
1527 1529
1528 if (sucess) { 1530 if (sucess) {
  1531 + bus.emit(
  1532 + "refresh_book_list"); //刷新已预订列表
  1533 +
1529 EventBus().emit( 1534 EventBus().emit(
1530 "refresh_tablemanager"); //刷新桌位 1535 "refresh_tablemanager"); //刷新桌位
1531 await _getReserveDetail( 1536 await _getReserveDetail(
@@ -1596,9 +1601,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1596,9 +1601,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1596 focusNode: priceF, 1601 focusNode: priceF,
1597 ), 1602 ),
1598 Offstage( 1603 Offstage(
1599 - offstage: detailEntity.place_order_name == 1604 + offstage: detailEntity
  1605 + .place_order_name ==
1600 '' || 1606 '' ||
1601 - detailEntity.place_order_name == null, 1607 + detailEntity
  1608 + .place_order_name ==
  1609 + null,
1602 child: RowMultiText("下单人", 1610 child: RowMultiText("下单人",
1603 '${detailEntity.place_order_name ?? ''}', 1611 '${detailEntity.place_order_name ?? ''}',
1604 textColor: 1612 textColor:
@@ -3539,15 +3547,16 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> @@ -3539,15 +3547,16 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
3539 } 3547 }
3540 3548
3541 /// 修改金额 3549 /// 修改金额
3542 - _updateMoney() { 3550 + _updateMoney() async {
3543 removeOverlay(); 3551 removeOverlay();
3544 if (widget.detailModel.prestrTF == null || 3552 if (widget.detailModel.prestrTF == null ||
3545 widget.detailModel.prestrTF == "") { 3553 widget.detailModel.prestrTF == "") {
3546 if (widget.detailModel.numController.text.trim().length > 0) { 3554 if (widget.detailModel.numController.text.trim().length > 0) {
3547 //修改之前无内容,不弹框 3555 //修改之前无内容,不弹框
3548 widget.detailModel.prestrTF = widget.detailModel.numController.text; 3556 widget.detailModel.prestrTF = widget.detailModel.numController.text;
3549 - widget.detailModel.upReserveInfo(context, widget.rid, 3557 + await widget.detailModel.upReserveInfo(context, widget.rid,
3550 conAmount: widget.detailModel.prestrTF); 3558 conAmount: widget.detailModel.prestrTF);
  3559 + bus.emit("refresh_detail");
3551 } 3560 }
3552 } else { 3561 } else {
3553 //修改之前有内容,则弹框 3562 //修改之前有内容,则弹框
@@ -3562,11 +3571,12 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> @@ -3562,11 +3571,12 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
3562 ? "" 3571 ? ""
3563 : widget.detailModel.prestrTF; 3572 : widget.detailModel.prestrTF;
3564 widget.detailModel.strTF = widget.detailModel.numController.text; 3573 widget.detailModel.strTF = widget.detailModel.numController.text;
3565 - }, rCallback: () { 3574 + }, rCallback: () async {
3566 print("确定"); 3575 print("确定");
3567 widget.detailModel.prestrTF = widget.detailModel.numController.text; 3576 widget.detailModel.prestrTF = widget.detailModel.numController.text;
3568 - widget.detailModel.upReserveInfo(context, widget.rid, 3577 + await widget.detailModel.upReserveInfo(context, widget.rid,
3569 conAmount: widget.detailModel.prestrTF); 3578 conAmount: widget.detailModel.prestrTF);
  3579 + bus.emit("refresh_detail");
3570 }); 3580 });
3571 } 3581 }
3572 } 3582 }
@@ -705,10 +705,12 @@ class NoteBookItemFState extends State<NoteBookItemF> @@ -705,10 +705,12 @@ class NoteBookItemFState extends State<NoteBookItemF>
705 fontWeight: FontWeight.bold, 705 fontWeight: FontWeight.bold,
706 fontSize: ScreenUtil().setSp(28)), 706 fontSize: ScreenUtil().setSp(28)),
707 ), 707 ),
708 - notebook.place_order_name == null 708 + notebook.place_order_name == null ||
  709 + notebook.place_order_name == ''
709 ? SizedBox() 710 ? SizedBox()
710 : VEmptyView(6), 711 : VEmptyView(6),
711 - notebook.place_order_name == null 712 + notebook.place_order_name == null ||
  713 + notebook.place_order_name == ''
712 ? SizedBox() 714 ? SizedBox()
713 : Text( 715 : Text(
714 notebook.place_order_name + '订', 716 notebook.place_order_name + '订',
@@ -616,7 +616,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -616,7 +616,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
616 ], 616 ],
617 ), 617 ),
618 VEmptyView(8), 618 VEmptyView(8),
619 - notebook.place_order_name == null && 619 + (notebook.place_order_name == null ||
  620 + notebook.place_order_name == '') &&
620 notebook.tid.split(",").length < 2 && 621 notebook.tid.split(",").length < 2 &&
621 (notebook.cusdem == null || 622 (notebook.cusdem == null ||
622 notebook.cusdem == '') && 623 notebook.cusdem == '') &&
@@ -624,7 +625,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -624,7 +625,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
624 ? SizedBox() 625 ? SizedBox()
625 : Row( 626 : Row(
626 children: [ 627 children: [
627 - notebook.place_order_name == null 628 + notebook.place_order_name == null ||
  629 + notebook.place_order_name == ''
628 ? SizedBox() 630 ? SizedBox()
629 : Padding( 631 : Padding(
630 padding: EdgeInsets.only( 632 padding: EdgeInsets.only(
@@ -731,7 +731,7 @@ class NotebookDetailChangeModel with ChangeNotifier { @@ -731,7 +731,7 @@ class NotebookDetailChangeModel with ChangeNotifier {
731 731
732 //更改在线预订 732 //更改在线预订
733 Future<SunReserveInfoModel> updateOnlineReserveInfo( 733 Future<SunReserveInfoModel> updateOnlineReserveInfo(
734 - BuildContext context, String nameStr) async { 734 + BuildContext context, String nameStr,String uid) async {
735 UserModel userModel = Provider.of<UserModel>(context, listen: false); 735 UserModel userModel = Provider.of<UserModel>(context, listen: false);
736 // String pnum = ''; 736 // String pnum = '';
737 // for (var item in personNumList) { 737 // for (var item in personNumList) {