Showing
13 changed files
with
1684 additions
and
12 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "397" | 15 | +def flutterVersionCode = "400" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '397' | 17 | + flutterVersionCode = '400' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "3.9.7" | 20 | +def flutterVersionName = "4.0.0" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '3.9.7' | 22 | + flutterVersionName = '4.0.0' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -34,7 +34,7 @@ class SetMealSunModel { | @@ -34,7 +34,7 @@ class SetMealSunModel { | ||
| 34 | String price; | 34 | String price; |
| 35 | String bargaining; | 35 | String bargaining; |
| 36 | String status; | 36 | String status; |
| 37 | - Null cdate; | 37 | + dynamic cdate; |
| 38 | List<Classify> classify; | 38 | List<Classify> classify; |
| 39 | List<Cook> cook; | 39 | List<Cook> cook; |
| 40 | 40 |
| @@ -290,5 +290,6 @@ class HttpUrl { | @@ -290,5 +290,6 @@ class HttpUrl { | ||
| 290 | static const String set_deposit = | 290 | static const String set_deposit = |
| 291 | "?service=App.Banquet.SetDeposit"; // 添加/修改宴会定金 | 291 | "?service=App.Banquet.SetDeposit"; // 添加/修改宴会定金 |
| 292 | static const String del_deposit = "?service=App.Banquet.DelDeposit"; // 删除宴会定金 | 292 | static const String del_deposit = "?service=App.Banquet.DelDeposit"; // 删除宴会定金 |
| 293 | - | 293 | + static const String create_banquet = |
| 294 | + "?service=App.Banquet.CreateBanquet"; //创建意向 | ||
| 294 | } | 295 | } |
| @@ -13,6 +13,7 @@ import 'package:provider/provider.dart'; | @@ -13,6 +13,7 @@ import 'package:provider/provider.dart'; | ||
| 13 | import '../../models/feast_menu_model.dart'; | 13 | import '../../models/feast_menu_model.dart'; |
| 14 | import '../../provider/feast_model.dart'; | 14 | import '../../provider/feast_model.dart'; |
| 15 | import '../../provider/upload_img_provider.dart'; | 15 | import '../../provider/upload_img_provider.dart'; |
| 16 | +import '../../provider/user_model.dart'; | ||
| 16 | import '../../res/colors.dart'; | 17 | import '../../res/colors.dart'; |
| 17 | import '../../utils/dialog_util.dart'; | 18 | import '../../utils/dialog_util.dart'; |
| 18 | import '../../utils/screen_util.dart'; | 19 | import '../../utils/screen_util.dart'; |
| @@ -601,7 +602,23 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | @@ -601,7 +602,23 @@ class _FeastCreatePageState extends State<FeastCreatePage> { | ||
| 601 | children: [ | 602 | children: [ |
| 602 | Expanded( | 603 | Expanded( |
| 603 | child: _callButton( | 604 | child: _callButton( |
| 604 | - onPress: () {}, | 605 | + onPress: () { |
| 606 | + Map<String, String> pramas = { | ||
| 607 | + 'sid': Provider.of<UserModel>(context, listen: false) | ||
| 608 | + .user | ||
| 609 | + .sellerid, | ||
| 610 | + 'ddate': '', | ||
| 611 | + 'jiedan_id': '', | ||
| 612 | + 'staff_id': '', | ||
| 613 | + 'classify_id': '', | ||
| 614 | + 'rname': '', | ||
| 615 | + 'sex': '', | ||
| 616 | + 'phone': '', | ||
| 617 | + 'remark': '', | ||
| 618 | + 'images': '' | ||
| 619 | + }; | ||
| 620 | + feastModel.createBanquet(context, pramas); | ||
| 621 | + }, | ||
| 605 | content: '仅保存', | 622 | content: '仅保存', |
| 606 | hasLeftBorder: true, | 623 | hasLeftBorder: true, |
| 607 | isSelect: false)), | 624 | isSelect: false)), |
lib/pages/feast/feast_deposit_data_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/res/colors.dart'; | ||
| 5 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 6 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 7 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 8 | +import 'package:provider/provider.dart'; | ||
| 9 | + | ||
| 10 | +import '../../constant/state.dart'; | ||
| 11 | +import '../../provider/feast_model.dart'; | ||
| 12 | +import '../../utils/screen_util.dart'; | ||
| 13 | +import '../../utils/utils.dart'; | ||
| 14 | +import '../../widgets/MyDivider.dart'; | ||
| 15 | +import '../../widgets/loading.dart'; | ||
| 16 | +import '../../widgets/page_exception.dart'; | ||
| 17 | +import '../../widgets/round_button.dart'; | ||
| 18 | +import '../../widgets/system_app_bar.dart'; | ||
| 19 | + | ||
| 20 | +class FeastDepositDataPage extends StatefulWidget { | ||
| 21 | + FeastDepositDataPage({Key key}) : super(key: key); | ||
| 22 | + | ||
| 23 | + @override | ||
| 24 | + _FeastDepositDataPageState createState() => _FeastDepositDataPageState(); | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class _FeastDepositDataPageState extends State<FeastDepositDataPage> { | ||
| 28 | + FeastModel feastModel; | ||
| 29 | + | ||
| 30 | + TextEditingController editingController = TextEditingController(); | ||
| 31 | + @override | ||
| 32 | + void initState() { | ||
| 33 | + super.initState(); | ||
| 34 | + | ||
| 35 | + Utils.changeStatusColor(color: MyColours.color_438E93); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + Widget buildFeastTypeHeader() { | ||
| 39 | + return Container( | ||
| 40 | + width: double.infinity, | ||
| 41 | + height: h(46), | ||
| 42 | + decoration: BoxDecoration( | ||
| 43 | + color: MyColours.color_ffffff, | ||
| 44 | + border: Border( | ||
| 45 | + bottom: BorderSide(width: w(1), color: MyColours.color_DBDBDB))), | ||
| 46 | + child: Row( | ||
| 47 | + children: [ | ||
| 48 | + RichText( | ||
| 49 | + textScaleFactor: 1, | ||
| 50 | + overflow: TextOverflow.ellipsis, | ||
| 51 | + // textDirection: TextDirection.ltr, | ||
| 52 | + // textAlign: TextAlign.left, | ||
| 53 | + | ||
| 54 | + text: TextSpan( | ||
| 55 | + children: [ | ||
| 56 | + TextSpan( | ||
| 57 | + text: "收据编号", | ||
| 58 | + style: TextStyle( | ||
| 59 | + color: MyColours.color_515151, | ||
| 60 | + fontSize: ScreenUtil().setSp(28)), | ||
| 61 | + ), | ||
| 62 | + TextSpan( | ||
| 63 | + text: "*", | ||
| 64 | + style: TextStyle( | ||
| 65 | + color: MyColours.color_E34D59, | ||
| 66 | + fontSize: ScreenUtil().setSp(28)), | ||
| 67 | + ), | ||
| 68 | + ], | ||
| 69 | + )), | ||
| 70 | + HEmptyView(32), | ||
| 71 | + Expanded( | ||
| 72 | + child: Container( | ||
| 73 | + // height: ScreenUtil().setHeight(120), | ||
| 74 | + height: w(48), | ||
| 75 | + padding: EdgeInsets.only(top: w(4)), | ||
| 76 | + child: TextField( | ||
| 77 | + controller: editingController, | ||
| 78 | + // textAlign: TextAlign.right, | ||
| 79 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 80 | + maxLines: 1, | ||
| 81 | + inputFormatters: [], | ||
| 82 | + | ||
| 83 | + // //光标颜色 | ||
| 84 | + // cursorColor: | ||
| 85 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 86 | + //输入文本的样式 | ||
| 87 | + style: TextStyle( | ||
| 88 | + fontSize: ScreenUtil().setSp(32), | ||
| 89 | + color: MyColours.color_515151), | ||
| 90 | + // focusNode: focusNode, | ||
| 91 | + decoration: InputDecoration( | ||
| 92 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 93 | + hintText: '请输入', | ||
| 94 | + hintStyle: TextStyle( | ||
| 95 | + color: MyColours.color_999999, | ||
| 96 | + fontSize: ScreenUtil().setSp(32), | ||
| 97 | + ), | ||
| 98 | + contentPadding: EdgeInsets.zero, | ||
| 99 | + ), | ||
| 100 | + onChanged: (value) {}, | ||
| 101 | + onEditingComplete: () { | ||
| 102 | + FocusScope.of(context) | ||
| 103 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 104 | + }, | ||
| 105 | + keyboardType: TextInputType.text, | ||
| 106 | + )), | ||
| 107 | + ), | ||
| 108 | + RoundButton( | ||
| 109 | + onPressed: () async {}, | ||
| 110 | + text: '搜索', | ||
| 111 | + fontSize: 28, | ||
| 112 | + isBold: false, | ||
| 113 | + height: h(28), | ||
| 114 | + width: w(36), | ||
| 115 | + // margin: EdgeInsets.only(top: w(18), bottom: w(4)), | ||
| 116 | + textColor: MyColours.color_F6F6F6, | ||
| 117 | + gradientStart: MyColours.color_438E93, | ||
| 118 | + gradientEnd: MyColours.color_438E93, | ||
| 119 | + borderColor: MyColours.color_438E93, | ||
| 120 | + radius: r(4), | ||
| 121 | + ), | ||
| 122 | + ], | ||
| 123 | + ), | ||
| 124 | + ); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + Widget buildFeastTypeItem() { | ||
| 128 | + return Container( | ||
| 129 | + margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(36)), | ||
| 130 | + decoration: BoxDecoration( | ||
| 131 | + border: Border.all( | ||
| 132 | + color: MyColours.color_f3f3f3, width: ScreenUtil().setWidth(2)), | ||
| 133 | + boxShadow: [ | ||
| 134 | + BoxShadow( | ||
| 135 | + color: MyColours.color_1F000000, | ||
| 136 | + offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 137 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 138 | + ], | ||
| 139 | + borderRadius: BorderRadius.circular(ScreenUtil().radius(10))), | ||
| 140 | + child: Column( | ||
| 141 | + children: [ | ||
| 142 | + Container( | ||
| 143 | + padding: EdgeInsets.symmetric( | ||
| 144 | + horizontal: ScreenUtil().setWidth(16), | ||
| 145 | + vertical: ScreenUtil().setWidth(8)), | ||
| 146 | + decoration: BoxDecoration( | ||
| 147 | + color: MyColours.color_438E93, | ||
| 148 | + borderRadius: BorderRadius.only( | ||
| 149 | + topLeft: Radius.circular(ScreenUtil().radius(10)), | ||
| 150 | + topRight: Radius.circular(ScreenUtil().radius(10)), | ||
| 151 | + ), | ||
| 152 | + ), | ||
| 153 | + child: Row( | ||
| 154 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 155 | + children: [ | ||
| 156 | + Text( | ||
| 157 | + '8月1日 午餐', | ||
| 158 | + style: TextStyle( | ||
| 159 | + fontWeight: FontWeight.bold, | ||
| 160 | + color: MyColours.color_F6F6F6, | ||
| 161 | + fontSize: ScreenUtil().setSp(40)), | ||
| 162 | + ), | ||
| 163 | + Text( | ||
| 164 | + '婚宴', | ||
| 165 | + style: TextStyle( | ||
| 166 | + fontWeight: FontWeight.bold, | ||
| 167 | + color: MyColours.color_F6F6F6, | ||
| 168 | + fontSize: ScreenUtil().setSp(40)), | ||
| 169 | + ) | ||
| 170 | + ], | ||
| 171 | + )), | ||
| 172 | + Container( | ||
| 173 | + padding: EdgeInsets.symmetric( | ||
| 174 | + horizontal: ScreenUtil().setWidth(16), | ||
| 175 | + vertical: ScreenUtil().setWidth(14)), | ||
| 176 | + decoration: BoxDecoration( | ||
| 177 | + color: MyColours.color_ffffff, | ||
| 178 | + borderRadius: BorderRadius.only( | ||
| 179 | + bottomLeft: Radius.circular(ScreenUtil().radius(10)), | ||
| 180 | + bottomRight: Radius.circular(ScreenUtil().radius(10)), | ||
| 181 | + ), | ||
| 182 | + ), | ||
| 183 | + child: Column( | ||
| 184 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 185 | + children: [ | ||
| 186 | + Wrap( | ||
| 187 | + children: [ | ||
| 188 | + Text( | ||
| 189 | + '[定金2000]', | ||
| 190 | + style: TextStyle( | ||
| 191 | + color: true | ||
| 192 | + ? MyColours.color_00A870 | ||
| 193 | + : MyColours.color_E34D59, | ||
| 194 | + fontSize: ScreenUtil().setSp(28)), | ||
| 195 | + ), | ||
| 196 | + ], | ||
| 197 | + ), | ||
| 198 | + VEmptyView(5), | ||
| 199 | + Row( | ||
| 200 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 201 | + children: [ | ||
| 202 | + Text( | ||
| 203 | + '方先生 负责人:刘经理', | ||
| 204 | + style: TextStyle( | ||
| 205 | + fontWeight: FontWeight.bold, | ||
| 206 | + color: MyColours.color_000000, | ||
| 207 | + fontSize: ScreenUtil().setSp(28)), | ||
| 208 | + ), | ||
| 209 | + RoundButton( | ||
| 210 | + onPressed: () async { | ||
| 211 | + _showCancelWidget(context); | ||
| 212 | + }, | ||
| 213 | + text: '退定金', | ||
| 214 | + fontSize: 28, | ||
| 215 | + isBold: false, | ||
| 216 | + height: h(28), | ||
| 217 | + width: w(58), | ||
| 218 | + // margin: EdgeInsets.only(top: w(18), bottom: w(4)), | ||
| 219 | + textColor: MyColours.color_F6F6F6, | ||
| 220 | + gradientStart: MyColours.color_E34D59, | ||
| 221 | + gradientEnd: MyColours.color_E34D59, | ||
| 222 | + borderColor: MyColours.color_E34D59, | ||
| 223 | + radius: r(4), | ||
| 224 | + ), | ||
| 225 | + ], | ||
| 226 | + ) | ||
| 227 | + ], | ||
| 228 | + ), | ||
| 229 | + ) | ||
| 230 | + ], | ||
| 231 | + ), | ||
| 232 | + ); | ||
| 233 | + } | ||
| 234 | + | ||
| 235 | + ///取消预订弹框 | ||
| 236 | + _showCancelWidget(context) { | ||
| 237 | + ScrollController _scrollController = ScrollController(); | ||
| 238 | + TextEditingController _cancelController = TextEditingController(); | ||
| 239 | + FocusNode _cancelNode = FocusNode(); | ||
| 240 | + | ||
| 241 | + bool showPerson = true; | ||
| 242 | + bool showType = true; | ||
| 243 | + String person = '请选择'; | ||
| 244 | + String type = '请选择'; | ||
| 245 | + showGeneralDialog( | ||
| 246 | + context: context, | ||
| 247 | + barrierDismissible: false, | ||
| 248 | + barrierLabel: | ||
| 249 | + MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 250 | + transitionDuration: const Duration(milliseconds: 150), | ||
| 251 | + barrierColor: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 252 | + pageBuilder: (BuildContext context, Animation animation, | ||
| 253 | + Animation secondaryAnimation) { | ||
| 254 | + return Scaffold( | ||
| 255 | + backgroundColor: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 256 | + body: StatefulBuilder(builder: (context, state) { | ||
| 257 | + // _cancelState = state; | ||
| 258 | + return GestureDetector( | ||
| 259 | + behavior: HitTestBehavior.opaque, | ||
| 260 | + // onTap: () { | ||
| 261 | + // Navigator.of(context).pop(); | ||
| 262 | + // }, | ||
| 263 | + child: Center( | ||
| 264 | + child: Stack(children: [ | ||
| 265 | + Container( | ||
| 266 | + margin: EdgeInsets.symmetric( | ||
| 267 | + horizontal: ScreenUtil().setWidth(28 * 2)), | ||
| 268 | + decoration: BoxDecoration( | ||
| 269 | + color: Colors.white, | ||
| 270 | + borderRadius: BorderRadius.circular( | ||
| 271 | + ScreenUtil().setWidth(10)), | ||
| 272 | + ), | ||
| 273 | + height: ScreenUtil().setWidth(355 * 2 + 90), | ||
| 274 | + child: Column( | ||
| 275 | + // mainAxisSize: MainAxisSize.min, | ||
| 276 | + children: [ | ||
| 277 | + // Stack( | ||
| 278 | + // children: [ | ||
| 279 | + VEmptyView(48), | ||
| 280 | + Container( | ||
| 281 | + height: ScreenUtil().setWidth(48), | ||
| 282 | + child: Text( | ||
| 283 | + '退定金', | ||
| 284 | + style: TextStyle( | ||
| 285 | + fontSize: ScreenUtil().setSp(32), | ||
| 286 | + fontWeight: FontWeight.bold, | ||
| 287 | + decoration: TextDecoration.none, | ||
| 288 | + color: Color.fromRGBO(0, 0, 0, 0.9)), | ||
| 289 | + ), | ||
| 290 | + ), | ||
| 291 | + | ||
| 292 | + _textfield('退款金额', '请输入', null, null, '元'), | ||
| 293 | + _selectWidget('操作人', person, onTap: () { | ||
| 294 | + state(() { | ||
| 295 | + showType = true; | ||
| 296 | + showPerson = !showPerson; | ||
| 297 | + }); | ||
| 298 | + }), | ||
| 299 | + _selectWidget('退款方式', type, onTap: () { | ||
| 300 | + state(() { | ||
| 301 | + showPerson = true; | ||
| 302 | + showType = !showType; | ||
| 303 | + }); | ||
| 304 | + }), | ||
| 305 | + _textfield('收款人', '请输入', null, null, '', | ||
| 306 | + inputType: TextInputType.text), | ||
| 307 | + VEmptyView(24), | ||
| 308 | + Container( | ||
| 309 | + decoration: BoxDecoration( | ||
| 310 | + color: Color.fromRGBO(240, 240, 240, 1), | ||
| 311 | + borderRadius: BorderRadius.circular( | ||
| 312 | + ScreenUtil().setWidth(8))), | ||
| 313 | + // height: ScreenUtil().setWidth(42 * 2), | ||
| 314 | + margin: EdgeInsets.symmetric(horizontal: w(12)), | ||
| 315 | + padding: EdgeInsets.symmetric( | ||
| 316 | + horizontal: ScreenUtil().setWidth(16)), | ||
| 317 | + child: TextField( | ||
| 318 | + maxLines: 1, | ||
| 319 | + controller: _cancelController, | ||
| 320 | + focusNode: _cancelNode, | ||
| 321 | + style: TextStyle( | ||
| 322 | + textBaseline: TextBaseline.alphabetic), | ||
| 323 | + textAlignVertical: TextAlignVertical.center, | ||
| 324 | + decoration: InputDecoration( | ||
| 325 | + contentPadding: EdgeInsets.zero, | ||
| 326 | + hintText: "备注", | ||
| 327 | + // focusColor: Color.fromRGBO(0, 0, 0, 0.4), | ||
| 328 | + hintStyle: TextStyle( | ||
| 329 | + color: Color.fromRGBO(0, 0, 0, 0.4), | ||
| 330 | + fontSize: ScreenUtil().setSp(32), | ||
| 331 | + ), | ||
| 332 | + enabledBorder: OutlineInputBorder( | ||
| 333 | + borderSide: BorderSide( | ||
| 334 | + width: 0, | ||
| 335 | + color: Colors.transparent)), | ||
| 336 | + border: OutlineInputBorder( | ||
| 337 | + borderSide: BorderSide( | ||
| 338 | + width: 0, | ||
| 339 | + color: Colors.transparent)), | ||
| 340 | + focusedBorder: OutlineInputBorder( | ||
| 341 | + borderSide: BorderSide( | ||
| 342 | + width: 0, | ||
| 343 | + color: Colors.transparent)), | ||
| 344 | + ), | ||
| 345 | + | ||
| 346 | + // border: InputBorder.none, | ||
| 347 | + | ||
| 348 | + onChanged: (_) { | ||
| 349 | + setState(() {}); | ||
| 350 | + }, | ||
| 351 | + onEditingComplete: () { | ||
| 352 | + print('fff'); | ||
| 353 | + _cancelNode.unfocus(); | ||
| 354 | + }, | ||
| 355 | + // keyboardType: TextInputType.number, | ||
| 356 | + ), | ||
| 357 | + ), | ||
| 358 | + VEmptyView(40), | ||
| 359 | + MyDivider( | ||
| 360 | + double.infinity, ScreenUtil().setWidth(2), | ||
| 361 | + color: MyColours.color_f3f3f3), | ||
| 362 | + Row( | ||
| 363 | + // mainAxisAlignment: | ||
| 364 | + // MainAxisAlignment.spaceBetween, | ||
| 365 | + children: [ | ||
| 366 | + RoundButton( | ||
| 367 | + text: '取消', | ||
| 368 | + width: (ScreenUtil().screenWidth - | ||
| 369 | + ScreenUtil().setWidth(62) * 2) / | ||
| 370 | + 2, | ||
| 371 | + height: ScreenUtil().setWidth(112), | ||
| 372 | + // radius: ScreenUtil().setWidth(10), | ||
| 373 | + gradientStart: Colors.transparent, | ||
| 374 | + gradientEnd: Colors.transparent, | ||
| 375 | + textColor: MyColours.color_E6000000, | ||
| 376 | + isBold: false, | ||
| 377 | + fontSize: 32, | ||
| 378 | + onPressed: () { | ||
| 379 | + Navigator.pop(context); | ||
| 380 | + }), | ||
| 381 | + MyDivider(ScreenUtil().setWidth(2), | ||
| 382 | + ScreenUtil().setWidth(112), | ||
| 383 | + color: MyColours.color_f3f3f3), | ||
| 384 | + RoundButton( | ||
| 385 | + text: '确定退款', | ||
| 386 | + width: (ScreenUtil().screenWidth - | ||
| 387 | + ScreenUtil().setWidth(62) * 2) / | ||
| 388 | + 2, | ||
| 389 | + height: ScreenUtil().setWidth(112), | ||
| 390 | + // radius: ScreenUtil().setWidth(10), | ||
| 391 | + gradientStart: Colors.transparent, | ||
| 392 | + gradientEnd: Colors.transparent, | ||
| 393 | + textColor: MyColours.color_E34D59, | ||
| 394 | + fontSize: 32, | ||
| 395 | + isBold: true, | ||
| 396 | + onPressed: () { | ||
| 397 | + Navigator.of(context).pop(); | ||
| 398 | + Loading.showLoading(context); | ||
| 399 | + | ||
| 400 | + // setReserveStatus('4', desc: desc); | ||
| 401 | + }), | ||
| 402 | + ]) | ||
| 403 | + ], | ||
| 404 | + ), | ||
| 405 | + ), | ||
| 406 | + Positioned( | ||
| 407 | + left: ScreenUtil().setWidth(320), | ||
| 408 | + top: ScreenUtil().setWidth(150 * 2), | ||
| 409 | + child: Offstage( | ||
| 410 | + offstage: showPerson, | ||
| 411 | + child: Material( | ||
| 412 | + color: Colors.transparent, | ||
| 413 | + child: selectWidgetTableManage( | ||
| 414 | + ['dffd', 'fdf'], (index) { | ||
| 415 | + state(() { | ||
| 416 | + showPerson = !showPerson; | ||
| 417 | + person = ['dffd', 'fdf'][index]; | ||
| 418 | + }); | ||
| 419 | + }), | ||
| 420 | + ))), | ||
| 421 | + Positioned( | ||
| 422 | + left: ScreenUtil().setWidth(320), | ||
| 423 | + top: ScreenUtil().setWidth(200 * 2), | ||
| 424 | + child: Offstage( | ||
| 425 | + offstage: showType, | ||
| 426 | + child: Material( | ||
| 427 | + color: Colors.transparent, | ||
| 428 | + child: selectWidgetTableManage([ | ||
| 429 | + 'dffd', | ||
| 430 | + 'fdf', | ||
| 431 | + 'dffd', | ||
| 432 | + 'fdf', | ||
| 433 | + 'dffd', | ||
| 434 | + 'fdf' | ||
| 435 | + ], (index) { | ||
| 436 | + state(() { | ||
| 437 | + showType = !showType; | ||
| 438 | + type = [ | ||
| 439 | + 'dffd', | ||
| 440 | + 'fdf', | ||
| 441 | + 'dffd', | ||
| 442 | + 'fdf', | ||
| 443 | + 'dffd', | ||
| 444 | + 'fdf' | ||
| 445 | + ][index]; | ||
| 446 | + }); | ||
| 447 | + }), | ||
| 448 | + ))), | ||
| 449 | + ]), | ||
| 450 | + )); | ||
| 451 | + })); | ||
| 452 | + }); | ||
| 453 | + } | ||
| 454 | + | ||
| 455 | + Widget _selectWidget(String title, String labelShow, | ||
| 456 | + {GestureTapCallback onTap, bool need = true}) { | ||
| 457 | + return InkWell( | ||
| 458 | + onTap: onTap, | ||
| 459 | + child: Container( | ||
| 460 | + // height: ScreenUtil().setWidth(60), | ||
| 461 | + margin: EdgeInsets.symmetric(horizontal: w(12)), | ||
| 462 | + padding: EdgeInsets.only( | ||
| 463 | + left: w(16), right: w(8), top: w(12), bottom: h(8)), | ||
| 464 | + decoration: BoxDecoration( | ||
| 465 | + border: Border( | ||
| 466 | + bottom: BorderSide( | ||
| 467 | + width: ScreenUtil().setWidth(2), | ||
| 468 | + color: MyColours.color_DBDBDB))), | ||
| 469 | + child: Row( | ||
| 470 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 471 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 472 | + children: [ | ||
| 473 | + Container( | ||
| 474 | + width: w(80), | ||
| 475 | + child: RichText( | ||
| 476 | + textScaleFactor: 1, | ||
| 477 | + overflow: TextOverflow.ellipsis, | ||
| 478 | + // textDirection: TextDirection.ltr, | ||
| 479 | + | ||
| 480 | + text: TextSpan( | ||
| 481 | + children: [ | ||
| 482 | + TextSpan( | ||
| 483 | + text: title, | ||
| 484 | + style: TextStyle( | ||
| 485 | + color: MyColours.color_515151, | ||
| 486 | + fontSize: ScreenUtil().setSp(28)), | ||
| 487 | + recognizer: TapGestureRecognizer() | ||
| 488 | + ..onTap = () {}), | ||
| 489 | + TextSpan( | ||
| 490 | + text: need ? '*' : '', | ||
| 491 | + style: TextStyle( | ||
| 492 | + color: MyColours.color_E34D59, | ||
| 493 | + fontSize: ScreenUtil().setSp(28)), | ||
| 494 | + //点击事件 | ||
| 495 | + recognizer: TapGestureRecognizer() | ||
| 496 | + ..onTap = () {}), | ||
| 497 | + ], | ||
| 498 | + ))), | ||
| 499 | + HEmptyView(48), | ||
| 500 | + Expanded( | ||
| 501 | + child: Text( | ||
| 502 | + labelShow, | ||
| 503 | + overflow: TextOverflow.ellipsis, | ||
| 504 | + style: TextStyle( | ||
| 505 | + color: labelShow == '请选择' | ||
| 506 | + ? MyColours.color_999999 | ||
| 507 | + : MyColours.color_515151, | ||
| 508 | + fontSize: ScreenUtil().setSp(28), | ||
| 509 | + ), | ||
| 510 | + )), | ||
| 511 | + HEmptyView(10), | ||
| 512 | + Image.asset( | ||
| 513 | + Utils.getImgPath('f_arrow_down'), | ||
| 514 | + width: ScreenUtil().setWidth(32 * 2), | ||
| 515 | + // height: ScreenUtil().setWidth(10), | ||
| 516 | + ) | ||
| 517 | + ], | ||
| 518 | + ), | ||
| 519 | + )); | ||
| 520 | + } | ||
| 521 | + | ||
| 522 | + ///请输入 | ||
| 523 | + ///输入框 | ||
| 524 | + Widget _textfield( | ||
| 525 | + String title, | ||
| 526 | + String hintText, | ||
| 527 | + TextEditingController editingController, | ||
| 528 | + FocusNode focusNode, | ||
| 529 | + String subTitle, | ||
| 530 | + {TextInputType inputType = TextInputType.number}) { | ||
| 531 | + return Container( | ||
| 532 | + margin: EdgeInsets.symmetric(horizontal: w(12)), | ||
| 533 | + padding: | ||
| 534 | + EdgeInsets.only(left: w(16), right: w(8), top: w(12), bottom: h(8)), | ||
| 535 | + decoration: BoxDecoration( | ||
| 536 | + border: Border( | ||
| 537 | + bottom: BorderSide( | ||
| 538 | + width: ScreenUtil().setWidth(2), | ||
| 539 | + color: MyColours.color_DBDBDB))), | ||
| 540 | + child: Row( | ||
| 541 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 542 | + children: [ | ||
| 543 | + Container( | ||
| 544 | + width: w(80), | ||
| 545 | + child: RichText( | ||
| 546 | + textScaleFactor: 1, | ||
| 547 | + overflow: TextOverflow.ellipsis, | ||
| 548 | + // textDirection: TextDirection.ltr, | ||
| 549 | + | ||
| 550 | + text: TextSpan( | ||
| 551 | + children: [ | ||
| 552 | + TextSpan( | ||
| 553 | + text: title, | ||
| 554 | + style: TextStyle( | ||
| 555 | + color: MyColours.color_515151, | ||
| 556 | + fontSize: ScreenUtil().setSp(28)), | ||
| 557 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 558 | + TextSpan( | ||
| 559 | + text: '*', | ||
| 560 | + style: TextStyle( | ||
| 561 | + color: MyColours.color_E34D59, | ||
| 562 | + fontSize: ScreenUtil().setSp(28)), | ||
| 563 | + //点击事件 | ||
| 564 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 565 | + ], | ||
| 566 | + ))), | ||
| 567 | + HEmptyView(48), | ||
| 568 | + Expanded( | ||
| 569 | + child: Container( | ||
| 570 | + // decoration: BoxDecoration( | ||
| 571 | + // border: Border( | ||
| 572 | + // bottom: BorderSide( | ||
| 573 | + // width: h(1), color: MyColours.color_DBDBDB))), | ||
| 574 | + child: Row( | ||
| 575 | + children: [ | ||
| 576 | + Expanded( | ||
| 577 | + child: Container( | ||
| 578 | + // height: ScreenUtil().setHeight(120), | ||
| 579 | + height: ScreenUtil().setWidth(64), | ||
| 580 | + child: TextField( | ||
| 581 | + controller: editingController, | ||
| 582 | + // textAlign: TextAlign.right, | ||
| 583 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 584 | + maxLines: 1, | ||
| 585 | + inputFormatters: [], | ||
| 586 | + | ||
| 587 | + // //光标颜色 | ||
| 588 | + // cursorColor: | ||
| 589 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 590 | + //输入文本的样式 | ||
| 591 | + style: TextStyle( | ||
| 592 | + fontSize: ScreenUtil().setSp(28), | ||
| 593 | + ), | ||
| 594 | + focusNode: focusNode, | ||
| 595 | + decoration: InputDecoration( | ||
| 596 | + border: | ||
| 597 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 598 | + hintText: hintText, | ||
| 599 | + hintStyle: TextStyle( | ||
| 600 | + color: hintText == '请输入' | ||
| 601 | + ? MyColours.color_999999 | ||
| 602 | + : MyColours.color_515151, | ||
| 603 | + fontSize: ScreenUtil().setSp(28), | ||
| 604 | + ), | ||
| 605 | + contentPadding: EdgeInsets.zero, | ||
| 606 | + ), | ||
| 607 | + onChanged: (value) {}, | ||
| 608 | + onEditingComplete: () { | ||
| 609 | + FocusScope.of(context) | ||
| 610 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 611 | + }, | ||
| 612 | + keyboardType: inputType, | ||
| 613 | + )), | ||
| 614 | + ), | ||
| 615 | + Container( | ||
| 616 | + child: Text( | ||
| 617 | + subTitle, | ||
| 618 | + style: TextStyle( | ||
| 619 | + color: MyColours.color_515151, | ||
| 620 | + fontSize: ScreenUtil().setSp(28)), | ||
| 621 | + ), | ||
| 622 | + ), | ||
| 623 | + ], | ||
| 624 | + ), | ||
| 625 | + )) | ||
| 626 | + ], | ||
| 627 | + ), | ||
| 628 | + ); | ||
| 629 | + } | ||
| 630 | + | ||
| 631 | + selectWidgetTableManage(List<String> data, CustomCallBack onTap) { | ||
| 632 | + return Container( | ||
| 633 | + decoration: BoxDecoration( | ||
| 634 | + color: MyColours.color_ffffff, | ||
| 635 | + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 636 | + border: Border.all( | ||
| 637 | + color: MyColours.color_cccccc, | ||
| 638 | + width: ScreenUtil().setWidth(2))), | ||
| 639 | + width: ScreenUtil().setWidth(320), | ||
| 640 | + constraints: BoxConstraints( | ||
| 641 | + maxHeight: ScreenUtil().setWidth(140 * 2), | ||
| 642 | + ), | ||
| 643 | + child: ListView.builder( | ||
| 644 | + padding: | ||
| 645 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)), | ||
| 646 | + itemCount: data.length, | ||
| 647 | + itemBuilder: (context, index) { | ||
| 648 | + return InkWell( | ||
| 649 | + onTap: () { | ||
| 650 | + onTap(index); | ||
| 651 | + }, | ||
| 652 | + child: Container( | ||
| 653 | + padding: EdgeInsets.all(ScreenUtil().setWidth(20)), | ||
| 654 | + decoration: BoxDecoration( | ||
| 655 | + border: Border( | ||
| 656 | + bottom: BorderSide( | ||
| 657 | + color: MyColours.color_efefef, | ||
| 658 | + width: ScreenUtil().setWidth(2)))), | ||
| 659 | + child: Text(data[index], | ||
| 660 | + style: TextStyle( | ||
| 661 | + color: MyColours.color_199095, | ||
| 662 | + fontSize: ScreenUtil().setSp(28))), | ||
| 663 | + ), | ||
| 664 | + ); | ||
| 665 | + })); | ||
| 666 | + } | ||
| 667 | + | ||
| 668 | + Widget _callButton( | ||
| 669 | + {GestureTapCallback onPress, | ||
| 670 | + content, | ||
| 671 | + hasLeftBorder = true, | ||
| 672 | + isSelect = false}) { | ||
| 673 | + return InkWell( | ||
| 674 | + onTap: onPress, | ||
| 675 | + child: Container( | ||
| 676 | + height: h(48), | ||
| 677 | + decoration: BoxDecoration( | ||
| 678 | + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff, | ||
| 679 | + border: Border( | ||
| 680 | + bottom: BorderSide( | ||
| 681 | + color: MyColours.color_438E93, | ||
| 682 | + width: ScreenUtil().setWidth(2)), | ||
| 683 | + top: BorderSide( | ||
| 684 | + color: MyColours.color_438E93, | ||
| 685 | + width: ScreenUtil().setWidth(2)), | ||
| 686 | + left: hasLeftBorder | ||
| 687 | + ? BorderSide( | ||
| 688 | + color: MyColours.color_438E93, | ||
| 689 | + width: ScreenUtil().setWidth(2)) | ||
| 690 | + : BorderSide.none, | ||
| 691 | + right: BorderSide( | ||
| 692 | + color: MyColours.color_438E93, | ||
| 693 | + width: ScreenUtil().setWidth(2)))), | ||
| 694 | + child: Align( | ||
| 695 | + alignment: Alignment.center, | ||
| 696 | + child: Text( | ||
| 697 | + content, | ||
| 698 | + style: TextStyle( | ||
| 699 | + color: | ||
| 700 | + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93, | ||
| 701 | + fontSize: ScreenUtil().setSp(36)), | ||
| 702 | + ), | ||
| 703 | + ), | ||
| 704 | + ), | ||
| 705 | + ); | ||
| 706 | + } | ||
| 707 | + | ||
| 708 | + @override | ||
| 709 | + Widget build(BuildContext context) { | ||
| 710 | + feastModel = Provider.of<FeastModel>(context); | ||
| 711 | + feastModel.pageStateDepositData = PageState.Success; | ||
| 712 | + return Scaffold( | ||
| 713 | + backgroundColor: MyColours.color_ffffff, | ||
| 714 | + appBar: SystemAppBar( | ||
| 715 | + '定金管理', | ||
| 716 | + needWhite: true, | ||
| 717 | + bgColor: MyColours.color_438E93, | ||
| 718 | + titleColor: MyColours.color_ffffff, | ||
| 719 | + onTap: () { | ||
| 720 | + Navigator.pop(context); | ||
| 721 | + }, | ||
| 722 | + ), | ||
| 723 | + body: Column( | ||
| 724 | + children: [ | ||
| 725 | + Expanded( | ||
| 726 | + child: NestedScrollView( | ||
| 727 | + // controller: _scrollViewController, | ||
| 728 | + headerSliverBuilder: | ||
| 729 | + (BuildContext context, bool innerBoxIsScrolled) { | ||
| 730 | + return <Widget>[ | ||
| 731 | + SliverAppBar( | ||
| 732 | + pinned: true, | ||
| 733 | + floating: false, | ||
| 734 | + leading: null, | ||
| 735 | + backgroundColor: MyColours.color_ffffff, | ||
| 736 | + // expandedHeight: ScreenUtil().setWidth(128 * 2), | ||
| 737 | + automaticallyImplyLeading: false, | ||
| 738 | + toolbarHeight: ScreenUtil().setWidth(64 * 2), | ||
| 739 | + title: buildFeastTypeHeader(), | ||
| 740 | + // flexibleSpace: FlexibleSpaceBar( | ||
| 741 | + // collapseMode: CollapseMode.pin, | ||
| 742 | + // title: buildFeastTypeHeader()) | ||
| 743 | + ) | ||
| 744 | + ]; | ||
| 745 | + }, body: Consumer<FeastModel>(builder: (context, model, _) { | ||
| 746 | + if (model.pageStateDepositData != PageState.Success) { | ||
| 747 | + return ExceptionPage( | ||
| 748 | + pageState: model.pageStateDepositData, | ||
| 749 | + callback: () { | ||
| 750 | + // _getWine(); | ||
| 751 | + }, | ||
| 752 | + emptyMsg: "暂时没有定金数据哦", | ||
| 753 | + emptyImg: "empty_search", | ||
| 754 | + showMsg: "加载中,请稍后...", | ||
| 755 | + ); | ||
| 756 | + } else { | ||
| 757 | + return ListView.builder( | ||
| 758 | + itemCount: 100, | ||
| 759 | + padding: | ||
| 760 | + EdgeInsets.only(left: w(12), top: w(19), right: w(12)), | ||
| 761 | + itemBuilder: (BuildContext context, int index) { | ||
| 762 | + // WineSunModel data = feastModel.wineData[index]; | ||
| 763 | + return buildFeastTypeItem(); | ||
| 764 | + // '剑南春52度500ml', '1150元/份 不可议价' | ||
| 765 | + }); | ||
| 766 | + } | ||
| 767 | + }))), | ||
| 768 | + Row( | ||
| 769 | + children: [ | ||
| 770 | + Expanded( | ||
| 771 | + child: _callButton( | ||
| 772 | + onPress: () { | ||
| 773 | + Navigator.pop(context); | ||
| 774 | + }, | ||
| 775 | + content: '回到今天', | ||
| 776 | + hasLeftBorder: true, | ||
| 777 | + isSelect: false)), | ||
| 778 | + Expanded( | ||
| 779 | + child: _callButton( | ||
| 780 | + onPress: () {}, | ||
| 781 | + content: '创建宴会', | ||
| 782 | + hasLeftBorder: true, | ||
| 783 | + isSelect: true)) | ||
| 784 | + ], | ||
| 785 | + ) | ||
| 786 | + ], | ||
| 787 | + )); | ||
| 788 | + } | ||
| 789 | +} |
lib/pages/feast/feast_followup_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/res/colors.dart'; | ||
| 4 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 5 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 6 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 7 | +import 'package:provider/provider.dart'; | ||
| 8 | + | ||
| 9 | +import '../../constant/state.dart'; | ||
| 10 | +import '../../provider/feast_model.dart'; | ||
| 11 | +import '../../utils/screen_util.dart'; | ||
| 12 | +import '../../utils/utils.dart'; | ||
| 13 | +import '../../widgets/MyDivider.dart'; | ||
| 14 | +import '../../widgets/loading.dart'; | ||
| 15 | +import '../../widgets/page_exception.dart'; | ||
| 16 | +import '../../widgets/round_button.dart'; | ||
| 17 | +import '../../widgets/system_app_bar.dart'; | ||
| 18 | + | ||
| 19 | +class FeastFollowUpPage extends StatefulWidget { | ||
| 20 | + FeastFollowUpPage({Key key}) : super(key: key); | ||
| 21 | + | ||
| 22 | + @override | ||
| 23 | + _FeastFollowUpPageState createState() => _FeastFollowUpPageState(); | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +class _FeastFollowUpPageState extends State<FeastFollowUpPage> { | ||
| 27 | + FeastModel feastModel; | ||
| 28 | + DateTime dateTimeStart; | ||
| 29 | + DateTime dateTimeEnd; | ||
| 30 | + String start = '请选择'; | ||
| 31 | + String end = '请选择'; | ||
| 32 | + bool isFeastTime = false; | ||
| 33 | + @override | ||
| 34 | + void initState() { | ||
| 35 | + super.initState(); | ||
| 36 | + dateTimeStart = DateTime.now(); | ||
| 37 | + start = createDateText(context, dateTimeStart); | ||
| 38 | + dateTimeEnd = DateTime.now(); | ||
| 39 | + end = createDateText(context, dateTimeEnd); | ||
| 40 | + Utils.changeStatusColor(color: MyColours.color_438E93); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + //生成日期文本 | ||
| 44 | + createDateText(BuildContext context, DateTime day) { | ||
| 45 | + // if (Utils.isOneDay(day, dateTime)) return; //日期没变 | ||
| 46 | + String ymd = "${day.year}-" + | ||
| 47 | + Utils.addZeroNumber(day.month) + | ||
| 48 | + "-" + | ||
| 49 | + Utils.addZeroNumber(day.day); | ||
| 50 | + // ymd += " (周${Utils.formatWeekDayNum(day.weekday)} "; | ||
| 51 | + // ymd += Utils.lunarCalendarHolidays(day); | ||
| 52 | + // ymd += ')'; | ||
| 53 | + return ymd; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + Widget buildFeastTypeHeader() { | ||
| 57 | + return Container( | ||
| 58 | + width: double.infinity, | ||
| 59 | + height: h(88), | ||
| 60 | + | ||
| 61 | + // decoration: BoxDecoration( | ||
| 62 | + // color: MyColours.color_F8F9FD, | ||
| 63 | + // border: Border( | ||
| 64 | + // bottom: BorderSide(width: w(1), color: MyColours.color_DBDBDB))), | ||
| 65 | + child: Column( | ||
| 66 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 67 | + children: [ | ||
| 68 | + Row( | ||
| 69 | + children: [ | ||
| 70 | + InkWell( | ||
| 71 | + onTap: () { | ||
| 72 | + if (!isFeastTime) { | ||
| 73 | + return; | ||
| 74 | + } | ||
| 75 | + setState(() { | ||
| 76 | + isFeastTime = !isFeastTime; | ||
| 77 | + }); | ||
| 78 | + }, | ||
| 79 | + child: Row( | ||
| 80 | + children: [ | ||
| 81 | + Image.asset( | ||
| 82 | + Utils.getImgPath( | ||
| 83 | + !isFeastTime ? 'base_radio_sel' : 'base_radio_un'), | ||
| 84 | + width: w(24), | ||
| 85 | + ), | ||
| 86 | + HEmptyView(8), | ||
| 87 | + Text( | ||
| 88 | + '创建时间', | ||
| 89 | + style: TextStyle( | ||
| 90 | + fontSize: font(14), | ||
| 91 | + color: !isFeastTime | ||
| 92 | + ? MyColours.color_438E93 | ||
| 93 | + : MyColours.color_999999), | ||
| 94 | + ) | ||
| 95 | + ], | ||
| 96 | + ), | ||
| 97 | + ), | ||
| 98 | + HEmptyView(16), | ||
| 99 | + InkWell( | ||
| 100 | + onTap: () { | ||
| 101 | + if (isFeastTime) { | ||
| 102 | + return; | ||
| 103 | + } | ||
| 104 | + setState(() { | ||
| 105 | + isFeastTime = !isFeastTime; | ||
| 106 | + }); | ||
| 107 | + }, | ||
| 108 | + child: Row( | ||
| 109 | + children: [ | ||
| 110 | + Image.asset( | ||
| 111 | + Utils.getImgPath( | ||
| 112 | + isFeastTime ? 'base_radio_sel' : 'base_radio_un'), | ||
| 113 | + width: w(24), | ||
| 114 | + ), | ||
| 115 | + HEmptyView(8), | ||
| 116 | + Text( | ||
| 117 | + '宴会时间', | ||
| 118 | + style: TextStyle( | ||
| 119 | + fontSize: font(14), | ||
| 120 | + color: isFeastTime | ||
| 121 | + ? MyColours.color_438E93 | ||
| 122 | + : MyColours.color_999999), | ||
| 123 | + ) | ||
| 124 | + ], | ||
| 125 | + ), | ||
| 126 | + ), | ||
| 127 | + Spacer(), | ||
| 128 | + RoundButton( | ||
| 129 | + onPressed: () async {}, | ||
| 130 | + text: '搜索', | ||
| 131 | + fontSize: 28, | ||
| 132 | + isBold: false, | ||
| 133 | + height: h(28), | ||
| 134 | + width: w(36), | ||
| 135 | + // margin: EdgeInsets.only(top: w(18), bottom: w(4)), | ||
| 136 | + textColor: MyColours.color_F6F6F6, | ||
| 137 | + gradientStart: MyColours.color_438E93, | ||
| 138 | + gradientEnd: MyColours.color_438E93, | ||
| 139 | + borderColor: MyColours.color_438E93, | ||
| 140 | + radius: r(4), | ||
| 141 | + ), | ||
| 142 | + ], | ||
| 143 | + ), | ||
| 144 | + VEmptyView(20), | ||
| 145 | + Row( | ||
| 146 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 147 | + children: [ | ||
| 148 | + InkWell( | ||
| 149 | + onTap: () { | ||
| 150 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 151 | + DialogUtil.showCalendarDialog(context, dateTimeStart) | ||
| 152 | + .then((day) async { | ||
| 153 | + if (day != null) { | ||
| 154 | + dateTimeStart = day; | ||
| 155 | + start = createDateText(context, day); | ||
| 156 | + setState(() {}); | ||
| 157 | + } | ||
| 158 | + }); | ||
| 159 | + }, | ||
| 160 | + child: Row( | ||
| 161 | + children: [ | ||
| 162 | + Text( | ||
| 163 | + start, | ||
| 164 | + style: TextStyle( | ||
| 165 | + fontSize: font(18), | ||
| 166 | + color: start == '请选择' | ||
| 167 | + ? MyColours.color_999999 | ||
| 168 | + : MyColours.color_515151), | ||
| 169 | + ), | ||
| 170 | + HEmptyView(8), | ||
| 171 | + Image.asset( | ||
| 172 | + Utils.getImgPath('f_arrow_down'), | ||
| 173 | + width: w(24), | ||
| 174 | + ) | ||
| 175 | + ], | ||
| 176 | + )), | ||
| 177 | + Text( | ||
| 178 | + '至', | ||
| 179 | + style: TextStyle( | ||
| 180 | + fontSize: font(20), color: MyColours.color_515151), | ||
| 181 | + ), | ||
| 182 | + InkWell( | ||
| 183 | + onTap: () { | ||
| 184 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 185 | + DialogUtil.showCalendarDialog(context, dateTimeEnd) | ||
| 186 | + .then((day) async { | ||
| 187 | + if (day != null) { | ||
| 188 | + dateTimeEnd = day; | ||
| 189 | + end = createDateText(context, day); | ||
| 190 | + setState(() {}); | ||
| 191 | + } | ||
| 192 | + }); | ||
| 193 | + }, | ||
| 194 | + child: Row( | ||
| 195 | + children: [ | ||
| 196 | + Text( | ||
| 197 | + end, | ||
| 198 | + style: TextStyle( | ||
| 199 | + fontWeight: FontWeight.bold, | ||
| 200 | + fontSize: font(18), | ||
| 201 | + color: end == '请选择' | ||
| 202 | + ? MyColours.color_999999 | ||
| 203 | + : MyColours.color_515151), | ||
| 204 | + ), | ||
| 205 | + HEmptyView(8), | ||
| 206 | + Image.asset( | ||
| 207 | + Utils.getImgPath('f_arrow_down'), | ||
| 208 | + width: w(24), | ||
| 209 | + ), | ||
| 210 | + ], | ||
| 211 | + )) | ||
| 212 | + ], | ||
| 213 | + ) | ||
| 214 | + ], | ||
| 215 | + ), | ||
| 216 | + ); | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + Widget buildFeastTypeItem() { | ||
| 220 | + return Container( | ||
| 221 | + margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(36)), | ||
| 222 | + decoration: BoxDecoration( | ||
| 223 | + border: Border.all( | ||
| 224 | + color: MyColours.color_f3f3f3, width: ScreenUtil().setWidth(2)), | ||
| 225 | + boxShadow: [ | ||
| 226 | + BoxShadow( | ||
| 227 | + color: MyColours.color_1F000000, | ||
| 228 | + offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 229 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 230 | + ], | ||
| 231 | + borderRadius: BorderRadius.circular(ScreenUtil().radius(10))), | ||
| 232 | + child: Column( | ||
| 233 | + children: [ | ||
| 234 | + Container( | ||
| 235 | + padding: EdgeInsets.symmetric( | ||
| 236 | + horizontal: ScreenUtil().setWidth(16), | ||
| 237 | + vertical: ScreenUtil().setWidth(8)), | ||
| 238 | + decoration: BoxDecoration( | ||
| 239 | + color: MyColours.color_438E93, | ||
| 240 | + borderRadius: BorderRadius.only( | ||
| 241 | + topLeft: Radius.circular(ScreenUtil().radius(10)), | ||
| 242 | + topRight: Radius.circular(ScreenUtil().radius(10)), | ||
| 243 | + ), | ||
| 244 | + ), | ||
| 245 | + child: Row( | ||
| 246 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 247 | + children: [ | ||
| 248 | + Text( | ||
| 249 | + '8月1日 午餐', | ||
| 250 | + style: TextStyle( | ||
| 251 | + fontWeight: FontWeight.bold, | ||
| 252 | + color: MyColours.color_F6F6F6, | ||
| 253 | + fontSize: ScreenUtil().setSp(40)), | ||
| 254 | + ), | ||
| 255 | + Text( | ||
| 256 | + '婚宴', | ||
| 257 | + style: TextStyle( | ||
| 258 | + fontWeight: FontWeight.bold, | ||
| 259 | + color: MyColours.color_F6F6F6, | ||
| 260 | + fontSize: ScreenUtil().setSp(40)), | ||
| 261 | + ) | ||
| 262 | + ], | ||
| 263 | + )), | ||
| 264 | + Container( | ||
| 265 | + padding: EdgeInsets.symmetric( | ||
| 266 | + horizontal: ScreenUtil().setWidth(16), | ||
| 267 | + vertical: ScreenUtil().setWidth(14)), | ||
| 268 | + decoration: BoxDecoration( | ||
| 269 | + color: MyColours.color_ffffff, | ||
| 270 | + borderRadius: BorderRadius.only( | ||
| 271 | + bottomLeft: Radius.circular(ScreenUtil().radius(10)), | ||
| 272 | + bottomRight: Radius.circular(ScreenUtil().radius(10)), | ||
| 273 | + ), | ||
| 274 | + ), | ||
| 275 | + child: Column( | ||
| 276 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 277 | + children: [ | ||
| 278 | + Wrap( | ||
| 279 | + children: [ | ||
| 280 | + Text( | ||
| 281 | + '[已选桌/未选桌]', | ||
| 282 | + style: TextStyle( | ||
| 283 | + color: true | ||
| 284 | + ? MyColours.color_00A870 | ||
| 285 | + : MyColours.color_E34D59, | ||
| 286 | + fontSize: ScreenUtil().setSp(28)), | ||
| 287 | + ), | ||
| 288 | + Text( | ||
| 289 | + ' [已选套餐/未选套餐]', | ||
| 290 | + style: TextStyle( | ||
| 291 | + color: true | ||
| 292 | + ? MyColours.color_00A870 | ||
| 293 | + : MyColours.color_E34D59, | ||
| 294 | + fontSize: ScreenUtil().setSp(28)), | ||
| 295 | + ), | ||
| 296 | + Text( | ||
| 297 | + ' [定金2000/未交定金]', | ||
| 298 | + style: TextStyle( | ||
| 299 | + color: true | ||
| 300 | + ? MyColours.color_00A870 | ||
| 301 | + : MyColours.color_E34D59, | ||
| 302 | + fontSize: ScreenUtil().setSp(28)), | ||
| 303 | + ), | ||
| 304 | + Text( | ||
| 305 | + ' [已担保/未担保]', | ||
| 306 | + style: TextStyle( | ||
| 307 | + color: true | ||
| 308 | + ? MyColours.color_00A870 | ||
| 309 | + : MyColours.color_E34D59, | ||
| 310 | + fontSize: ScreenUtil().setSp(28)), | ||
| 311 | + ), | ||
| 312 | + Text( | ||
| 313 | + ' [已签约/未签约]', | ||
| 314 | + style: TextStyle( | ||
| 315 | + color: true | ||
| 316 | + ? MyColours.color_00A870 | ||
| 317 | + : MyColours.color_E34D59, | ||
| 318 | + fontSize: ScreenUtil().setSp(28)), | ||
| 319 | + ), | ||
| 320 | + ], | ||
| 321 | + ), | ||
| 322 | + VEmptyView(20), | ||
| 323 | + Row( | ||
| 324 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 325 | + children: [ | ||
| 326 | + Text( | ||
| 327 | + '方先生 负责人:刘经理', | ||
| 328 | + style: TextStyle( | ||
| 329 | + fontWeight: FontWeight.bold, | ||
| 330 | + color: MyColours.color_000000, | ||
| 331 | + fontSize: ScreenUtil().setSp(28)), | ||
| 332 | + ), | ||
| 333 | + RoundButton( | ||
| 334 | + onPressed: () async { | ||
| 335 | + _showCancelWidget(context); | ||
| 336 | + }, | ||
| 337 | + text: '丢单', | ||
| 338 | + fontSize: 28, | ||
| 339 | + isBold: false, | ||
| 340 | + height: h(28), | ||
| 341 | + width: w(44), | ||
| 342 | + // margin: EdgeInsets.only(top: w(18), bottom: w(4)), | ||
| 343 | + textColor: MyColours.color_F6F6F6, | ||
| 344 | + gradientStart: MyColours.color_E34D59, | ||
| 345 | + gradientEnd: MyColours.color_E34D59, | ||
| 346 | + borderColor: MyColours.color_E34D59, | ||
| 347 | + radius: r(4), | ||
| 348 | + ), | ||
| 349 | + ], | ||
| 350 | + ) | ||
| 351 | + ], | ||
| 352 | + ), | ||
| 353 | + ) | ||
| 354 | + ], | ||
| 355 | + ), | ||
| 356 | + ); | ||
| 357 | + } | ||
| 358 | + | ||
| 359 | + ///取消预订弹框 | ||
| 360 | + _showCancelWidget(context) { | ||
| 361 | + ScrollController _scrollController = ScrollController(); | ||
| 362 | + TextEditingController _cancelController = TextEditingController(); | ||
| 363 | + FocusNode _cancelNode = FocusNode(); | ||
| 364 | + | ||
| 365 | + List cancelReasonList = [ | ||
| 366 | + {'title': '已选则其他酒店', 'select': false}, | ||
| 367 | + {'title': '不接受增值服务', 'select': false}, | ||
| 368 | + {'title': '场地无法满足客户', 'select': false}, | ||
| 369 | + {'title': '内部失误,跟单失败', 'select': false}, | ||
| 370 | + {'title': '其他原因', 'select': false}, | ||
| 371 | + ]; | ||
| 372 | + showGeneralDialog( | ||
| 373 | + context: context, | ||
| 374 | + barrierDismissible: false, | ||
| 375 | + barrierLabel: | ||
| 376 | + MaterialLocalizations.of(context).modalBarrierDismissLabel, | ||
| 377 | + transitionDuration: const Duration(milliseconds: 150), | ||
| 378 | + barrierColor: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 379 | + pageBuilder: (BuildContext context, Animation animation, | ||
| 380 | + Animation secondaryAnimation) { | ||
| 381 | + return Scaffold( | ||
| 382 | + backgroundColor: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 383 | + body: StatefulBuilder(builder: (context, state) { | ||
| 384 | + // _cancelState = state; | ||
| 385 | + return GestureDetector( | ||
| 386 | + behavior: HitTestBehavior.opaque, | ||
| 387 | + // onTap: () { | ||
| 388 | + // Navigator.of(context).pop(); | ||
| 389 | + // }, | ||
| 390 | + child: Center( | ||
| 391 | + child: Container( | ||
| 392 | + margin: EdgeInsets.symmetric( | ||
| 393 | + horizontal: ScreenUtil().setWidth(28 * 2)), | ||
| 394 | + decoration: BoxDecoration( | ||
| 395 | + color: Colors.white, | ||
| 396 | + borderRadius: | ||
| 397 | + BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 398 | + ), | ||
| 399 | + height: ScreenUtil().setWidth(355 * 2 + 20), | ||
| 400 | + child: Column( | ||
| 401 | + // mainAxisSize: MainAxisSize.min, | ||
| 402 | + children: [ | ||
| 403 | + // Stack( | ||
| 404 | + // children: [ | ||
| 405 | + VEmptyView(48), | ||
| 406 | + Container( | ||
| 407 | + height: ScreenUtil().setWidth(48), | ||
| 408 | + child: Text( | ||
| 409 | + '请选择丢单原因', | ||
| 410 | + style: TextStyle( | ||
| 411 | + fontSize: ScreenUtil().setSp(32), | ||
| 412 | + fontWeight: FontWeight.bold, | ||
| 413 | + decoration: TextDecoration.none, | ||
| 414 | + color: Color.fromRGBO(0, 0, 0, 0.9)), | ||
| 415 | + ), | ||
| 416 | + ), | ||
| 417 | + // Positioned( | ||
| 418 | + // top: ScreenUtil().setWidth(8), | ||
| 419 | + // right: ScreenUtil().setWidth(0), | ||
| 420 | + // child: GestureDetector( | ||
| 421 | + // onTap: () { | ||
| 422 | + // _initCancel(); | ||
| 423 | + // Navigator.of(context).pop(); | ||
| 424 | + // }, | ||
| 425 | + // child: Container( | ||
| 426 | + // padding: EdgeInsets.only(left: 20), | ||
| 427 | + // child: Image.asset( | ||
| 428 | + // 'assets/close.png', | ||
| 429 | + // width: ScreenUtil().setWidth(32), | ||
| 430 | + // height: ScreenUtil().setWidth(32), | ||
| 431 | + // ), | ||
| 432 | + // ))) | ||
| 433 | + // ], | ||
| 434 | + // ), | ||
| 435 | + VEmptyView(40), | ||
| 436 | + Container( | ||
| 437 | + padding: EdgeInsets.symmetric( | ||
| 438 | + horizontal: ScreenUtil().setWidth(32)), | ||
| 439 | + child: Column( | ||
| 440 | + // mainAxisSize: MainAxisSize.min, | ||
| 441 | + children: cancelReasonList.map((value) { | ||
| 442 | + return value['title'] == '其他原因' | ||
| 443 | + ? SizedBox() | ||
| 444 | + : GestureDetector( | ||
| 445 | + onTap: () { | ||
| 446 | + for (var item | ||
| 447 | + in cancelReasonList) { | ||
| 448 | + item['select'] = false; | ||
| 449 | + // isShowTF = false; | ||
| 450 | + // paddingBottom = | ||
| 451 | + // ScreenUtil().screenHeight.ceil() - | ||
| 452 | + // 138 - | ||
| 453 | + // 340; | ||
| 454 | + if (item['title'] == | ||
| 455 | + value['title']) { | ||
| 456 | + item['select'] = true; | ||
| 457 | + // if (item['title'] == '其他原因') { | ||
| 458 | + // // isShowTF = true; | ||
| 459 | + // // paddingBottom = 130; | ||
| 460 | + // // paddingBottom = | ||
| 461 | + // // ScreenUtil().screenHeight.ceil() - | ||
| 462 | + // // 138 - | ||
| 463 | + // // 340 - | ||
| 464 | + // // 46; | ||
| 465 | + // } | ||
| 466 | + } | ||
| 467 | + } | ||
| 468 | + state(() {}); | ||
| 469 | + }, | ||
| 470 | + child: Container( | ||
| 471 | + height: ScreenUtil().setWidth(48), | ||
| 472 | + margin: EdgeInsets.only( | ||
| 473 | + bottom: ScreenUtil() | ||
| 474 | + .setWidth(40)), | ||
| 475 | + child: Row( | ||
| 476 | + children: [ | ||
| 477 | + Image.asset( | ||
| 478 | + value['select'] | ||
| 479 | + ? 'assets/select.png' | ||
| 480 | + : 'assets/unselect.png', | ||
| 481 | + width: ScreenUtil() | ||
| 482 | + .setWidth(42)), | ||
| 483 | + HEmptyView(20), | ||
| 484 | + Container( | ||
| 485 | + child: Text( | ||
| 486 | + value['title'], | ||
| 487 | + style: TextStyle( | ||
| 488 | + fontSize: | ||
| 489 | + ScreenUtil() | ||
| 490 | + .setSp( | ||
| 491 | + 32), | ||
| 492 | + fontWeight: | ||
| 493 | + FontWeight | ||
| 494 | + .normal, | ||
| 495 | + decoration: | ||
| 496 | + TextDecoration | ||
| 497 | + .none, | ||
| 498 | + color: MyColours | ||
| 499 | + .color_333333))) | ||
| 500 | + ], | ||
| 501 | + ), | ||
| 502 | + ), | ||
| 503 | + ); | ||
| 504 | + }).toList(), | ||
| 505 | + )), | ||
| 506 | + Material( | ||
| 507 | + child: Container( | ||
| 508 | + color: Colors.white, | ||
| 509 | + padding: EdgeInsets.symmetric( | ||
| 510 | + horizontal: ScreenUtil().setWidth(32)), | ||
| 511 | + height: ScreenUtil().setWidth(42 * 2), | ||
| 512 | + child: Row(children: [ | ||
| 513 | + InkWell( | ||
| 514 | + onTap: () { | ||
| 515 | + for (var item in cancelReasonList) { | ||
| 516 | + item['select'] = false; | ||
| 517 | + } | ||
| 518 | + cancelReasonList[4]['select'] = | ||
| 519 | + true; | ||
| 520 | + state(() {}); | ||
| 521 | + }, | ||
| 522 | + child: Padding( | ||
| 523 | + padding: EdgeInsets.only( | ||
| 524 | + right: ScreenUtil() | ||
| 525 | + .setWidth(20)), | ||
| 526 | + child: Image.asset( | ||
| 527 | + cancelReasonList[4]['select'] | ||
| 528 | + ? 'assets/select.png' | ||
| 529 | + : 'assets/unselect.png', | ||
| 530 | + width: ScreenUtil() | ||
| 531 | + .setWidth(44)))), | ||
| 532 | + Expanded( | ||
| 533 | + child: Container( | ||
| 534 | + decoration: BoxDecoration( | ||
| 535 | + color: Color.fromRGBO( | ||
| 536 | + 240, 240, 240, 1), | ||
| 537 | + borderRadius: BorderRadius.circular( | ||
| 538 | + ScreenUtil().setWidth(8))), | ||
| 539 | + // height: ScreenUtil().setWidth(42 * 2), | ||
| 540 | + padding: EdgeInsets.symmetric( | ||
| 541 | + horizontal: | ||
| 542 | + ScreenUtil().setWidth(16)), | ||
| 543 | + child: TextField( | ||
| 544 | + maxLines: 1, | ||
| 545 | + controller: _cancelController, | ||
| 546 | + focusNode: _cancelNode, | ||
| 547 | + style: TextStyle( | ||
| 548 | + textBaseline: | ||
| 549 | + TextBaseline.alphabetic), | ||
| 550 | + textAlignVertical: | ||
| 551 | + TextAlignVertical.center, | ||
| 552 | + decoration: InputDecoration( | ||
| 553 | + contentPadding: EdgeInsets.zero, | ||
| 554 | + hintText: "其他", | ||
| 555 | + // focusColor: Color.fromRGBO(0, 0, 0, 0.4), | ||
| 556 | + hintStyle: TextStyle( | ||
| 557 | + color: | ||
| 558 | + Color.fromRGBO(0, 0, 0, 0.4), | ||
| 559 | + fontSize: ScreenUtil().setSp(32), | ||
| 560 | + ), | ||
| 561 | + enabledBorder: OutlineInputBorder( | ||
| 562 | + borderSide: BorderSide( | ||
| 563 | + width: 0, | ||
| 564 | + color: Colors.transparent)), | ||
| 565 | + border: OutlineInputBorder( | ||
| 566 | + borderSide: BorderSide( | ||
| 567 | + width: 0, | ||
| 568 | + color: Colors.transparent)), | ||
| 569 | + focusedBorder: OutlineInputBorder( | ||
| 570 | + borderSide: BorderSide( | ||
| 571 | + width: 0, | ||
| 572 | + color: Colors.transparent)), | ||
| 573 | + ), | ||
| 574 | + | ||
| 575 | + // border: InputBorder.none, | ||
| 576 | + | ||
| 577 | + onChanged: (_) { | ||
| 578 | + setState(() {}); | ||
| 579 | + }, | ||
| 580 | + onEditingComplete: () { | ||
| 581 | + print('fff'); | ||
| 582 | + _cancelNode.unfocus(); | ||
| 583 | + }, | ||
| 584 | + // keyboardType: TextInputType.number, | ||
| 585 | + ), | ||
| 586 | + )) | ||
| 587 | + ]))), | ||
| 588 | + | ||
| 589 | + VEmptyView(40), | ||
| 590 | + MyDivider(double.infinity, ScreenUtil().setWidth(2), | ||
| 591 | + color: MyColours.color_f3f3f3), | ||
| 592 | + Row( | ||
| 593 | + // mainAxisAlignment: | ||
| 594 | + // MainAxisAlignment.spaceBetween, | ||
| 595 | + children: [ | ||
| 596 | + RoundButton( | ||
| 597 | + text: '取消', | ||
| 598 | + width: (ScreenUtil().screenWidth - | ||
| 599 | + ScreenUtil().setWidth(62) * 2) / | ||
| 600 | + 2, | ||
| 601 | + height: ScreenUtil().setWidth(112), | ||
| 602 | + // radius: ScreenUtil().setWidth(10), | ||
| 603 | + gradientStart: Colors.transparent, | ||
| 604 | + gradientEnd: Colors.transparent, | ||
| 605 | + textColor: MyColours.color_E6000000, | ||
| 606 | + isBold: false, | ||
| 607 | + fontSize: 32, | ||
| 608 | + onPressed: () { | ||
| 609 | + Navigator.pop(context); | ||
| 610 | + }), | ||
| 611 | + MyDivider(ScreenUtil().setWidth(2), | ||
| 612 | + ScreenUtil().setWidth(112), | ||
| 613 | + color: MyColours.color_f3f3f3), | ||
| 614 | + RoundButton( | ||
| 615 | + text: '确定丢单', | ||
| 616 | + width: (ScreenUtil().screenWidth - | ||
| 617 | + ScreenUtil().setWidth(62) * 2) / | ||
| 618 | + 2, | ||
| 619 | + height: ScreenUtil().setWidth(112), | ||
| 620 | + // radius: ScreenUtil().setWidth(10), | ||
| 621 | + gradientStart: Colors.transparent, | ||
| 622 | + gradientEnd: Colors.transparent, | ||
| 623 | + textColor: MyColours.color_E34D59, | ||
| 624 | + fontSize: 32, | ||
| 625 | + isBold: true, | ||
| 626 | + onPressed: () { | ||
| 627 | + String desc = ''; | ||
| 628 | + for (var value in cancelReasonList) { | ||
| 629 | + if (value['select'] == true) { | ||
| 630 | + desc = value['title']; | ||
| 631 | + if (value['title'] == '其他原因') { | ||
| 632 | + desc = | ||
| 633 | + _cancelController.text.trim(); | ||
| 634 | + if (desc.isEmpty) { | ||
| 635 | + Utils.showToast("请填写原因"); | ||
| 636 | + return; | ||
| 637 | + } | ||
| 638 | + } | ||
| 639 | + } | ||
| 640 | + } | ||
| 641 | + | ||
| 642 | + if (desc == '') { | ||
| 643 | + Utils.showToast('请选择原因'); | ||
| 644 | + return; | ||
| 645 | + } | ||
| 646 | + | ||
| 647 | + Navigator.of(context).pop(); | ||
| 648 | + Loading.showLoading(context); | ||
| 649 | + | ||
| 650 | + // setReserveStatus('4', desc: desc); | ||
| 651 | + }), | ||
| 652 | + ]) | ||
| 653 | + ], | ||
| 654 | + ), | ||
| 655 | + ), | ||
| 656 | + )); | ||
| 657 | + })); | ||
| 658 | + }); | ||
| 659 | + } | ||
| 660 | + | ||
| 661 | + Widget _callButton( | ||
| 662 | + {GestureTapCallback onPress, | ||
| 663 | + content, | ||
| 664 | + hasLeftBorder = true, | ||
| 665 | + isSelect = false}) { | ||
| 666 | + return InkWell( | ||
| 667 | + onTap: onPress, | ||
| 668 | + child: Container( | ||
| 669 | + height: h(48), | ||
| 670 | + decoration: BoxDecoration( | ||
| 671 | + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff, | ||
| 672 | + border: Border( | ||
| 673 | + bottom: BorderSide( | ||
| 674 | + color: MyColours.color_438E93, | ||
| 675 | + width: ScreenUtil().setWidth(2)), | ||
| 676 | + top: BorderSide( | ||
| 677 | + color: MyColours.color_438E93, | ||
| 678 | + width: ScreenUtil().setWidth(2)), | ||
| 679 | + left: hasLeftBorder | ||
| 680 | + ? BorderSide( | ||
| 681 | + color: MyColours.color_438E93, | ||
| 682 | + width: ScreenUtil().setWidth(2)) | ||
| 683 | + : BorderSide.none, | ||
| 684 | + right: BorderSide( | ||
| 685 | + color: MyColours.color_438E93, | ||
| 686 | + width: ScreenUtil().setWidth(2)))), | ||
| 687 | + child: Align( | ||
| 688 | + alignment: Alignment.center, | ||
| 689 | + child: Text( | ||
| 690 | + content, | ||
| 691 | + style: TextStyle( | ||
| 692 | + color: | ||
| 693 | + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93, | ||
| 694 | + fontSize: ScreenUtil().setSp(36)), | ||
| 695 | + ), | ||
| 696 | + ), | ||
| 697 | + ), | ||
| 698 | + ); | ||
| 699 | + } | ||
| 700 | + | ||
| 701 | + @override | ||
| 702 | + Widget build(BuildContext context) { | ||
| 703 | + feastModel = Provider.of<FeastModel>(context); | ||
| 704 | + feastModel.pageStateFollowUp = PageState.Success; | ||
| 705 | + return Scaffold( | ||
| 706 | + backgroundColor: MyColours.color_ffffff, | ||
| 707 | + appBar: SystemAppBar( | ||
| 708 | + '待跟进宴会', | ||
| 709 | + needWhite: true, | ||
| 710 | + bgColor: MyColours.color_438E93, | ||
| 711 | + titleColor: MyColours.color_ffffff, | ||
| 712 | + onTap: () { | ||
| 713 | + Navigator.pop(context); | ||
| 714 | + }, | ||
| 715 | + ), | ||
| 716 | + body: Column( | ||
| 717 | + children: [ | ||
| 718 | + Expanded( | ||
| 719 | + child: NestedScrollView( | ||
| 720 | + // controller: _scrollViewController, | ||
| 721 | + headerSliverBuilder: | ||
| 722 | + (BuildContext context, bool innerBoxIsScrolled) { | ||
| 723 | + return <Widget>[ | ||
| 724 | + SliverAppBar( | ||
| 725 | + pinned: true, | ||
| 726 | + floating: false, | ||
| 727 | + leading: null, | ||
| 728 | + backgroundColor: MyColours.color_ffffff, | ||
| 729 | + // expandedHeight: ScreenUtil().setWidth(128 * 2), | ||
| 730 | + automaticallyImplyLeading: false, | ||
| 731 | + toolbarHeight: ScreenUtil().setWidth(88 * 2), | ||
| 732 | + title: buildFeastTypeHeader(), | ||
| 733 | + // flexibleSpace: FlexibleSpaceBar( | ||
| 734 | + // collapseMode: CollapseMode.pin, | ||
| 735 | + // title: buildFeastTypeHeader()) | ||
| 736 | + ) | ||
| 737 | + ]; | ||
| 738 | + }, body: Consumer<FeastModel>(builder: (context, model, _) { | ||
| 739 | + if (model.pageStateFollowUp != PageState.Success) { | ||
| 740 | + return ExceptionPage( | ||
| 741 | + pageState: model.pageStateFollowUp, | ||
| 742 | + callback: () { | ||
| 743 | + // _getWine(); | ||
| 744 | + }, | ||
| 745 | + emptyMsg: "暂时没有待跟进宴会哦", | ||
| 746 | + emptyImg: "empty_search", | ||
| 747 | + showMsg: "加载中,请稍后...", | ||
| 748 | + ); | ||
| 749 | + } else { | ||
| 750 | + return ListView.builder( | ||
| 751 | + itemCount: 100, | ||
| 752 | + padding: EdgeInsets.only(left: w(12), top: w(19),right:w(12)), | ||
| 753 | + itemBuilder: (BuildContext context, int index) { | ||
| 754 | + // WineSunModel data = feastModel.wineData[index]; | ||
| 755 | + return buildFeastTypeItem(); | ||
| 756 | + // '剑南春52度500ml', '1150元/份 不可议价' | ||
| 757 | + }); | ||
| 758 | + } | ||
| 759 | + }))), | ||
| 760 | + Row( | ||
| 761 | + children: [ | ||
| 762 | + Expanded( | ||
| 763 | + child: _callButton( | ||
| 764 | + onPress: () { | ||
| 765 | + Navigator.pop(context); | ||
| 766 | + }, | ||
| 767 | + content: '回到今天', | ||
| 768 | + hasLeftBorder: true, | ||
| 769 | + isSelect: false)), | ||
| 770 | + Expanded( | ||
| 771 | + child: _callButton( | ||
| 772 | + onPress: () {}, | ||
| 773 | + content: '创建宴会', | ||
| 774 | + hasLeftBorder: true, | ||
| 775 | + isSelect: true)) | ||
| 776 | + ], | ||
| 777 | + ) | ||
| 778 | + ], | ||
| 779 | + )); | ||
| 780 | + } | ||
| 781 | +} |
| @@ -60,7 +60,9 @@ class _FeastPageState extends State<FeastPage> { | @@ -60,7 +60,9 @@ class _FeastPageState extends State<FeastPage> { | ||
| 60 | NavigatorUtil.goFeastCreatePage(context); | 60 | NavigatorUtil.goFeastCreatePage(context); |
| 61 | }), | 61 | }), |
| 62 | Stack(clipBehavior: Clip.none, children: [ | 62 | Stack(clipBehavior: Clip.none, children: [ |
| 63 | - upAndDown('y_schedule', '待跟进'), | 63 | + upAndDown('y_schedule', '待跟进', onTap: () { |
| 64 | + NavigatorUtil.goFeastFollowUpPage(context); | ||
| 65 | + }), | ||
| 64 | Positioned( | 66 | Positioned( |
| 65 | right: ScreenUtil().setWidth(-6), | 67 | right: ScreenUtil().setWidth(-6), |
| 66 | bottom: ScreenUtil().setWidth(32), | 68 | bottom: ScreenUtil().setWidth(32), |
| @@ -82,7 +84,9 @@ class _FeastPageState extends State<FeastPage> { | @@ -82,7 +84,9 @@ class _FeastPageState extends State<FeastPage> { | ||
| 82 | ), | 84 | ), |
| 83 | ) | 85 | ) |
| 84 | ]), | 86 | ]), |
| 85 | - upAndDown('y_money', '定金管理') | 87 | + upAndDown('y_money', '定金管理',onTap: (){ |
| 88 | + NavigatorUtil.goFeastDepositDataPage(context); | ||
| 89 | + }) | ||
| 86 | ], | 90 | ], |
| 87 | ), | 91 | ), |
| 88 | VEmptyView(102), | 92 | VEmptyView(102), |
| @@ -238,11 +238,13 @@ class _FeastOthersetManageEditPageState | @@ -238,11 +238,13 @@ class _FeastOthersetManageEditPageState | ||
| 238 | crossAxisAlignment: CrossAxisAlignment.start, | 238 | crossAxisAlignment: CrossAxisAlignment.start, |
| 239 | children: [ | 239 | children: [ |
| 240 | _textfield( | 240 | _textfield( |
| 241 | - '配置名称', '请输入', othersetNameC, othersetF, ''), | 241 | + '配置名称', '请输入', othersetNameC, othersetF, '', |
| 242 | + inputType: TextInputType.text), | ||
| 242 | _textfield('配置单价', '请输入', othersetPriceC, | 243 | _textfield('配置单价', '请输入', othersetPriceC, |
| 243 | othersetPriceF, '元'), | 244 | othersetPriceF, '元'), |
| 244 | _textfield( | 245 | _textfield( |
| 245 | - '配置规格', '请输入', othersetPerC, othersetPerF, ''), | 246 | + '配置规格', '请输入', othersetPerC, othersetPerF, '', |
| 247 | + inputType: TextInputType.text), | ||
| 246 | Container( | 248 | Container( |
| 247 | height: w(48), | 249 | height: w(48), |
| 248 | margin: EdgeInsets.only(top: w(12)), | 250 | margin: EdgeInsets.only(top: w(12)), |
| @@ -54,6 +54,40 @@ class FeastModel extends ChangeNotifier { | @@ -54,6 +54,40 @@ class FeastModel extends ChangeNotifier { | ||
| 54 | PageState pageStateDeposit = PageState.Loading; //其他配置 | 54 | PageState pageStateDeposit = PageState.Loading; //其他配置 |
| 55 | List<GetDepositSunModel> depositData = []; | 55 | List<GetDepositSunModel> depositData = []; |
| 56 | 56 | ||
| 57 | + PageState pageStateFollowUp = PageState.Loading; //待跟进宴会 | ||
| 58 | + PageState pageStateDepositData = PageState.Loading; //定金数据 | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + /*** | ||
| 62 | + * | ||
| 63 | + * 新建宴会 | ||
| 64 | + */ | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + ///添加宴会员工 | ||
| 68 | + Future<dynamic> createBanquet(BuildContext context, Map<String, String> params, | ||
| 69 | + {isShowLoading = true}) async { | ||
| 70 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 71 | + .request<dynamic>(context, Method.get, HttpUrl.create_banquet, | ||
| 72 | + data: params, showLoading: isShowLoading) | ||
| 73 | + .catchError((error) { | ||
| 74 | + print(error.toString()); | ||
| 75 | + if (error is MyError) {} | ||
| 76 | + return false; | ||
| 77 | + }); | ||
| 78 | + if (baseResp.code == Constant.status_success) { | ||
| 79 | + // if (baseResp.data == 1) { | ||
| 80 | + return true; | ||
| 81 | + // } else { | ||
| 82 | + // return false; | ||
| 83 | + // } | ||
| 84 | + } else { | ||
| 85 | + if (baseResp != null) { | ||
| 86 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 87 | + } | ||
| 88 | + return false; | ||
| 89 | + } | ||
| 90 | + } | ||
| 57 | /*** | 91 | /*** |
| 58 | * | 92 | * |
| 59 | * 宴会员工 | 93 | * 宴会员工 |
| @@ -984,4 +984,18 @@ class NavigatorUtil { | @@ -984,4 +984,18 @@ class NavigatorUtil { | ||
| 984 | return _navigateTo(context, "${Routes.feast_deposit_type_page}", | 984 | return _navigateTo(context, "${Routes.feast_deposit_type_page}", |
| 985 | replace: replace); | 985 | replace: replace); |
| 986 | } | 986 | } |
| 987 | + | ||
| 988 | + ///宴会----待跟进宴会 | ||
| 989 | + static Future<dynamic> goFeastFollowUpPage(BuildContext context, | ||
| 990 | + {replace = false, bool onlyShow = false}) { | ||
| 991 | + return _navigateTo(context, "${Routes.feast_follow_up_page}", | ||
| 992 | + replace: replace); | ||
| 993 | + } | ||
| 994 | + | ||
| 995 | + ///宴会----定金数据 | ||
| 996 | + static Future<dynamic> goFeastDepositDataPage(BuildContext context, | ||
| 997 | + {replace = false, bool onlyShow = false}) { | ||
| 998 | + return _navigateTo(context, "${Routes.feast_deposit_data_page}", | ||
| 999 | + replace: replace); | ||
| 1000 | + } | ||
| 987 | } | 1001 | } |
| @@ -148,7 +148,9 @@ import 'package:provider/provider.dart'; | @@ -148,7 +148,9 @@ import 'package:provider/provider.dart'; | ||
| 148 | 148 | ||
| 149 | import '../pages/feast/feast_board.dart'; | 149 | import '../pages/feast/feast_board.dart'; |
| 150 | import '../pages/feast/feast_create_page.dart'; | 150 | import '../pages/feast/feast_create_page.dart'; |
| 151 | +import '../pages/feast/feast_deposit_data_page.dart'; | ||
| 151 | import '../pages/feast/feast_deposit_page.dart'; | 152 | import '../pages/feast/feast_deposit_page.dart'; |
| 153 | +import '../pages/feast/feast_followup_page.dart'; | ||
| 152 | import '../pages/feast/feast_invoice_page.dart'; | 154 | import '../pages/feast/feast_invoice_page.dart'; |
| 153 | import '../pages/feast/feast_menu_page.dart'; | 155 | import '../pages/feast/feast_menu_page.dart'; |
| 154 | import '../pages/feast/feast_set_page.dart'; | 156 | import '../pages/feast/feast_set_page.dart'; |
| @@ -1566,3 +1568,23 @@ var feastDepositTypePageHandle = new Handler( | @@ -1566,3 +1568,23 @@ var feastDepositTypePageHandle = new Handler( | ||
| 1566 | return ChangeNotifierProvider<FeastModel>( | 1568 | return ChangeNotifierProvider<FeastModel>( |
| 1567 | create: (_) => FeastModel(), child: FeastDepositTypePage()); | 1569 | create: (_) => FeastModel(), child: FeastDepositTypePage()); |
| 1568 | }); | 1570 | }); |
| 1571 | + | ||
| 1572 | +///宴会---待跟进宴会 | ||
| 1573 | +var feastFollowUpPageHandle = new Handler( | ||
| 1574 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 1575 | + // String uids = params["uids"].first; | ||
| 1576 | + | ||
| 1577 | + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first); | ||
| 1578 | + return ChangeNotifierProvider<FeastModel>( | ||
| 1579 | + create: (_) => FeastModel(), child: FeastFollowUpPage()); | ||
| 1580 | +}); | ||
| 1581 | + | ||
| 1582 | +///宴会---定金数据 | ||
| 1583 | +var feastDepositDataPageHandle = new Handler( | ||
| 1584 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 1585 | + // String uids = params["uids"].first; | ||
| 1586 | + | ||
| 1587 | + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first); | ||
| 1588 | + return ChangeNotifierProvider<FeastModel>( | ||
| 1589 | + create: (_) => FeastModel(), child: FeastDepositDataPage()); | ||
| 1590 | +}); |
| @@ -144,6 +144,9 @@ class Routes { | @@ -144,6 +144,9 @@ class Routes { | ||
| 144 | "/feast_deposit_manage_page"; //宴会-----定金管理 | 144 | "/feast_deposit_manage_page"; //宴会-----定金管理 |
| 145 | static String feast_deposit_type_page = | 145 | static String feast_deposit_type_page = |
| 146 | "/feast_deposit_type_page"; //宴会-----定金类型 | 146 | "/feast_deposit_type_page"; //宴会-----定金类型 |
| 147 | + static String feast_follow_up_page = "/feast_follow_up_page"; //宴会-----待跟进 | ||
| 148 | + static String feast_deposit_data_page = | ||
| 149 | + "/feast_deposit_data_page"; //宴会-----定金数据 | ||
| 147 | 150 | ||
| 148 | static void configureRoutes(FluroRouter router) { | 151 | static void configureRoutes(FluroRouter router) { |
| 149 | router.notFoundHandler = new Handler( | 152 | router.notFoundHandler = new Handler( |
| @@ -290,5 +293,10 @@ class Routes { | @@ -290,5 +293,10 @@ class Routes { | ||
| 290 | router.define(feast_deposit_manage_page, | 293 | router.define(feast_deposit_manage_page, |
| 291 | handler: feastDepositManagePageHandle); | 294 | handler: feastDepositManagePageHandle); |
| 292 | router.define(feast_deposit_type_page, handler: feastDepositTypePageHandle); | 295 | router.define(feast_deposit_type_page, handler: feastDepositTypePageHandle); |
| 296 | + | ||
| 297 | + router.define(feast_follow_up_page, handler: feastFollowUpPageHandle); | ||
| 298 | + | ||
| 299 | + router.define(feast_deposit_data_page, handler: feastDepositDataPageHandle); | ||
| 300 | + | ||
| 293 | } | 301 | } |
| 294 | } | 302 | } |
| @@ -724,7 +724,7 @@ class DialogUtil { | @@ -724,7 +724,7 @@ class DialogUtil { | ||
| 724 | shape: RoundedRectangleBorder( | 724 | shape: RoundedRectangleBorder( |
| 725 | borderRadius: BorderRadius.all( | 725 | borderRadius: BorderRadius.all( |
| 726 | Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角 | 726 | Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角 |
| 727 | - child: Expanded( | 727 | + child: Container( |
| 728 | child: Column( | 728 | child: Column( |
| 729 | children: [ | 729 | children: [ |
| 730 | VEmptyView(64), | 730 | VEmptyView(64), |
-
Please register or login to post a comment