Commit 484debc6b5de5c02c1f4704ef5093c2eb35c1904

Authored by wdn127929
1 parent 5c9e40dd

全店客情:详情bug、首页bug..

@@ -489,7 +489,7 @@ @@ -489,7 +489,7 @@
489 CODE_SIGN_IDENTITY = "iPhone Developer"; 489 CODE_SIGN_IDENTITY = "iPhone Developer";
490 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 490 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
491 CODE_SIGN_STYLE = Automatic; 491 CODE_SIGN_STYLE = Automatic;
492 - CURRENT_PROJECT_VERSION = 400; 492 + CURRENT_PROJECT_VERSION = 405;
493 DEVELOPMENT_TEAM = 8J59HM8B82; 493 DEVELOPMENT_TEAM = 8J59HM8B82;
494 ENABLE_BITCODE = NO; 494 ENABLE_BITCODE = NO;
495 FLUTTER_BUILD_MODE = release; 495 FLUTTER_BUILD_MODE = release;
@@ -635,7 +635,7 @@ @@ -635,7 +635,7 @@
635 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 635 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
636 CODE_SIGN_IDENTITY = "iPhone Developer"; 636 CODE_SIGN_IDENTITY = "iPhone Developer";
637 CODE_SIGN_STYLE = Automatic; 637 CODE_SIGN_STYLE = Automatic;
638 - CURRENT_PROJECT_VERSION = 400; 638 + CURRENT_PROJECT_VERSION = 405;
639 DEVELOPMENT_TEAM = 8J59HM8B82; 639 DEVELOPMENT_TEAM = 8J59HM8B82;
640 ENABLE_BITCODE = NO; 640 ENABLE_BITCODE = NO;
641 FLUTTER_BUILD_MODE = release; 641 FLUTTER_BUILD_MODE = release;
@@ -671,7 +671,7 @@ @@ -671,7 +671,7 @@
671 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 671 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
672 CODE_SIGN_IDENTITY = "iPhone Developer"; 672 CODE_SIGN_IDENTITY = "iPhone Developer";
673 CODE_SIGN_STYLE = Automatic; 673 CODE_SIGN_STYLE = Automatic;
674 - CURRENT_PROJECT_VERSION = 400; 674 + CURRENT_PROJECT_VERSION = 405;
675 DEVELOPMENT_TEAM = 8J59HM8B82; 675 DEVELOPMENT_TEAM = 8J59HM8B82;
676 ENABLE_BITCODE = NO; 676 ENABLE_BITCODE = NO;
677 FLUTTER_BUILD_MODE = release; 677 FLUTTER_BUILD_MODE = release;
@@ -219,6 +219,9 @@ class Last extends Object { @@ -219,6 +219,9 @@ class Last extends Object {
219 } 219 }
220 220
221 String get tableinfoName { 221 String get tableinfoName {
  222 + if (tableinfo == null) {
  223 + return '';
  224 + }
222 List<dynamic> tableinfoList = convert.jsonDecode(tableinfo); 225 List<dynamic> tableinfoList = convert.jsonDecode(tableinfo);
223 print(tableinfo); 226 print(tableinfo);
224 String _nameStr = ''; 227 String _nameStr = '';
@@ -128,7 +128,10 @@ class SellerUser extends Object { @@ -128,7 +128,10 @@ class SellerUser extends Object {
128 @JsonKey(name: 'uid') 128 @JsonKey(name: 'uid')
129 String uid; 129 String uid;
130 130
131 - SellerUser(this.count, this.nickName, this.uid); 131 + @JsonKey(name: 'account')
  132 + String account;
  133 +
  134 + SellerUser(this.count, this.nickName, this.uid, this.account);
132 135
133 factory SellerUser.fromJson(Map<String, dynamic> srcJson) => 136 factory SellerUser.fromJson(Map<String, dynamic> srcJson) =>
134 _$SellerUserFromJson(srcJson); 137 _$SellerUserFromJson(srcJson);
@@ -99,6 +99,7 @@ SellerUser _$SellerUserFromJson(Map<String, dynamic> json) { @@ -99,6 +99,7 @@ SellerUser _$SellerUserFromJson(Map<String, dynamic> json) {
99 json['count'] as String, 99 json['count'] as String,
100 json['nick_name'] as String, 100 json['nick_name'] as String,
101 json['uid'] as String, 101 json['uid'] as String,
  102 + json['account'] as String
102 ); 103 );
103 } 104 }
104 105
@@ -106,5 +107,6 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) => @@ -106,5 +107,6 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
106 <String, dynamic>{ 107 <String, dynamic>{
107 'count': instance.count, 108 'count': instance.count,
108 'nick_name': instance.nickName, 109 'nick_name': instance.nickName,
109 - 'uid': instance.uid 110 + 'uid': instance.uid,
  111 + 'account':instance.account
110 }; 112 };
@@ -169,7 +169,9 @@ class _WebPageState extends State<WebPage> { @@ -169,7 +169,9 @@ class _WebPageState extends State<WebPage> {
169 key: webViewKey, 169 key: webViewKey,
170 // contextMenu: contextMenu, 170 // contextMenu: contextMenu,
171 initialUrlRequest: URLRequest( 171 initialUrlRequest: URLRequest(
172 - url: Uri.parse("http://colorcun.com/privacy1.html")), 172 + // url: Uri.parse("http://colorcun.com/privacy1.html")),
  173 + url: Uri.parse("http://colorcun.com/privacy2.html")),
  174 + //华为下载功能闪退,去掉下载功能*********http://colorcun.com/privacy2.html
173 // initialFile: "assets/index.html", 175 // initialFile: "assets/index.html",
174 initialUserScripts: UnmodifiableListView<UserScript>([]), 176 initialUserScripts: UnmodifiableListView<UserScript>([]),
175 initialOptions: options, 177 initialOptions: options,
@@ -12,6 +12,8 @@ import 'package:one_key/utils/utils.dart'; @@ -12,6 +12,8 @@ import 'package:one_key/utils/utils.dart';
12 import 'package:one_key/widgets/h_empty_view.dart'; 12 import 'package:one_key/widgets/h_empty_view.dart';
13 import 'package:one_key/widgets/v_empty_view.dart'; 13 import 'package:one_key/widgets/v_empty_view.dart';
14 14
  15 +import '../../../../utils/screen_util.dart';
  16 +
15 class ContactListPage extends StatefulWidget { 17 class ContactListPage extends StatefulWidget {
16 final List<CustomerBySellerSunModel> contacts; 18 final List<CustomerBySellerSunModel> contacts;
17 final CustomerProvider provider; 19 final CustomerProvider provider;
@@ -355,6 +357,7 @@ class _ContactListPageState extends State<ContactListPage> { @@ -355,6 +357,7 @@ class _ContactListPageState extends State<ContactListPage> {
355 @override 357 @override
356 Widget build(BuildContext context) { 358 Widget build(BuildContext context) {
357 return AzListView( 359 return AzListView(
  360 + indexBarItemHeight: w(12),
358 data: widget.contacts, 361 data: widget.contacts,
359 itemCount: widget.contacts.length, 362 itemCount: widget.contacts.length,
360 itemBuilder: (BuildContext context, int index) { 363 itemBuilder: (BuildContext context, int index) {
@@ -35,8 +35,14 @@ class CustomerListPage extends StatefulWidget { @@ -35,8 +35,14 @@ class CustomerListPage extends StatefulWidget {
35 final FromPage fromPage; 35 final FromPage fromPage;
36 final String index; 36 final String index;
37 final String uidStr; 37 final String uidStr;
  38 + final bool distribution;
38 39
39 - const CustomerListPage({Key key, this.fromPage, this.index, this.uidStr}) 40 + const CustomerListPage(
  41 + {Key key,
  42 + this.fromPage,
  43 + this.index,
  44 + this.uidStr,
  45 + this.distribution = false})
40 : super(key: key); 46 : super(key: key);
41 @override 47 @override
42 _CustomerListPageState createState() => _CustomerListPageState(); 48 _CustomerListPageState createState() => _CustomerListPageState();
@@ -54,9 +60,11 @@ class _CustomerListPageState extends State<CustomerListPage> @@ -54,9 +60,11 @@ class _CustomerListPageState extends State<CustomerListPage>
54 int dropValue = 0; 60 int dropValue = 0;
55 bool showDrop = true; 61 bool showDrop = true;
56 List<String> timeTilte = ['大于', '等于', '小于']; 62 List<String> timeTilte = ['大于', '等于', '小于'];
  63 + bool distribution = false;
57 64
58 @override 65 @override
59 void initState() { 66 void initState() {
  67 + distribution = widget.distribution;
60 _tabBarTitle = ['全部', '活跃', '沉睡', '流失']; 68 _tabBarTitle = ['全部', '活跃', '沉睡', '流失'];
61 // timeTilte = ['大于', '等于', '小于']; 69 // timeTilte = ['大于', '等于', '小于'];
62 super.initState(); 70 super.initState();
@@ -282,6 +290,10 @@ class _CustomerListPageState extends State<CustomerListPage> @@ -282,6 +290,10 @@ class _CustomerListPageState extends State<CustomerListPage>
282 } 290 }
283 } 291 }
284 292
  293 + if (distribution) {
  294 + params['distribution'] = '1';
  295 + }
  296 +
285 await customerProvider.getCustomerBySeller(context, params); 297 await customerProvider.getCustomerBySeller(context, params);
286 print(first); // if (customerProvider.customerBySellerList.length == 298 print(first); // if (customerProvider.customerBySellerList.length ==
287 // customerProvider.selectCustomerSeller.length) { 299 // customerProvider.selectCustomerSeller.length) {
@@ -17,6 +17,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; @@ -17,6 +17,8 @@ import 'package:one_key/widgets/system_app_bar.dart';
17 import 'package:one_key/widgets/v_empty_view.dart'; 17 import 'package:one_key/widgets/v_empty_view.dart';
18 import 'package:provider/provider.dart'; 18 import 'package:provider/provider.dart';
19 19
  20 +import '../../../../utils/screen_util.dart';
  21 +
20 class StoreCustomerPage extends StatefulWidget { 22 class StoreCustomerPage extends StatefulWidget {
21 StoreCustomerPage({Key key}) : super(key: key); 23 StoreCustomerPage({Key key}) : super(key: key);
22 24
@@ -88,8 +90,15 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> { @@ -88,8 +90,15 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
88 } else if (btnTitle == '流失客户') { 90 } else if (btnTitle == '流失客户') {
89 index = '3'; 91 index = '3';
90 } 92 }
91 - NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid,  
92 - index: index); 93 + if (btnTitle == '未分配') {
  94 + NavigatorUtil.goCustomerListPage(
  95 + context, FromPage.FromPageHome, uid,
  96 + index: index, distribution: true);
  97 + } else {
  98 + NavigatorUtil.goCustomerListPage(
  99 + context, FromPage.FromPageHome, uid,
  100 + index: index);
  101 + }
93 }, 102 },
94 child: Container( 103 child: Container(
95 color: MyColours.color_ffffff, 104 color: MyColours.color_ffffff,
@@ -114,33 +123,80 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> { @@ -114,33 +123,80 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
114 )) 123 ))
115 ], 124 ],
116 ), 125 ),
117 - VEmptyView(20),  
118 - RoundButton(  
119 - onPressed: () async {  
120 - String index = '0'; 126 + btnTitle == '' ? SizedBox() : VEmptyView(20),
  127 + btnTitle == ''
  128 + ? SizedBox()
  129 + : InkWell(
  130 + onTap: () async {
  131 + String index = '0';
121 132
122 - if (btnTitle == '活跃客户') {  
123 - index = '1';  
124 - } else if (btnTitle == '沉睡客户') {  
125 - index = '2';  
126 - } else if (btnTitle == '流失客户') {  
127 - index = '3';  
128 - }  
129 - NavigatorUtil.goCustomerListPage(  
130 - context, FromPage.FromPageHome, uid,  
131 - index: index);  
132 - },  
133 - text: btnTitle,  
134 - fontSize: 24,  
135 - isBold: false,  
136 - textColor: MyColours.color_333333,  
137 - gradientStart: MyColours.color_ffffff,  
138 - gradientEnd: MyColours.color_ffffff,  
139 - borderColor: Color.fromRGBO(118, 118, 118, 1),  
140 - height: ScreenUtil().setWidth(45),  
141 - width: ScreenUtil().setWidth(160),  
142 - radius: ScreenUtil().setWidth(30),  
143 - ), 133 + if (btnTitle == '活跃客户') {
  134 + index = '1';
  135 + } else if (btnTitle == '沉睡客户') {
  136 + index = '2';
  137 + } else if (btnTitle == '流失客户') {
  138 + index = '3';
  139 + }
  140 + if (btnTitle == '未分配') {
  141 + NavigatorUtil.goCustomerListPage(
  142 + context, FromPage.FromPageHome, uid,
  143 + index: index, distribution: true);
  144 + } else {
  145 + NavigatorUtil.goCustomerListPage(
  146 + context, FromPage.FromPageHome, uid,
  147 + index: index);
  148 + }
  149 + },
  150 + child: Container(
  151 + height: ScreenUtil().setWidth(45),
  152 + width: ScreenUtil().setWidth(160),
  153 + alignment: Alignment.center,
  154 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  155 + decoration: BoxDecoration(
  156 + color: MyColours.color_ffffff,
  157 + border: Border.all(
  158 + width: w(1),
  159 + color: Color.fromRGBO(118, 118, 118, 1),
  160 + ),
  161 + borderRadius:
  162 + BorderRadius.circular(ScreenUtil().setWidth(30)),
  163 + ),
  164 + child: Text(
  165 + btnTitle,
  166 + maxLines: 1,
  167 + overflow: TextOverflow.ellipsis,
  168 + style: TextStyle(
  169 + color: MyColours.color_333333,
  170 + fontSize: font(12)),
  171 + ),
  172 + ))
  173 + // RoundButton(
  174 + // onPressed: () async {
  175 + // String index = '0';
  176 +
  177 + // if (btnTitle == '活跃客户') {
  178 + // index = '1';
  179 + // } else if (btnTitle == '沉睡客户') {
  180 + // index = '2';
  181 + // } else if (btnTitle == '流失客户') {
  182 + // index = '3';
  183 + // }
  184 + // NavigatorUtil.goCustomerListPage(
  185 + // context, FromPage.FromPageHome, uid,
  186 + // index: index);
  187 + // },
  188 + // text: btnTitle,
  189 + // fontSize: 24,
  190 + // isBold: false,
  191 + // textColor: MyColours.color_333333,
  192 + // gradientStart: MyColours.color_ffffff,
  193 + // gradientEnd: MyColours.color_ffffff,
  194 + // borderColor: Color.fromRGBO(118, 118, 118, 1),
  195 + // height: ScreenUtil().setWidth(45),
  196 + // width: ScreenUtil().setWidth(160),
  197 + // radius: ScreenUtil().setWidth(30),
  198 + // ),
  199 + ,
144 VEmptyView(16), 200 VEmptyView(16),
145 percent == null 201 percent == null
146 ? SizedBox() 202 ? SizedBox()
@@ -315,9 +371,14 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> { @@ -315,9 +371,14 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
315 '未分配', 371 '未分配',
316 null); 372 null);
317 } 373 }
  374 +
318 return _percentWidget( 375 return _percentWidget(
319 '${customerProvider.storeSunmodel.sellerUser[index - 1].count}', 376 '${customerProvider.storeSunmodel.sellerUser[index - 1].count}',
320 - '${customerProvider.storeSunmodel.sellerUser[index - 1].nickName}经理', 377 + customerProvider.storeSunmodel.sellerUser[index - 1]
  378 + .account ==
  379 + null
  380 + ? ''
  381 + : '${customerProvider.storeSunmodel.sellerUser[index - 1].nickName ?? customerProvider.storeSunmodel.sellerUser[index - 1].account}经理',
321 null, 382 null,
322 uid: customerProvider 383 uid: customerProvider
323 .storeSunmodel.sellerUser[index - 1].uid); 384 .storeSunmodel.sellerUser[index - 1].uid);
@@ -579,9 +579,12 @@ class NavigatorUtil { @@ -579,9 +579,12 @@ class NavigatorUtil {
579 /// 客情列表 579 /// 客情列表
580 static Future<dynamic> goCustomerListPage( 580 static Future<dynamic> goCustomerListPage(
581 BuildContext context, FromPage fromPage, String uid, 581 BuildContext context, FromPage fromPage, String uid,
582 - {replace = false, bool needBtn = false, String index = '0'}) { 582 + {replace = false,
  583 + bool needBtn = false,
  584 + String index = '0',
  585 + bool distribution = false}) {
583 return _navigateTo(context, 586 return _navigateTo(context,
584 - "${Routes.customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=$index&uid=$uid", 587 + "${Routes.customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=$index&uid=$uid&distribution=$distribution",
585 replace: replace); 588 replace: replace);
586 } 589 }
587 590
@@ -988,10 +988,11 @@ var customerListPageHandle = new Handler( @@ -988,10 +988,11 @@ var customerListPageHandle = new Handler(
988 String index = params["index"].first; 988 String index = params["index"].first;
989 989
990 String uid = params["uid"].first; 990 String uid = params["uid"].first;
  991 + bool distribution = FluroConvertUtils.string2bool(params["distribution"].first);
991 992
992 return ChangeNotifierProvider<CustomerProvider>( 993 return ChangeNotifierProvider<CustomerProvider>(
993 create: (_) => CustomerProvider(), 994 create: (_) => CustomerProvider(),
994 - child: CustomerListPage(fromPage: fromPage, index: index, uidStr: uid)); 995 + child: CustomerListPage(fromPage: fromPage, index: index, uidStr: uid,distribution: distribution));
995 }); 996 });
996 997
997 ///仅供展示的客情列表 ---商家 998 ///仅供展示的客情列表 ---商家
@@ -284,17 +284,17 @@ class _TextSelectionControlsToolbarState @@ -284,17 +284,17 @@ class _TextSelectionControlsToolbarState
284 label: localizations.copyButtonLabel, 284 label: localizations.copyButtonLabel,
285 onPressed: widget.handleCopy, 285 onPressed: widget.handleCopy,
286 ), 286 ),
287 - if (widget.handlePaste != null &&  
288 - widget.clipboardStatus?.value == ClipboardStatus.pasteable)  
289 - // _TextSelectionToolbarItemData(  
290 - // label: localizations.pasteButtonLabel,  
291 - // onPressed: widget.handlePaste,  
292 - // ),  
293 - if (widget.handleSelectAll != null)  
294 - _TextSelectionToolbarItemData(  
295 - label: localizations.selectAllButtonLabel,  
296 - onPressed: widget.handleSelectAll,  
297 - ), 287 + // if (widget.handlePaste != null &&
  288 + // widget.clipboardStatus?.value == ClipboardStatus.pasteable)
  289 + // _TextSelectionToolbarItemData(
  290 + // label: localizations.pasteButtonLabel,
  291 + // onPressed: widget.handlePaste,
  292 + // ),
  293 + if (widget.handleSelectAll != null)
  294 + _TextSelectionToolbarItemData(
  295 + label: localizations.selectAllButtonLabel,
  296 + onPressed: widget.handleSelectAll,
  297 + ),
298 _TextSelectionToolbarItemData( 298 _TextSelectionToolbarItemData(
299 label: '粘贴', 299 label: '粘贴',
300 onPressed: widget.handleLike, 300 onPressed: widget.handleLike,