|
@@ -21,6 +21,7 @@ import 'package:one_key/utils/event_bus.dart'; |
|
@@ -21,6 +21,7 @@ import 'package:one_key/utils/event_bus.dart'; |
|
21
|
import 'package:one_key/route/navigator_util.dart';
|
21
|
import 'package:one_key/route/navigator_util.dart';
|
|
22
|
import 'package:one_key/utils/utils.dart';
|
22
|
import 'package:one_key/utils/utils.dart';
|
|
23
|
import 'package:one_key/widgets/MyDivider.dart';
|
23
|
import 'package:one_key/widgets/MyDivider.dart';
|
|
|
|
24
|
+import 'package:one_key/widgets/common_button.dart';
|
|
24
|
|
25
|
|
|
25
|
import 'package:one_key/widgets/common_button_flat.dart';
|
26
|
import 'package:one_key/widgets/common_button_flat.dart';
|
|
26
|
import 'package:one_key/widgets/f_table_item.dart';
|
27
|
import 'package:one_key/widgets/f_table_item.dart';
|
|
@@ -154,90 +155,93 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -154,90 +155,93 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
154
|
itemBuilder: (BuildContext context, int index) {
|
155
|
itemBuilder: (BuildContext context, int index) {
|
|
155
|
if (index == tableManagerModel.tableOuterList[i].list.length ||
|
156
|
if (index == tableManagerModel.tableOuterList[i].list.length ||
|
|
156
|
tableManagerModel.tableOuterList[i].list.length == 0) {
|
157
|
tableManagerModel.tableOuterList[i].list.length == 0) {
|
|
157
|
- return InkWell(
|
|
|
|
158
|
- onTap: () async {
|
|
|
|
159
|
- List<String> areas = [];
|
|
|
|
160
|
- for (int i = 0; i < tableManagerModel.areas.length; i++) {
|
|
|
|
161
|
- areas.add(tableManagerModel.areas[i].name);
|
|
|
|
162
|
- }
|
|
|
|
163
|
-
|
|
|
|
164
|
- //添加桌位弹框
|
|
|
|
165
|
- await DialogUtil.openCreateTableDialog(
|
|
|
|
166
|
- context, areas, i, personNumList,
|
|
|
|
167
|
- onTap: (Map<String, String> value) async {
|
|
|
|
168
|
- print(value);
|
|
|
|
169
|
- // 'areaname':
|
|
|
|
170
|
- // areas[currentAreaIndex],
|
|
|
|
171
|
- // 'name': controller.text,
|
|
|
|
172
|
- // 'pnumMin': pnumMin,
|
|
|
|
173
|
- // 'pnumMax': pnumMax
|
|
|
|
174
|
- //添加桌位 接口参数带整合???
|
|
|
|
175
|
- // 以下是旧的不去,明天添加桌位接口
|
|
|
|
176
|
- String rid;
|
|
|
|
177
|
- for (Area item in tableManagerModel.areas) {
|
|
|
|
178
|
- if (item.name == value['areaname']) {
|
|
|
|
179
|
- rid = item.rid;
|
158
|
+ return Offstage(
|
|
|
|
159
|
+ offstage: tableManagerModel
|
|
|
|
160
|
+ .tableOuterList[tableManagerModel.selectNumber].isSelect,
|
|
|
|
161
|
+ child: InkWell(
|
|
|
|
162
|
+ onTap: () async {
|
|
|
|
163
|
+ List<String> areas = [];
|
|
|
|
164
|
+ for (int i = 0; i < tableManagerModel.areas.length; i++) {
|
|
|
|
165
|
+ areas.add(tableManagerModel.areas[i].name);
|
|
180
|
}
|
166
|
}
|
|
181
|
- }
|
|
|
|
182
|
- Map<String, String> params = {
|
|
|
|
183
|
- 'rid': rid,
|
|
|
|
184
|
- 'name': value['name'],
|
|
|
|
185
|
- };
|
|
|
|
186
|
- if (value['pnumMin'] != '') {
|
|
|
|
187
|
- params['pnum'] = value['pnumMin'];
|
|
|
|
188
|
- }
|
|
|
|
189
|
- if (value['pnumMax'] != '') {
|
|
|
|
190
|
- params['most_pnum'] = value['pnumMax'];
|
|
|
|
191
|
- }
|
|
|
|
192
|
- bool success =
|
|
|
|
193
|
- await tableManagerModel.addTable(context, params);
|
|
|
|
194
|
- print(success);
|
|
|
|
195
|
- if (success) {
|
|
|
|
196
|
- Utils.showToast('添加成功!');
|
|
|
|
197
|
- // TableOuter tableOuter = TableOuter();
|
|
|
|
198
|
- // tableOuter.name = value;
|
|
|
|
199
|
- // tableOuter.list = [];
|
|
|
|
200
|
- // tableManagerModel.tableOuterList.add(tableOuter);
|
|
|
|
201
|
- // tableManagerModel.initData();
|
|
|
|
202
|
- // Timer(
|
|
|
|
203
|
- // Duration(milliseconds: 500),
|
|
|
|
204
|
- // () => _areaController.jumpTo(
|
|
|
|
205
|
- // _areaController.position.maxScrollExtent));
|
|
|
|
206
|
|
167
|
|
|
207
|
- // await tableManagerModel
|
|
|
|
208
|
- // .getTableList(context);
|
|
|
|
209
|
- // await tableManagerModel
|
|
|
|
210
|
- // .initData();
|
|
|
|
211
|
- await tableManagerModel.refreshTable(context);
|
|
|
|
212
|
- }
|
|
|
|
213
|
- });
|
|
|
|
214
|
- },
|
|
|
|
215
|
- child: Container(
|
|
|
|
216
|
- child: DottedBorder(
|
|
|
|
217
|
- dashPattern: [8, 8, 8, 8],
|
|
|
|
218
|
- borderType: BorderType.RRect,
|
|
|
|
219
|
- radius: Radius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
220
|
- // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
221
|
- color: MyColours.color_438E93,
|
|
|
|
222
|
- strokeWidth: ScreenUtil().setWidth(2),
|
|
|
|
223
|
- child: ClipRRect(
|
|
|
|
224
|
- borderRadius: BorderRadius.all(
|
|
|
|
225
|
- Radius.circular(ScreenUtil().setWidth(10))),
|
168
|
+ //添加桌位弹框
|
|
|
|
169
|
+ await DialogUtil.openCreateTableDialog(
|
|
|
|
170
|
+ context, areas, i, personNumList,
|
|
|
|
171
|
+ onTap: (Map<String, String> value) async {
|
|
|
|
172
|
+ print(value);
|
|
|
|
173
|
+ // 'areaname':
|
|
|
|
174
|
+ // areas[currentAreaIndex],
|
|
|
|
175
|
+ // 'name': controller.text,
|
|
|
|
176
|
+ // 'pnumMin': pnumMin,
|
|
|
|
177
|
+ // 'pnumMax': pnumMax
|
|
|
|
178
|
+ //添加桌位 接口参数带整合???
|
|
|
|
179
|
+ // 以下是旧的不去,明天添加桌位接口
|
|
|
|
180
|
+ String rid;
|
|
|
|
181
|
+ for (Area item in tableManagerModel.areas) {
|
|
|
|
182
|
+ if (item.name == value['areaname']) {
|
|
|
|
183
|
+ rid = item.rid;
|
|
|
|
184
|
+ }
|
|
|
|
185
|
+ }
|
|
|
|
186
|
+ Map<String, String> params = {
|
|
|
|
187
|
+ 'rid': rid,
|
|
|
|
188
|
+ 'name': value['name'],
|
|
|
|
189
|
+ };
|
|
|
|
190
|
+ if (value['pnumMin'] != '') {
|
|
|
|
191
|
+ params['pnum'] = value['pnumMin'];
|
|
|
|
192
|
+ }
|
|
|
|
193
|
+ if (value['pnumMax'] != '') {
|
|
|
|
194
|
+ params['most_pnum'] = value['pnumMax'];
|
|
|
|
195
|
+ }
|
|
|
|
196
|
+ bool success =
|
|
|
|
197
|
+ await tableManagerModel.addTable(context, params);
|
|
|
|
198
|
+ print(success);
|
|
|
|
199
|
+ if (success) {
|
|
|
|
200
|
+ Utils.showToast('添加成功!');
|
|
|
|
201
|
+ // TableOuter tableOuter = TableOuter();
|
|
|
|
202
|
+ // tableOuter.name = value;
|
|
|
|
203
|
+ // tableOuter.list = [];
|
|
|
|
204
|
+ // tableManagerModel.tableOuterList.add(tableOuter);
|
|
|
|
205
|
+ // tableManagerModel.initData();
|
|
|
|
206
|
+ // Timer(
|
|
|
|
207
|
+ // Duration(milliseconds: 500),
|
|
|
|
208
|
+ // () => _areaController.jumpTo(
|
|
|
|
209
|
+ // _areaController.position.maxScrollExtent));
|
|
|
|
210
|
+
|
|
|
|
211
|
+ // await tableManagerModel
|
|
|
|
212
|
+ // .getTableList(context);
|
|
|
|
213
|
+ // await tableManagerModel
|
|
|
|
214
|
+ // .initData();
|
|
|
|
215
|
+ await tableManagerModel.refreshTable(context);
|
|
|
|
216
|
+ }
|
|
|
|
217
|
+ });
|
|
|
|
218
|
+ },
|
|
226
|
child: Container(
|
219
|
child: Container(
|
|
227
|
- height: ScreenUtil.screenWidthDp -
|
|
|
|
228
|
- ScreenUtil().setWidth(48 * 3 + 32 * 2),
|
|
|
|
229
|
- width: ScreenUtil.screenWidthDp -
|
|
|
|
230
|
- ScreenUtil().setWidth(48 * 3 + 32 * 2),
|
|
|
|
231
|
- child: Column(
|
|
|
|
232
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
233
|
- children: [
|
|
|
|
234
|
- Image.asset(Utils.getImgPath('add_area'),
|
|
|
|
235
|
- width: ScreenUtil().setWidth(60)),
|
|
|
|
236
|
- ],
|
220
|
+ child: DottedBorder(
|
|
|
|
221
|
+ dashPattern: [8, 8, 8, 8],
|
|
|
|
222
|
+ borderType: BorderType.RRect,
|
|
|
|
223
|
+ radius: Radius.circular(ScreenUtil().setWidth(10)),
|
|
|
|
224
|
+ // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
225
|
+ color: MyColours.color_438E93,
|
|
|
|
226
|
+ strokeWidth: ScreenUtil().setWidth(2),
|
|
|
|
227
|
+ child: ClipRRect(
|
|
|
|
228
|
+ borderRadius: BorderRadius.all(
|
|
|
|
229
|
+ Radius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
230
|
+ child: Container(
|
|
|
|
231
|
+ height: ScreenUtil.screenWidthDp -
|
|
|
|
232
|
+ ScreenUtil().setWidth(48 * 3 + 32 * 2),
|
|
|
|
233
|
+ width: ScreenUtil.screenWidthDp -
|
|
|
|
234
|
+ ScreenUtil().setWidth(48 * 3 + 32 * 2),
|
|
|
|
235
|
+ child: Column(
|
|
|
|
236
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
237
|
+ children: [
|
|
|
|
238
|
+ Image.asset(Utils.getImgPath('add_area'),
|
|
|
|
239
|
+ width: ScreenUtil().setWidth(60)),
|
|
|
|
240
|
+ ],
|
|
|
|
241
|
+ ),
|
|
|
|
242
|
+ ),
|
|
237
|
),
|
243
|
),
|
|
238
|
- ),
|
|
|
|
239
|
- ),
|
|
|
|
240
|
- )));
|
244
|
+ ))));
|
|
241
|
} else {
|
245
|
} else {
|
|
242
|
return Selector<MyTableManageHomeModel, t.Table>(
|
246
|
return Selector<MyTableManageHomeModel, t.Table>(
|
|
243
|
shouldRebuild: (pre, next) => true,
|
247
|
shouldRebuild: (pre, next) => true,
|
|
@@ -338,89 +342,110 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -338,89 +342,110 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
338
|
.areas.length ||
|
342
|
.areas.length ||
|
|
339
|
tableManagerModel.areas.length ==
|
343
|
tableManagerModel.areas.length ==
|
|
340
|
0) {
|
344
|
0) {
|
|
341
|
- return InkWell(
|
|
|
|
342
|
- onTap: () async {
|
|
|
|
343
|
- //添加区域弹框
|
|
|
|
344
|
- await DialogUtil
|
|
|
|
345
|
- .openCreateAreaDialog(
|
|
|
|
346
|
- context,
|
|
|
|
347
|
- onTap: (value) async {
|
|
|
|
348
|
- print(value);
|
|
|
|
349
|
- //添加区域
|
|
|
|
350
|
- bool success =
|
|
|
|
351
|
- await tableManagerModel
|
|
|
|
352
|
- .addTableAreas(
|
|
|
|
353
|
- context, value);
|
|
|
|
354
|
- print(success);
|
|
|
|
355
|
- if (success) {
|
|
|
|
356
|
- Utils.showToast('添加成功!');
|
|
|
|
357
|
- tableManagerModel
|
|
|
|
358
|
- .currentArea = value;
|
345
|
+ return tableManagerModel
|
|
|
|
346
|
+ .tableOuterList[
|
|
|
|
347
|
+ tableManagerModel
|
|
|
|
348
|
+ .selectNumber]
|
|
|
|
349
|
+ .isSelect
|
|
|
|
350
|
+ ? SizedBox()
|
|
|
|
351
|
+ : InkWell(
|
|
|
|
352
|
+ onTap: () async {
|
|
|
|
353
|
+ //添加区域弹框
|
|
|
|
354
|
+ await DialogUtil
|
|
|
|
355
|
+ .openCreateAreaDialog(
|
|
|
|
356
|
+ context, onTap:
|
|
|
|
357
|
+ (value) async {
|
|
|
|
358
|
+ print(value);
|
|
|
|
359
|
+ //添加区域
|
|
|
|
360
|
+ bool success =
|
|
|
|
361
|
+ await tableManagerModel
|
|
|
|
362
|
+ .addTableAreas(
|
|
|
|
363
|
+ context,
|
|
|
|
364
|
+ value);
|
|
|
|
365
|
+ print(success);
|
|
|
|
366
|
+ if (success) {
|
|
|
|
367
|
+ Utils.showToast(
|
|
|
|
368
|
+ '添加成功!');
|
|
|
|
369
|
+ tableManagerModel
|
|
|
|
370
|
+ .currentArea =
|
|
|
|
371
|
+ value;
|
|
359
|
|
372
|
|
|
360
|
- await tableManagerModel
|
|
|
|
361
|
- .refreshTable(context);
|
|
|
|
362
|
- // await tableManagerModel
|
|
|
|
363
|
- // .getTableList(context,
|
|
|
|
364
|
- // needLoading: false);
|
|
|
|
365
|
- // tableManagerModel.initData();
|
373
|
+ await tableManagerModel
|
|
|
|
374
|
+ .refreshTable(
|
|
|
|
375
|
+ context);
|
|
|
|
376
|
+ // await tableManagerModel
|
|
|
|
377
|
+ // .getTableList(context,
|
|
|
|
378
|
+ // needLoading: false);
|
|
|
|
379
|
+ // tableManagerModel.initData();
|
|
366
|
|
380
|
|
|
367
|
- // setState(() {
|
|
|
|
368
|
- // updateMenu();
|
|
|
|
369
|
- // });
|
|
|
|
370
|
- // _scrollToIndex(widget
|
|
|
|
371
|
- // .tableManagerModel
|
|
|
|
372
|
- // .areas
|
|
|
|
373
|
- // .length);
|
381
|
+ // setState(() {
|
|
|
|
382
|
+ // updateMenu();
|
|
|
|
383
|
+ // });
|
|
|
|
384
|
+ // _scrollToIndex(widget
|
|
|
|
385
|
+ // .tableManagerModel
|
|
|
|
386
|
+ // .areas
|
|
|
|
387
|
+ // .length);
|
|
374
|
|
388
|
|
|
375
|
- }
|
|
|
|
376
|
- });
|
|
|
|
377
|
- },
|
|
|
|
378
|
- child: Column(
|
|
|
|
379
|
- children: [
|
|
|
|
380
|
- VEmptyView(20),
|
|
|
|
381
|
- DottedBorder(
|
|
|
|
382
|
- dashPattern: [2, 2, 2, 2],
|
|
|
|
383
|
- borderType:
|
|
|
|
384
|
- BorderType.RRect,
|
|
|
|
385
|
- radius: Radius.circular(
|
|
|
|
386
|
- ScreenUtil()
|
|
|
|
387
|
- .setWidth(10)),
|
|
|
|
388
|
- // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
389
|
- color:
|
|
|
|
390
|
- MyColours.color_999999,
|
|
|
|
391
|
- strokeWidth: ScreenUtil()
|
|
|
|
392
|
- .setWidth(2),
|
|
|
|
393
|
- child: ClipRRect(
|
|
|
|
394
|
- borderRadius:
|
|
|
|
395
|
- BorderRadius.all(
|
389
|
+ }
|
|
|
|
390
|
+ });
|
|
|
|
391
|
+ },
|
|
|
|
392
|
+ child: Column(
|
|
|
|
393
|
+ children: [
|
|
|
|
394
|
+ VEmptyView(20),
|
|
|
|
395
|
+ DottedBorder(
|
|
|
|
396
|
+ dashPattern: [
|
|
|
|
397
|
+ 2,
|
|
|
|
398
|
+ 2,
|
|
|
|
399
|
+ 2,
|
|
|
|
400
|
+ 2
|
|
|
|
401
|
+ ],
|
|
|
|
402
|
+ borderType:
|
|
|
|
403
|
+ BorderType.RRect,
|
|
|
|
404
|
+ radius:
|
|
396
|
Radius.circular(
|
405
|
Radius.circular(
|
|
397
|
ScreenUtil()
|
406
|
ScreenUtil()
|
|
398
|
.setWidth(
|
407
|
.setWidth(
|
|
399
|
- 10))),
|
|
|
|
400
|
- child: Container(
|
|
|
|
401
|
- height: ScreenUtil()
|
|
|
|
402
|
- .setWidth(28 * 2),
|
|
|
|
403
|
- width: ScreenUtil()
|
|
|
|
404
|
- .setWidth(48 * 2),
|
|
|
|
405
|
- child: Column(
|
|
|
|
406
|
- mainAxisAlignment:
|
|
|
|
407
|
- MainAxisAlignment
|
|
|
|
408
|
- .center,
|
|
|
|
409
|
- children: [
|
|
|
|
410
|
- Image.asset(
|
|
|
|
411
|
- Utils.getImgPath(
|
|
|
|
412
|
- 'add_store'),
|
|
|
|
413
|
- width: ScreenUtil()
|
|
|
|
414
|
- .setWidth(
|
|
|
|
415
|
- 24)),
|
|
|
|
416
|
- ],
|
|
|
|
417
|
- ),
|
|
|
|
418
|
- ),
|
408
|
+ 10)),
|
|
|
|
409
|
+ // padding: EdgeInsets.all(ScreenUtil().setWidth(70)),
|
|
|
|
410
|
+ color: MyColours
|
|
|
|
411
|
+ .color_999999,
|
|
|
|
412
|
+ strokeWidth:
|
|
|
|
413
|
+ ScreenUtil()
|
|
|
|
414
|
+ .setWidth(2),
|
|
|
|
415
|
+ child: ClipRRect(
|
|
|
|
416
|
+ borderRadius: BorderRadius.all(
|
|
|
|
417
|
+ Radius.circular(
|
|
|
|
418
|
+ ScreenUtil()
|
|
|
|
419
|
+ .setWidth(
|
|
|
|
420
|
+ 10))),
|
|
|
|
421
|
+ child: Container(
|
|
|
|
422
|
+ height:
|
|
|
|
423
|
+ ScreenUtil()
|
|
|
|
424
|
+ .setWidth(
|
|
|
|
425
|
+ 28 *
|
|
|
|
426
|
+ 2),
|
|
|
|
427
|
+ width: ScreenUtil()
|
|
|
|
428
|
+ .setWidth(
|
|
|
|
429
|
+ 48 * 2),
|
|
|
|
430
|
+ child: Column(
|
|
|
|
431
|
+ mainAxisAlignment:
|
|
|
|
432
|
+ MainAxisAlignment
|
|
|
|
433
|
+ .center,
|
|
|
|
434
|
+ children: [
|
|
|
|
435
|
+ Image.asset(
|
|
|
|
436
|
+ Utils.getImgPath(
|
|
|
|
437
|
+ 'add_store'),
|
|
|
|
438
|
+ width: ScreenUtil()
|
|
|
|
439
|
+ .setWidth(
|
|
|
|
440
|
+ 24)),
|
|
|
|
441
|
+ ],
|
|
|
|
442
|
+ ),
|
|
|
|
443
|
+ ),
|
|
|
|
444
|
+ ),
|
|
|
|
445
|
+ )
|
|
|
|
446
|
+ ],
|
|
419
|
),
|
447
|
),
|
|
420
|
- )
|
|
|
|
421
|
- ],
|
|
|
|
422
|
- ),
|
|
|
|
423
|
- );
|
448
|
+ );
|
|
424
|
} else {
|
449
|
} else {
|
|
425
|
return TableManageAreaItem(
|
450
|
return TableManageAreaItem(
|
|
426
|
model.areas[index],
|
451
|
model.areas[index],
|
|
@@ -446,8 +471,13 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -446,8 +471,13 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
446
|
InkWell(
|
471
|
InkWell(
|
|
447
|
onTap: () {
|
472
|
onTap: () {
|
|
448
|
if (tableManagerModel
|
473
|
if (tableManagerModel
|
|
449
|
- .tableOuterList.length >
|
|
|
|
450
|
- 0) {
|
474
|
+ .tableOuterList.length >
|
|
|
|
475
|
+ 0 &&
|
|
|
|
476
|
+ !tableManagerModel
|
|
|
|
477
|
+ .tableOuterList[
|
|
|
|
478
|
+ tableManagerModel
|
|
|
|
479
|
+ .selectNumber]
|
|
|
|
480
|
+ .isSelect) {
|
|
451
|
//区域管理页面跳转
|
481
|
//区域管理页面跳转
|
|
452
|
}
|
482
|
}
|
|
453
|
},
|
483
|
},
|
|
@@ -470,9 +500,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -470,9 +500,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
470
|
fontSize: ScreenUtil()
|
500
|
fontSize: ScreenUtil()
|
|
471
|
.setSp(28),
|
501
|
.setSp(28),
|
|
472
|
color: tableManagerModel
|
502
|
color: tableManagerModel
|
|
473
|
- .tableOuterList
|
|
|
|
474
|
- .length ==
|
|
|
|
475
|
- 0
|
503
|
+ .tableOuterList
|
|
|
|
504
|
+ .length ==
|
|
|
|
505
|
+ 0 ||
|
|
|
|
506
|
+ tableManagerModel
|
|
|
|
507
|
+ .tableOuterList[
|
|
|
|
508
|
+ tableManagerModel
|
|
|
|
509
|
+ .selectNumber]
|
|
|
|
510
|
+ .isSelect
|
|
476
|
? MyColours
|
511
|
? MyColours
|
|
477
|
.color_BFC4D4
|
512
|
.color_BFC4D4
|
|
478
|
: MyColours
|
513
|
: MyColours
|
|
@@ -612,55 +647,130 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -612,55 +647,130 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
612
|
.length ==
|
647
|
.length ==
|
|
613
|
0
|
648
|
0
|
|
614
|
? SizedBox()
|
649
|
? SizedBox()
|
|
615
|
- : InkWell(
|
|
|
|
616
|
- onTap: () {
|
|
|
|
617
|
- for (t.Table item
|
|
|
|
618
|
- in tableManagerModel
|
|
|
|
619
|
- .tableOuterList[
|
|
|
|
620
|
- tableManagerModel
|
|
|
|
621
|
- .selectNumber]
|
|
|
|
622
|
- .list) {
|
|
|
|
623
|
- item.selected = false;
|
|
|
|
624
|
- }
|
|
|
|
625
|
- setState(() {
|
|
|
|
626
|
- tableManagerModel
|
|
|
|
627
|
- .tableOuterList[
|
|
|
|
628
|
- tableManagerModel
|
|
|
|
629
|
- .selectNumber]
|
|
|
|
630
|
- .isSelect =
|
|
|
|
631
|
- !tableManagerModel
|
|
|
|
632
|
- .tableOuterList[
|
|
|
|
633
|
- tableManagerModel
|
|
|
|
634
|
- .selectNumber]
|
|
|
|
635
|
- .isSelect;
|
|
|
|
636
|
- });
|
|
|
|
637
|
- },
|
|
|
|
638
|
- child: Row(
|
|
|
|
639
|
- children: [
|
|
|
|
640
|
- Image.asset(
|
|
|
|
641
|
- Utils.getImgPath(tableManagerModel
|
650
|
+ : Row(children: [
|
|
|
|
651
|
+ InkWell(
|
|
|
|
652
|
+ onTap: () {
|
|
|
|
653
|
+ for (t.Table item
|
|
|
|
654
|
+ in tableManagerModel
|
|
642
|
.tableOuterList[
|
655
|
.tableOuterList[
|
|
643
|
tableManagerModel
|
656
|
tableManagerModel
|
|
644
|
.selectNumber]
|
657
|
.selectNumber]
|
|
645
|
- .isSelect
|
|
|
|
646
|
- ? 'base_radio_sel'
|
|
|
|
647
|
- : 'base_radio_un'),
|
|
|
|
648
|
- width: ScreenUtil()
|
|
|
|
649
|
- .setWidth(40),
|
|
|
|
650
|
- ),
|
|
|
|
651
|
- HEmptyView(10),
|
|
|
|
652
|
- Text(
|
|
|
|
653
|
- '批量选择桌位',
|
|
|
|
654
|
- style: TextStyle(
|
|
|
|
655
|
- fontSize:
|
658
|
+ .list) {
|
|
|
|
659
|
+ item.selected =
|
|
|
|
660
|
+ false;
|
|
|
|
661
|
+ }
|
|
|
|
662
|
+ setState(() {
|
|
|
|
663
|
+ tableManagerModel
|
|
|
|
664
|
+ .tableOuterList[
|
|
|
|
665
|
+ tableManagerModel
|
|
|
|
666
|
+ .selectNumber]
|
|
|
|
667
|
+ .isSelect =
|
|
|
|
668
|
+ !tableManagerModel
|
|
|
|
669
|
+ .tableOuterList[
|
|
|
|
670
|
+ tableManagerModel
|
|
|
|
671
|
+ .selectNumber]
|
|
|
|
672
|
+ .isSelect;
|
|
|
|
673
|
+ });
|
|
|
|
674
|
+ },
|
|
|
|
675
|
+ child: Row(
|
|
|
|
676
|
+ children: [
|
|
|
|
677
|
+ Image.asset(
|
|
|
|
678
|
+ Utils.getImgPath(tableManagerModel
|
|
|
|
679
|
+ .tableOuterList[
|
|
|
|
680
|
+ tableManagerModel
|
|
|
|
681
|
+ .selectNumber]
|
|
|
|
682
|
+ .isSelect
|
|
|
|
683
|
+ ? 'base_radio_sel'
|
|
|
|
684
|
+ : 'base_radio_un'),
|
|
|
|
685
|
+ width:
|
|
656
|
ScreenUtil()
|
686
|
ScreenUtil()
|
|
657
|
- .setSp(
|
|
|
|
658
|
- 32),
|
|
|
|
659
|
- color: MyColours
|
|
|
|
660
|
- .color_000000),
|
|
|
|
661
|
- )
|
|
|
|
662
|
- ],
|
|
|
|
663
|
- )),
|
687
|
+ .setWidth(
|
|
|
|
688
|
+ 40),
|
|
|
|
689
|
+ ),
|
|
|
|
690
|
+ HEmptyView(10),
|
|
|
|
691
|
+ Text(
|
|
|
|
692
|
+ '批量选择桌位',
|
|
|
|
693
|
+ style: TextStyle(
|
|
|
|
694
|
+ fontSize:
|
|
|
|
695
|
+ ScreenUtil()
|
|
|
|
696
|
+ .setSp(
|
|
|
|
697
|
+ 32),
|
|
|
|
698
|
+ color: MyColours
|
|
|
|
699
|
+ .color_000000),
|
|
|
|
700
|
+ ),
|
|
|
|
701
|
+ ],
|
|
|
|
702
|
+ )),
|
|
|
|
703
|
+ Spacer(),
|
|
|
|
704
|
+ tableManagerModel
|
|
|
|
705
|
+ .tableOuterList[
|
|
|
|
706
|
+ tableManagerModel
|
|
|
|
707
|
+ .selectNumber]
|
|
|
|
708
|
+ .isSelect
|
|
|
|
709
|
+ ? InkWell(
|
|
|
|
710
|
+ onTap: () {
|
|
|
|
711
|
+ tableManagerModel
|
|
|
|
712
|
+ .tableOuterList[
|
|
|
|
713
|
+ tableManagerModel
|
|
|
|
714
|
+ .selectNumber]
|
|
|
|
715
|
+ .isAll =
|
|
|
|
716
|
+ !tableManagerModel
|
|
|
|
717
|
+ .tableOuterList[
|
|
|
|
718
|
+ tableManagerModel
|
|
|
|
719
|
+ .selectNumber]
|
|
|
|
720
|
+ .isAll;
|
|
|
|
721
|
+ if (tableManagerModel
|
|
|
|
722
|
+ .tableOuterList[
|
|
|
|
723
|
+ tableManagerModel
|
|
|
|
724
|
+ .selectNumber]
|
|
|
|
725
|
+ .isAll) {
|
|
|
|
726
|
+ for (t.Table item
|
|
|
|
727
|
+ in tableManagerModel
|
|
|
|
728
|
+ .tableOuterList[
|
|
|
|
729
|
+ tableManagerModel.selectNumber]
|
|
|
|
730
|
+ .list) {
|
|
|
|
731
|
+ item.selected =
|
|
|
|
732
|
+ true;
|
|
|
|
733
|
+ }
|
|
|
|
734
|
+ } else {
|
|
|
|
735
|
+ for (t.Table item
|
|
|
|
736
|
+ in tableManagerModel
|
|
|
|
737
|
+ .tableOuterList[
|
|
|
|
738
|
+ tableManagerModel.selectNumber]
|
|
|
|
739
|
+ .list) {
|
|
|
|
740
|
+ item.selected =
|
|
|
|
741
|
+ false;
|
|
|
|
742
|
+ }
|
|
|
|
743
|
+ }
|
|
|
|
744
|
+ setState(() {});
|
|
|
|
745
|
+ },
|
|
|
|
746
|
+ child: Row(
|
|
|
|
747
|
+ crossAxisAlignment:
|
|
|
|
748
|
+ CrossAxisAlignment
|
|
|
|
749
|
+ .center,
|
|
|
|
750
|
+ children: [
|
|
|
|
751
|
+ Image.asset(
|
|
|
|
752
|
+ Utils.getImgPath(tableManagerModel
|
|
|
|
753
|
+ .tableOuterList[tableManagerModel
|
|
|
|
754
|
+ .selectNumber]
|
|
|
|
755
|
+ .isAll
|
|
|
|
756
|
+ ? 'mine_radio_sel'
|
|
|
|
757
|
+ : 'mine_radio_nor'),
|
|
|
|
758
|
+ width: ScreenUtil()
|
|
|
|
759
|
+ .setWidth(
|
|
|
|
760
|
+ 34)),
|
|
|
|
761
|
+ Text(
|
|
|
|
762
|
+ '全选',
|
|
|
|
763
|
+ style: TextStyle(
|
|
|
|
764
|
+ color: MyColours
|
|
|
|
765
|
+ .color_515151,
|
|
|
|
766
|
+ fontSize:
|
|
|
|
767
|
+ ScreenUtil()
|
|
|
|
768
|
+ .setSp(32)),
|
|
|
|
769
|
+ )
|
|
|
|
770
|
+ ],
|
|
|
|
771
|
+ ))
|
|
|
|
772
|
+ : SizedBox()
|
|
|
|
773
|
+ ]),
|
|
664
|
tableManagerModel
|
774
|
tableManagerModel
|
|
665
|
.tableOuterList[
|
775
|
.tableOuterList[
|
|
666
|
tableManagerModel
|
776
|
tableManagerModel
|
|
@@ -670,10 +780,123 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -670,10 +780,123 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
670
|
0
|
780
|
0
|
|
671
|
? VEmptyView(20)
|
781
|
? VEmptyView(20)
|
|
672
|
: VEmptyView(60),
|
782
|
: VEmptyView(60),
|
|
673
|
- item(tableManagerModel.selectNumber)
|
783
|
+ Expanded(
|
|
|
|
784
|
+ child: item(tableManagerModel
|
|
|
|
785
|
+ .selectNumber)),
|
|
|
|
786
|
+ tableManagerModel
|
|
|
|
787
|
+ .tableOuterList[
|
|
|
|
788
|
+ tableManagerModel
|
|
|
|
789
|
+ .selectNumber]
|
|
|
|
790
|
+ .list
|
|
|
|
791
|
+ .length ==
|
|
|
|
792
|
+ 0
|
|
|
|
793
|
+ ? Padding(
|
|
|
|
794
|
+ padding: EdgeInsets.only(
|
|
|
|
795
|
+ left: ScreenUtil()
|
|
|
|
796
|
+ .setWidth(50)),
|
|
|
|
797
|
+ child: Column(
|
|
|
|
798
|
+ crossAxisAlignment:
|
|
|
|
799
|
+ CrossAxisAlignment
|
|
|
|
800
|
+ .start,
|
|
|
|
801
|
+ children: [
|
|
|
|
802
|
+ VEmptyView(60),
|
|
|
|
803
|
+ Row(
|
|
|
|
804
|
+ children: [
|
|
|
|
805
|
+ Text(
|
|
|
|
806
|
+ '1、添加区域(如:一楼、二楼、东厅等)',
|
|
|
|
807
|
+ style: TextStyle(
|
|
|
|
808
|
+ decoration:
|
|
|
|
809
|
+ TextDecoration
|
|
|
|
810
|
+ .lineThrough,
|
|
|
|
811
|
+ fontSize: ScreenUtil()
|
|
|
|
812
|
+ .setSp(
|
|
|
|
813
|
+ 32),
|
|
|
|
814
|
+ color: MyColours
|
|
|
|
815
|
+ .color_BFC4D4))
|
|
|
|
816
|
+ ],
|
|
|
|
817
|
+ ),
|
|
|
|
818
|
+ VEmptyView(40),
|
|
|
|
819
|
+ Text('2、选择要添加桌位的区域',
|
|
|
|
820
|
+ style: TextStyle(
|
|
|
|
821
|
+ fontSize:
|
|
|
|
822
|
+ ScreenUtil()
|
|
|
|
823
|
+ .setSp(
|
|
|
|
824
|
+ 32),
|
|
|
|
825
|
+ color: MyColours
|
|
|
|
826
|
+ .color_BFC4D4)),
|
|
|
|
827
|
+ VEmptyView(40),
|
|
|
|
828
|
+ Text('3、点击“+”号添加桌位',
|
|
|
|
829
|
+ style: TextStyle(
|
|
|
|
830
|
+ fontSize:
|
|
|
|
831
|
+ ScreenUtil()
|
|
|
|
832
|
+ .setSp(
|
|
|
|
833
|
+ 32),
|
|
|
|
834
|
+ color: MyColours
|
|
|
|
835
|
+ .color_BFC4D4)),
|
|
|
|
836
|
+ VEmptyView(120),
|
|
|
|
837
|
+ Image.asset(
|
|
|
|
838
|
+ "assets/empty_search.png",
|
|
|
|
839
|
+ width: ScreenUtil()
|
|
|
|
840
|
+ .setWidth(520),
|
|
|
|
841
|
+ height: ScreenUtil()
|
|
|
|
842
|
+ .setWidth(384),
|
|
|
|
843
|
+ ),
|
|
|
|
844
|
+ VEmptyView(40),
|
|
|
|
845
|
+ ],
|
|
|
|
846
|
+ ))
|
|
|
|
847
|
+ : SizedBox(),
|
|
674
|
],
|
848
|
],
|
|
675
|
))),
|
849
|
))),
|
|
676
|
- ]))
|
850
|
+ ])),
|
|
|
|
851
|
+ model.pageState == PageState.Success &&
|
|
|
|
852
|
+ tableManagerModel
|
|
|
|
853
|
+ .tableOuterList[tableManagerModel.selectNumber]
|
|
|
|
854
|
+ .isSelect
|
|
|
|
855
|
+ ? Padding(
|
|
|
|
856
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
857
|
+ horizontal: ScreenUtil().setWidth(48)),
|
|
|
|
858
|
+ child: Column(
|
|
|
|
859
|
+ children: [
|
|
|
|
860
|
+ Row(
|
|
|
|
861
|
+ mainAxisAlignment:
|
|
|
|
862
|
+ MainAxisAlignment.spaceBetween,
|
|
|
|
863
|
+ children: [
|
|
|
|
864
|
+ CommonButton(
|
|
|
|
865
|
+ content: "修改名称",
|
|
|
|
866
|
+ width: 200,
|
|
|
|
867
|
+ height: 72,
|
|
|
|
868
|
+ fontSize: 32,
|
|
|
|
869
|
+ onPress: () async {},
|
|
|
|
870
|
+ ),
|
|
|
|
871
|
+ CommonButton(
|
|
|
|
872
|
+ content: "修改人数",
|
|
|
|
873
|
+ width: 200,
|
|
|
|
874
|
+ height: 72,
|
|
|
|
875
|
+ fontSize: 32,
|
|
|
|
876
|
+ onPress: () async {},
|
|
|
|
877
|
+ ),
|
|
|
|
878
|
+ CommonButton(
|
|
|
|
879
|
+ content: "修改类型",
|
|
|
|
880
|
+ width: 200,
|
|
|
|
881
|
+ height: 72,
|
|
|
|
882
|
+ fontSize: 32,
|
|
|
|
883
|
+ onPress: () async {},
|
|
|
|
884
|
+ ),
|
|
|
|
885
|
+ ],
|
|
|
|
886
|
+ ),
|
|
|
|
887
|
+ VEmptyView(44),
|
|
|
|
888
|
+ CommonButton(
|
|
|
|
889
|
+ content: "删除桌位",
|
|
|
|
890
|
+ width: 200,
|
|
|
|
891
|
+ height: 72,
|
|
|
|
892
|
+ fontSize: 32,
|
|
|
|
893
|
+ state: -3,
|
|
|
|
894
|
+ onPress: () async {},
|
|
|
|
895
|
+ ),
|
|
|
|
896
|
+ VEmptyView(32),
|
|
|
|
897
|
+ ],
|
|
|
|
898
|
+ ))
|
|
|
|
899
|
+ : SizedBox()
|
|
677
|
],
|
900
|
],
|
|
678
|
);
|
901
|
);
|
|
679
|
},
|
902
|
},
|