Showing
17 changed files
with
1572 additions
and
117 deletions
assets/f_delete.png
0 → 100644
2.4 KB
assets/f_delete_red.png
0 → 100644
1.17 KB
assets/f_dj.png
0 → 100644
1.36 KB
assets/f_dj_db.png
0 → 100644
2.09 KB
assets/f_dj_delete.png
0 → 100644
1.05 KB
assets/f_tiaocai.png
0 → 100644
1.79 KB
lib/models/feast_menu_model.dart
0 → 100644
| 1 | +///桌位区域 | ||
| 2 | +class FeastMenuModel { | ||
| 3 | + String name; | ||
| 4 | + bool save; | ||
| 5 | + bool select; | ||
| 6 | + | ||
| 7 | + FeastMenuModel(); | ||
| 8 | + | ||
| 9 | + factory FeastMenuModel.fromJson(Map<String, dynamic> json) => FeastMenuModel() | ||
| 10 | + ..name = json["name"] | ||
| 11 | + ..save = json["save"] | ||
| 12 | + ..select = json["select"]; | ||
| 13 | + | ||
| 14 | + Map<String, dynamic> toJson() => | ||
| 15 | + <String, dynamic>{"name": name, "save": save, "select": select}; | ||
| 16 | +} |
| @@ -78,7 +78,7 @@ class _FeastBoardPageState extends State<FeastBoardPage> { | @@ -78,7 +78,7 @@ class _FeastBoardPageState extends State<FeastBoardPage> { | ||
| 78 | children: [ | 78 | children: [ |
| 79 | TableCalendar( | 79 | TableCalendar( |
| 80 | // rowHeight: ScreenUtil().setWidth(100), | 80 | // rowHeight: ScreenUtil().setWidth(100), |
| 81 | - rowHeight: ScreenUtil().setWidth(106), | 81 | + rowHeight: ScreenUtil().setWidth(114), |
| 82 | calendarController: _calendarController, | 82 | calendarController: _calendarController, |
| 83 | initialSelectedDay: dateTimeNow, | 83 | initialSelectedDay: dateTimeNow, |
| 84 | onDaySelected: (day, events, holidays) { | 84 | onDaySelected: (day, events, holidays) { |
| 1 | +import 'package:dotted_border/dotted_border.dart'; | ||
| 1 | import 'package:flutter/gestures.dart'; | 2 | import 'package:flutter/gestures.dart'; |
| 2 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
| 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 4 | import 'package:one_key/widgets/MyDivider.dart'; | 5 | import 'package:one_key/widgets/MyDivider.dart'; |
| 6 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 5 | import 'package:one_key/widgets/v_empty_view.dart'; | 7 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 8 | +import 'package:provider/provider.dart'; | ||
| 6 | 9 | ||
| 10 | +import '../../models/feast_menu_model.dart'; | ||
| 11 | +import '../../provider/feast_model.dart'; | ||
| 12 | +import '../../provider/upload_img_provider.dart'; | ||
| 7 | import '../../res/colors.dart'; | 13 | import '../../res/colors.dart'; |
| 8 | import '../../utils/dialog_util.dart'; | 14 | import '../../utils/dialog_util.dart'; |
| 9 | import '../../utils/screen_util.dart'; | 15 | import '../../utils/screen_util.dart'; |
| 16 | +import '../../utils/upload_image_util.dart'; | ||
| 10 | import '../../utils/utils.dart'; | 17 | import '../../utils/utils.dart'; |
| 11 | import '../../widgets/h_empty_view.dart'; | 18 | import '../../widgets/h_empty_view.dart'; |
| 19 | +import '../../widgets/set_time_widget.dart'; | ||
| 12 | import '../../widgets/system_app_bar.dart'; | 20 | import '../../widgets/system_app_bar.dart'; |
| 21 | +import '../online_check/img_picker_widget_f.dart'; | ||
| 22 | +import '../table/area_item_table.dart'; | ||
| 13 | 23 | ||
| 14 | class FeastCreatePage extends StatefulWidget { | 24 | class FeastCreatePage extends StatefulWidget { |
| 15 | FeastCreatePage({Key key}) : super(key: key); | 25 | FeastCreatePage({Key key}) : super(key: key); |
| @@ -23,18 +33,62 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -23,18 +33,62 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 23 | TextEditingController phoneC = TextEditingController(); | 33 | TextEditingController phoneC = TextEditingController(); |
| 24 | FocusNode nameF = FocusNode(); | 34 | FocusNode nameF = FocusNode(); |
| 25 | FocusNode phoneF = FocusNode(); | 35 | FocusNode phoneF = FocusNode(); |
| 26 | - TextEditingController customC = TextEditingController(); | ||
| 27 | - FocusNode customF = FocusNode(); | 36 | + TextEditingController customC = TextEditingController(); //意向备注 |
| 37 | + FocusNode customF = FocusNode(); //意向备注 | ||
| 38 | + TextEditingController customCxt = TextEditingController(); //选台备注 | ||
| 39 | + FocusNode customFxt = FocusNode(); //选台备注 | ||
| 40 | + TextEditingController customCdb = TextEditingController(); //担保说明 | ||
| 41 | + FocusNode customFdb = FocusNode(); //担保说明 | ||
| 28 | List sexList; | 42 | List sexList; |
| 29 | int sexSelectIndex = 0; | 43 | int sexSelectIndex = 0; |
| 30 | String sexStr = '先生'; | 44 | String sexStr = '先生'; |
| 45 | + ScrollController _scrollController = ScrollController(); | ||
| 46 | + DateTime dateTime; //宴会日期 | ||
| 47 | + String dateTimeShow = '请选择'; //宴会日期显示 2022-08-02(周二 七月十五) | ||
| 48 | + String jdShow = '请选择'; //接单人 | ||
| 49 | + String gdShow = '请选择'; //跟单人 | ||
| 50 | + int jdSelIndex; //接单人选择index | ||
| 51 | + int gdSelIndex; //跟单人选择index | ||
| 52 | + FeastModel feastModel; | ||
| 53 | + String feastTypeShow = '请选择'; //宴会类型 | ||
| 54 | + int feastTypeSelIndex; //宴会类型选择index | ||
| 55 | + Map<String, FeastMenuModel> menuMap = {}; // 菜单数据 | ||
| 56 | + | ||
| 57 | + String selectMenu = '意向'; //当前选中的菜单名称 | ||
| 58 | + Set<String> menuSet = {}; //已经保存的菜单名称 | ||
| 59 | + String cdShow = '请选择'; //餐段显示 | ||
| 60 | + String qsDateShow = '请选择'; //起始时间 | ||
| 61 | + String startDate = ''; | ||
| 62 | + String endDate = ''; | ||
| 63 | + String dateTimeShowxt = '请选择'; //宴会日期显示 选台 2022-08-02(周二 七月十五) | ||
| 64 | + DateTime dateTimext; //宴会日期 | ||
| 65 | + ScrollController controller = ScrollController(); | ||
| 66 | + String djDBR = '请选择'; //定金担保人 | ||
| 31 | 67 | ||
| 32 | @override | 68 | @override |
| 33 | void initState() { | 69 | void initState() { |
| 34 | // TODO: implement initState | 70 | // TODO: implement initState |
| 35 | super.initState(); | 71 | super.initState(); |
| 72 | + dateTime = DateTime.now(); | ||
| 73 | + dateTimext = DateTime.now(); | ||
| 36 | Utils.changeStatusColor(color: MyColours.color_438E93); | 74 | Utils.changeStatusColor(color: MyColours.color_438E93); |
| 37 | initSexList(); | 75 | initSexList(); |
| 76 | + | ||
| 77 | + WidgetsBinding.instance.addPostFrameCallback((_) { | ||
| 78 | + _getSellerUserBySellerid(); | ||
| 79 | + // scrollController.jumpTo(scrollController.position.minScrollExtent); | ||
| 80 | + }); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + ///商家编辑页面 ----- 获取经理数据 | ||
| 84 | + _getSellerUserBySellerid() async { | ||
| 85 | + await feastModel.getSellerUserBySellerid(context); | ||
| 86 | + | ||
| 87 | + // for (int i = 0; i < feastModel.sellerManageList.length; i++) { | ||
| 88 | + // if (manageShow == feastModel.sellerManageList[i].title) { | ||
| 89 | + // customerProvider.manageSelIndex = i; | ||
| 90 | + // } | ||
| 91 | + // } | ||
| 38 | } | 92 | } |
| 39 | 93 | ||
| 40 | ///称谓 | 94 | ///称谓 |
| @@ -62,19 +116,31 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -62,19 +116,31 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 62 | ]; | 116 | ]; |
| 63 | } | 117 | } |
| 64 | 118 | ||
| 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 | - ); | 119 | + Widget menuBtn(String title, {GestureTapCallback onTap}) { |
| 120 | + return InkWell( | ||
| 121 | + onTap: () { | ||
| 122 | + if (menuSet.contains(title)) { | ||
| 123 | + setState(() { | ||
| 124 | + selectMenu = title; | ||
| 125 | + }); | ||
| 126 | + } | ||
| 127 | + }, | ||
| 128 | + child: Container( | ||
| 129 | + width: w(40), | ||
| 130 | + height: h(40), | ||
| 131 | + alignment: Alignment.center, | ||
| 132 | + decoration: BoxDecoration( | ||
| 133 | + color: title == selectMenu | ||
| 134 | + ? MyColours.color_438E93 | ||
| 135 | + : menuSet.contains(title) | ||
| 136 | + ? MyColours.color_00A870 | ||
| 137 | + : MyColours.color_BFC4D4, | ||
| 138 | + borderRadius: BorderRadius.circular(r(20))), | ||
| 139 | + child: Text( | ||
| 140 | + title, | ||
| 141 | + style: TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)), | ||
| 142 | + ), | ||
| 143 | + )); | ||
| 78 | } | 144 | } |
| 79 | 145 | ||
| 80 | Widget arrow() { | 146 | Widget arrow() { |
| @@ -91,40 +157,30 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -91,40 +157,30 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 91 | child: Row( | 157 | child: Row( |
| 92 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 158 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 93 | children: [ | 159 | children: [ |
| 94 | - menuBtn('意向', true), | 160 | + menuBtn( |
| 161 | + '意向', | ||
| 162 | + ), | ||
| 95 | arrow(), | 163 | arrow(), |
| 96 | - menuBtn('选台', false), | 164 | + menuBtn( |
| 165 | + '选台', | ||
| 166 | + ), | ||
| 97 | arrow(), | 167 | arrow(), |
| 98 | - menuBtn('定金', false), | 168 | + menuBtn( |
| 169 | + '定金', | ||
| 170 | + ), | ||
| 99 | arrow(), | 171 | arrow(), |
| 100 | - menuBtn('签约', false), | 172 | + menuBtn( |
| 173 | + '签约', | ||
| 174 | + ), | ||
| 101 | ], | 175 | ], |
| 102 | ), | 176 | ), |
| 103 | ); | 177 | ); |
| 104 | } | 178 | } |
| 105 | 179 | ||
| 106 | - Widget _selectWidget(String title, String labelShow) { | 180 | + Widget _selectWidget(String title, String labelShow, |
| 181 | + {GestureTapCallback onTap, bool need = true}) { | ||
| 107 | return InkWell( | 182 | 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 | - }, | 183 | + onTap: onTap, |
| 128 | child: Container( | 184 | child: Container( |
| 129 | // height: ScreenUtil().setWidth(60), | 185 | // height: ScreenUtil().setWidth(60), |
| 130 | padding: EdgeInsets.only( | 186 | padding: EdgeInsets.only( |
| @@ -158,7 +214,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -158,7 +214,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 158 | recognizer: TapGestureRecognizer() | 214 | recognizer: TapGestureRecognizer() |
| 159 | ..onTap = () {}), | 215 | ..onTap = () {}), |
| 160 | TextSpan( | 216 | TextSpan( |
| 161 | - text: '*', | 217 | + text: need ? '*' : '', |
| 162 | style: TextStyle( | 218 | style: TextStyle( |
| 163 | color: MyColours.color_E34D59, | 219 | color: MyColours.color_E34D59, |
| 164 | fontSize: ScreenUtil().setSp(28)), | 220 | fontSize: ScreenUtil().setSp(28)), |
| @@ -172,7 +228,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -172,7 +228,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 172 | labelShow, | 228 | labelShow, |
| 173 | overflow: TextOverflow.ellipsis, | 229 | overflow: TextOverflow.ellipsis, |
| 174 | style: TextStyle( | 230 | style: TextStyle( |
| 175 | - color: MyColours.color_515151, | 231 | + color: labelShow == '请选择' |
| 232 | + ? MyColours.color_999999 | ||
| 233 | + : MyColours.color_515151, | ||
| 176 | fontSize: ScreenUtil().setSp(28), | 234 | fontSize: ScreenUtil().setSp(28), |
| 177 | ), | 235 | ), |
| 178 | )), | 236 | )), |
| @@ -269,7 +327,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -269,7 +327,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 269 | decoration: InputDecoration( | 327 | decoration: InputDecoration( |
| 270 | hintText: labelShow, | 328 | hintText: labelShow, |
| 271 | hintStyle: TextStyle( | 329 | hintStyle: TextStyle( |
| 272 | - color: MyColours.color_999999, | 330 | + color: labelShow == '请输入' |
| 331 | + ? MyColours.color_999999 | ||
| 332 | + : MyColours.color_515151, | ||
| 273 | fontSize: ScreenUtil().setSp(28), | 333 | fontSize: ScreenUtil().setSp(28), |
| 274 | ), | 334 | ), |
| 275 | // contentPadding: | 335 | // contentPadding: |
| @@ -335,7 +395,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -335,7 +395,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 335 | )); | 395 | )); |
| 336 | } | 396 | } |
| 337 | 397 | ||
| 338 | - Widget remark() { | 398 | + Widget remark(TextEditingController textEditC, FocusNode node, |
| 399 | + {String hintText = "请输入备注"}) { | ||
| 339 | return Padding( | 400 | return Padding( |
| 340 | padding: | 401 | padding: |
| 341 | EdgeInsets.only(top: h(29), left: w(16), right: w(18), bottom: h(22)), | 402 | EdgeInsets.only(top: h(29), left: w(16), right: w(18), bottom: h(22)), |
| @@ -352,8 +413,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -352,8 +413,8 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 352 | color: MyColours.color_DBDBDB, width: ScreenUtil().setWidth(2)), | 413 | color: MyColours.color_DBDBDB, width: ScreenUtil().setWidth(2)), |
| 353 | borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))), | 414 | borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))), |
| 354 | child: TextField( | 415 | child: TextField( |
| 355 | - controller: customC, | ||
| 356 | - focusNode: customF, | 416 | + controller: textEditC, |
| 417 | + focusNode: node, | ||
| 357 | style: TextStyle( | 418 | style: TextStyle( |
| 358 | color: MyColours.color_515151, | 419 | color: MyColours.color_515151, |
| 359 | fontSize: ScreenUtil().setSp(28), | 420 | fontSize: ScreenUtil().setSp(28), |
| @@ -362,7 +423,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -362,7 +423,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 362 | maxLines: 5, | 423 | maxLines: 5, |
| 363 | maxLength: 100, | 424 | maxLength: 100, |
| 364 | decoration: InputDecoration( | 425 | decoration: InputDecoration( |
| 365 | - hintText: "请输入备注", | 426 | + hintText: hintText, |
| 366 | hintStyle: TextStyle( | 427 | hintStyle: TextStyle( |
| 367 | color: MyColours.color_999999, | 428 | color: MyColours.color_999999, |
| 368 | fontSize: ScreenUtil().setSp(28), | 429 | fontSize: ScreenUtil().setSp(28), |
| @@ -371,44 +432,1103 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -371,44 +432,1103 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 371 | border: OutlineInputBorder(borderSide: BorderSide.none), | 432 | border: OutlineInputBorder(borderSide: BorderSide.none), |
| 372 | ), | 433 | ), |
| 373 | keyboardType: TextInputType.text, | 434 | 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; | 435 | + onChanged: (value) {}), |
| 436 | + ), | ||
| 437 | + ); | ||
| 438 | + } | ||
| 439 | + | ||
| 440 | + Widget _callButton( | ||
| 441 | + {GestureTapCallback onPress, | ||
| 442 | + content, | ||
| 443 | + hasLeftBorder = true, | ||
| 444 | + isSelect = false}) { | ||
| 445 | + return InkWell( | ||
| 446 | + onTap: onPress, | ||
| 447 | + child: Container( | ||
| 448 | + height: h(48), | ||
| 449 | + decoration: BoxDecoration( | ||
| 450 | + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff, | ||
| 451 | + border: Border( | ||
| 452 | + bottom: BorderSide( | ||
| 453 | + color: MyColours.color_438E93, | ||
| 454 | + width: ScreenUtil().setWidth(2)), | ||
| 455 | + top: BorderSide( | ||
| 456 | + color: MyColours.color_438E93, | ||
| 457 | + width: ScreenUtil().setWidth(2)), | ||
| 458 | + left: hasLeftBorder | ||
| 459 | + ? BorderSide( | ||
| 460 | + color: MyColours.color_438E93, | ||
| 461 | + width: ScreenUtil().setWidth(2)) | ||
| 462 | + : BorderSide.none, | ||
| 463 | + right: BorderSide( | ||
| 464 | + color: MyColours.color_438E93, | ||
| 465 | + width: ScreenUtil().setWidth(2)))), | ||
| 466 | + child: Align( | ||
| 467 | + alignment: Alignment.center, | ||
| 468 | + child: Text( | ||
| 469 | + content, | ||
| 470 | + style: TextStyle( | ||
| 471 | + color: | ||
| 472 | + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93, | ||
| 473 | + fontSize: ScreenUtil().setSp(36)), | ||
| 474 | + ), | ||
| 475 | + ), | ||
| 476 | + ), | ||
| 477 | + ); | ||
| 478 | + } | ||
| 479 | + | ||
| 480 | + //生成日期文本 | ||
| 481 | + createDateText(BuildContext context, DateTime day) { | ||
| 482 | + // if (Utils.isOneDay(day, dateTime)) return; //日期没变 | ||
| 483 | + String ymd = "${day.year}-" + | ||
| 484 | + Utils.addZeroNumber(day.month) + | ||
| 485 | + "-" + | ||
| 486 | + Utils.addZeroNumber(day.day); | ||
| 487 | + ymd += " (周${Utils.formatWeekDayNum(day.weekday)} "; | ||
| 488 | + ymd += Utils.lunarCalendarHolidays(day); | ||
| 489 | + ymd += ')'; | ||
| 490 | + return ymd; | ||
| 491 | + } | ||
| 492 | + | ||
| 493 | + ///意向 | ||
| 494 | + Widget yxWidget() { | ||
| 495 | + return Column( | ||
| 496 | + children: [ | ||
| 497 | + Expanded( | ||
| 498 | + child: SingleChildScrollView( | ||
| 499 | + child: Column(children: <Widget>[ | ||
| 500 | + menu(), | ||
| 501 | + MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB), | ||
| 502 | + VEmptyView(26), | ||
| 503 | + _selectWidget('宴会日期', dateTimeShow, onTap: () { | ||
| 504 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 505 | + DialogUtil.showCalendarDialog(context, dateTime).then((day) async { | ||
| 506 | + if (day != null) { | ||
| 507 | + dateTime = day; | ||
| 508 | + dateTimeShow = createDateText(context, day); | ||
| 509 | + setState(() {}); | ||
| 510 | + } | ||
| 511 | + }); | ||
| 512 | + }), | ||
| 513 | + _selectWidget('接单人', jdShow, onTap: () { | ||
| 514 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 515 | + DialogUtil.showSelectCusmanDialog( | ||
| 516 | + context, | ||
| 517 | + feastModel.sellerManageList.map((item) { | ||
| 518 | + return item.title; | ||
| 519 | + }).toList(), (value) { | ||
| 520 | + if (value != null) { | ||
| 521 | + setState(() { | ||
| 522 | + jdSelIndex = value.first; | ||
| 523 | + jdShow = feastModel.sellerManageList[jdSelIndex].title; | ||
| 524 | + }); | ||
| 525 | + } | ||
| 526 | + }, | ||
| 527 | + cancelText: '', | ||
| 528 | + title: '选择经理', | ||
| 529 | + selecteds: jdSelIndex == null ? [] : [jdSelIndex]) | ||
| 530 | + .then((value) {}); | ||
| 531 | + }), | ||
| 532 | + _selectWidget('跟单人', gdShow, onTap: () { | ||
| 533 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 534 | + DialogUtil.showSelectCusmanDialog( | ||
| 535 | + context, | ||
| 536 | + feastModel.sellerManageList.map((item) { | ||
| 537 | + return item.title; | ||
| 538 | + }).toList(), (value) { | ||
| 539 | + if (value != null) { | ||
| 540 | + setState(() { | ||
| 541 | + gdSelIndex = value.first; | ||
| 542 | + gdShow = feastModel.sellerManageList[gdSelIndex].title; | ||
| 543 | + }); | ||
| 544 | + } | ||
| 545 | + }, | ||
| 546 | + cancelText: '', | ||
| 547 | + title: '选择经理', | ||
| 548 | + selecteds: gdSelIndex == null ? [] : [gdSelIndex]) | ||
| 549 | + .then((value) {}); | ||
| 550 | + }), | ||
| 551 | + _selectWidget('宴会类型', feastTypeShow, onTap: () { | ||
| 552 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 553 | + DialogUtil.showSelectCusmanDialog( | ||
| 554 | + context, | ||
| 555 | + feastModel.sellerManageList.map((item) { | ||
| 556 | + return item.title; | ||
| 557 | + }).toList(), (value) { | ||
| 558 | + if (value != null) { | ||
| 559 | + setState(() { | ||
| 560 | + feastTypeSelIndex = value.first; | ||
| 561 | + feastTypeShow = | ||
| 562 | + feastModel.sellerManageList[feastTypeSelIndex].title; | ||
| 563 | + }); | ||
| 564 | + } | ||
| 565 | + }, | ||
| 566 | + cancelText: '', | ||
| 567 | + title: '选择宴会类型', | ||
| 568 | + selecteds: | ||
| 569 | + feastTypeSelIndex == null ? [] : [feastTypeSelIndex]) | ||
| 570 | + .then((value) {}); | ||
| 571 | + }), | ||
| 572 | + _inputWidget('预订人', '请输入', nameC, nameF), | ||
| 573 | + _inputWidget('电话', '请输入', phoneC, phoneF), | ||
| 574 | + remark(customC, customF), | ||
| 575 | + Padding( | ||
| 576 | + padding: EdgeInsets.fromLTRB( | ||
| 577 | + ScreenUtil().setWidth(32), | ||
| 578 | + ScreenUtil().setWidth(0), | ||
| 579 | + ScreenUtil().setWidth(32), | ||
| 580 | + ScreenUtil().setWidth(24)), | ||
| 581 | + child: Consumer<UploadImageProvider>(builder: (context, model, _) { | ||
| 582 | + return ImgPickerFWidget( | ||
| 583 | + model: model, | ||
| 584 | + scrollController: _scrollController, | ||
| 585 | + uploadType: UploadType.FeastRemarkType, | ||
| 586 | + bgColor: MyColours.color_DBDBDB, | ||
| 587 | + size: 64, | ||
| 588 | + crossAxisCount: 4, | ||
| 589 | + maxImageNumber: 8, | ||
| 590 | + mainAxisSpacing: 72, | ||
| 591 | + crossAxisSpacing: 56, | ||
| 592 | + ); | ||
| 593 | + }), | ||
| 594 | + ), | ||
| 595 | + VEmptyView(150) | ||
| 596 | + ]))), | ||
| 597 | + Row( | ||
| 598 | + children: [ | ||
| 599 | + Expanded( | ||
| 600 | + child: _callButton( | ||
| 601 | + onPress: () {}, | ||
| 602 | + content: '仅保存', | ||
| 603 | + hasLeftBorder: true, | ||
| 604 | + isSelect: false)), | ||
| 605 | + Expanded( | ||
| 606 | + child: _callButton( | ||
| 607 | + onPress: () { | ||
| 608 | + selectMenu = '选台'; | ||
| 609 | + menuSet.add('意向'); | ||
| 610 | + menuSet.add('选台'); | ||
| 611 | + setState(() {}); | ||
| 612 | + }, | ||
| 613 | + content: '保存并下一步', | ||
| 614 | + hasLeftBorder: true, | ||
| 615 | + isSelect: true)) | ||
| 616 | + ], | ||
| 617 | + ) | ||
| 618 | + ], | ||
| 619 | + ); | ||
| 620 | + } | ||
| 621 | + | ||
| 622 | + ///选台 | ||
| 623 | + Widget xtWidget() { | ||
| 624 | + return Column( | ||
| 625 | + children: [ | ||
| 626 | + Expanded( | ||
| 627 | + child: SingleChildScrollView( | ||
| 628 | + controller: controller, | ||
| 629 | + child: Column( | ||
| 630 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 631 | + children: <Widget>[ | ||
| 632 | + menu(), | ||
| 633 | + MyDivider(double.infinity, h(1), | ||
| 634 | + color: MyColours.color_DBDBDB), | ||
| 635 | + VEmptyView(26), | ||
| 636 | + Container( | ||
| 637 | + height: h(33), | ||
| 638 | + child: ListView.builder( | ||
| 639 | + padding: EdgeInsets.only(left: w(21)), | ||
| 640 | + itemCount: 2, | ||
| 641 | + shrinkWrap: true, | ||
| 642 | + scrollDirection: Axis.horizontal, | ||
| 643 | + itemBuilder: (BuildContext contxt, int index) { | ||
| 644 | + if (index == 1) { | ||
| 645 | + return InkWell( | ||
| 646 | + onTap: () async { | ||
| 647 | + // //添加区域弹框 | ||
| 648 | + // await DialogUtil | ||
| 649 | + // .openCreateAreaDialog(context, | ||
| 650 | + // onTap: (value) async { | ||
| 651 | + // print(value); | ||
| 652 | + // //添加区域 | ||
| 653 | + // bool success = | ||
| 654 | + // await tableManagerModel | ||
| 655 | + // .addTableAreas( | ||
| 656 | + // context, value); | ||
| 657 | + // print(success); | ||
| 658 | + // if (success) { | ||
| 659 | + // Utils.showToast('添加成功!'); | ||
| 660 | + // tableManagerModel.currentArea = | ||
| 661 | + // value; | ||
| 662 | + | ||
| 663 | + // await tableManagerModel | ||
| 664 | + // .refreshTable(context); | ||
| 665 | + | ||
| 666 | + // } | ||
| 667 | + // }); | ||
| 668 | + }, | ||
| 669 | + child: DottedBorder( | ||
| 670 | + dashPattern: [2, 2, 2, 2], | ||
| 671 | + borderType: BorderType.RRect, | ||
| 672 | + radius: Radius.circular(r(6)), | ||
| 673 | + // padding: EdgeInsets.all(ScreenUtil().setWidth(70)), | ||
| 674 | + color: MyColours.color_199095, | ||
| 675 | + strokeWidth: ScreenUtil().setWidth(2), | ||
| 676 | + child: ClipRRect( | ||
| 677 | + borderRadius: BorderRadius.all( | ||
| 678 | + Radius.circular( | ||
| 679 | + ScreenUtil().setWidth(10))), | ||
| 680 | + child: Container( | ||
| 681 | + height: ScreenUtil().setWidth(33 * 2), | ||
| 682 | + width: ScreenUtil().setWidth(70 * 2), | ||
| 683 | + decoration: BoxDecoration( | ||
| 684 | + borderRadius: | ||
| 685 | + BorderRadius.circular(r(6)), | ||
| 686 | + ), | ||
| 687 | + child: Column( | ||
| 688 | + mainAxisAlignment: | ||
| 689 | + MainAxisAlignment.center, | ||
| 690 | + children: [ | ||
| 691 | + Image.asset( | ||
| 692 | + Utils.getImgPath('add_area'), | ||
| 693 | + width: ScreenUtil() | ||
| 694 | + .setWidth(24)), | ||
| 695 | + ], | ||
| 696 | + ), | ||
| 697 | + ), | ||
| 698 | + ), | ||
| 699 | + )); | ||
| 700 | + } else { | ||
| 701 | + return Container( | ||
| 702 | + height: h(33), | ||
| 703 | + width: w(70), | ||
| 704 | + // padding: EdgeInsets.symmetric( | ||
| 705 | + // horizontal: w(8), | ||
| 706 | + // ), | ||
| 707 | + margin: EdgeInsets.only(right: w(8)), | ||
| 708 | + alignment: Alignment.center, | ||
| 709 | + decoration: BoxDecoration( | ||
| 710 | + borderRadius: BorderRadius.circular(r(6)), | ||
| 711 | + color: true | ||
| 712 | + ? MyColours.color_438E93 | ||
| 713 | + : MyColours.color_ffffff), | ||
| 714 | + child: Text( | ||
| 715 | + '第一场', | ||
| 716 | + overflow: TextOverflow.ellipsis, | ||
| 717 | + style: TextStyle( | ||
| 718 | + color: true | ||
| 719 | + ? MyColours.color_F6F6F6 | ||
| 720 | + : MyColours.color_999999, | ||
| 721 | + fontSize: font(18), | ||
| 722 | + fontWeight: FontWeight.bold), | ||
| 723 | + ), | ||
| 724 | + ); | ||
| 725 | + } | ||
| 726 | + }, | ||
| 727 | + )), | ||
| 728 | + VEmptyView(26), | ||
| 729 | + _selectWidget('宴会日期', dateTimeShowxt, onTap: () { | ||
| 730 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 731 | + DialogUtil.showCalendarDialog(context, dateTimext) | ||
| 732 | + .then((day) async { | ||
| 733 | + if (day != null) { | ||
| 734 | + dateTimext = day; | ||
| 735 | + dateTimeShowxt = createDateText(context, day); | ||
| 736 | + setState(() {}); | ||
| 737 | + } | ||
| 738 | + }); | ||
| 739 | + }), | ||
| 740 | + _selectWidget('餐段选择', cdShow, onTap: () { | ||
| 741 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 742 | + DialogUtil.showSelectCusmanDialog( | ||
| 743 | + context, | ||
| 744 | + feastModel.sellerManageList.map((item) { | ||
| 745 | + return item.title; | ||
| 746 | + }).toList(), (value) { | ||
| 747 | + if (value != null) { | ||
| 748 | + setState(() { | ||
| 749 | + jdSelIndex = value.first; | ||
| 750 | + jdShow = | ||
| 751 | + feastModel.sellerManageList[jdSelIndex].title; | ||
| 752 | + }); | ||
| 753 | + } | ||
| 754 | + }, | ||
| 755 | + cancelText: '', | ||
| 756 | + title: '选择餐段', | ||
| 757 | + selecteds: | ||
| 758 | + jdSelIndex == null ? [] : [jdSelIndex]) | ||
| 759 | + .then((value) {}); | ||
| 760 | + }), | ||
| 761 | + _selectWidget('起始时间', qsDateShow, need: false, onTap: () { | ||
| 762 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 763 | + | ||
| 764 | + SetTimeWidget.init.showFeastTimeSelector( | ||
| 765 | + context, | ||
| 766 | + SetTimeWidget.init.getFeastDateData('00:00-23:30'), | ||
| 767 | + startDate, | ||
| 768 | + endDate, (value) { | ||
| 769 | + if (value != null) { | ||
| 770 | + startDate = | ||
| 771 | + SetTimeWidget.init.getSelectTitle(value[0]); | ||
| 772 | + endDate = | ||
| 773 | + SetTimeWidget.init.getSelectTitle(value[1]); | ||
| 774 | + qsDateShow = startDate + '-' + endDate; | ||
| 775 | + setState(() {}); | ||
| 776 | + } | ||
| 777 | + }); | ||
| 778 | + // DialogUtil.showSelectCusmanDialog( | ||
| 779 | + // context, | ||
| 780 | + // feastModel.sellerManageList.map((item) { | ||
| 781 | + // return item.title; | ||
| 782 | + // }).toList(), (value) { | ||
| 783 | + // if (value != null) { | ||
| 784 | + // setState(() { | ||
| 785 | + // gdSelIndex = value.first; | ||
| 786 | + // gdShow = feastModel.sellerManageList[gdSelIndex].title; | ||
| 787 | + // }); | ||
| 788 | + // } | ||
| 789 | + // }, | ||
| 790 | + // cancelText: '', | ||
| 791 | + // title: '选择经理', | ||
| 792 | + // selecteds: gdSelIndex == null ? [] : [gdSelIndex]) | ||
| 793 | + // .then((value) {}); | ||
| 794 | + }), | ||
| 795 | + Padding( | ||
| 796 | + padding: EdgeInsets.only( | ||
| 797 | + left: ScreenUtil().setWidth(32), | ||
| 798 | + right: ScreenUtil().setWidth(32), | ||
| 799 | + top: h(24)), | ||
| 800 | + child: Column( | ||
| 801 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 802 | + children: [ | ||
| 803 | + RichText( | ||
| 804 | + textScaleFactor: 1, | ||
| 805 | + overflow: TextOverflow.ellipsis, | ||
| 806 | + // textDirection: TextDirection.ltr, | ||
| 807 | + | ||
| 808 | + text: TextSpan( | ||
| 809 | + children: [ | ||
| 810 | + TextSpan( | ||
| 811 | + text: '桌位选择', | ||
| 812 | + style: TextStyle( | ||
| 813 | + color: MyColours.color_000000, | ||
| 814 | + fontSize: ScreenUtil().setSp(28)), | ||
| 815 | + recognizer: TapGestureRecognizer() | ||
| 816 | + ..onTap = () {}), | ||
| 817 | + TextSpan( | ||
| 818 | + text: '*', | ||
| 819 | + style: TextStyle( | ||
| 820 | + color: MyColours.color_E34D59, | ||
| 821 | + fontSize: ScreenUtil().setSp(28)), | ||
| 822 | + //点击事件 | ||
| 823 | + recognizer: TapGestureRecognizer() | ||
| 824 | + ..onTap = () {}), | ||
| 825 | + TextSpan( | ||
| 826 | + text: '(共0桌)', | ||
| 827 | + style: TextStyle( | ||
| 828 | + color: MyColours.color_000000, | ||
| 829 | + fontSize: ScreenUtil().setSp(28)), | ||
| 830 | + recognizer: TapGestureRecognizer() | ||
| 831 | + ..onTap = () {}), | ||
| 832 | + ], | ||
| 833 | + )), | ||
| 834 | + ListView.builder( | ||
| 835 | + itemCount: 2, | ||
| 836 | + shrinkWrap: true, | ||
| 837 | + controller: controller, | ||
| 838 | + itemBuilder: | ||
| 839 | + (BuildContext context, int index) { | ||
| 840 | + return Container( | ||
| 841 | + height: h(42), | ||
| 842 | + decoration: BoxDecoration( | ||
| 843 | + border: Border( | ||
| 844 | + bottom: BorderSide( | ||
| 845 | + width: h(1), | ||
| 846 | + color: | ||
| 847 | + MyColours.color_DBDBDB))), | ||
| 848 | + child: Row( | ||
| 849 | + mainAxisAlignment: | ||
| 850 | + MainAxisAlignment.spaceBetween, | ||
| 851 | + children: [ | ||
| 852 | + Expanded( | ||
| 853 | + child: Text( | ||
| 854 | + '包间$index', | ||
| 855 | + overflow: TextOverflow.ellipsis, | ||
| 856 | + style: TextStyle( | ||
| 857 | + color: MyColours.color_438E93, | ||
| 858 | + fontSize: font(16)), | ||
| 859 | + )), | ||
| 860 | + Container( | ||
| 861 | + width: w(22), | ||
| 862 | + child: Text( | ||
| 863 | + '30', | ||
| 864 | + style: TextStyle( | ||
| 865 | + color: MyColours.color_438E93, | ||
| 866 | + fontSize: font(14)), | ||
| 867 | + ), | ||
| 868 | + ), | ||
| 869 | + Text( | ||
| 870 | + '桌', | ||
| 871 | + style: TextStyle( | ||
| 872 | + color: MyColours.color_515151, | ||
| 873 | + fontSize: font(14)), | ||
| 874 | + ), | ||
| 875 | + HEmptyView(32), | ||
| 876 | + InkWell( | ||
| 877 | + child: Image.asset( | ||
| 878 | + Utils.getImgPath('f_delete_red'), | ||
| 879 | + width: w(20), | ||
| 880 | + )) | ||
| 881 | + ], | ||
| 882 | + ), | ||
| 883 | + ); | ||
| 884 | + }), | ||
| 885 | + VEmptyView(28), | ||
| 886 | + RoundButton( | ||
| 887 | + text: '添加桌位', | ||
| 888 | + radius: r(6), | ||
| 889 | + width: w(56), | ||
| 890 | + height: h(21), | ||
| 891 | + fontSize: 24, | ||
| 892 | + textColor: MyColours.color_F6F6F6, | ||
| 893 | + isBold: false, | ||
| 894 | + gradientStart: MyColours.color_438E93, | ||
| 895 | + gradientEnd: MyColours.color_438E93, | ||
| 896 | + ), | ||
| 897 | + VEmptyView(52), | ||
| 898 | + Text( | ||
| 899 | + '套餐选择', | ||
| 900 | + style: TextStyle( | ||
| 901 | + color: MyColours.color_000000, | ||
| 902 | + fontSize: ScreenUtil().setSp(28)), | ||
| 903 | + ), | ||
| 904 | + ListView.builder( | ||
| 905 | + itemCount: 2, | ||
| 906 | + shrinkWrap: true, | ||
| 907 | + controller: controller, | ||
| 908 | + itemBuilder: | ||
| 909 | + (BuildContext context, int index) { | ||
| 910 | + return Container( | ||
| 911 | + height: h(80), | ||
| 912 | + decoration: BoxDecoration( | ||
| 913 | + border: Border( | ||
| 914 | + bottom: BorderSide( | ||
| 915 | + width: h(1), | ||
| 916 | + color: | ||
| 917 | + MyColours.color_DBDBDB))), | ||
| 918 | + child: Column( | ||
| 919 | + mainAxisAlignment: | ||
| 920 | + MainAxisAlignment.spaceAround, | ||
| 921 | + children: [ | ||
| 922 | + Row( | ||
| 923 | + mainAxisAlignment: | ||
| 924 | + MainAxisAlignment.spaceBetween, | ||
| 925 | + children: [ | ||
| 926 | + Expanded( | ||
| 927 | + child: Text( | ||
| 928 | + '1299套餐', | ||
| 929 | + overflow: TextOverflow.ellipsis, | ||
| 930 | + style: TextStyle( | ||
| 931 | + color: | ||
| 932 | + MyColours.color_515151, | ||
| 933 | + fontSize: font(16)), | ||
| 934 | + )), | ||
| 935 | + InkWell( | ||
| 936 | + child: Row( | ||
| 937 | + children: [ | ||
| 938 | + Image.asset( | ||
| 939 | + Utils.getImgPath( | ||
| 940 | + 'f_tiaocai'), | ||
| 941 | + width: w(20), | ||
| 942 | + ), | ||
| 943 | + HEmptyView(8), | ||
| 944 | + Text( | ||
| 945 | + '调菜', | ||
| 946 | + style: TextStyle( | ||
| 947 | + color: MyColours | ||
| 948 | + .color_515151, | ||
| 949 | + fontSize: font(14)), | ||
| 950 | + ), | ||
| 951 | + ], | ||
| 952 | + )), | ||
| 953 | + HEmptyView(32), | ||
| 954 | + InkWell( | ||
| 955 | + child: Image.asset( | ||
| 956 | + Utils.getImgPath( | ||
| 957 | + 'f_delete_red'), | ||
| 958 | + width: w(20), | ||
| 959 | + )) | ||
| 960 | + ], | ||
| 961 | + ), | ||
| 962 | + Row( | ||
| 963 | + mainAxisAlignment: | ||
| 964 | + MainAxisAlignment.spaceBetween, | ||
| 965 | + children: [ | ||
| 966 | + taocanText('1299', ' 元/桌'), | ||
| 967 | + taocanText('10', ' 人/桌'), | ||
| 968 | + taocanTextType( | ||
| 969 | + '保证 ', '1299', ' 桌'), | ||
| 970 | + taocanTextType('备用 ', '2', ' 桌'), | ||
| 971 | + ], | ||
| 972 | + ) | ||
| 973 | + ], | ||
| 974 | + ), | ||
| 975 | + ); | ||
| 976 | + }), | ||
| 977 | + VEmptyView(28), | ||
| 978 | + RoundButton( | ||
| 979 | + text: '添加套餐', | ||
| 980 | + radius: r(6), | ||
| 981 | + width: w(56), | ||
| 982 | + height: h(21), | ||
| 983 | + fontSize: 24, | ||
| 984 | + textColor: MyColours.color_F6F6F6, | ||
| 985 | + isBold: false, | ||
| 986 | + gradientStart: MyColours.color_438E93, | ||
| 987 | + gradientEnd: MyColours.color_438E93, | ||
| 988 | + ), | ||
| 989 | + VEmptyView(52), | ||
| 990 | + Text( | ||
| 991 | + '酒水选择', | ||
| 992 | + style: TextStyle( | ||
| 993 | + color: MyColours.color_000000, | ||
| 994 | + fontSize: ScreenUtil().setSp(28)), | ||
| 995 | + ), | ||
| 996 | + ListView.builder( | ||
| 997 | + itemCount: 2, | ||
| 998 | + shrinkWrap: true, | ||
| 999 | + controller: controller, | ||
| 1000 | + itemBuilder: | ||
| 1001 | + (BuildContext context, int index) { | ||
| 1002 | + return Container( | ||
| 1003 | + height: h(42), | ||
| 1004 | + decoration: BoxDecoration( | ||
| 1005 | + border: Border( | ||
| 1006 | + bottom: BorderSide( | ||
| 1007 | + width: h(1), | ||
| 1008 | + color: | ||
| 1009 | + MyColours.color_DBDBDB))), | ||
| 1010 | + child: Row( | ||
| 1011 | + mainAxisAlignment: | ||
| 1012 | + MainAxisAlignment.spaceBetween, | ||
| 1013 | + children: [ | ||
| 1014 | + Expanded( | ||
| 1015 | + child: Text( | ||
| 1016 | + '剑南春52度500ml', | ||
| 1017 | + overflow: TextOverflow.ellipsis, | ||
| 1018 | + style: TextStyle( | ||
| 1019 | + color: MyColours.color_515151, | ||
| 1020 | + fontSize: font(16)), | ||
| 1021 | + )), | ||
| 1022 | + taocanText('1299', ' 元/份'), | ||
| 1023 | + HEmptyView(32), | ||
| 1024 | + taocanText('12', ' 份'), | ||
| 1025 | + HEmptyView(32), | ||
| 1026 | + InkWell( | ||
| 1027 | + child: Image.asset( | ||
| 1028 | + Utils.getImgPath('f_delete_red'), | ||
| 1029 | + width: w(20), | ||
| 1030 | + )) | ||
| 1031 | + ], | ||
| 1032 | + ), | ||
| 1033 | + ); | ||
| 1034 | + }), | ||
| 1035 | + VEmptyView(28), | ||
| 1036 | + RoundButton( | ||
| 1037 | + text: '添加酒水', | ||
| 1038 | + radius: r(6), | ||
| 1039 | + width: w(56), | ||
| 1040 | + height: h(21), | ||
| 1041 | + fontSize: 24, | ||
| 1042 | + textColor: MyColours.color_F6F6F6, | ||
| 1043 | + isBold: false, | ||
| 1044 | + gradientStart: MyColours.color_438E93, | ||
| 1045 | + gradientEnd: MyColours.color_438E93, | ||
| 1046 | + ), | ||
| 1047 | + VEmptyView(52), | ||
| 1048 | + Text( | ||
| 1049 | + '其他配置', | ||
| 1050 | + style: TextStyle( | ||
| 1051 | + color: MyColours.color_000000, | ||
| 1052 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1053 | + ), | ||
| 1054 | + ListView.builder( | ||
| 1055 | + itemCount: 2, | ||
| 1056 | + shrinkWrap: true, | ||
| 1057 | + controller: controller, | ||
| 1058 | + itemBuilder: | ||
| 1059 | + (BuildContext context, int index) { | ||
| 1060 | + return Container( | ||
| 1061 | + height: h(42), | ||
| 1062 | + decoration: BoxDecoration( | ||
| 1063 | + border: Border( | ||
| 1064 | + bottom: BorderSide( | ||
| 1065 | + width: h(1), | ||
| 1066 | + color: | ||
| 1067 | + MyColours.color_DBDBDB))), | ||
| 1068 | + child: Row( | ||
| 1069 | + mainAxisAlignment: | ||
| 1070 | + MainAxisAlignment.spaceBetween, | ||
| 1071 | + children: [ | ||
| 1072 | + Expanded( | ||
| 1073 | + child: Text( | ||
| 1074 | + 'LED大屏', | ||
| 1075 | + overflow: TextOverflow.ellipsis, | ||
| 1076 | + style: TextStyle( | ||
| 1077 | + color: MyColours.color_515151, | ||
| 1078 | + fontSize: font(16)), | ||
| 1079 | + )), | ||
| 1080 | + taocanText('1299', ' 元/份'), | ||
| 1081 | + HEmptyView(32), | ||
| 1082 | + taocanText('12', ' 份'), | ||
| 1083 | + HEmptyView(32), | ||
| 1084 | + InkWell( | ||
| 1085 | + child: Image.asset( | ||
| 1086 | + Utils.getImgPath('f_delete_red'), | ||
| 1087 | + width: w(20), | ||
| 1088 | + )) | ||
| 1089 | + ], | ||
| 1090 | + ), | ||
| 1091 | + ); | ||
| 1092 | + }), | ||
| 1093 | + VEmptyView(28), | ||
| 1094 | + RoundButton( | ||
| 1095 | + text: '添加配置', | ||
| 1096 | + radius: r(6), | ||
| 1097 | + width: w(56), | ||
| 1098 | + height: h(21), | ||
| 1099 | + fontSize: 24, | ||
| 1100 | + textColor: MyColours.color_F6F6F6, | ||
| 1101 | + isBold: false, | ||
| 1102 | + gradientStart: MyColours.color_438E93, | ||
| 1103 | + gradientEnd: MyColours.color_438E93, | ||
| 1104 | + ), | ||
| 1105 | + ], | ||
| 1106 | + )), | ||
| 1107 | + remark(customCxt, customFxt), | ||
| 1108 | + Padding( | ||
| 1109 | + padding: EdgeInsets.fromLTRB( | ||
| 1110 | + ScreenUtil().setWidth(32), | ||
| 1111 | + ScreenUtil().setWidth(0), | ||
| 1112 | + ScreenUtil().setWidth(32), | ||
| 1113 | + ScreenUtil().setWidth(24)), | ||
| 1114 | + child: Consumer<UploadImageProvider>( | ||
| 1115 | + builder: (context, model, _) { | ||
| 1116 | + return ImgPickerFWidget( | ||
| 1117 | + model: model, | ||
| 1118 | + scrollController: _scrollController, | ||
| 1119 | + uploadType: UploadType.FeastRemarkXtType, | ||
| 1120 | + bgColor: MyColours.color_DBDBDB, | ||
| 1121 | + size: 64, | ||
| 1122 | + crossAxisCount: 4, | ||
| 1123 | + maxImageNumber: 8, | ||
| 1124 | + mainAxisSpacing: 72, | ||
| 1125 | + crossAxisSpacing: 56, | ||
| 1126 | + ); | ||
| 1127 | + }), | ||
| 1128 | + ), | ||
| 1129 | + VEmptyView(150) | ||
| 1130 | + ]))), | ||
| 1131 | + Row( | ||
| 1132 | + children: [ | ||
| 1133 | + Expanded( | ||
| 1134 | + child: _callButton( | ||
| 1135 | + onPress: () {}, | ||
| 1136 | + content: '仅保存', | ||
| 1137 | + hasLeftBorder: true, | ||
| 1138 | + isSelect: false)), | ||
| 1139 | + Expanded( | ||
| 1140 | + child: _callButton( | ||
| 1141 | + onPress: () { | ||
| 1142 | + selectMenu = '定金'; | ||
| 1143 | + menuSet.add('选台'); | ||
| 1144 | + menuSet.add('定金'); | ||
| 1145 | + setState(() {}); | ||
| 1146 | + }, | ||
| 1147 | + content: '保存并下一步', | ||
| 1148 | + hasLeftBorder: true, | ||
| 1149 | + isSelect: true)) | ||
| 1150 | + ], | ||
| 1151 | + ) | ||
| 1152 | + ], | ||
| 1153 | + ); | ||
| 1154 | + } | ||
| 1155 | + | ||
| 1156 | + ///定金页面 | ||
| 1157 | + Widget djWidget() { | ||
| 1158 | + return Column( | ||
| 1159 | + children: [ | ||
| 1160 | + Expanded( | ||
| 1161 | + child: SingleChildScrollView( | ||
| 1162 | + child: Column(children: <Widget>[ | ||
| 1163 | + menu(), | ||
| 1164 | + MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB), | ||
| 1165 | + VEmptyView(26), | ||
| 1166 | + Padding( | ||
| 1167 | + padding: EdgeInsets.symmetric( | ||
| 1168 | + horizontal: w(24), | ||
| 1169 | + ), | ||
| 1170 | + child: Row( | ||
| 1171 | + children: [ | ||
| 1172 | + Image.asset(Utils.getImgPath('f_dj'), width: w(20)), | ||
| 1173 | + HEmptyView(4), | ||
| 1174 | + Text( | ||
| 1175 | + '定金付款', | ||
| 1176 | + overflow: TextOverflow.ellipsis, | ||
| 1177 | + style: TextStyle( | ||
| 1178 | + color: MyColours.color_000000, fontSize: font(18)), | ||
| 1179 | + ), | ||
| 1180 | + Spacer(), | ||
| 1181 | + RoundButton( | ||
| 1182 | + text: '添加一项', | ||
| 1183 | + radius: r(6), | ||
| 1184 | + width: w(56), | ||
| 1185 | + height: h(21), | ||
| 1186 | + fontSize: 24, | ||
| 1187 | + textColor: MyColours.color_F6F6F6, | ||
| 1188 | + isBold: false, | ||
| 1189 | + gradientStart: MyColours.color_438E93, | ||
| 1190 | + gradientEnd: MyColours.color_438E93, | ||
| 1191 | + ), | ||
| 1192 | + ], | ||
| 1193 | + )), | ||
| 1194 | + ListView.builder( | ||
| 1195 | + padding: EdgeInsets.only(left: w(13), right: w(13), top: h(20)), | ||
| 1196 | + itemCount: 2, | ||
| 1197 | + shrinkWrap: true, | ||
| 1198 | + controller: controller, | ||
| 1199 | + itemBuilder: (BuildContext context, int index) { | ||
| 1200 | + return Container( | ||
| 1201 | + height: h(110), | ||
| 1202 | + margin: EdgeInsets.only(bottom: h(20)), | ||
| 1203 | + decoration: BoxDecoration( | ||
| 1204 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 1205 | + border: Border.all( | ||
| 1206 | + width: h(1), color: MyColours.color_438E93)), | ||
| 1207 | + child: Column(children: [ | ||
| 1208 | + Container( | ||
| 1209 | + height: h(24), | ||
| 1210 | + padding: EdgeInsets.only(left: w(16), right: w(8)), | ||
| 1211 | + decoration: BoxDecoration( | ||
| 1212 | + color: MyColours.color_438E93, | ||
| 1213 | + borderRadius: BorderRadius.only( | ||
| 1214 | + topLeft: Radius.circular(r(4)), | ||
| 1215 | + topRight: Radius.circular(r(4))), | ||
| 1216 | + border: Border.all( | ||
| 1217 | + width: h(1), color: MyColours.color_438E93)), | ||
| 1218 | + child: Row( | ||
| 1219 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1220 | + children: [ | ||
| 1221 | + Text( | ||
| 1222 | + '定金1', | ||
| 1223 | + overflow: TextOverflow.ellipsis, | ||
| 1224 | + style: TextStyle( | ||
| 1225 | + color: MyColours.color_F6F6F6, | ||
| 1226 | + fontSize: font(14)), | ||
| 1227 | + ), | ||
| 1228 | + Text( | ||
| 1229 | + '收据编号 SJ000001', | ||
| 1230 | + overflow: TextOverflow.ellipsis, | ||
| 1231 | + style: TextStyle( | ||
| 1232 | + color: MyColours.color_F6F6F6, | ||
| 1233 | + fontSize: font(12)), | ||
| 1234 | + ), | ||
| 1235 | + InkWell( | ||
| 1236 | + child: Image.asset( | ||
| 1237 | + Utils.getImgPath('f_dj_delete'), | ||
| 1238 | + width: w(20), | ||
| 1239 | + )) | ||
| 1240 | + ], | ||
| 1241 | + ), | ||
| 1242 | + ), | ||
| 1243 | + Expanded( | ||
| 1244 | + child: Row( | ||
| 1245 | + mainAxisAlignment: MainAxisAlignment.start, | ||
| 1246 | + children: [ | ||
| 1247 | + HEmptyView(32), | ||
| 1248 | + Column( | ||
| 1249 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 1250 | + mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
| 1251 | + children: [ | ||
| 1252 | + djTextType1('定金金额 ', '200', ' 元'), | ||
| 1253 | + djText('支付方式 ', '现金'), | ||
| 1254 | + djText('定金类型 ', '宴会定金') | ||
| 1255 | + ], | ||
| 1256 | + ), | ||
| 1257 | + HEmptyView(140), | ||
| 1258 | + Column( | ||
| 1259 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 1260 | + mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
| 1261 | + children: [ | ||
| 1262 | + djText('付款时间 ', '2022-08-03'), | ||
| 1263 | + djText('收款人 ', '刘经理'), | ||
| 1264 | + djText('付款人 ', '方先生') | ||
| 1265 | + ], | ||
| 1266 | + ) | ||
| 1267 | + ], | ||
| 1268 | + )) | ||
| 1269 | + ])); | ||
| 1270 | + }), | ||
| 1271 | + VEmptyView(62), | ||
| 1272 | + Padding( | ||
| 1273 | + padding: EdgeInsets.symmetric( | ||
| 1274 | + horizontal: w(24), | ||
| 1275 | + ), | ||
| 1276 | + child: Row( | ||
| 1277 | + children: [ | ||
| 1278 | + Image.asset(Utils.getImgPath('f_dj_db'), width: w(20)), | ||
| 1279 | + HEmptyView(4), | ||
| 1280 | + Text( | ||
| 1281 | + '担保', | ||
| 1282 | + overflow: TextOverflow.ellipsis, | ||
| 1283 | + style: TextStyle( | ||
| 1284 | + color: MyColours.color_000000, fontSize: font(18)), | ||
| 1285 | + ), | ||
| 1286 | + ], | ||
| 1287 | + )), | ||
| 1288 | + VEmptyView(48), | ||
| 1289 | + InkWell( | ||
| 1290 | + onTap: () { | ||
| 1291 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 1292 | + // DialogUtil.showSelectCusmanDialog( | ||
| 1293 | + // context, | ||
| 1294 | + // customerProvider.labelList.map((item) { | ||
| 1295 | + // return item.label; | ||
| 1296 | + // }).toList(), (value) { | ||
| 1297 | + // if (value != null) { | ||
| 1298 | + // setState(() { | ||
| 1299 | + // customerProvider.labelSelIndex = | ||
| 1300 | + // value.first; | ||
| 1301 | + // labelShow = customerProvider | ||
| 1302 | + // .labelList[ | ||
| 1303 | + // customerProvider.labelSelIndex] | ||
| 1304 | + // .label; | ||
| 1305 | + // }); | ||
| 399 | // } | 1306 | // } |
| 400 | - // } else { | ||
| 401 | - // setState(() { | ||
| 402 | - // currRemark = value ?? ""; | ||
| 403 | - // }); | ||
| 404 | - // } | 1307 | + // }, |
| 1308 | + // selecteds: | ||
| 1309 | + // customerProvider.labelSelIndex == null | ||
| 1310 | + // ? [] | ||
| 1311 | + // : [ | ||
| 1312 | + // customerProvider.labelSelIndex | ||
| 1313 | + // ]) | ||
| 1314 | + // .then((value) {}); | ||
| 1315 | + }, | ||
| 1316 | + child: Row( | ||
| 1317 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1318 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 1319 | + children: [ | ||
| 1320 | + HEmptyView(40), | ||
| 1321 | + Container( | ||
| 1322 | + // color: Colors.red, | ||
| 1323 | + width: ScreenUtil().setWidth(150), | ||
| 1324 | + height: ScreenUtil().setWidth(35), | ||
| 1325 | + child: Text( | ||
| 1326 | + '担保人', | ||
| 1327 | + style: TextStyle( | ||
| 1328 | + fontSize: ScreenUtil().setSp(28), | ||
| 1329 | + color: MyColours.color_333333), | ||
| 1330 | + ), | ||
| 1331 | + ), | ||
| 1332 | + HEmptyView(60), | ||
| 1333 | + Expanded( | ||
| 1334 | + child: Container( | ||
| 1335 | + height: ScreenUtil().setWidth(64), | ||
| 1336 | + decoration: BoxDecoration( | ||
| 1337 | + border: Border( | ||
| 1338 | + bottom: BorderSide( | ||
| 1339 | + width: ScreenUtil().setWidth(2), | ||
| 1340 | + color: Color.fromRGBO(220, 220, 220, 1)))), | ||
| 1341 | + child: Row( | ||
| 1342 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1343 | + children: [ | ||
| 1344 | + Expanded( | ||
| 1345 | + child: Text( | ||
| 1346 | + djDBR, | ||
| 1347 | + overflow: TextOverflow.ellipsis, | ||
| 1348 | + style: TextStyle( | ||
| 1349 | + color: djDBR == '请选择' | ||
| 1350 | + ? MyColours.color_999999 | ||
| 1351 | + : MyColours.color_515151, | ||
| 1352 | + fontSize: ScreenUtil().setSp(28), | ||
| 1353 | + ), | ||
| 1354 | + )), | ||
| 1355 | + HEmptyView(10), | ||
| 1356 | + Image.asset( | ||
| 1357 | + Utils.getImgPath('f_arrow_down'), | ||
| 1358 | + width: ScreenUtil().setWidth(64), | ||
| 1359 | + // height: ScreenUtil().setWidth(10), | ||
| 1360 | + ), | ||
| 1361 | + HEmptyView(16), | ||
| 1362 | + ], | ||
| 1363 | + ))), | ||
| 1364 | + HEmptyView(24), | ||
| 1365 | + ], | ||
| 1366 | + ), | ||
| 1367 | + ), | ||
| 1368 | + remark(customCdb, customFdb,hintText: '担保说明'), | ||
| 1369 | + Padding( | ||
| 1370 | + padding: EdgeInsets.fromLTRB( | ||
| 1371 | + ScreenUtil().setWidth(32), | ||
| 1372 | + ScreenUtil().setWidth(0), | ||
| 1373 | + ScreenUtil().setWidth(32), | ||
| 1374 | + ScreenUtil().setWidth(24)), | ||
| 1375 | + child: Consumer<UploadImageProvider>(builder: (context, model, _) { | ||
| 1376 | + return ImgPickerFWidget( | ||
| 1377 | + model: model, | ||
| 1378 | + scrollController: _scrollController, | ||
| 1379 | + uploadType: UploadType.FeastRemarkDjType, | ||
| 1380 | + bgColor: MyColours.color_DBDBDB, | ||
| 1381 | + size: 64, | ||
| 1382 | + crossAxisCount: 4, | ||
| 1383 | + maxImageNumber: 8, | ||
| 1384 | + mainAxisSpacing: 72, | ||
| 1385 | + crossAxisSpacing: 56, | ||
| 1386 | + ); | ||
| 405 | }), | 1387 | }), |
| 406 | - ), | 1388 | + ), |
| 1389 | + VEmptyView(150) | ||
| 1390 | + ]))), | ||
| 1391 | + Row( | ||
| 1392 | + children: [ | ||
| 1393 | + Expanded( | ||
| 1394 | + child: _callButton( | ||
| 1395 | + onPress: () {}, | ||
| 1396 | + content: '仅保存', | ||
| 1397 | + hasLeftBorder: true, | ||
| 1398 | + isSelect: false)), | ||
| 1399 | + Expanded( | ||
| 1400 | + child: _callButton( | ||
| 1401 | + onPress: () { | ||
| 1402 | + selectMenu = '选台'; | ||
| 1403 | + menuSet.add('意向'); | ||
| 1404 | + menuSet.add('选台'); | ||
| 1405 | + setState(() {}); | ||
| 1406 | + }, | ||
| 1407 | + content: '保存并下一步', | ||
| 1408 | + hasLeftBorder: true, | ||
| 1409 | + isSelect: true)) | ||
| 1410 | + ], | ||
| 1411 | + ) | ||
| 1412 | + ], | ||
| 407 | ); | 1413 | ); |
| 408 | } | 1414 | } |
| 409 | 1415 | ||
| 1416 | + Widget taocanTextType(String per1, String title, String per) { | ||
| 1417 | + return RichText( | ||
| 1418 | + textScaleFactor: 1, | ||
| 1419 | + overflow: TextOverflow.ellipsis, | ||
| 1420 | + // textDirection: TextDirection.ltr, | ||
| 1421 | + | ||
| 1422 | + text: TextSpan( | ||
| 1423 | + children: [ | ||
| 1424 | + TextSpan( | ||
| 1425 | + text: per1, | ||
| 1426 | + style: TextStyle( | ||
| 1427 | + color: MyColours.color_999999, | ||
| 1428 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1429 | + //点击事件 | ||
| 1430 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1431 | + TextSpan( | ||
| 1432 | + text: title, | ||
| 1433 | + style: TextStyle( | ||
| 1434 | + color: MyColours.color_438E93, | ||
| 1435 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1436 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1437 | + TextSpan( | ||
| 1438 | + text: per, | ||
| 1439 | + style: TextStyle( | ||
| 1440 | + color: MyColours.color_999999, | ||
| 1441 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1442 | + //点击事件 | ||
| 1443 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1444 | + ], | ||
| 1445 | + )); | ||
| 1446 | + } | ||
| 1447 | + | ||
| 1448 | + Widget taocanText(String title, String per) { | ||
| 1449 | + return RichText( | ||
| 1450 | + textScaleFactor: 1, | ||
| 1451 | + overflow: TextOverflow.ellipsis, | ||
| 1452 | + // textDirection: TextDirection.ltr, | ||
| 1453 | + | ||
| 1454 | + text: TextSpan( | ||
| 1455 | + children: [ | ||
| 1456 | + TextSpan( | ||
| 1457 | + text: title, | ||
| 1458 | + style: TextStyle( | ||
| 1459 | + color: MyColours.color_438E93, | ||
| 1460 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1461 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1462 | + TextSpan( | ||
| 1463 | + text: per, | ||
| 1464 | + style: TextStyle( | ||
| 1465 | + color: MyColours.color_999999, | ||
| 1466 | + fontSize: ScreenUtil().setSp(28)), | ||
| 1467 | + //点击事件 | ||
| 1468 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1469 | + ], | ||
| 1470 | + )); | ||
| 1471 | + } | ||
| 1472 | + | ||
| 1473 | + Widget djTextType1(String title, String data, String per) { | ||
| 1474 | + return RichText( | ||
| 1475 | + textScaleFactor: 1, | ||
| 1476 | + overflow: TextOverflow.ellipsis, | ||
| 1477 | + // textDirection: TextDirection.ltr, | ||
| 1478 | + | ||
| 1479 | + text: TextSpan( | ||
| 1480 | + children: [ | ||
| 1481 | + TextSpan( | ||
| 1482 | + text: title, | ||
| 1483 | + style: TextStyle( | ||
| 1484 | + color: MyColours.color_999999, | ||
| 1485 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1486 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1487 | + TextSpan( | ||
| 1488 | + text: data, | ||
| 1489 | + style: TextStyle( | ||
| 1490 | + color: MyColours.color_E34D59, | ||
| 1491 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1492 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1493 | + TextSpan( | ||
| 1494 | + text: per, | ||
| 1495 | + style: TextStyle( | ||
| 1496 | + color: MyColours.color_515151, | ||
| 1497 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1498 | + //点击事件 | ||
| 1499 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1500 | + ], | ||
| 1501 | + )); | ||
| 1502 | + } | ||
| 1503 | + | ||
| 1504 | + Widget djText(String title, String per) { | ||
| 1505 | + return RichText( | ||
| 1506 | + textScaleFactor: 1, | ||
| 1507 | + overflow: TextOverflow.ellipsis, | ||
| 1508 | + // textDirection: TextDirection.ltr, | ||
| 1509 | + | ||
| 1510 | + text: TextSpan( | ||
| 1511 | + children: [ | ||
| 1512 | + TextSpan( | ||
| 1513 | + text: title, | ||
| 1514 | + style: TextStyle( | ||
| 1515 | + color: MyColours.color_999999, | ||
| 1516 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1517 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1518 | + TextSpan( | ||
| 1519 | + text: per, | ||
| 1520 | + style: TextStyle( | ||
| 1521 | + color: MyColours.color_515151, | ||
| 1522 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1523 | + //点击事件 | ||
| 1524 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1525 | + ], | ||
| 1526 | + )); | ||
| 1527 | + } | ||
| 1528 | + | ||
| 410 | @override | 1529 | @override |
| 411 | Widget build(BuildContext context) { | 1530 | Widget build(BuildContext context) { |
| 1531 | + feastModel = Provider.of<FeastModel>(context, listen: true); | ||
| 412 | return Scaffold( | 1532 | return Scaffold( |
| 413 | backgroundColor: MyColours.color_ffffff, | 1533 | backgroundColor: MyColours.color_ffffff, |
| 414 | appBar: SystemAppBar( | 1534 | appBar: SystemAppBar( |
| @@ -420,18 +1540,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -420,18 +1540,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 420 | Navigator.pop(context); | 1540 | Navigator.pop(context); |
| 421 | }, | 1541 | }, |
| 422 | ), | 1542 | ), |
| 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 | - ]))); | 1543 | + body: selectMenu == '意向' |
| 1544 | + ? yxWidget() | ||
| 1545 | + : selectMenu == '选台' | ||
| 1546 | + ? xtWidget() | ||
| 1547 | + : selectMenu == '定金' | ||
| 1548 | + ? djWidget() | ||
| 1549 | + : SizedBox()); | ||
| 436 | } | 1550 | } |
| 437 | } | 1551 | } |
| @@ -26,6 +26,7 @@ import 'package:provider/provider.dart'; | @@ -26,6 +26,7 @@ import 'package:provider/provider.dart'; | ||
| 26 | import 'package:image_picker/image_picker.dart'; | 26 | import 'package:image_picker/image_picker.dart'; |
| 27 | import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart'; | 27 | import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart'; |
| 28 | import 'package:wechat_assets_picker/wechat_assets_picker.dart'; | 28 | import 'package:wechat_assets_picker/wechat_assets_picker.dart'; |
| 29 | +import '../../utils/screen_util.dart'; | ||
| 29 | import './dispose.dart'; | 30 | import './dispose.dart'; |
| 30 | import 'package:photo_manager/photo_manager.dart'; | 31 | import 'package:photo_manager/photo_manager.dart'; |
| 31 | import 'package:flutter_native_image/flutter_native_image.dart'; | 32 | import 'package:flutter_native_image/flutter_native_image.dart'; |
| @@ -42,6 +43,11 @@ class ImgPickerFWidget extends StatefulWidget { | @@ -42,6 +43,11 @@ class ImgPickerFWidget extends StatefulWidget { | ||
| 42 | final UploadImageProvider model; | 43 | final UploadImageProvider model; |
| 43 | final UploadType uploadType; | 44 | final UploadType uploadType; |
| 44 | final DeleteCallback deleteCallback; | 45 | final DeleteCallback deleteCallback; |
| 46 | + final double size; | ||
| 47 | + final Color bgColor; | ||
| 48 | + final int crossAxisCount; | ||
| 49 | + final double mainAxisSpacing; | ||
| 50 | + final double crossAxisSpacing; | ||
| 45 | ImgPickerFWidget( | 51 | ImgPickerFWidget( |
| 46 | {Key key, | 52 | {Key key, |
| 47 | this.scrollController, | 53 | this.scrollController, |
| @@ -50,7 +56,12 @@ class ImgPickerFWidget extends StatefulWidget { | @@ -50,7 +56,12 @@ class ImgPickerFWidget extends StatefulWidget { | ||
| 50 | this.maxImageNumber = 5, | 56 | this.maxImageNumber = 5, |
| 51 | this.model, | 57 | this.model, |
| 52 | this.uploadType, | 58 | this.uploadType, |
| 53 | - this.deleteCallback}) | 59 | + this.deleteCallback, |
| 60 | + this.size = 100, | ||
| 61 | + this.bgColor = MyColours.color_f3f3f3, | ||
| 62 | + this.crossAxisCount = 3, | ||
| 63 | + this.mainAxisSpacing = 40, | ||
| 64 | + this.crossAxisSpacing = 36}) | ||
| 54 | : super(key: key); | 65 | : super(key: key); |
| 55 | 66 | ||
| 56 | @override | 67 | @override |
| @@ -107,6 +118,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -107,6 +118,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 107 | widget.model.imageListDenvironment.add(imgModel); | 118 | widget.model.imageListDenvironment.add(imgModel); |
| 108 | } else if (widget.uploadType == UploadType.TableManagerType) { | 119 | } else if (widget.uploadType == UploadType.TableManagerType) { |
| 109 | widget.model.tableImageList.add(imgModel); | 120 | widget.model.tableImageList.add(imgModel); |
| 121 | + } else if (widget.uploadType == UploadType.FeastRemarkType) { | ||
| 122 | + widget.model.feastRemarkImageList.add(imgModel); | ||
| 123 | + } else if (widget.uploadType == UploadType.FeastRemarkXtType) { | ||
| 124 | + widget.model.feastRemarkXtImageList.add(imgModel); | ||
| 125 | + } else if (widget.uploadType == UploadType.FeastRemarkDjType) { | ||
| 126 | + widget.model.feastRemarkDjImageList.add(imgModel); | ||
| 110 | } | 127 | } |
| 111 | } else { | 128 | } else { |
| 112 | print('No image selected.'); | 129 | print('No image selected.'); |
| @@ -123,6 +140,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -123,6 +140,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 123 | temp = widget.model.imageListDenvironment; | 140 | temp = widget.model.imageListDenvironment; |
| 124 | } else if (widget.uploadType == UploadType.TableManagerType) { | 141 | } else if (widget.uploadType == UploadType.TableManagerType) { |
| 125 | temp = widget.model.tableImageList; | 142 | temp = widget.model.tableImageList; |
| 143 | + } else if (widget.uploadType == UploadType.FeastRemarkType) { | ||
| 144 | + temp = widget.model.feastRemarkImageList; | ||
| 145 | + } else if (widget.uploadType == UploadType.FeastRemarkXtType) { | ||
| 146 | + temp = widget.model.feastRemarkXtImageList; | ||
| 147 | + } else if (widget.uploadType == UploadType.FeastRemarkDjType) { | ||
| 148 | + temp = widget.model.feastRemarkDjImageList; | ||
| 126 | } | 149 | } |
| 127 | UploadImageUtil().startUpload(context, File(pickedFile.path), | 150 | UploadImageUtil().startUpload(context, File(pickedFile.path), |
| 128 | temp.length - 1, true, widget.model, widget.uploadType, | 151 | temp.length - 1, true, widget.model, widget.uploadType, |
| @@ -141,6 +164,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -141,6 +164,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 141 | temp = widget.model.imageListDenvironment; | 164 | temp = widget.model.imageListDenvironment; |
| 142 | } else if (widget.uploadType == UploadType.TableManagerType) { | 165 | } else if (widget.uploadType == UploadType.TableManagerType) { |
| 143 | temp = widget.model.tableImageList; | 166 | temp = widget.model.tableImageList; |
| 167 | + } else if (widget.uploadType == UploadType.FeastRemarkType) { | ||
| 168 | + temp = widget.model.feastRemarkImageList; | ||
| 169 | + } else if (widget.uploadType == UploadType.FeastRemarkXtType) { | ||
| 170 | + temp = widget.model.feastRemarkXtImageList; | ||
| 171 | + } else if (widget.uploadType == UploadType.FeastRemarkDjType) { | ||
| 172 | + temp = widget.model.feastRemarkDjImageList; | ||
| 144 | } | 173 | } |
| 145 | List<AssetEntity> imgList = await AssetPicker.pickAssets(context, | 174 | List<AssetEntity> imgList = await AssetPicker.pickAssets(context, |
| 146 | maxAssets: widget.maxImageNumber - temp.length, | 175 | maxAssets: widget.maxImageNumber - temp.length, |
| @@ -442,6 +471,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -442,6 +471,12 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 442 | temp = widget.model.imageListDenvironment; | 471 | temp = widget.model.imageListDenvironment; |
| 443 | } else if (widget.uploadType == UploadType.TableManagerType) { | 472 | } else if (widget.uploadType == UploadType.TableManagerType) { |
| 444 | temp = widget.model.tableImageList; | 473 | temp = widget.model.tableImageList; |
| 474 | + } else if (widget.uploadType == UploadType.FeastRemarkType) { | ||
| 475 | + temp = widget.model.feastRemarkImageList; | ||
| 476 | + } else if (widget.uploadType == UploadType.FeastRemarkXtType) { | ||
| 477 | + temp = widget.model.feastRemarkXtImageList; | ||
| 478 | + } else if (widget.uploadType == UploadType.FeastRemarkDjType) { | ||
| 479 | + temp = widget.model.feastRemarkDjImageList; | ||
| 445 | } | 480 | } |
| 446 | return _getGridImg( | 481 | return _getGridImg( |
| 447 | temp.length < widget.maxImageNumber ? temp.length + 1 : temp.length, | 482 | temp.length < widget.maxImageNumber ? temp.length + 1 : temp.length, |
| @@ -461,11 +496,11 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -461,11 +496,11 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 461 | //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget | 496 | //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget |
| 462 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 497 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
| 463 | //横轴元素个数 | 498 | //横轴元素个数 |
| 464 | - crossAxisCount: 3, | 499 | + crossAxisCount: widget.crossAxisCount, |
| 465 | //纵轴间距 | 500 | //纵轴间距 |
| 466 | - mainAxisSpacing: ScreenUtil().setWidth(40), | 501 | + mainAxisSpacing: ScreenUtil().setWidth(widget.mainAxisSpacing), |
| 467 | //横轴间距 | 502 | //横轴间距 |
| 468 | - crossAxisSpacing: ScreenUtil().setWidth(36), | 503 | + crossAxisSpacing: ScreenUtil().setWidth(widget.crossAxisSpacing), |
| 469 | //子组件宽高长度比例 | 504 | //子组件宽高长度比例 |
| 470 | childAspectRatio: 1.0), | 505 | childAspectRatio: 1.0), |
| 471 | itemBuilder: (BuildContext context, int index) { | 506 | itemBuilder: (BuildContext context, int index) { |
| @@ -482,14 +517,15 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -482,14 +517,15 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 482 | _openModalBottomSheet(context); | 517 | _openModalBottomSheet(context); |
| 483 | }, | 518 | }, |
| 484 | child: Container( | 519 | child: Container( |
| 485 | - width: ScreenUtil().setWidth(80 * 2), | ||
| 486 | - height: ScreenUtil().setWidth(80 * 2), | 520 | + width: ScreenUtil().setWidth((widget.size - 20) * 2), |
| 521 | + height: ScreenUtil().setWidth((widget.size - 20) * 2), | ||
| 487 | decoration: BoxDecoration( | 522 | decoration: BoxDecoration( |
| 488 | - color: MyColours.color_f3f3f3, | ||
| 489 | - // border: Border.all( | ||
| 490 | - // color: MyColours.color_E0E0E0, | ||
| 491 | - // width: ScreenUtil().setWidth(2)), | ||
| 492 | - ), | 523 | + color: widget.bgColor, |
| 524 | + borderRadius: BorderRadius.circular(r(5)) | ||
| 525 | + // border: Border.all( | ||
| 526 | + // color: MyColours.color_E0E0E0, | ||
| 527 | + // width: ScreenUtil().setWidth(2)), | ||
| 528 | + ), | ||
| 493 | child: Column( | 529 | child: Column( |
| 494 | mainAxisAlignment: MainAxisAlignment.center, | 530 | mainAxisAlignment: MainAxisAlignment.center, |
| 495 | children: [ | 531 | children: [ |
| @@ -534,18 +570,27 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -534,18 +570,27 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 534 | children: [ | 570 | children: [ |
| 535 | temp[index].file != null | 571 | temp[index].file != null |
| 536 | ? Container( | 572 | ? Container( |
| 573 | + child: ClipRRect( | ||
| 574 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 537 | child: Image.file( | 575 | child: Image.file( |
| 538 | temp[index].file, | 576 | temp[index].file, |
| 539 | fit: BoxFit.cover, | 577 | fit: BoxFit.cover, |
| 540 | - width: ScreenUtil().setWidth(100 * 2), | ||
| 541 | - height: ScreenUtil().setWidth(100 * 2), | 578 | + width: |
| 579 | + ScreenUtil().setWidth(widget.size * 2), | ||
| 580 | + height: | ||
| 581 | + ScreenUtil().setWidth(widget.size * 2), | ||
| 582 | + ), | ||
| 583 | + )) | ||
| 584 | + : ClipRRect( | ||
| 585 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 586 | + child: CachedNetworkImage( | ||
| 587 | + imageUrl: temp[index].qiniuUrl, | ||
| 588 | + fit: BoxFit.cover, | ||
| 589 | + width: | ||
| 590 | + ScreenUtil().setWidth(widget.size * 2), | ||
| 591 | + height: | ||
| 592 | + ScreenUtil().setWidth(widget.size * 2), | ||
| 542 | ), | 593 | ), |
| 543 | - ) | ||
| 544 | - : CachedNetworkImage( | ||
| 545 | - imageUrl: temp[index].qiniuUrl, | ||
| 546 | - fit: BoxFit.cover, | ||
| 547 | - width: ScreenUtil().setWidth(100 * 2), | ||
| 548 | - height: ScreenUtil().setWidth(100 * 2), | ||
| 549 | ), | 594 | ), |
| 550 | Offstage( | 595 | Offstage( |
| 551 | offstage: temp[index].process < 1, | 596 | offstage: temp[index].process < 1, |
| @@ -553,7 +598,7 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -553,7 +598,7 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 553 | alignment: Alignment.topRight, | 598 | alignment: Alignment.topRight, |
| 554 | child: GestureDetector( | 599 | child: GestureDetector( |
| 555 | child: Image.asset( | 600 | child: Image.asset( |
| 556 | - Utils.getImgPath("delete"), | 601 | + Utils.getImgPath("f_delete"), |
| 557 | width: ScreenUtil().setWidth(40), | 602 | width: ScreenUtil().setWidth(40), |
| 558 | height: ScreenUtil().setWidth(40), | 603 | height: ScreenUtil().setWidth(40), |
| 559 | ), | 604 | ), |
| @@ -598,7 +643,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | @@ -598,7 +643,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> { | ||
| 598 | ), | 643 | ), |
| 599 | Offstage( | 644 | Offstage( |
| 600 | offstage: temp[index].process == 1, | 645 | offstage: temp[index].process == 1, |
| 601 | - child: Progress(temp[index].process), | 646 | + child: Progress( |
| 647 | + temp[index].process, | ||
| 648 | + size: widget.size, | ||
| 649 | + ), | ||
| 602 | ) | 650 | ) |
| 603 | ], | 651 | ], |
| 604 | )); | 652 | )); |
| @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; | @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; | ||
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 3 | import 'package:one_key/res/colors.dart'; | 3 | import 'package:one_key/res/colors.dart'; |
| 4 | 4 | ||
| 5 | +import '../../utils/screen_util.dart'; | ||
| 6 | + | ||
| 5 | class Progress extends StatelessWidget { | 7 | class Progress extends StatelessWidget { |
| 6 | final double value; | 8 | final double value; |
| 7 | final double size; | 9 | final double size; |
| @@ -44,7 +46,9 @@ class Progress extends StatelessWidget { | @@ -44,7 +46,9 @@ class Progress extends StatelessWidget { | ||
| 44 | Container( | 46 | Container( |
| 45 | width: ScreenUtil().setWidth(size * 2), | 47 | width: ScreenUtil().setWidth(size * 2), |
| 46 | height: ScreenUtil().setWidth(size * 2), | 48 | height: ScreenUtil().setWidth(size * 2), |
| 47 | - color: Color.fromRGBO(0, 0, 0, 0.5), | 49 | + decoration: BoxDecoration( |
| 50 | + color: Color.fromRGBO(0, 0, 0, 0.5), | ||
| 51 | + borderRadius: BorderRadius.circular(r(5))), | ||
| 48 | child: Center( | 52 | child: Center( |
| 49 | child: Text('${integer}${unit}', | 53 | child: Text('${integer}${unit}', |
| 50 | style: TextStyle( | 54 | style: TextStyle( |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:one_key/constant/state.dart'; | 2 | import 'package:one_key/constant/state.dart'; |
| 3 | +import 'package:one_key/provider/user_model.dart'; | ||
| 4 | +import 'package:provider/provider.dart'; | ||
| 5 | + | ||
| 6 | +import '../constant/constant.dart'; | ||
| 7 | +import '../constant/error.dart'; | ||
| 8 | +import '../models/filter_btn_model.dart'; | ||
| 9 | +import '../models/get_seller_user_by_sellerid_model.dart'; | ||
| 10 | +import '../net/base_resp.dart'; | ||
| 11 | +import '../net/dio_util.dart'; | ||
| 12 | +import '../net/http_url.dart'; | ||
| 13 | +import '../utils/utils.dart'; | ||
| 3 | 14 | ||
| 4 | class FeastModel extends ChangeNotifier { | 15 | class FeastModel extends ChangeNotifier { |
| 5 | PageState pageState = PageState.Success; | 16 | PageState pageState = PageState.Success; |
| 17 | + | ||
| 18 | + List<FilterBtnModel> sellerManageList = []; //经理数据 ---- 商家编辑页面 | ||
| 19 | + | ||
| 20 | + ///商家详情编辑页面 ------ 获取经理数据 | ||
| 21 | + Future<List<FilterBtnModel>> getSellerUserBySellerid(BuildContext context, | ||
| 22 | + {isShowLoading = true}) async { | ||
| 23 | + Map<String, String> params = { | ||
| 24 | + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid | ||
| 25 | + }; | ||
| 26 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 27 | + .request<dynamic>( | ||
| 28 | + context, Method.get, HttpUrl.get_seller_user_by_sellerid, | ||
| 29 | + data: params, showLoading: false) | ||
| 30 | + .catchError((error) { | ||
| 31 | + print(error.toString()); | ||
| 32 | + if (error is MyError) {} | ||
| 33 | + }); | ||
| 34 | + if (baseResp.code == Constant.status_success) { | ||
| 35 | + List<GetSellerUserBySelleridSunModel> sunmodel = | ||
| 36 | + GetSellerUserBySelleridModel.fromJson(baseResp.responseData).data; | ||
| 37 | + sellerManageList = []; | ||
| 38 | + if (sunmodel != null && sunmodel.length > 0) { | ||
| 39 | + for (GetSellerUserBySelleridSunModel item in sunmodel) { | ||
| 40 | + if (item.nickName != null) { | ||
| 41 | + FilterBtnModel model = FilterBtnModel(); | ||
| 42 | + model.id = item.id; | ||
| 43 | + model.title = item.nickName; | ||
| 44 | + sellerManageList.add(model); | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + } else { | ||
| 49 | + if (baseResp != null) { | ||
| 50 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + return sellerManageList; | ||
| 54 | + } | ||
| 6 | } | 55 | } |
| @@ -25,6 +25,9 @@ class UploadImageProvider extends ChangeNotifier { | @@ -25,6 +25,9 @@ class UploadImageProvider extends ChangeNotifier { | ||
| 25 | List<UploadImgModel> imageListDenvironment = []; //环境信息列表 | 25 | List<UploadImgModel> imageListDenvironment = []; //环境信息列表 |
| 26 | List<UploadImgModel> imageListFront = []; //门头信息列表 | 26 | List<UploadImgModel> imageListFront = []; //门头信息列表 |
| 27 | List<UploadImgModel> tableImageList = []; //桌子管理图片信息列表 | 27 | List<UploadImgModel> tableImageList = []; //桌子管理图片信息列表 |
| 28 | + List<UploadImgModel> feastRemarkImageList = []; //宴会备注图片信息列表 | ||
| 29 | + List<UploadImgModel> feastRemarkXtImageList = []; //宴会备注图片信息列表----选台 | ||
| 30 | + List<UploadImgModel> feastRemarkDjImageList = []; //宴会备注图片信息列表----定金 | ||
| 28 | int countUpload = 0; | 31 | int countUpload = 0; |
| 29 | UploadImageProvider() { | 32 | UploadImageProvider() { |
| 30 | touxiang.process = 0.01; | 33 | touxiang.process = 0.01; |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | 2 | ||
| 3 | class MyColours { | 3 | class MyColours { |
| 4 | + static const Color color_00A870 = Color(0xff00A870); | ||
| 4 | static const Color color_F6F6F6 = Color(0xffF6F6F6); | 5 | static const Color color_F6F6F6 = Color(0xffF6F6F6); |
| 5 | static const Color color_E6000000 = Color(0xE6000000); | 6 | static const Color color_E6000000 = Color(0xE6000000); |
| 6 | static const Color color_99000000 = Color(0x99000000); | 7 | static const Color color_99000000 = Color(0x99000000); |
| @@ -23,6 +23,7 @@ import 'package:one_key/route/navigator_util.dart'; | @@ -23,6 +23,7 @@ import 'package:one_key/route/navigator_util.dart'; | ||
| 23 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_day.dart'; | 23 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_day.dart'; |
| 24 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_month.dart'; | 24 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_month.dart'; |
| 25 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_year.dart'; | 25 | import 'package:one_key/utils/pick_date_nonli_gongli/pick_calendar_year.dart'; |
| 26 | +import 'package:one_key/utils/screen_util.dart'; | ||
| 26 | import 'package:one_key/utils/utils.dart'; | 27 | import 'package:one_key/utils/utils.dart'; |
| 27 | import 'package:one_key/widgets/MyDivider.dart'; | 28 | import 'package:one_key/widgets/MyDivider.dart'; |
| 28 | import 'package:one_key/widgets/common_button.dart'; | 29 | import 'package:one_key/widgets/common_button.dart'; |
| @@ -3987,19 +3988,114 @@ class DialogUtil { | @@ -3987,19 +3988,114 @@ class DialogUtil { | ||
| 3987 | title, | 3988 | title, |
| 3988 | style: TextStyle( | 3989 | style: TextStyle( |
| 3989 | fontWeight: FontWeight.bold, | 3990 | fontWeight: FontWeight.bold, |
| 3990 | - color: Color.fromRGBO(0, 0, 0, 0.9), | 3991 | + color: MyColours.color_515151, |
| 3991 | fontSize: ScreenUtil().setSp(32)), | 3992 | fontSize: ScreenUtil().setSp(32)), |
| 3992 | ), | 3993 | ), |
| 3993 | cancelText: cancelText, | 3994 | cancelText: cancelText, |
| 3994 | cancelTextStyle: | 3995 | cancelTextStyle: |
| 3995 | TextStyle(color: cancelTextColor, fontSize: ScreenUtil().setSp(32)), | 3996 | TextStyle(color: cancelTextColor, fontSize: ScreenUtil().setSp(32)), |
| 3996 | confirmText: "确定", | 3997 | confirmText: "确定", |
| 3997 | - itemExtent: ScreenUtil().setWidth(90), | 3998 | + itemExtent: ScreenUtil().setWidth(80), |
| 3998 | confirmTextStyle: TextStyle( | 3999 | confirmTextStyle: TextStyle( |
| 3999 | color: MyColours.color_438E93, fontSize: ScreenUtil().setSp(32)), | 4000 | color: MyColours.color_438E93, fontSize: ScreenUtil().setSp(32)), |
| 4000 | selectedTextStyle: TextStyle( | 4001 | selectedTextStyle: TextStyle( |
| 4001 | - color: Color.fromRGBO(0, 0, 0, 0.9), | 4002 | + color: MyColours.color_000000, fontSize: ScreenUtil().setSp(32)), |
| 4003 | + textStyle: TextStyle( | ||
| 4004 | + color: Color.fromRGBO(0, 0, 0, 0.26), | ||
| 4002 | fontSize: ScreenUtil().setSp(32)), | 4005 | fontSize: ScreenUtil().setSp(32)), |
| 4006 | + selectionOverlay: Container( | ||
| 4007 | + height: ScreenUtil().setWidth(80), | ||
| 4008 | + decoration: BoxDecoration( | ||
| 4009 | + border: Border( | ||
| 4010 | + bottom: BorderSide( | ||
| 4011 | + width: ScreenUtil().setWidth(2), | ||
| 4012 | + color: MyColours.color_E7E7E7), | ||
| 4013 | + top: BorderSide( | ||
| 4014 | + width: ScreenUtil().setWidth(2), | ||
| 4015 | + color: MyColours.color_E7E7E7))), | ||
| 4016 | + ), | ||
| 4017 | + onCancel: onCancel, | ||
| 4018 | + onConfirm: (Picker picker, List value) { | ||
| 4019 | + print(value.toString()); | ||
| 4020 | + if (valueChanged != null) { | ||
| 4021 | + valueChanged(value); | ||
| 4022 | + } | ||
| 4023 | + }).showModal<List<int>>(context).then((value) { | ||
| 4024 | + LogUtil.v("value:${value.toString()}"); | ||
| 4025 | + return value; | ||
| 4026 | + }); | ||
| 4027 | + } | ||
| 4028 | + | ||
| 4029 | + //显示选择客户经理弹框 | ||
| 4030 | + static Future<List<int>> showSelectCusmanDialogNeedCustomHeader( | ||
| 4031 | + BuildContext context, List<dynamic> data, ValueChanged valueChanged, | ||
| 4032 | + {List<int> selecteds, | ||
| 4033 | + Color cancelTextColor = const Color.fromRGBO(0, 0, 0, 0.6), | ||
| 4034 | + String title = '', | ||
| 4035 | + VoidCallback onCancel, | ||
| 4036 | + String cancelText = '取消'}) { | ||
| 4037 | + return Picker( | ||
| 4038 | + selecteds: selecteds, | ||
| 4039 | + adapter: PickerDataAdapter<String>(pickerdata: data), | ||
| 4040 | + height: ScreenUtil().setWidth(480), | ||
| 4041 | + hideHeader: false, | ||
| 4042 | + builderHeader: (BuildContext context) { | ||
| 4043 | + return Container( | ||
| 4044 | + color: MyColours.color_ffffff, | ||
| 4045 | + child: Stack(children: [ | ||
| 4046 | + Column( | ||
| 4047 | + children: [ | ||
| 4048 | + VEmptyView(24), | ||
| 4049 | + Text( | ||
| 4050 | + title, | ||
| 4051 | + style: TextStyle( | ||
| 4052 | + fontWeight: FontWeight.bold, | ||
| 4053 | + color: MyColours.color_515151, | ||
| 4054 | + fontSize: ScreenUtil().setSp(32)), | ||
| 4055 | + ), | ||
| 4056 | + VEmptyView(22), | ||
| 4057 | + MyDivider(double.infinity, ScreenUtil().setWidth(2), | ||
| 4058 | + color: MyColours.color_E7E7E7), | ||
| 4059 | + Padding( | ||
| 4060 | + padding: EdgeInsets.symmetric( | ||
| 4061 | + horizontal: w(60), vertical: h(8)), | ||
| 4062 | + child: Row( | ||
| 4063 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 4064 | + children: [ | ||
| 4065 | + Text('开始时间', | ||
| 4066 | + style: TextStyle( | ||
| 4067 | + color: MyColours.color_438E93, | ||
| 4068 | + fontSize: font(16))), | ||
| 4069 | + Text('结束时间', | ||
| 4070 | + style: TextStyle( | ||
| 4071 | + color: MyColours.color_438E93, | ||
| 4072 | + fontSize: font(16))) | ||
| 4073 | + ], | ||
| 4074 | + )), | ||
| 4075 | + ], | ||
| 4076 | + ), | ||
| 4077 | + Positioned( | ||
| 4078 | + top: h(12), | ||
| 4079 | + right: w(12), | ||
| 4080 | + child: InkWell( | ||
| 4081 | + onTap: () { | ||
| 4082 | + final picker = PickerWidget.of(context); | ||
| 4083 | + List value = picker?.data.selecteds; | ||
| 4084 | + print(value.toString()); | ||
| 4085 | + if (valueChanged != null) { | ||
| 4086 | + valueChanged(value); | ||
| 4087 | + } | ||
| 4088 | + Navigator.pop(context); | ||
| 4089 | + }, | ||
| 4090 | + child: Text('确定', | ||
| 4091 | + style: TextStyle( | ||
| 4092 | + color: MyColours.color_438E93, | ||
| 4093 | + fontSize: ScreenUtil().setSp(32))))) | ||
| 4094 | + ])); | ||
| 4095 | + }, | ||
| 4096 | + itemExtent: ScreenUtil().setWidth(80), | ||
| 4097 | + selectedTextStyle: TextStyle( | ||
| 4098 | + color: MyColours.color_000000, fontSize: ScreenUtil().setSp(32)), | ||
| 4003 | textStyle: TextStyle( | 4099 | textStyle: TextStyle( |
| 4004 | color: Color.fromRGBO(0, 0, 0, 0.26), | 4100 | color: Color.fromRGBO(0, 0, 0, 0.26), |
| 4005 | fontSize: ScreenUtil().setSp(32)), | 4101 | fontSize: ScreenUtil().setSp(32)), |
| @@ -15,6 +15,9 @@ enum UploadType { | @@ -15,6 +15,9 @@ enum UploadType { | ||
| 15 | HeadUploadType, //头像 | 15 | HeadUploadType, //头像 |
| 16 | QrcodeUploadType, //二维码 | 16 | QrcodeUploadType, //二维码 |
| 17 | TableManagerType, //桌面照片管理 | 17 | TableManagerType, //桌面照片管理 |
| 18 | + FeastRemarkType, //宴会备注--意向 | ||
| 19 | + FeastRemarkXtType, //宴会备注--选台 | ||
| 20 | + FeastRemarkDjType //宴会备注--定金 | ||
| 18 | 21 | ||
| 19 | } | 22 | } |
| 20 | 23 | ||
| @@ -65,6 +68,15 @@ class UploadImageUtil { | @@ -65,6 +68,15 @@ class UploadImageUtil { | ||
| 65 | } else if (uploadType == UploadType.TableManagerType) { | 68 | } else if (uploadType == UploadType.TableManagerType) { |
| 66 | //桌面照片管理 | 69 | //桌面照片管理 |
| 67 | uploadImageProvider.tableImageList[index].process = percent; | 70 | uploadImageProvider.tableImageList[index].process = percent; |
| 71 | + } else if (uploadType == UploadType.FeastRemarkType) { | ||
| 72 | + //宴会备注 ---意向 | ||
| 73 | + uploadImageProvider.feastRemarkImageList[index].process = percent; | ||
| 74 | + } else if (uploadType == UploadType.FeastRemarkXtType) { | ||
| 75 | + //宴会备注 ---选台 | ||
| 76 | + uploadImageProvider.feastRemarkXtImageList[index].process = percent; | ||
| 77 | + } else if (uploadType == UploadType.FeastRemarkDjType) { | ||
| 78 | + //宴会备注 ---定金 | ||
| 79 | + uploadImageProvider.feastRemarkDjImageList[index].process = percent; | ||
| 68 | } | 80 | } |
| 69 | 81 | ||
| 70 | uploadImageProvider.notifyListeners(); | 82 | uploadImageProvider.notifyListeners(); |
| @@ -121,6 +133,18 @@ class UploadImageUtil { | @@ -121,6 +133,18 @@ class UploadImageUtil { | ||
| 121 | uploadImageProvider.countUpload = 0; | 133 | uploadImageProvider.countUpload = 0; |
| 122 | callback(); | 134 | callback(); |
| 123 | } | 135 | } |
| 136 | + } else if (uploadType == UploadType.FeastRemarkType) { | ||
| 137 | + //宴会备注---意向 | ||
| 138 | + uploadImageProvider.feastRemarkImageList[index].process = 1; | ||
| 139 | + uploadImageProvider.feastRemarkImageList[index].qiniuUrl = imgUrl; | ||
| 140 | + } else if (uploadType == UploadType.FeastRemarkXtType) { | ||
| 141 | + //宴会备注---选台 | ||
| 142 | + uploadImageProvider.feastRemarkXtImageList[index].process = 1; | ||
| 143 | + uploadImageProvider.feastRemarkXtImageList[index].qiniuUrl = imgUrl; | ||
| 144 | + } else if (uploadType == UploadType.FeastRemarkDjType) { | ||
| 145 | + //宴会备注---定金 | ||
| 146 | + uploadImageProvider.feastRemarkDjImageList[index].process = 1; | ||
| 147 | + uploadImageProvider.feastRemarkDjImageList[index].qiniuUrl = imgUrl; | ||
| 124 | } | 148 | } |
| 125 | 149 | ||
| 126 | // 取消当前任务 | 150 | // 取消当前任务 |
| @@ -5,6 +5,7 @@ import 'package:one_key/utils/utils.dart'; | @@ -5,6 +5,7 @@ import 'package:one_key/utils/utils.dart'; | ||
| 5 | typedef SetTimeCallback = void Function(List value); | 5 | typedef SetTimeCallback = void Function(List value); |
| 6 | 6 | ||
| 7 | class SetTimeWidget { | 7 | class SetTimeWidget { |
| 8 | + static SetTimeWidget init = SetTimeWidget(); | ||
| 8 | static List dateData = [ | 9 | static List dateData = [ |
| 9 | { | 10 | { |
| 10 | '深夜00时': [00, 15, 30, 45] | 11 | '深夜00时': [00, 15, 30, 45] |
| @@ -79,6 +80,105 @@ class SetTimeWidget { | @@ -79,6 +80,105 @@ class SetTimeWidget { | ||
| 79 | '晚上23时': [00, 15, 30, 45] | 80 | '晚上23时': [00, 15, 30, 45] |
| 80 | } | 81 | } |
| 81 | ]; | 82 | ]; |
| 83 | + | ||
| 84 | + List feastDateData; | ||
| 85 | + | ||
| 86 | + List getFeastDateData(String hourAndMinuteStr) { | ||
| 87 | + // '00:00-00:00' | ||
| 88 | + List hm = _getHourAndMinute(hourAndMinuteStr); | ||
| 89 | + List temp = []; | ||
| 90 | + hm.forEach((e) { | ||
| 91 | + Map map = {e: hm}; | ||
| 92 | + temp.add(map); | ||
| 93 | + }); | ||
| 94 | + feastDateData = temp; | ||
| 95 | + return temp; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | +//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组 | ||
| 99 | + _getHourAndMinute(String hourAndMinuteStr) { | ||
| 100 | + List tempDate = hourAndMinuteStr.split("-"); | ||
| 101 | + String beginDate = tempDate[0]; | ||
| 102 | + String endDate = tempDate[1]; | ||
| 103 | + List tempHour = beginDate.split(':'); | ||
| 104 | + | ||
| 105 | + /*获取开始小时*/ | ||
| 106 | + int beginHour = int.parse(tempHour[0]); | ||
| 107 | + /*获取开始分钟*/ | ||
| 108 | + int beginMinute = int.parse(tempHour[1]); | ||
| 109 | + List res = []; | ||
| 110 | + bool tempLimit = true; | ||
| 111 | + while (tempLimit) { | ||
| 112 | + String temp = _dealTime(beginHour, beginMinute); | ||
| 113 | + | ||
| 114 | + // bool tempSelect = false; | ||
| 115 | + | ||
| 116 | + // Map tempMap = {'title': temp, 'select': tempSelect}; | ||
| 117 | + res.add(temp); | ||
| 118 | + if (temp == endDate) { | ||
| 119 | + tempLimit = false; | ||
| 120 | + break; | ||
| 121 | + } | ||
| 122 | + if (beginMinute == 30) { | ||
| 123 | + beginHour++; | ||
| 124 | + if (beginHour >= 24) { | ||
| 125 | + beginHour = 0; | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + beginMinute = (beginMinute + 30) % 60; | ||
| 129 | + } | ||
| 130 | + return res; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + /// 根据时间和分钟组装 格式:11:00 | ||
| 134 | + _dealTime(int begin, int mm) { | ||
| 135 | + String sb = ''; | ||
| 136 | + if (begin < 10) { | ||
| 137 | + sb = '0$begin'; | ||
| 138 | + } else { | ||
| 139 | + sb = '$begin'; | ||
| 140 | + } | ||
| 141 | + sb = '$sb:'; | ||
| 142 | + if (mm < 10) { | ||
| 143 | + sb = '${sb}0${mm}'; | ||
| 144 | + } else { | ||
| 145 | + sb = '${sb}${mm}'; | ||
| 146 | + } | ||
| 147 | + return sb; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + showFeastTimeSelector( | ||
| 151 | + context, data, start, end, SetTimeCallback setTimeCallback) { | ||
| 152 | + DialogUtil.showSelectCusmanDialogNeedCustomHeader(context, data, (value) { | ||
| 153 | + setTimeCallback(value); | ||
| 154 | + }, cancelText: '', title: '选择时间', selecteds: [ | ||
| 155 | + _getFirSelectedFeast(start, data), | ||
| 156 | + _getFirSelectedFeast(end, data) | ||
| 157 | + ]).then((value) { | ||
| 158 | + print(value); | ||
| 159 | + }); | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + //宴会 ------ 第一列当前选中第几个 | ||
| 163 | + _getFirSelectedFeast(String start, List data) { | ||
| 164 | + for (int i = 0; i < data.length; i++) { | ||
| 165 | + Map map = data[i]; | ||
| 166 | + String key = map.keys.first; | ||
| 167 | + if (key.contains(start)) { | ||
| 168 | + return i; | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + return 0; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + String getSelectTitle(int value) { | ||
| 175 | + if (feastDateData.length > 0) { | ||
| 176 | + Map map = feastDateData[0]; | ||
| 177 | + List<dynamic> temp = map[map.keys.first]; | ||
| 178 | + return temp[value]; | ||
| 179 | + } | ||
| 180 | + } | ||
| 181 | + | ||
| 82 | showTimeSelector( | 182 | showTimeSelector( |
| 83 | context, data, hourAndMinute, SetTimeCallback setTimeCallback) { | 183 | context, data, hourAndMinute, SetTimeCallback setTimeCallback) { |
| 84 | DialogUtil.showSelectCusmanDialog(context, data, (value) { | 184 | DialogUtil.showSelectCusmanDialog(context, data, (value) { |
-
Please register or login to post a comment