Commit 7211c2c92df94d79cd45fb876f1187e148e6e8c8

Authored by wdn127929
1 parent 7490aaee

桌位页面展示宴会---点击详情未做

@@ -36,7 +36,7 @@ class Notebook { @@ -36,7 +36,7 @@ class Notebook {
36 String is_set_ddate; 36 String is_set_ddate;
37 String topic; 37 String topic;
38 String ddate_solt; 38 String ddate_solt;
39 - String status; //订单状态 0:待确认,1:已定座,2:确认到店,3:用餐完成,4:取消预订,5:安排包间,6拒绝订单 39 + String status; //订单状态 0:待确认,1:已定座,2:确认到店,3:用餐完成,4:取消预订,5:安排包间,6拒绝订单,10表示宴会
40 String cause; 40 String cause;
41 String abolition; 41 String abolition;
42 String action; 42 String action;
@@ -53,6 +53,8 @@ class Notebook { @@ -53,6 +53,8 @@ class Notebook {
53 String nick_name; 53 String nick_name;
54 bool issimple; 54 bool issimple;
55 55
  56 + String className; //宴会类型
  57 +
56 // String get tableinfoStr { 58 // String get tableinfoStr {
57 // return name + 59 // return name +
58 // "\n" + 60 // "\n" +
@@ -86,6 +88,8 @@ class Notebook { @@ -86,6 +88,8 @@ class Notebook {
86 case "3": //公司 88 case "3": //公司
87 return rname + "公司"; 89 return rname + "公司";
88 break; 90 break;
  91 + default:
  92 + return rname;
89 } 93 }
90 94
91 return rname; 95 return rname;
@@ -33,6 +33,8 @@ class Table { @@ -33,6 +33,8 @@ class Table {
33 String isMerge; //是否打开桌位合并开关 33 String isMerge; //是否打开桌位合并开关
34 String tids; //被合并桌位tids 34 String tids; //被合并桌位tids
35 String lockTname; //被谁合并了 35 String lockTname; //被谁合并了
  36 + String lockTid; //被合并桌位id
  37 + String label; //底部标签 (新客,婚宴)
36 38
37 //获取桌位类型 39 //获取桌位类型
38 String get tidStr { 40 String get tidStr {
@@ -95,6 +97,8 @@ class Table { @@ -95,6 +97,8 @@ class Table {
95 return "已预订"; 97 return "已预订";
96 case "2": //用餐中 98 case "2": //用餐中
97 return "已预订"; 99 return "已预订";
  100 + case "10": //婚宴
  101 + return "已预订";
98 default: 102 default:
99 return ""; 103 return "";
100 } 104 }
@@ -108,6 +112,6 @@ class Table { @@ -108,6 +112,6 @@ class Table {
108 112
109 @override 113 @override
110 String toString() { 114 String toString() {
111 - return 'Table{id: $id,isPhoto:$isPhoto rid: $rid, tid: $tid, name: $name, table_pnum: $table_pnum, most_pnum: $most_pnum, order_o: $order_o, status: $status, tablestatus: $tablestatus, enable: $enable, spell: $spell, rname: $rname, isExitsClass:$isExitsClass,max: $max, low: $low, is_lock: $isLock, is_merge: $isMerge,tids:$tids,lock_tname:$lockTname}'; 115 + return 'Table{id: $id,isPhoto:$isPhoto rid: $rid, tid: $tid, name: $name, table_pnum: $table_pnum, most_pnum: $most_pnum, order_o: $order_o, status: $status, tablestatus: $tablestatus, enable: $enable, spell: $spell, rname: $rname, isExitsClass:$isExitsClass,max: $max, low: $low, is_lock: $isLock, is_merge: $isMerge,tids:$tids,lock_tname:$lockTname,lock_tid:$lockTid}';
112 } 116 }
113 } 117 }
@@ -31,7 +31,8 @@ Table _$TableFromJson(Map<String, dynamic> json) { @@ -31,7 +31,8 @@ Table _$TableFromJson(Map<String, dynamic> json) {
31 ..isLock = json['is_lock'] as String 31 ..isLock = json['is_lock'] as String
32 ..isMerge = json['is_merge'] as String 32 ..isMerge = json['is_merge'] as String
33 ..tids = json['tids'] as String 33 ..tids = json['tids'] as String
34 - ..lockTname = json['lock_tname'] as String; 34 + ..lockTname = json['lock_tname'] as String
  35 + ..lockTid = json['lock_tid'] as String;
35 } 36 }
36 37
37 Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{ 38 Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
@@ -58,5 +59,6 @@ Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{ @@ -58,5 +59,6 @@ Map<String, dynamic> _$TableToJson(Table instance) => <String, dynamic>{
58 'is_lock': instance.isLock, 59 'is_lock': instance.isLock,
59 'is_merge': instance.isMerge, 60 'is_merge': instance.isMerge,
60 'tids': instance.tids, 61 'tids': instance.tids,
61 - 'lock_tname': instance.lockTname 62 + 'lock_tname': instance.lockTname,
  63 + 'lock_tid': instance.lockTid
62 }; 64 };
@@ -145,7 +145,8 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -145,7 +145,8 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
145 Map<String, String> params = { 145 Map<String, String> params = {
146 'tid': table.id, 146 'tid': table.id,
147 'is_merge': isMerge, 147 'is_merge': isMerge,
148 - 'tids': tids 148 + 'tids':tids
  149 + // 'tids': isMerge == '0' ? '' : tids
149 }; 150 };
150 151
151 bool success = await tableManagerModel.mergeTables(context, params); 152 bool success = await tableManagerModel.mergeTables(context, params);
@@ -410,7 +411,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -410,7 +411,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
410 isLock: table.isLock ?? '0', 411 isLock: table.isLock ?? '0',
411 isMerge: table.isMerge ?? '0', 412 isMerge: table.isMerge ?? '0',
412 tableid: table.id, 413 tableid: table.id,
413 - table:table, 414 + table: table,
414 selectTables: selectTables, 415 selectTables: selectTables,
415 onTapDel: (Map<String, dynamic> value) async { 416 onTapDel: (Map<String, dynamic> value) async {
416 Map<String, String> params = { 417 Map<String, String> params = {
@@ -55,6 +55,7 @@ class NoteBookModel extends ChangeNotifier { @@ -55,6 +55,7 @@ class NoteBookModel extends ChangeNotifier {
55 notebooks = baseResp.data.map<Notebook>((value) { 55 notebooks = baseResp.data.map<Notebook>((value) {
56 return Notebook.fromJson(value); 56 return Notebook.fromJson(value);
57 }).toList(); 57 }).toList();
  58 + // notebooks.removeWhere((element) => element.id == null);
58 if (notebooks.isEmpty) { 59 if (notebooks.isEmpty) {
59 pageState = PageState.Empty; 60 pageState = PageState.Empty;
60 } else { 61 } else {
@@ -83,7 +84,6 @@ class NoteBookModel extends ChangeNotifier { @@ -83,7 +84,6 @@ class NoteBookModel extends ChangeNotifier {
83 UserModel userModel = Provider.of<UserModel>(context, listen: false); 84 UserModel userModel = Provider.of<UserModel>(context, listen: false);
84 // total = "已订" + (morning + noon + night).toString(); 85 // total = "已订" + (morning + noon + night).toString();
85 if (userModel.user.morning.isNotEmpty) { 86 if (userModel.user.morning.isNotEmpty) {
86 -  
87 totalmorning = "($morning)"; 87 totalmorning = "($morning)";
88 } 88 }
89 if (userModel.user.noon.isNotEmpty) { 89 if (userModel.user.noon.isNotEmpty) {
@@ -20,6 +20,7 @@ import 'package:one_key/utils/lunar_calendar.dart'; @@ -20,6 +20,7 @@ import 'package:one_key/utils/lunar_calendar.dart';
20 import 'package:one_key/utils/utils.dart'; 20 import 'package:one_key/utils/utils.dart';
21 import 'package:provider/provider.dart'; 21 import 'package:provider/provider.dart';
22 22
  23 +import '../models/get_board_model.dart';
23 import 'notebook_model.dart'; 24 import 'notebook_model.dart';
24 25
25 class TableManagerModel with ChangeNotifier { 26 class TableManagerModel with ChangeNotifier {
@@ -64,6 +65,43 @@ class TableManagerModel with ChangeNotifier { @@ -64,6 +65,43 @@ class TableManagerModel with ChangeNotifier {
64 DateTime dateTimeSelect; 65 DateTime dateTimeSelect;
65 int selectNumber; 66 int selectNumber;
66 List dailyList = []; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟 67 List dailyList = []; // 早市对应半点钟,午市对应半点钟、晚市对应半点钟
  68 + List<FeastBoardModel> banquetByDateData = []; //宴会看板数据/宴会预订的数据
  69 + List<Notebook> noteBooks;
  70 +
  71 + //指定日期、时段宴会预定
  72 +
  73 + Future<bool> getBanquetByDate(
  74 + BuildContext context, Map<String, String> params,
  75 + {showLoading = false}) async {
  76 + BaseResp<dynamic> baseResp = await DioUtil()
  77 + .request<dynamic>(context, Method.get, HttpUrl.get_banquet_by_date,
  78 + data: params, showLoading: showLoading)
  79 + .catchError((error) {
  80 + print(error.toString());
  81 + if (error is MyError) {}
  82 + return false;
  83 + });
  84 + if (baseResp == null) return false;
  85 + if (baseResp.code == Constant.status_success) {
  86 + if (baseResp.data is List) {
  87 + banquetByDateData = [];
  88 + notifyListeners();
  89 + return true;
  90 + }
  91 + banquetByDateData = [];
  92 + baseResp.data.forEach((key, value) {
  93 + FeastBoardModel boardModel = FeastBoardModel();
  94 + boardModel.title = key;
  95 + boardModel.data = FeastBoardModel.fromJson(value).data;
  96 + banquetByDateData.add(boardModel);
  97 + });
  98 + notifyListeners();
  99 + return true;
  100 + } else {
  101 + Utils.showToast(baseResp.msg ?? "");
  102 + }
  103 + return false;
  104 + }
67 105
68 //初始化时间 106 //初始化时间
69 initTime(BuildContext context) async { 107 initTime(BuildContext context) async {
@@ -487,6 +525,59 @@ class TableManagerModel with ChangeNotifier { @@ -487,6 +525,59 @@ class TableManagerModel with ChangeNotifier {
487 return tableOuterList; 525 return tableOuterList;
488 } 526 }
489 527
  528 +//获取预订(原来普通预订和宴会预订)
  529 + _getReserveListAndFeastData(context, params, showloading) async {
  530 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  531 + String timeStrStart = dateTime.year.toString() +
  532 + "-" +
  533 + Utils.addZeroNumber(dateTime.month) +
  534 + "-" +
  535 + Utils.addZeroNumber(dateTime.day) +
  536 + " 00:00:00";
  537 + String timeStrEnd = dateTime.year.toString() +
  538 + "-" +
  539 + Utils.addZeroNumber(dateTime.month) +
  540 + "-" +
  541 + Utils.addZeroNumber(dateTime.day) +
  542 + " 23:59:59";
  543 + String start =
  544 + (DateUtil.getDateMsByTimeStr(timeStrStart) / 1000).floor().toString();
  545 + String end =
  546 + (DateUtil.getDateMsByTimeStr(timeStrEnd) / 1000).floor().toString();
  547 +
  548 + Map<String, String> banquetmap = {
  549 + 'sid': userModel.user.sellerid,
  550 + 'rdate': '${start}',
  551 + 'edate': '${end}',
  552 + 'ddate_interval': currTimeIndex.toString()
  553 + };
  554 + return await Future.wait<bool>([
  555 + _getOldReserve(context, params, showloading),
  556 + getBanquetByDate(context, banquetmap, showLoading: showloading)
  557 + ]).then((results) {
  558 + if (results[0] && results[1]) {
  559 + //成功
  560 + return true;
  561 + } else {
  562 + if (!results[0]) {
  563 + // Utils.showToast('');
  564 + } else {
  565 + // Utils.showToast('');
  566 + }
  567 + return false;
  568 + }
  569 + }).catchError((e) {
  570 + print(e);
  571 + return false;
  572 + });
  573 + }
  574 +
  575 + Future<bool> _getOldReserve(context, params, showloading) async {
  576 + List<Notebook> noteBooks =
  577 + await newGetReserveList(context, params, showLoading: showloading);
  578 + return true;
  579 + }
  580 +
490 //获取已预订列表 581 //获取已预订列表
491 getReserveList(BuildContext context, 582 getReserveList(BuildContext context,
492 {bool needLoading = true, 583 {bool needLoading = true,
@@ -509,57 +600,96 @@ class TableManagerModel with ChangeNotifier { @@ -509,57 +600,96 @@ class TableManagerModel with ChangeNotifier {
509 notifyListeners(); 600 notifyListeners();
510 } 601 }
511 602
512 - List<Notebook> noteBooks =  
513 - await newGetReserveList(context, params, showLoading: showloading);  
514 - List<t.Table> tempSelectTables = [];  
515 - tempSelectTables.addAll(selectTables);  
516 - String msg = '';  
517 - for (Notebook notebook in noteBooks) {  
518 - if (notebook.tid.isEmpty) continue;  
519 -  
520 - //已预订,用餐中,已安排  
521 - List<String> tids = notebook.tid.split(",");  
522 - for (String tid in tids) {  
523 - if (notebook.status == "1" ||  
524 - notebook.status == "2" ||  
525 - notebook.status == "5") {  
526 - tableMap["$tid"] = notebook;  
527 -  
528 - ///预订按钮点击的时候提醒已经被预订的桌子  
529 - ///  
530 - if (showMsg && selectTables.length > 0) {  
531 - for (t.Table item in selectTables) {  
532 - if (item.id == tid) {  
533 - msg += '${item.name},';  
534 - tempSelectTables.remove(item); 603 + bool success =
  604 + await _getReserveListAndFeastData(context, params, showloading);
  605 + if (success) {
  606 + List<FeastBoardModel> banquetByDateDataTemp = []; //转换为桌子id为key,data为value
  607 + banquetByDateData.forEach((element) {
  608 + tablesAll.forEach((table) {
  609 + if (table.name == element.title) {
  610 + FeastBoardModel feastBoardModel = FeastBoardModel();
  611 + feastBoardModel.title = table.id;
  612 + feastBoardModel.data = element.data;
  613 + banquetByDateDataTemp.add(feastBoardModel);
  614 + }
  615 + });
  616 + });
  617 + // banquetByDateData.map((e) => null)
  618 + String banquetKey = '';
  619 + if (currTimeIndex == 1) {
  620 + banquetKey = '早餐';
  621 + } else if (currTimeIndex == 2) {
  622 + banquetKey = '午餐';
  623 + } else if (currTimeIndex == 3) {
  624 + banquetKey = '晚餐';
  625 + }
  626 + banquetByDateDataTemp.forEach((element) {
  627 + FeastBoardSunModel feastBoardSunModel = element.data[banquetKey][0];
  628 + Notebook notebook = Notebook();
  629 + notebook.tid = element.title;
  630 + notebook.status = '10'; //宴会类型
  631 + notebook.className = feastBoardSunModel.className;
  632 + notebook.id = feastBoardSunModel.rid;
  633 + notebook.rname = feastBoardSunModel.rname;
  634 + notebook.nick_name =
  635 + feastBoardSunModel.nickName ?? feastBoardSunModel.account;
  636 + noteBooks.add(notebook);
  637 + });
  638 +
  639 + // List<Notebook> noteBooks =
  640 + // await newGetReserveList(context, params, showLoading: showloading);
  641 + List<t.Table> tempSelectTables = [];
  642 + tempSelectTables.addAll(selectTables);
  643 + String msg = '';
  644 + for (Notebook notebook in noteBooks) {
  645 + if (notebook.tid.isEmpty) continue;
  646 +
  647 + //已预订,用餐中,已安排
  648 + List<String> tids = notebook.tid.split(",");
  649 + for (String tid in tids) {
  650 + if (notebook.status == "1" ||
  651 + notebook.status == "2" ||
  652 + notebook.status == "5" ||
  653 + notebook.status == "10") {
  654 + tableMap["$tid"] = notebook;
  655 +
  656 + ///预订按钮点击的时候提醒已经被预订的桌子
  657 + ///
  658 + if (showMsg && selectTables.length > 0) {
  659 + for (t.Table item in selectTables) {
  660 + if (item.id == tid) {
  661 + msg += '${item.name},';
  662 + tempSelectTables.remove(item);
  663 + }
535 } 664 }
536 } 665 }
537 } 666 }
538 } 667 }
539 } 668 }
540 - }  
541 - if (showMsg && msg != '' && selectTables.length > 0) {  
542 - if (msg.endsWith(',')) {  
543 - msg = msg.substring(0, msg.length - 1); 669 + if (showMsg && msg != '' && selectTables.length > 0) {
  670 + if (msg.endsWith(',')) {
  671 + msg = msg.substring(0, msg.length - 1);
  672 + }
  673 + selectTables = tempSelectTables;
  674 + Utils.showToast('${msg}已被预订,请选择其他桌位!');
  675 + print(tableMap);
  676 + initData(needKeep: needKeep);
  677 + // notifyListeners();
  678 + return false;
544 } 679 }
545 - selectTables = tempSelectTables;  
546 - Utils.showToast('${msg}已被预订,请选择其他桌位!'); 680 +
547 print(tableMap); 681 print(tableMap);
548 initData(needKeep: needKeep); 682 initData(needKeep: needKeep);
549 - // notifyListeners();  
550 - return false; 683 + return true;
551 } 684 }
552 -  
553 - print(tableMap);  
554 - initData(needKeep: needKeep);  
555 - return true; 685 + return false;
556 } 686 }
557 687
558 //获取已预订订单 688 //获取已预订订单
559 Future<List<Notebook>> newGetReserveList( 689 Future<List<Notebook>> newGetReserveList(
560 BuildContext context, Map<String, String> params, 690 BuildContext context, Map<String, String> params,
561 {showLoading = false}) async { 691 {showLoading = false}) async {
562 - List<Notebook> notebooks = []; 692 + noteBooks = [];
563 BaseResp<List> baseResp = await DioUtil() 693 BaseResp<List> baseResp = await DioUtil()
564 .request<List>(context, Method.get, HttpUrl.get_reserve_list, 694 .request<List>(context, Method.get, HttpUrl.get_reserve_list,
565 data: params, showLoading: false) 695 data: params, showLoading: false)
@@ -581,13 +711,13 @@ class TableManagerModel with ChangeNotifier { @@ -581,13 +711,13 @@ class TableManagerModel with ChangeNotifier {
581 }); 711 });
582 if (baseResp == null) return []; 712 if (baseResp == null) return [];
583 if (baseResp.code == Constant.status_success) { 713 if (baseResp.code == Constant.status_success) {
584 - notebooks = baseResp.data.map<Notebook>((value) { 714 + noteBooks = baseResp.data.map<Notebook>((value) {
585 return Notebook.fromJson(value); 715 return Notebook.fromJson(value);
586 }).toList(); 716 }).toList();
587 } else { 717 } else {
588 Utils.showToast(baseResp.msg ?? ""); 718 Utils.showToast(baseResp.msg ?? "");
589 } 719 }
590 - return notebooks; 720 + return noteBooks;
591 } 721 }
592 722
593 //获取一天开始-结束时间字符串 723 //获取一天开始-结束时间字符串
@@ -662,6 +792,7 @@ class TableManagerModel with ChangeNotifier { @@ -662,6 +792,7 @@ class TableManagerModel with ChangeNotifier {
662 table.reserver = notebook.rnameStr; 792 table.reserver = notebook.rnameStr;
663 table.pnum = notebook.actual_pnum; 793 table.pnum = notebook.actual_pnum;
664 table.nickName = notebook.nick_name; 794 table.nickName = notebook.nick_name;
  795 + table.label = notebook.className;
665 796
666 //剔除已经预订的桌子,剩下空桌子(仅看空座) 797 //剔除已经预订的桌子,剩下空桌子(仅看空座)
667 tempList.remove(table); 798 tempList.remove(table);
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
  4 + static const Color color_F7C797 = Color(0xffF7C797);
  5 + static const Color color_FEF3E6 = Color(0xffFEF3E6);
4 static const Color color_66000000 = Color(0x66000000); 6 static const Color color_66000000 = Color(0x66000000);
5 static const Color color_00A870 = Color(0xff00A870); 7 static const Color color_00A870 = Color(0xff00A870);
6 static const Color color_F6F6F6 = Color(0xffF6F6F6); 8 static const Color color_F6F6F6 = Color(0xffF6F6F6);
@@ -1108,7 +1108,7 @@ class NavigatorUtil { @@ -1108,7 +1108,7 @@ class NavigatorUtil {
1108 {replace = false, 1108 {replace = false,
1109 bool canChoose = true, 1109 bool canChoose = true,
1110 Map object, 1110 Map object,
1111 - String fromPage = 'table_manage', 1111 + String fromPage = 'merge_table',
1112 String tableidNow, 1112 String tableidNow,
1113 String tid = '', 1113 String tid = '',
1114 String tids}) { 1114 String tids}) {
@@ -2419,6 +2419,9 @@ class DialogUtil { @@ -2419,6 +2419,9 @@ class DialogUtil {
2419 VEmptyView(32), 2419 VEmptyView(32),
2420 InkWell( 2420 InkWell(
2421 onTap: () async { 2421 onTap: () async {
  2422 + if (isMerge != '1') {
  2423 + return;
  2424 + }
2422 //跳转到被合并桌位展示页面 2425 //跳转到被合并桌位展示页面
2423 Map object; 2426 Map object;
2424 if (selectTables.length > 0) { 2427 if (selectTables.length > 0) {
@@ -2476,13 +2479,18 @@ class DialogUtil { @@ -2476,13 +2479,18 @@ class DialogUtil {
2476 style: TextStyle( 2479 style: TextStyle(
2477 fontSize: ScreenUtil() 2480 fontSize: ScreenUtil()
2478 .setSp(32), 2481 .setSp(32),
2479 - color: MyColours  
2480 - .color_000000), 2482 + color: isMerge == '1'
  2483 + ? MyColours
  2484 + .color_000000
  2485 + : MyColours
  2486 + .color_BFC4D4),
2481 ), 2487 ),
2482 HEmptyView(40), 2488 HEmptyView(40),
2483 Expanded( 2489 Expanded(
2484 child: Text( 2490 child: Text(
2485 - tableNames ?? "", 2491 + isMerge == '1'
  2492 + ? tableNames ?? ""
  2493 + : '添加',
2486 maxLines: 1, 2494 maxLines: 1,
2487 textAlign: TextAlign.right, 2495 textAlign: TextAlign.right,
2488 overflow: 2496 overflow:
@@ -2490,12 +2498,15 @@ class DialogUtil { @@ -2490,12 +2498,15 @@ class DialogUtil {
2490 style: TextStyle( 2498 style: TextStyle(
2491 fontSize: ScreenUtil() 2499 fontSize: ScreenUtil()
2492 .setSp(32), 2500 .setSp(32),
2493 - color: MyColours  
2494 - .color_66000000), 2501 + color: isMerge == '1'
  2502 + ? MyColours
  2503 + .color_66000000
  2504 + : MyColours
  2505 + .color_BFC4D4),
2495 )), 2506 )),
2496 Image.asset( 2507 Image.asset(
2497 Utils.getImgPath( 2508 Utils.getImgPath(
2498 - 'base_arrow_r'), 2509 + 'merge_arrow'),
2499 width: w(24)), 2510 width: w(24)),
2500 HEmptyView(22), 2511 HEmptyView(22),
2501 ], 2512 ],
@@ -4,8 +4,11 @@ import 'package:one_key/models/notebook.dart'; @@ -4,8 +4,11 @@ import 'package:one_key/models/notebook.dart';
4 import 'package:one_key/res/colors.dart'; 4 import 'package:one_key/res/colors.dart';
5 5
6 import 'package:one_key/models/table.dart' as t; 6 import 'package:one_key/models/table.dart' as t;
  7 +import 'package:one_key/utils/utils.dart';
7 import 'package:one_key/widgets/v_empty_view.dart'; 8 import 'package:one_key/widgets/v_empty_view.dart';
8 9
  10 +import '../utils/screen_util.dart';
  11 +
9 class FTableItem extends StatefulWidget { 12 class FTableItem extends StatefulWidget {
10 final t.Table table; 13 final t.Table table;
11 final bool canSelected; //是否能选中 14 final bool canSelected; //是否能选中
@@ -59,6 +62,9 @@ class FTableItemState extends State<FTableItem> { @@ -59,6 +62,9 @@ class FTableItemState extends State<FTableItem> {
59 return GestureDetector( 62 return GestureDetector(
60 onTap: () { 63 onTap: () {
61 if (widget.canSelected && widget.fromPage == 'change') { 64 if (widget.canSelected && widget.fromPage == 'change') {
  65 + if (table.isLock == '1' && signStr != '已预订') {
  66 + return;
  67 + }
62 //从变更页面进来 canChoose = true 68 //从变更页面进来 canChoose = true
63 if (widget.canSelected && signStr.isEmpty) { 69 if (widget.canSelected && signStr.isEmpty) {
64 setState(() { 70 setState(() {
@@ -88,6 +94,9 @@ class FTableItemState extends State<FTableItem> { @@ -88,6 +94,9 @@ class FTableItemState extends State<FTableItem> {
88 } else if (widget.fromPage == 'new' && 94 } else if (widget.fromPage == 'new' &&
89 widget.canSelected && 95 widget.canSelected &&
90 signStr.isEmpty) { 96 signStr.isEmpty) {
  97 + if (table.isLock == '1' && signStr != '已预订') {
  98 + return;
  99 + }
91 //从安排桌位进来 100 //从安排桌位进来
92 setState(() { 101 setState(() {
93 table.selected = !(table.selected ?? false); 102 table.selected = !(table.selected ?? false);
@@ -95,6 +104,9 @@ class FTableItemState extends State<FTableItem> { @@ -95,6 +104,9 @@ class FTableItemState extends State<FTableItem> {
95 widget.onSelected(table); 104 widget.onSelected(table);
96 } else if (widget.fromPage == 'table_manage' || 105 } else if (widget.fromPage == 'table_manage' ||
97 widget.fromPage == 'room_manage') { 106 widget.fromPage == 'room_manage') {
  107 + if (table.isLock == '1' && signStr != '已预订') {
  108 + return;
  109 + }
98 setState(() { 110 setState(() {
99 table.selected = !(table.selected ?? false); 111 table.selected = !(table.selected ?? false);
100 }); 112 });
@@ -113,296 +125,382 @@ class FTableItemState extends State<FTableItem> { @@ -113,296 +125,382 @@ class FTableItemState extends State<FTableItem> {
113 widget.onSelected(table); 125 widget.onSelected(table);
114 } 126 }
115 }, 127 },
116 - child: Stack(  
117 - children: <Widget>[  
118 - Container(  
119 - // width: ScreenUtil().setWidth(160),  
120 - // height: ScreenUtil().setWidth(widget.height),  
121 - // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),  
122 - decoration: BoxDecoration(  
123 - color: widget.need && signStr == '已预订' && !isSelf  
124 - ? MyColours.color_afbcc4  
125 - : widget.canSelected && table.selected  
126 - ? MyColours.color_199095  
127 - : MyColours.color_ffffff,  
128 - border: Border.all(  
129 - width: ScreenUtil().setWidth(2),  
130 - color: MyColours.color_E0E0E0),  
131 - borderRadius: BorderRadius.all(  
132 - Radius.circular(ScreenUtil().setWidth(20)))),  
133 - child: Stack(  
134 - // alignment: Alignment.center,  
135 - children: <Widget>[ 128 + child: table.isLock == '1' &&
  129 + signStr != '已预订' &&
  130 + widget.fromPage != 'tablePhoto'
  131 + ? Stack(
  132 + children: [
136 Container( 133 Container(
137 - // alignment: Alignment.center,  
138 - // color: Colors.blueAccent,  
139 - // height: ScreenUtil().setWidth(widget.height),  
140 - // padding: EdgeInsets.symmetric(  
141 - // horizontal: ScreenUtil().setWidth(20)),  
142 - // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),  
143 - child: Column(  
144 - // mainAxisSize: MainAxisSize.min,  
145 - crossAxisAlignment: CrossAxisAlignment.center,  
146 - mainAxisAlignment: MainAxisAlignment.center,  
147 - children: <Widget>[  
148 - widget.need && signStr == '已预订' && !isSelf  
149 - ? SizedBox()  
150 - : VEmptyView(10),  
151 - Container(  
152 - // color: Colors.red,  
153 - alignment: Alignment.center,  
154 - child: Text(  
155 - table.name,  
156 - maxLines: 1,  
157 - style: TextStyle(  
158 - color:  
159 - (widget.need && signStr == '已预订' && !isSelf)  
160 - ? MyColours.color_333333  
161 - : (widget.canSelected && table.selected)  
162 - ? MyColours.color_ffffff  
163 - : MyColours.color_333333,  
164 - fontSize: ScreenUtil().setSp(34),  
165 - decoration: TextDecoration.none,  
166 - fontWeight: FontWeight.bold),  
167 - overflow: TextOverflow.ellipsis,  
168 - )  
169 - // Text(  
170 - // table.name,  
171 - // // textAlign: TextAlign.center,  
172 - // maxLines: 2,  
173 - // style: TextStyle(  
174 - // color: table.signStr == '已停用'  
175 - // ? MyColours.color_999999  
176 - // : MyColours.color_353535,  
177 - // fontSize: ScreenUtil().setSp(28),  
178 - // decoration: TextDecoration.none,  
179 - // fontWeight: FontWeight.normal),  
180 - // overflow: TextOverflow.ellipsis,  
181 - // ),  
182 - ),  
183 - ((table.reserver != null && table.reserver != '') ||  
184 - (table.pnum != '' &&  
185 - table.pnum != null &&  
186 - table.pnum != '0'))  
187 - ? VEmptyView(8)  
188 - : SizedBox(),  
189 - signStr == '已预订' && !isSelf  
190 - ? SizedBox()  
191 - : Text(  
192 - table.tableNum, 134 + // width: ScreenUtil().setWidth(160),
  135 + // height: ScreenUtil().setWidth(widget.height),
  136 + // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
  137 + decoration: BoxDecoration(
  138 + color: MyColours.color_DBDBDB,
  139 + border: Border.all(
  140 + width: ScreenUtil().setWidth(2),
  141 + color: MyColours.color_BFC4D4),
  142 + borderRadius: BorderRadius.all(
  143 + Radius.circular(ScreenUtil().setWidth(20)))),
  144 + child: Column(
  145 + crossAxisAlignment: CrossAxisAlignment.center,
  146 + mainAxisAlignment: MainAxisAlignment.center,
  147 + children: <Widget>[
  148 + widget.need && signStr == '已预订' && !isSelf
  149 + ? SizedBox()
  150 + : VEmptyView(10),
  151 + Container(
  152 + // color: Colors.red,
  153 + alignment: Alignment.center,
  154 + child: Text(
  155 + table.name,
  156 + maxLines: 1,
193 style: TextStyle( 157 style: TextStyle(
194 - color: signStr == '已预订' && !isSelf  
195 - ? MyColours.color_353535  
196 - : (widget.canSelected && table.selected)  
197 - ? MyColours.color_ffffff  
198 - : MyColours.color_353535,  
199 - fontSize: ScreenUtil().setSp(22), 158 + color: MyColours.color_333333,
  159 + fontSize: ScreenUtil().setSp(36),
200 decoration: TextDecoration.none, 160 decoration: TextDecoration.none,
201 - fontWeight: FontWeight.normal), 161 + fontWeight: FontWeight.bold),
202 overflow: TextOverflow.ellipsis, 162 overflow: TextOverflow.ellipsis,
203 - ),  
204 - signStr == '已预订' &&  
205 - !isSelf &&  
206 - ((table.reserver != null &&  
207 - !table.reserver.isEmpty) ||  
208 - (table.pnum != '' &&  
209 - table.pnum != null &&  
210 - table.pnum != '0'))  
211 - ? Text(  
212 - (table.reserver == null || table.reserver.isEmpty)  
213 - ? (table.pnum != '' &&  
214 - table.pnum != null &&  
215 - table.pnum != '0')  
216 - ? '(${table.pnum}人)'  
217 - : ''  
218 - : '${table.reserver}' +  
219 - (table.pnum != '' &&  
220 - table.pnum != null &&  
221 - table.pnum != '0'  
222 - ? '(${table.pnum}人)'  
223 - : ''), 163 + )),
  164 + VEmptyView(10),
  165 + Image.asset(
  166 + Utils.getImgPath('lock'),
  167 + width: w(16),
  168 + )
  169 + ],
  170 + )),
  171 + Positioned(
  172 + left: 0,
  173 + top: 0,
  174 + child: table.tidStr == null
  175 + ? Container()
  176 + : Container(
  177 + // width: ScreenUtil().setWidth(60),
  178 + // height: ScreenUtil().setWidth(42),
  179 + padding: EdgeInsets.all(ScreenUtil().setWidth(4)),
  180 + alignment: Alignment.center,
  181 + decoration: BoxDecoration(
  182 + // color: widget.canSelected && table.selected
  183 + // ? MyColours.color_199095
  184 + // : Color.fromRGBO(239, 239, 239, 1),
  185 + borderRadius: BorderRadius.only(
  186 + topLeft: Radius.circular(ScreenUtil().setWidth(20)),
  187 + // topRight:
  188 + // Radius.circular(ScreenUtil().setWidth(8)),
  189 + // bottomRight: Radius.circular(
  190 + // ScreenUtil().setWidth(8))
  191 + )),
  192 + child: Text(table.tidStr,
224 style: TextStyle( 193 style: TextStyle(
225 - color: signStr == '已预订' && !isSelf  
226 - ? MyColours.color_353535  
227 - : (widget.canSelected && table.selected)  
228 - ? MyColours.color_ffffff  
229 - : MyColours.color_353535,  
230 - fontSize: ScreenUtil().setSp(22), 194 + color: MyColours.color_999999,
  195 + fontSize: ScreenUtil().setSp(20),
231 decoration: TextDecoration.none, 196 decoration: TextDecoration.none,
232 - fontWeight: FontWeight.normal),  
233 - overflow: TextOverflow.ellipsis,  
234 - )  
235 - : SizedBox(), 197 + fontWeight: FontWeight.normal)),
  198 + ),
  199 + ),
  200 + ],
  201 + )
  202 + : Stack(
  203 + children: <Widget>[
  204 + Container(
  205 + // width: ScreenUtil().setWidth(160),
  206 + // height: ScreenUtil().setWidth(widget.height),
  207 + // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
  208 + decoration: BoxDecoration(
  209 + color: widget.need && signStr == '已预订' && !isSelf
  210 + ? table.sign == '10'
  211 + ? MyColours.color_FEF3E6
  212 + : MyColours.color_afbcc4
  213 + : widget.canSelected && table.selected
  214 + ? MyColours.color_199095
  215 + : MyColours.color_ffffff,
  216 + border: Border.all(
  217 + width: ScreenUtil().setWidth(2),
  218 + color: MyColours.color_E0E0E0),
  219 + borderRadius: BorderRadius.all(
  220 + Radius.circular(ScreenUtil().setWidth(20)))),
  221 + child: Stack(
  222 + // alignment: Alignment.center,
  223 + children: <Widget>[
  224 + Container(
  225 + // alignment: Alignment.center,
  226 + // color: Colors.blueAccent,
  227 + // height: ScreenUtil().setWidth(widget.height),
  228 + // padding: EdgeInsets.symmetric(
  229 + // horizontal: ScreenUtil().setWidth(20)),
  230 + // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
  231 + child: Column(
  232 + // mainAxisSize: MainAxisSize.min,
  233 + crossAxisAlignment: CrossAxisAlignment.center,
  234 + mainAxisAlignment: MainAxisAlignment.center,
  235 + children: <Widget>[
  236 + widget.need && signStr == '已预订' && !isSelf
  237 + ? SizedBox()
  238 + : VEmptyView(10),
  239 + Container(
  240 + // color: Colors.red,
  241 + alignment: Alignment.center,
  242 + child: Text(
  243 + table.name,
  244 + maxLines: 1,
  245 + style: TextStyle(
  246 + color: (widget.need &&
  247 + signStr == '已预订' &&
  248 + !isSelf)
  249 + ? MyColours.color_333333
  250 + : (widget.canSelected &&
  251 + table.selected)
  252 + ? MyColours.color_ffffff
  253 + : MyColours.color_333333,
  254 + fontSize: ScreenUtil().setSp(34),
  255 + decoration: TextDecoration.none,
  256 + fontWeight: FontWeight.bold),
  257 + overflow: TextOverflow.ellipsis,
  258 + )
  259 + // Text(
  260 + // table.name,
  261 + // // textAlign: TextAlign.center,
  262 + // maxLines: 2,
  263 + // style: TextStyle(
  264 + // color: table.signStr == '已停用'
  265 + // ? MyColours.color_999999
  266 + // : MyColours.color_353535,
  267 + // fontSize: ScreenUtil().setSp(28),
  268 + // decoration: TextDecoration.none,
  269 + // fontWeight: FontWeight.normal),
  270 + // overflow: TextOverflow.ellipsis,
  271 + // ),
  272 + ),
  273 + ((table.reserver != null && table.reserver != '') ||
  274 + (table.pnum != '' &&
  275 + table.pnum != null &&
  276 + table.pnum != '0'))
  277 + ? VEmptyView(8)
  278 + : SizedBox(),
  279 + signStr == '已预订' && !isSelf
  280 + ? SizedBox()
  281 + : Text(
  282 + table.tableNum,
  283 + style: TextStyle(
  284 + color: signStr == '已预订' && !isSelf
  285 + ? MyColours.color_353535
  286 + : (widget.canSelected &&
  287 + table.selected)
  288 + ? MyColours.color_ffffff
  289 + : MyColours.color_353535,
  290 + fontSize: ScreenUtil().setSp(22),
  291 + decoration: TextDecoration.none,
  292 + fontWeight: FontWeight.normal),
  293 + overflow: TextOverflow.ellipsis,
  294 + ),
  295 + signStr == '已预订' &&
  296 + !isSelf &&
  297 + ((table.reserver != null &&
  298 + !table.reserver.isEmpty) ||
  299 + (table.pnum != '' &&
  300 + table.pnum != null &&
  301 + table.pnum != '0'))
  302 + ? Text(
  303 + (table.reserver == null ||
  304 + table.reserver.isEmpty)
  305 + ? (table.pnum != '' &&
  306 + table.pnum != null &&
  307 + table.pnum != '0')
  308 + ? '(${table.pnum}人)'
  309 + : ''
  310 + : '${table.reserver}' +
  311 + (table.pnum != '' &&
  312 + table.pnum != null &&
  313 + table.pnum != '0'
  314 + ? '(${table.pnum}人)'
  315 + : ''),
  316 + style: TextStyle(
  317 + color: signStr == '已预订' && !isSelf
  318 + ? MyColours.color_353535
  319 + : (widget.canSelected &&
  320 + table.selected)
  321 + ? MyColours.color_ffffff
  322 + : MyColours.color_353535,
  323 + fontSize: ScreenUtil().setSp(22),
  324 + decoration: TextDecoration.none,
  325 + fontWeight: FontWeight.normal),
  326 + overflow: TextOverflow.ellipsis,
  327 + )
  328 + : SizedBox(),
  329 +
  330 + widget.need &&
  331 + signStr == '已预订' &&
  332 + !isSelf &&
  333 + table.nickName != null &&
  334 + table.nickName != ''
  335 + ? Padding(
  336 + padding: EdgeInsets.only(
  337 + top: ScreenUtil().setWidth(6),
  338 + bottom: ScreenUtil().setWidth(8),
  339 + ),
  340 + child: Text(
  341 + table.nickName != null &&
  342 + table.nickName != ''
  343 + ? '${table.nickName}订'
  344 + : '',
  345 + style: TextStyle(
  346 + color: MyColours.color_353535,
  347 + fontSize: ScreenUtil().setSp(22),
  348 + decoration: TextDecoration.none,
  349 + fontWeight: FontWeight.normal),
  350 + overflow: TextOverflow.ellipsis,
  351 + ),
  352 + )
  353 + : SizedBox(),
  354 + // VEmptyView(6),
  355 + // Text(
  356 + // table.lowStr,
  357 + // style: TextStyle(
  358 + // color: MyColours.color_777777,
  359 + // fontSize: ScreenUtil().setSp(26),
  360 + // decoration: TextDecoration.none,
  361 + // fontWeight: FontWeight.normal),
  362 + // overflow: TextOverflow.ellipsis,
  363 + // )
  364 + signStr == '已预订' && !isSelf
  365 + ? Container(
  366 + // width: ScreenUtil().setWidth(160),
  367 + height: ScreenUtil().setWidth(34),
  368 + )
  369 + : SizedBox()
  370 + ],
  371 + ),
  372 + ),
236 373
237 - widget.need &&  
238 - signStr == '已预订' &&  
239 - !isSelf &&  
240 - table.nickName != null &&  
241 - table.nickName != ''  
242 - ? Padding(  
243 - padding: EdgeInsets.only(  
244 - top: ScreenUtil().setWidth(6),  
245 - bottom: ScreenUtil().setWidth(8),  
246 - ),  
247 - child: Text(  
248 - table.nickName != null && table.nickName != ''  
249 - ? '${table.nickName}订'  
250 - : '',  
251 - style: TextStyle(  
252 - color: MyColours.color_353535,  
253 - fontSize: ScreenUtil().setSp(22),  
254 - decoration: TextDecoration.none,  
255 - fontWeight: FontWeight.normal),  
256 - overflow: TextOverflow.ellipsis,  
257 - ),  
258 - )  
259 - : SizedBox(),  
260 - // VEmptyView(6),  
261 - // Text(  
262 - // table.lowStr,  
263 - // style: TextStyle(  
264 - // color: MyColours.color_777777,  
265 - // fontSize: ScreenUtil().setSp(26),  
266 - // decoration: TextDecoration.none,  
267 - // fontWeight: FontWeight.normal),  
268 - // overflow: TextOverflow.ellipsis,  
269 - // )  
270 signStr == '已预订' && !isSelf 374 signStr == '已预订' && !isSelf
271 - ? Container(  
272 - // width: ScreenUtil().setWidth(160),  
273 - height: ScreenUtil().setWidth(34),  
274 - )  
275 - : SizedBox() 375 + ? SizedBox()
  376 + : Positioned(
  377 + left: 0,
  378 + top: 0,
  379 + child: table.tidStr == null
  380 + ? Container()
  381 + : Container(
  382 + // width: ScreenUtil().setWidth(60),
  383 + // height: ScreenUtil().setWidth(42),
  384 + padding: EdgeInsets.all(
  385 + ScreenUtil().setWidth(4)),
  386 + alignment: Alignment.center,
  387 + decoration: BoxDecoration(
  388 + color: widget.canSelected &&
  389 + table.selected
  390 + ? MyColours.color_199095
  391 + : Color.fromRGBO(
  392 + 239, 239, 239, 1),
  393 + borderRadius: BorderRadius.only(
  394 + topLeft: Radius.circular(
  395 + ScreenUtil().setWidth(20)),
  396 + // topRight:
  397 + // Radius.circular(ScreenUtil().setWidth(8)),
  398 + // bottomRight: Radius.circular(
  399 + // ScreenUtil().setWidth(8))
  400 + )),
  401 + child: Text(table.tidStr,
  402 + style: TextStyle(
  403 + color: widget.canSelected &&
  404 + table.selected
  405 + ? MyColours.color_ffffff
  406 + : MyColours.color_333333,
  407 + fontSize: ScreenUtil().setSp(20),
  408 + decoration: TextDecoration.none,
  409 + fontWeight: FontWeight.normal)),
  410 + ),
  411 + ),
  412 + // widget.need && signStr == '已预订'
  413 + // ? Positioned(
  414 + // bottom: 0,
  415 + // left: 0,
  416 + // right: 0,
  417 + // child: signStr.isEmpty
  418 + // ? Container()
  419 + // : Container(
  420 + // width: ScreenUtil().setWidth(160),
  421 + // height: ScreenUtil().setWidth(40),
  422 + // alignment: Alignment.center,
  423 + // decoration: BoxDecoration(
  424 + // color: signStr == '已停用'
  425 + // ? MyColours.color_777777
  426 + // : signStr == '已买单'
  427 + // ? MyColours.color_F59A23
  428 + // : MyColours.color_E95750,
  429 + // borderRadius: BorderRadius.only(
  430 + // bottomLeft: Radius.circular(
  431 + // ScreenUtil().setWidth(8)),
  432 + // bottomRight: Radius.circular(
  433 + // ScreenUtil().setWidth(8)))),
  434 + // child: Text(
  435 + // signStr,
  436 + // style: TextStyle(
  437 + // color: MyColours.color_ffffff,
  438 + // fontSize: ScreenUtil().setSp(24),
  439 + // decoration: TextDecoration.none,
  440 + // fontWeight: FontWeight.normal),
  441 + // ),
  442 + // ),
  443 + // )
  444 + // : SizedBox(),
276 ], 445 ],
277 ), 446 ),
278 ), 447 ),
279 -  
280 - signStr == '已预订' && !isSelf 448 + // Positioned(
  449 + // top: 3,
  450 + // right: 5,
  451 + // child: widget.canSelected && (table.selected ?? false)
  452 + // ? Image.asset(
  453 + // "assets/icon_selected.png",
  454 + // width: ScreenUtil().setWidth(40),
  455 + // height: ScreenUtil().setWidth(40),
  456 + // )
  457 + // : Container()),
  458 + widget.need && signStr == '已预订' && !isSelf
281 ? SizedBox() 459 ? SizedBox()
282 : Positioned( 460 : Positioned(
283 - left: 0,  
284 - top: 0,  
285 - child: table.tidStr == null  
286 - ? Container()  
287 - : Container(  
288 - // width: ScreenUtil().setWidth(60),  
289 - // height: ScreenUtil().setWidth(42),  
290 - padding:  
291 - EdgeInsets.all(ScreenUtil().setWidth(4)),  
292 - alignment: Alignment.center,  
293 - decoration: BoxDecoration(  
294 - color: widget.canSelected && table.selected  
295 - ? MyColours.color_199095  
296 - : Color.fromRGBO(239, 239, 239, 1),  
297 - borderRadius: BorderRadius.only(  
298 - topLeft: Radius.circular(  
299 - ScreenUtil().setWidth(20)),  
300 - // topRight:  
301 - // Radius.circular(ScreenUtil().setWidth(8)),  
302 - // bottomRight: Radius.circular(  
303 - // ScreenUtil().setWidth(8))  
304 - )),  
305 - child: Text(table.tidStr,  
306 - style: TextStyle(  
307 - color:  
308 - widget.canSelected && table.selected  
309 - ? MyColours.color_ffffff  
310 - : MyColours.color_333333,  
311 - fontSize: ScreenUtil().setSp(20),  
312 - decoration: TextDecoration.none,  
313 - fontWeight: FontWeight.normal)),  
314 - ),  
315 - ),  
316 - // widget.need && signStr == '已预订'  
317 - // ? Positioned(  
318 - // bottom: 0,  
319 - // left: 0,  
320 - // right: 0,  
321 - // child: signStr.isEmpty  
322 - // ? Container()  
323 - // : Container(  
324 - // width: ScreenUtil().setWidth(160),  
325 - // height: ScreenUtil().setWidth(40),  
326 - // alignment: Alignment.center,  
327 - // decoration: BoxDecoration(  
328 - // color: signStr == '已停用'  
329 - // ? MyColours.color_777777  
330 - // : signStr == '已买单'  
331 - // ? MyColours.color_F59A23  
332 - // : MyColours.color_E95750,  
333 - // borderRadius: BorderRadius.only(  
334 - // bottomLeft: Radius.circular(  
335 - // ScreenUtil().setWidth(8)),  
336 - // bottomRight: Radius.circular(  
337 - // ScreenUtil().setWidth(8)))),  
338 - // child: Text(  
339 - // signStr,  
340 - // style: TextStyle(  
341 - // color: MyColours.color_ffffff,  
342 - // fontSize: ScreenUtil().setSp(24),  
343 - // decoration: TextDecoration.none,  
344 - // fontWeight: FontWeight.normal),  
345 - // ),  
346 - // ),  
347 - // )  
348 - // : SizedBox(), 461 + left: ScreenUtil().setWidth(18),
  462 + bottom: ScreenUtil().setWidth(12),
  463 + child: table.isPhoto != 1
  464 + ? Image.asset(
  465 + widget.canSelected && table.selected
  466 + ? 'assets/f_camera_white.png'
  467 + : "assets/f_camera.png",
  468 + width: ScreenUtil().setWidth(22),
  469 + height: ScreenUtil().setWidth(22),
  470 + )
  471 + : Container()),
  472 + Positioned(
  473 + bottom: 0,
  474 + right: 0,
  475 + left: 0,
  476 + child: signStr == '已预订' && !isSelf
  477 + ? Container(
  478 + // width: ScreenUtil().setWidth(160),
  479 + height: ScreenUtil().setWidth(34),
  480 + alignment: Alignment.centerLeft,
  481 + padding: EdgeInsets.symmetric(
  482 + horizontal: ScreenUtil().setWidth(10)),
  483 + decoration: BoxDecoration(
  484 + color: table.sign == '10'
  485 + ? MyColours.color_F7C797
  486 + : MyColours.color_d7d7d7,
  487 + borderRadius: BorderRadius.only(
  488 + bottomLeft: Radius.circular(
  489 + ScreenUtil().setWidth(20)),
  490 + bottomRight: Radius.circular(
  491 + ScreenUtil().setWidth(20)))),
  492 + child: Text(
  493 + table.sign == '10' ? table.label : '新客',
  494 + style: TextStyle(
  495 + color: MyColours.color_353535,
  496 + fontSize: ScreenUtil().setSp(24),
  497 + decoration: TextDecoration.none,
  498 + fontWeight: FontWeight.normal),
  499 + ),
  500 + )
  501 + : SizedBox())
349 ], 502 ],
350 ), 503 ),
351 - ),  
352 - // Positioned(  
353 - // top: 3,  
354 - // right: 5,  
355 - // child: widget.canSelected && (table.selected ?? false)  
356 - // ? Image.asset(  
357 - // "assets/icon_selected.png",  
358 - // width: ScreenUtil().setWidth(40),  
359 - // height: ScreenUtil().setWidth(40),  
360 - // )  
361 - // : Container()),  
362 - widget.need && signStr == '已预订' && !isSelf  
363 - ? SizedBox()  
364 - : Positioned(  
365 - left: ScreenUtil().setWidth(18),  
366 - bottom: ScreenUtil().setWidth(12),  
367 - child: table.isPhoto != 1  
368 - ? Image.asset(  
369 - widget.canSelected && table.selected  
370 - ? 'assets/f_camera_white.png'  
371 - : "assets/f_camera.png",  
372 - width: ScreenUtil().setWidth(22),  
373 - height: ScreenUtil().setWidth(22),  
374 - )  
375 - : Container()),  
376 - Positioned(  
377 - bottom: 0,  
378 - right: 0,  
379 - left: 0,  
380 - child: signStr == '已预订' && !isSelf  
381 - ? Container(  
382 - // width: ScreenUtil().setWidth(160),  
383 - height: ScreenUtil().setWidth(34),  
384 - alignment: Alignment.centerLeft,  
385 - padding: EdgeInsets.symmetric(  
386 - horizontal: ScreenUtil().setWidth(10)),  
387 - decoration: BoxDecoration(  
388 - color: MyColours.color_d7d7d7,  
389 - borderRadius: BorderRadius.only(  
390 - bottomLeft:  
391 - Radius.circular(ScreenUtil().setWidth(20)),  
392 - bottomRight:  
393 - Radius.circular(ScreenUtil().setWidth(20)))),  
394 - child: Text(  
395 - '新客',  
396 - style: TextStyle(  
397 - color: MyColours.color_353535,  
398 - fontSize: ScreenUtil().setSp(24),  
399 - decoration: TextDecoration.none,  
400 - fontWeight: FontWeight.normal),  
401 - ),  
402 - )  
403 - : SizedBox())  
404 - ],  
405 - ),  
406 ); 504 );
407 } 505 }
408 } 506 }