Showing
10 changed files
with
544 additions
and
130 deletions
assets/phonesms.png
0 → 100644
2.21 KB
| 1 | /** | 1 | /** |
| 2 | * 页面状态 | 2 | * 页面状态 |
| 3 | */ | 3 | */ |
| 4 | -enum PageState{ | ||
| 5 | - Loading,//加载中 | ||
| 6 | - ConnectivityTimeOut,//请求超时 | ||
| 7 | - ConnectivityError,//请求错误 | ||
| 8 | - Empty,//空页面 | ||
| 9 | - NoPermission,//没有权限 | 4 | +enum PageState { |
| 5 | + Loading, //加载中 | ||
| 6 | + ConnectivityTimeOut, //请求超时 | ||
| 7 | + ConnectivityError, //请求错误 | ||
| 8 | + Empty, //空页面 | ||
| 9 | + NoPermission, //没有权限 | ||
| 10 | First, | 10 | First, |
| 11 | - Success//成功 | 11 | + Statics,//统计页 |
| 12 | + Success //成功 | ||
| 12 | } | 13 | } |
| 1 | import 'package:common_utils/common_utils.dart'; | 1 | import 'package:common_utils/common_utils.dart'; |
| 2 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 4 | +import 'package:one_key/constant/state.dart'; | ||
| 5 | +import 'package:one_key/provider/statistics_provider.dart'; | ||
| 4 | import 'package:one_key/res/colors.dart'; | 6 | import 'package:one_key/res/colors.dart'; |
| 7 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 5 | import 'package:one_key/utils/dialog_util.dart'; | 8 | import 'package:one_key/utils/dialog_util.dart'; |
| 6 | import 'package:one_key/utils/utils.dart'; | 9 | import 'package:one_key/utils/utils.dart'; |
| 7 | import 'package:one_key/widgets/h_empty_view.dart'; | 10 | import 'package:one_key/widgets/h_empty_view.dart'; |
| 11 | +import 'package:one_key/widgets/page_exception.dart'; | ||
| 8 | import 'package:one_key/widgets/system_app_bar.dart'; | 12 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 9 | import 'package:one_key/widgets/v_empty_view.dart'; | 13 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 14 | +import 'package:provider/provider.dart'; | ||
| 10 | 15 | ||
| 11 | typedef ClickCallback = void Function(String value); | 16 | typedef ClickCallback = void Function(String value); |
| 12 | enum TimeType { TimeTypeStart, TimeTypeEnd, TimeTypeDefalt } | 17 | enum TimeType { TimeTypeStart, TimeTypeEnd, TimeTypeDefalt } |
| @@ -153,101 +158,186 @@ class _StatisticsPageState extends State<StatisticsPage> { | @@ -153,101 +158,186 @@ class _StatisticsPageState extends State<StatisticsPage> { | ||
| 153 | ), | 158 | ), |
| 154 | body: Stack( | 159 | body: Stack( |
| 155 | children: [ | 160 | children: [ |
| 156 | - Column( | ||
| 157 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 158 | - children: [ | ||
| 159 | - VEmptyView(100), | ||
| 160 | - Container( | ||
| 161 | - alignment: Alignment.centerLeft, | ||
| 162 | - padding: EdgeInsets.symmetric( | ||
| 163 | - horizontal: ScreenUtil().setWidth(40)), | ||
| 164 | - color: MyColours.color_f5f5f5, | ||
| 165 | - // width: double.infinity, | ||
| 166 | - height: ScreenUtil().setWidth(80), | ||
| 167 | - child: Row( | ||
| 168 | - children: [ | ||
| 169 | - Text( | ||
| 170 | - '显示前 ', | ||
| 171 | - style: TextStyle( | ||
| 172 | - fontSize: ScreenUtil().setSp(26), | ||
| 173 | - color: MyColours.color_333333), | ||
| 174 | - ), | ||
| 175 | - Container( | ||
| 176 | - alignment: Alignment.center, | ||
| 177 | - margin: EdgeInsets.symmetric( | ||
| 178 | - vertical: ScreenUtil().setWidth(20)), | ||
| 179 | - // alignment: Alignment.centerLeft, | ||
| 180 | - // height: ScreenUtil().setWidth(80), | ||
| 181 | - constraints: BoxConstraints( | ||
| 182 | - maxWidth: ScreenUtil().setWidth(50 * 2)), | ||
| 183 | - decoration: BoxDecoration( | ||
| 184 | - border: Border( | ||
| 185 | - bottom: BorderSide( | ||
| 186 | - width: ScreenUtil().setWidth(2), | ||
| 187 | - color: MyColours.color_199095))), | ||
| 188 | - child: IntrinsicWidth( | ||
| 189 | - child: TextField( | ||
| 190 | - controller: controller, | ||
| 191 | - maxLines: 1, | ||
| 192 | - // inputFormatters: [ | ||
| 193 | - // LengthLimitingTextInputFormatter(9), | ||
| 194 | - // WhitelistingTextInputFormatter.digitsOnly | ||
| 195 | - // ], | ||
| 196 | - | ||
| 197 | - // inputFormatters: [ | ||
| 198 | - // NumLengthInputFormatter( | ||
| 199 | - // decimalLength: 2, integerLength: 6), | ||
| 200 | - // ], | ||
| 201 | - // focusNode: numberFocusNode, | ||
| 202 | - | ||
| 203 | - //光标颜色 | ||
| 204 | - cursorColor: MyColours.color_199095, | ||
| 205 | - //输入文本的样式 | 161 | + Consumer<StatisticsProvider>(builder: (context, model, _) { |
| 162 | + if (model.pageState != PageState.Success) { | ||
| 163 | + return Column( | ||
| 164 | + children: [ | ||
| 165 | + VEmptyView(100), | ||
| 166 | + Expanded( | ||
| 167 | + child: ExceptionPage( | ||
| 168 | + pageState: model.pageState, | ||
| 169 | + callback: () { | ||
| 170 | + // offset = 0; | ||
| 171 | + // getMessage(showLoading: true); | ||
| 172 | + }, | ||
| 173 | + emptyMsg: model.pageState == PageState.Statics | ||
| 174 | + ? "请选择日期和排序条件" | ||
| 175 | + : "暂时没有列表信息哦", | ||
| 176 | + emptyImg: "empty_search", | ||
| 177 | + showMsg: "加载中,请稍后...", | ||
| 178 | + )) | ||
| 179 | + ], | ||
| 180 | + ); | ||
| 181 | + } else { | ||
| 182 | + return Column( | ||
| 183 | + crossAxisAlignment: CrossAxisAlignment.end, | ||
| 184 | + children: [ | ||
| 185 | + VEmptyView(100), | ||
| 186 | + Container( | ||
| 187 | + alignment: Alignment.centerLeft, | ||
| 188 | + padding: EdgeInsets.symmetric( | ||
| 189 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 190 | + color: MyColours.color_f5f5f5, | ||
| 191 | + // width: double.infinity, | ||
| 192 | + height: ScreenUtil().setWidth(80), | ||
| 193 | + child: Row( | ||
| 194 | + children: [ | ||
| 195 | + Text( | ||
| 196 | + '显示前 ', | ||
| 206 | style: TextStyle( | 197 | style: TextStyle( |
| 207 | fontSize: ScreenUtil().setSp(26), | 198 | fontSize: ScreenUtil().setSp(26), |
| 208 | - color: MyColours.color_199095), | ||
| 209 | - textAlign: TextAlign.center, | ||
| 210 | - textInputAction: TextInputAction.done, | ||
| 211 | - decoration: InputDecoration( | ||
| 212 | - isDense: true, | ||
| 213 | - hintText: "输入", | ||
| 214 | - hintStyle: TextStyle( | ||
| 215 | - color: MyColours.color_999999, | ||
| 216 | - fontSize: ScreenUtil().setSp(26), | ||
| 217 | - ), | 199 | + color: MyColours.color_333333), |
| 200 | + ), | ||
| 201 | + Container( | ||
| 202 | + alignment: Alignment.center, | ||
| 203 | + margin: EdgeInsets.symmetric( | ||
| 204 | + vertical: ScreenUtil().setWidth(20)), | ||
| 205 | + // alignment: Alignment.centerLeft, | ||
| 206 | + // height: ScreenUtil().setWidth(80), | ||
| 207 | + constraints: BoxConstraints( | ||
| 208 | + maxWidth: ScreenUtil().setWidth(50 * 2)), | ||
| 209 | + decoration: BoxDecoration( | ||
| 210 | + border: Border( | ||
| 211 | + bottom: BorderSide( | ||
| 212 | + width: ScreenUtil().setWidth(2), | ||
| 213 | + color: MyColours.color_199095))), | ||
| 214 | + child: IntrinsicWidth( | ||
| 215 | + child: TextField( | ||
| 216 | + controller: controller, | ||
| 217 | + maxLines: 1, | ||
| 218 | + // inputFormatters: [ | ||
| 219 | + // LengthLimitingTextInputFormatter(9), | ||
| 220 | + // WhitelistingTextInputFormatter.digitsOnly | ||
| 221 | + // ], | ||
| 222 | + | ||
| 223 | + // inputFormatters: [ | ||
| 224 | + // NumLengthInputFormatter( | ||
| 225 | + // decimalLength: 2, integerLength: 6), | ||
| 226 | + // ], | ||
| 227 | + // focusNode: numberFocusNode, | ||
| 218 | 228 | ||
| 219 | - contentPadding: EdgeInsets.zero, //ios 17 | ||
| 220 | - border: InputBorder.none, | 229 | + //光标颜色 |
| 230 | + cursorColor: MyColours.color_199095, | ||
| 231 | + //输入文本的样式 | ||
| 232 | + style: TextStyle( | ||
| 233 | + fontSize: ScreenUtil().setSp(26), | ||
| 234 | + color: MyColours.color_199095), | ||
| 235 | + textAlign: TextAlign.center, | ||
| 236 | + textInputAction: TextInputAction.done, | ||
| 237 | + decoration: InputDecoration( | ||
| 238 | + isDense: true, | ||
| 239 | + hintText: "输入", | ||
| 240 | + hintStyle: TextStyle( | ||
| 241 | + color: MyColours.color_999999, | ||
| 242 | + fontSize: ScreenUtil().setSp(26), | ||
| 243 | + ), | ||
| 244 | + | ||
| 245 | + contentPadding: EdgeInsets.zero, //ios 17 | ||
| 246 | + border: InputBorder.none, | ||
| 247 | + ), | ||
| 248 | + onChanged: (value) {}, | ||
| 249 | + onEditingComplete: () { | ||
| 250 | + FocusScope.of(context) | ||
| 251 | + .requestFocus(FocusNode()); //隐藏键盘 | ||
| 252 | + // _updateMoney(); | ||
| 253 | + }, | ||
| 254 | + keyboardType: TextInputType.numberWithOptions( | ||
| 255 | + decimal: true), | ||
| 256 | + ))) | ||
| 257 | + ], | ||
| 258 | + )), | ||
| 259 | + //表头 | ||
| 260 | + _tableItem( | ||
| 261 | + tableHeaderModel, 3, TableItemType.TableItemTypeHeader), | ||
| 262 | + Expanded( | ||
| 263 | + child: ListView.builder( | ||
| 264 | + itemCount: 100, | ||
| 265 | + itemBuilder: (BuildContext context, int index) { | ||
| 266 | + StaticsModel tableHeaderModel1 = StaticsModel(); | ||
| 267 | + tableHeaderModel1.select = true; | ||
| 268 | + tableHeaderModel1.numstr = '$index'; | ||
| 269 | + tableHeaderModel1.name = '某某'; | ||
| 270 | + tableHeaderModel1.phone = '1879097890'; | ||
| 271 | + tableHeaderModel1.count = '${index}次'; | ||
| 272 | + return _tableItem(tableHeaderModel1, index, | ||
| 273 | + TableItemType.TableItemTypeBody); | ||
| 274 | + })), | ||
| 275 | + Container( | ||
| 276 | + alignment: Alignment.centerRight, | ||
| 277 | + height: ScreenUtil().setWidth(42 * 2), | ||
| 278 | + width: ScreenUtil().setWidth(110 * 4 + 4), | ||
| 279 | + margin: EdgeInsets.symmetric( | ||
| 280 | + vertical: ScreenUtil().setWidth(16), | ||
| 281 | + horizontal: ScreenUtil().setWidth(40)), | ||
| 282 | + decoration: BoxDecoration( | ||
| 283 | + color: MyColours.color_ffffff, | ||
| 284 | + borderRadius: | ||
| 285 | + BorderRadius.circular(ScreenUtil().setWidth(42)), | ||
| 286 | + border: Border.all( | ||
| 287 | + width: ScreenUtil().setWidth(2), | ||
| 288 | + color: MyColours.color_199095)), | ||
| 289 | + child: Row( | ||
| 290 | + children: [ | ||
| 291 | + Container( | ||
| 292 | + width: ScreenUtil().setWidth(110 * 2), | ||
| 293 | + height: ScreenUtil().setWidth(42 * 2), | ||
| 294 | + alignment: Alignment.center, | ||
| 295 | + decoration: BoxDecoration( | ||
| 296 | + color: Colors.white, | ||
| 297 | + borderRadius: BorderRadius.only( | ||
| 298 | + topLeft: Radius.circular( | ||
| 299 | + ScreenUtil().setWidth(42)), | ||
| 300 | + bottomLeft: Radius.circular( | ||
| 301 | + ScreenUtil().setWidth(42))), | ||
| 221 | ), | 302 | ), |
| 222 | - onChanged: (value) {}, | ||
| 223 | - onEditingComplete: () { | ||
| 224 | - FocusScope.of(context) | ||
| 225 | - .requestFocus(FocusNode()); //隐藏键盘 | ||
| 226 | - // _updateMoney(); | ||
| 227 | - }, | ||
| 228 | - keyboardType: | ||
| 229 | - TextInputType.numberWithOptions(decimal: true), | ||
| 230 | - ))) | ||
| 231 | - ], | ||
| 232 | - )), | ||
| 233 | - //表头 | ||
| 234 | - _tableItem( | ||
| 235 | - tableHeaderModel, 3, TableItemType.TableItemTypeHeader), | ||
| 236 | - Expanded( | ||
| 237 | - child: ListView.builder( | ||
| 238 | - itemCount: 100, | ||
| 239 | - itemBuilder: (BuildContext context, int index) { | ||
| 240 | - StaticsModel tableHeaderModel1 = StaticsModel(); | ||
| 241 | - tableHeaderModel1.select = true; | ||
| 242 | - tableHeaderModel1.numstr = '$index'; | ||
| 243 | - tableHeaderModel1.name = '某某'; | ||
| 244 | - tableHeaderModel1.phone = '1879097890'; | ||
| 245 | - tableHeaderModel1.count = '${index}次'; | ||
| 246 | - return _tableItem(tableHeaderModel1, index, | ||
| 247 | - TableItemType.TableItemTypeBody); | ||
| 248 | - })) | ||
| 249 | - ], | ||
| 250 | - ), | 303 | + child: Text( |
| 304 | + '发优惠券', | ||
| 305 | + style: TextStyle( | ||
| 306 | + fontWeight: FontWeight.bold, | ||
| 307 | + fontSize: ScreenUtil().setSp(32), | ||
| 308 | + color: MyColours.color_199095), | ||
| 309 | + )), | ||
| 310 | + InkWell( | ||
| 311 | + onTap: () { | ||
| 312 | + NavigatorUtil.goStatisticsSmsPage(context); | ||
| 313 | + }, | ||
| 314 | + child: Container( | ||
| 315 | + width: ScreenUtil().setWidth(110 * 2), | ||
| 316 | + height: ScreenUtil().setWidth(42 * 2), | ||
| 317 | + alignment: Alignment.center, | ||
| 318 | + decoration: BoxDecoration( | ||
| 319 | + color: MyColours.color_199095, | ||
| 320 | + borderRadius: BorderRadius.only( | ||
| 321 | + topRight: Radius.circular( | ||
| 322 | + ScreenUtil().setWidth(42)), | ||
| 323 | + bottomRight: Radius.circular( | ||
| 324 | + ScreenUtil().setWidth(42))), | ||
| 325 | + ), | ||
| 326 | + child: Text( | ||
| 327 | + '发短信', | ||
| 328 | + style: TextStyle( | ||
| 329 | + fontWeight: FontWeight.bold, | ||
| 330 | + fontSize: ScreenUtil().setSp(32), | ||
| 331 | + color: MyColours.color_ffffff), | ||
| 332 | + )), | ||
| 333 | + ) | ||
| 334 | + ], | ||
| 335 | + ), | ||
| 336 | + ) | ||
| 337 | + ], | ||
| 338 | + ); | ||
| 339 | + } | ||
| 340 | + }), | ||
| 251 | Padding( | 341 | Padding( |
| 252 | padding: | 342 | padding: |
| 253 | EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | 343 | EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), |
lib/pages/notebook/statistics_sms_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/res/colors.dart'; | ||
| 4 | +import 'package:one_key/utils/utils.dart'; | ||
| 5 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 6 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 7 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 8 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 9 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 10 | + | ||
| 11 | +class StatisticsSmsPage extends StatefulWidget { | ||
| 12 | + StatisticsSmsPage({Key key}) : super(key: key); | ||
| 13 | + | ||
| 14 | + @override | ||
| 15 | + _StatisticsSmsPageState createState() => _StatisticsSmsPageState(); | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +class _StatisticsSmsPageState extends State<StatisticsSmsPage> { | ||
| 19 | + ///文本 | ||
| 20 | + Widget _textWidget(String title, {Color textColor = MyColours.color_333333}) { | ||
| 21 | + return Container( | ||
| 22 | + // alignment: Alignment.center, | ||
| 23 | + height: ScreenUtil().setWidth(40), | ||
| 24 | + child: Text( | ||
| 25 | + title, | ||
| 26 | + style: TextStyle( | ||
| 27 | + fontWeight: FontWeight.bold, | ||
| 28 | + fontSize: ScreenUtil().setSp(28), | ||
| 29 | + color: textColor), | ||
| 30 | + ), | ||
| 31 | + ); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @override | ||
| 35 | + Widget build(BuildContext context) { | ||
| 36 | + return Scaffold( | ||
| 37 | + backgroundColor: MyColours.color_f5f5f5, | ||
| 38 | + appBar: SystemAppBar( | ||
| 39 | + '短信营销', | ||
| 40 | + onTap: () { | ||
| 41 | + Navigator.pop(context); | ||
| 42 | + }, | ||
| 43 | + ), | ||
| 44 | + body: Column(children: [ | ||
| 45 | + Expanded( | ||
| 46 | + child: SingleChildScrollView( | ||
| 47 | + child: Padding( | ||
| 48 | + padding: EdgeInsets.symmetric( | ||
| 49 | + horizontal: ScreenUtil().setWidth(30), | ||
| 50 | + vertical: ScreenUtil().setWidth(20)), | ||
| 51 | + child: Column(children: [ | ||
| 52 | + Container( | ||
| 53 | + decoration: BoxDecoration( | ||
| 54 | + boxShadow: [ | ||
| 55 | + BoxShadow( | ||
| 56 | + color: MyColours.color_e5e5e5, | ||
| 57 | + blurRadius: ScreenUtil().setWidth(30)) | ||
| 58 | + ], | ||
| 59 | + borderRadius: BorderRadius.all( | ||
| 60 | + Radius.circular(ScreenUtil().setWidth(20)), | ||
| 61 | + )), | ||
| 62 | + child: Column( | ||
| 63 | + children: [ | ||
| 64 | + Container( | ||
| 65 | + height: ScreenUtil().setWidth(100), | ||
| 66 | + padding: EdgeInsets.only( | ||
| 67 | + top: ScreenUtil().setWidth(30), | ||
| 68 | + left: ScreenUtil().setWidth(30), | ||
| 69 | + right: ScreenUtil().setWidth(30), | ||
| 70 | + bottom: ScreenUtil().setWidth(20)), | ||
| 71 | + decoration: BoxDecoration( | ||
| 72 | + color: MyColours.color_F9F9F9, | ||
| 73 | + borderRadius: BorderRadius.only( | ||
| 74 | + topLeft: Radius.circular( | ||
| 75 | + ScreenUtil().setWidth(20)), | ||
| 76 | + topRight: Radius.circular( | ||
| 77 | + ScreenUtil().setWidth(20)), | ||
| 78 | + )), | ||
| 79 | + child: Row( | ||
| 80 | + crossAxisAlignment: | ||
| 81 | + CrossAxisAlignment.center, | ||
| 82 | + children: [ | ||
| 83 | + _textWidget('当前已选择'), | ||
| 84 | + _textWidget('33', | ||
| 85 | + textColor: MyColours.color_199095), | ||
| 86 | + _textWidget('人/短信剩余条数'), | ||
| 87 | + _textWidget('33', | ||
| 88 | + textColor: MyColours.color_199095), | ||
| 89 | + _textWidget('条') | ||
| 90 | + ]), | ||
| 91 | + ), | ||
| 92 | + Container( | ||
| 93 | + // height: ScreenUtil().setWidth(140 * 2), | ||
| 94 | + padding: EdgeInsets.all( | ||
| 95 | + ScreenUtil().setWidth(30), | ||
| 96 | + ), | ||
| 97 | + decoration: BoxDecoration( | ||
| 98 | + color: MyColours.color_ffffff, | ||
| 99 | + borderRadius: BorderRadius.only( | ||
| 100 | + bottomLeft: Radius.circular( | ||
| 101 | + ScreenUtil().setWidth(20)), | ||
| 102 | + bottomRight: Radius.circular( | ||
| 103 | + ScreenUtil().setWidth(20)), | ||
| 104 | + )), | ||
| 105 | + child: TextField( | ||
| 106 | + // controller: controller, | ||
| 107 | + maxLines: 5, | ||
| 108 | + // inputFormatters: [ | ||
| 109 | + // LengthLimitingTextInputFormatter(9), | ||
| 110 | + // WhitelistingTextInputFormatter.digitsOnly | ||
| 111 | + // ], | ||
| 112 | + | ||
| 113 | + // inputFormatters: [ | ||
| 114 | + // NumLengthInputFormatter( | ||
| 115 | + // decimalLength: 2, integerLength: 6), | ||
| 116 | + // ], | ||
| 117 | + // focusNode: numberFocusNode, | ||
| 118 | + | ||
| 119 | + //光标颜色 | ||
| 120 | + cursorColor: MyColours.color_199095, | ||
| 121 | + //输入文本的样式 | ||
| 122 | + style: TextStyle( | ||
| 123 | + fontSize: ScreenUtil().setSp(32), | ||
| 124 | + color: MyColours.color_333333), | ||
| 125 | + textAlign: TextAlign.left, | ||
| 126 | + textInputAction: TextInputAction.done, | ||
| 127 | + decoration: InputDecoration( | ||
| 128 | + isDense: true, | ||
| 129 | + hintText: "请输入要发送的短信内容", | ||
| 130 | + hintStyle: TextStyle( | ||
| 131 | + color: MyColours.color_999999, | ||
| 132 | + fontSize: ScreenUtil().setSp(32), | ||
| 133 | + ), | ||
| 134 | + | ||
| 135 | + contentPadding: EdgeInsets.zero, //ios 17 | ||
| 136 | + border: InputBorder.none, | ||
| 137 | + ), | ||
| 138 | + onChanged: (value) {}, | ||
| 139 | + onEditingComplete: () { | ||
| 140 | + FocusScope.of(context) | ||
| 141 | + .requestFocus(FocusNode()); //隐藏键盘 | ||
| 142 | + // _updateMoney(); | ||
| 143 | + }, | ||
| 144 | + keyboardType: TextInputType.text, | ||
| 145 | + )) | ||
| 146 | + ], | ||
| 147 | + )), | ||
| 148 | + VEmptyView(20), | ||
| 149 | + Container( | ||
| 150 | + // height: ScreenUtil().setWidth(146 * 2), | ||
| 151 | + decoration: BoxDecoration( | ||
| 152 | + boxShadow: [ | ||
| 153 | + BoxShadow( | ||
| 154 | + color: MyColours.color_e5e5e5, | ||
| 155 | + blurRadius: ScreenUtil().setWidth(30)) | ||
| 156 | + ], | ||
| 157 | + borderRadius: BorderRadius.all( | ||
| 158 | + Radius.circular(ScreenUtil().setWidth(20)), | ||
| 159 | + )), | ||
| 160 | + child: Column( | ||
| 161 | + children: [ | ||
| 162 | + Container( | ||
| 163 | + width: double.infinity, | ||
| 164 | + height: ScreenUtil().setWidth(100), | ||
| 165 | + padding: EdgeInsets.only( | ||
| 166 | + top: ScreenUtil().setWidth(30), | ||
| 167 | + left: ScreenUtil().setWidth(30), | ||
| 168 | + right: ScreenUtil().setWidth(30), | ||
| 169 | + bottom: ScreenUtil().setWidth(20)), | ||
| 170 | + decoration: BoxDecoration( | ||
| 171 | + color: MyColours.color_F9F9F9, | ||
| 172 | + borderRadius: BorderRadius.only( | ||
| 173 | + topLeft: Radius.circular( | ||
| 174 | + ScreenUtil().setWidth(20)), | ||
| 175 | + topRight: Radius.circular( | ||
| 176 | + ScreenUtil().setWidth(20)), | ||
| 177 | + )), | ||
| 178 | + child: _textWidget('店铺名称名称'), | ||
| 179 | + ), | ||
| 180 | + Container( | ||
| 181 | + // height: ScreenUtil().setWidth(140 * 2), | ||
| 182 | + padding: EdgeInsets.all( | ||
| 183 | + ScreenUtil().setWidth(30), | ||
| 184 | + ), | ||
| 185 | + decoration: BoxDecoration( | ||
| 186 | + color: MyColours.color_ffffff, | ||
| 187 | + borderRadius: BorderRadius.only( | ||
| 188 | + bottomLeft: Radius.circular( | ||
| 189 | + ScreenUtil().setWidth(20)), | ||
| 190 | + bottomRight: Radius.circular( | ||
| 191 | + ScreenUtil().setWidth(20)), | ||
| 192 | + )), | ||
| 193 | + child: Column( | ||
| 194 | + crossAxisAlignment: CrossAxisAlignment.end, | ||
| 195 | + children: [ | ||
| 196 | + Row( | ||
| 197 | + children: [ | ||
| 198 | + Image.asset( | ||
| 199 | + Utils.getImgPath('phonesms'), | ||
| 200 | + width: ScreenUtil().setWidth(40), | ||
| 201 | + height: ScreenUtil().setWidth(40), | ||
| 202 | + ), | ||
| 203 | + HEmptyView(60), | ||
| 204 | + Expanded( | ||
| 205 | + child: TextField( | ||
| 206 | + // controller: controller, | ||
| 207 | + maxLines: 1, | ||
| 208 | + // inputFormatters: [ | ||
| 209 | + // LengthLimitingTextInputFormatter(9), | ||
| 210 | + // WhitelistingTextInputFormatter.digitsOnly | ||
| 211 | + // ], | ||
| 212 | + | ||
| 213 | + // inputFormatters: [ | ||
| 214 | + // NumLengthInputFormatter( | ||
| 215 | + // decimalLength: 2, integerLength: 6), | ||
| 216 | + // ], | ||
| 217 | + // focusNode: numberFocusNode, | ||
| 218 | + | ||
| 219 | + //光标颜色 | ||
| 220 | + cursorColor: MyColours.color_199095, | ||
| 221 | + //输入文本的样式 | ||
| 222 | + style: TextStyle( | ||
| 223 | + fontSize: | ||
| 224 | + ScreenUtil().setSp(32), | ||
| 225 | + color: MyColours.color_333333), | ||
| 226 | + textAlign: TextAlign.left, | ||
| 227 | + textInputAction: | ||
| 228 | + TextInputAction.done, | ||
| 229 | + decoration: InputDecoration( | ||
| 230 | + isDense: true, | ||
| 231 | + hintText: "请输入电话", | ||
| 232 | + hintStyle: TextStyle( | ||
| 233 | + color: MyColours.color_999999, | ||
| 234 | + fontSize: | ||
| 235 | + ScreenUtil().setSp(32), | ||
| 236 | + ), | ||
| 237 | + contentPadding: | ||
| 238 | + EdgeInsets.zero, //ios 17 | ||
| 239 | + border: InputBorder.none, | ||
| 240 | + ), | ||
| 241 | + onChanged: (value) {}, | ||
| 242 | + onEditingComplete: () { | ||
| 243 | + FocusScope.of(context) | ||
| 244 | + .requestFocus( | ||
| 245 | + FocusNode()); //隐藏键盘 | ||
| 246 | + // _updateMoney(); | ||
| 247 | + }, | ||
| 248 | + keyboardType: TextInputType.text, | ||
| 249 | + )) | ||
| 250 | + ], | ||
| 251 | + ), | ||
| 252 | + VEmptyView(30), | ||
| 253 | + MyDivider( | ||
| 254 | + ScreenUtil().setWidth(264 * 2), | ||
| 255 | + ScreenUtil().setWidth(2), | ||
| 256 | + color: MyColours.color_F0F0F0, | ||
| 257 | + ), | ||
| 258 | + VEmptyView(20), | ||
| 259 | + Text( | ||
| 260 | + '审核结果会以电话/短信的方式通知', | ||
| 261 | + style: TextStyle( | ||
| 262 | + fontSize: ScreenUtil().setSp(26), | ||
| 263 | + color: MyColours.color_199095), | ||
| 264 | + ), | ||
| 265 | + ], | ||
| 266 | + )) | ||
| 267 | + ], | ||
| 268 | + )), | ||
| 269 | + ])))), | ||
| 270 | + Padding( | ||
| 271 | + padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | ||
| 272 | + child: RoundButton( | ||
| 273 | + height: ScreenUtil().setWidth(80), | ||
| 274 | + text: '提交审核', | ||
| 275 | + radius: ScreenUtil().setWidth(10), | ||
| 276 | + fontSize: 34, | ||
| 277 | + isBold: false, | ||
| 278 | + ), | ||
| 279 | + ), | ||
| 280 | + VEmptyView(40) | ||
| 281 | + ]), | ||
| 282 | + ); | ||
| 283 | + } | ||
| 284 | +} |
| @@ -325,4 +325,11 @@ class NavigatorUtil { | @@ -325,4 +325,11 @@ class NavigatorUtil { | ||
| 325 | {replace = false}) { | 325 | {replace = false}) { |
| 326 | return _navigateTo(context, "${Routes.statistics_page}", replace: replace); | 326 | return _navigateTo(context, "${Routes.statistics_page}", replace: replace); |
| 327 | } | 327 | } |
| 328 | + | ||
| 329 | + /// 统计发短信 | ||
| 330 | + static Future<dynamic> goStatisticsSmsPage(BuildContext context, | ||
| 331 | + {replace = false}) { | ||
| 332 | + return _navigateTo(context, "${Routes.statistics_sms_page}", | ||
| 333 | + replace: replace); | ||
| 334 | + } | ||
| 328 | } | 335 | } |
| @@ -39,6 +39,7 @@ import 'package:one_key/pages/my/my_integral_page.dart'; | @@ -39,6 +39,7 @@ import 'package:one_key/pages/my/my_integral_page.dart'; | ||
| 39 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; | 39 | import 'package:one_key/pages/my/receive_orders_time_set.dart'; |
| 40 | import 'package:one_key/pages/my/remark_manager_page.dart'; | 40 | import 'package:one_key/pages/my/remark_manager_page.dart'; |
| 41 | import 'package:one_key/pages/notebook/statistics_page.dart'; | 41 | import 'package:one_key/pages/notebook/statistics_page.dart'; |
| 42 | +import 'package:one_key/pages/notebook/statistics_sms_page.dart'; | ||
| 42 | import 'package:one_key/pages/online_check/invoice_detail_page.dart'; | 43 | import 'package:one_key/pages/online_check/invoice_detail_page.dart'; |
| 43 | import 'package:one_key/pages/online_check/online_check_detail_page.dart'; | 44 | import 'package:one_key/pages/online_check/online_check_detail_page.dart'; |
| 44 | import 'package:one_key/pages/online_check/online_check_edit_page.dart'; | 45 | import 'package:one_key/pages/online_check/online_check_edit_page.dart'; |
| @@ -485,3 +486,16 @@ var statisticsPageHandler = new Handler( | @@ -485,3 +486,16 @@ var statisticsPageHandler = new Handler( | ||
| 485 | // return ChangeNotifierProvider<UploadImageProvider>( | 486 | // return ChangeNotifierProvider<UploadImageProvider>( |
| 486 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | 487 | // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); |
| 487 | }); | 488 | }); |
| 489 | + | ||
| 490 | +///统计 | ||
| 491 | +var statisticsSmsPageHandler = new Handler( | ||
| 492 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 493 | + // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( | ||
| 494 | + // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); | ||
| 495 | + // String tid = params["tid"].first; | ||
| 496 | + // String tname = params["tname"].first; | ||
| 497 | + return ChangeNotifierProvider<StatisticsProvider>( | ||
| 498 | + create: (_) => StatisticsProvider(), child: StatisticsSmsPage()); | ||
| 499 | + // return ChangeNotifierProvider<UploadImageProvider>( | ||
| 500 | + // create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage()); | ||
| 501 | +}); |
| @@ -45,6 +45,7 @@ class Routes { | @@ -45,6 +45,7 @@ class Routes { | ||
| 45 | static String my_contant_page = "/my_contant_page"; //我的联系人 | 45 | static String my_contant_page = "/my_contant_page"; //我的联系人 |
| 46 | static String table_photo_manager = "/table_photo_manager"; //桌位照片管理 | 46 | static String table_photo_manager = "/table_photo_manager"; //桌位照片管理 |
| 47 | static String statistics_page = "/statistics_page"; //统计页 | 47 | static String statistics_page = "/statistics_page"; //统计页 |
| 48 | + static String statistics_sms_page = "/statistics_sms_page"; //统计页发短信 | ||
| 48 | 49 | ||
| 49 | static void configureRoutes(FluroRouter router) { | 50 | static void configureRoutes(FluroRouter router) { |
| 50 | router.notFoundHandler = new Handler( | 51 | router.notFoundHandler = new Handler( |
| @@ -97,5 +98,6 @@ class Routes { | @@ -97,5 +98,6 @@ class Routes { | ||
| 97 | router.define(my_contant_page, handler: myContantPageHandler); | 98 | router.define(my_contant_page, handler: myContantPageHandler); |
| 98 | router.define(table_photo_manager, handler: tablePhotoManagerHandler); | 99 | router.define(table_photo_manager, handler: tablePhotoManagerHandler); |
| 99 | router.define(statistics_page, handler: statisticsPageHandler); | 100 | router.define(statistics_page, handler: statisticsPageHandler); |
| 101 | + router.define(statistics_sms_page, handler: statisticsSmsPageHandler); | ||
| 100 | } | 102 | } |
| 101 | } | 103 | } |
| @@ -7,8 +7,14 @@ import 'package:one_key/widgets/v_empty_view.dart'; | @@ -7,8 +7,14 @@ import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 7 | class EmptyPage extends StatefulWidget { | 7 | class EmptyPage extends StatefulWidget { |
| 8 | final String content; | 8 | final String content; |
| 9 | final String imgname; | 9 | final String imgname; |
| 10 | + final Color bgcolor; | ||
| 10 | 11 | ||
| 11 | - const EmptyPage({Key key, this.content, this.imgname = "bg_error"}) : super(key: key); | 12 | + const EmptyPage( |
| 13 | + {Key key, | ||
| 14 | + this.content, | ||
| 15 | + this.imgname = "bg_error", | ||
| 16 | + this.bgcolor = MyColours.color_ffffff}) | ||
| 17 | + : super(key: key); | ||
| 12 | 18 | ||
| 13 | @override | 19 | @override |
| 14 | State<StatefulWidget> createState() { | 20 | State<StatefulWidget> createState() { |
| @@ -22,36 +28,36 @@ class EmptyPageState extends State<EmptyPage> { | @@ -22,36 +28,36 @@ class EmptyPageState extends State<EmptyPage> { | ||
| 22 | Widget build(BuildContext context) { | 28 | Widget build(BuildContext context) { |
| 23 | // TODO: implement build | 29 | // TODO: implement build |
| 24 | return Container( | 30 | return Container( |
| 25 | - width: double.infinity, | ||
| 26 | - height: double.infinity, | ||
| 27 | - child: Stack( | ||
| 28 | - children: <Widget>[ | ||
| 29 | - Container( | ||
| 30 | - width: double.infinity, | ||
| 31 | - height: double.infinity, | ||
| 32 | - margin: EdgeInsets.only(top: ScreenUtil().setWidth(132)), | ||
| 33 | - child: Column( | ||
| 34 | - mainAxisSize: MainAxisSize.min, | ||
| 35 | - children: <Widget>[ | ||
| 36 | - Image.asset( | ||
| 37 | - Utils.getImgPath(widget.imgname), | ||
| 38 | - width: ScreenUtil().setWidth(520), | ||
| 39 | - height: ScreenUtil().setWidth(384), | ||
| 40 | - ), | ||
| 41 | - VEmptyView(40), | ||
| 42 | - Text( | ||
| 43 | - widget.content ?? "数据为空", | ||
| 44 | - textAlign: TextAlign.center, | ||
| 45 | - strutStyle: StrutStyle(leading: ScreenUtil().setWidth(1)), | ||
| 46 | - style: TextStyle( | ||
| 47 | - fontSize: ScreenUtil().setSp(28), | ||
| 48 | - color: MyColours.color_353535), | ||
| 49 | - ) | ||
| 50 | - ], | 31 | + width: double.infinity, |
| 32 | + height: double.infinity, | ||
| 33 | + color: widget.bgcolor, | ||
| 34 | + child: Stack( | ||
| 35 | + children: <Widget>[ | ||
| 36 | + Container( | ||
| 37 | + width: double.infinity, | ||
| 38 | + height: double.infinity, | ||
| 39 | + margin: EdgeInsets.only(top: ScreenUtil().setWidth(132)), | ||
| 40 | + child: Column( | ||
| 41 | + mainAxisSize: MainAxisSize.min, | ||
| 42 | + children: <Widget>[ | ||
| 43 | + Image.asset( | ||
| 44 | + Utils.getImgPath(widget.imgname), | ||
| 45 | + width: ScreenUtil().setWidth(520), | ||
| 46 | + height: ScreenUtil().setWidth(384), | ||
| 47 | + ), | ||
| 48 | + VEmptyView(40), | ||
| 49 | + Text( | ||
| 50 | + widget.content ?? "数据为空", | ||
| 51 | + textAlign: TextAlign.center, | ||
| 52 | + strutStyle: StrutStyle(leading: ScreenUtil().setWidth(1)), | ||
| 53 | + style: TextStyle( | ||
| 54 | + fontSize: ScreenUtil().setSp(28), | ||
| 55 | + color: MyColours.color_353535), | ||
| 56 | + ) | ||
| 57 | + ], | ||
| 58 | + ), | ||
| 51 | ), | 59 | ), |
| 52 | - ), | ||
| 53 | - ], | ||
| 54 | - ) | ||
| 55 | - ); | 60 | + ], |
| 61 | + )); | ||
| 56 | } | 62 | } |
| 57 | } | 63 | } |
| @@ -76,6 +76,13 @@ class ExceptionPageState extends State<ExceptionPage> { | @@ -76,6 +76,13 @@ class ExceptionPageState extends State<ExceptionPage> { | ||
| 76 | btnTitle: '开启权限', | 76 | btnTitle: '开启权限', |
| 77 | ); | 77 | ); |
| 78 | break; | 78 | break; |
| 79 | + case PageState.Statics: | ||
| 80 | + page = EmptyPage( | ||
| 81 | + content: widget.emptyMsg, | ||
| 82 | + imgname: widget.emptyImg, | ||
| 83 | + bgcolor: MyColours.color_f5f5f5, | ||
| 84 | + ); | ||
| 85 | + break; | ||
| 79 | default: | 86 | default: |
| 80 | page = ErrorPage( | 87 | page = ErrorPage( |
| 81 | content: "哎呀~网络好像走失了呢", | 88 | content: "哎呀~网络好像走失了呢", |
-
Please register or login to post a comment