Commit 3092868fd847dd81cebc2b0fac7e8a3fcf650b9d

Authored by weixin_45529955
1 parent 53563bd3

部分UI

@@ -199,6 +199,11 @@ class Constant { @@ -199,6 +199,11 @@ class Constant {
199 '管理员', 199 '管理员',
200 '店长', 200 '店长',
201 ], 201 ],
  202 +
  203 + '生成二维码': [
  204 + '管理员',
  205 + '店长',
  206 + ],
202 '删除排菜': [ 207 '删除排菜': [
203 '管理员', 208 '管理员',
204 '店长', 209 '店长',
@@ -57,7 +57,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> { @@ -57,7 +57,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
57 return Scaffold( 57 return Scaffold(
58 backgroundColor: Colors.white, 58 backgroundColor: Colors.white,
59 appBar: SystemAppBar( 59 appBar: SystemAppBar(
60 - '菜单管理', 60 + '客户管理',
61 ), 61 ),
62 body: Column( 62 body: Column(
63 children: [ 63 children: [
@@ -75,12 +75,12 @@ class _CustomerHomePageState extends State<CustomerHomePage> { @@ -75,12 +75,12 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
75 75
76 if (widget.sellerPreserve || 76 if (widget.sellerPreserve ||
77 widget.sellerMarketing) { 77 widget.sellerMarketing) {
78 - NavigatorUtil.goStoreCustomerPage(context); 78 + NavigatorUtil.goCustomerStatisticsPage(context);
79 } else { 79 } else {
80 NavigatorUtil.goCustomerListPageSim(context); 80 NavigatorUtil.goCustomerListPageSim(context);
81 } 81 }
82 } else { 82 } else {
83 - NavigatorUtil.goStoreCustomerPage(context); 83 + NavigatorUtil.goCustomerStatisticsPage(context);
84 } 84 }
85 } 85 }
86 } else { 86 } else {
@@ -132,7 +132,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> { @@ -132,7 +132,7 @@ class _CustomerHomePageState extends State<CustomerHomePage> {
132 VEmptyView(24), 132 VEmptyView(24),
133 InkWell( 133 InkWell(
134 onTap: () { 134 onTap: () {
135 - if (userModel.user?.role_name == '管理员' || 135 + if (userModel.user?.role_name == '管理员' ||
136 userModel.user?.role_name == '店长') { 136 userModel.user?.role_name == '店长') {
137 if (Utils.getAuthority(context, '全店客情')) { 137 if (Utils.getAuthority(context, '全店客情')) {
138 if (widget.sellerNormalSpecial) { 138 if (widget.sellerNormalSpecial) {
  1 +import 'package:flutter/cupertino.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  4 +import 'package:one_key/constant/state.dart';
  5 +import 'package:one_key/provider/customer_provider.dart';
  6 +import 'package:one_key/res/colors.dart';
  7 +import 'package:one_key/route/navigator_util.dart';
  8 +import 'package:one_key/utils/dialog_util.dart';
  9 +import 'package:one_key/utils/screen_util.dart';
  10 +import 'package:one_key/widgets/h_empty_view.dart';
  11 +import 'package:one_key/widgets/page_exception.dart';
  12 +import 'package:one_key/widgets/round_button.dart';
  13 +import 'package:one_key/widgets/system_app_bar.dart';
  14 +import 'package:one_key/widgets/v_empty_view.dart';
  15 +import 'package:provider/provider.dart';
  16 +
  17 +import '../../../provider/collect_store_provider.dart';
  18 +/**
  19 + *
  20 + * 客户汇总/全店页面
  21 + *
  22 + */
  23 +
  24 +class CustomerStatisticsLeftPage extends StatefulWidget {
  25 + final CustomerProvider? customerProvider;
  26 + const CustomerStatisticsLeftPage({super.key, this.customerProvider});
  27 +
  28 + @override
  29 + State<CustomerStatisticsLeftPage> createState() =>
  30 + _CustomerStatisticsLeftPageState();
  31 +}
  32 +
  33 +class _CustomerStatisticsLeftPageState
  34 + extends State<CustomerStatisticsLeftPage> {
  35 + ScrollController _controller = ScrollController();
  36 + late CollectStoreProvider collectStoreProvider;
  37 +
  38 + Widget _columnItem(
  39 + String btnTitle,
  40 + String sum,
  41 + String currunt,
  42 + ) {
  43 + Color btnColor = btnTitle == '活跃'
  44 + ? MyColours.color_00715F
  45 + : btnTitle == '沉睡'
  46 + ? MyColours.color_E89243
  47 + : MyColours.color_C80010;
  48 +
  49 + return Column(
  50 + crossAxisAlignment: CrossAxisAlignment.start,
  51 + children: [
  52 + RoundButton(
  53 + text: btnTitle,
  54 + gradientStart: btnColor,
  55 + gradientEnd: btnColor,
  56 + width: w(30),
  57 + height: w(18),
  58 + radius: r(5),
  59 + fontSize: 20,
  60 + ),
  61 + VEmptyView(20),
  62 + Text(
  63 + '${sum}位',
  64 + style: TextStyle(
  65 + color: MyColours.color_515151,
  66 + fontSize: font(14),
  67 + fontWeight: FontWeight.bold),
  68 + ),
  69 + VEmptyView(20),
  70 + Row(
  71 + children: [
  72 + Text(
  73 + '本月新增',
  74 + style: TextStyle(
  75 + color: MyColours.color_515151,
  76 + fontSize: font(14),
  77 + fontWeight: FontWeight.bold),
  78 + ),
  79 + Text(
  80 + '${currunt}',
  81 + style: TextStyle(
  82 + color: MyColours.color_438E93,
  83 + fontSize: font(14),
  84 + fontWeight: FontWeight.bold),
  85 + ),
  86 + Text(
  87 + '位',
  88 + style: TextStyle(
  89 + color: MyColours.color_515151,
  90 + fontSize: font(14),
  91 + fontWeight: FontWeight.bold),
  92 + )
  93 + ],
  94 + )
  95 + ],
  96 + );
  97 + }
  98 +
  99 + Widget _item(String title, String titleSum) {
  100 + return Container(
  101 + padding: EdgeInsets.symmetric(horizontal: w(16), vertical: w(13)),
  102 + color: MyColours.color_ffffff,
  103 + child: Column(
  104 + children: [
  105 + Row(
  106 + children: [
  107 + Text(title,
  108 + style: TextStyle(
  109 + color: MyColours.color_515151,
  110 + fontSize: font(16),
  111 + fontWeight: FontWeight.bold)),
  112 + Spacer(),
  113 + Text(titleSum,
  114 + style: TextStyle(
  115 + color: MyColours.color_438E93,
  116 + fontSize: font(24),
  117 + fontWeight: FontWeight.bold)),
  118 + Text('位',
  119 + style: TextStyle(
  120 + color: MyColours.color_515151,
  121 + fontSize: font(14),
  122 + )),
  123 + ],
  124 + ),
  125 + VEmptyView(26),
  126 + Row(
  127 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  128 + children: [
  129 + _columnItem('活跃', '1600', '500'),
  130 + _columnItem('沉睡', '2000', '50'),
  131 + _columnItem('流失', '160', '30')
  132 + ],
  133 + ),
  134 + VEmptyView(10),
  135 + ],
  136 + ),
  137 + );
  138 + }
  139 +
  140 + @override
  141 + Widget build(BuildContext context) {
  142 + collectStoreProvider =
  143 + Provider.of<CollectStoreProvider>(context, listen: true);
  144 + return Scaffold(
  145 + body: Consumer<CustomerProvider>(builder: (context, model, _) {
  146 + if (model.pageStateStoreHome != PageState.Success) {
  147 + if (model.pageStateStoreHome == PageState.Loading) {
  148 + return SingleChildScrollView(
  149 + controller: _controller,
  150 + child: Stack(alignment: Alignment.center, children: [
  151 + Column(children: [
  152 + VEmptyView(10),
  153 + // Stack(
  154 + // children: [
  155 + Container(
  156 + height: w(80),
  157 + color: MyColours.color_ffffff,
  158 + child: Row(
  159 + mainAxisAlignment: MainAxisAlignment.center,
  160 + children: [
  161 + Text(
  162 + '累计',
  163 + style: TextStyle(
  164 + color: MyColours.color_515151,
  165 + // fontWeight: FontWeight.bold,
  166 + fontSize: ScreenUtil().setSp(32)),
  167 + ),
  168 + Text(
  169 + '',
  170 + style: TextStyle(
  171 + color: MyColours.color_438E93,
  172 + fontSize: ScreenUtil().setSp(64),
  173 + fontWeight: FontWeight.bold),
  174 + ),
  175 + Text(
  176 + '位客户',
  177 + style: TextStyle(
  178 + color: MyColours.color_515151,
  179 + // fontWeight: FontWeight.bold,
  180 + fontSize: ScreenUtil().setSp(32)),
  181 + )
  182 + ],
  183 + ),
  184 + ),
  185 + VEmptyView(10),
  186 + // Row(
  187 + // children: [
  188 + // _percentWidget('', '活跃', '', tap: false),
  189 + // HEmptyView(10),
  190 + // _percentWidget('', '60天未预订', '', tap: false),
  191 + // HEmptyView(10),
  192 + // _percentWidget('', '120天未预订', '', tap: false),
  193 + // ],
  194 + // ),
  195 +
  196 + VEmptyView(10),
  197 + // GridView.builder(
  198 + // controller: _controller,
  199 + // shrinkWrap: true,
  200 + // cacheExtent: ScreenUtil().setWidth(0),
  201 + // itemCount: 6,
  202 + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  203 + // crossAxisCount: 3,
  204 + // childAspectRatio: 1.05,
  205 + // mainAxisSpacing: ScreenUtil().setWidth(10),
  206 + // crossAxisSpacing: ScreenUtil().setWidth(10)),
  207 + // itemBuilder: (BuildContext context, int index) {
  208 + // return _managerWidget('', '', null, '',
  209 + // uid: '', onTap: () {});
  210 + // })
  211 + ]),
  212 + Align(
  213 + alignment: Alignment.center,
  214 + child: Center(
  215 + child: Column(
  216 + mainAxisAlignment: MainAxisAlignment.center,
  217 + crossAxisAlignment: CrossAxisAlignment.center,
  218 + children: <Widget>[
  219 + ClipRRect(
  220 + borderRadius: BorderRadius.circular(10),
  221 + child: Container(
  222 + width: 200,
  223 + height: 200,
  224 + color: Colors.transparent,
  225 + child: CupertinoActivityIndicator(
  226 + color: MyColours.color_000000,
  227 + radius: 30,
  228 + ),
  229 + ))
  230 + // VEmptyView(30),
  231 + // Text(
  232 + // '加载中,请稍候...',
  233 + // style: TextStyle(
  234 + // color: MyColours.color_666666,
  235 + // fontSize: ScreenUtil().setSp(24)),
  236 + // )
  237 + ],
  238 + ),
  239 + ))
  240 + ]));
  241 + }
  242 + return ExceptionPage(
  243 + pageState: model.pageStateStoreHome,
  244 + callback: () {
  245 + // getTableList();
  246 + // _getSellerGuestManage();
  247 + // _getSellerCountsList();
  248 + },
  249 + emptyMsg: "暂时没有全店客情哦",
  250 + emptyImg: "empty_search",
  251 + showMsg: "加载中,请稍候...",
  252 + );
  253 + } else {
  254 + return Column(children: [
  255 + Expanded(
  256 + child: SingleChildScrollView(
  257 + controller: _controller,
  258 + child: Column(
  259 + children: [
  260 + if (widget.customerProvider!.storeSunmodel != null)
  261 + Column(
  262 + children: [
  263 + // VEmptyView(10),
  264 + // Stack(
  265 + // children: [
  266 + InkWell(
  267 + onTap: () {
  268 + NavigatorUtil.goCustomerListPage(
  269 + context,
  270 + FromPage.FromPageHome,
  271 + '',
  272 + {
  273 + 'object': widget
  274 + .customerProvider!.storeSunmodel!.sellerUser
  275 + },
  276 + );
  277 + },
  278 + child: Container(
  279 + height: w(105),
  280 + color: MyColours.color_ffffff,
  281 + child: Row(
  282 + mainAxisAlignment: MainAxisAlignment.center,
  283 + children: [
  284 + Text(
  285 + '${widget.customerProvider!.storeSunmodel!.myCustomer}',
  286 + style: TextStyle(
  287 + color: MyColours.color_438E93,
  288 + fontSize: ScreenUtil().setSp(64),
  289 + fontWeight: FontWeight.bold),
  290 + ),
  291 + Text(
  292 + '位',
  293 + style: TextStyle(
  294 + color: MyColours.color_515151,
  295 + // fontWeight: FontWeight.bold,
  296 + fontSize: ScreenUtil().setSp(32)),
  297 + )
  298 + ],
  299 + ),
  300 + )),
  301 + // Positioned(
  302 + // top: ScreenUtil().setWidth(30),
  303 + // right: ScreenUtil().setWidth(40),
  304 + // child: InkWell(
  305 + // onTap: () {
  306 + // NavigatorUtil.goCustomerSetPage(context);
  307 + // },
  308 + // child: Image.asset(Utils.getImgPath('c_set'),
  309 + // width: ScreenUtil().setWidth(40))))
  310 + // ],
  311 + // ),
  312 + VEmptyView(10),
  313 +
  314 + _item('预订客户', '2000'),
  315 + VEmptyView(10),
  316 + _item('支付客户', '1800'),
  317 + VEmptyView(10),
  318 + _item('充值客户', '3000'),
  319 + VEmptyView(10),
  320 + _item('充值客户', '5000'),
  321 + // Row(
  322 + // children: [
  323 + // _percentWidget(
  324 + // '${widget.customerProvider!.storeSunmodel!.active!.count}',
  325 + // '活跃',
  326 + // '${widget.customerProvider!.storeSunmodel!.active!.scale}'),
  327 + // HEmptyView(10),
  328 + // _percentWidget(
  329 + // '${widget.customerProvider!.storeSunmodel!.sleep!.count}',
  330 + // '60天未预订',
  331 + // '${widget.customerProvider!.storeSunmodel!.sleep!.scale}'),
  332 + // HEmptyView(10),
  333 + // _percentWidget(
  334 + // '${widget.customerProvider!.storeSunmodel!.drain!.count}',
  335 + // '120天未预订',
  336 + // '${widget.customerProvider!.storeSunmodel!.drain!.scale}'),
  337 + // ],
  338 + // ),
  339 + // GridView.builder(
  340 + // controller: _controller,
  341 + // shrinkWrap: true,
  342 + // cacheExtent: ScreenUtil().setWidth(0),
  343 + // itemCount: 3,
  344 + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  345 + // crossAxisCount: 3,
  346 + // childAspectRatio: 1,
  347 + // mainAxisSpacing: ScreenUtil().setWidth(10),
  348 + // crossAxisSpacing: ScreenUtil().setWidth(10)),
  349 + // itemBuilder: (BuildContext context, int index) {
  350 + // // locationState = state;
  351 + // return _percentWidget('1999', '活跃客户', '39.20');
  352 + // }),
  353 + // Row(
  354 + // children: [
  355 + // _percentWidget('19992', '活跃客户', '90.90'),
  356 + // HEmptyView(10),
  357 + // _percentWidget('19992', '沉睡客户', '90.90'),
  358 + // HEmptyView(10),
  359 + // _percentWidget('19992', '流失客户', '5.90'),
  360 + // ],
  361 + // ),
  362 + // Padding(
  363 + // padding: EdgeInsets.symmetric(
  364 + // vertical: ScreenUtil().setWidth(30)),
  365 + // child: Text(
  366 + // '客户经理',
  367 + // style: TextStyle(
  368 + // fontSize: ScreenUtil().setSp(28),
  369 + // color: MyColours.color_333333),
  370 + // ),
  371 + // ),
  372 + VEmptyView(10),
  373 + // GridView.builder(
  374 + // controller: _controller,
  375 + // shrinkWrap: true,
  376 + // cacheExtent: ScreenUtil().setWidth(0),
  377 + // itemCount: widget.customerProvider!.storeSunmodel!
  378 + // .sellerUser!.length +
  379 + // 1,
  380 + // gridDelegate:
  381 + // SliverGridDelegateWithFixedCrossAxisCount(
  382 + // crossAxisCount: 3,
  383 + // childAspectRatio: 1.05,
  384 + // mainAxisSpacing: ScreenUtil().setWidth(10),
  385 + // crossAxisSpacing: ScreenUtil().setWidth(10)),
  386 + // itemBuilder: (BuildContext context, int index) {
  387 + // // locationState = state;
  388 + // if (index == 0) {
  389 + // return _managerWidget(
  390 + // '${widget.customerProvider!.storeSunmodel!.distribution}',
  391 + // '未分配经理',
  392 + // null,
  393 + // '${widget.customerProvider!.storeSunmodel!.distributionStr}',
  394 + // onTap: () {
  395 + // NavigatorUtil.goCustomerListPage(
  396 + // context,
  397 + // FromPage.FromPageHome,
  398 + // '',
  399 + // {
  400 + // 'object': widget.customerProvider!
  401 + // .storeSunmodel!.sellerUser
  402 + // },
  403 + // index: '0',
  404 + // distribution: true);
  405 + // });
  406 + // }
  407 +
  408 + // return _managerWidget(
  409 + // '${widget.customerProvider!.storeSunmodel!.sellerUser![index - 1]!.count}',
  410 + // widget.customerProvider!.storeSunmodel!
  411 + // .sellerUser![index - 1]!.account ==
  412 + // null
  413 + // ? ''
  414 + // : '${widget.customerProvider!.storeSunmodel!.sellerUser![index - 1]!.nickName ?? widget.customerProvider!.storeSunmodel!.sellerUser![index - 1]!.account}',
  415 + // null,
  416 + // '${widget.customerProvider!.storeSunmodel!.sellerUser![index - 1]!.detailStr}',
  417 + // uid: widget.customerProvider!.storeSunmodel!
  418 + // .sellerUser![index - 1]!.uid, onTap: () {
  419 + // NavigatorUtil.goCustomerListPage(
  420 + // context,
  421 + // FromPage.FromPageHome,
  422 + // widget.customerProvider!.storeSunmodel!
  423 + // .sellerUser![index - 1]!.uid,
  424 + // {
  425 + // 'object': widget.customerProvider!
  426 + // .storeSunmodel!.sellerUser
  427 + // },
  428 + // index: '0',
  429 + // );
  430 + // });
  431 + // }),
  432 + ],
  433 + ),
  434 +
  435 + VEmptyView(10),
  436 + // ListView.builder(
  437 + // shrinkWrap: true,
  438 + // controller: _controller,
  439 + // itemCount: 2,
  440 + // itemBuilder: (context, index) {
  441 + // return Container(
  442 + // padding: EdgeInsets.symmetric(
  443 + // vertical: w(12), horizontal: w(16)),
  444 + // decoration: BoxDecoration(
  445 + // color: MyColours.color_ffffff,
  446 + // border: Border(
  447 + // bottom: BorderSide(
  448 + // color: index == 2 - 1
  449 + // ? MyColours.color_ffffff
  450 + // : MyColours.color_E7E7E7,
  451 + // width: w(1)))),
  452 + // child: Row(
  453 + // children: [
  454 + // Expanded(
  455 + // child: Text(
  456 + // '7天内存酒超期:5位/7天内纪念日提醒:3位',
  457 + // style: TextStyle(
  458 + // fontSize: font(16),
  459 + // color: MyColours.color_515151),
  460 + // )),
  461 + // Text(
  462 + // '创建营销计划',
  463 + // style: TextStyle(
  464 + // fontSize: font(16),
  465 + // color: MyColours.color_999999),
  466 + // ),
  467 + // HEmptyView(20),
  468 + // Image.asset(
  469 + // Utils.getImgPath('arrow_right_new'),
  470 + // width: w(12),
  471 + // )
  472 + // ],
  473 + // ),
  474 + // );
  475 + // }),
  476 +
  477 + // if (widget.customerProvider!.homeStatisticsList != null &&
  478 + // widget.customerProvider!.homeStatisticsList!.length > 0)
  479 + // Column(
  480 + // children: [
  481 + // _chart(),
  482 + // // _monthWidget(),
  483 +
  484 + // ListView.builder(
  485 + // itemCount: widget
  486 + // .customerProvider!.homeStatisticsList!.length,
  487 + // shrinkWrap: true,
  488 + // controller: _controller,
  489 + // padding: EdgeInsets.symmetric(horizontal: w(10)),
  490 + // itemBuilder: (context, index) {
  491 + // SellerCountsListSunModel countsListSunModel = widget
  492 + // .customerProvider!.homeStatisticsList![index];
  493 + // return InkWell(
  494 + // onTap: () {
  495 + // NavigatorUtil.goMonthOrderPage(
  496 + // context,
  497 + // year.toString(),
  498 + // countsListSunModel.monthss.toString());
  499 + // },
  500 + // child: MonthItem(
  501 + // countsListSunModel: countsListSunModel));
  502 + // }),
  503 + // ],
  504 + // )
  505 +
  506 +/**
  507 + ListView.builder(
  508 + itemCount: 10,
  509 + controller: _controller,
  510 + shrinkWrap: true,
  511 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  512 + itemBuilder: (context, index) {
  513 + return Container(
  514 + margin: EdgeInsets.only(bottom: w(10)),
  515 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  516 + decoration: BoxDecoration(
  517 + color: MyColours.color_ffffff,
  518 + borderRadius: BorderRadius.only(
  519 + topRight: Radius.circular(r(8)),
  520 + bottomRight: Radius.circular(r(8))),
  521 + ),
  522 + child: Row(
  523 + children: [
  524 + Container(
  525 + width: w(122),
  526 + padding: EdgeInsets.symmetric(vertical: w(5)),
  527 + decoration: BoxDecoration(
  528 + border: Border(
  529 + right: BorderSide(
  530 + color: MyColours.color_f3f3f3,
  531 + width: w(1)))),
  532 + child: Column(
  533 + children: [
  534 + VEmptyView(24),
  535 + Align(
  536 + alignment: Alignment.centerLeft,
  537 + child: Container(
  538 + padding: EdgeInsets.symmetric(
  539 + vertical: w(4), horizontal: w(5)),
  540 + decoration: BoxDecoration(
  541 + borderRadius:
  542 + BorderRadius.circular(r(3)),
  543 + border: Border.all(
  544 + color: MyColours.color_999999,
  545 + width: w(1))),
  546 + child: Text(
  547 + '张珊珊',
  548 + style: TextStyle(
  549 + fontSize: font(12),
  550 + fontWeight: FontWeight.bold,
  551 + color: MyColours.color_999999),
  552 + ),
  553 + ),
  554 + ),
  555 + VEmptyView(10),
  556 + Row(
  557 + mainAxisAlignment:
  558 + MainAxisAlignment.center,
  559 + children: [
  560 + Text(
  561 + '34',
  562 + style: TextStyle(
  563 + fontSize: font(24),
  564 + fontWeight: FontWeight.bold,
  565 + color: MyColours.color_438E93),
  566 + ),
  567 + Text(
  568 + '位',
  569 + style: TextStyle(
  570 + fontSize: font(14),
  571 + color: MyColours.color_000000),
  572 + ),
  573 + ],
  574 + ),
  575 + VEmptyView(10),
  576 + Row(
  577 + mainAxisAlignment:
  578 + MainAxisAlignment.center,
  579 + children: [
  580 + Text(
  581 + '23',
  582 + style: TextStyle(
  583 + fontSize: font(14),
  584 + fontWeight: FontWeight.bold,
  585 + color: MyColours.color_438E93),
  586 + ),
  587 + MyDivider(
  588 + w(4),
  589 + w(1),
  590 + color: MyColours.color_999999,
  591 + ),
  592 + Text(
  593 + '9',
  594 + style: TextStyle(
  595 + fontSize: font(14),
  596 + fontWeight: FontWeight.bold,
  597 + color: MyColours.color_E89243),
  598 + ),
  599 + MyDivider(
  600 + w(4),
  601 + w(1),
  602 + color: MyColours.color_999999,
  603 + ),
  604 + Text(
  605 + '2',
  606 + style: TextStyle(
  607 + fontSize: font(14),
  608 + fontWeight: FontWeight.bold,
  609 + color: MyColours.color_E34D59),
  610 + ),
  611 + ],
  612 + ),
  613 + VEmptyView(24),
  614 + ],
  615 + ),
  616 + ),
  617 + Expanded(
  618 + child: Container(
  619 + padding: EdgeInsets.only(
  620 + top: w(5), bottom: w(5), left: w(10)),
  621 + child: Row(
  622 + mainAxisAlignment:
  623 + MainAxisAlignment.spaceBetween,
  624 + // crossAxisAlignment: CrossAxisAlignment.start,
  625 + children: [
  626 + Column(
  627 + mainAxisAlignment:
  628 + MainAxisAlignment.start,
  629 + crossAxisAlignment:
  630 + CrossAxisAlignment.start,
  631 + children: [
  632 + Row(
  633 + crossAxisAlignment:
  634 + CrossAxisAlignment.start,
  635 + children: [
  636 + Text(
  637 + '预订',
  638 + style: TextStyle(
  639 + fontWeight: FontWeight.bold,
  640 + color: MyColours.color_515151,
  641 + fontSize: font(
  642 + (12),
  643 + )),
  644 + ),
  645 + HEmptyView(10),
  646 + Text(
  647 + '1089单',
  648 + style: TextStyle(
  649 + color: MyColours.color_515151,
  650 + fontSize: font(
  651 + (10),
  652 + )),
  653 + ),
  654 + HEmptyView(10),
  655 + MyDivider(
  656 + w(1),
  657 + w(15),
  658 + color: MyColours.color_DBDBDB,
  659 + ),
  660 + HEmptyView(10),
  661 + Text(
  662 + '1190桌',
  663 + style: TextStyle(
  664 + color: MyColours.color_515151,
  665 + fontSize: font(
  666 + (10),
  667 + )),
  668 + ),
  669 + ],
  670 + ),
  671 + VEmptyView(10),
  672 + Row(
  673 + crossAxisAlignment:
  674 + CrossAxisAlignment.start,
  675 + children: [
  676 + Text(
  677 + '到店',
  678 + style: TextStyle(
  679 + fontWeight: FontWeight.bold,
  680 + color: MyColours.color_515151,
  681 + fontSize: font(
  682 + (12),
  683 + )),
  684 + ),
  685 + HEmptyView(10),
  686 + Text(
  687 + '1089单',
  688 + style: TextStyle(
  689 + color: MyColours.color_515151,
  690 + fontSize: font(
  691 + (10),
  692 + )),
  693 + ),
  694 + HEmptyView(10),
  695 + MyDivider(
  696 + w(1),
  697 + w(15),
  698 + color: MyColours.color_DBDBDB,
  699 + ),
  700 + HEmptyView(10),
  701 + Text(
  702 + '1190桌',
  703 + style: TextStyle(
  704 + color: MyColours.color_515151,
  705 + fontSize: font(
  706 + (10),
  707 + )),
  708 + ),
  709 + ],
  710 + ),
  711 + VEmptyView(10),
  712 + Row(
  713 + crossAxisAlignment:
  714 + CrossAxisAlignment.start,
  715 + children: [
  716 + Text(
  717 + '1089人',
  718 + style: TextStyle(
  719 + color: MyColours.color_515151,
  720 + fontSize: font(
  721 + (10),
  722 + )),
  723 + ),
  724 + HEmptyView(10),
  725 + MyDivider(
  726 + w(1),
  727 + w(15),
  728 + color: MyColours.color_DBDBDB,
  729 + ),
  730 + HEmptyView(10),
  731 + Text(
  732 + '1190取消',
  733 + style: TextStyle(
  734 + color: MyColours.color_515151,
  735 + fontSize: font(
  736 + (10),
  737 + )),
  738 + ),
  739 + HEmptyView(10),
  740 + MyDivider(
  741 + w(1),
  742 + w(15),
  743 + color: MyColours.color_DBDBDB,
  744 + ),
  745 + HEmptyView(10),
  746 + Text(
  747 + '到客90.1%',
  748 + style: TextStyle(
  749 + color: MyColours.color_515151,
  750 + fontSize: font(
  751 + (10),
  752 + )),
  753 + ),
  754 + ],
  755 + ),
  756 + VEmptyView(10),
  757 + Row(
  758 + crossAxisAlignment:
  759 + CrossAxisAlignment.start,
  760 + children: [
  761 + Text(
  762 + '有金额订单数 25',
  763 + style: TextStyle(
  764 + color: MyColours.color_999999,
  765 + fontSize: font(
  766 + (10),
  767 + )),
  768 + ),
  769 + HEmptyView(10),
  770 + MyDivider(
  771 + w(1),
  772 + w(15),
  773 + color: MyColours.color_DBDBDB,
  774 + ),
  775 + HEmptyView(10),
  776 + Text(
  777 + '总消费 25800元',
  778 + style: TextStyle(
  779 + color: MyColours.color_999999,
  780 + fontSize: font(
  781 + (10),
  782 + )),
  783 + ),
  784 + ],
  785 + ),
  786 + VEmptyView(10),
  787 + Row(
  788 + crossAxisAlignment:
  789 + CrossAxisAlignment.start,
  790 + children: [
  791 + Text(
  792 + '人均 103.2元',
  793 + style: TextStyle(
  794 + color: MyColours.color_999999,
  795 + fontSize: font(
  796 + (10),
  797 + )),
  798 + ),
  799 + HEmptyView(10),
  800 + MyDivider(
  801 + w(1),
  802 + w(15),
  803 + color: MyColours.color_DBDBDB,
  804 + ),
  805 + HEmptyView(10),
  806 + Text(
  807 + '桌均 860元',
  808 + style: TextStyle(
  809 + color: MyColours.color_999999,
  810 + fontSize: font(
  811 + (10),
  812 + )),
  813 + ),
  814 + ],
  815 + ),
  816 + VEmptyView(10),
  817 + Row(
  818 + crossAxisAlignment:
  819 + CrossAxisAlignment.start,
  820 + children: [
  821 + Text(
  822 + '存酒 1位',
  823 + style: TextStyle(
  824 + color: MyColours.color_999999,
  825 + fontSize: font(
  826 + (10),
  827 + )),
  828 + ),
  829 + HEmptyView(10),
  830 + MyDivider(
  831 + w(1),
  832 + w(15),
  833 + color: MyColours.color_DBDBDB,
  834 + ),
  835 + HEmptyView(10),
  836 + Text(
  837 + '提前点餐 9位',
  838 + style: TextStyle(
  839 + color: MyColours.color_999999,
  840 + fontSize: font(
  841 + (10),
  842 + )),
  843 + ),
  844 + HEmptyView(10),
  845 + MyDivider(
  846 + w(1),
  847 + w(15),
  848 + color: MyColours.color_DBDBDB,
  849 + ),
  850 + HEmptyView(10),
  851 + Text(
  852 + '安排菜 9位',
  853 + style: TextStyle(
  854 + color: MyColours.color_999999,
  855 + fontSize: font(
  856 + (10),
  857 + )),
  858 + ),
  859 + ],
  860 + ),
  861 + ],
  862 + ),
  863 + Image.asset(
  864 + Utils.getImgPath('arrow_right_new'),
  865 + width: w(12),
  866 + )
  867 + ],
  868 + ),
  869 + ))
  870 + ],
  871 + ),
  872 + );
  873 + })
  874 + */
  875 + ],
  876 + ),
  877 + )),
  878 + if (widget.customerProvider!.storeSunmodel != null)
  879 + Container(
  880 + color: MyColours.color_FAFAFA,
  881 + padding: EdgeInsets.only(
  882 + top: w(13), bottom: w(26), left: w(19), right: (19)),
  883 + child: Row(
  884 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  885 + children: [
  886 + Expanded(
  887 + flex: 1,
  888 + child: RoundButton(
  889 + onPressed: () {
  890 + if (!collectStoreProvider.sellerPreserve) {
  891 + //没有购买客情维护模块
  892 + //提示购买
  893 +
  894 + DialogUtil.showSellerVersionBuyDialog(
  895 + context, '客情维护', (v) {});
  896 + return;
  897 + }
  898 + NavigatorUtil.goExportBookDataPage(
  899 + context,
  900 + );
  901 + },
  902 + text: '预订数据导出',
  903 + fontSize: 32,
  904 + isBold: true,
  905 + // margin: EdgeInsets.only(
  906 + // top: w(13),
  907 + // bottom: w(26),
  908 + // left: w(45),
  909 + // right: (45)),
  910 + textColor: MyColours.color_199095,
  911 + gradientStart: MyColours.color_ffffff,
  912 + gradientEnd: MyColours.color_ffffff,
  913 + borderColor: MyColours.color_199095,
  914 + height: ScreenUtil().setWidth(86),
  915 + width: ScreenUtil().setWidth(333),
  916 + radius: ScreenUtil().setWidth(10),
  917 + )),
  918 + ],
  919 + ))
  920 + ]);
  921 + }
  922 + }));
  923 + }
  924 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  3 +import 'package:one_key/pages/my/customer_type/customer_statistics_left_page.dart';
  4 +import 'package:one_key/pages/my/customer_type/store_customer/store_customer_home_left_page.dart';
  5 +import 'package:one_key/pages/my/customer_type/store_customer/store_customer_home_right_page.dart';
  6 +import 'package:one_key/widgets/h_empty_view.dart';
  7 +import 'package:one_key/widgets/system_app_bar.dart';
  8 +import 'package:provider/provider.dart';
  9 +
  10 +import '../../../../models/store_customer_home_model.dart';
  11 +import '../../../../provider/collect_store_provider.dart';
  12 +import '../../../../provider/customer_provider.dart';
  13 +import '../../../../res/colors.dart';
  14 +import '../../../../route/navigator_util.dart';
  15 +import '../../../../utils/event_bus.dart';
  16 +import '../../../../utils/screen_util.dart';
  17 +import '../../../../widgets/v_empty_view.dart';
  18 +
  19 +/***
  20 + * 全店客户汇总首页
  21 + */
  22 +
  23 +class CustomerStatisticsPage extends StatefulWidget {
  24 + CustomerStatisticsPage({Key? key}) : super(key: key);
  25 +
  26 + @override
  27 + _CustomerStatisticsPageState createState() => _CustomerStatisticsPageState();
  28 +}
  29 +
  30 +class _CustomerStatisticsPageState extends State<CustomerStatisticsPage>
  31 + with TickerProviderStateMixin {
  32 + TabController? tabController;
  33 + Color selectedColor = MyColours.color_ffffff;
  34 + Color unSelectedColor = MyColours.color_BFC4D4;
  35 + CustomerProvider? customerProvider;
  36 +
  37 + @override
  38 + void initState() {
  39 + // TODO: implement initState
  40 + super.initState();
  41 + tabController = TabController(length: 2, vsync: this);
  42 +
  43 + tabController!.addListener(() {
  44 + //点击tab时或滑动tab回调一次
  45 + // if (tabController.index.toDouble() == tabController.animation.value) {
  46 + // getMessage(index: tabController.index);
  47 + // selectIndex = tabController.index;
  48 + // setState(() {});
  49 + // }
  50 + });
  51 + WidgetsBinding.instance.addPostFrameCallback((_) {
  52 + _getSellerGuestManage();
  53 + });
  54 + }
  55 +
  56 + @override
  57 + void dispose() {
  58 + EventBus().emit('changeStatusColor');
  59 + super.dispose();
  60 + }
  61 +
  62 + ///全店客情首页
  63 + _getSellerGuestManage() async {
  64 + StoreCustomerHomeSunModel? model =
  65 + await customerProvider!.getSellerGuestManage(context);
  66 + // setState(() {});
  67 + }
  68 +
  69 + @override
  70 + Widget build(BuildContext context) {
  71 + customerProvider = Provider.of<CustomerProvider>(context, listen: false);
  72 + return Scaffold(
  73 + appBar: SystemAppBar(
  74 + '客户汇总',
  75 + // rightImgName: 'c_set.png',
  76 + // onTapRight: () {
  77 + // NavigatorUtil.goCustomerSetPage(context);
  78 + // },
  79 + ),
  80 + body: Column(
  81 + children: [
  82 + Container(
  83 + alignment: Alignment.center,
  84 + width: double.infinity,
  85 + color: MyColours.color_ffffff,
  86 + padding: EdgeInsets.only(bottom: w(9), top: w(9)),
  87 + child: TabBar(
  88 + onTap: (index) {
  89 + print(index);
  90 + },
  91 + controller: tabController,
  92 + isScrollable: true,
  93 + indicatorColor: MyColours.color_438E93,
  94 + indicatorSize: TabBarIndicatorSize.tab,
  95 + indicatorWeight: w(2),
  96 + unselectedLabelColor: MyColours.color_999999,
  97 + labelColor: MyColours.color_438E93,
  98 + labelStyle: TextStyle(
  99 + fontSize: w(14),
  100 + color: MyColours.color_438E93,
  101 + fontWeight: FontWeight.bold),
  102 + unselectedLabelStyle:
  103 + TextStyle(fontSize: w(12), color: MyColours.color_999999),
  104 + indicatorPadding: EdgeInsets.only(left: w(24), right: w(24)),
  105 + // labelPadding:
  106 + // EdgeInsets.symmetric(horizontal: w(32)), //tabs控件之间的间距
  107 + tabs: [
  108 + Tab(
  109 + height: w(30),
  110 + child: Container(
  111 + width: w(100),
  112 + alignment: Alignment.center,
  113 + child: Text(
  114 + '全店',
  115 + ),
  116 + )),
  117 + Tab(
  118 + height: w(30),
  119 + child: Container(
  120 + width: w(100),
  121 + alignment: Alignment.center,
  122 + child: Text(
  123 + '分经理',
  124 + )),
  125 + ),
  126 + ],
  127 +
  128 + // indicatorPadding: EdgeInsets.only(
  129 + // left: ScreenUtil().setWidth(16),
  130 + // right: ScreenUtil().setWidth(32)),
  131 + // indicatorWeight: ScreenUtil().setWidth(6.0),
  132 + )),
  133 + Expanded(
  134 + child: TabBarView(controller: tabController, children: [
  135 + ChangeNotifierProvider<CollectStoreProvider>(
  136 + create: (_) => CollectStoreProvider(),
  137 + child: CustomerStatisticsLeftPage(
  138 + customerProvider: customerProvider,
  139 + )),
  140 + StoreCustomerHomeRightPage(customerProvider: customerProvider)
  141 + ]),
  142 + ),
  143 + ],
  144 + ));
  145 + }
  146 +}
  1 +import 'package:flutter/material.dart';
  2 +
  3 +/**
  4 + * 余额明细页面
  5 + */
  6 +
  7 +class BalanceDetailsPage extends StatefulWidget {
  8 + const BalanceDetailsPage({super.key});
  9 +
  10 + @override
  11 + State<BalanceDetailsPage> createState() => _BalanceDetailsPageState();
  12 +}
  13 +
  14 +class _BalanceDetailsPageState extends State<BalanceDetailsPage> {
  15 + @override
  16 + Widget build(BuildContext context) {
  17 + return const Placeholder();
  18 + }
  19 +}
@@ -316,268 +316,270 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -316,268 +316,270 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
316 color: MyColours.color_ffffff, 316 color: MyColours.color_ffffff,
317 padding: EdgeInsets.only( 317 padding: EdgeInsets.only(
318 left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)), 318 left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)),
319 - child: Wrap(  
320 - crossAxisAlignment: WrapCrossAlignment.center, 319 + child: Column(
  320 + crossAxisAlignment: CrossAxisAlignment.start,
321 children: [ 321 children: [
322 - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [  
323 - Row(  
324 - children: [  
325 - Container(  
326 - constraints: BoxConstraints(  
327 - maxWidth: ScreenUtil().setWidth(260)),  
328 - child: Text(  
329 - customerProvider.guestInfoSunModel!.guest!.rnameStr!,  
330 - overflow: TextOverflow.ellipsis,  
331 - style: TextStyle(  
332 - color: MyColours.color_515151,  
333 - fontWeight: FontWeight.bold,  
334 - fontSize: ScreenUtil().setSp(36)),  
335 - )),  
336 - HEmptyView(10),  
337 - Container(  
338 - child: Text(  
339 - customerProvider.guestInfoSunModel!.guest!.sexStr != ''  
340 - ? '${customerProvider.guestInfoSunModel!.guest!.sexStr}'  
341 - : '',  
342 - style: TextStyle(  
343 - color: MyColours.color_515151,  
344 - fontWeight: FontWeight.bold,  
345 - fontSize: ScreenUtil().setSp(20),  
346 - ),  
347 - )),  
348 - HEmptyView(6),  
349 - Text(  
350 - customerProvider.guestInfoSunModel!.guest!.phone!,  
351 - overflow: TextOverflow.ellipsis,  
352 - style: TextStyle(  
353 - color: MyColours.color_515151,  
354 - fontWeight: FontWeight.bold,  
355 - fontSize: ScreenUtil().setSp(20),  
356 - ),  
357 - )  
358 - ],  
359 - ),  
360 - VEmptyView(20),  
361 - Wrap(  
362 - runSpacing: w(10),  
363 - spacing: w(10),  
364 - children: labelsWidget(),  
365 - ),  
366 - // Row(  
367 - // mainAxisAlignment: MainAxisAlignment.start,  
368 - // children: [  
369 - // if (customerProvider.guestInfoSunModel.guest.attr != null &&  
370 - // customerProvider.guestInfoSunModel.guest.attr != '')  
371 - // Container(  
372 - // width: w(30),  
373 - // height: w(16),  
374 - // alignment: Alignment.center,  
375 - // // padding: EdgeInsets.symmetric(  
376 - // // horizontal: ScreenUtil().setWidth(10),  
377 - // // vertical: ScreenUtil().setWidth(2),  
378 - // // ),  
379 - // decoration: BoxDecoration(  
380 - // color: customerProvider  
381 - // .guestInfoSunModel.guest.attr !=  
382 - // null &&  
383 - // customerProvider  
384 - // .guestInfoSunModel.guest.attr !=  
385 - // ''  
386 - // ? customerProvider  
387 - // .guestInfoSunModel.guest.attr ==  
388 - // '沉睡'  
389 - // ? MyColours.color_999999  
390 - // : customerProvider  
391 - // .guestInfoSunModel.guest.attr ==  
392 - // '活跃'  
393 - // ? MyColours.color_00715F  
394 - // : customerProvider.guestInfoSunModel  
395 - // .guest.attr ==  
396 - // '流失'  
397 - // ? MyColours.color_E34D59  
398 - // : Color.fromRGBO(239, 143, 49, 1)  
399 - // : Colors.transparent,  
400 - // borderRadius: BorderRadius.circular(  
401 - // ScreenUtil().setWidth(10),  
402 - // ),  
403 - // ),  
404 - // child: Text(  
405 - // customerProvider.guestInfoSunModel.guest.attr,  
406 - // style: TextStyle(  
407 - // color: MyColours.color_ffffff,  
408 - // fontSize: ScreenUtil().setSp(20)))),  
409 - // if (customerProvider.guestInfoSunModel.guest.label != null)  
410 - // flatBtn(customerProvider.guestInfoSunModel.guest.label,  
411 - // MyColours.color_B39437),  
412 - // if (customerProvider.guestInfoSunModel.guest.isMember ==  
413 - // '1' ||  
414 - // customerProvider.guestInfoSunModel.guest.isMember ==  
415 - // '0')  
416 - // flatBtn(  
417 - // customerProvider.guestInfoSunModel.guest.isMember ==  
418 - // '1'  
419 - // ? '会员'  
420 - // : '非会员',  
421 - // MyColours.color_438E93),  
422 - // if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=  
423 - // '0')  
424 - // flatBtn(  
425 - // '存酒${customerProvider.guestInfoSunModel.store.storeDay}天',  
426 - // MyColours.color_438E93)  
427 - // ],  
428 - // ),  
429 - VEmptyView(20),  
430 - Text(  
431 - customerProvider.guestInfoSunModel!.guest!.nickName == null  
432 - ? '经理:未指派'  
433 - : '经理:${customerProvider.guestInfoSunModel!.guest!.nickName}',  
434 - style: TextStyle( 322 + Row(
  323 + children: [
  324 + Container(
  325 + constraints:
  326 + BoxConstraints(maxWidth: ScreenUtil().setWidth(260)),
  327 + child: Text(
  328 + customerProvider.guestInfoSunModel!.guest!.rnameStr!,
  329 + overflow: TextOverflow.ellipsis,
  330 + style: TextStyle(
  331 + color: MyColours.color_515151,
  332 + fontWeight: FontWeight.bold,
  333 + fontSize: ScreenUtil().setSp(36)),
  334 + )),
  335 + HEmptyView(10),
  336 + Container(
  337 + child: Text(
  338 + customerProvider.guestInfoSunModel!.guest!.sexStr != ''
  339 + ? '${customerProvider.guestInfoSunModel!.guest!.sexStr}'
  340 + : '',
  341 + style: TextStyle(
435 color: MyColours.color_515151, 342 color: MyColours.color_515151,
436 - fontSize: ScreenUtil().setSp(24)),  
437 - ),  
438 - VEmptyView(20),  
439 - Row(  
440 - children: [  
441 - Text(  
442 - '已创建 ',  
443 - overflow: TextOverflow.ellipsis,  
444 - style: TextStyle(  
445 - color: MyColours.color_515151,  
446 - fontSize: ScreenUtil().setSp(24)),  
447 - ),  
448 - Text(  
449 - '${customerProvider.guestInfoSunModel!.count!.createTime}',  
450 - style: TextStyle(  
451 - color: MyColours.color_438E93,  
452 - fontSize: ScreenUtil().setSp(24),  
453 - ),  
454 - strutStyle: StrutStyle(  
455 - forceStrutHeight: true, height: 1, leading: 0.3),  
456 - ),  
457 - Text(  
458 - ' 天 | 累计 ',  
459 - overflow: TextOverflow.ellipsis,  
460 - style: TextStyle(  
461 - color: MyColours.color_515151,  
462 - fontSize: ScreenUtil().setSp(24)),  
463 - ),  
464 - Text(  
465 - '${customerProvider.guestInfoSunModel!.count!.leiji}',  
466 - style: TextStyle(  
467 - color: MyColours.color_438E93,  
468 - fontSize: ScreenUtil().setSp(24),  
469 - ),  
470 - strutStyle: StrutStyle(  
471 - forceStrutHeight: true, height: 1, leading: 0.3),  
472 - ),  
473 - Text(  
474 - ' 单 | 取消 ',  
475 - overflow: TextOverflow.ellipsis,  
476 - style: TextStyle(  
477 - color: MyColours.color_515151,  
478 - fontSize: ScreenUtil().setSp(24)),  
479 - ),  
480 - Text(  
481 - '${customerProvider.guestInfoSunModel!.count!.quxiao}',  
482 - style: TextStyle(  
483 - color: MyColours.color_438E93,  
484 - fontSize: ScreenUtil().setSp(24),  
485 - ),  
486 - strutStyle: StrutStyle(  
487 - forceStrutHeight: true, height: 1, leading: 0.3),  
488 - ),  
489 - Text(  
490 - ' 单',  
491 - overflow: TextOverflow.ellipsis,  
492 - style: TextStyle(  
493 - color: MyColours.color_515151,  
494 - fontSize: ScreenUtil().setSp(24)),  
495 - ),  
496 - ],  
497 - ),  
498 - VEmptyView(20),  
499 - Wrap(  
500 - crossAxisAlignment: WrapCrossAlignment.center,  
501 - children: [  
502 - Text(  
503 - customerProvider.guestInfoSunModel!.last?.ddate == null  
504 - ? ''  
505 - : Utils.formatFromMill(  
506 - customerProvider.guestInfoSunModel!.last?.ddate ??  
507 - ''),  
508 - overflow: TextOverflow.ellipsis,  
509 - style: TextStyle(  
510 - fontSize: ScreenUtil().setSp(20),  
511 - color: MyColours.color_E34D59),  
512 - ),  
513 - Text(  
514 - customerProvider.guestInfoSunModel!.last?.ddateSoltStr ??  
515 - '',  
516 - style: TextStyle(  
517 - fontSize: ScreenUtil().setSp(20),  
518 - color: MyColours.color_438E93), 343 + fontWeight: FontWeight.bold,
  344 + fontSize: ScreenUtil().setSp(20),
519 ), 345 ),
520 - Text(  
521 - ' 桌位',  
522 - style: TextStyle(  
523 - fontSize: ScreenUtil().setSp(20),  
524 - color: MyColours.color_515151),  
525 - ),  
526 - Text(  
527 - customerProvider.guestInfoSunModel!.last!.tableinfoName,  
528 - style: TextStyle(  
529 - fontSize: ScreenUtil().setSp(20),  
530 - color: MyColours.color_438E93),  
531 - ),  
532 - Text(  
533 - ' 人数',  
534 - style: TextStyle(  
535 - fontSize: ScreenUtil().setSp(20),  
536 - color: MyColours.color_515151),  
537 - ),  
538 - Text(  
539 - customerProvider.guestInfoSunModel!.last!.actualPum ==  
540 - null  
541 - ? '未记录'  
542 - : customerProvider  
543 - .guestInfoSunModel!.last!.actualPum!,  
544 - style: TextStyle(  
545 - fontSize: ScreenUtil().setSp(20),  
546 - color: MyColours.color_438E93), 346 + )),
  347 + HEmptyView(6),
  348 + Text(
  349 + customerProvider.guestInfoSunModel!.guest!.phone!,
  350 + overflow: TextOverflow.ellipsis,
  351 + style: TextStyle(
  352 + color: MyColours.color_515151,
  353 + fontWeight: FontWeight.bold,
  354 + fontSize: ScreenUtil().setSp(20),
547 ), 355 ),
548 - Text(  
549 - ' 消费',  
550 - style: TextStyle(  
551 - fontSize: ScreenUtil().setSp(20),  
552 - color: MyColours.color_515151), 356 + )
  357 + ],
  358 + ),
  359 + VEmptyView(20),
  360 + Wrap(
  361 + runSpacing: w(10),
  362 + spacing: w(10),
  363 + children: labelsWidgetNew(),
  364 + ),
  365 + VEmptyView(20),
  366 + Wrap(
  367 + runSpacing: w(10),
  368 + spacing: w(10),
  369 + children: labelsWidget(),
  370 + ),
  371 + // Row(
  372 + // mainAxisAlignment: MainAxisAlignment.start,
  373 + // children: [
  374 + // if (customerProvider.guestInfoSunModel.guest.attr != null &&
  375 + // customerProvider.guestInfoSunModel.guest.attr != '')
  376 + // Container(
  377 + // width: w(30),
  378 + // height: w(16),
  379 + // alignment: Alignment.center,
  380 + // // padding: EdgeInsets.symmetric(
  381 + // // horizontal: ScreenUtil().setWidth(10),
  382 + // // vertical: ScreenUtil().setWidth(2),
  383 + // // ),
  384 + // decoration: BoxDecoration(
  385 + // color: customerProvider
  386 + // .guestInfoSunModel.guest.attr !=
  387 + // null &&
  388 + // customerProvider
  389 + // .guestInfoSunModel.guest.attr !=
  390 + // ''
  391 + // ? customerProvider
  392 + // .guestInfoSunModel.guest.attr ==
  393 + // '沉睡'
  394 + // ? MyColours.color_999999
  395 + // : customerProvider
  396 + // .guestInfoSunModel.guest.attr ==
  397 + // '活跃'
  398 + // ? MyColours.color_00715F
  399 + // : customerProvider.guestInfoSunModel
  400 + // .guest.attr ==
  401 + // '流失'
  402 + // ? MyColours.color_E34D59
  403 + // : Color.fromRGBO(239, 143, 49, 1)
  404 + // : Colors.transparent,
  405 + // borderRadius: BorderRadius.circular(
  406 + // ScreenUtil().setWidth(10),
  407 + // ),
  408 + // ),
  409 + // child: Text(
  410 + // customerProvider.guestInfoSunModel.guest.attr,
  411 + // style: TextStyle(
  412 + // color: MyColours.color_ffffff,
  413 + // fontSize: ScreenUtil().setSp(20)))),
  414 + // if (customerProvider.guestInfoSunModel.guest.label != null)
  415 + // flatBtn(customerProvider.guestInfoSunModel.guest.label,
  416 + // MyColours.color_B39437),
  417 + // if (customerProvider.guestInfoSunModel.guest.isMember ==
  418 + // '1' ||
  419 + // customerProvider.guestInfoSunModel.guest.isMember ==
  420 + // '0')
  421 + // flatBtn(
  422 + // customerProvider.guestInfoSunModel.guest.isMember ==
  423 + // '1'
  424 + // ? '会员'
  425 + // : '非会员',
  426 + // MyColours.color_438E93),
  427 + // if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
  428 + // '0')
  429 + // flatBtn(
  430 + // '存酒${customerProvider.guestInfoSunModel.store.storeDay}天',
  431 + // MyColours.color_438E93)
  432 + // ],
  433 + // ),
  434 + VEmptyView(20),
  435 + Text(
  436 + customerProvider.guestInfoSunModel!.guest!.nickName == null
  437 + ? '经理:未指派'
  438 + : '经理:${customerProvider.guestInfoSunModel!.guest!.nickName}',
  439 + style: TextStyle(
  440 + color: MyColours.color_515151,
  441 + fontSize: ScreenUtil().setSp(24)),
  442 + ),
  443 + VEmptyView(20),
  444 + Row(
  445 + children: [
  446 + Text(
  447 + '已创建 ',
  448 + overflow: TextOverflow.ellipsis,
  449 + style: TextStyle(
  450 + color: MyColours.color_515151,
  451 + fontSize: ScreenUtil().setSp(24)),
  452 + ),
  453 + Text(
  454 + '${customerProvider.guestInfoSunModel!.count!.createTime}',
  455 + style: TextStyle(
  456 + color: MyColours.color_438E93,
  457 + fontSize: ScreenUtil().setSp(24),
553 ), 458 ),
554 - Text(  
555 - customerProvider.guestInfoSunModel!.last!.conAmount ==  
556 - null ||  
557 - customerProvider  
558 - .guestInfoSunModel!.last!.conAmount ==  
559 - 0  
560 - ? '未记录'  
561 - : '${customerProvider.guestInfoSunModel!.last!.conAmount}',  
562 - style: TextStyle(  
563 - fontSize: ScreenUtil().setSp(20),  
564 - color: MyColours.color_438E93), 459 + strutStyle: StrutStyle(
  460 + forceStrutHeight: true, height: 1, leading: 0.3),
  461 + ),
  462 + Text(
  463 + ' 天 | 累计 ',
  464 + overflow: TextOverflow.ellipsis,
  465 + style: TextStyle(
  466 + color: MyColours.color_515151,
  467 + fontSize: ScreenUtil().setSp(24)),
  468 + ),
  469 + Text(
  470 + '${customerProvider.guestInfoSunModel!.count!.leiji}',
  471 + style: TextStyle(
  472 + color: MyColours.color_438E93,
  473 + fontSize: ScreenUtil().setSp(24),
565 ), 474 ),
566 - Text(  
567 - ' 预订',  
568 - style: TextStyle(  
569 - fontSize: ScreenUtil().setSp(20),  
570 - color: MyColours.color_515151), 475 + strutStyle: StrutStyle(
  476 + forceStrutHeight: true, height: 1, leading: 0.3),
  477 + ),
  478 + Text(
  479 + ' 单 | 取消 ',
  480 + overflow: TextOverflow.ellipsis,
  481 + style: TextStyle(
  482 + color: MyColours.color_515151,
  483 + fontSize: ScreenUtil().setSp(24)),
  484 + ),
  485 + Text(
  486 + '${customerProvider.guestInfoSunModel!.count!.quxiao}',
  487 + style: TextStyle(
  488 + color: MyColours.color_438E93,
  489 + fontSize: ScreenUtil().setSp(24),
571 ), 490 ),
572 - Text(  
573 - '${customerProvider.guestInfoSunModel!.last!.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel!.last!.sellerUserPhone ?? ''}',  
574 - style: TextStyle(  
575 - fontSize: ScreenUtil().setSp(20),  
576 - color: MyColours.color_438E93),  
577 - )  
578 - ],  
579 - ),  
580 - ]), 491 + strutStyle: StrutStyle(
  492 + forceStrutHeight: true, height: 1, leading: 0.3),
  493 + ),
  494 + Text(
  495 + ' 单',
  496 + overflow: TextOverflow.ellipsis,
  497 + style: TextStyle(
  498 + color: MyColours.color_515151,
  499 + fontSize: ScreenUtil().setSp(24)),
  500 + ),
  501 + ],
  502 + ),
  503 + VEmptyView(20),
  504 + Wrap(
  505 + crossAxisAlignment: WrapCrossAlignment.center,
  506 + children: [
  507 + Text(
  508 + customerProvider.guestInfoSunModel!.last?.ddate == null
  509 + ? ''
  510 + : Utils.formatFromMill(
  511 + customerProvider.guestInfoSunModel!.last?.ddate ??
  512 + ''),
  513 + overflow: TextOverflow.ellipsis,
  514 + style: TextStyle(
  515 + fontSize: ScreenUtil().setSp(20),
  516 + color: MyColours.color_E34D59),
  517 + ),
  518 + Text(
  519 + customerProvider.guestInfoSunModel!.last?.ddateSoltStr ??
  520 + '',
  521 + style: TextStyle(
  522 + fontSize: ScreenUtil().setSp(20),
  523 + color: MyColours.color_438E93),
  524 + ),
  525 + Text(
  526 + ' 桌位',
  527 + style: TextStyle(
  528 + fontSize: ScreenUtil().setSp(20),
  529 + color: MyColours.color_515151),
  530 + ),
  531 + Text(
  532 + customerProvider.guestInfoSunModel!.last!.tableinfoName,
  533 + style: TextStyle(
  534 + fontSize: ScreenUtil().setSp(20),
  535 + color: MyColours.color_438E93),
  536 + ),
  537 + Text(
  538 + ' 人数',
  539 + style: TextStyle(
  540 + fontSize: ScreenUtil().setSp(20),
  541 + color: MyColours.color_515151),
  542 + ),
  543 + Text(
  544 + customerProvider.guestInfoSunModel!.last!.actualPum == null
  545 + ? '未记录'
  546 + : customerProvider.guestInfoSunModel!.last!.actualPum!,
  547 + style: TextStyle(
  548 + fontSize: ScreenUtil().setSp(20),
  549 + color: MyColours.color_438E93),
  550 + ),
  551 + Text(
  552 + ' 消费',
  553 + style: TextStyle(
  554 + fontSize: ScreenUtil().setSp(20),
  555 + color: MyColours.color_515151),
  556 + ),
  557 + Text(
  558 + customerProvider.guestInfoSunModel!.last!.conAmount ==
  559 + null ||
  560 + customerProvider
  561 + .guestInfoSunModel!.last!.conAmount ==
  562 + 0
  563 + ? '未记录'
  564 + : '${customerProvider.guestInfoSunModel!.last!.conAmount}',
  565 + style: TextStyle(
  566 + fontSize: ScreenUtil().setSp(20),
  567 + color: MyColours.color_438E93),
  568 + ),
  569 + Text(
  570 + ' 预订',
  571 + style: TextStyle(
  572 + fontSize: ScreenUtil().setSp(20),
  573 + color: MyColours.color_515151),
  574 + ),
  575 + Text(
  576 + '${customerProvider.guestInfoSunModel!.last!.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel!.last!.sellerUserPhone ?? ''}',
  577 + style: TextStyle(
  578 + fontSize: ScreenUtil().setSp(20),
  579 + color: MyColours.color_438E93),
  580 + )
  581 + ],
  582 + ),
581 ], 583 ],
582 ), 584 ),
583 ), 585 ),
@@ -586,6 +588,25 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -586,6 +588,25 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
586 child: Column( 588 child: Column(
587 children: [ 589 children: [
588 RoundButton( 590 RoundButton(
  591 + text: '消费记录',
  592 + gradientStart: MyColours.color_438E93,
  593 + gradientEnd: MyColours.color_438E93,
  594 + textColor: MyColours.color_ffffff,
  595 + borderColor: MyColours.color_438E93,
  596 + width: w(72),
  597 + radius: r(11),
  598 + fontSize: 24,
  599 + isBold: true,
  600 + height: w(22),
  601 + onPressed: () {
  602 + // NavigatorUtil.goCustomerDetailEditPage(
  603 + // context,
  604 + // customerProvider.guestInfoSunModel!.guest,
  605 + // widget.fromPage);
  606 + },
  607 + ),
  608 + VEmptyView(20),
  609 + RoundButton(
589 text: '编辑', 610 text: '编辑',
590 gradientStart: MyColours.color_ffffff, 611 gradientStart: MyColours.color_ffffff,
591 gradientEnd: MyColours.color_ffffff, 612 gradientEnd: MyColours.color_ffffff,
@@ -683,6 +704,64 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -683,6 +704,64 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
683 ); 704 );
684 } 705 }
685 706
  707 + List<Widget> labelsWidgetNew() {
  708 + List<Widget> data = [];
  709 +
  710 + data.add(InkWell(
  711 + onTap: () {
  712 + NavigatorUtil.goBalanceDetailsPage(context);
  713 + },
  714 + child: Container(
  715 + padding: EdgeInsets.symmetric(
  716 + horizontal: ScreenUtil().setWidth(10),
  717 + vertical: ScreenUtil().setWidth(4),
  718 + ),
  719 + decoration: BoxDecoration(
  720 + color: MyColours.color_438E93,
  721 + borderRadius: BorderRadius.circular(
  722 + ScreenUtil().setWidth(10),
  723 + ),
  724 + ),
  725 + child: Text('余额¥5200',
  726 + style: TextStyle(
  727 + color: MyColours.color_ffffff,
  728 + fontSize: ScreenUtil().setSp(20))))));
  729 +
  730 + data.add(Container(
  731 + padding: EdgeInsets.symmetric(
  732 + horizontal: ScreenUtil().setWidth(10),
  733 + vertical: ScreenUtil().setWidth(4),
  734 + ),
  735 + decoration: BoxDecoration(
  736 + color: MyColours.color_438E93,
  737 + borderRadius: BorderRadius.circular(
  738 + ScreenUtil().setWidth(10),
  739 + ),
  740 + ),
  741 + child: Text('消费金¥3000',
  742 + style: TextStyle(
  743 + color: MyColours.color_ffffff,
  744 + fontSize: ScreenUtil().setSp(20)))));
  745 +
  746 + data.add(Container(
  747 + padding: EdgeInsets.symmetric(
  748 + horizontal: ScreenUtil().setWidth(10),
  749 + vertical: ScreenUtil().setWidth(4),
  750 + ),
  751 + decoration: BoxDecoration(
  752 + color: MyColours.color_438E93,
  753 + borderRadius: BorderRadius.circular(
  754 + ScreenUtil().setWidth(10),
  755 + ),
  756 + ),
  757 + child: Text('积分900',
  758 + style: TextStyle(
  759 + color: MyColours.color_ffffff,
  760 + fontSize: ScreenUtil().setSp(20)))));
  761 +
  762 + return data;
  763 + }
  764 +
686 List<Widget> labelsWidget() { 765 List<Widget> labelsWidget() {
687 List<Widget> data = []; 766 List<Widget> data = [];
688 767
@@ -277,11 +277,11 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage> @@ -277,11 +277,11 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage>
277 height: ScreenUtil().setWidth(80), 277 height: ScreenUtil().setWidth(80),
278 radius: ScreenUtil().setWidth(14), 278 radius: ScreenUtil().setWidth(14),
279 gradientStart: tabController?.index == 1 && 279 gradientStart: tabController?.index == 1 &&
280 - !Utils.getAuthority(context, '创建新排菜') 280 + !Utils.getAuthority(context, '生成二维码')
281 ? MyColours.color_ffffff 281 ? MyColours.color_ffffff
282 : MyColours.color_ffffff, 282 : MyColours.color_ffffff,
283 gradientEnd: tabController?.index == 1 && 283 gradientEnd: tabController?.index == 1 &&
284 - !Utils.getAuthority(context, '创建新排菜') 284 + !Utils.getAuthority(context, '生成二维码')
285 ? MyColours.color_ffffff 285 ? MyColours.color_ffffff
286 : MyColours.color_ffffff, 286 : MyColours.color_ffffff,
287 fontSize: 28, 287 fontSize: 28,
@@ -291,13 +291,17 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage> @@ -291,13 +291,17 @@ class _MyPlanDishHomePageState extends State<MyPlanDishHomePage>
291 // UserModel userModel = 291 // UserModel userModel =
292 // Provider.of<UserModel>(context, listen: false); 292 // Provider.of<UserModel>(context, listen: false);
293 if (!(tabController?.index == 1 && 293 if (!(tabController?.index == 1 &&
294 - !Utils.getAuthority(context, '创建新排菜'))) {  
295 - if (Utils.getAuthority(context, '创建新排菜')) {  
296 - NavigatorUtil.goPlanDishCreateSelectTypePage(context); 294 + !Utils.getAuthority(context, '生成二维码'))) {
  295 + if (Utils.getAuthority(context, '生成二维码')) {
  296 + bool? needRefresh =
  297 + await NavigatorUtil.goPlanDishQrcodePage(
  298 + context,
  299 + );
297 } else { 300 } else {
298 bool? needRefresh = 301 bool? needRefresh =
299 - await NavigatorUtil.goPlanDishEditPage(context,  
300 - isMine: true, isEdit: true); 302 + await NavigatorUtil.goPlanDishQrcodePage(
  303 + context,
  304 + );
301 print(needRefresh); 305 print(needRefresh);
302 if (needRefresh != null && needRefresh) { 306 if (needRefresh != null && needRefresh) {
303 // bus.emit('refresh_coupon_list_f'); 307 // bus.emit('refresh_coupon_list_f');
  1 +import 'dart:io';
  2 +import 'dart:typed_data';
  3 +
  4 +import 'package:cached_network_image/cached_network_image.dart';
  5 +import 'package:flutter/material.dart';
  6 +import 'package:flutter/rendering.dart';
  7 +import 'package:image_gallery_saver/image_gallery_saver.dart';
  8 +import 'package:one_key/provider/plan_dish_provider.dart';
  9 +import 'package:one_key/provider/user_model.dart';
  10 +import 'package:one_key/res/colors.dart';
  11 +import 'package:one_key/utils/screen_util.dart';
  12 +import 'package:one_key/utils/utils.dart';
  13 +import 'package:one_key/widgets/loading.dart';
  14 +import 'package:one_key/widgets/round_button.dart';
  15 +import 'package:one_key/widgets/system_app_bar.dart';
  16 +import 'package:one_key/widgets/v_empty_view.dart';
  17 +import 'package:permission_handler/permission_handler.dart';
  18 +import 'package:provider/provider.dart';
  19 +
  20 +import 'dart:ui' as ui;
  21 +
  22 +/**
  23 + *
  24 + *
  25 + * 套餐排菜分享二维码
  26 + *
  27 + *
  28 + */
  29 +class PlanDishQrcodePage extends StatefulWidget {
  30 + final String qrcode;
  31 + const PlanDishQrcodePage({super.key, required this.qrcode});
  32 +
  33 + @override
  34 + State<PlanDishQrcodePage> createState() => _PlanDishQrcodePageState();
  35 +}
  36 +
  37 +class _PlanDishQrcodePageState extends State<PlanDishQrcodePage> {
  38 + final GlobalKey globalKey = GlobalKey();
  39 + late PlanDishProvider planDishProvider;
  40 +
  41 + // _createPayQrcode() {
  42 + // financeProvider!.createPayQrcode(context);
  43 + // }
  44 +
  45 + /// 截图
  46 + Future<Uint8List?> _capturePng(
  47 + GlobalKey globalKey,
  48 + // {
  49 + // double pixelRatio = 2.0, //截屏的图片与原图的比例
  50 + // }
  51 + ) async {
  52 + try {
  53 + RenderRepaintBoundary boundary =
  54 + globalKey.currentContext?.findRenderObject() as RenderRepaintBoundary;
  55 + double dpr = ui.window.devicePixelRatio; // 获取当前设备的像素比
  56 + var image = await boundary.toImage(pixelRatio: dpr);
  57 + ByteData? byteData =
  58 + await image.toByteData(format: ui.ImageByteFormat.png);
  59 + Uint8List? pngBytes = byteData?.buffer.asUint8List();
  60 + return pngBytes;
  61 + } catch (e) {
  62 + print(e);
  63 + }
  64 + return null;
  65 + }
  66 +
  67 + @override
  68 + Widget build(BuildContext context) {
  69 + planDishProvider = Provider.of<PlanDishProvider>(context, listen: true);
  70 + return Scaffold(
  71 + appBar: SystemAppBar('店铺套餐分享'),
  72 + backgroundColor: MyColours.color_ffffff,
  73 + body: Column(
  74 + children: [
  75 + Expanded(
  76 + child: SingleChildScrollView(
  77 + child: Column(
  78 + crossAxisAlignment: CrossAxisAlignment.start,
  79 + children: [
  80 + VEmptyView(100),
  81 + //二维码图片
  82 +
  83 + //
  84 + RepaintBoundary(
  85 + key: globalKey,
  86 + child: Column(
  87 + children: [
  88 + Container(
  89 + margin: EdgeInsets.symmetric(horizontal: w(57)),
  90 + padding: EdgeInsets.symmetric(
  91 + horizontal: w(25), vertical: w(35)),
  92 + color: MyColours.color_438E93,
  93 + child: Column(
  94 + children: [
  95 + Text(
  96 + '微信扫码查看店铺套餐',
  97 + style: TextStyle(
  98 + color: MyColours.color_ffffff,
  99 + fontSize: font(16),
  100 + fontWeight: FontWeight.bold),
  101 + ),
  102 + VEmptyView(20),
  103 + Container(
  104 + padding: EdgeInsets.symmetric(
  105 + horizontal: w(21), vertical: w(16)),
  106 + color: MyColours.color_ffffff,
  107 + child: Column(
  108 + children: [
  109 + CachedNetworkImage(
  110 + imageUrl:
  111 + widget.qrcode ?? ''),
  112 + // VEmptyView(28),
  113 + Text(
  114 + '${Provider.of<UserModel>(context).user!.sellername}',
  115 + maxLines: 3,
  116 + overflow: TextOverflow.ellipsis,
  117 + style: TextStyle(
  118 + color: MyColours.color_000000,
  119 + fontSize: font(14)),
  120 + ),
  121 + // VEmptyView(28),
  122 + // Text(
  123 + // '消费金:¥${widget.data.amount}',
  124 + // maxLines: 3,
  125 + // overflow: TextOverflow.ellipsis,
  126 + // style: TextStyle(
  127 + // color: MyColours.color_000000,
  128 + // fontSize: font(14)),
  129 + // ),
  130 + ],
  131 + ))
  132 + ],
  133 + ),
  134 + ),
  135 + // Container(
  136 + // margin: EdgeInsets.symmetric(horizontal: w(57)),
  137 + // padding: EdgeInsets.symmetric(
  138 + // horizontal: w(25), vertical: w(11)),
  139 + // decoration: BoxDecoration(
  140 + // color: MyColours.color_ffffff,
  141 + // border: Border.all(
  142 + // color: MyColours.color_09BB07,
  143 + // width: w(2))),
  144 + // child: Row(
  145 + // mainAxisAlignment: MainAxisAlignment.center,
  146 + // children: [
  147 + // Image.asset(
  148 + // Utils.getImgPath('vector'),
  149 + // width: w(37),
  150 + // ),
  151 + // HEmptyView(12),
  152 + // Text(
  153 + // '微信支付',
  154 + // style: TextStyle(
  155 + // color: MyColours.color_515151,
  156 + // fontSize: font(28)),
  157 + // )
  158 + // ],
  159 + // )),
  160 + ],
  161 + )),
  162 +
  163 + VEmptyView(160),
  164 + // Padding(
  165 + // padding: EdgeInsets.symmetric(horizontal: w(16)),
  166 + // child: Text(
  167 + // '提示:',
  168 + // textAlign: TextAlign.left,
  169 + // style: TextStyle(
  170 + // fontSize: w(16),
  171 + // height: 1.5,
  172 + // fontWeight: FontWeight.bold,
  173 + // color: MyColours.color_000000),
  174 + // )),
  175 + // Padding(
  176 + // padding: EdgeInsets.symmetric(horizontal: w(16)),
  177 + // child: Text(
  178 + // '请将收款码出示给顾客,顾客扫码支付时可以自动识别拥有的代金券,并自动在餐厅设定的规则下使用。',
  179 + // textAlign: TextAlign.left,
  180 + // style: TextStyle(
  181 + // fontSize: w(14),
  182 + // height: 1.5,
  183 + // color: MyColours.color_000000),
  184 + // ))
  185 + ],
  186 + ),
  187 + ),
  188 + ),
  189 + Container(
  190 + padding: EdgeInsets.symmetric(vertical: w(13), horizontal: w(79)),
  191 + child: RoundButton(
  192 + text: '保存二维码图片',
  193 + height: w(43),
  194 + radius: r(5),
  195 + gradientStart: MyColours.color_ffffff,
  196 + gradientEnd: MyColours.color_ffffff,
  197 + borderColor: MyColours.color_438E93,
  198 + textColor: MyColours.color_438E93,
  199 + isBold: true,
  200 + fontSize: 32,
  201 + onPressed: () {
  202 + Utils.getPickPermission(context, () async {
  203 + //获取截屏图像
  204 + //添加到图片数组中
  205 + Loading.showLoading(
  206 + context,
  207 + );
  208 + Uint8List? value = await _capturePng(globalKey);
  209 + if (value != null) {
  210 + print(value);
  211 + final result = await ImageGallerySaver.saveImage(value,
  212 + quality: 100);
  213 + if (result != null) {
  214 + Utils.showToast("保存成功");
  215 + } else {
  216 + print('error');
  217 + Utils.showToast("保存失败");
  218 + // toast("");
  219 + }
  220 + Loading.hideLoading(context);
  221 + // setState(() {});
  222 + }
  223 + }, Platform.isIOS ? Permission.photos : Permission.storage);
  224 + },
  225 + ),
  226 + )
  227 + ],
  228 + ));
  229 + }
  230 +}
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_EFEFF0 = Color(0xFFEFEFF0); 4 + static const Color color_C80010 = Color(0xFFC80010);
  5 + static const Color color_EFEFF0 = Color(0xFFEFEFF0);
5 static const Color color_FFEFC5 = Color(0xFFFFEFC5); 6 static const Color color_FFEFC5 = Color(0xFFFFEFC5);
6 static const Color color_E4461D = Color(0xFFE4461D); 7 static const Color color_E4461D = Color(0xFFE4461D);
7 static const Color color_F8F7F3 = Color(0xFFF8F7F3); 8 static const Color color_F8F7F3 = Color(0xFFF8F7F3);
@@ -29,7 +30,7 @@ class MyColours { @@ -29,7 +30,7 @@ class MyColours {
29 static const Color color_80438E93 = Color(0x80438E93); 30 static const Color color_80438E93 = Color(0x80438E93);
30 static const Color color_303030 = Color(0xff303030); 31 static const Color color_303030 = Color(0xff303030);
31 static const Color color_CFB53B = Color(0xffCFB53B); 32 static const Color color_CFB53B = Color(0xffCFB53B);
32 - static const Color color_66515151 = Color(0x66515151); 33 + static const Color color_66515151 = Color(0x66515151);
33 static const Color color_99515151 = Color(0x99515151); 34 static const Color color_99515151 = Color(0x99515151);
34 static const Color color_F7C797 = Color(0xffF7C797); 35 static const Color color_F7C797 = Color(0xffF7C797);
35 static const Color color_FEF3E6 = Color(0xffFEF3E6); 36 static const Color color_FEF3E6 = Color(0xffFEF3E6);
@@ -2591,9 +2591,6 @@ class NavigatorUtil { @@ -2591,9 +2591,6 @@ class NavigatorUtil {
2591 replace: replace); 2591 replace: replace);
2592 } 2592 }
2593 2593
2594 -  
2595 -  
2596 -  
2597 //临餐取消预订设置页 2594 //临餐取消预订设置页
2598 static Future<dynamic> goOrderCancelSetPage( 2595 static Future<dynamic> goOrderCancelSetPage(
2599 BuildContext context, { 2596 BuildContext context, {
@@ -2603,11 +2600,7 @@ class NavigatorUtil { @@ -2603,11 +2600,7 @@ class NavigatorUtil {
2603 replace: replace); 2600 replace: replace);
2604 } 2601 }
2605 2602
2606 -  
2607 -  
2608 -  
2609 -  
2610 - //会员充值首页列表 2603 + //会员充值首页列表
2611 static Future<dynamic> goRechargeFirstHomePage( 2604 static Future<dynamic> goRechargeFirstHomePage(
2612 BuildContext context, { 2605 BuildContext context, {
2613 replace = false, 2606 replace = false,
@@ -2616,4 +2609,31 @@ class NavigatorUtil { @@ -2616,4 +2609,31 @@ class NavigatorUtil {
2616 replace: replace); 2609 replace: replace);
2617 } 2610 }
2618 2611
  2612 + //套餐排菜二维码页面
  2613 + static Future<dynamic> goPlanDishQrcodePage(
  2614 + BuildContext context, {
  2615 + replace = false,
  2616 + }) {
  2617 + return _navigateTo(context, "${Routes.plan_dish_qrcode_page}",
  2618 + replace: replace);
  2619 + }
  2620 +
  2621 + //全店客户汇总
  2622 + static Future<dynamic> goCustomerStatisticsPage(
  2623 + BuildContext context, {
  2624 + replace = false,
  2625 + }) {
  2626 + return _navigateTo(context, "${Routes.customer_statistics_page}",
  2627 + replace: replace);
  2628 + }
  2629 +
  2630 +
  2631 + //余额明细页面
  2632 + static Future<dynamic> goBalanceDetailsPage(
  2633 + BuildContext context, {
  2634 + replace = false,
  2635 + }) {
  2636 + return _navigateTo(context, "${Routes.balance_details_page}",
  2637 + replace: replace);
  2638 + }
2619 } 2639 }
@@ -68,6 +68,7 @@ import 'package:one_key/pages/my/consume/grant_wechat_image_page.dart'; @@ -68,6 +68,7 @@ import 'package:one_key/pages/my/consume/grant_wechat_image_page.dart';
68 import 'package:one_key/pages/my/consume/return_money_page.dart'; 68 import 'package:one_key/pages/my/consume/return_money_page.dart';
69 import 'package:one_key/pages/my/customer_type/custom_label_page.dart'; 69 import 'package:one_key/pages/my/customer_type/custom_label_page.dart';
70 import 'package:one_key/pages/my/customer_type/customer_home_page.dart'; 70 import 'package:one_key/pages/my/customer_type/customer_home_page.dart';
  71 +import 'package:one_key/pages/my/customer_type/customer_statistics_page.dart';
71 72
72 import 'package:one_key/pages/my/customer_type/my_customer/my_customer_detail_edit_page.dart'; 73 import 'package:one_key/pages/my/customer_type/my_customer/my_customer_detail_edit_page.dart';
73 import 'package:one_key/pages/my/customer_type/my_customer/my_customer_detail_page.dart'; 74 import 'package:one_key/pages/my/customer_type/my_customer/my_customer_detail_page.dart';
@@ -81,6 +82,7 @@ import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_ @@ -81,6 +82,7 @@ import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_
81 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_detail_page_seller.dart'; 82 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_detail_page_seller.dart';
82 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_page.dart'; 83 import 'package:one_key/pages/my/customer_type/my_customer/my_marketing_records_page.dart';
83 import 'package:one_key/pages/my/customer_type/my_customer/my_show_customer_list_page.dart'; 84 import 'package:one_key/pages/my/customer_type/my_customer/my_show_customer_list_page.dart';
  85 +import 'package:one_key/pages/my/customer_type/store_customer/balance_details_page.dart';
84 import 'package:one_key/pages/my/customer_type/store_customer/set_birthday_page.dart'; 86 import 'package:one_key/pages/my/customer_type/store_customer/set_birthday_page.dart';
85 import 'package:one_key/pages/my/customer_type/store_customer/show_customer_list_page.dart'; 87 import 'package:one_key/pages/my/customer_type/store_customer/show_customer_list_page.dart';
86 88
@@ -120,6 +122,7 @@ import 'package:one_key/pages/my/menu_type/menu_category_page.dart'; @@ -120,6 +122,7 @@ import 'package:one_key/pages/my/menu_type/menu_category_page.dart';
120 // import 'package:one_key/pages/my/menu_type/menu_manage_page_old.dart'; 122 // import 'package:one_key/pages/my/menu_type/menu_manage_page_old.dart';
121 import 'package:one_key/pages/my/my_integral_page.dart'; 123 import 'package:one_key/pages/my/my_integral_page.dart';
122 import 'package:one_key/pages/my/photo_type/photo_manager_page.dart'; 124 import 'package:one_key/pages/my/photo_type/photo_manager_page.dart';
  125 +import 'package:one_key/pages/my/plan_dish/plan_dish_qrcode_page.dart';
123 import 'package:one_key/pages/my/receive_orders_time_set.dart'; 126 import 'package:one_key/pages/my/receive_orders_time_set.dart';
124 import 'package:one_key/pages/my/remark_manager_page.dart'; 127 import 'package:one_key/pages/my/remark_manager_page.dart';
125 import 'package:one_key/pages/my/room_type/room_type_create_page.dart'; 128 import 'package:one_key/pages/my/room_type/room_type_create_page.dart';
@@ -4509,6 +4512,27 @@ var rechargeFirstHomePageHandle = new Handler( @@ -4509,6 +4512,27 @@ var rechargeFirstHomePageHandle = new Handler(
4509 return RechargeFirstHomePage(); 4512 return RechargeFirstHomePage();
4510 }); 4513 });
4511 4514
  4515 +var planDishQrcodePageHandle = new Handler(
  4516 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  4517 + return ChangeNotifierProvider<PlanDishProvider>(
  4518 + create: (_) => PlanDishProvider(),
  4519 + child: PlanDishQrcodePage(
  4520 + qrcode: '',
  4521 + ));
  4522 +});
  4523 +
  4524 +var customerStatisticsPageHandle = new Handler(
  4525 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  4526 + return ChangeNotifierProvider<CustomerProvider>(
  4527 + create: (_) => CustomerProvider(), child: CustomerStatisticsPage());
  4528 +});
  4529 +
  4530 +var balanceDetailsPageHandle = new Handler(
  4531 + handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
  4532 + return ChangeNotifierProvider<CustomerProvider>(
  4533 + create: (_) => CustomerProvider(), child: BalanceDetailsPage());
  4534 +});
  4535 +
4512 var customLabelPageHandle = new Handler( 4536 var customLabelPageHandle = new Handler(
4513 handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) { 4537 handlerFunc: (BuildContext? context, Map<dynamic, List<Object>> params) {
4514 return ChangeNotifierProvider<CustomerProvider>( 4538 return ChangeNotifierProvider<CustomerProvider>(
@@ -464,6 +464,13 @@ class Routes { @@ -464,6 +464,13 @@ class Routes {
464 static String order_cancel_set_page = "/order_cancel_set_page"; // 预订取消设置 464 static String order_cancel_set_page = "/order_cancel_set_page"; // 预订取消设置
465 static String recharge_f_home_page = "/recharge_f_home_page"; // 会员充值首页 465 static String recharge_f_home_page = "/recharge_f_home_page"; // 会员充值首页
466 466
  467 + static String plan_dish_qrcode_page = "/plan_dish_qrcode_page"; // 套餐排菜二维码
  468 +
  469 + static String customer_statistics_page =
  470 + "/customer_statistics_page "; // 全店客户汇总页面
  471 +
  472 + static String balance_details_page = "/balance_details_page"; // 余额明细页面
  473 +
467 static void configureRoutes(FluroRouter router) { 474 static void configureRoutes(FluroRouter router) {
468 router.notFoundHandler = new Handler( 475 router.notFoundHandler = new Handler(
469 handlerFunc: (BuildContext? context, Map<String, List<String>> params) { 476 handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
@@ -881,9 +888,17 @@ class Routes { @@ -881,9 +888,17 @@ class Routes {
881 888
882 router.define(order_cancel_set_page, handler: orderCancelSetPageHandle); 889 router.define(order_cancel_set_page, handler: orderCancelSetPageHandle);
883 890
884 -  
885 router.define(recharge_f_home_page, handler: rechargeFirstHomePageHandle); 891 router.define(recharge_f_home_page, handler: rechargeFirstHomePageHandle);
886 892
887 - 893 + router.define(plan_dish_qrcode_page, handler: planDishQrcodePageHandle);
  894 +
  895 + router.define(customer_statistics_page,
  896 + handler: customerStatisticsPageHandle);
  897 +
  898 +
  899 + router.define(balance_details_page,
  900 + handler: balanceDetailsPageHandle);
  901 +
  902 +
888 } 903 }
889 } 904 }