|
1
|
import 'package:flutter/material.dart';
|
1
|
import 'package:flutter/material.dart';
|
|
2
|
import 'package:flutter_screenutil/screenutil.dart';
|
2
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
3
|
import 'package:one_key/constant/state.dart';
|
3
|
import 'package:one_key/constant/state.dart';
|
|
|
|
4
|
+import 'package:one_key/models/customer_label_model.dart';
|
|
4
|
import 'package:one_key/models/guest_info_model.dart';
|
5
|
import 'package:one_key/models/guest_info_model.dart';
|
|
5
|
import 'package:one_key/provider/customer_provider.dart';
|
6
|
import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
7
|
+import 'package:one_key/provider/user_model.dart';
|
|
6
|
import 'package:one_key/res/colors.dart';
|
8
|
import 'package:one_key/res/colors.dart';
|
|
7
|
import 'package:one_key/utils/dialog_util.dart';
|
9
|
import 'package:one_key/utils/dialog_util.dart';
|
|
8
|
import 'package:one_key/utils/event_bus.dart';
|
10
|
import 'package:one_key/utils/event_bus.dart';
|
|
@@ -43,6 +45,7 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
@@ -43,6 +45,7 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
43
|
|
45
|
|
|
44
|
CustomerProvider customerProvider;
|
46
|
CustomerProvider customerProvider;
|
|
45
|
String labelShow = '';
|
47
|
String labelShow = '';
|
|
|
|
48
|
+ ScrollController scrollController = ScrollController();
|
|
46
|
@override
|
49
|
@override
|
|
47
|
void initState() {
|
50
|
void initState() {
|
|
48
|
super.initState();
|
51
|
super.initState();
|
|
@@ -80,9 +83,28 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
@@ -80,9 +83,28 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
80
|
fwController.text = widget.guest.serve ?? '';
|
83
|
fwController.text = widget.guest.serve ?? '';
|
|
81
|
labelShow = widget.guest.label ?? '';
|
84
|
labelShow = widget.guest.label ?? '';
|
|
82
|
setState(() {});
|
85
|
setState(() {});
|
|
|
|
86
|
+ _getLabelBySellerid();
|
|
|
|
87
|
+ // scrollController.jumpTo(scrollController.position.minScrollExtent);
|
|
83
|
});
|
88
|
});
|
|
84
|
}
|
89
|
}
|
|
85
|
|
90
|
|
|
|
|
91
|
+ ///获取商家标签
|
|
|
|
92
|
+ _getLabelBySellerid() async {
|
|
|
|
93
|
+ Map<String, String> params = {
|
|
|
|
94
|
+ "sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
95
|
+ };
|
|
|
|
96
|
+ List<CustomerLabelSunModel> modelLabel =
|
|
|
|
97
|
+ await customerProvider.getLabelBySellerid(context, params);
|
|
|
|
98
|
+
|
|
|
|
99
|
+ if (modelLabel.length > 0) {
|
|
|
|
100
|
+ for (int i = 0; i < customerProvider.labelList.length; i++) {
|
|
|
|
101
|
+ if (labelShow == customerProvider.labelList[i].label) {
|
|
|
|
102
|
+ customerProvider.labelSelIndex = i;
|
|
|
|
103
|
+ }
|
|
|
|
104
|
+ }
|
|
|
|
105
|
+ }
|
|
|
|
106
|
+ }
|
|
|
|
107
|
+
|
|
86
|
_setGuestInfo() async {
|
108
|
_setGuestInfo() async {
|
|
87
|
if (nameStr.trim().length == 0) {
|
109
|
if (nameStr.trim().length == 0) {
|
|
88
|
Utils.showToast('请填写客户姓名');
|
110
|
Utils.showToast('请填写客户姓名');
|
|
@@ -115,7 +137,7 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
@@ -115,7 +137,7 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
115
|
params['position'] = positionController.text;
|
137
|
params['position'] = positionController.text;
|
|
116
|
}
|
138
|
}
|
|
117
|
if (labelShow != '') {
|
139
|
if (labelShow != '') {
|
|
118
|
- // params['label'] =
|
140
|
+ params['label'] = labelShow;
|
|
119
|
}
|
141
|
}
|
|
120
|
if (jkController.text.trim().length > 0) {
|
142
|
if (jkController.text.trim().length > 0) {
|
|
121
|
params['taboos'] = jkController.text;
|
143
|
params['taboos'] = jkController.text;
|
|
@@ -365,251 +387,260 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
@@ -365,251 +387,260 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { |
|
365
|
child: Padding(
|
387
|
child: Padding(
|
|
366
|
padding: EdgeInsets.symmetric(
|
388
|
padding: EdgeInsets.symmetric(
|
|
367
|
horizontal: ScreenUtil().setWidth(50)),
|
389
|
horizontal: ScreenUtil().setWidth(50)),
|
|
368
|
- child: SingleChildScrollView(
|
|
|
|
369
|
- child: Column(
|
|
|
|
370
|
- children: [
|
|
|
|
371
|
- // VEmptyView(30),
|
|
|
|
372
|
- Container(
|
|
|
|
373
|
- // height: ScreenUtil().setWidth(60),
|
|
|
|
374
|
- padding: EdgeInsets.symmetric(
|
|
|
|
375
|
- vertical: ScreenUtil().setWidth(10)),
|
|
|
|
376
|
- decoration: BoxDecoration(
|
|
|
|
377
|
- border: Border(
|
|
|
|
378
|
- bottom: BorderSide(
|
|
|
|
379
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
380
|
- color:
|
|
|
|
381
|
- Color.fromRGBO(220, 220, 220, 1)))),
|
|
|
|
382
|
- child: Row(
|
|
|
|
383
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
384
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
385
|
- children: [
|
|
|
|
386
|
- Container(
|
|
|
|
387
|
- // color: Colors.red,
|
|
|
|
388
|
- width: ScreenUtil().setWidth(150),
|
|
|
|
389
|
- height: ScreenUtil().setWidth(35),
|
|
|
|
390
|
- child: Text(
|
|
|
|
391
|
- '姓名',
|
|
|
|
392
|
- style: TextStyle(
|
|
|
|
393
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
394
|
- color: MyColours.color_333333),
|
|
|
|
395
|
- ),
|
390
|
+ child: ListView(
|
|
|
|
391
|
+ controller: scrollController,
|
|
|
|
392
|
+ children: [
|
|
|
|
393
|
+ // VEmptyView(30),
|
|
|
|
394
|
+ Container(
|
|
|
|
395
|
+ // height: ScreenUtil().setWidth(60),
|
|
|
|
396
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
397
|
+ vertical: ScreenUtil().setWidth(10)),
|
|
|
|
398
|
+ decoration: BoxDecoration(
|
|
|
|
399
|
+ border: Border(
|
|
|
|
400
|
+ bottom: BorderSide(
|
|
|
|
401
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
402
|
+ color:
|
|
|
|
403
|
+ Color.fromRGBO(220, 220, 220, 1)))),
|
|
|
|
404
|
+ child: Row(
|
|
|
|
405
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
406
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
407
|
+ children: [
|
|
|
|
408
|
+ Container(
|
|
|
|
409
|
+ // color: Colors.red,
|
|
|
|
410
|
+ width: ScreenUtil().setWidth(150),
|
|
|
|
411
|
+ height: ScreenUtil().setWidth(35),
|
|
|
|
412
|
+ child: Text(
|
|
|
|
413
|
+ '姓名',
|
|
|
|
414
|
+ style: TextStyle(
|
|
|
|
415
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
416
|
+ color: MyColours.color_333333),
|
|
396
|
),
|
417
|
),
|
|
397
|
- Expanded(
|
|
|
|
398
|
- child: TextField(
|
|
|
|
399
|
- maxLines: 1,
|
418
|
+ ),
|
|
|
|
419
|
+ Expanded(
|
|
|
|
420
|
+ child: TextField(
|
|
|
|
421
|
+ maxLines: 1,
|
|
400
|
|
422
|
|
|
401
|
- //输入文本的样式
|
|
|
|
402
|
- style: TextStyle(
|
|
|
|
403
|
- fontSize: ScreenUtil().setSp(30),
|
|
|
|
404
|
- color: MyColours.color_353535),
|
|
|
|
405
|
- controller: nameController,
|
|
|
|
406
|
- focusNode: nameFocus,
|
|
|
|
407
|
- // textAlignVertical: TextAlignVertical.top,
|
|
|
|
408
|
- decoration: InputDecoration(
|
|
|
|
409
|
- hintText: "填写姓名",
|
|
|
|
410
|
- hintStyle: TextStyle(
|
|
|
|
411
|
- color: MyColours.color_999999,
|
|
|
|
412
|
- fontSize: ScreenUtil().setSp(30),
|
|
|
|
413
|
- ),
|
|
|
|
414
|
- // contentPadding:
|
|
|
|
415
|
- // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
416
|
- contentPadding: EdgeInsets.zero,
|
|
|
|
417
|
- border: OutlineInputBorder(
|
|
|
|
418
|
- borderSide: BorderSide.none),
|
423
|
+ //输入文本的样式
|
|
|
|
424
|
+ style: TextStyle(
|
|
|
|
425
|
+ fontSize: ScreenUtil().setSp(30),
|
|
|
|
426
|
+ color: MyColours.color_353535),
|
|
|
|
427
|
+ controller: nameController,
|
|
|
|
428
|
+ focusNode: nameFocus,
|
|
|
|
429
|
+ // textAlignVertical: TextAlignVertical.top,
|
|
|
|
430
|
+ decoration: InputDecoration(
|
|
|
|
431
|
+ hintText: "填写姓名",
|
|
|
|
432
|
+ hintStyle: TextStyle(
|
|
|
|
433
|
+ color: MyColours.color_999999,
|
|
|
|
434
|
+ fontSize: ScreenUtil().setSp(30),
|
|
419
|
),
|
435
|
),
|
|
420
|
- onChanged: (value) {
|
|
|
|
421
|
- print('ggg');
|
|
|
|
422
|
-
|
|
|
|
423
|
- if (value.endsWith('先生') ||
|
|
|
|
424
|
- value.endsWith('女士') ||
|
|
|
|
425
|
- value.endsWith('公司')) {
|
|
|
|
426
|
- nameStr = value.substring(
|
|
|
|
427
|
- 0, value.length - 2);
|
|
|
|
428
|
- } else {
|
|
|
|
429
|
- nameStr = value;
|
|
|
|
430
|
- }
|
|
|
|
431
|
- },
|
|
|
|
432
|
- onEditingComplete: () {
|
|
|
|
433
|
- print('fff');
|
|
|
|
434
|
- nameFocus.unfocus();
|
|
|
|
435
|
- // _homeEnterModel.nameController.text =
|
|
|
|
436
|
- // nameStr + _nameSuffix();
|
|
|
|
437
|
- _addNameSuffix(nameStr, _nameSuffix());
|
|
|
|
438
|
- },
|
|
|
|
439
|
- keyboardType: TextInputType.text,
|
436
|
+ // contentPadding:
|
|
|
|
437
|
+ // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
438
|
+ contentPadding: EdgeInsets.zero,
|
|
|
|
439
|
+ border: OutlineInputBorder(
|
|
|
|
440
|
+ borderSide: BorderSide.none),
|
|
440
|
),
|
441
|
),
|
|
|
|
442
|
+ onChanged: (value) {
|
|
|
|
443
|
+ print('ggg');
|
|
|
|
444
|
+
|
|
|
|
445
|
+ if (value.endsWith('先生') ||
|
|
|
|
446
|
+ value.endsWith('女士') ||
|
|
|
|
447
|
+ value.endsWith('公司')) {
|
|
|
|
448
|
+ nameStr =
|
|
|
|
449
|
+ value.substring(0, value.length - 2);
|
|
|
|
450
|
+ } else {
|
|
|
|
451
|
+ nameStr = value;
|
|
|
|
452
|
+ }
|
|
|
|
453
|
+ },
|
|
|
|
454
|
+ onEditingComplete: () {
|
|
|
|
455
|
+ print('fff');
|
|
|
|
456
|
+ nameFocus.unfocus();
|
|
|
|
457
|
+ // _homeEnterModel.nameController.text =
|
|
|
|
458
|
+ // nameStr + _nameSuffix();
|
|
|
|
459
|
+ _addNameSuffix(nameStr, _nameSuffix());
|
|
|
|
460
|
+ },
|
|
|
|
461
|
+ keyboardType: TextInputType.text,
|
|
441
|
),
|
462
|
),
|
|
442
|
- // HEmptyView(40),
|
|
|
|
443
|
- Row(
|
|
|
|
444
|
- children: sexList.map((value) {
|
|
|
|
445
|
- return _callButton(
|
|
|
|
446
|
- onPress: () {
|
|
|
|
447
|
- for (var item in sexList) {
|
|
|
|
448
|
- item['select'] = false;
|
|
|
|
449
|
- if (item['title'] == value['title']) {
|
|
|
|
450
|
- item['select'] = true;
|
|
|
|
451
|
- // _homeEnterModel.nameController.text =
|
|
|
|
452
|
- // nameStr + item['title'];
|
|
|
|
453
|
- if (nameStr != null &&
|
|
|
|
454
|
- nameStr != '') {
|
|
|
|
455
|
- _addNameSuffix(
|
|
|
|
456
|
- nameStr, item['title']);
|
|
|
|
457
|
- }
|
463
|
+ ),
|
|
|
|
464
|
+ // HEmptyView(40),
|
|
|
|
465
|
+ Row(
|
|
|
|
466
|
+ children: sexList.map((value) {
|
|
|
|
467
|
+ return _callButton(
|
|
|
|
468
|
+ onPress: () {
|
|
|
|
469
|
+ for (var item in sexList) {
|
|
|
|
470
|
+ item['select'] = false;
|
|
|
|
471
|
+ if (item['title'] == value['title']) {
|
|
|
|
472
|
+ item['select'] = true;
|
|
|
|
473
|
+ // _homeEnterModel.nameController.text =
|
|
|
|
474
|
+ // nameStr + item['title'];
|
|
|
|
475
|
+ if (nameStr != null &&
|
|
|
|
476
|
+ nameStr != '') {
|
|
|
|
477
|
+ _addNameSuffix(
|
|
|
|
478
|
+ nameStr, item['title']);
|
|
458
|
}
|
479
|
}
|
|
459
|
}
|
480
|
}
|
|
460
|
- setState(() {});
|
|
|
|
461
|
- },
|
|
|
|
462
|
- content: value['title'],
|
|
|
|
463
|
- hasLeftBorder: value['hasLeftBorder'],
|
|
|
|
464
|
- isSelect: value['select']);
|
|
|
|
465
|
- }).toList()),
|
|
|
|
466
|
- ],
|
|
|
|
467
|
- ),
|
481
|
+ }
|
|
|
|
482
|
+ setState(() {});
|
|
|
|
483
|
+ },
|
|
|
|
484
|
+ content: value['title'],
|
|
|
|
485
|
+ hasLeftBorder: value['hasLeftBorder'],
|
|
|
|
486
|
+ isSelect: value['select']);
|
|
|
|
487
|
+ }).toList()),
|
|
|
|
488
|
+ ],
|
|
468
|
),
|
489
|
),
|
|
469
|
- _textfieldWidget(
|
|
|
|
470
|
- '电话', '填写电话', phoneController, phoneFocus),
|
|
|
|
471
|
- _textfieldWidget(
|
|
|
|
472
|
- '工作单位', '填写工作单位', adressController, adressFocus),
|
|
|
|
473
|
- _textfieldWidget('部门', '填写部门', departmentController,
|
|
|
|
474
|
- departmentFocus),
|
|
|
|
475
|
- _textfieldWidget(
|
|
|
|
476
|
- '职位', '填写职位', positionController, positionFocus),
|
|
|
|
477
|
- InkWell(
|
|
|
|
478
|
- onTap: () {
|
|
|
|
479
|
- FocusScope.of(context)
|
|
|
|
480
|
- .requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
481
|
- // DialogUtil.showSelectCusmanDialog(
|
|
|
|
482
|
- // context, couponList, (value) {
|
|
|
|
483
|
- // if (value != null) {
|
|
|
|
484
|
- // setState(() {
|
|
|
|
485
|
- // couponSelectIndex = value.first;
|
|
|
|
486
|
- // });
|
|
|
|
487
|
- // }
|
|
|
|
488
|
- // },
|
|
|
|
489
|
- // selecteds: couponSelectIndex == null
|
|
|
|
490
|
- // ? []
|
|
|
|
491
|
- // : [couponSelectIndex])
|
|
|
|
492
|
- // .then((value) {});
|
490
|
+ ),
|
|
|
|
491
|
+ _textfieldWidget(
|
|
|
|
492
|
+ '电话', '填写电话', phoneController, phoneFocus),
|
|
|
|
493
|
+ _textfieldWidget(
|
|
|
|
494
|
+ '工作单位', '填写工作单位', adressController, adressFocus),
|
|
|
|
495
|
+ _textfieldWidget('部门', '填写部门', departmentController,
|
|
|
|
496
|
+ departmentFocus),
|
|
|
|
497
|
+ _textfieldWidget(
|
|
|
|
498
|
+ '职位', '填写职位', positionController, positionFocus),
|
|
|
|
499
|
+ InkWell(
|
|
|
|
500
|
+ onTap: () {
|
|
|
|
501
|
+ FocusScope.of(context)
|
|
|
|
502
|
+ .requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
503
|
+ DialogUtil.showSelectCusmanDialog(
|
|
|
|
504
|
+ context,
|
|
|
|
505
|
+ customerProvider.labelList.map((item) {
|
|
|
|
506
|
+ return item.label;
|
|
|
|
507
|
+ }).toList(), (value) {
|
|
|
|
508
|
+ if (value != null) {
|
|
|
|
509
|
+ setState(() {
|
|
|
|
510
|
+ customerProvider.labelSelIndex =
|
|
|
|
511
|
+ value.first;
|
|
|
|
512
|
+ labelShow = customerProvider
|
|
|
|
513
|
+ .labelList[
|
|
|
|
514
|
+ customerProvider.labelSelIndex]
|
|
|
|
515
|
+ .label;
|
|
|
|
516
|
+ });
|
|
|
|
517
|
+ }
|
|
493
|
},
|
518
|
},
|
|
494
|
- child: Container(
|
|
|
|
495
|
- // height: ScreenUtil().setWidth(60),
|
|
|
|
496
|
- padding: EdgeInsets.symmetric(
|
|
|
|
497
|
- vertical: ScreenUtil().setWidth(50)),
|
|
|
|
498
|
- decoration: BoxDecoration(
|
|
|
|
499
|
- border: Border(
|
|
|
|
500
|
- bottom: BorderSide(
|
|
|
|
501
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
502
|
- color: Color.fromRGBO(
|
|
|
|
503
|
- 220, 220, 220, 1)))),
|
|
|
|
504
|
- child: Row(
|
|
|
|
505
|
- mainAxisAlignment:
|
|
|
|
506
|
- MainAxisAlignment.spaceBetween,
|
|
|
|
507
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
508
|
- children: [
|
|
|
|
509
|
- Container(
|
|
|
|
510
|
- // color: Colors.red,
|
|
|
|
511
|
- width: ScreenUtil().setWidth(150),
|
|
|
|
512
|
- height: ScreenUtil().setWidth(35),
|
519
|
+ selecteds:
|
|
|
|
520
|
+ customerProvider.labelSelIndex == null
|
|
|
|
521
|
+ ? []
|
|
|
|
522
|
+ : [
|
|
|
|
523
|
+ customerProvider.labelSelIndex
|
|
|
|
524
|
+ ])
|
|
|
|
525
|
+ .then((value) {});
|
|
|
|
526
|
+ },
|
|
|
|
527
|
+ child: Container(
|
|
|
|
528
|
+ // height: ScreenUtil().setWidth(60),
|
|
|
|
529
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
530
|
+ vertical: ScreenUtil().setWidth(50)),
|
|
|
|
531
|
+ decoration: BoxDecoration(
|
|
|
|
532
|
+ border: Border(
|
|
|
|
533
|
+ bottom: BorderSide(
|
|
|
|
534
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
535
|
+ color: Color.fromRGBO(
|
|
|
|
536
|
+ 220, 220, 220, 1)))),
|
|
|
|
537
|
+ child: Row(
|
|
|
|
538
|
+ mainAxisAlignment:
|
|
|
|
539
|
+ MainAxisAlignment.spaceBetween,
|
|
|
|
540
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
541
|
+ children: [
|
|
|
|
542
|
+ Container(
|
|
|
|
543
|
+ // color: Colors.red,
|
|
|
|
544
|
+ width: ScreenUtil().setWidth(150),
|
|
|
|
545
|
+ height: ScreenUtil().setWidth(35),
|
|
|
|
546
|
+ child: Text(
|
|
|
|
547
|
+ '自定义标签',
|
|
|
|
548
|
+ style: TextStyle(
|
|
|
|
549
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
550
|
+ color: MyColours.color_333333),
|
|
|
|
551
|
+ ),
|
|
|
|
552
|
+ ),
|
|
|
|
553
|
+ Expanded(
|
|
513
|
child: Text(
|
554
|
child: Text(
|
|
514
|
- '自定义标签',
|
|
|
|
515
|
- style: TextStyle(
|
|
|
|
516
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
517
|
- color: MyColours.color_333333),
|
|
|
|
518
|
- ),
|
555
|
+ labelShow,
|
|
|
|
556
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
557
|
+ style: TextStyle(
|
|
|
|
558
|
+ color: Color.fromRGBO(193, 194, 63, 1),
|
|
|
|
559
|
+ fontSize: ScreenUtil().setSp(28),
|
|
519
|
),
|
560
|
),
|
|
520
|
- Expanded(
|
561
|
+ )),
|
|
|
|
562
|
+ HEmptyView(10),
|
|
|
|
563
|
+ Image.asset(
|
|
|
|
564
|
+ Utils.getImgPath(showLabel
|
|
|
|
565
|
+ ? 'c_arrow_up'
|
|
|
|
566
|
+ : 'c_arrow_down'),
|
|
|
|
567
|
+ width: ScreenUtil().setWidth(24),
|
|
|
|
568
|
+ // height: ScreenUtil().setWidth(10),
|
|
|
|
569
|
+ )
|
|
|
|
570
|
+ ],
|
|
|
|
571
|
+ ),
|
|
|
|
572
|
+ )),
|
|
|
|
573
|
+ widget.fromPage == FromPage.FromPageMyCustomer
|
|
|
|
574
|
+ ? SizedBox()
|
|
|
|
575
|
+ : InkWell(
|
|
|
|
576
|
+ onTap: () {
|
|
|
|
577
|
+ // DialogUtil.showSelectCusmanDialog(
|
|
|
|
578
|
+ // context, couponList, (value) {
|
|
|
|
579
|
+ // if (value != null) {
|
|
|
|
580
|
+ // setState(() {
|
|
|
|
581
|
+ // couponSelectIndex = value.first;
|
|
|
|
582
|
+ // });
|
|
|
|
583
|
+ // }
|
|
|
|
584
|
+ // },
|
|
|
|
585
|
+ // selecteds: couponSelectIndex == null
|
|
|
|
586
|
+ // ? []
|
|
|
|
587
|
+ // : [couponSelectIndex])
|
|
|
|
588
|
+ // .then((value) {});
|
|
|
|
589
|
+ },
|
|
|
|
590
|
+ child: Container(
|
|
|
|
591
|
+ // height: ScreenUtil().setWidth(60),
|
|
|
|
592
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
593
|
+ vertical: ScreenUtil().setWidth(50)),
|
|
|
|
594
|
+ decoration: BoxDecoration(
|
|
|
|
595
|
+ border: Border(
|
|
|
|
596
|
+ bottom: BorderSide(
|
|
|
|
597
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
598
|
+ color: Color.fromRGBO(
|
|
|
|
599
|
+ 220, 220, 220, 1)))),
|
|
|
|
600
|
+ child: Row(
|
|
|
|
601
|
+ mainAxisAlignment:
|
|
|
|
602
|
+ MainAxisAlignment.spaceBetween,
|
|
|
|
603
|
+ crossAxisAlignment:
|
|
|
|
604
|
+ CrossAxisAlignment.center,
|
|
|
|
605
|
+ children: [
|
|
|
|
606
|
+ Container(
|
|
|
|
607
|
+ // color: Colors.red,
|
|
|
|
608
|
+ width: ScreenUtil().setWidth(150),
|
|
|
|
609
|
+ height: ScreenUtil().setWidth(35),
|
|
521
|
child: Text(
|
610
|
child: Text(
|
|
522
|
- labelShow,
|
|
|
|
523
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
524
|
- style: TextStyle(
|
|
|
|
525
|
- color: Color.fromRGBO(193, 194, 63, 1),
|
|
|
|
526
|
- fontSize: ScreenUtil().setSp(28),
|
611
|
+ '客户经理',
|
|
|
|
612
|
+ style: TextStyle(
|
|
|
|
613
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
614
|
+ color: MyColours.color_333333),
|
|
|
|
615
|
+ ),
|
|
527
|
),
|
616
|
),
|
|
528
|
- )),
|
|
|
|
529
|
- HEmptyView(10),
|
|
|
|
530
|
- Image.asset(
|
|
|
|
531
|
- Utils.getImgPath(showLabel
|
|
|
|
532
|
- ? 'c_arrow_up'
|
|
|
|
533
|
- : 'c_arrow_down'),
|
|
|
|
534
|
- width: ScreenUtil().setWidth(24),
|
|
|
|
535
|
- // height: ScreenUtil().setWidth(10),
|
|
|
|
536
|
- )
|
|
|
|
537
|
- ],
|
|
|
|
538
|
- ),
|
|
|
|
539
|
- )),
|
|
|
|
540
|
- widget.fromPage == FromPage.FromPageMyCustomer
|
|
|
|
541
|
- ? SizedBox()
|
|
|
|
542
|
- : InkWell(
|
|
|
|
543
|
- onTap: () {
|
|
|
|
544
|
- // DialogUtil.showSelectCusmanDialog(
|
|
|
|
545
|
- // context, couponList, (value) {
|
|
|
|
546
|
- // if (value != null) {
|
|
|
|
547
|
- // setState(() {
|
|
|
|
548
|
- // couponSelectIndex = value.first;
|
|
|
|
549
|
- // });
|
|
|
|
550
|
- // }
|
|
|
|
551
|
- // },
|
|
|
|
552
|
- // selecteds: couponSelectIndex == null
|
|
|
|
553
|
- // ? []
|
|
|
|
554
|
- // : [couponSelectIndex])
|
|
|
|
555
|
- // .then((value) {});
|
|
|
|
556
|
- },
|
|
|
|
557
|
- child: Container(
|
|
|
|
558
|
- // height: ScreenUtil().setWidth(60),
|
|
|
|
559
|
- padding: EdgeInsets.symmetric(
|
|
|
|
560
|
- vertical: ScreenUtil().setWidth(50)),
|
|
|
|
561
|
- decoration: BoxDecoration(
|
|
|
|
562
|
- border: Border(
|
|
|
|
563
|
- bottom: BorderSide(
|
|
|
|
564
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
565
|
- color: Color.fromRGBO(
|
|
|
|
566
|
- 220, 220, 220, 1)))),
|
|
|
|
567
|
- child: Row(
|
|
|
|
568
|
- mainAxisAlignment:
|
|
|
|
569
|
- MainAxisAlignment.spaceBetween,
|
|
|
|
570
|
- crossAxisAlignment:
|
|
|
|
571
|
- CrossAxisAlignment.center,
|
|
|
|
572
|
- children: [
|
|
|
|
573
|
- Container(
|
|
|
|
574
|
- // color: Colors.red,
|
|
|
|
575
|
- width: ScreenUtil().setWidth(150),
|
|
|
|
576
|
- height: ScreenUtil().setWidth(35),
|
617
|
+ Expanded(
|
|
577
|
child: Text(
|
618
|
child: Text(
|
|
578
|
- '客户经理',
|
|
|
|
579
|
- style: TextStyle(
|
|
|
|
580
|
- fontSize:
|
|
|
|
581
|
- ScreenUtil().setSp(28),
|
|
|
|
582
|
- color: MyColours.color_333333),
|
|
|
|
583
|
- ),
|
619
|
+ 'xxxj',
|
|
|
|
620
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
621
|
+ style: TextStyle(
|
|
|
|
622
|
+ color: MyColours.color_333333,
|
|
|
|
623
|
+ fontSize: ScreenUtil().setSp(28),
|
|
584
|
),
|
624
|
),
|
|
585
|
- Expanded(
|
|
|
|
586
|
- child: Text(
|
|
|
|
587
|
- 'xxxj',
|
|
|
|
588
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
589
|
- style: TextStyle(
|
|
|
|
590
|
- color: MyColours.color_333333,
|
|
|
|
591
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
592
|
- ),
|
|
|
|
593
|
- )),
|
|
|
|
594
|
- HEmptyView(10),
|
|
|
|
595
|
- Image.asset(
|
|
|
|
596
|
- Utils.getImgPath(showLabel
|
|
|
|
597
|
- ? 'c_arrow_up'
|
|
|
|
598
|
- : 'c_arrow_down'),
|
|
|
|
599
|
- width: ScreenUtil().setWidth(24),
|
|
|
|
600
|
- // height: ScreenUtil().setWidth(10),
|
|
|
|
601
|
- )
|
|
|
|
602
|
- ],
|
|
|
|
603
|
- ),
|
|
|
|
604
|
- )),
|
|
|
|
605
|
- VEmptyView(60),
|
|
|
|
606
|
- _textMulLine('忌口', '输入忌口的东西', jkController),
|
|
|
|
607
|
- VEmptyView(30),
|
|
|
|
608
|
- _textMulLine('喜好', '输入喜好', xhController),
|
|
|
|
609
|
- VEmptyView(30),
|
|
|
|
610
|
- _textMulLine('服务', '输入服务', fwController),
|
|
|
|
611
|
- ],
|
|
|
|
612
|
- ),
|
625
|
+ )),
|
|
|
|
626
|
+ HEmptyView(10),
|
|
|
|
627
|
+ Image.asset(
|
|
|
|
628
|
+ Utils.getImgPath(showLabel
|
|
|
|
629
|
+ ? 'c_arrow_up'
|
|
|
|
630
|
+ : 'c_arrow_down'),
|
|
|
|
631
|
+ width: ScreenUtil().setWidth(24),
|
|
|
|
632
|
+ // height: ScreenUtil().setWidth(10),
|
|
|
|
633
|
+ )
|
|
|
|
634
|
+ ],
|
|
|
|
635
|
+ ),
|
|
|
|
636
|
+ )),
|
|
|
|
637
|
+ VEmptyView(60),
|
|
|
|
638
|
+ _textMulLine('忌口', '输入忌口的东西', jkController),
|
|
|
|
639
|
+ VEmptyView(30),
|
|
|
|
640
|
+ _textMulLine('喜好', '输入喜好', xhController),
|
|
|
|
641
|
+ VEmptyView(30),
|
|
|
|
642
|
+ _textMulLine('服务', '输入服务', fwController),
|
|
|
|
643
|
+ ],
|
|
613
|
))),
|
644
|
))),
|
|
614
|
RoundButton(
|
645
|
RoundButton(
|
|
615
|
text: '保存',
|
646
|
text: '保存',
|