Commit 6a5f81420187a1978cb44f0f54cd9e3e9a9e8ca8

Authored by wdn127929
1 parent 4841a11c

客请相关UI修改

@@ -67,6 +67,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { @@ -67,6 +67,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
67 @JsonKey(name: 'label') 67 @JsonKey(name: 'label')
68 String label; 68 String label;
69 69
  70 + @JsonKey(name: 'is_member')
  71 + String isMember;
  72 +
70 bool select = false; 73 bool select = false;
71 74
72 String pinyin; 75 String pinyin;
@@ -106,7 +109,8 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean { @@ -106,7 +109,8 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
106 this.uid, 109 this.uid,
107 this.nickName, 110 this.nickName,
108 this.gid, 111 this.gid,
109 - this.label); 112 + this.label,
  113 + this.isMember);
110 114
111 factory CustomerBySellerSunModel.fromJson(Map<String, dynamic> srcJson) => 115 factory CustomerBySellerSunModel.fromJson(Map<String, dynamic> srcJson) =>
112 _$CustomerBySellerSunModelFromJson(srcJson); 116 _$CustomerBySellerSunModelFromJson(srcJson);
@@ -43,6 +43,7 @@ CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson( @@ -43,6 +43,7 @@ CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson(
43 json['nick_name'] as String, 43 json['nick_name'] as String,
44 json['gid'] as String, 44 json['gid'] as String,
45 json['label'] as String, 45 json['label'] as String,
  46 + json['is_member'] as String,
46 ); 47 );
47 } 48 }
48 49
@@ -62,4 +63,5 @@ Map<String, dynamic> _$CustomerBySellerSunModelToJson( @@ -62,4 +63,5 @@ Map<String, dynamic> _$CustomerBySellerSunModelToJson(
62 'nick_name': instance.nickName, 63 'nick_name': instance.nickName,
63 'gid': instance.gid, 64 'gid': instance.gid,
64 'label': instance.label, 65 'label': instance.label,
  66 + 'is_member': instance.isMember
65 }; 67 };
@@ -87,6 +87,9 @@ class CustomerListSunModel extends Object with ISuspensionBean { @@ -87,6 +87,9 @@ class CustomerListSunModel extends Object with ISuspensionBean {
87 String nickName; 87 String nickName;
88 @JsonKey(name: 'gid') 88 @JsonKey(name: 'gid')
89 String gid; 89 String gid;
  90 + @JsonKey(name: 'is_member')
  91 + String isMember;
  92 +
90 93
91 bool select = false; 94 bool select = false;
92 95
@@ -140,6 +143,7 @@ class CustomerListSunModel extends Object with ISuspensionBean { @@ -140,6 +143,7 @@ class CustomerListSunModel extends Object with ISuspensionBean {
140 this.label, 143 this.label,
141 this.nickName, 144 this.nickName,
142 this.gid, 145 this.gid,
  146 + this.isMember
143 ); 147 );
144 148
145 factory CustomerListSunModel.fromJson(Map<String, dynamic> srcJson) => 149 factory CustomerListSunModel.fromJson(Map<String, dynamic> srcJson) =>
@@ -49,7 +49,8 @@ CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) { @@ -49,7 +49,8 @@ CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) {
49 json['month_count'] as String, 49 json['month_count'] as String,
50 json['label'] as String, 50 json['label'] as String,
51 json['nick_name'] as String, 51 json['nick_name'] as String,
52 - json['id'] as String, 52 + json['gid'] as String,
  53 + json['is_member'] as String,
53 ); 54 );
54 } 55 }
55 56
@@ -78,5 +79,6 @@ Map<String, dynamic> _$CustomerListSunModelToJson( @@ -78,5 +79,6 @@ Map<String, dynamic> _$CustomerListSunModelToJson(
78 'month_count': instance.monthCount, 79 'month_count': instance.monthCount,
79 'label': instance.label, 80 'label': instance.label,
80 'nick_name': instance.nickName, 81 'nick_name': instance.nickName,
81 - 'gid': instance.gid 82 + 'gid': instance.gid,
  83 + 'is_member':instance.isMember
82 }; 84 };
@@ -101,6 +101,8 @@ class Guest extends Object { @@ -101,6 +101,8 @@ class Guest extends Object {
101 String label; 101 String label;
102 @JsonKey(name: 'nick_name') 102 @JsonKey(name: 'nick_name')
103 String nickName; 103 String nickName;
  104 + @JsonKey(name: 'is_member')
  105 + String isMember;
104 106
105 String get rnameStr { 107 String get rnameStr {
106 if (rname == null || rname == '' || rname == ' ') return ""; 108 if (rname == null || rname == '' || rname == ' ') return "";
@@ -141,7 +143,8 @@ class Guest extends Object { @@ -141,7 +143,8 @@ class Guest extends Object {
141 this.cDay, 143 this.cDay,
142 this.udate, 144 this.udate,
143 this.label, 145 this.label,
144 - this.nickName); 146 + this.nickName,
  147 + this.isMember);
145 148
146 factory Guest.fromJson(Map<String, dynamic> srcJson) => 149 factory Guest.fromJson(Map<String, dynamic> srcJson) =>
147 _$GuestFromJson(srcJson); 150 _$GuestFromJson(srcJson);
@@ -71,6 +71,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) { @@ -71,6 +71,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) {
71 json['udate'] as String, 71 json['udate'] as String,
72 json['label'] as String, 72 json['label'] as String,
73 json['nick_name'] as String, 73 json['nick_name'] as String,
  74 + json['is_member'] as String,
74 ); 75 );
75 } 76 }
76 77
@@ -91,7 +92,8 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{ @@ -91,7 +92,8 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{
91 'c_day': instance.cDay, 92 'c_day': instance.cDay,
92 'udate': instance.udate, 93 'udate': instance.udate,
93 'label': instance.label, 94 'label': instance.label,
94 - 'nick_name': instance.nickName 95 + 'nick_name': instance.nickName,
  96 + 'is_member': instance.isMember
95 }; 97 };
96 98
97 Cday _$CdayFromJson(Map<String, dynamic> json) { 99 Cday _$CdayFromJson(Map<String, dynamic> json) {
@@ -112,17 +114,16 @@ Map<String, dynamic> _$CdayToJson(Cday instance) => <String, dynamic>{ @@ -112,17 +114,16 @@ Map<String, dynamic> _$CdayToJson(Cday instance) => <String, dynamic>{
112 114
113 Last _$LastFromJson(Map<String, dynamic> json) { 115 Last _$LastFromJson(Map<String, dynamic> json) {
114 return Last( 116 return Last(
115 - json['id'] as String,  
116 - json['ddate'] as String,  
117 - json['ddate_solt'] as String,  
118 - json['tableinfo'] as String,  
119 - json['uid'] as String,  
120 - json['seller_user_nick_name'] as String,  
121 - json['seller_user_phone'] as String,  
122 - json['actual_pum'] as String,  
123 - json['con_amount'] as String,  
124 - json['account'] as String  
125 - ); 117 + json['id'] as String,
  118 + json['ddate'] as String,
  119 + json['ddate_solt'] as String,
  120 + json['tableinfo'] as String,
  121 + json['uid'] as String,
  122 + json['seller_user_nick_name'] as String,
  123 + json['seller_user_phone'] as String,
  124 + json['actual_pum'] as String,
  125 + json['con_amount'] as String,
  126 + json['account'] as String);
126 } 127 }
127 128
128 Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{ 129 Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{
@@ -135,7 +136,7 @@ Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{ @@ -135,7 +136,7 @@ Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{
135 'seller_user_phone': instance.sellerUserPhone, 136 'seller_user_phone': instance.sellerUserPhone,
136 'actual_pum': instance.actualPum, 137 'actual_pum': instance.actualPum,
137 'con_amount': instance.conAmount, 138 'con_amount': instance.conAmount,
138 - 'account':instance.account 139 + 'account': instance.account
139 }; 140 };
140 141
141 Count _$CountFromJson(Map<String, dynamic> json) { 142 Count _$CountFromJson(Map<String, dynamic> json) {
@@ -11,6 +11,8 @@ import 'package:one_key/utils/utils.dart'; @@ -11,6 +11,8 @@ import 'package:one_key/utils/utils.dart';
11 import 'package:one_key/widgets/h_empty_view.dart'; 11 import 'package:one_key/widgets/h_empty_view.dart';
12 import 'package:one_key/widgets/v_empty_view.dart'; 12 import 'package:one_key/widgets/v_empty_view.dart';
13 13
  14 +import '../../../../utils/screen_util.dart';
  15 +
14 class MyContactListPage extends StatefulWidget { 16 class MyContactListPage extends StatefulWidget {
15 final List<CustomerListSunModel> contacts; 17 final List<CustomerListSunModel> contacts;
16 final CustomerProvider provider; 18 final CustomerProvider provider;
@@ -75,16 +77,18 @@ class _MyContactListPageState extends State<MyContactListPage> { @@ -75,16 +77,18 @@ class _MyContactListPageState extends State<MyContactListPage> {
75 Widget _buildSusWidget(String susTag) { 77 Widget _buildSusWidget(String susTag) {
76 return Container( 78 return Container(
77 padding: EdgeInsets.symmetric( 79 padding: EdgeInsets.symmetric(
78 - horizontal: ScreenUtil().setWidth(20), 80 + horizontal: ScreenUtil().setWidth(30),
79 vertical: ScreenUtil().setWidth(10)), 81 vertical: ScreenUtil().setWidth(10)),
80 // height: susItemHeight, 82 // height: susItemHeight,
81 - // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),  
82 - width: double.infinity,  
83 - color: Color.fromRGBO(239, 239, 239, 1), 83 + margin: EdgeInsets.only(
  84 + bottom: ScreenUtil().setWidth(10)),
  85 + width: ScreenUtil().screenWidth,
  86 + color: MyColours.color_efefef,
84 alignment: Alignment.centerLeft, 87 alignment: Alignment.centerLeft,
85 child: Text( 88 child: Text(
86 '$susTag', 89 '$susTag',
87 - style: TextStyle(fontSize: ScreenUtil().setWidth(28)), 90 + style: TextStyle(
  91 + color: MyColours.color_515151, fontSize: ScreenUtil().setWidth(24)),
88 ), 92 ),
89 ); 93 );
90 } 94 }
@@ -167,12 +171,11 @@ class _MyContactListPageState extends State<MyContactListPage> { @@ -167,12 +171,11 @@ class _MyContactListPageState extends State<MyContactListPage> {
167 decoration: BoxDecoration( 171 decoration: BoxDecoration(
168 color: model.attr != null && model.attr != '' 172 color: model.attr != null && model.attr != ''
169 ? model.attr == '沉睡' 173 ? model.attr == '沉睡'
170 - ? Color.fromRGBO(223, 33, 81, 1) 174 + ? MyColours.color_999999
171 : model.attr == '活跃' 175 : model.attr == '活跃'
172 - ? Color.fromRGBO(81, 170, 94, 1) 176 + ? MyColours.color_00715F
173 : model.attr == '流失' 177 : model.attr == '流失'
174 - ? Color.fromRGBO(  
175 - 109, 101, 248, 1) 178 + ? MyColours.color_E34D59
176 : Color.fromRGBO( 179 : Color.fromRGBO(
177 239, 143, 49, 1) 180 239, 143, 49, 1)
178 : Colors.transparent, 181 : Colors.transparent,
@@ -365,6 +368,249 @@ class _MyContactListPageState extends State<MyContactListPage> { @@ -365,6 +368,249 @@ class _MyContactListPageState extends State<MyContactListPage> {
365 ); 368 );
366 } 369 }
367 370
  371 + Widget flatBtn(String tilte, Color color) {
  372 + return Container(
  373 + height: w(18),
  374 + alignment: Alignment.center,
  375 + padding: EdgeInsets.symmetric(horizontal: w(4)),
  376 + margin: EdgeInsets.only(left: w(10)),
  377 + decoration: BoxDecoration(
  378 + border: Border.all(color: color, width: w(1)),
  379 + borderRadius: BorderRadius.circular(r(5))),
  380 + child: Text(
  381 + tilte,
  382 + style: TextStyle(fontSize: font(10), color: color),
  383 + ),
  384 + );
  385 + }
  386 +
  387 + ///改版item样式
  388 + Widget _buildListNewItem(CustomerListSunModel model, int index) {
  389 + String susTag = model.getSuspensionTag();
  390 +
  391 + return
  392 + // Column(
  393 + // children: <Widget>[
  394 + // Offstage(
  395 + // offstage: model.isShowSuspension != true,
  396 + // child: _buildSusWidget(susTag),
  397 + // ),
  398 + // model.isShowSuspension ? VEmptyView(20) : SizedBox(),
  399 + Stack(
  400 + alignment: Alignment.centerLeft,
  401 + children: [
  402 + GestureDetector(
  403 + behavior: HitTestBehavior.opaque,
  404 + onTap: () {
  405 + if (widget.fromPage != FromPage.FromPageShowCutomerList) {
  406 + NavigatorUtil.goMyCustomerDetailPage(
  407 + context, model, widget.fromPage);
  408 + }
  409 + },
  410 + child: Container(
  411 + margin: EdgeInsets.only(
  412 + left: ScreenUtil().setWidth(40),
  413 + right: ScreenUtil().setWidth(32),
  414 + bottom: ScreenUtil().setWidth(6),
  415 + top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(6)),
  416 + decoration: BoxDecoration(
  417 + color: MyColours.color_ffffff,
  418 + borderRadius: BorderRadius.circular(r(8)),
  419 + boxShadow: [
  420 + BoxShadow(
  421 + offset: Offset(0, w(4)),
  422 + color: MyColours.color_40000000,
  423 + blurRadius: ScreenUtil().setWidth(8))
  424 + ]),
  425 + child: Column(
  426 + children: [
  427 + Container(
  428 + height: w(35),
  429 + padding: EdgeInsets.symmetric(horizontal: w(15)),
  430 + decoration: BoxDecoration(
  431 + color: MyColours.color_F8F9FD,
  432 + borderRadius: BorderRadius.only(
  433 + topLeft: Radius.circular(r(8)),
  434 + topRight: Radius.circular(r(8))),
  435 + ),
  436 + child: Row(
  437 + children: [
  438 + model.rnameStr != null && model.rnameStr != ''
  439 + ? Row(
  440 + // crossAxisAlignment: CrossAxisAlignment.end,
  441 + children: [
  442 + Container(
  443 + width: w(72),
  444 + child: Text(
  445 + model.rnameStr,
  446 + overflow: TextOverflow.ellipsis,
  447 + style: TextStyle(
  448 + color: MyColours.color_515151,
  449 + fontSize: ScreenUtil().setSp(36),
  450 + fontWeight: FontWeight.bold),
  451 + )),
  452 + HEmptyView(10),
  453 + Text(
  454 + model.sexStr != '' && model.sexStr != null
  455 + ? '${model.sexStr}'
  456 + : '',
  457 + style: TextStyle(
  458 + color: MyColours.color_515151,
  459 + fontWeight: FontWeight.bold,
  460 + fontSize: ScreenUtil().setSp(20),
  461 + ),
  462 + ),
  463 + HEmptyView(10),
  464 + ],
  465 + )
  466 + : SizedBox(),
  467 + Spacer(),
  468 + Container(
  469 + width: w(70),
  470 + child: Text(
  471 + model.phone,
  472 + overflow: TextOverflow.ellipsis,
  473 + style: TextStyle(
  474 + color: MyColours.color_515151,
  475 + fontSize: ScreenUtil().setSp(20),
  476 + ),
  477 + ),
  478 + ),
  479 + HEmptyView(88)
  480 + // HEmptyView(20),
  481 + // model.nickName == null
  482 + // ? SizedBox()
  483 + // : Text(
  484 + // '经理:${model.nickName}',
  485 + // style: TextStyle(
  486 + // color: MyColours.color_515151,
  487 + // fontSize: ScreenUtil().setSp(20),
  488 + // ),
  489 + // )
  490 + ],
  491 + ),
  492 + ),
  493 + Padding(
  494 + padding: EdgeInsets.all(w(15)),
  495 + child: Row(
  496 + children: [
  497 + Container(
  498 + width: w(30),
  499 + height: w(16),
  500 + alignment: Alignment.center,
  501 + // padding: EdgeInsets.symmetric(
  502 + // horizontal: ScreenUtil().setWidth(10),
  503 + // vertical: ScreenUtil().setWidth(2),
  504 + // ),
  505 + decoration: BoxDecoration(
  506 + color: model.attr != null && model.attr != ''
  507 + ? model.attr == '沉睡'
  508 + ? MyColours.color_999999
  509 + : model.attr == '活跃'
  510 + ? MyColours.color_00715F
  511 + : model.attr == '流失'
  512 + ? MyColours.color_E34D59
  513 + : Color.fromRGBO(
  514 + 239, 143, 49, 1)
  515 + : Colors.transparent,
  516 + borderRadius: BorderRadius.circular(
  517 + ScreenUtil().setWidth(10),
  518 + ),
  519 + ),
  520 + child: Text(
  521 + model.attr == null || model.attr == ''
  522 + ? ''
  523 + : model.attr,
  524 + style: TextStyle(
  525 + color: MyColours.color_ffffff,
  526 + fontSize: ScreenUtil().setSp(20)))),
  527 + model.label != null
  528 + ? flatBtn(model.label, MyColours.color_B39437)
  529 + : SizedBox(),
  530 + model.isMember == '1'
  531 + ? flatBtn('会员', MyColours.color_438E93)
  532 + : SizedBox(),
  533 + true
  534 + ? flatBtn('存酒14天', MyColours.color_438E93)
  535 + : SizedBox()
  536 + ],
  537 + )),
  538 + Padding(
  539 + padding: EdgeInsets.only(
  540 + left: w(15), right: w(15), bottom: w(10)),
  541 + child: Row(
  542 + children: [
  543 + Text(
  544 + Utils.formatFromYmd(model.ddate),
  545 + style: TextStyle(
  546 + color: MyColours.color_515151,
  547 + fontSize: ScreenUtil().setSp(20),
  548 + ),
  549 + ),
  550 + HEmptyView(10),
  551 + Text(
  552 + model.ddateSolt != null ? model.ddateSolt : '',
  553 + style: TextStyle(
  554 + color: MyColours.color_515151,
  555 + fontSize: ScreenUtil().setSp(20),
  556 + ),
  557 + ),
  558 + model.monthCount == '0' || model.monthCount == null
  559 + ? SizedBox()
  560 + : HEmptyView(10),
  561 + model.monthCount == '0' || model.monthCount == null
  562 + ? SizedBox()
  563 + : Text(
  564 + '30天内${model.monthCount}单',
  565 + style: TextStyle(
  566 + color: MyColours.color_515151,
  567 + fontSize: ScreenUtil().setSp(20),
  568 + ),
  569 + ),
  570 + HEmptyView(10),
  571 + Text(
  572 + '累计${model.leiji}单',
  573 + style: TextStyle(
  574 + color: MyColours.color_515151,
  575 + fontSize: ScreenUtil().setSp(20),
  576 + ),
  577 + ),
  578 + ],
  579 + ))
  580 + ],
  581 + ),
  582 + )),
  583 + widget.fromPage == FromPage.FromPageShowCutomerList
  584 + ? SizedBox()
  585 + : Positioned(
  586 + left: ScreenUtil().setWidth(20),
  587 + child: GestureDetector(
  588 + behavior: HitTestBehavior.opaque,
  589 + onTap: () {
  590 + if (widget.fromPage != FromPage.FromPageShowCutomerList) {
  591 + List<CustomerListSunModel> data =
  592 + widget.provider.userHistorys;
  593 + data[index].select = !data[index].select;
  594 + if (data[index].select) {
  595 + widget.provider.addDataMy(index);
  596 + } else {
  597 + widget.provider.cancelDataMy(index);
  598 + }
  599 + widget.provider.getCheckValueMy();
  600 + }
  601 + },
  602 + child: Image.asset(
  603 + Utils.getImgPath(
  604 + model.select ? 'c_mul_select' : 'c_not_edit'),
  605 + width: ScreenUtil().setWidth(40),
  606 + ))),
  607 + ],
  608 + )
  609 + // ],
  610 + // )
  611 + ;
  612 + }
  613 +
368 Decoration getIndexBarDecoration(Color color) { 614 Decoration getIndexBarDecoration(Color color) {
369 return BoxDecoration( 615 return BoxDecoration(
370 color: color, 616 color: color,
@@ -374,36 +620,92 @@ class _MyContactListPageState extends State<MyContactListPage> { @@ -374,36 +620,92 @@ class _MyContactListPageState extends State<MyContactListPage> {
374 620
375 @override 621 @override
376 Widget build(BuildContext context) { 622 Widget build(BuildContext context) {
  623 + // return AzListView(
  624 + // data: widget.contacts,
  625 + // itemCount: widget.contacts.length,
  626 + // itemBuilder: (BuildContext context, int index) {
  627 + // // if (index == 0) return _buildHeader();
  628 + // CustomerListSunModel model = widget.contacts[index];
  629 + // return _buildListNewItem(model, index);
  630 + // },
  631 + // physics: BouncingScrollPhysics(),
  632 + // indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
  633 + // indexHintBuilder: (context, hint) {
  634 + // return Container(
  635 + // alignment: Alignment.center,
  636 + // width: ScreenUtil().setWidth(120),
  637 + // height: ScreenUtil().setWidth(120),
  638 + // decoration: BoxDecoration(
  639 + // color: Color.fromRGBO(239, 239, 239, 1),
  640 + // shape: BoxShape.circle,
  641 + // ),
  642 + // child:
  643 + // Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),
  644 + // );
  645 + // },
  646 + // indexBarMargin: EdgeInsets.all(10),
  647 + // indexBarOptions: IndexBarOptions(
  648 + // needRebuild: true,
  649 + // textStyle: TextStyle(
  650 + // fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),
  651 + // decoration: getIndexBarDecoration(Colors.transparent),
  652 + // downDecoration: getIndexBarDecoration(Colors.transparent),
  653 + // ),
  654 + // );
377 return AzListView( 655 return AzListView(
  656 + indexBarItemHeight: w(12),
378 data: widget.contacts, 657 data: widget.contacts,
379 itemCount: widget.contacts.length, 658 itemCount: widget.contacts.length,
380 itemBuilder: (BuildContext context, int index) { 659 itemBuilder: (BuildContext context, int index) {
381 // if (index == 0) return _buildHeader(); 660 // if (index == 0) return _buildHeader();
382 CustomerListSunModel model = widget.contacts[index]; 661 CustomerListSunModel model = widget.contacts[index];
383 - return _buildListItem(model, index); 662 + return _buildListNewItem(model, index);
384 }, 663 },
385 physics: BouncingScrollPhysics(), 664 physics: BouncingScrollPhysics(),
  665 +
386 indexBarData: SuspensionUtil.getTagIndexList(widget.contacts), 666 indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
  667 + indexBarAlignment: Alignment.centerRight,
  668 + // susItemBuilder: (context, index) {
  669 + // return Container(
  670 + // child: Text('ffsfgs'),
  671 + // );
  672 + // },
  673 +
  674 + susItemBuilder: (context, index) {
  675 + CustomerListSunModel model = widget.contacts[index];
  676 + String susTag = model.getSuspensionTag();
  677 + return _buildSusWidget(susTag);
  678 + },
  679 +
387 indexHintBuilder: (context, hint) { 680 indexHintBuilder: (context, hint) {
388 return Container( 681 return Container(
389 alignment: Alignment.center, 682 alignment: Alignment.center,
390 width: ScreenUtil().setWidth(120), 683 width: ScreenUtil().setWidth(120),
391 height: ScreenUtil().setWidth(120), 684 height: ScreenUtil().setWidth(120),
392 decoration: BoxDecoration( 685 decoration: BoxDecoration(
393 - color: Color.fromRGBO(239, 239, 239, 1), 686 + color: MyColours.color_80D9D9D9,
394 shape: BoxShape.circle, 687 shape: BoxShape.circle,
395 ), 688 ),
396 - child:  
397 - Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)), 689 + child: Text(hint,
  690 + style:
  691 + TextStyle(color: MyColours.color_438E93, fontSize: font(30))),
398 ); 692 );
399 }, 693 },
400 indexBarMargin: EdgeInsets.all(10), 694 indexBarMargin: EdgeInsets.all(10),
401 indexBarOptions: IndexBarOptions( 695 indexBarOptions: IndexBarOptions(
402 needRebuild: true, 696 needRebuild: true,
  697 + hapticFeedback: true,
  698 + ignoreDragCancel: true,
  699 + indexHintAlignment: Alignment.centerRight,
403 textStyle: TextStyle( 700 textStyle: TextStyle(
404 - fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),  
405 - decoration: getIndexBarDecoration(Colors.transparent),  
406 - downDecoration: getIndexBarDecoration(Colors.transparent), 701 + fontSize: ScreenUtil().setSp(20), color: MyColours.color_999999),
  702 + // downTextStyle: TextStyle(
  703 + // fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
  704 + selectTextStyle: TextStyle(
  705 + fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
  706 + selectItemDecoration: BoxDecoration(color: Colors.transparent),
  707 + decoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
  708 + downDecoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
407 ), 709 ),
408 ); 710 );
409 } 711 }
@@ -47,9 +47,13 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> { @@ -47,9 +47,13 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> {
47 CustomerProvider customerProvider; 47 CustomerProvider customerProvider;
48 String labelShow = ''; 48 String labelShow = '';
49 ScrollController scrollController = ScrollController(); 49 ScrollController scrollController = ScrollController();
  50 + List<String> memberList = [];
  51 + int memberIndex;
  52 + String memberShow = '';
50 @override 53 @override
51 void initState() { 54 void initState() {
52 super.initState(); 55 super.initState();
  56 + memberList = ['是', '否'];
53 _initSexList(); 57 _initSexList();
54 nameFocus.addListener(() { 58 nameFocus.addListener(() {
55 if (nameFocus.hasFocus) { 59 if (nameFocus.hasFocus) {
@@ -491,6 +495,70 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> { @@ -491,6 +495,70 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> {
491 ], 495 ],
492 ), 496 ),
493 ), 497 ),
  498 + InkWell(
  499 + onTap: () {
  500 + FocusScope.of(context)
  501 + .requestFocus(FocusNode()); //隐藏键盘
  502 + DialogUtil.showSelectCusmanDialog(
  503 + context, memberList, (value) {
  504 + if (value != null) {
  505 + setState(() {
  506 + memberIndex = value.first;
  507 + memberShow = memberList[memberIndex];
  508 + });
  509 + }
  510 + },
  511 + selecteds: memberIndex == null
  512 + ? []
  513 + : [memberIndex])
  514 + .then((value) {});
  515 + },
  516 + child: Container(
  517 + // height: ScreenUtil().setWidth(60),
  518 + padding: EdgeInsets.symmetric(
  519 + vertical: ScreenUtil().setWidth(50)),
  520 + decoration: BoxDecoration(
  521 + border: Border(
  522 + bottom: BorderSide(
  523 + width: ScreenUtil().setWidth(2),
  524 + color: Color.fromRGBO(
  525 + 220, 220, 220, 1)))),
  526 + child: Row(
  527 + mainAxisAlignment:
  528 + MainAxisAlignment.spaceBetween,
  529 + crossAxisAlignment: CrossAxisAlignment.center,
  530 + children: [
  531 + Container(
  532 + // color: Colors.red,
  533 + width: ScreenUtil().setWidth(150),
  534 + height: ScreenUtil().setWidth(35),
  535 + child: Text(
  536 + '会员',
  537 + style: TextStyle(
  538 + fontSize: ScreenUtil().setSp(28),
  539 + color: MyColours.color_333333),
  540 + ),
  541 + ),
  542 + Expanded(
  543 + child: Text(
  544 + memberShow,
  545 + overflow: TextOverflow.ellipsis,
  546 + style: TextStyle(
  547 + color: MyColours.color_353535,
  548 + fontSize: ScreenUtil().setSp(28),
  549 + ),
  550 + )),
  551 + HEmptyView(10),
  552 + Image.asset(
  553 + Utils.getImgPath(showLabel
  554 + ? 'c_arrow_up'
  555 + : 'c_arrow_down'),
  556 + width: ScreenUtil().setWidth(24),
  557 + // height: ScreenUtil().setWidth(10),
  558 + )
  559 + ],
  560 + ),
  561 + )),
494 _textfieldWidget( 562 _textfieldWidget(
495 '电话', '填写电话', phoneController, phoneFocus), 563 '电话', '填写电话', phoneController, phoneFocus),
496 _textfieldWidget( 564 _textfieldWidget(
@@ -17,6 +17,8 @@ import 'package:one_key/widgets/round_button.dart'; @@ -17,6 +17,8 @@ import 'package:one_key/widgets/round_button.dart';
17 import 'package:one_key/widgets/system_app_bar.dart'; 17 import 'package:one_key/widgets/system_app_bar.dart';
18 import 'package:one_key/widgets/v_empty_view.dart'; 18 import 'package:one_key/widgets/v_empty_view.dart';
19 import 'package:provider/provider.dart'; 19 import 'package:provider/provider.dart';
  20 +
  21 +import '../../../../utils/screen_util.dart';
20 /** 22 /**
21 * 23 *
22 * 我的客户详情 24 * 我的客户详情
@@ -276,6 +278,332 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -276,6 +278,332 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
276 )); 278 ));
277 } 279 }
278 280
  281 + ///修改后widget
  282 + Widget _headNewItem() {
  283 + return Stack(
  284 + alignment: Alignment.centerRight,
  285 + children: [
  286 + Container(
  287 + color: MyColours.color_ffffff,
  288 + padding: EdgeInsets.only(
  289 + left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)),
  290 + child: Wrap(
  291 + children: [
  292 + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
  293 + Row(
  294 + children: [
  295 + Container(
  296 + constraints: BoxConstraints(
  297 + maxWidth: ScreenUtil().setWidth(260)),
  298 + child: Text(
  299 + customerProvider.guestInfoSunModel.guest.rnameStr,
  300 + overflow: TextOverflow.ellipsis,
  301 + style: TextStyle(
  302 + color: MyColours.color_515151,
  303 + fontWeight: FontWeight.bold,
  304 + fontSize: ScreenUtil().setSp(36)),
  305 + )),
  306 + HEmptyView(10),
  307 + Container(
  308 + child: Text(
  309 + customerProvider.guestInfoSunModel.guest.sexStr != ''
  310 + ? '${customerProvider.guestInfoSunModel.guest.sexStr}'
  311 + : '',
  312 + style: TextStyle(
  313 + color: MyColours.color_515151,
  314 + fontWeight: FontWeight.bold,
  315 + fontSize: ScreenUtil().setSp(20),
  316 + ),
  317 + )),
  318 + HEmptyView(6),
  319 + Text(
  320 + customerProvider.guestInfoSunModel.guest.phone,
  321 + overflow: TextOverflow.ellipsis,
  322 + style: TextStyle(
  323 + color: MyColours.color_515151,
  324 + fontWeight: FontWeight.bold,
  325 + fontSize: ScreenUtil().setSp(20),
  326 + ),
  327 + )
  328 + ],
  329 + ),
  330 + VEmptyView(20),
  331 + Row(
  332 + mainAxisAlignment: MainAxisAlignment.start,
  333 + children: [
  334 + if (customerProvider.guestInfoSunModel.guest.attr != null &&
  335 + customerProvider.guestInfoSunModel.guest.attr != '')
  336 + Container(
  337 + width: w(30),
  338 + height: w(16),
  339 + alignment: Alignment.center,
  340 + // padding: EdgeInsets.symmetric(
  341 + // horizontal: ScreenUtil().setWidth(10),
  342 + // vertical: ScreenUtil().setWidth(2),
  343 + // ),
  344 + decoration: BoxDecoration(
  345 + color: customerProvider
  346 + .guestInfoSunModel.guest.attr !=
  347 + null &&
  348 + customerProvider
  349 + .guestInfoSunModel.guest.attr !=
  350 + ''
  351 + ? customerProvider
  352 + .guestInfoSunModel.guest.attr ==
  353 + '沉睡'
  354 + ? MyColours.color_999999
  355 + : customerProvider
  356 + .guestInfoSunModel.guest.attr ==
  357 + '活跃'
  358 + ? MyColours.color_00715F
  359 + : customerProvider.guestInfoSunModel
  360 + .guest.attr ==
  361 + '流失'
  362 + ? MyColours.color_E34D59
  363 + : Color.fromRGBO(239, 143, 49, 1)
  364 + : Colors.transparent,
  365 + borderRadius: BorderRadius.circular(
  366 + ScreenUtil().setWidth(10),
  367 + ),
  368 + ),
  369 + child: Text(
  370 + customerProvider.guestInfoSunModel.guest.attr,
  371 + style: TextStyle(
  372 + color: MyColours.color_ffffff,
  373 + fontSize: ScreenUtil().setSp(20)))),
  374 + if (customerProvider.guestInfoSunModel.guest.label != null)
  375 + flatBtn(customerProvider.guestInfoSunModel.guest.label,
  376 + MyColours.color_B39437),
  377 + if (customerProvider.guestInfoSunModel.guest.isMember ==
  378 + '1')
  379 + flatBtn('会员', MyColours.color_438E93),
  380 + if (true) flatBtn('存酒14天', MyColours.color_438E93)
  381 + ],
  382 + ),
  383 + VEmptyView(20),
  384 + // Text(
  385 + // customerProvider.guestInfoSunModel.guest.nickName == null
  386 + // ? '经理:未指派'
  387 + // : '经理:${customerProvider.guestInfoSunModel.guest.nickName}',
  388 + // style: TextStyle(
  389 + // color: MyColours.color_515151,
  390 + // fontSize: ScreenUtil().setSp(24)),
  391 + // ),
  392 + // VEmptyView(20),
  393 + Row(
  394 + children: [
  395 + Text(
  396 + '已创建 ',
  397 + overflow: TextOverflow.ellipsis,
  398 + style: TextStyle(
  399 + color: MyColours.color_515151,
  400 + fontSize: ScreenUtil().setSp(24)),
  401 + ),
  402 + Text(
  403 + '${customerProvider.guestInfoSunModel.count.createTime}',
  404 + style: TextStyle(
  405 + color: MyColours.color_438E93,
  406 + fontSize: ScreenUtil().setSp(24),
  407 + ),
  408 + strutStyle: StrutStyle(
  409 + forceStrutHeight: true, height: 1, leading: 0.3),
  410 + ),
  411 + Text(
  412 + ' 天 | 累计 ',
  413 + overflow: TextOverflow.ellipsis,
  414 + style: TextStyle(
  415 + color: MyColours.color_515151,
  416 + fontSize: ScreenUtil().setSp(24)),
  417 + ),
  418 + Text(
  419 + '${customerProvider.guestInfoSunModel.count.leiji}',
  420 + style: TextStyle(
  421 + color: MyColours.color_438E93,
  422 + fontSize: ScreenUtil().setSp(24),
  423 + ),
  424 + strutStyle: StrutStyle(
  425 + forceStrutHeight: true, height: 1, leading: 0.3),
  426 + ),
  427 + Text(
  428 + ' 单 | 取消 ',
  429 + overflow: TextOverflow.ellipsis,
  430 + style: TextStyle(
  431 + color: MyColours.color_515151,
  432 + fontSize: ScreenUtil().setSp(24)),
  433 + ),
  434 + Text(
  435 + '${customerProvider.guestInfoSunModel.count.quxiao}',
  436 + style: TextStyle(
  437 + color: MyColours.color_438E93,
  438 + fontSize: ScreenUtil().setSp(24),
  439 + ),
  440 + strutStyle: StrutStyle(
  441 + forceStrutHeight: true, height: 1, leading: 0.3),
  442 + ),
  443 + Text(
  444 + ' 单',
  445 + overflow: TextOverflow.ellipsis,
  446 + style: TextStyle(
  447 + color: MyColours.color_515151,
  448 + fontSize: ScreenUtil().setSp(24)),
  449 + ),
  450 + ],
  451 + ),
  452 + VEmptyView(20),
  453 + Wrap(
  454 + children: [
  455 + Text(
  456 + Utils.formatFromMill(
  457 + customerProvider.guestInfoSunModel.last.ddate),
  458 + overflow: TextOverflow.ellipsis,
  459 + style: TextStyle(
  460 + fontSize: ScreenUtil().setSp(20),
  461 + color: MyColours.color_E34D59),
  462 + ),
  463 + Text(
  464 + customerProvider.guestInfoSunModel.last.ddateSoltStr,
  465 + style: TextStyle(
  466 + fontSize: ScreenUtil().setSp(20),
  467 + color: MyColours.color_438E93),
  468 + ),
  469 + Text(
  470 + ' 桌位',
  471 + style: TextStyle(
  472 + fontSize: ScreenUtil().setSp(20),
  473 + color: MyColours.color_515151),
  474 + ),
  475 + Text(
  476 + customerProvider.guestInfoSunModel.last.tableinfoName,
  477 + style: TextStyle(
  478 + fontSize: ScreenUtil().setSp(20),
  479 + color: MyColours.color_438E93),
  480 + ),
  481 + Text(
  482 + ' 人数',
  483 + style: TextStyle(
  484 + fontSize: ScreenUtil().setSp(20),
  485 + color: MyColours.color_515151),
  486 + ),
  487 + Text(
  488 + customerProvider.guestInfoSunModel.last.actualPum == null
  489 + ? '未记录'
  490 + : customerProvider.guestInfoSunModel.last.actualPum,
  491 + style: TextStyle(
  492 + fontSize: ScreenUtil().setSp(20),
  493 + color: MyColours.color_438E93),
  494 + ),
  495 + Text(
  496 + ' 消费',
  497 + style: TextStyle(
  498 + fontSize: ScreenUtil().setSp(20),
  499 + color: MyColours.color_515151),
  500 + ),
  501 + Text(
  502 + customerProvider.guestInfoSunModel.last.conAmount == null
  503 + ? '未记录'
  504 + : customerProvider.guestInfoSunModel.last.conAmount,
  505 + style: TextStyle(
  506 + fontSize: ScreenUtil().setSp(20),
  507 + color: MyColours.color_438E93),
  508 + ),
  509 + Text(
  510 + ' 预订',
  511 + style: TextStyle(
  512 + fontSize: ScreenUtil().setSp(20),
  513 + color: MyColours.color_515151),
  514 + ),
  515 + Text(
  516 + '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
  517 + style: TextStyle(
  518 + fontSize: ScreenUtil().setSp(20),
  519 + color: MyColours.color_438E93),
  520 + )
  521 + ],
  522 + ),
  523 + ]),
  524 + ],
  525 + ),
  526 + ),
  527 + Positioned(
  528 + right: w(20),
  529 + child: Column(
  530 + children: [
  531 + RoundButton(
  532 + text: '编辑',
  533 + gradientStart: MyColours.color_ffffff,
  534 + gradientEnd: MyColours.color_ffffff,
  535 + textColor: MyColours.color_438E93,
  536 + borderColor: MyColours.color_438E93,
  537 + width: w(72),
  538 + radius: r(11),
  539 + fontSize: 24,
  540 + isBold: true,
  541 + height: w(22),
  542 + onPressed: () {
  543 + NavigatorUtil.goMyCustomerDetailEditPage(
  544 + context,
  545 + customerProvider.guestInfoSunModel.guest,
  546 + widget.fromPage);
  547 + },
  548 + ),
  549 + VEmptyView(20),
  550 + RoundButton(
  551 + text: '拨打电话',
  552 + gradientStart: MyColours.color_ffffff,
  553 + gradientEnd: MyColours.color_ffffff,
  554 + textColor: MyColours.color_438E93,
  555 + borderColor: MyColours.color_438E93,
  556 + width: w(72),
  557 + radius: r(11),
  558 + fontSize: 24,
  559 + isBold: true,
  560 + height: w(22),
  561 + onPressed: () {
  562 + DialogUtil.goPhone(
  563 + customerProvider.guestInfoSunModel.guest.phone);
  564 + },
  565 + ),
  566 + VEmptyView(20),
  567 + RoundButton(
  568 + text: '预订历史',
  569 + gradientStart: MyColours.color_ffffff,
  570 + gradientEnd: MyColours.color_ffffff,
  571 + textColor: MyColours.color_438E93,
  572 + borderColor: MyColours.color_438E93,
  573 + width: w(72),
  574 + radius: r(11),
  575 + fontSize: 24,
  576 + isBold: true,
  577 + height: w(22),
  578 + onPressed: () {
  579 + NavigatorUtil.goMyCustomerOrderPage(
  580 + context,
  581 + customerProvider.guestInfoSunModel.guest.id,
  582 + customerProvider.guestInfoSunModel.guest.phone);
  583 + },
  584 + )
  585 + ],
  586 + ))
  587 + ],
  588 + );
  589 + }
  590 +
  591 + Widget flatBtn(String tilte, Color color) {
  592 + return Container(
  593 + height: w(18),
  594 + alignment: Alignment.center,
  595 + padding: EdgeInsets.symmetric(horizontal: w(4)),
  596 + margin: EdgeInsets.only(left: w(10)),
  597 + decoration: BoxDecoration(
  598 + border: Border.all(color: color, width: w(1)),
  599 + borderRadius: BorderRadius.circular(r(5))),
  600 + child: Text(
  601 + tilte,
  602 + style: TextStyle(fontSize: font(10), color: color),
  603 + ),
  604 + );
  605 + }
  606 +
279 @override 607 @override
280 Widget build(BuildContext context) { 608 Widget build(BuildContext context) {
281 customerProvider = Provider.of<CustomerProvider>(context, listen: true); 609 customerProvider = Provider.of<CustomerProvider>(context, listen: true);
@@ -313,145 +641,146 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -313,145 +641,146 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
313 height: ScreenUtil().setWidth(20), 641 height: ScreenUtil().setWidth(20),
314 color: MyColours.color_ffffff, 642 color: MyColours.color_ffffff,
315 ), 643 ),
316 - _headerWidget(),  
317 - VEmptyView(20),  
318 - Container(  
319 - padding: EdgeInsets.symmetric(  
320 - horizontal: ScreenUtil().setWidth(40),  
321 - vertical: ScreenUtil().setWidth(20)),  
322 - decoration: BoxDecoration(  
323 - color: MyColours.color_199095,  
324 - borderRadius: BorderRadius.only(  
325 - topRight:  
326 - Radius.circular(ScreenUtil().setWidth(20)),  
327 - topLeft:  
328 - Radius.circular(ScreenUtil().setWidth(20)))),  
329 - child: Row(  
330 - children: [  
331 - Expanded(  
332 - child: Text(  
333 - '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',  
334 - overflow: TextOverflow.ellipsis,  
335 - style: TextStyle(  
336 - color: MyColours.color_ffffff,  
337 - fontSize: ScreenUtil().setSp(30)),  
338 - )),  
339 - InkWell(  
340 - onTap: () {  
341 - NavigatorUtil.goMyCustomerOrderPage(  
342 - context,  
343 - customerProvider.guestInfoSunModel.guest.id,  
344 - customerProvider  
345 - .guestInfoSunModel.guest.phone);  
346 - },  
347 - child: Text('更多',  
348 - style: TextStyle(  
349 - decoration: TextDecoration.underline,  
350 - color: MyColours.color_ffffff,  
351 - fontSize: ScreenUtil().setSp(26)))),  
352 - ],  
353 - ),  
354 - ),  
355 - Container(  
356 - color: MyColours.color_ffffff,  
357 - padding: EdgeInsets.symmetric(  
358 - horizontal: ScreenUtil().setWidth(20),  
359 - vertical: ScreenUtil().setWidth(20)),  
360 - child: Column(  
361 - children: [  
362 - Wrap(  
363 - children: [  
364 - Text(  
365 - '最近一次:',  
366 - style: TextStyle(  
367 - fontSize: ScreenUtil().setSp(24),  
368 - color: MyColours.color_333333),  
369 - ),  
370 - Text(  
371 - Utils.formatFromMill(customerProvider  
372 - .guestInfoSunModel.last.ddate),  
373 - overflow: TextOverflow.ellipsis,  
374 - style: TextStyle(  
375 - fontSize: ScreenUtil().setSp(24),  
376 - color: Color.fromRGBO(208, 31, 37, 1)),  
377 - ),  
378 - Text(  
379 - customerProvider  
380 - .guestInfoSunModel.last.ddateSoltStr,  
381 - style: TextStyle(  
382 - fontSize: ScreenUtil().setSp(24),  
383 - color: MyColours.color_199095),  
384 - ),  
385 - Text(  
386 - ' 桌位:',  
387 - style: TextStyle(  
388 - fontSize: ScreenUtil().setSp(24),  
389 - color: MyColours.color_333333),  
390 - ),  
391 - Text(  
392 - customerProvider  
393 - .guestInfoSunModel.last.tableinfoName,  
394 - style: TextStyle(  
395 - fontSize: ScreenUtil().setSp(24),  
396 - color: MyColours.color_199095),  
397 - ),  
398 - Text(  
399 - ' 人数:',  
400 - style: TextStyle(  
401 - fontSize: ScreenUtil().setSp(24),  
402 - color: MyColours.color_333333),  
403 - ),  
404 - Text(  
405 - customerProvider  
406 - .guestInfoSunModel.last.actualPum ==  
407 - null  
408 - ? '未记录'  
409 - : customerProvider  
410 - .guestInfoSunModel.last.actualPum,  
411 - style: TextStyle(  
412 - fontSize: ScreenUtil().setSp(24),  
413 - color: MyColours.color_199095),  
414 - ),  
415 - Text(  
416 - ' 消费:',  
417 - style: TextStyle(  
418 - fontSize: ScreenUtil().setSp(24),  
419 - color: MyColours.color_333333),  
420 - ),  
421 - Text(  
422 - customerProvider  
423 - .guestInfoSunModel.last.conAmount ==  
424 - null  
425 - ? '未记录'  
426 - : customerProvider  
427 - .guestInfoSunModel.last.conAmount,  
428 - style: TextStyle(  
429 - fontSize: ScreenUtil().setSp(24),  
430 - color: MyColours.color_199095),  
431 - )  
432 - ],  
433 - ),  
434 - VEmptyView(6),  
435 - Row(  
436 - mainAxisAlignment: MainAxisAlignment.center,  
437 - children: [  
438 - Text(  
439 - '客户经理:',  
440 - style: TextStyle(  
441 - fontSize: ScreenUtil().setSp(24),  
442 - color: MyColours.color_333333),  
443 - ),  
444 - Text(  
445 - '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? customerProvider.guestInfoSunModel.last.account} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}',  
446 - style: TextStyle(  
447 - fontSize: ScreenUtil().setSp(24),  
448 - color: MyColours.color_199095),  
449 - )  
450 - ],  
451 - )  
452 - ],  
453 - ),  
454 - ), 644 + // _headerWidget(),
  645 + // VEmptyView(20),
  646 + // Container(
  647 + // padding: EdgeInsets.symmetric(
  648 + // horizontal: ScreenUtil().setWidth(40),
  649 + // vertical: ScreenUtil().setWidth(20)),
  650 + // decoration: BoxDecoration(
  651 + // color: MyColours.color_199095,
  652 + // borderRadius: BorderRadius.only(
  653 + // topRight:
  654 + // Radius.circular(ScreenUtil().setWidth(20)),
  655 + // topLeft:
  656 + // Radius.circular(ScreenUtil().setWidth(20)))),
  657 + // child: Row(
  658 + // children: [
  659 + // Expanded(
  660 + // child: Text(
  661 + // '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
  662 + // overflow: TextOverflow.ellipsis,
  663 + // style: TextStyle(
  664 + // color: MyColours.color_ffffff,
  665 + // fontSize: ScreenUtil().setSp(30)),
  666 + // )),
  667 + // InkWell(
  668 + // onTap: () {
  669 + // NavigatorUtil.goMyCustomerOrderPage(
  670 + // context,
  671 + // customerProvider.guestInfoSunModel.guest.id,
  672 + // customerProvider
  673 + // .guestInfoSunModel.guest.phone);
  674 + // },
  675 + // child: Text('更多',
  676 + // style: TextStyle(
  677 + // decoration: TextDecoration.underline,
  678 + // color: MyColours.color_ffffff,
  679 + // fontSize: ScreenUtil().setSp(26)))),
  680 + // ],
  681 + // ),
  682 + // ),
  683 + // Container(
  684 + // color: MyColours.color_ffffff,
  685 + // padding: EdgeInsets.symmetric(
  686 + // horizontal: ScreenUtil().setWidth(20),
  687 + // vertical: ScreenUtil().setWidth(20)),
  688 + // child: Column(
  689 + // children: [
  690 + // Wrap(
  691 + // children: [
  692 + // Text(
  693 + // '最近一次:',
  694 + // style: TextStyle(
  695 + // fontSize: ScreenUtil().setSp(24),
  696 + // color: MyColours.color_333333),
  697 + // ),
  698 + // Text(
  699 + // Utils.formatFromMill(customerProvider
  700 + // .guestInfoSunModel.last.ddate),
  701 + // overflow: TextOverflow.ellipsis,
  702 + // style: TextStyle(
  703 + // fontSize: ScreenUtil().setSp(24),
  704 + // color: Color.fromRGBO(208, 31, 37, 1)),
  705 + // ),
  706 + // Text(
  707 + // customerProvider
  708 + // .guestInfoSunModel.last.ddateSoltStr,
  709 + // style: TextStyle(
  710 + // fontSize: ScreenUtil().setSp(24),
  711 + // color: MyColours.color_199095),
  712 + // ),
  713 + // Text(
  714 + // ' 桌位:',
  715 + // style: TextStyle(
  716 + // fontSize: ScreenUtil().setSp(24),
  717 + // color: MyColours.color_333333),
  718 + // ),
  719 + // Text(
  720 + // customerProvider
  721 + // .guestInfoSunModel.last.tableinfoName,
  722 + // style: TextStyle(
  723 + // fontSize: ScreenUtil().setSp(24),
  724 + // color: MyColours.color_199095),
  725 + // ),
  726 + // Text(
  727 + // ' 人数:',
  728 + // style: TextStyle(
  729 + // fontSize: ScreenUtil().setSp(24),
  730 + // color: MyColours.color_333333),
  731 + // ),
  732 + // Text(
  733 + // customerProvider
  734 + // .guestInfoSunModel.last.actualPum ==
  735 + // null
  736 + // ? '未记录'
  737 + // : customerProvider
  738 + // .guestInfoSunModel.last.actualPum,
  739 + // style: TextStyle(
  740 + // fontSize: ScreenUtil().setSp(24),
  741 + // color: MyColours.color_199095),
  742 + // ),
  743 + // Text(
  744 + // ' 消费:',
  745 + // style: TextStyle(
  746 + // fontSize: ScreenUtil().setSp(24),
  747 + // color: MyColours.color_333333),
  748 + // ),
  749 + // Text(
  750 + // customerProvider
  751 + // .guestInfoSunModel.last.conAmount ==
  752 + // null
  753 + // ? '未记录'
  754 + // : customerProvider
  755 + // .guestInfoSunModel.last.conAmount,
  756 + // style: TextStyle(
  757 + // fontSize: ScreenUtil().setSp(24),
  758 + // color: MyColours.color_199095),
  759 + // )
  760 + // ],
  761 + // ),
  762 + // VEmptyView(6),
  763 + // Row(
  764 + // mainAxisAlignment: MainAxisAlignment.center,
  765 + // children: [
  766 + // Text(
  767 + // '客户经理:',
  768 + // style: TextStyle(
  769 + // fontSize: ScreenUtil().setSp(24),
  770 + // color: MyColours.color_333333),
  771 + // ),
  772 + // Text(
  773 + // '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? customerProvider.guestInfoSunModel.last.account} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}',
  774 + // style: TextStyle(
  775 + // fontSize: ScreenUtil().setSp(24),
  776 + // color: MyColours.color_199095),
  777 + // )
  778 + // ],
  779 + // )
  780 + // ],
  781 + // ),
  782 + // ),
  783 + _headNewItem(),
455 VEmptyView(20), 784 VEmptyView(20),
456 _lineItemWidget('工作单位', 785 _lineItemWidget('工作单位',
457 '${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'), 786 '${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'),
@@ -9,7 +9,10 @@ import 'package:one_key/provider/customer_provider.dart'; @@ -9,7 +9,10 @@ import 'package:one_key/provider/customer_provider.dart';
9 import 'package:one_key/res/colors.dart'; 9 import 'package:one_key/res/colors.dart';
10 import 'package:one_key/route/navigator_util.dart'; 10 import 'package:one_key/route/navigator_util.dart';
11 import 'package:one_key/utils/utils.dart'; 11 import 'package:one_key/utils/utils.dart';
  12 +import 'package:one_key/widgets/common_button.dart';
  13 +import 'package:one_key/widgets/common_button_flat.dart';
12 import 'package:one_key/widgets/h_empty_view.dart'; 14 import 'package:one_key/widgets/h_empty_view.dart';
  15 +import 'package:one_key/widgets/round_button.dart';
13 import 'package:one_key/widgets/v_empty_view.dart'; 16 import 'package:one_key/widgets/v_empty_view.dart';
14 17
15 import '../../../../utils/screen_util.dart'; 18 import '../../../../utils/screen_util.dart';
@@ -76,16 +79,17 @@ class _ContactListPageState extends State<ContactListPage> { @@ -76,16 +79,17 @@ class _ContactListPageState extends State<ContactListPage> {
76 Widget _buildSusWidget(String susTag) { 79 Widget _buildSusWidget(String susTag) {
77 return Container( 80 return Container(
78 padding: EdgeInsets.symmetric( 81 padding: EdgeInsets.symmetric(
79 - horizontal: ScreenUtil().setWidth(20), 82 + horizontal: ScreenUtil().setWidth(30),
80 vertical: ScreenUtil().setWidth(10)), 83 vertical: ScreenUtil().setWidth(10)),
81 // height: susItemHeight, 84 // height: susItemHeight,
82 // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)), 85 // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
83 - width: double.infinity,  
84 - color: Color.fromRGBO(239, 239, 239, 1), 86 + width: ScreenUtil().screenWidth,
  87 + color: MyColours.color_efefef,
85 alignment: Alignment.centerLeft, 88 alignment: Alignment.centerLeft,
86 child: Text( 89 child: Text(
87 '$susTag', 90 '$susTag',
88 - style: TextStyle(fontSize: ScreenUtil().setWidth(28)), 91 + style: TextStyle(
  92 + color: MyColours.color_515151, fontSize: ScreenUtil().setWidth(24)),
89 ), 93 ),
90 ); 94 );
91 } 95 }
@@ -168,12 +172,11 @@ class _ContactListPageState extends State<ContactListPage> { @@ -168,12 +172,11 @@ class _ContactListPageState extends State<ContactListPage> {
168 decoration: BoxDecoration( 172 decoration: BoxDecoration(
169 color: model.attr != null && model.attr != '' 173 color: model.attr != null && model.attr != ''
170 ? model.attr == '沉睡' 174 ? model.attr == '沉睡'
171 - ? Color.fromRGBO(223, 33, 81, 1) 175 + ? MyColours.color_999999
172 : model.attr == '活跃' 176 : model.attr == '活跃'
173 - ? Color.fromRGBO(81, 170, 94, 1) 177 + ? MyColours.color_00715F
174 : model.attr == '流失' 178 : model.attr == '流失'
175 - ? Color.fromRGBO(  
176 - 109, 101, 248, 1) 179 + ? MyColours.color_E34D59
177 : Color.fromRGBO( 180 : Color.fromRGBO(
178 239, 143, 49, 1) 181 239, 143, 49, 1)
179 : Colors.transparent, 182 : Colors.transparent,
@@ -348,6 +351,249 @@ class _ContactListPageState extends State<ContactListPage> { @@ -348,6 +351,249 @@ class _ContactListPageState extends State<ContactListPage> {
348 ); 351 );
349 } 352 }
350 353
  354 + Widget flatBtn(String tilte, Color color) {
  355 + return Container(
  356 + height: w(18),
  357 + alignment: Alignment.center,
  358 + padding: EdgeInsets.symmetric(horizontal: w(4)),
  359 + margin: EdgeInsets.only(left: w(10)),
  360 + decoration: BoxDecoration(
  361 + border: Border.all(color: color, width: w(1)),
  362 + borderRadius: BorderRadius.circular(r(5))),
  363 + child: Text(
  364 + tilte,
  365 + style: TextStyle(fontSize: font(10), color: color),
  366 + ),
  367 + );
  368 + }
  369 +
  370 + ///改版item样式
  371 + Widget _buildListNewItem(CustomerBySellerSunModel model, int index) {
  372 + String susTag = model.getSuspensionTag();
  373 +
  374 + return
  375 + // Column(
  376 + // children: <Widget>[
  377 + // Offstage(
  378 + // offstage: model.isShowSuspension != true,
  379 + // child: _buildSusWidget(susTag),
  380 + // ),
  381 + // model.isShowSuspension ? VEmptyView(20) : SizedBox(),
  382 + Stack(
  383 + alignment: Alignment.centerLeft,
  384 + children: [
  385 + GestureDetector(
  386 + behavior: HitTestBehavior.opaque,
  387 + onTap: () {
  388 + if (model.gid != null &&
  389 + widget.fromPage != FromPage.FromPageShowCutomerList) {
  390 + NavigatorUtil.goCustomerDetailPage(
  391 + context, model, widget.fromPage);
  392 + }
  393 + },
  394 + child: Container(
  395 + margin: EdgeInsets.only(
  396 + left: ScreenUtil().setWidth(40),
  397 + right: ScreenUtil().setWidth(32),
  398 + bottom: ScreenUtil().setWidth(6),
  399 + top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(6)),
  400 + decoration: BoxDecoration(
  401 + color: MyColours.color_ffffff,
  402 + borderRadius: BorderRadius.circular(r(8)),
  403 + boxShadow: [
  404 + BoxShadow(
  405 + offset: Offset(0, w(4)),
  406 + color: MyColours.color_40000000,
  407 + blurRadius: ScreenUtil().setWidth(8))
  408 + ]),
  409 + child: Column(
  410 + children: [
  411 + Container(
  412 + height: w(35),
  413 + padding: EdgeInsets.symmetric(horizontal: w(15)),
  414 + decoration: BoxDecoration(
  415 + color: MyColours.color_F8F9FD,
  416 + borderRadius: BorderRadius.only(
  417 + topLeft: Radius.circular(r(8)),
  418 + topRight: Radius.circular(r(8))),
  419 + ),
  420 + child: Row(
  421 + children: [
  422 + model.rnameStr != null && model.rnameStr != ''
  423 + ? Row(
  424 + // crossAxisAlignment: CrossAxisAlignment.end,
  425 + children: [
  426 + Container(
  427 + width: w(72),
  428 + child: Text(
  429 + model.rnameStr,
  430 + overflow: TextOverflow.ellipsis,
  431 + style: TextStyle(
  432 + color: MyColours.color_515151,
  433 + fontSize: ScreenUtil().setSp(36),
  434 + fontWeight: FontWeight.bold),
  435 + )),
  436 + HEmptyView(10),
  437 + Text(
  438 + model.sexStr != '' && model.sexStr != null
  439 + ? '${model.sexStr}'
  440 + : '',
  441 + style: TextStyle(
  442 + color: MyColours.color_515151,
  443 + fontWeight: FontWeight.bold,
  444 + fontSize: ScreenUtil().setSp(20),
  445 + ),
  446 + ),
  447 + HEmptyView(10),
  448 + ],
  449 + )
  450 + : SizedBox(),
  451 + HEmptyView(74),
  452 + Container(
  453 + width: w(70),
  454 + child: Text(
  455 + Utils.starPhone('${model.phone}'),
  456 + overflow: TextOverflow.ellipsis,
  457 + style: TextStyle(
  458 + color: MyColours.color_515151,
  459 + fontSize: ScreenUtil().setSp(20),
  460 + ),
  461 + ),
  462 + ),
  463 + HEmptyView(20),
  464 + model.nickName == null
  465 + ? SizedBox()
  466 + : Text(
  467 + '经理:${model.nickName}',
  468 + style: TextStyle(
  469 + color: MyColours.color_515151,
  470 + fontSize: ScreenUtil().setSp(20),
  471 + ),
  472 + )
  473 + ],
  474 + ),
  475 + ),
  476 + Padding(
  477 + padding: EdgeInsets.all(w(15)),
  478 + child: Row(
  479 + children: [
  480 + Container(
  481 + width: w(30),
  482 + height: w(16),
  483 + alignment: Alignment.center,
  484 + // padding: EdgeInsets.symmetric(
  485 + // horizontal: ScreenUtil().setWidth(10),
  486 + // vertical: ScreenUtil().setWidth(2),
  487 + // ),
  488 + decoration: BoxDecoration(
  489 + color: model.attr != null && model.attr != ''
  490 + ?model.attr == '沉睡'
  491 + ? MyColours.color_999999
  492 + : model.attr == '活跃'
  493 + ? MyColours.color_00715F
  494 + : model.attr == '流失'
  495 + ? MyColours.color_E34D59
  496 + : Color.fromRGBO(
  497 + 239, 143, 49, 1)
  498 + : Colors.transparent,
  499 + borderRadius: BorderRadius.circular(
  500 + ScreenUtil().setWidth(10),
  501 + ),
  502 + ),
  503 + child: Text(
  504 + model.attr == null || model.attr == ''
  505 + ? ''
  506 + : model.attr,
  507 + style: TextStyle(
  508 + color: MyColours.color_ffffff,
  509 + fontSize: ScreenUtil().setSp(20)))),
  510 + model.label != null
  511 + ? flatBtn(model.label, MyColours.color_B39437)
  512 + : SizedBox(),
  513 + model.isMember == '1'
  514 + ? flatBtn('会员', MyColours.color_438E93)
  515 + : SizedBox(),
  516 + true
  517 + ? flatBtn('存酒14天', MyColours.color_438E93)
  518 + : SizedBox()
  519 + ],
  520 + )),
  521 + Padding(
  522 + padding: EdgeInsets.only(
  523 + left: w(15), right: w(15), bottom: w(10)),
  524 + child: Row(
  525 + children: [
  526 + Text(
  527 + Utils.formatFromYmd(model.ddate),
  528 + style: TextStyle(
  529 + color: MyColours.color_515151,
  530 + fontSize: ScreenUtil().setSp(20),
  531 + ),
  532 + ),
  533 + HEmptyView(10),
  534 + Text(
  535 + model.ddateSolt != null ? model.ddateSolt : '',
  536 + style: TextStyle(
  537 + color: MyColours.color_515151,
  538 + fontSize: ScreenUtil().setSp(20),
  539 + ),
  540 + ),
  541 + model.monthCount == '0' || model.monthCount == null
  542 + ? SizedBox()
  543 + : HEmptyView(10),
  544 + model.monthCount == '0' || model.monthCount == null
  545 + ? SizedBox()
  546 + : Text(
  547 + '30天内${model.monthCount}单',
  548 + style: TextStyle(
  549 + color: MyColours.color_515151,
  550 + fontSize: ScreenUtil().setSp(20),
  551 + ),
  552 + ),
  553 + HEmptyView(10),
  554 + Text(
  555 + '累计${model.leiji}单',
  556 + style: TextStyle(
  557 + color: MyColours.color_515151,
  558 + fontSize: ScreenUtil().setSp(20),
  559 + ),
  560 + ),
  561 + ],
  562 + ))
  563 + ],
  564 + ),
  565 + )),
  566 + widget.fromPage == FromPage.FromPageShowCutomerList
  567 + ? SizedBox()
  568 + : Positioned(
  569 + left: ScreenUtil().setWidth(20),
  570 + child: GestureDetector(
  571 + behavior: HitTestBehavior.opaque,
  572 + onTap: () {
  573 + if (model.gid != null) {
  574 + List<CustomerBySellerSunModel> data =
  575 + widget.provider.customerBySellerList;
  576 + data[index].select = !data[index].select;
  577 + if (data[index].select) {
  578 + widget.provider.addData(index);
  579 + } else {
  580 + widget.provider.cancelData(index);
  581 + }
  582 + widget.provider.getCheckValue();
  583 + }
  584 + },
  585 + child: Image.asset(
  586 + Utils.getImgPath(
  587 + model.select ? 'c_mul_select' : 'c_not_edit'),
  588 + width: ScreenUtil().setWidth(40),
  589 + ))),
  590 + ],
  591 + )
  592 + // ],
  593 + // )
  594 + ;
  595 + }
  596 +
351 Decoration getIndexBarDecoration(Color color) { 597 Decoration getIndexBarDecoration(Color color) {
352 return BoxDecoration( 598 return BoxDecoration(
353 color: color, 599 color: color,
@@ -364,30 +610,53 @@ class _ContactListPageState extends State<ContactListPage> { @@ -364,30 +610,53 @@ class _ContactListPageState extends State<ContactListPage> {
364 itemBuilder: (BuildContext context, int index) { 610 itemBuilder: (BuildContext context, int index) {
365 // if (index == 0) return _buildHeader(); 611 // if (index == 0) return _buildHeader();
366 CustomerBySellerSunModel model = widget.contacts[index]; 612 CustomerBySellerSunModel model = widget.contacts[index];
367 - return _buildListItem(model, index); 613 + return _buildListNewItem(model, index);
368 }, 614 },
369 physics: BouncingScrollPhysics(), 615 physics: BouncingScrollPhysics(),
  616 +
370 indexBarData: SuspensionUtil.getTagIndexList(widget.contacts), 617 indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
  618 + indexBarAlignment: Alignment.centerRight,
  619 + // susItemBuilder: (context, index) {
  620 + // return Container(
  621 + // child: Text('ffsfgs'),
  622 + // );
  623 + // },
  624 +
  625 + susItemBuilder: (context, index) {
  626 + CustomerBySellerSunModel model = widget.contacts[index];
  627 + String susTag = model.getSuspensionTag();
  628 + return _buildSusWidget(susTag);
  629 + },
  630 +
371 indexHintBuilder: (context, hint) { 631 indexHintBuilder: (context, hint) {
372 return Container( 632 return Container(
373 alignment: Alignment.center, 633 alignment: Alignment.center,
374 width: ScreenUtil().setWidth(120), 634 width: ScreenUtil().setWidth(120),
375 height: ScreenUtil().setWidth(120), 635 height: ScreenUtil().setWidth(120),
376 decoration: BoxDecoration( 636 decoration: BoxDecoration(
377 - color: Color.fromRGBO(239, 239, 239, 1), 637 + color: MyColours.color_80D9D9D9,
378 shape: BoxShape.circle, 638 shape: BoxShape.circle,
379 ), 639 ),
380 - child:  
381 - Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)), 640 + child: Text(hint,
  641 + style:
  642 + TextStyle(color: MyColours.color_438E93, fontSize: font(30))),
382 ); 643 );
383 }, 644 },
384 indexBarMargin: EdgeInsets.all(10), 645 indexBarMargin: EdgeInsets.all(10),
385 indexBarOptions: IndexBarOptions( 646 indexBarOptions: IndexBarOptions(
386 needRebuild: true, 647 needRebuild: true,
  648 + hapticFeedback: true,
  649 + ignoreDragCancel: true,
  650 + indexHintAlignment: Alignment.centerRight,
387 textStyle: TextStyle( 651 textStyle: TextStyle(
388 - fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),  
389 - decoration: getIndexBarDecoration(Colors.transparent),  
390 - downDecoration: getIndexBarDecoration(Colors.transparent), 652 + fontSize: ScreenUtil().setSp(20), color: MyColours.color_999999),
  653 + // downTextStyle: TextStyle(
  654 + // fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
  655 + selectTextStyle: TextStyle(
  656 + fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
  657 + selectItemDecoration: BoxDecoration(color: Colors.transparent),
  658 + decoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
  659 + downDecoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
391 ), 660 ),
392 ); 661 );
393 } 662 }
@@ -48,10 +48,14 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { @@ -48,10 +48,14 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
48 CustomerProvider customerProvider; 48 CustomerProvider customerProvider;
49 String labelShow = ''; 49 String labelShow = '';
50 String manageShow = ''; 50 String manageShow = '';
  51 + String memberShow = '';
51 ScrollController scrollController = ScrollController(); 52 ScrollController scrollController = ScrollController();
  53 + List<String> memberList = [];
  54 + int memberIndex;
52 @override 55 @override
53 void initState() { 56 void initState() {
54 super.initState(); 57 super.initState();
  58 + memberList = ['是', '否'];
55 _initSexList(); 59 _initSexList();
56 nameFocus.addListener(() { 60 nameFocus.addListener(() {
57 if (nameFocus.hasFocus) { 61 if (nameFocus.hasFocus) {
@@ -506,6 +510,70 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> { @@ -506,6 +510,70 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
506 ], 510 ],
507 ), 511 ),
508 ), 512 ),
  513 + InkWell(
  514 + onTap: () {
  515 + FocusScope.of(context)
  516 + .requestFocus(FocusNode()); //隐藏键盘
  517 + DialogUtil.showSelectCusmanDialog(
  518 + context, memberList, (value) {
  519 + if (value != null) {
  520 + setState(() {
  521 + memberIndex = value.first;
  522 + memberShow = memberList[memberIndex];
  523 + });
  524 + }
  525 + },
  526 + selecteds: memberIndex == null
  527 + ? []
  528 + : [memberIndex])
  529 + .then((value) {});
  530 + },
  531 + child: Container(
  532 + // height: ScreenUtil().setWidth(60),
  533 + padding: EdgeInsets.symmetric(
  534 + vertical: ScreenUtil().setWidth(50)),
  535 + decoration: BoxDecoration(
  536 + border: Border(
  537 + bottom: BorderSide(
  538 + width: ScreenUtil().setWidth(2),
  539 + color: Color.fromRGBO(
  540 + 220, 220, 220, 1)))),
  541 + child: Row(
  542 + mainAxisAlignment:
  543 + MainAxisAlignment.spaceBetween,
  544 + crossAxisAlignment: CrossAxisAlignment.center,
  545 + children: [
  546 + Container(
  547 + // color: Colors.red,
  548 + width: ScreenUtil().setWidth(150),
  549 + height: ScreenUtil().setWidth(35),
  550 + child: Text(
  551 + '会员',
  552 + style: TextStyle(
  553 + fontSize: ScreenUtil().setSp(28),
  554 + color: MyColours.color_333333),
  555 + ),
  556 + ),
  557 + Expanded(
  558 + child: Text(
  559 + memberShow,
  560 + overflow: TextOverflow.ellipsis,
  561 + style: TextStyle(
  562 + color: MyColours.color_353535,
  563 + fontSize: ScreenUtil().setSp(28),
  564 + ),
  565 + )),
  566 + HEmptyView(10),
  567 + Image.asset(
  568 + Utils.getImgPath(showLabel
  569 + ? 'c_arrow_up'
  570 + : 'c_arrow_down'),
  571 + width: ScreenUtil().setWidth(24),
  572 + // height: ScreenUtil().setWidth(10),
  573 + )
  574 + ],
  575 + ),
  576 + )),
509 _textfieldWidget( 577 _textfieldWidget(
510 '电话', '填写电话', phoneController, phoneFocus), 578 '电话', '填写电话', phoneController, phoneFocus),
511 _textfieldWidget( 579 _textfieldWidget(
@@ -18,6 +18,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; @@ -18,6 +18,8 @@ import 'package:one_key/widgets/system_app_bar.dart';
18 import 'package:one_key/widgets/v_empty_view.dart'; 18 import 'package:one_key/widgets/v_empty_view.dart';
19 import 'package:provider/provider.dart'; 19 import 'package:provider/provider.dart';
20 20
  21 +import '../../../../utils/screen_util.dart';
  22 +
21 class CustomerDetailPage extends StatefulWidget { 23 class CustomerDetailPage extends StatefulWidget {
22 final CustomerBySellerSunModel userHistoryEntity; 24 final CustomerBySellerSunModel userHistoryEntity;
23 final FromPage fromPage; 25 final FromPage fromPage;
@@ -293,6 +295,332 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -293,6 +295,332 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
293 )); 295 ));
294 } 296 }
295 297
  298 + ///修改后widget
  299 + Widget _headNewItem() {
  300 + return Stack(
  301 + alignment: Alignment.centerRight,
  302 + children: [
  303 + Container(
  304 + color: MyColours.color_ffffff,
  305 + padding: EdgeInsets.only(
  306 + left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)),
  307 + child: Wrap(
  308 + children: [
  309 + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
  310 + Row(
  311 + children: [
  312 + Container(
  313 + constraints: BoxConstraints(
  314 + maxWidth: ScreenUtil().setWidth(260)),
  315 + child: Text(
  316 + customerProvider.guestInfoSunModel.guest.rnameStr,
  317 + overflow: TextOverflow.ellipsis,
  318 + style: TextStyle(
  319 + color: MyColours.color_515151,
  320 + fontWeight: FontWeight.bold,
  321 + fontSize: ScreenUtil().setSp(36)),
  322 + )),
  323 + HEmptyView(10),
  324 + Container(
  325 + child: Text(
  326 + customerProvider.guestInfoSunModel.guest.sexStr != ''
  327 + ? '${customerProvider.guestInfoSunModel.guest.sexStr}'
  328 + : '',
  329 + style: TextStyle(
  330 + color: MyColours.color_515151,
  331 + fontWeight: FontWeight.bold,
  332 + fontSize: ScreenUtil().setSp(20),
  333 + ),
  334 + )),
  335 + HEmptyView(6),
  336 + Text(
  337 + customerProvider.guestInfoSunModel.guest.phone,
  338 + overflow: TextOverflow.ellipsis,
  339 + style: TextStyle(
  340 + color: MyColours.color_515151,
  341 + fontWeight: FontWeight.bold,
  342 + fontSize: ScreenUtil().setSp(20),
  343 + ),
  344 + )
  345 + ],
  346 + ),
  347 + VEmptyView(20),
  348 + Row(
  349 + mainAxisAlignment: MainAxisAlignment.start,
  350 + children: [
  351 + if (customerProvider.guestInfoSunModel.guest.attr != null &&
  352 + customerProvider.guestInfoSunModel.guest.attr != '')
  353 + Container(
  354 + width: w(30),
  355 + height: w(16),
  356 + alignment: Alignment.center,
  357 + // padding: EdgeInsets.symmetric(
  358 + // horizontal: ScreenUtil().setWidth(10),
  359 + // vertical: ScreenUtil().setWidth(2),
  360 + // ),
  361 + decoration: BoxDecoration(
  362 + color: customerProvider
  363 + .guestInfoSunModel.guest.attr !=
  364 + null &&
  365 + customerProvider
  366 + .guestInfoSunModel.guest.attr !=
  367 + ''
  368 + ? customerProvider
  369 + .guestInfoSunModel.guest.attr ==
  370 + '沉睡'
  371 + ? MyColours.color_999999
  372 + : customerProvider
  373 + .guestInfoSunModel.guest.attr ==
  374 + '活跃'
  375 + ? MyColours.color_00715F
  376 + : customerProvider.guestInfoSunModel
  377 + .guest.attr ==
  378 + '流失'
  379 + ? MyColours.color_E34D59
  380 + : Color.fromRGBO(239, 143, 49, 1)
  381 + : Colors.transparent,
  382 + borderRadius: BorderRadius.circular(
  383 + ScreenUtil().setWidth(10),
  384 + ),
  385 + ),
  386 + child: Text(
  387 + customerProvider.guestInfoSunModel.guest.attr,
  388 + style: TextStyle(
  389 + color: MyColours.color_ffffff,
  390 + fontSize: ScreenUtil().setSp(20)))),
  391 + if (customerProvider.guestInfoSunModel.guest.label != null)
  392 + flatBtn(customerProvider.guestInfoSunModel.guest.label,
  393 + MyColours.color_B39437),
  394 + if (customerProvider.guestInfoSunModel.guest.isMember ==
  395 + '1')
  396 + flatBtn('会员', MyColours.color_438E93),
  397 + if (true) flatBtn('存酒14天', MyColours.color_438E93)
  398 + ],
  399 + ),
  400 + VEmptyView(20),
  401 + Text(
  402 + customerProvider.guestInfoSunModel.guest.nickName == null
  403 + ? '经理:未指派'
  404 + : '经理:${customerProvider.guestInfoSunModel.guest.nickName}',
  405 + style: TextStyle(
  406 + color: MyColours.color_515151,
  407 + fontSize: ScreenUtil().setSp(24)),
  408 + ),
  409 + VEmptyView(20),
  410 + Row(
  411 + children: [
  412 + Text(
  413 + '已创建 ',
  414 + overflow: TextOverflow.ellipsis,
  415 + style: TextStyle(
  416 + color: MyColours.color_515151,
  417 + fontSize: ScreenUtil().setSp(24)),
  418 + ),
  419 + Text(
  420 + '${customerProvider.guestInfoSunModel.count.createTime}',
  421 + style: TextStyle(
  422 + color: MyColours.color_438E93,
  423 + fontSize: ScreenUtil().setSp(24),
  424 + ),
  425 + strutStyle: StrutStyle(
  426 + forceStrutHeight: true, height: 1, leading: 0.3),
  427 + ),
  428 + Text(
  429 + ' 天 | 累计 ',
  430 + overflow: TextOverflow.ellipsis,
  431 + style: TextStyle(
  432 + color: MyColours.color_515151,
  433 + fontSize: ScreenUtil().setSp(24)),
  434 + ),
  435 + Text(
  436 + '${customerProvider.guestInfoSunModel.count.leiji}',
  437 + style: TextStyle(
  438 + color: MyColours.color_438E93,
  439 + fontSize: ScreenUtil().setSp(24),
  440 + ),
  441 + strutStyle: StrutStyle(
  442 + forceStrutHeight: true, height: 1, leading: 0.3),
  443 + ),
  444 + Text(
  445 + ' 单 | 取消 ',
  446 + overflow: TextOverflow.ellipsis,
  447 + style: TextStyle(
  448 + color: MyColours.color_515151,
  449 + fontSize: ScreenUtil().setSp(24)),
  450 + ),
  451 + Text(
  452 + '${customerProvider.guestInfoSunModel.count.quxiao}',
  453 + style: TextStyle(
  454 + color: MyColours.color_438E93,
  455 + fontSize: ScreenUtil().setSp(24),
  456 + ),
  457 + strutStyle: StrutStyle(
  458 + forceStrutHeight: true, height: 1, leading: 0.3),
  459 + ),
  460 + Text(
  461 + ' 单',
  462 + overflow: TextOverflow.ellipsis,
  463 + style: TextStyle(
  464 + color: MyColours.color_515151,
  465 + fontSize: ScreenUtil().setSp(24)),
  466 + ),
  467 + ],
  468 + ),
  469 + VEmptyView(20),
  470 + Wrap(
  471 + children: [
  472 + Text(
  473 + Utils.formatFromMill(
  474 + customerProvider.guestInfoSunModel.last.ddate),
  475 + overflow: TextOverflow.ellipsis,
  476 + style: TextStyle(
  477 + fontSize: ScreenUtil().setSp(20),
  478 + color: MyColours.color_E34D59),
  479 + ),
  480 + Text(
  481 + customerProvider.guestInfoSunModel.last.ddateSoltStr,
  482 + style: TextStyle(
  483 + fontSize: ScreenUtil().setSp(20),
  484 + color: MyColours.color_438E93),
  485 + ),
  486 + Text(
  487 + ' 桌位',
  488 + style: TextStyle(
  489 + fontSize: ScreenUtil().setSp(20),
  490 + color: MyColours.color_515151),
  491 + ),
  492 + Text(
  493 + customerProvider.guestInfoSunModel.last.tableinfoName,
  494 + style: TextStyle(
  495 + fontSize: ScreenUtil().setSp(20),
  496 + color: MyColours.color_438E93),
  497 + ),
  498 + Text(
  499 + ' 人数',
  500 + style: TextStyle(
  501 + fontSize: ScreenUtil().setSp(20),
  502 + color: MyColours.color_515151),
  503 + ),
  504 + Text(
  505 + customerProvider.guestInfoSunModel.last.actualPum == null
  506 + ? '未记录'
  507 + : customerProvider.guestInfoSunModel.last.actualPum,
  508 + style: TextStyle(
  509 + fontSize: ScreenUtil().setSp(20),
  510 + color: MyColours.color_438E93),
  511 + ),
  512 + Text(
  513 + ' 消费',
  514 + style: TextStyle(
  515 + fontSize: ScreenUtil().setSp(20),
  516 + color: MyColours.color_515151),
  517 + ),
  518 + Text(
  519 + customerProvider.guestInfoSunModel.last.conAmount == null
  520 + ? '未记录'
  521 + : customerProvider.guestInfoSunModel.last.conAmount,
  522 + style: TextStyle(
  523 + fontSize: ScreenUtil().setSp(20),
  524 + color: MyColours.color_438E93),
  525 + ),
  526 + Text(
  527 + ' 预订',
  528 + style: TextStyle(
  529 + fontSize: ScreenUtil().setSp(20),
  530 + color: MyColours.color_515151),
  531 + ),
  532 + Text(
  533 + '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
  534 + style: TextStyle(
  535 + fontSize: ScreenUtil().setSp(20),
  536 + color: MyColours.color_438E93),
  537 + )
  538 + ],
  539 + ),
  540 + ]),
  541 + ],
  542 + ),
  543 + ),
  544 + Positioned(
  545 + right: w(20),
  546 + child: Column(
  547 + children: [
  548 + RoundButton(
  549 + text: '编辑',
  550 + gradientStart: MyColours.color_ffffff,
  551 + gradientEnd: MyColours.color_ffffff,
  552 + textColor: MyColours.color_438E93,
  553 + borderColor: MyColours.color_438E93,
  554 + width: w(72),
  555 + radius: r(11),
  556 + fontSize: 24,
  557 + isBold: true,
  558 + height: w(22),
  559 + onPressed: () {
  560 + NavigatorUtil.goCustomerDetailEditPage(
  561 + context,
  562 + customerProvider.guestInfoSunModel.guest,
  563 + widget.fromPage);
  564 + },
  565 + ),
  566 + VEmptyView(20),
  567 + RoundButton(
  568 + text: '拨打电话',
  569 + gradientStart: MyColours.color_ffffff,
  570 + gradientEnd: MyColours.color_ffffff,
  571 + textColor: MyColours.color_438E93,
  572 + borderColor: MyColours.color_438E93,
  573 + width: w(72),
  574 + radius: r(11),
  575 + fontSize: 24,
  576 + isBold: true,
  577 + height: w(22),
  578 + onPressed: () {
  579 + DialogUtil.goPhone(
  580 + customerProvider.guestInfoSunModel.guest.phone);
  581 + },
  582 + ),
  583 + VEmptyView(20),
  584 + RoundButton(
  585 + text: '预订历史',
  586 + gradientStart: MyColours.color_ffffff,
  587 + gradientEnd: MyColours.color_ffffff,
  588 + textColor: MyColours.color_438E93,
  589 + borderColor: MyColours.color_438E93,
  590 + width: w(72),
  591 + radius: r(11),
  592 + fontSize: 24,
  593 + isBold: true,
  594 + height: w(22),
  595 + onPressed: () {
  596 + NavigatorUtil.goCustomerOrderPage(
  597 + context,
  598 + customerProvider.guestInfoSunModel.guest.id,
  599 + customerProvider.guestInfoSunModel.guest.phone);
  600 + },
  601 + )
  602 + ],
  603 + ))
  604 + ],
  605 + );
  606 + }
  607 +
  608 + Widget flatBtn(String tilte, Color color) {
  609 + return Container(
  610 + height: w(18),
  611 + alignment: Alignment.center,
  612 + padding: EdgeInsets.symmetric(horizontal: w(4)),
  613 + margin: EdgeInsets.only(left: w(10)),
  614 + decoration: BoxDecoration(
  615 + border: Border.all(color: color, width: w(1)),
  616 + borderRadius: BorderRadius.circular(r(5))),
  617 + child: Text(
  618 + tilte,
  619 + style: TextStyle(fontSize: font(10), color: color),
  620 + ),
  621 + );
  622 + }
  623 +
296 @override 624 @override
297 Widget build(BuildContext context) { 625 Widget build(BuildContext context) {
298 customerProvider = Provider.of<CustomerProvider>(context, listen: true); 626 customerProvider = Provider.of<CustomerProvider>(context, listen: true);
@@ -330,145 +658,146 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -330,145 +658,146 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
330 height: ScreenUtil().setWidth(20), 658 height: ScreenUtil().setWidth(20),
331 color: MyColours.color_ffffff, 659 color: MyColours.color_ffffff,
332 ), 660 ),
333 - _headerWidget(),  
334 - VEmptyView(20),  
335 - Container(  
336 - padding: EdgeInsets.symmetric(  
337 - horizontal: ScreenUtil().setWidth(40),  
338 - vertical: ScreenUtil().setWidth(20)),  
339 - decoration: BoxDecoration(  
340 - color: MyColours.color_199095,  
341 - borderRadius: BorderRadius.only(  
342 - topRight:  
343 - Radius.circular(ScreenUtil().setWidth(20)),  
344 - topLeft:  
345 - Radius.circular(ScreenUtil().setWidth(20)))),  
346 - child: Row(  
347 - children: [  
348 - Expanded(  
349 - child: Text(  
350 - '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',  
351 - overflow: TextOverflow.ellipsis,  
352 - style: TextStyle(  
353 - color: MyColours.color_ffffff,  
354 - fontSize: ScreenUtil().setSp(30)),  
355 - )),  
356 - InkWell(  
357 - onTap: () {  
358 - NavigatorUtil.goCustomerOrderPage(  
359 - context,  
360 - customerProvider.guestInfoSunModel.guest.id,  
361 - customerProvider  
362 - .guestInfoSunModel.guest.phone);  
363 - },  
364 - child: Text('更多',  
365 - style: TextStyle(  
366 - decoration: TextDecoration.underline,  
367 - color: MyColours.color_ffffff,  
368 - fontSize: ScreenUtil().setSp(26)))),  
369 - ],  
370 - ),  
371 - ),  
372 - Container(  
373 - color: MyColours.color_ffffff,  
374 - padding: EdgeInsets.symmetric(  
375 - horizontal: ScreenUtil().setWidth(20),  
376 - vertical: ScreenUtil().setWidth(20)),  
377 - child: Column(  
378 - children: [  
379 - Wrap(  
380 - children: [  
381 - Text(  
382 - '最近一次:',  
383 - style: TextStyle(  
384 - fontSize: ScreenUtil().setSp(24),  
385 - color: MyColours.color_333333),  
386 - ),  
387 - Text(  
388 - Utils.formatFromMill(customerProvider  
389 - .guestInfoSunModel.last.ddate),  
390 - overflow: TextOverflow.ellipsis,  
391 - style: TextStyle(  
392 - fontSize: ScreenUtil().setSp(24),  
393 - color: Color.fromRGBO(208, 31, 37, 1)),  
394 - ),  
395 - Text(  
396 - customerProvider  
397 - .guestInfoSunModel.last.ddateSoltStr,  
398 - style: TextStyle(  
399 - fontSize: ScreenUtil().setSp(24),  
400 - color: MyColours.color_199095),  
401 - ),  
402 - Text(  
403 - ' 桌位:',  
404 - style: TextStyle(  
405 - fontSize: ScreenUtil().setSp(24),  
406 - color: MyColours.color_333333),  
407 - ),  
408 - Text(  
409 - customerProvider  
410 - .guestInfoSunModel.last.tableinfoName,  
411 - style: TextStyle(  
412 - fontSize: ScreenUtil().setSp(24),  
413 - color: MyColours.color_199095),  
414 - ),  
415 - Text(  
416 - ' 人数:',  
417 - style: TextStyle(  
418 - fontSize: ScreenUtil().setSp(24),  
419 - color: MyColours.color_333333),  
420 - ),  
421 - Text(  
422 - customerProvider  
423 - .guestInfoSunModel.last.actualPum ==  
424 - null  
425 - ? '未记录'  
426 - : customerProvider  
427 - .guestInfoSunModel.last.actualPum,  
428 - style: TextStyle(  
429 - fontSize: ScreenUtil().setSp(24),  
430 - color: MyColours.color_199095),  
431 - ),  
432 - Text(  
433 - ' 消费:',  
434 - style: TextStyle(  
435 - fontSize: ScreenUtil().setSp(24),  
436 - color: MyColours.color_333333),  
437 - ),  
438 - Text(  
439 - customerProvider  
440 - .guestInfoSunModel.last.conAmount ==  
441 - null  
442 - ? '未记录'  
443 - : customerProvider  
444 - .guestInfoSunModel.last.conAmount,  
445 - style: TextStyle(  
446 - fontSize: ScreenUtil().setSp(24),  
447 - color: MyColours.color_199095),  
448 - )  
449 - ],  
450 - ),  
451 - VEmptyView(6),  
452 - Row(  
453 - mainAxisAlignment: MainAxisAlignment.center,  
454 - children: [  
455 - Text(  
456 - '客户经理:',  
457 - style: TextStyle(  
458 - fontSize: ScreenUtil().setSp(24),  
459 - color: MyColours.color_333333),  
460 - ),  
461 - Text(  
462 - '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',  
463 - style: TextStyle(  
464 - fontSize: ScreenUtil().setSp(24),  
465 - color: MyColours.color_199095),  
466 - )  
467 - ],  
468 - )  
469 - ],  
470 - ),  
471 - ), 661 + // _headerWidget(),
  662 + // VEmptyView(20),
  663 + // Container(
  664 + // padding: EdgeInsets.symmetric(
  665 + // horizontal: ScreenUtil().setWidth(40),
  666 + // vertical: ScreenUtil().setWidth(20)),
  667 + // decoration: BoxDecoration(
  668 + // color: MyColours.color_199095,
  669 + // borderRadius: BorderRadius.only(
  670 + // topRight:
  671 + // Radius.circular(ScreenUtil().setWidth(20)),
  672 + // topLeft:
  673 + // Radius.circular(ScreenUtil().setWidth(20)))),
  674 + // child: Row(
  675 + // children: [
  676 + // Expanded(
  677 + // child: Text(
  678 + // '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
  679 + // overflow: TextOverflow.ellipsis,
  680 + // style: TextStyle(
  681 + // color: MyColours.color_ffffff,
  682 + // fontSize: ScreenUtil().setSp(30)),
  683 + // )),
  684 + // InkWell(
  685 + // onTap: () {
  686 + // NavigatorUtil.goCustomerOrderPage(
  687 + // context,
  688 + // customerProvider.guestInfoSunModel.guest.id,
  689 + // customerProvider
  690 + // .guestInfoSunModel.guest.phone);
  691 + // },
  692 + // child: Text('更多',
  693 + // style: TextStyle(
  694 + // decoration: TextDecoration.underline,
  695 + // color: MyColours.color_ffffff,
  696 + // fontSize: ScreenUtil().setSp(26)))),
  697 + // ],
  698 + // ),
  699 + // ),
  700 + // Container(
  701 + // color: MyColours.color_ffffff,
  702 + // padding: EdgeInsets.symmetric(
  703 + // horizontal: ScreenUtil().setWidth(20),
  704 + // vertical: ScreenUtil().setWidth(20)),
  705 + // child: Column(
  706 + // children: [
  707 + // Wrap(
  708 + // children: [
  709 + // Text(
  710 + // '最近一次:',
  711 + // style: TextStyle(
  712 + // fontSize: ScreenUtil().setSp(24),
  713 + // color: MyColours.color_333333),
  714 + // ),
  715 + // Text(
  716 + // Utils.formatFromMill(customerProvider
  717 + // .guestInfoSunModel.last.ddate),
  718 + // overflow: TextOverflow.ellipsis,
  719 + // style: TextStyle(
  720 + // fontSize: ScreenUtil().setSp(24),
  721 + // color: Color.fromRGBO(208, 31, 37, 1)),
  722 + // ),
  723 + // Text(
  724 + // customerProvider
  725 + // .guestInfoSunModel.last.ddateSoltStr,
  726 + // style: TextStyle(
  727 + // fontSize: ScreenUtil().setSp(24),
  728 + // color: MyColours.color_199095),
  729 + // ),
  730 + // Text(
  731 + // ' 桌位:',
  732 + // style: TextStyle(
  733 + // fontSize: ScreenUtil().setSp(24),
  734 + // color: MyColours.color_333333),
  735 + // ),
  736 + // Text(
  737 + // customerProvider
  738 + // .guestInfoSunModel.last.tableinfoName,
  739 + // style: TextStyle(
  740 + // fontSize: ScreenUtil().setSp(24),
  741 + // color: MyColours.color_199095),
  742 + // ),
  743 + // Text(
  744 + // ' 人数:',
  745 + // style: TextStyle(
  746 + // fontSize: ScreenUtil().setSp(24),
  747 + // color: MyColours.color_333333),
  748 + // ),
  749 + // Text(
  750 + // customerProvider
  751 + // .guestInfoSunModel.last.actualPum ==
  752 + // null
  753 + // ? '未记录'
  754 + // : customerProvider
  755 + // .guestInfoSunModel.last.actualPum,
  756 + // style: TextStyle(
  757 + // fontSize: ScreenUtil().setSp(24),
  758 + // color: MyColours.color_199095),
  759 + // ),
  760 + // Text(
  761 + // ' 消费:',
  762 + // style: TextStyle(
  763 + // fontSize: ScreenUtil().setSp(24),
  764 + // color: MyColours.color_333333),
  765 + // ),
  766 + // Text(
  767 + // customerProvider
  768 + // .guestInfoSunModel.last.conAmount ==
  769 + // null
  770 + // ? '未记录'
  771 + // : customerProvider
  772 + // .guestInfoSunModel.last.conAmount,
  773 + // style: TextStyle(
  774 + // fontSize: ScreenUtil().setSp(24),
  775 + // color: MyColours.color_199095),
  776 + // )
  777 + // ],
  778 + // ),
  779 + // VEmptyView(6),
  780 + // Row(
  781 + // mainAxisAlignment: MainAxisAlignment.center,
  782 + // children: [
  783 + // Text(
  784 + // '客户经理:',
  785 + // style: TextStyle(
  786 + // fontSize: ScreenUtil().setSp(24),
  787 + // color: MyColours.color_333333),
  788 + // ),
  789 + // Text(
  790 + // '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
  791 + // style: TextStyle(
  792 + // fontSize: ScreenUtil().setSp(24),
  793 + // color: MyColours.color_199095),
  794 + // )
  795 + // ],
  796 + // )
  797 + // ],
  798 + // ),
  799 + // ),
  800 + _headNewItem(),
472 VEmptyView(20), 801 VEmptyView(20),
473 _lineItemWidget('工作单位', 802 _lineItemWidget('工作单位',
474 '${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'), 803 '${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'),
@@ -1583,10 +1583,13 @@ class _CustomerListPageState extends State<CustomerListPage> @@ -1583,10 +1583,13 @@ class _CustomerListPageState extends State<CustomerListPage>
1583 showMsg: "加载中,请稍后...", 1583 showMsg: "加载中,请稍后...",
1584 ); 1584 );
1585 } else { 1585 } else {
1586 - return ContactListPage(  
1587 - contacts: model.customerBySellerList,  
1588 - provider: customerProvider,  
1589 - fromPage: widget.fromPage); 1586 + return Container(
  1587 + color: MyColours.color_f3f3f3,
  1588 + child: ContactListPage(
  1589 + contacts: model.customerBySellerList,
  1590 + provider: customerProvider,
  1591 + fromPage: widget.fromPage),
  1592 + );
1590 } 1593 }
1591 })); 1594 }));
1592 } 1595 }
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
  2 +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
2 import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 import 'package:one_key/models/customer_label_model.dart'; 4 import 'package:one_key/models/customer_label_model.dart';
4 import 'package:one_key/provider/customer_provider.dart'; 5 import 'package:one_key/provider/customer_provider.dart';
@@ -6,10 +7,14 @@ import 'package:one_key/provider/user_model.dart'; @@ -6,10 +7,14 @@ import 'package:one_key/provider/user_model.dart';
6 import 'package:one_key/res/colors.dart'; 7 import 'package:one_key/res/colors.dart';
7 import 'package:one_key/utils/dialog_util.dart'; 8 import 'package:one_key/utils/dialog_util.dart';
8 import 'package:one_key/utils/utils.dart'; 9 import 'package:one_key/utils/utils.dart';
  10 +import 'package:one_key/widgets/MyDivider.dart';
9 import 'package:one_key/widgets/system_app_bar.dart'; 11 import 'package:one_key/widgets/system_app_bar.dart';
10 import 'package:one_key/widgets/v_empty_view.dart'; 12 import 'package:one_key/widgets/v_empty_view.dart';
11 import 'package:provider/provider.dart'; 13 import 'package:provider/provider.dart';
12 14
  15 +import '../../../../utils/screen_util.dart';
  16 +import '../../../../widgets/h_empty_view.dart';
  17 +
13 class CustomerSettingPage extends StatefulWidget { 18 class CustomerSettingPage extends StatefulWidget {
14 CustomerSettingPage({Key key}) : super(key: key); 19 CustomerSettingPage({Key key}) : super(key: key);
15 20
@@ -20,6 +25,10 @@ class CustomerSettingPage extends StatefulWidget { @@ -20,6 +25,10 @@ class CustomerSettingPage extends StatefulWidget {
20 class _CustomerSettingPageState extends State<CustomerSettingPage> { 25 class _CustomerSettingPageState extends State<CustomerSettingPage> {
21 bool swichState = false; 26 bool swichState = false;
22 CustomerProvider customerProvider; 27 CustomerProvider customerProvider;
  28 + bool swichSync = false; //会员系统同步
  29 +
  30 + String memberShow = '';
  31 + bool showLabel = false;
23 32
24 @override 33 @override
25 void initState() { 34 void initState() {
@@ -109,12 +118,16 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -109,12 +118,16 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
109 }); 118 });
110 }, 119 },
111 child: Container( 120 child: Container(
112 - height: ScreenUtil().setWidth(40), 121 + // height: ScreenUtil().setWidth(40),
  122 + padding: EdgeInsets.symmetric(horizontal: w(6), vertical: w(3)),
  123 + decoration: BoxDecoration(
  124 + border: Border.all(width: w(1), color: MyColours.color_A78E44),
  125 + borderRadius: BorderRadius.circular(r(5))),
113 child: Text( 126 child: Text(
114 item.label, 127 item.label,
115 style: TextStyle( 128 style: TextStyle(
116 - color: Color.fromRGBO(193, 194, 63, 1),  
117 - fontSize: ScreenUtil().setSp(26), 129 + color: MyColours.color_A78E44,
  130 + fontSize: ScreenUtil().setSp(22),
118 ), 131 ),
119 ), 132 ),
120 ))); 133 )));
@@ -149,11 +162,62 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -149,11 +162,62 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
149 return items; 162 return items;
150 } 163 }
151 164
  165 + Widget _itemWidget(String title, String hintText,
  166 + TextEditingController controller, FocusNode node) {
  167 + return Row(
  168 + children: [
  169 + Container(
  170 + width: w(112),
  171 + child: Text(
  172 + title,
  173 + style: TextStyle(
  174 + color: MyColours.color_515151,
  175 + fontSize: ScreenUtil().setSp(32)),
  176 + )),
  177 + HEmptyView(24),
  178 + Expanded(
  179 + child: Container(
  180 + height: w(30),
  181 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  182 + alignment: Alignment.center,
  183 + decoration: BoxDecoration(
  184 + borderRadius: BorderRadius.circular(r(5)),
  185 + border:
  186 + Border.all(color: MyColours.color_DBDBDB, width: w(1)),
  187 + ),
  188 + child: TextField(
  189 + controller: controller,
  190 + focusNode: node,
  191 + // autofocus: _sellerCodeController.text.isEmpty,
  192 + style: TextStyle(
  193 + color: MyColours.color_515151,
  194 + fontSize: ScreenUtil().setSp(24),
  195 + ),
  196 + textAlignVertical: TextAlignVertical.top,
  197 + decoration: InputDecoration(
  198 + hintText: hintText,
  199 + hintStyle: TextStyle(
  200 + color: MyColours.color_999999,
  201 + fontSize: ScreenUtil().setSp(24),
  202 + ),
  203 + contentPadding: EdgeInsets.zero,
  204 + border: OutlineInputBorder(borderSide: BorderSide.none),
  205 + ),
  206 + onChanged: (_) {
  207 + // setActivate();
  208 + },
  209 + keyboardType: TextInputType.number,
  210 + ))),
  211 + ],
  212 + );
  213 + }
  214 +
152 @override 215 @override
153 Widget build(BuildContext context) { 216 Widget build(BuildContext context) {
154 customerProvider = Provider.of<CustomerProvider>(context, listen: true); 217 customerProvider = Provider.of<CustomerProvider>(context, listen: true);
155 - return Scaffold(  
156 - backgroundColor: Color.fromRGBO(246, 248, 250, 1), 218 + return KeyboardDismissOnTap(
  219 + child: Scaffold(
  220 + backgroundColor: MyColours.color_ffffff,
157 appBar: SystemAppBar( 221 appBar: SystemAppBar(
158 '客情设置', 222 '客情设置',
159 onTap: () { 223 onTap: () {
@@ -165,47 +229,150 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -165,47 +229,150 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
165 horizontal: ScreenUtil().setWidth(40), 229 horizontal: ScreenUtil().setWidth(40),
166 vertical: ScreenUtil().setWidth(40)), 230 vertical: ScreenUtil().setWidth(40)),
167 child: SingleChildScrollView( 231 child: SingleChildScrollView(
168 - child: Column(  
169 - crossAxisAlignment: CrossAxisAlignment.start,  
170 - children: [  
171 - InkWell(  
172 - onTap: () {  
173 - setState(() {  
174 - swichState = !swichState;  
175 - });  
176 - _sellerGuestSet();  
177 - },  
178 - child: Row(  
179 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
180 - crossAxisAlignment: CrossAxisAlignment.center,  
181 - children: [  
182 - Text('预订要求补录客人信息',  
183 - style: TextStyle(  
184 - color: MyColours.color_333333,  
185 - fontSize: ScreenUtil().setSp(30))),  
186 - Image.asset(  
187 - swichState  
188 - ? Utils.getImgPath('f_swich_on')  
189 - : Utils.getImgPath('f_swich_off'),  
190 - width: ScreenUtil().setWidth(70),  
191 - // height: ScreenUtil().setWidth(82),  
192 - ),  
193 - ], 232 + child: Column(
  233 + crossAxisAlignment: CrossAxisAlignment.start,
  234 + children: [
  235 + InkWell(
  236 + onTap: () {
  237 + setState(() {
  238 + swichState = !swichState;
  239 + });
  240 + _sellerGuestSet();
  241 + },
  242 + child: Row(
  243 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  244 + crossAxisAlignment: CrossAxisAlignment.center,
  245 + children: [
  246 + Text('预订要求补录客人信息',
  247 + style: TextStyle(
  248 + color: MyColours.color_515151,
  249 + fontSize: ScreenUtil().setSp(32))),
  250 + Image.asset(
  251 + swichState
  252 + ? Utils.getImgPath('f_swich_on')
  253 + : Utils.getImgPath('f_swich_off'),
  254 + width: ScreenUtil().setWidth(70),
  255 + // height: ScreenUtil().setWidth(82),
  256 + ),
  257 + ],
  258 + ),
194 ), 259 ),
195 - ),  
196 - VEmptyView(50),  
197 - Text('店内自定义标签', 260 + VEmptyView(20),
  261 + MyDivider(
  262 + double.infinity,
  263 + w(1),
  264 + color: MyColours.color_DBDBDB,
  265 + ),
  266 + VEmptyView(48),
  267 + Text('店内自定义标签',
  268 + style: TextStyle(
  269 + color: MyColours.color_515151,
  270 + fontSize: ScreenUtil().setSp(32))),
  271 + VEmptyView(30),
  272 + Wrap(
  273 + spacing: ScreenUtil().setWidth(20),
  274 + runSpacing: ScreenUtil().setWidth(10),
  275 + children: _buildLabelItem(customerProvider.labelList)),
  276 + VEmptyView(34),
  277 + MyDivider(
  278 + double.infinity,
  279 + w(1),
  280 + color: MyColours.color_DBDBDB,
  281 + ),
  282 + VEmptyView(52),
  283 + InkWell(
  284 + onTap: () {
  285 + setState(() {
  286 + swichSync = !swichSync;
  287 + });
  288 + // _sellerGuestSet();
  289 + },
  290 + child: Row(
  291 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  292 + crossAxisAlignment: CrossAxisAlignment.center,
  293 + children: [
  294 + Text('是否与会员系统同步',
  295 + style: TextStyle(
  296 + color: MyColours.color_515151,
  297 + fontSize: ScreenUtil().setSp(32))),
  298 + Image.asset(
  299 + swichSync
  300 + ? Utils.getImgPath('f_swich_on')
  301 + : Utils.getImgPath('f_swich_off'),
  302 + width: ScreenUtil().setWidth(70),
  303 + // height: ScreenUtil().setWidth(82),
  304 + ),
  305 + ],
  306 + ),
  307 + ),
  308 + VEmptyView(48),
  309 + InkWell(
  310 + onTap: () {
  311 + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
  312 + // DialogUtil.showSelectCusmanDialog(context, memberList,
  313 + // (value) {
  314 + // if (value != null) {
  315 + // setState(() {
  316 + // memberIndex = value.first;
  317 + // memberShow = memberList[memberIndex];
  318 + // });
  319 + // }
  320 + // }, selecteds: memberIndex == null ? [] : [memberIndex])
  321 + // .then((value) {});
  322 + },
  323 + child: Container(
  324 + // height: ScreenUtil().setWidth(60),
  325 + padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)),
  326 + child: Row(
  327 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  328 + crossAxisAlignment: CrossAxisAlignment.center,
  329 + children: [
  330 + Container(
  331 + // color: Colors.red,
  332 + width: ScreenUtil().setWidth(150),
  333 + height: ScreenUtil().setWidth(35),
  334 + child: Text(
  335 + '会员系统选择',
  336 + style: TextStyle(
  337 + fontSize: ScreenUtil().setSp(32),
  338 + color: MyColours.color_515151),
  339 + ),
  340 + ),
  341 + Expanded(
  342 + child: Text(
  343 + memberShow,
  344 + overflow: TextOverflow.ellipsis,
  345 + style: TextStyle(
  346 + color: MyColours.color_353535,
  347 + fontSize: ScreenUtil().setSp(28),
  348 + ),
  349 + )),
  350 + HEmptyView(10),
  351 + Image.asset(
  352 + Utils.getImgPath(
  353 + showLabel ? 'c_arrow_up' : 'c_arrow_down'),
  354 + width: ScreenUtil().setWidth(24),
  355 + // height: ScreenUtil().setWidth(10),
  356 + )
  357 + ],
  358 + ),
  359 + )),
  360 + _itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null),
  361 + VEmptyView(50),
  362 + _itemWidget('管理员账号', "点击这里输入管理员账号", null, null),
  363 + VEmptyView(50),
  364 + _itemWidget('密码', "点击这里输入管理员密码", null, null),
  365 + VEmptyView(40),
  366 + Center(
  367 + child: Text(
  368 + '请与纳极客服400-000-9690 联系对接事宜',
198 style: TextStyle( 369 style: TextStyle(
199 - color: MyColours.color_333333,  
200 - fontSize: ScreenUtil().setSp(30))),  
201 - VEmptyView(30),  
202 - Wrap(  
203 - spacing: ScreenUtil().setWidth(20),  
204 - runSpacing: ScreenUtil().setWidth(10),  
205 - children: _buildLabelItem(customerProvider.labelList)),  
206 - ],  
207 - )), 370 + color: MyColours.color_999999, fontSize: font(12)),
  371 + ))
  372 + ],
  373 + ),
  374 + ),
208 ), 375 ),
209 - ); 376 + ));
210 } 377 }
211 } 378 }
@@ -2023,6 +2023,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -2023,6 +2023,7 @@ class TableManagerPageState extends State<TableManagerPage> {
2023 null, 2023 null,
2024 null, 2024 null,
2025 null, 2025 null,
  2026 + null,
2026 null); 2027 null);
2027 if (widget.guest == null) { 2028 if (widget.guest == null) {
2028 guest.phone = _baseIndoProvider.phoneController.text 2029 guest.phone = _baseIndoProvider.phoneController.text
@@ -68,6 +68,8 @@ class CustomerProvider extends ChangeNotifier { @@ -68,6 +68,8 @@ class CustomerProvider extends ChangeNotifier {
68 68
69 MarketingByIdSunModel marketingByIdSunModel; 69 MarketingByIdSunModel marketingByIdSunModel;
70 List<CustomerLabelSunModel> labelList = []; //标签数据 70 List<CustomerLabelSunModel> labelList = []; //标签数据
  71 +
  72 + List<String> memberList = []; //会员数据
71 List<FilterBtnModel> sellerManageList = []; //经理数据 ---- 商家编辑页面 73 List<FilterBtnModel> sellerManageList = []; //经理数据 ---- 商家编辑页面
72 74
73 int labelSelIndex; 75 int labelSelIndex;
@@ -328,7 +330,7 @@ class CustomerProvider extends ChangeNotifier { @@ -328,7 +330,7 @@ class CustomerProvider extends ChangeNotifier {
328 pageState = PageState.ConnectivityTimeOut; 330 pageState = PageState.ConnectivityTimeOut;
329 break; 331 break;
330 default: 332 default:
331 - pageState = PageState.ConnectivityError; 333 + pageState = PageState.ConnectivityError;
332 break; 334 break;
333 } 335 }
334 } 336 }
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
  4 +
  5 +
  6 + static const Color color_00715F = Color(0xFF00715F);
  7 + static const Color color_80D9D9D9 = Color(0x80D9D9D9);
4 static const Color color_42A5FF = Color(0xFF42A5FF); 8 static const Color color_42A5FF = Color(0xFF42A5FF);
5 static const Color color_4C8DAD = Color(0xFF4C8DAD); 9 static const Color color_4C8DAD = Color(0xFF4C8DAD);
6 static const Color color_4D0C0F0E = Color(0x4D0C0F0E); 10 static const Color color_4D0C0F0E = Color(0x4D0C0F0E);