|
...
|
...
|
@@ -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);
|
...
|
...
|
|