Commit 484debc6b5de5c02c1f4704ef5093c2eb35c1904

Authored by wdn127929
1 parent 5c9e40dd

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

... ... @@ -489,7 +489,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 400;
CURRENT_PROJECT_VERSION = 405;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -635,7 +635,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 400;
CURRENT_PROJECT_VERSION = 405;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -671,7 +671,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 400;
CURRENT_PROJECT_VERSION = 405;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ...
... ... @@ -219,6 +219,9 @@ class Last extends Object {
}
String get tableinfoName {
if (tableinfo == null) {
return '';
}
List<dynamic> tableinfoList = convert.jsonDecode(tableinfo);
print(tableinfo);
String _nameStr = '';
... ...
... ... @@ -128,7 +128,10 @@ class SellerUser extends Object {
@JsonKey(name: 'uid')
String uid;
SellerUser(this.count, this.nickName, this.uid);
@JsonKey(name: 'account')
String account;
SellerUser(this.count, this.nickName, this.uid, this.account);
factory SellerUser.fromJson(Map<String, dynamic> srcJson) =>
_$SellerUserFromJson(srcJson);
... ...
... ... @@ -99,6 +99,7 @@ SellerUser _$SellerUserFromJson(Map<String, dynamic> json) {
json['count'] as String,
json['nick_name'] as String,
json['uid'] as String,
json['account'] as String
);
}
... ... @@ -106,5 +107,6 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
<String, dynamic>{
'count': instance.count,
'nick_name': instance.nickName,
'uid': instance.uid
'uid': instance.uid,
'account':instance.account
};
... ...
... ... @@ -169,7 +169,9 @@ class _WebPageState extends State<WebPage> {
key: webViewKey,
// contextMenu: contextMenu,
initialUrlRequest: URLRequest(
url: Uri.parse("http://colorcun.com/privacy1.html")),
// url: Uri.parse("http://colorcun.com/privacy1.html")),
url: Uri.parse("http://colorcun.com/privacy2.html")),
//华为下载功能闪退,去掉下载功能*********http://colorcun.com/privacy2.html
// initialFile: "assets/index.html",
initialUserScripts: UnmodifiableListView<UserScript>([]),
initialOptions: options,
... ...
... ... @@ -12,6 +12,8 @@ import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../../utils/screen_util.dart';
class ContactListPage extends StatefulWidget {
final List<CustomerBySellerSunModel> contacts;
final CustomerProvider provider;
... ... @@ -355,6 +357,7 @@ class _ContactListPageState extends State<ContactListPage> {
@override
Widget build(BuildContext context) {
return AzListView(
indexBarItemHeight: w(12),
data: widget.contacts,
itemCount: widget.contacts.length,
itemBuilder: (BuildContext context, int index) {
... ...
... ... @@ -35,8 +35,14 @@ class CustomerListPage extends StatefulWidget {
final FromPage fromPage;
final String index;
final String uidStr;
final bool distribution;
const CustomerListPage({Key key, this.fromPage, this.index, this.uidStr})
const CustomerListPage(
{Key key,
this.fromPage,
this.index,
this.uidStr,
this.distribution = false})
: super(key: key);
@override
_CustomerListPageState createState() => _CustomerListPageState();
... ... @@ -54,9 +60,11 @@ class _CustomerListPageState extends State<CustomerListPage>
int dropValue = 0;
bool showDrop = true;
List<String> timeTilte = ['大于', '等于', '小于'];
bool distribution = false;
@override
void initState() {
distribution = widget.distribution;
_tabBarTitle = ['全部', '活跃', '沉睡', '流失'];
// timeTilte = ['大于', '等于', '小于'];
super.initState();
... ... @@ -282,6 +290,10 @@ class _CustomerListPageState extends State<CustomerListPage>
}
}
if (distribution) {
params['distribution'] = '1';
}
await customerProvider.getCustomerBySeller(context, params);
print(first); // if (customerProvider.customerBySellerList.length ==
// customerProvider.selectCustomerSeller.length) {
... ...
... ... @@ -17,6 +17,8 @@ import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../../../utils/screen_util.dart';
class StoreCustomerPage extends StatefulWidget {
StoreCustomerPage({Key key}) : super(key: key);
... ... @@ -88,8 +90,15 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
} else if (btnTitle == '流失客户') {
index = '3';
}
NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid,
index: index);
if (btnTitle == '未分配') {
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, uid,
index: index, distribution: true);
} else {
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, uid,
index: index);
}
},
child: Container(
color: MyColours.color_ffffff,
... ... @@ -114,33 +123,80 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
))
],
),
VEmptyView(20),
RoundButton(
onPressed: () async {
String index = '0';
btnTitle == '' ? SizedBox() : VEmptyView(20),
btnTitle == ''
? SizedBox()
: InkWell(
onTap: () async {
String index = '0';
if (btnTitle == '活跃客户') {
index = '1';
} else if (btnTitle == '沉睡客户') {
index = '2';
} else if (btnTitle == '流失客户') {
index = '3';
}
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, uid,
index: index);
},
text: btnTitle,
fontSize: 24,
isBold: false,
textColor: MyColours.color_333333,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: Color.fromRGBO(118, 118, 118, 1),
height: ScreenUtil().setWidth(45),
width: ScreenUtil().setWidth(160),
radius: ScreenUtil().setWidth(30),
),
if (btnTitle == '活跃客户') {
index = '1';
} else if (btnTitle == '沉睡客户') {
index = '2';
} else if (btnTitle == '流失客户') {
index = '3';
}
if (btnTitle == '未分配') {
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, uid,
index: index, distribution: true);
} else {
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, uid,
index: index);
}
},
child: Container(
height: ScreenUtil().setWidth(45),
width: ScreenUtil().setWidth(160),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(10)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border.all(
width: w(1),
color: Color.fromRGBO(118, 118, 118, 1),
),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(30)),
),
child: Text(
btnTitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: font(12)),
),
))
// RoundButton(
// onPressed: () async {
// String index = '0';
// if (btnTitle == '活跃客户') {
// index = '1';
// } else if (btnTitle == '沉睡客户') {
// index = '2';
// } else if (btnTitle == '流失客户') {
// index = '3';
// }
// NavigatorUtil.goCustomerListPage(
// context, FromPage.FromPageHome, uid,
// index: index);
// },
// text: btnTitle,
// fontSize: 24,
// isBold: false,
// textColor: MyColours.color_333333,
// gradientStart: MyColours.color_ffffff,
// gradientEnd: MyColours.color_ffffff,
// borderColor: Color.fromRGBO(118, 118, 118, 1),
// height: ScreenUtil().setWidth(45),
// width: ScreenUtil().setWidth(160),
// radius: ScreenUtil().setWidth(30),
// ),
,
VEmptyView(16),
percent == null
? SizedBox()
... ... @@ -315,9 +371,14 @@ class _StoreCustomerPageState extends State<StoreCustomerPage> {
'未分配',
null);
}
return _percentWidget(
'${customerProvider.storeSunmodel.sellerUser[index - 1].count}',
'${customerProvider.storeSunmodel.sellerUser[index - 1].nickName}经理',
customerProvider.storeSunmodel.sellerUser[index - 1]
.account ==
null
? ''
: '${customerProvider.storeSunmodel.sellerUser[index - 1].nickName ?? customerProvider.storeSunmodel.sellerUser[index - 1].account}经理',
null,
uid: customerProvider
.storeSunmodel.sellerUser[index - 1].uid);
... ...
... ... @@ -579,9 +579,12 @@ class NavigatorUtil {
/// 客情列表
static Future<dynamic> goCustomerListPage(
BuildContext context, FromPage fromPage, String uid,
{replace = false, bool needBtn = false, String index = '0'}) {
{replace = false,
bool needBtn = false,
String index = '0',
bool distribution = false}) {
return _navigateTo(context,
"${Routes.customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=$index&uid=$uid",
"${Routes.customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=$index&uid=$uid&distribution=$distribution",
replace: replace);
}
... ...
... ... @@ -988,10 +988,11 @@ var customerListPageHandle = new Handler(
String index = params["index"].first;
String uid = params["uid"].first;
bool distribution = FluroConvertUtils.string2bool(params["distribution"].first);
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: CustomerListPage(fromPage: fromPage, index: index, uidStr: uid));
child: CustomerListPage(fromPage: fromPage, index: index, uidStr: uid,distribution: distribution));
});
///仅供展示的客情列表 ---商家
... ...
... ... @@ -284,17 +284,17 @@ class _TextSelectionControlsToolbarState
label: localizations.copyButtonLabel,
onPressed: widget.handleCopy,
),
if (widget.handlePaste != null &&
widget.clipboardStatus?.value == ClipboardStatus.pasteable)
// _TextSelectionToolbarItemData(
// label: localizations.pasteButtonLabel,
// onPressed: widget.handlePaste,
// ),
if (widget.handleSelectAll != null)
_TextSelectionToolbarItemData(
label: localizations.selectAllButtonLabel,
onPressed: widget.handleSelectAll,
),
// if (widget.handlePaste != null &&
// widget.clipboardStatus?.value == ClipboardStatus.pasteable)
// _TextSelectionToolbarItemData(
// label: localizations.pasteButtonLabel,
// onPressed: widget.handlePaste,
// ),
if (widget.handleSelectAll != null)
_TextSelectionToolbarItemData(
label: localizations.selectAllButtonLabel,
onPressed: widget.handleSelectAll,
),
_TextSelectionToolbarItemData(
label: '粘贴',
onPressed: widget.handleLike,
... ...