Showing
9 changed files
with
1345 additions
and
29 deletions
assets/delete_g.png
0 → 100644
1.17 KB
lib/models/book_deposit_model.dart
0 → 100644
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 2 | + | ||
| 3 | +class BookDepositModel { | ||
| 4 | + int ret; | ||
| 5 | + List<BookDepositSunModel> data; | ||
| 6 | + String msg; | ||
| 7 | + | ||
| 8 | + BookDepositModel({this.ret, this.data, this.msg}); | ||
| 9 | + | ||
| 10 | + BookDepositModel.fromJson(Map<String, dynamic> json) { | ||
| 11 | + ret = json['ret']; | ||
| 12 | + if (json['data'] != null) { | ||
| 13 | + data = <BookDepositSunModel>[]; | ||
| 14 | + json['data'].forEach((v) { | ||
| 15 | + data.add(new BookDepositSunModel.fromJson(v)); | ||
| 16 | + }); | ||
| 17 | + } | ||
| 18 | + msg = json['msg']; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + Map<String, dynamic> toJson() { | ||
| 22 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 23 | + data['ret'] = this.ret; | ||
| 24 | + if (this.data != null) { | ||
| 25 | + data['data'] = this.data.map((v) => v.toJson()).toList(); | ||
| 26 | + } | ||
| 27 | + data['msg'] = this.msg; | ||
| 28 | + return data; | ||
| 29 | + } | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +class BookDepositSunModel { | ||
| 33 | + String id; | ||
| 34 | + String sid; | ||
| 35 | + String rid; | ||
| 36 | + String price; | ||
| 37 | + String rname; | ||
| 38 | + String collectionUid; | ||
| 39 | + String rtime; | ||
| 40 | + String pay; | ||
| 41 | + String depositId; | ||
| 42 | + String no; | ||
| 43 | + String nickName; | ||
| 44 | + // String dname; | ||
| 45 | + | ||
| 46 | + String get ddateStr { | ||
| 47 | + if (rtime.toString() == '0') { | ||
| 48 | + return ''; | ||
| 49 | + } | ||
| 50 | + DateTime dateTime = | ||
| 51 | + DateTime.fromMillisecondsSinceEpoch(int.parse(rtime.toString()) * 1000); | ||
| 52 | + return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + BookDepositSunModel( | ||
| 56 | + {this.id, | ||
| 57 | + this.sid, | ||
| 58 | + this.rid, | ||
| 59 | + this.price, | ||
| 60 | + this.rname, | ||
| 61 | + this.collectionUid, | ||
| 62 | + this.rtime, | ||
| 63 | + this.pay, | ||
| 64 | + this.depositId, | ||
| 65 | + this.no, | ||
| 66 | + this.nickName, | ||
| 67 | + }); | ||
| 68 | + | ||
| 69 | + BookDepositSunModel.fromJson(Map<String, dynamic> json) { | ||
| 70 | + id = json['id']; | ||
| 71 | + sid = json['sid']; | ||
| 72 | + rid = json['rid']; | ||
| 73 | + price = json['price']; | ||
| 74 | + rname = json['rname']; | ||
| 75 | + collectionUid = json['collection_uid']; | ||
| 76 | + rtime = json['rtime']; | ||
| 77 | + pay = json['pay']; | ||
| 78 | + depositId = json['deposit_id']; | ||
| 79 | + no = json['no']; | ||
| 80 | + nickName = json['nick_name']; | ||
| 81 | + | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + Map<String, dynamic> toJson() { | ||
| 85 | + final Map<String, dynamic> data = new Map<String, dynamic>(); | ||
| 86 | + data['id'] = this.id; | ||
| 87 | + data['sid'] = this.sid; | ||
| 88 | + data['rid'] = this.rid; | ||
| 89 | + data['price'] = this.price; | ||
| 90 | + data['rname'] = this.rname; | ||
| 91 | + data['collection_uid'] = this.collectionUid; | ||
| 92 | + data['rtime'] = this.rtime; | ||
| 93 | + data['pay'] = this.pay; | ||
| 94 | + data['deposit_id'] = this.depositId; | ||
| 95 | + data['no'] = this.no; | ||
| 96 | + data['nick_name'] = this.nickName; | ||
| 97 | + | ||
| 98 | + return data; | ||
| 99 | + } | ||
| 100 | +} |
| @@ -317,9 +317,9 @@ class Cancel { | @@ -317,9 +317,9 @@ class Cancel { | ||
| 317 | DateTime dateTime = | 317 | DateTime dateTime = |
| 318 | DateTime.fromMillisecondsSinceEpoch(int.parse(cdate) * 1000); | 318 | DateTime.fromMillisecondsSinceEpoch(int.parse(cdate) * 1000); |
| 319 | return dateTime.year.toString() + | 319 | return dateTime.year.toString() + |
| 320 | - "/" + | 320 | + "-" + |
| 321 | Utils.addZeroNumber(dateTime.month) + | 321 | Utils.addZeroNumber(dateTime.month) + |
| 322 | - "/" + | 322 | + "-" + |
| 323 | Utils.addZeroNumber(dateTime.day) + | 323 | Utils.addZeroNumber(dateTime.day) + |
| 324 | " " + | 324 | " " + |
| 325 | Utils.addZeroNumber(dateTime.hour) + | 325 | Utils.addZeroNumber(dateTime.hour) + |
lib/pages/detail/book_deposit_page.dart
0 → 100644
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 2 | +import 'package:flutter/gestures.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:flutter_picker/Picker.dart'; | ||
| 5 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 6 | +import 'package:one_key/models/filter_btn_model.dart'; | ||
| 7 | +import 'package:one_key/models/get_deposit_model.dart'; | ||
| 8 | +import 'package:one_key/route/route_handles.dart'; | ||
| 9 | +import 'package:one_key/widgets/round_button.dart'; | ||
| 10 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 11 | +import 'package:provider/provider.dart'; | ||
| 12 | + | ||
| 13 | +import '../../models/book_deposit_model.dart'; | ||
| 14 | +import '../../models/get_banquet_deposit_model.dart'; | ||
| 15 | +import '../../provider/feast_model.dart'; | ||
| 16 | +import '../../provider/user_model.dart'; | ||
| 17 | +import '../../res/colors.dart'; | ||
| 18 | +import '../../utils/dialog_util.dart'; | ||
| 19 | +import '../../utils/event_bus.dart'; | ||
| 20 | +import '../../utils/screen_util.dart'; | ||
| 21 | +import '../../utils/utils.dart'; | ||
| 22 | +import '../../widgets/h_empty_view.dart'; | ||
| 23 | +import '../../widgets/system_app_bar.dart'; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * 定金 | ||
| 27 | + */ | ||
| 28 | +class BookDepositPage extends StatefulWidget { | ||
| 29 | + final String rid; | ||
| 30 | + final BookDepositSunModel depositSunModel; | ||
| 31 | + BookDepositPage({Key key, this.rid, this.depositSunModel}) : super(key: key); | ||
| 32 | + | ||
| 33 | + @override | ||
| 34 | + _BookDepositPageState createState() => _BookDepositPageState(); | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +class _BookDepositPageState extends State<BookDepositPage> { | ||
| 38 | + String collectionP = '请选择'; //收款人 | ||
| 39 | + int collectionPIndex; //收款人 | ||
| 40 | + String paymentTime = '请选择'; //付款时间 | ||
| 41 | + String paymentType = '请选择'; //支付方式 | ||
| 42 | + List<String> payType = []; //支付方式 | ||
| 43 | + int payTypeIndex; //支付方式 | ||
| 44 | + // String depositType = '请选择'; //定金类型 | ||
| 45 | + // int depositTypeIndex; //定金类型 | ||
| 46 | + | ||
| 47 | + TextEditingController moneyC = TextEditingController(); | ||
| 48 | + FocusNode moneyF = FocusNode(); | ||
| 49 | + TextEditingController paymentC = TextEditingController(); | ||
| 50 | + FocusNode paymentF = FocusNode(); | ||
| 51 | + TextEditingController receiptNumberC = TextEditingController(); | ||
| 52 | + FocusNode receiptNumberF = FocusNode(); | ||
| 53 | + bool showDateSelWidget = false; | ||
| 54 | + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); | ||
| 55 | + | ||
| 56 | + FeastModel feastModel; | ||
| 57 | + | ||
| 58 | + @override | ||
| 59 | + void initState() { | ||
| 60 | + super.initState(); | ||
| 61 | + | ||
| 62 | + Utils.changeStatusColor(color: MyColours.color_438E93); | ||
| 63 | + payType = ['现金', '刷卡', '微信', '支付宝', '转账']; | ||
| 64 | + if (widget.depositSunModel != null) { | ||
| 65 | + moneyC.text = widget.depositSunModel.price; | ||
| 66 | + | ||
| 67 | + if (widget.depositSunModel.rname != '') { | ||
| 68 | + paymentC.text = widget.depositSunModel.rname; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + if (widget.depositSunModel.pay != '') { | ||
| 72 | + paymentType = widget.depositSunModel.pay; | ||
| 73 | + payTypeIndex = payType.indexOf(paymentType); | ||
| 74 | + } | ||
| 75 | + if (widget.depositSunModel.ddateStr != '') { | ||
| 76 | + paymentTime = widget.depositSunModel.ddateStr; | ||
| 77 | + } | ||
| 78 | + if (widget.depositSunModel.nickName != null) { | ||
| 79 | + collectionP = widget.depositSunModel.nickName; | ||
| 80 | + } | ||
| 81 | + if (widget.depositSunModel.no != '0') { | ||
| 82 | + receiptNumberC.text = widget.depositSunModel.no; | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + moneyF.addListener(() { | ||
| 87 | + if (moneyF.hasFocus) { | ||
| 88 | + //有焦点 | ||
| 89 | + if (showDateSelWidget) { | ||
| 90 | + Navigator.pop(context); | ||
| 91 | + showDateSelWidget = false; | ||
| 92 | + } | ||
| 93 | + } else { | ||
| 94 | + //失去焦点 | ||
| 95 | + // _editingController.text = ''; | ||
| 96 | + } | ||
| 97 | + }); | ||
| 98 | + paymentF.addListener(() { | ||
| 99 | + if (moneyF.hasFocus) { | ||
| 100 | + //有焦点 | ||
| 101 | + if (showDateSelWidget) { | ||
| 102 | + Navigator.pop(context); | ||
| 103 | + showDateSelWidget = false; | ||
| 104 | + } | ||
| 105 | + } else { | ||
| 106 | + //失去焦点 | ||
| 107 | + // _editingController.text = ''; | ||
| 108 | + } | ||
| 109 | + }); | ||
| 110 | + receiptNumberF.addListener(() { | ||
| 111 | + if (moneyF.hasFocus) { | ||
| 112 | + //有焦点 | ||
| 113 | + if (showDateSelWidget) { | ||
| 114 | + Navigator.pop(context); | ||
| 115 | + showDateSelWidget = false; | ||
| 116 | + } | ||
| 117 | + } else { | ||
| 118 | + //失去焦点 | ||
| 119 | + // _editingController.text = ''; | ||
| 120 | + } | ||
| 121 | + }); | ||
| 122 | + | ||
| 123 | + WidgetsBinding.instance.addPostFrameCallback((_) { | ||
| 124 | + _getSellerUserBySellerid(); | ||
| 125 | + }); | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + ///获取经理数据 ---- 接单人---全部员工 | ||
| 129 | + | ||
| 130 | + _getSellerUserBySellerid() async { | ||
| 131 | + await feastModel.getAuthUserLists(context); | ||
| 132 | + if (widget.depositSunModel != null && | ||
| 133 | + widget.depositSunModel.nickName != null) { | ||
| 134 | + List sellerList = feastModel.sellerManageList.map((item) { | ||
| 135 | + return item.title; | ||
| 136 | + }).toList(); | ||
| 137 | + collectionPIndex = sellerList.indexOf(widget.depositSunModel.nickName); | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + _setBanquetDeposit() async { | ||
| 142 | + // if (moneyC.text.trim().length == 0) { | ||
| 143 | + // Utils.showToast('请输入金额'); | ||
| 144 | + // return; | ||
| 145 | + // } | ||
| 146 | + // Map<String, String> pramas = { | ||
| 147 | + // 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 148 | + // 'rid': widget.rid, | ||
| 149 | + // 'price': moneyC.text, | ||
| 150 | + // 'rname': paymentC.text, | ||
| 151 | + // 'collection_uid': collectionPIndex == null | ||
| 152 | + // ? null | ||
| 153 | + // : feastModel.sellerManageList[collectionPIndex].id, | ||
| 154 | + // 'rtime': paymentTime == '请选择' | ||
| 155 | + // ? null | ||
| 156 | + // : (DateUtil.getDateTime(paymentTime).millisecondsSinceEpoch / 1000) | ||
| 157 | + // .floor() | ||
| 158 | + // .toString(), | ||
| 159 | + // 'pay': payTypeIndex == null ? null : payType[payTypeIndex], | ||
| 160 | + // 'deposit_id': depositTypeIndex == null | ||
| 161 | + // ? null | ||
| 162 | + // : feastModel.depositData[depositTypeIndex].id, | ||
| 163 | + // 'no': receiptNumberC.text | ||
| 164 | + // }; | ||
| 165 | + // if (widget.depositSunModel != null) { | ||
| 166 | + // pramas['id'] = widget.depositSunModel.id; | ||
| 167 | + // } | ||
| 168 | + // bool success = await feastModel.setBanquetDeposit(context, pramas); | ||
| 169 | + // if (success) { | ||
| 170 | + // Navigator.pop(context); | ||
| 171 | + // bus.emit('feast_deposit_list'); | ||
| 172 | + // } | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + ///请输入 | ||
| 176 | + ///输入框 | ||
| 177 | + Widget _textfield( | ||
| 178 | + String title, | ||
| 179 | + String hintText, | ||
| 180 | + TextEditingController editingController, | ||
| 181 | + FocusNode focusNode, | ||
| 182 | + String subTitle, | ||
| 183 | + {TextInputType inputType = TextInputType.text}) { | ||
| 184 | + return Container( | ||
| 185 | + child: Row( | ||
| 186 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 187 | + children: [ | ||
| 188 | + Container( | ||
| 189 | + // color: Colors.red, | ||
| 190 | + width: ScreenUtil().setWidth(160), | ||
| 191 | + height: ScreenUtil().setWidth(35), | ||
| 192 | + child: Text( | ||
| 193 | + title, | ||
| 194 | + style: TextStyle( | ||
| 195 | + fontSize: ScreenUtil().setSp(28), | ||
| 196 | + color: MyColours.color_515151), | ||
| 197 | + ), | ||
| 198 | + ), | ||
| 199 | + HEmptyView(60), | ||
| 200 | + Expanded( | ||
| 201 | + child: Container( | ||
| 202 | + decoration: BoxDecoration( | ||
| 203 | + border: Border( | ||
| 204 | + bottom: BorderSide( | ||
| 205 | + width: h(1), color: MyColours.color_DBDBDB))), | ||
| 206 | + child: Row( | ||
| 207 | + children: [ | ||
| 208 | + Expanded( | ||
| 209 | + child: Container( | ||
| 210 | + // height: ScreenUtil().setHeight(120), | ||
| 211 | + height: ScreenUtil().setWidth(64), | ||
| 212 | + child: TextField( | ||
| 213 | + controller: editingController, | ||
| 214 | + // textAlign: TextAlign.right, | ||
| 215 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 216 | + maxLines: 1, | ||
| 217 | + inputFormatters: [], | ||
| 218 | + | ||
| 219 | + // //光标颜色 | ||
| 220 | + // cursorColor: | ||
| 221 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 222 | + //输入文本的样式 | ||
| 223 | + style: TextStyle( | ||
| 224 | + fontSize: ScreenUtil().setSp(32), | ||
| 225 | + ), | ||
| 226 | + focusNode: focusNode, | ||
| 227 | + decoration: InputDecoration( | ||
| 228 | + border: | ||
| 229 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 230 | + hintText: hintText, | ||
| 231 | + hintStyle: TextStyle( | ||
| 232 | + color: hintText == '请输入' | ||
| 233 | + ? MyColours.color_999999 | ||
| 234 | + : MyColours.color_515151, | ||
| 235 | + fontSize: ScreenUtil().setSp(28), | ||
| 236 | + ), | ||
| 237 | + contentPadding: EdgeInsets.zero, | ||
| 238 | + ), | ||
| 239 | + onChanged: (value) {}, | ||
| 240 | + onEditingComplete: () { | ||
| 241 | + FocusScope.of(context) | ||
| 242 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 243 | + }, | ||
| 244 | + keyboardType: inputType, | ||
| 245 | + )), | ||
| 246 | + ), | ||
| 247 | + Container( | ||
| 248 | + child: Text( | ||
| 249 | + subTitle, | ||
| 250 | + style: TextStyle( | ||
| 251 | + color: MyColours.color_515151, | ||
| 252 | + fontSize: ScreenUtil().setSp(28)), | ||
| 253 | + ), | ||
| 254 | + ), | ||
| 255 | + ], | ||
| 256 | + ), | ||
| 257 | + )) | ||
| 258 | + ], | ||
| 259 | + ), | ||
| 260 | + ); | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + ///请选择 | ||
| 264 | + Widget _selectWidget(String title, String labelShow, | ||
| 265 | + {GestureTapCallback onTap, bool need = true}) { | ||
| 266 | + return InkWell( | ||
| 267 | + onTap: onTap, | ||
| 268 | + // () { | ||
| 269 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 270 | + // DialogUtil.showSelectCusmanDialog( | ||
| 271 | + // context, | ||
| 272 | + // customerProvider.labelList.map((item) { | ||
| 273 | + // return item.label; | ||
| 274 | + // }).toList(), (value) { | ||
| 275 | + // if (value != null) { | ||
| 276 | + // setState(() { | ||
| 277 | + // customerProvider.labelSelIndex = | ||
| 278 | + // value.first; | ||
| 279 | + // labelShow = customerProvider | ||
| 280 | + // .labelList[ | ||
| 281 | + // customerProvider.labelSelIndex] | ||
| 282 | + // .label; | ||
| 283 | + // }); | ||
| 284 | + // } | ||
| 285 | + // }, | ||
| 286 | + // selecteds: | ||
| 287 | + // customerProvider.labelSelIndex == null | ||
| 288 | + // ? [] | ||
| 289 | + // : [ | ||
| 290 | + // customerProvider.labelSelIndex | ||
| 291 | + // ]) | ||
| 292 | + // .then((value) {}); | ||
| 293 | + // }, | ||
| 294 | + child: Row( | ||
| 295 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 296 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 297 | + children: [ | ||
| 298 | + Container( | ||
| 299 | + // color: Colors.red, | ||
| 300 | + width: ScreenUtil().setWidth(160), | ||
| 301 | + height: ScreenUtil().setWidth(35), | ||
| 302 | + child: Text( | ||
| 303 | + title, | ||
| 304 | + style: TextStyle( | ||
| 305 | + fontSize: ScreenUtil().setSp(28), | ||
| 306 | + color: MyColours.color_515151), | ||
| 307 | + ), | ||
| 308 | + ), | ||
| 309 | + HEmptyView(60), | ||
| 310 | + Expanded( | ||
| 311 | + child: Container( | ||
| 312 | + height: ScreenUtil().setWidth(64), | ||
| 313 | + decoration: BoxDecoration( | ||
| 314 | + border: Border( | ||
| 315 | + bottom: BorderSide( | ||
| 316 | + width: ScreenUtil().setWidth(2), | ||
| 317 | + color: Color.fromRGBO(220, 220, 220, 1)))), | ||
| 318 | + child: Row( | ||
| 319 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 320 | + children: [ | ||
| 321 | + Expanded( | ||
| 322 | + child: Text( | ||
| 323 | + labelShow, | ||
| 324 | + overflow: TextOverflow.ellipsis, | ||
| 325 | + style: TextStyle( | ||
| 326 | + color: labelShow == '请选择' | ||
| 327 | + ? MyColours.color_999999 | ||
| 328 | + : MyColours.color_515151, | ||
| 329 | + fontSize: ScreenUtil().setSp(28), | ||
| 330 | + ), | ||
| 331 | + )), | ||
| 332 | + HEmptyView(10), | ||
| 333 | + Image.asset( | ||
| 334 | + Utils.getImgPath('f_arrow_down'), | ||
| 335 | + width: ScreenUtil().setWidth(64), | ||
| 336 | + // height: ScreenUtil().setWidth(10), | ||
| 337 | + ), | ||
| 338 | + HEmptyView(16), | ||
| 339 | + ], | ||
| 340 | + ))), | ||
| 341 | + ], | ||
| 342 | + ), | ||
| 343 | + ); | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + Widget _callButton( | ||
| 347 | + {GestureTapCallback onPress, | ||
| 348 | + content, | ||
| 349 | + hasLeftBorder = true, | ||
| 350 | + isSelect = false}) { | ||
| 351 | + return InkWell( | ||
| 352 | + onTap: onPress, | ||
| 353 | + child: Container( | ||
| 354 | + height: h(48), | ||
| 355 | + decoration: BoxDecoration( | ||
| 356 | + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff, | ||
| 357 | + border: Border( | ||
| 358 | + bottom: BorderSide( | ||
| 359 | + color: MyColours.color_438E93, | ||
| 360 | + width: ScreenUtil().setWidth(2)), | ||
| 361 | + top: BorderSide( | ||
| 362 | + color: MyColours.color_438E93, | ||
| 363 | + width: ScreenUtil().setWidth(2)), | ||
| 364 | + left: hasLeftBorder | ||
| 365 | + ? BorderSide( | ||
| 366 | + color: MyColours.color_438E93, | ||
| 367 | + width: ScreenUtil().setWidth(2)) | ||
| 368 | + : BorderSide.none, | ||
| 369 | + right: BorderSide( | ||
| 370 | + color: MyColours.color_438E93, | ||
| 371 | + width: ScreenUtil().setWidth(2)))), | ||
| 372 | + child: Align( | ||
| 373 | + alignment: Alignment.center, | ||
| 374 | + child: Text( | ||
| 375 | + content, | ||
| 376 | + style: TextStyle( | ||
| 377 | + color: | ||
| 378 | + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93, | ||
| 379 | + fontSize: ScreenUtil().setSp(36)), | ||
| 380 | + ), | ||
| 381 | + ), | ||
| 382 | + ), | ||
| 383 | + ); | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + @override | ||
| 387 | + Widget build(BuildContext context) { | ||
| 388 | + feastModel = Provider.of<FeastModel>(context, listen: true); | ||
| 389 | + return Scaffold( | ||
| 390 | + backgroundColor: MyColours.color_ffffff, | ||
| 391 | + key: scaffoldKey, | ||
| 392 | + appBar: SystemAppBar( | ||
| 393 | + '添加定金', | ||
| 394 | + needWhite: true, | ||
| 395 | + bgColor: MyColours.color_438E93, | ||
| 396 | + titleColor: MyColours.color_F6F6F6, | ||
| 397 | + onTap: () { | ||
| 398 | + Navigator.pop(context); | ||
| 399 | + }, | ||
| 400 | + ), | ||
| 401 | + body: Column( | ||
| 402 | + children: [ | ||
| 403 | + Expanded( | ||
| 404 | + child: SingleChildScrollView( | ||
| 405 | + child: Padding( | ||
| 406 | + padding: EdgeInsets.only(left: w(30), right: w(13)), | ||
| 407 | + child: Column( | ||
| 408 | + children: [ | ||
| 409 | + VEmptyView(50), | ||
| 410 | + _textfield('金额', '请输入', moneyC, moneyF, '元', | ||
| 411 | + inputType: | ||
| 412 | + TextInputType.numberWithOptions(decimal: true)), | ||
| 413 | + VEmptyView(66), | ||
| 414 | + // _textfield('付款人', '请输入', paymentC, paymentF, '', | ||
| 415 | + // inputType: TextInputType.text), | ||
| 416 | + // VEmptyView(66), | ||
| 417 | + _selectWidget('收款人', collectionP, onTap: () { | ||
| 418 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 419 | + DialogUtil.showSelectCusmanDialog( | ||
| 420 | + context, | ||
| 421 | + feastModel.sellerManageList.map((item) { | ||
| 422 | + return item.title; | ||
| 423 | + }).toList(), (value) { | ||
| 424 | + if (value != null) { | ||
| 425 | + setState(() { | ||
| 426 | + collectionPIndex = value.first; | ||
| 427 | + collectionP = feastModel | ||
| 428 | + .sellerManageList[collectionPIndex].title; | ||
| 429 | + }); | ||
| 430 | + } | ||
| 431 | + }, | ||
| 432 | + cancelText: '', | ||
| 433 | + title: '选择收款人', | ||
| 434 | + selecteds: collectionPIndex == null | ||
| 435 | + ? [] | ||
| 436 | + : [collectionPIndex]) | ||
| 437 | + .then((value) {}); | ||
| 438 | + }), | ||
| 439 | + VEmptyView(66), | ||
| 440 | + _selectWidget('付款时间', paymentTime, onTap: () { | ||
| 441 | + FocusScope.of(context) | ||
| 442 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 443 | + //弹出时间选择器 | ||
| 444 | + // showPickerDateTime(context); | ||
| 445 | + showDateSelWidget = true; | ||
| 446 | + DialogUtil.showPickerDateTime24Feast( | ||
| 447 | + context, | ||
| 448 | + scaffoldKey, | ||
| 449 | + (value) { | ||
| 450 | + // {'text': picker.adapter.text, 'select': selecteds} | ||
| 451 | + if (value != null) { | ||
| 452 | + setState(() { | ||
| 453 | + print(value); | ||
| 454 | + paymentTime = DateUtil.formatDateStr(value, | ||
| 455 | + format: DateFormats.y_mo_d); | ||
| 456 | + }); | ||
| 457 | + } | ||
| 458 | + showDateSelWidget = false; | ||
| 459 | + }, | ||
| 460 | + pickerDateTimeType: PickerDateTimeType.kYMD, | ||
| 461 | + dateTime: DateUtil.getDateTime(paymentTime), | ||
| 462 | + cancelText: '', | ||
| 463 | + title: '选择付款时间', | ||
| 464 | + onCancel: () { | ||
| 465 | + showDateSelWidget = false; | ||
| 466 | + }); | ||
| 467 | + }), | ||
| 468 | + VEmptyView(66), | ||
| 469 | + _selectWidget('支付方式', paymentType, onTap: () { | ||
| 470 | + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 471 | + DialogUtil.showSelectCusmanDialog(context, payType, | ||
| 472 | + (value) { | ||
| 473 | + if (value != null) { | ||
| 474 | + setState(() { | ||
| 475 | + payTypeIndex = value.first; | ||
| 476 | + paymentType = payType[payTypeIndex]; | ||
| 477 | + }); | ||
| 478 | + } | ||
| 479 | + }, | ||
| 480 | + cancelText: '', | ||
| 481 | + title: '选择支付方式', | ||
| 482 | + selecteds: | ||
| 483 | + payTypeIndex == null ? [] : [payTypeIndex]) | ||
| 484 | + .then((value) {}); | ||
| 485 | + }), | ||
| 486 | + // VEmptyView(66), | ||
| 487 | + // _selectWidget('定金类型', depositType, onTap: () { | ||
| 488 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 489 | + // DialogUtil.showSelectCusmanDialog( | ||
| 490 | + // context, | ||
| 491 | + // feastModel.depositData.map((item) { | ||
| 492 | + // return item.dname; | ||
| 493 | + // }).toList(), (value) { | ||
| 494 | + // if (value != null) { | ||
| 495 | + // setState(() { | ||
| 496 | + // depositTypeIndex = value.first; | ||
| 497 | + // depositType = feastModel | ||
| 498 | + // .depositData[depositTypeIndex].dname; | ||
| 499 | + // }); | ||
| 500 | + // } | ||
| 501 | + // }, | ||
| 502 | + // cancelText: '', | ||
| 503 | + // title: '选择定金类型', | ||
| 504 | + // selecteds: depositTypeIndex == null | ||
| 505 | + // ? [] | ||
| 506 | + // : [depositTypeIndex]) | ||
| 507 | + // .then((value) {}); | ||
| 508 | + // }), | ||
| 509 | + VEmptyView(66), | ||
| 510 | + _textfield( | ||
| 511 | + '收据编号', '请输入', receiptNumberC, receiptNumberF, '', | ||
| 512 | + inputType: TextInputType.text), | ||
| 513 | + ], | ||
| 514 | + )), | ||
| 515 | + )), | ||
| 516 | + Container( | ||
| 517 | + padding: EdgeInsets.symmetric(horizontal: w(24), vertical: w(35)), | ||
| 518 | + child: Row( | ||
| 519 | + children: [ | ||
| 520 | + RoundButton( | ||
| 521 | + text: '取消', | ||
| 522 | + width: w(100), | ||
| 523 | + height: w(43), | ||
| 524 | + radius: r(5), | ||
| 525 | + fontSize: 32, | ||
| 526 | + isBold: true, | ||
| 527 | + gradientStart: MyColours.color_ffffff, | ||
| 528 | + gradientEnd: MyColours.color_ffffff, | ||
| 529 | + textColor: MyColours.color_438E93, | ||
| 530 | + borderColor: MyColours.color_438E93, | ||
| 531 | + onPressed: () { | ||
| 532 | + Navigator.pop(context); | ||
| 533 | + }, | ||
| 534 | + ), | ||
| 535 | + HEmptyView(24), | ||
| 536 | + Expanded( | ||
| 537 | + child: RoundButton( | ||
| 538 | + text: '保存并返回', | ||
| 539 | + height: w(43), | ||
| 540 | + radius: r(5), | ||
| 541 | + isBold: true, | ||
| 542 | + fontSize: 32, | ||
| 543 | + gradientStart: MyColours.color_438E93, | ||
| 544 | + gradientEnd: MyColours.color_438E93, | ||
| 545 | + textColor: MyColours.color_ffffff, | ||
| 546 | + borderColor: MyColours.color_438E93, | ||
| 547 | + onPressed: () { | ||
| 548 | + _setBanquetDeposit(); | ||
| 549 | + }, | ||
| 550 | + )), | ||
| 551 | + ], | ||
| 552 | + ), | ||
| 553 | + ) | ||
| 554 | + ], | ||
| 555 | + )); | ||
| 556 | + } | ||
| 557 | +} |
| @@ -4,6 +4,7 @@ import 'dart:io'; | @@ -4,6 +4,7 @@ import 'dart:io'; | ||
| 4 | import 'package:common_utils/common_utils.dart'; | 4 | import 'package:common_utils/common_utils.dart'; |
| 5 | import 'package:easy_contact_picker/easy_contact_picker.dart'; | 5 | import 'package:easy_contact_picker/easy_contact_picker.dart'; |
| 6 | import 'package:flutter/cupertino.dart'; | 6 | import 'package:flutter/cupertino.dart'; |
| 7 | +import 'package:flutter/gestures.dart'; | ||
| 7 | import 'package:flutter/material.dart'; | 8 | import 'package:flutter/material.dart'; |
| 8 | import 'package:flutter/services.dart'; | 9 | import 'package:flutter/services.dart'; |
| 9 | import 'package:flutter_picker/flutter_picker.dart'; | 10 | import 'package:flutter_picker/flutter_picker.dart'; |
| @@ -112,6 +113,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -112,6 +113,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 112 | FocusNode priceF = FocusNode(); | 113 | FocusNode priceF = FocusNode(); |
| 113 | 114 | ||
| 114 | CollectStoreProvider collectStoreProvider; | 115 | CollectStoreProvider collectStoreProvider; |
| 116 | + ScrollController controller = ScrollController(); | ||
| 115 | 117 | ||
| 116 | @override | 118 | @override |
| 117 | void initState() { | 119 | void initState() { |
| @@ -643,7 +645,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -643,7 +645,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 643 | ScreenUtil().setSp(32), | 645 | ScreenUtil().setSp(32), |
| 644 | fontWeight: FontWeight.normal, | 646 | fontWeight: FontWeight.normal, |
| 645 | decoration: TextDecoration.none, | 647 | decoration: TextDecoration.none, |
| 646 | - color: MyColours.color_333333)) | 648 | + color: MyColours.color_515151)) |
| 647 | ], | 649 | ], |
| 648 | ), | 650 | ), |
| 649 | value['title'] == '其他原因' && isShowTF | 651 | value['title'] == '其他原因' && isShowTF |
| @@ -828,7 +830,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -828,7 +830,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 828 | child: Text( | 830 | child: Text( |
| 829 | '备注', | 831 | '备注', |
| 830 | style: TextStyle( | 832 | style: TextStyle( |
| 831 | - color: MyColours.color_333333, | 833 | + color: MyColours.color_515151, |
| 832 | fontSize: ScreenUtil().setSp(32)), | 834 | fontSize: ScreenUtil().setSp(32)), |
| 833 | ), | 835 | ), |
| 834 | ), | 836 | ), |
| @@ -854,7 +856,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -854,7 +856,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 854 | focusNode: _cusdemNode, | 856 | focusNode: _cusdemNode, |
| 855 | autofocus: true, | 857 | autofocus: true, |
| 856 | style: TextStyle( | 858 | style: TextStyle( |
| 857 | - color: MyColours.color_333333, | 859 | + color: MyColours.color_515151, |
| 858 | fontSize: ScreenUtil().setSp(28), | 860 | fontSize: ScreenUtil().setSp(28), |
| 859 | textBaseline: TextBaseline.alphabetic), | 861 | textBaseline: TextBaseline.alphabetic), |
| 860 | textAlignVertical: TextAlignVertical.center, | 862 | textAlignVertical: TextAlignVertical.center, |
| @@ -958,7 +960,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -958,7 +960,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 958 | width: ScreenUtil().setWidth(180), | 960 | width: ScreenUtil().setWidth(180), |
| 959 | radius: ScreenUtil().setWidth(10), | 961 | radius: ScreenUtil().setWidth(10), |
| 960 | gradientStart: MyColours.color_ffffff, | 962 | gradientStart: MyColours.color_ffffff, |
| 961 | - textColor: MyColours.color_333333, | 963 | + textColor: MyColours.color_515151, |
| 962 | borderColor: MyColours.color_199095, | 964 | borderColor: MyColours.color_199095, |
| 963 | gradientEnd: MyColours.color_ffffff, | 965 | gradientEnd: MyColours.color_ffffff, |
| 964 | onPressed: () { | 966 | onPressed: () { |
| @@ -1267,6 +1269,350 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1267,6 +1269,350 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1267 | ); | 1269 | ); |
| 1268 | } | 1270 | } |
| 1269 | 1271 | ||
| 1272 | + Widget djTextType1(String title, String data, String per) { | ||
| 1273 | + return RichText( | ||
| 1274 | + textScaleFactor: 1, | ||
| 1275 | + overflow: TextOverflow.ellipsis, | ||
| 1276 | + // textDirection: TextDirection.ltr, | ||
| 1277 | + | ||
| 1278 | + text: TextSpan( | ||
| 1279 | + children: [ | ||
| 1280 | + TextSpan( | ||
| 1281 | + text: title, | ||
| 1282 | + style: TextStyle( | ||
| 1283 | + color: MyColours.color_999999, | ||
| 1284 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1285 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1286 | + TextSpan( | ||
| 1287 | + text: data, | ||
| 1288 | + style: TextStyle( | ||
| 1289 | + color: MyColours.color_E34D59, | ||
| 1290 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1291 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1292 | + TextSpan( | ||
| 1293 | + text: per, | ||
| 1294 | + style: TextStyle( | ||
| 1295 | + color: MyColours.color_515151, | ||
| 1296 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1297 | + //点击事件 | ||
| 1298 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1299 | + ], | ||
| 1300 | + )); | ||
| 1301 | + } | ||
| 1302 | + | ||
| 1303 | + Widget djText(String title, String per) { | ||
| 1304 | + return RichText( | ||
| 1305 | + textScaleFactor: 1, | ||
| 1306 | + overflow: TextOverflow.ellipsis, | ||
| 1307 | + // textDirection: TextDirection.ltr, | ||
| 1308 | + | ||
| 1309 | + text: TextSpan( | ||
| 1310 | + children: [ | ||
| 1311 | + TextSpan( | ||
| 1312 | + text: title, | ||
| 1313 | + style: TextStyle( | ||
| 1314 | + color: MyColours.color_999999, | ||
| 1315 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1316 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1317 | + TextSpan( | ||
| 1318 | + text: per, | ||
| 1319 | + style: TextStyle( | ||
| 1320 | + color: MyColours.color_515151, | ||
| 1321 | + fontSize: ScreenUtil().setSp(24)), | ||
| 1322 | + //点击事件 | ||
| 1323 | + recognizer: TapGestureRecognizer()..onTap = () {}), | ||
| 1324 | + ], | ||
| 1325 | + )); | ||
| 1326 | + } | ||
| 1327 | + | ||
| 1328 | + ///预订定金UI | ||
| 1329 | + Widget _deposit() { | ||
| 1330 | + return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ | ||
| 1331 | + VEmptyView(30), | ||
| 1332 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1333 | + VEmptyView(56), | ||
| 1334 | + Row( | ||
| 1335 | + children: [ | ||
| 1336 | + Text( | ||
| 1337 | + '预订订金', | ||
| 1338 | + overflow: TextOverflow.ellipsis, | ||
| 1339 | + style: TextStyle(color: MyColours.color_515151, fontSize: font(15)), | ||
| 1340 | + ), | ||
| 1341 | + Spacer(), | ||
| 1342 | + RoundButton( | ||
| 1343 | + text: '添加一项', | ||
| 1344 | + radius: r(11), | ||
| 1345 | + width: w(72), | ||
| 1346 | + height: w(22), | ||
| 1347 | + fontSize: 24, | ||
| 1348 | + textColor: MyColours.color_438E93, | ||
| 1349 | + isBold: false, | ||
| 1350 | + borderColor: MyColours.color_438E93, | ||
| 1351 | + gradientStart: MyColours.color_ffffff, | ||
| 1352 | + gradientEnd: MyColours.color_ffffff, | ||
| 1353 | + onPressed: () { | ||
| 1354 | + NavigatorUtil.goBookDepositPage(context, detailEntity.id); | ||
| 1355 | + }, | ||
| 1356 | + ), | ||
| 1357 | + ], | ||
| 1358 | + ), | ||
| 1359 | + ListView.builder( | ||
| 1360 | + padding: EdgeInsets.only(left: w(13), top: w(20)), | ||
| 1361 | + itemCount: 2, | ||
| 1362 | + shrinkWrap: true, | ||
| 1363 | + controller: controller, | ||
| 1364 | + itemBuilder: (BuildContext context, int index) { | ||
| 1365 | + // GetBanquetDepositSunModel data = | ||
| 1366 | + // feastModel.banquetDepositData[index]; | ||
| 1367 | + return InkWell( | ||
| 1368 | + onTap: () { | ||
| 1369 | + // NavigatorUtil.goFeastDepositPage(context, feastModel.rid, | ||
| 1370 | + // isNew: false, getBanquetDepositSunModel: data); | ||
| 1371 | + }, | ||
| 1372 | + child: Container( | ||
| 1373 | + height: w(85), | ||
| 1374 | + margin: EdgeInsets.only(bottom: w(10)), | ||
| 1375 | + decoration: BoxDecoration( | ||
| 1376 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 1377 | + border: Border.all( | ||
| 1378 | + width: w(1), color: MyColours.color_999999)), | ||
| 1379 | + child: Column(children: [ | ||
| 1380 | + Container( | ||
| 1381 | + height: w(24), | ||
| 1382 | + padding: EdgeInsets.only(left: w(16), right: w(8)), | ||
| 1383 | + decoration: BoxDecoration( | ||
| 1384 | + // color: MyColours.color_438E93, | ||
| 1385 | + // borderRadius: BorderRadius.only( | ||
| 1386 | + // topLeft: Radius.circular(r(4)), | ||
| 1387 | + // topRight: Radius.circular(r(4))), | ||
| 1388 | + border: Border( | ||
| 1389 | + bottom: BorderSide( | ||
| 1390 | + width: w(1), | ||
| 1391 | + color: MyColours.color_999999))), | ||
| 1392 | + child: Row( | ||
| 1393 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1394 | + children: [ | ||
| 1395 | + Text( | ||
| 1396 | + '收据编号 SJ000001', | ||
| 1397 | + // '收据编号 ${data.no == '0' ? '' : data.no}', | ||
| 1398 | + overflow: TextOverflow.ellipsis, | ||
| 1399 | + style: TextStyle( | ||
| 1400 | + color: MyColours.color_515151, | ||
| 1401 | + fontSize: font(14)), | ||
| 1402 | + ), | ||
| 1403 | + InkWell( | ||
| 1404 | + onTap: () { | ||
| 1405 | + //弹框确认是否删除 | ||
| 1406 | + DialogUtil.cupertinoAlertDialog(context, | ||
| 1407 | + title: "", | ||
| 1408 | + content: "是否确定删除?", | ||
| 1409 | + isBoldContent: true, | ||
| 1410 | + contentColor: MyColours.color_E6000000, | ||
| 1411 | + rTitle: "删除", rCallback: () { | ||
| 1412 | + // _delBanquetDeposit(data.id); | ||
| 1413 | + }); | ||
| 1414 | + }, | ||
| 1415 | + child: Image.asset( | ||
| 1416 | + Utils.getImgPath('delete_g'), | ||
| 1417 | + width: w(20), | ||
| 1418 | + )) | ||
| 1419 | + ], | ||
| 1420 | + ), | ||
| 1421 | + ), | ||
| 1422 | + Expanded( | ||
| 1423 | + child: Row( | ||
| 1424 | + mainAxisAlignment: MainAxisAlignment.start, | ||
| 1425 | + children: [ | ||
| 1426 | + HEmptyView(32), | ||
| 1427 | + Column( | ||
| 1428 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 1429 | + mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
| 1430 | + children: [ | ||
| 1431 | + djTextType1('定金金额 ', '200', ' 元'), | ||
| 1432 | + djText('支付方式 ', '现金'), | ||
| 1433 | + ], | ||
| 1434 | + ), | ||
| 1435 | + HEmptyView(140), | ||
| 1436 | + Column( | ||
| 1437 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 1438 | + mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
| 1439 | + children: [ | ||
| 1440 | + djText('付款时间 ', '2023-10-01'), | ||
| 1441 | + djText('收款人 ', 'cccc经理'), | ||
| 1442 | + // djText('收款人 ', | ||
| 1443 | + // '${data.nickName == null ? '' : data.nickName}'), | ||
| 1444 | + ], | ||
| 1445 | + ) | ||
| 1446 | + ], | ||
| 1447 | + )) | ||
| 1448 | + ]))); | ||
| 1449 | + }), | ||
| 1450 | + VEmptyView(20), | ||
| 1451 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1452 | + ]); | ||
| 1453 | + } | ||
| 1454 | + | ||
| 1455 | + ///核餐确认UI | ||
| 1456 | + Widget _verifyFood() { | ||
| 1457 | + return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ | ||
| 1458 | + VEmptyView(30), | ||
| 1459 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1460 | + VEmptyView(56), | ||
| 1461 | + Row( | ||
| 1462 | + children: [ | ||
| 1463 | + Text( | ||
| 1464 | + '核餐确认', | ||
| 1465 | + overflow: TextOverflow.ellipsis, | ||
| 1466 | + style: TextStyle(color: MyColours.color_515151, fontSize: font(15)), | ||
| 1467 | + ), | ||
| 1468 | + Spacer(), | ||
| 1469 | + RoundButton( | ||
| 1470 | + text: '添加一项', | ||
| 1471 | + radius: r(11), | ||
| 1472 | + width: w(72), | ||
| 1473 | + height: w(22), | ||
| 1474 | + fontSize: 24, | ||
| 1475 | + textColor: MyColours.color_438E93, | ||
| 1476 | + isBold: false, | ||
| 1477 | + borderColor: MyColours.color_438E93, | ||
| 1478 | + gradientStart: MyColours.color_ffffff, | ||
| 1479 | + gradientEnd: MyColours.color_ffffff, | ||
| 1480 | + onPressed: () { | ||
| 1481 | + NavigatorUtil.goVerifyFoodPage( | ||
| 1482 | + context, | ||
| 1483 | + ); | ||
| 1484 | + }, | ||
| 1485 | + ), | ||
| 1486 | + ], | ||
| 1487 | + ), | ||
| 1488 | + ListView.builder( | ||
| 1489 | + padding: EdgeInsets.only(left: w(13), top: w(20)), | ||
| 1490 | + itemCount: 3, | ||
| 1491 | + shrinkWrap: true, | ||
| 1492 | + controller: controller, | ||
| 1493 | + itemBuilder: (BuildContext context, int index) { | ||
| 1494 | + // GetBanquetDepositSunModel data = | ||
| 1495 | + // feastModel.banquetDepositData[index]; | ||
| 1496 | + return Container( | ||
| 1497 | + margin: EdgeInsets.only(bottom: w(10)), | ||
| 1498 | + child: Row( | ||
| 1499 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1500 | + children: [ | ||
| 1501 | + Text( | ||
| 1502 | + '未接通、已确认、待定', | ||
| 1503 | + overflow: TextOverflow.ellipsis, | ||
| 1504 | + style: TextStyle( | ||
| 1505 | + color: MyColours.color_515151, fontSize: font(14)), | ||
| 1506 | + ), | ||
| 1507 | + Text( | ||
| 1508 | + '张小娴 2023-12-16 15:23', | ||
| 1509 | + overflow: TextOverflow.ellipsis, | ||
| 1510 | + style: TextStyle( | ||
| 1511 | + color: MyColours.color_999999, fontSize: font(14)), | ||
| 1512 | + ), | ||
| 1513 | + ])); | ||
| 1514 | + }), | ||
| 1515 | + VEmptyView(20), | ||
| 1516 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1517 | + ]); | ||
| 1518 | + } | ||
| 1519 | + | ||
| 1520 | + ///订单操作UI | ||
| 1521 | + Widget _operatingRecord() { | ||
| 1522 | + return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ | ||
| 1523 | + VEmptyView(30), | ||
| 1524 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1525 | + VEmptyView(56), | ||
| 1526 | + Text( | ||
| 1527 | + '订单操作', | ||
| 1528 | + overflow: TextOverflow.ellipsis, | ||
| 1529 | + style: TextStyle(color: MyColours.color_515151, fontSize: font(15)), | ||
| 1530 | + ), | ||
| 1531 | + Container( | ||
| 1532 | + padding: EdgeInsets.only(left: w(13), top: w(20)), | ||
| 1533 | + child: | ||
| 1534 | + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ | ||
| 1535 | + Text( | ||
| 1536 | + '预订下单', | ||
| 1537 | + overflow: TextOverflow.ellipsis, | ||
| 1538 | + style: | ||
| 1539 | + TextStyle(color: MyColours.color_515151, fontSize: font(14)), | ||
| 1540 | + ), | ||
| 1541 | + Text( | ||
| 1542 | + '${detailEntity.place_order_name ?? ''} ${_getDateTime(detailEntity.cdate)}', | ||
| 1543 | + overflow: TextOverflow.ellipsis, | ||
| 1544 | + style: | ||
| 1545 | + TextStyle(color: MyColours.color_999999, fontSize: font(14)), | ||
| 1546 | + ), | ||
| 1547 | + ])), | ||
| 1548 | + Container( | ||
| 1549 | + padding: EdgeInsets.only(left: w(13), top: w(10)), | ||
| 1550 | + child: | ||
| 1551 | + Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ | ||
| 1552 | + Text( | ||
| 1553 | + '最后修改', | ||
| 1554 | + overflow: TextOverflow.ellipsis, | ||
| 1555 | + style: | ||
| 1556 | + TextStyle(color: MyColours.color_515151, fontSize: font(14)), | ||
| 1557 | + ), | ||
| 1558 | + HEmptyView(40), | ||
| 1559 | + Expanded( | ||
| 1560 | + child: Text( | ||
| 1561 | + '${detailEntity.nick_name ?? ''}' + | ||
| 1562 | + ' ' + | ||
| 1563 | + '${detailEntity.seller_user_phone ?? ''} xxxx时间/电话范德萨发顺丰?', | ||
| 1564 | + // overflow: TextOverflow.ellipsis, | ||
| 1565 | + style: | ||
| 1566 | + TextStyle(color: MyColours.color_999999, fontSize: font(14)), | ||
| 1567 | + )), | ||
| 1568 | + ])), | ||
| 1569 | + Offstage( | ||
| 1570 | + offstage: (detailEntity.status == "4" && detailEntity.cancel != null) | ||
| 1571 | + ? false | ||
| 1572 | + : true, | ||
| 1573 | + child: Column(children: <Widget>[ | ||
| 1574 | + Container( | ||
| 1575 | + padding: EdgeInsets.only(left: w(13), top: w(10)), | ||
| 1576 | + child: Row( | ||
| 1577 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1578 | + children: [ | ||
| 1579 | + Text( | ||
| 1580 | + '取消预订', | ||
| 1581 | + overflow: TextOverflow.ellipsis, | ||
| 1582 | + style: TextStyle( | ||
| 1583 | + color: MyColours.color_515151, fontSize: font(14)), | ||
| 1584 | + ), | ||
| 1585 | + Text( | ||
| 1586 | + '${detailEntity.abolition == '2' ? '顾客在线取消' : detailEntity.cancel?.uname ?? ""} ${detailEntity.cancel?.cdateStr ?? ""}', | ||
| 1587 | + overflow: TextOverflow.ellipsis, | ||
| 1588 | + style: TextStyle( | ||
| 1589 | + color: MyColours.color_999999, fontSize: font(14)), | ||
| 1590 | + ), | ||
| 1591 | + ])), | ||
| 1592 | + Container( | ||
| 1593 | + padding: EdgeInsets.only(left: w(13), top: w(10)), | ||
| 1594 | + child: Row( | ||
| 1595 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1596 | + children: [ | ||
| 1597 | + Text( | ||
| 1598 | + '取消原因', | ||
| 1599 | + overflow: TextOverflow.ellipsis, | ||
| 1600 | + style: TextStyle( | ||
| 1601 | + color: MyColours.color_515151, fontSize: font(14)), | ||
| 1602 | + ), | ||
| 1603 | + Text( | ||
| 1604 | + detailEntity.cancel?.desc ?? "", | ||
| 1605 | + overflow: TextOverflow.ellipsis, | ||
| 1606 | + style: TextStyle( | ||
| 1607 | + color: MyColours.color_999999, fontSize: font(14)), | ||
| 1608 | + ), | ||
| 1609 | + ])) | ||
| 1610 | + ])), | ||
| 1611 | + VEmptyView(20), | ||
| 1612 | + MyDivider(double.infinity, w(0.5), color: MyColours.color_BFC4D4), | ||
| 1613 | + ]); | ||
| 1614 | + } | ||
| 1615 | + | ||
| 1270 | @override | 1616 | @override |
| 1271 | Widget build(BuildContext context) { | 1617 | Widget build(BuildContext context) { |
| 1272 | if (MediaQuery.of(context).viewInsets.bottom == 0) { | 1618 | if (MediaQuery.of(context).viewInsets.bottom == 0) { |
| @@ -1341,6 +1687,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1341,6 +1687,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1341 | child: Container( | 1687 | child: Container( |
| 1342 | color: MyColours.color_ffffff, | 1688 | color: MyColours.color_ffffff, |
| 1343 | child: SingleChildScrollView( | 1689 | child: SingleChildScrollView( |
| 1690 | + controller: controller, | ||
| 1344 | child: Container( | 1691 | child: Container( |
| 1345 | color: MyColours.color_ffffff, | 1692 | color: MyColours.color_ffffff, |
| 1346 | padding: EdgeInsets.symmetric( | 1693 | padding: EdgeInsets.symmetric( |
| @@ -1367,7 +1714,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1367,7 +1714,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1367 | '预订桌位', | 1714 | '预订桌位', |
| 1368 | style: TextStyle( | 1715 | style: TextStyle( |
| 1369 | color: MyColours | 1716 | color: MyColours |
| 1370 | - .color_333333, | 1717 | + .color_515151, |
| 1371 | fontSize: ScreenUtil() | 1718 | fontSize: ScreenUtil() |
| 1372 | .setSp(30)), | 1719 | .setSp(30)), |
| 1373 | ), | 1720 | ), |
| @@ -1457,7 +1804,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1457,7 +1804,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1457 | RowMultiText( | 1804 | RowMultiText( |
| 1458 | "预订日期", detailEntity.ddateF, | 1805 | "预订日期", detailEntity.ddateF, |
| 1459 | textColor: | 1806 | textColor: |
| 1460 | - MyColours.color_333333), | 1807 | + MyColours.color_515151), |
| 1461 | 1808 | ||
| 1462 | Row( | 1809 | Row( |
| 1463 | children: [ | 1810 | children: [ |
| @@ -1466,7 +1813,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1466,7 +1813,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1466 | child: RowMultiText("时段", | 1813 | child: RowMultiText("时段", |
| 1467 | detailEntity.ddateSolt, | 1814 | detailEntity.ddateSolt, |
| 1468 | textColor: MyColours | 1815 | textColor: MyColours |
| 1469 | - .color_333333)), | 1816 | + .color_515151)), |
| 1470 | HEmptyView(60), | 1817 | HEmptyView(60), |
| 1471 | Expanded( | 1818 | Expanded( |
| 1472 | flex: 1, | 1819 | flex: 1, |
| @@ -1661,7 +2008,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1661,7 +2008,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1661 | RowMultiText("下单人", | 2008 | RowMultiText("下单人", |
| 1662 | '${detailEntity.place_order_name ?? ''}', | 2009 | '${detailEntity.place_order_name ?? ''}', |
| 1663 | textColor: MyColours | 2010 | textColor: MyColours |
| 1664 | - .color_333333), | 2011 | + .color_515151), |
| 1665 | // Offstage( | 2012 | // Offstage( |
| 1666 | // offstage: detailEntity | 2013 | // offstage: detailEntity |
| 1667 | // .nick_name == | 2014 | // .nick_name == |
| @@ -1676,7 +2023,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1676,7 +2023,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1676 | ' ' + | 2023 | ' ' + |
| 1677 | '${detailEntity.seller_user_phone ?? ''}', | 2024 | '${detailEntity.seller_user_phone ?? ''}', |
| 1678 | textColor: MyColours | 2025 | textColor: MyColours |
| 1679 | - .color_333333), | 2026 | + .color_515151), |
| 1680 | // ), | 2027 | // ), |
| 1681 | ], | 2028 | ], |
| 1682 | ), | 2029 | ), |
| @@ -1697,13 +2044,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1697,13 +2044,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1697 | _getDateTime( | 2044 | _getDateTime( |
| 1698 | detailEntity.cdate), | 2045 | detailEntity.cdate), |
| 1699 | textColor: | 2046 | textColor: |
| 1700 | - MyColours.color_333333), | 2047 | + MyColours.color_515151), |
| 1701 | detailEntity.cusdem != null && | 2048 | detailEntity.cusdem != null && |
| 1702 | detailEntity.cusdem != '' | 2049 | detailEntity.cusdem != '' |
| 1703 | ? RowMultiText( | 2050 | ? RowMultiText( |
| 1704 | "备注", detailEntity.cusdem, | 2051 | "备注", detailEntity.cusdem, |
| 1705 | textColor: | 2052 | textColor: |
| 1706 | - MyColours.color_333333) | 2053 | + MyColours.color_515151) |
| 1707 | : TitleAndBtn( | 2054 | : TitleAndBtn( |
| 1708 | title: "备注", | 2055 | title: "备注", |
| 1709 | uid: widget.uid, | 2056 | uid: widget.uid, |
| @@ -1744,14 +2091,14 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1744,14 +2091,14 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1744 | "", | 2091 | "", |
| 1745 | textAlign: TextAlign.left, | 2092 | textAlign: TextAlign.left, |
| 1746 | textColor: MyColours | 2093 | textColor: MyColours |
| 1747 | - .color_333333), | 2094 | + .color_515151), |
| 1748 | RowMultiText( | 2095 | RowMultiText( |
| 1749 | "取消时间", | 2096 | "取消时间", |
| 1750 | detailEntity.cancel | 2097 | detailEntity.cancel |
| 1751 | ?.cdateStr ?? | 2098 | ?.cdateStr ?? |
| 1752 | "", | 2099 | "", |
| 1753 | textColor: MyColours | 2100 | textColor: MyColours |
| 1754 | - .color_333333), | 2101 | + .color_515151), |
| 1755 | RowMultiText( | 2102 | RowMultiText( |
| 1756 | "操作人", | 2103 | "操作人", |
| 1757 | detailEntity.abolition == | 2104 | detailEntity.abolition == |
| @@ -1761,7 +2108,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1761,7 +2108,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1761 | ?.uname ?? | 2108 | ?.uname ?? |
| 1762 | "", | 2109 | "", |
| 1763 | textColor: MyColours | 2110 | textColor: MyColours |
| 1764 | - .color_333333), | 2111 | + .color_515151), |
| 1765 | ], | 2112 | ], |
| 1766 | ), | 2113 | ), |
| 1767 | ), | 2114 | ), |
| @@ -1804,7 +2151,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -1804,7 +2151,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 1804 | "发票抬头", | 2151 | "发票抬头", |
| 1805 | style: TextStyle( | 2152 | style: TextStyle( |
| 1806 | color: MyColours | 2153 | color: MyColours |
| 1807 | - .color_333333, | 2154 | + .color_515151, |
| 1808 | fontSize: | 2155 | fontSize: |
| 1809 | ScreenUtil() | 2156 | ScreenUtil() |
| 1810 | .setSp( | 2157 | .setSp( |
| @@ -2379,7 +2726,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2379,7 +2726,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2379 | // gradientStart: | 2726 | // gradientStart: |
| 2380 | // MyColours.color_ffffff, | 2727 | // MyColours.color_ffffff, |
| 2381 | // textColor: | 2728 | // textColor: |
| 2382 | - // MyColours.color_333333, | 2729 | + // MyColours.color_515151, |
| 2383 | // borderColor: | 2730 | // borderColor: |
| 2384 | // MyColours.color_199095, | 2731 | // MyColours.color_199095, |
| 2385 | // gradientEnd: | 2732 | // gradientEnd: |
| @@ -2522,12 +2869,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2522,12 +2869,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2522 | // children: [ | 2869 | // children: [ |
| 2523 | // Text( | 2870 | // Text( |
| 2524 | // detailModel.userHistorys[index].phone, | 2871 | // detailModel.userHistorys[index].phone, |
| 2525 | - // style: TextStyle(color: MyColours.color_333333, fontSize: ScreenUtil().setSp(32)), | 2872 | + // style: TextStyle(color: MyColours.color_515151, fontSize: ScreenUtil().setSp(32)), |
| 2526 | // ), | 2873 | // ), |
| 2527 | // Expanded( | 2874 | // Expanded( |
| 2528 | // child: Text( | 2875 | // child: Text( |
| 2529 | // detailModel.userHistorys[index].rname, | 2876 | // detailModel.userHistorys[index].rname, |
| 2530 | - // style: TextStyle(color: MyColours.color_333333, fontSize: ScreenUtil().setSp(32)), | 2877 | + // style: TextStyle(color: MyColours.color_515151, fontSize: ScreenUtil().setSp(32)), |
| 2531 | // )) | 2878 | // )) |
| 2532 | // ], | 2879 | // ], |
| 2533 | // ), | 2880 | // ), |
| @@ -2566,7 +2913,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2566,7 +2913,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2566 | : detailEntity | 2913 | : detailEntity |
| 2567 | .rnameStr, | 2914 | .rnameStr, |
| 2568 | textColor: MyColours | 2915 | textColor: MyColours |
| 2569 | - .color_333333), | 2916 | + .color_515151), |
| 2570 | (detailEntity.status == | 2917 | (detailEntity.status == |
| 2571 | "4" && | 2918 | "4" && |
| 2572 | detailEntity | 2919 | detailEntity |
| @@ -2624,9 +2971,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2624,9 +2971,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2624 | : Utils.starPhone(detailEntity | 2971 | : Utils.starPhone(detailEntity |
| 2625 | .phone), | 2972 | .phone), |
| 2626 | textColor: MyColours | 2973 | textColor: MyColours |
| 2627 | - .color_333333)) | 2974 | + .color_515151)) |
| 2628 | ], | 2975 | ], |
| 2629 | - ) | 2976 | + ), |
| 2977 | + | ||
| 2978 | + _deposit(), | ||
| 2979 | + _verifyFood(), | ||
| 2980 | + _operatingRecord(), | ||
| 2630 | 2981 | ||
| 2631 | // InkWell( | 2982 | // InkWell( |
| 2632 | // onTap: () { | 2983 | // onTap: () { |
| @@ -2668,7 +3019,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2668,7 +3019,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2668 | // formatPhone) | 3019 | // formatPhone) |
| 2669 | // : formatPhone, | 3020 | // : formatPhone, |
| 2670 | // textColor: | 3021 | // textColor: |
| 2671 | - // MyColours.color_333333), | 3022 | + // MyColours.color_515151), |
| 2672 | // ), | 3023 | // ), |
| 2673 | 3024 | ||
| 2674 | // Container( | 3025 | // Container( |
| @@ -2686,7 +3037,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2686,7 +3037,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2686 | // "客户经理", | 3037 | // "客户经理", |
| 2687 | // style: TextStyle( | 3038 | // style: TextStyle( |
| 2688 | // color: MyColours | 3039 | // color: MyColours |
| 2689 | - // .color_333333, | 3040 | + // .color_515151, |
| 2690 | // fontSize: ScreenUtil() | 3041 | // fontSize: ScreenUtil() |
| 2691 | // .setSp(30)), | 3042 | // .setSp(30)), |
| 2692 | // ), | 3043 | // ), |
| @@ -3730,7 +4081,7 @@ class TitleAndBtn extends StatelessWidget { | @@ -3730,7 +4081,7 @@ class TitleAndBtn extends StatelessWidget { | ||
| 3730 | child: Text( | 4081 | child: Text( |
| 3731 | title, | 4082 | title, |
| 3732 | style: TextStyle( | 4083 | style: TextStyle( |
| 3733 | - color: MyColours.color_333333, | 4084 | + color: MyColours.color_515151, |
| 3734 | fontSize: ScreenUtil().setSp(30)), | 4085 | fontSize: ScreenUtil().setSp(30)), |
| 3735 | ), | 4086 | ), |
| 3736 | ), | 4087 | ), |
| @@ -3981,7 +4332,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> | @@ -3981,7 +4332,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> | ||
| 3981 | child: Text( | 4332 | child: Text( |
| 3982 | widget.title, | 4333 | widget.title, |
| 3983 | style: TextStyle( | 4334 | style: TextStyle( |
| 3984 | - color: MyColours.color_333333, | 4335 | + color: MyColours.color_515151, |
| 3985 | fontSize: ScreenUtil().setSp(30)), | 4336 | fontSize: ScreenUtil().setSp(30)), |
| 3986 | ), | 4337 | ), |
| 3987 | ), | 4338 | ), |
lib/pages/detail/verify_food_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 3 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 4 | + | ||
| 5 | +import '../../res/colors.dart'; | ||
| 6 | +import '../../utils/screen_util.dart'; | ||
| 7 | +import '../../utils/utils.dart'; | ||
| 8 | +import '../../widgets/h_empty_view.dart'; | ||
| 9 | +import '../../widgets/round_button.dart'; | ||
| 10 | +import '../../widgets/v_empty_view.dart'; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 核餐页面 | ||
| 14 | + * */ | ||
| 15 | +class VerifyFoodPage extends StatefulWidget { | ||
| 16 | + VerifyFoodPage({Key key}) : super(key: key); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + _VerifyFoodPageState createState() => _VerifyFoodPageState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _VerifyFoodPageState extends State<VerifyFoodPage> { | ||
| 23 | + bool confirmed = true; //已确认 | ||
| 24 | + bool connected = false; //未接通 | ||
| 25 | + bool undetermined = false; //待定 | ||
| 26 | + | ||
| 27 | + TextEditingController customController = TextEditingController(); | ||
| 28 | + FocusNode _cusdemNode = FocusNode(); | ||
| 29 | + | ||
| 30 | + _itemRadioWidget(bool select, String title, {GestureTapCallback onTap}) { | ||
| 31 | + return InkWell( | ||
| 32 | + onTap: onTap, | ||
| 33 | + child: Row(children: [ | ||
| 34 | + Image.asset( | ||
| 35 | + Utils.getImgPath( | ||
| 36 | + select ? 'plan_dish_select' : 'plan_dish_unselect'), | ||
| 37 | + width: w(20), | ||
| 38 | + ), | ||
| 39 | + HEmptyView(6), | ||
| 40 | + Text( | ||
| 41 | + title, | ||
| 42 | + style: TextStyle(color: MyColours.color_515151, fontSize: font(16)), | ||
| 43 | + ), | ||
| 44 | + ])); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @override | ||
| 48 | + Widget build(BuildContext context) { | ||
| 49 | + return Scaffold( | ||
| 50 | + backgroundColor: MyColours.color_ffffff, | ||
| 51 | + appBar: SystemAppBar('核餐确认'), | ||
| 52 | + body: Column( | ||
| 53 | + children: [ | ||
| 54 | + Expanded( | ||
| 55 | + child: SingleChildScrollView( | ||
| 56 | + child: Padding( | ||
| 57 | + padding: EdgeInsets.symmetric(horizontal: w(16), vertical: w(24)), | ||
| 58 | + child: Column( | ||
| 59 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 60 | + children: [ | ||
| 61 | + Row( | ||
| 62 | + children: [ | ||
| 63 | + _itemRadioWidget(confirmed, '已确认', onTap: () { | ||
| 64 | + if (!confirmed) { | ||
| 65 | + setState(() { | ||
| 66 | + confirmed = true; | ||
| 67 | + | ||
| 68 | + connected = false; | ||
| 69 | + undetermined = false; | ||
| 70 | + }); | ||
| 71 | + } | ||
| 72 | + }), | ||
| 73 | + Spacer(), | ||
| 74 | + _itemRadioWidget(connected, '未接通', onTap: () { | ||
| 75 | + if (!connected) { | ||
| 76 | + setState(() { | ||
| 77 | + connected = true; | ||
| 78 | + | ||
| 79 | + confirmed = false; | ||
| 80 | + undetermined = false; | ||
| 81 | + }); | ||
| 82 | + } | ||
| 83 | + }), | ||
| 84 | + Spacer(), | ||
| 85 | + _itemRadioWidget(undetermined, '待定', onTap: () { | ||
| 86 | + if (!undetermined) { | ||
| 87 | + setState(() { | ||
| 88 | + undetermined = true; | ||
| 89 | + connected = false; | ||
| 90 | + confirmed = false; | ||
| 91 | + }); | ||
| 92 | + } | ||
| 93 | + }), | ||
| 94 | + ], | ||
| 95 | + ), | ||
| 96 | + VEmptyView(40), | ||
| 97 | + | ||
| 98 | + Text( | ||
| 99 | + '备注', | ||
| 100 | + style: TextStyle( | ||
| 101 | + color: MyColours.color_515151, fontSize: font(15)), | ||
| 102 | + ), | ||
| 103 | + | ||
| 104 | + VEmptyView(30), | ||
| 105 | + //输入框 | ||
| 106 | + Container( | ||
| 107 | + width: double.infinity, | ||
| 108 | + padding: | ||
| 109 | + EdgeInsets.symmetric(horizontal: w(10), vertical: w(10)), | ||
| 110 | + alignment: Alignment.topLeft, | ||
| 111 | + decoration: BoxDecoration( | ||
| 112 | + color: MyColours.color_ffffff, | ||
| 113 | + border: Border.all( | ||
| 114 | + color: MyColours.color_DBDBDB, width: w(1)), | ||
| 115 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 116 | + child: TextField( | ||
| 117 | + controller: customController, | ||
| 118 | + focusNode: _cusdemNode, | ||
| 119 | + style: TextStyle( | ||
| 120 | + color: MyColours.color_333333, | ||
| 121 | + fontSize: font(14), | ||
| 122 | + textBaseline: TextBaseline.alphabetic), | ||
| 123 | + textAlignVertical: TextAlignVertical.center, | ||
| 124 | + maxLines: 5, | ||
| 125 | + maxLength: 100, | ||
| 126 | + decoration: InputDecoration( | ||
| 127 | + hintText: "请输入备注或点击快捷选择标签", | ||
| 128 | + hintStyle: TextStyle( | ||
| 129 | + color: MyColours.color_979797, | ||
| 130 | + fontSize: font(14), | ||
| 131 | + ), | ||
| 132 | + contentPadding: EdgeInsets.zero, | ||
| 133 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 134 | + ), | ||
| 135 | + keyboardType: TextInputType.text, | ||
| 136 | + onChanged: (value) { | ||
| 137 | + // setState(() { | ||
| 138 | + // currentRemark = value ?? ""; | ||
| 139 | + // }); | ||
| 140 | + // if (value.length < currRemark.length && | ||
| 141 | + // currRemark.substring(value.length) != ',') { | ||
| 142 | + // setState(() { | ||
| 143 | + // currRemark = value ?? ""; | ||
| 144 | + // }); | ||
| 145 | + // if (sum == 0) { | ||
| 146 | + // for (int i = 0; i < remarks.length; i++) { | ||
| 147 | + // if (remarks[i].isSelect && | ||
| 148 | + // remarks[i].remark == selectItem.last) { | ||
| 149 | + // setState(() { | ||
| 150 | + // remarks[i].isSelect = false; | ||
| 151 | + // }); | ||
| 152 | + // } | ||
| 153 | + // } | ||
| 154 | + // } | ||
| 155 | + // sum++; | ||
| 156 | + // if (sum == selectItem.last.length || | ||
| 157 | + // selectItem.length == 1 || | ||
| 158 | + // selectItem.length == 0) { | ||
| 159 | + // selectItem.removeLast(); | ||
| 160 | + // sum = 0; | ||
| 161 | + // } | ||
| 162 | + // } else { | ||
| 163 | + // setState(() { | ||
| 164 | + // currRemark = value ?? ""; | ||
| 165 | + // }); | ||
| 166 | + // } | ||
| 167 | + }), | ||
| 168 | + ), | ||
| 169 | + VEmptyView(20), | ||
| 170 | + MyDivider( | ||
| 171 | + double.infinity, | ||
| 172 | + w(0.5), | ||
| 173 | + color: MyColours.color_BFC4D4, | ||
| 174 | + ), | ||
| 175 | + VEmptyView(30), | ||
| 176 | + Container( | ||
| 177 | + margin: EdgeInsets.only(bottom: w(10)), | ||
| 178 | + child: Row( | ||
| 179 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 180 | + children: [ | ||
| 181 | + Text( | ||
| 182 | + '未接通、已确认、待定', | ||
| 183 | + overflow: TextOverflow.ellipsis, | ||
| 184 | + style: TextStyle( | ||
| 185 | + color: MyColours.color_515151, | ||
| 186 | + fontSize: font(14)), | ||
| 187 | + ), | ||
| 188 | + Text( | ||
| 189 | + '张小娴 2023-12-16 15:23', | ||
| 190 | + overflow: TextOverflow.ellipsis, | ||
| 191 | + style: TextStyle( | ||
| 192 | + color: MyColours.color_999999, | ||
| 193 | + fontSize: font(14)), | ||
| 194 | + ), | ||
| 195 | + ])) | ||
| 196 | + ], | ||
| 197 | + ), | ||
| 198 | + ))), | ||
| 199 | + Container( | ||
| 200 | + padding: EdgeInsets.symmetric(horizontal: w(24), vertical: w(35)), | ||
| 201 | + child: Row( | ||
| 202 | + children: [ | ||
| 203 | + RoundButton( | ||
| 204 | + text: '取消', | ||
| 205 | + width: w(100), | ||
| 206 | + height: w(43), | ||
| 207 | + radius: r(5), | ||
| 208 | + fontSize: 32, | ||
| 209 | + isBold: true, | ||
| 210 | + gradientStart: MyColours.color_ffffff, | ||
| 211 | + gradientEnd: MyColours.color_ffffff, | ||
| 212 | + textColor: MyColours.color_438E93, | ||
| 213 | + borderColor: MyColours.color_438E93, | ||
| 214 | + onPressed: () { | ||
| 215 | + Navigator.pop(context); | ||
| 216 | + }, | ||
| 217 | + ), | ||
| 218 | + HEmptyView(24), | ||
| 219 | + Expanded( | ||
| 220 | + child: RoundButton( | ||
| 221 | + text: '保存', | ||
| 222 | + height: w(43), | ||
| 223 | + radius: r(5), | ||
| 224 | + isBold: true, | ||
| 225 | + fontSize: 32, | ||
| 226 | + gradientStart: MyColours.color_438E93, | ||
| 227 | + gradientEnd: MyColours.color_438E93, | ||
| 228 | + textColor: MyColours.color_ffffff, | ||
| 229 | + borderColor: MyColours.color_438E93, | ||
| 230 | + onPressed: () { | ||
| 231 | + // _setBanquetDeposit(); | ||
| 232 | + }, | ||
| 233 | + )), | ||
| 234 | + ], | ||
| 235 | + ), | ||
| 236 | + ) | ||
| 237 | + ], | ||
| 238 | + ), | ||
| 239 | + ); | ||
| 240 | + } | ||
| 241 | +} |
| @@ -27,6 +27,7 @@ import 'package:sqflite/sqlite_api.dart'; | @@ -27,6 +27,7 @@ import 'package:sqflite/sqlite_api.dart'; | ||
| 27 | 27 | ||
| 28 | import '../app.dart'; | 28 | import '../app.dart'; |
| 29 | import '../models/IsExamineModel.dart'; | 29 | import '../models/IsExamineModel.dart'; |
| 30 | +import '../models/book_deposit_model.dart'; | ||
| 30 | import '../models/get_banquet_by_id_new_model.dart'; | 31 | import '../models/get_banquet_by_id_new_model.dart'; |
| 31 | import '../models/get_banquet_deposit_model.dart'; | 32 | import '../models/get_banquet_deposit_model.dart'; |
| 32 | import '../models/menu_unit_model.dart'; | 33 | import '../models/menu_unit_model.dart'; |
| @@ -1849,4 +1850,23 @@ class NavigatorUtil { | @@ -1849,4 +1850,23 @@ class NavigatorUtil { | ||
| 1849 | "${Routes.invitation_theme_home_preview_page}?themeSunModel=${FluroConvertUtils.object2string(themeSunModel)}", | 1850 | "${Routes.invitation_theme_home_preview_page}?themeSunModel=${FluroConvertUtils.object2string(themeSunModel)}", |
| 1850 | replace: replace); | 1851 | replace: replace); |
| 1851 | } | 1852 | } |
| 1853 | + | ||
| 1854 | + ///预订----添加定金 | ||
| 1855 | + static Future<dynamic> goBookDepositPage(BuildContext context, String rid, | ||
| 1856 | + {replace = false, | ||
| 1857 | + bool onlyShow = false, | ||
| 1858 | + bool isNew = true, | ||
| 1859 | + BookDepositSunModel bookDepositModel}) { | ||
| 1860 | + return _navigateTo(context, | ||
| 1861 | + "${Routes.book_deposit_page}?rid=$rid&bookDepositModel=${FluroConvertUtils.object2string(bookDepositModel)}&isNew=$isNew", | ||
| 1862 | + replace: replace); | ||
| 1863 | + } | ||
| 1864 | + | ||
| 1865 | + ///预订----核餐确认 | ||
| 1866 | + static Future<dynamic> goVerifyFoodPage( | ||
| 1867 | + BuildContext context, { | ||
| 1868 | + replace = false, | ||
| 1869 | + }) { | ||
| 1870 | + return _navigateTo(context, "${Routes.verify_food_page}", replace: replace); | ||
| 1871 | + } | ||
| 1852 | } | 1872 | } |
| @@ -154,6 +154,7 @@ import 'package:one_key/utils/utils.dart'; | @@ -154,6 +154,7 @@ import 'package:one_key/utils/utils.dart'; | ||
| 154 | import 'package:provider/provider.dart'; | 154 | import 'package:provider/provider.dart'; |
| 155 | 155 | ||
| 156 | import '../models/IsExamineModel.dart'; | 156 | import '../models/IsExamineModel.dart'; |
| 157 | +import '../models/book_deposit_model.dart'; | ||
| 157 | import '../models/get_banquet_by_id_new_model.dart'; | 158 | import '../models/get_banquet_by_id_new_model.dart'; |
| 158 | import '../models/menu_unit_model.dart'; | 159 | import '../models/menu_unit_model.dart'; |
| 159 | import '../models/month_statics_model.dart'; | 160 | import '../models/month_statics_model.dart'; |
| @@ -168,6 +169,8 @@ import '../models/wine_manage_model.dart'; | @@ -168,6 +169,8 @@ import '../models/wine_manage_model.dart'; | ||
| 168 | import '../pages/coupon/coupon_setting_page.dart'; | 169 | import '../pages/coupon/coupon_setting_page.dart'; |
| 169 | import '../pages/coupon/coupon_verification_detail_page.dart'; | 170 | import '../pages/coupon/coupon_verification_detail_page.dart'; |
| 170 | import '../pages/coupon/verification_coupon_page.dart'; | 171 | import '../pages/coupon/verification_coupon_page.dart'; |
| 172 | +import '../pages/detail/book_deposit_page.dart'; | ||
| 173 | +import '../pages/detail/verify_food_page.dart'; | ||
| 171 | import '../pages/feast/feast_board.dart'; | 174 | import '../pages/feast/feast_board.dart'; |
| 172 | import '../pages/feast/feast_create_page.dart'; | 175 | import '../pages/feast/feast_create_page.dart'; |
| 173 | import '../pages/feast/feast_deposit_data_page.dart'; | 176 | import '../pages/feast/feast_deposit_data_page.dart'; |
| @@ -3117,7 +3120,7 @@ var invitationThemeHomePageHandle = new Handler( | @@ -3117,7 +3120,7 @@ var invitationThemeHomePageHandle = new Handler( | ||
| 3117 | }); | 3120 | }); |
| 3118 | 3121 | ||
| 3119 | //邀请函主题选择预览 | 3122 | //邀请函主题选择预览 |
| 3120 | -var invitationThemeHomePreviewPage = new Handler( | 3123 | +var invitationThemeHomePreviewPageHandle = new Handler( |
| 3121 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 3124 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 3122 | // String year = params["year"].first; | 3125 | // String year = params["year"].first; |
| 3123 | // String month = params["month"].first; | 3126 | // String month = params["month"].first; |
| @@ -3133,3 +3136,32 @@ var invitationThemeHomePreviewPage = new Handler( | @@ -3133,3 +3136,32 @@ var invitationThemeHomePreviewPage = new Handler( | ||
| 3133 | create: (_) => MarketingCenterProvider(), | 3136 | create: (_) => MarketingCenterProvider(), |
| 3134 | child: InvitationThemeHomePreviewPage(themeSunModel: themeSunModel)); | 3137 | child: InvitationThemeHomePreviewPage(themeSunModel: themeSunModel)); |
| 3135 | }); | 3138 | }); |
| 3139 | + | ||
| 3140 | +//预订定金 | ||
| 3141 | +var bookDepositPageHandle = new Handler( | ||
| 3142 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 3143 | + String rid = params["rid"].first; | ||
| 3144 | + // String uids = params["uids"].first; | ||
| 3145 | + bool isNew = FluroConvertUtils.string2bool(params["isNew"].first); | ||
| 3146 | + if (!isNew) { | ||
| 3147 | + BookDepositSunModel depositSunModel = BookDepositSunModel.fromJson( | ||
| 3148 | + json.decode(FluroConvertUtils.fluroCnParamsDecode( | ||
| 3149 | + params["bookDepositModel"].first))); | ||
| 3150 | + | ||
| 3151 | + return ChangeNotifierProvider<NotebookDetailModel>( | ||
| 3152 | + create: (_) => NotebookDetailModel(), | ||
| 3153 | + child: BookDepositPage(rid: rid, depositSunModel: depositSunModel)); | ||
| 3154 | + } | ||
| 3155 | + return ChangeNotifierProvider<FeastModel>( | ||
| 3156 | + create: (_) => FeastModel(), | ||
| 3157 | + child: BookDepositPage( | ||
| 3158 | + rid: rid, | ||
| 3159 | + )); | ||
| 3160 | +}); | ||
| 3161 | + | ||
| 3162 | +//核餐确认 | ||
| 3163 | +var verifyFoodPageHandle = new Handler( | ||
| 3164 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 3165 | + return ChangeNotifierProvider<NotebookDetailModel>( | ||
| 3166 | + create: (_) => NotebookDetailModel(), child: VerifyFoodPage()); | ||
| 3167 | +}); |
| @@ -299,6 +299,13 @@ class Routes { | @@ -299,6 +299,13 @@ class Routes { | ||
| 299 | static String invitation_theme_home_preview_page = | 299 | static String invitation_theme_home_preview_page = |
| 300 | "/invitation_theme_home_preview_page"; //邀请函主题选择预览页 | 300 | "/invitation_theme_home_preview_page"; //邀请函主题选择预览页 |
| 301 | 301 | ||
| 302 | +static String book_deposit_page = | ||
| 303 | + "/book_deposit_page"; //预订订金 | ||
| 304 | + | ||
| 305 | +static String verify_food_page = | ||
| 306 | + "/verify_food_page"; //核餐确认 | ||
| 307 | + | ||
| 308 | + | ||
| 302 | static void configureRoutes(FluroRouter router) { | 309 | static void configureRoutes(FluroRouter router) { |
| 303 | router.notFoundHandler = new Handler( | 310 | router.notFoundHandler = new Handler( |
| 304 | handlerFunc: (BuildContext context, Map<String, List<String>> params) { | 311 | handlerFunc: (BuildContext context, Map<String, List<String>> params) { |
| @@ -557,7 +564,15 @@ class Routes { | @@ -557,7 +564,15 @@ class Routes { | ||
| 557 | handler: invitationThemeHomePageHandle); | 564 | handler: invitationThemeHomePageHandle); |
| 558 | 565 | ||
| 559 | router.define(invitation_theme_home_preview_page, | 566 | router.define(invitation_theme_home_preview_page, |
| 560 | - handler: invitationThemeHomePreviewPage); | 567 | + handler: invitationThemeHomePreviewPageHandle); |
| 568 | + router.define(book_deposit_page, | ||
| 569 | + handler: bookDepositPageHandle); | ||
| 570 | + router.define(verify_food_page, | ||
| 571 | + handler: verifyFoodPageHandle); | ||
| 572 | + | ||
| 573 | + | ||
| 574 | + | ||
| 575 | + | ||
| 561 | 576 | ||
| 562 | } | 577 | } |
| 563 | } | 578 | } |
-
Please register or login to post a comment