Showing
8 changed files
with
479 additions
and
8 deletions
assets/f_arrow.png
0 → 100644
991 Bytes
assets/f_arrow_down.png
0 → 100644
891 Bytes
lib/pages/feast/feast_create_page.dart
0 → 100644
| 1 | +import 'package:flutter/gestures.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 4 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 5 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 6 | + | ||
| 7 | +import '../../res/colors.dart'; | ||
| 8 | +import '../../utils/dialog_util.dart'; | ||
| 9 | +import '../../utils/screen_util.dart'; | ||
| 10 | +import '../../utils/utils.dart'; | ||
| 11 | +import '../../widgets/h_empty_view.dart'; | ||
| 12 | +import '../../widgets/system_app_bar.dart'; | ||
| 13 | + | ||
| 14 | +class FeastCreatePage extends StatefulWidget { | ||
| 15 | + FeastCreatePage({Key key}) : super(key: key); | ||
| 16 | + | ||
| 17 | + @override | ||
| 18 | + _FeastCreatePageState createState() => _FeastCreatePageState(); | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 22 | + TextEditingController nameC = TextEditingController(); | ||
| 23 | + TextEditingController phoneC = TextEditingController(); | ||
| 24 | + FocusNode nameF = FocusNode(); | ||
| 25 | + FocusNode phoneF = FocusNode(); | ||
| 26 | + TextEditingController customC = TextEditingController(); | ||
| 27 | + FocusNode customF = FocusNode(); | ||
| 28 | + List sexList; | ||
| 29 | + int sexSelectIndex = 0; | ||
| 30 | + String sexStr = '先生'; | ||
| 31 | + | ||
| 32 | + @override | ||
| 33 | + void initState() { | ||
| 34 | + // TODO: implement initState | ||
| 35 | + super.initState(); | ||
| 36 | + Utils.changeStatusColor(color: MyColours.color_438E93); | ||
| 37 | + initSexList(); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + ///称谓 | ||
| 41 | + initSexList() { | ||
| 42 | + String sexStr = '1'; | ||
| 43 | + sexList = [ | ||
| 44 | + { | ||
| 45 | + 'title': '先生', | ||
| 46 | + 'select': sexStr == '1' ? true : false, | ||
| 47 | + 'code': '1', | ||
| 48 | + 'hasLeftBorder': true | ||
| 49 | + }, | ||
| 50 | + { | ||
| 51 | + 'title': '女士', | ||
| 52 | + 'select': sexStr == '2' ? true : false, | ||
| 53 | + 'code': '2', | ||
| 54 | + 'hasLeftBorder': false | ||
| 55 | + }, | ||
| 56 | + { | ||
| 57 | + 'title': '公司', | ||
| 58 | + 'select': sexStr == '3' ? true : false, | ||
| 59 | + 'code': '3', | ||
| 60 | + 'hasLeftBorder': false | ||
| 61 | + } | ||
| 62 | + ]; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + Widget menuBtn(String title, bool select) { | ||
| 66 | + return Container( | ||
| 67 | + width: w(40), | ||
| 68 | + height: h(40), | ||
| 69 | + alignment: Alignment.center, | ||
| 70 | + decoration: BoxDecoration( | ||
| 71 | + color: select ? MyColours.color_438E93 : MyColours.color_BFC4D4, | ||
| 72 | + borderRadius: BorderRadius.circular(r(20))), | ||
| 73 | + child: Text( | ||
| 74 | + title, | ||
| 75 | + style: TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)), | ||
| 76 | + ), | ||
| 77 | + ); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + Widget arrow() { | ||
| 81 | + return Image.asset( | ||
| 82 | + Utils.getImgPath('f_arrow'), | ||
| 83 | + width: w(24), | ||
| 84 | + height: h(24), | ||
| 85 | + ); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + Widget menu() { | ||
| 89 | + return Padding( | ||
| 90 | + padding: EdgeInsets.all(w(24)), | ||
| 91 | + child: Row( | ||
| 92 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 93 | + children: [ | ||
| 94 | + menuBtn('意向', true), | ||
| 95 | + arrow(), | ||
| 96 | + menuBtn('选台', false), | ||
| 97 | + arrow(), | ||
| 98 | + menuBtn('定金', false), | ||
| 99 | + arrow(), | ||
| 100 | + menuBtn('签约', false), | ||
| 101 | + ], | ||
| 102 | + ), | ||
| 103 | + ); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + Widget _selectWidget(String title, String labelShow) { | ||
| 107 | + return InkWell( | ||
| 108 | + onTap: () { | ||
| 109 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 110 | + // DialogUtil.showSelectCusmanDialog( | ||
| 111 | + // context, | ||
| 112 | + // customerProvider.labelList.map((item) { | ||
| 113 | + // return item.label; | ||
| 114 | + // }).toList(), (value) { | ||
| 115 | + // if (value != null) { | ||
| 116 | + // setState(() { | ||
| 117 | + // customerProvider.labelSelIndex = value.first; | ||
| 118 | + // labelShow = customerProvider | ||
| 119 | + // .labelList[customerProvider.labelSelIndex].label; | ||
| 120 | + // }); | ||
| 121 | + // } | ||
| 122 | + // }, | ||
| 123 | + // selecteds: customerProvider.labelSelIndex == null | ||
| 124 | + // ? [] | ||
| 125 | + // : [customerProvider.labelSelIndex]) | ||
| 126 | + // .then((value) {}); | ||
| 127 | + }, | ||
| 128 | + child: Container( | ||
| 129 | + // height: ScreenUtil().setWidth(60), | ||
| 130 | + padding: EdgeInsets.only( | ||
| 131 | + left: w(16), | ||
| 132 | + right: w(8), | ||
| 133 | + top: ScreenUtil().setWidth(18 * 2), | ||
| 134 | + bottom: h(14)), | ||
| 135 | + decoration: BoxDecoration( | ||
| 136 | + border: Border( | ||
| 137 | + bottom: BorderSide( | ||
| 138 | + width: ScreenUtil().setWidth(2), | ||
| 139 | + color: MyColours.color_DBDBDB))), | ||
| 140 | + child: Row( | ||
| 141 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 142 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 143 | + children: [ | ||
| 144 | + Container( | ||
| 145 | + width: w(80), | ||
| 146 | + child: RichText( | ||
| 147 | + textScaleFactor: 1, | ||
| 148 | + overflow: TextOverflow.ellipsis, | ||
| 149 | + // textDirection: TextDirection.ltr, | ||
| 150 | + | ||
| 151 | + text: TextSpan( | ||
| 152 | + children: [ | ||
| 153 | + TextSpan( | ||
| 154 | + text: title, | ||
| 155 | + style: TextStyle( | ||
| 156 | + color: MyColours.color_515151, | ||
| 157 | + fontSize: ScreenUtil().setSp(28)), | ||
| 158 | + recognizer: TapGestureRecognizer() | ||
| 159 | + ..onTap = () {}), | ||
| 160 | + TextSpan( | ||
| 161 | + text: '*', | ||
| 162 | + style: TextStyle( | ||
| 163 | + color: MyColours.color_E34D59, | ||
| 164 | + fontSize: ScreenUtil().setSp(28)), | ||
| 165 | + //点击事件 | ||
| 166 | + recognizer: TapGestureRecognizer() | ||
| 167 | + ..onTap = () {}), | ||
| 168 | + ], | ||
| 169 | + ))), | ||
| 170 | + Expanded( | ||
| 171 | + child: Text( | ||
| 172 | + labelShow, | ||
| 173 | + overflow: TextOverflow.ellipsis, | ||
| 174 | + style: TextStyle( | ||
| 175 | + color: MyColours.color_515151, | ||
| 176 | + fontSize: ScreenUtil().setSp(28), | ||
| 177 | + ), | ||
| 178 | + )), | ||
| 179 | + HEmptyView(10), | ||
| 180 | + Image.asset( | ||
| 181 | + Utils.getImgPath('f_arrow_down'), | ||
| 182 | + width: ScreenUtil().setWidth(32 * 2), | ||
| 183 | + // height: ScreenUtil().setWidth(10), | ||
| 184 | + ) | ||
| 185 | + ], | ||
| 186 | + ), | ||
| 187 | + )); | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + Widget _inputWidget(String title, String labelShow, | ||
| 191 | + TextEditingController controller, FocusNode node) { | ||
| 192 | + return InkWell( | ||
| 193 | + onTap: () { | ||
| 194 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 195 | + // DialogUtil.showSelectCusmanDialog( | ||
| 196 | + // context, | ||
| 197 | + // customerProvider.labelList.map((item) { | ||
| 198 | + // return item.label; | ||
| 199 | + // }).toList(), (value) { | ||
| 200 | + // if (value != null) { | ||
| 201 | + // setState(() { | ||
| 202 | + // customerProvider.labelSelIndex = value.first; | ||
| 203 | + // labelShow = customerProvider | ||
| 204 | + // .labelList[customerProvider.labelSelIndex].label; | ||
| 205 | + // }); | ||
| 206 | + // } | ||
| 207 | + // }, | ||
| 208 | + // selecteds: customerProvider.labelSelIndex == null | ||
| 209 | + // ? [] | ||
| 210 | + // : [customerProvider.labelSelIndex]) | ||
| 211 | + // .then((value) {}); | ||
| 212 | + }, | ||
| 213 | + child: Container( | ||
| 214 | + // height: ScreenUtil().setWidth(60), | ||
| 215 | + padding: EdgeInsets.only( | ||
| 216 | + left: w(16), | ||
| 217 | + right: w(8), | ||
| 218 | + top: ScreenUtil().setWidth(18 * 2), | ||
| 219 | + bottom: h(14)), | ||
| 220 | + decoration: BoxDecoration( | ||
| 221 | + color: MyColours.color_ffffff, | ||
| 222 | + border: Border( | ||
| 223 | + bottom: BorderSide( | ||
| 224 | + width: ScreenUtil().setWidth(2), | ||
| 225 | + color: MyColours.color_DBDBDB))), | ||
| 226 | + child: Row( | ||
| 227 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 228 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 229 | + children: [ | ||
| 230 | + Container( | ||
| 231 | + width: w(80), | ||
| 232 | + child: RichText( | ||
| 233 | + textScaleFactor: 1, | ||
| 234 | + overflow: TextOverflow.ellipsis, | ||
| 235 | + // textDirection: TextDirection.ltr, | ||
| 236 | + | ||
| 237 | + text: TextSpan( | ||
| 238 | + children: [ | ||
| 239 | + TextSpan( | ||
| 240 | + text: title, | ||
| 241 | + style: TextStyle( | ||
| 242 | + color: MyColours.color_515151, | ||
| 243 | + fontSize: ScreenUtil().setSp(28)), | ||
| 244 | + recognizer: TapGestureRecognizer() | ||
| 245 | + ..onTap = () {}), | ||
| 246 | + TextSpan( | ||
| 247 | + text: '*', | ||
| 248 | + style: TextStyle( | ||
| 249 | + color: MyColours.color_E34D59, | ||
| 250 | + fontSize: ScreenUtil().setSp(28)), | ||
| 251 | + //点击事件 | ||
| 252 | + recognizer: TapGestureRecognizer() | ||
| 253 | + ..onTap = () {}), | ||
| 254 | + ], | ||
| 255 | + ))), | ||
| 256 | + Expanded( | ||
| 257 | + child: Container( | ||
| 258 | + height: h(40), | ||
| 259 | + child: TextField( | ||
| 260 | + maxLines: 1, | ||
| 261 | + | ||
| 262 | + //输入文本的样式 | ||
| 263 | + style: TextStyle( | ||
| 264 | + fontSize: ScreenUtil().setSp(28), | ||
| 265 | + color: MyColours.color_515151), | ||
| 266 | + controller: controller, | ||
| 267 | + focusNode: node, | ||
| 268 | + // textAlignVertical: TextAlignVertical.top, | ||
| 269 | + decoration: InputDecoration( | ||
| 270 | + hintText: labelShow, | ||
| 271 | + hintStyle: TextStyle( | ||
| 272 | + color: MyColours.color_999999, | ||
| 273 | + fontSize: ScreenUtil().setSp(28), | ||
| 274 | + ), | ||
| 275 | + // contentPadding: | ||
| 276 | + // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)), | ||
| 277 | + // border: InputBorder.none, | ||
| 278 | + contentPadding: EdgeInsets.zero, | ||
| 279 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 280 | + ), | ||
| 281 | + onChanged: (value) { | ||
| 282 | + print('ggg'); | ||
| 283 | + | ||
| 284 | + // nameStr = value; | ||
| 285 | + }, | ||
| 286 | + onEditingComplete: () { | ||
| 287 | + print('fff'); | ||
| 288 | + node.unfocus(); | ||
| 289 | + // _homeEnterModel.nameController.text = | ||
| 290 | + // nameStr + _nameSuffix(); | ||
| 291 | + // _addNameSuffix(nameStr, sexStr); | ||
| 292 | + }, | ||
| 293 | + keyboardType: title == '电话' | ||
| 294 | + ? TextInputType.number | ||
| 295 | + : TextInputType.text, | ||
| 296 | + )), | ||
| 297 | + ), | ||
| 298 | + title == '电话' ? SizedBox() : HEmptyView(10), | ||
| 299 | + title == '电话' | ||
| 300 | + ? SizedBox() | ||
| 301 | + : InkWell( | ||
| 302 | + onTap: () { | ||
| 303 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 304 | + List<String> list = []; | ||
| 305 | + for (Map item in sexList) { | ||
| 306 | + list.add(item['title']); | ||
| 307 | + } | ||
| 308 | + DialogUtil.showSelectCusmanDialog(context, list, | ||
| 309 | + (value) async { | ||
| 310 | + if (value != null) { | ||
| 311 | + sexSelectIndex = value.first; | ||
| 312 | + sexStr = list[sexSelectIndex]; | ||
| 313 | + // if (nameStr != null && nameStr != '') { | ||
| 314 | + // _addNameSuffix(nameStr, sexStr); | ||
| 315 | + // } | ||
| 316 | + setState(() {}); | ||
| 317 | + } | ||
| 318 | + }, selecteds: [sexSelectIndex]).then((value) {}); | ||
| 319 | + }, | ||
| 320 | + child: Row(children: [ | ||
| 321 | + Text( | ||
| 322 | + sexStr, | ||
| 323 | + style: TextStyle( | ||
| 324 | + color: MyColours.color_515151, | ||
| 325 | + fontSize: ScreenUtil().setSp(28), | ||
| 326 | + ), | ||
| 327 | + ), | ||
| 328 | + Image.asset(Utils.getImgPath('quan_down_f'), | ||
| 329 | + width: ScreenUtil().setWidth(28), | ||
| 330 | + height: ScreenUtil().setWidth(28)), | ||
| 331 | + ]), | ||
| 332 | + ) | ||
| 333 | + ], | ||
| 334 | + ), | ||
| 335 | + )); | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + Widget remark() { | ||
| 339 | + return Padding( | ||
| 340 | + padding: | ||
| 341 | + EdgeInsets.only(top: h(29), left: w(16), right: w(18), bottom: h(22)), | ||
| 342 | + child: //输入框 | ||
| 343 | + Container( | ||
| 344 | + width: double.infinity, | ||
| 345 | + padding: EdgeInsets.symmetric( | ||
| 346 | + horizontal: ScreenUtil().setWidth(30), | ||
| 347 | + vertical: ScreenUtil().setWidth(18)), | ||
| 348 | + alignment: Alignment.topLeft, | ||
| 349 | + decoration: BoxDecoration( | ||
| 350 | + color: MyColours.color_ffffff, | ||
| 351 | + border: Border.all( | ||
| 352 | + color: MyColours.color_DBDBDB, width: ScreenUtil().setWidth(2)), | ||
| 353 | + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))), | ||
| 354 | + child: TextField( | ||
| 355 | + controller: customC, | ||
| 356 | + focusNode: customF, | ||
| 357 | + style: TextStyle( | ||
| 358 | + color: MyColours.color_515151, | ||
| 359 | + fontSize: ScreenUtil().setSp(28), | ||
| 360 | + textBaseline: TextBaseline.alphabetic), | ||
| 361 | + textAlignVertical: TextAlignVertical.center, | ||
| 362 | + maxLines: 5, | ||
| 363 | + maxLength: 100, | ||
| 364 | + decoration: InputDecoration( | ||
| 365 | + hintText: "请输入备注", | ||
| 366 | + hintStyle: TextStyle( | ||
| 367 | + color: MyColours.color_999999, | ||
| 368 | + fontSize: ScreenUtil().setSp(28), | ||
| 369 | + ), | ||
| 370 | + contentPadding: EdgeInsets.zero, | ||
| 371 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 372 | + ), | ||
| 373 | + keyboardType: TextInputType.text, | ||
| 374 | + onChanged: (value) { | ||
| 375 | + // setState(() { | ||
| 376 | + // currentRemark = value ?? ""; | ||
| 377 | + // }); | ||
| 378 | + // if (value.length < currRemark.length && | ||
| 379 | + // currRemark.substring(value.length) != ',') { | ||
| 380 | + // setState(() { | ||
| 381 | + // currRemark = value ?? ""; | ||
| 382 | + // }); | ||
| 383 | + // if (sum == 0) { | ||
| 384 | + // for (int i = 0; i < remarks.length; i++) { | ||
| 385 | + // if (remarks[i].isSelect && | ||
| 386 | + // remarks[i].remark == selectItem.last) { | ||
| 387 | + // setState(() { | ||
| 388 | + // remarks[i].isSelect = false; | ||
| 389 | + // }); | ||
| 390 | + // } | ||
| 391 | + // } | ||
| 392 | + // } | ||
| 393 | + // sum++; | ||
| 394 | + // if (sum == selectItem.last.length || | ||
| 395 | + // selectItem.length == 1 || | ||
| 396 | + // selectItem.length == 0) { | ||
| 397 | + // selectItem.removeLast(); | ||
| 398 | + // sum = 0; | ||
| 399 | + // } | ||
| 400 | + // } else { | ||
| 401 | + // setState(() { | ||
| 402 | + // currRemark = value ?? ""; | ||
| 403 | + // }); | ||
| 404 | + // } | ||
| 405 | + }), | ||
| 406 | + ), | ||
| 407 | + ); | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + @override | ||
| 411 | + Widget build(BuildContext context) { | ||
| 412 | + return Scaffold( | ||
| 413 | + backgroundColor: MyColours.color_ffffff, | ||
| 414 | + appBar: SystemAppBar( | ||
| 415 | + '新建宴会', | ||
| 416 | + needWhite: true, | ||
| 417 | + bgColor: MyColours.color_438E93, | ||
| 418 | + titleColor: MyColours.color_F6F6F6, | ||
| 419 | + onTap: () { | ||
| 420 | + Navigator.pop(context); | ||
| 421 | + }, | ||
| 422 | + ), | ||
| 423 | + body: SingleChildScrollView( | ||
| 424 | + child: Column(children: <Widget>[ | ||
| 425 | + menu(), | ||
| 426 | + MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB), | ||
| 427 | + VEmptyView(26), | ||
| 428 | + _selectWidget('宴会日期', '2022-08-02(周二 七月十五)'), | ||
| 429 | + _selectWidget('接单人', '刘经理'), | ||
| 430 | + _selectWidget('跟单人', '请选择'), | ||
| 431 | + _selectWidget('宴会类型', '请选择'), | ||
| 432 | + _inputWidget('预订人', '请输入', nameC, nameF), | ||
| 433 | + _inputWidget('电话', '请输入', phoneC, phoneF), | ||
| 434 | + remark() | ||
| 435 | + ]))); | ||
| 436 | + } | ||
| 437 | +} |
| @@ -56,7 +56,9 @@ class _FeastPageState extends State<FeastPage> { | @@ -56,7 +56,9 @@ class _FeastPageState extends State<FeastPage> { | ||
| 56 | upAndDown('y_kanban', '宴会看板', onTap: () { | 56 | upAndDown('y_kanban', '宴会看板', onTap: () { |
| 57 | NavigatorUtil.goFeastBoardPage(context); | 57 | NavigatorUtil.goFeastBoardPage(context); |
| 58 | }), | 58 | }), |
| 59 | - upAndDown('y_new', '新建宴会'), | 59 | + upAndDown('y_new', '新建宴会', onTap: () { |
| 60 | + NavigatorUtil.goFeastCreatePage(context); | ||
| 61 | + }), | ||
| 60 | Stack(clipBehavior: Clip.none, children: [ | 62 | Stack(clipBehavior: Clip.none, children: [ |
| 61 | upAndDown('y_schedule', '待跟进'), | 63 | upAndDown('y_schedule', '待跟进'), |
| 62 | Positioned( | 64 | Positioned( |
| @@ -847,4 +847,11 @@ class NavigatorUtil { | @@ -847,4 +847,11 @@ class NavigatorUtil { | ||
| 847 | {replace = false, bool onlyShow = false}) { | 847 | {replace = false, bool onlyShow = false}) { |
| 848 | return _navigateTo(context, "${Routes.feast_board_page}", replace: replace); | 848 | return _navigateTo(context, "${Routes.feast_board_page}", replace: replace); |
| 849 | } | 849 | } |
| 850 | + | ||
| 851 | + ///宴会----新建宴会 | ||
| 852 | + static Future<dynamic> goFeastCreatePage(BuildContext context, | ||
| 853 | + {replace = false, bool onlyShow = false}) { | ||
| 854 | + return _navigateTo(context, "${Routes.feast_create_page}", | ||
| 855 | + replace: replace); | ||
| 856 | + } | ||
| 850 | } | 857 | } |
| @@ -142,6 +142,7 @@ import 'package:one_key/utils/utils.dart'; | @@ -142,6 +142,7 @@ import 'package:one_key/utils/utils.dart'; | ||
| 142 | import 'package:provider/provider.dart'; | 142 | import 'package:provider/provider.dart'; |
| 143 | 143 | ||
| 144 | import '../pages/feast/feast_board.dart'; | 144 | import '../pages/feast/feast_board.dart'; |
| 145 | +import '../pages/feast/feast_create_page.dart'; | ||
| 145 | import '../provider/feast_model.dart'; | 146 | import '../provider/feast_model.dart'; |
| 146 | 147 | ||
| 147 | // 登录页 | 148 | // 登录页 |
| @@ -1329,3 +1330,13 @@ var feastBoardPageHandle = new Handler( | @@ -1329,3 +1330,13 @@ var feastBoardPageHandle = new Handler( | ||
| 1329 | return ChangeNotifierProvider<FeastModel>( | 1330 | return ChangeNotifierProvider<FeastModel>( |
| 1330 | create: (_) => FeastModel(), child: FeastBoardPage()); | 1331 | create: (_) => FeastModel(), child: FeastBoardPage()); |
| 1331 | }); | 1332 | }); |
| 1333 | + | ||
| 1334 | +///宴会----新建宴会 | ||
| 1335 | +var feastCreatePageHandle = new Handler( | ||
| 1336 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 1337 | + // String uids = params["uids"].first; | ||
| 1338 | + | ||
| 1339 | + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first); | ||
| 1340 | + return ChangeNotifierProvider<FeastModel>( | ||
| 1341 | + create: (_) => FeastModel(), child: FeastCreatePage()); | ||
| 1342 | +}); |
| @@ -115,9 +115,8 @@ class Routes { | @@ -115,9 +115,8 @@ class Routes { | ||
| 115 | "/coupon_create_select_type_page"; //选择优惠券类型 | 115 | "/coupon_create_select_type_page"; //选择优惠券类型 |
| 116 | static String coupon_to_personnel_page = | 116 | static String coupon_to_personnel_page = |
| 117 | "/coupon_to_personnel_page"; //优惠券----可发放员工 | 117 | "/coupon_to_personnel_page"; //优惠券----可发放员工 |
| 118 | -static String feast_board_page = | ||
| 119 | - "/FeastBoardPage"; //宴会----宴会看板 | ||
| 120 | - | 118 | + static String feast_board_page = "/feast_board_page"; //宴会----宴会看板 |
| 119 | + static String feast_create_page = "/feast_create_page"; //宴会----新建宴会 | ||
| 121 | 120 | ||
| 122 | static void configureRoutes(FluroRouter router) { | 121 | static void configureRoutes(FluroRouter router) { |
| 123 | router.notFoundHandler = new Handler( | 122 | router.notFoundHandler = new Handler( |
| @@ -236,9 +235,7 @@ static String feast_board_page = | @@ -236,9 +235,7 @@ static String feast_board_page = | ||
| 236 | handler: couponCreateSelectTypePageHandle); | 235 | handler: couponCreateSelectTypePageHandle); |
| 237 | router.define(coupon_to_personnel_page, | 236 | router.define(coupon_to_personnel_page, |
| 238 | handler: couponToPersonnelPageHandle); | 237 | handler: couponToPersonnelPageHandle); |
| 239 | -router.define(feast_board_page, | ||
| 240 | - handler: feastBoardPageHandle); | ||
| 241 | - | ||
| 242 | - | 238 | + router.define(feast_board_page, handler: feastBoardPageHandle); |
| 239 | + router.define(feast_create_page, handler: feastCreatePageHandle); | ||
| 243 | } | 240 | } |
| 244 | } | 241 | } |
lib/utils/screen_util.dart
0 → 100644
| 1 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 2 | + | ||
| 3 | +double w(num width) { | ||
| 4 | + return ScreenUtil().setWidth(width * 2); | ||
| 5 | +} | ||
| 6 | + | ||
| 7 | +double h(num height) { | ||
| 8 | + return ScreenUtil().setWidth(height * 2); | ||
| 9 | +} | ||
| 10 | + | ||
| 11 | +double r(num radius) { | ||
| 12 | + return ScreenUtil().radius(radius * 2); | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +double font(num fontsize) { | ||
| 16 | + return ScreenUtil().setSp(fontsize * 2); | ||
| 17 | +} |
-
Please register or login to post a comment