Commit 2337cf4ff4a9aef07eb5f9ee54a0ab0494d3e36d

Authored by wdn127929
1 parent 03ab100f

临餐取消s级别判断

@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
549 CODE_SIGN_IDENTITY = "Apple Development"; 549 CODE_SIGN_IDENTITY = "Apple Development";
550 CODE_SIGN_STYLE = Automatic; 550 CODE_SIGN_STYLE = Automatic;
551 - CURRENT_PROJECT_VERSION = 5325; 551 + CURRENT_PROJECT_VERSION = 5326;
552 DEVELOPMENT_TEAM = 8J59HM8B82; 552 DEVELOPMENT_TEAM = 8J59HM8B82;
553 ENABLE_BITCODE = NO; 553 ENABLE_BITCODE = NO;
554 FLUTTER_BUILD_MODE = release; 554 FLUTTER_BUILD_MODE = release;
@@ -696,7 +696,7 @@ @@ -696,7 +696,7 @@
696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
697 CODE_SIGN_IDENTITY = "Apple Development"; 697 CODE_SIGN_IDENTITY = "Apple Development";
698 CODE_SIGN_STYLE = Automatic; 698 CODE_SIGN_STYLE = Automatic;
699 - CURRENT_PROJECT_VERSION = 5325; 699 + CURRENT_PROJECT_VERSION = 5326;
700 DEVELOPMENT_TEAM = 8J59HM8B82; 700 DEVELOPMENT_TEAM = 8J59HM8B82;
701 ENABLE_BITCODE = NO; 701 ENABLE_BITCODE = NO;
702 FLUTTER_BUILD_MODE = release; 702 FLUTTER_BUILD_MODE = release;
@@ -732,7 +732,7 @@ @@ -732,7 +732,7 @@
732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
733 CODE_SIGN_IDENTITY = "Apple Development"; 733 CODE_SIGN_IDENTITY = "Apple Development";
734 CODE_SIGN_STYLE = Automatic; 734 CODE_SIGN_STYLE = Automatic;
735 - CURRENT_PROJECT_VERSION = 5325; 735 + CURRENT_PROJECT_VERSION = 5326;
736 DEVELOPMENT_TEAM = 8J59HM8B82; 736 DEVELOPMENT_TEAM = 8J59HM8B82;
737 ENABLE_BITCODE = NO; 737 ENABLE_BITCODE = NO;
738 FLUTTER_BUILD_MODE = release; 738 FLUTTER_BUILD_MODE = release;
@@ -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
@@ -416,9 +416,13 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -416,9 +416,13 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
416 //临餐不可以取消 416 //临餐不可以取消
417 417
418 //比较相差的天数 418 //比较相差的天数
419 - int difference =  
420 - detailEntity.ddateFhms.difference(DateTime.now()).inDays;  
421 - if (difference <= int.parse(cancelDay) && difference >= 0) { 419 +
  420 + int differenceSeconds = detailEntity.ddateFhms
  421 + .difference(DateTime.now())
  422 + .inSeconds;
  423 +
  424 + if (int.parse(cancelDay) != 0 &&
  425 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
422 // 临餐时间内 426 // 临餐时间内
423 cancelCan = false; 427 cancelCan = false;
424 } else { 428 } else {
@@ -432,9 +436,12 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -432,9 +436,12 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
432 //临餐不可以取消 436 //临餐不可以取消
433 437
434 //比较相差的天数 438 //比较相差的天数
435 - int difference =  
436 - detailEntity.ddateFhms.difference(DateTime.now()).inDays;  
437 - if (difference <= int.parse(cancelDay) && difference >= 0) { 439 + int differenceSeconds = detailEntity.ddateFhms
  440 + .difference(DateTime.now())
  441 + .inSeconds;
  442 +
  443 + if (int.parse(cancelDay) != 0 &&
  444 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
438 // 临餐时间内 445 // 临餐时间内
439 cancelCan = false; 446 cancelCan = false;
440 } else { 447 } else {
@@ -448,9 +455,12 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -448,9 +455,12 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
448 //临餐不可以取消 455 //临餐不可以取消
449 456
450 //比较相差的天数 457 //比较相差的天数
451 - int difference =  
452 - detailEntity.ddateFhms.difference(DateTime.now()).inDays;  
453 - if (difference <= int.parse(cancelDay) && difference >= 0) { 458 + int differenceSeconds = detailEntity.ddateFhms
  459 + .difference(DateTime.now())
  460 + .inSeconds;
  461 +
  462 + if (int.parse(cancelDay) != 0 &&
  463 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
454 // 临餐时间内 464 // 临餐时间内
455 cancelCan = false; 465 cancelCan = false;
456 } else { 466 } else {
@@ -788,10 +788,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -788,10 +788,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
788 //临餐不可以取消 788 //临餐不可以取消
789 789
790 //比较相差的天数 790 //比较相差的天数
791 - int difference = detailModel.detailModelAllSunModel.ddateFhms 791 +
  792 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
792 .difference(DateTime.now()) 793 .difference(DateTime.now())
793 - .inDays;  
794 - if (difference <= int.parse(cancelDay) && difference >= 0) { 794 + .inSeconds;
  795 +
  796 + if (int.parse(cancelDay) != 0 &&
  797 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
795 // 临餐时间内 798 // 临餐时间内
796 cancelCan = false; 799 cancelCan = false;
797 } else { 800 } else {
@@ -805,10 +808,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -805,10 +808,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
805 //临餐不可以取消 808 //临餐不可以取消
806 809
807 //比较相差的天数 810 //比较相差的天数
808 - int difference = detailModel.detailModelAllSunModel.ddateFhms 811 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
809 .difference(DateTime.now()) 812 .difference(DateTime.now())
810 - .inDays;  
811 - if (difference <= int.parse(cancelDay) && difference >= 0) { 813 + .inSeconds;
  814 +
  815 + if (int.parse(cancelDay) != 0 &&
  816 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
812 // 临餐时间内 817 // 临餐时间内
813 cancelCan = false; 818 cancelCan = false;
814 } else { 819 } else {
@@ -822,10 +827,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -822,10 +827,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
822 //临餐不可以取消 827 //临餐不可以取消
823 828
824 //比较相差的天数 829 //比较相差的天数
825 - int difference = detailModel.detailModelAllSunModel.ddateFhms 830 +
  831 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
826 .difference(DateTime.now()) 832 .difference(DateTime.now())
827 - .inDays;  
828 - if (difference <= int.parse(cancelDay) && difference >= 0) { 833 + .inSeconds;
  834 +
  835 + if (int.parse(cancelDay) != 0 &&
  836 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
829 // 临餐时间内 837 // 临餐时间内
830 cancelCan = false; 838 cancelCan = false;
831 } else { 839 } else {
@@ -367,10 +367,13 @@ class InvicationPageState extends State<InvicationPage> @@ -367,10 +367,13 @@ class InvicationPageState extends State<InvicationPage>
367 //临餐不可以取消 367 //临餐不可以取消
368 368
369 //比较相差的天数 369 //比较相差的天数
370 - int difference = detailModel.detailModelAllSunModel.ddateFhms 370 +
  371 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
371 .difference(DateTime.now()) 372 .difference(DateTime.now())
372 - .inDays;  
373 - if (difference <= int.parse(cancelDay) && difference >= 0) { 373 + .inSeconds;
  374 +
  375 + if (int.parse(cancelDay) != 0 &&
  376 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
374 // 临餐时间内 377 // 临餐时间内
375 cancelCan = false; 378 cancelCan = false;
376 } else { 379 } else {
@@ -384,10 +387,12 @@ class InvicationPageState extends State<InvicationPage> @@ -384,10 +387,12 @@ class InvicationPageState extends State<InvicationPage>
384 //临餐不可以取消 387 //临餐不可以取消
385 388
386 //比较相差的天数 389 //比较相差的天数
387 - int difference = detailModel.detailModelAllSunModel.ddateFhms 390 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
388 .difference(DateTime.now()) 391 .difference(DateTime.now())
389 - .inDays;  
390 - if (difference <= int.parse(cancelDay) && difference >= 0) { 392 + .inSeconds;
  393 +
  394 + if (int.parse(cancelDay) != 0 &&
  395 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
391 // 临餐时间内 396 // 临餐时间内
392 cancelCan = false; 397 cancelCan = false;
393 } else { 398 } else {
@@ -401,10 +406,12 @@ class InvicationPageState extends State<InvicationPage> @@ -401,10 +406,12 @@ class InvicationPageState extends State<InvicationPage>
401 //临餐不可以取消 406 //临餐不可以取消
402 407
403 //比较相差的天数 408 //比较相差的天数
404 - int difference = detailModel.detailModelAllSunModel.ddateFhms 409 + int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
405 .difference(DateTime.now()) 410 .difference(DateTime.now())
406 - .inDays;  
407 - if (difference <= int.parse(cancelDay) && difference >= 0) { 411 + .inSeconds;
  412 +
  413 + if (int.parse(cancelDay) != 0 &&
  414 + differenceSeconds < int.parse(cancelDay) * 24 * 60 * 60) {
408 // 临餐时间内 415 // 临餐时间内
409 cancelCan = false; 416 cancelCan = false;
410 } else { 417 } else {
@@ -577,14 +577,18 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -577,14 +577,18 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
577 VEmptyView(48), 577 VEmptyView(48),
578 Row( 578 Row(
579 children: [ 579 children: [
580 - Container(  
581 - padding: EdgeInsets.symmetric(vertical: w(8)),  
582 - child: Text('临餐取消预订限制(前台及管理员除外)',  
583 - style: TextStyle(  
584 - color: MyColours.color_515151,  
585 - fontSize: ScreenUtil().setSp(32)))),  
586 - HEmptyView(10),  
587 Expanded( 580 Expanded(
  581 + child: Container(
  582 + padding: EdgeInsets.symmetric(vertical: w(8)),
  583 + child: Text('临餐取消预订限制(前台及管理员除外)',
  584 + overflow: TextOverflow.ellipsis,
  585 + maxLines: 10,
  586 + style: TextStyle(
  587 + color: MyColours.color_515151,
  588 + fontSize: ScreenUtil().setSp(32))))),
  589 + HEmptyView(2),
  590 + Container(
  591 + width: w(40),
588 child: TextField( 592 child: TextField(
589 controller: controllerDay, 593 controller: controllerDay,
590 textAlign: TextAlign.right, 594 textAlign: TextAlign.right,