Showing
18 changed files
with
735 additions
and
683 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "386" | 15 | +def flutterVersionCode = "388" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '386' | 17 | + flutterVersionCode = '388' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "3.8.6" | 20 | +def flutterVersionName = "3.8.8" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '3.8.6' | 22 | + flutterVersionName = '3.8.8' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -9,7 +9,7 @@ import android.util.Log | @@ -9,7 +9,7 @@ import android.util.Log | ||
| 9 | import io.flutter.plugin.common.MethodChannel | 9 | import io.flutter.plugin.common.MethodChannel |
| 10 | import io.flutter.plugin.common.MethodCall | 10 | import io.flutter.plugin.common.MethodCall |
| 11 | import android.content.Intent | 11 | import android.content.Intent |
| 12 | -import me.yohom.foundation_fluttify.ima | 12 | + |
| 13 | 13 | ||
| 14 | class MainActivity: FlutterActivity() { | 14 | class MainActivity: FlutterActivity() { |
| 15 | 15 |
| @@ -502,7 +502,7 @@ | @@ -502,7 +502,7 @@ | ||
| 502 | "$(inherited)", | 502 | "$(inherited)", |
| 503 | "$(PROJECT_DIR)/Flutter", | 503 | "$(PROJECT_DIR)/Flutter", |
| 504 | ); | 504 | ); |
| 505 | - MARKETING_VERSION = 3.8.6; | 505 | + MARKETING_VERSION = 3.8.7; |
| 506 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 506 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 507 | PRODUCT_NAME = Runner; | 507 | PRODUCT_NAME = Runner; |
| 508 | PROVISIONING_PROFILE_SPECIFIER = ""; | 508 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -648,7 +648,7 @@ | @@ -648,7 +648,7 @@ | ||
| 648 | "$(inherited)", | 648 | "$(inherited)", |
| 649 | "$(PROJECT_DIR)/Flutter", | 649 | "$(PROJECT_DIR)/Flutter", |
| 650 | ); | 650 | ); |
| 651 | - MARKETING_VERSION = 3.8.6; | 651 | + MARKETING_VERSION = 3.8.7; |
| 652 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 652 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 653 | PRODUCT_NAME = Runner; | 653 | PRODUCT_NAME = Runner; |
| 654 | PROVISIONING_PROFILE_SPECIFIER = ""; | 654 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -684,7 +684,7 @@ | @@ -684,7 +684,7 @@ | ||
| 684 | "$(inherited)", | 684 | "$(inherited)", |
| 685 | "$(PROJECT_DIR)/Flutter", | 685 | "$(PROJECT_DIR)/Flutter", |
| 686 | ); | 686 | ); |
| 687 | - MARKETING_VERSION = 3.8.6; | 687 | + MARKETING_VERSION = 3.8.7; |
| 688 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 688 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 689 | PRODUCT_NAME = Runner; | 689 | PRODUCT_NAME = Runner; |
| 690 | PROVISIONING_PROFILE_SPECIFIER = ""; | 690 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -2033,17 +2033,17 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { | @@ -2033,17 +2033,17 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { | ||
| 2033 | NavigatorUtil.goInvicationPage( | 2033 | NavigatorUtil.goInvicationPage( |
| 2034 | context, | 2034 | context, |
| 2035 | _model.row.id, | 2035 | _model.row.id, |
| 2036 | - _nameStr, | ||
| 2037 | - _model.row.ddate, | ||
| 2038 | - ddate_solt, | ||
| 2039 | - _model.row.phone, | ||
| 2040 | - _model.row.ddateSolt, | ||
| 2041 | - _model.row.rname == null | ||
| 2042 | - ? '' | ||
| 2043 | - : _model.row.rname, | ||
| 2044 | - _model.row.sex == null ? '' : _model.row.sex, | ||
| 2045 | - _model.row.cusdem, | ||
| 2046 | - tid: _tid, | 2036 | + // _nameStr, |
| 2037 | + // _model.row.ddate, | ||
| 2038 | + // ddate_solt, | ||
| 2039 | + // _model.row.phone, | ||
| 2040 | + // _model.row.ddateSolt, | ||
| 2041 | + // _model.row.rname == null | ||
| 2042 | + // ? '' | ||
| 2043 | + // : _model.row.rname, | ||
| 2044 | + // _model.row.sex == null ? '' : _model.row.sex, | ||
| 2045 | + // _model.row.cusdem, | ||
| 2046 | + // tid: _tid, | ||
| 2047 | replace: true); | 2047 | replace: true); |
| 2048 | } | 2048 | } |
| 2049 | EventBus().emit("refresh_tablemanager"); //刷新桌位 | 2049 | EventBus().emit("refresh_tablemanager"); //刷新桌位 |
| @@ -2508,53 +2508,36 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2508,53 +2508,36 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2508 | flex: 2, | 2508 | flex: 2, |
| 2509 | child: InkWell( | 2509 | child: InkWell( |
| 2510 | onTap: () { | 2510 | onTap: () { |
| 2511 | - String _nameStr = ''; | ||
| 2512 | - String _tid = ''; | ||
| 2513 | - for (int i = 0; | ||
| 2514 | - i < | ||
| 2515 | - detailEntity | ||
| 2516 | - .tables.length; | ||
| 2517 | - i++) { | ||
| 2518 | - _nameStr += | ||
| 2519 | - '${detailEntity.tables[i].name},'; | ||
| 2520 | - | ||
| 2521 | - _tid += | ||
| 2522 | - '${detailEntity.tables[i].id},'; | ||
| 2523 | - } | ||
| 2524 | - if (_tid.endsWith(',')) { | ||
| 2525 | - _tid = _tid.substring( | ||
| 2526 | - 0, _tid.length - 1); | ||
| 2527 | - } | ||
| 2528 | - if (_nameStr.endsWith(',')) { | ||
| 2529 | - _nameStr = | ||
| 2530 | - _nameStr.substring( | ||
| 2531 | - 0, | ||
| 2532 | - _nameStr.length - | ||
| 2533 | - 1); | ||
| 2534 | - } | 2511 | + // String _nameStr = ''; |
| 2512 | + // String _tid = ''; | ||
| 2513 | + // for (int i = 0; | ||
| 2514 | + // i < | ||
| 2515 | + // detailEntity | ||
| 2516 | + // .tables.length; | ||
| 2517 | + // i++) { | ||
| 2518 | + // _nameStr += | ||
| 2519 | + // '${detailEntity.tables[i].name},'; | ||
| 2520 | + | ||
| 2521 | + // _tid += | ||
| 2522 | + // '${detailEntity.tables[i].id},'; | ||
| 2523 | + // } | ||
| 2524 | + // if (_tid.endsWith(',')) { | ||
| 2525 | + // _tid = _tid.substring( | ||
| 2526 | + // 0, _tid.length - 1); | ||
| 2527 | + // } | ||
| 2528 | + // if (_nameStr.endsWith(',')) { | ||
| 2529 | + // _nameStr = | ||
| 2530 | + // _nameStr.substring( | ||
| 2531 | + // 0, | ||
| 2532 | + // _nameStr.length - | ||
| 2533 | + // 1); | ||
| 2534 | + // } | ||
| 2535 | 2535 | ||
| 2536 | NavigatorUtil | 2536 | NavigatorUtil |
| 2537 | .goInvicationPage( | 2537 | .goInvicationPage( |
| 2538 | context, | 2538 | context, |
| 2539 | detailEntity.id, | 2539 | detailEntity.id, |
| 2540 | - _nameStr, | ||
| 2541 | - detailEntity.ddate, | ||
| 2542 | - detailEntity.ddateStr, | ||
| 2543 | - detailEntity.phone, | ||
| 2544 | - detailEntity | ||
| 2545 | - .ddate_solt, | ||
| 2546 | - detailEntity.rname == | ||
| 2547 | - null | ||
| 2548 | - ? '' | ||
| 2549 | - : detailEntity | ||
| 2550 | - .rname, | ||
| 2551 | - detailEntity.sex == | ||
| 2552 | - null | ||
| 2553 | - ? '' | ||
| 2554 | - : detailEntity | ||
| 2555 | - .sex, | ||
| 2556 | - detailEntity.cusdem, | ||
| 2557 | - tid: _tid); | 2540 | + ); |
| 2558 | }, | 2541 | }, |
| 2559 | child: Container( | 2542 | child: Container( |
| 2560 | decoration: BoxDecoration( | 2543 | decoration: BoxDecoration( |
| @@ -756,50 +756,50 @@ class _EnterPageState extends State<EnterPage> { | @@ -756,50 +756,50 @@ class _EnterPageState extends State<EnterPage> { | ||
| 756 | print('录入成功'); | 756 | print('录入成功'); |
| 757 | // _enterModel.clearData(); | 757 | // _enterModel.clearData(); |
| 758 | bus.emit("refresh_detail"); | 758 | bus.emit("refresh_detail"); |
| 759 | - String ddate_solt = ''; | ||
| 760 | - if (_model.row.isSetDdate == '1') { | ||
| 761 | - String createtime = | ||
| 762 | - _model.row.ddate.toString() + '000'; | ||
| 763 | - DateTime createTime = | ||
| 764 | - DateTime.fromMillisecondsSinceEpoch( | ||
| 765 | - int.parse(createtime)); | ||
| 766 | - ddate_solt = DateUtil.formatDate(createTime, | ||
| 767 | - format: DateFormats.h_m); | ||
| 768 | - } else { | ||
| 769 | - if (_model.row.ddateSolt == '1') { | ||
| 770 | - ddate_solt = '早餐'; | ||
| 771 | - } else if (_model.row.ddateSolt == '2') { | ||
| 772 | - ddate_solt = '午餐'; | ||
| 773 | - } else if (_model.row.ddateSolt == '3') { | ||
| 774 | - ddate_solt = '晚餐'; | ||
| 775 | - } | ||
| 776 | - } | ||
| 777 | - List<dynamic> tableinfo = | ||
| 778 | - convert.jsonDecode(_model.row.tableinfo); | ||
| 779 | - print(tableinfo); | ||
| 780 | - String _nameStr = _model.row.name; | ||
| 781 | - if (tableinfo.length > 1) { | ||
| 782 | - _nameStr = _model.row.name + '等${tableinfo.length}桌'; | ||
| 783 | - } | ||
| 784 | - String _tid = ''; | ||
| 785 | - for (int i = 0; i < tableinfo.length; i++) { | ||
| 786 | - _tid += '${t.TableList.fromJson(tableinfo[i]).id},'; | ||
| 787 | - } | ||
| 788 | - if (_tid.endsWith(',')) { | ||
| 789 | - _tid = _tid.substring(0, _tid.length - 1); | ||
| 790 | - } | 759 | + // String ddate_solt = ''; |
| 760 | + // if (_model.row.isSetDdate == '1') { | ||
| 761 | + // String createtime = | ||
| 762 | + // _model.row.ddate.toString() + '000'; | ||
| 763 | + // DateTime createTime = | ||
| 764 | + // DateTime.fromMillisecondsSinceEpoch( | ||
| 765 | + // int.parse(createtime)); | ||
| 766 | + // ddate_solt = DateUtil.formatDate(createTime, | ||
| 767 | + // format: DateFormats.h_m); | ||
| 768 | + // } else { | ||
| 769 | + // if (_model.row.ddateSolt == '1') { | ||
| 770 | + // ddate_solt = '早餐'; | ||
| 771 | + // } else if (_model.row.ddateSolt == '2') { | ||
| 772 | + // ddate_solt = '午餐'; | ||
| 773 | + // } else if (_model.row.ddateSolt == '3') { | ||
| 774 | + // ddate_solt = '晚餐'; | ||
| 775 | + // } | ||
| 776 | + // } | ||
| 777 | + // List<dynamic> tableinfo = | ||
| 778 | + // convert.jsonDecode(_model.row.tableinfo); | ||
| 779 | + // print(tableinfo); | ||
| 780 | + // String _nameStr = _model.row.name; | ||
| 781 | + // if (tableinfo.length > 1) { | ||
| 782 | + // _nameStr = _model.row.name + '等${tableinfo.length}桌'; | ||
| 783 | + // } | ||
| 784 | + // String _tid = ''; | ||
| 785 | + // for (int i = 0; i < tableinfo.length; i++) { | ||
| 786 | + // _tid += '${t.TableList.fromJson(tableinfo[i]).id},'; | ||
| 787 | + // } | ||
| 788 | + // if (_tid.endsWith(',')) { | ||
| 789 | + // _tid = _tid.substring(0, _tid.length - 1); | ||
| 790 | + // } | ||
| 791 | NavigatorUtil.goInvicationPage( | 791 | NavigatorUtil.goInvicationPage( |
| 792 | context, | 792 | context, |
| 793 | _model.row.id, | 793 | _model.row.id, |
| 794 | - _nameStr, | ||
| 795 | - _model.row.ddate, | ||
| 796 | - ddate_solt, | ||
| 797 | - _model.row.phone, | ||
| 798 | - _model.row.ddateSolt, | ||
| 799 | - _model.row.rname == null ? '' : _model.row.rname, | ||
| 800 | - _model.row.sex == null ? '' : _model.row.sex, | ||
| 801 | - _model.row.cusdem, | ||
| 802 | - tid: _tid, | 794 | + // _nameStr, |
| 795 | + // _model.row.ddate, | ||
| 796 | + // ddate_solt, | ||
| 797 | + // _model.row.phone, | ||
| 798 | + // _model.row.ddateSolt, | ||
| 799 | + // _model.row.rname == null ? '' : _model.row.rname, | ||
| 800 | + // _model.row.sex == null ? '' : _model.row.sex, | ||
| 801 | + // _model.row.cusdem, | ||
| 802 | + // tid: _tid, | ||
| 803 | replace: true); | 803 | replace: true); |
| 804 | } else { | 804 | } else { |
| 805 | Utils.showToast("录入预订订单失败,请重试!"); | 805 | Utils.showToast("录入预订订单失败,请重试!"); |
| @@ -1422,15 +1422,15 @@ class _HomeEnterPageState extends State<HomeEnterPage> | @@ -1422,15 +1422,15 @@ class _HomeEnterPageState extends State<HomeEnterPage> | ||
| 1422 | NavigatorUtil.goInvicationPage( | 1422 | NavigatorUtil.goInvicationPage( |
| 1423 | context, | 1423 | context, |
| 1424 | _model.row.id, | 1424 | _model.row.id, |
| 1425 | - _nameStr, | ||
| 1426 | - _model.row.ddate, | ||
| 1427 | - ddate_solt, | ||
| 1428 | - _model.row.phone, | ||
| 1429 | - _model.row.ddateSolt, | ||
| 1430 | - _model.row.rname == null ? '' : _model.row.rname, | ||
| 1431 | - _model.row.sex == null ? '' : _model.row.sex, | ||
| 1432 | - _model.row.cusdem, | ||
| 1433 | - tid: _tid, | 1425 | + // _nameStr, |
| 1426 | + // _model.row.ddate, | ||
| 1427 | + // ddate_solt, | ||
| 1428 | + // _model.row.phone, | ||
| 1429 | + // _model.row.ddateSolt, | ||
| 1430 | + // _model.row.rname == null ? '' : _model.row.rname, | ||
| 1431 | + // _model.row.sex == null ? '' : _model.row.sex, | ||
| 1432 | + // _model.row.cusdem, | ||
| 1433 | + // tid: _tid, | ||
| 1434 | replace: false); | 1434 | replace: false); |
| 1435 | //今天 明天 其他天 | 1435 | //今天 明天 其他天 |
| 1436 | String tempTime = _homeEnterModel.ddateStr; | 1436 | String tempTime = _homeEnterModel.ddateStr; |
| @@ -43,18 +43,17 @@ import 'dart:ui' as ui; | @@ -43,18 +43,17 @@ import 'dart:ui' as ui; | ||
| 43 | 43 | ||
| 44 | class InvicationPage extends StatefulWidget { | 44 | class InvicationPage extends StatefulWidget { |
| 45 | final String rid; //预订订单id | 45 | final String rid; //预订订单id |
| 46 | - final String tableInfo; //桌位信息 | ||
| 47 | - final String ddate; | ||
| 48 | - final String ddateStr; | ||
| 49 | - final String phone; | ||
| 50 | - final String dateSolt; | ||
| 51 | - final String tid; | ||
| 52 | - final String name; | ||
| 53 | - final String sex; | ||
| 54 | - final String remark; | 46 | + // final String tableInfo; //桌位信息 |
| 47 | + // final String ddate; | ||
| 48 | + // final String ddateStr; | ||
| 49 | + // final String phone; | ||
| 50 | + // final String dateSolt; | ||
| 51 | + // final String tid; | ||
| 52 | + // final String name; | ||
| 53 | + // final String sex; | ||
| 54 | + // final String remark; | ||
| 55 | 55 | ||
| 56 | - InvicationPage(this.rid, this.tableInfo, this.ddate, this.ddateStr, | ||
| 57 | - this.phone, this.dateSolt, this.tid, this.name, this.sex, this.remark); | 56 | + InvicationPage(this.rid); |
| 58 | 57 | ||
| 59 | @override | 58 | @override |
| 60 | State<StatefulWidget> createState() { | 59 | State<StatefulWidget> createState() { |
| @@ -91,6 +90,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -91,6 +90,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 91 | 90 | ||
| 92 | int couponSelectIndex = 0; | 91 | int couponSelectIndex = 0; |
| 93 | NotebookDetail detailEntity; | 92 | NotebookDetail detailEntity; |
| 93 | + final ScrollController _scrollController = new ScrollController(); | ||
| 94 | 94 | ||
| 95 | List<Map<String, String>> tableInfo = []; //桌位信息 | 95 | List<Map<String, String>> tableInfo = []; //桌位信息 |
| 96 | String ddate; | 96 | String ddate; |
| @@ -116,7 +116,6 @@ class InvicationPageState extends State<InvicationPage> | @@ -116,7 +116,6 @@ class InvicationPageState extends State<InvicationPage> | ||
| 116 | bool needWechat = false; | 116 | bool needWechat = false; |
| 117 | 117 | ||
| 118 | String youhui = '选择优惠'; | 118 | String youhui = '选择优惠'; |
| 119 | - ScrollController scrollController = ScrollController(); | ||
| 120 | final GlobalKey botGlobalKey = GlobalKey(); | 119 | final GlobalKey botGlobalKey = GlobalKey(); |
| 121 | int sexSelectIndex = 0; | 120 | int sexSelectIndex = 0; |
| 122 | String sexStr = '先生'; | 121 | String sexStr = '先生'; |
| @@ -136,6 +135,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -136,6 +135,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 136 | bool canSendSms = true; | 135 | bool canSendSms = true; |
| 137 | bool showErroInfo = false; | 136 | bool showErroInfo = false; |
| 138 | String erroInfo = ''; | 137 | String erroInfo = ''; |
| 138 | + bool _showOverlay = false; | ||
| 139 | 139 | ||
| 140 | @override | 140 | @override |
| 141 | void initState() { | 141 | void initState() { |
| @@ -148,6 +148,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -148,6 +148,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 148 | _nameNode.addListener(() { | 148 | _nameNode.addListener(() { |
| 149 | if (_nameNode.hasFocus) { | 149 | if (_nameNode.hasFocus) { |
| 150 | showOverlay(context); | 150 | showOverlay(context); |
| 151 | + setState(() {}); | ||
| 151 | } else { | 152 | } else { |
| 152 | if (!needBack && | 153 | if (!needBack && |
| 153 | !needBlack && | 154 | !needBlack && |
| @@ -163,6 +164,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -163,6 +164,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 163 | _cusdemNode.addListener(() { | 164 | _cusdemNode.addListener(() { |
| 164 | if (_cusdemNode.hasFocus) { | 165 | if (_cusdemNode.hasFocus) { |
| 165 | showOverlay(context); | 166 | showOverlay(context); |
| 167 | + setState(() {}); | ||
| 166 | } else { | 168 | } else { |
| 167 | if (!needBack && | 169 | if (!needBack && |
| 168 | !needBlack && | 170 | !needBlack && |
| @@ -179,6 +181,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -179,6 +181,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 179 | _phoneNode.addListener(() { | 181 | _phoneNode.addListener(() { |
| 180 | if (_phoneNode.hasFocus) { | 182 | if (_phoneNode.hasFocus) { |
| 181 | showOverlay(context); | 183 | showOverlay(context); |
| 184 | + setState(() {}); | ||
| 182 | Scrollable.ensureVisible(botGlobalKey.currentContext); | 185 | Scrollable.ensureVisible(botGlobalKey.currentContext); |
| 183 | } else { | 186 | } else { |
| 184 | if (!needBack && | 187 | if (!needBack && |
| @@ -221,6 +224,13 @@ class InvicationPageState extends State<InvicationPage> | @@ -221,6 +224,13 @@ class InvicationPageState extends State<InvicationPage> | ||
| 221 | user = Provider.of<UserModel>(context, listen: false).user; | 224 | user = Provider.of<UserModel>(context, listen: false).user; |
| 222 | } | 225 | } |
| 223 | 226 | ||
| 227 | + handlePostFrame(_) { | ||
| 228 | + if (_scrollController.hasClients) { | ||
| 229 | + _scrollController.jumpTo(_scrollController.position.maxScrollExtent + | ||
| 230 | + ScreenUtil().setWidth(140)); | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + | ||
| 224 | @override | 234 | @override |
| 225 | void dispose() { | 235 | void dispose() { |
| 226 | Utils.changeStatusColor(); | 236 | Utils.changeStatusColor(); |
| @@ -229,13 +239,17 @@ class InvicationPageState extends State<InvicationPage> | @@ -229,13 +239,17 @@ class InvicationPageState extends State<InvicationPage> | ||
| 229 | bus.off("refresh_invitaion_info"); | 239 | bus.off("refresh_invitaion_info"); |
| 230 | bus.off("refresh_photo_invication"); | 240 | bus.off("refresh_photo_invication"); |
| 231 | WidgetsBinding.instance.removeObserver(this); //销毁观察者 | 241 | WidgetsBinding.instance.removeObserver(this); //销毁观察者 |
| 232 | - _timer.cancel(); | 242 | + if (_timer != null) { |
| 243 | + _timer.cancel(); | ||
| 244 | + } | ||
| 233 | 245 | ||
| 234 | super.dispose(); | 246 | super.dispose(); |
| 235 | } | 247 | } |
| 236 | 248 | ||
| 237 | @override | 249 | @override |
| 238 | void didChangeMetrics() { | 250 | void didChangeMetrics() { |
| 251 | + WidgetsBinding.instance.addPostFrameCallback(handlePostFrame); | ||
| 252 | + super.didChangeDependencies(); | ||
| 239 | super.didChangeMetrics(); | 253 | super.didChangeMetrics(); |
| 240 | print(MediaQuery.of(context).viewInsets.bottom); | 254 | print(MediaQuery.of(context).viewInsets.bottom); |
| 241 | 255 | ||
| @@ -272,7 +286,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -272,7 +286,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 272 | needWechat = false, | 286 | needWechat = false, |
| 273 | needRemark = false, | 287 | needRemark = false, |
| 274 | int index, | 288 | int index, |
| 275 | - VoidCallback callback}) { | 289 | + VoidCallback callback}) async { |
| 276 | FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | 290 | FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 |
| 277 | String phone = ''; | 291 | String phone = ''; |
| 278 | String name = ''; | 292 | String name = ''; |
| @@ -293,113 +307,153 @@ class InvicationPageState extends State<InvicationPage> | @@ -293,113 +307,153 @@ class InvicationPageState extends State<InvicationPage> | ||
| 293 | needHistory || | 307 | needHistory || |
| 294 | needRemark || | 308 | needRemark || |
| 295 | oldRemark != remark) { | 309 | oldRemark != remark) { |
| 296 | - DialogUtil.cupertinoAlertDialog(context, | ||
| 297 | - title: "客户信息", | ||
| 298 | - content: "客户信息已修改,是否确定修改", | ||
| 299 | - lTitle: "取消", | ||
| 300 | - rTitle: "确定修改", lCallback: () { | ||
| 301 | - print("取消"); | ||
| 302 | - showPhoneHistory = false; | 310 | + showPhoneHistory = false; |
| 311 | + if (needWechat) { | ||
| 312 | + needWechat = false; | ||
| 313 | + await _updateReserve(); | ||
| 314 | + callback(); | ||
| 315 | + } else { | ||
| 303 | if (needBack) { | 316 | if (needBack) { |
| 304 | needBack = false; | 317 | needBack = false; |
| 305 | Navigator.of(context).pop(); | 318 | Navigator.of(context).pop(); |
| 306 | - } else { | ||
| 307 | - if (needSex) { | ||
| 308 | - if (oldSex == '1') { | ||
| 309 | - sexStr = '先生'; | ||
| 310 | - } else if (oldSex == '2') { | ||
| 311 | - sexStr = '女士'; | ||
| 312 | - } else if (oldSex == '3') { | ||
| 313 | - sexStr = '公司'; | ||
| 314 | - } | ||
| 315 | - if (nameStr != null && nameStr != '') { | ||
| 316 | - _addNameSuffix(nameStr, sexStr); | ||
| 317 | - } | ||
| 318 | - sexSelectIndex = sexList.indexOf(sexStr); | ||
| 319 | - setState(() {}); | ||
| 320 | - needSex = false; | ||
| 321 | - } | 319 | + } |
| 320 | + if (needSex) { | ||
| 321 | + needSex = false; | ||
| 322 | + } | ||
| 323 | + // if (needRemark) { | ||
| 324 | + // needRemark = false; | ||
| 325 | + // } | ||
| 326 | + if (needHistory) { | ||
| 327 | + setState(() { | ||
| 328 | + showPhoneHistory = false; | ||
| 329 | + _baseIndoProvider.phoneController.text = | ||
| 330 | + _baseIndoProvider.userHistorys[index].phone != null | ||
| 331 | + ? _baseIndoProvider.userHistorys[index].phone | ||
| 332 | + : ''; | ||
| 333 | + // _homeEnterModel.nameController.text = | ||
| 334 | + // _homeEnterModel | ||
| 335 | + // .userHistorys[index].rname + | ||
| 336 | + // _nameSuffix(); | ||
| 337 | + _addNameSuffix(_baseIndoProvider.userHistorys[index].rname, sexStr); | ||
| 338 | + nameStr = _baseIndoProvider.userHistorys[index].rname; | ||
| 339 | + _phoneNode.unfocus(); | ||
| 340 | + _baseIndoProvider.userHistorys.clear(); | ||
| 341 | + }); | ||
| 342 | + needHistory = false; | ||
| 343 | + } | ||
| 344 | + if (needBlack) { | ||
| 345 | + needBlack = false; | ||
| 346 | + } | ||
| 322 | 347 | ||
| 323 | - if (needHistory) { | ||
| 324 | - needHistory = false; | ||
| 325 | - } | 348 | + _updateReserve(); |
| 349 | + } | ||
| 350 | + // DialogUtil.cupertinoAlertDialog(context, | ||
| 351 | + // title: "客户信息", | ||
| 352 | + // content: "客户信息已修改,是否确定修改", | ||
| 353 | + // lTitle: "取消", | ||
| 354 | + // rTitle: "确定修改", lCallback: () { | ||
| 355 | + // print("取消"); | ||
| 356 | + // showPhoneHistory = false; | ||
| 357 | + // if (needBack) { | ||
| 358 | + // needBack = false; | ||
| 359 | + // Navigator.of(context).pop(); | ||
| 360 | + // } else { | ||
| 361 | + // if (needSex) { | ||
| 362 | + // if (oldSex == '1') { | ||
| 363 | + // sexStr = '先生'; | ||
| 364 | + // } else if (oldSex == '2') { | ||
| 365 | + // sexStr = '女士'; | ||
| 366 | + // } else if (oldSex == '3') { | ||
| 367 | + // sexStr = '公司'; | ||
| 368 | + // } | ||
| 369 | + // if (nameStr != null && nameStr != '') { | ||
| 370 | + // _addNameSuffix(nameStr, sexStr); | ||
| 371 | + // } | ||
| 372 | + // sexSelectIndex = sexList.indexOf(sexStr); | ||
| 373 | + // setState(() {}); | ||
| 374 | + // needSex = false; | ||
| 375 | + // } | ||
| 326 | 376 | ||
| 327 | - if (needBlack) { | ||
| 328 | - needBlack = false; | ||
| 329 | - } | ||
| 330 | - if (needWechat) { | ||
| 331 | - needWechat = false; | ||
| 332 | - callback(); | ||
| 333 | - } | 377 | + // if (needHistory) { |
| 378 | + // needHistory = false; | ||
| 379 | + // } | ||
| 334 | 380 | ||
| 335 | - if (_baseIndoProvider.phoneController.text.trim().length > 0) { | ||
| 336 | - _baseIndoProvider.phoneController.text = oldPhone; | ||
| 337 | - } | ||
| 338 | - if (customController.text.trim().length > 0) { | ||
| 339 | - currentRemark = oldRemark ?? ''; | ||
| 340 | - customController.text = oldRemark ?? ""; | ||
| 341 | - for (Remark item in remarkManagerModel.ofenRemarks) { | ||
| 342 | - if (item.custom == oldRemarkBtn) { | ||
| 343 | - item.selected = false; | ||
| 344 | - } | ||
| 345 | - } | ||
| 346 | - setState(() {}); | ||
| 347 | - } | ||
| 348 | - if (nameStr != null && nameStr.trim().length > 0) { | ||
| 349 | - nameStr = oldName; | 381 | + // if (needBlack) { |
| 382 | + // needBlack = false; | ||
| 383 | + // } | ||
| 384 | + // if (needWechat) { | ||
| 385 | + // needWechat = false; | ||
| 386 | + // callback(); | ||
| 387 | + // } | ||
| 350 | 388 | ||
| 351 | - if (nameStr != null && nameStr != '') { | ||
| 352 | - _addNameSuffix(nameStr, sexStr); | ||
| 353 | - } else { | ||
| 354 | - _baseIndoProvider.nameController.text = ''; | ||
| 355 | - } | ||
| 356 | - } | 389 | + // if (_baseIndoProvider.phoneController.text.trim().length > 0) { |
| 390 | + // _baseIndoProvider.phoneController.text = oldPhone; | ||
| 391 | + // } | ||
| 392 | + // if (customController.text.trim().length > 0) { | ||
| 393 | + // currentRemark = oldRemark ?? ''; | ||
| 394 | + // customController.text = oldRemark ?? ""; | ||
| 395 | + // for (Remark item in remarkManagerModel.ofenRemarks) { | ||
| 396 | + // if (item.custom == oldRemarkBtn) { | ||
| 397 | + // item.selected = false; | ||
| 398 | + // } | ||
| 399 | + // } | ||
| 400 | + // setState(() {}); | ||
| 401 | + // } | ||
| 402 | + // if (nameStr != null && nameStr.trim().length > 0) { | ||
| 403 | + // nameStr = oldName; | ||
| 357 | 404 | ||
| 358 | - setState(() {}); | ||
| 359 | - } | ||
| 360 | - }, rCallback: () async { | ||
| 361 | - showPhoneHistory = false; | ||
| 362 | - if (needWechat) { | ||
| 363 | - needWechat = false; | ||
| 364 | - await _updateReserve(); | ||
| 365 | - callback(); | ||
| 366 | - } else { | ||
| 367 | - if (needBack) { | ||
| 368 | - needBack = false; | ||
| 369 | - Navigator.of(context).pop(); | ||
| 370 | - } | ||
| 371 | - if (needSex) { | ||
| 372 | - needSex = false; | ||
| 373 | - } | ||
| 374 | - // if (needRemark) { | ||
| 375 | - // needRemark = false; | ||
| 376 | - // } | ||
| 377 | - if (needHistory) { | ||
| 378 | - setState(() { | ||
| 379 | - showPhoneHistory = false; | ||
| 380 | - _baseIndoProvider.phoneController.text = | ||
| 381 | - _baseIndoProvider.userHistorys[index].phone != null | ||
| 382 | - ? _baseIndoProvider.userHistorys[index].phone | ||
| 383 | - : ''; | ||
| 384 | - // _homeEnterModel.nameController.text = | ||
| 385 | - // _homeEnterModel | ||
| 386 | - // .userHistorys[index].rname + | ||
| 387 | - // _nameSuffix(); | ||
| 388 | - _addNameSuffix( | ||
| 389 | - _baseIndoProvider.userHistorys[index].rname, sexStr); | ||
| 390 | - nameStr = _baseIndoProvider.userHistorys[index].rname; | ||
| 391 | - _phoneNode.unfocus(); | ||
| 392 | - _baseIndoProvider.userHistorys.clear(); | ||
| 393 | - }); | ||
| 394 | - needHistory = false; | ||
| 395 | - } | ||
| 396 | - if (needBlack) { | ||
| 397 | - needBlack = false; | ||
| 398 | - } | 405 | + // if (nameStr != null && nameStr != '') { |
| 406 | + // _addNameSuffix(nameStr, sexStr); | ||
| 407 | + // } else { | ||
| 408 | + // _baseIndoProvider.nameController.text = ''; | ||
| 409 | + // } | ||
| 410 | + // } | ||
| 399 | 411 | ||
| 400 | - _updateReserve(); | ||
| 401 | - } | ||
| 402 | - }); | 412 | + // setState(() {}); |
| 413 | + // } | ||
| 414 | + // }, rCallback: () async { | ||
| 415 | + // showPhoneHistory = false; | ||
| 416 | + // if (needWechat) { | ||
| 417 | + // needWechat = false; | ||
| 418 | + // await _updateReserve(); | ||
| 419 | + // callback(); | ||
| 420 | + // } else { | ||
| 421 | + // if (needBack) { | ||
| 422 | + // needBack = false; | ||
| 423 | + // Navigator.of(context).pop(); | ||
| 424 | + // } | ||
| 425 | + // if (needSex) { | ||
| 426 | + // needSex = false; | ||
| 427 | + // } | ||
| 428 | + // // if (needRemark) { | ||
| 429 | + // // needRemark = false; | ||
| 430 | + // // } | ||
| 431 | + // if (needHistory) { | ||
| 432 | + // setState(() { | ||
| 433 | + // showPhoneHistory = false; | ||
| 434 | + // _baseIndoProvider.phoneController.text = | ||
| 435 | + // _baseIndoProvider.userHistorys[index].phone != null | ||
| 436 | + // ? _baseIndoProvider.userHistorys[index].phone | ||
| 437 | + // : ''; | ||
| 438 | + // // _homeEnterModel.nameController.text = | ||
| 439 | + // // _homeEnterModel | ||
| 440 | + // // .userHistorys[index].rname + | ||
| 441 | + // // _nameSuffix(); | ||
| 442 | + // _addNameSuffix( | ||
| 443 | + // _baseIndoProvider.userHistorys[index].rname, sexStr); | ||
| 444 | + // nameStr = _baseIndoProvider.userHistorys[index].rname; | ||
| 445 | + // _phoneNode.unfocus(); | ||
| 446 | + // _baseIndoProvider.userHistorys.clear(); | ||
| 447 | + // }); | ||
| 448 | + // needHistory = false; | ||
| 449 | + // } | ||
| 450 | + // if (needBlack) { | ||
| 451 | + // needBlack = false; | ||
| 452 | + // } | ||
| 453 | + | ||
| 454 | + // _updateReserve(); | ||
| 455 | + // } | ||
| 456 | + // }); | ||
| 403 | } else { | 457 | } else { |
| 404 | if (needBack) { | 458 | if (needBack) { |
| 405 | needBack = false; | 459 | needBack = false; |
| @@ -3190,6 +3244,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -3190,6 +3244,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 3190 | if (overlayEntry != null) return; | 3244 | if (overlayEntry != null) return; |
| 3191 | OverlayState overlayState = Overlay.of(context); | 3245 | OverlayState overlayState = Overlay.of(context); |
| 3192 | overlayEntry = OverlayEntry(builder: (context) { | 3246 | overlayEntry = OverlayEntry(builder: (context) { |
| 3247 | + // setState(() { | ||
| 3248 | + _showOverlay = true; | ||
| 3249 | + // }); | ||
| 3193 | return Positioned( | 3250 | return Positioned( |
| 3194 | bottom: MediaQuery.of(context).viewInsets.bottom, | 3251 | bottom: MediaQuery.of(context).viewInsets.bottom, |
| 3195 | right: 0.0, | 3252 | right: 0.0, |
| @@ -3206,6 +3263,10 @@ class InvicationPageState extends State<InvicationPage> | @@ -3206,6 +3263,10 @@ class InvicationPageState extends State<InvicationPage> | ||
| 3206 | 3263 | ||
| 3207 | removeOverlay() { | 3264 | removeOverlay() { |
| 3208 | if (overlayEntry != null) { | 3265 | if (overlayEntry != null) { |
| 3266 | + // setState(() { | ||
| 3267 | + _showOverlay = false; | ||
| 3268 | + // }); | ||
| 3269 | + | ||
| 3209 | overlayEntry.remove(); | 3270 | overlayEntry.remove(); |
| 3210 | overlayEntry = null; | 3271 | overlayEntry = null; |
| 3211 | } | 3272 | } |
| @@ -4090,109 +4151,67 @@ class InvicationPageState extends State<InvicationPage> | @@ -4090,109 +4151,67 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4090 | _showConfirmWidget(); | 4151 | _showConfirmWidget(); |
| 4091 | }, | 4152 | }, |
| 4092 | child: Container( | 4153 | child: Container( |
| 4093 | - color: MyColours.color_ffffff, | ||
| 4094 | - child: Column( | ||
| 4095 | - children: [ | ||
| 4096 | - // Container( | ||
| 4097 | - // width: double.infinity, | ||
| 4098 | - // // color: backgroundColor, | ||
| 4099 | - // padding: EdgeInsets.symmetric( | ||
| 4100 | - // vertical: ScreenUtil().setHeight(30)), | ||
| 4101 | - // child: Stack( | ||
| 4102 | - // alignment: Alignment.center, | ||
| 4103 | - // children: <Widget>[ | ||
| 4104 | - // Positioned( | ||
| 4105 | - // left: 0, | ||
| 4106 | - // child: InkWell( | ||
| 4107 | - // onTap: () { | ||
| 4108 | - // needBack = true; | ||
| 4109 | - // _showConfirmWidget(needBack: true); | ||
| 4110 | - // }, | ||
| 4111 | - // // behavior: HitTestBehavior.opaque, | ||
| 4112 | - // child: Padding( | ||
| 4113 | - // padding: EdgeInsets.symmetric( | ||
| 4114 | - // horizontal: ScreenUtil().setWidth(40), | ||
| 4115 | - // vertical: ScreenUtil().setHeight(15)), | ||
| 4116 | - // child: Image.asset( | ||
| 4117 | - // "assets/icon_back.png", | ||
| 4118 | - // width: ScreenUtil().setWidth(20), | ||
| 4119 | - // height: ScreenUtil().setHeight(31), | ||
| 4120 | - // ), | ||
| 4121 | - // ), | ||
| 4122 | - // ), | ||
| 4123 | - // ), | ||
| 4124 | - // Center( | ||
| 4125 | - // child: Image.asset( | ||
| 4126 | - // "assets/yd_logo.png", | ||
| 4127 | - // width: ScreenUtil().setWidth(103 * 2), | ||
| 4128 | - // // height: ScreenUtil().setHeight(21 * 2), | ||
| 4129 | - // )) | ||
| 4130 | - // ], | ||
| 4131 | - // )), | ||
| 4132 | - | ||
| 4133 | - Expanded(child: Consumer<BaseIndoProvider>( | ||
| 4134 | - builder: (context, model, _) { | ||
| 4135 | - if (model.pageState != PageState.Success) { | ||
| 4136 | - return ExceptionPage( | ||
| 4137 | - pageState: model.pageState, | ||
| 4138 | - callback: () async { | ||
| 4139 | - model.pageState = PageState.Loading; | ||
| 4140 | - await _couponNetworkData(isShowLoading: false); | ||
| 4141 | - await _getCustomerActivityBaseinfo(); | ||
| 4142 | - await _getTablesPhoto(); | ||
| 4143 | - await _getReserveDetail(showCicle: false); | ||
| 4144 | - model.notifyListeners(); | ||
| 4145 | - }, | ||
| 4146 | - emptyMsg: "稍后加载", | ||
| 4147 | - emptyImg: "empty_search", | ||
| 4148 | - showMsg: "加载中,请稍后...", | ||
| 4149 | - ); | ||
| 4150 | - } else { | ||
| 4151 | - return Container( | ||
| 4152 | - child: Column( | ||
| 4153 | - children: [ | ||
| 4154 | - Expanded( | ||
| 4155 | - child: SingleChildScrollView( | ||
| 4156 | - controller: scrollController, | ||
| 4157 | - scrollDirection: Axis.vertical, | ||
| 4158 | - //true 滑动到底部 | ||
| 4159 | - padding: EdgeInsets.all(0.0), | ||
| 4160 | - reverse: | ||
| 4161 | - _phoneNode.hasFocus ? true : false, | ||
| 4162 | - child: Column( | ||
| 4163 | - crossAxisAlignment: | ||
| 4164 | - CrossAxisAlignment.start, | ||
| 4165 | - children: [ | ||
| 4166 | - VEmptyView(38), | ||
| 4167 | - _reverseTimeWidget(), | ||
| 4168 | - VEmptyView(24), | ||
| 4169 | - _tableInfoWidget(), | ||
| 4170 | - VEmptyView(34), | ||
| 4171 | - _enterMoreWidget(), | ||
| 4172 | - // VEmptyView(40), | ||
| 4173 | - // _managerWidget(), | ||
| 4174 | - // VEmptyView(50), | ||
| 4175 | - // _orderInfoWidget(), | ||
| 4176 | - // VEmptyView(30), | ||
| 4177 | - // _couponWidget(), | ||
| 4178 | - // VEmptyView(20), | ||
| 4179 | - Container( | ||
| 4180 | - key: botGlobalKey, | ||
| 4181 | - height: | ||
| 4182 | - ScreenUtil().setWidth(20)) | ||
| 4183 | - ], | ||
| 4184 | - ))), | ||
| 4185 | - Padding( | ||
| 4186 | - padding: EdgeInsets.symmetric( | ||
| 4187 | - horizontal: ScreenUtil().setWidth(48)), | ||
| 4188 | - child: _btnWidget()), | ||
| 4189 | - ], | ||
| 4190 | - ), | ||
| 4191 | - ); | ||
| 4192 | - } | ||
| 4193 | - })), | ||
| 4194 | - ], | ||
| 4195 | - )), | 4154 | + color: MyColours.color_ffffff, |
| 4155 | + child: Consumer<BaseIndoProvider>(builder: (context, model, _) { | ||
| 4156 | + if (model.pageState != PageState.Success) { | ||
| 4157 | + return ExceptionPage( | ||
| 4158 | + pageState: model.pageState, | ||
| 4159 | + callback: () async { | ||
| 4160 | + model.pageState = PageState.Loading; | ||
| 4161 | + await _couponNetworkData(isShowLoading: false); | ||
| 4162 | + await _getCustomerActivityBaseinfo(); | ||
| 4163 | + await _getTablesPhoto(); | ||
| 4164 | + await _getReserveDetail(showCicle: false); | ||
| 4165 | + model.notifyListeners(); | ||
| 4166 | + }, | ||
| 4167 | + emptyMsg: "稍后加载", | ||
| 4168 | + emptyImg: "empty_search", | ||
| 4169 | + showMsg: "加载中,请稍后...", | ||
| 4170 | + ); | ||
| 4171 | + } else { | ||
| 4172 | + return Column(children: [ | ||
| 4173 | + Expanded( | ||
| 4174 | + child: SingleChildScrollView( | ||
| 4175 | + controller: _scrollController, | ||
| 4176 | + scrollDirection: Axis.vertical, | ||
| 4177 | + //true 滑动到底部 | ||
| 4178 | + padding: EdgeInsets.all(0.0), | ||
| 4179 | + // reverse: _phoneNode.hasFocus ? true : false, | ||
| 4180 | + child: Column( | ||
| 4181 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 4182 | + children: [ | ||
| 4183 | + VEmptyView(38), | ||
| 4184 | + _reverseTimeWidget(), | ||
| 4185 | + VEmptyView(24), | ||
| 4186 | + _tableInfoWidget(), | ||
| 4187 | + VEmptyView(34), | ||
| 4188 | + _enterMoreWidget(), | ||
| 4189 | + // VEmptyView(40), | ||
| 4190 | + // _managerWidget(), | ||
| 4191 | + // VEmptyView(50), | ||
| 4192 | + // _orderInfoWidget(), | ||
| 4193 | + // VEmptyView(30), | ||
| 4194 | + // _couponWidget(), | ||
| 4195 | + // VEmptyView(20), | ||
| 4196 | + Container( | ||
| 4197 | + key: botGlobalKey, | ||
| 4198 | + height: ScreenUtil().setWidth(20)), | ||
| 4199 | + ], | ||
| 4200 | + ))), | ||
| 4201 | + Padding( | ||
| 4202 | + padding: EdgeInsets.symmetric( | ||
| 4203 | + horizontal: ScreenUtil().setWidth(48)), | ||
| 4204 | + child: _btnWidget()), | ||
| 4205 | + _showOverlay ? VEmptyView(100) : SizedBox() | ||
| 4206 | + ]) | ||
| 4207 | + // Padding( | ||
| 4208 | + // padding: EdgeInsets.symmetric( | ||
| 4209 | + // horizontal: ScreenUtil().setWidth(48)), | ||
| 4210 | + // child: _btnWidget()), | ||
| 4211 | + ; | ||
| 4212 | + } | ||
| 4213 | + }), | ||
| 4214 | + ), | ||
| 4196 | ))); | 4215 | ))); |
| 4197 | } | 4216 | } |
| 4198 | } | 4217 | } |
| @@ -143,7 +143,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -143,7 +143,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 143 | }, showToast: false); | 143 | }, showToast: false); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | - Widget _item(String name, String title) { | 146 | + Widget _item(String name, String title, {bool isRowLow = false}) { |
| 147 | return Column( | 147 | return Column( |
| 148 | children: [ | 148 | children: [ |
| 149 | Image.asset( | 149 | Image.asset( |
| @@ -155,8 +155,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -155,8 +155,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 155 | title, | 155 | title, |
| 156 | style: TextStyle( | 156 | style: TextStyle( |
| 157 | fontWeight: FontWeight.bold, | 157 | fontWeight: FontWeight.bold, |
| 158 | - color: MyColours.color_999999, | ||
| 159 | - fontSize: ScreenUtil().setWidth(20)), | 158 | + color: isRowLow ? MyColours.color_999999 : MyColours.color_515151, |
| 159 | + fontSize: ScreenUtil().setWidth(24)), | ||
| 160 | ) | 160 | ) |
| 161 | ], | 161 | ], |
| 162 | ); | 162 | ); |
| @@ -424,7 +424,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -424,7 +424,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 424 | ScreenUtil().setWidth(32 * 2), | 424 | ScreenUtil().setWidth(32 * 2), |
| 425 | color: MyColours.color_f3f3f3, | 425 | color: MyColours.color_f3f3f3, |
| 426 | ), | 426 | ), |
| 427 | - Column( | 427 | + InkWell( |
| 428 | + onTap:(){ | ||
| 429 | + | ||
| 430 | + NavigatorUtil.goSmsManagePage(context, | ||
| 431 | + smsInfoData: smsInfoData); | ||
| 432 | + | ||
| 433 | + }, | ||
| 434 | + child: Column( | ||
| 428 | mainAxisAlignment: MainAxisAlignment.center, | 435 | mainAxisAlignment: MainAxisAlignment.center, |
| 429 | children: [ | 436 | children: [ |
| 430 | Row( | 437 | Row( |
| @@ -464,7 +471,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -464,7 +471,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 464 | smsInfoData: smsInfoData); | 471 | smsInfoData: smsInfoData); |
| 465 | }) | 472 | }) |
| 466 | ], | 473 | ], |
| 467 | - ), | 474 | + )), |
| 468 | MyDivider( | 475 | MyDivider( |
| 469 | ScreenUtil().setWidth(2), | 476 | ScreenUtil().setWidth(2), |
| 470 | ScreenUtil().setWidth(32 * 2), | 477 | ScreenUtil().setWidth(32 * 2), |
| @@ -525,6 +532,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -525,6 +532,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 525 | }, body: Consumer<UserModel>( | 532 | }, body: Consumer<UserModel>( |
| 526 | builder: (BuildContext context, UserModel model, Widget child) { | 533 | builder: (BuildContext context, UserModel model, Widget child) { |
| 527 | UserModel userModel = Provider.of<UserModel>(context, listen: false); | 534 | UserModel userModel = Provider.of<UserModel>(context, listen: false); |
| 535 | + bool isRoleLow = userModel.user.role_name == '收银员' || | ||
| 536 | + userModel.user.role_name == '服务员' || | ||
| 537 | + userModel.user.role_name == '客户经理' | ||
| 538 | + ? true | ||
| 539 | + : false; | ||
| 540 | + bool isRoleLowNoManage = userModel.user.role_name == '收银员' || | ||
| 541 | + userModel.user.role_name == '服务员' | ||
| 542 | + ? true | ||
| 543 | + : false; | ||
| 528 | return Container( | 544 | return Container( |
| 529 | color: MyColours.color_F8F9FD, | 545 | color: MyColours.color_F8F9FD, |
| 530 | padding: | 546 | padding: |
| @@ -653,12 +669,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -653,12 +669,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 653 | children: [ | 669 | children: [ |
| 654 | InkWell( | 670 | InkWell( |
| 655 | onTap: () async { | 671 | onTap: () async { |
| 656 | - if (userModel.user.role_name == '收银员' || | ||
| 657 | - userModel.user.role_name == | ||
| 658 | - '服务员' || | ||
| 659 | - userModel.user.role_name == | ||
| 660 | - '客户经理') { | ||
| 661 | - } else { | 672 | + if (!isRoleLow) { |
| 662 | Map image = await NavigatorUtil | 673 | Map image = await NavigatorUtil |
| 663 | .goStoreBaseInfoPage(context); | 674 | .goStoreBaseInfoPage(context); |
| 664 | print(image['image']); | 675 | print(image['image']); |
| @@ -674,61 +685,42 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -674,61 +685,42 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 674 | } | 685 | } |
| 675 | }, | 686 | }, |
| 676 | child: _item( | 687 | child: _item( |
| 677 | - userModel.user.role_name == '收银员' || | ||
| 678 | - userModel.user.role_name == | ||
| 679 | - '服务员' || | ||
| 680 | - userModel.user.role_name == | ||
| 681 | - '客户经理' | 688 | + isRoleLow |
| 682 | ? Utils.getImgPath('dpxx_un') | 689 | ? Utils.getImgPath('dpxx_un') |
| 683 | : Utils.getImgPath('dpxx'), | 690 | : Utils.getImgPath('dpxx'), |
| 684 | - '店铺信息')), | 691 | + '店铺信息', |
| 692 | + isRowLow: isRoleLow)), | ||
| 685 | InkWell( | 693 | InkWell( |
| 686 | onTap: () { | 694 | onTap: () { |
| 687 | - if (userModel.user.role_name == '收银员' || | ||
| 688 | - userModel.user.role_name == | ||
| 689 | - '服务员' || | ||
| 690 | - userModel.user.role_name == | ||
| 691 | - '客户经理') { | ||
| 692 | - } else { | 695 | + if (!isRoleLow) { |
| 693 | NavigatorUtil.goStoreCustomerPage( | 696 | NavigatorUtil.goStoreCustomerPage( |
| 694 | context); | 697 | context); |
| 695 | } | 698 | } |
| 696 | }, | 699 | }, |
| 697 | child: _item( | 700 | child: _item( |
| 698 | - userModel.user.role_name == '收银员' || | ||
| 699 | - userModel.user.role_name == | ||
| 700 | - '服务员' || | ||
| 701 | - userModel.user.role_name == | ||
| 702 | - '客户经理' | 701 | + isRoleLow |
| 703 | ? Utils.getImgPath('qdkq_un') | 702 | ? Utils.getImgPath('qdkq_un') |
| 704 | : Utils.getImgPath('qdkq'), | 703 | : Utils.getImgPath('qdkq'), |
| 705 | - '全店客情')), | 704 | + '全店客情', |
| 705 | + isRowLow: isRoleLow)), | ||
| 706 | InkWell( | 706 | InkWell( |
| 707 | - onTap: () { | ||
| 708 | - if (userModel.user.role_name == | ||
| 709 | - '收银员' || | ||
| 710 | - userModel.user.role_name == | ||
| 711 | - '服务员') { | ||
| 712 | - } else { | ||
| 713 | - NavigatorUtil | ||
| 714 | - .goMyTableManagerHomePage( | ||
| 715 | - context); | ||
| 716 | - } | ||
| 717 | - }, | ||
| 718 | - child: _item( | ||
| 719 | - userModel.user.role_name == '收银员' || | ||
| 720 | - userModel.user.role_name == | ||
| 721 | - '服务员' | ||
| 722 | - ? Utils.getImgPath('zwgl_un') | ||
| 723 | - : Utils.getImgPath('zwgl'), | ||
| 724 | - '桌位管理')), | 707 | + onTap: () { |
| 708 | + if (!isRoleLowNoManage) { | ||
| 709 | + NavigatorUtil | ||
| 710 | + .goMyTableManagerHomePage( | ||
| 711 | + context); | ||
| 712 | + } | ||
| 713 | + }, | ||
| 714 | + child: _item( | ||
| 715 | + isRoleLowNoManage | ||
| 716 | + ? Utils.getImgPath('zwgl_un') | ||
| 717 | + : Utils.getImgPath('zwgl'), | ||
| 718 | + '桌位管理', | ||
| 719 | + isRowLow: isRoleLowNoManage), | ||
| 720 | + ), | ||
| 725 | InkWell( | 721 | InkWell( |
| 726 | onTap: () async { | 722 | onTap: () async { |
| 727 | - if (userModel.user.role_name == | ||
| 728 | - '收银员' || | ||
| 729 | - userModel.user.role_name == | ||
| 730 | - '服务员') { | ||
| 731 | - } else { | 723 | + if (!isRoleLowNoManage) { |
| 732 | // Map temp = | 724 | // Map temp = |
| 733 | await NavigatorUtil | 725 | await NavigatorUtil |
| 734 | .goPhotoManagerSelectTablePage( | 726 | .goPhotoManagerSelectTablePage( |
| @@ -750,12 +742,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -750,12 +742,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 750 | } | 742 | } |
| 751 | }, | 743 | }, |
| 752 | child: _item( | 744 | child: _item( |
| 753 | - userModel.user.role_name == '收银员' || | ||
| 754 | - userModel.user.role_name == | ||
| 755 | - '服务员' | 745 | + isRoleLowNoManage |
| 756 | ? Utils.getImgPath('zwzp_un') | 746 | ? Utils.getImgPath('zwzp_un') |
| 757 | : Utils.getImgPath('zwzp'), | 747 | : Utils.getImgPath('zwzp'), |
| 758 | - '桌位照片')) | 748 | + '桌位照片', |
| 749 | + isRowLow: isRoleLowNoManage)) | ||
| 759 | ], | 750 | ], |
| 760 | ), | 751 | ), |
| 761 | VEmptyView(68), | 752 | VEmptyView(68), |
| @@ -765,77 +756,57 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -765,77 +756,57 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 765 | children: [ | 756 | children: [ |
| 766 | InkWell( | 757 | InkWell( |
| 767 | onTap: () { | 758 | onTap: () { |
| 768 | - if (userModel.user.role_name == | ||
| 769 | - '收银员' || | ||
| 770 | - userModel.user.role_name == | ||
| 771 | - '服务员') { | ||
| 772 | - } else { | 759 | + if (!isRoleLowNoManage) { |
| 773 | NavigatorUtil.goPersonnelManagePage( | 760 | NavigatorUtil.goPersonnelManagePage( |
| 774 | context); | 761 | context); |
| 775 | } | 762 | } |
| 776 | }, | 763 | }, |
| 777 | child: _item( | 764 | child: _item( |
| 778 | - userModel.user.role_name == '收银员' || | ||
| 779 | - userModel.user.role_name == | ||
| 780 | - '服务员' | 765 | + isRoleLowNoManage |
| 781 | ? Utils.getImgPath('yggl_un') | 766 | ? Utils.getImgPath('yggl_un') |
| 782 | : Utils.getImgPath('yggl'), | 767 | : Utils.getImgPath('yggl'), |
| 783 | - '员工管理')), | 768 | + '员工管理', |
| 769 | + isRowLow: isRoleLowNoManage)), | ||
| 784 | InkWell( | 770 | InkWell( |
| 785 | onTap: () { | 771 | onTap: () { |
| 786 | - if (userModel.user.role_name == | ||
| 787 | - '收银员' || | ||
| 788 | - userModel.user.role_name == | ||
| 789 | - '服务员') { | ||
| 790 | - } else { | 772 | + if (!isRoleLowNoManage) { |
| 791 | NavigatorUtil.goMenuManagePage( | 773 | NavigatorUtil.goMenuManagePage( |
| 792 | context); | 774 | context); |
| 793 | } | 775 | } |
| 794 | }, | 776 | }, |
| 795 | child: _item( | 777 | child: _item( |
| 796 | - userModel.user.role_name == '收银员' || | ||
| 797 | - userModel.user.role_name == | ||
| 798 | - '服务员' | 778 | + isRoleLowNoManage |
| 799 | ? Utils.getImgPath('cdgl_un') | 779 | ? Utils.getImgPath('cdgl_un') |
| 800 | : Utils.getImgPath('cdgl'), | 780 | : Utils.getImgPath('cdgl'), |
| 801 | - '菜单管理')), | 781 | + '菜单管理', |
| 782 | + isRowLow: isRoleLowNoManage)), | ||
| 802 | InkWell( | 783 | InkWell( |
| 803 | onTap: () { | 784 | onTap: () { |
| 804 | - if (userModel.user.role_name == | ||
| 805 | - '收银员' || | ||
| 806 | - userModel.user.role_name == | ||
| 807 | - '服务员') { | ||
| 808 | - } else { | 785 | + if (!isRoleLowNoManage) { |
| 809 | NavigatorUtil.goRoomTypeManagePage( | 786 | NavigatorUtil.goRoomTypeManagePage( |
| 810 | context); | 787 | context); |
| 811 | } | 788 | } |
| 812 | }, | 789 | }, |
| 813 | child: _item( | 790 | child: _item( |
| 814 | - userModel.user.role_name == '收银员' || | ||
| 815 | - userModel.user.role_name == | ||
| 816 | - '服务员' | 791 | + isRoleLowNoManage |
| 817 | ? Utils.getImgPath('bjlx_un') | 792 | ? Utils.getImgPath('bjlx_un') |
| 818 | : Utils.getImgPath('bjlx'), | 793 | : Utils.getImgPath('bjlx'), |
| 819 | - '包间类型')), | 794 | + '包间类型', |
| 795 | + isRowLow: isRoleLowNoManage)), | ||
| 820 | InkWell( | 796 | InkWell( |
| 821 | onTap: () { | 797 | onTap: () { |
| 822 | - if (userModel.user.role_name == | ||
| 823 | - '收银员' || | ||
| 824 | - userModel.user.role_name == | ||
| 825 | - '服务员') { | ||
| 826 | - } else { | 798 | + if (!isRoleLowNoManage) { |
| 827 | NavigatorUtil | 799 | NavigatorUtil |
| 828 | .goStoreTypeFillManagePage( | 800 | .goStoreTypeFillManagePage( |
| 829 | context); | 801 | context); |
| 830 | } | 802 | } |
| 831 | }, | 803 | }, |
| 832 | child: _item( | 804 | child: _item( |
| 833 | - userModel.user.role_name == '收银员' || | ||
| 834 | - userModel.user.role_name == | ||
| 835 | - '服务员' | 805 | + isRoleLowNoManage |
| 836 | ? Utils.getImgPath('bjzm_un') | 806 | ? Utils.getImgPath('bjzm_un') |
| 837 | : Utils.getImgPath('bjzm'), | 807 | : Utils.getImgPath('bjzm'), |
| 838 | - '包间置满')) | 808 | + '包间置满', |
| 809 | + isRowLow: isRoleLowNoManage)) | ||
| 839 | ], | 810 | ], |
| 840 | ) | 811 | ) |
| 841 | ], | 812 | ], |
| @@ -78,15 +78,16 @@ class NoteBookItemFState extends State<NoteBookItemF> | @@ -78,15 +78,16 @@ class NoteBookItemFState extends State<NoteBookItemF> | ||
| 78 | NavigatorUtil.goInvicationPage( | 78 | NavigatorUtil.goInvicationPage( |
| 79 | context, | 79 | context, |
| 80 | widget.notebook.id, | 80 | widget.notebook.id, |
| 81 | - widget.notebook.tableinfoStr, | ||
| 82 | - widget.notebook.ddate, | ||
| 83 | - widget.notebook.ddateStr, | ||
| 84 | - widget.notebook.phone, | ||
| 85 | - widget.notebook.ddate_solt, | ||
| 86 | - widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 87 | - widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 88 | - widget.notebook.cusdem, | ||
| 89 | - tid: widget.notebook.tid); | 81 | + // widget.notebook.tableinfoStr, |
| 82 | + // widget.notebook.ddate, | ||
| 83 | + // widget.notebook.ddateStr, | ||
| 84 | + // widget.notebook.phone, | ||
| 85 | + // widget.notebook.ddate_solt, | ||
| 86 | + // widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 87 | + // widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 88 | + // widget.notebook.cusdem, | ||
| 89 | + // tid: widget.notebook.tid | ||
| 90 | + ); | ||
| 90 | } | 91 | } |
| 91 | } | 92 | } |
| 92 | 93 |
| @@ -88,17 +88,18 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> | @@ -88,17 +88,18 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> | ||
| 88 | // 1); | 88 | // 1); |
| 89 | // } | 89 | // } |
| 90 | NavigatorUtil.goInvicationPage( | 90 | NavigatorUtil.goInvicationPage( |
| 91 | - context, | ||
| 92 | - widget.notebook.id, | ||
| 93 | - widget.notebook.tableinfoStr, | ||
| 94 | - widget.notebook.ddate, | ||
| 95 | - widget.notebook.ddateStr, | ||
| 96 | - widget.notebook.phone, | ||
| 97 | - widget.notebook.ddate_solt, | ||
| 98 | - widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 99 | - widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 100 | - widget.notebook.cusdem, | ||
| 101 | - tid: widget.notebook.tid); | 91 | + context, |
| 92 | + widget.notebook.id, | ||
| 93 | + // widget.notebook.tableinfoStr, | ||
| 94 | + // widget.notebook.ddate, | ||
| 95 | + // widget.notebook.ddateStr, | ||
| 96 | + // widget.notebook.phone, | ||
| 97 | + // widget.notebook.ddate_solt, | ||
| 98 | + // widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 99 | + // widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 100 | + // widget.notebook.cusdem, | ||
| 101 | + // tid: widget.notebook.tid | ||
| 102 | + ); | ||
| 102 | } | 103 | } |
| 103 | } | 104 | } |
| 104 | 105 | ||
| @@ -533,7 +534,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> | @@ -533,7 +534,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> | ||
| 533 | children: [ | 534 | children: [ |
| 534 | notebook.rnameStr == '' | 535 | notebook.rnameStr == '' |
| 535 | ? SizedBox() | 536 | ? SizedBox() |
| 536 | - : Container( | 537 | + : Expanded( |
| 537 | child: Text( | 538 | child: Text( |
| 538 | notebook.rnameStr, | 539 | notebook.rnameStr, |
| 539 | maxLines: 1, | 540 | maxLines: 1, |
| @@ -51,15 +51,16 @@ class NotebookItemState extends State<NoteBookItem> { | @@ -51,15 +51,16 @@ class NotebookItemState extends State<NoteBookItem> { | ||
| 51 | NavigatorUtil.goInvicationPage( | 51 | NavigatorUtil.goInvicationPage( |
| 52 | context, | 52 | context, |
| 53 | widget.notebook.id, | 53 | widget.notebook.id, |
| 54 | - widget.notebook.tableinfoStr, | ||
| 55 | - widget.notebook.ddate, | ||
| 56 | - widget.notebook.ddateStr, | ||
| 57 | - widget.notebook.phone, | ||
| 58 | - widget.notebook.ddate_solt, | ||
| 59 | - widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 60 | - widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 61 | - widget.notebook.cusdem, | ||
| 62 | - tid: widget.notebook.tid); | 54 | + // widget.notebook.tableinfoStr, |
| 55 | + // widget.notebook.ddate, | ||
| 56 | + // widget.notebook.ddateStr, | ||
| 57 | + // widget.notebook.phone, | ||
| 58 | + // widget.notebook.ddate_solt, | ||
| 59 | + // widget.notebook.rname == null ? '' : widget.notebook.rname, | ||
| 60 | + // widget.notebook.sex == null ? '' : widget.notebook.sex, | ||
| 61 | + // widget.notebook.cusdem, | ||
| 62 | + // tid: widget.notebook.tid | ||
| 63 | + ); | ||
| 63 | } | 64 | } |
| 64 | } | 65 | } |
| 65 | 66 |
| @@ -257,7 +257,7 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -257,7 +257,7 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | //获取订单统计数目 | 259 | //获取订单统计数目 |
| 260 | - _reserveCountDay() { | 260 | + _reserveCountDay() async { |
| 261 | NoteBookModel model = Provider.of<NoteBookModel>(context, listen: false); | 261 | NoteBookModel model = Provider.of<NoteBookModel>(context, listen: false); |
| 262 | Map<String, String> params = { | 262 | Map<String, String> params = { |
| 263 | "sid": userModel.user.sellerid, | 263 | "sid": userModel.user.sellerid, |
| @@ -272,7 +272,7 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -272,7 +272,7 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 272 | if (tabIndex == 1) { | 272 | if (tabIndex == 1) { |
| 273 | params["account"] = userModel.user.account; | 273 | params["account"] = userModel.user.account; |
| 274 | } | 274 | } |
| 275 | - model.getReserveCountDay(context, params); | 275 | + await model.getReserveCountDay(context, params); |
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | //构建List表头 | 278 | //构建List表头 |
| @@ -380,134 +380,134 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -380,134 +380,134 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 380 | _reserveCountDay(); | 380 | _reserveCountDay(); |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | - Widget _buildTabbar() { | ||
| 384 | - Container container = Container( | ||
| 385 | - color: MyColours.color_ffffff, | ||
| 386 | - width: double.infinity, | ||
| 387 | - padding: EdgeInsets.only( | ||
| 388 | - left: ScreenUtil().setWidth(20), top: ScreenUtil().setWidth(20)), | ||
| 389 | - child: Row( | ||
| 390 | - mainAxisSize: MainAxisSize.min, | ||
| 391 | - children: <Widget>[ | ||
| 392 | - Container( | ||
| 393 | - padding: | ||
| 394 | - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), | ||
| 395 | - child: GestureDetector( | ||
| 396 | - onTap: () { | ||
| 397 | - if (tabIndex == 0) return; | ||
| 398 | - setState(() { | ||
| 399 | - tabIndex = 0; | ||
| 400 | - _getReserveList(); | ||
| 401 | - _reserveCountDay(); | ||
| 402 | - }); | ||
| 403 | - }, | ||
| 404 | - child: Column( | ||
| 405 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 406 | - children: <Widget>[ | ||
| 407 | - Text( | ||
| 408 | - "全部预订", | ||
| 409 | - style: TextStyle( | ||
| 410 | - color: tabIndex == 0 | ||
| 411 | - ? MyColours.color_353535 | ||
| 412 | - : MyColours.color_999999, | ||
| 413 | - fontSize: tabIndex == 0 | ||
| 414 | - ? ScreenUtil().setSp(36) | ||
| 415 | - : ScreenUtil().setSp(28), | ||
| 416 | - fontWeight: tabIndex == 0 | ||
| 417 | - ? FontWeight.bold | ||
| 418 | - : FontWeight.normal), | ||
| 419 | - ), | ||
| 420 | - Align( | ||
| 421 | - alignment: Alignment.bottomCenter, | ||
| 422 | - child: Container( | ||
| 423 | - height: ScreenUtil().setWidth(6), | ||
| 424 | - width: ScreenUtil().setWidth(60), | ||
| 425 | - margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)), | ||
| 426 | - decoration: tabIndex == 0 | ||
| 427 | - ? BoxDecoration( | ||
| 428 | - color: MyColours.color_199095, | ||
| 429 | - borderRadius: BorderRadius.circular( | ||
| 430 | - ScreenUtil().setWidth(6))) | ||
| 431 | - : BoxDecoration( | ||
| 432 | - color: MyColours.color_ffffff, | ||
| 433 | - borderRadius: BorderRadius.circular( | ||
| 434 | - ScreenUtil().setWidth(6))), | ||
| 435 | - ), | ||
| 436 | - ), | ||
| 437 | - ], | ||
| 438 | - )), | ||
| 439 | - ), | ||
| 440 | - Container( | ||
| 441 | - padding: | ||
| 442 | - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), | ||
| 443 | - child: GestureDetector( | ||
| 444 | - onTap: () { | ||
| 445 | - if (tabIndex == 1) return; | ||
| 446 | - setState(() { | ||
| 447 | - tabIndex = 1; | ||
| 448 | - _getReserveList(); | ||
| 449 | - _reserveCountDay(); | ||
| 450 | - }); | ||
| 451 | - }, | ||
| 452 | - child: Column( | ||
| 453 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 454 | - children: <Widget>[ | ||
| 455 | - Text( | ||
| 456 | - "我录入的", | ||
| 457 | - style: TextStyle( | ||
| 458 | - color: tabIndex == 1 | ||
| 459 | - ? MyColours.color_353535 | ||
| 460 | - : MyColours.color_999999, | ||
| 461 | - fontSize: tabIndex == 1 | ||
| 462 | - ? ScreenUtil().setSp(36) | ||
| 463 | - : ScreenUtil().setSp(28), | ||
| 464 | - fontWeight: tabIndex == 1 | ||
| 465 | - ? FontWeight.bold | ||
| 466 | - : FontWeight.normal), | ||
| 467 | - ), | ||
| 468 | - Align( | ||
| 469 | - alignment: Alignment.bottomCenter, | ||
| 470 | - child: Container( | ||
| 471 | - height: ScreenUtil().setWidth(6), | ||
| 472 | - width: ScreenUtil().setWidth(60), | ||
| 473 | - margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)), | ||
| 474 | - decoration: tabIndex == 1 | ||
| 475 | - ? BoxDecoration( | ||
| 476 | - color: MyColours.color_199095, | ||
| 477 | - borderRadius: BorderRadius.circular( | ||
| 478 | - ScreenUtil().setWidth(6))) | ||
| 479 | - : BoxDecoration( | ||
| 480 | - color: MyColours.color_ffffff, | ||
| 481 | - borderRadius: BorderRadius.circular( | ||
| 482 | - ScreenUtil().setWidth(6))), | ||
| 483 | - ), | ||
| 484 | - ), | ||
| 485 | - ], | ||
| 486 | - )), | ||
| 487 | - ), | ||
| 488 | - Spacer(), | ||
| 489 | - GestureDetector( | ||
| 490 | - onTap: () { | ||
| 491 | - NavigatorUtil.goStatisticsPage(context); | ||
| 492 | - }, | ||
| 493 | - child: Container( | ||
| 494 | - color: Colors.white, | ||
| 495 | - padding: EdgeInsets.only( | ||
| 496 | - left: ScreenUtil().setWidth(40), | ||
| 497 | - right: ScreenUtil().setWidth(40), | ||
| 498 | - bottom: ScreenUtil().setWidth(30)), | ||
| 499 | - child: Text( | ||
| 500 | - "统计列表", | ||
| 501 | - style: TextStyle( | ||
| 502 | - color: MyColours.color_199095, | ||
| 503 | - fontSize: ScreenUtil().setSp(36), | ||
| 504 | - fontWeight: FontWeight.bold), | ||
| 505 | - ))), | ||
| 506 | - ], | ||
| 507 | - ), | ||
| 508 | - ); | ||
| 509 | - return container; | ||
| 510 | - } | 383 | + // Widget _buildTabbar() { |
| 384 | + // Container container = Container( | ||
| 385 | + // color: MyColours.color_ffffff, | ||
| 386 | + // width: double.infinity, | ||
| 387 | + // padding: EdgeInsets.only( | ||
| 388 | + // left: ScreenUtil().setWidth(20), top: ScreenUtil().setWidth(20)), | ||
| 389 | + // child: Row( | ||
| 390 | + // mainAxisSize: MainAxisSize.min, | ||
| 391 | + // children: <Widget>[ | ||
| 392 | + // Container( | ||
| 393 | + // padding: | ||
| 394 | + // EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), | ||
| 395 | + // child: GestureDetector( | ||
| 396 | + // onTap: () { | ||
| 397 | + // if (tabIndex == 0) return; | ||
| 398 | + // setState(() { | ||
| 399 | + // tabIndex = 0; | ||
| 400 | + // _getReserveList(); | ||
| 401 | + // _reserveCountDay(); | ||
| 402 | + // }); | ||
| 403 | + // }, | ||
| 404 | + // child: Column( | ||
| 405 | + // mainAxisAlignment: MainAxisAlignment.center, | ||
| 406 | + // children: <Widget>[ | ||
| 407 | + // Text( | ||
| 408 | + // "全部预订", | ||
| 409 | + // style: TextStyle( | ||
| 410 | + // color: tabIndex == 0 | ||
| 411 | + // ? MyColours.color_353535 | ||
| 412 | + // : MyColours.color_999999, | ||
| 413 | + // fontSize: tabIndex == 0 | ||
| 414 | + // ? ScreenUtil().setSp(36) | ||
| 415 | + // : ScreenUtil().setSp(28), | ||
| 416 | + // fontWeight: tabIndex == 0 | ||
| 417 | + // ? FontWeight.bold | ||
| 418 | + // : FontWeight.normal), | ||
| 419 | + // ), | ||
| 420 | + // Align( | ||
| 421 | + // alignment: Alignment.bottomCenter, | ||
| 422 | + // child: Container( | ||
| 423 | + // height: ScreenUtil().setWidth(6), | ||
| 424 | + // width: ScreenUtil().setWidth(60), | ||
| 425 | + // margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)), | ||
| 426 | + // decoration: tabIndex == 0 | ||
| 427 | + // ? BoxDecoration( | ||
| 428 | + // color: MyColours.color_199095, | ||
| 429 | + // borderRadius: BorderRadius.circular( | ||
| 430 | + // ScreenUtil().setWidth(6))) | ||
| 431 | + // : BoxDecoration( | ||
| 432 | + // color: MyColours.color_ffffff, | ||
| 433 | + // borderRadius: BorderRadius.circular( | ||
| 434 | + // ScreenUtil().setWidth(6))), | ||
| 435 | + // ), | ||
| 436 | + // ), | ||
| 437 | + // ], | ||
| 438 | + // )), | ||
| 439 | + // ), | ||
| 440 | + // Container( | ||
| 441 | + // padding: | ||
| 442 | + // EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), | ||
| 443 | + // child: GestureDetector( | ||
| 444 | + // onTap: () { | ||
| 445 | + // if (tabIndex == 1) return; | ||
| 446 | + // setState(() { | ||
| 447 | + // tabIndex = 1; | ||
| 448 | + // _getReserveList(); | ||
| 449 | + // _reserveCountDay(); | ||
| 450 | + // }); | ||
| 451 | + // }, | ||
| 452 | + // child: Column( | ||
| 453 | + // mainAxisAlignment: MainAxisAlignment.center, | ||
| 454 | + // children: <Widget>[ | ||
| 455 | + // Text( | ||
| 456 | + // "我录入的", | ||
| 457 | + // style: TextStyle( | ||
| 458 | + // color: tabIndex == 1 | ||
| 459 | + // ? MyColours.color_353535 | ||
| 460 | + // : MyColours.color_999999, | ||
| 461 | + // fontSize: tabIndex == 1 | ||
| 462 | + // ? ScreenUtil().setSp(36) | ||
| 463 | + // : ScreenUtil().setSp(28), | ||
| 464 | + // fontWeight: tabIndex == 1 | ||
| 465 | + // ? FontWeight.bold | ||
| 466 | + // : FontWeight.normal), | ||
| 467 | + // ), | ||
| 468 | + // Align( | ||
| 469 | + // alignment: Alignment.bottomCenter, | ||
| 470 | + // child: Container( | ||
| 471 | + // height: ScreenUtil().setWidth(6), | ||
| 472 | + // width: ScreenUtil().setWidth(60), | ||
| 473 | + // margin: EdgeInsets.only(top: ScreenUtil().setWidth(8)), | ||
| 474 | + // decoration: tabIndex == 1 | ||
| 475 | + // ? BoxDecoration( | ||
| 476 | + // color: MyColours.color_199095, | ||
| 477 | + // borderRadius: BorderRadius.circular( | ||
| 478 | + // ScreenUtil().setWidth(6))) | ||
| 479 | + // : BoxDecoration( | ||
| 480 | + // color: MyColours.color_ffffff, | ||
| 481 | + // borderRadius: BorderRadius.circular( | ||
| 482 | + // ScreenUtil().setWidth(6))), | ||
| 483 | + // ), | ||
| 484 | + // ), | ||
| 485 | + // ], | ||
| 486 | + // )), | ||
| 487 | + // ), | ||
| 488 | + // Spacer(), | ||
| 489 | + // GestureDetector( | ||
| 490 | + // onTap: () { | ||
| 491 | + // NavigatorUtil.goStatisticsPage(context); | ||
| 492 | + // }, | ||
| 493 | + // child: Container( | ||
| 494 | + // color: Colors.white, | ||
| 495 | + // padding: EdgeInsets.only( | ||
| 496 | + // left: ScreenUtil().setWidth(40), | ||
| 497 | + // right: ScreenUtil().setWidth(40), | ||
| 498 | + // bottom: ScreenUtil().setWidth(30)), | ||
| 499 | + // child: Text( | ||
| 500 | + // "统计列表", | ||
| 501 | + // style: TextStyle( | ||
| 502 | + // color: MyColours.color_199095, | ||
| 503 | + // fontSize: ScreenUtil().setSp(36), | ||
| 504 | + // fontWeight: FontWeight.bold), | ||
| 505 | + // ))), | ||
| 506 | + // ], | ||
| 507 | + // ), | ||
| 508 | + // ); | ||
| 509 | + // return container; | ||
| 510 | + // } | ||
| 511 | 511 | ||
| 512 | _simpleState() { | 512 | _simpleState() { |
| 513 | if (noteBookModel.notebooks.length > 0) { | 513 | if (noteBookModel.notebooks.length > 0) { |
| @@ -573,10 +573,11 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -573,10 +573,11 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 573 | right: ScreenUtil().setWidth(24), | 573 | right: ScreenUtil().setWidth(24), |
| 574 | ), | 574 | ), |
| 575 | child: Row( | 575 | child: Row( |
| 576 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 576 | children: [ | 577 | children: [ |
| 577 | Expanded( | 578 | Expanded( |
| 578 | child: TableCalendar( | 579 | child: TableCalendar( |
| 579 | - rowHeight: ScreenUtil().setWidth(38 * 2), | 580 | + rowHeight: ScreenUtil().setWidth(74 * 2), |
| 580 | calendarController: _calendarController, | 581 | calendarController: _calendarController, |
| 581 | initialSelectedDay: dateTimeNow, | 582 | initialSelectedDay: dateTimeNow, |
| 582 | headerVisible: false, | 583 | headerVisible: false, |
| @@ -600,6 +601,7 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -600,6 +601,7 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 600 | locale: "zh_CN", | 601 | locale: "zh_CN", |
| 601 | initialCalendarFormat: CalendarFormat.week, | 602 | initialCalendarFormat: CalendarFormat.week, |
| 602 | calendarStyle: CalendarStyle( | 603 | calendarStyle: CalendarStyle( |
| 604 | + renderDaysOfWeek: false, | ||
| 603 | weekdayStyle: TextStyle( | 605 | weekdayStyle: TextStyle( |
| 604 | color: MyColours.color_515151, | 606 | color: MyColours.color_515151, |
| 605 | fontWeight: FontWeight.bold, | 607 | fontWeight: FontWeight.bold, |
| @@ -632,22 +634,46 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -632,22 +634,46 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 632 | ), | 634 | ), |
| 633 | builders: CalendarBuilders( | 635 | builders: CalendarBuilders( |
| 634 | dayBuilder: (context, dateTime, events) { | 636 | dayBuilder: (context, dateTime, events) { |
| 635 | - return Container( | ||
| 636 | - decoration: BoxDecoration( | ||
| 637 | - shape: BoxShape.circle, | 637 | + return Column(children: [ |
| 638 | + Container( | ||
| 639 | + color: MyColours.color_ffffff, | ||
| 640 | + alignment: Alignment.center, | ||
| 641 | + padding: EdgeInsets.symmetric( | ||
| 642 | + vertical: ScreenUtil().setWidth(16)), | ||
| 643 | + child: Text( | ||
| 644 | + DateTime.now().weekday == | ||
| 645 | + dateTime.weekday | ||
| 646 | + ? '今日' | ||
| 647 | + : Utils.formatWeekDayNum( | ||
| 648 | + dateTime.weekday), | ||
| 649 | + style: TextStyle( | ||
| 650 | + color: dateTimeNow.weekday == | ||
| 651 | + dateTime.weekday && | ||
| 652 | + !clearSel | ||
| 653 | + ? MyColours.color_438E93 | ||
| 654 | + : MyColours.color_BFC4D4, | ||
| 655 | + fontSize: ScreenUtil().setSp(28)), | ||
| 656 | + ), | ||
| 638 | ), | 657 | ), |
| 639 | - alignment: Alignment.center, | ||
| 640 | - padding: EdgeInsets.zero, | ||
| 641 | - margin: EdgeInsets.all( | ||
| 642 | - ScreenUtil().setWidth(8)), | ||
| 643 | - child: Text( | ||
| 644 | - dateTime.day.toString(), | ||
| 645 | - style: TextStyle().copyWith( | ||
| 646 | - fontSize: ScreenUtil().setSp(28), | ||
| 647 | - color: MyColours.color_515151, | ||
| 648 | - fontWeight: FontWeight.bold), | ||
| 649 | - ), | ||
| 650 | - ); | 658 | + Container( |
| 659 | + width: ScreenUtil().setWidth(28 * 2), | ||
| 660 | + height: ScreenUtil().setWidth(28 * 2), | ||
| 661 | + decoration: BoxDecoration( | ||
| 662 | + shape: BoxShape.circle, | ||
| 663 | + ), | ||
| 664 | + alignment: Alignment.center, | ||
| 665 | + padding: EdgeInsets.zero, | ||
| 666 | + margin: EdgeInsets.all( | ||
| 667 | + ScreenUtil().setWidth(8)), | ||
| 668 | + child: Text( | ||
| 669 | + dateTime.day.toString(), | ||
| 670 | + style: TextStyle().copyWith( | ||
| 671 | + fontSize: ScreenUtil().setSp(28), | ||
| 672 | + color: MyColours.color_515151, | ||
| 673 | + fontWeight: FontWeight.bold), | ||
| 674 | + ), | ||
| 675 | + ) | ||
| 676 | + ]); | ||
| 651 | }, | 677 | }, |
| 652 | unavailableDayBuilder: | 678 | unavailableDayBuilder: |
| 653 | (context, dateTime, events) { | 679 | (context, dateTime, events) { |
| @@ -694,50 +720,106 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -694,50 +720,106 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 694 | 720 | ||
| 695 | selectedDayBuilder: (context, date, _) { | 721 | selectedDayBuilder: (context, date, _) { |
| 696 | return clearSel | 722 | return clearSel |
| 697 | - ? Container( | ||
| 698 | - decoration: BoxDecoration( | ||
| 699 | - shape: BoxShape.circle, | 723 | + ? Column(children: [ |
| 724 | + Container( | ||
| 725 | + color: MyColours.color_ffffff, | ||
| 726 | + alignment: Alignment.center, | ||
| 727 | + padding: EdgeInsets.symmetric( | ||
| 728 | + vertical: | ||
| 729 | + ScreenUtil().setWidth(16)), | ||
| 730 | + child: Text( | ||
| 731 | + DateTime.now().weekday == | ||
| 732 | + date.weekday | ||
| 733 | + ? '今日' | ||
| 734 | + : Utils.formatWeekDayNum( | ||
| 735 | + date.weekday), | ||
| 736 | + style: TextStyle( | ||
| 737 | + color: dateTimeNow.weekday == | ||
| 738 | + date.weekday && | ||
| 739 | + !clearSel | ||
| 740 | + ? MyColours.color_438E93 | ||
| 741 | + : MyColours.color_BFC4D4, | ||
| 742 | + fontSize: | ||
| 743 | + ScreenUtil().setSp(28)), | ||
| 744 | + ), | ||
| 700 | ), | 745 | ), |
| 701 | - alignment: Alignment.center, | ||
| 702 | - padding: EdgeInsets.zero, | ||
| 703 | - margin: EdgeInsets.all( | ||
| 704 | - ScreenUtil().setWidth(8)), | ||
| 705 | - child: Text( | ||
| 706 | - date.day.toString(), | ||
| 707 | - style: TextStyle().copyWith( | ||
| 708 | - fontSize: | ||
| 709 | - ScreenUtil().setSp(28), | ||
| 710 | - color: MyColours.color_515151, | ||
| 711 | - fontWeight: FontWeight.bold), | 746 | + Container( |
| 747 | + width: | ||
| 748 | + ScreenUtil().setWidth(28 * 2), | ||
| 749 | + height: | ||
| 750 | + ScreenUtil().setWidth(28 * 2), | ||
| 751 | + decoration: BoxDecoration( | ||
| 752 | + shape: BoxShape.circle, | ||
| 753 | + ), | ||
| 754 | + alignment: Alignment.center, | ||
| 755 | + padding: EdgeInsets.zero, | ||
| 756 | + margin: EdgeInsets.all( | ||
| 757 | + ScreenUtil().setWidth(8)), | ||
| 758 | + child: Text( | ||
| 759 | + date.day.toString(), | ||
| 760 | + style: TextStyle().copyWith( | ||
| 761 | + fontSize: | ||
| 762 | + ScreenUtil().setSp(28), | ||
| 763 | + color: MyColours.color_515151, | ||
| 764 | + fontWeight: FontWeight.bold), | ||
| 765 | + ), | ||
| 766 | + ) | ||
| 767 | + ]) | ||
| 768 | + : Column(children: [ | ||
| 769 | + Container( | ||
| 770 | + color: MyColours.color_ffffff, | ||
| 771 | + alignment: Alignment.center, | ||
| 772 | + padding: EdgeInsets.symmetric( | ||
| 773 | + vertical: | ||
| 774 | + ScreenUtil().setWidth(16)), | ||
| 775 | + child: Text( | ||
| 776 | + DateTime.now().weekday == | ||
| 777 | + date.weekday | ||
| 778 | + ? '今日' | ||
| 779 | + : Utils.formatWeekDayNum( | ||
| 780 | + date.weekday), | ||
| 781 | + style: TextStyle( | ||
| 782 | + color: dateTimeNow.weekday == | ||
| 783 | + date.weekday && | ||
| 784 | + !clearSel | ||
| 785 | + ? MyColours.color_438E93 | ||
| 786 | + : MyColours.color_BFC4D4, | ||
| 787 | + fontSize: | ||
| 788 | + ScreenUtil().setSp(28)), | ||
| 789 | + ), | ||
| 712 | ), | 790 | ), |
| 713 | - ) | ||
| 714 | - : Container( | ||
| 715 | - decoration: BoxDecoration( | ||
| 716 | - shape: BoxShape.circle, | ||
| 717 | - gradient: LinearGradient( | ||
| 718 | - colors: [ | ||
| 719 | - MyColours.color_438E93, | ||
| 720 | - MyColours.color_438E93 | ||
| 721 | - ], | ||
| 722 | - begin: Alignment.topCenter, | ||
| 723 | - end: Alignment.bottomCenter), | 791 | + Container( |
| 792 | + width: | ||
| 793 | + ScreenUtil().setWidth(28 * 2), | ||
| 794 | + height: | ||
| 795 | + ScreenUtil().setWidth(28 * 2), | ||
| 796 | + decoration: BoxDecoration( | ||
| 797 | + shape: BoxShape.circle, | ||
| 798 | + gradient: LinearGradient( | ||
| 799 | + colors: [ | ||
| 800 | + MyColours.color_438E93, | ||
| 801 | + MyColours.color_438E93 | ||
| 802 | + ], | ||
| 803 | + begin: Alignment.topCenter, | ||
| 804 | + end: Alignment.bottomCenter), | ||
| 724 | // border: Border.all(color: MyColours.color_FFB116) | 805 | // border: Border.all(color: MyColours.color_FFB116) |
| 725 | - ), | ||
| 726 | - alignment: Alignment.center, | ||
| 727 | - margin: EdgeInsets.all( | ||
| 728 | - ScreenUtil().setWidth(8)), | ||
| 729 | - padding: EdgeInsets.all( | ||
| 730 | - ScreenUtil().setWidth(4), | ||
| 731 | - ), | ||
| 732 | - child: Text( | ||
| 733 | - date.day.toString(), | ||
| 734 | - style: TextStyle().copyWith( | ||
| 735 | - fontSize: | ||
| 736 | - ScreenUtil().setSp(28), | ||
| 737 | - color: MyColours.color_ffffff, | ||
| 738 | - fontWeight: FontWeight.bold), | ||
| 739 | - ), | ||
| 740 | - ); | 806 | + ), |
| 807 | + alignment: Alignment.center, | ||
| 808 | + margin: EdgeInsets.all( | ||
| 809 | + ScreenUtil().setWidth(8)), | ||
| 810 | + padding: EdgeInsets.all( | ||
| 811 | + ScreenUtil().setWidth(4), | ||
| 812 | + ), | ||
| 813 | + child: Text( | ||
| 814 | + date.day.toString(), | ||
| 815 | + style: TextStyle().copyWith( | ||
| 816 | + fontSize: | ||
| 817 | + ScreenUtil().setSp(28), | ||
| 818 | + color: MyColours.color_ffffff, | ||
| 819 | + fontWeight: FontWeight.bold), | ||
| 820 | + ), | ||
| 821 | + ) | ||
| 822 | + ]); | ||
| 741 | }, | 823 | }, |
| 742 | // todayDayBuilder: (context, date, _) { | 824 | // todayDayBuilder: (context, date, _) { |
| 743 | // return Container( | 825 | // return Container( |
| @@ -791,6 +873,7 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -791,6 +873,7 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 791 | ScreenUtil().setWidth(10))), | 873 | ScreenUtil().setWidth(10))), |
| 792 | child: Text( | 874 | child: Text( |
| 793 | dateText, | 875 | dateText, |
| 876 | + textAlign: TextAlign.center, | ||
| 794 | style: TextStyle( | 877 | style: TextStyle( |
| 795 | fontWeight: FontWeight.bold, | 878 | fontWeight: FontWeight.bold, |
| 796 | color: MyColours.color_ffffff, | 879 | color: MyColours.color_ffffff, |
| @@ -837,7 +920,8 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -837,7 +920,8 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 837 | model.totalmorning, | 920 | model.totalmorning, |
| 838 | builder: (context, total, child) { | 921 | builder: (context, total, child) { |
| 839 | return CommonButtonFlat( | 922 | return CommonButtonFlat( |
| 840 | - content: "早餐" + total, | 923 | + content: "早餐" + |
| 924 | + '${total == '(0)' ? '' : total}', | ||
| 841 | state: currTimeIndex == 1 ? 1 : 0, | 925 | state: currTimeIndex == 1 ? 1 : 0, |
| 842 | fontSize: 28, | 926 | fontSize: 28, |
| 843 | padding: EdgeInsets.symmetric( | 927 | padding: EdgeInsets.symmetric( |
| @@ -873,7 +957,8 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -873,7 +957,8 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 873 | model.totalnoon, | 957 | model.totalnoon, |
| 874 | builder: (context, total, child) { | 958 | builder: (context, total, child) { |
| 875 | return CommonButtonFlat( | 959 | return CommonButtonFlat( |
| 876 | - content: "午餐" + total, | 960 | + content: "午餐" + |
| 961 | + '${total == '(0)' ? '' : total}', | ||
| 877 | state: currTimeIndex == 2 ? 1 : 0, | 962 | state: currTimeIndex == 2 ? 1 : 0, |
| 878 | fontSize: 28, | 963 | fontSize: 28, |
| 879 | width: ScreenUtil().setWidth(240 * 2) / | 964 | width: ScreenUtil().setWidth(240 * 2) / |
| @@ -911,7 +996,8 @@ class NoteBookPageState extends State<NoteBookPage> { | @@ -911,7 +996,8 @@ class NoteBookPageState extends State<NoteBookPage> { | ||
| 911 | model.totalnight, | 996 | model.totalnight, |
| 912 | builder: (context, total, child) { | 997 | builder: (context, total, child) { |
| 913 | return CommonButtonFlat( | 998 | return CommonButtonFlat( |
| 914 | - content: "晚餐" + total, | 999 | + content: "晚餐" + |
| 1000 | + '${total == '(0)' ? '' : total}', | ||
| 915 | left: morning == "00:00-00:00" && | 1001 | left: morning == "00:00-00:00" && |
| 916 | noon == "00:00-00:00" | 1002 | noon == "00:00-00:00" |
| 917 | ? true | 1003 | ? true |
| @@ -1675,17 +1675,19 @@ class TableManagerPageState extends State<TableManagerPage> { | @@ -1675,17 +1675,19 @@ class TableManagerPageState extends State<TableManagerPage> { | ||
| 1675 | // } | 1675 | // } |
| 1676 | // } | 1676 | // } |
| 1677 | // } else { | 1677 | // } else { |
| 1678 | - bool isSuccess = | ||
| 1679 | - await Utils.goShareInvicationToWeChat( | ||
| 1680 | - context, | ||
| 1681 | - _model.row.id, | ||
| 1682 | - Provider.of<UserModel>(context, | ||
| 1683 | - listen: false) | ||
| 1684 | - .user | ||
| 1685 | - .openid); | ||
| 1686 | - if (isSuccess) { | ||
| 1687 | - _addForward(_model.row.id); | ||
| 1688 | - } | 1678 | + NavigatorUtil.goInvicationPage( |
| 1679 | + context, _model.row.id); | ||
| 1680 | + // bool isSuccess = | ||
| 1681 | + // await Utils.goShareInvicationToWeChat( | ||
| 1682 | + // context, | ||
| 1683 | + // _model.row.id, | ||
| 1684 | + // Provider.of<UserModel>(context, | ||
| 1685 | + // listen: false) | ||
| 1686 | + // .user | ||
| 1687 | + // .openid); | ||
| 1688 | + // if (isSuccess) { | ||
| 1689 | + // _addForward(_model.row.id); | ||
| 1690 | + // } | ||
| 1689 | // } | 1691 | // } |
| 1690 | } else { | 1692 | } else { |
| 1691 | //失败 | 1693 | //失败 |
| @@ -83,13 +83,14 @@ class NoteBookModel extends ChangeNotifier { | @@ -83,13 +83,14 @@ class NoteBookModel extends ChangeNotifier { | ||
| 83 | UserModel userModel = Provider.of<UserModel>(context, listen: false); | 83 | UserModel userModel = Provider.of<UserModel>(context, listen: false); |
| 84 | // total = "已订" + (morning + noon + night).toString(); | 84 | // total = "已订" + (morning + noon + night).toString(); |
| 85 | if (userModel.user.morning.isNotEmpty) { | 85 | if (userModel.user.morning.isNotEmpty) { |
| 86 | - totalmorning += "($morning"; | 86 | + |
| 87 | + totalmorning = "($morning)"; | ||
| 87 | } | 88 | } |
| 88 | if (userModel.user.noon.isNotEmpty) { | 89 | if (userModel.user.noon.isNotEmpty) { |
| 89 | - totalmorning += "($noon"; | 90 | + totalnoon = "($noon)"; |
| 90 | } | 91 | } |
| 91 | if (userModel.user.night.isNotEmpty) { | 92 | if (userModel.user.night.isNotEmpty) { |
| 92 | - totalmorning += "($night"; | 93 | + totalnight = "($night)"; |
| 93 | } | 94 | } |
| 94 | notifyListeners(); | 95 | notifyListeners(); |
| 95 | } | 96 | } |
| @@ -136,22 +136,9 @@ class NavigatorUtil { | @@ -136,22 +136,9 @@ class NavigatorUtil { | ||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | /// 邀请函 | 138 | /// 邀请函 |
| 139 | - static void goInvicationPage( | ||
| 140 | - BuildContext context, | ||
| 141 | - String rid, | ||
| 142 | - String tableInfo, | ||
| 143 | - String ddate, | ||
| 144 | - String ddateStr, | ||
| 145 | - String phone, | ||
| 146 | - String ddate_solt, | ||
| 147 | - String name, | ||
| 148 | - String sex, | ||
| 149 | - String remark, | ||
| 150 | - {bool replace = false, | ||
| 151 | - String tid}) { | ||
| 152 | - _navigateTo(context, | ||
| 153 | - "${Routes.invication}?rid=$rid&tid=$tid&tableInfo=${FluroConvertUtils.fluroCnParamsEncode(tableInfo)}&ddate=$ddate&ddateStr=${FluroConvertUtils.fluroCnParamsEncode(ddateStr)}&phone=$phone&ddate_solt=$ddate_solt&name=${Uri.encodeComponent(name)}&sex=$sex&remark=${remark == null ? '' : Uri.encodeComponent(remark)}", | ||
| 154 | - replace: replace); | 139 | + static void goInvicationPage(BuildContext context, String rid, |
| 140 | + {bool replace = false}) { | ||
| 141 | + _navigateTo(context, "${Routes.invication}?rid=$rid", replace: replace); | ||
| 155 | } | 142 | } |
| 156 | 143 | ||
| 157 | /// 发短信 | 144 | /// 发短信 |
| @@ -307,24 +307,23 @@ var photoManagerPageHandle = new Handler( | @@ -307,24 +307,23 @@ var photoManagerPageHandle = new Handler( | ||
| 307 | var handleInvicationHandler = new Handler( | 307 | var handleInvicationHandler = new Handler( |
| 308 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 308 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 309 | String rid = params["rid"].first; | 309 | String rid = params["rid"].first; |
| 310 | - String tableInfo = | ||
| 311 | - FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first); | ||
| 312 | - String ddate = params["ddate"].first; | ||
| 313 | - String ddateStr = | ||
| 314 | - FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first); | ||
| 315 | - String phone = params["phone"].first; | ||
| 316 | - String ddate_solt = params["ddate_solt"].first; | ||
| 317 | - String tid = params["tid"].first; | ||
| 318 | - String name = params["name"].first; | ||
| 319 | - String sex = params["sex"].first; | ||
| 320 | - String remark = params["remark"].first; | 310 | + // String tableInfo = |
| 311 | + // FluroConvertUtils.fluroCnParamsDecode(params["tableInfo"].first); | ||
| 312 | + // String ddate = params["ddate"].first; | ||
| 313 | + // String ddateStr = | ||
| 314 | + // FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first); | ||
| 315 | + // String phone = params["phone"].first; | ||
| 316 | + // String ddate_solt = params["ddate_solt"].first; | ||
| 317 | + // String tid = params["tid"].first; | ||
| 318 | + // String name = params["name"].first; | ||
| 319 | + // String sex = params["sex"].first; | ||
| 320 | + // String remark = params["remark"].first; | ||
| 321 | 321 | ||
| 322 | return ChangeNotifierProvider<RemarkManagerModel>( | 322 | return ChangeNotifierProvider<RemarkManagerModel>( |
| 323 | create: (_) => RemarkManagerModel(), | 323 | create: (_) => RemarkManagerModel(), |
| 324 | child: ChangeNotifierProvider<BaseIndoProvider>( | 324 | child: ChangeNotifierProvider<BaseIndoProvider>( |
| 325 | create: (_) => BaseIndoProvider(), | 325 | create: (_) => BaseIndoProvider(), |
| 326 | - child: InvicationPage(rid, tableInfo, ddate, ddateStr, phone, | ||
| 327 | - ddate_solt, tid, name, sex,remark))); | 326 | + child: InvicationPage(rid))); |
| 328 | }); | 327 | }); |
| 329 | 328 | ||
| 330 | // 发短信 | 329 | // 发短信 |
| @@ -3660,7 +3660,8 @@ class DialogUtil { | @@ -3660,7 +3660,8 @@ class DialogUtil { | ||
| 3660 | radius: ScreenUtil().setWidth(10), | 3660 | radius: ScreenUtil().setWidth(10), |
| 3661 | ) | 3661 | ) |
| 3662 | ], | 3662 | ], |
| 3663 | - ) | 3663 | + ), |
| 3664 | + VEmptyView(40) | ||
| 3664 | ], | 3665 | ], |
| 3665 | )) | 3666 | )) |
| 3666 | 3667 | ||
| @@ -3696,7 +3697,7 @@ class DialogUtil { | @@ -3696,7 +3697,7 @@ class DialogUtil { | ||
| 3696 | }); | 3697 | }); |
| 3697 | return SizedBox( | 3698 | return SizedBox( |
| 3698 | width: double.infinity, | 3699 | width: double.infinity, |
| 3699 | - height: ScreenUtil().setWidth(935), | 3700 | + height: ScreenUtil().setWidth(975), |
| 3700 | child: widget, | 3701 | child: widget, |
| 3701 | ); | 3702 | ); |
| 3702 | }); | 3703 | }); |
-
Please register or login to post a comment