Commit ad0607a033fcd156942ebb1ac1d3c27973112f18

Authored by wdn127929
1 parent 283e4e76

多时段增加时间显示

@@ -449,7 +449,7 @@ @@ -449,7 +449,7 @@
449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 449 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
450 CLANG_ENABLE_MODULES = YES; 450 CLANG_ENABLE_MODULES = YES;
451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 451 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
452 - CURRENT_PROJECT_VERSION = 5545; 452 + CURRENT_PROJECT_VERSION = 5546;
453 DEVELOPMENT_TEAM = 8J59HM8B82; 453 DEVELOPMENT_TEAM = 8J59HM8B82;
454 ENABLE_BITCODE = NO; 454 ENABLE_BITCODE = NO;
455 INFOPLIST_FILE = Runner/Info.plist; 455 INFOPLIST_FILE = Runner/Info.plist;
@@ -632,7 +632,7 @@ @@ -632,7 +632,7 @@
632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 632 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
633 CLANG_ENABLE_MODULES = YES; 633 CLANG_ENABLE_MODULES = YES;
634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 634 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
635 - CURRENT_PROJECT_VERSION = 5545; 635 + CURRENT_PROJECT_VERSION = 5546;
636 DEVELOPMENT_TEAM = 8J59HM8B82; 636 DEVELOPMENT_TEAM = 8J59HM8B82;
637 ENABLE_BITCODE = NO; 637 ENABLE_BITCODE = NO;
638 INFOPLIST_FILE = Runner/Info.plist; 638 INFOPLIST_FILE = Runner/Info.plist;
@@ -658,7 +658,7 @@ @@ -658,7 +658,7 @@
658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 658 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
659 CLANG_ENABLE_MODULES = YES; 659 CLANG_ENABLE_MODULES = YES;
660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 660 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
661 - CURRENT_PROJECT_VERSION = 5545; 661 + CURRENT_PROJECT_VERSION = 5546;
662 DEVELOPMENT_TEAM = 8J59HM8B82; 662 DEVELOPMENT_TEAM = 8J59HM8B82;
663 ENABLE_BITCODE = NO; 663 ENABLE_BITCODE = NO;
664 INFOPLIST_FILE = Runner/Info.plist; 664 INFOPLIST_FILE = Runner/Info.plist;
@@ -10,10 +10,10 @@ class Constant { @@ -10,10 +10,10 @@ class Constant {
10 * 10 *
11 * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!! 11 * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!!
12 * */ 12 * */
13 - static const WXMiniProgramType wxMiniProgramType =  
14 - WXMiniProgramType.release; //正式版  
15 // static const WXMiniProgramType wxMiniProgramType = 13 // static const WXMiniProgramType wxMiniProgramType =
16 - // WXMiniProgramType.preview; //体验版 14 + // WXMiniProgramType.release; //正式版
  15 + static const WXMiniProgramType wxMiniProgramType =
  16 + WXMiniProgramType.preview; //体验版
17 // static const WXMiniProgramType wxMiniProgramType = 17 // static const WXMiniProgramType wxMiniProgramType =
18 // WXMiniProgramType.test; //开发版 18 // WXMiniProgramType.test; //开发版
19 19
@@ -226,6 +226,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -226,6 +226,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
226 alignment: Alignment.center, 226 alignment: Alignment.center,
227 child: Container( 227 child: Container(
228 alignment: Alignment.center, 228 alignment: Alignment.center,
  229 + // height: w(35),
229 width: double.infinity, 230 width: double.infinity,
230 // width: width, 231 // width: width,
231 // padding: padding, 232 // padding: padding,
@@ -239,13 +240,25 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -239,13 +240,25 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
239 : MyColours.color_438E93, 240 : MyColours.color_438E93,
240 width: w(1), 241 width: w(1),
241 ))), 242 ))),
242 - child: Text(  
243 - element.mname!,  
244 - style: TextStyle(  
245 - color: '${currTimeIndex}' == element.ddateSolt  
246 - ? MyColours.color_F8F9FD  
247 - : MyColours.color_438E93,  
248 - fontSize: font(14)), 243 + child: Column(
  244 + children: [
  245 + Text(
  246 + element.mname ?? '',
  247 + style: TextStyle(
  248 + color: '${currTimeIndex}' == element.ddateSolt
  249 + ? MyColours.color_F8F9FD
  250 + : MyColours.color_438E93,
  251 + fontSize: font(14)),
  252 + ),
  253 + Text(
  254 + element.mdate ?? '',
  255 + style: TextStyle(
  256 + color: '${currTimeIndex}' == element.ddateSolt
  257 + ? MyColours.color_F8F9FD
  258 + : MyColours.color_438E93,
  259 + fontSize: font(12)),
  260 + )
  261 + ],
249 )), 262 )),
250 )), 263 )),
251 )); 264 ));
@@ -1407,7 +1420,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -1407,7 +1420,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
1407 // vertical: ScreenUtil().setWidth(20) 1420 // vertical: ScreenUtil().setWidth(20)
1408 ), 1421 ),
1409 decoration: BoxDecoration( 1422 decoration: BoxDecoration(
1410 - color: MyColours.color_199095, 1423 + color: MyColours.color_438E93,
1411 borderRadius: BorderRadius.only( 1424 borderRadius: BorderRadius.only(
1412 topLeft: Radius.circular(r(10)), 1425 topLeft: Radius.circular(r(10)),
1413 topRight: Radius.circular(r(10)), 1426 topRight: Radius.circular(r(10)),
@@ -1450,7 +1463,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -1450,7 +1463,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
1450 // (currTimeIndex == 3 || currTimeIndex == 1) 1463 // (currTimeIndex == 3 || currTimeIndex == 1)
1451 // ? ScreenUtil().setWidth(300) + ScreenUtil().setWidth(4) 1464 // ? ScreenUtil().setWidth(300) + ScreenUtil().setWidth(4)
1452 // : ScreenUtil().setWidth(300), 1465 // : ScreenUtil().setWidth(300),
1453 - height: w(28), 1466 + // height: w(28),
1454 decoration: BoxDecoration( 1467 decoration: BoxDecoration(
1455 color: Colors.transparent, 1468 color: Colors.transparent,
1456 borderRadius: BorderRadius.only( 1469 borderRadius: BorderRadius.only(
@@ -2359,7 +2372,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -2359,7 +2372,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
2359 detailEntity!.uid, 2372 detailEntity!.uid,
2360 currTimeIndex, 2373 currTimeIndex,
2361 dateTime, 2374 dateTime,
2362 - times ) 2375 + times)
2363 : await _notebookDetailChangeModel 2376 : await _notebookDetailChangeModel
2364 .setReserveInfoOnly( 2377 .setReserveInfoOnly(
2365 context, 2378 context,
@@ -2367,7 +2380,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -2367,7 +2380,7 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
2367 detailEntity!.uid, 2380 detailEntity!.uid,
2368 currTimeIndex, 2381 currTimeIndex,
2369 dateTime, 2382 dateTime,
2370 - times ); 2383 + times);
2371 if (_model != null) { 2384 if (_model != null) {
2372 if (ObjectUtil.isNotEmpty(_model.row) || 2385 if (ObjectUtil.isNotEmpty(_model.row) ||
2373 ObjectUtil.isNotEmpty(_model.row!.id)) { 2386 ObjectUtil.isNotEmpty(_model.row!.id)) {
@@ -11,6 +11,7 @@ import 'package:one_key/provider/user_model.dart'; @@ -11,6 +11,7 @@ import 'package:one_key/provider/user_model.dart';
11 import 'package:one_key/res/colors.dart'; 11 import 'package:one_key/res/colors.dart';
12 import 'package:one_key/route/navigator_util.dart'; 12 import 'package:one_key/route/navigator_util.dart';
13 import 'package:one_key/utils/event_bus.dart'; 13 import 'package:one_key/utils/event_bus.dart';
  14 +import 'package:one_key/utils/screen_util.dart';
14 import 'package:one_key/utils/utils.dart'; 15 import 'package:one_key/utils/utils.dart';
15 import 'package:one_key/widgets/MyDivider.dart'; 16 import 'package:one_key/widgets/MyDivider.dart';
16 import 'package:one_key/widgets/h_empty_view.dart'; 17 import 'package:one_key/widgets/h_empty_view.dart';
@@ -642,7 +643,8 @@ class NoteBookItemFState extends State<NoteBookItemF> @@ -642,7 +643,8 @@ class NoteBookItemFState extends State<NoteBookItemF>
642 child: Column( 643 child: Column(
643 crossAxisAlignment: CrossAxisAlignment.start, 644 crossAxisAlignment: CrossAxisAlignment.start,
644 children: [ 645 children: [
645 - Row( 646 + Wrap(
  647 + spacing: w(2),
646 children: [ 648 children: [
647 notebook.rnameStr == '' 649 notebook.rnameStr == ''
648 ? SizedBox() 650 ? SizedBox()
1 -  
2 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 2 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 import 'package:one_key/models/notebook.dart'; 3 import 'package:one_key/models/notebook.dart';
@@ -33,6 +32,7 @@ import 'package:provider/provider.dart'; @@ -33,6 +32,7 @@ import 'package:provider/provider.dart';
33 32
34 import '../../models/note_book_only_model.dart'; 33 import '../../models/note_book_only_model.dart';
35 import '../../provider/marketing_center_provider.dart'; 34 import '../../provider/marketing_center_provider.dart';
  35 +import '../../utils/screen_util.dart';
36 36
37 /** 37 /**
38 * 详细模式 38 * 详细模式
@@ -52,8 +52,8 @@ class NoteBookItemSimple extends StatefulWidget { @@ -52,8 +52,8 @@ class NoteBookItemSimple extends StatefulWidget {
52 } 52 }
53 53
54 class NoteBookItemSimpleState extends State<NoteBookItemSimple> 54 class NoteBookItemSimpleState extends State<NoteBookItemSimple>
55 - // with SingleTickerProviderStateMixin  
56 - { 55 +// with SingleTickerProviderStateMixin
  56 +{
57 // bool _large = false; 57 // bool _large = false;
58 List cancelReasonList = []; 58 List cancelReasonList = [];
59 bool isShowTF = false; 59 bool isShowTF = false;
@@ -513,7 +513,6 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -513,7 +513,6 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
513 //离店和取消预订 513 //离店和取消预订
514 514
515 widthBtn = 208.0; //一个按钮 515 widthBtn = 208.0; //一个按钮
516 -  
517 } else { 516 } else {
518 if (!Utils.getAuthority(context, '取消预订') || 517 if (!Utils.getAuthority(context, '取消预订') ||
519 (!Utils.getAuthority(context, '取消预订') && 518 (!Utils.getAuthority(context, '取消预订') &&
@@ -553,7 +552,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -553,7 +552,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
553 width: ScreenUtil().setWidth(82 * 2), 552 width: ScreenUtil().setWidth(82 * 2),
554 alignment: Alignment.center, 553 alignment: Alignment.center,
555 child: Text( 554 child: Text(
556 - notebook.tablename??'', 555 + notebook.tablename ?? '',
557 maxLines: 1, 556 maxLines: 1,
558 overflow: TextOverflow.ellipsis, 557 overflow: TextOverflow.ellipsis,
559 style: TextStyle( 558 style: TextStyle(
@@ -596,27 +595,26 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -596,27 +595,26 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
596 child: Column( 595 child: Column(
597 crossAxisAlignment: CrossAxisAlignment.start, 596 crossAxisAlignment: CrossAxisAlignment.start,
598 children: [ 597 children: [
599 - Row( 598 + Wrap(
  599 + spacing: w(2),
600 children: [ 600 children: [
601 notebook.rnameStr == '' 601 notebook.rnameStr == ''
602 ? SizedBox() 602 ? SizedBox()
603 - : Expanded(  
604 - child: Text(  
605 - notebook.rnameStr!,  
606 - maxLines: 1,  
607 - overflow: TextOverflow.ellipsis,  
608 - style: TextStyle(  
609 - color: canDo &&  
610 - (Utils.getAuthority(  
611 - context, '到店') ||  
612 - notebook.uid ==  
613 - userModel  
614 - .user!.openid)  
615 - ? MyColours.color_260101  
616 - : MyColours.color_BFC4D4,  
617 - fontWeight: FontWeight.bold,  
618 - fontSize: ScreenUtil().setSp(24)),  
619 - ), 603 + : Text(
  604 + notebook.rnameStr!,
  605 + maxLines: 1,
  606 + overflow: TextOverflow.ellipsis,
  607 + style: TextStyle(
  608 + color: canDo &&
  609 + (Utils.getAuthority(
  610 + context, '到店') ||
  611 + notebook.uid ==
  612 + userModel
  613 + .user!.openid)
  614 + ? MyColours.color_260101
  615 + : MyColours.color_BFC4D4,
  616 + fontWeight: FontWeight.bold,
  617 + fontSize: ScreenUtil().setSp(24)),
620 ), 618 ),
621 notebook.phoneStr!.isNotEmpty 619 notebook.phoneStr!.isNotEmpty
622 ? Text( 620 ? Text(
@@ -893,7 +891,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -893,7 +891,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
893 : Image.asset( 891 : Image.asset(
894 Utils.getImgPath(canDo && 892 Utils.getImgPath(canDo &&
895 (Utils.getAuthority(context, '到店') || 893 (Utils.getAuthority(context, '到店') ||
896 - notebook.uid == userModel.user!.openid) 894 + notebook.uid ==
  895 + userModel.user!.openid)
897 ? 'ordered_open' 896 ? 'ordered_open'
898 : 'ordered_off'), 897 : 'ordered_off'),
899 width: ScreenUtil().setWidth(80), 898 width: ScreenUtil().setWidth(80),
@@ -682,6 +682,8 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -682,6 +682,8 @@ class NoteBookPageState extends State<NoteBookPage> {
682 ))), 682 ))),
683 child: Text( 683 child: Text(
684 element.mname! + '${total == '(0)' ? '' : total}', 684 element.mname! + '${total == '(0)' ? '' : total}',
  685 + maxLines: 1,
  686 + overflow: TextOverflow.ellipsis,
685 style: TextStyle( 687 style: TextStyle(
686 color: '${currTimeIndex}' == element.ddateSolt 688 color: '${currTimeIndex}' == element.ddateSolt
687 ? MyColours.color_F8F9FD 689 ? MyColours.color_F8F9FD
@@ -3926,13 +3926,28 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -3926,13 +3926,28 @@ class TableManagerPageState extends State<TableManagerPage> {
3926 : MyColours.color_438E93, 3926 : MyColours.color_438E93,
3927 width: w(1), 3927 width: w(1),
3928 ))), 3928 ))),
3929 - child: Text(  
3930 - element.mname!,  
3931 - style: TextStyle(  
3932 - color: '${currTimeIndex}' == element.ddateSolt  
3933 - ? MyColours.color_F8F9FD  
3934 - : MyColours.color_438E93,  
3935 - fontSize: font(14)), 3929 + child: Column(
  3930 + children: [
  3931 + Text(
  3932 + element.mname ?? '',
  3933 +
  3934 + // overflow: TextOverflow.ellipsis,
  3935 + style: TextStyle(
  3936 + color: '${currTimeIndex}' == element.ddateSolt
  3937 + ? MyColours.color_F8F9FD
  3938 + : MyColours.color_438E93,
  3939 + fontSize: font(14)),
  3940 + ),
  3941 + // VEmptyView(10),
  3942 + Text(
  3943 + element.mdate ?? '',
  3944 + style: TextStyle(
  3945 + color: '${currTimeIndex}' == element.ddateSolt
  3946 + ? MyColours.color_F8F9FD
  3947 + : MyColours.color_438E93,
  3948 + fontSize: font(12)),
  3949 + )
  3950 + ],
3936 )), 3951 )),
3937 )), 3952 )),
3938 )); 3953 ));
@@ -4093,8 +4108,8 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -4093,8 +4108,8 @@ class TableManagerPageState extends State<TableManagerPage> {
4093 // ? ScreenUtil().setWidth(300) + ScreenUtil().setWidth(4) 4108 // ? ScreenUtil().setWidth(300) + ScreenUtil().setWidth(4)
4094 // : ScreenUtil().setWidth(300), 4109 // : ScreenUtil().setWidth(300),
4095 // height: w(28), 4110 // height: w(28),
4096 - height:  
4097 - (ScreenUtil().screenWidth - w(10) - w(18)) / 4 * 0.4, 4111 + // height:
  4112 + // (ScreenUtil().screenWidth - w(10) - w(18)) / 4 * 0.4,
4098 decoration: BoxDecoration( 4113 decoration: BoxDecoration(
4099 color: Colors.transparent, 4114 color: Colors.transparent,
4100 borderRadius: BorderRadius.only( 4115 borderRadius: BorderRadius.only(
@@ -2530,8 +2530,9 @@ class Utils { @@ -2530,8 +2530,9 @@ class Utils {
2530 height: 1, 2530 height: 1,
2531 maxLines: 1, 2531 maxLines: 1,
2532 ellipsis: '3', 2532 ellipsis: '3',
2533 - fontSize: 16*scaleX));  
2534 - pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16*scaleX)); 2533 + fontSize: 16 * scaleX));
  2534 + pb2.pushStyle(
  2535 + ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
2535 pb2.addText( 2536 pb2.addText(
2536 '${Provider.of<UserModel>(context, listen: false).user!.sellername}'); 2537 '${Provider.of<UserModel>(context, listen: false).user!.sellername}');
2537 2538
@@ -2552,8 +2553,10 @@ class Utils { @@ -2552,8 +2553,10 @@ class Utils {
2552 fontWeight: FontWeight.bold, 2553 fontWeight: FontWeight.bold,
2553 fontStyle: FontStyle.normal, 2554 fontStyle: FontStyle.normal,
2554 height: 1, 2555 height: 1,
2555 - fontSize: 16*scaleX));  
2556 - pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16*scaleX)); 2556 + ellipsis:'...',
  2557 + fontSize: 16 * scaleX));
  2558 + pb.pushStyle(
  2559 + ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
2557 pb.addText(time); 2560 pb.addText(time);
2558 2561
2559 // 设置文本的宽度约束 2562 // 设置文本的宽度约束
@@ -2678,6 +2681,7 @@ class Utils { @@ -2678,6 +2681,7 @@ class Utils {
2678 fontWeight: FontWeight.bold, 2681 fontWeight: FontWeight.bold,
2679 fontStyle: FontStyle.normal, 2682 fontStyle: FontStyle.normal,
2680 height: 1, 2683 height: 1,
  2684 + ellipsis:'...',
2681 fontSize: 16 * scaleX)); 2685 fontSize: 16 * scaleX));
2682 pb.pushStyle( 2686 pb.pushStyle(
2683 ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX)); 2687 ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
@@ -2816,6 +2820,7 @@ class Utils { @@ -2816,6 +2820,7 @@ class Utils {
2816 fontWeight: FontWeight.bold, 2820 fontWeight: FontWeight.bold,
2817 height: 1, 2821 height: 1,
2818 fontStyle: FontStyle.normal, 2822 fontStyle: FontStyle.normal,
  2823 + ellipsis:'...',
2819 fontSize: 16 * scaleX)); 2824 fontSize: 16 * scaleX));
2820 pb.pushStyle( 2825 pb.pushStyle(
2821 ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX)); 2826 ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 16 * scaleX));
@@ -2956,6 +2961,7 @@ class Utils { @@ -2956,6 +2961,7 @@ class Utils {
2956 textAlign: TextAlign.center, 2961 textAlign: TextAlign.center,
2957 fontWeight: FontWeight.bold, 2962 fontWeight: FontWeight.bold,
2958 height: 1, 2963 height: 1,
  2964 + ellipsis:'...',
2959 fontStyle: FontStyle.normal, 2965 fontStyle: FontStyle.normal,
2960 fontSize: scaleX * 16)); 2966 fontSize: scaleX * 16));
2961 pb.pushStyle( 2967 pb.pushStyle(