Showing
15 changed files
with
931 additions
and
227 deletions
No preview for this file type
lib/models/day_statics_model.dart
0 → 100644
| 1 | +class DayStaticsModel { | ||
| 2 | + int ret; | ||
| 3 | + DayStaticsSunModel data; | ||
| 4 | + String msg; | ||
| 5 | + | ||
| 6 | + DayStaticsModel({this.ret, this.data, this.msg}); | ||
| 7 | + | ||
| 8 | + DayStaticsModel.fromJson(Map<String, dynamic> json) { | ||
| 9 | + ret = json['ret']; | ||
| 10 | + data = json['data'] != null | ||
| 11 | + ? new DayStaticsSunModel.fromJson(json['data']) | ||
| 12 | + : null; | ||
| 13 | + msg = json['msg']; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + Map<String, dynamic> toJson() { | ||
| 17 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 18 | + data['ret'] = this.ret; | ||
| 19 | + if (this.data != null) { | ||
| 20 | + data['data'] = this.data.toJson(); | ||
| 21 | + } | ||
| 22 | + data['msg'] = this.msg; | ||
| 23 | + return data; | ||
| 24 | + } | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class DayStaticsSunModel { | ||
| 28 | + String ddateSolt; | ||
| 29 | + String totalRserve; | ||
| 30 | + String totalPnum; | ||
| 31 | + String totalDao; | ||
| 32 | + String totalCel; | ||
| 33 | + String totalPrice; | ||
| 34 | + dynamic totalConsume; | ||
| 35 | + dynamic avgPrice; | ||
| 36 | + String totalDaoKe; | ||
| 37 | + int totalTable; | ||
| 38 | + int daoTable; | ||
| 39 | + int storeWine; | ||
| 40 | + int order; | ||
| 41 | + int plancook; | ||
| 42 | + int agvTable; | ||
| 43 | + Map<String, ItemData> data; | ||
| 44 | + | ||
| 45 | + DayStaticsSunModel( | ||
| 46 | + {this.ddateSolt, | ||
| 47 | + this.totalRserve, | ||
| 48 | + this.totalPnum, | ||
| 49 | + this.totalDao, | ||
| 50 | + this.totalCel, | ||
| 51 | + this.totalPrice, | ||
| 52 | + this.totalConsume, | ||
| 53 | + this.avgPrice, | ||
| 54 | + this.totalDaoKe, | ||
| 55 | + this.totalTable, | ||
| 56 | + this.daoTable, | ||
| 57 | + this.storeWine, | ||
| 58 | + this.order, | ||
| 59 | + this.plancook, | ||
| 60 | + this.agvTable, | ||
| 61 | + this.data}); | ||
| 62 | + | ||
| 63 | + DayStaticsSunModel.fromJson(Map<String, dynamic> json) { | ||
| 64 | + ddateSolt = json['ddate_solt']; | ||
| 65 | + totalRserve = json['totalRserve']; | ||
| 66 | + totalPnum = json['totalPnum']; | ||
| 67 | + totalDao = json['totalDao']; | ||
| 68 | + totalCel = json['totalCel']; | ||
| 69 | + totalPrice = json['totalPrice']; | ||
| 70 | + totalConsume = json['totalConsume']; | ||
| 71 | + avgPrice = json['avgPrice']; | ||
| 72 | + totalDaoKe = json['totalDaoKe']; | ||
| 73 | + totalTable = json['totalTable']; | ||
| 74 | + daoTable = json['daoTable']; | ||
| 75 | + storeWine = json['storeWine']; | ||
| 76 | + order = json['Order']; | ||
| 77 | + plancook = json['Plancook']; | ||
| 78 | + agvTable = json['agvTable']; | ||
| 79 | + if (json['list'] != null) { | ||
| 80 | + data = {}; | ||
| 81 | + | ||
| 82 | + json['list'].map((key, value) { | ||
| 83 | + List<DsoltListModel> temp = []; | ||
| 84 | + value.forEach((element) { | ||
| 85 | + temp.add(DsoltListModel.fromJson(value)); | ||
| 86 | + }); | ||
| 87 | + | ||
| 88 | + ItemData itemData = ItemData(); | ||
| 89 | + itemData.dsoltListModelItem = temp; | ||
| 90 | + itemData.expansion = true; | ||
| 91 | + | ||
| 92 | + print(key); | ||
| 93 | + data.addAll({key: itemData}); | ||
| 94 | + // data.putIfAbsent(key.toString(), () => itemData); | ||
| 95 | + print(data); | ||
| 96 | + }); | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + Map<String, dynamic> toJson() { | ||
| 101 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 102 | + data['ddate_solt'] = this.ddateSolt; | ||
| 103 | + data['totalRserve'] = this.totalRserve; | ||
| 104 | + data['totalPnum'] = this.totalPnum; | ||
| 105 | + data['totalDao'] = this.totalDao; | ||
| 106 | + data['totalCel'] = this.totalCel; | ||
| 107 | + data['totalPrice'] = this.totalPrice; | ||
| 108 | + data['totalConsume'] = this.totalConsume; | ||
| 109 | + data['avgPrice'] = this.avgPrice; | ||
| 110 | + data['totalDaoKe'] = this.totalDaoKe; | ||
| 111 | + data['totalTable'] = this.totalTable; | ||
| 112 | + data['daoTable'] = this.daoTable; | ||
| 113 | + data['storeWine'] = this.storeWine; | ||
| 114 | + data['Order'] = this.order; | ||
| 115 | + data['Plancook'] = this.plancook; | ||
| 116 | + data['agvTable'] = this.agvTable; | ||
| 117 | + if (this.data != null) { | ||
| 118 | + // data['list'] = this.data; | ||
| 119 | + } | ||
| 120 | + return data; | ||
| 121 | + } | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +class ItemData { | ||
| 125 | + bool expansion = true; | ||
| 126 | + List<DsoltListModel> dsoltListModelItem; | ||
| 127 | +} | ||
| 128 | + | ||
| 129 | +class DsoltListModel { | ||
| 130 | + String id; | ||
| 131 | + String rname; | ||
| 132 | + String phone; | ||
| 133 | + Null pnum; | ||
| 134 | + String ddate; | ||
| 135 | + String ddateSolt; | ||
| 136 | + String tableinfo; | ||
| 137 | + String sex; | ||
| 138 | + String uid; | ||
| 139 | + String actualPum; | ||
| 140 | + Null conAmount; | ||
| 141 | + Null cusdem; | ||
| 142 | + String nickName; | ||
| 143 | + int isOrder; | ||
| 144 | + int avgPrice; | ||
| 145 | + int isStoreWine; | ||
| 146 | + | ||
| 147 | + DsoltListModel( | ||
| 148 | + {this.id, | ||
| 149 | + this.rname, | ||
| 150 | + this.phone, | ||
| 151 | + this.pnum, | ||
| 152 | + this.ddate, | ||
| 153 | + this.ddateSolt, | ||
| 154 | + this.tableinfo, | ||
| 155 | + this.sex, | ||
| 156 | + this.uid, | ||
| 157 | + this.actualPum, | ||
| 158 | + this.conAmount, | ||
| 159 | + this.cusdem, | ||
| 160 | + this.nickName, | ||
| 161 | + this.isOrder, | ||
| 162 | + this.avgPrice, | ||
| 163 | + this.isStoreWine}); | ||
| 164 | + | ||
| 165 | + DsoltListModel.fromJson(Map<String, dynamic> json) { | ||
| 166 | + id = json['id']; | ||
| 167 | + rname = json['rname']; | ||
| 168 | + phone = json['phone']; | ||
| 169 | + pnum = json['pnum']; | ||
| 170 | + ddate = json['ddate']; | ||
| 171 | + ddateSolt = json['ddate_solt']; | ||
| 172 | + tableinfo = json['tableinfo']; | ||
| 173 | + sex = json['sex']; | ||
| 174 | + uid = json['uid']; | ||
| 175 | + actualPum = json['actual_pum']; | ||
| 176 | + conAmount = json['con_amount']; | ||
| 177 | + cusdem = json['cusdem']; | ||
| 178 | + nickName = json['nick_name']; | ||
| 179 | + isOrder = json['is_order']; | ||
| 180 | + avgPrice = json['avgPrice']; | ||
| 181 | + isStoreWine = json['is_store_wine']; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + Map<String, dynamic> toJson() { | ||
| 185 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 186 | + data['id'] = this.id; | ||
| 187 | + data['rname'] = this.rname; | ||
| 188 | + data['phone'] = this.phone; | ||
| 189 | + data['pnum'] = this.pnum; | ||
| 190 | + data['ddate'] = this.ddate; | ||
| 191 | + data['ddate_solt'] = this.ddateSolt; | ||
| 192 | + data['tableinfo'] = this.tableinfo; | ||
| 193 | + data['sex'] = this.sex; | ||
| 194 | + data['uid'] = this.uid; | ||
| 195 | + data['actual_pum'] = this.actualPum; | ||
| 196 | + data['con_amount'] = this.conAmount; | ||
| 197 | + data['cusdem'] = this.cusdem; | ||
| 198 | + data['nick_name'] = this.nickName; | ||
| 199 | + data['is_order'] = this.isOrder; | ||
| 200 | + data['avgPrice'] = this.avgPrice; | ||
| 201 | + data['is_store_wine'] = this.isStoreWine; | ||
| 202 | + return data; | ||
| 203 | + } | ||
| 204 | +} |
lib/models/month_statics_model.dart
0 → 100644
| 1 | +class MonthStaticsModel { | ||
| 2 | + int ret; | ||
| 3 | + MonthStaticsSunModel data; | ||
| 4 | + String msg; | ||
| 5 | + | ||
| 6 | + MonthStaticsModel({this.ret, this.data, this.msg}); | ||
| 7 | + | ||
| 8 | + MonthStaticsModel.fromJson(Map<String, dynamic> json) { | ||
| 9 | + ret = json['ret']; | ||
| 10 | + data = json['data'] != null | ||
| 11 | + ? new MonthStaticsSunModel.fromJson(json['data']) | ||
| 12 | + : null; | ||
| 13 | + msg = json['msg']; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + Map<String, dynamic> toJson() { | ||
| 17 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 18 | + data['ret'] = this.ret; | ||
| 19 | + if (this.data != null) { | ||
| 20 | + data['data'] = this.data.toJson(); | ||
| 21 | + } | ||
| 22 | + data['msg'] = this.msg; | ||
| 23 | + return data; | ||
| 24 | + } | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class MonthStaticsSunModel { | ||
| 28 | + dynamic totalRserve; | ||
| 29 | + dynamic totalPnum; | ||
| 30 | + dynamic totalDao; | ||
| 31 | + dynamic totalCel; | ||
| 32 | + dynamic totalPrice; | ||
| 33 | + dynamic totalConsume; | ||
| 34 | + dynamic avgPrice; | ||
| 35 | + dynamic totalDaoKe; | ||
| 36 | + dynamic totalTable; | ||
| 37 | + dynamic daoTable; | ||
| 38 | + dynamic storeWine; | ||
| 39 | + dynamic order; | ||
| 40 | + dynamic plancook; | ||
| 41 | + dynamic agvTable; | ||
| 42 | + List<DayList> dayList; | ||
| 43 | + | ||
| 44 | + MonthStaticsSunModel( | ||
| 45 | + {this.totalRserve, | ||
| 46 | + this.totalPnum, | ||
| 47 | + this.totalDao, | ||
| 48 | + this.totalCel, | ||
| 49 | + this.totalPrice, | ||
| 50 | + this.totalConsume, | ||
| 51 | + this.avgPrice, | ||
| 52 | + this.totalDaoKe, | ||
| 53 | + this.totalTable, | ||
| 54 | + this.daoTable, | ||
| 55 | + this.storeWine, | ||
| 56 | + this.order, | ||
| 57 | + this.plancook, | ||
| 58 | + this.agvTable, | ||
| 59 | + this.dayList}); | ||
| 60 | + | ||
| 61 | + MonthStaticsSunModel.fromJson(Map<String, dynamic> json) { | ||
| 62 | + totalRserve = json['totalRserve']; | ||
| 63 | + totalPnum = json['totalPnum']; | ||
| 64 | + totalDao = json['totalDao']; | ||
| 65 | + totalCel = json['totalCel']; | ||
| 66 | + totalPrice = json['totalPrice']; | ||
| 67 | + totalConsume = json['totalConsume']; | ||
| 68 | + avgPrice = json['avgPrice']; | ||
| 69 | + totalDaoKe = json['totalDaoKe']; | ||
| 70 | + totalTable = json['totalTable']; | ||
| 71 | + daoTable = json['daoTable']; | ||
| 72 | + storeWine = json['storeWine']; | ||
| 73 | + order = json['Order']; | ||
| 74 | + plancook = json['Plancook']; | ||
| 75 | + agvTable = json['agvTable']; | ||
| 76 | + if (json['dayList'] != null) { | ||
| 77 | + dayList = new List<DayList>(); | ||
| 78 | + json['dayList'].forEach((v) { | ||
| 79 | + dayList.add(new DayList.fromJson(v)); | ||
| 80 | + }); | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + Map<String, dynamic> toJson() { | ||
| 85 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 86 | + data['totalRserve'] = this.totalRserve; | ||
| 87 | + data['totalPnum'] = this.totalPnum; | ||
| 88 | + data['totalDao'] = this.totalDao; | ||
| 89 | + data['totalCel'] = this.totalCel; | ||
| 90 | + data['totalPrice'] = this.totalPrice; | ||
| 91 | + data['totalConsume'] = this.totalConsume; | ||
| 92 | + data['avgPrice'] = this.avgPrice; | ||
| 93 | + data['totalDaoKe'] = this.totalDaoKe; | ||
| 94 | + data['totalTable'] = this.totalTable; | ||
| 95 | + data['daoTable'] = this.daoTable; | ||
| 96 | + data['storeWine'] = this.storeWine; | ||
| 97 | + data['Order'] = this.order; | ||
| 98 | + data['Plancook'] = this.plancook; | ||
| 99 | + data['agvTable'] = this.agvTable; | ||
| 100 | + if (this.dayList != null) { | ||
| 101 | + data['dayList'] = this.dayList.map((v) => v.toJson()).toList(); | ||
| 102 | + } | ||
| 103 | + return data; | ||
| 104 | + } | ||
| 105 | +} | ||
| 106 | + | ||
| 107 | +class DayList { | ||
| 108 | + dynamic days; | ||
| 109 | + dynamic totalRserve; | ||
| 110 | + dynamic totalPnum; | ||
| 111 | + dynamic totalDao; | ||
| 112 | + dynamic totalCel; | ||
| 113 | + dynamic totalPrice; | ||
| 114 | + dynamic totalConsume; | ||
| 115 | + dynamic avgPrice; | ||
| 116 | + dynamic totalDaoKe; | ||
| 117 | + dynamic totalTable; | ||
| 118 | + dynamic daoTable; | ||
| 119 | + dynamic storeWine; | ||
| 120 | + dynamic order; | ||
| 121 | + dynamic plancook; | ||
| 122 | + dynamic agvTable; | ||
| 123 | + | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + | ||
| 127 | + | ||
| 128 | + DayList( | ||
| 129 | + {this.days, | ||
| 130 | + this.totalRserve, | ||
| 131 | + this.totalPnum, | ||
| 132 | + this.totalDao, | ||
| 133 | + this.totalCel, | ||
| 134 | + this.totalPrice, | ||
| 135 | + this.totalConsume, | ||
| 136 | + this.avgPrice, | ||
| 137 | + this.totalDaoKe, | ||
| 138 | + this.totalTable, | ||
| 139 | + this.daoTable, | ||
| 140 | + this.storeWine, | ||
| 141 | + this.order, | ||
| 142 | + this.plancook, | ||
| 143 | + this.agvTable}); | ||
| 144 | + | ||
| 145 | + DayList.fromJson(Map<String, dynamic> json) { | ||
| 146 | + days = json['days']; | ||
| 147 | + totalRserve = json['totalRserve']; | ||
| 148 | + totalPnum = json['totalPnum']; | ||
| 149 | + totalDao = json['totalDao']; | ||
| 150 | + totalCel = json['totalCel']; | ||
| 151 | + totalPrice = json['totalPrice']; | ||
| 152 | + totalConsume = json['totalConsume']; | ||
| 153 | + avgPrice = json['avgPrice']; | ||
| 154 | + totalDaoKe = json['totalDaoKe']; | ||
| 155 | + totalTable = json['totalTable']; | ||
| 156 | + daoTable = json['daoTable']; | ||
| 157 | + storeWine = json['storeWine']; | ||
| 158 | + order = json['Order']; | ||
| 159 | + plancook = json['Plancook']; | ||
| 160 | + agvTable = json['agvTable']; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + Map<String, dynamic> toJson() { | ||
| 164 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 165 | + data['days'] = this.days; | ||
| 166 | + data['totalRserve'] = this.totalRserve; | ||
| 167 | + data['totalPnum'] = this.totalPnum; | ||
| 168 | + data['totalDao'] = this.totalDao; | ||
| 169 | + data['totalCel'] = this.totalCel; | ||
| 170 | + data['totalPrice'] = this.totalPrice; | ||
| 171 | + data['totalConsume'] = this.totalConsume; | ||
| 172 | + data['avgPrice'] = this.avgPrice; | ||
| 173 | + data['totalDaoKe'] = this.totalDaoKe; | ||
| 174 | + data['totalTable'] = this.totalTable; | ||
| 175 | + data['daoTable'] = this.daoTable; | ||
| 176 | + data['storeWine'] = this.storeWine; | ||
| 177 | + data['Order'] = this.order; | ||
| 178 | + data['Plancook'] = this.plancook; | ||
| 179 | + data['agvTable'] = this.agvTable; | ||
| 180 | + return data; | ||
| 181 | + } | ||
| 182 | +} |
| @@ -445,4 +445,14 @@ class HttpUrl { | @@ -445,4 +445,14 @@ class HttpUrl { | ||
| 445 | static const String get_seller_counts_list = | 445 | static const String get_seller_counts_list = |
| 446 | "?service=App.GuestManage.GetSellerCountsList"; // 获取全店全年订单统计数据 | 446 | "?service=App.GuestManage.GetSellerCountsList"; // 获取全店全年订单统计数据 |
| 447 | 447 | ||
| 448 | + | ||
| 449 | + static const String get_seller_counts_list_by_month = | ||
| 450 | + "?service=App.GuestManage.GetSellerCountsListByMonth"; // 获取全店全月订单统计数据 | ||
| 451 | + | ||
| 452 | + | ||
| 453 | +static const String get_seller_counts_list_by_day = | ||
| 454 | + "?service=App.GuestManage.GetSellerCountsListByDay"; // 获取全店日订单统计数据 | ||
| 455 | + | ||
| 456 | + | ||
| 457 | + | ||
| 448 | } | 458 | } |
| @@ -241,26 +241,26 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -241,26 +241,26 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 241 | children: [ | 241 | children: [ |
| 242 | VEmptyView(30), | 242 | VEmptyView(30), |
| 243 | Container( | 243 | Container( |
| 244 | - height: w(24), | 244 | + // height: w(24), |
| 245 | child: Row( | 245 | child: Row( |
| 246 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 247 | - children: [ | ||
| 248 | - Text(pnum, | ||
| 249 | - style: TextStyle( | ||
| 250 | - color: btnTitle == '活跃' | ||
| 251 | - ? MyColours.color_199095 | ||
| 252 | - : btnTitle == '60天未到店' | ||
| 253 | - ? MyColours.color_E89243 | ||
| 254 | - : MyColours.color_E34D59, | ||
| 255 | - fontSize: ScreenUtil().setSp(48), | ||
| 256 | - fontWeight: FontWeight.bold)), | ||
| 257 | - Text('位', | ||
| 258 | - style: TextStyle( | ||
| 259 | - color: MyColours.color_515151, | ||
| 260 | - fontSize: ScreenUtil().setSp(28), | ||
| 261 | - )) | ||
| 262 | - ], | ||
| 263 | - )), | 246 | + mainAxisAlignment: MainAxisAlignment.center, |
| 247 | + children: [ | ||
| 248 | + Text(pnum, | ||
| 249 | + style: TextStyle( | ||
| 250 | + color: btnTitle == '活跃' | ||
| 251 | + ? MyColours.color_199095 | ||
| 252 | + : btnTitle == '60天未到店' | ||
| 253 | + ? MyColours.color_E89243 | ||
| 254 | + : MyColours.color_E34D59, | ||
| 255 | + fontSize: ScreenUtil().setSp(48), | ||
| 256 | + fontWeight: FontWeight.bold)), | ||
| 257 | + Text('位', | ||
| 258 | + style: TextStyle( | ||
| 259 | + color: MyColours.color_515151, | ||
| 260 | + fontSize: ScreenUtil().setSp(28), | ||
| 261 | + )) | ||
| 262 | + ], | ||
| 263 | + )), | ||
| 264 | VEmptyView(20), | 264 | VEmptyView(20), |
| 265 | RoundButton( | 265 | RoundButton( |
| 266 | onPressed: () async { | 266 | onPressed: () async { |
| @@ -661,15 +661,27 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -661,15 +661,27 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 661 | }), | 661 | }), |
| 662 | _chart(), | 662 | _chart(), |
| 663 | ListView.builder( | 663 | ListView.builder( |
| 664 | - itemCount: customerProvider.managerStatisticsList.length, | 664 | + itemCount: |
| 665 | + customerProvider.managerStatisticsList.length, | ||
| 665 | shrinkWrap: true, | 666 | shrinkWrap: true, |
| 666 | controller: _controller, | 667 | controller: _controller, |
| 667 | padding: EdgeInsets.symmetric(horizontal: w(10)), | 668 | padding: EdgeInsets.symmetric(horizontal: w(10)), |
| 668 | itemBuilder: (context, index) { | 669 | itemBuilder: (context, index) { |
| 669 | SellerCountsListSunModel countsListSunModel = | 670 | SellerCountsListSunModel countsListSunModel = |
| 670 | customerProvider.managerStatisticsList[index]; | 671 | customerProvider.managerStatisticsList[index]; |
| 671 | - return MonthItem( | ||
| 672 | - countsListSunModel: countsListSunModel); | 672 | + return InkWell( |
| 673 | + onTap: () { | ||
| 674 | + NavigatorUtil.goMonthOrderPage( | ||
| 675 | + context, | ||
| 676 | + year.toString(), | ||
| 677 | + countsListSunModel.monthss.toString(), | ||
| 678 | + uid: Provider.of<UserModel>(context, | ||
| 679 | + listen: false) | ||
| 680 | + .user | ||
| 681 | + .openid); | ||
| 682 | + }, | ||
| 683 | + child: MonthItem( | ||
| 684 | + countsListSunModel: countsListSunModel)); | ||
| 673 | }) | 685 | }) |
| 674 | ], | 686 | ], |
| 675 | ), | 687 | ), |
| @@ -4,12 +4,24 @@ import 'package:one_key/utils/utils.dart'; | @@ -4,12 +4,24 @@ import 'package:one_key/utils/utils.dart'; | ||
| 4 | import 'package:one_key/widgets/MyDivider.dart'; | 4 | import 'package:one_key/widgets/MyDivider.dart'; |
| 5 | import 'package:one_key/widgets/h_empty_view.dart'; | 5 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 6 | import 'package:one_key/widgets/v_empty_view.dart'; | 6 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 7 | +import 'package:provider/provider.dart'; | ||
| 7 | 8 | ||
| 9 | +import '../../../../constant/state.dart'; | ||
| 10 | +import '../../../../provider/customer_provider.dart'; | ||
| 11 | +import '../../../../provider/user_model.dart'; | ||
| 8 | import '../../../../utils/screen_util.dart'; | 12 | import '../../../../utils/screen_util.dart'; |
| 13 | +import '../../../../widgets/page_exception.dart'; | ||
| 9 | 14 | ||
| 10 | class DayOrderLeftPage extends StatefulWidget { | 15 | class DayOrderLeftPage extends StatefulWidget { |
| 11 | final int index; | 16 | final int index; |
| 12 | - const DayOrderLeftPage({Key key, this.index}) : super(key: key); | 17 | + |
| 18 | + final String year; | ||
| 19 | + final String month; | ||
| 20 | + final String day; | ||
| 21 | + final String uid; | ||
| 22 | + const DayOrderLeftPage( | ||
| 23 | + {Key key, this.index, this.year, this.month, this.day, this.uid}) | ||
| 24 | + : super(key: key); | ||
| 13 | 25 | ||
| 14 | @override | 26 | @override |
| 15 | _DayOrderLeftPageState createState() => _DayOrderLeftPageState(); | 27 | _DayOrderLeftPageState createState() => _DayOrderLeftPageState(); |
| @@ -31,14 +43,54 @@ var data = { | @@ -31,14 +43,54 @@ var data = { | ||
| 31 | }; | 43 | }; |
| 32 | 44 | ||
| 33 | class _DayOrderLeftPageState extends State<DayOrderLeftPage> { | 45 | class _DayOrderLeftPageState extends State<DayOrderLeftPage> { |
| 46 | + CustomerProvider customerProvider; | ||
| 47 | + @override | ||
| 48 | + void initState() { | ||
| 49 | + // TODO: implement initState | ||
| 50 | + super.initState(); | ||
| 51 | + WidgetsBinding.instance.addPostFrameCallback((_) { | ||
| 52 | + _getSellerCountsListByDay(); | ||
| 53 | + }); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + _getSellerCountsListByDay({isShowLoading = false}) async { | ||
| 57 | + Map<String, String> params = { | ||
| 58 | + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 59 | + 'year': widget.year, | ||
| 60 | + 'month': widget.month, | ||
| 61 | + 'day': widget.day, | ||
| 62 | + 'reserveStatus': widget.index == 0 ? '1' : '2', | ||
| 63 | + }; | ||
| 64 | + if (widget.uid != null && widget.uid != '') { | ||
| 65 | + params['uid'] = widget.uid; | ||
| 66 | + } | ||
| 67 | + await customerProvider.getSellerCountsListByDay(context, params, | ||
| 68 | + isShowLoading: isShowLoading); | ||
| 69 | + } | ||
| 70 | + | ||
| 34 | @override | 71 | @override |
| 35 | Widget build(BuildContext context) { | 72 | Widget build(BuildContext context) { |
| 73 | + customerProvider = Provider.of<CustomerProvider>(context, listen: true); | ||
| 36 | return Container( | 74 | return Container( |
| 37 | - color: MyColours.color_f3f3f3, | ||
| 38 | - child: ListView( | ||
| 39 | - children: _buildList(), | ||
| 40 | - ), | ||
| 41 | - ); | 75 | + color: MyColours.color_f3f3f3, |
| 76 | + child: Consumer<CustomerProvider>(builder: (context, model, _) { | ||
| 77 | + if (model.pageStateDay != PageState.Success) { | ||
| 78 | + return ExceptionPage( | ||
| 79 | + pageState: model.pageStateDay, | ||
| 80 | + callback: () { | ||
| 81 | + // getTableList(); | ||
| 82 | + // _getSellerGuestManage(); | ||
| 83 | + }, | ||
| 84 | + emptyMsg: "暂时没有记录哦", | ||
| 85 | + emptyImg: "empty_search", | ||
| 86 | + showMsg: "加载中,请稍后...", | ||
| 87 | + ); | ||
| 88 | + } else { | ||
| 89 | + return ListView( | ||
| 90 | + children: _buildList(), | ||
| 91 | + ); | ||
| 92 | + } | ||
| 93 | + })); | ||
| 42 | } | 94 | } |
| 43 | 95 | ||
| 44 | List<Widget> _buildList() { | 96 | List<Widget> _buildList() { |
| @@ -4,10 +4,14 @@ import 'package:one_key/pages/my/customer_type/store_customer/day_order_left_pag | @@ -4,10 +4,14 @@ import 'package:one_key/pages/my/customer_type/store_customer/day_order_left_pag | ||
| 4 | import 'package:one_key/res/colors.dart'; | 4 | import 'package:one_key/res/colors.dart'; |
| 5 | import 'package:one_key/widgets/system_app_bar.dart'; | 5 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 6 | import 'package:one_key/widgets/v_empty_view.dart'; | 6 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 7 | +import 'package:provider/provider.dart'; | ||
| 7 | 8 | ||
| 9 | +import '../../../../constant/state.dart'; | ||
| 10 | +import '../../../../provider/customer_provider.dart'; | ||
| 8 | import '../../../../utils/screen_util.dart'; | 11 | import '../../../../utils/screen_util.dart'; |
| 9 | import '../../../../widgets/MyDivider.dart'; | 12 | import '../../../../widgets/MyDivider.dart'; |
| 10 | import '../../../../widgets/h_empty_view.dart'; | 13 | import '../../../../widgets/h_empty_view.dart'; |
| 14 | +import '../../../../widgets/page_exception.dart'; | ||
| 11 | 15 | ||
| 12 | /** | 16 | /** |
| 13 | * | 17 | * |
| @@ -15,7 +19,12 @@ import '../../../../widgets/h_empty_view.dart'; | @@ -15,7 +19,12 @@ import '../../../../widgets/h_empty_view.dart'; | ||
| 15 | */ | 19 | */ |
| 16 | 20 | ||
| 17 | class DayOrderPage extends StatefulWidget { | 21 | class DayOrderPage extends StatefulWidget { |
| 18 | - DayOrderPage({Key key}) : super(key: key); | 22 | + final String year; |
| 23 | + final String month; | ||
| 24 | + final String day; | ||
| 25 | + final String uid; | ||
| 26 | + DayOrderPage({Key key, this.year, this.month, this.day, this.uid}) | ||
| 27 | + : super(key: key); | ||
| 19 | 28 | ||
| 20 | @override | 29 | @override |
| 21 | _DayOrderPageState createState() => _DayOrderPageState(); | 30 | _DayOrderPageState createState() => _DayOrderPageState(); |
| @@ -365,7 +374,13 @@ class _DayOrderPageState extends State<DayOrderPage> | @@ -365,7 +374,13 @@ class _DayOrderPageState extends State<DayOrderPage> | ||
| 365 | // VEmptyView(10), | 374 | // VEmptyView(10), |
| 366 | Expanded( | 375 | Expanded( |
| 367 | child: TabBarView(controller: tabController, children: [ | 376 | child: TabBarView(controller: tabController, children: [ |
| 368 | - DayOrderLeftPage(index: 0), | 377 | + DayOrderLeftPage( |
| 378 | + index: 0, | ||
| 379 | + year: widget.year, | ||
| 380 | + month: widget.month, | ||
| 381 | + day: widget.day, | ||
| 382 | + uid: widget.uid, | ||
| 383 | + ), | ||
| 369 | DayOrderLeftPage( | 384 | DayOrderLeftPage( |
| 370 | index: 1, | 385 | index: 1, |
| 371 | ), | 386 | ), |
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 1 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 4 | +import 'package:one_key/models/month_statics_model.dart'; | ||
| 3 | import 'package:one_key/res/colors.dart'; | 5 | import 'package:one_key/res/colors.dart'; |
| 4 | import 'package:one_key/route/navigator_util.dart'; | 6 | import 'package:one_key/route/navigator_util.dart'; |
| 5 | import 'package:one_key/widgets/system_app_bar.dart'; | 7 | import 'package:one_key/widgets/system_app_bar.dart'; |
| @@ -8,6 +10,7 @@ import 'package:provider/provider.dart'; | @@ -8,6 +10,7 @@ import 'package:provider/provider.dart'; | ||
| 8 | 10 | ||
| 9 | import '../../../../constant/state.dart'; | 11 | import '../../../../constant/state.dart'; |
| 10 | import '../../../../provider/customer_provider.dart'; | 12 | import '../../../../provider/customer_provider.dart'; |
| 13 | +import '../../../../provider/user_model.dart'; | ||
| 11 | import '../../../../utils/screen_util.dart'; | 14 | import '../../../../utils/screen_util.dart'; |
| 12 | import '../../../../utils/utils.dart'; | 15 | import '../../../../utils/utils.dart'; |
| 13 | import '../../../../widgets/MyDivider.dart'; | 16 | import '../../../../widgets/MyDivider.dart'; |
| @@ -19,7 +22,11 @@ import '../../../../widgets/page_exception.dart'; | @@ -19,7 +22,11 @@ import '../../../../widgets/page_exception.dart'; | ||
| 19 | */ | 22 | */ |
| 20 | 23 | ||
| 21 | class MonthOrderPage extends StatefulWidget { | 24 | class MonthOrderPage extends StatefulWidget { |
| 22 | - MonthOrderPage({Key key}) : super(key: key); | 25 | + final String year; |
| 26 | + final String month; | ||
| 27 | + | ||
| 28 | + final String uid; | ||
| 29 | + MonthOrderPage({Key key, this.year, this.month, this.uid}) : super(key: key); | ||
| 23 | 30 | ||
| 24 | @override | 31 | @override |
| 25 | _MonthOrderPageState createState() => _MonthOrderPageState(); | 32 | _MonthOrderPageState createState() => _MonthOrderPageState(); |
| @@ -34,13 +41,51 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -34,13 +41,51 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 34 | void initState() { | 41 | void initState() { |
| 35 | // TODO: implement initState | 42 | // TODO: implement initState |
| 36 | super.initState(); | 43 | super.initState(); |
| 37 | - month = 1; | 44 | + month = int.parse(widget.month); |
| 38 | WidgetsBinding.instance.addPostFrameCallback((_) { | 45 | WidgetsBinding.instance.addPostFrameCallback((_) { |
| 39 | - customerProvider.pageStateStoreHome = PageState.Success; | ||
| 40 | - setState(() {}); | 46 | + _getSellerCountsListByMonth(); |
| 41 | }); | 47 | }); |
| 42 | } | 48 | } |
| 43 | 49 | ||
| 50 | + String nongliShow(String year, String month, String day) { | ||
| 51 | + String dateStr = year + | ||
| 52 | + '-' + | ||
| 53 | + Utils.addZeroNumber(int.parse(month)) + | ||
| 54 | + '-' + | ||
| 55 | + Utils.addZeroNumber(int.parse(day)); | ||
| 56 | + DateTime date = DateUtil.getDateTime(dateStr); | ||
| 57 | + return Utils.lunarCalendarHolidays(date); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + String weekdayShow(String year, String month, String day) { | ||
| 61 | + String dateStr = year + | ||
| 62 | + '-' + | ||
| 63 | + Utils.addZeroNumber(int.parse(month)) + | ||
| 64 | + '-' + | ||
| 65 | + Utils.addZeroNumber(int.parse(day)); | ||
| 66 | + DateTime date = DateUtil.getDateTime(dateStr); | ||
| 67 | + return "星期${Utils.formatWeekDayNum(date.weekday)} "; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + _getSellerCountsListByMonth( | ||
| 71 | + {isShowLoading = false, VoidCallback callback}) async { | ||
| 72 | + Map<String, String> params = { | ||
| 73 | + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 74 | + 'year': widget.year.toString(), | ||
| 75 | + 'month': month.toString() | ||
| 76 | + }; | ||
| 77 | + if (widget.uid != null && widget.uid != '') { | ||
| 78 | + params['uid'] = widget.uid; | ||
| 79 | + } | ||
| 80 | + await customerProvider.getSellerCountsListByMonth(context, params, | ||
| 81 | + isShowLoading: isShowLoading); | ||
| 82 | + if ((customerProvider.monthStaticsData == null || | ||
| 83 | + customerProvider.monthStaticsData.dayList.length == 0) && | ||
| 84 | + callback != null) { | ||
| 85 | + callback(); | ||
| 86 | + } | ||
| 87 | + } | ||
| 88 | + | ||
| 44 | Widget _monthWidget() { | 89 | Widget _monthWidget() { |
| 45 | return Container( | 90 | return Container( |
| 46 | // margin: EdgeInsets.symmetric(horizontal: w(10)), | 91 | // margin: EdgeInsets.symmetric(horizontal: w(10)), |
| @@ -63,12 +108,32 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -63,12 +108,32 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 63 | InkWell( | 108 | InkWell( |
| 64 | onTap: () { | 109 | onTap: () { |
| 65 | if (month == 1) { | 110 | if (month == 1) { |
| 66 | - month = 12; | 111 | + if (widget.year == |
| 112 | + DateTime.now().year.toString()) { | ||
| 113 | + month = DateTime.now().month; | ||
| 114 | + } else { | ||
| 115 | + month = 12; | ||
| 116 | + } | ||
| 67 | setState(() {}); | 117 | setState(() {}); |
| 118 | + _getSellerCountsListByMonth( | ||
| 119 | + isShowLoading: true, | ||
| 120 | + callback: () { | ||
| 121 | + setState(() { | ||
| 122 | + month = 1; | ||
| 123 | + }); | ||
| 124 | + }); | ||
| 68 | } else { | 125 | } else { |
| 69 | setState(() { | 126 | setState(() { |
| 70 | month--; | 127 | month--; |
| 71 | }); | 128 | }); |
| 129 | + | ||
| 130 | + _getSellerCountsListByMonth( | ||
| 131 | + isShowLoading: true, | ||
| 132 | + callback: () { | ||
| 133 | + setState(() { | ||
| 134 | + month++; | ||
| 135 | + }); | ||
| 136 | + }); | ||
| 72 | } | 137 | } |
| 73 | 138 | ||
| 74 | // _getGuestReserve(showLoading: true); | 139 | // _getGuestReserve(showLoading: true); |
| @@ -101,13 +166,51 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -101,13 +166,51 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 101 | ), | 166 | ), |
| 102 | InkWell( | 167 | InkWell( |
| 103 | onTap: () { | 168 | onTap: () { |
| 104 | - if (month == 12) { | 169 | + if (widget.year == |
| 170 | + DateTime.now().year.toString()) { | ||
| 171 | + if (month == DateTime.now().month) { | ||
| 172 | + month = 1; | ||
| 173 | + setState(() {}); | ||
| 174 | + _getSellerCountsListByMonth( | ||
| 175 | + isShowLoading: true, | ||
| 176 | + callback: () { | ||
| 177 | + setState(() { | ||
| 178 | + month = DateTime.now().month; | ||
| 179 | + }); | ||
| 180 | + }); | ||
| 181 | + } else { | ||
| 182 | + setState(() { | ||
| 183 | + month++; | ||
| 184 | + }); | ||
| 185 | + _getSellerCountsListByMonth( | ||
| 186 | + isShowLoading: true, | ||
| 187 | + callback: () { | ||
| 188 | + setState(() { | ||
| 189 | + month--; | ||
| 190 | + }); | ||
| 191 | + }); | ||
| 192 | + } | ||
| 193 | + } else if (month == 12) { | ||
| 105 | month = 1; | 194 | month = 1; |
| 106 | setState(() {}); | 195 | setState(() {}); |
| 196 | + _getSellerCountsListByMonth( | ||
| 197 | + isShowLoading: true, | ||
| 198 | + callback: () { | ||
| 199 | + setState(() { | ||
| 200 | + month = 12; | ||
| 201 | + }); | ||
| 202 | + }); | ||
| 107 | } else { | 203 | } else { |
| 108 | setState(() { | 204 | setState(() { |
| 109 | month++; | 205 | month++; |
| 110 | }); | 206 | }); |
| 207 | + _getSellerCountsListByMonth( | ||
| 208 | + isShowLoading: true, | ||
| 209 | + callback: () { | ||
| 210 | + setState(() { | ||
| 211 | + month--; | ||
| 212 | + }); | ||
| 213 | + }); | ||
| 111 | } | 214 | } |
| 112 | 215 | ||
| 113 | // _getGuestReserve(showLoading: true); | 216 | // _getGuestReserve(showLoading: true); |
| @@ -124,7 +227,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -124,7 +227,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 124 | ), | 227 | ), |
| 125 | VEmptyView(20), | 228 | VEmptyView(20), |
| 126 | Text( | 229 | Text( |
| 127 | - '2023年', | 230 | + '${widget.year}年', |
| 128 | style: TextStyle( | 231 | style: TextStyle( |
| 129 | fontSize: font(14), color: MyColours.color_515151), | 232 | fontSize: font(14), color: MyColours.color_515151), |
| 130 | ) | 233 | ) |
| @@ -157,7 +260,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -157,7 +260,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 157 | ), | 260 | ), |
| 158 | HEmptyView(10), | 261 | HEmptyView(10), |
| 159 | Text( | 262 | Text( |
| 160 | - '1089单', | 263 | + '${customerProvider.monthStaticsData.totalRserve}单', |
| 161 | style: TextStyle( | 264 | style: TextStyle( |
| 162 | color: MyColours.color_515151, | 265 | color: MyColours.color_515151, |
| 163 | fontSize: font( | 266 | fontSize: font( |
| @@ -172,7 +275,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -172,7 +275,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 172 | ), | 275 | ), |
| 173 | HEmptyView(10), | 276 | HEmptyView(10), |
| 174 | Text( | 277 | Text( |
| 175 | - '1190桌', | 278 | + '${customerProvider.monthStaticsData.totalTable}桌', |
| 176 | style: TextStyle( | 279 | style: TextStyle( |
| 177 | color: MyColours.color_515151, | 280 | color: MyColours.color_515151, |
| 178 | fontSize: font( | 281 | fontSize: font( |
| @@ -183,6 +286,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -183,6 +286,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 183 | ), | 286 | ), |
| 184 | VEmptyView(20), | 287 | VEmptyView(20), |
| 185 | Wrap( | 288 | Wrap( |
| 289 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 186 | runSpacing: w(10), | 290 | runSpacing: w(10), |
| 187 | children: [ | 291 | children: [ |
| 188 | Text( | 292 | Text( |
| @@ -196,7 +300,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -196,7 +300,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 196 | ), | 300 | ), |
| 197 | HEmptyView(10), | 301 | HEmptyView(10), |
| 198 | Text( | 302 | Text( |
| 199 | - '1089单', | 303 | + '${customerProvider.monthStaticsData.totalDao}单', |
| 200 | style: TextStyle( | 304 | style: TextStyle( |
| 201 | color: MyColours.color_515151, | 305 | color: MyColours.color_515151, |
| 202 | fontSize: font( | 306 | fontSize: font( |
| @@ -211,22 +315,22 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -211,22 +315,22 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 211 | ), | 315 | ), |
| 212 | HEmptyView(10), | 316 | HEmptyView(10), |
| 213 | Text( | 317 | Text( |
| 214 | - '1190桌', | 318 | + '${customerProvider.monthStaticsData.daoTable}桌', |
| 215 | style: TextStyle( | 319 | style: TextStyle( |
| 216 | color: MyColours.color_515151, | 320 | color: MyColours.color_515151, |
| 217 | fontSize: font( | 321 | fontSize: font( |
| 218 | (14), | 322 | (14), |
| 219 | )), | 323 | )), |
| 220 | ), | 324 | ), |
| 221 | - HEmptyView(10), | ||
| 222 | - MyDivider( | ||
| 223 | - w(1), | ||
| 224 | - w(15), | ||
| 225 | - color: MyColours.color_DBDBDB, | ||
| 226 | - ), | ||
| 227 | - HEmptyView(10), | 325 | + ], |
| 326 | + ), | ||
| 327 | + VEmptyView(20), | ||
| 328 | + Wrap( | ||
| 329 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 330 | + runSpacing: w(10), | ||
| 331 | + children: [ | ||
| 228 | Text( | 332 | Text( |
| 229 | - '1190人', | 333 | + '${customerProvider.monthStaticsData.totalPnum ?? 0}人', |
| 230 | style: TextStyle( | 334 | style: TextStyle( |
| 231 | color: MyColours.color_515151, | 335 | color: MyColours.color_515151, |
| 232 | fontSize: font( | 336 | fontSize: font( |
| @@ -241,7 +345,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -241,7 +345,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 241 | ), | 345 | ), |
| 242 | HEmptyView(10), | 346 | HEmptyView(10), |
| 243 | Text( | 347 | Text( |
| 244 | - '1190取消', | 348 | + '${customerProvider.monthStaticsData.totalCel}取消', |
| 245 | style: TextStyle( | 349 | style: TextStyle( |
| 246 | color: MyColours.color_515151, | 350 | color: MyColours.color_515151, |
| 247 | fontSize: font( | 351 | fontSize: font( |
| @@ -256,7 +360,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -256,7 +360,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 256 | ), | 360 | ), |
| 257 | HEmptyView(10), | 361 | HEmptyView(10), |
| 258 | Text( | 362 | Text( |
| 259 | - '到客97.2%', | 363 | + '到客${customerProvider.monthStaticsData.totalDaoKe}', |
| 260 | style: TextStyle( | 364 | style: TextStyle( |
| 261 | color: MyColours.color_515151, | 365 | color: MyColours.color_515151, |
| 262 | fontSize: font( | 366 | fontSize: font( |
| @@ -264,7 +368,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -264,7 +368,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 264 | )), | 368 | )), |
| 265 | ), | 369 | ), |
| 266 | ], | 370 | ], |
| 267 | - ), | 371 | + ) |
| 268 | ], | 372 | ], |
| 269 | ))) | 373 | ))) |
| 270 | ], | 374 | ], |
| @@ -285,7 +389,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -285,7 +389,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 285 | runSpacing: w(5), | 389 | runSpacing: w(5), |
| 286 | children: [ | 390 | children: [ |
| 287 | Text( | 391 | Text( |
| 288 | - '有金额订单 6000', | 392 | + '有金额订单 ${customerProvider.monthStaticsData.totalPrice}', |
| 289 | style: TextStyle( | 393 | style: TextStyle( |
| 290 | color: MyColours.color_999999, | 394 | color: MyColours.color_999999, |
| 291 | decoration: TextDecoration.underline, | 395 | decoration: TextDecoration.underline, |
| @@ -301,7 +405,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -301,7 +405,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 301 | ), | 405 | ), |
| 302 | HEmptyView(10), | 406 | HEmptyView(10), |
| 303 | Text( | 407 | Text( |
| 304 | - '消费 9585800.00元', | 408 | + '消费 ${customerProvider.monthStaticsData.totalConsume ?? 0}元', |
| 305 | style: TextStyle( | 409 | style: TextStyle( |
| 306 | color: MyColours.color_999999, | 410 | color: MyColours.color_999999, |
| 307 | decoration: TextDecoration.underline, | 411 | decoration: TextDecoration.underline, |
| @@ -317,7 +421,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -317,7 +421,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 317 | ), | 421 | ), |
| 318 | HEmptyView(10), | 422 | HEmptyView(10), |
| 319 | Text( | 423 | Text( |
| 320 | - '人均 8885.58元', | 424 | + '人均 ${customerProvider.monthStaticsData.avgPrice ?? 0}元', |
| 321 | style: TextStyle( | 425 | style: TextStyle( |
| 322 | color: MyColours.color_999999, | 426 | color: MyColours.color_999999, |
| 323 | decoration: TextDecoration.underline, | 427 | decoration: TextDecoration.underline, |
| @@ -333,7 +437,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -333,7 +437,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 333 | ), | 437 | ), |
| 334 | HEmptyView(10), | 438 | HEmptyView(10), |
| 335 | Text( | 439 | Text( |
| 336 | - '桌均 95888.58元', | 440 | + '桌均 ${customerProvider.monthStaticsData.agvTable}元', |
| 337 | style: TextStyle( | 441 | style: TextStyle( |
| 338 | color: MyColours.color_999999, | 442 | color: MyColours.color_999999, |
| 339 | decoration: TextDecoration.underline, | 443 | decoration: TextDecoration.underline, |
| @@ -349,7 +453,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -349,7 +453,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 349 | ), | 453 | ), |
| 350 | HEmptyView(10), | 454 | HEmptyView(10), |
| 351 | Text( | 455 | Text( |
| 352 | - '存酒 8位', | 456 | + '存酒 ${customerProvider.monthStaticsData.storeWine}位', |
| 353 | style: TextStyle( | 457 | style: TextStyle( |
| 354 | color: MyColours.color_999999, | 458 | color: MyColours.color_999999, |
| 355 | decoration: TextDecoration.underline, | 459 | decoration: TextDecoration.underline, |
| @@ -365,7 +469,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -365,7 +469,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 365 | ), | 469 | ), |
| 366 | HEmptyView(10), | 470 | HEmptyView(10), |
| 367 | Text( | 471 | Text( |
| 368 | - '提前点餐 9位', | 472 | + '提前点餐 ${customerProvider.monthStaticsData.order}位', |
| 369 | style: TextStyle( | 473 | style: TextStyle( |
| 370 | color: MyColours.color_999999, | 474 | color: MyColours.color_999999, |
| 371 | decoration: TextDecoration.underline, | 475 | decoration: TextDecoration.underline, |
| @@ -381,7 +485,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -381,7 +485,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 381 | ), | 485 | ), |
| 382 | HEmptyView(10), | 486 | HEmptyView(10), |
| 383 | Text( | 487 | Text( |
| 384 | - '安排菜 9位', | 488 | + '安排菜 ${customerProvider.monthStaticsData.plancook}位', |
| 385 | style: TextStyle( | 489 | style: TextStyle( |
| 386 | color: MyColours.color_999999, | 490 | color: MyColours.color_999999, |
| 387 | decoration: TextDecoration.underline, | 491 | decoration: TextDecoration.underline, |
| @@ -403,9 +507,9 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -403,9 +507,9 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 403 | backgroundColor: MyColours.color_f3f3f3, | 507 | backgroundColor: MyColours.color_f3f3f3, |
| 404 | appBar: SystemAppBar('月度订单'), | 508 | appBar: SystemAppBar('月度订单'), |
| 405 | body: Consumer<CustomerProvider>(builder: (context, model, _) { | 509 | body: Consumer<CustomerProvider>(builder: (context, model, _) { |
| 406 | - if (model.pageStateStoreHome != PageState.Success) { | 510 | + if (model.pageStateMonth != PageState.Success) { |
| 407 | return ExceptionPage( | 511 | return ExceptionPage( |
| 408 | - pageState: model.pageStateStoreHome, | 512 | + pageState: model.pageStateMonth, |
| 409 | callback: () { | 513 | callback: () { |
| 410 | // getTableList(); | 514 | // getTableList(); |
| 411 | // _getSellerGuestManage(); | 515 | // _getSellerGuestManage(); |
| @@ -423,14 +527,19 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -423,14 +527,19 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 423 | _monthWidget(), | 527 | _monthWidget(), |
| 424 | VEmptyView(20), | 528 | VEmptyView(20), |
| 425 | ListView.builder( | 529 | ListView.builder( |
| 426 | - itemCount: 10, | 530 | + itemCount: |
| 531 | + customerProvider.monthStaticsData.dayList.length, | ||
| 427 | controller: _controller, | 532 | controller: _controller, |
| 428 | shrinkWrap: true, | 533 | shrinkWrap: true, |
| 429 | padding: EdgeInsets.symmetric(horizontal: w(10)), | 534 | padding: EdgeInsets.symmetric(horizontal: w(10)), |
| 430 | itemBuilder: (context, index) { | 535 | itemBuilder: (context, index) { |
| 536 | + DayList daylist = | ||
| 537 | + customerProvider.monthStaticsData.dayList[index]; | ||
| 431 | return InkWell( | 538 | return InkWell( |
| 432 | onTap: () { | 539 | onTap: () { |
| 433 | - NavigatorUtil.goDayOrderPage(context); | 540 | + NavigatorUtil.goDayOrderPage(context, |
| 541 | + widget.year, widget.month, daylist.days, | ||
| 542 | + uid: widget.uid); | ||
| 434 | }, | 543 | }, |
| 435 | child: Container( | 544 | child: Container( |
| 436 | margin: EdgeInsets.only(bottom: w(10)), | 545 | margin: EdgeInsets.only(bottom: w(10)), |
| @@ -455,7 +564,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -455,7 +564,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 455 | children: [ | 564 | children: [ |
| 456 | VEmptyView(32), | 565 | VEmptyView(32), |
| 457 | Text( | 566 | Text( |
| 458 | - '30日', | 567 | + '${daylist.days}日', |
| 459 | style: TextStyle( | 568 | style: TextStyle( |
| 460 | fontSize: font(16), | 569 | fontSize: font(16), |
| 461 | fontWeight: FontWeight.bold, | 570 | fontWeight: FontWeight.bold, |
| @@ -463,14 +572,20 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -463,14 +572,20 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 463 | ), | 572 | ), |
| 464 | VEmptyView(40), | 573 | VEmptyView(40), |
| 465 | Text( | 574 | Text( |
| 466 | - '十二月廿四', | 575 | + nongliShow( |
| 576 | + widget.year, | ||
| 577 | + month.toString(), | ||
| 578 | + daylist.days.toString()), | ||
| 467 | style: TextStyle( | 579 | style: TextStyle( |
| 468 | fontSize: font(10), | 580 | fontSize: font(10), |
| 469 | color: MyColours.color_999999), | 581 | color: MyColours.color_999999), |
| 470 | ), | 582 | ), |
| 471 | VEmptyView(10), | 583 | VEmptyView(10), |
| 472 | Text( | 584 | Text( |
| 473 | - '星期日', | 585 | + weekdayShow( |
| 586 | + widget.year, | ||
| 587 | + month.toString(), | ||
| 588 | + daylist.days.toString()), | ||
| 474 | style: TextStyle( | 589 | style: TextStyle( |
| 475 | fontSize: font(10), | 590 | fontSize: font(10), |
| 476 | color: MyColours.color_999999), | 591 | color: MyColours.color_999999), |
| @@ -497,7 +612,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -497,7 +612,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 497 | children: [ | 612 | children: [ |
| 498 | Row( | 613 | Row( |
| 499 | crossAxisAlignment: | 614 | crossAxisAlignment: |
| 500 | - CrossAxisAlignment.start, | 615 | + CrossAxisAlignment.center, |
| 501 | children: [ | 616 | children: [ |
| 502 | Text( | 617 | Text( |
| 503 | '预订', | 618 | '预订', |
| @@ -512,7 +627,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -512,7 +627,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 512 | ), | 627 | ), |
| 513 | HEmptyView(10), | 628 | HEmptyView(10), |
| 514 | Text( | 629 | Text( |
| 515 | - '1089单', | 630 | + '${daylist.totalRserve}单', |
| 516 | style: TextStyle( | 631 | style: TextStyle( |
| 517 | color: MyColours | 632 | color: MyColours |
| 518 | .color_515151, | 633 | .color_515151, |
| @@ -529,7 +644,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -529,7 +644,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 529 | ), | 644 | ), |
| 530 | HEmptyView(10), | 645 | HEmptyView(10), |
| 531 | Text( | 646 | Text( |
| 532 | - '1190桌', | 647 | + '${daylist.totalTable}桌', |
| 533 | style: TextStyle( | 648 | style: TextStyle( |
| 534 | color: MyColours | 649 | color: MyColours |
| 535 | .color_515151, | 650 | .color_515151, |
| @@ -541,6 +656,8 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -541,6 +656,8 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 541 | ), | 656 | ), |
| 542 | VEmptyView(10), | 657 | VEmptyView(10), |
| 543 | Wrap( | 658 | Wrap( |
| 659 | + crossAxisAlignment: | ||
| 660 | + WrapCrossAlignment.center, | ||
| 544 | runSpacing: w(5), | 661 | runSpacing: w(5), |
| 545 | children: [ | 662 | children: [ |
| 546 | Text( | 663 | Text( |
| @@ -556,7 +673,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -556,7 +673,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 556 | ), | 673 | ), |
| 557 | HEmptyView(10), | 674 | HEmptyView(10), |
| 558 | Text( | 675 | Text( |
| 559 | - '1089单', | 676 | + '${daylist.totalDao}单', |
| 560 | style: TextStyle( | 677 | style: TextStyle( |
| 561 | color: MyColours | 678 | color: MyColours |
| 562 | .color_515151, | 679 | .color_515151, |
| @@ -573,7 +690,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -573,7 +690,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 573 | ), | 690 | ), |
| 574 | HEmptyView(10), | 691 | HEmptyView(10), |
| 575 | Text( | 692 | Text( |
| 576 | - '1190桌', | 693 | + '${daylist.daoTable}桌', |
| 577 | style: TextStyle( | 694 | style: TextStyle( |
| 578 | color: MyColours | 695 | color: MyColours |
| 579 | .color_515151, | 696 | .color_515151, |
| @@ -583,7 +700,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -583,7 +700,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 583 | ), | 700 | ), |
| 584 | HEmptyView(10), | 701 | HEmptyView(10), |
| 585 | Text( | 702 | Text( |
| 586 | - '1089人', | 703 | + '${daylist.totalPnum ?? 0}人', |
| 587 | style: TextStyle( | 704 | style: TextStyle( |
| 588 | color: MyColours | 705 | color: MyColours |
| 589 | .color_515151, | 706 | .color_515151, |
| @@ -600,7 +717,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -600,7 +717,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 600 | ), | 717 | ), |
| 601 | HEmptyView(10), | 718 | HEmptyView(10), |
| 602 | Text( | 719 | Text( |
| 603 | - '1190取消', | 720 | + '${daylist.totalCel}取消', |
| 604 | style: TextStyle( | 721 | style: TextStyle( |
| 605 | color: MyColours | 722 | color: MyColours |
| 606 | .color_515151, | 723 | .color_515151, |
| @@ -617,7 +734,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -617,7 +734,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 617 | ), | 734 | ), |
| 618 | HEmptyView(10), | 735 | HEmptyView(10), |
| 619 | Text( | 736 | Text( |
| 620 | - '到客90.1%', | 737 | + '到客${daylist.totalDaoKe}', |
| 621 | style: TextStyle( | 738 | style: TextStyle( |
| 622 | color: MyColours | 739 | color: MyColours |
| 623 | .color_515151, | 740 | .color_515151, |
| @@ -633,7 +750,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -633,7 +750,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 633 | CrossAxisAlignment.start, | 750 | CrossAxisAlignment.start, |
| 634 | children: [ | 751 | children: [ |
| 635 | Text( | 752 | Text( |
| 636 | - '有金额订单数 25', | 753 | + '有金额订单数 ${daylist.totalPrice}', |
| 637 | style: TextStyle( | 754 | style: TextStyle( |
| 638 | color: MyColours | 755 | color: MyColours |
| 639 | .color_999999, | 756 | .color_999999, |
| @@ -650,7 +767,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -650,7 +767,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 650 | ), | 767 | ), |
| 651 | HEmptyView(10), | 768 | HEmptyView(10), |
| 652 | Text( | 769 | Text( |
| 653 | - '总消费 25800元', | 770 | + '总消费 ${daylist.totalConsume ?? 0}元', |
| 654 | style: TextStyle( | 771 | style: TextStyle( |
| 655 | color: MyColours | 772 | color: MyColours |
| 656 | .color_999999, | 773 | .color_999999, |
| @@ -666,7 +783,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -666,7 +783,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 666 | CrossAxisAlignment.start, | 783 | CrossAxisAlignment.start, |
| 667 | children: [ | 784 | children: [ |
| 668 | Text( | 785 | Text( |
| 669 | - '人均 103.2元', | 786 | + '人均 ${daylist.avgPrice ?? 0}元', |
| 670 | style: TextStyle( | 787 | style: TextStyle( |
| 671 | color: MyColours | 788 | color: MyColours |
| 672 | .color_999999, | 789 | .color_999999, |
| @@ -683,7 +800,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -683,7 +800,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 683 | ), | 800 | ), |
| 684 | HEmptyView(10), | 801 | HEmptyView(10), |
| 685 | Text( | 802 | Text( |
| 686 | - '桌均 860元', | 803 | + '桌均 ${daylist.agvTable ?? 0}元', |
| 687 | style: TextStyle( | 804 | style: TextStyle( |
| 688 | color: MyColours | 805 | color: MyColours |
| 689 | .color_999999, | 806 | .color_999999, |
| @@ -699,7 +816,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -699,7 +816,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 699 | CrossAxisAlignment.start, | 816 | CrossAxisAlignment.start, |
| 700 | children: [ | 817 | children: [ |
| 701 | Text( | 818 | Text( |
| 702 | - '存酒 1位', | 819 | + '存酒 ${daylist.storeWine}位', |
| 703 | style: TextStyle( | 820 | style: TextStyle( |
| 704 | color: MyColours | 821 | color: MyColours |
| 705 | .color_999999, | 822 | .color_999999, |
| @@ -716,7 +833,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -716,7 +833,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 716 | ), | 833 | ), |
| 717 | HEmptyView(10), | 834 | HEmptyView(10), |
| 718 | Text( | 835 | Text( |
| 719 | - '提前点餐 9位', | 836 | + '提前点餐 ${daylist.order}位', |
| 720 | style: TextStyle( | 837 | style: TextStyle( |
| 721 | color: MyColours | 838 | color: MyColours |
| 722 | .color_999999, | 839 | .color_999999, |
| @@ -733,7 +850,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | @@ -733,7 +850,7 @@ class _MonthOrderPageState extends State<MonthOrderPage> { | ||
| 733 | ), | 850 | ), |
| 734 | HEmptyView(10), | 851 | HEmptyView(10), |
| 735 | Text( | 852 | Text( |
| 736 | - '安排菜 9位', | 853 | + '安排菜 ${daylist.plancook}位', |
| 737 | style: TextStyle( | 854 | style: TextStyle( |
| 738 | color: MyColours | 855 | color: MyColours |
| 739 | .color_999999, | 856 | .color_999999, |
| @@ -128,26 +128,26 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { | @@ -128,26 +128,26 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { | ||
| 128 | children: [ | 128 | children: [ |
| 129 | VEmptyView(30), | 129 | VEmptyView(30), |
| 130 | Container( | 130 | Container( |
| 131 | - height: w(24), | 131 | + // height: w(24), |
| 132 | child: Row( | 132 | child: Row( |
| 133 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 134 | - children: [ | ||
| 135 | - Text(pnum, | ||
| 136 | - style: TextStyle( | ||
| 137 | - color: btnTitle == '活跃' | ||
| 138 | - ? MyColours.color_199095 | ||
| 139 | - : btnTitle == '60天未到店' | ||
| 140 | - ? MyColours.color_E89243 | ||
| 141 | - : MyColours.color_E34D59, | ||
| 142 | - fontSize: ScreenUtil().setSp(48), | ||
| 143 | - fontWeight: FontWeight.bold)), | ||
| 144 | - Text('位', | ||
| 145 | - style: TextStyle( | ||
| 146 | - color: MyColours.color_515151, | ||
| 147 | - fontSize: ScreenUtil().setSp(28), | ||
| 148 | - )) | ||
| 149 | - ], | ||
| 150 | - )), | 133 | + mainAxisAlignment: MainAxisAlignment.center, |
| 134 | + children: [ | ||
| 135 | + Text(pnum, | ||
| 136 | + style: TextStyle( | ||
| 137 | + color: btnTitle == '活跃' | ||
| 138 | + ? MyColours.color_199095 | ||
| 139 | + : btnTitle == '60天未到店' | ||
| 140 | + ? MyColours.color_E89243 | ||
| 141 | + : MyColours.color_E34D59, | ||
| 142 | + fontSize: ScreenUtil().setSp(48), | ||
| 143 | + fontWeight: FontWeight.bold)), | ||
| 144 | + Text('位', | ||
| 145 | + style: TextStyle( | ||
| 146 | + color: MyColours.color_515151, | ||
| 147 | + fontSize: ScreenUtil().setSp(28), | ||
| 148 | + )) | ||
| 149 | + ], | ||
| 150 | + )), | ||
| 151 | VEmptyView(20), | 151 | VEmptyView(20), |
| 152 | RoundButton( | 152 | RoundButton( |
| 153 | onPressed: () async { | 153 | onPressed: () async { |
| @@ -1021,7 +1021,10 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { | @@ -1021,7 +1021,10 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> { | ||
| 1021 | widget.customerProvider.homeStatisticsList[index]; | 1021 | widget.customerProvider.homeStatisticsList[index]; |
| 1022 | return InkWell( | 1022 | return InkWell( |
| 1023 | onTap: () { | 1023 | onTap: () { |
| 1024 | - NavigatorUtil.goMonthOrderPage(context); | 1024 | + NavigatorUtil.goMonthOrderPage( |
| 1025 | + context, | ||
| 1026 | + year.toString(), | ||
| 1027 | + countsListSunModel.monthss.toString()); | ||
| 1025 | }, | 1028 | }, |
| 1026 | child: MonthItem( | 1029 | child: MonthItem( |
| 1027 | countsListSunModel: countsListSunModel)); | 1030 | countsListSunModel: countsListSunModel)); |
| @@ -9,6 +9,7 @@ import 'package:provider/provider.dart'; | @@ -9,6 +9,7 @@ import 'package:provider/provider.dart'; | ||
| 9 | import '../../../../models/store_customer_home_model.dart'; | 9 | import '../../../../models/store_customer_home_model.dart'; |
| 10 | import '../../../../provider/customer_provider.dart'; | 10 | import '../../../../provider/customer_provider.dart'; |
| 11 | import '../../../../res/colors.dart'; | 11 | import '../../../../res/colors.dart'; |
| 12 | +import '../../../../utils/event_bus.dart'; | ||
| 12 | import '../../../../utils/screen_util.dart'; | 13 | import '../../../../utils/screen_util.dart'; |
| 13 | import '../../../../widgets/v_empty_view.dart'; | 14 | import '../../../../widgets/v_empty_view.dart'; |
| 14 | 15 | ||
| @@ -60,69 +61,79 @@ class _StoreCustomerHomePageState extends State<StoreCustomerHomePage> | @@ -60,69 +61,79 @@ class _StoreCustomerHomePageState extends State<StoreCustomerHomePage> | ||
| 60 | Widget build(BuildContext context) { | 61 | Widget build(BuildContext context) { |
| 61 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); | 62 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); |
| 62 | return Scaffold( | 63 | return Scaffold( |
| 63 | - appBar: SystemAppBar('全店客情'), | ||
| 64 | - body: Column( | ||
| 65 | - children: [ | ||
| 66 | - Container( | ||
| 67 | - alignment: Alignment.center, | ||
| 68 | - width: double.infinity, | ||
| 69 | - color: MyColours.color_ffffff, | ||
| 70 | - padding: EdgeInsets.only(bottom: w(9), top: w(9)), | ||
| 71 | - child: TabBar( | ||
| 72 | - onTap: (index) { | ||
| 73 | - print(index); | ||
| 74 | - }, | ||
| 75 | - controller: tabController, | ||
| 76 | - isScrollable: true, | ||
| 77 | - indicatorColor: MyColours.color_438E93, | ||
| 78 | - indicatorSize: TabBarIndicatorSize.tab, | ||
| 79 | - indicatorWeight: w(2), | ||
| 80 | - unselectedLabelColor: MyColours.color_999999, | ||
| 81 | - labelColor: MyColours.color_438E93, | ||
| 82 | - labelStyle: TextStyle( | ||
| 83 | - fontSize: w(14), | ||
| 84 | - color: MyColours.color_438E93, | ||
| 85 | - fontWeight: FontWeight.bold), | ||
| 86 | - unselectedLabelStyle: | ||
| 87 | - TextStyle(fontSize: w(12), color: MyColours.color_999999), | ||
| 88 | - indicatorPadding: EdgeInsets.only(left: w(24), right: w(24)), | ||
| 89 | - // labelPadding: | ||
| 90 | - // EdgeInsets.symmetric(horizontal: w(32)), //tabs控件之间的间距 | ||
| 91 | - tabs: [ | ||
| 92 | - Tab( | ||
| 93 | - height: w(30), | ||
| 94 | - child: Container( | ||
| 95 | - width: w(100), | ||
| 96 | - alignment: Alignment.center, | ||
| 97 | - child: Text( | ||
| 98 | - '全店', | ||
| 99 | - ), | ||
| 100 | - )), | ||
| 101 | - Tab( | ||
| 102 | - height: w(30), | ||
| 103 | - child: Container( | ||
| 104 | - width: w(100), | ||
| 105 | - alignment: Alignment.center, | ||
| 106 | - child: Text( | ||
| 107 | - '分经理', | ||
| 108 | - )), | ||
| 109 | - ), | ||
| 110 | - ], | 64 | + appBar: SystemAppBar('全店客情', onTap: () { |
| 65 | + EventBus().emit('changeStatusColor'); | ||
| 66 | + Navigator.pop(context); | ||
| 67 | + }), | ||
| 68 | + body: WillPopScope( | ||
| 69 | + onWillPop: () async { | ||
| 70 | + EventBus().emit('changeStatusColor'); | ||
| 71 | + return true; | ||
| 72 | + }, | ||
| 73 | + child: Column( | ||
| 74 | + children: [ | ||
| 75 | + Container( | ||
| 76 | + alignment: Alignment.center, | ||
| 77 | + width: double.infinity, | ||
| 78 | + color: MyColours.color_ffffff, | ||
| 79 | + padding: EdgeInsets.only(bottom: w(9), top: w(9)), | ||
| 80 | + child: TabBar( | ||
| 81 | + onTap: (index) { | ||
| 82 | + print(index); | ||
| 83 | + }, | ||
| 84 | + controller: tabController, | ||
| 85 | + isScrollable: true, | ||
| 86 | + indicatorColor: MyColours.color_438E93, | ||
| 87 | + indicatorSize: TabBarIndicatorSize.tab, | ||
| 88 | + indicatorWeight: w(2), | ||
| 89 | + unselectedLabelColor: MyColours.color_999999, | ||
| 90 | + labelColor: MyColours.color_438E93, | ||
| 91 | + labelStyle: TextStyle( | ||
| 92 | + fontSize: w(14), | ||
| 93 | + color: MyColours.color_438E93, | ||
| 94 | + fontWeight: FontWeight.bold), | ||
| 95 | + unselectedLabelStyle: TextStyle( | ||
| 96 | + fontSize: w(12), color: MyColours.color_999999), | ||
| 97 | + indicatorPadding: | ||
| 98 | + EdgeInsets.only(left: w(24), right: w(24)), | ||
| 99 | + // labelPadding: | ||
| 100 | + // EdgeInsets.symmetric(horizontal: w(32)), //tabs控件之间的间距 | ||
| 101 | + tabs: [ | ||
| 102 | + Tab( | ||
| 103 | + height: w(30), | ||
| 104 | + child: Container( | ||
| 105 | + width: w(100), | ||
| 106 | + alignment: Alignment.center, | ||
| 107 | + child: Text( | ||
| 108 | + '全店', | ||
| 109 | + ), | ||
| 110 | + )), | ||
| 111 | + Tab( | ||
| 112 | + height: w(30), | ||
| 113 | + child: Container( | ||
| 114 | + width: w(100), | ||
| 115 | + alignment: Alignment.center, | ||
| 116 | + child: Text( | ||
| 117 | + '分经理', | ||
| 118 | + )), | ||
| 119 | + ), | ||
| 120 | + ], | ||
| 111 | 121 | ||
| 112 | - // indicatorPadding: EdgeInsets.only( | ||
| 113 | - // left: ScreenUtil().setWidth(16), | ||
| 114 | - // right: ScreenUtil().setWidth(32)), | ||
| 115 | - // indicatorWeight: ScreenUtil().setWidth(6.0), | ||
| 116 | - )), | ||
| 117 | - Expanded( | ||
| 118 | - child: TabBarView(controller: tabController, children: [ | ||
| 119 | - StoreCustomerHomeLeftPage( | ||
| 120 | - customerProvider: customerProvider, | 122 | + // indicatorPadding: EdgeInsets.only( |
| 123 | + // left: ScreenUtil().setWidth(16), | ||
| 124 | + // right: ScreenUtil().setWidth(32)), | ||
| 125 | + // indicatorWeight: ScreenUtil().setWidth(6.0), | ||
| 126 | + )), | ||
| 127 | + Expanded( | ||
| 128 | + child: TabBarView(controller: tabController, children: [ | ||
| 129 | + StoreCustomerHomeLeftPage( | ||
| 130 | + customerProvider: customerProvider, | ||
| 131 | + ), | ||
| 132 | + StoreCustomerHomeRightPage( | ||
| 133 | + customerProvider: customerProvider) | ||
| 134 | + ]), | ||
| 121 | ), | 135 | ), |
| 122 | - StoreCustomerHomeRightPage(customerProvider: customerProvider) | ||
| 123 | - ]), | ||
| 124 | - ), | ||
| 125 | - ], | ||
| 126 | - )); | 136 | + ], |
| 137 | + ))); | ||
| 127 | } | 138 | } |
| 128 | } | 139 | } |
| @@ -268,26 +268,26 @@ class _StoreCustomerHomeRightPageState | @@ -268,26 +268,26 @@ class _StoreCustomerHomeRightPageState | ||
| 268 | children: [ | 268 | children: [ |
| 269 | VEmptyView(30), | 269 | VEmptyView(30), |
| 270 | Container( | 270 | Container( |
| 271 | - height: w(24), | 271 | + // height: w(24), |
| 272 | child: Row( | 272 | child: Row( |
| 273 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 274 | - children: [ | ||
| 275 | - Text(pnum, | ||
| 276 | - style: TextStyle( | ||
| 277 | - color: btnTitle == '活跃' | ||
| 278 | - ? MyColours.color_199095 | ||
| 279 | - : btnTitle == '60天未到店' | ||
| 280 | - ? MyColours.color_E89243 | ||
| 281 | - : MyColours.color_E34D59, | ||
| 282 | - fontSize: ScreenUtil().setSp(48), | ||
| 283 | - fontWeight: FontWeight.bold)), | ||
| 284 | - Text('位', | ||
| 285 | - style: TextStyle( | ||
| 286 | - color: MyColours.color_515151, | ||
| 287 | - fontSize: ScreenUtil().setSp(28), | ||
| 288 | - )) | ||
| 289 | - ], | ||
| 290 | - )), | 273 | + mainAxisAlignment: MainAxisAlignment.center, |
| 274 | + children: [ | ||
| 275 | + Text(pnum, | ||
| 276 | + style: TextStyle( | ||
| 277 | + color: btnTitle == '活跃' | ||
| 278 | + ? MyColours.color_199095 | ||
| 279 | + : btnTitle == '60天未到店' | ||
| 280 | + ? MyColours.color_E89243 | ||
| 281 | + : MyColours.color_E34D59, | ||
| 282 | + fontSize: ScreenUtil().setSp(48), | ||
| 283 | + fontWeight: FontWeight.bold)), | ||
| 284 | + Text('位', | ||
| 285 | + style: TextStyle( | ||
| 286 | + color: MyColours.color_515151, | ||
| 287 | + fontSize: ScreenUtil().setSp(28), | ||
| 288 | + )) | ||
| 289 | + ], | ||
| 290 | + )), | ||
| 291 | VEmptyView(20), | 291 | VEmptyView(20), |
| 292 | RoundButton( | 292 | RoundButton( |
| 293 | onPressed: () async { | 293 | onPressed: () async { |
| @@ -842,8 +842,24 @@ class _StoreCustomerHomeRightPageState | @@ -842,8 +842,24 @@ class _StoreCustomerHomeRightPageState | ||
| 842 | SellerCountsListSunModel countsListSunModel = | 842 | SellerCountsListSunModel countsListSunModel = |
| 843 | widget.customerProvider | 843 | widget.customerProvider |
| 844 | .managerStatisticsList[index]; | 844 | .managerStatisticsList[index]; |
| 845 | - return MonthItem( | ||
| 846 | - countsListSunModel: countsListSunModel); | 845 | + return InkWell( |
| 846 | + onTap: () { | ||
| 847 | + String uid = ''; | ||
| 848 | + menuTitle.forEach((element) { | ||
| 849 | + if (element.select) { | ||
| 850 | + uid = element.uid; | ||
| 851 | + } | ||
| 852 | + }); | ||
| 853 | + NavigatorUtil.goMonthOrderPage( | ||
| 854 | + context, | ||
| 855 | + year.toString(), | ||
| 856 | + countsListSunModel.monthss | ||
| 857 | + .toString(), | ||
| 858 | + uid: uid); | ||
| 859 | + }, | ||
| 860 | + child: MonthItem( | ||
| 861 | + countsListSunModel: | ||
| 862 | + countsListSunModel)); | ||
| 847 | }) | 863 | }) |
| 848 | ], | 864 | ], |
| 849 | ), | 865 | ), |
| @@ -29,6 +29,8 @@ import 'package:one_key/utils/utils.dart'; | @@ -29,6 +29,8 @@ import 'package:one_key/utils/utils.dart'; | ||
| 29 | import 'package:one_key/widgets/loading.dart'; | 29 | import 'package:one_key/widgets/loading.dart'; |
| 30 | import 'package:provider/provider.dart'; | 30 | import 'package:provider/provider.dart'; |
| 31 | 31 | ||
| 32 | +import '../models/day_statics_model.dart'; | ||
| 33 | +import '../models/month_statics_model.dart'; | ||
| 32 | import '../models/seller_counts_list.dart'; | 34 | import '../models/seller_counts_list.dart'; |
| 33 | import '../pages/my/customer_type/store_customer/bar_chart_page.dart'; | 35 | import '../pages/my/customer_type/store_customer/bar_chart_page.dart'; |
| 34 | import '../res/colors.dart'; | 36 | import '../res/colors.dart'; |
| @@ -97,10 +99,79 @@ class CustomerProvider extends ChangeNotifier { | @@ -97,10 +99,79 @@ class CustomerProvider extends ChangeNotifier { | ||
| 97 | List pageDataMy = []; | 99 | List pageDataMy = []; |
| 98 | 100 | ||
| 99 | List<SellerCountsListSunModel> homeStatisticsList = []; //全店客情首页统计数据 | 101 | List<SellerCountsListSunModel> homeStatisticsList = []; //全店客情首页统计数据 |
| 100 | - List<BarData> chartHomeDataList = []; | 102 | + List<BarData> chartHomeDataList = []; //全店客情柱形图数据 |
| 101 | 103 | ||
| 102 | List<SellerCountsListSunModel> managerStatisticsList = []; //经理客情首页统计数据 | 104 | List<SellerCountsListSunModel> managerStatisticsList = []; //经理客情首页统计数据 |
| 103 | - List<BarData> chartManagerDataList = []; | 105 | + List<BarData> chartManagerDataList = []; //我的客情柱形图数据 |
| 106 | + | ||
| 107 | + MonthStaticsSunModel monthStaticsData; //月度统计页面数据 | ||
| 108 | + | ||
| 109 | + DayStaticsSunModel dayStaticsData; //日订单 | ||
| 110 | + | ||
| 111 | + PageState pageStateMonth = PageState.Loading; | ||
| 112 | + PageState pageStateDay = PageState.Loading; | ||
| 113 | + | ||
| 114 | + /// 获取全店日订单统计数据 | ||
| 115 | + Future<DayStaticsSunModel> getSellerCountsListByDay( | ||
| 116 | + BuildContext context, Map<String, String> params, | ||
| 117 | + {isShowLoading = true}) async { | ||
| 118 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 119 | + .request<dynamic>( | ||
| 120 | + context, Method.get, HttpUrl.get_seller_counts_list_by_day, | ||
| 121 | + data: params, showLoading: isShowLoading) | ||
| 122 | + .catchError((error) { | ||
| 123 | + print(error.toString()); | ||
| 124 | + if (error is MyError) { | ||
| 125 | + switch (error.type) { | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + pageStateDay = PageState.ConnectivityError; | ||
| 129 | + notifyListeners(); | ||
| 130 | + }); | ||
| 131 | + if (baseResp == null) return null; | ||
| 132 | + if (baseResp.code == Constant.status_success) { | ||
| 133 | + dayStaticsData = DayStaticsModel.fromJson(baseResp.responseData).data; | ||
| 134 | + pageStateDay = PageState.Success; | ||
| 135 | + } else { | ||
| 136 | + if (baseResp != null) { | ||
| 137 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 138 | + } | ||
| 139 | + pageStateDay = PageState.ConnectivityError; | ||
| 140 | + } | ||
| 141 | + notifyListeners(); | ||
| 142 | + return dayStaticsData; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + /// 获取全店全月订单统计数据 | ||
| 146 | + Future<MonthStaticsSunModel> getSellerCountsListByMonth( | ||
| 147 | + BuildContext context, Map<String, String> params, | ||
| 148 | + {isShowLoading = true}) async { | ||
| 149 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 150 | + .request<dynamic>( | ||
| 151 | + context, Method.get, HttpUrl.get_seller_counts_list_by_month, | ||
| 152 | + data: params, showLoading: isShowLoading) | ||
| 153 | + .catchError((error) { | ||
| 154 | + print(error.toString()); | ||
| 155 | + if (error is MyError) { | ||
| 156 | + switch (error.type) { | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + pageStateMonth = PageState.ConnectivityError; | ||
| 160 | + notifyListeners(); | ||
| 161 | + }); | ||
| 162 | + if (baseResp == null) return null; | ||
| 163 | + if (baseResp.code == Constant.status_success) { | ||
| 164 | + monthStaticsData = MonthStaticsModel.fromJson(baseResp.responseData).data; | ||
| 165 | + pageStateMonth = PageState.Success; | ||
| 166 | + } else { | ||
| 167 | + if (baseResp != null) { | ||
| 168 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 169 | + } | ||
| 170 | + pageStateMonth = PageState.ConnectivityError; | ||
| 171 | + } | ||
| 172 | + notifyListeners(); | ||
| 173 | + return monthStaticsData; | ||
| 174 | + } | ||
| 104 | 175 | ||
| 105 | ///获取全店全年订单统计数据 | 176 | ///获取全店全年订单统计数据 |
| 106 | Future<List<SellerCountsListSunModel>> getSellerCountsList( | 177 | Future<List<SellerCountsListSunModel>> getSellerCountsList( |
| @@ -155,6 +226,7 @@ class CustomerProvider extends ChangeNotifier { | @@ -155,6 +226,7 @@ class CustomerProvider extends ChangeNotifier { | ||
| 155 | Utils.showToast(baseResp.msg ?? ""); | 226 | Utils.showToast(baseResp.msg ?? ""); |
| 156 | } | 227 | } |
| 157 | } | 228 | } |
| 229 | + | ||
| 158 | return homeStatisticsList; | 230 | return homeStatisticsList; |
| 159 | } | 231 | } |
| 160 | 232 |
| @@ -1737,17 +1737,19 @@ class NavigatorUtil { | @@ -1737,17 +1737,19 @@ class NavigatorUtil { | ||
| 1737 | 1737 | ||
| 1738 | /// 月度订单 | 1738 | /// 月度订单 |
| 1739 | static Future<dynamic> goMonthOrderPage( | 1739 | static Future<dynamic> goMonthOrderPage( |
| 1740 | - BuildContext context, { | ||
| 1741 | - replace = false, | ||
| 1742 | - }) { | ||
| 1743 | - return _navigateTo(context, "${Routes.month_order_page}", replace: replace); | 1740 | + BuildContext context, String year, String month, |
| 1741 | + {replace = false, String uid = ''}) { | ||
| 1742 | + return _navigateTo(context, | ||
| 1743 | + "${Routes.month_order_page}?year=${year}&month=${month}&uid=${uid}", | ||
| 1744 | + replace: replace); | ||
| 1744 | } | 1745 | } |
| 1745 | 1746 | ||
| 1746 | /// 日订单 | 1747 | /// 日订单 |
| 1747 | static Future<dynamic> goDayOrderPage( | 1748 | static Future<dynamic> goDayOrderPage( |
| 1748 | - BuildContext context, { | ||
| 1749 | - replace = false, | ||
| 1750 | - }) { | ||
| 1751 | - return _navigateTo(context, "${Routes.day_order_page}", replace: replace); | 1749 | + BuildContext context, String year, String month, String day, |
| 1750 | + {replace = false, String uid = ''}) { | ||
| 1751 | + return _navigateTo(context, | ||
| 1752 | + "${Routes.day_order_page}?year=${year}&month=${month}&day=${day}&uid=${uid}", | ||
| 1753 | + replace: replace); | ||
| 1752 | } | 1754 | } |
| 1753 | } | 1755 | } |
| @@ -2825,28 +2825,34 @@ var wineSettingPageHandle = new Handler( | @@ -2825,28 +2825,34 @@ var wineSettingPageHandle = new Handler( | ||
| 2825 | //月度订单 | 2825 | //月度订单 |
| 2826 | var monthOrderPageHandle = new Handler( | 2826 | var monthOrderPageHandle = new Handler( |
| 2827 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 2827 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 2828 | - // String idStr = params["idStr"].first; | 2828 | + String year = params["year"].first; |
| 2829 | + String month = params["month"].first; | ||
| 2830 | + | ||
| 2831 | + String uid = params["uid"].first; | ||
| 2829 | // IsExamineSunModel isExamineSunModel = IsExamineSunModel.fromJson(json.decode( | 2832 | // IsExamineSunModel isExamineSunModel = IsExamineSunModel.fromJson(json.decode( |
| 2830 | // FluroConvertUtils.fluroCnParamsDecode( | 2833 | // FluroConvertUtils.fluroCnParamsDecode( |
| 2831 | // params["isExamineSunModel"].first))); | 2834 | // params["isExamineSunModel"].first))); |
| 2832 | // } | 2835 | // } |
| 2833 | 2836 | ||
| 2834 | return ChangeNotifierProvider<CustomerProvider>( | 2837 | return ChangeNotifierProvider<CustomerProvider>( |
| 2835 | - create: (_) => CustomerProvider(), child: MonthOrderPage()); | 2838 | + create: (_) => CustomerProvider(), |
| 2839 | + child: MonthOrderPage(year: year, month: month, uid: uid)); | ||
| 2836 | }); | 2840 | }); |
| 2837 | 2841 | ||
| 2838 | - | ||
| 2839 | - | ||
| 2840 | //日订单 | 2842 | //日订单 |
| 2841 | var dayOrderPageHandle = new Handler( | 2843 | var dayOrderPageHandle = new Handler( |
| 2842 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 2844 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 2843 | - // String idStr = params["idStr"].first; | 2845 | + String year = params["year"].first; |
| 2846 | + String month = params["month"].first; | ||
| 2847 | + String day = params["day"].first; | ||
| 2848 | + String uid = params["uid"].first; | ||
| 2849 | + | ||
| 2844 | // IsExamineSunModel isExamineSunModel = IsExamineSunModel.fromJson(json.decode( | 2850 | // IsExamineSunModel isExamineSunModel = IsExamineSunModel.fromJson(json.decode( |
| 2845 | // FluroConvertUtils.fluroCnParamsDecode( | 2851 | // FluroConvertUtils.fluroCnParamsDecode( |
| 2846 | // params["isExamineSunModel"].first))); | 2852 | // params["isExamineSunModel"].first))); |
| 2847 | // } | 2853 | // } |
| 2848 | 2854 | ||
| 2849 | return ChangeNotifierProvider<CustomerProvider>( | 2855 | return ChangeNotifierProvider<CustomerProvider>( |
| 2850 | - create: (_) => CustomerProvider(), child: DayOrderPage()); | 2856 | + create: (_) => CustomerProvider(), |
| 2857 | + child: DayOrderPage(year: year, month: month, day: day, uid: uid)); | ||
| 2851 | }); | 2858 | }); |
| 2852 | - |
| @@ -42,33 +42,35 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | @@ -42,33 +42,35 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget { | ||
| 42 | }, | 42 | }, |
| 43 | child: Container( | 43 | child: Container( |
| 44 | // color: Colors.red, | 44 | // color: Colors.red, |
| 45 | - padding: EdgeInsets.only( | ||
| 46 | - // horizontal: ScreenUtil().setWidth(40), | ||
| 47 | - top: ScreenUtil().setWidth(15), | ||
| 48 | - bottom: ScreenUtil().setWidth(15), | ||
| 49 | - left: ScreenUtil().setWidth(40), | ||
| 50 | - ), | 45 | + // padding: EdgeInsets.only( |
| 46 | + // // horizontal: ScreenUtil().setWidth(40), | ||
| 47 | + // top: ScreenUtil().setWidth(15), | ||
| 48 | + // bottom: ScreenUtil().setWidth(15), | ||
| 49 | + // // left: ScreenUtil().setWidth(40), | ||
| 50 | + // ), | ||
| 51 | child: Row( | 51 | child: Row( |
| 52 | - children: <Widget>[ | ||
| 53 | - Image.asset( | ||
| 54 | - needWhite | ||
| 55 | - ? "assets/icon_white.png" | ||
| 56 | - : "assets/icon_back.png", | ||
| 57 | - width: ScreenUtil().setWidth(20), | ||
| 58 | - height: ScreenUtil().setWidth(31), | ||
| 59 | - ), | ||
| 60 | - leftTitle != '' | ||
| 61 | - ? Padding( | ||
| 62 | - padding: EdgeInsets.only( | ||
| 63 | - left: ScreenUtil().setWidth(20)), | ||
| 64 | - child: Text(leftTitle, | ||
| 65 | - style: TextStyle( | ||
| 66 | - fontSize: ScreenUtil().setWidth(30), | ||
| 67 | - color: MyColours.color_333333)), | ||
| 68 | - ) | ||
| 69 | - : Container() | ||
| 70 | - ], | ||
| 71 | - )), | 52 | + mainAxisAlignment: MainAxisAlignment.center, |
| 53 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 54 | + children: <Widget>[ | ||
| 55 | + Image.asset( | ||
| 56 | + needWhite | ||
| 57 | + ? "assets/icon_white.png" | ||
| 58 | + : "assets/icon_back.png", | ||
| 59 | + width: ScreenUtil().setWidth(20), | ||
| 60 | + height: ScreenUtil().setWidth(31), | ||
| 61 | + ), | ||
| 62 | + leftTitle != '' | ||
| 63 | + ? Padding( | ||
| 64 | + padding: | ||
| 65 | + EdgeInsets.only(left: ScreenUtil().setWidth(20)), | ||
| 66 | + child: Text(leftTitle, | ||
| 67 | + style: TextStyle( | ||
| 68 | + fontSize: ScreenUtil().setWidth(30), | ||
| 69 | + color: MyColours.color_333333)), | ||
| 70 | + ) | ||
| 71 | + : Container() | ||
| 72 | + ], | ||
| 73 | + )), | ||
| 72 | ) | 74 | ) |
| 73 | : Container(), | 75 | : Container(), |
| 74 | title: Text( | 76 | title: Text( |
-
Please register or login to post a comment