|
|
|
// import 'dart:convert';
|
|
|
|
// import 'dart:ui';
|
|
|
|
|
|
|
|
// import 'package:flutter/material.dart';
|
|
|
|
// import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
// import 'package:one_key/constant/state.dart';
|
|
|
|
// import 'package:one_key/models/guest_manage_model.dart';
|
|
|
|
// import 'package:one_key/models/marketing_by_uid_model.dart';
|
|
|
|
// import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
// import 'package:one_key/provider/user_model.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/page_exception.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';
|
|
|
|
// import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
// import '../../../../models/message_menu_model.dart';
|
|
|
|
// import '../../../../models/seller_counts_list.dart';
|
|
|
|
// import '../../../../models/store_customer_home_model.dart';
|
|
|
|
// import '../../../../utils/screen_util.dart';
|
|
|
|
// import '../../../../widgets/MyDivider.dart';
|
|
|
|
// import '../month_item.dart';
|
|
|
|
// import '../store_customer/bar_chart_page.dart';
|
|
|
|
|
|
|
|
// /**
|
|
|
|
// *
|
|
|
|
// */
|
|
|
|
// class StoreCustomerHomeRightPage extends StatefulWidget {
|
|
|
|
// final CustomerProvider customerProvider;
|
|
|
|
// StoreCustomerHomeRightPage({Key key, this.customerProvider})
|
|
|
|
// : super(key: key);
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// _StoreCustomerHomeRightPageState createState() =>
|
|
|
|
// _StoreCustomerHomeRightPageState();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// class _StoreCustomerHomeRightPageState
|
|
|
|
// extends State<StoreCustomerHomeRightPage> {
|
|
|
|
// ScrollController _controller = ScrollController();
|
|
|
|
// // widget.customerProvider widget.customerProvider;
|
|
|
|
// bool showWarning = false;
|
|
|
|
|
|
|
|
// int year;
|
|
|
|
|
|
|
|
// List<MessageMenuModel> menuTitle = [];
|
|
|
|
// @override
|
|
|
|
// void initState() {
|
|
|
|
// super.initState();
|
|
|
|
// year = DateTime.now().year;
|
|
|
|
|
|
|
|
// // for (int i = 0; i < 15; i++) {
|
|
|
|
// // MessageMenuModel messageMenuModel = MessageMenuModel();
|
|
|
|
// // messageMenuModel.title = '${i}经理';
|
|
|
|
// // messageMenuModel.select = i == 0 ? true : false;
|
|
|
|
// // menuTitle.add(messageMenuModel);
|
|
|
|
// // }
|
|
|
|
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
// if (widget.customerProvider.storeSunmodel == null) {
|
|
|
|
// _getSellerGuestManage();
|
|
|
|
// } else {
|
|
|
|
// widget.customerProvider.storeSunmodel.sellerUser.forEach((element) {
|
|
|
|
// MessageMenuModel messageMenuModel = MessageMenuModel();
|
|
|
|
// messageMenuModel.uid = element.uid;
|
|
|
|
// messageMenuModel.title = element.nickName ?? element.account;
|
|
|
|
// messageMenuModel.select = false;
|
|
|
|
// menuTitle.add(messageMenuModel);
|
|
|
|
// });
|
|
|
|
// if (menuTitle.length > 0) {
|
|
|
|
// menuTitle[0].select = true;
|
|
|
|
// }
|
|
|
|
// _couponNetworkData();
|
|
|
|
|
|
|
|
// _getMarketingByUid();
|
|
|
|
// _getSellerCountsList();
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// bus.on("refresh_my_customer_home", (arg) {
|
|
|
|
// // _getGuestManageData(isShowLoading: false);
|
|
|
|
// _getMarketingByUid();
|
|
|
|
// _getSellerCountsList();
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void dispose() {
|
|
|
|
// bus.off('refresh_my_customer_home');
|
|
|
|
// // bus.off("refresh_coupon_list");
|
|
|
|
// super.dispose();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///全店客情首页
|
|
|
|
// _getSellerGuestManage() async {
|
|
|
|
// StoreCustomerHomeSunModel model =
|
|
|
|
// await widget.customerProvider.getSellerGuestManage(context);
|
|
|
|
// // setState(() {});
|
|
|
|
// widget.customerProvider.storeSunmodel.sellerUser.forEach((element) {
|
|
|
|
// MessageMenuModel messageMenuModel = MessageMenuModel();
|
|
|
|
// messageMenuModel.uid = element.uid;
|
|
|
|
// messageMenuModel.title = element.nickName ?? element.account;
|
|
|
|
// messageMenuModel.select = false;
|
|
|
|
// menuTitle.add(messageMenuModel);
|
|
|
|
// });
|
|
|
|
// if (menuTitle.length > 0) {
|
|
|
|
// menuTitle[0].select = true;
|
|
|
|
// }
|
|
|
|
// _couponNetworkData();
|
|
|
|
|
|
|
|
// _getMarketingByUid();
|
|
|
|
// _getSellerCountsList();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getSellerCountsList({isShowLoading = false, VoidCallback callback}) async {
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// 'year': year.toString(),
|
|
|
|
// 'uid': uid
|
|
|
|
// };
|
|
|
|
// await widget.customerProvider
|
|
|
|
// .getSellerCountsList(context, params, isShowLoading: isShowLoading);
|
|
|
|
// if ((widget.customerProvider.managerStatisticsList == null ||
|
|
|
|
// widget.customerProvider.managerStatisticsList.length == 0) &&
|
|
|
|
// callback != null) {
|
|
|
|
// callback();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///我的客户首页
|
|
|
|
// _getGuestManageData({bool isShowLoading = true}) async {
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// GuestManageSunModel model = await widget.customerProvider
|
|
|
|
// .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": uid,
|
|
|
|
// };
|
|
|
|
// await widget.customerProvider.getCustomerSelectActivityNew(context, params,
|
|
|
|
// isShowLoading: isShowLoading);
|
|
|
|
// //此人已经新建好券
|
|
|
|
// // if (widget.customerProvider.couponListSelect.length > 0) {
|
|
|
|
// // for (int i = 0; i < widget.customerProvider.couponListSelect.length; i++) {
|
|
|
|
// // if (widget.sellerList.aid == widget.customerProvider.couponListSelect[i].id) {
|
|
|
|
// // aidStr = widget.customerProvider.couponListSelect[i].aname;
|
|
|
|
// // }
|
|
|
|
// // }
|
|
|
|
// // widget.customerProvider.notifyListeners();
|
|
|
|
// // } else {
|
|
|
|
// // //没有新建的优惠券
|
|
|
|
// // }
|
|
|
|
// _getGuestManageData(isShowLoading: isShowLoading);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getMarketingByUid() async {
|
|
|
|
// 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 =
|
|
|
|
// await widget.customerProvider.getMarketingByUid(context, params);
|
|
|
|
// if (myRecordData != null && myRecordData.sellerList.length > 0) {
|
|
|
|
// bool temp = myRecordData.sellerList.any((value) {
|
|
|
|
// return value.finishedStatus == '0';
|
|
|
|
// });
|
|
|
|
// setState(() {
|
|
|
|
// showWarning = temp;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// // await widget.customerProvider.searchData(widget.customerProvider.controller.text);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// Widget _chart() {
|
|
|
|
// return Container(
|
|
|
|
// // height: w(216),
|
|
|
|
// padding: EdgeInsets.only(top: w(16), left: w(16), right: w(16)),
|
|
|
|
// margin: EdgeInsets.all(w(10)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// borderRadius: BorderRadius.circular(r(8))),
|
|
|
|
// child: Column(
|
|
|
|
// children: [
|
|
|
|
// Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// children: [
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// if (year == 2018) {
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// setState(() {
|
|
|
|
// year--;
|
|
|
|
// });
|
|
|
|
// _getSellerCountsList(
|
|
|
|
// isShowLoading: true,
|
|
|
|
// callback: () {
|
|
|
|
// setState(() {
|
|
|
|
// year++;
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Padding(
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.only(right: ScreenUtil().setWidth(20)),
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath(year == 2018
|
|
|
|
// ? 'c_arrow_left_gray'
|
|
|
|
// : 'c_arrow_left'),
|
|
|
|
// width: ScreenUtil().setWidth(24),
|
|
|
|
// ))),
|
|
|
|
// Text(
|
|
|
|
// '${year}年',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_000000),
|
|
|
|
// ),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// if (year >= DateTime.now().year) {
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// setState(() {
|
|
|
|
// year++;
|
|
|
|
// });
|
|
|
|
// _getSellerCountsList(
|
|
|
|
// isShowLoading: true,
|
|
|
|
// callback: () {
|
|
|
|
// setState(() {
|
|
|
|
// year--;
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Padding(
|
|
|
|
// padding: EdgeInsets.only(
|
|
|
|
// left: ScreenUtil().setWidth(20),
|
|
|
|
// ),
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath(year != DateTime.now().year
|
|
|
|
// ? 'c_arrow_right'
|
|
|
|
// : 'c_arrow_right_gray'),
|
|
|
|
// width: ScreenUtil().setWidth(24),
|
|
|
|
// )))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// VEmptyView(80),
|
|
|
|
// Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: w(177),
|
|
|
|
// child: LayoutBuilder(builder: (context, constraints) {
|
|
|
|
// return BarChartWidget(
|
|
|
|
// dataList: widget.customerProvider.chartManagerDataList);
|
|
|
|
// }))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///活跃客户、沉睡客户、流失客户
|
|
|
|
// Widget _percentWidget(String pnum, String btnTitle, String percent) {
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () async {
|
|
|
|
// String index = '0';
|
|
|
|
// if (btnTitle == '活跃') {
|
|
|
|
// index = '1';
|
|
|
|
// } else if (btnTitle == '60天未到店') {
|
|
|
|
// index = '2';
|
|
|
|
// } else if (btnTitle == '120天未到店') {
|
|
|
|
// index = '3';
|
|
|
|
// }
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
// context, FromPage.FromPageMyCustomer, uid,
|
|
|
|
// index: index);
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// height: w(90),
|
|
|
|
// width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
// // height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(30),
|
|
|
|
// Container(
|
|
|
|
// // height: w(24),
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Text(pnum,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: btnTitle == '活跃'
|
|
|
|
// ? MyColours.color_199095
|
|
|
|
// : btnTitle == '60天未到店'
|
|
|
|
// ? MyColours.color_E89243
|
|
|
|
// : MyColours.color_E34D59,
|
|
|
|
// fontSize: ScreenUtil().setSp(48),
|
|
|
|
// fontWeight: FontWeight.bold)),
|
|
|
|
// Text('位',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ))
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// RoundButton(
|
|
|
|
// onPressed: () async {
|
|
|
|
// String index = '0';
|
|
|
|
// if (btnTitle == '活跃') {
|
|
|
|
// index = '1';
|
|
|
|
// } else if (btnTitle == '60天未到店') {
|
|
|
|
// index = '2';
|
|
|
|
// } else if (btnTitle == '120天未到店') {
|
|
|
|
// index = '3';
|
|
|
|
// }
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
// context, FromPage.FromPageMyCustomer, uid,
|
|
|
|
// index: index);
|
|
|
|
// },
|
|
|
|
// text: btnTitle,
|
|
|
|
// fontSize: 24,
|
|
|
|
// isBold: false,
|
|
|
|
// textColor: MyColours.color_999999,
|
|
|
|
// gradientStart: MyColours.color_ffffff,
|
|
|
|
// gradientEnd: MyColours.color_ffffff,
|
|
|
|
// borderColor: MyColours.color_ffffff,
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
// // 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) {
|
|
|
|
// // widget.customerProvider = Provider.of<widget.customerProvider>(context, listen: true);
|
|
|
|
// return Scaffold(
|
|
|
|
// // backgroundColor: MyColours.color_f3f3f3,
|
|
|
|
// // appBar: SystemAppBar('我的客情', onTap: () {
|
|
|
|
// // EventBus().emit('changeStatusColor');
|
|
|
|
// // Navigator.pop(context);
|
|
|
|
// // }),
|
|
|
|
// 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(isShowLoading: false);
|
|
|
|
|
|
|
|
// // offset = 0;
|
|
|
|
// // 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
|
|
|
|
|
|
|
|
// // 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),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// })))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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,
|
|
|
|
// 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(32)),
|
|
|
|
// ),
|
|
|
|
// 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);
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// 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;
|
|
|
|
|
|
|
|
// 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: () {
|
|
|
|
// 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);
|
|
|
|
// },
|
|
|
|
// 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()
|
|
|
|
// // ],
|
|
|
|
// // ))
|
|
|
|
// ])));
|
|
|
|
// }
|
|
|
|
// } |
...
|
...
|
|