Commit e84e8ac6eca1b9764305036534516b7be2f5fdbe

Authored by wdn127929
1 parent 93cba33a

新增修改订单的时间显示

@@ -107,6 +107,8 @@ class NotebookDetail { @@ -107,6 +107,8 @@ class NotebookDetail {
107 107
108 dynamic is_user_comments; //是否评价过 108 dynamic is_user_comments; //是否评价过
109 109
  110 + String up_date; //订单修改时间
  111 +
110 String get statuImgAssets { 112 String get statuImgAssets {
111 switch (status) { 113 switch (status) {
112 case "0": 114 case "0":
@@ -301,7 +303,7 @@ class NotebookDetail { @@ -301,7 +303,7 @@ class NotebookDetail {
301 303
302 @override 304 @override
303 String toString() { 305 String toString() {
304 - return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,place_order_name:$place_order_name,is_user_comments:$is_user_comments}'; 306 + return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,place_order_name:$place_order_name,is_user_comments:$is_user_comments,up_date:$up_date}';
305 } 307 }
306 } 308 }
307 309
@@ -51,7 +51,10 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) { @@ -51,7 +51,10 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
51 : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>) 51 : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
52 ..gid = json['gid'] as String 52 ..gid = json['gid'] as String
53 ..place_order_name = json['place_order_name'] as String 53 ..place_order_name = json['place_order_name'] as String
54 - ..is_user_comments = json['is_user_comments'] as dynamic; 54 + ..is_user_comments = json['is_user_comments'] as dynamic
  55 + ..up_date = json['up_date'] as String;
  56 +
  57 +
55 } 58 }
56 59
57 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => 60 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
@@ -88,6 +91,7 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => @@ -88,6 +91,7 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
88 'gid': instance.gid, 91 'gid': instance.gid,
89 'place_order_name': instance.place_order_name, 92 'place_order_name': instance.place_order_name,
90 'is_user_comments': instance.is_user_comments, 93 'is_user_comments': instance.is_user_comments,
  94 + 'up_date':instance.up_date,
91 }; 95 };
92 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) { 96 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
93 return OrderInfo( 97 return OrderInfo(
@@ -1555,13 +1555,18 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1555,13 +1555,18 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1555 style: 1555 style:
1556 TextStyle(color: MyColours.color_515151, fontSize: font(14)), 1556 TextStyle(color: MyColours.color_515151, fontSize: font(14)),
1557 ), 1557 ),
1558 - HEmptyView(40), 1558 + // HEmptyView(40),
1559 Expanded( 1559 Expanded(
1560 child: Text( 1560 child: Text(
1561 '${detailEntity.nick_name ?? ''}' + 1561 '${detailEntity.nick_name ?? ''}' +
1562 - ' ' +  
1563 - '${detailEntity.seller_user_phone ?? ''} xxxx时间/电话范德萨发顺丰?', 1562 + ' ' +
  1563 + '${detailEntity.seller_user_phone ?? ''}' +
  1564 + ( detailEntity.up_date ==
  1565 + null
  1566 + ? ''
  1567 + : ' ${_getDateTime(detailEntity.up_date)}'),
1564 // overflow: TextOverflow.ellipsis, 1568 // overflow: TextOverflow.ellipsis,
  1569 + textAlign: TextAlign.right,
1565 style: 1570 style:
1566 TextStyle(color: MyColours.color_999999, fontSize: font(14)), 1571 TextStyle(color: MyColours.color_999999, fontSize: font(14)),
1567 )), 1572 )),
@@ -1582,12 +1587,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1582,12 +1587,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1582 style: TextStyle( 1587 style: TextStyle(
1583 color: MyColours.color_515151, fontSize: font(14)), 1588 color: MyColours.color_515151, fontSize: font(14)),
1584 ), 1589 ),
1585 - Text( 1590 + HEmptyView(40),
  1591 + Expanded(
  1592 + child: Text(
1586 '${detailEntity.abolition == '2' ? '顾客在线取消' : detailEntity.cancel?.uname ?? ""} ${detailEntity.cancel?.cdateStr ?? ""}', 1593 '${detailEntity.abolition == '2' ? '顾客在线取消' : detailEntity.cancel?.uname ?? ""} ${detailEntity.cancel?.cdateStr ?? ""}',
1587 overflow: TextOverflow.ellipsis, 1594 overflow: TextOverflow.ellipsis,
  1595 + textAlign: TextAlign.right,
1588 style: TextStyle( 1596 style: TextStyle(
1589 color: MyColours.color_999999, fontSize: font(14)), 1597 color: MyColours.color_999999, fontSize: font(14)),
1590 - ), 1598 + )),
1591 ])), 1599 ])),
1592 Container( 1600 Container(
1593 padding: EdgeInsets.only(left: w(13), top: w(10)), 1601 padding: EdgeInsets.only(left: w(13), top: w(10)),
@@ -1696,115 +1704,135 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1696,115 +1704,135 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1696 child: Column( 1704 child: Column(
1697 children: <Widget>[ 1705 children: <Widget>[
1698 Column(children: [ 1706 Column(children: [
1699 - Container(  
1700 - color: MyColours.color_ffffff,  
1701 - width: double.infinity,  
1702 - padding: EdgeInsets.symmetric(  
1703 - vertical: ScreenUtil()  
1704 - .setWidth(25)),  
1705 - alignment: Alignment.center,  
1706 - child: Row(  
1707 - crossAxisAlignment:  
1708 - CrossAxisAlignment.center,  
1709 - mainAxisAlignment:  
1710 - MainAxisAlignment  
1711 - .spaceBetween,  
1712 - children: <Widget>[  
1713 - Text(  
1714 - '预订桌位',  
1715 - style: TextStyle(  
1716 - color: MyColours  
1717 - .color_515151,  
1718 - fontSize: ScreenUtil()  
1719 - .setSp(30)),  
1720 - ),  
1721 - detailEntity.tables.length < 3  
1722 - ? Row(  
1723 - children:  
1724 - _tableWidget(  
1725 - detailEntity  
1726 - .tables),  
1727 - )  
1728 - : InkWell(  
1729 - onTap: () {  
1730 - DialogUtil  
1731 - .openFTablesDialog(  
1732 - context,  
1733 - detailEntity  
1734 - .tables);  
1735 - },  
1736 - child: Container(  
1737 - // height: ScreenUtil()  
1738 - // .setWidth(  
1739 - // 50),  
1740 - padding: EdgeInsets.symmetric(  
1741 - horizontal:  
1742 - ScreenUtil()  
1743 - .setWidth(  
1744 - 20),  
1745 - vertical:  
1746 - ScreenUtil()  
1747 - .setWidth(  
1748 - 18)),  
1749 - decoration: BoxDecoration(  
1750 - borderRadius: BorderRadius.circular(  
1751 - ScreenUtil()  
1752 - .setWidth(  
1753 - 10)), 1707 + Stack(
  1708 + alignment: Alignment.topCenter,
  1709 + children: [
  1710 + Column(children: [
  1711 + Container(
  1712 + color: MyColours
  1713 + .color_ffffff,
  1714 + width: double.infinity,
  1715 + padding:
  1716 + EdgeInsets.symmetric(
  1717 + vertical:
  1718 + ScreenUtil()
  1719 + .setWidth(
  1720 + 25)),
  1721 + alignment:
  1722 + Alignment.center,
  1723 + child: Row(
  1724 + crossAxisAlignment:
  1725 + CrossAxisAlignment
  1726 + .center,
  1727 + mainAxisAlignment:
  1728 + MainAxisAlignment
  1729 + .spaceBetween,
  1730 + children: <Widget>[
  1731 + Text(
  1732 + '预订桌位',
  1733 + style: TextStyle(
1754 color: MyColours 1734 color: MyColours
1755 - .color_199095),  
1756 - child: Text(  
1757 - '${detailEntity.tables.length}桌 查看',  
1758 - style: TextStyle(  
1759 - color: MyColours  
1760 - .color_ffffff,  
1761 - fontSize:  
1762 - ScreenUtil()  
1763 - .setSp(  
1764 - 30)),  
1765 - ), 1735 + .color_515151,
  1736 + fontSize:
  1737 + ScreenUtil()
  1738 + .setSp(
  1739 + 30)),
1766 ), 1740 ),
1767 - )  
1768 - ],  
1769 - ),  
1770 - ),  
1771 - // RowMultiText(  
1772 - // "预订桌位",  
1773 - // (detailEntity.tables.length  
1774 - // .toString() +  
1775 - // "个")),  
1776 - // Align(  
1777 - // alignment:  
1778 - // Alignment.centerRight,  
1779 - // child: Offstage(  
1780 - // offstage: detailEntity  
1781 - // .tables.length >  
1782 - // 0  
1783 - // ? false  
1784 - // : true,  
1785 - // child: Container(  
1786 - // height: ScreenUtil()  
1787 - // .setHeight(210),  
1788 - // child: ListView.builder(  
1789 - // itemBuilder:  
1790 - // (BuildContext contxt,  
1791 - // int index) {  
1792 - // return TableItem(  
1793 - // detailEntity  
1794 - // .tables[index]);  
1795 - // },  
1796 - // itemCount: detailEntity  
1797 - // .tables.length,  
1798 - // shrinkWrap: true,  
1799 - // scrollDirection:  
1800 - // Axis.horizontal,  
1801 - // ),  
1802 - // ),  
1803 - // )),  
1804 - RowMultiText(  
1805 - "预订日期", detailEntity.ddateF,  
1806 - textColor:  
1807 - MyColours.color_515151), 1741 + detailEntity.tables
  1742 + .length <
  1743 + 3
  1744 + ? Row(
  1745 + children: _tableWidget(
  1746 + detailEntity
  1747 + .tables),
  1748 + )
  1749 + : InkWell(
  1750 + onTap: () {
  1751 + DialogUtil.openFTablesDialog(
  1752 + context,
  1753 + detailEntity
  1754 + .tables);
  1755 + },
  1756 + child:
  1757 + Container(
  1758 + // height: ScreenUtil()
  1759 + // .setWidth(
  1760 + // 50),
  1761 + padding: EdgeInsets.symmetric(
  1762 + horizontal:
  1763 + ScreenUtil().setWidth(
  1764 + 20),
  1765 + vertical:
  1766 + ScreenUtil().setWidth(18)),
  1767 + decoration: BoxDecoration(
  1768 + borderRadius:
  1769 + BorderRadius.circular(ScreenUtil().setWidth(
  1770 + 10)),
  1771 + color: MyColours
  1772 + .color_199095),
  1773 + child: Text(
  1774 + '${detailEntity.tables.length}桌 查看',
  1775 + style: TextStyle(
  1776 + color: MyColours
  1777 + .color_ffffff,
  1778 + fontSize:
  1779 + ScreenUtil().setSp(30)),
  1780 + ),
  1781 + ),
  1782 + )
  1783 + ],
  1784 + ),
  1785 + ),
  1786 +
  1787 + // RowMultiText(
  1788 + // "预订桌位",
  1789 + // (detailEntity.tables.length
  1790 + // .toString() +
  1791 + // "个")),
  1792 + // Align(
  1793 + // alignment:
  1794 + // Alignment.centerRight,
  1795 + // child: Offstage(
  1796 + // offstage: detailEntity
  1797 + // .tables.length >
  1798 + // 0
  1799 + // ? false
  1800 + // : true,
  1801 + // child: Container(
  1802 + // height: ScreenUtil()
  1803 + // .setHeight(210),
  1804 + // child: ListView.builder(
  1805 + // itemBuilder:
  1806 + // (BuildContext contxt,
  1807 + // int index) {
  1808 + // return TableItem(
  1809 + // detailEntity
  1810 + // .tables[index]);
  1811 + // },
  1812 + // itemCount: detailEntity
  1813 + // .tables.length,
  1814 + // shrinkWrap: true,
  1815 + // scrollDirection:
  1816 + // Axis.horizontal,
  1817 + // ),
  1818 + // ),
  1819 + // )),
  1820 + RowMultiText("预订日期",
  1821 + detailEntity.ddateF,
  1822 + textColor: MyColours
  1823 + .color_515151)
  1824 + ]),
  1825 + Positioned(
  1826 + top: w(20),
  1827 + child: Image.asset(
  1828 + detailEntity
  1829 + .statuImgAssets,
  1830 + width: ScreenUtil()
  1831 + .setWidth(114),
  1832 + height: ScreenUtil()
  1833 + .setWidth(56),
  1834 + ))
  1835 + ]),
1808 1836
1809 Row( 1837 Row(
1810 children: [ 1838 children: [
@@ -1991,60 +2019,60 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1991,60 +2019,60 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1991 // ], 2019 // ],
1992 // ), 2020 // ),
1993 // ), 2021 // ),
1994 - Stack(  
1995 - alignment: Alignment.topCenter,  
1996 - children: [  
1997 - Column(  
1998 - children: [  
1999 - // Offstage(  
2000 - // offstage: detailEntity  
2001 - // .place_order_name ==  
2002 - // '' ||  
2003 - // detailEntity  
2004 - // .place_order_name ==  
2005 - // null,  
2006 - // child:  
2007 - // ),  
2008 - RowMultiText("下单人",  
2009 - '${detailEntity.place_order_name ?? ''}',  
2010 - textColor: MyColours  
2011 - .color_515151),  
2012 - // Offstage(  
2013 - // offstage: detailEntity  
2014 - // .nick_name ==  
2015 - // '' ||  
2016 - // detailEntity  
2017 - // .nick_name ==  
2018 - // null,  
2019 - // child:  
2020 - RowMultiText(  
2021 - "记录人",  
2022 - '${detailEntity.nick_name ?? ''}' +  
2023 - ' ' +  
2024 - '${detailEntity.seller_user_phone ?? ''}',  
2025 - textColor: MyColours  
2026 - .color_515151),  
2027 - // ),  
2028 - ],  
2029 - ),  
2030 - Positioned(  
2031 - top: w(10),  
2032 - child: Image.asset(  
2033 - detailEntity  
2034 - .statuImgAssets,  
2035 - width: ScreenUtil()  
2036 - .setWidth(114),  
2037 - height: ScreenUtil()  
2038 - .setWidth(56),  
2039 - ))  
2040 - ]), 2022 + // Stack(
  2023 + // alignment: Alignment.topCenter,
  2024 + // children: [
  2025 + // // Column(
  2026 + // // children: [
  2027 + // // // Offstage(
  2028 + // // // offstage: detailEntity
  2029 + // // // .place_order_name ==
  2030 + // // // '' ||
  2031 + // // // detailEntity
  2032 + // // // .place_order_name ==
  2033 + // // // null,
  2034 + // // // child:
  2035 + // // // ),
  2036 + // // RowMultiText("下单人",
  2037 + // // '${detailEntity.place_order_name ?? ''}',
  2038 + // // textColor: MyColours
  2039 + // // .color_515151),
  2040 + // // // Offstage(
  2041 + // // // offstage: detailEntity
  2042 + // // // .nick_name ==
  2043 + // // // '' ||
  2044 + // // // detailEntity
  2045 + // // // .nick_name ==
  2046 + // // // null,
  2047 + // // // child:
  2048 + // // RowMultiText(
  2049 + // // "记录人",
  2050 + // // '${detailEntity.nick_name ?? ''}' +
  2051 + // // ' ' +
  2052 + // // '${detailEntity.seller_user_phone ?? ''}',
  2053 + // // textColor: MyColours
  2054 + // // .color_515151),
  2055 + // // // ),
  2056 + // // ],
  2057 + // // ),
  2058 + // Positioned(
  2059 + // top: w(10),
  2060 + // child: Image.asset(
  2061 + // detailEntity
  2062 + // .statuImgAssets,
  2063 + // width: ScreenUtil()
  2064 + // .setWidth(114),
  2065 + // height: ScreenUtil()
  2066 + // .setWidth(56),
  2067 + // ))
  2068 + // ]),
2041 2069
2042 - RowMultiText(  
2043 - "下单时间",  
2044 - _getDateTime(  
2045 - detailEntity.cdate),  
2046 - textColor:  
2047 - MyColours.color_515151), 2070 + // RowMultiText(
  2071 + // "下单时间",
  2072 + // _getDateTime(
  2073 + // detailEntity.cdate),
  2074 + // textColor:
  2075 + // MyColours.color_515151),
2048 detailEntity.cusdem != null && 2076 detailEntity.cusdem != null &&
2049 detailEntity.cusdem != '' 2077 detailEntity.cusdem != ''
2050 ? RowMultiText( 2078 ? RowMultiText(
@@ -2071,47 +2099,47 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -2071,47 +2099,47 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
2071 }, 2099 },
2072 ), 2100 ),
2073 2101
2074 - Offstage(  
2075 - offstage:  
2076 - (detailEntity.status == "4" &&  
2077 - detailEntity.cancel !=  
2078 - null)  
2079 - ? false  
2080 - : true,  
2081 - child: Column(  
2082 - children: <Widget>[  
2083 - MyDivider(  
2084 - double.infinity,  
2085 - ScreenUtil()  
2086 - .setHeight(2)),  
2087 - RowMultiText(  
2088 - "取消原因",  
2089 - detailEntity  
2090 - .cancel?.desc ??  
2091 - "",  
2092 - textAlign: TextAlign.left,  
2093 - textColor: MyColours  
2094 - .color_515151),  
2095 - RowMultiText(  
2096 - "取消时间",  
2097 - detailEntity.cancel  
2098 - ?.cdateStr ??  
2099 - "",  
2100 - textColor: MyColours  
2101 - .color_515151),  
2102 - RowMultiText(  
2103 - "操作人",  
2104 - detailEntity.abolition ==  
2105 - '2'  
2106 - ? '顾客在线取消'  
2107 - : detailEntity.cancel  
2108 - ?.uname ??  
2109 - "",  
2110 - textColor: MyColours  
2111 - .color_515151),  
2112 - ],  
2113 - ),  
2114 - ), 2102 + // Offstage(
  2103 + // offstage:
  2104 + // (detailEntity.status == "4" &&
  2105 + // detailEntity.cancel !=
  2106 + // null)
  2107 + // ? false
  2108 + // : true,
  2109 + // child: Column(
  2110 + // children: <Widget>[
  2111 + // MyDivider(
  2112 + // double.infinity,
  2113 + // ScreenUtil()
  2114 + // .setHeight(2)),
  2115 + // RowMultiText(
  2116 + // "取消原因",
  2117 + // detailEntity
  2118 + // .cancel?.desc ??
  2119 + // "",
  2120 + // textAlign: TextAlign.left,
  2121 + // textColor: MyColours
  2122 + // .color_515151),
  2123 + // RowMultiText(
  2124 + // "取消时间",
  2125 + // detailEntity.cancel
  2126 + // ?.cdateStr ??
  2127 + // "",
  2128 + // textColor: MyColours
  2129 + // .color_515151),
  2130 + // RowMultiText(
  2131 + // "操作人",
  2132 + // detailEntity.abolition ==
  2133 + // '2'
  2134 + // ? '顾客在线取消'
  2135 + // : detailEntity.cancel
  2136 + // ?.uname ??
  2137 + // "",
  2138 + // textColor: MyColours
  2139 + // .color_515151),
  2140 + // ],
  2141 + // ),
  2142 + // ),
2115 _onlineCheckEditProvider 2143 _onlineCheckEditProvider
2116 .orderInfoSunModel != 2144 .orderInfoSunModel !=
2117 null && 2145 null &&
@@ -383,242 +383,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -383,242 +383,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
383 // // errorText = value ?? ""; 383 // // errorText = value ?? "";
384 // }); 384 // });
385 385
386 -  
387 -  
388 -  
389 -  
390 -  
391 -  
392 -  
393 -  
394 -  
395 -  
396 -  
397 -  
398 -  
399 -  
400 -  
401 -  
402 -  
403 -  
404 -  
405 -  
406 -  
407 -  
408 -  
409 -  
410 -  
411 -  
412 -  
413 -  
414 -  
415 -  
416 -  
417 -  
418 -  
419 -  
420 -  
421 -  
422 -  
423 -  
424 -  
425 -  
426 -  
427 -  
428 -  
429 -  
430 -  
431 -  
432 -  
433 -  
434 -  
435 -  
436 -  
437 -  
438 -  
439 -  
440 -  
441 -  
442 -  
443 -  
444 -  
445 -  
446 -  
447 -  
448 -  
449 -  
450 -  
451 -  
452 -  
453 -  
454 -  
455 -  
456 -  
457 -  
458 -  
459 -  
460 -  
461 -  
462 -  
463 -  
464 -  
465 -  
466 -  
467 -  
468 -  
469 -  
470 -  
471 -  
472 -  
473 -  
474 -  
475 -  
476 -  
477 -  
478 -  
479 -  
480 -  
481 -  
482 -  
483 -  
484 -  
485 -  
486 -  
487 -  
488 -  
489 -  
490 -  
491 -  
492 -  
493 -  
494 -  
495 -  
496 -  
497 -  
498 -  
499 -  
500 -  
501 -  
502 -  
503 -  
504 -  
505 -  
506 -  
507 -  
508 -  
509 -  
510 -  
511 -  
512 -  
513 -  
514 -  
515 -  
516 -  
517 -  
518 -  
519 -  
520 -  
521 -  
522 -  
523 -  
524 -  
525 -  
526 -  
527 -  
528 -  
529 -  
530 -  
531 -  
532 -  
533 -  
534 -  
535 -  
536 -  
537 -  
538 -  
539 -  
540 -  
541 -  
542 -  
543 -  
544 -  
545 -  
546 -  
547 -  
548 -  
549 -  
550 -  
551 -  
552 -  
553 -  
554 -  
555 -  
556 -  
557 -  
558 -  
559 -  
560 -  
561 -  
562 -  
563 -  
564 -  
565 -  
566 -  
567 -  
568 -  
569 -  
570 -  
571 -  
572 -  
573 -  
574 -  
575 -  
576 -  
577 -  
578 -  
579 -  
580 -  
581 -  
582 -  
583 -  
584 -  
585 -  
586 -  
587 -  
588 -  
589 -  
590 -  
591 -  
592 -  
593 -  
594 -  
595 -  
596 -  
597 -  
598 -  
599 -  
600 -  
601 -  
602 -  
603 -  
604 -  
605 -  
606 -  
607 -  
608 -  
609 -  
610 -  
611 -  
612 -  
613 -  
614 -  
615 -  
616 -  
617 -  
618 -  
619 -  
620 -  
621 -  
622 }); 386 });
623 } 387 }
624 388
  1 +import 'dart:convert';
1 import 'dart:io'; 2 import 'dart:io';
2 import 'dart:ui'; 3 import 'dart:ui';
3 4
@@ -216,6 +217,13 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -216,6 +217,13 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
216 //成功之后跳回前一个页面 217 //成功之后跳回前一个页面
217 // bus.emit('refresh_coupon_list'); 218 // bus.emit('refresh_coupon_list');
218 Utils.showToast('保存成功'); 219 Utils.showToast('保存成功');
  220 + if (App.sp.containsKey('user')) {
  221 + String s = App.sp.getString('user');
  222 + User _user = User.fromJson(json.decode(s));
  223 + _user.nickName = nameStr;
  224 +
  225 + await UserModel().saveUserInfo(_user);
  226 + }
219 // EventBus().emit('changeStatusColor'); 227 // EventBus().emit('changeStatusColor');
220 if (widget.fromPage == FromPage.FromPageIfNeedCreateStore) { 228 if (widget.fromPage == FromPage.FromPageIfNeedCreateStore) {
221 _loginStore(context, widget.sunModel); 229 _loginStore(context, widget.sunModel);
@@ -224,9 +224,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { @@ -224,9 +224,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
224 String index = '0'; 224 String index = '0';
225 if (btnTitle == '活跃') { 225 if (btnTitle == '活跃') {
226 index = '1'; 226 index = '1';
227 - } else if (btnTitle == '60天未到店') { 227 + } else if (btnTitle == '60天未预订') {
228 index = '2'; 228 index = '2';
229 - } else if (btnTitle == '120天未到店') { 229 + } else if (btnTitle == '120天未预订') {
230 index = '3'; 230 index = '3';
231 } 231 }
232 NavigatorUtil.goMyCustomerListPage( 232 NavigatorUtil.goMyCustomerListPage(
@@ -254,7 +254,7 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { @@ -254,7 +254,7 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
254 style: TextStyle( 254 style: TextStyle(
255 color: btnTitle == '活跃' 255 color: btnTitle == '活跃'
256 ? MyColours.color_199095 256 ? MyColours.color_199095
257 - : btnTitle == '60天未到店' 257 + : btnTitle == '60天未预订'
258 ? MyColours.color_E89243 258 ? MyColours.color_E89243
259 : MyColours.color_E34D59, 259 : MyColours.color_E34D59,
260 fontSize: ScreenUtil().setSp(48), 260 fontSize: ScreenUtil().setSp(48),
@@ -272,9 +272,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { @@ -272,9 +272,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
272 String index = '0'; 272 String index = '0';
273 if (btnTitle == '活跃') { 273 if (btnTitle == '活跃') {
274 index = '1'; 274 index = '1';
275 - } else if (btnTitle == '60天未到店') { 275 + } else if (btnTitle == '60天未预订') {
276 index = '2'; 276 index = '2';
277 - } else if (btnTitle == '120天未到店') { 277 + } else if (btnTitle == '120天未预订') {
278 index = '3'; 278 index = '3';
279 } 279 }
280 NavigatorUtil.goMyCustomerListPage( 280 NavigatorUtil.goMyCustomerListPage(
@@ -403,12 +403,12 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { @@ -403,12 +403,12 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> {
403 HEmptyView(10), 403 HEmptyView(10),
404 _percentWidget( 404 _percentWidget(
405 '${customerProvider.guestSunmodel.sleep.count}', 405 '${customerProvider.guestSunmodel.sleep.count}',
406 - '60天未到店', 406 + '60天未预订',
407 '${customerProvider.guestSunmodel.sleep.scale}'), 407 '${customerProvider.guestSunmodel.sleep.scale}'),
408 HEmptyView(10), 408 HEmptyView(10),
409 _percentWidget( 409 _percentWidget(
410 '${customerProvider.guestSunmodel.drain.count}', 410 '${customerProvider.guestSunmodel.drain.count}',
411 - '120天未到店', 411 + '120天未预订',
412 '${customerProvider.guestSunmodel.drain.scale}'), 412 '${customerProvider.guestSunmodel.drain.scale}'),
413 ], 413 ],
414 ), 414 ),
@@ -61,7 +61,6 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -61,7 +61,6 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
61 61
62 @override 62 @override
63 void dispose() { 63 void dispose() {
64 -  
65 bus.off('refresh_store_customer_home'); 64 bus.off('refresh_store_customer_home');
66 // bus.off("refresh_coupon_list"); 65 // bus.off("refresh_coupon_list");
67 super.dispose(); 66 super.dispose();
@@ -118,9 +117,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -118,9 +117,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
118 String index = '0'; 117 String index = '0';
119 if (btnTitle == '活跃') { 118 if (btnTitle == '活跃') {
120 index = '1'; 119 index = '1';
121 - } else if (btnTitle == '60天未到店') { 120 + } else if (btnTitle == '60天未预订') {
122 index = '2'; 121 index = '2';
123 - } else if (btnTitle == '120天未到店') { 122 + } else if (btnTitle == '120天未预订') {
124 index = '3'; 123 index = '3';
125 } 124 }
126 NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid, 125 NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid,
@@ -145,7 +144,7 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -145,7 +144,7 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
145 style: TextStyle( 144 style: TextStyle(
146 color: btnTitle == '活跃' 145 color: btnTitle == '活跃'
147 ? MyColours.color_199095 146 ? MyColours.color_199095
148 - : btnTitle == '60天未到店' 147 + : btnTitle == '60天未预订'
149 ? MyColours.color_E89243 148 ? MyColours.color_E89243
150 : MyColours.color_E34D59, 149 : MyColours.color_E34D59,
151 fontSize: ScreenUtil().setSp(48), 150 fontSize: ScreenUtil().setSp(48),
@@ -163,9 +162,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -163,9 +162,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
163 String index = '0'; 162 String index = '0';
164 if (btnTitle == '活跃') { 163 if (btnTitle == '活跃') {
165 index = '1'; 164 index = '1';
166 - } else if (btnTitle == '60天未到店') { 165 + } else if (btnTitle == '60天未预订') {
167 index = '2'; 166 index = '2';
168 - } else if (btnTitle == '120天未到店') { 167 + } else if (btnTitle == '120天未预订') {
169 index = '3'; 168 index = '3';
170 } 169 }
171 NavigatorUtil.goCustomerListPage( 170 NavigatorUtil.goCustomerListPage(
@@ -211,9 +210,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -211,9 +210,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
211 210
212 // if (btnTitle == '活跃') { 211 // if (btnTitle == '活跃') {
213 // index = '1'; 212 // index = '1';
214 - // } else if (btnTitle == '60天未到店') { 213 + // } else if (btnTitle == '60天未预订') {
215 // index = '2'; 214 // index = '2';
216 - // } else if (btnTitle == '120天未到店') { 215 + // } else if (btnTitle == '120天未预订') {
217 // index = '3'; 216 // index = '3';
218 // } 217 // }
219 // if (btnTitle == '未分配') { 218 // if (btnTitle == '未分配') {
@@ -889,9 +888,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -889,9 +888,9 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
889 children: [ 888 children: [
890 _percentWidget('', '活跃', '', tap: false), 889 _percentWidget('', '活跃', '', tap: false),
891 HEmptyView(10), 890 HEmptyView(10),
892 - _percentWidget('', '60天未到店', '', tap: false), 891 + _percentWidget('', '60天未预订', '', tap: false),
893 HEmptyView(10), 892 HEmptyView(10),
894 - _percentWidget('', '120天未到店', '', tap: false), 893 + _percentWidget('', '120天未预订', '', tap: false),
895 ], 894 ],
896 ), 895 ),
897 896
@@ -1021,12 +1020,12 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { @@ -1021,12 +1020,12 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
1021 HEmptyView(10), 1020 HEmptyView(10),
1022 _percentWidget( 1021 _percentWidget(
1023 '${widget.customerProvider.storeSunmodel.sleep.count}', 1022 '${widget.customerProvider.storeSunmodel.sleep.count}',
1024 - '60天未到店', 1023 + '60天未预订',
1025 '${widget.customerProvider.storeSunmodel.sleep.scale}'), 1024 '${widget.customerProvider.storeSunmodel.sleep.scale}'),
1026 HEmptyView(10), 1025 HEmptyView(10),
1027 _percentWidget( 1026 _percentWidget(
1028 '${widget.customerProvider.storeSunmodel.drain.count}', 1027 '${widget.customerProvider.storeSunmodel.drain.count}',
1029 - '120天未到店', 1028 + '120天未预订',
1030 '${widget.customerProvider.storeSunmodel.drain.scale}'), 1029 '${widget.customerProvider.storeSunmodel.drain.scale}'),
1031 ], 1030 ],
1032 ), 1031 ),
@@ -110,9 +110,9 @@ @@ -110,9 +110,9 @@
110 // String index = '0'; 110 // String index = '0';
111 // if (btnTitle == '活跃') { 111 // if (btnTitle == '活跃') {
112 // index = '1'; 112 // index = '1';
113 -// } else if (btnTitle == '60天未到店') { 113 +// } else if (btnTitle == '60天未预订') {
114 // index = '2'; 114 // index = '2';
115 -// } else if (btnTitle == '120天未到店') { 115 +// } else if (btnTitle == '120天未预订') {
116 // index = '3'; 116 // index = '3';
117 // } 117 // }
118 // NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid, 118 // NavigatorUtil.goCustomerListPage(context, FromPage.FromPageHome, uid,
@@ -136,7 +136,7 @@ @@ -136,7 +136,7 @@
136 // style: TextStyle( 136 // style: TextStyle(
137 // color: btnTitle == '活跃' 137 // color: btnTitle == '活跃'
138 // ? MyColours.color_199095 138 // ? MyColours.color_199095
139 -// : btnTitle == '60天未到店' 139 +// : btnTitle == '60天未预订'
140 // ? MyColours.color_E89243 140 // ? MyColours.color_E89243
141 // : MyColours.color_E34D59, 141 // : MyColours.color_E34D59,
142 // fontSize: ScreenUtil().setSp(48), 142 // fontSize: ScreenUtil().setSp(48),
@@ -154,9 +154,9 @@ @@ -154,9 +154,9 @@
154 // String index = '0'; 154 // String index = '0';
155 // if (btnTitle == '活跃') { 155 // if (btnTitle == '活跃') {
156 // index = '1'; 156 // index = '1';
157 -// } else if (btnTitle == '60天未到店') { 157 +// } else if (btnTitle == '60天未预订') {
158 // index = '2'; 158 // index = '2';
159 -// } else if (btnTitle == '120天未到店') { 159 +// } else if (btnTitle == '120天未预订') {
160 // index = '3'; 160 // index = '3';
161 // } 161 // }
162 // NavigatorUtil.goCustomerListPage( 162 // NavigatorUtil.goCustomerListPage(
@@ -196,9 +196,9 @@ @@ -196,9 +196,9 @@
196 196
197 // // if (btnTitle == '活跃') { 197 // // if (btnTitle == '活跃') {
198 // // index = '1'; 198 // // index = '1';
199 -// // } else if (btnTitle == '60天未到店') { 199 +// // } else if (btnTitle == '60天未预订') {
200 // // index = '2'; 200 // // index = '2';
201 -// // } else if (btnTitle == '120天未到店') { 201 +// // } else if (btnTitle == '120天未预订') {
202 // // index = '3'; 202 // // index = '3';
203 // // } 203 // // }
204 // // if (btnTitle == '未分配') { 204 // // if (btnTitle == '未分配') {
@@ -902,12 +902,12 @@ @@ -902,12 +902,12 @@
902 // HEmptyView(10), 902 // HEmptyView(10),
903 // _percentWidget( 903 // _percentWidget(
904 // '${widget.customerProvider.storeSunmodel.sleep.count}', 904 // '${widget.customerProvider.storeSunmodel.sleep.count}',
905 -// '60天未到店', 905 +// '60天未预订',
906 // '${widget.customerProvider.storeSunmodel.sleep.scale}'), 906 // '${widget.customerProvider.storeSunmodel.sleep.scale}'),
907 // HEmptyView(10), 907 // HEmptyView(10),
908 // _percentWidget( 908 // _percentWidget(
909 // '${widget.customerProvider.storeSunmodel.drain.count}', 909 // '${widget.customerProvider.storeSunmodel.drain.count}',
910 -// '120天未到店', 910 +// '120天未预订',
911 // '${widget.customerProvider.storeSunmodel.drain.scale}'), 911 // '${widget.customerProvider.storeSunmodel.drain.scale}'),
912 // ], 912 // ],
913 // ), 913 // ),
@@ -1054,7 +1054,7 @@ @@ -1054,7 +1054,7 @@
1054 // child: MonthItem( 1054 // child: MonthItem(
1055 // countsListSunModel: countsListSunModel)); 1055 // countsListSunModel: countsListSunModel));
1056 // }), 1056 // }),
1057 -// /** 1057 +// /**
1058 // ListView.builder( 1058 // ListView.builder(
1059 // itemCount: 10, 1059 // itemCount: 10,
1060 // controller: _controller, 1060 // controller: _controller,
@@ -70,10 +70,9 @@ class _StoreCustomerHomeRightPageState @@ -70,10 +70,9 @@ class _StoreCustomerHomeRightPageState
70 messageMenuModel.uid = element.uid; 70 messageMenuModel.uid = element.uid;
71 messageMenuModel.title = element.nickName ?? element.account; 71 messageMenuModel.title = element.nickName ?? element.account;
72 messageMenuModel.select = false; 72 messageMenuModel.select = false;
73 - if(messageMenuModel.title != null){  
74 - menuTitle.add(messageMenuModel); 73 + if (messageMenuModel.title != null) {
  74 + menuTitle.add(messageMenuModel);
75 } 75 }
76 -  
77 }); 76 });
78 if (menuTitle.length > 0) { 77 if (menuTitle.length > 0) {
79 menuTitle[0].select = true; 78 menuTitle[0].select = true;
@@ -302,9 +301,9 @@ class _StoreCustomerHomeRightPageState @@ -302,9 +301,9 @@ class _StoreCustomerHomeRightPageState
302 String index = '0'; 301 String index = '0';
303 if (btnTitle == '活跃') { 302 if (btnTitle == '活跃') {
304 index = '1'; 303 index = '1';
305 - } else if (btnTitle == '60天未到店') { 304 + } else if (btnTitle == '60天未预订') {
306 index = '2'; 305 index = '2';
307 - } else if (btnTitle == '120天未到店') { 306 + } else if (btnTitle == '120天未预订') {
308 index = '3'; 307 index = '3';
309 } 308 }
310 String uid = ''; 309 String uid = '';
@@ -335,7 +334,7 @@ class _StoreCustomerHomeRightPageState @@ -335,7 +334,7 @@ class _StoreCustomerHomeRightPageState
335 style: TextStyle( 334 style: TextStyle(
336 color: btnTitle == '活跃' 335 color: btnTitle == '活跃'
337 ? MyColours.color_199095 336 ? MyColours.color_199095
338 - : btnTitle == '60天未到店' 337 + : btnTitle == '60天未预订'
339 ? MyColours.color_E89243 338 ? MyColours.color_E89243
340 : MyColours.color_E34D59, 339 : MyColours.color_E34D59,
341 fontSize: ScreenUtil().setSp(48), 340 fontSize: ScreenUtil().setSp(48),
@@ -353,9 +352,9 @@ class _StoreCustomerHomeRightPageState @@ -353,9 +352,9 @@ class _StoreCustomerHomeRightPageState
353 String index = '0'; 352 String index = '0';
354 if (btnTitle == '活跃') { 353 if (btnTitle == '活跃') {
355 index = '1'; 354 index = '1';
356 - } else if (btnTitle == '60天未到店') { 355 + } else if (btnTitle == '60天未预订') {
357 index = '2'; 356 index = '2';
358 - } else if (btnTitle == '120天未到店') { 357 + } else if (btnTitle == '120天未预订') {
359 index = '3'; 358 index = '3';
360 } 359 }
361 String uid = ''; 360 String uid = '';
@@ -401,669 +400,660 @@ class _StoreCustomerHomeRightPageState @@ -401,669 +400,660 @@ class _StoreCustomerHomeRightPageState
401 // EventBus().emit('changeStatusColor'); 400 // EventBus().emit('changeStatusColor');
402 // Navigator.pop(context); 401 // Navigator.pop(context);
403 // }), 402 // }),
404 - body: Column(children: [  
405 - Container(  
406 - color: MyColours.color_ffffff,  
407 - height: ScreenUtil().setWidth(70),  
408 - padding: EdgeInsets.only(bottom: w(12)),  
409 - margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),  
410 - child: Row(  
411 - children: [  
412 - HEmptyView(48),  
413 - Expanded(  
414 - child: SizedBox(  
415 - // height: ScreenUtil().setWidth(30),  
416 - child: ListView.builder(  
417 - itemCount: menuTitle.length,  
418 - shrinkWrap: true,  
419 - controller: _controller,  
420 - scrollDirection: Axis.horizontal,  
421 - itemBuilder: (BuildContext contxt, int index) {  
422 - return InkWell(  
423 - onTap: () {  
424 - for (MessageMenuModel item in menuTitle) {  
425 - item.select = false;  
426 - }  
427 - menuTitle[index].select = true;  
428 - setState(() {});  
429 - // _getMarketingByUid();  
430 - // _getSellerCountsList();  
431 - _getSellerCountsList(  
432 - isShowLoading: true, callback: () {});  
433 - _couponNetworkData(isShowLoading: false); 403 + body: Column(children: [
  404 + Container(
  405 + color: MyColours.color_ffffff,
  406 + height: ScreenUtil().setWidth(70),
  407 + padding: EdgeInsets.only(bottom: w(12)),
  408 + margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
  409 + child: Row(
  410 + children: [
  411 + HEmptyView(48),
  412 + Expanded(
  413 + child: SizedBox(
  414 + // height: ScreenUtil().setWidth(30),
  415 + child: ListView.builder(
  416 + itemCount: menuTitle.length,
  417 + shrinkWrap: true,
  418 + controller: _controller,
  419 + scrollDirection: Axis.horizontal,
  420 + itemBuilder: (BuildContext contxt, int index) {
  421 + return InkWell(
  422 + onTap: () {
  423 + for (MessageMenuModel item in menuTitle) {
  424 + item.select = false;
  425 + }
  426 + menuTitle[index].select = true;
  427 + setState(() {});
  428 + // _getMarketingByUid();
  429 + // _getSellerCountsList();
  430 + _getSellerCountsList(
  431 + isShowLoading: true, callback: () {});
  432 + _couponNetworkData(isShowLoading: false);
434 433
435 - // offset = 0;  
436 - // 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单 434 + // offset = 0;
  435 + // 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
437 436
438 - // if (index == 0) {  
439 - // typeid = '';  
440 - // } else if (index == 1) {  
441 - // //店内消息  
442 - // typeid = '15';  
443 - // } else if (index == 2) {  
444 - // //在线预订  
445 - // typeid = '10';  
446 - // } else if (index == 3) {  
447 - // //提前点餐  
448 - // typeid = '1';  
449 - // } else if (index == 4) {  
450 - // //在线买单  
451 - // typeid = '12';  
452 - // } else if (index == 5) {  
453 - // //会员充值  
454 - // typeid = '17';  
455 - // } else if (index == 6) {  
456 - // //存酒超期  
457 - // typeid = '18';  
458 - // }  
459 - // getMessage(typeid, showLoading: true);  
460 - },  
461 - child: Container(  
462 - // width: ScreenUtil().setWidth(104 * 2), 437 + // if (index == 0) {
  438 + // typeid = '';
  439 + // } else if (index == 1) {
  440 + // //店内消息
  441 + // typeid = '15';
  442 + // } else if (index == 2) {
  443 + // //在线预订
  444 + // typeid = '10';
  445 + // } else if (index == 3) {
  446 + // //提前点餐
  447 + // typeid = '1';
  448 + // } else if (index == 4) {
  449 + // //在线买单
  450 + // typeid = '12';
  451 + // } else if (index == 5) {
  452 + // //会员充值
  453 + // typeid = '17';
  454 + // } else if (index == 6) {
  455 + // //存酒超期
  456 + // typeid = '18';
  457 + // }
  458 + // getMessage(typeid, showLoading: true);
  459 + },
  460 + child: Container(
  461 + // width: ScreenUtil().setWidth(104 * 2),
463 462
464 - margin: EdgeInsets.only(  
465 - right: ScreenUtil().setWidth(30),  
466 - ),  
467 - padding: EdgeInsets.symmetric(  
468 - horizontal: ScreenUtil().setWidth(10),  
469 - vertical: ScreenUtil().setWidth(4)),  
470 - alignment: Alignment.center,  
471 - decoration: BoxDecoration(  
472 - borderRadius: BorderRadius.circular(  
473 - ScreenUtil().setWidth(10)),  
474 - // color: menuTitle[index].select  
475 - // ? MyColours.color_438E93  
476 - // : MyColours.color_999999,  
477 - border: Border.all(  
478 - color: menuTitle[index].select  
479 - ? MyColours.color_438E93  
480 - : MyColours.color_999999,  
481 - width: ScreenUtil().setWidth(2))),  
482 - child: Text(  
483 - menuTitle[index].title,  
484 - overflow: TextOverflow.ellipsis,  
485 - style: TextStyle(  
486 - color: menuTitle[index].select  
487 - ? MyColours.color_438E93  
488 - : MyColours.color_999999,  
489 - fontSize: ScreenUtil().setSp(24),  
490 - decoration: TextDecoration.none,  
491 - fontWeight: FontWeight.normal),  
492 - ),  
493 - ),  
494 - );  
495 - })))  
496 - ],  
497 - ),  
498 - ),  
499 - Consumer<CustomerProvider>(builder: (context, model, _) {  
500 - if (model.pageStateMyHome != PageState.Success) {  
501 - if (model.pageStateMyHome == PageState.Loading) {  
502 - return SingleChildScrollView(  
503 - controller: _controller,  
504 - child: Stack(alignment: Alignment.center, children: [  
505 - Column(children: [  
506 - VEmptyView(10),  
507 - // Stack(  
508 - // children: [  
509 - Container(  
510 - height: w(80),  
511 - color: MyColours.color_ffffff,  
512 - child: Row(  
513 - mainAxisAlignment: MainAxisAlignment.center,  
514 - children: [  
515 - Text(  
516 - '',  
517 - style: TextStyle(  
518 - color: MyColours.color_438E93,  
519 - fontSize: ScreenUtil().setSp(64),  
520 - fontWeight: FontWeight.bold),  
521 - ),  
522 - Text(  
523 - '位',  
524 - style: TextStyle(  
525 - color: MyColours.color_515151,  
526 - // fontWeight: FontWeight.bold,  
527 - fontSize: ScreenUtil().setSp(32)),  
528 - )  
529 - ], 463 + margin: EdgeInsets.only(
  464 + right: ScreenUtil().setWidth(30),
  465 + ),
  466 + padding: EdgeInsets.symmetric(
  467 + horizontal: ScreenUtil().setWidth(10),
  468 + vertical: ScreenUtil().setWidth(4)),
  469 + alignment: Alignment.center,
  470 + decoration: BoxDecoration(
  471 + borderRadius: BorderRadius.circular(
  472 + ScreenUtil().setWidth(10)),
  473 + // color: menuTitle[index].select
  474 + // ? MyColours.color_438E93
  475 + // : MyColours.color_999999,
  476 + border: Border.all(
  477 + color: menuTitle[index].select
  478 + ? MyColours.color_438E93
  479 + : MyColours.color_999999,
  480 + width: ScreenUtil().setWidth(2))),
  481 + child: Text(
  482 + menuTitle[index].title,
  483 + overflow: TextOverflow.ellipsis,
  484 + style: TextStyle(
  485 + color: menuTitle[index].select
  486 + ? MyColours.color_438E93
  487 + : MyColours.color_999999,
  488 + fontSize: ScreenUtil().setSp(24),
  489 + decoration: TextDecoration.none,
  490 + fontWeight: FontWeight.normal),
530 ), 491 ),
531 ), 492 ),
532 - VEmptyView(10),  
533 - Row(  
534 - children: [  
535 - _percentWidget('', '活跃', '', tap: false),  
536 - HEmptyView(10),  
537 - _percentWidget('', '60天未到店', '', tap: false),  
538 - HEmptyView(10),  
539 - _percentWidget('', '120天未到店', '', tap: false),  
540 - ],  
541 - ), 493 + );
  494 + })))
  495 + ],
  496 + ),
  497 + ),
  498 + Consumer<CustomerProvider>(builder: (context, model, _) {
  499 + if (model.pageStateMyHome != PageState.Success) {
  500 + if (model.pageStateMyHome == PageState.Loading) {
  501 + return SingleChildScrollView(
  502 + controller: _controller,
  503 + child: Stack(alignment: Alignment.center, children: [
  504 + Column(children: [
  505 + VEmptyView(10),
  506 + // Stack(
  507 + // children: [
  508 + Container(
  509 + height: w(80),
  510 + color: MyColours.color_ffffff,
  511 + child: Row(
  512 + mainAxisAlignment: MainAxisAlignment.center,
  513 + children: [
  514 + Text(
  515 + '',
  516 + style: TextStyle(
  517 + color: MyColours.color_438E93,
  518 + fontSize: ScreenUtil().setSp(64),
  519 + fontWeight: FontWeight.bold),
  520 + ),
  521 + Text(
  522 + '位',
  523 + style: TextStyle(
  524 + color: MyColours.color_515151,
  525 + // fontWeight: FontWeight.bold,
  526 + fontSize: ScreenUtil().setSp(32)),
  527 + )
  528 + ],
  529 + ),
  530 + ),
  531 + VEmptyView(10),
  532 + Row(
  533 + children: [
  534 + _percentWidget('', '活跃', '', tap: false),
  535 + HEmptyView(10),
  536 + _percentWidget('', '60天未预订', '', tap: false),
  537 + HEmptyView(10),
  538 + _percentWidget('', '120天未预订', '', tap: false),
  539 + ],
  540 + ),
542 541
543 - // VEmptyView(10),  
544 - // GridView.builder(  
545 - // controller: _controller,  
546 - // shrinkWrap: true,  
547 - // cacheExtent: ScreenUtil().setWidth(0),  
548 - // itemCount: 6,  
549 - // gridDelegate:  
550 - // SliverGridDelegateWithFixedCrossAxisCount(  
551 - // crossAxisCount: 3,  
552 - // childAspectRatio: 1.05,  
553 - // mainAxisSpacing:  
554 - // ScreenUtil().setWidth(10),  
555 - // crossAxisSpacing:  
556 - // ScreenUtil().setWidth(10)),  
557 - // itemBuilder: (BuildContext context, int index) {  
558 - // return _managerWidget('', '', null, '',  
559 - // uid: '', onTap: () {});  
560 - // })  
561 - ]),  
562 - Align(  
563 - alignment: Alignment.center,  
564 - child: Center(  
565 - child: Column(  
566 - mainAxisAlignment: MainAxisAlignment.center,  
567 - crossAxisAlignment: CrossAxisAlignment.center,  
568 - children: <Widget>[  
569 - ClipRRect(  
570 - borderRadius: BorderRadius.circular(10),  
571 - child: Container(  
572 - width: 200,  
573 - height: 200,  
574 - color: Colors.transparent,  
575 - child: CupertinoActivityIndicator(  
576 - color: MyColours.color_000000,  
577 - radius: 30,  
578 - ),  
579 - ))  
580 - // VEmptyView(30),  
581 - // Text(  
582 - // '加载中,请稍后...',  
583 - // style: TextStyle(  
584 - // color: MyColours.color_666666,  
585 - // fontSize: ScreenUtil().setSp(24)),  
586 - // )  
587 - ],  
588 - ),  
589 - ))  
590 - ]));  
591 - }  
592 - return Expanded(  
593 - child: ExceptionPage(  
594 - pageState: model.pageStateMyHome,  
595 - callback: () {  
596 - _couponNetworkData(); 542 + // VEmptyView(10),
  543 + // GridView.builder(
  544 + // controller: _controller,
  545 + // shrinkWrap: true,
  546 + // cacheExtent: ScreenUtil().setWidth(0),
  547 + // itemCount: 6,
  548 + // gridDelegate:
  549 + // SliverGridDelegateWithFixedCrossAxisCount(
  550 + // crossAxisCount: 3,
  551 + // childAspectRatio: 1.05,
  552 + // mainAxisSpacing:
  553 + // ScreenUtil().setWidth(10),
  554 + // crossAxisSpacing:
  555 + // ScreenUtil().setWidth(10)),
  556 + // itemBuilder: (BuildContext context, int index) {
  557 + // return _managerWidget('', '', null, '',
  558 + // uid: '', onTap: () {});
  559 + // })
  560 + ]),
  561 + Align(
  562 + alignment: Alignment.center,
  563 + child: Center(
  564 + child: Column(
  565 + mainAxisAlignment: MainAxisAlignment.center,
  566 + crossAxisAlignment: CrossAxisAlignment.center,
  567 + children: <Widget>[
  568 + ClipRRect(
  569 + borderRadius: BorderRadius.circular(10),
  570 + child: Container(
  571 + width: 200,
  572 + height: 200,
  573 + color: Colors.transparent,
  574 + child: CupertinoActivityIndicator(
  575 + color: MyColours.color_000000,
  576 + radius: 30,
  577 + ),
  578 + ))
  579 + // VEmptyView(30),
  580 + // Text(
  581 + // '加载中,请稍后...',
  582 + // style: TextStyle(
  583 + // color: MyColours.color_666666,
  584 + // fontSize: ScreenUtil().setSp(24)),
  585 + // )
  586 + ],
  587 + ),
  588 + ))
  589 + ]));
  590 + }
  591 + return Expanded(
  592 + child: ExceptionPage(
  593 + pageState: model.pageStateMyHome,
  594 + callback: () {
  595 + _couponNetworkData();
597 596
598 - // _getMarketingByUid();  
599 - _getSellerCountsList();  
600 - },  
601 - emptyMsg: "暂时没有我的客情哦",  
602 - emptyImg: "empty_search",  
603 - showMsg: "加载中,请稍后...",  
604 - ));  
605 - } else {  
606 - return Expanded(  
607 - child: SingleChildScrollView(  
608 - controller: _controller,  
609 - child: Column(  
610 - children: [  
611 - // VEmptyView(10), 597 + // _getMarketingByUid();
  598 + _getSellerCountsList();
  599 + },
  600 + emptyMsg: "暂时没有我的客情哦",
  601 + emptyImg: "empty_search",
  602 + showMsg: "加载中,请稍后...",
  603 + ));
  604 + } else {
  605 + return Expanded(
  606 + child: SingleChildScrollView(
  607 + controller: _controller,
  608 + child: Column(
  609 + children: [
  610 + // VEmptyView(10),
612 611
613 - if (widget.customerProvider.guestSunmodel != null)  
614 - Column(  
615 - children: [  
616 - InkWell(  
617 - onTap: () {  
618 - String uid = '';  
619 - menuTitle.forEach((element) {  
620 - if (element.select) {  
621 - uid = element.uid;  
622 - }  
623 - });  
624 - NavigatorUtil.goMyCustomerListPage(context,  
625 - FromPage.FromPageMyCustomer, uid);  
626 - },  
627 - child: Container(  
628 - height: w(80),  
629 - color: MyColours.color_ffffff,  
630 - child: Row(  
631 - mainAxisAlignment:  
632 - MainAxisAlignment.center,  
633 - children: [  
634 - // Text(  
635 - // '累计',  
636 - // style: TextStyle(  
637 - // color: MyColours.color_515151,  
638 - // fontWeight: FontWeight.bold,  
639 - // fontSize: ScreenUtil().setSp(32)),  
640 - // ),  
641 - Text(  
642 - '${widget.customerProvider.guestSunmodel.myCustomer}',  
643 - style: TextStyle(  
644 - color: MyColours.color_199095,  
645 - fontSize: ScreenUtil().setSp(64),  
646 - fontWeight: FontWeight.bold),  
647 - ),  
648 - Text(  
649 - '位',  
650 - style: TextStyle(  
651 - color: MyColours.color_515151,  
652 - fontWeight: FontWeight.bold,  
653 - fontSize: ScreenUtil().setSp(32)),  
654 - )  
655 - ],  
656 - ),  
657 - )),  
658 - VEmptyView(10),  
659 - // GridView.builder(  
660 - // controller: _controller,  
661 - // shrinkWrap: true,  
662 - // cacheExtent: ScreenUtil().setWidth(0),  
663 - // itemCount: 3,  
664 - // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(  
665 - // crossAxisCount: 3,  
666 - // childAspectRatio: 1,  
667 - // mainAxisSpacing: ScreenUtil().setWidth(10),  
668 - // crossAxisSpacing: ScreenUtil().setWidth(10)),  
669 - // itemBuilder: (BuildContext context, int index) {  
670 - // // locationState = state;  
671 - // return _percentWidget(  
672 - // '${widget.customerProvider.guestSunmodel.active.count}',  
673 - // '活跃客户',  
674 - // '${widget.customerProvider.guestSunmodel.active.scale}');  
675 - // }),  
676 - Row(  
677 - children: [  
678 - _percentWidget(  
679 - '${widget.customerProvider.guestSunmodel.active.count}',  
680 - '活跃',  
681 - '${widget.customerProvider.guestSunmodel.active.scale}'),  
682 - HEmptyView(10),  
683 - _percentWidget(  
684 - '${widget.customerProvider.guestSunmodel.sleep.count}',  
685 - '60天未到店',  
686 - '${widget.customerProvider.guestSunmodel.sleep.scale}'),  
687 - HEmptyView(10),  
688 - _percentWidget(  
689 - '${widget.customerProvider.guestSunmodel.drain.count}',  
690 - '120天未到店',  
691 - '${widget.customerProvider.guestSunmodel.drain.scale}'),  
692 - ],  
693 - ),  
694 - ],  
695 - ), 612 + if (widget.customerProvider.guestSunmodel != null)
  613 + Column(
  614 + children: [
  615 + InkWell(
  616 + onTap: () {
  617 + String uid = '';
  618 + menuTitle.forEach((element) {
  619 + if (element.select) {
  620 + uid = element.uid;
  621 + }
  622 + });
  623 + NavigatorUtil.goMyCustomerListPage(
  624 + context, FromPage.FromPageMyCustomer, uid);
  625 + },
  626 + child: Container(
  627 + height: w(80),
  628 + color: MyColours.color_ffffff,
  629 + child: Row(
  630 + mainAxisAlignment: MainAxisAlignment.center,
  631 + children: [
  632 + // Text(
  633 + // '累计',
  634 + // style: TextStyle(
  635 + // color: MyColours.color_515151,
  636 + // fontWeight: FontWeight.bold,
  637 + // fontSize: ScreenUtil().setSp(32)),
  638 + // ),
  639 + Text(
  640 + '${widget.customerProvider.guestSunmodel.myCustomer}',
  641 + style: TextStyle(
  642 + color: MyColours.color_199095,
  643 + fontSize: ScreenUtil().setSp(64),
  644 + fontWeight: FontWeight.bold),
  645 + ),
  646 + Text(
  647 + '位',
  648 + style: TextStyle(
  649 + color: MyColours.color_515151,
  650 + fontWeight: FontWeight.bold,
  651 + fontSize: ScreenUtil().setSp(32)),
  652 + )
  653 + ],
  654 + ),
  655 + )),
  656 + VEmptyView(10),
  657 + // GridView.builder(
  658 + // controller: _controller,
  659 + // shrinkWrap: true,
  660 + // cacheExtent: ScreenUtil().setWidth(0),
  661 + // itemCount: 3,
  662 + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  663 + // crossAxisCount: 3,
  664 + // childAspectRatio: 1,
  665 + // mainAxisSpacing: ScreenUtil().setWidth(10),
  666 + // crossAxisSpacing: ScreenUtil().setWidth(10)),
  667 + // itemBuilder: (BuildContext context, int index) {
  668 + // // locationState = state;
  669 + // return _percentWidget(
  670 + // '${widget.customerProvider.guestSunmodel.active.count}',
  671 + // '活跃客户',
  672 + // '${widget.customerProvider.guestSunmodel.active.scale}');
  673 + // }),
  674 + Row(
  675 + children: [
  676 + _percentWidget(
  677 + '${widget.customerProvider.guestSunmodel.active.count}',
  678 + '活跃',
  679 + '${widget.customerProvider.guestSunmodel.active.scale}'),
  680 + HEmptyView(10),
  681 + _percentWidget(
  682 + '${widget.customerProvider.guestSunmodel.sleep.count}',
  683 + '60天未预订',
  684 + '${widget.customerProvider.guestSunmodel.sleep.scale}'),
  685 + HEmptyView(10),
  686 + _percentWidget(
  687 + '${widget.customerProvider.guestSunmodel.drain.count}',
  688 + '120天未预订',
  689 + '${widget.customerProvider.guestSunmodel.drain.scale}'),
  690 + ],
  691 + ),
  692 + ],
  693 + ),
696 694
697 - // ListView.builder(  
698 - // controller: _controller,  
699 - // shrinkWrap: true,  
700 - // cacheExtent: ScreenUtil().setWidth(0),  
701 - // itemCount: widget.customerProvider.guestSunmodel  
702 - // .tips.task ==  
703 - // null ||  
704 - // widget.customerProvider.guestSunmodel.tips  
705 - // .task.length ==  
706 - // 0  
707 - // ? 0  
708 - // : widget.customerProvider.guestSunmodel.tips  
709 - // .task.length,  
710 - // itemBuilder: (BuildContext context, int index) {  
711 - // // locationState = state;  
712 - // Task data = widget.customerProvider.guestSunmodel  
713 - // .tips.task[index];  
714 - // return Column(  
715 - // children: [  
716 - // VEmptyView(10),  
717 - // Container(  
718 - // color: MyColours.color_ffffff,  
719 - // padding: EdgeInsets.symmetric(  
720 - // horizontal: ScreenUtil().setWidth(20),  
721 - // vertical: ScreenUtil().setWidth(30)),  
722 - // child: Row(  
723 - // children: [  
724 - // Image.asset(  
725 - // Utils.getImgPath('warning'),  
726 - // width: ScreenUtil().setWidth(42),  
727 - // ),  
728 - // HEmptyView(15),  
729 - // Expanded(  
730 - // child: Column(  
731 - // crossAxisAlignment:  
732 - // CrossAxisAlignment.start,  
733 - // children: [  
734 - // Text(  
735 - // '店内任务:${data.content}',  
736 - // maxLines: 1,  
737 - // overflow: TextOverflow.ellipsis,  
738 - // style: TextStyle(  
739 - // color: MyColours.color_333333,  
740 - // fontSize:  
741 - // ScreenUtil().setSp(32)),  
742 - // ),  
743 - // data.aid != null &&  
744 - // data.aidStr != null  
745 - // ? Padding(  
746 - // padding: EdgeInsets.only(  
747 - // top: ScreenUtil()  
748 - // .setWidth(8)),  
749 - // child: Text(  
750 - // '优惠内容:${data.aidStr}',  
751 - // maxLines: 1,  
752 - // overflow:  
753 - // TextOverflow.ellipsis,  
754 - // style: TextStyle(  
755 - // color: MyColours  
756 - // .color_333333,  
757 - // fontSize: ScreenUtil()  
758 - // .setSp(24)),  
759 - // ),  
760 - // )  
761 - // : SizedBox(),  
762 - // VEmptyView(8),  
763 - // Text(  
764 - // '创建人:${data.createUser}',  
765 - // maxLines: 1,  
766 - // overflow: TextOverflow.ellipsis,  
767 - // style: TextStyle(  
768 - // color: MyColours.color_333333,  
769 - // fontSize:  
770 - // ScreenUtil().setSp(26)),  
771 - // )  
772 - // ],  
773 - // )),  
774 - // HEmptyView(20),  
775 - // Column(children: [  
776 - // RoundButton(  
777 - // text: '立即完成', 695 + // ListView.builder(
  696 + // controller: _controller,
  697 + // shrinkWrap: true,
  698 + // cacheExtent: ScreenUtil().setWidth(0),
  699 + // itemCount: widget.customerProvider.guestSunmodel
  700 + // .tips.task ==
  701 + // null ||
  702 + // widget.customerProvider.guestSunmodel.tips
  703 + // .task.length ==
  704 + // 0
  705 + // ? 0
  706 + // : widget.customerProvider.guestSunmodel.tips
  707 + // .task.length,
  708 + // itemBuilder: (BuildContext context, int index) {
  709 + // // locationState = state;
  710 + // Task data = widget.customerProvider.guestSunmodel
  711 + // .tips.task[index];
  712 + // return Column(
  713 + // children: [
  714 + // VEmptyView(10),
  715 + // Container(
  716 + // color: MyColours.color_ffffff,
  717 + // padding: EdgeInsets.symmetric(
  718 + // horizontal: ScreenUtil().setWidth(20),
  719 + // vertical: ScreenUtil().setWidth(30)),
  720 + // child: Row(
  721 + // children: [
  722 + // Image.asset(
  723 + // Utils.getImgPath('warning'),
  724 + // width: ScreenUtil().setWidth(42),
  725 + // ),
  726 + // HEmptyView(15),
  727 + // Expanded(
  728 + // child: Column(
  729 + // crossAxisAlignment:
  730 + // CrossAxisAlignment.start,
  731 + // children: [
  732 + // Text(
  733 + // '店内任务:${data.content}',
  734 + // maxLines: 1,
  735 + // overflow: TextOverflow.ellipsis,
  736 + // style: TextStyle(
  737 + // color: MyColours.color_333333,
  738 + // fontSize:
  739 + // ScreenUtil().setSp(32)),
  740 + // ),
  741 + // data.aid != null &&
  742 + // data.aidStr != null
  743 + // ? Padding(
  744 + // padding: EdgeInsets.only(
  745 + // top: ScreenUtil()
  746 + // .setWidth(8)),
  747 + // child: Text(
  748 + // '优惠内容:${data.aidStr}',
  749 + // maxLines: 1,
  750 + // overflow:
  751 + // TextOverflow.ellipsis,
  752 + // style: TextStyle(
  753 + // color: MyColours
  754 + // .color_333333,
  755 + // fontSize: ScreenUtil()
  756 + // .setSp(24)),
  757 + // ),
  758 + // )
  759 + // : SizedBox(),
  760 + // VEmptyView(8),
  761 + // Text(
  762 + // '创建人:${data.createUser}',
  763 + // maxLines: 1,
  764 + // overflow: TextOverflow.ellipsis,
  765 + // style: TextStyle(
  766 + // color: MyColours.color_333333,
  767 + // fontSize:
  768 + // ScreenUtil().setSp(26)),
  769 + // )
  770 + // ],
  771 + // )),
  772 + // HEmptyView(20),
  773 + // Column(children: [
  774 + // RoundButton(
  775 + // text: '立即完成',
778 776
779 - // padding: EdgeInsets.symmetric(  
780 - // horizontal:  
781 - // ScreenUtil().setWidth(26)),  
782 - // gradientStart:  
783 - // MyColours.color_199095,  
784 - // gradientEnd: MyColours.color_199095,  
785 - // // borderColor: MyColours.color_999999,  
786 - // radius: ScreenUtil().setWidth(40),  
787 - // height: ScreenUtil().setWidth(64),  
788 - // width: ScreenUtil().setWidth(180),  
789 - // fontSize: 26,  
790 - // isBold: false,  
791 - // onPressed: () {  
792 - // SellerList sellerList =  
793 - // SellerList.fromJson(  
794 - // json.decode(  
795 - // json.encode(data)));  
796 - // NavigatorUtil  
797 - // .goMyMakeMarkingPageOnlyShow(  
798 - // context, sellerList);  
799 - // },  
800 - // ),  
801 - // data.remainingTime != null  
802 - // ? Padding(  
803 - // padding: EdgeInsets.only(  
804 - // top: ScreenUtil()  
805 - // .setWidth(6)),  
806 - // child: Text(  
807 - // '${data.remainingTime}天内',  
808 - // maxLines: 1,  
809 - // overflow:  
810 - // TextOverflow.ellipsis,  
811 - // style: TextStyle(  
812 - // color: Color.fromRGBO(  
813 - // 215, 30, 40, 1),  
814 - // fontSize: ScreenUtil()  
815 - // .setSp(26)),  
816 - // ))  
817 - // : SizedBox()  
818 - // ])  
819 - // ],  
820 - // ),  
821 - // ),  
822 - // ],  
823 - // );  
824 - // }),  
825 - // ListView.builder(  
826 - // controller: _controller,  
827 - // shrinkWrap: true,  
828 - // cacheExtent: ScreenUtil().setWidth(0),  
829 - // itemCount: widget.customerProvider.guestSunmodel  
830 - // .tips.recover ==  
831 - // null ||  
832 - // widget.customerProvider.guestSunmodel.tips  
833 - // .recover.length ==  
834 - // 0  
835 - // ? 0  
836 - // : 1,  
837 - // itemBuilder: (BuildContext context, int index) {  
838 - // // locationState = state; 777 + // padding: EdgeInsets.symmetric(
  778 + // horizontal:
  779 + // ScreenUtil().setWidth(26)),
  780 + // gradientStart:
  781 + // MyColours.color_199095,
  782 + // gradientEnd: MyColours.color_199095,
  783 + // // borderColor: MyColours.color_999999,
  784 + // radius: ScreenUtil().setWidth(40),
  785 + // height: ScreenUtil().setWidth(64),
  786 + // width: ScreenUtil().setWidth(180),
  787 + // fontSize: 26,
  788 + // isBold: false,
  789 + // onPressed: () {
  790 + // SellerList sellerList =
  791 + // SellerList.fromJson(
  792 + // json.decode(
  793 + // json.encode(data)));
  794 + // NavigatorUtil
  795 + // .goMyMakeMarkingPageOnlyShow(
  796 + // context, sellerList);
  797 + // },
  798 + // ),
  799 + // data.remainingTime != null
  800 + // ? Padding(
  801 + // padding: EdgeInsets.only(
  802 + // top: ScreenUtil()
  803 + // .setWidth(6)),
  804 + // child: Text(
  805 + // '${data.remainingTime}天内',
  806 + // maxLines: 1,
  807 + // overflow:
  808 + // TextOverflow.ellipsis,
  809 + // style: TextStyle(
  810 + // color: Color.fromRGBO(
  811 + // 215, 30, 40, 1),
  812 + // fontSize: ScreenUtil()
  813 + // .setSp(26)),
  814 + // ))
  815 + // : SizedBox()
  816 + // ])
  817 + // ],
  818 + // ),
  819 + // ),
  820 + // ],
  821 + // );
  822 + // }),
  823 + // ListView.builder(
  824 + // controller: _controller,
  825 + // shrinkWrap: true,
  826 + // cacheExtent: ScreenUtil().setWidth(0),
  827 + // itemCount: widget.customerProvider.guestSunmodel
  828 + // .tips.recover ==
  829 + // null ||
  830 + // widget.customerProvider.guestSunmodel.tips
  831 + // .recover.length ==
  832 + // 0
  833 + // ? 0
  834 + // : 1,
  835 + // itemBuilder: (BuildContext context, int index) {
  836 + // // locationState = state;
839 837
840 - // return Column(  
841 - // children: [  
842 - // VEmptyView(10),  
843 - // Container(  
844 - // color: MyColours.color_ffffff,  
845 - // padding: EdgeInsets.symmetric(  
846 - // horizontal: ScreenUtil().setWidth(20),  
847 - // vertical: ScreenUtil().setWidth(30)),  
848 - // child: Row(  
849 - // children: [  
850 - // Image.asset(  
851 - // Utils.getImgPath('warning'),  
852 - // width: ScreenUtil().setWidth(42),  
853 - // ),  
854 - // HEmptyView(15),  
855 - // Expanded(  
856 - // child: Text(  
857 - // '${widget.customerProvider.guestSunmodel.tips.recover[0]}',  
858 - // maxLines: 10,  
859 - // overflow: TextOverflow.ellipsis,  
860 - // style: TextStyle(  
861 - // color: MyColours.color_333333,  
862 - // fontSize: ScreenUtil().setSp(32)),  
863 - // )),  
864 - // HEmptyView(20),  
865 - // RoundButton(  
866 - // text: '一键追回',  
867 - // padding: EdgeInsets.symmetric(  
868 - // horizontal:  
869 - // ScreenUtil().setWidth(26)),  
870 - // gradientStart: MyColours.color_199095,  
871 - // gradientEnd: MyColours.color_199095,  
872 - // // borderColor: MyColours.color_999999,  
873 - // radius: ScreenUtil().setWidth(40),  
874 - // height: ScreenUtil().setWidth(64),  
875 - // width: ScreenUtil().setWidth(180),  
876 - // fontSize: 26,  
877 - // isBold: false,  
878 - // onPressed: () {  
879 - // String uid = '';  
880 - // menuTitle.forEach((element) {  
881 - // if (element.select) {  
882 - // uid = element.uid;  
883 - // }  
884 - // });  
885 - // NavigatorUtil.goMyMakeMarkingPage(  
886 - // context, uid,  
887 - // fromPage: FromPage  
888 - // .FromPageMyCustomer,  
889 - // homeGid:  
890 - // Utils.listToStringEnglish1(  
891 - // widget  
892 - // .customerProvider  
893 - // .guestSunmodel  
894 - // .tips  
895 - // .recover[1]));  
896 - // },  
897 - // ),  
898 - // ],  
899 - // ),  
900 - // ),  
901 - // ],  
902 - // );  
903 - // }),  
904 - // ListView.builder(  
905 - // controller: _controller,  
906 - // shrinkWrap: true,  
907 - // cacheExtent: ScreenUtil().setWidth(0),  
908 - // itemCount: widget.customerProvider.guestSunmodel  
909 - // .tips.awaken ==  
910 - // null ||  
911 - // widget.customerProvider.guestSunmodel.tips  
912 - // .awaken.length ==  
913 - // 0  
914 - // ? 0  
915 - // : 1,  
916 - // itemBuilder: (BuildContext context, int index) {  
917 - // // locationState = state; 838 + // return Column(
  839 + // children: [
  840 + // VEmptyView(10),
  841 + // Container(
  842 + // color: MyColours.color_ffffff,
  843 + // padding: EdgeInsets.symmetric(
  844 + // horizontal: ScreenUtil().setWidth(20),
  845 + // vertical: ScreenUtil().setWidth(30)),
  846 + // child: Row(
  847 + // children: [
  848 + // Image.asset(
  849 + // Utils.getImgPath('warning'),
  850 + // width: ScreenUtil().setWidth(42),
  851 + // ),
  852 + // HEmptyView(15),
  853 + // Expanded(
  854 + // child: Text(
  855 + // '${widget.customerProvider.guestSunmodel.tips.recover[0]}',
  856 + // maxLines: 10,
  857 + // overflow: TextOverflow.ellipsis,
  858 + // style: TextStyle(
  859 + // color: MyColours.color_333333,
  860 + // fontSize: ScreenUtil().setSp(32)),
  861 + // )),
  862 + // HEmptyView(20),
  863 + // RoundButton(
  864 + // text: '一键追回',
  865 + // padding: EdgeInsets.symmetric(
  866 + // horizontal:
  867 + // ScreenUtil().setWidth(26)),
  868 + // gradientStart: MyColours.color_199095,
  869 + // gradientEnd: MyColours.color_199095,
  870 + // // borderColor: MyColours.color_999999,
  871 + // radius: ScreenUtil().setWidth(40),
  872 + // height: ScreenUtil().setWidth(64),
  873 + // width: ScreenUtil().setWidth(180),
  874 + // fontSize: 26,
  875 + // isBold: false,
  876 + // onPressed: () {
  877 + // String uid = '';
  878 + // menuTitle.forEach((element) {
  879 + // if (element.select) {
  880 + // uid = element.uid;
  881 + // }
  882 + // });
  883 + // NavigatorUtil.goMyMakeMarkingPage(
  884 + // context, uid,
  885 + // fromPage: FromPage
  886 + // .FromPageMyCustomer,
  887 + // homeGid:
  888 + // Utils.listToStringEnglish1(
  889 + // widget
  890 + // .customerProvider
  891 + // .guestSunmodel
  892 + // .tips
  893 + // .recover[1]));
  894 + // },
  895 + // ),
  896 + // ],
  897 + // ),
  898 + // ),
  899 + // ],
  900 + // );
  901 + // }),
  902 + // ListView.builder(
  903 + // controller: _controller,
  904 + // shrinkWrap: true,
  905 + // cacheExtent: ScreenUtil().setWidth(0),
  906 + // itemCount: widget.customerProvider.guestSunmodel
  907 + // .tips.awaken ==
  908 + // null ||
  909 + // widget.customerProvider.guestSunmodel.tips
  910 + // .awaken.length ==
  911 + // 0
  912 + // ? 0
  913 + // : 1,
  914 + // itemBuilder: (BuildContext context, int index) {
  915 + // // locationState = state;
918 916
919 - // return Column(  
920 - // children: [  
921 - // VEmptyView(10),  
922 - // Container(  
923 - // color: MyColours.color_ffffff,  
924 - // padding: EdgeInsets.symmetric(  
925 - // horizontal: ScreenUtil().setWidth(20),  
926 - // vertical: ScreenUtil().setWidth(30)),  
927 - // child: Row(  
928 - // children: [  
929 - // Image.asset(  
930 - // Utils.getImgPath('warning'),  
931 - // width: ScreenUtil().setWidth(42),  
932 - // ),  
933 - // HEmptyView(15),  
934 - // Expanded(  
935 - // child: Text(  
936 - // '${widget.customerProvider.guestSunmodel.tips.awaken[0]}',  
937 - // maxLines: 10,  
938 - // overflow: TextOverflow.ellipsis,  
939 - // style: TextStyle(  
940 - // color: MyColours.color_333333,  
941 - // fontSize: ScreenUtil().setSp(32)),  
942 - // )),  
943 - // HEmptyView(20),  
944 - // RoundButton(  
945 - // text: '一键唤醒',  
946 - // padding: EdgeInsets.symmetric(  
947 - // horizontal:  
948 - // ScreenUtil().setWidth(26)),  
949 - // gradientStart: MyColours.color_199095,  
950 - // gradientEnd: MyColours.color_199095,  
951 - // // borderColor: MyColours.color_999999,  
952 - // radius: ScreenUtil().setWidth(40),  
953 - // height: ScreenUtil().setWidth(64),  
954 - // width: ScreenUtil().setWidth(180),  
955 - // fontSize: 26,  
956 - // isBold: false,  
957 - // onPressed: () {  
958 - // String uid = '';  
959 - // menuTitle.forEach((element) {  
960 - // if (element.select) {  
961 - // uid = element.uid;  
962 - // }  
963 - // });  
964 - // NavigatorUtil.goMyMakeMarkingPage(  
965 - // context, uid,  
966 - // fromPage: FromPage  
967 - // .FromPageMyCustomer,  
968 - // homeGid:  
969 - // Utils.listToStringEnglish1(  
970 - // widget  
971 - // .customerProvider  
972 - // .guestSunmodel  
973 - // .tips  
974 - // .awaken[1]));  
975 - // },  
976 - // ),  
977 - // ],  
978 - // ),  
979 - // ),  
980 - // ],  
981 - // );  
982 - // }),  
983 - if (widget.customerProvider.managerStatisticsList !=  
984 - null &&  
985 - widget.customerProvider.managerStatisticsList  
986 - .length >  
987 - 0)  
988 - Column(  
989 - children: [  
990 - _chart(),  
991 - ListView.builder(  
992 - itemCount: widget.customerProvider  
993 - .managerStatisticsList.length,  
994 - shrinkWrap: true,  
995 - controller: _controller,  
996 - padding:  
997 - EdgeInsets.symmetric(horizontal: w(10)),  
998 - itemBuilder: (context, index) {  
999 - SellerCountsListSunModel  
1000 - countsListSunModel = widget  
1001 - .customerProvider  
1002 - .managerStatisticsList[index];  
1003 - return InkWell(  
1004 - onTap: () {  
1005 - String uid = '';  
1006 - menuTitle.forEach((element) {  
1007 - if (element.select) {  
1008 - uid = element.uid;  
1009 - }  
1010 - });  
1011 - NavigatorUtil.goMonthOrderPage(  
1012 - context,  
1013 - year.toString(),  
1014 - countsListSunModel.monthss  
1015 - .toString(),  
1016 - uid: uid);  
1017 - },  
1018 - child: MonthItem(  
1019 - countsListSunModel:  
1020 - countsListSunModel));  
1021 - })  
1022 - ],  
1023 - )  
1024 - ],  
1025 - ),  
1026 - ));  
1027 - }  
1028 - })  
1029 - // Container(  
1030 - // color: MyColours.color_FAFAFA,  
1031 - // padding: EdgeInsets.only(  
1032 - // top: w(13), bottom: w(26), left: w(45), right: (45)),  
1033 - // child: Stack(  
1034 - // children: [  
1035 - // RoundButton(  
1036 - // onPressed: () {  
1037 - // NavigatorUtil.goMyMarketingRecordsPage(  
1038 - // context, FromPage.FromPageMyCustomer);  
1039 - // },  
1040 - // text: '历史营销记录',  
1041 - // fontSize: 32,  
1042 - // isBold: true,  
1043 - // // margin: EdgeInsets.only(  
1044 - // // top: w(13),  
1045 - // // bottom: w(26),  
1046 - // // left: w(45),  
1047 - // // right: (45)),  
1048 - // textColor: MyColours.color_F8F9FD,  
1049 - // gradientStart: MyColours.color_199095,  
1050 - // gradientEnd: MyColours.color_199095,  
1051 - // borderColor: MyColours.color_199095,  
1052 - // height: ScreenUtil().setWidth(86),  
1053 - // // width: ScreenUtil().setWidth(260),  
1054 - // radius: ScreenUtil().setWidth(10),  
1055 - // ),  
1056 - // showWarning  
1057 - // ? Positioned(  
1058 - // right: ScreenUtil().setWidth(30),  
1059 - // top: ScreenUtil().setWidth(45 / 2),  
1060 - // child: Image.asset(  
1061 - // Utils.getImgPath('warning'),  
1062 - // width: ScreenUtil().setWidth(35),  
1063 - // ))  
1064 - // : SizedBox()  
1065 - // ],  
1066 - // ))  
1067 - ])); 917 + // return Column(
  918 + // children: [
  919 + // VEmptyView(10),
  920 + // Container(
  921 + // color: MyColours.color_ffffff,
  922 + // padding: EdgeInsets.symmetric(
  923 + // horizontal: ScreenUtil().setWidth(20),
  924 + // vertical: ScreenUtil().setWidth(30)),
  925 + // child: Row(
  926 + // children: [
  927 + // Image.asset(
  928 + // Utils.getImgPath('warning'),
  929 + // width: ScreenUtil().setWidth(42),
  930 + // ),
  931 + // HEmptyView(15),
  932 + // Expanded(
  933 + // child: Text(
  934 + // '${widget.customerProvider.guestSunmodel.tips.awaken[0]}',
  935 + // maxLines: 10,
  936 + // overflow: TextOverflow.ellipsis,
  937 + // style: TextStyle(
  938 + // color: MyColours.color_333333,
  939 + // fontSize: ScreenUtil().setSp(32)),
  940 + // )),
  941 + // HEmptyView(20),
  942 + // RoundButton(
  943 + // text: '一键唤醒',
  944 + // padding: EdgeInsets.symmetric(
  945 + // horizontal:
  946 + // ScreenUtil().setWidth(26)),
  947 + // gradientStart: MyColours.color_199095,
  948 + // gradientEnd: MyColours.color_199095,
  949 + // // borderColor: MyColours.color_999999,
  950 + // radius: ScreenUtil().setWidth(40),
  951 + // height: ScreenUtil().setWidth(64),
  952 + // width: ScreenUtil().setWidth(180),
  953 + // fontSize: 26,
  954 + // isBold: false,
  955 + // onPressed: () {
  956 + // String uid = '';
  957 + // menuTitle.forEach((element) {
  958 + // if (element.select) {
  959 + // uid = element.uid;
  960 + // }
  961 + // });
  962 + // NavigatorUtil.goMyMakeMarkingPage(
  963 + // context, uid,
  964 + // fromPage: FromPage
  965 + // .FromPageMyCustomer,
  966 + // homeGid:
  967 + // Utils.listToStringEnglish1(
  968 + // widget
  969 + // .customerProvider
  970 + // .guestSunmodel
  971 + // .tips
  972 + // .awaken[1]));
  973 + // },
  974 + // ),
  975 + // ],
  976 + // ),
  977 + // ),
  978 + // ],
  979 + // );
  980 + // }),
  981 + if (widget.customerProvider.managerStatisticsList != null &&
  982 + widget.customerProvider.managerStatisticsList.length > 0)
  983 + Column(
  984 + children: [
  985 + _chart(),
  986 + ListView.builder(
  987 + itemCount: widget
  988 + .customerProvider.managerStatisticsList.length,
  989 + shrinkWrap: true,
  990 + controller: _controller,
  991 + padding: EdgeInsets.symmetric(horizontal: w(10)),
  992 + itemBuilder: (context, index) {
  993 + SellerCountsListSunModel countsListSunModel = widget
  994 + .customerProvider.managerStatisticsList[index];
  995 + return InkWell(
  996 + onTap: () {
  997 + String uid = '';
  998 + menuTitle.forEach((element) {
  999 + if (element.select) {
  1000 + uid = element.uid;
  1001 + }
  1002 + });
  1003 + NavigatorUtil.goMonthOrderPage(
  1004 + context,
  1005 + year.toString(),
  1006 + countsListSunModel.monthss.toString(),
  1007 + uid: uid);
  1008 + },
  1009 + child: MonthItem(
  1010 + countsListSunModel: countsListSunModel));
  1011 + })
  1012 + ],
  1013 + )
  1014 + ],
  1015 + ),
  1016 + ));
  1017 + }
  1018 + })
  1019 + // Container(
  1020 + // color: MyColours.color_FAFAFA,
  1021 + // padding: EdgeInsets.only(
  1022 + // top: w(13), bottom: w(26), left: w(45), right: (45)),
  1023 + // child: Stack(
  1024 + // children: [
  1025 + // RoundButton(
  1026 + // onPressed: () {
  1027 + // NavigatorUtil.goMyMarketingRecordsPage(
  1028 + // context, FromPage.FromPageMyCustomer);
  1029 + // },
  1030 + // text: '历史营销记录',
  1031 + // fontSize: 32,
  1032 + // isBold: true,
  1033 + // // margin: EdgeInsets.only(
  1034 + // // top: w(13),
  1035 + // // bottom: w(26),
  1036 + // // left: w(45),
  1037 + // // right: (45)),
  1038 + // textColor: MyColours.color_F8F9FD,
  1039 + // gradientStart: MyColours.color_199095,
  1040 + // gradientEnd: MyColours.color_199095,
  1041 + // borderColor: MyColours.color_199095,
  1042 + // height: ScreenUtil().setWidth(86),
  1043 + // // width: ScreenUtil().setWidth(260),
  1044 + // radius: ScreenUtil().setWidth(10),
  1045 + // ),
  1046 + // showWarning
  1047 + // ? Positioned(
  1048 + // right: ScreenUtil().setWidth(30),
  1049 + // top: ScreenUtil().setWidth(45 / 2),
  1050 + // child: Image.asset(
  1051 + // Utils.getImgPath('warning'),
  1052 + // width: ScreenUtil().setWidth(35),
  1053 + // ))
  1054 + // : SizedBox()
  1055 + // ],
  1056 + // ))
  1057 + ]));
1068 } 1058 }
1069 } 1059 }
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 // import '../store_customer/bar_chart_page.dart'; 28 // import '../store_customer/bar_chart_page.dart';
29 29
30 // /** 30 // /**
31 -// * 31 +// *
32 // */ 32 // */
33 // class StoreCustomerHomeRightPage extends StatefulWidget { 33 // class StoreCustomerHomeRightPage extends StatefulWidget {
34 // final CustomerProvider customerProvider; 34 // final CustomerProvider customerProvider;
@@ -292,9 +292,9 @@ @@ -292,9 +292,9 @@
292 // String index = '0'; 292 // String index = '0';
293 // if (btnTitle == '活跃') { 293 // if (btnTitle == '活跃') {
294 // index = '1'; 294 // index = '1';
295 -// } else if (btnTitle == '60天未到店') { 295 +// } else if (btnTitle == '60天未预订') {
296 // index = '2'; 296 // index = '2';
297 -// } else if (btnTitle == '120天未到店') { 297 +// } else if (btnTitle == '120天未预订') {
298 // index = '3'; 298 // index = '3';
299 // } 299 // }
300 // String uid = ''; 300 // String uid = '';
@@ -325,7 +325,7 @@ @@ -325,7 +325,7 @@
325 // style: TextStyle( 325 // style: TextStyle(
326 // color: btnTitle == '活跃' 326 // color: btnTitle == '活跃'
327 // ? MyColours.color_199095 327 // ? MyColours.color_199095
328 -// : btnTitle == '60天未到店' 328 +// : btnTitle == '60天未预订'
329 // ? MyColours.color_E89243 329 // ? MyColours.color_E89243
330 // : MyColours.color_E34D59, 330 // : MyColours.color_E34D59,
331 // fontSize: ScreenUtil().setSp(48), 331 // fontSize: ScreenUtil().setSp(48),
@@ -343,9 +343,9 @@ @@ -343,9 +343,9 @@
343 // String index = '0'; 343 // String index = '0';
344 // if (btnTitle == '活跃') { 344 // if (btnTitle == '活跃') {
345 // index = '1'; 345 // index = '1';
346 -// } else if (btnTitle == '60天未到店') { 346 +// } else if (btnTitle == '60天未预订') {
347 // index = '2'; 347 // index = '2';
348 -// } else if (btnTitle == '120天未到店') { 348 +// } else if (btnTitle == '120天未预订') {
349 // index = '3'; 349 // index = '3';
350 // } 350 // }
351 // String uid = ''; 351 // String uid = '';
@@ -581,12 +581,12 @@ @@ -581,12 +581,12 @@
581 // HEmptyView(10), 581 // HEmptyView(10),
582 // _percentWidget( 582 // _percentWidget(
583 // '${widget.customerProvider.guestSunmodel.sleep.count}', 583 // '${widget.customerProvider.guestSunmodel.sleep.count}',
584 -// '60天未到店', 584 +// '60天未预订',
585 // '${widget.customerProvider.guestSunmodel.sleep.scale}'), 585 // '${widget.customerProvider.guestSunmodel.sleep.scale}'),
586 // HEmptyView(10), 586 // HEmptyView(10),
587 // _percentWidget( 587 // _percentWidget(
588 // '${widget.customerProvider.guestSunmodel.drain.count}', 588 // '${widget.customerProvider.guestSunmodel.drain.count}',
589 -// '120天未到店', 589 +// '120天未预订',
590 // '${widget.customerProvider.guestSunmodel.drain.scale}'), 590 // '${widget.customerProvider.guestSunmodel.drain.scale}'),
591 // ], 591 // ],
592 // ), 592 // ),
@@ -123,7 +123,8 @@ class NoteBookItemFState extends State<NoteBookItemF> @@ -123,7 +123,8 @@ class NoteBookItemFState extends State<NoteBookItemF>
123 Map<String, String> params = { 123 Map<String, String> params = {
124 "rid": widget.notebook.id, 124 "rid": widget.notebook.id,
125 "status": status, //5安排包间 2:确认到店(到店),3:用餐完成(离店),4:取消预定,5:分配包间:6:拒单 125 "status": status, //5安排包间 2:确认到店(到店),3:用餐完成(离店),4:取消预定,5:分配包间:6:拒单
126 - "uid": userModel.user.openid, 126 + // "uid": userModel.user.openid,
  127 + 'uid': widget.notebook.uid
127 }; 128 };
128 if (status == '4') { 129 if (status == '4') {
129 Map<String, String> causeMap = { 130 Map<String, String> causeMap = {
@@ -135,7 +135,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -135,7 +135,8 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
135 Map<String, String> params = { 135 Map<String, String> params = {
136 "rid": widget.notebook.id, 136 "rid": widget.notebook.id,
137 "status": status, //5安排包间 2:确认到店(到店),3:用餐完成(离店),4:取消预定,5:分配包间:6:拒单 137 "status": status, //5安排包间 2:确认到店(到店),3:用餐完成(离店),4:取消预定,5:分配包间:6:拒单
138 - "uid": userModel.user.openid, 138 + // "uid": userModel.user.openid,
  139 + 'uid': widget.notebook.uid
139 }; 140 };
140 if (status == '4') { 141 if (status == '4') {
141 Map<String, String> causeMap = { 142 Map<String, String> causeMap = {