|
@@ -1342,182 +1342,176 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -1342,182 +1342,176 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
1342
|
}
|
1342
|
}
|
|
1343
|
|
1343
|
|
|
1344
|
///选中的桌子widget
|
1344
|
///选中的桌子widget
|
|
1345
|
- Widget _selectTableWidget() {
|
1345
|
+ Widget _selectTableWidgetWechat() {
|
|
1346
|
return Container(
|
1346
|
return Container(
|
|
1347
|
- // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),
|
|
|
|
1348
|
- // height: ScreenUtil().setWidth(400),
|
|
|
|
1349
|
- width: double.infinity,
|
|
|
|
1350
|
-
|
|
|
|
1351
|
- decoration: BoxDecoration(
|
|
|
|
1352
|
- color: MyColours.color_ffffff,
|
|
|
|
1353
|
- boxShadow: [
|
|
|
|
1354
|
- BoxShadow(
|
|
|
|
1355
|
- color: MyColours.color_333333,
|
|
|
|
1356
|
- blurRadius: ScreenUtil().setWidth(14))
|
|
|
|
1357
|
- ],
|
|
|
|
1358
|
- borderRadius: BorderRadius.only(
|
|
|
|
1359
|
- topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1360
|
- topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1361
|
- )),
|
|
|
|
1362
|
- child: Column(
|
|
|
|
1363
|
- // mainAxisSize: MainAxisSize.min,
|
|
|
|
1364
|
- mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
1365
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1366
|
- children: [
|
|
|
|
1367
|
- Stack(alignment: Alignment.centerRight, children: [
|
|
|
|
1368
|
- Container(
|
|
|
|
1369
|
- width: double.infinity,
|
|
|
|
1370
|
- padding: EdgeInsets.symmetric(
|
|
|
|
1371
|
- horizontal: ScreenUtil().setWidth(40),
|
|
|
|
1372
|
- vertical: ScreenUtil().setSp(16),
|
|
|
|
1373
|
- ),
|
|
|
|
1374
|
- decoration: BoxDecoration(
|
|
|
|
1375
|
- color: MyColours.color_f3f3f3,
|
|
|
|
1376
|
- borderRadius: BorderRadius.only(
|
|
|
|
1377
|
- topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1378
|
- topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1379
|
- )),
|
|
|
|
1380
|
- child: Column(
|
|
|
|
1381
|
- children: [
|
|
|
|
1382
|
- Text(
|
|
|
|
1383
|
- tableManagerModel.selectDateStr +
|
|
|
|
1384
|
- ' ' +
|
|
|
|
1385
|
- tableManagerModel.doltStr,
|
|
|
|
1386
|
- style: TextStyle(
|
|
|
|
1387
|
- color: MyColours.color_515151,
|
|
|
|
1388
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
1389
|
- fontWeight: FontWeight.bold),
|
1347
|
+ // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),
|
|
|
|
1348
|
+ // height: ScreenUtil().setWidth(400),
|
|
|
|
1349
|
+ width: double.infinity,
|
|
|
|
1350
|
+ decoration: BoxDecoration(
|
|
|
|
1351
|
+ color: MyColours.color_ffffff,
|
|
|
|
1352
|
+ boxShadow: [
|
|
|
|
1353
|
+ BoxShadow(
|
|
|
|
1354
|
+ color: MyColours.color_333333,
|
|
|
|
1355
|
+ blurRadius: ScreenUtil().setWidth(14))
|
|
|
|
1356
|
+ ],
|
|
|
|
1357
|
+ borderRadius: BorderRadius.only(
|
|
|
|
1358
|
+ topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1359
|
+ topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1360
|
+ )),
|
|
|
|
1361
|
+ child: SingleChildScrollView(
|
|
|
|
1362
|
+ child: Column(
|
|
|
|
1363
|
+ // mainAxisSize: MainAxisSize.min,
|
|
|
|
1364
|
+ mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
1365
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1366
|
+ children: [
|
|
|
|
1367
|
+ Stack(alignment: Alignment.centerRight, children: [
|
|
|
|
1368
|
+ Container(
|
|
|
|
1369
|
+ width: double.infinity,
|
|
|
|
1370
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
1371
|
+ horizontal: ScreenUtil().setWidth(40),
|
|
|
|
1372
|
+ vertical: ScreenUtil().setSp(16),
|
|
1390
|
),
|
1373
|
),
|
|
1391
|
- VEmptyView(8),
|
|
|
|
1392
|
- Text(
|
|
|
|
1393
|
- tableManagerModel.selectWeekAndLunarCalendar,
|
|
|
|
1394
|
- style: TextStyle(
|
|
|
|
1395
|
- color: MyColours.color_999999,
|
|
|
|
1396
|
- fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1397
|
- )
|
|
|
|
1398
|
- ],
|
|
|
|
1399
|
- ),
|
|
|
|
1400
|
- ),
|
|
|
|
1401
|
- Positioned(
|
|
|
|
1402
|
- right: ScreenUtil().setWidth(40),
|
|
|
|
1403
|
- child: InkWell(
|
|
|
|
1404
|
- onTap: () {
|
|
|
|
1405
|
- nameStr = '';
|
|
|
|
1406
|
- _baseIndoProvider.nameController.text = '';
|
|
|
|
1407
|
- _baseIndoProvider.phoneController.text = '';
|
|
|
|
1408
|
- sexSelectIndex = 0;
|
|
|
|
1409
|
- sexStr = '先生';
|
|
|
|
1410
|
- actualPnum = '选填';
|
|
|
|
1411
|
- ddateHm = '选填';
|
|
|
|
1412
|
- actualPnumIndex = null;
|
|
|
|
1413
|
- ddateIndex = null;
|
|
|
|
1414
|
- youhui = '选择优惠';
|
|
|
|
1415
|
- couponSelectIndex = 0;
|
|
|
|
1416
|
- tableManagerModel.selectTables = [];
|
|
|
|
1417
|
- if (showErro != '短信余额不足,请充值短信条数') {
|
|
|
|
1418
|
- showErro = '';
|
|
|
|
1419
|
- }
|
|
|
|
1420
|
- for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
1421
|
- item.selected = false;
|
|
|
|
1422
|
- }
|
|
|
|
1423
|
- tableManagerModel.areaTableMapShow.forEach((key, value) {
|
|
|
|
1424
|
- value.forEach((element) {
|
|
|
|
1425
|
- element.selected = false;
|
|
|
|
1426
|
- });
|
|
|
|
1427
|
- });
|
1374
|
+ decoration: BoxDecoration(
|
|
|
|
1375
|
+ color: MyColours.color_f3f3f3,
|
|
|
|
1376
|
+ borderRadius: BorderRadius.only(
|
|
|
|
1377
|
+ topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1378
|
+ topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1379
|
+ )),
|
|
|
|
1380
|
+ child: Column(
|
|
|
|
1381
|
+ children: [
|
|
|
|
1382
|
+ Text(
|
|
|
|
1383
|
+ tableManagerModel.selectDateStr +
|
|
|
|
1384
|
+ ' ' +
|
|
|
|
1385
|
+ tableManagerModel.doltStr,
|
|
|
|
1386
|
+ style: TextStyle(
|
|
|
|
1387
|
+ color: MyColours.color_515151,
|
|
|
|
1388
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
1389
|
+ fontWeight: FontWeight.bold),
|
|
|
|
1390
|
+ ),
|
|
|
|
1391
|
+ VEmptyView(8),
|
|
|
|
1392
|
+ Text(
|
|
|
|
1393
|
+ tableManagerModel.selectWeekAndLunarCalendar,
|
|
|
|
1394
|
+ style: TextStyle(
|
|
|
|
1395
|
+ color: MyColours.color_999999,
|
|
|
|
1396
|
+ fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1397
|
+ )
|
|
|
|
1398
|
+ ],
|
|
|
|
1399
|
+ ),
|
|
|
|
1400
|
+ ),
|
|
|
|
1401
|
+ Positioned(
|
|
|
|
1402
|
+ right: ScreenUtil().setWidth(40),
|
|
|
|
1403
|
+ child: InkWell(
|
|
|
|
1404
|
+ onTap: () {
|
|
|
|
1405
|
+ nameStr = '';
|
|
|
|
1406
|
+ _baseIndoProvider.nameController.text = '';
|
|
|
|
1407
|
+ _baseIndoProvider.phoneController.text = '';
|
|
|
|
1408
|
+ sexSelectIndex = 0;
|
|
|
|
1409
|
+ sexStr = '先生';
|
|
|
|
1410
|
+ actualPnum = '选填';
|
|
|
|
1411
|
+ ddateHm = '选填';
|
|
|
|
1412
|
+ actualPnumIndex = null;
|
|
|
|
1413
|
+ ddateIndex = null;
|
|
|
|
1414
|
+ youhui = '选择优惠';
|
|
|
|
1415
|
+ couponSelectIndex = 0;
|
|
|
|
1416
|
+ tableManagerModel.selectTables = [];
|
|
|
|
1417
|
+ if (showErro != '短信余额不足,请充值短信条数') {
|
|
|
|
1418
|
+ showErro = '';
|
|
|
|
1419
|
+ }
|
|
|
|
1420
|
+ for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
1421
|
+ item.selected = false;
|
|
|
|
1422
|
+ }
|
|
|
|
1423
|
+ tableManagerModel.areaTableMapShow
|
|
|
|
1424
|
+ .forEach((key, value) {
|
|
|
|
1425
|
+ value.forEach((element) {
|
|
|
|
1426
|
+ element.selected = false;
|
|
|
|
1427
|
+ });
|
|
|
|
1428
|
+ });
|
|
1428
|
|
1429
|
|
|
1429
|
- tableManagerModel.notifyListeners();
|
|
|
|
1430
|
- },
|
|
|
|
1431
|
- child: Text(
|
|
|
|
1432
|
- '清空',
|
|
|
|
1433
|
- style: TextStyle(
|
|
|
|
1434
|
- decoration: TextDecoration.underline,
|
|
|
|
1435
|
- color: MyColours.color_438E93,
|
|
|
|
1436
|
- fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1437
|
- )))
|
|
|
|
1438
|
- ]),
|
|
|
|
1439
|
- Container(
|
|
|
|
1440
|
- margin: EdgeInsets.only(top: ScreenUtil().setWidth(44)),
|
|
|
|
1441
|
- height: ScreenUtil().setWidth(60),
|
|
|
|
1442
|
- child: ListView.builder(
|
|
|
|
1443
|
- padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
|
|
|
|
1444
|
- itemCount: tableManagerModel.selectTables.length,
|
|
|
|
1445
|
- shrinkWrap: true,
|
|
|
|
1446
|
- scrollDirection: Axis.horizontal,
|
|
|
|
1447
|
- itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
1448
|
- t.Table table = tableManagerModel.selectTables[index];
|
|
|
|
1449
|
- return Container(
|
|
|
|
1450
|
- margin: EdgeInsets.only(right: ScreenUtil().setWidth(20)),
|
|
|
|
1451
|
- padding: EdgeInsets.only(
|
|
|
|
1452
|
- left: ScreenUtil().setWidth(16),
|
|
|
|
1453
|
- // right: ScreenUtil().setWidth(4),
|
|
|
|
1454
|
- // top: ScreenUtil().setWidth(14),
|
|
|
|
1455
|
- // bottom: ScreenUtil().setWidth(14)
|
|
|
|
1456
|
- ),
|
|
|
|
1457
|
- decoration: BoxDecoration(
|
|
|
|
1458
|
- border: Border.all(
|
|
|
|
1459
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
1460
|
- color: MyColours.color_438E93),
|
|
|
|
1461
|
- borderRadius:
|
|
|
|
1462
|
- BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
1463
|
- child: Row(
|
|
|
|
1464
|
- children: [
|
|
|
|
1465
|
- Text(
|
|
|
|
1466
|
- table.name,
|
1430
|
+ tableManagerModel.notifyListeners();
|
|
|
|
1431
|
+ },
|
|
|
|
1432
|
+ child: Text(
|
|
|
|
1433
|
+ '清空',
|
|
1467
|
style: TextStyle(
|
1434
|
style: TextStyle(
|
|
|
|
1435
|
+ decoration: TextDecoration.underline,
|
|
1468
|
color: MyColours.color_438E93,
|
1436
|
color: MyColours.color_438E93,
|
|
1469
|
- fontSize: ScreenUtil().setSp(28)),
|
1437
|
+ fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1438
|
+ )))
|
|
|
|
1439
|
+ ]),
|
|
|
|
1440
|
+ Container(
|
|
|
|
1441
|
+ margin: EdgeInsets.only(top: ScreenUtil().setWidth(44)),
|
|
|
|
1442
|
+ height: ScreenUtil().setWidth(60),
|
|
|
|
1443
|
+ child: ListView.builder(
|
|
|
|
1444
|
+ padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
|
|
|
|
1445
|
+ itemCount: tableManagerModel.selectTables.length,
|
|
|
|
1446
|
+ shrinkWrap: true,
|
|
|
|
1447
|
+ scrollDirection: Axis.horizontal,
|
|
|
|
1448
|
+ itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
1449
|
+ t.Table table = tableManagerModel.selectTables[index];
|
|
|
|
1450
|
+ return Container(
|
|
|
|
1451
|
+ margin:
|
|
|
|
1452
|
+ EdgeInsets.only(right: ScreenUtil().setWidth(20)),
|
|
|
|
1453
|
+ padding: EdgeInsets.only(
|
|
|
|
1454
|
+ left: ScreenUtil().setWidth(16),
|
|
|
|
1455
|
+ // right: ScreenUtil().setWidth(4),
|
|
|
|
1456
|
+ // top: ScreenUtil().setWidth(14),
|
|
|
|
1457
|
+ // bottom: ScreenUtil().setWidth(14)
|
|
1470
|
),
|
1458
|
),
|
|
1471
|
- HEmptyView(14),
|
|
|
|
1472
|
- InkWell(
|
|
|
|
1473
|
- onTap: () {
|
|
|
|
1474
|
- //删除已经选择的桌位
|
|
|
|
1475
|
- tableManagerModel.selectTables
|
|
|
|
1476
|
- .removeWhere((t) => t.id == table.id);
|
|
|
|
1477
|
-
|
|
|
|
1478
|
- for (t.Table item
|
|
|
|
1479
|
- in tableManagerModel.tablesShow) {
|
|
|
|
1480
|
- if (item.id == table.id) {
|
|
|
|
1481
|
- item.selected = false;
|
|
|
|
1482
|
- setState(() {});
|
|
|
|
1483
|
- }
|
|
|
|
1484
|
- }
|
|
|
|
1485
|
- for (t.Table item
|
|
|
|
1486
|
- in tableManagerModel.areaTableMapShow[
|
1459
|
+ decoration: BoxDecoration(
|
|
|
|
1460
|
+ border: Border.all(
|
|
|
|
1461
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
1462
|
+ color: MyColours.color_438E93),
|
|
|
|
1463
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
1464
|
+ ScreenUtil().setWidth(8))),
|
|
|
|
1465
|
+ child: Row(
|
|
|
|
1466
|
+ children: [
|
|
|
|
1467
|
+ Text(
|
|
|
|
1468
|
+ table.name,
|
|
|
|
1469
|
+ style: TextStyle(
|
|
|
|
1470
|
+ color: MyColours.color_438E93,
|
|
|
|
1471
|
+ fontSize: ScreenUtil().setSp(28)),
|
|
|
|
1472
|
+ ),
|
|
|
|
1473
|
+ HEmptyView(14),
|
|
|
|
1474
|
+ InkWell(
|
|
|
|
1475
|
+ onTap: () {
|
|
|
|
1476
|
+ //删除已经选择的桌位
|
|
|
|
1477
|
+ tableManagerModel.selectTables
|
|
|
|
1478
|
+ .removeWhere((t) => t.id == table.id);
|
|
|
|
1479
|
+
|
|
|
|
1480
|
+ for (t.Table item
|
|
|
|
1481
|
+ in tableManagerModel.tablesShow) {
|
|
|
|
1482
|
+ if (item.id == table.id) {
|
|
|
|
1483
|
+ item.selected = false;
|
|
|
|
1484
|
+ setState(() {});
|
|
|
|
1485
|
+ }
|
|
|
|
1486
|
+ }
|
|
|
|
1487
|
+ for (t.Table item in tableManagerModel
|
|
|
|
1488
|
+ .areaTableMapShow[
|
|
1487
|
tableManagerModel
|
1489
|
tableManagerModel
|
|
1488
|
.areas[tableManagerModel.selectNumber]
|
1490
|
.areas[tableManagerModel.selectNumber]
|
|
1489
|
.name]) {
|
1491
|
.name]) {
|
|
1490
|
- if (item.id == table.id) {
|
|
|
|
1491
|
- item.selected = false;
|
|
|
|
1492
|
- setState(() {});
|
|
|
|
1493
|
- }
|
|
|
|
1494
|
- }
|
|
|
|
1495
|
- },
|
|
|
|
1496
|
- child: Container(
|
|
|
|
1497
|
- // color: Colors.red,
|
|
|
|
1498
|
- padding: EdgeInsets.only(
|
|
|
|
1499
|
- top: ScreenUtil().setWidth(14),
|
|
|
|
1500
|
- bottom: ScreenUtil().setWidth(14),
|
|
|
|
1501
|
- left: ScreenUtil().setWidth(14),
|
|
|
|
1502
|
- right: ScreenUtil().setWidth(4)),
|
|
|
|
1503
|
- child: Image.asset(
|
|
|
|
1504
|
- Utils.getImgPath('table_m_close'),
|
|
|
|
1505
|
- width: ScreenUtil().setWidth(32)))),
|
|
|
|
1506
|
- ],
|
|
|
|
1507
|
- ),
|
|
|
|
1508
|
- );
|
|
|
|
1509
|
- }),
|
|
|
|
1510
|
- ),
|
|
|
|
1511
|
- !wechatNotification
|
|
|
|
1512
|
- ? Column(children: [
|
|
|
|
1513
|
- _customerInfoWidget(),
|
|
|
|
1514
|
- VEmptyView(44),
|
|
|
|
1515
|
- _couponWidget(),
|
|
|
|
1516
|
- ])
|
|
|
|
1517
|
- : SizedBox(),
|
|
|
|
1518
|
- VEmptyView(50),
|
|
|
|
1519
|
- wechatNotification
|
|
|
|
1520
|
- ? Padding(
|
1492
|
+ if (item.id == table.id) {
|
|
|
|
1493
|
+ item.selected = false;
|
|
|
|
1494
|
+ setState(() {});
|
|
|
|
1495
|
+ }
|
|
|
|
1496
|
+ }
|
|
|
|
1497
|
+ },
|
|
|
|
1498
|
+ child: Container(
|
|
|
|
1499
|
+ // color: Colors.red,
|
|
|
|
1500
|
+ padding: EdgeInsets.only(
|
|
|
|
1501
|
+ top: ScreenUtil().setWidth(14),
|
|
|
|
1502
|
+ bottom: ScreenUtil().setWidth(14),
|
|
|
|
1503
|
+ left: ScreenUtil().setWidth(14),
|
|
|
|
1504
|
+ right: ScreenUtil().setWidth(4)),
|
|
|
|
1505
|
+ child: Image.asset(
|
|
|
|
1506
|
+ Utils.getImgPath('table_m_close'),
|
|
|
|
1507
|
+ width: ScreenUtil().setWidth(32)))),
|
|
|
|
1508
|
+ ],
|
|
|
|
1509
|
+ ),
|
|
|
|
1510
|
+ );
|
|
|
|
1511
|
+ }),
|
|
|
|
1512
|
+ ),
|
|
|
|
1513
|
+ VEmptyView(50),
|
|
|
|
1514
|
+ Padding(
|
|
1521
|
padding: EdgeInsets.symmetric(
|
1515
|
padding: EdgeInsets.symmetric(
|
|
1522
|
horizontal: ScreenUtil().setWidth(36)),
|
1516
|
horizontal: ScreenUtil().setWidth(36)),
|
|
1523
|
child: Row(
|
1517
|
child: Row(
|
|
@@ -1664,43 +1658,43 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -1664,43 +1658,43 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
1664
|
bus.emit("refresh_tablemanager"); //刷新当前页面
|
1658
|
bus.emit("refresh_tablemanager"); //刷新当前页面
|
|
1665
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
1659
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
1666
|
|
1660
|
|
|
1667
|
- if (youhui != '选择优惠') {
|
|
|
|
1668
|
- Map<String, String> params = {
|
|
|
|
1669
|
- "rid": _model.row.id,
|
|
|
|
1670
|
- "aid":
|
|
|
|
1671
|
- '${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
1672
|
- };
|
|
|
|
1673
|
- bool isSuc = await couponProvider
|
|
|
|
1674
|
- .setActivityAsReserve(context, params);
|
|
|
|
1675
|
- if (isSuc) {
|
|
|
|
1676
|
- couponProvider.hasModify = true;
|
|
|
|
1677
|
- // bus.emit("refresh_book_list");
|
|
|
|
1678
|
- bool isSuccess =
|
|
|
|
1679
|
- await Utils.goShareInvicationToWeChat(
|
|
|
|
1680
|
- context,
|
|
|
|
1681
|
- _model.row.id,
|
|
|
|
1682
|
- Provider.of<UserModel>(context,
|
|
|
|
1683
|
- listen: false)
|
|
|
|
1684
|
- .user
|
|
|
|
1685
|
- .openid);
|
|
|
|
1686
|
- print(isSuccess);
|
|
|
|
1687
|
- if (isSuccess) {
|
|
|
|
1688
|
- _addForward(_model.row.id);
|
|
|
|
1689
|
- }
|
|
|
|
1690
|
- }
|
|
|
|
1691
|
- } else {
|
|
|
|
1692
|
- bool isSuccess =
|
|
|
|
1693
|
- await Utils.goShareInvicationToWeChat(
|
|
|
|
1694
|
- context,
|
|
|
|
1695
|
- _model.row.id,
|
|
|
|
1696
|
- Provider.of<UserModel>(context,
|
|
|
|
1697
|
- listen: false)
|
|
|
|
1698
|
- .user
|
|
|
|
1699
|
- .openid);
|
|
|
|
1700
|
- if (isSuccess) {
|
|
|
|
1701
|
- _addForward(_model.row.id);
|
|
|
|
1702
|
- }
|
1661
|
+ // if (youhui != '选择优惠') {
|
|
|
|
1662
|
+ // Map<String, String> params = {
|
|
|
|
1663
|
+ // "rid": _model.row.id,
|
|
|
|
1664
|
+ // "aid":
|
|
|
|
1665
|
+ // '${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
1666
|
+ // };
|
|
|
|
1667
|
+ // bool isSuc = await couponProvider
|
|
|
|
1668
|
+ // .setActivityAsReserve(context, params);
|
|
|
|
1669
|
+ // if (isSuc) {
|
|
|
|
1670
|
+ // couponProvider.hasModify = true;
|
|
|
|
1671
|
+ // // bus.emit("refresh_book_list");
|
|
|
|
1672
|
+ // bool isSuccess =
|
|
|
|
1673
|
+ // await Utils.goShareInvicationToWeChat(
|
|
|
|
1674
|
+ // context,
|
|
|
|
1675
|
+ // _model.row.id,
|
|
|
|
1676
|
+ // Provider.of<UserModel>(context,
|
|
|
|
1677
|
+ // listen: false)
|
|
|
|
1678
|
+ // .user
|
|
|
|
1679
|
+ // .openid);
|
|
|
|
1680
|
+ // print(isSuccess);
|
|
|
|
1681
|
+ // if (isSuccess) {
|
|
|
|
1682
|
+ // _addForward(_model.row.id);
|
|
|
|
1683
|
+ // }
|
|
|
|
1684
|
+ // }
|
|
|
|
1685
|
+ // } else {
|
|
|
|
1686
|
+ bool isSuccess =
|
|
|
|
1687
|
+ await Utils.goShareInvicationToWeChat(
|
|
|
|
1688
|
+ context,
|
|
|
|
1689
|
+ _model.row.id,
|
|
|
|
1690
|
+ Provider.of<UserModel>(context,
|
|
|
|
1691
|
+ listen: false)
|
|
|
|
1692
|
+ .user
|
|
|
|
1693
|
+ .openid);
|
|
|
|
1694
|
+ if (isSuccess) {
|
|
|
|
1695
|
+ _addForward(_model.row.id);
|
|
1703
|
}
|
1696
|
}
|
|
|
|
1697
|
+ // }
|
|
1704
|
} else {
|
1698
|
} else {
|
|
1705
|
//失败
|
1699
|
//失败
|
|
1706
|
Utils.showToast("预订失败!");
|
1700
|
Utils.showToast("预订失败!");
|
|
@@ -1708,8 +1702,190 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -1708,8 +1702,190 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
1708
|
},
|
1702
|
},
|
|
1709
|
)),
|
1703
|
)),
|
|
1710
|
],
|
1704
|
],
|
|
1711
|
- ))
|
|
|
|
1712
|
- : Padding(
|
1705
|
+ )),
|
|
|
|
1706
|
+ VEmptyView(62)
|
|
|
|
1707
|
+ ],
|
|
|
|
1708
|
+ ),
|
|
|
|
1709
|
+ ));
|
|
|
|
1710
|
+ }
|
|
|
|
1711
|
+
|
|
|
|
1712
|
+ ///选中的桌子widget
|
|
|
|
1713
|
+ Widget _selectTableWidgetSms() {
|
|
|
|
1714
|
+ return Container(
|
|
|
|
1715
|
+ // constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),
|
|
|
|
1716
|
+ // height: ScreenUtil().setWidth(400),
|
|
|
|
1717
|
+ width: double.infinity,
|
|
|
|
1718
|
+ decoration: BoxDecoration(
|
|
|
|
1719
|
+ color: MyColours.color_ffffff,
|
|
|
|
1720
|
+ boxShadow: [
|
|
|
|
1721
|
+ BoxShadow(
|
|
|
|
1722
|
+ color: MyColours.color_333333,
|
|
|
|
1723
|
+ blurRadius: ScreenUtil().setWidth(14))
|
|
|
|
1724
|
+ ],
|
|
|
|
1725
|
+ borderRadius: BorderRadius.only(
|
|
|
|
1726
|
+ topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1727
|
+ topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1728
|
+ )),
|
|
|
|
1729
|
+ child: SingleChildScrollView(
|
|
|
|
1730
|
+ child: Column(
|
|
|
|
1731
|
+ // mainAxisSize: MainAxisSize.min,
|
|
|
|
1732
|
+ mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
1733
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1734
|
+ children: [
|
|
|
|
1735
|
+ Stack(alignment: Alignment.centerRight, children: [
|
|
|
|
1736
|
+ Container(
|
|
|
|
1737
|
+ width: double.infinity,
|
|
|
|
1738
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
1739
|
+ horizontal: ScreenUtil().setWidth(40),
|
|
|
|
1740
|
+ vertical: ScreenUtil().setSp(16),
|
|
|
|
1741
|
+ ),
|
|
|
|
1742
|
+ decoration: BoxDecoration(
|
|
|
|
1743
|
+ color: MyColours.color_f3f3f3,
|
|
|
|
1744
|
+ borderRadius: BorderRadius.only(
|
|
|
|
1745
|
+ topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1746
|
+ topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
1747
|
+ )),
|
|
|
|
1748
|
+ child: Column(
|
|
|
|
1749
|
+ children: [
|
|
|
|
1750
|
+ Text(
|
|
|
|
1751
|
+ tableManagerModel.selectDateStr +
|
|
|
|
1752
|
+ ' ' +
|
|
|
|
1753
|
+ tableManagerModel.doltStr,
|
|
|
|
1754
|
+ style: TextStyle(
|
|
|
|
1755
|
+ color: MyColours.color_515151,
|
|
|
|
1756
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
1757
|
+ fontWeight: FontWeight.bold),
|
|
|
|
1758
|
+ ),
|
|
|
|
1759
|
+ VEmptyView(8),
|
|
|
|
1760
|
+ Text(
|
|
|
|
1761
|
+ tableManagerModel.selectWeekAndLunarCalendar,
|
|
|
|
1762
|
+ style: TextStyle(
|
|
|
|
1763
|
+ color: MyColours.color_999999,
|
|
|
|
1764
|
+ fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1765
|
+ )
|
|
|
|
1766
|
+ ],
|
|
|
|
1767
|
+ ),
|
|
|
|
1768
|
+ ),
|
|
|
|
1769
|
+ Positioned(
|
|
|
|
1770
|
+ right: ScreenUtil().setWidth(40),
|
|
|
|
1771
|
+ child: InkWell(
|
|
|
|
1772
|
+ onTap: () {
|
|
|
|
1773
|
+ nameStr = '';
|
|
|
|
1774
|
+ _baseIndoProvider.nameController.text = '';
|
|
|
|
1775
|
+ _baseIndoProvider.phoneController.text = '';
|
|
|
|
1776
|
+ sexSelectIndex = 0;
|
|
|
|
1777
|
+ sexStr = '先生';
|
|
|
|
1778
|
+ actualPnum = '选填';
|
|
|
|
1779
|
+ ddateHm = '选填';
|
|
|
|
1780
|
+ actualPnumIndex = null;
|
|
|
|
1781
|
+ ddateIndex = null;
|
|
|
|
1782
|
+ youhui = '选择优惠';
|
|
|
|
1783
|
+ couponSelectIndex = 0;
|
|
|
|
1784
|
+ tableManagerModel.selectTables = [];
|
|
|
|
1785
|
+ if (showErro != '短信余额不足,请充值短信条数') {
|
|
|
|
1786
|
+ showErro = '';
|
|
|
|
1787
|
+ }
|
|
|
|
1788
|
+ for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
1789
|
+ item.selected = false;
|
|
|
|
1790
|
+ }
|
|
|
|
1791
|
+ tableManagerModel.areaTableMapShow
|
|
|
|
1792
|
+ .forEach((key, value) {
|
|
|
|
1793
|
+ value.forEach((element) {
|
|
|
|
1794
|
+ element.selected = false;
|
|
|
|
1795
|
+ });
|
|
|
|
1796
|
+ });
|
|
|
|
1797
|
+
|
|
|
|
1798
|
+ tableManagerModel.notifyListeners();
|
|
|
|
1799
|
+ },
|
|
|
|
1800
|
+ child: Text(
|
|
|
|
1801
|
+ '清空',
|
|
|
|
1802
|
+ style: TextStyle(
|
|
|
|
1803
|
+ decoration: TextDecoration.underline,
|
|
|
|
1804
|
+ color: MyColours.color_438E93,
|
|
|
|
1805
|
+ fontSize: ScreenUtil().setSp(20)),
|
|
|
|
1806
|
+ )))
|
|
|
|
1807
|
+ ]),
|
|
|
|
1808
|
+ Container(
|
|
|
|
1809
|
+ margin: EdgeInsets.only(top: ScreenUtil().setWidth(44)),
|
|
|
|
1810
|
+ height: ScreenUtil().setWidth(60),
|
|
|
|
1811
|
+ child: ListView.builder(
|
|
|
|
1812
|
+ padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
|
|
|
|
1813
|
+ itemCount: tableManagerModel.selectTables.length,
|
|
|
|
1814
|
+ shrinkWrap: true,
|
|
|
|
1815
|
+ scrollDirection: Axis.horizontal,
|
|
|
|
1816
|
+ itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
1817
|
+ t.Table table = tableManagerModel.selectTables[index];
|
|
|
|
1818
|
+ return Container(
|
|
|
|
1819
|
+ margin:
|
|
|
|
1820
|
+ EdgeInsets.only(right: ScreenUtil().setWidth(20)),
|
|
|
|
1821
|
+ padding: EdgeInsets.only(
|
|
|
|
1822
|
+ left: ScreenUtil().setWidth(16),
|
|
|
|
1823
|
+ // right: ScreenUtil().setWidth(4),
|
|
|
|
1824
|
+ // top: ScreenUtil().setWidth(14),
|
|
|
|
1825
|
+ // bottom: ScreenUtil().setWidth(14)
|
|
|
|
1826
|
+ ),
|
|
|
|
1827
|
+ decoration: BoxDecoration(
|
|
|
|
1828
|
+ border: Border.all(
|
|
|
|
1829
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
1830
|
+ color: MyColours.color_438E93),
|
|
|
|
1831
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
1832
|
+ ScreenUtil().setWidth(8))),
|
|
|
|
1833
|
+ child: Row(
|
|
|
|
1834
|
+ children: [
|
|
|
|
1835
|
+ Text(
|
|
|
|
1836
|
+ table.name,
|
|
|
|
1837
|
+ style: TextStyle(
|
|
|
|
1838
|
+ color: MyColours.color_438E93,
|
|
|
|
1839
|
+ fontSize: ScreenUtil().setSp(28)),
|
|
|
|
1840
|
+ ),
|
|
|
|
1841
|
+ HEmptyView(14),
|
|
|
|
1842
|
+ InkWell(
|
|
|
|
1843
|
+ onTap: () {
|
|
|
|
1844
|
+ //删除已经选择的桌位
|
|
|
|
1845
|
+ tableManagerModel.selectTables
|
|
|
|
1846
|
+ .removeWhere((t) => t.id == table.id);
|
|
|
|
1847
|
+
|
|
|
|
1848
|
+ for (t.Table item
|
|
|
|
1849
|
+ in tableManagerModel.tablesShow) {
|
|
|
|
1850
|
+ if (item.id == table.id) {
|
|
|
|
1851
|
+ item.selected = false;
|
|
|
|
1852
|
+ setState(() {});
|
|
|
|
1853
|
+ }
|
|
|
|
1854
|
+ }
|
|
|
|
1855
|
+ for (t.Table item in tableManagerModel
|
|
|
|
1856
|
+ .areaTableMapShow[
|
|
|
|
1857
|
+ tableManagerModel
|
|
|
|
1858
|
+ .areas[tableManagerModel.selectNumber]
|
|
|
|
1859
|
+ .name]) {
|
|
|
|
1860
|
+ if (item.id == table.id) {
|
|
|
|
1861
|
+ item.selected = false;
|
|
|
|
1862
|
+ setState(() {});
|
|
|
|
1863
|
+ }
|
|
|
|
1864
|
+ }
|
|
|
|
1865
|
+ },
|
|
|
|
1866
|
+ child: Container(
|
|
|
|
1867
|
+ // color: Colors.red,
|
|
|
|
1868
|
+ padding: EdgeInsets.only(
|
|
|
|
1869
|
+ top: ScreenUtil().setWidth(14),
|
|
|
|
1870
|
+ bottom: ScreenUtil().setWidth(14),
|
|
|
|
1871
|
+ left: ScreenUtil().setWidth(14),
|
|
|
|
1872
|
+ right: ScreenUtil().setWidth(4)),
|
|
|
|
1873
|
+ child: Image.asset(
|
|
|
|
1874
|
+ Utils.getImgPath('table_m_close'),
|
|
|
|
1875
|
+ width: ScreenUtil().setWidth(32)))),
|
|
|
|
1876
|
+ ],
|
|
|
|
1877
|
+ ),
|
|
|
|
1878
|
+ );
|
|
|
|
1879
|
+ }),
|
|
|
|
1880
|
+ ),
|
|
|
|
1881
|
+ Column(children: [
|
|
|
|
1882
|
+ _customerInfoWidget(),
|
|
|
|
1883
|
+ VEmptyView(44),
|
|
|
|
1884
|
+ _couponWidget(),
|
|
|
|
1885
|
+ ]),
|
|
|
|
1886
|
+
|
|
|
|
1887
|
+ VEmptyView(50),
|
|
|
|
1888
|
+ Padding(
|
|
1713
|
padding: EdgeInsets.symmetric(
|
1889
|
padding: EdgeInsets.symmetric(
|
|
1714
|
horizontal: ScreenUtil().setWidth(36)),
|
1890
|
horizontal: ScreenUtil().setWidth(36)),
|
|
1715
|
child: Row(
|
1891
|
child: Row(
|
|
@@ -2000,351 +2176,351 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2000,351 +2176,351 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2000
|
],
|
2176
|
],
|
|
2001
|
)),
|
2177
|
)),
|
|
2002
|
|
2178
|
|
|
2003
|
- // Row(
|
|
|
|
2004
|
- // crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2005
|
- // children: [
|
|
|
|
2006
|
- // // HEmptyView(15),
|
|
|
|
2007
|
- // Padding(
|
|
|
|
2008
|
- // // width: ScreenUtil().setWidth(120),
|
|
|
|
2009
|
- // padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
|
|
|
|
2010
|
- // child: Text(
|
|
|
|
2011
|
- // '已选桌位:',
|
|
|
|
2012
|
- // style: TextStyle(
|
|
|
|
2013
|
- // color: MyColours.color_333333,
|
|
|
|
2014
|
- // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
2015
|
- // )),
|
|
|
|
2016
|
- // HEmptyView(15),
|
|
|
|
2017
|
- // // Expanded(
|
|
|
|
2018
|
- // // child:
|
|
|
|
2019
|
- // // width: ScreenUtil().screenWidth -
|
|
|
|
2020
|
- // // ScreenUtil().setWidth(160),
|
|
|
|
2021
|
- // // constraints:
|
|
|
|
2022
|
- // // BoxConstraints(maxHeight: ScreenUtil().setWidth(140)),
|
|
|
|
2023
|
- // // color: Colors.blueAccent,
|
|
|
|
2024
|
-
|
|
|
|
2025
|
- // // ListView.builder(
|
|
|
|
2026
|
- // // shrinkWrap: true,
|
|
|
|
2027
|
- // // itemBuilder: (BuildContext context, int index) {
|
|
|
|
2028
|
- // // return
|
|
|
|
2029
|
- // // Scrollbar(
|
|
|
|
2030
|
- // // isAlwaysShown: true, //设置滚动条常亮
|
|
|
|
2031
|
- // // controller: _scrollCrl, //必须设置一个controller
|
|
|
|
2032
|
-
|
|
|
|
2033
|
- // // ///添加进度条
|
|
|
|
2034
|
- // // child:
|
|
|
|
2035
|
- // // SingleChildScrollView(
|
|
|
|
2036
|
- // // controller: _scrollCrl,
|
|
|
|
2037
|
- // // child:
|
|
|
|
2038
|
- // Container(
|
|
|
|
2039
|
- // // color: Colors.red,
|
|
|
|
2040
|
- // width: ScreenUtil().screenWidth -
|
|
|
|
2041
|
- // ScreenUtil().setWidth(100 + 130),
|
|
|
|
2042
|
- // child: Wrap(
|
|
|
|
2043
|
- // spacing: ScreenUtil().setWidth(20),
|
|
|
|
2044
|
- // runSpacing: ScreenUtil().setWidth(20),
|
|
|
|
2045
|
- // children: _buildAlwayItems())),
|
|
|
|
2046
|
- // // )
|
|
|
|
2047
|
- // // )
|
|
|
|
2048
|
- // // },
|
|
|
|
2049
|
- // // itemCount: 1,
|
|
|
|
2050
|
- // // ),
|
|
|
|
2051
|
- // // )
|
|
|
|
2052
|
- // ],
|
|
|
|
2053
|
- // ),
|
|
|
|
2054
|
- // VEmptyView(40),
|
|
|
|
2055
|
- // Container(
|
|
|
|
2056
|
- // // width: ScreenUtil().setWidth(100),
|
|
|
|
2057
|
- // // color: Colors.red,
|
|
|
|
2058
|
- // // constraints: BoxConstraints(
|
|
|
|
2059
|
- // // minHeight: ScreenUtil().setWidth(500),
|
|
|
|
2060
|
- // // ),
|
|
|
|
2061
|
- // child: Row(
|
|
|
|
2062
|
- // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
2063
|
- // children: [
|
|
|
|
2064
|
- // InkWell(
|
|
|
|
2065
|
- // onTap: () {
|
|
|
|
2066
|
- // tableManagerModel.selectTables = [];
|
|
|
|
2067
|
- // for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
2068
|
- // item.selected = false;
|
|
|
|
2069
|
- // }
|
|
|
|
2070
|
- // tableManagerModel.areaTableMapShow.forEach((key, value) {
|
|
|
|
2071
|
- // value.forEach((element) {
|
|
|
|
2072
|
- // element.selected = false;
|
|
|
|
2073
|
- // });
|
|
|
|
2074
|
- // });
|
|
|
|
2075
|
-
|
|
|
|
2076
|
- // tableManagerModel.notifyListeners();
|
|
|
|
2077
|
- // },
|
|
|
|
2078
|
- // child: Container(
|
|
|
|
2079
|
- // padding: EdgeInsets.all(
|
|
|
|
2080
|
- // ScreenUtil().setWidth(30),
|
|
|
|
2081
|
- // ),
|
|
|
|
2082
|
- // child: Text(
|
|
|
|
2083
|
- // '取消重置',
|
|
|
|
2084
|
- // style: TextStyle(
|
|
|
|
2085
|
- // color: MyColours.color_199095,
|
|
|
|
2086
|
- // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
2087
|
- // ),
|
|
|
|
2088
|
- // ),
|
|
|
|
2089
|
- // ),
|
|
|
|
2090
|
- // RoundButton(
|
|
|
|
2091
|
- // onPressed: () async {
|
|
|
|
2092
|
- // SunReserveInfoModel _model =
|
|
|
|
2093
|
- // await tableManagerModel.setReserveInfo(context,
|
|
|
|
2094
|
- // needKeep: true, guest: widget.guest);
|
|
|
|
2095
|
- // if (_model != null &&
|
|
|
|
2096
|
- // ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
2097
|
- // ObjectUtil.isNotEmpty(_model.row.id)) {
|
|
|
|
2098
|
- // print('成功');
|
|
|
|
2099
|
- // tableManagerModel.selectTables = [];
|
|
|
|
2100
|
- // // _homeEnterModel.clearData();
|
|
|
|
2101
|
- // bus.emit("refresh_tablemanager"); //刷新当前页面
|
|
|
|
2102
|
- // bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
2103
|
- // //进入订座详情页面
|
|
|
|
2104
|
- // // NavigatorUtil.goNotebookDetailPage(
|
|
|
|
2105
|
- // // context,
|
|
|
|
2106
|
- // // _model.row.id,
|
|
|
|
2107
|
- // // Provider.of<UserModel>(context, listen: false)
|
|
|
|
2108
|
- // // .user
|
|
|
|
2109
|
- // // .openid,
|
|
|
|
2110
|
- // // );
|
|
|
|
2111
|
- // // String ddate_solt = '';
|
|
|
|
2112
|
- // // if (_model.row.isSetDdate == '1') {
|
|
|
|
2113
|
- // // String createtime =
|
|
|
|
2114
|
- // // _model.row.ddate.toString() + '000';
|
|
|
|
2115
|
- // // DateTime createTime =
|
|
|
|
2116
|
- // // DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
2117
|
- // // int.parse(createtime));
|
|
|
|
2118
|
- // // ddate_solt = DateUtil.formatDate(createTime,
|
|
|
|
2119
|
- // // format: DateFormats.h_m);
|
|
|
|
2120
|
- // // } else {
|
|
|
|
2121
|
- // // if (_model.row.ddateSolt == '1') {
|
|
|
|
2122
|
- // // ddate_solt = '早餐';
|
|
|
|
2123
|
- // // } else if (_model.row.ddateSolt == '2') {
|
|
|
|
2124
|
- // // ddate_solt = '午餐';
|
|
|
|
2125
|
- // // } else if (_model.row.ddateSolt == '3') {
|
|
|
|
2126
|
- // // ddate_solt = '晚餐';
|
|
|
|
2127
|
- // // }
|
|
|
|
2128
|
- // // }
|
|
|
|
2129
|
- // // List<dynamic> tableinfo =
|
|
|
|
2130
|
- // // convert.jsonDecode(_model.row.tableinfo);
|
|
|
|
2131
|
- // // print(tableinfo);
|
|
|
|
2132
|
-
|
|
|
|
2133
|
- // // String _nameStr =
|
|
|
|
2134
|
- // // t.TableList.fromJson(tableinfo[0]).name;
|
|
|
|
2135
|
- // // if (tableinfo.length > 1) {
|
|
|
|
2136
|
- // // _nameStr = t.TableList.fromJson(tableinfo[0]).name +
|
|
|
|
2137
|
- // // '等${tableinfo.length}桌';
|
|
|
|
2138
|
- // // }
|
|
|
|
2139
|
- // // LogUtil.v(_nameStr);
|
|
|
|
2140
|
- // // String _tid = '';
|
|
|
|
2141
|
- // // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2142
|
- // // _tid += '${t.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2143
|
- // // }
|
|
|
|
2144
|
- // // if (_tid.endsWith(',')) {
|
|
|
|
2145
|
- // // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2146
|
- // // }
|
|
|
|
2147
|
- // // NavigatorUtil.goInvicationPage(
|
|
|
|
2148
|
- // // context,
|
|
|
|
2149
|
- // // _model.row.id,
|
|
|
|
2150
|
- // // _nameStr,
|
|
|
|
2151
|
- // // _model.row.ddate,
|
|
|
|
2152
|
- // // ddate_solt,
|
|
|
|
2153
|
- // // _model.row.phone,
|
|
|
|
2154
|
- // // _model.row.ddateSolt,
|
|
|
|
2155
|
- // // tid: _tid,
|
|
|
|
2156
|
- // // replace: false);
|
|
|
|
2157
|
- // // //今天 明天 其他天
|
|
|
|
2158
|
- // // String tempTime = _homeEnterModel.ddateStr;
|
|
|
|
2159
|
- // // if (_homeEnterModel.ddateStr == '') {
|
|
|
|
2160
|
- // // if (currTimeIndex == 1) {
|
|
|
|
2161
|
- // // tempTime = '08:00';
|
|
|
|
2162
|
- // // } else if (currTimeIndex == 2) {
|
|
|
|
2163
|
- // // tempTime = '12:00';
|
|
|
|
2164
|
- // // } else if (currTimeIndex == 3) {
|
|
|
|
2165
|
- // // tempTime = '18:00';
|
|
|
|
2166
|
- // // }
|
|
|
|
2167
|
- // // }
|
|
|
|
2168
|
- // // print(_model.row.tableinfo);
|
|
|
|
2169
|
- // // _clearData();
|
|
|
|
2170
|
- // // String timeStr = dateText + ' ' + tempTime + ':00';
|
|
|
|
2171
|
-
|
|
|
|
2172
|
- // // LogUtil.v(timeStr);
|
|
|
|
2173
|
- // // int ddate = DateUtil.getDateMsByTimeStr(timeStr);
|
|
|
|
2174
|
-
|
|
|
|
2175
|
- // // _homeEnterModel.getNewTableList(context, '${ddate}',
|
|
|
|
2176
|
- // // currTimeIndex.toString(), pnum);
|
|
|
|
2177
|
-
|
|
|
|
2178
|
- // // EventBus().emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
2179
|
- // } else {
|
|
|
|
2180
|
- // Utils.showToast("预订失败!");
|
|
|
|
2181
|
- // }
|
|
|
|
2182
|
- // },
|
|
|
|
2183
|
- // text: '仅预订',
|
|
|
|
2184
|
- // fontSize: 32,
|
|
|
|
2185
|
- // isBold: false,
|
|
|
|
2186
|
- // width: ScreenUtil().setWidth(180),
|
|
|
|
2187
|
- // height: ScreenUtil().setWidth(90),
|
|
|
|
2188
|
- // padding: EdgeInsets.symmetric(
|
|
|
|
2189
|
- // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
2190
|
- // vertical: ScreenUtil().setWidth(4)),
|
|
|
|
2191
|
- // textColor: MyColours.color_199095,
|
|
|
|
2192
|
- // gradientStart: MyColours.color_ffffff,
|
|
|
|
2193
|
- // gradientEnd: MyColours.color_ffffff,
|
|
|
|
2194
|
- // radius: ScreenUtil().setWidth(10),
|
|
|
|
2195
|
- // borderColor: MyColours.color_199095,
|
|
|
|
2196
|
- // ),
|
|
|
|
2197
|
- // RoundButton(
|
|
|
|
2198
|
- // onPressed: () async {
|
|
|
|
2199
|
- // SunReserveInfoModel _model =
|
|
|
|
2200
|
- // await tableManagerModel.setReserveInfo(context,
|
|
|
|
2201
|
- // needKeep: true, guest: widget.guest);
|
|
|
|
2202
|
- // if (_model != null &&
|
|
|
|
2203
|
- // ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
2204
|
- // ObjectUtil.isNotEmpty(_model.row.id)) {
|
|
|
|
2205
|
- // print('成功');
|
|
|
|
2206
|
- // tableManagerModel.selectTables = [];
|
|
|
|
2207
|
- // // _homeEnterModel.clearData();
|
|
|
|
2208
|
- // bus.emit("refresh_tablemanager"); //刷新当前页面
|
|
|
|
2209
|
- // bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
2210
|
- // // //进入订座详情页面
|
|
|
|
2211
|
- // // NavigatorUtil.goNotebookDetailPage(
|
|
|
|
2212
|
- // // context,
|
|
|
|
2213
|
- // // _model.row.id,
|
|
|
|
2214
|
- // // Provider.of<UserModel>(context, listen: false)
|
|
|
|
2215
|
- // // .user
|
|
|
|
2216
|
- // // .openid,
|
|
|
|
2217
|
- // // );
|
|
|
|
2218
|
- // String ddate_solt = '';
|
|
|
|
2219
|
- // if (_model.row.isSetDdate == '1') {
|
|
|
|
2220
|
- // String createtime = _model.row.ddate.toString() + '000';
|
|
|
|
2221
|
- // DateTime createTime =
|
|
|
|
2222
|
- // DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
2223
|
- // int.parse(createtime));
|
|
|
|
2224
|
- // ddate_solt = DateUtil.formatDate(createTime,
|
|
|
|
2225
|
- // format: DateFormats.h_m);
|
|
|
|
2226
|
- // } else {
|
|
|
|
2227
|
- // if (_model.row.ddateSolt == '1') {
|
|
|
|
2228
|
- // ddate_solt = '早餐';
|
|
|
|
2229
|
- // } else if (_model.row.ddateSolt == '2') {
|
|
|
|
2230
|
- // ddate_solt = '午餐';
|
|
|
|
2231
|
- // } else if (_model.row.ddateSolt == '3') {
|
|
|
|
2232
|
- // ddate_solt = '晚餐';
|
|
|
|
2233
|
- // }
|
|
|
|
2234
|
- // }
|
|
|
|
2235
|
- // List<dynamic> tableinfo =
|
|
|
|
2236
|
- // convert.jsonDecode(_model.row.tableinfo);
|
|
|
|
2237
|
- // print(tableinfo);
|
|
|
|
2238
|
-
|
|
|
|
2239
|
- // // String _nameStr =
|
|
|
|
2240
|
- // // table.TableList.fromJson(tableinfo[0]).name;
|
|
|
|
2241
|
- // // if (tableinfo.length > 1) {
|
|
|
|
2242
|
- // // _nameStr = table.TableList.fromJson(tableinfo[0]).name +
|
|
|
|
2243
|
- // // '等${tableinfo.length}桌';
|
|
|
|
2244
|
- // // }
|
|
|
|
2245
|
- // // LogUtil.v(_nameStr);
|
|
|
|
2246
|
- // // String _tid = '';
|
|
|
|
2247
|
- // // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2248
|
- // // _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2249
|
- // // }
|
|
|
|
2250
|
- // // if (_tid.endsWith(',')) {
|
|
|
|
2251
|
- // // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2252
|
- // // }
|
|
|
|
2253
|
- // String _nameStr = '';
|
|
|
|
2254
|
- // String _tid = '';
|
|
|
|
2255
|
- // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2256
|
- // _nameStr +=
|
|
|
|
2257
|
- // '${table.TableList.fromJson(tableinfo[i]).name},';
|
|
|
|
2258
|
-
|
|
|
|
2259
|
- // _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2260
|
- // }
|
|
|
|
2261
|
- // if (_tid.endsWith(',')) {
|
|
|
|
2262
|
- // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2263
|
- // }
|
|
|
|
2264
|
- // if (_nameStr.endsWith(',')) {
|
|
|
|
2265
|
- // _nameStr = _nameStr.substring(0, _nameStr.length - 1);
|
|
|
|
2266
|
- // }
|
|
|
|
2267
|
- // NavigatorUtil.goInvicationPage(
|
|
|
|
2268
|
- // context,
|
|
|
|
2269
|
- // _model.row.id,
|
|
|
|
2270
|
- // _nameStr,
|
|
|
|
2271
|
- // _model.row.ddate,
|
|
|
|
2272
|
- // ddate_solt,
|
|
|
|
2273
|
- // _model.row.phone,
|
|
|
|
2274
|
- // _model.row.ddateSolt,
|
|
|
|
2275
|
- // _model.row.rname == null ? '' : _model.row.rname,
|
|
|
|
2276
|
- // _model.row.sex == null ? '' : _model.row.sex,
|
|
|
|
2277
|
- // tid: _tid,
|
|
|
|
2278
|
- // replace: false);
|
|
|
|
2279
|
- // // //今天 明天 其他天
|
|
|
|
2280
|
- // // String tempTime = _homeEnterModel.ddateStr;
|
|
|
|
2281
|
- // // if (_homeEnterModel.ddateStr == '') {
|
|
|
|
2282
|
- // // if (currTimeIndex == 1) {
|
|
|
|
2283
|
- // // tempTime = '08:00';
|
|
|
|
2284
|
- // // } else if (currTimeIndex == 2) {
|
|
|
|
2285
|
- // // tempTime = '12:00';
|
|
|
|
2286
|
- // // } else if (currTimeIndex == 3) {
|
|
|
|
2287
|
- // // tempTime = '18:00';
|
|
|
|
2288
|
- // // }
|
|
|
|
2289
|
- // // }
|
|
|
|
2290
|
- // // print(_model.row.tableinfo);
|
|
|
|
2291
|
- // // _clearData();
|
|
|
|
2292
|
- // // String timeStr = dateText + ' ' + tempTime + ':00';
|
|
|
|
2293
|
-
|
|
|
|
2294
|
- // // LogUtil.v(timeStr);
|
|
|
|
2295
|
- // // int ddate = DateUtil.getDateMsByTimeStr(timeStr);
|
|
|
|
2296
|
-
|
|
|
|
2297
|
- // // _homeEnterModel.getNewTableList(context, '${ddate}',
|
|
|
|
2298
|
- // // currTimeIndex.toString(), pnum);
|
|
|
|
2299
|
-
|
|
|
|
2300
|
- // // EventBus().emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
2301
|
- // } else {
|
|
|
|
2302
|
- // Utils.showToast("预订失败!");
|
|
|
|
2303
|
- // }
|
|
|
|
2304
|
- // },
|
|
|
|
2305
|
- // text: '预订并通知',
|
|
|
|
2306
|
- // fontSize: 32,
|
|
|
|
2307
|
- // isBold: false,
|
|
|
|
2308
|
- // width: ScreenUtil().setWidth(220),
|
|
|
|
2309
|
- // height: ScreenUtil().setWidth(90),
|
|
|
|
2310
|
- // padding: EdgeInsets.symmetric(
|
|
|
|
2311
|
- // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
2312
|
- // vertical: ScreenUtil().setWidth(4)),
|
|
|
|
2313
|
- // textColor: MyColours.color_ffffff,
|
|
|
|
2314
|
- // gradientStart: MyColours.color_199095,
|
|
|
|
2315
|
- // gradientEnd: MyColours.color_199095,
|
|
|
|
2316
|
- // radius: ScreenUtil().setWidth(10),
|
|
|
|
2317
|
- // borderColor: MyColours.color_199095,
|
|
|
|
2318
|
- // ),
|
|
|
|
2319
|
- // ],
|
|
|
|
2320
|
- // ),
|
|
|
|
2321
|
- // ),
|
|
|
|
2322
|
- wechatNotification || showErro == ''
|
|
|
|
2323
|
- ? VEmptyView(62)
|
|
|
|
2324
|
- : Container(
|
|
|
|
2325
|
- padding: EdgeInsets.only(
|
|
|
|
2326
|
- left: ScreenUtil().setWidth(36),
|
|
|
|
2327
|
- top: ScreenUtil().setWidth(12),
|
|
|
|
2328
|
- right: ScreenUtil().setWidth(36),
|
|
|
|
2329
|
- bottom: ScreenUtil().setWidth(18),
|
|
|
|
2330
|
- ),
|
|
|
|
2331
|
- child: Row(
|
|
|
|
2332
|
- children: [
|
|
|
|
2333
|
- Image.asset(Utils.getImgPath('error_circle_red'),
|
|
|
|
2334
|
- width: ScreenUtil().setWidth(44)),
|
|
|
|
2335
|
- HEmptyView(16),
|
|
|
|
2336
|
- Text(
|
|
|
|
2337
|
- showErro,
|
|
|
|
2338
|
- style: TextStyle(
|
|
|
|
2339
|
- color: MyColours.color_E34D59,
|
|
|
|
2340
|
- fontSize: ScreenUtil().setSp(28)),
|
|
|
|
2341
|
- )
|
|
|
|
2342
|
- ],
|
|
|
|
2343
|
- ),
|
|
|
|
2344
|
- )
|
|
|
|
2345
|
- ],
|
|
|
|
2346
|
- ),
|
|
|
|
2347
|
- );
|
2179
|
+ // Row(
|
|
|
|
2180
|
+ // crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2181
|
+ // children: [
|
|
|
|
2182
|
+ // // HEmptyView(15),
|
|
|
|
2183
|
+ // Padding(
|
|
|
|
2184
|
+ // // width: ScreenUtil().setWidth(120),
|
|
|
|
2185
|
+ // padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
|
|
|
|
2186
|
+ // child: Text(
|
|
|
|
2187
|
+ // '已选桌位:',
|
|
|
|
2188
|
+ // style: TextStyle(
|
|
|
|
2189
|
+ // color: MyColours.color_333333,
|
|
|
|
2190
|
+ // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
2191
|
+ // )),
|
|
|
|
2192
|
+ // HEmptyView(15),
|
|
|
|
2193
|
+ // // Expanded(
|
|
|
|
2194
|
+ // // child:
|
|
|
|
2195
|
+ // // width: ScreenUtil().screenWidth -
|
|
|
|
2196
|
+ // // ScreenUtil().setWidth(160),
|
|
|
|
2197
|
+ // // constraints:
|
|
|
|
2198
|
+ // // BoxConstraints(maxHeight: ScreenUtil().setWidth(140)),
|
|
|
|
2199
|
+ // // color: Colors.blueAccent,
|
|
|
|
2200
|
+
|
|
|
|
2201
|
+ // // ListView.builder(
|
|
|
|
2202
|
+ // // shrinkWrap: true,
|
|
|
|
2203
|
+ // // itemBuilder: (BuildContext context, int index) {
|
|
|
|
2204
|
+ // // return
|
|
|
|
2205
|
+ // // Scrollbar(
|
|
|
|
2206
|
+ // // isAlwaysShown: true, //设置滚动条常亮
|
|
|
|
2207
|
+ // // controller: _scrollCrl, //必须设置一个controller
|
|
|
|
2208
|
+
|
|
|
|
2209
|
+ // // ///添加进度条
|
|
|
|
2210
|
+ // // child:
|
|
|
|
2211
|
+ // // SingleChildScrollView(
|
|
|
|
2212
|
+ // // controller: _scrollCrl,
|
|
|
|
2213
|
+ // // child:
|
|
|
|
2214
|
+ // Container(
|
|
|
|
2215
|
+ // // color: Colors.red,
|
|
|
|
2216
|
+ // width: ScreenUtil().screenWidth -
|
|
|
|
2217
|
+ // ScreenUtil().setWidth(100 + 130),
|
|
|
|
2218
|
+ // child: Wrap(
|
|
|
|
2219
|
+ // spacing: ScreenUtil().setWidth(20),
|
|
|
|
2220
|
+ // runSpacing: ScreenUtil().setWidth(20),
|
|
|
|
2221
|
+ // children: _buildAlwayItems())),
|
|
|
|
2222
|
+ // // )
|
|
|
|
2223
|
+ // // )
|
|
|
|
2224
|
+ // // },
|
|
|
|
2225
|
+ // // itemCount: 1,
|
|
|
|
2226
|
+ // // ),
|
|
|
|
2227
|
+ // // )
|
|
|
|
2228
|
+ // ],
|
|
|
|
2229
|
+ // ),
|
|
|
|
2230
|
+ // VEmptyView(40),
|
|
|
|
2231
|
+ // Container(
|
|
|
|
2232
|
+ // // width: ScreenUtil().setWidth(100),
|
|
|
|
2233
|
+ // // color: Colors.red,
|
|
|
|
2234
|
+ // // constraints: BoxConstraints(
|
|
|
|
2235
|
+ // // minHeight: ScreenUtil().setWidth(500),
|
|
|
|
2236
|
+ // // ),
|
|
|
|
2237
|
+ // child: Row(
|
|
|
|
2238
|
+ // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
2239
|
+ // children: [
|
|
|
|
2240
|
+ // InkWell(
|
|
|
|
2241
|
+ // onTap: () {
|
|
|
|
2242
|
+ // tableManagerModel.selectTables = [];
|
|
|
|
2243
|
+ // for (t.Table item in tableManagerModel.tablesShow) {
|
|
|
|
2244
|
+ // item.selected = false;
|
|
|
|
2245
|
+ // }
|
|
|
|
2246
|
+ // tableManagerModel.areaTableMapShow.forEach((key, value) {
|
|
|
|
2247
|
+ // value.forEach((element) {
|
|
|
|
2248
|
+ // element.selected = false;
|
|
|
|
2249
|
+ // });
|
|
|
|
2250
|
+ // });
|
|
|
|
2251
|
+
|
|
|
|
2252
|
+ // tableManagerModel.notifyListeners();
|
|
|
|
2253
|
+ // },
|
|
|
|
2254
|
+ // child: Container(
|
|
|
|
2255
|
+ // padding: EdgeInsets.all(
|
|
|
|
2256
|
+ // ScreenUtil().setWidth(30),
|
|
|
|
2257
|
+ // ),
|
|
|
|
2258
|
+ // child: Text(
|
|
|
|
2259
|
+ // '取消重置',
|
|
|
|
2260
|
+ // style: TextStyle(
|
|
|
|
2261
|
+ // color: MyColours.color_199095,
|
|
|
|
2262
|
+ // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
2263
|
+ // ),
|
|
|
|
2264
|
+ // ),
|
|
|
|
2265
|
+ // ),
|
|
|
|
2266
|
+ // RoundButton(
|
|
|
|
2267
|
+ // onPressed: () async {
|
|
|
|
2268
|
+ // SunReserveInfoModel _model =
|
|
|
|
2269
|
+ // await tableManagerModel.setReserveInfo(context,
|
|
|
|
2270
|
+ // needKeep: true, guest: widget.guest);
|
|
|
|
2271
|
+ // if (_model != null &&
|
|
|
|
2272
|
+ // ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
2273
|
+ // ObjectUtil.isNotEmpty(_model.row.id)) {
|
|
|
|
2274
|
+ // print('成功');
|
|
|
|
2275
|
+ // tableManagerModel.selectTables = [];
|
|
|
|
2276
|
+ // // _homeEnterModel.clearData();
|
|
|
|
2277
|
+ // bus.emit("refresh_tablemanager"); //刷新当前页面
|
|
|
|
2278
|
+ // bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
2279
|
+ // //进入订座详情页面
|
|
|
|
2280
|
+ // // NavigatorUtil.goNotebookDetailPage(
|
|
|
|
2281
|
+ // // context,
|
|
|
|
2282
|
+ // // _model.row.id,
|
|
|
|
2283
|
+ // // Provider.of<UserModel>(context, listen: false)
|
|
|
|
2284
|
+ // // .user
|
|
|
|
2285
|
+ // // .openid,
|
|
|
|
2286
|
+ // // );
|
|
|
|
2287
|
+ // // String ddate_solt = '';
|
|
|
|
2288
|
+ // // if (_model.row.isSetDdate == '1') {
|
|
|
|
2289
|
+ // // String createtime =
|
|
|
|
2290
|
+ // // _model.row.ddate.toString() + '000';
|
|
|
|
2291
|
+ // // DateTime createTime =
|
|
|
|
2292
|
+ // // DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
2293
|
+ // // int.parse(createtime));
|
|
|
|
2294
|
+ // // ddate_solt = DateUtil.formatDate(createTime,
|
|
|
|
2295
|
+ // // format: DateFormats.h_m);
|
|
|
|
2296
|
+ // // } else {
|
|
|
|
2297
|
+ // // if (_model.row.ddateSolt == '1') {
|
|
|
|
2298
|
+ // // ddate_solt = '早餐';
|
|
|
|
2299
|
+ // // } else if (_model.row.ddateSolt == '2') {
|
|
|
|
2300
|
+ // // ddate_solt = '午餐';
|
|
|
|
2301
|
+ // // } else if (_model.row.ddateSolt == '3') {
|
|
|
|
2302
|
+ // // ddate_solt = '晚餐';
|
|
|
|
2303
|
+ // // }
|
|
|
|
2304
|
+ // // }
|
|
|
|
2305
|
+ // // List<dynamic> tableinfo =
|
|
|
|
2306
|
+ // // convert.jsonDecode(_model.row.tableinfo);
|
|
|
|
2307
|
+ // // print(tableinfo);
|
|
|
|
2308
|
+
|
|
|
|
2309
|
+ // // String _nameStr =
|
|
|
|
2310
|
+ // // t.TableList.fromJson(tableinfo[0]).name;
|
|
|
|
2311
|
+ // // if (tableinfo.length > 1) {
|
|
|
|
2312
|
+ // // _nameStr = t.TableList.fromJson(tableinfo[0]).name +
|
|
|
|
2313
|
+ // // '等${tableinfo.length}桌';
|
|
|
|
2314
|
+ // // }
|
|
|
|
2315
|
+ // // LogUtil.v(_nameStr);
|
|
|
|
2316
|
+ // // String _tid = '';
|
|
|
|
2317
|
+ // // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2318
|
+ // // _tid += '${t.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2319
|
+ // // }
|
|
|
|
2320
|
+ // // if (_tid.endsWith(',')) {
|
|
|
|
2321
|
+ // // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2322
|
+ // // }
|
|
|
|
2323
|
+ // // NavigatorUtil.goInvicationPage(
|
|
|
|
2324
|
+ // // context,
|
|
|
|
2325
|
+ // // _model.row.id,
|
|
|
|
2326
|
+ // // _nameStr,
|
|
|
|
2327
|
+ // // _model.row.ddate,
|
|
|
|
2328
|
+ // // ddate_solt,
|
|
|
|
2329
|
+ // // _model.row.phone,
|
|
|
|
2330
|
+ // // _model.row.ddateSolt,
|
|
|
|
2331
|
+ // // tid: _tid,
|
|
|
|
2332
|
+ // // replace: false);
|
|
|
|
2333
|
+ // // //今天 明天 其他天
|
|
|
|
2334
|
+ // // String tempTime = _homeEnterModel.ddateStr;
|
|
|
|
2335
|
+ // // if (_homeEnterModel.ddateStr == '') {
|
|
|
|
2336
|
+ // // if (currTimeIndex == 1) {
|
|
|
|
2337
|
+ // // tempTime = '08:00';
|
|
|
|
2338
|
+ // // } else if (currTimeIndex == 2) {
|
|
|
|
2339
|
+ // // tempTime = '12:00';
|
|
|
|
2340
|
+ // // } else if (currTimeIndex == 3) {
|
|
|
|
2341
|
+ // // tempTime = '18:00';
|
|
|
|
2342
|
+ // // }
|
|
|
|
2343
|
+ // // }
|
|
|
|
2344
|
+ // // print(_model.row.tableinfo);
|
|
|
|
2345
|
+ // // _clearData();
|
|
|
|
2346
|
+ // // String timeStr = dateText + ' ' + tempTime + ':00';
|
|
|
|
2347
|
+
|
|
|
|
2348
|
+ // // LogUtil.v(timeStr);
|
|
|
|
2349
|
+ // // int ddate = DateUtil.getDateMsByTimeStr(timeStr);
|
|
|
|
2350
|
+
|
|
|
|
2351
|
+ // // _homeEnterModel.getNewTableList(context, '${ddate}',
|
|
|
|
2352
|
+ // // currTimeIndex.toString(), pnum);
|
|
|
|
2353
|
+
|
|
|
|
2354
|
+ // // EventBus().emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
2355
|
+ // } else {
|
|
|
|
2356
|
+ // Utils.showToast("预订失败!");
|
|
|
|
2357
|
+ // }
|
|
|
|
2358
|
+ // },
|
|
|
|
2359
|
+ // text: '仅预订',
|
|
|
|
2360
|
+ // fontSize: 32,
|
|
|
|
2361
|
+ // isBold: false,
|
|
|
|
2362
|
+ // width: ScreenUtil().setWidth(180),
|
|
|
|
2363
|
+ // height: ScreenUtil().setWidth(90),
|
|
|
|
2364
|
+ // padding: EdgeInsets.symmetric(
|
|
|
|
2365
|
+ // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
2366
|
+ // vertical: ScreenUtil().setWidth(4)),
|
|
|
|
2367
|
+ // textColor: MyColours.color_199095,
|
|
|
|
2368
|
+ // gradientStart: MyColours.color_ffffff,
|
|
|
|
2369
|
+ // gradientEnd: MyColours.color_ffffff,
|
|
|
|
2370
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2371
|
+ // borderColor: MyColours.color_199095,
|
|
|
|
2372
|
+ // ),
|
|
|
|
2373
|
+ // RoundButton(
|
|
|
|
2374
|
+ // onPressed: () async {
|
|
|
|
2375
|
+ // SunReserveInfoModel _model =
|
|
|
|
2376
|
+ // await tableManagerModel.setReserveInfo(context,
|
|
|
|
2377
|
+ // needKeep: true, guest: widget.guest);
|
|
|
|
2378
|
+ // if (_model != null &&
|
|
|
|
2379
|
+ // ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
2380
|
+ // ObjectUtil.isNotEmpty(_model.row.id)) {
|
|
|
|
2381
|
+ // print('成功');
|
|
|
|
2382
|
+ // tableManagerModel.selectTables = [];
|
|
|
|
2383
|
+ // // _homeEnterModel.clearData();
|
|
|
|
2384
|
+ // bus.emit("refresh_tablemanager"); //刷新当前页面
|
|
|
|
2385
|
+ // bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
2386
|
+ // // //进入订座详情页面
|
|
|
|
2387
|
+ // // NavigatorUtil.goNotebookDetailPage(
|
|
|
|
2388
|
+ // // context,
|
|
|
|
2389
|
+ // // _model.row.id,
|
|
|
|
2390
|
+ // // Provider.of<UserModel>(context, listen: false)
|
|
|
|
2391
|
+ // // .user
|
|
|
|
2392
|
+ // // .openid,
|
|
|
|
2393
|
+ // // );
|
|
|
|
2394
|
+ // String ddate_solt = '';
|
|
|
|
2395
|
+ // if (_model.row.isSetDdate == '1') {
|
|
|
|
2396
|
+ // String createtime = _model.row.ddate.toString() + '000';
|
|
|
|
2397
|
+ // DateTime createTime =
|
|
|
|
2398
|
+ // DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
2399
|
+ // int.parse(createtime));
|
|
|
|
2400
|
+ // ddate_solt = DateUtil.formatDate(createTime,
|
|
|
|
2401
|
+ // format: DateFormats.h_m);
|
|
|
|
2402
|
+ // } else {
|
|
|
|
2403
|
+ // if (_model.row.ddateSolt == '1') {
|
|
|
|
2404
|
+ // ddate_solt = '早餐';
|
|
|
|
2405
|
+ // } else if (_model.row.ddateSolt == '2') {
|
|
|
|
2406
|
+ // ddate_solt = '午餐';
|
|
|
|
2407
|
+ // } else if (_model.row.ddateSolt == '3') {
|
|
|
|
2408
|
+ // ddate_solt = '晚餐';
|
|
|
|
2409
|
+ // }
|
|
|
|
2410
|
+ // }
|
|
|
|
2411
|
+ // List<dynamic> tableinfo =
|
|
|
|
2412
|
+ // convert.jsonDecode(_model.row.tableinfo);
|
|
|
|
2413
|
+ // print(tableinfo);
|
|
|
|
2414
|
+
|
|
|
|
2415
|
+ // // String _nameStr =
|
|
|
|
2416
|
+ // // table.TableList.fromJson(tableinfo[0]).name;
|
|
|
|
2417
|
+ // // if (tableinfo.length > 1) {
|
|
|
|
2418
|
+ // // _nameStr = table.TableList.fromJson(tableinfo[0]).name +
|
|
|
|
2419
|
+ // // '等${tableinfo.length}桌';
|
|
|
|
2420
|
+ // // }
|
|
|
|
2421
|
+ // // LogUtil.v(_nameStr);
|
|
|
|
2422
|
+ // // String _tid = '';
|
|
|
|
2423
|
+ // // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2424
|
+ // // _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2425
|
+ // // }
|
|
|
|
2426
|
+ // // if (_tid.endsWith(',')) {
|
|
|
|
2427
|
+ // // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2428
|
+ // // }
|
|
|
|
2429
|
+ // String _nameStr = '';
|
|
|
|
2430
|
+ // String _tid = '';
|
|
|
|
2431
|
+ // for (int i = 0; i < tableinfo.length; i++) {
|
|
|
|
2432
|
+ // _nameStr +=
|
|
|
|
2433
|
+ // '${table.TableList.fromJson(tableinfo[i]).name},';
|
|
|
|
2434
|
+
|
|
|
|
2435
|
+ // _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
|
|
|
|
2436
|
+ // }
|
|
|
|
2437
|
+ // if (_tid.endsWith(',')) {
|
|
|
|
2438
|
+ // _tid = _tid.substring(0, _tid.length - 1);
|
|
|
|
2439
|
+ // }
|
|
|
|
2440
|
+ // if (_nameStr.endsWith(',')) {
|
|
|
|
2441
|
+ // _nameStr = _nameStr.substring(0, _nameStr.length - 1);
|
|
|
|
2442
|
+ // }
|
|
|
|
2443
|
+ // NavigatorUtil.goInvicationPage(
|
|
|
|
2444
|
+ // context,
|
|
|
|
2445
|
+ // _model.row.id,
|
|
|
|
2446
|
+ // _nameStr,
|
|
|
|
2447
|
+ // _model.row.ddate,
|
|
|
|
2448
|
+ // ddate_solt,
|
|
|
|
2449
|
+ // _model.row.phone,
|
|
|
|
2450
|
+ // _model.row.ddateSolt,
|
|
|
|
2451
|
+ // _model.row.rname == null ? '' : _model.row.rname,
|
|
|
|
2452
|
+ // _model.row.sex == null ? '' : _model.row.sex,
|
|
|
|
2453
|
+ // tid: _tid,
|
|
|
|
2454
|
+ // replace: false);
|
|
|
|
2455
|
+ // // //今天 明天 其他天
|
|
|
|
2456
|
+ // // String tempTime = _homeEnterModel.ddateStr;
|
|
|
|
2457
|
+ // // if (_homeEnterModel.ddateStr == '') {
|
|
|
|
2458
|
+ // // if (currTimeIndex == 1) {
|
|
|
|
2459
|
+ // // tempTime = '08:00';
|
|
|
|
2460
|
+ // // } else if (currTimeIndex == 2) {
|
|
|
|
2461
|
+ // // tempTime = '12:00';
|
|
|
|
2462
|
+ // // } else if (currTimeIndex == 3) {
|
|
|
|
2463
|
+ // // tempTime = '18:00';
|
|
|
|
2464
|
+ // // }
|
|
|
|
2465
|
+ // // }
|
|
|
|
2466
|
+ // // print(_model.row.tableinfo);
|
|
|
|
2467
|
+ // // _clearData();
|
|
|
|
2468
|
+ // // String timeStr = dateText + ' ' + tempTime + ':00';
|
|
|
|
2469
|
+
|
|
|
|
2470
|
+ // // LogUtil.v(timeStr);
|
|
|
|
2471
|
+ // // int ddate = DateUtil.getDateMsByTimeStr(timeStr);
|
|
|
|
2472
|
+
|
|
|
|
2473
|
+ // // _homeEnterModel.getNewTableList(context, '${ddate}',
|
|
|
|
2474
|
+ // // currTimeIndex.toString(), pnum);
|
|
|
|
2475
|
+
|
|
|
|
2476
|
+ // // EventBus().emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
2477
|
+ // } else {
|
|
|
|
2478
|
+ // Utils.showToast("预订失败!");
|
|
|
|
2479
|
+ // }
|
|
|
|
2480
|
+ // },
|
|
|
|
2481
|
+ // text: '预订并通知',
|
|
|
|
2482
|
+ // fontSize: 32,
|
|
|
|
2483
|
+ // isBold: false,
|
|
|
|
2484
|
+ // width: ScreenUtil().setWidth(220),
|
|
|
|
2485
|
+ // height: ScreenUtil().setWidth(90),
|
|
|
|
2486
|
+ // padding: EdgeInsets.symmetric(
|
|
|
|
2487
|
+ // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
2488
|
+ // vertical: ScreenUtil().setWidth(4)),
|
|
|
|
2489
|
+ // textColor: MyColours.color_ffffff,
|
|
|
|
2490
|
+ // gradientStart: MyColours.color_199095,
|
|
|
|
2491
|
+ // gradientEnd: MyColours.color_199095,
|
|
|
|
2492
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2493
|
+ // borderColor: MyColours.color_199095,
|
|
|
|
2494
|
+ // ),
|
|
|
|
2495
|
+ // ],
|
|
|
|
2496
|
+ // ),
|
|
|
|
2497
|
+ // ),
|
|
|
|
2498
|
+ showErro == ''
|
|
|
|
2499
|
+ ? VEmptyView(62)
|
|
|
|
2500
|
+ : Container(
|
|
|
|
2501
|
+ padding: EdgeInsets.only(
|
|
|
|
2502
|
+ left: ScreenUtil().setWidth(36),
|
|
|
|
2503
|
+ top: ScreenUtil().setWidth(12),
|
|
|
|
2504
|
+ right: ScreenUtil().setWidth(36),
|
|
|
|
2505
|
+ bottom: ScreenUtil().setWidth(18),
|
|
|
|
2506
|
+ ),
|
|
|
|
2507
|
+ child: Row(
|
|
|
|
2508
|
+ children: [
|
|
|
|
2509
|
+ Image.asset(Utils.getImgPath('error_circle_red'),
|
|
|
|
2510
|
+ width: ScreenUtil().setWidth(44)),
|
|
|
|
2511
|
+ HEmptyView(16),
|
|
|
|
2512
|
+ Text(
|
|
|
|
2513
|
+ showErro,
|
|
|
|
2514
|
+ style: TextStyle(
|
|
|
|
2515
|
+ color: MyColours.color_E34D59,
|
|
|
|
2516
|
+ fontSize: ScreenUtil().setSp(28)),
|
|
|
|
2517
|
+ )
|
|
|
|
2518
|
+ ],
|
|
|
|
2519
|
+ ),
|
|
|
|
2520
|
+ )
|
|
|
|
2521
|
+ ],
|
|
|
|
2522
|
+ ),
|
|
|
|
2523
|
+ ));
|
|
2348
|
}
|
2524
|
}
|
|
2349
|
|
2525
|
|
|
2350
|
//构建常用备注
|
2526
|
//构建常用备注
|
|
@@ -2452,6 +2628,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2452,6 +2628,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2452
|
couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
2628
|
couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
|
2453
|
myModel = Provider.of<MyModel>(context, listen: true);
|
2629
|
myModel = Provider.of<MyModel>(context, listen: true);
|
|
2454
|
return Scaffold(
|
2630
|
return Scaffold(
|
|
|
|
2631
|
+ resizeToAvoidBottomInset: false,
|
|
2455
|
appBar: widget.guest == null
|
2632
|
appBar: widget.guest == null
|
|
2456
|
? null
|
2633
|
? null
|
|
2457
|
: SystemAppBar(
|
2634
|
: SystemAppBar(
|
|
@@ -2918,7 +3095,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
@@ -2918,7 +3095,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
2918
|
child:
|
3095
|
child:
|
|
2919
|
item(tableManagerModel.selectNumber))),
|
3096
|
item(tableManagerModel.selectNumber))),
|
|
2920
|
tableManagerModel.selectTables.length > 0
|
3097
|
tableManagerModel.selectTables.length > 0
|
|
2921
|
- ? _selectTableWidget()
|
3098
|
+ ? wechatNotification
|
|
|
|
3099
|
+ ? _selectTableWidgetWechat()
|
|
|
|
3100
|
+ : Expanded(
|
|
|
|
3101
|
+ flex: 5, child: _selectTableWidgetSms())
|
|
2922
|
: SizedBox()
|
3102
|
: SizedBox()
|
|
2923
|
]))
|
3103
|
]))
|
|
2924
|
// return CCMenuPage.builder(
|
3104
|
// return CCMenuPage.builder(
|