|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
|
|
import 'package:one_key/utils/event_bus.dart';
|
|
|
|
import 'package:one_key/utils/utils.dart';
|
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
import 'package:one_key/widgets/round_button.dart';
|
|
|
|
import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
|
|
|
|
class MyCustomerPage extends StatefulWidget {
|
|
|
|
MyCustomerPage({Key key}) : super(key: key);
|
|
...
|
...
|
@@ -9,13 +17,223 @@ class MyCustomerPage extends StatefulWidget { |
|
|
|
}
|
|
|
|
|
|
|
|
class _MyCustomerPageState extends State<MyCustomerPage> {
|
|
|
|
ScrollController _controller = ScrollController();
|
|
|
|
|
|
|
|
///活跃客户、沉睡客户、流失客户
|
|
|
|
Widget _percentWidget(String pnum, String btnTitle, String percent) {
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
// height: ScreenUtil().setWidth(230),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(pnum,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(40),
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
Text('位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
RoundButton(
|
|
|
|
onPressed: () async {},
|
|
|
|
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()
|
|
|
|
: Text('${percent}%',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
appBar: SystemAppBar('我的客情', onTap: () {
|
|
|
|
EventBus().emit('changeStatusColor');
|
|
|
|
Navigator.pop(context);
|
|
|
|
}),
|
|
|
|
body: Container(),
|
|
|
|
body: WillPopScope(
|
|
|
|
onWillPop: () async {
|
|
|
|
EventBus().emit('changeStatusColor');
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
child: Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _controller,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'19',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(60),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'位',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
NavigatorUtil.goCustomerListPage(context);
|
|
|
|
},
|
|
|
|
text: '我的客户',
|
|
|
|
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(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('1999', '活跃客户', '39.20');
|
|
|
|
}),
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// _percentWidget('19992', '活跃客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '沉睡客户', '90.90'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('19992', '流失客户', '5.90'),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
|
|
|
|
ListView.builder(
|
|
|
|
controller: _controller,
|
|
|
|
shrinkWrap: true,
|
|
|
|
cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
itemCount: 20,
|
|
|
|
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(34),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'2为顾客马上快递费哈健身房哈尽快发货阿花房间卡都会发觉客服哈空间发哈尽快发货卡上的房间卡上发哈尽快',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
)),
|
|
|
|
HEmptyView(30),
|
|
|
|
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),
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
// NavigatorUtil.goEnterStoreEnvironmentPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goMarketingRecordsPage(context);
|
|
|
|
},
|
|
|
|
text: '营销记录',
|
|
|
|
fontSize: 24,
|
|
|
|
isBold: false,
|
|
|
|
textColor: MyColours.color_199095,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_199095,
|
|
|
|
height: ScreenUtil().setWidth(75),
|
|
|
|
width: ScreenUtil().setWidth(260),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
// image: Utils.getImgPath('add_area')
|
|
|
|
),
|
|
|
|
)
|
|
|
|
])),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|