|
...
|
...
|
@@ -125,20 +125,38 @@ class NotebookDetailChangeModelOnly with ChangeNotifier { |
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
List<t.Table> getSpTableList() {
|
|
|
|
List<t.Table> tables = [];
|
|
|
|
String tableList = App.sp.getString('table_list');
|
|
|
|
if (tableList != null) {
|
|
|
|
List list = json.decode(tableList);
|
|
|
|
if (list.length > 0) {
|
|
|
|
list.forEach((element) {
|
|
|
|
tables.addAll(TableOuter.fromJson2(element).list);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
List<TableListReserve> getSpTableListOr() {
|
|
|
|
String tableList = App.sp.getString('table_list_or_reserve');
|
|
|
|
if (tableList == null) {
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
return tables;
|
|
|
|
|
|
|
|
List<TableListReseveSunModel> temp = [];
|
|
|
|
|
|
|
|
List list = json.decode(tableList);
|
|
|
|
if (list.length > 0) {
|
|
|
|
list.forEach((element) {
|
|
|
|
temp.add(TableListReseveSunModel.fromJson2(element));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
print(temp[0].tableList);
|
|
|
|
return temp[0].tableList;
|
|
|
|
}
|
|
|
|
|
|
|
|
// List<t.Table> getSpTableList() {
|
|
|
|
// List<t.Table> tables = [];
|
|
|
|
// String tableList = App.sp.getString('table_list');
|
|
|
|
// if (tableList != null) {
|
|
|
|
// List list = json.decode(tableList);
|
|
|
|
// if (list.length > 0) {
|
|
|
|
// list.forEach((element) {
|
|
|
|
// tables.addAll(TableOuter.fromJson2(element).list);
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return tables;
|
|
|
|
// }
|
|
|
|
|
|
|
|
/// 根据时间和分钟组装 格式:11:00
|
|
|
|
_dealTime(int begin, int mm) {
|
|
|
|
String sb = '';
|
|
...
|
...
|
@@ -298,8 +316,8 @@ class NotebookDetailChangeModelOnly with ChangeNotifier { |
|
|
|
List<String> tableIds = []; //所有桌位的id
|
|
|
|
List<String> tableIdsOld = []; //带过来所有桌位的id
|
|
|
|
|
|
|
|
List<t.Table> tableS = getSpTableList(); //缓存的所有桌子
|
|
|
|
for (t.Table elementT in tableS) {
|
|
|
|
List<TableListReserve> tableS = getSpTableListOr(); //缓存的所有桌子
|
|
|
|
for (TableListReserve elementT in tableS) {
|
|
|
|
tableIds.add(elementT.id);
|
|
|
|
}
|
|
|
|
for (var table in oldTableList) {
|
...
|
...
|
|