|
...
|
...
|
@@ -20,6 +20,7 @@ import 'package:one_key/models/sms_info.dart'; |
|
|
|
import 'package:one_key/models/user_history_entity.dart';
|
|
|
|
|
|
|
|
import 'package:one_key/pages/table/area_item_table.dart';
|
|
|
|
import 'package:one_key/pages/table/table_item_or_reserve.dart';
|
|
|
|
import 'package:one_key/provider/base_info_provider.dart';
|
|
|
|
import 'package:one_key/provider/coupon_provider.dart';
|
|
|
|
import 'package:one_key/provider/my_model.dart';
|
|
...
|
...
|
@@ -55,6 +56,7 @@ import 'package:sendsms/sendsms.dart'; |
|
|
|
import '../../app.dart';
|
|
|
|
import '../../models/get_seller_info_model.dart';
|
|
|
|
import '../../models/remark.dart';
|
|
|
|
import '../../models/table_or_reserve_model.dart';
|
|
|
|
import '../../models/user.dart';
|
|
|
|
import '../../provider/SmsModel.dart';
|
|
|
|
import '../../provider/marketing_center_provider.dart';
|
|
...
|
...
|
@@ -69,6 +71,8 @@ import '../../widgets/special_text/my_extended_text_selection_controls.dart'; |
|
|
|
import '../detail/notebook_detail_change_page_f.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart' as Picker;
|
|
|
|
|
|
|
|
import 'area_item_table_or_reserve.dart';
|
|
|
|
|
|
|
|
const scrollDuration = Duration(microseconds: 500);
|
|
|
|
|
|
|
|
// typedef CustomCallBack = void Function(Object object);
|
|
...
|
...
|
@@ -93,7 +97,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
int _selectIndex = 0;
|
|
|
|
ScrollController _areaController = ScrollController();
|
|
|
|
List<String> personNumList = [];
|
|
|
|
bool isSelected = true; //全部按钮
|
|
|
|
// bool isSelected = true; //全部按钮
|
|
|
|
String nameStr;
|
|
|
|
FocusNode _nameNode = FocusNode();
|
|
|
|
FocusNode _phoneNode = FocusNode();
|
|
...
|
...
|
@@ -157,22 +161,30 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
// personNumList.add('30以上');
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
tableManagerModel.pageStateOrReserve = PageState.Loading;
|
|
|
|
// tableManagerModel.initTimeTable(context);
|
|
|
|
if (App.sp.containsKey('table_list')) {
|
|
|
|
// //退出清空桌位数据
|
|
|
|
App.sp.remove('table_list');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// getSpTableList();
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
tableManagerModel.dateTime = DateTime.now();
|
|
|
|
tableManagerModel.dateText =
|
|
|
|
tableManagerModel.returnDate(tableManagerModel.dateTime);
|
|
|
|
tableManagerModel.dateTimeSelect = tableManagerModel.dateTime;
|
|
|
|
tableManagerModel.notifyListeners;
|
|
|
|
_getAuthUserLists();
|
|
|
|
getUserAccountTypeById(showLoading: false);
|
|
|
|
// couponProvider.sendSMS = false;
|
|
|
|
String tableSp = App.sp.getString('table_list');
|
|
|
|
if (tableSp != null) {
|
|
|
|
//有缓存数据
|
|
|
|
tableManagerModel.showLoading = true;
|
|
|
|
Loading.showLoading(context);
|
|
|
|
} else {
|
|
|
|
tableManagerModel.showLoading = false;
|
|
|
|
}
|
|
|
|
// String tableSp = App.sp.getString('table_list_or_reserve');
|
|
|
|
// if (tableSp != null) {
|
|
|
|
// //有缓存数据
|
|
|
|
// // tableManagerModel.showLoading = true;
|
|
|
|
// // Loading.showLoading(context);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
_myExtendedMaterialTextSelectionControls =
|
|
|
|
MyTextSelectionControls(callback: (value) {
|
|
...
|
...
|
@@ -184,15 +196,16 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
});
|
|
|
|
_getSellerById();
|
|
|
|
|
|
|
|
_couponNetworkData(selfDismiss: true);
|
|
|
|
// _couponNetworkData(selfDismiss: true);
|
|
|
|
|
|
|
|
getDzSellerConf();
|
|
|
|
_getRemark();
|
|
|
|
// getDzSellerConf();
|
|
|
|
// _getRemark();
|
|
|
|
|
|
|
|
EventBus().on("refresh_tablemanager", (arg) {
|
|
|
|
//订座-完成预订 刷新管理桌位
|
|
|
|
tableManagerModel.getReserveList(context,
|
|
|
|
needLoading: false, needKeep: true);
|
|
|
|
tableManagerModel.getTableListOrReserve(
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
print(tableManagerModel);
|
|
|
|
});
|
|
|
|
EventBus().on("refresh_tablePhoto", (arg) {
|
|
...
|
...
|
@@ -201,7 +214,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
});
|
|
|
|
EventBus().on("refresh_table_m_coupon", (arg) {
|
|
|
|
///刷新优惠券
|
|
|
|
_couponNetworkData();
|
|
|
|
// _couponNetworkData();
|
|
|
|
});
|
|
|
|
if (widget.guest != null) {
|
|
|
|
for (var item in _baseIndoProvider.sexList) {
|
|
...
|
...
|
@@ -220,6 +233,31 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
List<TableListReseveSunModel> getSpTableList() {
|
|
|
|
String tableList = App.sp.getString('table_list_or_reserve');
|
|
|
|
if (tableList == null) {
|
|
|
|
tableManagerModel.pageStateOrReserve = PageState.Loading;
|
|
|
|
setState(() {});
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
|
|
|
|
List<TableListReseveSunModel> temp = [];
|
|
|
|
List<TableListReseveSunModel> tempShow = [];
|
|
|
|
List list = json.decode(tableList);
|
|
|
|
if (list.length > 0) {
|
|
|
|
list.forEach((element) {
|
|
|
|
temp.add(TableListReseveSunModel.fromJson2(element));
|
|
|
|
print(temp);
|
|
|
|
tempShow.add(TableListReseveSunModel.fromJson2(element));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
tableManagerModel.tablesOrReserveData = temp;
|
|
|
|
tableManagerModel.tablesOrReserveDataShow = tempShow;
|
|
|
|
tableManagerModel.pageStateOrReserve = PageState.Success;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
// TODO: implement dispose
|
|
...
|
...
|
@@ -234,7 +272,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
StoreBaseIndoProvider storeBaseIndoProvider =
|
|
|
|
Provider.of<StoreBaseIndoProvider>(context, listen: false);
|
|
|
|
GetSellerInfoSunModel sellerInfoSunModel =
|
|
|
|
await storeBaseIndoProvider.getSellerById(context);
|
|
|
|
await storeBaseIndoProvider.getSellerById(context, showLoading: false);
|
|
|
|
if (sellerInfoSunModel != null) {
|
|
|
|
if (App.sp.containsKey('user')) {
|
|
|
|
String s = App.sp.getString('user');
|
|
...
|
...
|
@@ -251,16 +289,16 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
await UserModel().saveUserInfo(_user);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tableManagerModel.initTime(context);
|
|
|
|
tableManagerModel.initTimeTable(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取备注信息
|
|
|
|
_getRemark() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
};
|
|
|
|
await remarkManagerModel.getRemarks(context, params);
|
|
|
|
}
|
|
|
|
// ///获取备注信息
|
|
|
|
// _getRemark() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "uid": Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
// };
|
|
|
|
// await remarkManagerModel.getRemarks(context, params);
|
|
|
|
// }
|
|
|
|
|
|
|
|
_saveUser(String rolename) async {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 1);
|
|
...
|
...
|
@@ -290,95 +328,26 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取员工信息列表
|
|
|
|
_getAuthUserLists({bool showLoading = true}) async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
};
|
|
|
|
|
|
|
|
await personnelProvider.getAuthUserLists(context, params,
|
|
|
|
//获取登陆人类型 只订不服
|
|
|
|
getUserAccountTypeById({bool showLoading = false}) async {
|
|
|
|
String accountType = await tableManagerModel.getUserAccountTypeById(context,
|
|
|
|
showLoading: showLoading);
|
|
|
|
if (personnelProvider.dataMap != null) {
|
|
|
|
User user = Provider.of<UserModel>(context, listen: false).user;
|
|
|
|
|
|
|
|
if (user.role_name == '管理员') {
|
|
|
|
personnelProvider.dataMap.admin.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('管理员');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('管理员');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '店长') {
|
|
|
|
personnelProvider.dataMap.shopowner.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('店长');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('店长');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '客户经理') {
|
|
|
|
personnelProvider.dataMap.manager.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('客户经理');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('客户经理');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '收银员') {
|
|
|
|
personnelProvider.dataMap.cashier.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('收银员');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('收银员');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '服务员') {
|
|
|
|
personnelProvider.dataMap.waiter.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('服务员');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('服务员');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '前台') {
|
|
|
|
personnelProvider.dataMap.reception.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('前台');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('前台');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else if (user.role_name == '迎宾') {
|
|
|
|
personnelProvider.dataMap.welcome.listdata.forEach((element) {
|
|
|
|
if (user.openid == element.id) {
|
|
|
|
if (element.accountType == '3') {
|
|
|
|
_saveUser('迎宾');
|
|
|
|
} else {
|
|
|
|
_saveUserAddition('迎宾');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if (accountType == '3') {
|
|
|
|
_saveUser(Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.role_name_addition);
|
|
|
|
} else {
|
|
|
|
_saveUserAddition(Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.role_name_addition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
getDzSellerConf() async {
|
|
|
|
MarketingCenterProvider marketingCenterProvider =
|
|
|
|
Provider.of<MarketingCenterProvider>(context, listen: false);
|
|
|
|
bool success = await marketingCenterProvider.getDzSellerConf(context);
|
|
|
|
bool success = await marketingCenterProvider.getDzSellerConf(context,
|
|
|
|
showLoading: false);
|
|
|
|
if (success && marketingCenterProvider.dzSellerConfModel != null) {
|
|
|
|
noticeSms = marketingCenterProvider.dzSellerConfModel.isNotice == '1'
|
|
|
|
? true
|
|
...
|
...
|
@@ -507,13 +476,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
|
|
|
|
///刷新图片显示
|
|
|
|
_refreshTablePhoto() async {
|
|
|
|
List temp =
|
|
|
|
await tableManagerModel.getTableList(context, needLoading: false);
|
|
|
|
if (temp.length > 0) {
|
|
|
|
tableManagerModel.getReserveList(context,
|
|
|
|
needLoading: false, needKeep: true);
|
|
|
|
tableManagerModel.notifyListeners();
|
|
|
|
}
|
|
|
|
await tableManagerModel.getTableListOrReserve(
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
tableManagerModel.notifyListeners();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Widget list(List data) => ScrollablePositionedList.builder(
|
|
...
|
...
|
@@ -553,12 +519,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
vertical: ScreenUtil().setWidth(20),
|
|
|
|
horizontal: ScreenUtil().setWidth(10)),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: tableManagerModel.tableOuterList.length == 0
|
|
|
|
? 0
|
|
|
|
: tableManagerModel.currentArea == '全部'
|
|
|
|
? tableManagerModel.tablesShow.length
|
|
|
|
: tableManagerModel
|
|
|
|
.areaTableMapShow[tableManagerModel.currentArea].length,
|
|
|
|
itemCount: tableManagerModel.tablesOrReserveDataShow[i].tableList.length,
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 4,
|
|
|
|
childAspectRatio: 1,
|
|
...
|
...
|
@@ -567,104 +528,23 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
),
|
|
|
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
List<t.Table> data = tableManagerModel.tableOuterList.length == 0
|
|
|
|
? []
|
|
|
|
: tableManagerModel.currentArea == '全部'
|
|
|
|
? tableManagerModel.tablesShow
|
|
|
|
: tableManagerModel
|
|
|
|
.areaTableMapShow[tableManagerModel.areas[i].name];
|
|
|
|
// if (index == data.length || data.length == 0) {
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () async {
|
|
|
|
// List<String> areas = [];
|
|
|
|
// for (int i = 0; i < tableManagerModel.areas.length; i++) {
|
|
|
|
// areas.add(tableManagerModel.areas[i].name);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //添加桌位弹框
|
|
|
|
// await DialogUtil.openCreateTableDialog(
|
|
|
|
// context, areas, i, personNumList,
|
|
|
|
// onTap: (Map<String, String> value) async {
|
|
|
|
// print(value);
|
|
|
|
// // 'areaname':
|
|
|
|
// // areas[currentAreaIndex],
|
|
|
|
// // 'name': controller.text,
|
|
|
|
// // 'pnumMin': pnumMin,
|
|
|
|
// // 'pnumMax': pnumMax
|
|
|
|
// //添加桌位 接口参数带整合???
|
|
|
|
// // 以下是旧的不去,明天添加桌位接口
|
|
|
|
// String rid;
|
|
|
|
// for (Area item in tableManagerModel.areas) {
|
|
|
|
// if (item.name == value['areaname']) {
|
|
|
|
// rid = item.rid;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'rid': rid,
|
|
|
|
// 'name': value['name'],
|
|
|
|
// };
|
|
|
|
// if (value['pnumMin'] != '') {
|
|
|
|
// params['pnum'] = value['pnumMin'];
|
|
|
|
// }
|
|
|
|
// if (value['pnumMax'] != '') {
|
|
|
|
// params['most_pnum'] = value['pnumMax'];
|
|
|
|
// }
|
|
|
|
// bool success =
|
|
|
|
// await tableManagerModel.addTable(context, params);
|
|
|
|
// print(success);
|
|
|
|
// if (success) {
|
|
|
|
// Utils.showToast('添加成功!');
|
|
|
|
// // TableOuter tableOuter = TableOuter();
|
|
|
|
// // tableOuter.name = value;
|
|
|
|
// // tableOuter.list = [];
|
|
|
|
// // tableManagerModel.tableOuterList.add(tableOuter);
|
|
|
|
// // tableManagerModel.initData();
|
|
|
|
// // Timer(
|
|
|
|
// // Duration(milliseconds: 500),
|
|
|
|
// // () => _areaController.jumpTo(
|
|
|
|
// // _areaController.position.maxScrollExtent));
|
|
|
|
|
|
|
|
// // await tableManagerModel
|
|
|
|
// // .getTableList(context);
|
|
|
|
// // await tableManagerModel
|
|
|
|
// // .initData();
|
|
|
|
// await tableManagerModel.refreshTable(context);
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// child: DottedBorder(
|
|
|
|
// dashPattern: [5, 5, 5, 5],
|
|
|
|
// borderType: BorderType.RRect,
|
|
|
|
// radius: Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
// // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
// color: MyColours.color_E0E0E0,
|
|
|
|
// strokeWidth: ScreenUtil().setWidth(2),
|
|
|
|
// child: ClipRRect(
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(20))),
|
|
|
|
// child: Container(
|
|
|
|
// height: ScreenUtil().screenWidth -
|
|
|
|
// ScreenUtil().setWidth(12 * 3 - 10 * 2),
|
|
|
|
// width: ScreenUtil().screenWidth -
|
|
|
|
// ScreenUtil().setWidth(12 * 3 - 10 * 2),
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Image.asset(Utils.getImgPath('add_store'),
|
|
|
|
// width: ScreenUtil().setWidth(32)),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )));
|
|
|
|
// } else {
|
|
|
|
return Selector<TableManagerModel, t.Table>(
|
|
|
|
// List<t.Table> data = tableManagerModel.tableOuterList.length == 0
|
|
|
|
// ? []
|
|
|
|
// : tableManagerModel.currentArea == '全部'
|
|
|
|
// ? tableManagerModel.tablesShow
|
|
|
|
// : tableManagerModel.areaTableMapShow[
|
|
|
|
// tableManagerModel.tablesOrReserveDataShow[i].name];
|
|
|
|
|
|
|
|
TableListReserve data =
|
|
|
|
tableManagerModel.tablesOrReserveDataShow[i].tableList[index];
|
|
|
|
|
|
|
|
return Selector<TableManagerModel, TableListReserve>(
|
|
|
|
shouldRebuild: (pre, next) => true,
|
|
|
|
selector: (context, model) => data[index],
|
|
|
|
selector: (context, model) => data,
|
|
|
|
builder: (context, table, _) {
|
|
|
|
return FTableItem(table,
|
|
|
|
canSelected: true, selectTables: tableManagerModel.selectTables,
|
|
|
|
return TableItemOrReserve(table,
|
|
|
|
canSelected: true,
|
|
|
|
selectTables: tableManagerModel.selectTablesOrReserve,
|
|
|
|
onSelected: (table) {
|
|
|
|
if (table.signStr == '已预订') {
|
|
|
|
if (table.sign == '10') {
|
|
...
|
...
|
@@ -674,19 +554,17 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
} else {
|
|
|
|
//进入订座详情页面
|
|
|
|
NavigatorUtil.goNotebookDetailPage(
|
|
|
|
context,
|
|
|
|
tableManagerModel.tableMap[table.id].id,
|
|
|
|
tableManagerModel.tableMap[table.id].uid);
|
|
|
|
context, table.notebookId, data.reserveList.uid);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
setState(() {
|
|
|
|
if ((table as t.Table).selected) {
|
|
|
|
tableManagerModel.selectTables.add(table);
|
|
|
|
if ((table as TableListReserve).selected) {
|
|
|
|
tableManagerModel.selectTablesOrReserve.add(table);
|
|
|
|
} else {
|
|
|
|
tableManagerModel.selectTables
|
|
|
|
tableManagerModel.selectTablesOrReserve
|
|
|
|
.removeWhere((t) => t.id == table.id);
|
|
|
|
}
|
|
|
|
if (tableManagerModel.selectTables.length == 0) {
|
|
|
|
if (tableManagerModel.selectTablesOrReserve.length == 0) {
|
|
|
|
// wechatNotification = true;
|
|
|
|
_clearData();
|
|
|
|
}
|
|
...
|
...
|
@@ -728,7 +606,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
// ((int.parse((table as t.Table).enable) + 1) % 2)
|
|
|
|
// .toString();
|
|
|
|
// if ((table as t.Table).enable == "1") {
|
|
|
|
// for (Area area in tableManagerModel.areas) {
|
|
|
|
// for (Area area in tableManagerModel.tablesOrReserveDataShow) {
|
|
|
|
// if (area.name ==
|
|
|
|
// tableManagerModel.currentArea) {
|
|
|
|
// if (table.sign != '5' && table.sign != '1') {
|
|
...
|
...
|
@@ -739,7 +617,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// for (Area area in tableManagerModel.areas) {
|
|
|
|
// for (Area area in tableManagerModel.tablesOrReserveDataShow) {
|
|
|
|
// if (area.name ==
|
|
|
|
// tableManagerModel.currentArea) {
|
|
|
|
// if (table.sign != '5' && table.sign != '1') {
|
|
...
|
...
|
@@ -762,10 +640,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
fromPage: 'table_manage',
|
|
|
|
tableMap: tableManagerModel.tableMap,
|
|
|
|
rid: "");
|
|
|
|
}, tableMap: tableManagerModel.tableMap, rid: "");
|
|
|
|
},
|
|
|
|
);
|
|
|
|
// }
|
|
...
|
...
|
@@ -2167,7 +2042,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
_onlyReserve() async {
|
|
|
|
bool isShow = true; //是否需要弹窗 “预订失败!”
|
|
|
|
SunReserveInfoModel _model =
|
|
|
|
await tableManagerModel.setReserveInfo(context, (v) {
|
|
|
|
await tableManagerModel.setReserveInfoOrReseve(context, (v) {
|
|
|
|
if (v) {
|
|
|
|
isShow = true;
|
|
|
|
} else {
|
|
...
|
...
|
@@ -2367,11 +2242,12 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
height: ScreenUtil().setWidth(60),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
|
|
|
|
itemCount: tableManagerModel.selectTables.length,
|
|
|
|
itemCount: tableManagerModel.selectTablesOrReserve.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
t.Table table = tableManagerModel.selectTables[index];
|
|
|
|
TableListReserve table =
|
|
|
|
tableManagerModel.selectTablesOrReserve[index];
|
|
|
|
return Container(
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(right: ScreenUtil().setWidth(20)),
|
|
...
|
...
|
@@ -2399,9 +2275,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//删除已经选择的桌位
|
|
|
|
tableManagerModel.selectTables
|
|
|
|
tableManagerModel.selectTablesOrReserve
|
|
|
|
.removeWhere((t) => t.id == table.id);
|
|
|
|
if (tableManagerModel.selectTables.length ==
|
|
|
|
if (tableManagerModel
|
|
|
|
.selectTablesOrReserve.length ==
|
|
|
|
0) {
|
|
|
|
// wechatNotification = true;
|
|
|
|
_clearData();
|
|
...
|
...
|
@@ -2522,7 +2399,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
_wechatReserve(bool isWechat) async {
|
|
|
|
bool isShow = true; //是否需要弹窗 “预订失败!”
|
|
|
|
SunReserveInfoModel _model =
|
|
|
|
await tableManagerModel.setReserveInfo(context, (v) {
|
|
|
|
await tableManagerModel.setReserveInfoOrReseve(context, (v) {
|
|
|
|
if (v) {
|
|
|
|
isShow = true;
|
|
|
|
} else {
|
|
...
|
...
|
@@ -2613,7 +2490,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
ddateIndex = null;
|
|
|
|
youhui = '选择优惠';
|
|
|
|
couponSelectIndex = 0;
|
|
|
|
tableManagerModel.selectTables = [];
|
|
|
|
tableManagerModel.selectTablesOrReserve = [];
|
|
|
|
wechatNotification = true;
|
|
|
|
showPhoneHistory = false; //显示客户历史记录
|
|
|
|
_baseIndoProvider.userHistorys.clear();
|
|
...
|
...
|
@@ -2630,18 +2507,30 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
if (showErro != '短信余额不足,请充值短信条数') {
|
|
|
|
showErro = '';
|
|
|
|
}
|
|
|
|
for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
item.selected = false;
|
|
|
|
}
|
|
|
|
tableManagerModel.areaTableMapShow.forEach((key, value) {
|
|
|
|
value.forEach((element) {
|
|
|
|
tableManagerModel.tablesOrReserveData.forEach((element) {
|
|
|
|
element.tableList.forEach((element) {
|
|
|
|
element.selected = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
tableManagerModel.tablesOrReserveDataShow.forEach((element) {
|
|
|
|
element.tableList.forEach((element) {
|
|
|
|
element.selected = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
// item.selected = false;
|
|
|
|
// }
|
|
|
|
// tableManagerModel.areaTableMapShow.forEach((key, value) {
|
|
|
|
// value.forEach((element) {
|
|
|
|
// element.selected = false;
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
tableManagerModel.notifyListeners();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
///选中的桌子widget
|
|
|
|
Widget _selectTableWidgetSms() {
|
|
|
|
return InkWell(
|
|
...
|
...
|
@@ -2749,11 +2638,11 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
child: ListView.builder(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: ScreenUtil().setWidth(48)),
|
|
|
|
itemCount: tableManagerModel.selectTables.length,
|
|
|
|
itemCount: tableManagerModel.selectTablesOrReserve.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
t.Table table = tableManagerModel.selectTables[index];
|
|
|
|
TableListReserve table = tableManagerModel.selectTablesOrReserve[index];
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(20)),
|
|
...
|
...
|
@@ -2781,10 +2670,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//删除已经选择的桌位
|
|
|
|
tableManagerModel.selectTables
|
|
|
|
tableManagerModel.selectTablesOrReserve
|
|
|
|
.removeWhere((t) => t.id == table.id);
|
|
|
|
if (tableManagerModel
|
|
|
|
.selectTables.length ==
|
|
|
|
.selectTablesOrReserve.length ==
|
|
|
|
0) {
|
|
|
|
// wechatNotification = true;
|
|
|
|
_clearData();
|
|
...
|
...
|
@@ -3216,6 +3105,8 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
)));
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
_smsReserve() async {
|
|
|
|
if (!noticeSms) {
|
|
|
|
if (myModel.smsInfo == '0') {
|
|
...
|
...
|
@@ -3310,19 +3201,19 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
cusdem = customController.text;
|
|
|
|
}
|
|
|
|
bool isShow = true; //是否需要弹窗 “预订失败!”
|
|
|
|
SunReserveInfoModel _model = await tableManagerModel.setReserveInfo(context,
|
|
|
|
(v) {
|
|
|
|
SunReserveInfoModel _model = await tableManagerModel
|
|
|
|
.setReserveInfoOrReseve(context, (v) {
|
|
|
|
if (v) {
|
|
|
|
isShow = true;
|
|
|
|
} else {
|
|
|
|
isShow = false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
needKeep: true,
|
|
|
|
pnum: pnum,
|
|
|
|
cusdem: cusdem,
|
|
|
|
tempTime: ddateHm == '选填' ? null : ddateHm,
|
|
|
|
guest: guest);
|
|
|
|
needKeep: true,
|
|
|
|
pnum: pnum,
|
|
|
|
cusdem: cusdem,
|
|
|
|
tempTime: ddateHm == '选填' ? null : ddateHm,
|
|
|
|
guest: guest);
|
|
|
|
if (_model != null &&
|
|
|
|
ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
ObjectUtil.isNotEmpty(_model.row.id)) {
|
|
...
|
...
|
@@ -3483,8 +3374,8 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
//构建常用备注
|
|
|
|
List<Widget> _buildAlwayItems() {
|
|
|
|
List<Widget> tables = [];
|
|
|
|
if (tableManagerModel.selectTables.length < 6) {
|
|
|
|
for (t.Table table in tableManagerModel.selectTables) {
|
|
|
|
if (tableManagerModel.selectTablesOrReserve.length < 6) {
|
|
|
|
for (TableListReserve table in tableManagerModel.selectTablesOrReserve) {
|
|
|
|
tables.add(Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(10),
|
|
...
|
...
|
@@ -3536,7 +3427,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Text(
|
|
|
|
'等${tableManagerModel.selectTables.length}个桌位',
|
|
|
|
'等${tableManagerModel.selectTablesOrReserve.length}个桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: MyColours.color_199095,
|
|
...
|
...
|
@@ -3553,7 +3444,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Text(
|
|
|
|
tableManagerModel.selectTables[i].name,
|
|
|
|
tableManagerModel.selectTablesOrReserve[i].name,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
color: MyColours.color_ffffff,
|
|
...
|
...
|
@@ -3574,10 +3465,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
tableManagerModel.returnDayDateStr(tableManagerModel.dateTimeSelect);
|
|
|
|
tableManagerModel.selectWeekAndLunarCalendar = tableManagerModel
|
|
|
|
.returnWeekAndLunarCalendar(tableManagerModel.dateTimeSelect, context);
|
|
|
|
bool success = await tableManagerModel.getReserveList(context,
|
|
|
|
needLoading: false,
|
|
|
|
showMsg: true,
|
|
|
|
showloading: true,
|
|
|
|
bool success = await tableManagerModel.getTableListOrReserve(context,
|
|
|
|
selfDismiss: true);
|
|
|
|
|
|
|
|
Loading.hideLoading(context);
|
|
...
|
...
|
@@ -3636,10 +3524,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
if (day != null) {
|
|
|
|
tableManagerModel.createDateText1(context, day);
|
|
|
|
bool success = await tableManagerModel
|
|
|
|
.getReserveList(context,
|
|
|
|
needLoading: false,
|
|
|
|
showMsg: true,
|
|
|
|
showloading: true,
|
|
|
|
.getTableListOrReserve(context,
|
|
|
|
selfDismiss: true);
|
|
|
|
|
|
|
|
Loading.hideLoading(context);
|
|
...
|
...
|
@@ -3806,16 +3691,12 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
|
|
|
|
model.pageState != PageState.Success
|
|
|
|
model.pageStateOrReserve != PageState.Success
|
|
|
|
? Expanded(
|
|
|
|
child: ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
pageState: model.pageStateOrReserve,
|
|
|
|
callback: () {
|
|
|
|
if (tableManagerModel.tableOuterList.isEmpty) {
|
|
|
|
tableManagerModel.getTableList(context);
|
|
|
|
} else {
|
|
|
|
tableManagerModel.getReserveList(context);
|
|
|
|
}
|
|
|
|
tableManagerModel.getTableListOrReserve(context);
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有桌位哦",
|
|
|
|
emptyImg: "empty_search",
|
|
...
|
...
|
@@ -3835,167 +3716,38 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: tableManagerModel.areas.length ==
|
|
|
|
0
|
|
|
|
? 0
|
|
|
|
: tableManagerModel.areas.length + 1,
|
|
|
|
itemCount: tableManagerModel
|
|
|
|
.tablesOrReserveDataShow.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext contxt, int index) {
|
|
|
|
// if (index ==
|
|
|
|
// tableManagerModel.areas.length +
|
|
|
|
// 1 ||
|
|
|
|
// tableManagerModel.areas.length == 0) {
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () async {
|
|
|
|
// //添加区域弹框
|
|
|
|
// await DialogUtil
|
|
|
|
// .openCreateAreaDialog(context,
|
|
|
|
// onTap: (value) async {
|
|
|
|
// print(value);
|
|
|
|
// //添加区域
|
|
|
|
// bool success =
|
|
|
|
// await tableManagerModel
|
|
|
|
// .addTableAreas(
|
|
|
|
// context, value);
|
|
|
|
// print(success);
|
|
|
|
// if (success) {
|
|
|
|
// Utils.showToast('添加成功!');
|
|
|
|
// tableManagerModel.currentArea =
|
|
|
|
// value;
|
|
|
|
|
|
|
|
// await tableManagerModel
|
|
|
|
// .refreshTable(context);
|
|
|
|
// // await tableManagerModel
|
|
|
|
// // .getTableList(context,
|
|
|
|
// // needLoading: false);
|
|
|
|
// // tableManagerModel.initData();
|
|
|
|
|
|
|
|
// // setState(() {
|
|
|
|
// // updateMenu();
|
|
|
|
// // });
|
|
|
|
// // _scrollToIndex(widget
|
|
|
|
// // .tableManagerModel
|
|
|
|
// // .areas
|
|
|
|
// // .length);
|
|
|
|
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Column(
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(20),
|
|
|
|
// DottedBorder(
|
|
|
|
// dashPattern: [5, 5, 5, 5],
|
|
|
|
// borderType: BorderType.RRect,
|
|
|
|
// // radius: Radius.circular(
|
|
|
|
// // ScreenUtil().setWidth(10)),
|
|
|
|
// // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
// color: MyColours.color_199095,
|
|
|
|
// strokeWidth:
|
|
|
|
// ScreenUtil().setWidth(2),
|
|
|
|
// child: ClipRRect(
|
|
|
|
// borderRadius: BorderRadius
|
|
|
|
// .all(Radius.circular(
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(10))),
|
|
|
|
// child: Container(
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(25 * 2),
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(70 * 2),
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment
|
|
|
|
// .center,
|
|
|
|
// children: [
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// 'add_area'),
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(24)),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// } else {
|
|
|
|
if (index == 0) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
isSelected = true;
|
|
|
|
tableManagerModel.currentArea =
|
|
|
|
'全部';
|
|
|
|
// tableManagerModel.tablesShow =
|
|
|
|
// tableManagerModel
|
|
|
|
// .tabl;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
// width: ScreenUtil().setWidth(104 * 2),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(15),
|
|
|
|
top: ScreenUtil().setWidth(20),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal:
|
|
|
|
ScreenUtil().setWidth(14),
|
|
|
|
vertical:
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
color: isSelected
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
border: Border.all(
|
|
|
|
color:
|
|
|
|
MyColours.color_E0E0E0,
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(2))),
|
|
|
|
child: Text(
|
|
|
|
'全部',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: isSelected
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(24),
|
|
|
|
decoration:
|
|
|
|
TextDecoration.none,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.normal),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return AreaItemTable(
|
|
|
|
model.areas[index - 1],
|
|
|
|
tableManagerModel.currentArea,
|
|
|
|
(area) {
|
|
|
|
setState(() {
|
|
|
|
isSelected = false;
|
|
|
|
tableManagerModel.selectNumber =
|
|
|
|
index - 1;
|
|
|
|
tableManagerModel.currentArea =
|
|
|
|
tableManagerModel
|
|
|
|
.areas[index - 1].name;
|
|
|
|
// tableManagerModel.currentTables =
|
|
|
|
// tableManagerModel
|
|
|
|
// .areaTableMapShow[
|
|
|
|
// tableManagerModel
|
|
|
|
// .currentArea];
|
|
|
|
// _anmationMenu();
|
|
|
|
});
|
|
|
|
return AreaItemTableOrReserve(
|
|
|
|
tableManagerModel
|
|
|
|
.tablesOrReserveDataShow[index],
|
|
|
|
(area) {
|
|
|
|
tableManagerModel
|
|
|
|
.tablesOrReserveDataShow
|
|
|
|
.forEach((element) {
|
|
|
|
element.select = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
// isSelected = false;
|
|
|
|
area.select = true;
|
|
|
|
tableManagerModel.selectNumber =
|
|
|
|
index;
|
|
|
|
// tableManagerModel.currentArea =
|
|
|
|
// tableManagerModel
|
|
|
|
// .areas[index - 1].name;
|
|
|
|
// tableManagerModel.currentTables =
|
|
|
|
// tableManagerModel
|
|
|
|
// .areaTableMapShow[
|
|
|
|
// tableManagerModel
|
|
|
|
// .currentArea];
|
|
|
|
// _anmationMenu();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
)),
|
|
...
|
...
|
@@ -4003,18 +3755,42 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
model.swichState = !model.swichState;
|
|
|
|
if (model.swichState) {
|
|
|
|
model.areaTableMapShow =
|
|
|
|
tableManagerModel
|
|
|
|
.areaTableMapCanNote;
|
|
|
|
model.tablesShow =
|
|
|
|
tableManagerModel.tablesCanNote;
|
|
|
|
} else {
|
|
|
|
model.areaTableMapShow =
|
|
|
|
model.areaTableMap;
|
|
|
|
model.tablesShow = model.tablesAll;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
if (model.swichState) {
|
|
|
|
//把没有预订和宴会的桌子筛选出来显示
|
|
|
|
|
|
|
|
model.tablesOrReserveData
|
|
|
|
.forEach((element) {
|
|
|
|
if (element.tableList != null &&
|
|
|
|
element.tableList.length > 0) {
|
|
|
|
List<TableListReserve> tableList =
|
|
|
|
[];
|
|
|
|
element.tableList
|
|
|
|
.forEach((element1) {
|
|
|
|
if (element1.reserveList ==
|
|
|
|
null &&
|
|
|
|
element1.banquetList ==
|
|
|
|
null) {
|
|
|
|
//空桌子
|
|
|
|
tableList.add(element1);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
model
|
|
|
|
.tablesOrReserveDataShow[model
|
|
|
|
.tablesOrReserveDataShow
|
|
|
|
.indexWhere((elementShow) =>
|
|
|
|
elementShow.id ==
|
|
|
|
element.id)]
|
|
|
|
.tableList = tableList;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
model.tablesOrReserveDataShow =
|
|
|
|
model.tablesOrReserveData.toList();
|
|
|
|
}
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
...
|
...
|
@@ -4069,7 +3845,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (tableManagerModel.currentArea != null)
|
|
|
|
if (tableManagerModel.selectNumber != null)
|
|
|
|
Expanded(
|
|
|
|
// flex: 2,
|
|
|
|
child: Container(
|
|
...
|
...
|
@@ -4079,20 +3855,22 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
color: Color.fromRGBO(249, 249, 249, 1),
|
|
|
|
child: item(
|
|
|
|
tableManagerModel.selectNumber))),
|
|
|
|
tableManagerModel.selectTables.length > 0
|
|
|
|
? wechatNotification
|
|
|
|
? _selectTableWidgetWechat()
|
|
|
|
: Expanded(
|
|
|
|
flex: 5, child: _selectTableWidgetSms())
|
|
|
|
tableManagerModel.selectTablesOrReserve.length > 0
|
|
|
|
?
|
|
|
|
// wechatNotification
|
|
|
|
// ?
|
|
|
|
_selectTableWidgetWechat()
|
|
|
|
// : Expanded(
|
|
|
|
// flex: 5, child: _selectTableWidgetSms())
|
|
|
|
: SizedBox()
|
|
|
|
]))
|
|
|
|
// return CCMenuPage.builder(
|
|
|
|
// tableManagerModel: tableManagerModel,
|
|
|
|
// itemCount: tableManagerModel.areas.length,
|
|
|
|
// itemCount: tableManagerModel.tablesOrReserveDataShow.length,
|
|
|
|
// onTap: (index) async {},
|
|
|
|
// tabBuilder: (BuildContext context, int index) {
|
|
|
|
// if (index == tableManagerModel.areas.length ||
|
|
|
|
// tableManagerModel.areas.length == 0) {
|
|
|
|
// if (index == tableManagerModel.tablesOrReserveDataShow.length ||
|
|
|
|
// tableManagerModel.tablesOrReserveDataShow.length == 0) {
|
|
|
|
// return Column(
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(20),
|
...
|
...
|
|