|
...
|
...
|
@@ -61,6 +61,7 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { |
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
bus.off('refresh_store_customer_home');
|
|
|
|
// bus.off("refresh_coupon_list");
|
|
|
|
super.dispose();
|
|
...
|
...
|
@@ -845,361 +846,356 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { |
|
|
|
Widget build(BuildContext context) {
|
|
|
|
// widget.customerProvider = Provider.of<widget.customerProvider>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
// backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
// appBar: SystemAppBar('全店客情', onTap: () {
|
|
|
|
// EventBus().emit('changeStatusColor');
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// }),
|
|
|
|
body: WillPopScope(onWillPop: () async {
|
|
|
|
EventBus().emit('changeStatusColor');
|
|
|
|
return true;
|
|
|
|
}, child: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateStoreHome != PageState.Success) {
|
|
|
|
if (model.pageStateStoreHome == PageState.Loading) {
|
|
|
|
return SingleChildScrollView(
|
|
|
|
controller: _controller,
|
|
|
|
child: Stack(alignment: Alignment.center, children: [
|
|
|
|
Column(children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
Container(
|
|
|
|
height: w(80),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Row(
|
|
|
|
// backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
// appBar: SystemAppBar('全店客情', onTap: () {
|
|
|
|
// EventBus().emit('changeStatusColor');
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// }),
|
|
|
|
body: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateStoreHome != PageState.Success) {
|
|
|
|
if (model.pageStateStoreHome == PageState.Loading) {
|
|
|
|
return SingleChildScrollView(
|
|
|
|
controller: _controller,
|
|
|
|
child: Stack(alignment: Alignment.center, children: [
|
|
|
|
Column(children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
Container(
|
|
|
|
height: w(80),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(64),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
_percentWidget('', '活跃', '', tap: false),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget('', '60天未到店', '', tap: false),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget('', '120天未到店', '', tap: false),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
VEmptyView(10),
|
|
|
|
GridView.builder(
|
|
|
|
controller: _controller,
|
|
|
|
shrinkWrap: true,
|
|
|
|
cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
itemCount: 6,
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 3,
|
|
|
|
childAspectRatio: 1.05,
|
|
|
|
mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return _managerWidget('', '', null, '',
|
|
|
|
uid: '', onTap: () {});
|
|
|
|
})
|
|
|
|
]),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Center(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
child: Container(
|
|
|
|
width: 200,
|
|
|
|
height: 200,
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: CupertinoActivityIndicator(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
radius: 30,
|
|
|
|
),
|
|
|
|
))
|
|
|
|
// VEmptyView(30),
|
|
|
|
// Text(
|
|
|
|
// '加载中,请稍后...',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_666666,
|
|
|
|
// fontSize: ScreenUtil().setSp(24)),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
))
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageStateStoreHome,
|
|
|
|
callback: () {
|
|
|
|
// getTableList();
|
|
|
|
_getSellerGuestManage();
|
|
|
|
_getSellerCountsList();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有全店客情哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _controller,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
if (widget.customerProvider.storeSunmodel != null)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageHome,
|
|
|
|
'',
|
|
|
|
{
|
|
|
|
'object': widget
|
|
|
|
.customerProvider.storeSunmodel.sellerUser
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: w(80),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'${widget.customerProvider.storeSunmodel.myCustomer}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(64),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
// Positioned(
|
|
|
|
// top: ScreenUtil().setWidth(30),
|
|
|
|
// right: ScreenUtil().setWidth(40),
|
|
|
|
// child: InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// NavigatorUtil.goCustomerSetPage(context);
|
|
|
|
// },
|
|
|
|
// child: Image.asset(Utils.getImgPath('c_set'),
|
|
|
|
// width: ScreenUtil().setWidth(40))))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
VEmptyView(10),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(64),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.active.count}',
|
|
|
|
'活跃',
|
|
|
|
'${widget.customerProvider.storeSunmodel.active.scale}'),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.sleep.count}',
|
|
|
|
'60天未到店',
|
|
|
|
'${widget.customerProvider.storeSunmodel.sleep.scale}'),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.drain.count}',
|
|
|
|
'120天未到店',
|
|
|
|
'${widget.customerProvider.storeSunmodel.drain.scale}'),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
_percentWidget('', '活跃', '', tap: false),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget('', '60天未到店', '', tap: false),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget('', '120天未到店', '', tap: false),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// 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('1999', '活跃客户', '39.20');
|
|
|
|
// }),
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// _percentWidget('19992', '活跃客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '沉睡客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '流失客户', '5.90'),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
// child: Text(
|
|
|
|
// '客户经理',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// color: MyColours.color_333333),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
VEmptyView(10),
|
|
|
|
GridView.builder(
|
|
|
|
controller: _controller,
|
|
|
|
shrinkWrap: true,
|
|
|
|
cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
itemCount: widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser.length +
|
|
|
|
1,
|
|
|
|
gridDelegate:
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 3,
|
|
|
|
childAspectRatio: 1.05,
|
|
|
|
mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
// locationState = state;
|
|
|
|
if (index == 0) {
|
|
|
|
return _managerWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.distribution}',
|
|
|
|
'未分配经理',
|
|
|
|
null,
|
|
|
|
'${widget.customerProvider.storeSunmodel.distributionStr}',
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageHome,
|
|
|
|
'',
|
|
|
|
{
|
|
|
|
'object': widget.customerProvider
|
|
|
|
.storeSunmodel.sellerUser
|
|
|
|
},
|
|
|
|
index: '0',
|
|
|
|
distribution: true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
VEmptyView(10),
|
|
|
|
GridView.builder(
|
|
|
|
controller: _controller,
|
|
|
|
shrinkWrap: true,
|
|
|
|
cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
itemCount: 6,
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 3,
|
|
|
|
childAspectRatio: 1.05,
|
|
|
|
mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return _managerWidget('', '', null, '',
|
|
|
|
uid: '', onTap: () {});
|
|
|
|
})
|
|
|
|
]),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Center(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
child: Container(
|
|
|
|
width: 200,
|
|
|
|
height: 200,
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: CupertinoActivityIndicator(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
radius: 30,
|
|
|
|
),
|
|
|
|
))
|
|
|
|
// VEmptyView(30),
|
|
|
|
// Text(
|
|
|
|
// '加载中,请稍后...',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_666666,
|
|
|
|
// fontSize: ScreenUtil().setSp(24)),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
))
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageStateStoreHome,
|
|
|
|
callback: () {
|
|
|
|
// getTableList();
|
|
|
|
_getSellerGuestManage();
|
|
|
|
_getSellerCountsList();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有全店客情哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _controller,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
if (widget.customerProvider.storeSunmodel != null)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
return _managerWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.sellerUser[index - 1].count}',
|
|
|
|
widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].account ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: '${widget.customerProvider.storeSunmodel.sellerUser[index - 1].nickName ?? widget.customerProvider.storeSunmodel.sellerUser[index - 1].account}',
|
|
|
|
null,
|
|
|
|
'${widget.customerProvider.storeSunmodel.sellerUser[index - 1].detailStr}',
|
|
|
|
uid: widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].uid, onTap: () {
|
|
|
|
NavigatorUtil.goCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageHome,
|
|
|
|
'',
|
|
|
|
widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].uid,
|
|
|
|
{
|
|
|
|
'object': widget
|
|
|
|
.customerProvider.storeSunmodel.sellerUser
|
|
|
|
},
|
|
|
|
index: '0',
|
|
|
|
);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: w(80),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'${widget.customerProvider.storeSunmodel.myCustomer}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(64),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
// Positioned(
|
|
|
|
// top: ScreenUtil().setWidth(30),
|
|
|
|
// right: ScreenUtil().setWidth(40),
|
|
|
|
// child: InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// NavigatorUtil.goCustomerSetPage(context);
|
|
|
|
// },
|
|
|
|
// child: Image.asset(Utils.getImgPath('c_set'),
|
|
|
|
// width: ScreenUtil().setWidth(40))))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
VEmptyView(10),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.active.count}',
|
|
|
|
'活跃',
|
|
|
|
'${widget.customerProvider.storeSunmodel.active.scale}'),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.sleep.count}',
|
|
|
|
'60天未到店',
|
|
|
|
'${widget.customerProvider.storeSunmodel.sleep.scale}'),
|
|
|
|
HEmptyView(10),
|
|
|
|
_percentWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.drain.count}',
|
|
|
|
'120天未到店',
|
|
|
|
'${widget.customerProvider.storeSunmodel.drain.scale}'),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// 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('1999', '活跃客户', '39.20');
|
|
|
|
// }),
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// _percentWidget('19992', '活跃客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '沉睡客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '流失客户', '5.90'),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
// child: Text(
|
|
|
|
// '客户经理',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// color: MyColours.color_333333),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
VEmptyView(10),
|
|
|
|
GridView.builder(
|
|
|
|
controller: _controller,
|
|
|
|
shrinkWrap: true,
|
|
|
|
cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
itemCount: widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser.length +
|
|
|
|
1,
|
|
|
|
gridDelegate:
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 3,
|
|
|
|
childAspectRatio: 1.05,
|
|
|
|
mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
crossAxisSpacing:
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
// locationState = state;
|
|
|
|
if (index == 0) {
|
|
|
|
return _managerWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.distribution}',
|
|
|
|
'未分配经理',
|
|
|
|
null,
|
|
|
|
'${widget.customerProvider.storeSunmodel.distributionStr}',
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageHome,
|
|
|
|
'',
|
|
|
|
{
|
|
|
|
'object': widget.customerProvider
|
|
|
|
.storeSunmodel.sellerUser
|
|
|
|
},
|
|
|
|
index: '0',
|
|
|
|
distribution: true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return _managerWidget(
|
|
|
|
'${widget.customerProvider.storeSunmodel.sellerUser[index - 1].count}',
|
|
|
|
widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].account ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: '${widget.customerProvider.storeSunmodel.sellerUser[index - 1].nickName ?? widget.customerProvider.storeSunmodel.sellerUser[index - 1].account}',
|
|
|
|
null,
|
|
|
|
'${widget.customerProvider.storeSunmodel.sellerUser[index - 1].detailStr}',
|
|
|
|
uid: widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].uid, onTap: () {
|
|
|
|
NavigatorUtil.goCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageHome,
|
|
|
|
widget.customerProvider.storeSunmodel
|
|
|
|
.sellerUser[index - 1].uid,
|
|
|
|
{
|
|
|
|
'object': widget.customerProvider
|
|
|
|
.storeSunmodel.sellerUser
|
|
|
|
},
|
|
|
|
index: '0',
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
VEmptyView(10),
|
|
|
|
// ListView.builder(
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// controller: _controller,
|
|
|
|
// itemCount: 2,
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
// return Container(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// vertical: w(12), horizontal: w(16)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// border: Border(
|
|
|
|
// bottom: BorderSide(
|
|
|
|
// color: index == 2 - 1
|
|
|
|
// ? MyColours.color_ffffff
|
|
|
|
// : MyColours.color_E7E7E7,
|
|
|
|
// width: w(1)))),
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// '7天内存酒超期:5位/7天内纪念日提醒:3位',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(16),
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// )),
|
|
|
|
// Text(
|
|
|
|
// '创建营销计划',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(16),
|
|
|
|
// color: MyColours.color_999999),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(20),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath('arrow_right_new'),
|
|
|
|
// width: w(12),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }),
|
|
|
|
VEmptyView(10),
|
|
|
|
// ListView.builder(
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// controller: _controller,
|
|
|
|
// itemCount: 2,
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
// return Container(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// vertical: w(12), horizontal: w(16)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// border: Border(
|
|
|
|
// bottom: BorderSide(
|
|
|
|
// color: index == 2 - 1
|
|
|
|
// ? MyColours.color_ffffff
|
|
|
|
// : MyColours.color_E7E7E7,
|
|
|
|
// width: w(1)))),
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// '7天内存酒超期:5位/7天内纪念日提醒:3位',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(16),
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// )),
|
|
|
|
// Text(
|
|
|
|
// '创建营销计划',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(16),
|
|
|
|
// color: MyColours.color_999999),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(20),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath('arrow_right_new'),
|
|
|
|
// width: w(12),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }),
|
|
|
|
|
|
|
|
if (widget.customerProvider.homeStatisticsList != null &&
|
|
|
|
widget.customerProvider.homeStatisticsList.length > 0)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
_chart(),
|
|
|
|
// _monthWidget(),
|
|
|
|
if (widget.customerProvider.homeStatisticsList != null &&
|
|
|
|
widget.customerProvider.homeStatisticsList.length > 0)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
_chart(),
|
|
|
|
// _monthWidget(),
|
|
|
|
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: widget
|
|
|
|
.customerProvider.homeStatisticsList.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _controller,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
SellerCountsListSunModel countsListSunModel =
|
|
|
|
widget.customerProvider
|
|
|
|
.homeStatisticsList[index];
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goMonthOrderPage(
|
|
|
|
context,
|
|
|
|
year.toString(),
|
|
|
|
countsListSunModel.monthss.toString());
|
|
|
|
},
|
|
|
|
child: MonthItem(
|
|
|
|
countsListSunModel: countsListSunModel));
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
ListView.builder(
|
|
|
|
itemCount:
|
|
|
|
widget.customerProvider.homeStatisticsList.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _controller,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
SellerCountsListSunModel countsListSunModel = widget
|
|
|
|
.customerProvider.homeStatisticsList[index];
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goMonthOrderPage(
|
|
|
|
context,
|
|
|
|
year.toString(),
|
|
|
|
countsListSunModel.monthss.toString());
|
|
|
|
},
|
|
|
|
child: MonthItem(
|
|
|
|
countsListSunModel: countsListSunModel));
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
|
|
ListView.builder(
|
|
...
|
...
|
@@ -1570,54 +1566,53 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { |
|
|
|
);
|
|
|
|
})
|
|
|
|
*/
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
if (widget.customerProvider.storeSunmodel != null)
|
|
|
|
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.goMarketingRecordsPage(
|
|
|
|
context, FromPage.FromPageStoreCustomer, {
|
|
|
|
'object':
|
|
|
|
widget.customerProvider.storeSunmodel.sellerUser
|
|
|
|
});
|
|
|
|
},
|
|
|
|
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()
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
})),
|
|
|
|
);
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
if (widget.customerProvider.storeSunmodel != null)
|
|
|
|
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.goMarketingRecordsPage(
|
|
|
|
context, FromPage.FromPageStoreCustomer, {
|
|
|
|
'object':
|
|
|
|
widget.customerProvider.storeSunmodel.sellerUser
|
|
|
|
});
|
|
|
|
},
|
|
|
|
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()
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|