Commit 9ef30be7aafcd87e37600cd8e8e47bde6a433f61

Authored by wdn127929
1 parent 3a6a28e5

分经理uid

... ... @@ -45,6 +45,10 @@ class StoreCustomerHomeSunModel extends Object {
@JsonKey(name: 'distribution')
int distribution;
@JsonKey(name: 'distributionStr')
String distributionStr;
StoreCustomerHomeSunModel(
this.myCustomer,
this.active,
... ... @@ -52,6 +56,7 @@ class StoreCustomerHomeSunModel extends Object {
this.drain,
this.sellerUser,
this.distribution,
this.distributionStr
);
factory StoreCustomerHomeSunModel.fromJson(Map<String, dynamic> srcJson) =>
... ...
... ... @@ -29,22 +29,22 @@ Map<String, dynamic> _$StoreCustomerHomeModelToJson(
StoreCustomerHomeSunModel _$StoreCustomerHomeSunModelFromJson(
Map<String, dynamic> json) {
return StoreCustomerHomeSunModel(
json['myCustomer'] as int,
json['active'] == null
? null
: Active.fromJson(json['active'] as Map<String, dynamic>),
json['sleep'] == null
? null
: Sleep.fromJson(json['sleep'] as Map<String, dynamic>),
json['drain'] == null
? null
: Drain.fromJson(json['drain'] as Map<String, dynamic>),
(json['seller_user'] as List)
?.map((e) =>
e == null ? null : SellerUser.fromJson(e as Map<String, dynamic>))
?.toList(),
json['distribution'] as int,
);
json['myCustomer'] as int,
json['active'] == null
? null
: Active.fromJson(json['active'] as Map<String, dynamic>),
json['sleep'] == null
? null
: Sleep.fromJson(json['sleep'] as Map<String, dynamic>),
json['drain'] == null
? null
: Drain.fromJson(json['drain'] as Map<String, dynamic>),
(json['seller_user'] as List)
?.map((e) =>
e == null ? null : SellerUser.fromJson(e as Map<String, dynamic>))
?.toList(),
json['distribution'] as int,
json['distributionStr'] as String);
}
Map<String, dynamic> _$StoreCustomerHomeSunModelToJson(
... ... @@ -56,6 +56,7 @@ Map<String, dynamic> _$StoreCustomerHomeSunModelToJson(
'drain': instance.drain,
'seller_user': instance.sellerUser,
'distribution': instance.distribution,
'distributionStr': instance.distributionStr
};
Active _$ActiveFromJson(Map<String, dynamic> json) {
... ... @@ -96,12 +97,11 @@ Map<String, dynamic> _$DrainToJson(Drain instance) => <String, dynamic>{
SellerUser _$SellerUserFromJson(Map<String, dynamic> json) {
return SellerUser(
json['count'] as String,
json['nick_name'] as String,
json['uid'] as String,
json['account'] as String,
json['detailStr'] as String
);
json['count'] as String,
json['nick_name'] as String,
json['uid'] as String,
json['account'] as String,
json['detailStr'] as String);
}
Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
... ... @@ -109,6 +109,6 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) =>
'count': instance.count,
'nick_name': instance.nickName,
'uid': instance.uid,
'account':instance.account,
'detailStr':instance.detailStr
'account': instance.account,
'detailStr': instance.detailStr
};
... ...
... ... @@ -23,6 +23,7 @@ import 'package:intl/date_symbol_data_local.dart';
import '../../net/dio_util.dart';
import '../../net/http_url.dart';
import '../../utils/screen_util.dart';
class FirstPage extends StatefulWidget {
FirstPage({Key key}) : super(key: key);
... ... @@ -141,12 +142,13 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
VEmptyView(16),
Wrap(
runSpacing: w(1),
children: [
Text(
'我们制定了',
... ... @@ -155,8 +157,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
InkWell(
... ... @@ -172,8 +174,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
),
... ... @@ -184,8 +186,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
InkWell(
... ... @@ -201,8 +203,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
),
... ... @@ -213,8 +215,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
],
... ... @@ -228,8 +230,8 @@ class _FirstPageState extends State<FirstPage> {
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
// forceStrutHeight: true,
// height: 1,
leading: 0.3),
),
],
... ...
... ... @@ -68,8 +68,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
///我的客户首页
_getGuestManageData({bool isShowLoading = true}) async {
GuestManageSunModel model = await customerProvider
.getGuestManageData(context, isShowLoading: isShowLoading);
GuestManageSunModel model = await customerProvider.getGuestManageData(
context, Provider.of<UserModel>(context, listen: false).user.openid,
isShowLoading: isShowLoading);
// setState(() {});
}
... ... @@ -228,8 +229,11 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
index = '3';
}
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer,
index: index);
context,
FromPage.FromPageMyCustomer,
Provider.of<UserModel>(context, listen: false).user.openid,
index: index,
);
},
child: Container(
color: MyColours.color_ffffff,
... ... @@ -273,7 +277,11 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
index = '3';
}
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer,
context,
FromPage.FromPageMyCustomer,
Provider.of<UserModel>(context, listen: false)
.user
.openid,
index: index);
},
text: btnTitle,
... ... @@ -334,7 +342,12 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
InkWell(
onTap: () {
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer);
context,
FromPage.FromPageMyCustomer,
Provider.of<UserModel>(context, listen: false)
.user
.openid,
);
},
child: Container(
height: w(80),
... ... @@ -578,6 +591,10 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
onPressed: () {
NavigatorUtil.goMyMakeMarkingPage(
context,
Provider.of<UserModel>(context,
listen: false)
.user
.openid,
fromPage:
FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
... ... @@ -646,6 +663,10 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
onPressed: () {
NavigatorUtil.goMyMakeMarkingPage(
context,
Provider.of<UserModel>(context,
listen: false)
.user
.openid,
fromPage:
FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
... ... @@ -695,7 +716,11 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
RoundButton(
onPressed: () {
NavigatorUtil.goMyMarketingRecordsPage(
context, FromPage.FromPageMyCustomer);
context,
FromPage.FromPageMyCustomer,
Provider.of<UserModel>(context, listen: false)
.user
.openid);
},
text: '历史营销记录',
fontSize: 32,
... ...
... ... @@ -31,10 +31,11 @@ typedef ClickCall = void Function(FilterBtnModel value);
typedef ClickCallState = void Function(StateSetter state);
class MyCustomerListPage extends StatefulWidget {
final String uid;
final FromPage fromPage;
final String index;
const MyCustomerListPage({Key key, this.fromPage, this.index})
const MyCustomerListPage({Key key, this.uid, this.fromPage, this.index})
: super(key: key);
@override
_MyCustomerListPageState createState() => _MyCustomerListPageState();
... ... @@ -194,7 +195,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
}
customerProvider.notifyListeners();
Map<String, String> params = {
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
"uid": widget.uid,
"page": page.toString(),
"offset": '10'
};
... ... @@ -366,7 +367,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage>
customerMakingProvider.selectCustomer =
customerProvider.selectCustomer;
customerMakingProvider.fromPage = widget.fromPage;
NavigatorUtil.goMyMakeMarkingPage(context);
NavigatorUtil.goMyMakeMarkingPage(context, widget.uid);
} else {
customerMakingProvider.labels = customerProvider.labels;
customerMakingProvider.selectCustomer =
... ...
... ... @@ -26,6 +26,7 @@ import 'package:sendsms/sendsms.dart';
typedef ClickCallback = void Function(dynamic value);
class MyMakeMarkingPage extends StatefulWidget {
final String uid;
final FromPage fromPage;
final SelfList selfList;
final String homeGid;
... ... @@ -33,7 +34,8 @@ class MyMakeMarkingPage extends StatefulWidget {
{Key key,
this.fromPage = FromPage.FromPageCustomerList,
this.selfList,
this.homeGid})
this.homeGid,
this.uid})
: super(key: key);
@override
... ... @@ -487,7 +489,10 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> {
// Map temp =
await NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMakeRecord);
context,
FromPage.FromPageMakeRecord,
widget.uid,
);
customerProvider.labels =
customerMakingProvider.labels;
... ...
... ... @@ -18,9 +18,10 @@ import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
class MyMarketingRecordsDetailPage extends StatefulWidget {
final String uid;
final String idstr;
final SelfList selfList;
MyMarketingRecordsDetailPage({Key key, this.idstr, this.selfList})
MyMarketingRecordsDetailPage({Key key, this.idstr, this.selfList, this.uid})
: super(key: key);
@override
... ... @@ -205,7 +206,7 @@ class _MyMarketingRecordsDetailPageState
horizontal: ScreenUtil().setWidth(200)),
isBold: false,
onPressed: () {
NavigatorUtil.goMyMakeMarkingPage(context,
NavigatorUtil.goMyMakeMarkingPage(context, widget.uid,
selfList: widget.selfList,
fromPage: FromPage.FromPageMakeRecordDetail);
},
... ...
... ... @@ -16,8 +16,9 @@ import 'package:one_key/widgets/system_app_bar.dart';
import 'package:provider/provider.dart';
class MyMarketingRecordsPage extends StatefulWidget {
final String uid;
final FromPage fromPage;
MyMarketingRecordsPage({Key key, this.fromPage}) : super(key: key);
MyMarketingRecordsPage({Key key, this.fromPage, this.uid}) : super(key: key);
@override
_MyMarketingRecordsPageState createState() => _MyMarketingRecordsPageState();
... ... @@ -242,7 +243,10 @@ class _MyMarketingRecordsPageState extends State<MyMarketingRecordsPage> {
onTap: () {
NavigatorUtil
.goMyMarketingRecordsDetailPage(
context, data.id, data);
context,
data.id,
data,
widget.uid);
},
child: Text('查看详情',
style: TextStyle(
... ...
... ... @@ -722,95 +722,101 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
Widget _managerWidget(
String pnum, String btnTitle, String percent, String detailStr,
{String uid = ''}) {
List detailList = detailStr.split('-');
return Container(
// width: w(122),
height: w(116),
padding: EdgeInsets.symmetric(vertical: w(12), horizontal: w(10)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
),
child: Column(
children: [
Align(
alignment: Alignment.centerLeft,
child: Container(
// constraints: BoxConstraints(maxHeight: w(24)),
padding: EdgeInsets.symmetric(vertical: w(4), horizontal: w(5)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(3)),
border:
Border.all(color: MyColours.color_999999, width: w(1))),
child: Text(
btnTitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(12),
fontWeight: FontWeight.bold,
color: MyColours.color_999999),
),
),
),
VEmptyView(20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
pnum,
style: TextStyle(
fontSize: font(24),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
),
Text(
'位',
style: TextStyle(
fontSize: font(14), color: MyColours.color_000000),
),
],
{String uid = '', GestureTapCallback onTap}) {
List detailList = detailStr.split('-');
String firStr = detailList.length > 0 ? detailList[0] : '';
String secStr = detailList.length > 1 ? detailList[1] : '';
String thrStr = detailList.length > 2 ? detailList[2] : '';
return InkWell(
onTap: onTap,
child: Container(
// width: w(122),
height: w(116),
padding: EdgeInsets.symmetric(vertical: w(12), horizontal: w(10)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
),
VEmptyView(10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
child: Column(
children: [
Text(
'23',
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
),
MyDivider(
w(4),
w(1),
color: MyColours.color_999999,
),
Text(
'9',
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_E89243),
Align(
alignment: Alignment.centerLeft,
child: Container(
// constraints: BoxConstraints(maxHeight: w(24)),
padding:
EdgeInsets.symmetric(vertical: w(4), horizontal: w(5)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(3)),
border: Border.all(
color: MyColours.color_999999, width: w(1))),
child: Text(
btnTitle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(12),
fontWeight: FontWeight.bold,
color: MyColours.color_999999),
),
),
),
MyDivider(
w(4),
w(1),
color: MyColours.color_999999,
VEmptyView(20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
pnum,
style: TextStyle(
fontSize: font(24),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
),
Text(
'位',
style: TextStyle(
fontSize: font(14), color: MyColours.color_000000),
),
],
),
Text(
'2',
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_E34D59),
VEmptyView(10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
firStr,
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
),
MyDivider(
w(4),
w(1),
color: MyColours.color_999999,
),
Text(
secStr,
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_E89243),
),
MyDivider(
w(4),
w(1),
color: MyColours.color_999999,
),
Text(
thrStr,
style: TextStyle(
fontSize: font(14),
fontWeight: FontWeight.bold,
color: MyColours.color_E34D59),
),
],
),
],
),
],
),
);
));
}
@override
... ... @@ -958,7 +964,12 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
'${widget.customerProvider.storeSunmodel.distribution}',
'未分配经理',
null,
'2-2-2');
'${widget.customerProvider.storeSunmodel.distributionStr}',
onTap: () {
NavigatorUtil.goCustomerListPage(
context, FromPage.FromPageHome, '',
index: '0', distribution: true);
});
}
return _managerWidget(
... ... @@ -971,7 +982,14 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
null,
'${widget.customerProvider.storeSunmodel.sellerUser[index - 1].detailStr}',
uid: widget.customerProvider.storeSunmodel
.sellerUser[index - 1].uid);
.sellerUser[index - 1].uid, onTap: () {
NavigatorUtil.goCustomerListPage(
context,
FromPage.FromPageHome,
widget.customerProvider.storeSunmodel
.sellerUser[index - 1].uid,
index: '0');
});
}),
VEmptyView(10),
ListView.builder(
... ...
... ... @@ -138,16 +138,28 @@ class _StoreCustomerHomeRightPageState
///我的客户首页
_getGuestManageData({bool isShowLoading = true}) async {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
GuestManageSunModel model = await widget.customerProvider
.getGuestManageData(context, isShowLoading: isShowLoading);
.getGuestManageData(context, uid, isShowLoading: isShowLoading);
// setState(() {});
}
///消费券
_couponNetworkData({bool isShowLoading = true}) async {
// customerMakingProvider.couponSelectIndex = 0;
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
Map<String, String> params = {
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
"uid": uid,
};
await widget.customerProvider.getCustomerSelectActivityNew(context, params,
isShowLoading: isShowLoading);
... ... @@ -166,9 +178,13 @@ class _StoreCustomerHomeRightPageState
}
_getMarketingByUid() async {
Map<String, String> params = {
"uid": Provider.of<UserModel>(context, listen: false).user.openid
};
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
Map<String, String> params = {"uid": uid};
// await widget.customerProvider.getMarketingByUid(context, params);
MarketingByUidsSunModel myRecordData =
... ... @@ -281,8 +297,14 @@ class _StoreCustomerHomeRightPageState
} else if (btnTitle == '120天未到店') {
index = '3';
}
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer,
context, FromPage.FromPageMyCustomer, uid,
index: index);
},
child: Container(
... ... @@ -326,8 +348,14 @@ class _StoreCustomerHomeRightPageState
} else if (btnTitle == '120天未到店') {
index = '3';
}
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer,
context, FromPage.FromPageMyCustomer, uid,
index: index);
},
text: btnTitle,
... ... @@ -363,509 +391,562 @@ class _StoreCustomerHomeRightPageState
// EventBus().emit('changeStatusColor');
// Navigator.pop(context);
// }),
body: WillPopScope(onWillPop: () async {
EventBus().emit('changeStatusColor');
return true;
}, child: Consumer<CustomerProvider>(builder: (context, model, _) {
if (model.pageStateMyHome != PageState.Success) {
return ExceptionPage(
pageState: model.pageStateMyHome,
callback: () {
_getSellerCountsList();
},
emptyMsg: "暂时没有我的客情哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return Column(children: [
Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(70),
padding: EdgeInsets.only(bottom: w(12)),
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
child: Row(
children: [
HEmptyView(48),
Expanded(
child: SizedBox(
// height: ScreenUtil().setWidth(30),
child: ListView.builder(
itemCount: menuTitle.length,
shrinkWrap: true,
controller: _controller,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext contxt, int index) {
return InkWell(
onTap: () {
for (MessageMenuModel item in menuTitle) {
item.select = false;
}
menuTitle[index].select = true;
setState(() {});
_getSellerCountsList(
isShowLoading: true, callback: () {});
// offset = 0;
// 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
body: WillPopScope(
onWillPop: () async {
EventBus().emit('changeStatusColor');
return true;
},
child: Column(children: [
Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(70),
padding: EdgeInsets.only(bottom: w(12)),
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
child: Row(
children: [
HEmptyView(48),
Expanded(
child: SizedBox(
// height: ScreenUtil().setWidth(30),
child: ListView.builder(
itemCount: menuTitle.length,
shrinkWrap: true,
controller: _controller,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext contxt, int index) {
return InkWell(
onTap: () {
for (MessageMenuModel item in menuTitle) {
item.select = false;
}
menuTitle[index].select = true;
setState(() {});
_getMarketingByUid();
// _getSellerCountsList();
_getSellerCountsList(
isShowLoading: true, callback: () {});
_couponNetworkData();
// if (index == 0) {
// typeid = '';
// } else if (index == 1) {
// //店内消息
// typeid = '15';
// } else if (index == 2) {
// //在线预订
// typeid = '10';
// } else if (index == 3) {
// //提前点餐
// typeid = '1';
// } else if (index == 4) {
// //在线买单
// typeid = '12';
// } else if (index == 5) {
// //会员充值
// typeid = '17';
// } else if (index == 6) {
// //存酒超期
// typeid = '18';
// }
// getMessage(typeid, showLoading: true);
},
child: Container(
// width: ScreenUtil().setWidth(104 * 2),
// offset = 0;
// 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
margin: EdgeInsets.only(
right: ScreenUtil().setWidth(30),
),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10),
vertical: ScreenUtil().setWidth(4)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
// color: menuTitle[index].select
// ? MyColours.color_438E93
// : MyColours.color_999999,
border: Border.all(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))),
child: Text(
menuTitle[index].title,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
),
),
);
})))
],
),
),
Expanded(
child: SingleChildScrollView(
controller: _controller,
child: Column(
children: [
// VEmptyView(10),
InkWell(
onTap: () {
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer);
},
child: Container(
height: w(80),
color: MyColours.color_ffffff,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Text(
// '累计',
// style: TextStyle(
// color: MyColours.color_515151,
// fontWeight: FontWeight.bold,
// fontSize: ScreenUtil().setSp(32)),
// ),
Text(
'${widget.customerProvider.guestSunmodel.myCustomer}',
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(64),
fontWeight: FontWeight.bold),
),
Text(
'位',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(32)),
)
],
),
)),
VEmptyView(10),
// GridView.builder(
// controller: _controller,
// shrinkWrap: true,
// cacheExtent: ScreenUtil().setWidth(0),
// itemCount: 3,
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 3,
// childAspectRatio: 1,
// mainAxisSpacing: ScreenUtil().setWidth(10),
// crossAxisSpacing: ScreenUtil().setWidth(10)),
// itemBuilder: (BuildContext context, int index) {
// // locationState = state;
// return _percentWidget(
// '${widget.customerProvider.guestSunmodel.active.count}',
// '活跃客户',
// '${widget.customerProvider.guestSunmodel.active.scale}');
// }),
Row(
children: [
_percentWidget(
'${widget.customerProvider.guestSunmodel.active.count}',
'活跃',
'${widget.customerProvider.guestSunmodel.active.scale}'),
HEmptyView(10),
_percentWidget(
'${widget.customerProvider.guestSunmodel.sleep.count}',
'60天未到店',
'${widget.customerProvider.guestSunmodel.sleep.scale}'),
HEmptyView(10),
_percentWidget(
'${widget.customerProvider.guestSunmodel.drain.count}',
'120天未到店',
'${widget.customerProvider.guestSunmodel.drain.scale}'),
// if (index == 0) {
// typeid = '';
// } else if (index == 1) {
// //店内消息
// typeid = '15';
// } else if (index == 2) {
// //在线预订
// typeid = '10';
// } else if (index == 3) {
// //提前点餐
// typeid = '1';
// } else if (index == 4) {
// //在线买单
// typeid = '12';
// } else if (index == 5) {
// //会员充值
// typeid = '17';
// } else if (index == 6) {
// //存酒超期
// typeid = '18';
// }
// getMessage(typeid, showLoading: true);
},
child: Container(
// width: ScreenUtil().setWidth(104 * 2),
margin: EdgeInsets.only(
right: ScreenUtil().setWidth(30),
),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10),
vertical: ScreenUtil().setWidth(4)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
// color: menuTitle[index].select
// ? MyColours.color_438E93
// : MyColours.color_999999,
border: Border.all(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))),
child: Text(
menuTitle[index].title,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
),
),
);
})))
],
),
ListView.builder(
),
Consumer<CustomerProvider>(builder: (context, model, _) {
if (model.pageStateMyHome != PageState.Success) {
return Expanded(
child: ExceptionPage(
pageState: model.pageStateMyHome,
callback: () {
_couponNetworkData();
_getMarketingByUid();
_getSellerCountsList();
},
emptyMsg: "暂时没有我的客情哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
));
} else {
return Expanded(
child: SingleChildScrollView(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount:
widget.customerProvider.guestSunmodel.tips.task ==
null ||
widget.customerProvider.guestSunmodel.tips.task
.length ==
0
? 0
: widget.customerProvider.guestSunmodel.tips.task
.length,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
Task data = widget
.customerProvider.guestSunmodel.tips.task[index];
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'店内任务:${data.content}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
),
data.aid != null && data.aidStr != null
? Padding(
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(8)),
child: Text(
'优惠内容:${data.aidStr}',
child: Column(
children: [
// VEmptyView(10),
InkWell(
onTap: () {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMyCustomerListPage(
context, FromPage.FromPageMyCustomer, uid);
},
child: Container(
height: w(80),
color: MyColours.color_ffffff,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Text(
// '累计',
// style: TextStyle(
// color: MyColours.color_515151,
// fontWeight: FontWeight.bold,
// fontSize: ScreenUtil().setSp(32)),
// ),
Text(
'${widget.customerProvider.guestSunmodel.myCustomer}',
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(64),
fontWeight: FontWeight.bold),
),
Text(
'位',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(32)),
)
],
),
)),
VEmptyView(10),
// GridView.builder(
// controller: _controller,
// shrinkWrap: true,
// cacheExtent: ScreenUtil().setWidth(0),
// itemCount: 3,
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 3,
// childAspectRatio: 1,
// mainAxisSpacing: ScreenUtil().setWidth(10),
// crossAxisSpacing: ScreenUtil().setWidth(10)),
// itemBuilder: (BuildContext context, int index) {
// // locationState = state;
// return _percentWidget(
// '${widget.customerProvider.guestSunmodel.active.count}',
// '活跃客户',
// '${widget.customerProvider.guestSunmodel.active.scale}');
// }),
Row(
children: [
_percentWidget(
'${widget.customerProvider.guestSunmodel.active.count}',
'活跃',
'${widget.customerProvider.guestSunmodel.active.scale}'),
HEmptyView(10),
_percentWidget(
'${widget.customerProvider.guestSunmodel.sleep.count}',
'60天未到店',
'${widget.customerProvider.guestSunmodel.sleep.scale}'),
HEmptyView(10),
_percentWidget(
'${widget.customerProvider.guestSunmodel.drain.count}',
'120天未到店',
'${widget.customerProvider.guestSunmodel.drain.scale}'),
],
),
ListView.builder(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount: widget.customerProvider.guestSunmodel
.tips.task ==
null ||
widget.customerProvider.guestSunmodel.tips
.task.length ==
0
? 0
: widget.customerProvider.guestSunmodel.tips
.task.length,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
Task data = widget.customerProvider.guestSunmodel
.tips.task[index];
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'店内任务:${data.content}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize:
ScreenUtil().setSp(24)),
ScreenUtil().setSp(32)),
),
)
: SizedBox(),
VEmptyView(8),
Text(
'创建人:${data.createUser}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
)
],
)),
HEmptyView(20),
Column(children: [
RoundButton(
text: '立即完成',
data.aid != null &&
data.aidStr != null
? Padding(
padding: EdgeInsets.only(
top: ScreenUtil()
.setWidth(8)),
child: Text(
'优惠内容:${data.aidStr}',
maxLines: 1,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
color: MyColours
.color_333333,
fontSize: ScreenUtil()
.setSp(24)),
),
)
: SizedBox(),
VEmptyView(8),
Text(
'创建人:${data.createUser}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize:
ScreenUtil().setSp(26)),
)
],
)),
HEmptyView(20),
Column(children: [
RoundButton(
text: '立即完成',
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(26)),
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
SellerList sellerList =
SellerList.fromJson(
json.decode(json.encode(data)));
NavigatorUtil.goMyMakeMarkingPageOnlyShow(
context, sellerList);
},
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(26)),
gradientStart:
MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
SellerList sellerList =
SellerList.fromJson(
json.decode(
json.encode(data)));
NavigatorUtil
.goMyMakeMarkingPageOnlyShow(
context, sellerList);
},
),
data.remainingTime != null
? Padding(
padding: EdgeInsets.only(
top: ScreenUtil()
.setWidth(6)),
child: Text(
'${data.remainingTime}天内',
maxLines: 1,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(
215, 30, 40, 1),
fontSize: ScreenUtil()
.setSp(26)),
))
: SizedBox()
])
],
),
),
data.remainingTime != null
? Padding(
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(6)),
child: Text(
'${data.remainingTime}天内',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(
215, 30, 40, 1),
fontSize:
ScreenUtil().setSp(26)),
))
: SizedBox()
])
],
),
),
],
);
}),
ListView.builder(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount:
widget.customerProvider.guestSunmodel.tips.recover ==
null ||
widget.customerProvider.guestSunmodel.tips
.recover.length ==
0
? 0
: 1,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
],
);
}),
ListView.builder(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount: widget.customerProvider.guestSunmodel
.tips.recover ==
null ||
widget.customerProvider.guestSunmodel.tips
.recover.length ==
0
? 0
: 1,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Text(
'${widget.customerProvider.guestSunmodel.tips.recover[0]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
)),
HEmptyView(20),
RoundButton(
text: '一键追回',
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(26)),
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
NavigatorUtil.goMyMakeMarkingPage(context,
fromPage: FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
widget
.customerProvider
.guestSunmodel
.tips
.recover[1]));
},
),
],
),
),
],
);
}),
ListView.builder(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount:
widget.customerProvider.guestSunmodel.tips.awaken ==
null ||
widget.customerProvider.guestSunmodel.tips
.awaken.length ==
0
? 0
: 1,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Text(
'${widget.customerProvider.guestSunmodel.tips.recover[0]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
)),
HEmptyView(20),
RoundButton(
text: '一键追回',
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(26)),
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMyMakeMarkingPage(
context, uid,
fromPage: FromPage
.FromPageMyCustomer,
homeGid:
Utils.listToStringEnglish1(
widget
.customerProvider
.guestSunmodel
.tips
.recover[1]));
},
),
],
),
),
],
);
}),
ListView.builder(
controller: _controller,
shrinkWrap: true,
cacheExtent: ScreenUtil().setWidth(0),
itemCount: widget.customerProvider.guestSunmodel
.tips.awaken ==
null ||
widget.customerProvider.guestSunmodel.tips
.awaken.length ==
0
? 0
: 1,
itemBuilder: (BuildContext context, int index) {
// locationState = state;
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Text(
'${widget.customerProvider.guestSunmodel.tips.awaken[0]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
)),
HEmptyView(20),
RoundButton(
text: '一键唤醒',
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(26)),
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
NavigatorUtil.goMyMakeMarkingPage(context,
fromPage: FromPage.FromPageMyCustomer,
homeGid: Utils.listToStringEnglish1(
widget.customerProvider
.guestSunmodel.tips.awaken[1]));
return Column(
children: [
VEmptyView(10),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(30)),
child: Row(
children: [
Image.asset(
Utils.getImgPath('warning'),
width: ScreenUtil().setWidth(42),
),
HEmptyView(15),
Expanded(
child: Text(
'${widget.customerProvider.guestSunmodel.tips.awaken[0]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
)),
HEmptyView(20),
RoundButton(
text: '一键唤醒',
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(26)),
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_999999,
radius: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(64),
width: ScreenUtil().setWidth(180),
fontSize: 26,
isBold: false,
onPressed: () {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMyMakeMarkingPage(
context, uid,
fromPage: FromPage
.FromPageMyCustomer,
homeGid:
Utils.listToStringEnglish1(
widget
.customerProvider
.guestSunmodel
.tips
.awaken[1]));
},
),
],
),
),
],
);
}),
_chart(),
ListView.builder(
itemCount: widget
.customerProvider.managerStatisticsList.length,
shrinkWrap: true,
controller: _controller,
padding: EdgeInsets.symmetric(horizontal: w(10)),
itemBuilder: (context, index) {
SellerCountsListSunModel countsListSunModel =
widget.customerProvider
.managerStatisticsList[index];
return InkWell(
onTap: () {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMonthOrderPage(
context,
year.toString(),
countsListSunModel.monthss.toString(),
uid: uid);
},
),
],
),
),
],
);
}),
_chart(),
ListView.builder(
itemCount:
widget.customerProvider.managerStatisticsList.length,
shrinkWrap: true,
controller: _controller,
padding: EdgeInsets.symmetric(horizontal: w(10)),
itemBuilder: (context, index) {
SellerCountsListSunModel countsListSunModel =
widget.customerProvider.managerStatisticsList[index];
return InkWell(
onTap: () {
String uid = '';
menuTitle.forEach((element) {
if (element.select) {
uid = element.uid;
}
});
NavigatorUtil.goMonthOrderPage(
context,
year.toString(),
countsListSunModel.monthss.toString(),
uid: uid);
},
child: MonthItem(
countsListSunModel: countsListSunModel));
})
],
),
)),
// Container(
// color: MyColours.color_FAFAFA,
// padding: EdgeInsets.only(
// top: w(13), bottom: w(26), left: w(45), right: (45)),
// child: Stack(
// children: [
// RoundButton(
// onPressed: () {
// NavigatorUtil.goMyMarketingRecordsPage(
// context, FromPage.FromPageMyCustomer);
// },
// text: '历史营销记录',
// fontSize: 32,
// isBold: true,
// // margin: EdgeInsets.only(
// // top: w(13),
// // bottom: w(26),
// // left: w(45),
// // right: (45)),
// textColor: MyColours.color_F8F9FD,
// gradientStart: MyColours.color_199095,
// gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_199095,
// height: ScreenUtil().setWidth(86),
// // width: ScreenUtil().setWidth(260),
// radius: ScreenUtil().setWidth(10),
// ),
// showWarning
// ? Positioned(
// right: ScreenUtil().setWidth(30),
// top: ScreenUtil().setWidth(45 / 2),
// child: Image.asset(
// Utils.getImgPath('warning'),
// width: ScreenUtil().setWidth(35),
// ))
// : SizedBox()
// ],
// ))
]);
}
})));
child: MonthItem(
countsListSunModel: countsListSunModel));
})
],
),
));
}
})
// Container(
// color: MyColours.color_FAFAFA,
// padding: EdgeInsets.only(
// top: w(13), bottom: w(26), left: w(45), right: (45)),
// child: Stack(
// children: [
// RoundButton(
// onPressed: () {
// NavigatorUtil.goMyMarketingRecordsPage(
// context, FromPage.FromPageMyCustomer);
// },
// text: '历史营销记录',
// fontSize: 32,
// isBold: true,
// // margin: EdgeInsets.only(
// // top: w(13),
// // bottom: w(26),
// // left: w(45),
// // right: (45)),
// textColor: MyColours.color_F8F9FD,
// gradientStart: MyColours.color_199095,
// gradientEnd: MyColours.color_199095,
// borderColor: MyColours.color_199095,
// height: ScreenUtil().setWidth(86),
// // width: ScreenUtil().setWidth(260),
// radius: ScreenUtil().setWidth(10),
// ),
// showWarning
// ? Positioned(
// right: ScreenUtil().setWidth(30),
// top: ScreenUtil().setWidth(45 / 2),
// child: Image.asset(
// Utils.getImgPath('warning'),
// width: ScreenUtil().setWidth(35),
// ))
// : SizedBox()
// ],
// ))
])));
}
}
... ...
... ... @@ -1269,14 +1269,17 @@ class CustomerProvider extends ChangeNotifier {
}
///我的客户首页
Future<GuestManageSunModel> getGuestManageData(BuildContext context,
{isShowLoading = true}) async {
Future<GuestManageSunModel> getGuestManageData(
BuildContext context,
String uid, {
isShowLoading = true,
}) async {
if (isShowLoading) {
pageStateMyHome = PageState.Loading;
notifyListeners();
}
Map<String, String> params = {
'uid': Provider.of<UserModel>(context, listen: false).user.openid
'uid': uid,
};
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.guest_manage,
... ...
... ... @@ -708,28 +708,28 @@ class NavigatorUtil {
///
/// 我的客情列表
static Future<dynamic> goMyCustomerListPage(
BuildContext context, FromPage fromPage,
BuildContext context, FromPage fromPage, String uid,
{replace = false, bool needBtn = false, String index = '0'}) {
return _navigateTo(context,
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}",
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}",
replace: replace);
}
/// 我的营销记录
static Future<dynamic> goMyMarketingRecordsPage(
BuildContext context, FromPage fromPage,
BuildContext context, FromPage fromPage,String uid,
{replace = false}) {
return _navigateTo(context,
"${Routes.my_marketing_records_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}",
"${Routes.my_marketing_records_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&uid=$uid",
replace: replace);
}
/// 我的营销记录详情 --- 个人任务
static Future<dynamic> goMyMarketingRecordsDetailPage(
BuildContext context, String idstr, SelfList selfList,
BuildContext context, String idstr, SelfList selfList,String uid,
{replace = false}) {
return _navigateTo(context,
"${Routes.my_marketing_records_detail_page}?idstr=${idstr}&selfList=${FluroConvertUtils.object2string(selfList)}",
"${Routes.my_marketing_records_detail_page}?idstr=${idstr}&selfList=${FluroConvertUtils.object2string(selfList)}&uid=$uid",
replace: replace);
}
... ... @@ -744,14 +744,15 @@ class NavigatorUtil {
/// 我的创建营销
static Future<dynamic> goMyMakeMarkingPage(
BuildContext context, {
BuildContext context,
String uid, {
replace = false,
SelfList selfList,
FromPage fromPage,
String homeGid = '',
}) {
return _navigateTo(context,
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid",
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid",
replace: replace);
}
... ...
... ... @@ -1116,9 +1116,10 @@ var myCustomerListPageHandle = new Handler(
FromPage.values, params["fromPage"].first);
print(fromPage);
String index = params["index"].first;
String uid = params["uid"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyCustomerListPage(fromPage: fromPage, index: index));
child: MyCustomerListPage(fromPage: fromPage, index: index, uid: uid));
});
///客情设置
... ... @@ -1148,9 +1149,10 @@ var myMarketingRecordsPageHandle = new Handler(
FromPage fromPage = FluroConvertUtils.enumFromString<FromPage>(
FromPage.values, params["fromPage"].first);
print(fromPage);
String uid = params["uid"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMarketingRecordsPage(fromPage: fromPage));
child: MyMarketingRecordsPage(fromPage: fromPage,uid:uid));
});
///全店营销记录详情
... ... @@ -1166,12 +1168,14 @@ var marketingRecordsDetailPageHandle = new Handler(
var myMarketingRecordsDetailPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
String idstr = params["idstr"].first;
String uid = params["uid"].first;
SelfList selfList = SelfList.fromJson(json
.decode(FluroConvertUtils.fluroCnParamsDecode(params["selfList"].first)));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMarketingRecordsDetailPage(idstr: idstr, selfList: selfList));
child: MyMarketingRecordsDetailPage(
idstr: idstr, selfList: selfList, uid: uid));
});
///我的营销记录详情 ---- 全店任务
... ... @@ -1209,7 +1213,7 @@ var makeMarkingPageHandle = new Handler(
///我的创建营销
var myMakeMarkingPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String gid = params["gid"].first;
String uid = params["uid"].first;
FromPage fromPage = FluroConvertUtils.enumFromString<FromPage>(
FromPage.values, params["fromPage"].first);
... ... @@ -1218,13 +1222,14 @@ var myMakeMarkingPageHandle = new Handler(
FluroConvertUtils.fluroCnParamsDecode(params["selfList"].first)));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMakeMarkingPage(selfList: selfList, fromPage: fromPage));
child: MyMakeMarkingPage(
selfList: selfList, fromPage: fromPage, uid: uid));
}
String homeGid = params["homeGid"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: MyMakeMarkingPage(fromPage: fromPage, homeGid: homeGid));
child: MyMakeMarkingPage(fromPage: fromPage, homeGid: homeGid, uid: uid));
});
///我的创建营销 ---- 完成全店营销
... ...