Showing
4 changed files
with
875 additions
and
2 deletions
lib/models/reserve_detail_model.dart
0 → 100644
| 1 | +import 'package:json_annotation/json_annotation.dart'; | ||
| 2 | + | ||
| 3 | +part 'reserve_detail_model.g.dart'; | ||
| 4 | + | ||
| 5 | +@JsonSerializable() | ||
| 6 | +class ReserveDetailModel extends Object { | ||
| 7 | + @JsonKey(name: 'ret') | ||
| 8 | + int ret; | ||
| 9 | + | ||
| 10 | + @JsonKey(name: 'data') | ||
| 11 | + ReserveDetailSunModel data; | ||
| 12 | + | ||
| 13 | + @JsonKey(name: 'msg') | ||
| 14 | + String msg; | ||
| 15 | + | ||
| 16 | + ReserveDetailModel( | ||
| 17 | + this.ret, | ||
| 18 | + this.data, | ||
| 19 | + this.msg, | ||
| 20 | + ); | ||
| 21 | + | ||
| 22 | + factory ReserveDetailModel.fromJson(Map<String, dynamic> srcJson) => | ||
| 23 | + _$ReserveDetailModelFromJson(srcJson); | ||
| 24 | + | ||
| 25 | + Map<String, dynamic> toJson() => _$ReserveDetailModelToJson(this); | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +@JsonSerializable() | ||
| 29 | +class ReserveDetailSunModel extends Object { | ||
| 30 | + @JsonKey(name: 'id') | ||
| 31 | + String id; | ||
| 32 | + | ||
| 33 | + @JsonKey(name: 'orderid') | ||
| 34 | + String orderid; | ||
| 35 | + | ||
| 36 | + @JsonKey(name: 'openid') | ||
| 37 | + String openid; | ||
| 38 | + | ||
| 39 | + @JsonKey(name: 'sid') | ||
| 40 | + String sid; | ||
| 41 | + | ||
| 42 | + @JsonKey(name: 'room_demand') | ||
| 43 | + List<RoomdDemand> roomDemand; | ||
| 44 | + | ||
| 45 | + @JsonKey(name: 'tid') | ||
| 46 | + String tid; | ||
| 47 | + | ||
| 48 | + @JsonKey(name: 'tableinfo') | ||
| 49 | + String tableinfo; | ||
| 50 | + | ||
| 51 | + @JsonKey(name: 'pnum') | ||
| 52 | + String pnum; | ||
| 53 | + | ||
| 54 | + @JsonKey(name: 'rname') | ||
| 55 | + String rname; | ||
| 56 | + | ||
| 57 | + @JsonKey(name: 'sex') | ||
| 58 | + String sex; | ||
| 59 | + | ||
| 60 | + @JsonKey(name: 'phone') | ||
| 61 | + String phone; | ||
| 62 | + | ||
| 63 | + @JsonKey(name: 'cusdem') | ||
| 64 | + String cusdem; | ||
| 65 | + | ||
| 66 | + @JsonKey(name: 'cusman') | ||
| 67 | + String cusman; | ||
| 68 | + | ||
| 69 | + @JsonKey(name: 'rdate') | ||
| 70 | + String rdate; | ||
| 71 | + | ||
| 72 | + @JsonKey(name: 'edate') | ||
| 73 | + String edate; | ||
| 74 | + | ||
| 75 | + @JsonKey(name: 'vdate') | ||
| 76 | + String vdate; | ||
| 77 | + | ||
| 78 | + @JsonKey(name: 'ddate') | ||
| 79 | + String ddate; | ||
| 80 | + | ||
| 81 | + @JsonKey(name: 'is_set_ddate') | ||
| 82 | + String isSetDdate; | ||
| 83 | + | ||
| 84 | + @JsonKey(name: 'ddate_solt') | ||
| 85 | + String ddateSolt; | ||
| 86 | + | ||
| 87 | + @JsonKey(name: 'status') | ||
| 88 | + String status; | ||
| 89 | + | ||
| 90 | + @JsonKey(name: 'cause') | ||
| 91 | + String cause; | ||
| 92 | + | ||
| 93 | + @JsonKey(name: 'abolition') | ||
| 94 | + String abolition; | ||
| 95 | + | ||
| 96 | + @JsonKey(name: 'action') | ||
| 97 | + String action; | ||
| 98 | + | ||
| 99 | + @JsonKey(name: 'type') | ||
| 100 | + String type; | ||
| 101 | + | ||
| 102 | + @JsonKey(name: 'code') | ||
| 103 | + String code; | ||
| 104 | + | ||
| 105 | + @JsonKey(name: 'operator_openid') | ||
| 106 | + int operatorOpenid; | ||
| 107 | + | ||
| 108 | + @JsonKey(name: 'channel') | ||
| 109 | + String channel; | ||
| 110 | + | ||
| 111 | + @JsonKey(name: 'cdate') | ||
| 112 | + String cdate; | ||
| 113 | + | ||
| 114 | + @JsonKey(name: 'seller') | ||
| 115 | + Seller seller; | ||
| 116 | + | ||
| 117 | + @JsonKey(name: 'tables') | ||
| 118 | + List<Tables> tables; | ||
| 119 | + | ||
| 120 | + @JsonKey(name: 'customers') | ||
| 121 | + List<Customers> customers; | ||
| 122 | + | ||
| 123 | + @JsonKey(name: 'cancel') | ||
| 124 | + Cancel cancel; | ||
| 125 | + | ||
| 126 | + @JsonKey(name: 'order') | ||
| 127 | + Order order; | ||
| 128 | + | ||
| 129 | + ReserveDetailSunModel( | ||
| 130 | + this.id, | ||
| 131 | + this.orderid, | ||
| 132 | + this.openid, | ||
| 133 | + this.sid, | ||
| 134 | + this.roomDemand, | ||
| 135 | + this.tid, | ||
| 136 | + this.tableinfo, | ||
| 137 | + this.pnum, | ||
| 138 | + this.rname, | ||
| 139 | + this.sex, | ||
| 140 | + this.phone, | ||
| 141 | + this.cusdem, | ||
| 142 | + this.cusman, | ||
| 143 | + this.rdate, | ||
| 144 | + this.edate, | ||
| 145 | + this.vdate, | ||
| 146 | + this.ddate, | ||
| 147 | + this.isSetDdate, | ||
| 148 | + this.ddateSolt, | ||
| 149 | + this.status, | ||
| 150 | + this.cause, | ||
| 151 | + this.abolition, | ||
| 152 | + this.action, | ||
| 153 | + this.type, | ||
| 154 | + this.code, | ||
| 155 | + this.operatorOpenid, | ||
| 156 | + this.channel, | ||
| 157 | + this.cdate, | ||
| 158 | + this.seller, | ||
| 159 | + this.tables, | ||
| 160 | + this.customers, | ||
| 161 | + this.cancel, | ||
| 162 | + this.order, | ||
| 163 | + ); | ||
| 164 | + | ||
| 165 | + factory ReserveDetailSunModel.fromJson(Map<String, dynamic> srcJson) => | ||
| 166 | + _$ReserveDetailSunModelFromJson(srcJson); | ||
| 167 | + | ||
| 168 | + Map<String, dynamic> toJson() => _$ReserveDetailSunModelToJson(this); | ||
| 169 | +} | ||
| 170 | + | ||
| 171 | +@JsonSerializable() | ||
| 172 | +class RoomdDemand extends Object { | ||
| 173 | + @JsonKey(name: 'id') | ||
| 174 | + String id; | ||
| 175 | + | ||
| 176 | + @JsonKey(name: 'sellerid') | ||
| 177 | + String sellerid; | ||
| 178 | + | ||
| 179 | + @JsonKey(name: 'name') | ||
| 180 | + String name; | ||
| 181 | + | ||
| 182 | + @JsonKey(name: 'standard') | ||
| 183 | + String standard; | ||
| 184 | + | ||
| 185 | + @JsonKey(name: 'status') | ||
| 186 | + String status; | ||
| 187 | + | ||
| 188 | + @JsonKey(name: 'cdate') | ||
| 189 | + String cdate; | ||
| 190 | + | ||
| 191 | + RoomdDemand( | ||
| 192 | + this.id, | ||
| 193 | + this.sellerid, | ||
| 194 | + this.name, | ||
| 195 | + this.standard, | ||
| 196 | + this.status, | ||
| 197 | + this.cdate, | ||
| 198 | + ); | ||
| 199 | + | ||
| 200 | + factory RoomdDemand.fromJson(Map<String, dynamic> srcJson) => | ||
| 201 | + _$RoomdDemandFromJson(srcJson); | ||
| 202 | + | ||
| 203 | + Map<String, dynamic> toJson() => _$RoomdDemandToJson(this); | ||
| 204 | +} | ||
| 205 | + | ||
| 206 | +@JsonSerializable() | ||
| 207 | +class Seller extends Object { | ||
| 208 | + @JsonKey(name: 'id') | ||
| 209 | + String id; | ||
| 210 | + | ||
| 211 | + @JsonKey(name: 'sellername') | ||
| 212 | + String sellername; | ||
| 213 | + | ||
| 214 | + @JsonKey(name: 'seller_image') | ||
| 215 | + String sellerImage; | ||
| 216 | + | ||
| 217 | + @JsonKey(name: 'phone') | ||
| 218 | + String phone; | ||
| 219 | + | ||
| 220 | + @JsonKey(name: 'map_address') | ||
| 221 | + String mapAddress; | ||
| 222 | + | ||
| 223 | + @JsonKey(name: 'daily') | ||
| 224 | + Daily daily; | ||
| 225 | + | ||
| 226 | + @JsonKey(name: 'seller_tel') | ||
| 227 | + String sellerTel; | ||
| 228 | + | ||
| 229 | + @JsonKey(name: 'is_tele') | ||
| 230 | + String isTele; | ||
| 231 | + | ||
| 232 | + @JsonKey(name: 'is_online_reserve') | ||
| 233 | + String isOnlineReserve; | ||
| 234 | + | ||
| 235 | + @JsonKey(name: 'isopen_md') | ||
| 236 | + String isopenMd; | ||
| 237 | + | ||
| 238 | + @JsonKey(name: 'lat') | ||
| 239 | + String lat; | ||
| 240 | + | ||
| 241 | + @JsonKey(name: 'long') | ||
| 242 | + String long; | ||
| 243 | + | ||
| 244 | + @JsonKey(name: 'rec_stime') | ||
| 245 | + String recStime; | ||
| 246 | + | ||
| 247 | + @JsonKey(name: 'rec_etime') | ||
| 248 | + String recEtime; | ||
| 249 | + | ||
| 250 | + @JsonKey(name: 'is_open_order') | ||
| 251 | + String isOpenOrder; | ||
| 252 | + | ||
| 253 | + @JsonKey(name: 'is_open_wine') | ||
| 254 | + String isOpenWine; | ||
| 255 | + | ||
| 256 | + Seller( | ||
| 257 | + this.id, | ||
| 258 | + this.sellername, | ||
| 259 | + this.sellerImage, | ||
| 260 | + this.phone, | ||
| 261 | + this.mapAddress, | ||
| 262 | + this.daily, | ||
| 263 | + this.sellerTel, | ||
| 264 | + this.isTele, | ||
| 265 | + this.isOnlineReserve, | ||
| 266 | + this.isopenMd, | ||
| 267 | + this.lat, | ||
| 268 | + this.long, | ||
| 269 | + this.recStime, | ||
| 270 | + this.recEtime, | ||
| 271 | + this.isOpenOrder, | ||
| 272 | + this.isOpenWine, | ||
| 273 | + ); | ||
| 274 | + | ||
| 275 | + factory Seller.fromJson(Map<String, dynamic> srcJson) => | ||
| 276 | + _$SellerFromJson(srcJson); | ||
| 277 | + | ||
| 278 | + Map<String, dynamic> toJson() => _$SellerToJson(this); | ||
| 279 | +} | ||
| 280 | + | ||
| 281 | +@JsonSerializable() | ||
| 282 | +class Daily extends Object { | ||
| 283 | + @JsonKey(name: 'morning') | ||
| 284 | + String morning; | ||
| 285 | + | ||
| 286 | + @JsonKey(name: 'noon') | ||
| 287 | + String noon; | ||
| 288 | + | ||
| 289 | + @JsonKey(name: 'night') | ||
| 290 | + String night; | ||
| 291 | + | ||
| 292 | + Daily( | ||
| 293 | + this.morning, | ||
| 294 | + this.noon, | ||
| 295 | + this.night, | ||
| 296 | + ); | ||
| 297 | + | ||
| 298 | + factory Daily.fromJson(Map<String, dynamic> srcJson) => | ||
| 299 | + _$DailyFromJson(srcJson); | ||
| 300 | + | ||
| 301 | + Map<String, dynamic> toJson() => _$DailyToJson(this); | ||
| 302 | +} | ||
| 303 | + | ||
| 304 | +@JsonSerializable() | ||
| 305 | +class Tables extends Object { | ||
| 306 | + @JsonKey(name: 'id') | ||
| 307 | + String id; | ||
| 308 | + | ||
| 309 | + @JsonKey(name: 'name') | ||
| 310 | + String name; | ||
| 311 | + | ||
| 312 | + @JsonKey(name: 'tid') | ||
| 313 | + String tid; | ||
| 314 | + | ||
| 315 | + @JsonKey(name: 'table_pnum') | ||
| 316 | + String tablePnum; | ||
| 317 | + | ||
| 318 | + @JsonKey(name: 'rid') | ||
| 319 | + String rid; | ||
| 320 | + | ||
| 321 | + @JsonKey(name: 'rname') | ||
| 322 | + String rname; | ||
| 323 | + | ||
| 324 | + Tables( | ||
| 325 | + this.id, | ||
| 326 | + this.name, | ||
| 327 | + this.tid, | ||
| 328 | + this.tablePnum, | ||
| 329 | + this.rid, | ||
| 330 | + this.rname, | ||
| 331 | + ); | ||
| 332 | + | ||
| 333 | + factory Tables.fromJson(Map<String, dynamic> srcJson) => | ||
| 334 | + _$TablesFromJson(srcJson); | ||
| 335 | + | ||
| 336 | + Map<String, dynamic> toJson() => _$TablesToJson(this); | ||
| 337 | +} | ||
| 338 | + | ||
| 339 | +@JsonSerializable() | ||
| 340 | +class Customers extends Object { | ||
| 341 | + @JsonKey(name: 'openid') | ||
| 342 | + String openid; | ||
| 343 | + | ||
| 344 | + @JsonKey(name: 'nickname') | ||
| 345 | + String nickname; | ||
| 346 | + | ||
| 347 | + @JsonKey(name: 'headimgurl') | ||
| 348 | + String headimgurl; | ||
| 349 | + | ||
| 350 | + @JsonKey(name: 'remind_date') | ||
| 351 | + String remindDate; | ||
| 352 | + | ||
| 353 | + Customers( | ||
| 354 | + this.openid, | ||
| 355 | + this.nickname, | ||
| 356 | + this.headimgurl, | ||
| 357 | + this.remindDate, | ||
| 358 | + ); | ||
| 359 | + | ||
| 360 | + factory Customers.fromJson(Map<String, dynamic> srcJson) => | ||
| 361 | + _$CustomersFromJson(srcJson); | ||
| 362 | + | ||
| 363 | + Map<String, dynamic> toJson() => _$CustomersToJson(this); | ||
| 364 | +} | ||
| 365 | + | ||
| 366 | +@JsonSerializable() | ||
| 367 | +class Cancel extends Object { | ||
| 368 | + @JsonKey(name: 'id') | ||
| 369 | + String id; | ||
| 370 | + | ||
| 371 | + @JsonKey(name: 'uid') | ||
| 372 | + String uid; | ||
| 373 | + | ||
| 374 | + @JsonKey(name: 'uname') | ||
| 375 | + String uname; | ||
| 376 | + | ||
| 377 | + @JsonKey(name: 'openid') | ||
| 378 | + String openid; | ||
| 379 | + | ||
| 380 | + @JsonKey(name: 'desc') | ||
| 381 | + String desc; | ||
| 382 | + | ||
| 383 | + @JsonKey(name: 'up_rid') | ||
| 384 | + String upRid; | ||
| 385 | + | ||
| 386 | + @JsonKey(name: 'action_type') | ||
| 387 | + String actionType; | ||
| 388 | + | ||
| 389 | + @JsonKey(name: 'cdate') | ||
| 390 | + String cdate; | ||
| 391 | + | ||
| 392 | + Cancel( | ||
| 393 | + this.id, | ||
| 394 | + this.uid, | ||
| 395 | + this.uname, | ||
| 396 | + this.openid, | ||
| 397 | + this.desc, | ||
| 398 | + this.upRid, | ||
| 399 | + this.actionType, | ||
| 400 | + this.cdate, | ||
| 401 | + ); | ||
| 402 | + | ||
| 403 | + factory Cancel.fromJson(Map<String, dynamic> srcJson) => | ||
| 404 | + _$CancelFromJson(srcJson); | ||
| 405 | + | ||
| 406 | + Map<String, dynamic> toJson() => _$CancelToJson(this); | ||
| 407 | +} | ||
| 408 | + | ||
| 409 | +@JsonSerializable() | ||
| 410 | +class Order extends Object { | ||
| 411 | + @JsonKey(name: 'id') | ||
| 412 | + String id; | ||
| 413 | + | ||
| 414 | + @JsonKey(name: 'rid') | ||
| 415 | + String rid; | ||
| 416 | + | ||
| 417 | + @JsonKey(name: 'no') | ||
| 418 | + String no; | ||
| 419 | + | ||
| 420 | + @JsonKey(name: 'row_num') | ||
| 421 | + String rowNum; | ||
| 422 | + | ||
| 423 | + @JsonKey(name: 'pnum') | ||
| 424 | + String pnum; | ||
| 425 | + | ||
| 426 | + @JsonKey(name: 'sellerid') | ||
| 427 | + String sellerid; | ||
| 428 | + | ||
| 429 | + @JsonKey(name: 'openid') | ||
| 430 | + String openid; | ||
| 431 | + | ||
| 432 | + @JsonKey(name: 'price') | ||
| 433 | + int price; | ||
| 434 | + | ||
| 435 | + @JsonKey(name: 'type') | ||
| 436 | + String type; | ||
| 437 | + | ||
| 438 | + @JsonKey(name: 'behavior') | ||
| 439 | + String behavior; | ||
| 440 | + | ||
| 441 | + @JsonKey(name: 'cdate') | ||
| 442 | + String cdate; | ||
| 443 | + | ||
| 444 | + @JsonKey(name: 'cookbooklist') | ||
| 445 | + List<CookbooklistDetail> cookbooklist; | ||
| 446 | + | ||
| 447 | + Order( | ||
| 448 | + this.id, | ||
| 449 | + this.rid, | ||
| 450 | + this.no, | ||
| 451 | + this.rowNum, | ||
| 452 | + this.pnum, | ||
| 453 | + this.sellerid, | ||
| 454 | + this.openid, | ||
| 455 | + this.price, | ||
| 456 | + this.type, | ||
| 457 | + this.behavior, | ||
| 458 | + this.cdate, | ||
| 459 | + this.cookbooklist, | ||
| 460 | + ); | ||
| 461 | + | ||
| 462 | + factory Order.fromJson(Map<String, dynamic> srcJson) => | ||
| 463 | + _$OrderFromJson(srcJson); | ||
| 464 | + | ||
| 465 | + Map<String, dynamic> toJson() => _$OrderToJson(this); | ||
| 466 | +} | ||
| 467 | + | ||
| 468 | +@JsonSerializable() | ||
| 469 | +class CookbooklistDetail extends Object { | ||
| 470 | + @JsonKey(name: 'id') | ||
| 471 | + String id; | ||
| 472 | + | ||
| 473 | + @JsonKey(name: 'orderid') | ||
| 474 | + String orderid; | ||
| 475 | + | ||
| 476 | + @JsonKey(name: 'openid') | ||
| 477 | + String openid; | ||
| 478 | + | ||
| 479 | + @JsonKey(name: 'cookbookid') | ||
| 480 | + String cookbookid; | ||
| 481 | + | ||
| 482 | + @JsonKey(name: 'price') | ||
| 483 | + String price; | ||
| 484 | + | ||
| 485 | + @JsonKey(name: 'cookname') | ||
| 486 | + String cookname; | ||
| 487 | + | ||
| 488 | + @JsonKey(name: 'cookunit') | ||
| 489 | + String cookunit; | ||
| 490 | + | ||
| 491 | + @JsonKey(name: 'cookimage') | ||
| 492 | + String cookimage; | ||
| 493 | + | ||
| 494 | + @JsonKey(name: 'class_name') | ||
| 495 | + String className; | ||
| 496 | + | ||
| 497 | + @JsonKey(name: 'classid') | ||
| 498 | + String classid; | ||
| 499 | + | ||
| 500 | + @JsonKey(name: 'class_order') | ||
| 501 | + String classOrder; | ||
| 502 | + | ||
| 503 | + @JsonKey(name: 'fromSoucre') | ||
| 504 | + String fromSoucre; | ||
| 505 | + | ||
| 506 | + @JsonKey(name: 'source') | ||
| 507 | + String source; | ||
| 508 | + | ||
| 509 | + @JsonKey(name: 'status') | ||
| 510 | + String status; | ||
| 511 | + | ||
| 512 | + @JsonKey(name: 'identity') | ||
| 513 | + String identity; | ||
| 514 | + | ||
| 515 | + @JsonKey(name: 'cdate') | ||
| 516 | + String cdate; | ||
| 517 | + | ||
| 518 | + CookbooklistDetail( | ||
| 519 | + this.id, | ||
| 520 | + this.orderid, | ||
| 521 | + this.openid, | ||
| 522 | + this.cookbookid, | ||
| 523 | + this.price, | ||
| 524 | + this.cookname, | ||
| 525 | + this.cookunit, | ||
| 526 | + this.cookimage, | ||
| 527 | + this.className, | ||
| 528 | + this.classid, | ||
| 529 | + this.classOrder, | ||
| 530 | + this.fromSoucre, | ||
| 531 | + this.source, | ||
| 532 | + this.status, | ||
| 533 | + this.identity, | ||
| 534 | + this.cdate, | ||
| 535 | + ); | ||
| 536 | + | ||
| 537 | + factory CookbooklistDetail.fromJson(Map<String, dynamic> srcJson) => | ||
| 538 | + _$CookbooklistFromJson(srcJson); | ||
| 539 | + | ||
| 540 | + Map<String, dynamic> toJson() => _$CookbooklistToJson(this); | ||
| 541 | +} |
lib/models/reserve_detail_model.g.dart
0 → 100644
| 1 | +// GENERATED CODE - DO NOT MODIFY BY HAND | ||
| 2 | + | ||
| 3 | +part of 'reserve_detail_model.dart'; | ||
| 4 | + | ||
| 5 | +// ************************************************************************** | ||
| 6 | +// JsonSerializableGenerator | ||
| 7 | +// ************************************************************************** | ||
| 8 | + | ||
| 9 | +ReserveDetailModel _$ReserveDetailModelFromJson(Map<String, dynamic> json) { | ||
| 10 | + return ReserveDetailModel( | ||
| 11 | + json['ret'] as int, | ||
| 12 | + json['data'] == null | ||
| 13 | + ? null | ||
| 14 | + : ReserveDetailSunModel.fromJson( | ||
| 15 | + json['data'] as Map<String, dynamic>), | ||
| 16 | + json['msg'] as String); | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +Map<String, dynamic> _$ReserveDetailModelToJson(ReserveDetailModel instance) => | ||
| 20 | + <String, dynamic>{ | ||
| 21 | + 'ret': instance.ret, | ||
| 22 | + 'data': instance.data, | ||
| 23 | + 'msg': instance.msg | ||
| 24 | + }; | ||
| 25 | + | ||
| 26 | +ReserveDetailSunModel _$ReserveDetailSunModelFromJson( | ||
| 27 | + Map<String, dynamic> json) { | ||
| 28 | + return ReserveDetailSunModel( | ||
| 29 | + json['id'] as String, | ||
| 30 | + json['orderid'] as String, | ||
| 31 | + json['openid'] as String, | ||
| 32 | + json['sid'] as String, | ||
| 33 | + (json['room_demand'] as List) | ||
| 34 | + ?.map((e) => e == null | ||
| 35 | + ? null | ||
| 36 | + : RoomdDemand.fromJson(e as Map<String, dynamic>)) | ||
| 37 | + ?.toList(), | ||
| 38 | + json['tid'] as String, | ||
| 39 | + json['tableinfo'] as String, | ||
| 40 | + json['pnum'] as String, | ||
| 41 | + json['rname'] as String, | ||
| 42 | + json['sex'] as String, | ||
| 43 | + json['phone'] as String, | ||
| 44 | + json['cusdem'] as String, | ||
| 45 | + json['cusman'] as String, | ||
| 46 | + json['rdate'] as String, | ||
| 47 | + json['edate'] as String, | ||
| 48 | + json['vdate'] as String, | ||
| 49 | + json['ddate'] as String, | ||
| 50 | + json['is_set_ddate'] as String, | ||
| 51 | + json['ddate_solt'] as String, | ||
| 52 | + json['status'] as String, | ||
| 53 | + json['cause'] as String, | ||
| 54 | + json['abolition'] as String, | ||
| 55 | + json['action'] as String, | ||
| 56 | + json['type'] as String, | ||
| 57 | + json['code'] as String, | ||
| 58 | + json['operator_openid'] as int, | ||
| 59 | + json['channel'] as String, | ||
| 60 | + json['cdate'] as String, | ||
| 61 | + json['seller'] == null | ||
| 62 | + ? null | ||
| 63 | + : Seller.fromJson(json['seller'] as Map<String, dynamic>), | ||
| 64 | + (json['tables'] as List) | ||
| 65 | + ?.map((e) => | ||
| 66 | + e == null ? null : Tables.fromJson(e as Map<String, dynamic>)) | ||
| 67 | + ?.toList(), | ||
| 68 | + (json['customers'] as List) | ||
| 69 | + ?.map((e) => | ||
| 70 | + e == null ? null : Customers.fromJson(e as Map<String, dynamic>)) | ||
| 71 | + ?.toList(), | ||
| 72 | + json['cancel'] == null | ||
| 73 | + ? null | ||
| 74 | + : Cancel.fromJson(json['cancel'] as Map<String, dynamic>), | ||
| 75 | + json['order'] == null | ||
| 76 | + ? null | ||
| 77 | + : Order.fromJson(json['order'] as Map<String, dynamic>)); | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +Map<String, dynamic> _$ReserveDetailSunModelToJson( | ||
| 81 | + ReserveDetailSunModel instance) => | ||
| 82 | + <String, dynamic>{ | ||
| 83 | + 'id': instance.id, | ||
| 84 | + 'orderid': instance.orderid, | ||
| 85 | + 'openid': instance.openid, | ||
| 86 | + 'sid': instance.sid, | ||
| 87 | + 'room_demand': instance.roomDemand, | ||
| 88 | + 'tid': instance.tid, | ||
| 89 | + 'tableinfo': instance.tableinfo, | ||
| 90 | + 'pnum': instance.pnum, | ||
| 91 | + 'rname': instance.rname, | ||
| 92 | + 'sex': instance.sex, | ||
| 93 | + 'phone': instance.phone, | ||
| 94 | + 'cusdem': instance.cusdem, | ||
| 95 | + 'cusman': instance.cusman, | ||
| 96 | + 'rdate': instance.rdate, | ||
| 97 | + 'edate': instance.edate, | ||
| 98 | + 'vdate': instance.vdate, | ||
| 99 | + 'ddate': instance.ddate, | ||
| 100 | + 'is_set_ddate': instance.isSetDdate, | ||
| 101 | + 'ddate_solt': instance.ddateSolt, | ||
| 102 | + 'status': instance.status, | ||
| 103 | + 'cause': instance.cause, | ||
| 104 | + 'abolition': instance.abolition, | ||
| 105 | + 'action': instance.action, | ||
| 106 | + 'type': instance.type, | ||
| 107 | + 'code': instance.code, | ||
| 108 | + 'operator_openid': instance.operatorOpenid, | ||
| 109 | + 'channel': instance.channel, | ||
| 110 | + 'cdate': instance.cdate, | ||
| 111 | + 'seller': instance.seller, | ||
| 112 | + 'tables': instance.tables, | ||
| 113 | + 'customers': instance.customers, | ||
| 114 | + 'cancel': instance.cancel, | ||
| 115 | + 'order': instance.order | ||
| 116 | + }; | ||
| 117 | + | ||
| 118 | +RoomdDemand _$RoomdDemandFromJson(Map<String, dynamic> json) { | ||
| 119 | + return RoomdDemand( | ||
| 120 | + json['id'] as String, | ||
| 121 | + json['sellerid'] as String, | ||
| 122 | + json['name'] as String, | ||
| 123 | + json['standard'] as String, | ||
| 124 | + json['status'] as String, | ||
| 125 | + json['cdate'] as String); | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +Map<String, dynamic> _$RoomdDemandToJson(RoomdDemand instance) => | ||
| 129 | + <String, dynamic>{ | ||
| 130 | + 'id': instance.id, | ||
| 131 | + 'sellerid': instance.sellerid, | ||
| 132 | + 'name': instance.name, | ||
| 133 | + 'standard': instance.standard, | ||
| 134 | + 'status': instance.status, | ||
| 135 | + 'cdate': instance.cdate | ||
| 136 | + }; | ||
| 137 | + | ||
| 138 | +Seller _$SellerFromJson(Map<String, dynamic> json) { | ||
| 139 | + return Seller( | ||
| 140 | + json['id'] as String, | ||
| 141 | + json['sellername'] as String, | ||
| 142 | + json['seller_image'] as String, | ||
| 143 | + json['phone'] as String, | ||
| 144 | + json['map_address'] as String, | ||
| 145 | + json['daily'] == null | ||
| 146 | + ? null | ||
| 147 | + : Daily.fromJson(json['daily'] as Map<String, dynamic>), | ||
| 148 | + json['seller_tel'] as String, | ||
| 149 | + json['is_tele'] as String, | ||
| 150 | + json['is_online_reserve'] as String, | ||
| 151 | + json['isopen_md'] as String, | ||
| 152 | + json['lat'] as String, | ||
| 153 | + json['long'] as String, | ||
| 154 | + json['rec_stime'] as String, | ||
| 155 | + json['rec_etime'] as String, | ||
| 156 | + json['is_open_order'] as String, | ||
| 157 | + json['is_open_wine'] as String); | ||
| 158 | +} | ||
| 159 | + | ||
| 160 | +Map<String, dynamic> _$SellerToJson(Seller instance) => <String, dynamic>{ | ||
| 161 | + 'id': instance.id, | ||
| 162 | + 'sellername': instance.sellername, | ||
| 163 | + 'seller_image': instance.sellerImage, | ||
| 164 | + 'phone': instance.phone, | ||
| 165 | + 'map_address': instance.mapAddress, | ||
| 166 | + 'daily': instance.daily, | ||
| 167 | + 'seller_tel': instance.sellerTel, | ||
| 168 | + 'is_tele': instance.isTele, | ||
| 169 | + 'is_online_reserve': instance.isOnlineReserve, | ||
| 170 | + 'isopen_md': instance.isopenMd, | ||
| 171 | + 'lat': instance.lat, | ||
| 172 | + 'long': instance.long, | ||
| 173 | + 'rec_stime': instance.recStime, | ||
| 174 | + 'rec_etime': instance.recEtime, | ||
| 175 | + 'is_open_order': instance.isOpenOrder, | ||
| 176 | + 'is_open_wine': instance.isOpenWine | ||
| 177 | + }; | ||
| 178 | + | ||
| 179 | +Daily _$DailyFromJson(Map<String, dynamic> json) { | ||
| 180 | + return Daily(json['morning'] as String, json['noon'] as String, | ||
| 181 | + json['night'] as String); | ||
| 182 | +} | ||
| 183 | + | ||
| 184 | +Map<String, dynamic> _$DailyToJson(Daily instance) => <String, dynamic>{ | ||
| 185 | + 'morning': instance.morning, | ||
| 186 | + 'noon': instance.noon, | ||
| 187 | + 'night': instance.night | ||
| 188 | + }; | ||
| 189 | + | ||
| 190 | +Tables _$TablesFromJson(Map<String, dynamic> json) { | ||
| 191 | + return Tables( | ||
| 192 | + json['id'] as String, | ||
| 193 | + json['name'] as String, | ||
| 194 | + json['tid'] as String, | ||
| 195 | + json['table_pnum'] as String, | ||
| 196 | + json['rid'] as String, | ||
| 197 | + json['rname'] as String); | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +Map<String, dynamic> _$TablesToJson(Tables instance) => <String, dynamic>{ | ||
| 201 | + 'id': instance.id, | ||
| 202 | + 'name': instance.name, | ||
| 203 | + 'tid': instance.tid, | ||
| 204 | + 'table_pnum': instance.tablePnum, | ||
| 205 | + 'rid': instance.rid, | ||
| 206 | + 'rname': instance.rname | ||
| 207 | + }; | ||
| 208 | + | ||
| 209 | +Customers _$CustomersFromJson(Map<String, dynamic> json) { | ||
| 210 | + return Customers(json['openid'] as String, json['nickname'] as String, | ||
| 211 | + json['headimgurl'] as String, json['remind_date'] as String); | ||
| 212 | +} | ||
| 213 | + | ||
| 214 | +Map<String, dynamic> _$CustomersToJson(Customers instance) => <String, dynamic>{ | ||
| 215 | + 'openid': instance.openid, | ||
| 216 | + 'nickname': instance.nickname, | ||
| 217 | + 'headimgurl': instance.headimgurl, | ||
| 218 | + 'remind_date': instance.remindDate | ||
| 219 | + }; | ||
| 220 | + | ||
| 221 | +Cancel _$CancelFromJson(Map<String, dynamic> json) { | ||
| 222 | + return Cancel( | ||
| 223 | + json['id'] as String, | ||
| 224 | + json['uid'] as String, | ||
| 225 | + json['uname'] as String, | ||
| 226 | + json['openid'] as String, | ||
| 227 | + json['desc'] as String, | ||
| 228 | + json['up_rid'] as String, | ||
| 229 | + json['action_type'] as String, | ||
| 230 | + json['cdate'] as String); | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +Map<String, dynamic> _$CancelToJson(Cancel instance) => <String, dynamic>{ | ||
| 234 | + 'id': instance.id, | ||
| 235 | + 'uid': instance.uid, | ||
| 236 | + 'uname': instance.uname, | ||
| 237 | + 'openid': instance.openid, | ||
| 238 | + 'desc': instance.desc, | ||
| 239 | + 'up_rid': instance.upRid, | ||
| 240 | + 'action_type': instance.actionType, | ||
| 241 | + 'cdate': instance.cdate | ||
| 242 | + }; | ||
| 243 | + | ||
| 244 | +Order _$OrderFromJson(Map<String, dynamic> json) { | ||
| 245 | + return Order( | ||
| 246 | + json['id'] as String, | ||
| 247 | + json['rid'] as String, | ||
| 248 | + json['no'] as String, | ||
| 249 | + json['row_num'] as String, | ||
| 250 | + json['pnum'] as String, | ||
| 251 | + json['sellerid'] as String, | ||
| 252 | + json['openid'] as String, | ||
| 253 | + json['price'] as int, | ||
| 254 | + json['type'] as String, | ||
| 255 | + json['behavior'] as String, | ||
| 256 | + json['cdate'] as String, | ||
| 257 | + (json['cookbooklist'] as List) | ||
| 258 | + ?.map((e) => e == null | ||
| 259 | + ? null | ||
| 260 | + : CookbooklistDetail.fromJson(e as Map<String, dynamic>)) | ||
| 261 | + ?.toList()); | ||
| 262 | +} | ||
| 263 | + | ||
| 264 | +Map<String, dynamic> _$OrderToJson(Order instance) => <String, dynamic>{ | ||
| 265 | + 'id': instance.id, | ||
| 266 | + 'rid': instance.rid, | ||
| 267 | + 'no': instance.no, | ||
| 268 | + 'row_num': instance.rowNum, | ||
| 269 | + 'pnum': instance.pnum, | ||
| 270 | + 'sellerid': instance.sellerid, | ||
| 271 | + 'openid': instance.openid, | ||
| 272 | + 'price': instance.price, | ||
| 273 | + 'type': instance.type, | ||
| 274 | + 'behavior': instance.behavior, | ||
| 275 | + 'cdate': instance.cdate, | ||
| 276 | + 'cookbooklist': instance.cookbooklist | ||
| 277 | + }; | ||
| 278 | + | ||
| 279 | +CookbooklistDetail _$CookbooklistFromJson(Map<String, dynamic> json) { | ||
| 280 | + return CookbooklistDetail( | ||
| 281 | + json['id'] as String, | ||
| 282 | + json['orderid'] as String, | ||
| 283 | + json['openid'] as String, | ||
| 284 | + json['cookbookid'] as String, | ||
| 285 | + json['price'] as String, | ||
| 286 | + json['cookname'] as String, | ||
| 287 | + json['cookunit'] as String, | ||
| 288 | + json['cookimage'] as String, | ||
| 289 | + json['class_name'] as String, | ||
| 290 | + json['classid'] as String, | ||
| 291 | + json['class_order'] as String, | ||
| 292 | + json['fromSoucre'] as String, | ||
| 293 | + json['source'] as String, | ||
| 294 | + json['status'] as String, | ||
| 295 | + json['identity'] as String, | ||
| 296 | + json['cdate'] as String); | ||
| 297 | +} | ||
| 298 | + | ||
| 299 | +Map<String, dynamic> _$CookbooklistToJson(CookbooklistDetail instance) => | ||
| 300 | + <String, dynamic>{ | ||
| 301 | + 'id': instance.id, | ||
| 302 | + 'orderid': instance.orderid, | ||
| 303 | + 'openid': instance.openid, | ||
| 304 | + 'cookbookid': instance.cookbookid, | ||
| 305 | + 'price': instance.price, | ||
| 306 | + 'cookname': instance.cookname, | ||
| 307 | + 'cookunit': instance.cookunit, | ||
| 308 | + 'cookimage': instance.cookimage, | ||
| 309 | + 'class_name': instance.className, | ||
| 310 | + 'classid': instance.classid, | ||
| 311 | + 'class_order': instance.classOrder, | ||
| 312 | + 'fromSoucre': instance.fromSoucre, | ||
| 313 | + 'source': instance.source, | ||
| 314 | + 'status': instance.status, | ||
| 315 | + 'identity': instance.identity, | ||
| 316 | + 'cdate': instance.cdate | ||
| 317 | + }; |
| @@ -35,6 +35,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | @@ -35,6 +35,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | ||
| 35 | super.initState(); | 35 | super.initState(); |
| 36 | WidgetsBinding.instance.addPostFrameCallback((_) { | 36 | WidgetsBinding.instance.addPostFrameCallback((_) { |
| 37 | _getOrderFoodData(); | 37 | _getOrderFoodData(); |
| 38 | + _getTableInfoData(); | ||
| 38 | }); | 39 | }); |
| 39 | } | 40 | } |
| 40 | 41 | ||
| @@ -52,7 +53,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | @@ -52,7 +53,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | ||
| 52 | _getTableInfoData() async { | 53 | _getTableInfoData() async { |
| 53 | UserModel userModel = Provider.of<UserModel>(context, listen: false); | 54 | UserModel userModel = Provider.of<UserModel>(context, listen: false); |
| 54 | Map<String, String> params = { | 55 | Map<String, String> params = { |
| 55 | - "uid": userModel.user.openid, | 56 | + "openid": userModel.user.openid, |
| 56 | "rid": widget.rid | 57 | "rid": widget.rid |
| 57 | }; | 58 | }; |
| 58 | //明天完成 桌位名称信息 | 59 | //明天完成 桌位名称信息 |
| @@ -117,7 +118,16 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | @@ -117,7 +118,16 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | ||
| 117 | _getRow( | 118 | _getRow( |
| 118 | '人数', _orderFoodProvider.createdOrderSunModel.pnum), | 119 | '人数', _orderFoodProvider.createdOrderSunModel.pnum), |
| 119 | VEmptyView(30), | 120 | VEmptyView(30), |
| 120 | - _getRow('桌位', 'ffff') | 121 | + _orderFoodProvider.reserveDetailSunModel != null |
| 122 | + ? _getRow( | ||
| 123 | + '桌位', | ||
| 124 | + _orderFoodProvider | ||
| 125 | + .reserveDetailSunModel.tables.length > | ||
| 126 | + 0 | ||
| 127 | + ? _orderFoodProvider | ||
| 128 | + .reserveDetailSunModel.tables[0].name | ||
| 129 | + : '') | ||
| 130 | + : Container(), | ||
| 121 | ], | 131 | ], |
| 122 | ), | 132 | ), |
| 123 | ), | 133 | ), |
| @@ -288,6 +298,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | @@ -288,6 +298,7 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> { | ||
| 288 | pageState: model.pageState, | 298 | pageState: model.pageState, |
| 289 | callback: () { | 299 | callback: () { |
| 290 | _getOrderFoodData(); | 300 | _getOrderFoodData(); |
| 301 | + _getTableInfoData(); | ||
| 291 | }, | 302 | }, |
| 292 | emptyMsg: "暂时没有已选菜品哦", | 303 | emptyMsg: "暂时没有已选菜品哦", |
| 293 | emptyImg: "empty_search", | 304 | emptyImg: "empty_search", |
| @@ -3,6 +3,7 @@ import 'package:one_key/constant/constant.dart'; | @@ -3,6 +3,7 @@ import 'package:one_key/constant/constant.dart'; | ||
| 3 | import 'package:one_key/constant/error.dart'; | 3 | import 'package:one_key/constant/error.dart'; |
| 4 | import 'package:one_key/constant/state.dart'; | 4 | import 'package:one_key/constant/state.dart'; |
| 5 | import 'package:one_key/models/created_order_model.dart'; | 5 | import 'package:one_key/models/created_order_model.dart'; |
| 6 | +import 'package:one_key/models/reserve_detail_model.dart'; | ||
| 6 | import 'package:one_key/net/base_resp.dart'; | 7 | import 'package:one_key/net/base_resp.dart'; |
| 7 | import 'package:one_key/net/dio_util.dart'; | 8 | import 'package:one_key/net/dio_util.dart'; |
| 8 | import 'package:one_key/net/http_url.dart'; | 9 | import 'package:one_key/net/http_url.dart'; |
| @@ -13,6 +14,7 @@ class OrderFoodProvider extends ChangeNotifier { | @@ -13,6 +14,7 @@ class OrderFoodProvider extends ChangeNotifier { | ||
| 13 | PageState pageState = PageState.Loading; | 14 | PageState pageState = PageState.Loading; |
| 14 | List<Map<String, List<Cookbooklist>>> orderList = []; //已点菜单信息 | 15 | List<Map<String, List<Cookbooklist>>> orderList = []; //已点菜单信息 |
| 15 | CreatedOrderSunModel createdOrderSunModel; | 16 | CreatedOrderSunModel createdOrderSunModel; |
| 17 | + ReserveDetailSunModel reserveDetailSunModel; | ||
| 16 | 18 | ||
| 17 | ///顾客扫桌码点餐-扫码创建订单 | 19 | ///顾客扫桌码点餐-扫码创建订单 |
| 18 | getOrderFoodData(BuildContext context, Map<String, String> params, | 20 | getOrderFoodData(BuildContext context, Map<String, String> params, |
| @@ -94,6 +96,8 @@ class OrderFoodProvider extends ChangeNotifier { | @@ -94,6 +96,8 @@ class OrderFoodProvider extends ChangeNotifier { | ||
| 94 | if (baseResp.data.isEmpty) { | 96 | if (baseResp.data.isEmpty) { |
| 95 | } else { | 97 | } else { |
| 96 | //解析解析 | 98 | //解析解析 |
| 99 | + reserveDetailSunModel = | ||
| 100 | + ReserveDetailModel.fromJson(baseResp.responseData).data; | ||
| 97 | } | 101 | } |
| 98 | notifyListeners(); | 102 | notifyListeners(); |
| 99 | } else { | 103 | } else { |
-
Please register or login to post a comment