|
@@ -2,6 +2,7 @@ import 'package:common_utils/common_utils.dart'; |
|
@@ -2,6 +2,7 @@ import 'package:common_utils/common_utils.dart'; |
|
2
|
import 'package:flutter/material.dart';
|
2
|
import 'package:flutter/material.dart';
|
|
3
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
3
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
4
|
import 'package:one_key/constant/state.dart';
|
4
|
import 'package:one_key/constant/state.dart';
|
|
|
|
5
|
+import 'package:one_key/models/statics_model.dart';
|
|
5
|
import 'package:one_key/provider/statistics_provider.dart';
|
6
|
import 'package:one_key/provider/statistics_provider.dart';
|
|
6
|
import 'package:one_key/res/colors.dart';
|
7
|
import 'package:one_key/res/colors.dart';
|
|
7
|
import 'package:one_key/route/navigator_util.dart';
|
8
|
import 'package:one_key/route/navigator_util.dart';
|
|
@@ -16,6 +17,7 @@ import 'package:provider/provider.dart'; |
|
@@ -16,6 +17,7 @@ import 'package:provider/provider.dart'; |
|
16
|
typedef ClickCallback = void Function(String value);
|
17
|
typedef ClickCallback = void Function(String value);
|
|
17
|
enum TimeType { TimeTypeStart, TimeTypeEnd, TimeTypeDefalt }
|
18
|
enum TimeType { TimeTypeStart, TimeTypeEnd, TimeTypeDefalt }
|
|
18
|
enum TableItemType { TableItemTypeHeader, TableItemTypeBody }
|
19
|
enum TableItemType { TableItemTypeHeader, TableItemTypeBody }
|
|
|
|
20
|
+typedef IntCallback = void Function(int value);
|
|
19
|
|
21
|
|
|
20
|
class StatisticsPage extends StatefulWidget {
|
22
|
class StatisticsPage extends StatefulWidget {
|
|
21
|
StatisticsPage({Key key}) : super(key: key);
|
23
|
StatisticsPage({Key key}) : super(key: key);
|
|
@@ -25,36 +27,26 @@ class StatisticsPage extends StatefulWidget { |
|
@@ -25,36 +27,26 @@ class StatisticsPage extends StatefulWidget { |
|
25
|
}
|
27
|
}
|
|
26
|
|
28
|
|
|
27
|
class _StatisticsPageState extends State<StatisticsPage> {
|
29
|
class _StatisticsPageState extends State<StatisticsPage> {
|
|
28
|
- String dateS = "开始日期"; //开始时间
|
|
|
|
29
|
- String dateE = "结束日期"; //结束时间
|
|
|
|
30
|
- DateTime datetimeS; //开始时间
|
|
|
|
31
|
- DateTime datetimeE; //结束时间
|
|
|
|
32
|
- DateTime dateNow; //当前日期
|
|
|
|
33
|
- bool showWidget = true;
|
30
|
+ StatisticsProvider _provider;
|
|
34
|
List<String> selectList;
|
31
|
List<String> selectList;
|
|
35
|
- int currentIndex = 0;
|
|
|
|
36
|
- TextEditingController controller = TextEditingController();
|
|
|
|
37
|
- StaticsModel tableHeaderModel;
|
|
|
|
38
|
- String sortstr = '排序';
|
|
|
|
39
|
|
32
|
|
|
40
|
@override
|
33
|
@override
|
|
41
|
void initState() {
|
34
|
void initState() {
|
|
42
|
super.initState();
|
35
|
super.initState();
|
|
43
|
|
36
|
|
|
44
|
- tableHeaderModel = StaticsModel();
|
|
|
|
45
|
- tableHeaderModel.select = true;
|
|
|
|
46
|
- tableHeaderModel.numstr = '序号';
|
|
|
|
47
|
- tableHeaderModel.name = '顾客姓名';
|
|
|
|
48
|
- tableHeaderModel.phone = '电话';
|
|
|
|
49
|
- tableHeaderModel.count = '预订次数';
|
|
|
|
50
|
-
|
|
|
|
51
|
- datetimeS = DateTime.now();
|
|
|
|
52
|
- datetimeE = datetimeS.add(Duration(days: 1));
|
|
|
|
53
|
- // dateS = DateUtil.formatDate(datetimeS, format: DateFormats.y_mo_d);
|
|
|
|
54
|
- // dateE = DateUtil.formatDate(datetimeE, format: DateFormats.y_mo_d);
|
|
|
|
55
|
- dateNow = datetimeS;
|
|
|
|
56
|
selectList = ['预订次数多到少', '消费总金额高到低', '人均高到低'];
|
37
|
selectList = ['预订次数多到少', '消费总金额高到低', '人均高到低'];
|
|
57
|
- controller.text = '50';
|
38
|
+ WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
39
|
+ for (int i = 0; i < 50; i++) {
|
|
|
|
40
|
+ StaticsModel tableHeaderModel1 = StaticsModel();
|
|
|
|
41
|
+ tableHeaderModel1.select = false;
|
|
|
|
42
|
+ tableHeaderModel1.numstr = '$i';
|
|
|
|
43
|
+ tableHeaderModel1.name = '某某';
|
|
|
|
44
|
+ tableHeaderModel1.phone = '1879097890';
|
|
|
|
45
|
+ tableHeaderModel1.count = '${i}次';
|
|
|
|
46
|
+ _provider.dataStatics.add(tableHeaderModel1);
|
|
|
|
47
|
+ }
|
|
|
|
48
|
+ _provider.notifyListeners();
|
|
|
|
49
|
+ });
|
|
58
|
}
|
50
|
}
|
|
59
|
|
51
|
|
|
60
|
_buttonChoose(String title, ClickCallback callback,
|
52
|
_buttonChoose(String title, ClickCallback callback,
|
|
@@ -144,6 +136,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -144,6 +136,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
144
|
|
136
|
|
|
145
|
@override
|
137
|
@override
|
|
146
|
Widget build(BuildContext context) {
|
138
|
Widget build(BuildContext context) {
|
|
|
|
139
|
+ _provider = Provider.of<StatisticsProvider>(context, listen: true);
|
|
147
|
return Scaffold(
|
140
|
return Scaffold(
|
|
148
|
backgroundColor: MyColours.color_ffffff,
|
141
|
backgroundColor: MyColours.color_ffffff,
|
|
149
|
appBar: SystemAppBar(
|
142
|
appBar: SystemAppBar(
|
|
@@ -151,6 +144,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -151,6 +144,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
151
|
rightImgName: '清空',
|
144
|
rightImgName: '清空',
|
|
152
|
onTapRight: () {
|
145
|
onTapRight: () {
|
|
153
|
//
|
146
|
//
|
|
|
|
147
|
+ _provider.clear();
|
|
154
|
},
|
148
|
},
|
|
155
|
onTap: () {
|
149
|
onTap: () {
|
|
156
|
Navigator.pop(context);
|
150
|
Navigator.pop(context);
|
|
@@ -213,7 +207,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -213,7 +207,7 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
213
|
color: MyColours.color_199095))),
|
207
|
color: MyColours.color_199095))),
|
|
214
|
child: IntrinsicWidth(
|
208
|
child: IntrinsicWidth(
|
|
215
|
child: TextField(
|
209
|
child: TextField(
|
|
216
|
- controller: controller,
|
210
|
+ controller: _provider.controller,
|
|
217
|
maxLines: 1,
|
211
|
maxLines: 1,
|
|
218
|
// inputFormatters: [
|
212
|
// inputFormatters: [
|
|
219
|
// LengthLimitingTextInputFormatter(9),
|
213
|
// LengthLimitingTextInputFormatter(9),
|
|
@@ -257,20 +251,21 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -257,20 +251,21 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
257
|
],
|
251
|
],
|
|
258
|
)),
|
252
|
)),
|
|
259
|
//表头
|
253
|
//表头
|
|
260
|
- _tableItem(
|
|
|
|
261
|
- tableHeaderModel, 3, TableItemType.TableItemTypeHeader),
|
254
|
+ _tableItem(model.tableHeaderModel, 3,
|
|
|
|
255
|
+ TableItemType.TableItemTypeHeader, (index) {
|
|
|
|
256
|
+ print('全选');
|
|
|
|
257
|
+ _provider.allSel();
|
|
|
|
258
|
+ }),
|
|
262
|
Expanded(
|
259
|
Expanded(
|
|
263
|
child: ListView.builder(
|
260
|
child: ListView.builder(
|
|
264
|
- itemCount: 100,
|
261
|
+ itemCount: model.dataStatics.length,
|
|
265
|
itemBuilder: (BuildContext context, int index) {
|
262
|
itemBuilder: (BuildContext context, int index) {
|
|
266
|
- StaticsModel tableHeaderModel1 = StaticsModel();
|
|
|
|
267
|
- tableHeaderModel1.select = true;
|
|
|
|
268
|
- tableHeaderModel1.numstr = '$index';
|
|
|
|
269
|
- tableHeaderModel1.name = '某某';
|
|
|
|
270
|
- tableHeaderModel1.phone = '1879097890';
|
|
|
|
271
|
- tableHeaderModel1.count = '${index}次';
|
|
|
|
272
|
- return _tableItem(tableHeaderModel1, index,
|
|
|
|
273
|
- TableItemType.TableItemTypeBody);
|
263
|
+ return _tableItem(model.dataStatics[index], index,
|
|
|
|
264
|
+ TableItemType.TableItemTypeBody, (index) {
|
|
|
|
265
|
+ model.dataStatics[index].select =
|
|
|
|
266
|
+ !model.dataStatics[index].select;
|
|
|
|
267
|
+ model.needAllSel();
|
|
|
|
268
|
+ });
|
|
274
|
})),
|
269
|
})),
|
|
275
|
Container(
|
270
|
Container(
|
|
276
|
alignment: Alignment.centerRight,
|
271
|
alignment: Alignment.centerRight,
|
|
@@ -288,28 +283,42 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -288,28 +283,42 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
288
|
color: MyColours.color_199095)),
|
283
|
color: MyColours.color_199095)),
|
|
289
|
child: Row(
|
284
|
child: Row(
|
|
290
|
children: [
|
285
|
children: [
|
|
291
|
- Container(
|
|
|
|
292
|
- width: ScreenUtil().setWidth(110 * 2),
|
|
|
|
293
|
- height: ScreenUtil().setWidth(42 * 2),
|
|
|
|
294
|
- alignment: Alignment.center,
|
|
|
|
295
|
- decoration: BoxDecoration(
|
|
|
|
296
|
- color: Colors.white,
|
|
|
|
297
|
- borderRadius: BorderRadius.only(
|
|
|
|
298
|
- topLeft: Radius.circular(
|
|
|
|
299
|
- ScreenUtil().setWidth(42)),
|
|
|
|
300
|
- bottomLeft: Radius.circular(
|
|
|
|
301
|
- ScreenUtil().setWidth(42))),
|
|
|
|
302
|
- ),
|
|
|
|
303
|
- child: Text(
|
|
|
|
304
|
- '发优惠券',
|
|
|
|
305
|
- style: TextStyle(
|
|
|
|
306
|
- fontWeight: FontWeight.bold,
|
|
|
|
307
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
308
|
- color: MyColours.color_199095),
|
|
|
|
309
|
- )),
|
|
|
|
310
|
InkWell(
|
286
|
InkWell(
|
|
|
|
287
|
+ child: Container(
|
|
|
|
288
|
+ width: ScreenUtil().setWidth(110 * 2),
|
|
|
|
289
|
+ height: ScreenUtil().setWidth(42 * 2),
|
|
|
|
290
|
+ alignment: Alignment.center,
|
|
|
|
291
|
+ decoration: BoxDecoration(
|
|
|
|
292
|
+ color: Colors.white,
|
|
|
|
293
|
+ borderRadius: BorderRadius.only(
|
|
|
|
294
|
+ topLeft: Radius.circular(
|
|
|
|
295
|
+ ScreenUtil().setWidth(42)),
|
|
|
|
296
|
+ bottomLeft: Radius.circular(
|
|
|
|
297
|
+ ScreenUtil().setWidth(42))),
|
|
|
|
298
|
+ ),
|
|
|
|
299
|
+ child: Text(
|
|
|
|
300
|
+ '发优惠券',
|
|
|
|
301
|
+ style: TextStyle(
|
|
|
|
302
|
+ fontWeight: FontWeight.bold,
|
|
|
|
303
|
+ fontSize: ScreenUtil().setSp(32),
|
|
|
|
304
|
+ color: MyColours.color_199095),
|
|
|
|
305
|
+ )),
|
|
311
|
onTap: () {
|
306
|
onTap: () {
|
|
312
|
- NavigatorUtil.goStatisticsSmsPage(context);
|
307
|
+ if (model.selectAny()) {
|
|
|
|
308
|
+ NavigatorUtil.goCouponSelectPage(context,
|
|
|
|
309
|
+ from: 'statistics', hasModify: false);
|
|
|
|
310
|
+ } else {
|
|
|
|
311
|
+ Utils.showToast('请选择顾客');
|
|
|
|
312
|
+ }
|
|
|
|
313
|
+ },
|
|
|
|
314
|
+ ),
|
|
|
|
315
|
+ InkWell(
|
|
|
|
316
|
+ onTap: () {
|
|
|
|
317
|
+ if (model.selectAny()) {
|
|
|
|
318
|
+ NavigatorUtil.goStatisticsSmsPage(context);
|
|
|
|
319
|
+ } else {
|
|
|
|
320
|
+ Utils.showToast('请选择顾客');
|
|
|
|
321
|
+ }
|
|
313
|
},
|
322
|
},
|
|
314
|
child: Container(
|
323
|
child: Container(
|
|
315
|
width: ScreenUtil().setWidth(110 * 2),
|
324
|
width: ScreenUtil().setWidth(110 * 2),
|
|
@@ -349,13 +358,15 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -349,13 +358,15 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
349
|
child: Row(
|
358
|
child: Row(
|
|
350
|
crossAxisAlignment: CrossAxisAlignment.start,
|
359
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
351
|
children: [
|
360
|
children: [
|
|
352
|
- _buttonChoose(dateS, (value) {
|
|
|
|
353
|
- DialogUtil.showCalendarDialog(context, datetimeS)
|
361
|
+ _buttonChoose(_provider.dateS, (value) {
|
|
|
|
362
|
+ DialogUtil.showCalendarDialog(
|
|
|
|
363
|
+ context, _provider.datetimeS)
|
|
354
|
.then((day) {
|
364
|
.then((day) {
|
|
355
|
if (day != null) {
|
365
|
if (day != null) {
|
|
356
|
setState(() {
|
366
|
setState(() {
|
|
357
|
- datetimeS = day;
|
|
|
|
358
|
- dateS = DateUtil.formatDate(datetimeS,
|
367
|
+ _provider.datetimeS = day;
|
|
|
|
368
|
+ _provider.dateS = DateUtil.formatDate(
|
|
|
|
369
|
+ _provider.datetimeS,
|
|
359
|
format: DateFormats.y_mo_d);
|
370
|
format: DateFormats.y_mo_d);
|
|
360
|
});
|
371
|
});
|
|
361
|
}
|
372
|
}
|
|
@@ -373,13 +384,15 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -373,13 +384,15 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
373
|
),
|
384
|
),
|
|
374
|
),
|
385
|
),
|
|
375
|
HEmptyView(10),
|
386
|
HEmptyView(10),
|
|
376
|
- _buttonChoose(dateE, (value) {
|
|
|
|
377
|
- DialogUtil.showCalendarDialog(context, datetimeE)
|
387
|
+ _buttonChoose(_provider.dateE, (value) {
|
|
|
|
388
|
+ DialogUtil.showCalendarDialog(
|
|
|
|
389
|
+ context, _provider.datetimeE)
|
|
378
|
.then((day) {
|
390
|
.then((day) {
|
|
379
|
if (day != null) {
|
391
|
if (day != null) {
|
|
380
|
setState(() {
|
392
|
setState(() {
|
|
381
|
- datetimeE = day;
|
|
|
|
382
|
- dateE = DateUtil.formatDate(datetimeE,
|
393
|
+ _provider.datetimeE = day;
|
|
|
|
394
|
+ _provider.dateE = DateUtil.formatDate(
|
|
|
|
395
|
+ _provider.datetimeE,
|
|
383
|
format: DateFormats.y_mo_d);
|
396
|
format: DateFormats.y_mo_d);
|
|
384
|
});
|
397
|
});
|
|
385
|
}
|
398
|
}
|
|
@@ -389,9 +402,9 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -389,9 +402,9 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
389
|
Column(
|
402
|
Column(
|
|
390
|
crossAxisAlignment: CrossAxisAlignment.start,
|
403
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
391
|
children: [
|
404
|
children: [
|
|
392
|
- _buttonChoose(sortstr, (value) {
|
405
|
+ _buttonChoose(_provider.sortstr, (value) {
|
|
393
|
setState(() {
|
406
|
setState(() {
|
|
394
|
- showWidget = !showWidget;
|
407
|
+ _provider.showWidget = !_provider.showWidget;
|
|
395
|
print('1');
|
408
|
print('1');
|
|
396
|
});
|
409
|
});
|
|
397
|
}),
|
410
|
}),
|
|
@@ -402,13 +415,14 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -402,13 +415,14 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
402
|
child: Material(
|
415
|
child: Material(
|
|
403
|
color: Colors.transparent,
|
416
|
color: Colors.transparent,
|
|
404
|
child: Offstage(
|
417
|
child: Offstage(
|
|
405
|
- offstage: showWidget,
|
418
|
+ offstage: _provider.showWidget,
|
|
406
|
child: _selectWidget(selectList, (index) {
|
419
|
child: _selectWidget(selectList, (index) {
|
|
407
|
print(selectList[index]);
|
420
|
print(selectList[index]);
|
|
408
|
setState(() {
|
421
|
setState(() {
|
|
409
|
- showWidget = !showWidget;
|
|
|
|
410
|
- currentIndex = index;
|
|
|
|
411
|
- sortstr = selectList[index];
|
422
|
+ _provider.showWidget =
|
|
|
|
423
|
+ !_provider.showWidget;
|
|
|
|
424
|
+ _provider.currentIndex = index;
|
|
|
|
425
|
+ _provider.sortstr = selectList[index];
|
|
412
|
});
|
426
|
});
|
|
413
|
}),
|
427
|
}),
|
|
414
|
))),
|
428
|
))),
|
|
@@ -422,91 +436,89 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
@@ -422,91 +436,89 @@ class _StatisticsPageState extends State<StatisticsPage> { |
|
422
|
}
|
436
|
}
|
|
423
|
|
437
|
|
|
424
|
///表头
|
438
|
///表头
|
|
425
|
- Widget _tableItem(StaticsModel model, int index, TableItemType type) {
|
|
|
|
426
|
- return Container(
|
|
|
|
427
|
- padding: EdgeInsets.only(left: ScreenUtil().setWidth(30)),
|
|
|
|
428
|
- height: ScreenUtil()
|
|
|
|
429
|
- .setWidth(type == TableItemType.TableItemTypeBody ? 100 : 80),
|
|
|
|
430
|
- color: index % 2 == 0 ? MyColours.color_f7fdfd : MyColours.color_fefefe,
|
|
|
|
431
|
- child: Row(
|
|
|
|
432
|
- children: [
|
|
|
|
433
|
- Container(
|
|
|
|
434
|
- width: ScreenUtil().setWidth(85 * 2),
|
|
|
|
435
|
- height: double.infinity,
|
|
|
|
436
|
- decoration: BoxDecoration(
|
|
|
|
437
|
- border: Border(
|
|
|
|
438
|
- right: BorderSide(
|
|
|
|
439
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
440
|
- color: MyColours.color_f5f5f5))),
|
|
|
|
441
|
- child: Row(
|
|
|
|
442
|
- children: [
|
|
|
|
443
|
- Image.asset(
|
|
|
|
444
|
- Utils.getImgPath(model.select ? 'select' : 'unselect'),
|
|
|
|
445
|
- width: ScreenUtil().setWidth(34),
|
|
|
|
446
|
- height: ScreenUtil().setWidth(34),
|
|
|
|
447
|
- ),
|
|
|
|
448
|
- // HEmptyView(20),
|
|
|
|
449
|
- Expanded(
|
|
|
|
450
|
- child: Text(
|
|
|
|
451
|
- model.numstr,
|
|
|
|
452
|
- textAlign: TextAlign.center,
|
|
|
|
453
|
- style: TextStyle(
|
|
|
|
454
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
455
|
- color: MyColours.color_333333),
|
|
|
|
456
|
- )),
|
|
|
|
457
|
- HEmptyView(30),
|
|
|
|
458
|
- ],
|
|
|
|
459
|
- ),
|
|
|
|
460
|
- ),
|
|
|
|
461
|
- Container(
|
|
|
|
462
|
- alignment: Alignment.center,
|
|
|
|
463
|
- width: ScreenUtil().setWidth(87 * 2),
|
|
|
|
464
|
- height: double.infinity,
|
|
|
|
465
|
- decoration: BoxDecoration(
|
|
|
|
466
|
- border: Border(
|
|
|
|
467
|
- right: BorderSide(
|
|
|
|
468
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
469
|
- color: MyColours.color_f5f5f5))),
|
|
|
|
470
|
- child: Text(
|
|
|
|
471
|
- model.name,
|
|
|
|
472
|
- style: TextStyle(
|
|
|
|
473
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
474
|
- color: MyColours.color_333333),
|
|
|
|
475
|
- )),
|
|
|
|
476
|
- Container(
|
|
|
|
477
|
- alignment: Alignment.center,
|
|
|
|
478
|
- width: ScreenUtil().setWidth(116 * 2),
|
439
|
+ Widget _tableItem(
|
|
|
|
440
|
+ StaticsModel model, int index, TableItemType type, IntCallback callback) {
|
|
|
|
441
|
+ return InkWell(
|
|
|
|
442
|
+ onTap: () {
|
|
|
|
443
|
+ callback(index);
|
|
|
|
444
|
+ },
|
|
|
|
445
|
+ child: Container(
|
|
|
|
446
|
+ padding: EdgeInsets.only(left: ScreenUtil().setWidth(30)),
|
|
|
|
447
|
+ height: ScreenUtil()
|
|
|
|
448
|
+ .setWidth(type == TableItemType.TableItemTypeBody ? 100 : 80),
|
|
|
|
449
|
+ color: index % 2 == 0 ? MyColours.color_f7fdfd : MyColours.color_fefefe,
|
|
|
|
450
|
+ child: Row(
|
|
|
|
451
|
+ children: [
|
|
|
|
452
|
+ Container(
|
|
|
|
453
|
+ width: ScreenUtil().setWidth(85 * 2),
|
|
479
|
height: double.infinity,
|
454
|
height: double.infinity,
|
|
480
|
decoration: BoxDecoration(
|
455
|
decoration: BoxDecoration(
|
|
481
|
border: Border(
|
456
|
border: Border(
|
|
482
|
right: BorderSide(
|
457
|
right: BorderSide(
|
|
483
|
width: ScreenUtil().setWidth(2),
|
458
|
width: ScreenUtil().setWidth(2),
|
|
484
|
color: MyColours.color_f5f5f5))),
|
459
|
color: MyColours.color_f5f5f5))),
|
|
|
|
460
|
+ child: Row(
|
|
|
|
461
|
+ children: [
|
|
|
|
462
|
+ Image.asset(
|
|
|
|
463
|
+ Utils.getImgPath(model.select ? 'select' : 'unselect'),
|
|
|
|
464
|
+ width: ScreenUtil().setWidth(34),
|
|
|
|
465
|
+ height: ScreenUtil().setWidth(34),
|
|
|
|
466
|
+ ),
|
|
|
|
467
|
+ // HEmptyView(20),
|
|
|
|
468
|
+ Expanded(
|
|
|
|
469
|
+ child: Text(
|
|
|
|
470
|
+ model.numstr,
|
|
|
|
471
|
+ textAlign: TextAlign.center,
|
|
|
|
472
|
+ style: TextStyle(
|
|
|
|
473
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
474
|
+ color: MyColours.color_333333),
|
|
|
|
475
|
+ )),
|
|
|
|
476
|
+ HEmptyView(30),
|
|
|
|
477
|
+ ],
|
|
|
|
478
|
+ ),
|
|
|
|
479
|
+ ),
|
|
|
|
480
|
+ Container(
|
|
|
|
481
|
+ alignment: Alignment.center,
|
|
|
|
482
|
+ width: ScreenUtil().setWidth(87 * 2),
|
|
|
|
483
|
+ height: double.infinity,
|
|
|
|
484
|
+ decoration: BoxDecoration(
|
|
|
|
485
|
+ border: Border(
|
|
|
|
486
|
+ right: BorderSide(
|
|
|
|
487
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
488
|
+ color: MyColours.color_f5f5f5))),
|
|
|
|
489
|
+ child: Text(
|
|
|
|
490
|
+ model.name,
|
|
|
|
491
|
+ style: TextStyle(
|
|
|
|
492
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
493
|
+ color: MyColours.color_333333),
|
|
|
|
494
|
+ )),
|
|
|
|
495
|
+ Container(
|
|
|
|
496
|
+ alignment: Alignment.center,
|
|
|
|
497
|
+ width: ScreenUtil().setWidth(116 * 2),
|
|
|
|
498
|
+ height: double.infinity,
|
|
|
|
499
|
+ decoration: BoxDecoration(
|
|
|
|
500
|
+ border: Border(
|
|
|
|
501
|
+ right: BorderSide(
|
|
|
|
502
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
503
|
+ color: MyColours.color_f5f5f5))),
|
|
|
|
504
|
+ child: Text(
|
|
|
|
505
|
+ model.phone,
|
|
|
|
506
|
+ style: TextStyle(
|
|
|
|
507
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
508
|
+ color: MyColours.color_333333),
|
|
|
|
509
|
+ )),
|
|
|
|
510
|
+ Expanded(
|
|
|
|
511
|
+ child: Center(
|
|
485
|
child: Text(
|
512
|
child: Text(
|
|
486
|
- model.phone,
|
513
|
+ model.count,
|
|
487
|
style: TextStyle(
|
514
|
style: TextStyle(
|
|
488
|
fontSize: ScreenUtil().setSp(28),
|
515
|
fontSize: ScreenUtil().setSp(28),
|
|
489
|
color: MyColours.color_333333),
|
516
|
color: MyColours.color_333333),
|
|
490
|
- )),
|
|
|
|
491
|
- Expanded(
|
|
|
|
492
|
- child: Center(
|
|
|
|
493
|
- child: Text(
|
|
|
|
494
|
- model.count,
|
|
|
|
495
|
- style: TextStyle(
|
|
|
|
496
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
497
|
- color: MyColours.color_333333),
|
|
|
|
498
|
- ),
|
|
|
|
499
|
- ))
|
|
|
|
500
|
- ],
|
517
|
+ ),
|
|
|
|
518
|
+ ))
|
|
|
|
519
|
+ ],
|
|
|
|
520
|
+ ),
|
|
501
|
),
|
521
|
),
|
|
502
|
);
|
522
|
);
|
|
503
|
}
|
523
|
}
|
|
504
|
} |
524
|
} |
|
505
|
-
|
|
|
|
506
|
-class StaticsModel extends Object {
|
|
|
|
507
|
- bool select;
|
|
|
|
508
|
- String numstr;
|
|
|
|
509
|
- String name;
|
|
|
|
510
|
- String phone;
|
|
|
|
511
|
- String count;
|
|
|
|
512
|
-} |
|
|