Commit 70af9b8b97b06838d898b49b109c2e46b7d8a2ce

Authored by wdn127929
1 parent 089cc473

我的客情首页UI

  1 +import 'dart:convert';
  2 +import 'dart:ui';
  3 +
  4 +import 'package:flutter/material.dart';
  5 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  6 +import 'package:one_key/constant/state.dart';
  7 +import 'package:one_key/models/guest_manage_model.dart';
  8 +import 'package:one_key/models/marketing_by_uid_model.dart';
  9 +import 'package:one_key/provider/customer_provider.dart';
  10 +import 'package:one_key/provider/user_model.dart';
  11 +import 'package:one_key/res/colors.dart';
  12 +import 'package:one_key/route/navigator_util.dart';
  13 +import 'package:one_key/utils/event_bus.dart';
  14 +import 'package:one_key/utils/utils.dart';
  15 +import 'package:one_key/widgets/h_empty_view.dart';
  16 +import 'package:one_key/widgets/page_exception.dart';
  17 +import 'package:one_key/widgets/round_button.dart';
  18 +import 'package:one_key/widgets/system_app_bar.dart';
  19 +import 'package:one_key/widgets/v_empty_view.dart';
  20 +import 'package:provider/provider.dart';
  21 +
  22 +import '../../../../utils/screen_util.dart';
  23 +import '../../../../widgets/MyDivider.dart';
  24 +import '../store_customer/bar_chart_page.dart';
  25 +
  26 +/**
  27 + * 我的客情首页
  28 + */
  29 +class MyCustomerHomePage extends StatefulWidget {
  30 + MyCustomerHomePage({Key key}) : super(key: key);
  31 +
  32 + @override
  33 + _MyCustomerHomePageState createState() => _MyCustomerHomePageState();
  34 +}
  35 +
  36 +class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
  37 + ScrollController _controller = ScrollController();
  38 + CustomerProvider customerProvider;
  39 + bool showWarning = false;
  40 +
  41 + int year;
  42 +
  43 + List<BarData> dataList = [
  44 + BarData(MyColours.color_8EBBBE, 200),
  45 + BarData(MyColours.color_8EBBBE, 8),
  46 + BarData(MyColours.color_8EBBBE, 15),
  47 + BarData(MyColours.color_8EBBBE, 5),
  48 + BarData(MyColours.color_8EBBBE, 2),
  49 + BarData(MyColours.color_8EBBBE, 2),
  50 + BarData(MyColours.color_8EBBBE, 18),
  51 + BarData(MyColours.color_8EBBBE, 168),
  52 + BarData(MyColours.color_8EBBBE, 15),
  53 + BarData(MyColours.color_8EBBBE, 5),
  54 + BarData(MyColours.color_8EBBBE, null ?? 0),
  55 + BarData(MyColours.color_8EBBBE, 0),
  56 + ];
  57 + @override
  58 + void initState() {
  59 + super.initState();
  60 + year = DateTime.now().year;
  61 + WidgetsBinding.instance.addPostFrameCallback((_) {
  62 + _couponNetworkData();
  63 +
  64 + _getMarketingByUid();
  65 + });
  66 + bus.on("refresh_my_customer_home", (arg) {
  67 + _getGuestManageData(isShowLoading: false);
  68 + _getMarketingByUid();
  69 + });
  70 + }
  71 +
  72 + @override
  73 + void dispose() {
  74 + bus.off('refresh_my_customer_home');
  75 + // bus.off("refresh_coupon_list");
  76 + super.dispose();
  77 + }
  78 +
  79 + ///我的客户首页
  80 + _getGuestManageData({bool isShowLoading = true}) async {
  81 + GuestManageSunModel model = await customerProvider
  82 + .getGuestManageData(context, isShowLoading: isShowLoading);
  83 + // setState(() {});
  84 + }
  85 +
  86 + ///消费券
  87 + _couponNetworkData({bool isShowLoading = true}) async {
  88 + // customerMakingProvider.couponSelectIndex = 0;
  89 + Map<String, String> params = {
  90 + "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  91 + };
  92 + await customerProvider.getCustomerSelectActivityNew(context, params,
  93 + isShowLoading: isShowLoading);
  94 + //此人已经新建好券
  95 + // if (customerProvider.couponListSelect.length > 0) {
  96 + // for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
  97 + // if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {
  98 + // aidStr = customerProvider.couponListSelect[i].aname;
  99 + // }
  100 + // }
  101 + // customerProvider.notifyListeners();
  102 + // } else {
  103 + // //没有新建的优惠券
  104 + // }
  105 + _getGuestManageData();
  106 + }
  107 +
  108 + _getMarketingByUid() async {
  109 + Map<String, String> params = {
  110 + "uid": Provider.of<UserModel>(context, listen: false).user.openid
  111 + };
  112 + // await customerProvider.getMarketingByUid(context, params);
  113 +
  114 + MarketingByUidsSunModel myRecordData =
  115 + await customerProvider.getMarketingByUid(context, params);
  116 + if (myRecordData != null && myRecordData.sellerList.length > 0) {
  117 + bool temp = myRecordData.sellerList.any((value) {
  118 + return value.finishedStatus == '0';
  119 + });
  120 + setState(() {
  121 + showWarning = temp;
  122 + });
  123 + }
  124 + // await customerProvider.searchData(customerProvider.controller.text);
  125 + }
  126 +
  127 + Widget _chart() {
  128 + return Container(
  129 + // height: w(216),
  130 + padding: EdgeInsets.only(top: w(16), left: w(16), right: w(16)),
  131 + margin: EdgeInsets.all(w(10)),
  132 + decoration: BoxDecoration(
  133 + color: MyColours.color_ffffff,
  134 + borderRadius: BorderRadius.circular(r(8))),
  135 + child: Column(
  136 + children: [
  137 + Row(
  138 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  139 + children: [
  140 + InkWell(
  141 + onTap: () {
  142 + setState(() {
  143 + year--;
  144 + });
  145 + // _getGuestReserve(showLoading: true);
  146 + },
  147 + child: Padding(
  148 + padding:
  149 + EdgeInsets.only(right: ScreenUtil().setWidth(20)),
  150 + child: Image.asset(
  151 + Utils.getImgPath('c_arrow_left'),
  152 + width: ScreenUtil().setWidth(24),
  153 + ))),
  154 + Text(
  155 + '${year}年',
  156 + style: TextStyle(
  157 + fontSize: ScreenUtil().setSp(32),
  158 + color: MyColours.color_000000),
  159 + ),
  160 + InkWell(
  161 + onTap: () {
  162 + if (year >= DateTime.now().year) {
  163 + return;
  164 + }
  165 + setState(() {
  166 + year++;
  167 + });
  168 + // _getGuestReserve(showLoading: true);
  169 + },
  170 + child: Padding(
  171 + padding: EdgeInsets.only(
  172 + left: ScreenUtil().setWidth(20),
  173 + ),
  174 + child: Image.asset(
  175 + Utils.getImgPath(year != DateTime.now().year
  176 + ? 'c_arrow_right'
  177 + : 'c_arrow_right_gray'),
  178 + width: ScreenUtil().setWidth(24),
  179 + )))
  180 + ],
  181 + ),
  182 + VEmptyView(80),
  183 + Container(
  184 + width: double.infinity,
  185 + height: w(177),
  186 + child: LayoutBuilder(builder: (context, constraints) {
  187 + return BarChartWidget(
  188 + dataList: dataList,
  189 + );
  190 + }))
  191 + ],
  192 + ),
  193 + );
  194 + }
  195 +
  196 + Widget _space({Color color = MyColours.color_515151, num height = 19}) {
  197 + return Row(
  198 + children: [
  199 + HEmptyView(10),
  200 + MyDivider(
  201 + w(1),
  202 + w(height),
  203 + color: color,
  204 + ),
  205 + HEmptyView(10),
  206 + ],
  207 + );
  208 + }
  209 +
  210 + ///活跃客户、沉睡客户、流失客户
  211 + Widget _percentWidget(String pnum, String btnTitle, String percent) {
  212 + return InkWell(
  213 + onTap: () async {
  214 + String index = '0';
  215 + if (btnTitle == '活跃') {
  216 + index = '1';
  217 + } else if (btnTitle == '60天未到店') {
  218 + index = '2';
  219 + } else if (btnTitle == '120天未到店') {
  220 + index = '3';
  221 + }
  222 + NavigatorUtil.goMyCustomerListPage(
  223 + context, FromPage.FromPageMyCustomer,
  224 + index: index);
  225 + },
  226 + child: Container(
  227 + color: MyColours.color_ffffff,
  228 + height: w(90),
  229 + width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
  230 + // height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
  231 + child: Column(
  232 + mainAxisAlignment: MainAxisAlignment.center,
  233 + children: [
  234 + VEmptyView(30),
  235 + Container(
  236 + height: w(24),
  237 + child: Row(
  238 + mainAxisAlignment: MainAxisAlignment.center,
  239 + children: [
  240 + Text(pnum,
  241 + style: TextStyle(
  242 + color: btnTitle == '活跃'
  243 + ? MyColours.color_199095
  244 + : btnTitle == '60天未到店'
  245 + ? MyColours.color_E89243
  246 + : MyColours.color_E34D59,
  247 + fontSize: ScreenUtil().setSp(48),
  248 + fontWeight: FontWeight.bold)),
  249 + Text('位',
  250 + style: TextStyle(
  251 + color: MyColours.color_515151,
  252 + fontSize: ScreenUtil().setSp(28),
  253 + ))
  254 + ],
  255 + )),
  256 + VEmptyView(20),
  257 + RoundButton(
  258 + onPressed: () async {
  259 + String index = '0';
  260 + if (btnTitle == '活跃') {
  261 + index = '1';
  262 + } else if (btnTitle == '60天未到店') {
  263 + index = '2';
  264 + } else if (btnTitle == '120天未到店') {
  265 + index = '3';
  266 + }
  267 + NavigatorUtil.goMyCustomerListPage(
  268 + context, FromPage.FromPageMyCustomer,
  269 + index: index);
  270 + },
  271 + text: btnTitle,
  272 + fontSize: 24,
  273 + isBold: false,
  274 + textColor: MyColours.color_999999,
  275 + gradientStart: MyColours.color_ffffff,
  276 + gradientEnd: MyColours.color_ffffff,
  277 + borderColor: MyColours.color_ffffff,
  278 + height: ScreenUtil().setWidth(48),
  279 + // width: ScreenUtil().setWidth(160),
  280 + radius: ScreenUtil().setWidth(30),
  281 + ),
  282 + // VEmptyView(16),
  283 + // percent == null
  284 + // ? SizedBox()
  285 + // : Text('${percent}%',
  286 + // style: TextStyle(
  287 + // color: MyColours.color_199095,
  288 + // fontSize: ScreenUtil().setSp(24),
  289 + // )),
  290 + ],
  291 + ),
  292 + ));
  293 + }
  294 +
  295 + @override
  296 + Widget build(BuildContext context) {
  297 + customerProvider = Provider.of<CustomerProvider>(context, listen: false);
  298 + return Scaffold(
  299 + backgroundColor: MyColours.color_f3f3f3,
  300 + appBar: SystemAppBar('我的客情', onTap: () {
  301 + EventBus().emit('changeStatusColor');
  302 + Navigator.pop(context);
  303 + }),
  304 + body: WillPopScope(onWillPop: () async {
  305 + EventBus().emit('changeStatusColor');
  306 + return true;
  307 + }, child: Consumer<CustomerProvider>(builder: (context, model, _) {
  308 + if (model.pageStateMyHome != PageState.Success) {
  309 + return ExceptionPage(
  310 + pageState: model.pageStateMyHome,
  311 + callback: () {
  312 + _getGuestManageData();
  313 + },
  314 + emptyMsg: "暂时没有我的客情哦",
  315 + emptyImg: "empty_search",
  316 + showMsg: "加载中,请稍后...",
  317 + );
  318 + } else {
  319 + return Column(children: [
  320 + Expanded(
  321 + child: SingleChildScrollView(
  322 + controller: _controller,
  323 + child: Column(
  324 + children: [
  325 + VEmptyView(10),
  326 + InkWell(
  327 + onTap: () {
  328 + NavigatorUtil.goMyCustomerListPage(
  329 + context, FromPage.FromPageMyCustomer);
  330 + },
  331 + child: Container(
  332 + height: w(80),
  333 + color: MyColours.color_ffffff,
  334 + child: Row(
  335 + mainAxisAlignment: MainAxisAlignment.center,
  336 + children: [
  337 + Text(
  338 + '累计',
  339 + style: TextStyle(
  340 + color: MyColours.color_515151,
  341 + fontWeight: FontWeight.bold,
  342 + fontSize: ScreenUtil().setSp(32)),
  343 + ),
  344 + Text(
  345 + '${customerProvider.guestSunmodel.myCustomer}',
  346 + style: TextStyle(
  347 + color: MyColours.color_199095,
  348 + fontSize: ScreenUtil().setSp(64),
  349 + fontWeight: FontWeight.bold),
  350 + ),
  351 + Text(
  352 + '位客户',
  353 + style: TextStyle(
  354 + color: MyColours.color_515151,
  355 + fontWeight: FontWeight.bold,
  356 + fontSize: ScreenUtil().setSp(32)),
  357 + )
  358 + ],
  359 + ),
  360 + )),
  361 + VEmptyView(10),
  362 + // GridView.builder(
  363 + // controller: _controller,
  364 + // shrinkWrap: true,
  365 + // cacheExtent: ScreenUtil().setWidth(0),
  366 + // itemCount: 3,
  367 + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  368 + // crossAxisCount: 3,
  369 + // childAspectRatio: 1,
  370 + // mainAxisSpacing: ScreenUtil().setWidth(10),
  371 + // crossAxisSpacing: ScreenUtil().setWidth(10)),
  372 + // itemBuilder: (BuildContext context, int index) {
  373 + // // locationState = state;
  374 + // return _percentWidget(
  375 + // '${customerProvider.guestSunmodel.active.count}',
  376 + // '活跃客户',
  377 + // '${customerProvider.guestSunmodel.active.scale}');
  378 + // }),
  379 + Row(
  380 + children: [
  381 + _percentWidget(
  382 + '${customerProvider.guestSunmodel.active.count}',
  383 + '活跃',
  384 + '${customerProvider.guestSunmodel.active.scale}'),
  385 + HEmptyView(10),
  386 + _percentWidget(
  387 + '${customerProvider.guestSunmodel.sleep.count}',
  388 + '60天未到店',
  389 + '${customerProvider.guestSunmodel.sleep.scale}'),
  390 + HEmptyView(10),
  391 + _percentWidget(
  392 + '${customerProvider.guestSunmodel.drain.count}',
  393 + '120天未到店',
  394 + '${customerProvider.guestSunmodel.drain.scale}'),
  395 + ],
  396 + ),
  397 + ListView.builder(
  398 + controller: _controller,
  399 + shrinkWrap: true,
  400 + cacheExtent: ScreenUtil().setWidth(0),
  401 + itemCount: customerProvider.guestSunmodel.tips.task ==
  402 + null ||
  403 + customerProvider
  404 + .guestSunmodel.tips.task.length ==
  405 + 0
  406 + ? 0
  407 + : customerProvider.guestSunmodel.tips.task.length,
  408 + itemBuilder: (BuildContext context, int index) {
  409 + // locationState = state;
  410 + Task data =
  411 + customerProvider.guestSunmodel.tips.task[index];
  412 + return Column(
  413 + children: [
  414 + VEmptyView(10),
  415 + Container(
  416 + color: MyColours.color_ffffff,
  417 + padding: EdgeInsets.symmetric(
  418 + horizontal: ScreenUtil().setWidth(20),
  419 + vertical: ScreenUtil().setWidth(30)),
  420 + child: Row(
  421 + children: [
  422 + Image.asset(
  423 + Utils.getImgPath('warning'),
  424 + width: ScreenUtil().setWidth(42),
  425 + ),
  426 + HEmptyView(15),
  427 + Expanded(
  428 + child: Column(
  429 + crossAxisAlignment:
  430 + CrossAxisAlignment.start,
  431 + children: [
  432 + Text(
  433 + '店内任务:${data.content}',
  434 + maxLines: 1,
  435 + overflow: TextOverflow.ellipsis,
  436 + style: TextStyle(
  437 + color: MyColours.color_333333,
  438 + fontSize: ScreenUtil().setSp(32)),
  439 + ),
  440 + data.aid != null && data.aidStr != null
  441 + ? Padding(
  442 + padding: EdgeInsets.only(
  443 + top: ScreenUtil()
  444 + .setWidth(8)),
  445 + child: Text(
  446 + '优惠内容:${data.aidStr}',
  447 + maxLines: 1,
  448 + overflow:
  449 + TextOverflow.ellipsis,
  450 + style: TextStyle(
  451 + color: MyColours
  452 + .color_333333,
  453 + fontSize: ScreenUtil()
  454 + .setSp(24)),
  455 + ),
  456 + )
  457 + : SizedBox(),
  458 + VEmptyView(8),
  459 + Text(
  460 + '创建人:${data.createUser}',
  461 + maxLines: 1,
  462 + overflow: TextOverflow.ellipsis,
  463 + style: TextStyle(
  464 + color: MyColours.color_333333,
  465 + fontSize: ScreenUtil().setSp(26)),
  466 + )
  467 + ],
  468 + )),
  469 + HEmptyView(20),
  470 + Column(children: [
  471 + RoundButton(
  472 + text: '立即完成',
  473 +
  474 + padding: EdgeInsets.symmetric(
  475 + horizontal:
  476 + ScreenUtil().setWidth(26)),
  477 + gradientStart: MyColours.color_199095,
  478 + gradientEnd: MyColours.color_199095,
  479 + // borderColor: MyColours.color_999999,
  480 + radius: ScreenUtil().setWidth(40),
  481 + height: ScreenUtil().setWidth(64),
  482 + width: ScreenUtil().setWidth(180),
  483 + fontSize: 26,
  484 + isBold: false,
  485 + onPressed: () {
  486 + SellerList sellerList =
  487 + SellerList.fromJson(json
  488 + .decode(json.encode(data)));
  489 + NavigatorUtil
  490 + .goMyMakeMarkingPageOnlyShow(
  491 + context, sellerList);
  492 + },
  493 + ),
  494 + data.remainingTime != null
  495 + ? Padding(
  496 + padding: EdgeInsets.only(
  497 + top:
  498 + ScreenUtil().setWidth(6)),
  499 + child: Text(
  500 + '${data.remainingTime}天内',
  501 + maxLines: 1,
  502 + overflow: TextOverflow.ellipsis,
  503 + style: TextStyle(
  504 + color: Color.fromRGBO(
  505 + 215, 30, 40, 1),
  506 + fontSize:
  507 + ScreenUtil().setSp(26)),
  508 + ))
  509 + : SizedBox()
  510 + ])
  511 + ],
  512 + ),
  513 + ),
  514 + ],
  515 + );
  516 + }),
  517 + ListView.builder(
  518 + controller: _controller,
  519 + shrinkWrap: true,
  520 + cacheExtent: ScreenUtil().setWidth(0),
  521 + itemCount:
  522 + customerProvider.guestSunmodel.tips.recover ==
  523 + null ||
  524 + customerProvider.guestSunmodel.tips.recover
  525 + .length ==
  526 + 0
  527 + ? 0
  528 + : 1,
  529 + itemBuilder: (BuildContext context, int index) {
  530 + // locationState = state;
  531 +
  532 + return Column(
  533 + children: [
  534 + VEmptyView(10),
  535 + Container(
  536 + color: MyColours.color_ffffff,
  537 + padding: EdgeInsets.symmetric(
  538 + horizontal: ScreenUtil().setWidth(20),
  539 + vertical: ScreenUtil().setWidth(30)),
  540 + child: Row(
  541 + children: [
  542 + Image.asset(
  543 + Utils.getImgPath('warning'),
  544 + width: ScreenUtil().setWidth(42),
  545 + ),
  546 + HEmptyView(15),
  547 + Expanded(
  548 + child: Text(
  549 + '${customerProvider.guestSunmodel.tips.recover[0]}',
  550 + maxLines: 10,
  551 + overflow: TextOverflow.ellipsis,
  552 + style: TextStyle(
  553 + color: MyColours.color_333333,
  554 + fontSize: ScreenUtil().setSp(32)),
  555 + )),
  556 + HEmptyView(20),
  557 + RoundButton(
  558 + text: '一键追回',
  559 + padding: EdgeInsets.symmetric(
  560 + horizontal:
  561 + ScreenUtil().setWidth(26)),
  562 + gradientStart: MyColours.color_199095,
  563 + gradientEnd: MyColours.color_199095,
  564 + // borderColor: MyColours.color_999999,
  565 + radius: ScreenUtil().setWidth(40),
  566 + height: ScreenUtil().setWidth(64),
  567 + width: ScreenUtil().setWidth(180),
  568 + fontSize: 26,
  569 + isBold: false,
  570 + onPressed: () {
  571 + NavigatorUtil.goMyMakeMarkingPage(
  572 + context,
  573 + fromPage:
  574 + FromPage.FromPageMyCustomer,
  575 + homeGid: Utils.listToStringEnglish1(
  576 + customerProvider.guestSunmodel
  577 + .tips.recover[1]));
  578 + },
  579 + ),
  580 + ],
  581 + ),
  582 + ),
  583 + ],
  584 + );
  585 + }),
  586 + ListView.builder(
  587 + controller: _controller,
  588 + shrinkWrap: true,
  589 + cacheExtent: ScreenUtil().setWidth(0),
  590 + itemCount: customerProvider.guestSunmodel.tips.awaken ==
  591 + null ||
  592 + customerProvider
  593 + .guestSunmodel.tips.awaken.length ==
  594 + 0
  595 + ? 0
  596 + : 1,
  597 + itemBuilder: (BuildContext context, int index) {
  598 + // locationState = state;
  599 +
  600 + return Column(
  601 + children: [
  602 + VEmptyView(10),
  603 + Container(
  604 + color: MyColours.color_ffffff,
  605 + padding: EdgeInsets.symmetric(
  606 + horizontal: ScreenUtil().setWidth(20),
  607 + vertical: ScreenUtil().setWidth(30)),
  608 + child: Row(
  609 + children: [
  610 + Image.asset(
  611 + Utils.getImgPath('warning'),
  612 + width: ScreenUtil().setWidth(42),
  613 + ),
  614 + HEmptyView(15),
  615 + Expanded(
  616 + child: Text(
  617 + '${customerProvider.guestSunmodel.tips.awaken[0]}',
  618 + maxLines: 10,
  619 + overflow: TextOverflow.ellipsis,
  620 + style: TextStyle(
  621 + color: MyColours.color_333333,
  622 + fontSize: ScreenUtil().setSp(32)),
  623 + )),
  624 + HEmptyView(20),
  625 + RoundButton(
  626 + text: '一键唤醒',
  627 + padding: EdgeInsets.symmetric(
  628 + horizontal:
  629 + ScreenUtil().setWidth(26)),
  630 + gradientStart: MyColours.color_199095,
  631 + gradientEnd: MyColours.color_199095,
  632 + // borderColor: MyColours.color_999999,
  633 + radius: ScreenUtil().setWidth(40),
  634 + height: ScreenUtil().setWidth(64),
  635 + width: ScreenUtil().setWidth(180),
  636 + fontSize: 26,
  637 + isBold: false,
  638 + onPressed: () {
  639 + NavigatorUtil.goMyMakeMarkingPage(
  640 + context,
  641 + fromPage:
  642 + FromPage.FromPageMyCustomer,
  643 + homeGid: Utils.listToStringEnglish1(
  644 + customerProvider.guestSunmodel
  645 + .tips.awaken[1]));
  646 + },
  647 + ),
  648 + ],
  649 + ),
  650 + ),
  651 + ],
  652 + );
  653 + }),
  654 + _chart(),
  655 + ListView.builder(
  656 + itemCount: 10,
  657 + shrinkWrap: true,
  658 + controller: _controller,
  659 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  660 + itemBuilder: (context, index) {
  661 + return Container(
  662 + margin: EdgeInsets.only(bottom: w(10)),
  663 + decoration: BoxDecoration(
  664 + color: MyColours.color_ffffff,
  665 + borderRadius: BorderRadius.circular(r(8))),
  666 + child: Column(
  667 + children: [
  668 + Container(
  669 + height: w(35),
  670 + padding: EdgeInsets.only(
  671 + left: w(15), right: w(30)),
  672 + decoration: BoxDecoration(
  673 + color: MyColours.color_33438E93,
  674 + borderRadius: BorderRadius.only(
  675 + topLeft: Radius.circular(r(8)),
  676 + topRight: Radius.circular(r(8)),
  677 + )),
  678 + child: Row(
  679 + mainAxisAlignment:
  680 + MainAxisAlignment.spaceBetween,
  681 + children: [
  682 + Text(
  683 + '4月',
  684 + style: TextStyle(
  685 + color: MyColours.color_515151,
  686 + fontSize: font(18)),
  687 + ),
  688 + Row(
  689 + mainAxisAlignment:
  690 + MainAxisAlignment.end,
  691 + children: [
  692 + Text(
  693 + '预订1089单',
  694 + style: TextStyle(
  695 + color: MyColours.color_515151,
  696 + fontSize: font(14)),
  697 + ),
  698 + _space(),
  699 + Text(
  700 + '1190桌',
  701 + style: TextStyle(
  702 + color: MyColours.color_515151,
  703 + fontSize: font(14)),
  704 + ),
  705 + ],
  706 + ),
  707 + ],
  708 + ),
  709 + ),
  710 + Container(
  711 + padding: EdgeInsets.only(
  712 + left: w(15), top: w(8), bottom: w(8)),
  713 + child: Row(
  714 + children: [
  715 + Expanded(
  716 + child: Column(
  717 + crossAxisAlignment:
  718 + CrossAxisAlignment.start,
  719 + children: [
  720 + Wrap(
  721 + runSpacing: w(6),
  722 + children: [
  723 + Text(
  724 + '到店 1059单',
  725 + style: TextStyle(
  726 + color: MyColours
  727 + .color_515151,
  728 + fontSize: font(12)),
  729 + ),
  730 + HEmptyView(10),
  731 + MyDivider(
  732 + w(1),
  733 + w(17),
  734 + color: MyColours.color_DBDBDB,
  735 + ),
  736 + HEmptyView(10),
  737 + Text(
  738 + '1160桌',
  739 + style: TextStyle(
  740 + color: MyColours
  741 + .color_515151,
  742 + fontSize: font(12)),
  743 + ),
  744 + HEmptyView(10),
  745 + MyDivider(
  746 + w(1),
  747 + w(17),
  748 + color: MyColours.color_DBDBDB,
  749 + ),
  750 + HEmptyView(10),
  751 + Text(
  752 + '8000人',
  753 + style: TextStyle(
  754 + color: MyColours
  755 + .color_515151,
  756 + fontSize: font(12)),
  757 + ),
  758 + HEmptyView(10),
  759 + MyDivider(
  760 + w(1),
  761 + w(17),
  762 + color: MyColours.color_DBDBDB,
  763 + ),
  764 + HEmptyView(10),
  765 + Text(
  766 + '30取消',
  767 + style: TextStyle(
  768 + color: MyColours
  769 + .color_515151,
  770 + fontSize: font(12)),
  771 + ),
  772 + HEmptyView(10),
  773 + MyDivider(
  774 + w(1),
  775 + w(17),
  776 + color: MyColours.color_DBDBDB,
  777 + ),
  778 + HEmptyView(10),
  779 + Text(
  780 + '到客97.2%',
  781 + style: TextStyle(
  782 + color: MyColours
  783 + .color_515151,
  784 + fontSize: font(12)),
  785 + ),
  786 + ],
  787 + ),
  788 + VEmptyView(12),
  789 + Wrap(
  790 + // crossAxisAlignment: WrapCrossAlignment.start,
  791 + // runAlignment: WrapAlignment.center,
  792 + // alignment: WrapAlignment.center,
  793 + runSpacing: w(6),
  794 + children: [
  795 + Text(
  796 + '有金额订单数 6000',
  797 + style: TextStyle(
  798 + color: MyColours
  799 + .color_999999,
  800 + fontSize: font(
  801 + (10),
  802 + )),
  803 + ),
  804 + HEmptyView(10),
  805 + MyDivider(
  806 + w(1),
  807 + w(12),
  808 + color: MyColours.color_DBDBDB,
  809 + ),
  810 + HEmptyView(10),
  811 + Text(
  812 + '总消费 9585800.00元',
  813 + style: TextStyle(
  814 + color: MyColours
  815 + .color_999999,
  816 + fontSize: font(
  817 + (10),
  818 + )),
  819 + ),
  820 + ],
  821 + ),
  822 + VEmptyView(12),
  823 + Wrap(
  824 + // crossAxisAlignment: WrapCrossAlignment.start,
  825 + // runAlignment: WrapAlignment.center,
  826 + // alignment: WrapAlignment.center,
  827 + runSpacing: w(6),
  828 + children: [
  829 + Text(
  830 + '人均 8885.58元',
  831 + style: TextStyle(
  832 + color: MyColours
  833 + .color_999999,
  834 + fontSize: font(
  835 + (10),
  836 + )),
  837 + ),
  838 + HEmptyView(10),
  839 + MyDivider(
  840 + w(1),
  841 + w(12),
  842 + color: MyColours.color_DBDBDB,
  843 + ),
  844 + HEmptyView(10),
  845 + Text(
  846 + '桌均 95888.58元',
  847 + style: TextStyle(
  848 + color: MyColours
  849 + .color_999999,
  850 + fontSize: font(
  851 + (10),
  852 + )),
  853 + ),
  854 + ],
  855 + ),
  856 + VEmptyView(12),
  857 + Wrap(
  858 + // crossAxisAlignment: WrapCrossAlignment.start,
  859 + // runAlignment: WrapAlignment.center,
  860 + // alignment: WrapAlignment.center,
  861 + runSpacing: w(6),
  862 + children: [
  863 + Text(
  864 + '存酒 8位',
  865 + style: TextStyle(
  866 + color: MyColours
  867 + .color_999999,
  868 + fontSize: font(
  869 + (10),
  870 + )),
  871 + ),
  872 + HEmptyView(10),
  873 + MyDivider(
  874 + w(1),
  875 + w(12),
  876 + color: MyColours.color_DBDBDB,
  877 + ),
  878 + HEmptyView(10),
  879 + Text(
  880 + '提前点餐 9位',
  881 + style: TextStyle(
  882 + color: MyColours
  883 + .color_999999,
  884 + fontSize: font(
  885 + (10),
  886 + )),
  887 + ),
  888 + HEmptyView(10),
  889 + MyDivider(
  890 + w(1),
  891 + w(12),
  892 + color: MyColours.color_DBDBDB,
  893 + ),
  894 + HEmptyView(10),
  895 + Text(
  896 + '安排菜 9位',
  897 + style: TextStyle(
  898 + color: MyColours
  899 + .color_999999,
  900 + fontSize: font(
  901 + (10),
  902 + )),
  903 + ),
  904 + ],
  905 + ),
  906 + ],
  907 + )),
  908 + HEmptyView(12),
  909 + Container(
  910 + width: w(50),
  911 + child: Image.asset(
  912 + Utils.getImgPath('c_arrow_right'),
  913 + width: ScreenUtil().setWidth(24),
  914 + height: ScreenUtil().setWidth(24),
  915 + ))
  916 + ],
  917 + ))
  918 + ],
  919 + ),
  920 + );
  921 + })
  922 + ],
  923 + ),
  924 + )),
  925 + Container(
  926 + color: MyColours.color_FAFAFA,
  927 + padding: EdgeInsets.only(
  928 + top: w(13), bottom: w(26), left: w(45), right: (45)),
  929 + child: Stack(
  930 + children: [
  931 + RoundButton(
  932 + onPressed: () {
  933 + NavigatorUtil.goMyMarketingRecordsPage(
  934 + context, FromPage.FromPageMyCustomer);
  935 + },
  936 + text: '历史营销记录',
  937 + fontSize: 32,
  938 + isBold: true,
  939 + // margin: EdgeInsets.only(
  940 + // top: w(13),
  941 + // bottom: w(26),
  942 + // left: w(45),
  943 + // right: (45)),
  944 + textColor: MyColours.color_F8F9FD,
  945 + gradientStart: MyColours.color_199095,
  946 + gradientEnd: MyColours.color_199095,
  947 + borderColor: MyColours.color_199095,
  948 + height: ScreenUtil().setWidth(86),
  949 + // width: ScreenUtil().setWidth(260),
  950 + radius: ScreenUtil().setWidth(10),
  951 + ),
  952 + showWarning
  953 + ? Positioned(
  954 + right: ScreenUtil().setWidth(30),
  955 + top: ScreenUtil().setWidth(45 / 2),
  956 + child: Image.asset(
  957 + Utils.getImgPath('warning'),
  958 + width: ScreenUtil().setWidth(35),
  959 + ))
  960 + : SizedBox()
  961 + ],
  962 + ))
  963 + ]);
  964 + }
  965 + })));
  966 + }
  967 +}
1 -import 'dart:convert'; 1 +// import 'dart:convert';
2 2
3 -import 'package:flutter/material.dart';  
4 -import 'package:flutter_screenutil/flutter_screenutil.dart';  
5 -import 'package:one_key/constant/state.dart';  
6 -import 'package:one_key/models/guest_manage_model.dart';  
7 -import 'package:one_key/models/marketing_by_uid_model.dart';  
8 -import 'package:one_key/provider/customer_provider.dart';  
9 -import 'package:one_key/provider/user_model.dart';  
10 -import 'package:one_key/res/colors.dart';  
11 -import 'package:one_key/route/navigator_util.dart';  
12 -import 'package:one_key/utils/event_bus.dart';  
13 -import 'package:one_key/utils/utils.dart';  
14 -import 'package:one_key/widgets/h_empty_view.dart';  
15 -import 'package:one_key/widgets/page_exception.dart';  
16 -import 'package:one_key/widgets/round_button.dart';  
17 -import 'package:one_key/widgets/system_app_bar.dart';  
18 -import 'package:one_key/widgets/v_empty_view.dart';  
19 -import 'package:provider/provider.dart'; 3 +// import 'package:flutter/material.dart';
  4 +// import 'package:flutter_screenutil/flutter_screenutil.dart';
  5 +// import 'package:one_key/constant/state.dart';
  6 +// import 'package:one_key/models/guest_manage_model.dart';
  7 +// import 'package:one_key/models/marketing_by_uid_model.dart';
  8 +// import 'package:one_key/provider/customer_provider.dart';
  9 +// import 'package:one_key/provider/user_model.dart';
  10 +// import 'package:one_key/res/colors.dart';
  11 +// import 'package:one_key/route/navigator_util.dart';
  12 +// import 'package:one_key/utils/event_bus.dart';
  13 +// import 'package:one_key/utils/utils.dart';
  14 +// import 'package:one_key/widgets/h_empty_view.dart';
  15 +// import 'package:one_key/widgets/page_exception.dart';
  16 +// import 'package:one_key/widgets/round_button.dart';
  17 +// import 'package:one_key/widgets/system_app_bar.dart';
  18 +// import 'package:one_key/widgets/v_empty_view.dart';
  19 +// import 'package:provider/provider.dart';
20 20
21 -class MyCustomerPage extends StatefulWidget {  
22 - MyCustomerPage({Key key}) : super(key: key); 21 +// class MyCustomerPage extends StatefulWidget {
  22 +// MyCustomerPage({Key key}) : super(key: key);
23 23
24 - @override  
25 - _MyCustomerPageState createState() => _MyCustomerPageState();  
26 -} 24 +// @override
  25 +// _MyCustomerPageState createState() => _MyCustomerPageState();
  26 +// }
27 27
28 -class _MyCustomerPageState extends State<MyCustomerPage> {  
29 - ScrollController _controller = ScrollController();  
30 - CustomerProvider customerProvider;  
31 - bool showWarning = false;  
32 - @override  
33 - void initState() {  
34 - super.initState(); 28 +// class _MyCustomerPageState extends State<MyCustomerPage> {
  29 +// ScrollController _controller = ScrollController();
  30 +// CustomerProvider customerProvider;
  31 +// bool showWarning = false;
  32 +// @override
  33 +// void initState() {
  34 +// super.initState();
35 35
36 - WidgetsBinding.instance.addPostFrameCallback((_) {  
37 - _couponNetworkData(); 36 +// WidgetsBinding.instance.addPostFrameCallback((_) {
  37 +// _couponNetworkData();
38 38
39 - _getMarketingByUid();  
40 - });  
41 - bus.on("refresh_my_customer_home", (arg) {  
42 - _getGuestManageData(isShowLoading: false);  
43 - _getMarketingByUid();  
44 - });  
45 - } 39 +// _getMarketingByUid();
  40 +// });
  41 +// bus.on("refresh_my_customer_home", (arg) {
  42 +// _getGuestManageData(isShowLoading: false);
  43 +// _getMarketingByUid();
  44 +// });
  45 +// }
46 46
47 - @override  
48 - void dispose() {  
49 - bus.off('refresh_my_customer_home');  
50 - // bus.off("refresh_coupon_list");  
51 - super.dispose();  
52 - } 47 +// @override
  48 +// void dispose() {
  49 +// bus.off('refresh_my_customer_home');
  50 +// // bus.off("refresh_coupon_list");
  51 +// super.dispose();
  52 +// }
53 53
54 - ///我的客户首页  
55 - _getGuestManageData({bool isShowLoading = true}) async {  
56 - GuestManageSunModel model = await customerProvider  
57 - .getGuestManageData(context, isShowLoading: isShowLoading);  
58 - // setState(() {});  
59 - } 54 +// ///我的客户首页
  55 +// _getGuestManageData({bool isShowLoading = true}) async {
  56 +// GuestManageSunModel model = await customerProvider
  57 +// .getGuestManageData(context, isShowLoading: isShowLoading);
  58 +// // setState(() {});
  59 +// }
60 60
61 - ///消费券  
62 - _couponNetworkData({bool isShowLoading = true}) async {  
63 - // customerMakingProvider.couponSelectIndex = 0;  
64 - Map<String, String> params = {  
65 - "uid": Provider.of<UserModel>(context, listen: false).user.openid,  
66 - };  
67 - await customerProvider.getCustomerSelectActivityNew(context, params,  
68 - isShowLoading: isShowLoading);  
69 - //此人已经新建好券  
70 - // if (customerProvider.couponListSelect.length > 0) {  
71 - // for (int i = 0; i < customerProvider.couponListSelect.length; i++) {  
72 - // if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {  
73 - // aidStr = customerProvider.couponListSelect[i].aname;  
74 - // }  
75 - // }  
76 - // customerProvider.notifyListeners();  
77 - // } else {  
78 - // //没有新建的优惠券  
79 - // }  
80 - _getGuestManageData();  
81 - } 61 +// ///消费券
  62 +// _couponNetworkData({bool isShowLoading = true}) async {
  63 +// // customerMakingProvider.couponSelectIndex = 0;
  64 +// Map<String, String> params = {
  65 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  66 +// };
  67 +// await customerProvider.getCustomerSelectActivityNew(context, params,
  68 +// isShowLoading: isShowLoading);
  69 +// //此人已经新建好券
  70 +// // if (customerProvider.couponListSelect.length > 0) {
  71 +// // for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
  72 +// // if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {
  73 +// // aidStr = customerProvider.couponListSelect[i].aname;
  74 +// // }
  75 +// // }
  76 +// // customerProvider.notifyListeners();
  77 +// // } else {
  78 +// // //没有新建的优惠券
  79 +// // }
  80 +// _getGuestManageData();
  81 +// }
82 82
83 - _getMarketingByUid() async {  
84 - Map<String, String> params = {  
85 - "uid": Provider.of<UserModel>(context, listen: false).user.openid  
86 - };  
87 - // await customerProvider.getMarketingByUid(context, params); 83 +// _getMarketingByUid() async {
  84 +// Map<String, String> params = {
  85 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid
  86 +// };
  87 +// // await customerProvider.getMarketingByUid(context, params);
88 88
89 - MarketingByUidsSunModel myRecordData =  
90 - await customerProvider.getMarketingByUid(context, params);  
91 - if (myRecordData != null && myRecordData.sellerList.length > 0) {  
92 - bool temp = myRecordData.sellerList.any((value) {  
93 - return value.finishedStatus == '0';  
94 - });  
95 - setState(() {  
96 - showWarning = temp;  
97 - });  
98 - }  
99 - // await customerProvider.searchData(customerProvider.controller.text);  
100 - } 89 +// MarketingByUidsSunModel myRecordData =
  90 +// await customerProvider.getMarketingByUid(context, params);
  91 +// if (myRecordData != null && myRecordData.sellerList.length > 0) {
  92 +// bool temp = myRecordData.sellerList.any((value) {
  93 +// return value.finishedStatus == '0';
  94 +// });
  95 +// setState(() {
  96 +// showWarning = temp;
  97 +// });
  98 +// }
  99 +// // await customerProvider.searchData(customerProvider.controller.text);
  100 +// }
101 101
102 - ///活跃客户、沉睡客户、流失客户  
103 - Widget _percentWidget(String pnum, String btnTitle, String percent) {  
104 - return InkWell(  
105 - onTap: () async {  
106 - String index = '0';  
107 - if (btnTitle == '活跃客户') {  
108 - index = '1';  
109 - } else if (btnTitle == '沉睡客户') {  
110 - index = '2';  
111 - } else if (btnTitle == '流失客户') {  
112 - index = '3';  
113 - }  
114 - NavigatorUtil.goMyCustomerListPage(  
115 - context, FromPage.FromPageMyCustomer,  
116 - index: index);  
117 - },  
118 - child: Container(  
119 - color: MyColours.color_ffffff,  
120 - // height: ScreenUtil().setWidth(230),  
121 - width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,  
122 - height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,  
123 - child: Column(  
124 - mainAxisAlignment: MainAxisAlignment.center,  
125 - children: [  
126 - Row(  
127 - mainAxisAlignment: MainAxisAlignment.center,  
128 - children: [  
129 - Text(pnum,  
130 - style: TextStyle(  
131 - color: MyColours.color_199095,  
132 - fontSize: ScreenUtil().setSp(40),  
133 - fontWeight: FontWeight.bold)),  
134 - Text('位',  
135 - style: TextStyle(  
136 - color: MyColours.color_199095,  
137 - fontSize: ScreenUtil().setSp(24),  
138 - ))  
139 - ],  
140 - ),  
141 - VEmptyView(20),  
142 - RoundButton(  
143 - onPressed: () async {  
144 - String index = '0';  
145 - if (btnTitle == '活跃客户') {  
146 - index = '1';  
147 - } else if (btnTitle == '沉睡客户') {  
148 - index = '2';  
149 - } else if (btnTitle == '流失客户') {  
150 - index = '3';  
151 - }  
152 - NavigatorUtil.goMyCustomerListPage(  
153 - context, FromPage.FromPageMyCustomer,  
154 - index: index);  
155 - },  
156 - text: btnTitle,  
157 - fontSize: 24,  
158 - isBold: false,  
159 - textColor: MyColours.color_333333,  
160 - gradientStart: MyColours.color_ffffff,  
161 - gradientEnd: MyColours.color_ffffff,  
162 - borderColor: Color.fromRGBO(118, 118, 118, 1),  
163 - height: ScreenUtil().setWidth(45),  
164 - width: ScreenUtil().setWidth(160),  
165 - radius: ScreenUtil().setWidth(30),  
166 - ),  
167 - VEmptyView(16),  
168 - percent == null  
169 - ? SizedBox()  
170 - : Text('${percent}%',  
171 - style: TextStyle(  
172 - color: MyColours.color_199095,  
173 - fontSize: ScreenUtil().setSp(24),  
174 - )),  
175 - ],  
176 - ),  
177 - ));  
178 - } 102 +// ///活跃客户、沉睡客户、流失客户
  103 +// Widget _percentWidget(String pnum, String btnTitle, String percent) {
  104 +// return InkWell(
  105 +// onTap: () async {
  106 +// String index = '0';
  107 +// if (btnTitle == '活跃客户') {
  108 +// index = '1';
  109 +// } else if (btnTitle == '沉睡客户') {
  110 +// index = '2';
  111 +// } else if (btnTitle == '流失客户') {
  112 +// index = '3';
  113 +// }
  114 +// NavigatorUtil.goMyCustomerListPage(
  115 +// context, FromPage.FromPageMyCustomer,
  116 +// index: index);
  117 +// },
  118 +// child: Container(
  119 +// color: MyColours.color_ffffff,
  120 +// // height: ScreenUtil().setWidth(230),
  121 +// width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
  122 +// height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
  123 +// child: Column(
  124 +// mainAxisAlignment: MainAxisAlignment.center,
  125 +// children: [
  126 +// Row(
  127 +// mainAxisAlignment: MainAxisAlignment.center,
  128 +// children: [
  129 +// Text(pnum,
  130 +// style: TextStyle(
  131 +// color: MyColours.color_199095,
  132 +// fontSize: ScreenUtil().setSp(40),
  133 +// fontWeight: FontWeight.bold)),
  134 +// Text('位',
  135 +// style: TextStyle(
  136 +// color: MyColours.color_199095,
  137 +// fontSize: ScreenUtil().setSp(24),
  138 +// ))
  139 +// ],
  140 +// ),
  141 +// VEmptyView(20),
  142 +// RoundButton(
  143 +// onPressed: () async {
  144 +// String index = '0';
  145 +// if (btnTitle == '活跃客户') {
  146 +// index = '1';
  147 +// } else if (btnTitle == '沉睡客户') {
  148 +// index = '2';
  149 +// } else if (btnTitle == '流失客户') {
  150 +// index = '3';
  151 +// }
  152 +// NavigatorUtil.goMyCustomerListPage(
  153 +// context, FromPage.FromPageMyCustomer,
  154 +// index: index);
  155 +// },
  156 +// text: btnTitle,
  157 +// fontSize: 24,
  158 +// isBold: false,
  159 +// textColor: MyColours.color_333333,
  160 +// gradientStart: MyColours.color_ffffff,
  161 +// gradientEnd: MyColours.color_ffffff,
  162 +// borderColor: Color.fromRGBO(118, 118, 118, 1),
  163 +// height: ScreenUtil().setWidth(45),
  164 +// width: ScreenUtil().setWidth(160),
  165 +// radius: ScreenUtil().setWidth(30),
  166 +// ),
  167 +// VEmptyView(16),
  168 +// percent == null
  169 +// ? SizedBox()
  170 +// : Text('${percent}%',
  171 +// style: TextStyle(
  172 +// color: MyColours.color_199095,
  173 +// fontSize: ScreenUtil().setSp(24),
  174 +// )),
  175 +// ],
  176 +// ),
  177 +// ));
  178 +// }
179 179
180 - @override  
181 - Widget build(BuildContext context) {  
182 - customerProvider = Provider.of<CustomerProvider>(context, listen: false);  
183 - return Scaffold(  
184 - backgroundColor: Color.fromRGBO(246, 248, 250, 1),  
185 - appBar: SystemAppBar('我的客情', onTap: () {  
186 - EventBus().emit('changeStatusColor');  
187 - Navigator.pop(context);  
188 - }),  
189 - body: WillPopScope(onWillPop: () async {  
190 - EventBus().emit('changeStatusColor');  
191 - return true;  
192 - }, child: Consumer<CustomerProvider>(builder: (context, model, _) {  
193 - if (model.pageStateMyHome != PageState.Success) {  
194 - return ExceptionPage(  
195 - pageState: model.pageStateMyHome,  
196 - callback: () {  
197 - _getGuestManageData();  
198 - },  
199 - emptyMsg: "暂时没有我的客情哦",  
200 - emptyImg: "empty_search",  
201 - showMsg: "加载中,请稍后...",  
202 - );  
203 - } else {  
204 - return Column(children: [  
205 - Expanded(  
206 - child: SingleChildScrollView(  
207 - controller: _controller,  
208 - child: Column(  
209 - children: [  
210 - Container(  
211 - color: MyColours.color_ffffff,  
212 - padding: EdgeInsets.symmetric(  
213 - vertical: ScreenUtil().setWidth(30)),  
214 - child: Column(  
215 - children: [  
216 - Row(  
217 - mainAxisAlignment: MainAxisAlignment.center,  
218 - children: [  
219 - Text(  
220 - '${customerProvider.guestSunmodel.myCustomer}',  
221 - style: TextStyle(  
222 - color: MyColours.color_199095,  
223 - fontSize: ScreenUtil().setSp(60),  
224 - fontWeight: FontWeight.bold),  
225 - ),  
226 - Text(  
227 - '位',  
228 - style: TextStyle(  
229 - color: MyColours.color_199095,  
230 - fontWeight: FontWeight.bold,  
231 - fontSize: ScreenUtil().setSp(30)),  
232 - )  
233 - ],  
234 - ),  
235 - VEmptyView(10),  
236 - RoundButton(  
237 - onPressed: () async {  
238 - NavigatorUtil.goMyCustomerListPage(  
239 - context, FromPage.FromPageMyCustomer);  
240 - },  
241 - text: '我的客户',  
242 - fontSize: 24,  
243 - isBold: false,  
244 - textColor: MyColours.color_333333,  
245 - gradientStart: MyColours.color_ffffff,  
246 - gradientEnd: MyColours.color_ffffff,  
247 - borderColor: Color.fromRGBO(118, 118, 118, 1),  
248 - height: ScreenUtil().setWidth(45),  
249 - width: ScreenUtil().setWidth(160),  
250 - radius: ScreenUtil().setWidth(30),  
251 - )  
252 - ],  
253 - ),  
254 - ),  
255 - VEmptyView(10),  
256 - // GridView.builder(  
257 - // controller: _controller,  
258 - // shrinkWrap: true,  
259 - // cacheExtent: ScreenUtil().setWidth(0),  
260 - // itemCount: 3,  
261 - // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(  
262 - // crossAxisCount: 3,  
263 - // childAspectRatio: 1,  
264 - // mainAxisSpacing: ScreenUtil().setWidth(10),  
265 - // crossAxisSpacing: ScreenUtil().setWidth(10)),  
266 - // itemBuilder: (BuildContext context, int index) {  
267 - // // locationState = state;  
268 - // return _percentWidget(  
269 - // '${customerProvider.guestSunmodel.active.count}',  
270 - // '活跃客户',  
271 - // '${customerProvider.guestSunmodel.active.scale}');  
272 - // }),  
273 - Row(  
274 - children: [  
275 - _percentWidget(  
276 - '${customerProvider.guestSunmodel.active.count}',  
277 - '活跃客户',  
278 - '${customerProvider.guestSunmodel.active.scale}'),  
279 - HEmptyView(10),  
280 - _percentWidget(  
281 - '${customerProvider.guestSunmodel.sleep.count}',  
282 - '沉睡客户',  
283 - '${customerProvider.guestSunmodel.sleep.scale}'),  
284 - HEmptyView(10),  
285 - _percentWidget(  
286 - '${customerProvider.guestSunmodel.drain.count}',  
287 - '流失客户',  
288 - '${customerProvider.guestSunmodel.drain.scale}'),  
289 - ],  
290 - ),  
291 - ListView.builder(  
292 - controller: _controller,  
293 - shrinkWrap: true,  
294 - cacheExtent: ScreenUtil().setWidth(0),  
295 - itemCount: customerProvider.guestSunmodel.tips.task ==  
296 - null ||  
297 - customerProvider  
298 - .guestSunmodel.tips.task.length ==  
299 - 0  
300 - ? 0  
301 - : customerProvider.guestSunmodel.tips.task.length,  
302 - itemBuilder: (BuildContext context, int index) {  
303 - // locationState = state;  
304 - Task data =  
305 - customerProvider.guestSunmodel.tips.task[index];  
306 - return Column(  
307 - children: [  
308 - VEmptyView(10),  
309 - Container(  
310 - color: MyColours.color_ffffff,  
311 - padding: EdgeInsets.symmetric(  
312 - horizontal: ScreenUtil().setWidth(20),  
313 - vertical: ScreenUtil().setWidth(30)),  
314 - child: Row(  
315 - children: [  
316 - Image.asset(  
317 - Utils.getImgPath('warning'),  
318 - width: ScreenUtil().setWidth(42),  
319 - ),  
320 - HEmptyView(15),  
321 - Expanded(  
322 - child: Column(  
323 - crossAxisAlignment:  
324 - CrossAxisAlignment.start,  
325 - children: [  
326 - Text(  
327 - '店内任务:${data.content}',  
328 - maxLines: 1,  
329 - overflow: TextOverflow.ellipsis,  
330 - style: TextStyle(  
331 - color: MyColours.color_333333,  
332 - fontSize: ScreenUtil().setSp(32)),  
333 - ),  
334 - data.aid != null && data.aidStr != null  
335 - ? Padding(  
336 - padding: EdgeInsets.only(  
337 - top: ScreenUtil()  
338 - .setWidth(8)),  
339 - child: Text(  
340 - '优惠内容:${data.aidStr}',  
341 - maxLines: 1,  
342 - overflow:  
343 - TextOverflow.ellipsis,  
344 - style: TextStyle(  
345 - color: MyColours  
346 - .color_333333,  
347 - fontSize: ScreenUtil()  
348 - .setSp(24)),  
349 - ),  
350 - )  
351 - : SizedBox(),  
352 - VEmptyView(8),  
353 - Text(  
354 - '创建人:${data.createUser}',  
355 - maxLines: 1,  
356 - overflow: TextOverflow.ellipsis,  
357 - style: TextStyle(  
358 - color: MyColours.color_333333,  
359 - fontSize: ScreenUtil().setSp(26)),  
360 - )  
361 - ],  
362 - )),  
363 - HEmptyView(20),  
364 - Column(children: [  
365 - RoundButton(  
366 - text: '立即完成', 180 +// @override
  181 +// Widget build(BuildContext context) {
  182 +// customerProvider = Provider.of<CustomerProvider>(context, listen: false);
  183 +// return Scaffold(
  184 +// backgroundColor: Color.fromRGBO(246, 248, 250, 1),
  185 +// appBar: SystemAppBar('我的客情', onTap: () {
  186 +// EventBus().emit('changeStatusColor');
  187 +// Navigator.pop(context);
  188 +// }),
  189 +// body: WillPopScope(onWillPop: () async {
  190 +// EventBus().emit('changeStatusColor');
  191 +// return true;
  192 +// }, child: Consumer<CustomerProvider>(builder: (context, model, _) {
  193 +// if (model.pageStateMyHome != PageState.Success) {
  194 +// return ExceptionPage(
  195 +// pageState: model.pageStateMyHome,
  196 +// callback: () {
  197 +// _getGuestManageData();
  198 +// },
  199 +// emptyMsg: "暂时没有我的客情哦",
  200 +// emptyImg: "empty_search",
  201 +// showMsg: "加载中,请稍后...",
  202 +// );
  203 +// } else {
  204 +// return Column(children: [
  205 +// Expanded(
  206 +// child: SingleChildScrollView(
  207 +// controller: _controller,
  208 +// child: Column(
  209 +// children: [
  210 +// Container(
  211 +// color: MyColours.color_ffffff,
  212 +// padding: EdgeInsets.symmetric(
  213 +// vertical: ScreenUtil().setWidth(30)),
  214 +// child: Column(
  215 +// children: [
  216 +// Row(
  217 +// mainAxisAlignment: MainAxisAlignment.center,
  218 +// children: [
  219 +// Text(
  220 +// '${customerProvider.guestSunmodel.myCustomer}',
  221 +// style: TextStyle(
  222 +// color: MyColours.color_199095,
  223 +// fontSize: ScreenUtil().setSp(60),
  224 +// fontWeight: FontWeight.bold),
  225 +// ),
  226 +// Text(
  227 +// '位',
  228 +// style: TextStyle(
  229 +// color: MyColours.color_199095,
  230 +// fontWeight: FontWeight.bold,
  231 +// fontSize: ScreenUtil().setSp(30)),
  232 +// )
  233 +// ],
  234 +// ),
  235 +// VEmptyView(10),
  236 +// RoundButton(
  237 +// onPressed: () async {
  238 +// NavigatorUtil.goMyCustomerListPage(
  239 +// context, FromPage.FromPageMyCustomer);
  240 +// },
  241 +// text: '我的客户',
  242 +// fontSize: 24,
  243 +// isBold: false,
  244 +// textColor: MyColours.color_333333,
  245 +// gradientStart: MyColours.color_ffffff,
  246 +// gradientEnd: MyColours.color_ffffff,
  247 +// borderColor: Color.fromRGBO(118, 118, 118, 1),
  248 +// height: ScreenUtil().setWidth(45),
  249 +// width: ScreenUtil().setWidth(160),
  250 +// radius: ScreenUtil().setWidth(30),
  251 +// )
  252 +// ],
  253 +// ),
  254 +// ),
  255 +// VEmptyView(10),
  256 +// // GridView.builder(
  257 +// // controller: _controller,
  258 +// // shrinkWrap: true,
  259 +// // cacheExtent: ScreenUtil().setWidth(0),
  260 +// // itemCount: 3,
  261 +// // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  262 +// // crossAxisCount: 3,
  263 +// // childAspectRatio: 1,
  264 +// // mainAxisSpacing: ScreenUtil().setWidth(10),
  265 +// // crossAxisSpacing: ScreenUtil().setWidth(10)),
  266 +// // itemBuilder: (BuildContext context, int index) {
  267 +// // // locationState = state;
  268 +// // return _percentWidget(
  269 +// // '${customerProvider.guestSunmodel.active.count}',
  270 +// // '活跃客户',
  271 +// // '${customerProvider.guestSunmodel.active.scale}');
  272 +// // }),
  273 +// Row(
  274 +// children: [
  275 +// _percentWidget(
  276 +// '${customerProvider.guestSunmodel.active.count}',
  277 +// '活跃客户',
  278 +// '${customerProvider.guestSunmodel.active.scale}'),
  279 +// HEmptyView(10),
  280 +// _percentWidget(
  281 +// '${customerProvider.guestSunmodel.sleep.count}',
  282 +// '沉睡客户',
  283 +// '${customerProvider.guestSunmodel.sleep.scale}'),
  284 +// HEmptyView(10),
  285 +// _percentWidget(
  286 +// '${customerProvider.guestSunmodel.drain.count}',
  287 +// '流失客户',
  288 +// '${customerProvider.guestSunmodel.drain.scale}'),
  289 +// ],
  290 +// ),
  291 +// ListView.builder(
  292 +// controller: _controller,
  293 +// shrinkWrap: true,
  294 +// cacheExtent: ScreenUtil().setWidth(0),
  295 +// itemCount: customerProvider.guestSunmodel.tips.task ==
  296 +// null ||
  297 +// customerProvider
  298 +// .guestSunmodel.tips.task.length ==
  299 +// 0
  300 +// ? 0
  301 +// : customerProvider.guestSunmodel.tips.task.length,
  302 +// itemBuilder: (BuildContext context, int index) {
  303 +// // locationState = state;
  304 +// Task data =
  305 +// customerProvider.guestSunmodel.tips.task[index];
  306 +// return Column(
  307 +// children: [
  308 +// VEmptyView(10),
  309 +// Container(
  310 +// color: MyColours.color_ffffff,
  311 +// padding: EdgeInsets.symmetric(
  312 +// horizontal: ScreenUtil().setWidth(20),
  313 +// vertical: ScreenUtil().setWidth(30)),
  314 +// child: Row(
  315 +// children: [
  316 +// Image.asset(
  317 +// Utils.getImgPath('warning'),
  318 +// width: ScreenUtil().setWidth(42),
  319 +// ),
  320 +// HEmptyView(15),
  321 +// Expanded(
  322 +// child: Column(
  323 +// crossAxisAlignment:
  324 +// CrossAxisAlignment.start,
  325 +// children: [
  326 +// Text(
  327 +// '店内任务:${data.content}',
  328 +// maxLines: 1,
  329 +// overflow: TextOverflow.ellipsis,
  330 +// style: TextStyle(
  331 +// color: MyColours.color_333333,
  332 +// fontSize: ScreenUtil().setSp(32)),
  333 +// ),
  334 +// data.aid != null && data.aidStr != null
  335 +// ? Padding(
  336 +// padding: EdgeInsets.only(
  337 +// top: ScreenUtil()
  338 +// .setWidth(8)),
  339 +// child: Text(
  340 +// '优惠内容:${data.aidStr}',
  341 +// maxLines: 1,
  342 +// overflow:
  343 +// TextOverflow.ellipsis,
  344 +// style: TextStyle(
  345 +// color: MyColours
  346 +// .color_333333,
  347 +// fontSize: ScreenUtil()
  348 +// .setSp(24)),
  349 +// ),
  350 +// )
  351 +// : SizedBox(),
  352 +// VEmptyView(8),
  353 +// Text(
  354 +// '创建人:${data.createUser}',
  355 +// maxLines: 1,
  356 +// overflow: TextOverflow.ellipsis,
  357 +// style: TextStyle(
  358 +// color: MyColours.color_333333,
  359 +// fontSize: ScreenUtil().setSp(26)),
  360 +// )
  361 +// ],
  362 +// )),
  363 +// HEmptyView(20),
  364 +// Column(children: [
  365 +// RoundButton(
  366 +// text: '立即完成',
367 367
368 - padding: EdgeInsets.symmetric(  
369 - horizontal:  
370 - ScreenUtil().setWidth(26)),  
371 - gradientStart: MyColours.color_199095,  
372 - gradientEnd: MyColours.color_199095,  
373 - // borderColor: MyColours.color_999999,  
374 - radius: ScreenUtil().setWidth(40),  
375 - height: ScreenUtil().setWidth(64),  
376 - width: ScreenUtil().setWidth(180),  
377 - fontSize: 26,  
378 - isBold: false,  
379 - onPressed: () {  
380 - SellerList sellerList =  
381 - SellerList.fromJson(json  
382 - .decode(json.encode(data)));  
383 - NavigatorUtil  
384 - .goMyMakeMarkingPageOnlyShow(  
385 - context, sellerList);  
386 - },  
387 - ),  
388 - data.remainingTime != null  
389 - ? Padding(  
390 - padding: EdgeInsets.only(  
391 - top:  
392 - ScreenUtil().setWidth(6)),  
393 - child: Text(  
394 - '${data.remainingTime}天内',  
395 - maxLines: 1,  
396 - overflow: TextOverflow.ellipsis,  
397 - style: TextStyle(  
398 - color: Color.fromRGBO(  
399 - 215, 30, 40, 1),  
400 - fontSize:  
401 - ScreenUtil().setSp(26)),  
402 - ))  
403 - : SizedBox()  
404 - ])  
405 - ],  
406 - ),  
407 - ),  
408 - ],  
409 - );  
410 - }),  
411 - ListView.builder(  
412 - controller: _controller,  
413 - shrinkWrap: true,  
414 - cacheExtent: ScreenUtil().setWidth(0),  
415 - itemCount:  
416 - customerProvider.guestSunmodel.tips.recover ==  
417 - null ||  
418 - customerProvider.guestSunmodel.tips.recover  
419 - .length ==  
420 - 0  
421 - ? 0  
422 - : 1,  
423 - itemBuilder: (BuildContext context, int index) {  
424 - // locationState = state; 368 +// padding: EdgeInsets.symmetric(
  369 +// horizontal:
  370 +// ScreenUtil().setWidth(26)),
  371 +// gradientStart: MyColours.color_199095,
  372 +// gradientEnd: MyColours.color_199095,
  373 +// // borderColor: MyColours.color_999999,
  374 +// radius: ScreenUtil().setWidth(40),
  375 +// height: ScreenUtil().setWidth(64),
  376 +// width: ScreenUtil().setWidth(180),
  377 +// fontSize: 26,
  378 +// isBold: false,
  379 +// onPressed: () {
  380 +// SellerList sellerList =
  381 +// SellerList.fromJson(json
  382 +// .decode(json.encode(data)));
  383 +// NavigatorUtil
  384 +// .goMyMakeMarkingPageOnlyShow(
  385 +// context, sellerList);
  386 +// },
  387 +// ),
  388 +// data.remainingTime != null
  389 +// ? Padding(
  390 +// padding: EdgeInsets.only(
  391 +// top:
  392 +// ScreenUtil().setWidth(6)),
  393 +// child: Text(
  394 +// '${data.remainingTime}天内',
  395 +// maxLines: 1,
  396 +// overflow: TextOverflow.ellipsis,
  397 +// style: TextStyle(
  398 +// color: Color.fromRGBO(
  399 +// 215, 30, 40, 1),
  400 +// fontSize:
  401 +// ScreenUtil().setSp(26)),
  402 +// ))
  403 +// : SizedBox()
  404 +// ])
  405 +// ],
  406 +// ),
  407 +// ),
  408 +// ],
  409 +// );
  410 +// }),
  411 +// ListView.builder(
  412 +// controller: _controller,
  413 +// shrinkWrap: true,
  414 +// cacheExtent: ScreenUtil().setWidth(0),
  415 +// itemCount:
  416 +// customerProvider.guestSunmodel.tips.recover ==
  417 +// null ||
  418 +// customerProvider.guestSunmodel.tips.recover
  419 +// .length ==
  420 +// 0
  421 +// ? 0
  422 +// : 1,
  423 +// itemBuilder: (BuildContext context, int index) {
  424 +// // locationState = state;
425 425
426 - return Column(  
427 - children: [  
428 - VEmptyView(10),  
429 - Container(  
430 - color: MyColours.color_ffffff,  
431 - padding: EdgeInsets.symmetric(  
432 - horizontal: ScreenUtil().setWidth(20),  
433 - vertical: ScreenUtil().setWidth(30)),  
434 - child: Row(  
435 - children: [  
436 - Image.asset(  
437 - Utils.getImgPath('warning'),  
438 - width: ScreenUtil().setWidth(42),  
439 - ),  
440 - HEmptyView(15),  
441 - Expanded(  
442 - child: Text(  
443 - '${customerProvider.guestSunmodel.tips.recover[0]}',  
444 - maxLines: 10,  
445 - overflow: TextOverflow.ellipsis,  
446 - style: TextStyle(  
447 - color: MyColours.color_333333,  
448 - fontSize: ScreenUtil().setSp(32)),  
449 - )),  
450 - HEmptyView(20),  
451 - RoundButton(  
452 - text: '一键追回',  
453 - padding: EdgeInsets.symmetric(  
454 - horizontal:  
455 - ScreenUtil().setWidth(26)),  
456 - gradientStart: MyColours.color_199095,  
457 - gradientEnd: MyColours.color_199095,  
458 - // borderColor: MyColours.color_999999,  
459 - radius: ScreenUtil().setWidth(40),  
460 - height: ScreenUtil().setWidth(64),  
461 - width: ScreenUtil().setWidth(180),  
462 - fontSize: 26,  
463 - isBold: false,  
464 - onPressed: () {  
465 - NavigatorUtil.goMyMakeMarkingPage(  
466 - context,  
467 - fromPage:  
468 - FromPage.FromPageMyCustomer,  
469 - homeGid: Utils.listToStringEnglish1(  
470 - customerProvider.guestSunmodel  
471 - .tips.recover[1]));  
472 - },  
473 - ),  
474 - ],  
475 - ),  
476 - ),  
477 - ],  
478 - );  
479 - }),  
480 - ListView.builder(  
481 - controller: _controller,  
482 - shrinkWrap: true,  
483 - cacheExtent: ScreenUtil().setWidth(0),  
484 - itemCount: customerProvider.guestSunmodel.tips.awaken ==  
485 - null ||  
486 - customerProvider  
487 - .guestSunmodel.tips.awaken.length ==  
488 - 0  
489 - ? 0  
490 - : 1,  
491 - itemBuilder: (BuildContext context, int index) {  
492 - // locationState = state; 426 +// return Column(
  427 +// children: [
  428 +// VEmptyView(10),
  429 +// Container(
  430 +// color: MyColours.color_ffffff,
  431 +// padding: EdgeInsets.symmetric(
  432 +// horizontal: ScreenUtil().setWidth(20),
  433 +// vertical: ScreenUtil().setWidth(30)),
  434 +// child: Row(
  435 +// children: [
  436 +// Image.asset(
  437 +// Utils.getImgPath('warning'),
  438 +// width: ScreenUtil().setWidth(42),
  439 +// ),
  440 +// HEmptyView(15),
  441 +// Expanded(
  442 +// child: Text(
  443 +// '${customerProvider.guestSunmodel.tips.recover[0]}',
  444 +// maxLines: 10,
  445 +// overflow: TextOverflow.ellipsis,
  446 +// style: TextStyle(
  447 +// color: MyColours.color_333333,
  448 +// fontSize: ScreenUtil().setSp(32)),
  449 +// )),
  450 +// HEmptyView(20),
  451 +// RoundButton(
  452 +// text: '一键追回',
  453 +// padding: EdgeInsets.symmetric(
  454 +// horizontal:
  455 +// ScreenUtil().setWidth(26)),
  456 +// gradientStart: MyColours.color_199095,
  457 +// gradientEnd: MyColours.color_199095,
  458 +// // borderColor: MyColours.color_999999,
  459 +// radius: ScreenUtil().setWidth(40),
  460 +// height: ScreenUtil().setWidth(64),
  461 +// width: ScreenUtil().setWidth(180),
  462 +// fontSize: 26,
  463 +// isBold: false,
  464 +// onPressed: () {
  465 +// NavigatorUtil.goMyMakeMarkingPage(
  466 +// context,
  467 +// fromPage:
  468 +// FromPage.FromPageMyCustomer,
  469 +// homeGid: Utils.listToStringEnglish1(
  470 +// customerProvider.guestSunmodel
  471 +// .tips.recover[1]));
  472 +// },
  473 +// ),
  474 +// ],
  475 +// ),
  476 +// ),
  477 +// ],
  478 +// );
  479 +// }),
  480 +// ListView.builder(
  481 +// controller: _controller,
  482 +// shrinkWrap: true,
  483 +// cacheExtent: ScreenUtil().setWidth(0),
  484 +// itemCount: customerProvider.guestSunmodel.tips.awaken ==
  485 +// null ||
  486 +// customerProvider
  487 +// .guestSunmodel.tips.awaken.length ==
  488 +// 0
  489 +// ? 0
  490 +// : 1,
  491 +// itemBuilder: (BuildContext context, int index) {
  492 +// // locationState = state;
493 493
494 - return Column(  
495 - children: [  
496 - VEmptyView(10),  
497 - Container(  
498 - color: MyColours.color_ffffff,  
499 - padding: EdgeInsets.symmetric(  
500 - horizontal: ScreenUtil().setWidth(20),  
501 - vertical: ScreenUtil().setWidth(30)),  
502 - child: Row(  
503 - children: [  
504 - Image.asset(  
505 - Utils.getImgPath('warning'),  
506 - width: ScreenUtil().setWidth(42),  
507 - ),  
508 - HEmptyView(15),  
509 - Expanded(  
510 - child: Text(  
511 - '${customerProvider.guestSunmodel.tips.awaken[0]}',  
512 - maxLines: 10,  
513 - overflow: TextOverflow.ellipsis,  
514 - style: TextStyle(  
515 - color: MyColours.color_333333,  
516 - fontSize: ScreenUtil().setSp(32)),  
517 - )),  
518 - HEmptyView(20),  
519 - RoundButton(  
520 - text: '一键唤醒',  
521 - padding: EdgeInsets.symmetric(  
522 - horizontal:  
523 - ScreenUtil().setWidth(26)),  
524 - gradientStart: MyColours.color_199095,  
525 - gradientEnd: MyColours.color_199095,  
526 - // borderColor: MyColours.color_999999,  
527 - radius: ScreenUtil().setWidth(40),  
528 - height: ScreenUtil().setWidth(64),  
529 - width: ScreenUtil().setWidth(180),  
530 - fontSize: 26,  
531 - isBold: false,  
532 - onPressed: () {  
533 - NavigatorUtil.goMyMakeMarkingPage(  
534 - context,  
535 - fromPage:  
536 - FromPage.FromPageMyCustomer,  
537 - homeGid: Utils.listToStringEnglish1(  
538 - customerProvider.guestSunmodel  
539 - .tips.awaken[1]));  
540 - },  
541 - ),  
542 - ],  
543 - ),  
544 - ),  
545 - ],  
546 - );  
547 - })  
548 - ],  
549 - ),  
550 - )),  
551 - Padding(  
552 - padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)),  
553 - child: Stack(  
554 - children: [  
555 - RoundButton(  
556 - onPressed: () {  
557 - NavigatorUtil.goMyMarketingRecordsPage(  
558 - context, FromPage.FromPageMyCustomer);  
559 - },  
560 - text: '营销记录',  
561 - fontSize: 24,  
562 - isBold: false,  
563 - textColor: MyColours.color_199095,  
564 - gradientStart: MyColours.color_ffffff,  
565 - gradientEnd: MyColours.color_ffffff,  
566 - borderColor: MyColours.color_199095,  
567 - height: ScreenUtil().setWidth(75),  
568 - width: ScreenUtil().setWidth(260),  
569 - radius: ScreenUtil().setWidth(10),  
570 - ),  
571 - showWarning  
572 - ? Positioned(  
573 - right: ScreenUtil().setWidth(30),  
574 - top: ScreenUtil().setWidth(40 / 2),  
575 - child: Image.asset(  
576 - Utils.getImgPath('warning'),  
577 - width: ScreenUtil().setWidth(35),  
578 - ))  
579 - : SizedBox()  
580 - ],  
581 - ))  
582 - ]);  
583 - }  
584 - })));  
585 - }  
586 -} 494 +// return Column(
  495 +// children: [
  496 +// VEmptyView(10),
  497 +// Container(
  498 +// color: MyColours.color_ffffff,
  499 +// padding: EdgeInsets.symmetric(
  500 +// horizontal: ScreenUtil().setWidth(20),
  501 +// vertical: ScreenUtil().setWidth(30)),
  502 +// child: Row(
  503 +// children: [
  504 +// Image.asset(
  505 +// Utils.getImgPath('warning'),
  506 +// width: ScreenUtil().setWidth(42),
  507 +// ),
  508 +// HEmptyView(15),
  509 +// Expanded(
  510 +// child: Text(
  511 +// '${customerProvider.guestSunmodel.tips.awaken[0]}',
  512 +// maxLines: 10,
  513 +// overflow: TextOverflow.ellipsis,
  514 +// style: TextStyle(
  515 +// color: MyColours.color_333333,
  516 +// fontSize: ScreenUtil().setSp(32)),
  517 +// )),
  518 +// HEmptyView(20),
  519 +// RoundButton(
  520 +// text: '一键唤醒',
  521 +// padding: EdgeInsets.symmetric(
  522 +// horizontal:
  523 +// ScreenUtil().setWidth(26)),
  524 +// gradientStart: MyColours.color_199095,
  525 +// gradientEnd: MyColours.color_199095,
  526 +// // borderColor: MyColours.color_999999,
  527 +// radius: ScreenUtil().setWidth(40),
  528 +// height: ScreenUtil().setWidth(64),
  529 +// width: ScreenUtil().setWidth(180),
  530 +// fontSize: 26,
  531 +// isBold: false,
  532 +// onPressed: () {
  533 +// NavigatorUtil.goMyMakeMarkingPage(
  534 +// context,
  535 +// fromPage:
  536 +// FromPage.FromPageMyCustomer,
  537 +// homeGid: Utils.listToStringEnglish1(
  538 +// customerProvider.guestSunmodel
  539 +// .tips.awaken[1]));
  540 +// },
  541 +// ),
  542 +// ],
  543 +// ),
  544 +// ),
  545 +// ],
  546 +// );
  547 +// })
  548 +// ],
  549 +// ),
  550 +// )),
  551 +// Padding(
  552 +// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)),
  553 +// child: Stack(
  554 +// children: [
  555 +// RoundButton(
  556 +// onPressed: () {
  557 +// NavigatorUtil.goMyMarketingRecordsPage(
  558 +// context, FromPage.FromPageMyCustomer);
  559 +// },
  560 +// text: '营销记录',
  561 +// fontSize: 24,
  562 +// isBold: false,
  563 +// textColor: MyColours.color_199095,
  564 +// gradientStart: MyColours.color_ffffff,
  565 +// gradientEnd: MyColours.color_ffffff,
  566 +// borderColor: MyColours.color_199095,
  567 +// height: ScreenUtil().setWidth(75),
  568 +// width: ScreenUtil().setWidth(260),
  569 +// radius: ScreenUtil().setWidth(10),
  570 +// ),
  571 +// showWarning
  572 +// ? Positioned(
  573 +// right: ScreenUtil().setWidth(30),
  574 +// top: ScreenUtil().setWidth(40 / 2),
  575 +// child: Image.asset(
  576 +// Utils.getImgPath('warning'),
  577 +// width: ScreenUtil().setWidth(35),
  578 +// ))
  579 +// : SizedBox()
  580 +// ],
  581 +// ))
  582 +// ]);
  583 +// }
  584 +// })));
  585 +// }
  586 +// }
@@ -20,7 +20,9 @@ import 'package:one_key/widgets/v_empty_view.dart'; @@ -20,7 +20,9 @@ import 'package:one_key/widgets/v_empty_view.dart';
20 import 'package:provider/provider.dart'; 20 import 'package:provider/provider.dart';
21 21
22 import '../../../../utils/screen_util.dart'; 22 import '../../../../utils/screen_util.dart';
23 - 23 +/***
  24 + * 全店客情首页
  25 + */
24 class StoreCustomerHomePage extends StatefulWidget { 26 class StoreCustomerHomePage extends StatefulWidget {
25 StoreCustomerHomePage({Key key}) : super(key: key); 27 StoreCustomerHomePage({Key key}) : super(key: key);
26 28
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 2
3 class MyColours { 3 class MyColours {
  4 + static const Color color_33438E93 = Color(0x33438E93);
4 static const Color color_E89243 = Color(0xFFE89243); 5 static const Color color_E89243 = Color(0xFFE89243);
5 static const Color color_3E6F51 = Color(0xFF3E6F51); 6 static const Color color_3E6F51 = Color(0xFF3E6F51);
6 static const Color color_877952 = Color(0xFF877952); 7 static const Color color_877952 = Color(0xFF877952);
@@ -180,6 +180,7 @@ import '../pages/feast/feast_set_page.dart'; @@ -180,6 +180,7 @@ import '../pages/feast/feast_set_page.dart';
180 import '../pages/feast/feast_setmeal_page.dart'; 180 import '../pages/feast/feast_setmeal_page.dart';
181 import '../pages/feast/feast_wine_page.dart'; 181 import '../pages/feast/feast_wine_page.dart';
182 import '../pages/message/message_recharge_info_page.dart'; 182 import '../pages/message/message_recharge_info_page.dart';
  183 +import '../pages/my/customer_type/my_customer/my_customer_home_page.dart';
183 import '../pages/my/customer_type/store_customer/store_customer_home_page.dart'; 184 import '../pages/my/customer_type/store_customer/store_customer_home_page.dart';
184 import '../pages/my/feast_manage/feast_deposit_type_page.dart'; 185 import '../pages/my/feast_manage/feast_deposit_type_page.dart';
185 import '../pages/my/feast_manage/feast_dish_page.dart'; 186 import '../pages/my/feast_manage/feast_dish_page.dart';
@@ -1050,7 +1051,7 @@ var myCustomerPageHandle = new Handler( @@ -1050,7 +1051,7 @@ var myCustomerPageHandle = new Handler(
1050 handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { 1051 handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
1051 // String idstr = params["idstr"].first; 1052 // String idstr = params["idstr"].first;
1052 return ChangeNotifierProvider<CustomerProvider>( 1053 return ChangeNotifierProvider<CustomerProvider>(
1053 - create: (_) => CustomerProvider(), child: MyCustomerPage()); 1054 + create: (_) => CustomerProvider(), child: MyCustomerHomePage());
1054 }); 1055 });
1055 1056
1056 ///客情列表 1057 ///客情列表