Commit dedeeff02110cab1cad6cd099e849fb4d5b7c82c

Authored by wdn127929
1 parent 6982e1bb

我的客情跳转一键追回,一键唤醒

... ... @@ -592,6 +592,7 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
listen: false)
.user
.openid,
labels: '流失',
fromPage:
FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
... ... @@ -664,6 +665,7 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
listen: false)
.user
.openid,
labels: '沉睡',
fromPage:
FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
... ...
... ... @@ -40,7 +40,9 @@ class MyCustomerListPage extends StatefulWidget {
final FromPage fromPage;
final String index;
const MyCustomerListPage({Key key, this.uid, this.fromPage, this.index})
final String labels;
const MyCustomerListPage({Key key, this.uid, this.fromPage, this.index, this.labels = ''})
: super(key: key);
@override
_MyCustomerListPageState createState() => _MyCustomerListPageState();
... ... @@ -305,7 +307,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
// params['reserve_num'] 时间内预定次数
// params['reserve_sort'] 1 等于 2 小于 3 大于
await customerProvider.getCustomerList(context, params, load: load);
await customerProvider.getCustomerList(context, params, load: load,labels:widget.labels);
print(first);
// if (customerProvider.userHistorys.length ==
... ...
... ... @@ -33,12 +33,14 @@ class MyMakeMarkingPage extends StatefulWidget {
final FromPage fromPage;
final SelfList selfList;
final String homeGid;
final String labels;
MyMakeMarkingPage(
{Key key,
this.fromPage = FromPage.FromPageCustomerList,
this.selfList,
this.homeGid,
this.uid})
this.uid,
this.labels})
: super(key: key);
@override
... ... @@ -65,6 +67,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
void initState() {
super.initState();
print(widget.fromPage);
// UserModel userModel = Provider.of<UserModel>(context, listen: false);
// data = [
... ... @@ -151,7 +155,12 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
);
print('''object''');
gid = gidtemp;
if (widget.labels != '' && widget.labels != null) {
customerProvider.labels = widget.labels;
}
customerMakingProvider.labels = customerProvider.labels;
customerMakingProvider.selectCustomer = customerProvider.selectCustomer;
_getPhoneAndGid();
// customerMakingProvider.fromPage = widget.fromPage;
... ... @@ -618,7 +627,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
children: [
Expanded(
child: Text(
'已选[${customerMakingProvider.labels}]${customerMakingProvider.selectCustomer.length}位顾客',
'已选[${customerMakingProvider.labels??''}]${customerMakingProvider.selectCustomer.length}位顾客',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(32)),
... ... @@ -639,6 +648,7 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
context,
FromPage.FromPageMakeRecord,
widget.uid,
labels: widget.labels
);
customerProvider.labels =
... ...
... ... @@ -424,7 +424,8 @@ class CustomerProvider extends ChangeNotifier {
BuildContext context, Map<String, String> params,
{isShowLoading = true}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.post, HttpUrl.create_activity_url_link,
.request<dynamic>(
context, Method.post, HttpUrl.create_activity_url_link,
data: params, showLoading: isShowLoading)
.catchError((error) {
print(error.toString());
... ... @@ -610,7 +611,7 @@ class CustomerProvider extends ChangeNotifier {
//我的客情 --- 用来获取客户列表
getCustomerList(BuildContext context, Map<String, String> params,
{bool load = false}) async {
{bool load = false, String labels = ''}) async {
BaseResp<List> baseResp = await DioUtil()
.request<List>(context, Method.post, HttpUrl.get_customer_list,
data: params, showLoading: load)
... ... @@ -644,8 +645,12 @@ class CustomerProvider extends ChangeNotifier {
selectCustomer = [];
List<CustomerListSunModel> temp =
CustomerListModel.fromJson(baseResp.responseData).data;
List<CustomerListSunModel> temp1 = await addDataSelectMy(temp);
userHistorys = temp1;
if (labels == '流失' || labels == '沉睡') {
userHistorys = temp;
} else {
List<CustomerListSunModel> temp1 = await addDataSelectMy(temp);
userHistorys = temp1;
}
getCheckValueMy();
labelsValueMy();
... ... @@ -660,8 +665,13 @@ class CustomerProvider extends ChangeNotifier {
// .addAll(CustomerListModel.fromJson(baseResp.responseData).data);
List<CustomerListSunModel> temp =
CustomerListModel.fromJson(baseResp.responseData).data;
List<CustomerListSunModel> temp1 = await addDataSelectMy(temp);
userHistorys.addAll(temp1);
if (labels == '流失' || labels == '沉睡') {
userHistorys.addAll(temp);
} else {
List<CustomerListSunModel> temp1 = await addDataSelectMy(temp);
userHistorys.addAll(temp1);
}
getCheckValueMy();
labelsValueMy();
... ... @@ -2098,7 +2108,8 @@ class CustomerProvider extends ChangeNotifier {
BuildContext context, Map<String, String> params,
{bool showLoading = false}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.post, HttpUrl.create_label_by_sellerid,
.request<dynamic>(
context, Method.post, HttpUrl.create_label_by_sellerid,
data: params, showLoading: showLoading)
.catchError((error) {
print(error.toString());
... ...
... ... @@ -841,9 +841,10 @@ class NavigatorUtil {
/// 我的客情列表
static Future<dynamic> goMyCustomerListPage(
BuildContext context, FromPage fromPage, String uid,
{replace = false, bool needBtn = false, String index = '0'}) {
{replace = false, bool needBtn = false, String index = '0',String labels = ''}) {
return _navigateTo(context,
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}",
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}&labels=${Uri.encodeComponent(labels)}",
replace: replace);
}
... ... @@ -889,9 +890,10 @@ class NavigatorUtil {
SelfList selfList,
FromPage fromPage,
String homeGid = '',
String labels = ''
}) {
return _navigateTo(context,
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid",
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid&labels=${Uri.encodeComponent(labels)}",
replace: replace);
}
... ...
... ... @@ -1406,12 +1406,13 @@ var myCustomerListPageHandle = new Handler(
print(fromPage);
String index = params["index"].first;
String uid = params["uid"].first;
String labels = params["labels"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: ChangeNotifierProvider<CollectStoreProvider>(
create: (_) => CollectStoreProvider(),
child:
MyCustomerListPage(fromPage: fromPage, index: index, uid: uid)));
MyCustomerListPage(fromPage: fromPage, index: index, uid: uid,labels:labels)));
});
///我的客情列表
... ... @@ -1550,6 +1551,8 @@ var myMakeMarkingPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
String uid = params["uid"].first;
String labels = params["labels"].first;
FromPage fromPage = FluroConvertUtils.enumFromString<FromPage>(
FromPage.values, params["fromPage"].first);
if (fromPage == FromPage.FromPageMakeRecordDetail) {
... ... @@ -1558,13 +1561,13 @@ var myMakeMarkingPageHandle = new Handler(
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMakeMarkingPage(
selfList: selfList, fromPage: fromPage, uid: uid));
selfList: selfList, fromPage: fromPage, uid: uid,labels:labels));
}
String homeGid = params["homeGid"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMakeMarkingPage(fromPage: fromPage, homeGid: homeGid, uid: uid));
child: MyMakeMarkingPage(fromPage: fromPage, homeGid: homeGid, uid: uid,labels:labels));
});
///我的创建营销 ---- 完成全店营销
... ...