|
...
|
...
|
@@ -171,7 +171,7 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
"keywords": "",
|
|
|
|
"sort": "1"
|
|
|
|
};
|
|
|
|
BaseResp<dynamic> baseResp = await DioUtil()
|
|
|
|
BaseResp<dynamic> baseResp = await DioUtil()
|
|
|
|
.request<dynamic>(
|
|
|
|
context, Method.get, HttpUrl.get_table_list_or_reserve,
|
|
|
|
data: params, showLoading: showLoading, selfDismiss: selfDismiss)
|
|
...
|
...
|
@@ -675,12 +675,12 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
List timem = night.split('-');
|
|
|
|
timeStrStart = ymd + ' ' + timem[0] + ':00';
|
|
|
|
timeStrEnd = ymd + ' ' + timem[1] + ':00';
|
|
|
|
}else if (currTimeIndex == 4) {
|
|
|
|
} else if (currTimeIndex == 4) {
|
|
|
|
//晚市
|
|
|
|
List timem = meal1.split('-');
|
|
|
|
timeStrStart = ymd + ' ' + timem[0] + ':00';
|
|
|
|
timeStrEnd = ymd + ' ' + timem[1] + ':00';
|
|
|
|
}else if (currTimeIndex == 5) {
|
|
|
|
} else if (currTimeIndex == 5) {
|
|
|
|
//晚市
|
|
|
|
List timem = meal2.split('-');
|
|
|
|
timeStrStart = ymd + ' ' + timem[0] + ':00';
|
|
...
|
...
|
@@ -694,13 +694,21 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
rdate = start + '-' + end;
|
|
|
|
|
|
|
|
String tableSelectInfo = '';
|
|
|
|
|
|
|
|
selectTablesOrReserve = selectTablesOrReserve.toSet().toList();
|
|
|
|
|
|
|
|
List<String> tidsSet = [];
|
|
|
|
|
|
|
|
for (TableListReserve item in selectTablesOrReserve) {
|
|
|
|
// if (item.selected) {
|
|
|
|
tableSelectInfo += ',${item.id}';
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
tidsSet.add(item.id);
|
|
|
|
}
|
|
|
|
tidsSet = tidsSet.toSet().toList();
|
|
|
|
tidsSet.forEach((element) {
|
|
|
|
tableSelectInfo += ',${element}';
|
|
|
|
});
|
|
|
|
|
|
|
|
print(tableSelectInfo);
|
|
|
|
if (tableSelectInfo.startsWith(',')) {
|
|
|
|
tableSelectInfo = tableSelectInfo.substring(1);
|
|
...
|
...
|
@@ -711,7 +719,6 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
context, rdate, tableSelectInfo, currTimeIndex.toString());
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
|
|
|
|
//
|
|
|
|
if (tempTime == null) {
|
|
|
|
// if (currTimeIndex == 1) {
|
|
...
|
...
|
@@ -724,7 +731,7 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
if (currTimeIndex == 1) {
|
|
|
|
tempTime = '08:00';
|
|
|
|
if (morning != '' && morning != null) {
|
|
|
|
List tempDate =morning.split("-");
|
|
|
|
List tempDate = morning.split("-");
|
|
|
|
tempTime = tempDate[0];
|
|
|
|
}
|
|
|
|
} else if (currTimeIndex == 2) {
|
|
...
|
...
|
@@ -745,7 +752,7 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
List tempDate = meal1.split("-");
|
|
|
|
tempTime = tempDate[0];
|
|
|
|
}
|
|
|
|
}else if (currTimeIndex == 5) {
|
|
|
|
} else if (currTimeIndex == 5) {
|
|
|
|
tempTime = '21:00';
|
|
|
|
if (meal2 != '' && meal2 != null) {
|
|
|
|
List tempDate = meal2.split("-");
|
|
...
|
...
|
@@ -760,7 +767,7 @@ class TableManagerModelOrReserve with ChangeNotifier { |
|
|
|
LogUtil.v(timeStr);
|
|
|
|
// String tempDdate = ymyStr + ' ' + ddateStr + ':00';
|
|
|
|
int ddate = DateUtil.getDateMsByTimeStr(timeStr);
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sid": userModel.user.sellerid, //商家ID
|
|
|
|
"tid": tableSelectInfo, //桌子ID: 格式 2,3,4
|
...
|
...
|
|