Showing
12 changed files
with
942 additions
and
446 deletions
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 1 | import 'package:json_annotation/json_annotation.dart'; | 2 | import 'package:json_annotation/json_annotation.dart'; |
| 2 | import 'package:one_key/utils/utils.dart'; | 3 | import 'package:one_key/utils/utils.dart'; |
| 3 | 4 | ||
| @@ -110,6 +111,26 @@ class NewUnmessage extends Object { | @@ -110,6 +111,26 @@ class NewUnmessage extends Object { | ||
| 110 | @JsonKey(name: 'table_class_name') | 111 | @JsonKey(name: 'table_class_name') |
| 111 | String tableClassName; | 112 | String tableClassName; |
| 112 | 113 | ||
| 114 | + @JsonKey(name: 'attr') | ||
| 115 | + String attr; | ||
| 116 | + | ||
| 117 | + @JsonKey(name: 'label') | ||
| 118 | + String label; | ||
| 119 | + @JsonKey(name: 'price') | ||
| 120 | + String price; | ||
| 121 | + | ||
| 122 | + @JsonKey(name: 'pay_id') | ||
| 123 | + String payid; | ||
| 124 | + | ||
| 125 | + @JsonKey(name: 'gid') | ||
| 126 | + String gid; | ||
| 127 | + | ||
| 128 | + @JsonKey(name: 'phone') | ||
| 129 | + String phone; | ||
| 130 | + | ||
| 131 | + @JsonKey(name: 'store_cdate') | ||
| 132 | + String storeCdate; | ||
| 133 | + | ||
| 113 | NewUnmessage( | 134 | NewUnmessage( |
| 114 | this.id, | 135 | this.id, |
| 115 | this.uid, | 136 | this.uid, |
| @@ -131,7 +152,14 @@ class NewUnmessage extends Object { | @@ -131,7 +152,14 @@ class NewUnmessage extends Object { | ||
| 131 | this.room_info, | 152 | this.room_info, |
| 132 | this.uname, | 153 | this.uname, |
| 133 | this.nickName, | 154 | this.nickName, |
| 134 | - this.tableClassName); | 155 | + this.tableClassName, |
| 156 | + this.attr, | ||
| 157 | + this.label, | ||
| 158 | + this.price, | ||
| 159 | + this.payid, | ||
| 160 | + this.gid, | ||
| 161 | + this.phone, | ||
| 162 | + this.storeCdate); | ||
| 135 | 163 | ||
| 136 | String get rnameStr { | 164 | String get rnameStr { |
| 137 | if (rname == null || rname == '' || rname == ' ') return ""; | 165 | if (rname == null || rname == '' || rname == ' ') return ""; |
| @@ -152,27 +180,35 @@ class NewUnmessage extends Object { | @@ -152,27 +180,35 @@ class NewUnmessage extends Object { | ||
| 152 | 180 | ||
| 153 | ///年月日 餐段 | 181 | ///年月日 餐段 |
| 154 | String get ddateStr { | 182 | String get ddateStr { |
| 155 | - String ymd = ""; | ||
| 156 | - if (ddate_long != null) { | ||
| 157 | - DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | ||
| 158 | - int.parse(ddate_long.toString()) * 1000); | ||
| 159 | - ymd = dateTime.year.toString() + | ||
| 160 | - "-" + | ||
| 161 | - Utils.addZeroNumber(dateTime.month) + | ||
| 162 | - "-" + | ||
| 163 | - Utils.addZeroNumber(dateTime.day); | 183 | + if (message_type != '17' && message_type != '18') { |
| 184 | + String ymd = ""; | ||
| 185 | + if (ddate_long != null) { | ||
| 186 | + DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | ||
| 187 | + int.parse(ddate_long.toString()) * 1000); | ||
| 188 | + ymd = dateTime.year.toString() + | ||
| 189 | + "-" + | ||
| 190 | + Utils.addZeroNumber(dateTime.month) + | ||
| 191 | + "-" + | ||
| 192 | + Utils.addZeroNumber(dateTime.day); | ||
| 193 | + } else { | ||
| 194 | + ymd = ddate.substring(0, 10); | ||
| 195 | + } | ||
| 196 | + switch (ddate_solt) { | ||
| 197 | + case "1": //早餐 | ||
| 198 | + return ymd + " 早餐"; | ||
| 199 | + case "2": //午餐 | ||
| 200 | + return ymd + " 午餐"; | ||
| 201 | + case "3": //晚餐 | ||
| 202 | + return ymd + " 晚餐"; | ||
| 203 | + default: | ||
| 204 | + return ymd; | ||
| 205 | + } | ||
| 164 | } else { | 206 | } else { |
| 165 | - ymd = ddate.substring(0, 10); | ||
| 166 | - } | ||
| 167 | - switch (ddate_solt) { | ||
| 168 | - case "1": //早餐 | ||
| 169 | - return ymd + " 早餐"; | ||
| 170 | - case "2": //午餐 | ||
| 171 | - return ymd + " 午餐"; | ||
| 172 | - case "3": //晚餐 | ||
| 173 | - return ymd + " 晚餐"; | ||
| 174 | - default: | ||
| 175 | - return ymd; | 207 | + if (message_type == '17') { |
| 208 | + return '会员充值${price}元'; | ||
| 209 | + } else if (message_type == '18') { | ||
| 210 | + return '${storeCdateShow} 存酒'; | ||
| 211 | + } | ||
| 176 | } | 212 | } |
| 177 | } | 213 | } |
| 178 | 214 | ||
| @@ -190,6 +226,13 @@ class NewUnmessage extends Object { | @@ -190,6 +226,13 @@ class NewUnmessage extends Object { | ||
| 190 | } | 226 | } |
| 191 | } | 227 | } |
| 192 | 228 | ||
| 229 | + String get storeCdateShow { | ||
| 230 | + if (storeCdate == null || storeCdate == '') return ''; | ||
| 231 | + DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | ||
| 232 | + int.parse(storeCdate.toString()) * 1000); | ||
| 233 | + return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d); | ||
| 234 | + } | ||
| 235 | + | ||
| 193 | String get cdateStr { | 236 | String get cdateStr { |
| 194 | String temp_date = '${cdate}'; | 237 | String temp_date = '${cdate}'; |
| 195 | switch (message_type) { | 238 | switch (message_type) { |
| @@ -42,28 +42,34 @@ Map<String, dynamic> _$NewUnmessageSunModelToJson( | @@ -42,28 +42,34 @@ Map<String, dynamic> _$NewUnmessageSunModelToJson( | ||
| 42 | 42 | ||
| 43 | NewUnmessage _$NewUnmessageFromJson(Map<String, dynamic> json) { | 43 | NewUnmessage _$NewUnmessageFromJson(Map<String, dynamic> json) { |
| 44 | return NewUnmessage( | 44 | return NewUnmessage( |
| 45 | - json['id'] as String, | ||
| 46 | - json['uid'] as String, | ||
| 47 | - json['message_type'] as String, | ||
| 48 | - json['handle_time'] as String, | ||
| 49 | - json['read_time'] as String, | ||
| 50 | - json['is_read'] as String, | ||
| 51 | - json['is_handle'] as String, | ||
| 52 | - json['ddate'] as dynamic, | ||
| 53 | - json['rname'] as String, | ||
| 54 | - json['sex'] as dynamic, | ||
| 55 | - json['cdate'] as dynamic, | ||
| 56 | - json['rid'] as dynamic, | ||
| 57 | - json['room_demand'] as dynamic, | ||
| 58 | - json['ddate_solt'] as dynamic, | ||
| 59 | - json['ddate_long'] as dynamic, | ||
| 60 | - json['cancel_name'] as dynamic, | ||
| 61 | - json['status'] as dynamic, | ||
| 62 | - json['room_info'] as dynamic, | ||
| 63 | - json['uname'] as String, | ||
| 64 | - json['nick_name'] as String, | ||
| 65 | - json['table_class_name'] as String, | ||
| 66 | - ); | 45 | + json['id'] as String, |
| 46 | + json['uid'] as String, | ||
| 47 | + json['message_type'] as String, | ||
| 48 | + json['handle_time'] as String, | ||
| 49 | + json['read_time'] as String, | ||
| 50 | + json['is_read'] as String, | ||
| 51 | + json['is_handle'] as String, | ||
| 52 | + json['ddate'] as dynamic, | ||
| 53 | + json['rname'] as String, | ||
| 54 | + json['sex'] as dynamic, | ||
| 55 | + json['cdate'] as dynamic, | ||
| 56 | + json['rid'] as dynamic, | ||
| 57 | + json['room_demand'] as dynamic, | ||
| 58 | + json['ddate_solt'] as dynamic, | ||
| 59 | + json['ddate_long'] as dynamic, | ||
| 60 | + json['cancel_name'] as dynamic, | ||
| 61 | + json['status'] as dynamic, | ||
| 62 | + json['room_info'] as dynamic, | ||
| 63 | + json['uname'] as String, | ||
| 64 | + json['nick_name'] as String, | ||
| 65 | + json['table_class_name'] as String, | ||
| 66 | + json['attr'] as String, | ||
| 67 | + json['label'] as String, | ||
| 68 | + json['price'] as String, | ||
| 69 | + json['pay_id'] as String, | ||
| 70 | + json['gid'] as String, | ||
| 71 | + json['phone'] as String, | ||
| 72 | + json['store_cdate'] as String); | ||
| 67 | } | 73 | } |
| 68 | 74 | ||
| 69 | Map<String, dynamic> _$NewUnmessageToJson(NewUnmessage instance) => | 75 | Map<String, dynamic> _$NewUnmessageToJson(NewUnmessage instance) => |
| @@ -88,5 +94,12 @@ Map<String, dynamic> _$NewUnmessageToJson(NewUnmessage instance) => | @@ -88,5 +94,12 @@ Map<String, dynamic> _$NewUnmessageToJson(NewUnmessage instance) => | ||
| 88 | 'room_info': instance.room_info, | 94 | 'room_info': instance.room_info, |
| 89 | 'uname': instance.uname, | 95 | 'uname': instance.uname, |
| 90 | 'nick_name': instance.nickName, | 96 | 'nick_name': instance.nickName, |
| 91 | - 'table_class_name':instance.tableClassName | 97 | + 'table_class_name': instance.tableClassName, |
| 98 | + 'attr': instance.attr, | ||
| 99 | + 'label': instance.label, | ||
| 100 | + 'price': instance.price, | ||
| 101 | + 'pay_id': instance.payid, | ||
| 102 | + 'gid': instance.gid, | ||
| 103 | + 'phone': instance.phone, | ||
| 104 | + 'store_cdate': instance.storeCdate | ||
| 92 | }; | 105 | }; |
| 1 | +import 'package:common_utils/common_utils.dart'; | ||
| 1 | import 'package:one_key/models/recharge_list_model.dart'; | 2 | import 'package:one_key/models/recharge_list_model.dart'; |
| 2 | import 'dart:convert' as convert; | 3 | import 'dart:convert' as convert; |
| 3 | 4 | ||
| 5 | +import '../utils/utils.dart'; | ||
| 6 | + | ||
| 4 | class RechargeNoticeModel { | 7 | class RechargeNoticeModel { |
| 5 | int ret; | 8 | int ret; |
| 6 | RechargeNoticeSunModel data; | 9 | RechargeNoticeSunModel data; |
| @@ -69,6 +72,24 @@ class Recharge { | @@ -69,6 +72,24 @@ class Recharge { | ||
| 69 | String qrcode; | 72 | String qrcode; |
| 70 | String cdate; | 73 | String cdate; |
| 71 | 74 | ||
| 75 | + String get stimeStr { | ||
| 76 | + if (stime == null || stime.toString() == '0') { | ||
| 77 | + return ''; | ||
| 78 | + } | ||
| 79 | + DateTime dateTime = | ||
| 80 | + DateTime.fromMillisecondsSinceEpoch(int.parse(stime.toString()) * 1000); | ||
| 81 | + return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + String get etimeStr { | ||
| 85 | + if (etime == null || etime.toString() == '0') { | ||
| 86 | + return ''; | ||
| 87 | + } | ||
| 88 | + DateTime dateTime = | ||
| 89 | + DateTime.fromMillisecondsSinceEpoch(int.parse(etime.toString()) * 1000); | ||
| 90 | + return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d); | ||
| 91 | + } | ||
| 92 | + | ||
| 72 | Recharge( | 93 | Recharge( |
| 73 | {this.id, | 94 | {this.id, |
| 74 | this.uid, | 95 | this.uid, |
| @@ -154,6 +175,32 @@ class Guest { | @@ -154,6 +175,32 @@ class Guest { | ||
| 154 | Null cdate; | 175 | Null cdate; |
| 155 | Null udate; | 176 | Null udate; |
| 156 | 177 | ||
| 178 | + String get rnameStr { | ||
| 179 | + if (rname == null || rname == '' || rname == ' ') return ""; | ||
| 180 | + switch (sex) { | ||
| 181 | + case "1": //先生 | ||
| 182 | + return rname + "先生"; | ||
| 183 | + case "2": //女士 | ||
| 184 | + return rname + "女士"; | ||
| 185 | + case "3": //公司 | ||
| 186 | + return rname + "公司"; | ||
| 187 | + } | ||
| 188 | + return rname; | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + get cDayShow { | ||
| 192 | + if (cDay != null) { | ||
| 193 | + DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | ||
| 194 | + int.parse(cDay.toString()) * 1000); | ||
| 195 | + return dateTime.year.toString() + | ||
| 196 | + "-" + | ||
| 197 | + Utils.addZeroNumber(dateTime.month) + | ||
| 198 | + "-" + | ||
| 199 | + Utils.addZeroNumber(dateTime.day); | ||
| 200 | + } | ||
| 201 | + return ''; | ||
| 202 | + } | ||
| 203 | + | ||
| 157 | Guest( | 204 | Guest( |
| 158 | {this.id, | 205 | {this.id, |
| 159 | this.sellerid, | 206 | this.sellerid, |
| @@ -38,6 +38,8 @@ import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; | @@ -38,6 +38,8 @@ import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; | ||
| 38 | import 'package:flutter_app_badger/flutter_app_badger.dart'; | 38 | import 'package:flutter_app_badger/flutter_app_badger.dart'; |
| 39 | import 'package:one_key/models/message.dart'; | 39 | import 'package:one_key/models/message.dart'; |
| 40 | 40 | ||
| 41 | +import '../../constant/state.dart'; | ||
| 42 | +import '../../models/customer_by_seller_model.dart'; | ||
| 41 | import '../../provider/feast_model.dart'; | 43 | import '../../provider/feast_model.dart'; |
| 42 | import '../feast/feast_page.dart'; | 44 | import '../feast/feast_page.dart'; |
| 43 | 45 | ||
| @@ -337,11 +339,55 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -337,11 +339,55 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 337 | NavigatorUtil.goNotebookDetailPage( | 339 | NavigatorUtil.goNotebookDetailPage( |
| 338 | context, notifyParam['rid'], notifyParam["uid"], | 340 | context, notifyParam['rid'], notifyParam["uid"], |
| 339 | mid: notifyParam['mid'], fromNotify: true); | 341 | mid: notifyParam['mid'], fromNotify: true); |
| 342 | + | ||
| 340 | break; | 343 | break; |
| 341 | case "17": | 344 | case "17": |
| 342 | //充值优惠活动充值成功 | 345 | //充值优惠活动充值成功 |
| 343 | print('fff'); | 346 | print('fff'); |
| 344 | NavigatorUtil.goMessageRechargeInfoPage(context, notifyParam['id']); | 347 | NavigatorUtil.goMessageRechargeInfoPage(context, notifyParam['id']); |
| 348 | + | ||
| 349 | + MessageDialogModel messageDialogModel = | ||
| 350 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 351 | + | ||
| 352 | + Map<String, String> params = { | ||
| 353 | + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 354 | + "id": notifyParam['mid'], | ||
| 355 | + "status": "is_read" | ||
| 356 | + }; | ||
| 357 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 358 | + | ||
| 359 | + break; | ||
| 360 | + case "18": | ||
| 361 | + CustomerBySellerSunModel userHistoryEntity = CustomerBySellerSunModel( | ||
| 362 | + null, | ||
| 363 | + null, | ||
| 364 | + notifyParam['phone'], | ||
| 365 | + null, | ||
| 366 | + null, | ||
| 367 | + null, | ||
| 368 | + null, | ||
| 369 | + null, | ||
| 370 | + null, | ||
| 371 | + null, | ||
| 372 | + null, | ||
| 373 | + notifyParam['id'], | ||
| 374 | + null, | ||
| 375 | + null, | ||
| 376 | + null, | ||
| 377 | + null); | ||
| 378 | + | ||
| 379 | + NavigatorUtil.goCustomerDetailPage( | ||
| 380 | + context, userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 381 | + MessageDialogModel messageDialogModel = | ||
| 382 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 383 | + | ||
| 384 | + Map<String, String> params = { | ||
| 385 | + "sid": Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 386 | + "id": notifyParam['mid'], | ||
| 387 | + "status": "is_read" | ||
| 388 | + }; | ||
| 389 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 390 | + | ||
| 345 | break; | 391 | break; |
| 346 | case "1": | 392 | case "1": |
| 347 | NavigatorUtil.goHasOrderFoodPage(context, | 393 | NavigatorUtil.goHasOrderFoodPage(context, |
| @@ -561,6 +607,55 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -561,6 +607,55 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 561 | //充值优惠活动充值成功 | 607 | //充值优惠活动充值成功 |
| 562 | print('fff'); | 608 | print('fff'); |
| 563 | NavigatorUtil.goMessageRechargeInfoPage(context, custom['id']); | 609 | NavigatorUtil.goMessageRechargeInfoPage(context, custom['id']); |
| 610 | + MessageDialogModel messageDialogModel = | ||
| 611 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 612 | + | ||
| 613 | + Map<String, String> params = { | ||
| 614 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 615 | + .user | ||
| 616 | + .sellerid, | ||
| 617 | + "id": custom['mid'], | ||
| 618 | + "status": "is_read" | ||
| 619 | + }; | ||
| 620 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 621 | + | ||
| 622 | + break; | ||
| 623 | + case "18": | ||
| 624 | + //存酒 | ||
| 625 | + print('fff'); | ||
| 626 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 627 | + CustomerBySellerSunModel( | ||
| 628 | + null, | ||
| 629 | + null, | ||
| 630 | + custom['phone'], | ||
| 631 | + null, | ||
| 632 | + null, | ||
| 633 | + null, | ||
| 634 | + null, | ||
| 635 | + null, | ||
| 636 | + null, | ||
| 637 | + null, | ||
| 638 | + null, | ||
| 639 | + custom['id'], | ||
| 640 | + null, | ||
| 641 | + null, | ||
| 642 | + null, | ||
| 643 | + null); | ||
| 644 | + | ||
| 645 | + NavigatorUtil.goCustomerDetailPage( | ||
| 646 | + context, userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 647 | + MessageDialogModel messageDialogModel = | ||
| 648 | + Provider.of<MessageDialogModel>(context, listen: false); | ||
| 649 | + | ||
| 650 | + Map<String, String> params = { | ||
| 651 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 652 | + .user | ||
| 653 | + .sellerid, | ||
| 654 | + "id": custom['mid'], | ||
| 655 | + "status": "is_read" | ||
| 656 | + }; | ||
| 657 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 658 | + | ||
| 564 | break; | 659 | break; |
| 565 | case "1": | 660 | case "1": |
| 566 | //提前点餐消息 | 661 | //提前点餐消息 |
| @@ -17,6 +17,8 @@ import 'package:one_key/widgets/v_empty_view.dart'; | @@ -17,6 +17,8 @@ import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 17 | import 'package:provider/provider.dart'; | 17 | import 'package:provider/provider.dart'; |
| 18 | 18 | ||
| 19 | import '../../app.dart'; | 19 | import '../../app.dart'; |
| 20 | +import '../../constant/state.dart'; | ||
| 21 | +import '../../models/customer_by_seller_model.dart'; | ||
| 20 | 22 | ||
| 21 | class MessageDialogItemF extends StatelessWidget { | 23 | class MessageDialogItemF extends StatelessWidget { |
| 22 | final NewUnmessage message; | 24 | final NewUnmessage message; |
| @@ -31,7 +33,7 @@ class MessageDialogItemF extends StatelessWidget { | @@ -31,7 +33,7 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 31 | String titleText = ""; | 33 | String titleText = ""; |
| 32 | String subTitleTextFir = ""; | 34 | String subTitleTextFir = ""; |
| 33 | String subTitleTextSec = ""; | 35 | String subTitleTextSec = ""; |
| 34 | - String attr = ''; | 36 | + String attr = message.attr; |
| 35 | Color bgcolor = MyColours.color_438E93; | 37 | Color bgcolor = MyColours.color_438E93; |
| 36 | String btnname = 'online_go'; | 38 | String btnname = 'online_go'; |
| 37 | if (message.message_type == "10") { | 39 | if (message.message_type == "10") { |
| @@ -70,6 +72,14 @@ class MessageDialogItemF extends StatelessWidget { | @@ -70,6 +72,14 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 70 | titleText = "取消\n预订"; | 72 | titleText = "取消\n预订"; |
| 71 | bgcolor = MyColours.color_999999; | 73 | bgcolor = MyColours.color_999999; |
| 72 | btnname = 'cancel_go'; | 74 | btnname = 'cancel_go'; |
| 75 | + } else if (message.message_type == "17") { | ||
| 76 | + titleText = "会员\n充值"; | ||
| 77 | + bgcolor = MyColours.color_F2995F; | ||
| 78 | + btnname = 'online_order_go'; | ||
| 79 | + } else if (message.message_type == "18") { | ||
| 80 | + titleText = "存酒\n超期"; | ||
| 81 | + bgcolor = MyColours.color_F2995F; | ||
| 82 | + btnname = 'order_go'; | ||
| 73 | } | 83 | } |
| 74 | if (isTreated) { | 84 | if (isTreated) { |
| 75 | bgcolor = MyColours.color_BFC4D4; | 85 | bgcolor = MyColours.color_BFC4D4; |
| @@ -176,6 +186,54 @@ class MessageDialogItemF extends StatelessWidget { | @@ -176,6 +186,54 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 176 | }; | 186 | }; |
| 177 | await messageDialogModel.setMessageStatus(context, params); | 187 | await messageDialogModel.setMessageStatus(context, params); |
| 178 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 | 188 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 |
| 189 | + } else if (message.message_type == "17") { | ||
| 190 | + //会员充值 | ||
| 191 | + NavigatorUtil.goMessageRechargeInfoPage(context, message.payid); | ||
| 192 | + bus.emit("remove_untreated_message", message.id); | ||
| 193 | + | ||
| 194 | + Map<String, String> params = { | ||
| 195 | + "sid": | ||
| 196 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 197 | + "id": message.id, | ||
| 198 | + "status": "is_read" | ||
| 199 | + }; | ||
| 200 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 201 | + | ||
| 202 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 203 | + } else if (message.message_type == "18") { | ||
| 204 | + //存酒超期 | ||
| 205 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 206 | + CustomerBySellerSunModel( | ||
| 207 | + null, | ||
| 208 | + null, | ||
| 209 | + message.phone, | ||
| 210 | + null, | ||
| 211 | + null, | ||
| 212 | + null, | ||
| 213 | + null, | ||
| 214 | + null, | ||
| 215 | + null, | ||
| 216 | + null, | ||
| 217 | + null, | ||
| 218 | + message.gid, | ||
| 219 | + null, | ||
| 220 | + null, | ||
| 221 | + null, | ||
| 222 | + null); | ||
| 223 | + | ||
| 224 | + NavigatorUtil.goCustomerDetailPage( | ||
| 225 | + context, userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 226 | + bus.emit("remove_untreated_message", message.id); | ||
| 227 | + | ||
| 228 | + | ||
| 229 | + Map<String, String> params1 = { | ||
| 230 | + "sid": | ||
| 231 | + Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 232 | + "id": message.id, | ||
| 233 | + "status": "is_read" | ||
| 234 | + }; | ||
| 235 | + await messageDialogModel.setMessageStatus(context, params1); | ||
| 236 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 179 | } | 237 | } |
| 180 | }, | 238 | }, |
| 181 | child: Stack( | 239 | child: Stack( |
| @@ -222,7 +280,9 @@ class MessageDialogItemF extends StatelessWidget { | @@ -222,7 +280,9 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 222 | HEmptyView(34), | 280 | HEmptyView(34), |
| 223 | message.message_type == "10" || | 281 | message.message_type == "10" || |
| 224 | message.message_type == "12" || | 282 | message.message_type == "12" || |
| 225 | - message.message_type == "13" | 283 | + message.message_type == "13" || |
| 284 | + message.message_type == "17" || | ||
| 285 | + message.message_type == "18" | ||
| 226 | ? Expanded( | 286 | ? Expanded( |
| 227 | child: Column( | 287 | child: Column( |
| 228 | crossAxisAlignment: CrossAxisAlignment.start, | 288 | crossAxisAlignment: CrossAxisAlignment.start, |
| @@ -249,81 +309,84 @@ class MessageDialogItemF extends StatelessWidget { | @@ -249,81 +309,84 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 249 | fontSize: | 309 | fontSize: |
| 250 | ScreenUtil().setSp(32)), | 310 | ScreenUtil().setSp(32)), |
| 251 | )), | 311 | )), |
| 252 | - // attr == '' || attr == null | ||
| 253 | - // ? Container( | ||
| 254 | - // margin: EdgeInsets.only( | ||
| 255 | - // right: ScreenUtil() | ||
| 256 | - // .setWidth(12)), | ||
| 257 | - // padding: EdgeInsets.symmetric( | ||
| 258 | - // horizontal: ScreenUtil() | ||
| 259 | - // .setWidth(16), | ||
| 260 | - // vertical: ScreenUtil() | ||
| 261 | - // .setWidth(6)), | ||
| 262 | - // decoration: BoxDecoration( | ||
| 263 | - // color: isTreated | ||
| 264 | - // ? MyColours.color_BFC4D4 | ||
| 265 | - // : attr == '沉睡' | ||
| 266 | - // ? Color.fromRGBO( | ||
| 267 | - // 223, 33, 81, 1) | ||
| 268 | - // : attr == '活跃' | ||
| 269 | - // ? Color | ||
| 270 | - // .fromRGBO( | ||
| 271 | - // 81, | ||
| 272 | - // 170, | ||
| 273 | - // 94, | ||
| 274 | - // 1) | ||
| 275 | - // : attr == '流失' | ||
| 276 | - // ? Color | ||
| 277 | - // .fromRGBO( | ||
| 278 | - // 109, | ||
| 279 | - // 101, | ||
| 280 | - // 248, | ||
| 281 | - // 1) | ||
| 282 | - // : Color | ||
| 283 | - // .fromRGBO( | ||
| 284 | - // 239, | ||
| 285 | - // 143, | ||
| 286 | - // 49, | ||
| 287 | - // 1), | ||
| 288 | - // borderRadius: | ||
| 289 | - // BorderRadius.circular( | ||
| 290 | - // 8)), | ||
| 291 | - // child: Text( | ||
| 292 | - // '活跃', | ||
| 293 | - // style: TextStyle( | ||
| 294 | - // color: MyColours | ||
| 295 | - // .color_ffffff, | ||
| 296 | - // fontSize: ScreenUtil() | ||
| 297 | - // .setSp(24)), | ||
| 298 | - // ), | ||
| 299 | - // ) | ||
| 300 | - // : SizedBox(), | ||
| 301 | - // Container( | ||
| 302 | - // padding: EdgeInsets.symmetric( | ||
| 303 | - // horizontal: | ||
| 304 | - // ScreenUtil().setWidth(16), | ||
| 305 | - // vertical: | ||
| 306 | - // ScreenUtil().setWidth(6)), | ||
| 307 | - // decoration: BoxDecoration( | ||
| 308 | - // border: Border.all( | ||
| 309 | - // width: ScreenUtil().setWidth(2), | ||
| 310 | - // color: isTreated | ||
| 311 | - // ? MyColours.color_BFC4D4 | ||
| 312 | - // : MyColours.color_F2995F, | ||
| 313 | - // ), | ||
| 314 | - // borderRadius: | ||
| 315 | - // BorderRadius.circular(8)), | ||
| 316 | - // child: Text( | ||
| 317 | - // 'biaoqianvipdsds', | ||
| 318 | - // // overflow: TextOverflow.ellipsis, | ||
| 319 | - // style: TextStyle( | ||
| 320 | - // color: isTreated | ||
| 321 | - // ? MyColours.color_BFC4D4 | ||
| 322 | - // : MyColours.color_F2995F, | ||
| 323 | - // fontSize: | ||
| 324 | - // ScreenUtil().setSp(24)), | ||
| 325 | - // ), | ||
| 326 | - // ) | 312 | + attr == '' || attr == null |
| 313 | + ? Container( | ||
| 314 | + margin: EdgeInsets.only( | ||
| 315 | + right: ScreenUtil() | ||
| 316 | + .setWidth(12)), | ||
| 317 | + padding: EdgeInsets.symmetric( | ||
| 318 | + horizontal: ScreenUtil() | ||
| 319 | + .setWidth(16), | ||
| 320 | + vertical: ScreenUtil() | ||
| 321 | + .setWidth(6)), | ||
| 322 | + decoration: BoxDecoration( | ||
| 323 | + color: isTreated | ||
| 324 | + ? MyColours.color_BFC4D4 | ||
| 325 | + : attr == '沉睡' | ||
| 326 | + ? Color.fromRGBO( | ||
| 327 | + 223, 33, 81, 1) | ||
| 328 | + : attr == '活跃' | ||
| 329 | + ? Color | ||
| 330 | + .fromRGBO( | ||
| 331 | + 81, | ||
| 332 | + 170, | ||
| 333 | + 94, | ||
| 334 | + 1) | ||
| 335 | + : attr == '流失' | ||
| 336 | + ? Color | ||
| 337 | + .fromRGBO( | ||
| 338 | + 109, | ||
| 339 | + 101, | ||
| 340 | + 248, | ||
| 341 | + 1) | ||
| 342 | + : Color | ||
| 343 | + .fromRGBO( | ||
| 344 | + 239, | ||
| 345 | + 143, | ||
| 346 | + 49, | ||
| 347 | + 1), | ||
| 348 | + borderRadius: | ||
| 349 | + BorderRadius.circular( | ||
| 350 | + 8)), | ||
| 351 | + child: Text( | ||
| 352 | + '活跃', | ||
| 353 | + style: TextStyle( | ||
| 354 | + color: MyColours | ||
| 355 | + .color_ffffff, | ||
| 356 | + fontSize: ScreenUtil() | ||
| 357 | + .setSp(24)), | ||
| 358 | + ), | ||
| 359 | + ) | ||
| 360 | + : SizedBox(), | ||
| 361 | + if (message.label != null && | ||
| 362 | + message.label != '') | ||
| 363 | + Container( | ||
| 364 | + padding: EdgeInsets.symmetric( | ||
| 365 | + horizontal: | ||
| 366 | + ScreenUtil().setWidth(16), | ||
| 367 | + vertical: | ||
| 368 | + ScreenUtil().setWidth(6)), | ||
| 369 | + decoration: BoxDecoration( | ||
| 370 | + border: Border.all( | ||
| 371 | + width: | ||
| 372 | + ScreenUtil().setWidth(2), | ||
| 373 | + color: isTreated | ||
| 374 | + ? MyColours.color_BFC4D4 | ||
| 375 | + : MyColours.color_F2995F, | ||
| 376 | + ), | ||
| 377 | + borderRadius: | ||
| 378 | + BorderRadius.circular(8)), | ||
| 379 | + child: Text( | ||
| 380 | + message.label, | ||
| 381 | + // overflow: TextOverflow.ellipsis, | ||
| 382 | + style: TextStyle( | ||
| 383 | + color: isTreated | ||
| 384 | + ? MyColours.color_BFC4D4 | ||
| 385 | + : MyColours.color_F2995F, | ||
| 386 | + fontSize: | ||
| 387 | + ScreenUtil().setSp(24)), | ||
| 388 | + ), | ||
| 389 | + ) | ||
| 327 | ]); | 390 | ]); |
| 328 | })), | 391 | })), |
| 329 | VEmptyView(16), | 392 | VEmptyView(16), |
| @@ -589,6 +652,59 @@ class MessageDialogItemF extends StatelessWidget { | @@ -589,6 +652,59 @@ class MessageDialogItemF extends StatelessWidget { | ||
| 589 | await messageDialogModel.setMessageStatus( | 652 | await messageDialogModel.setMessageStatus( |
| 590 | context, params); | 653 | context, params); |
| 591 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 | 654 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 |
| 655 | + } else if (message.message_type == "17") { | ||
| 656 | + //会员充值 | ||
| 657 | + NavigatorUtil.goMessageRechargeInfoPage( | ||
| 658 | + context, message.payid); | ||
| 659 | + bus.emit("remove_untreated_message", message.id); | ||
| 660 | + | ||
| 661 | + Map<String, String> params = { | ||
| 662 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 663 | + .user | ||
| 664 | + .sellerid, | ||
| 665 | + "id": message.id, | ||
| 666 | + "status": "is_read" | ||
| 667 | + }; | ||
| 668 | + await messageDialogModel.setMessageStatus( | ||
| 669 | + context, params); | ||
| 670 | + | ||
| 671 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 672 | + } else if (message.message_type == "18") { | ||
| 673 | + //存酒超期 | ||
| 674 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 675 | + CustomerBySellerSunModel( | ||
| 676 | + null, | ||
| 677 | + null, | ||
| 678 | + message.phone, | ||
| 679 | + null, | ||
| 680 | + null, | ||
| 681 | + null, | ||
| 682 | + null, | ||
| 683 | + null, | ||
| 684 | + null, | ||
| 685 | + null, | ||
| 686 | + null, | ||
| 687 | + message.gid, | ||
| 688 | + null, | ||
| 689 | + null, | ||
| 690 | + null, | ||
| 691 | + null); | ||
| 692 | + | ||
| 693 | + NavigatorUtil.goCustomerDetailPage(context, | ||
| 694 | + userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 695 | + bus.emit("remove_untreated_message", message.id); | ||
| 696 | + | ||
| 697 | + | ||
| 698 | + Map<String, String> params1 = { | ||
| 699 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 700 | + .user | ||
| 701 | + .sellerid, | ||
| 702 | + "id": message.id, | ||
| 703 | + "status": "is_read" | ||
| 704 | + }; | ||
| 705 | + await messageDialogModel.setMessageStatus( | ||
| 706 | + context, params1); | ||
| 707 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 592 | } | 708 | } |
| 593 | }, | 709 | }, |
| 594 | child: Image.asset( | 710 | child: Image.asset( |
| @@ -14,6 +14,9 @@ import 'package:one_key/widgets/h_empty_view.dart'; | @@ -14,6 +14,9 @@ import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 14 | import 'package:one_key/widgets/v_empty_view.dart'; | 14 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 15 | import 'package:provider/provider.dart'; | 15 | import 'package:provider/provider.dart'; |
| 16 | 16 | ||
| 17 | +import '../../constant/state.dart'; | ||
| 18 | +import '../../models/customer_by_seller_model.dart'; | ||
| 19 | + | ||
| 17 | class MessageItemF extends StatelessWidget { | 20 | class MessageItemF extends StatelessWidget { |
| 18 | final NewUnmessage message; | 21 | final NewUnmessage message; |
| 19 | final bool isTreated; | 22 | final bool isTreated; |
| @@ -27,7 +30,7 @@ class MessageItemF extends StatelessWidget { | @@ -27,7 +30,7 @@ class MessageItemF extends StatelessWidget { | ||
| 27 | String titleText = ""; | 30 | String titleText = ""; |
| 28 | String subTitleTextFir = ""; | 31 | String subTitleTextFir = ""; |
| 29 | String subTitleTextSec = ""; | 32 | String subTitleTextSec = ""; |
| 30 | - String attr = ''; | 33 | + String attr = message.attr; |
| 31 | Color bgcolor = MyColours.color_438E93; | 34 | Color bgcolor = MyColours.color_438E93; |
| 32 | String btnname = 'online_go'; | 35 | String btnname = 'online_go'; |
| 33 | if (message.message_type == "10") { | 36 | if (message.message_type == "10") { |
| @@ -66,6 +69,14 @@ class MessageItemF extends StatelessWidget { | @@ -66,6 +69,14 @@ class MessageItemF extends StatelessWidget { | ||
| 66 | titleText = "取消\n预订"; | 69 | titleText = "取消\n预订"; |
| 67 | bgcolor = MyColours.color_999999; | 70 | bgcolor = MyColours.color_999999; |
| 68 | btnname = 'cancel_go'; | 71 | btnname = 'cancel_go'; |
| 72 | + } else if (message.message_type == "17") { | ||
| 73 | + titleText = "会员\n充值"; | ||
| 74 | + bgcolor = MyColours.color_F2995F; | ||
| 75 | + btnname = 'online_order_go'; | ||
| 76 | + } else if (message.message_type == "18") { | ||
| 77 | + titleText = "存酒\n超期"; | ||
| 78 | + bgcolor = MyColours.color_F2995F; | ||
| 79 | + btnname = 'order_go'; | ||
| 69 | } | 80 | } |
| 70 | if (isTreated) { | 81 | if (isTreated) { |
| 71 | bgcolor = MyColours.color_BFC4D4; | 82 | bgcolor = MyColours.color_BFC4D4; |
| @@ -98,7 +109,6 @@ class MessageItemF extends StatelessWidget { | @@ -98,7 +109,6 @@ class MessageItemF extends StatelessWidget { | ||
| 98 | //在线买单消息查看 | 109 | //在线买单消息查看 |
| 99 | NavigatorUtil.goOnlineCheckDetailPage(context, | 110 | NavigatorUtil.goOnlineCheckDetailPage(context, |
| 100 | rid: '${message.rid}'); | 111 | rid: '${message.rid}'); |
| 101 | - // NavigatorUtil.goMessageRechargeInfoPage(context); | ||
| 102 | } else if (message.message_type == "13") { | 112 | } else if (message.message_type == "13") { |
| 103 | //买单通知,跳转至买单详情查看 | 113 | //买单通知,跳转至买单详情查看 |
| 104 | NavigatorUtil.goOnlineCheckDetailPage(context, | 114 | NavigatorUtil.goOnlineCheckDetailPage(context, |
| @@ -115,6 +125,32 @@ class MessageItemF extends StatelessWidget { | @@ -115,6 +125,32 @@ class MessageItemF extends StatelessWidget { | ||
| 115 | dateTime: DateTime.parse(message.ddate.replaceAll('/', '-')) | 125 | dateTime: DateTime.parse(message.ddate.replaceAll('/', '-')) |
| 116 | .millisecondsSinceEpoch, | 126 | .millisecondsSinceEpoch, |
| 117 | solt: message.ddate_solt); | 127 | solt: message.ddate_solt); |
| 128 | + } else if (message.message_type == "17") { | ||
| 129 | + //会员充值 | ||
| 130 | + NavigatorUtil.goMessageRechargeInfoPage(context, message.payid); | ||
| 131 | + } else if (message.message_type == "18") { | ||
| 132 | + //存酒超期 | ||
| 133 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 134 | + CustomerBySellerSunModel( | ||
| 135 | + null, | ||
| 136 | + null, | ||
| 137 | + message.phone, | ||
| 138 | + null, | ||
| 139 | + null, | ||
| 140 | + null, | ||
| 141 | + null, | ||
| 142 | + null, | ||
| 143 | + null, | ||
| 144 | + null, | ||
| 145 | + null, | ||
| 146 | + message.gid, | ||
| 147 | + null, | ||
| 148 | + null, | ||
| 149 | + null, | ||
| 150 | + null); | ||
| 151 | + | ||
| 152 | + NavigatorUtil.goCustomerDetailPage( | ||
| 153 | + context, userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 118 | } | 154 | } |
| 119 | } else { | 155 | } else { |
| 120 | messageDialogModel.removeMessage(message.id); | 156 | messageDialogModel.removeMessage(message.id); |
| @@ -217,6 +253,55 @@ class MessageItemF extends StatelessWidget { | @@ -217,6 +253,55 @@ class MessageItemF extends StatelessWidget { | ||
| 217 | }; | 253 | }; |
| 218 | await messageDialogModel.setMessageStatus(context, params); | 254 | await messageDialogModel.setMessageStatus(context, params); |
| 219 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 | 255 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 |
| 256 | + } else if (message.message_type == "17") { | ||
| 257 | + //会员充值 | ||
| 258 | + NavigatorUtil.goMessageRechargeInfoPage(context, message.payid); | ||
| 259 | + bus.emit("remove_untreated_message", message.id); | ||
| 260 | + | ||
| 261 | + Map<String, String> params = { | ||
| 262 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 263 | + .user | ||
| 264 | + .sellerid, | ||
| 265 | + "id": message.id, | ||
| 266 | + "status": "is_read" | ||
| 267 | + }; | ||
| 268 | + await messageDialogModel.setMessageStatus(context, params); | ||
| 269 | + | ||
| 270 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 271 | + } else if (message.message_type == "18") { | ||
| 272 | + //存酒超期 | ||
| 273 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 274 | + CustomerBySellerSunModel( | ||
| 275 | + null, | ||
| 276 | + null, | ||
| 277 | + message.phone, | ||
| 278 | + null, | ||
| 279 | + null, | ||
| 280 | + null, | ||
| 281 | + null, | ||
| 282 | + null, | ||
| 283 | + null, | ||
| 284 | + null, | ||
| 285 | + null, | ||
| 286 | + message.gid, | ||
| 287 | + null, | ||
| 288 | + null, | ||
| 289 | + null, | ||
| 290 | + null); | ||
| 291 | + | ||
| 292 | + NavigatorUtil.goCustomerDetailPage( | ||
| 293 | + context, userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 294 | + bus.emit("remove_untreated_message", message.id); | ||
| 295 | + | ||
| 296 | + Map<String, String> params1 = { | ||
| 297 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 298 | + .user | ||
| 299 | + .sellerid, | ||
| 300 | + "id": message.id, | ||
| 301 | + "status": "is_read" | ||
| 302 | + }; | ||
| 303 | + await messageDialogModel.setMessageStatus(context, params1); | ||
| 304 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 220 | } | 305 | } |
| 221 | } | 306 | } |
| 222 | }, | 307 | }, |
| @@ -264,7 +349,9 @@ class MessageItemF extends StatelessWidget { | @@ -264,7 +349,9 @@ class MessageItemF extends StatelessWidget { | ||
| 264 | HEmptyView(34), | 349 | HEmptyView(34), |
| 265 | message.message_type == "10" || | 350 | message.message_type == "10" || |
| 266 | message.message_type == "12" || | 351 | message.message_type == "12" || |
| 267 | - message.message_type == "13" | 352 | + message.message_type == "13" || |
| 353 | + message.message_type == "17" || | ||
| 354 | + message.message_type == "18" | ||
| 268 | ? Expanded( | 355 | ? Expanded( |
| 269 | child: Column( | 356 | child: Column( |
| 270 | crossAxisAlignment: CrossAxisAlignment.start, | 357 | crossAxisAlignment: CrossAxisAlignment.start, |
| @@ -291,81 +378,84 @@ class MessageItemF extends StatelessWidget { | @@ -291,81 +378,84 @@ class MessageItemF extends StatelessWidget { | ||
| 291 | fontSize: | 378 | fontSize: |
| 292 | ScreenUtil().setSp(32)), | 379 | ScreenUtil().setSp(32)), |
| 293 | )), | 380 | )), |
| 294 | - // attr == '' || attr == null | ||
| 295 | - // ? Container( | ||
| 296 | - // margin: EdgeInsets.only( | ||
| 297 | - // right: ScreenUtil() | ||
| 298 | - // .setWidth(12)), | ||
| 299 | - // padding: EdgeInsets.symmetric( | ||
| 300 | - // horizontal: ScreenUtil() | ||
| 301 | - // .setWidth(16), | ||
| 302 | - // vertical: ScreenUtil() | ||
| 303 | - // .setWidth(6)), | ||
| 304 | - // decoration: BoxDecoration( | ||
| 305 | - // color: isTreated | ||
| 306 | - // ? MyColours.color_BFC4D4 | ||
| 307 | - // : attr == '沉睡' | ||
| 308 | - // ? Color.fromRGBO( | ||
| 309 | - // 223, 33, 81, 1) | ||
| 310 | - // : attr == '活跃' | ||
| 311 | - // ? Color | ||
| 312 | - // .fromRGBO( | ||
| 313 | - // 81, | ||
| 314 | - // 170, | ||
| 315 | - // 94, | ||
| 316 | - // 1) | ||
| 317 | - // : attr == '流失' | ||
| 318 | - // ? Color | ||
| 319 | - // .fromRGBO( | ||
| 320 | - // 109, | ||
| 321 | - // 101, | ||
| 322 | - // 248, | ||
| 323 | - // 1) | ||
| 324 | - // : Color | ||
| 325 | - // .fromRGBO( | ||
| 326 | - // 239, | ||
| 327 | - // 143, | ||
| 328 | - // 49, | ||
| 329 | - // 1), | ||
| 330 | - // borderRadius: | ||
| 331 | - // BorderRadius.circular( | ||
| 332 | - // 8)), | ||
| 333 | - // child: Text( | ||
| 334 | - // '活跃', | ||
| 335 | - // style: TextStyle( | ||
| 336 | - // color: MyColours | ||
| 337 | - // .color_ffffff, | ||
| 338 | - // fontSize: ScreenUtil() | ||
| 339 | - // .setSp(24)), | ||
| 340 | - // ), | ||
| 341 | - // ) | ||
| 342 | - // : SizedBox(), | ||
| 343 | - // Container( | ||
| 344 | - // padding: EdgeInsets.symmetric( | ||
| 345 | - // horizontal: | ||
| 346 | - // ScreenUtil().setWidth(16), | ||
| 347 | - // vertical: | ||
| 348 | - // ScreenUtil().setWidth(6)), | ||
| 349 | - // decoration: BoxDecoration( | ||
| 350 | - // border: Border.all( | ||
| 351 | - // width: ScreenUtil().setWidth(2), | ||
| 352 | - // color: isTreated | ||
| 353 | - // ? MyColours.color_BFC4D4 | ||
| 354 | - // : MyColours.color_F2995F, | ||
| 355 | - // ), | ||
| 356 | - // borderRadius: | ||
| 357 | - // BorderRadius.circular(8)), | ||
| 358 | - // child: Text( | ||
| 359 | - // 'biaoqianvipdsds', | ||
| 360 | - // // overflow: TextOverflow.ellipsis, | ||
| 361 | - // style: TextStyle( | ||
| 362 | - // color: isTreated | ||
| 363 | - // ? MyColours.color_BFC4D4 | ||
| 364 | - // : MyColours.color_F2995F, | ||
| 365 | - // fontSize: | ||
| 366 | - // ScreenUtil().setSp(24)), | ||
| 367 | - // ), | ||
| 368 | - // ) | 381 | + attr == '' || attr == null |
| 382 | + ? Container( | ||
| 383 | + margin: EdgeInsets.only( | ||
| 384 | + right: ScreenUtil() | ||
| 385 | + .setWidth(12)), | ||
| 386 | + padding: EdgeInsets.symmetric( | ||
| 387 | + horizontal: ScreenUtil() | ||
| 388 | + .setWidth(16), | ||
| 389 | + vertical: ScreenUtil() | ||
| 390 | + .setWidth(6)), | ||
| 391 | + decoration: BoxDecoration( | ||
| 392 | + color: isTreated | ||
| 393 | + ? MyColours.color_BFC4D4 | ||
| 394 | + : attr == '沉睡' | ||
| 395 | + ? Color.fromRGBO( | ||
| 396 | + 223, 33, 81, 1) | ||
| 397 | + : attr == '活跃' | ||
| 398 | + ? Color | ||
| 399 | + .fromRGBO( | ||
| 400 | + 81, | ||
| 401 | + 170, | ||
| 402 | + 94, | ||
| 403 | + 1) | ||
| 404 | + : attr == '流失' | ||
| 405 | + ? Color | ||
| 406 | + .fromRGBO( | ||
| 407 | + 109, | ||
| 408 | + 101, | ||
| 409 | + 248, | ||
| 410 | + 1) | ||
| 411 | + : Color | ||
| 412 | + .fromRGBO( | ||
| 413 | + 239, | ||
| 414 | + 143, | ||
| 415 | + 49, | ||
| 416 | + 1), | ||
| 417 | + borderRadius: | ||
| 418 | + BorderRadius.circular( | ||
| 419 | + 8)), | ||
| 420 | + child: Text( | ||
| 421 | + '活跃', | ||
| 422 | + style: TextStyle( | ||
| 423 | + color: MyColours | ||
| 424 | + .color_ffffff, | ||
| 425 | + fontSize: ScreenUtil() | ||
| 426 | + .setSp(24)), | ||
| 427 | + ), | ||
| 428 | + ) | ||
| 429 | + : SizedBox(), | ||
| 430 | + if (message.label != null && | ||
| 431 | + message.label != '') | ||
| 432 | + Container( | ||
| 433 | + padding: EdgeInsets.symmetric( | ||
| 434 | + horizontal: | ||
| 435 | + ScreenUtil().setWidth(16), | ||
| 436 | + vertical: | ||
| 437 | + ScreenUtil().setWidth(6)), | ||
| 438 | + decoration: BoxDecoration( | ||
| 439 | + border: Border.all( | ||
| 440 | + width: | ||
| 441 | + ScreenUtil().setWidth(2), | ||
| 442 | + color: isTreated | ||
| 443 | + ? MyColours.color_BFC4D4 | ||
| 444 | + : MyColours.color_F2995F, | ||
| 445 | + ), | ||
| 446 | + borderRadius: | ||
| 447 | + BorderRadius.circular(8)), | ||
| 448 | + child: Text( | ||
| 449 | + message.label, | ||
| 450 | + // overflow: TextOverflow.ellipsis, | ||
| 451 | + style: TextStyle( | ||
| 452 | + color: isTreated | ||
| 453 | + ? MyColours.color_BFC4D4 | ||
| 454 | + : MyColours.color_F2995F, | ||
| 455 | + fontSize: | ||
| 456 | + ScreenUtil().setSp(24)), | ||
| 457 | + ), | ||
| 458 | + ) | ||
| 369 | ]); | 459 | ]); |
| 370 | })), | 460 | })), |
| 371 | VEmptyView(16), | 461 | VEmptyView(16), |
| @@ -631,6 +721,58 @@ class MessageItemF extends StatelessWidget { | @@ -631,6 +721,58 @@ class MessageItemF extends StatelessWidget { | ||
| 631 | await messageDialogModel.setMessageStatus( | 721 | await messageDialogModel.setMessageStatus( |
| 632 | context, params); | 722 | context, params); |
| 633 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 | 723 | bus.emit("refresh_untreated_num"); //刷新未读消息数目 |
| 724 | + } else if (message.message_type == "17") { | ||
| 725 | + //会员充值 | ||
| 726 | + NavigatorUtil.goMessageRechargeInfoPage( | ||
| 727 | + context, message.payid); | ||
| 728 | + bus.emit("remove_untreated_message", message.id); | ||
| 729 | + | ||
| 730 | + Map<String, String> params = { | ||
| 731 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 732 | + .user | ||
| 733 | + .sellerid, | ||
| 734 | + "id": message.id, | ||
| 735 | + "status": "is_read" | ||
| 736 | + }; | ||
| 737 | + await messageDialogModel.setMessageStatus( | ||
| 738 | + context, params); | ||
| 739 | + | ||
| 740 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 741 | + } else if (message.message_type == "18") { | ||
| 742 | + //存酒超期 | ||
| 743 | + CustomerBySellerSunModel userHistoryEntity = | ||
| 744 | + CustomerBySellerSunModel( | ||
| 745 | + null, | ||
| 746 | + null, | ||
| 747 | + message.phone, | ||
| 748 | + null, | ||
| 749 | + null, | ||
| 750 | + null, | ||
| 751 | + null, | ||
| 752 | + null, | ||
| 753 | + null, | ||
| 754 | + null, | ||
| 755 | + null, | ||
| 756 | + message.gid, | ||
| 757 | + null, | ||
| 758 | + null, | ||
| 759 | + null, | ||
| 760 | + null); | ||
| 761 | + | ||
| 762 | + NavigatorUtil.goCustomerDetailPage(context, | ||
| 763 | + userHistoryEntity, FromPage.FromPageMessagePage); | ||
| 764 | + bus.emit("remove_untreated_message", message.id); | ||
| 765 | + | ||
| 766 | + Map<String, String> params1 = { | ||
| 767 | + "sid": Provider.of<UserModel>(context, listen: false) | ||
| 768 | + .user | ||
| 769 | + .sellerid, | ||
| 770 | + "id": message.id, | ||
| 771 | + "status": "is_read" | ||
| 772 | + }; | ||
| 773 | + await messageDialogModel.setMessageStatus( | ||
| 774 | + context, params1); | ||
| 775 | + bus.emit("refresh_untreated_num"); //刷新未读消息数目 | ||
| 634 | } | 776 | } |
| 635 | }, | 777 | }, |
| 636 | child: Image.asset( | 778 | child: Image.asset( |
| @@ -41,8 +41,9 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -41,8 +41,9 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 41 | 41 | ||
| 42 | WidgetsBinding.instance.addPostFrameCallback((_) { | 42 | WidgetsBinding.instance.addPostFrameCallback((_) { |
| 43 | // if (widget.idstr != null && widget.idstr != 'null') { | 43 | // if (widget.idstr != null && widget.idstr != 'null') { |
| 44 | - // _getNewRechargeDetail(); | 44 | + // _getNewrechargeNoticeSunModel.recharge(); |
| 45 | // } | 45 | // } |
| 46 | + | ||
| 46 | _getPayMessageByID(); | 47 | _getPayMessageByID(); |
| 47 | }); | 48 | }); |
| 48 | } | 49 | } |
| @@ -50,6 +51,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -50,6 +51,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 50 | _getPayMessageByID() async { | 51 | _getPayMessageByID() async { |
| 51 | bool success = | 52 | bool success = |
| 52 | await marketingCenterProvider.getPayMessageByID(context, widget.idStr); | 53 | await marketingCenterProvider.getPayMessageByID(context, widget.idStr); |
| 54 | + setState(() {}); | ||
| 53 | } | 55 | } |
| 54 | 56 | ||
| 55 | ///输入框 | 57 | ///输入框 |
| @@ -86,7 +88,6 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -86,7 +88,6 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 86 | ///券说明 | 88 | ///券说明 |
| 87 | Widget _explain( | 89 | Widget _explain( |
| 88 | String title, | 90 | String title, |
| 89 | - String hintText, | ||
| 90 | ) { | 91 | ) { |
| 91 | return Container( | 92 | return Container( |
| 92 | child: Column( | 93 | child: Column( |
| @@ -105,10 +106,15 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -105,10 +106,15 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 105 | Padding( | 106 | Padding( |
| 106 | padding: EdgeInsets.only(left: w(20)), | 107 | padding: EdgeInsets.only(left: w(20)), |
| 107 | child: Text( | 108 | child: Text( |
| 108 | - marketingCenterProvider.rechargeDetail.explain == '' || | ||
| 109 | - marketingCenterProvider.rechargeDetail.explain == null | 109 | + marketingCenterProvider |
| 110 | + .rechargeNoticeSunModel.recharge.explain == | ||
| 111 | + '' || | ||
| 112 | + marketingCenterProvider | ||
| 113 | + .rechargeNoticeSunModel.recharge.explain == | ||
| 114 | + null | ||
| 110 | ? '无' | 115 | ? '无' |
| 111 | - : marketingCenterProvider.rechargeDetail.explain, | 116 | + : marketingCenterProvider |
| 117 | + .rechargeNoticeSunModel.recharge.explain, | ||
| 112 | 118 | ||
| 113 | // maxLengthEnforced: true, | 119 | // maxLengthEnforced: true, |
| 114 | style: TextStyle( | 120 | style: TextStyle( |
| @@ -137,7 +143,8 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -137,7 +143,8 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 137 | ), | 143 | ), |
| 138 | Spacer(), | 144 | Spacer(), |
| 139 | Image.asset( | 145 | Image.asset( |
| 140 | - marketingCenterProvider.rechargeDetail.isOpen == '1' | 146 | + marketingCenterProvider.rechargeNoticeSunModel.recharge.isOpen == |
| 147 | + '1' | ||
| 141 | ? Utils.getImgPath('swich_on') | 148 | ? Utils.getImgPath('swich_on') |
| 142 | : Utils.getImgPath('swich_off'), | 149 | : Utils.getImgPath('swich_off'), |
| 143 | width: ScreenUtil().setWidth(44 * 2), | 150 | width: ScreenUtil().setWidth(44 * 2), |
| @@ -168,7 +175,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -168,7 +175,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 168 | } else { | 175 | } else { |
| 169 | // _couponNetworkData(widget.index); | 176 | // _couponNetworkData(widget.index); |
| 170 | } | 177 | } |
| 171 | - // _getNewRechargeDetail(); | 178 | + // _getNewrechargeNoticeSunModel.recharge(); |
| 172 | }, | 179 | }, |
| 173 | emptyMsg: "暂时没有详情数据哦", | 180 | emptyMsg: "暂时没有详情数据哦", |
| 174 | emptyImg: "empty_search", | 181 | emptyImg: "empty_search", |
| @@ -188,7 +195,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -188,7 +195,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 188 | VEmptyView(56), | 195 | VEmptyView(56), |
| 189 | _text( | 196 | _text( |
| 190 | '顾客姓名', | 197 | '顾客姓名', |
| 191 | - '欧阳正德 先生', | 198 | + '${marketingCenterProvider.rechargeNoticeSunModel.guest.rnameStr}', |
| 192 | ), | 199 | ), |
| 193 | VEmptyView(24), | 200 | VEmptyView(24), |
| 194 | MyDivider( | 201 | MyDivider( |
| @@ -199,7 +206,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -199,7 +206,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 199 | VEmptyView(48), | 206 | VEmptyView(48), |
| 200 | _text( | 207 | _text( |
| 201 | '联系电话', | 208 | '联系电话', |
| 202 | - '1987665555', | 209 | + '${marketingCenterProvider.rechargeNoticeSunModel.guest.phone}', |
| 203 | ), | 210 | ), |
| 204 | VEmptyView(24), | 211 | VEmptyView(24), |
| 205 | MyDivider( | 212 | MyDivider( |
| @@ -210,7 +217,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -210,7 +217,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 210 | VEmptyView(48), | 217 | VEmptyView(48), |
| 211 | _text( | 218 | _text( |
| 212 | '顾客生日', | 219 | '顾客生日', |
| 213 | - '2022-04-12', | 220 | + '${marketingCenterProvider.rechargeNoticeSunModel.guest.cDayShow}', |
| 214 | ), | 221 | ), |
| 215 | VEmptyView(24), | 222 | VEmptyView(24), |
| 216 | MyDivider( | 223 | MyDivider( |
| @@ -221,7 +228,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -221,7 +228,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 221 | VEmptyView(48), | 228 | VEmptyView(48), |
| 222 | _text( | 229 | _text( |
| 223 | '充值金额', | 230 | '充值金额', |
| 224 | - '1000元', | 231 | + '${marketingCenterProvider.rechargeNoticeSunModel.recharge.rechargeMoney}元', |
| 225 | ), | 232 | ), |
| 226 | VEmptyView(24), | 233 | VEmptyView(24), |
| 227 | MyDivider( | 234 | MyDivider( |
| @@ -232,7 +239,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -232,7 +239,7 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 232 | VEmptyView(48), | 239 | VEmptyView(48), |
| 233 | _text( | 240 | _text( |
| 234 | '活动名称', | 241 | '活动名称', |
| 235 | - '充1000送100', | 242 | + '${marketingCenterProvider.rechargeNoticeSunModel.recharge.rname}', |
| 236 | ), | 243 | ), |
| 237 | VEmptyView(24), | 244 | VEmptyView(24), |
| 238 | MyDivider( | 245 | MyDivider( |
| @@ -243,7 +250,252 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -243,7 +250,252 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 243 | VEmptyView(48), | 250 | VEmptyView(48), |
| 244 | _text( | 251 | _text( |
| 245 | '充值满', | 252 | '充值满', |
| 246 | - '1000', | 253 | + '${marketingCenterProvider.rechargeNoticeSunModel.recharge.rechargeMoney}', |
| 254 | + ), | ||
| 255 | + VEmptyView(24), | ||
| 256 | + MyDivider( | ||
| 257 | + double.infinity, | ||
| 258 | + w(0.5), | ||
| 259 | + color: MyColours.color_E7E7E7, | ||
| 260 | + ), | ||
| 261 | + VEmptyView(48), | ||
| 262 | + Container( | ||
| 263 | + alignment: Alignment.centerLeft, | ||
| 264 | + child: Text( | ||
| 265 | + '优惠活动', | ||
| 266 | + style: TextStyle( | ||
| 267 | + color: MyColours.color_515151, | ||
| 268 | + fontSize: ScreenUtil().setSp(32)), | ||
| 269 | + ), | ||
| 270 | + ), | ||
| 271 | + VEmptyView(28), | ||
| 272 | + Padding( | ||
| 273 | + padding: EdgeInsets.only(left: w(16)), | ||
| 274 | + child: Column( | ||
| 275 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 276 | + // mainAxisAlignment: MainAxisAlignment.start, | ||
| 277 | + children: [ | ||
| 278 | + if (marketingCenterProvider | ||
| 279 | + .rechargeNoticeSunModel | ||
| 280 | + .recharge | ||
| 281 | + .rechargeList | ||
| 282 | + .isPrice == | ||
| 283 | + '1') | ||
| 284 | + Row( | ||
| 285 | + mainAxisAlignment: | ||
| 286 | + MainAxisAlignment.spaceBetween, | ||
| 287 | + children: [ | ||
| 288 | + Text( | ||
| 289 | + '赠送', | ||
| 290 | + style: TextStyle( | ||
| 291 | + color: MyColours.color_515151, | ||
| 292 | + fontSize: ScreenUtil().setSp(32)), | ||
| 293 | + ), | ||
| 294 | + Spacer(), | ||
| 295 | + Text( | ||
| 296 | + '${marketingCenterProvider.rechargeNoticeSunModel.recharge.rechargeList.price}元余额', | ||
| 297 | + style: TextStyle( | ||
| 298 | + color: MyColours.color_999999, | ||
| 299 | + fontSize: ScreenUtil().setSp(32)), | ||
| 300 | + ), | ||
| 301 | + HEmptyView(32) | ||
| 302 | + ], | ||
| 303 | + ), | ||
| 304 | + if (marketingCenterProvider | ||
| 305 | + .rechargeNoticeSunModel | ||
| 306 | + .recharge | ||
| 307 | + .rechargeList | ||
| 308 | + .isPrice == | ||
| 309 | + '1') | ||
| 310 | + VEmptyView(26), | ||
| 311 | + if (marketingCenterProvider | ||
| 312 | + .rechargeNoticeSunModel | ||
| 313 | + .recharge | ||
| 314 | + .rechargeList | ||
| 315 | + .isScore == | ||
| 316 | + '1') | ||
| 317 | + Row( | ||
| 318 | + mainAxisAlignment: | ||
| 319 | + MainAxisAlignment.spaceBetween, | ||
| 320 | + children: [ | ||
| 321 | + Text( | ||
| 322 | + '赠送', | ||
| 323 | + style: TextStyle( | ||
| 324 | + color: MyColours.color_515151, | ||
| 325 | + fontSize: ScreenUtil().setSp(32)), | ||
| 326 | + ), | ||
| 327 | + Spacer(), | ||
| 328 | + Text( | ||
| 329 | + '${marketingCenterProvider.rechargeNoticeSunModel.recharge.rechargeList.score}积分', | ||
| 330 | + style: TextStyle( | ||
| 331 | + color: MyColours.color_999999, | ||
| 332 | + fontSize: ScreenUtil().setSp(32)), | ||
| 333 | + ), | ||
| 334 | + HEmptyView(32) | ||
| 335 | + ], | ||
| 336 | + ), | ||
| 337 | + if (marketingCenterProvider | ||
| 338 | + .rechargeNoticeSunModel | ||
| 339 | + .recharge | ||
| 340 | + .rechargeList | ||
| 341 | + .isScore == | ||
| 342 | + '1') | ||
| 343 | + VEmptyView(26), | ||
| 344 | + if (marketingCenterProvider | ||
| 345 | + .rechargeNoticeSunModel | ||
| 346 | + .recharge | ||
| 347 | + .rechargeList | ||
| 348 | + .isCoupons == | ||
| 349 | + '1') | ||
| 350 | + Row( | ||
| 351 | + mainAxisAlignment: | ||
| 352 | + MainAxisAlignment.spaceBetween, | ||
| 353 | + children: [ | ||
| 354 | + Text( | ||
| 355 | + '赠送', | ||
| 356 | + style: TextStyle( | ||
| 357 | + color: MyColours.color_515151, | ||
| 358 | + fontSize: ScreenUtil().setSp(32)), | ||
| 359 | + ), | ||
| 360 | + Spacer(), | ||
| 361 | + Text( | ||
| 362 | + '优惠券', | ||
| 363 | + style: TextStyle( | ||
| 364 | + color: MyColours.color_999999, | ||
| 365 | + fontSize: ScreenUtil().setSp(32)), | ||
| 366 | + ), | ||
| 367 | + HEmptyView(32) | ||
| 368 | + ], | ||
| 369 | + ), | ||
| 370 | + if (marketingCenterProvider | ||
| 371 | + .rechargeNoticeSunModel | ||
| 372 | + .recharge | ||
| 373 | + .rechargeList | ||
| 374 | + .isCoupons == | ||
| 375 | + '1') | ||
| 376 | + VEmptyView(26), | ||
| 377 | + if (marketingCenterProvider | ||
| 378 | + .rechargeNoticeSunModel | ||
| 379 | + .recharge | ||
| 380 | + .rechargeList | ||
| 381 | + .isCoupons == | ||
| 382 | + '1') | ||
| 383 | + Wrap( | ||
| 384 | + spacing: w(9), | ||
| 385 | + runSpacing: w(9), | ||
| 386 | + alignment: WrapAlignment.start, | ||
| 387 | + runAlignment: WrapAlignment.start, | ||
| 388 | + children: marketingCenterProvider | ||
| 389 | + .rechargeNoticeSunModel | ||
| 390 | + .recharge | ||
| 391 | + .rechargeList | ||
| 392 | + .coupons | ||
| 393 | + .map((e) { | ||
| 394 | + return InkWell( | ||
| 395 | + onTap: () { | ||
| 396 | + NavigatorUtil.goCouponDetailPage( | ||
| 397 | + context, null, | ||
| 398 | + idStr: e.id); | ||
| 399 | + }, | ||
| 400 | + child: Text( | ||
| 401 | + e.aname, | ||
| 402 | + style: TextStyle( | ||
| 403 | + color: MyColours.color_438E93, | ||
| 404 | + fontSize: | ||
| 405 | + ScreenUtil().setSp(32)), | ||
| 406 | + )); | ||
| 407 | + }).toList()), | ||
| 408 | + VEmptyView(26), | ||
| 409 | + ], | ||
| 410 | + ), | ||
| 411 | + ), | ||
| 412 | + MyDivider( | ||
| 413 | + double.infinity, | ||
| 414 | + w(0.5), | ||
| 415 | + color: MyColours.color_E7E7E7, | ||
| 416 | + ), | ||
| 417 | + VEmptyView(48), | ||
| 418 | + Row( | ||
| 419 | + children: [ | ||
| 420 | + Text( | ||
| 421 | + '使用限制:', | ||
| 422 | + style: TextStyle( | ||
| 423 | + color: MyColours.color_515151, | ||
| 424 | + fontSize: ScreenUtil().setSp(32)), | ||
| 425 | + ), | ||
| 426 | + Spacer(), | ||
| 427 | + Text( | ||
| 428 | + marketingCenterProvider.rechargeNoticeSunModel | ||
| 429 | + .recharge.expDate.isFix == | ||
| 430 | + '1' | ||
| 431 | + ? '无' | ||
| 432 | + : marketingCenterProvider | ||
| 433 | + .rechargeNoticeSunModel | ||
| 434 | + .recharge | ||
| 435 | + .expDate | ||
| 436 | + .isWeek == | ||
| 437 | + '1' | ||
| 438 | + ? '每周指定日期可用' | ||
| 439 | + : '会员生日当天', | ||
| 440 | + style: TextStyle( | ||
| 441 | + color: MyColours.color_999999, | ||
| 442 | + fontSize: ScreenUtil().setSp(32)), | ||
| 443 | + ), | ||
| 444 | + HEmptyView(32) | ||
| 445 | + ], | ||
| 446 | + ), | ||
| 447 | + if (marketingCenterProvider.rechargeNoticeSunModel | ||
| 448 | + .recharge.expDate.isWeek == | ||
| 449 | + '1') | ||
| 450 | + VEmptyView(26), | ||
| 451 | + if (marketingCenterProvider.rechargeNoticeSunModel | ||
| 452 | + .recharge.expDate.isWeek == | ||
| 453 | + '1') | ||
| 454 | + Align( | ||
| 455 | + alignment: Alignment.centerRight, | ||
| 456 | + child: Padding( | ||
| 457 | + padding: EdgeInsets.only(right: w(16)), | ||
| 458 | + child: Text( | ||
| 459 | + marketingCenterProvider | ||
| 460 | + .rechargeNoticeSunModel | ||
| 461 | + .recharge | ||
| 462 | + .expDate | ||
| 463 | + .weekDateShow, | ||
| 464 | + maxLines: 10, | ||
| 465 | + style: TextStyle( | ||
| 466 | + color: MyColours.color_999999, | ||
| 467 | + fontSize: ScreenUtil().setSp(32)), | ||
| 468 | + ))), | ||
| 469 | + VEmptyView(24), | ||
| 470 | + MyDivider( | ||
| 471 | + double.infinity, | ||
| 472 | + w(0.5), | ||
| 473 | + color: MyColours.color_E7E7E7, | ||
| 474 | + ), | ||
| 475 | + VEmptyView(48), | ||
| 476 | + Row( | ||
| 477 | + children: [ | ||
| 478 | + Text( | ||
| 479 | + '有效期:', | ||
| 480 | + style: TextStyle( | ||
| 481 | + color: MyColours.color_515151, | ||
| 482 | + fontSize: ScreenUtil().setSp(32)), | ||
| 483 | + ), | ||
| 484 | + Spacer(), | ||
| 485 | + Text( | ||
| 486 | + marketingCenterProvider.rechargeNoticeSunModel | ||
| 487 | + .recharge.stimeStr + | ||
| 488 | + '至' + | ||
| 489 | + marketingCenterProvider | ||
| 490 | + .rechargeNoticeSunModel | ||
| 491 | + .recharge | ||
| 492 | + .etimeStr, | ||
| 493 | + style: TextStyle( | ||
| 494 | + color: MyColours.color_999999, | ||
| 495 | + fontSize: ScreenUtil().setSp(32)), | ||
| 496 | + ), | ||
| 497 | + HEmptyView(32) | ||
| 498 | + ], | ||
| 247 | ), | 499 | ), |
| 248 | VEmptyView(24), | 500 | VEmptyView(24), |
| 249 | MyDivider( | 501 | MyDivider( |
| @@ -252,224 +504,10 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | @@ -252,224 +504,10 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { | ||
| 252 | color: MyColours.color_E7E7E7, | 504 | color: MyColours.color_E7E7E7, |
| 253 | ), | 505 | ), |
| 254 | VEmptyView(48), | 506 | VEmptyView(48), |
| 255 | - // Container( | ||
| 256 | - // alignment: Alignment.centerLeft, | ||
| 257 | - // child: Text( | ||
| 258 | - // '优惠活动', | ||
| 259 | - // style: TextStyle( | ||
| 260 | - // color: MyColours.color_515151, | ||
| 261 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 262 | - // ), | ||
| 263 | - // ), | ||
| 264 | - // VEmptyView(28), | ||
| 265 | - // Padding( | ||
| 266 | - // padding: EdgeInsets.only(left: w(16)), | ||
| 267 | - // child: Column( | ||
| 268 | - // crossAxisAlignment: CrossAxisAlignment.start, | ||
| 269 | - // // mainAxisAlignment: MainAxisAlignment.start, | ||
| 270 | - // children: [ | ||
| 271 | - // if (marketingCenterProvider | ||
| 272 | - // .rechargeDetail.rechargeList.isPrice == | ||
| 273 | - // '1') | ||
| 274 | - // Row( | ||
| 275 | - // mainAxisAlignment: | ||
| 276 | - // MainAxisAlignment.spaceBetween, | ||
| 277 | - // children: [ | ||
| 278 | - // Text( | ||
| 279 | - // '赠送', | ||
| 280 | - // style: TextStyle( | ||
| 281 | - // color: MyColours.color_515151, | ||
| 282 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 283 | - // ), | ||
| 284 | - // Spacer(), | ||
| 285 | - // Text( | ||
| 286 | - // '${marketingCenterProvider.rechargeDetail.rechargeList.price}元余额', | ||
| 287 | - // style: TextStyle( | ||
| 288 | - // color: MyColours.color_999999, | ||
| 289 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 290 | - // ), | ||
| 291 | - // HEmptyView(32) | ||
| 292 | - // ], | ||
| 293 | - // ), | ||
| 294 | - // if (marketingCenterProvider | ||
| 295 | - // .rechargeDetail.rechargeList.isPrice == | ||
| 296 | - // '1') | ||
| 297 | - // VEmptyView(26), | ||
| 298 | - // if (marketingCenterProvider | ||
| 299 | - // .rechargeDetail.rechargeList.isScore == | ||
| 300 | - // '1') | ||
| 301 | - // Row( | ||
| 302 | - // mainAxisAlignment: | ||
| 303 | - // MainAxisAlignment.spaceBetween, | ||
| 304 | - // children: [ | ||
| 305 | - // Text( | ||
| 306 | - // '赠送', | ||
| 307 | - // style: TextStyle( | ||
| 308 | - // color: MyColours.color_515151, | ||
| 309 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 310 | - // ), | ||
| 311 | - // Spacer(), | ||
| 312 | - // Text( | ||
| 313 | - // '${marketingCenterProvider.rechargeDetail.rechargeList.score}积分', | ||
| 314 | - // style: TextStyle( | ||
| 315 | - // color: MyColours.color_999999, | ||
| 316 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 317 | - // ), | ||
| 318 | - // HEmptyView(32) | ||
| 319 | - // ], | ||
| 320 | - // ), | ||
| 321 | - // if (marketingCenterProvider | ||
| 322 | - // .rechargeDetail.rechargeList.isScore == | ||
| 323 | - // '1') | ||
| 324 | - // VEmptyView(26), | ||
| 325 | - // if (marketingCenterProvider.rechargeDetail | ||
| 326 | - // .rechargeList.isCoupons == | ||
| 327 | - // '1') | ||
| 328 | - // Row( | ||
| 329 | - // mainAxisAlignment: | ||
| 330 | - // MainAxisAlignment.spaceBetween, | ||
| 331 | - // children: [ | ||
| 332 | - // Text( | ||
| 333 | - // '赠送', | ||
| 334 | - // style: TextStyle( | ||
| 335 | - // color: MyColours.color_515151, | ||
| 336 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 337 | - // ), | ||
| 338 | - // Spacer(), | ||
| 339 | - // Text( | ||
| 340 | - // '优惠券', | ||
| 341 | - // style: TextStyle( | ||
| 342 | - // color: MyColours.color_999999, | ||
| 343 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 344 | - // ), | ||
| 345 | - // HEmptyView(32) | ||
| 346 | - // ], | ||
| 347 | - // ), | ||
| 348 | - // if (marketingCenterProvider.rechargeDetail | ||
| 349 | - // .rechargeList.isCoupons == | ||
| 350 | - // '1') | ||
| 351 | - // VEmptyView(26), | ||
| 352 | - // if (marketingCenterProvider.rechargeDetail | ||
| 353 | - // .rechargeList.isCoupons == | ||
| 354 | - // '1') | ||
| 355 | - // Wrap( | ||
| 356 | - // spacing: w(9), | ||
| 357 | - // runSpacing: w(9), | ||
| 358 | - // alignment: WrapAlignment.start, | ||
| 359 | - // runAlignment: WrapAlignment.start, | ||
| 360 | - // children: marketingCenterProvider | ||
| 361 | - // .rechargeDetail.rechargeList.coupons | ||
| 362 | - // .map((e) { | ||
| 363 | - // return InkWell( | ||
| 364 | - // onTap: () { | ||
| 365 | - // NavigatorUtil.goCouponDetailPage( | ||
| 366 | - // context, null, | ||
| 367 | - // idStr: e.id); | ||
| 368 | - // }, | ||
| 369 | - // child: Text( | ||
| 370 | - // e.aname, | ||
| 371 | - // style: TextStyle( | ||
| 372 | - // color: MyColours.color_438E93, | ||
| 373 | - // fontSize: | ||
| 374 | - // ScreenUtil().setSp(32)), | ||
| 375 | - // )); | ||
| 376 | - // }).toList()), | ||
| 377 | - // VEmptyView(26), | ||
| 378 | - // ], | ||
| 379 | - // ), | ||
| 380 | - // ), | ||
| 381 | - // MyDivider( | ||
| 382 | - // double.infinity, | ||
| 383 | - // w(0.5), | ||
| 384 | - // color: MyColours.color_E7E7E7, | ||
| 385 | - // ), | ||
| 386 | - // VEmptyView(48), | ||
| 387 | - // Row( | ||
| 388 | - // children: [ | ||
| 389 | - // Text( | ||
| 390 | - // '使用限制:', | ||
| 391 | - // style: TextStyle( | ||
| 392 | - // color: MyColours.color_515151, | ||
| 393 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 394 | - // ), | ||
| 395 | - // Spacer(), | ||
| 396 | - // Text( | ||
| 397 | - // marketingCenterProvider | ||
| 398 | - // .rechargeDetail.expDate.isFix == | ||
| 399 | - // '1' | ||
| 400 | - // ? '无' | ||
| 401 | - // : marketingCenterProvider.rechargeDetail | ||
| 402 | - // .expDate.isWeek == | ||
| 403 | - // '1' | ||
| 404 | - // ? '每周指定日期可用' | ||
| 405 | - // : '会员生日当天', | ||
| 406 | - // style: TextStyle( | ||
| 407 | - // color: MyColours.color_999999, | ||
| 408 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 409 | - // ), | ||
| 410 | - // HEmptyView(32) | ||
| 411 | - // ], | ||
| 412 | - // ), | ||
| 413 | - // if (marketingCenterProvider | ||
| 414 | - // .rechargeDetail.expDate.isWeek == | ||
| 415 | - // '1') | ||
| 416 | - // VEmptyView(26), | ||
| 417 | - // if (marketingCenterProvider | ||
| 418 | - // .rechargeDetail.expDate.isWeek == | ||
| 419 | - // '1') | ||
| 420 | - // Align( | ||
| 421 | - // alignment: Alignment.centerRight, | ||
| 422 | - // child: Padding( | ||
| 423 | - // padding: EdgeInsets.only(right: w(16)), | ||
| 424 | - // child: Text( | ||
| 425 | - // marketingCenterProvider | ||
| 426 | - // .rechargeDetail.expDate.weekDateShow, | ||
| 427 | - // maxLines: 10, | ||
| 428 | - // style: TextStyle( | ||
| 429 | - // color: MyColours.color_999999, | ||
| 430 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 431 | - // ))), | ||
| 432 | - // VEmptyView(24), | ||
| 433 | - // MyDivider( | ||
| 434 | - // double.infinity, | ||
| 435 | - // w(0.5), | ||
| 436 | - // color: MyColours.color_E7E7E7, | ||
| 437 | - // ), | ||
| 438 | - // VEmptyView(48), | ||
| 439 | - // Row( | ||
| 440 | - // children: [ | ||
| 441 | - // Text( | ||
| 442 | - // '有效期:', | ||
| 443 | - // style: TextStyle( | ||
| 444 | - // color: MyColours.color_515151, | ||
| 445 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 446 | - // ), | ||
| 447 | - // Spacer(), | ||
| 448 | - // Text( | ||
| 449 | - // marketingCenterProvider | ||
| 450 | - // .rechargeDetail.stimeStr + | ||
| 451 | - // '至' + | ||
| 452 | - // marketingCenterProvider | ||
| 453 | - // .rechargeDetail.etimeStr, | ||
| 454 | - // style: TextStyle( | ||
| 455 | - // color: MyColours.color_999999, | ||
| 456 | - // fontSize: ScreenUtil().setSp(32)), | ||
| 457 | - // ), | ||
| 458 | - // HEmptyView(32) | ||
| 459 | - // ], | ||
| 460 | - // ), | ||
| 461 | - // VEmptyView(24), | ||
| 462 | - // MyDivider( | ||
| 463 | - // double.infinity, | ||
| 464 | - // w(0.5), | ||
| 465 | - // color: MyColours.color_E7E7E7, | ||
| 466 | - // ), | ||
| 467 | - // VEmptyView(48), | ||
| 468 | - // _explain( | ||
| 469 | - // '备注', | ||
| 470 | - // '请输入备注信息', | ||
| 471 | - // ), | ||
| 472 | - // VEmptyView(48), | 507 | + _explain( |
| 508 | + '备注', | ||
| 509 | + ), | ||
| 510 | + VEmptyView(48), | ||
| 473 | // _canUse() | 511 | // _canUse() |
| 474 | ], | 512 | ], |
| 475 | )), | 513 | )), |
| @@ -176,7 +176,7 @@ class MessageTreatedPageState extends State<MessageTreatedPage> { | @@ -176,7 +176,7 @@ class MessageTreatedPageState extends State<MessageTreatedPage> { | ||
| 176 | typeid = '17'; | 176 | typeid = '17'; |
| 177 | } else if (index == 6) { | 177 | } else if (index == 6) { |
| 178 | //存酒超期 | 178 | //存酒超期 |
| 179 | - // typeid = '17'; | 179 | + typeid = '18'; |
| 180 | } | 180 | } |
| 181 | getMessage(typeid, showLoading: true); | 181 | getMessage(typeid, showLoading: true); |
| 182 | }, | 182 | }, |
| @@ -30,7 +30,7 @@ class MarketingCenterHomePage extends StatefulWidget { | @@ -30,7 +30,7 @@ class MarketingCenterHomePage extends StatefulWidget { | ||
| 30 | class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | 30 | class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { |
| 31 | MarketingCenterProvider marketingCenterProvider; | 31 | MarketingCenterProvider marketingCenterProvider; |
| 32 | bool select = false; //启用预订安排通知图文模式 | 32 | bool select = false; //启用预订安排通知图文模式 |
| 33 | - bool selectShowPrice = false; //分享排菜单给客户时展示菜品价格 | 33 | + bool selectShowPrice = true; //分享排菜单给客户时展示菜品价格 |
| 34 | 34 | ||
| 35 | @override | 35 | @override |
| 36 | void initState() { | 36 | void initState() { |
| @@ -527,47 +527,48 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | @@ -527,47 +527,48 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | ||
| 527 | _customInfoItemWidget( | 527 | _customInfoItemWidget( |
| 528 | '发票抬头', | 528 | '发票抬头', |
| 529 | _onlineCheckEditProvider.orderInfoSunModel != null | 529 | _onlineCheckEditProvider.orderInfoSunModel != null |
| 530 | - ? _onlineCheckEditProvider | 530 | + ? (_onlineCheckEditProvider |
| 531 | .orderInfoSunModel.invoice?.title ?? | 531 | .orderInfoSunModel.invoice?.title ?? |
| 532 | - '' | 532 | + '') |
| 533 | : '', | 533 | : '', |
| 534 | fontsize: 20), | 534 | fontsize: 20), |
| 535 | Offstage( | 535 | Offstage( |
| 536 | offstage: | 536 | offstage: |
| 537 | - _onlineCheckEditProvider.orderInfoSunModel != null && | 537 | + (_onlineCheckEditProvider.orderInfoSunModel != null && |
| 538 | _onlineCheckEditProvider | 538 | _onlineCheckEditProvider |
| 539 | .orderInfoSunModel.invoice?.taxnumber != | 539 | .orderInfoSunModel.invoice?.taxnumber != |
| 540 | null && | 540 | null && |
| 541 | _onlineCheckEditProvider | 541 | _onlineCheckEditProvider |
| 542 | .orderInfoSunModel.invoice?.taxnumber != | 542 | .orderInfoSunModel.invoice?.taxnumber != |
| 543 | - '' | 543 | + '') |
| 544 | ? false | 544 | ? false |
| 545 | : true, | 545 | : true, |
| 546 | child: Padding( | 546 | child: Padding( |
| 547 | padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)), | 547 | padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)), |
| 548 | child: _customInfoItemWidget( | 548 | child: _customInfoItemWidget( |
| 549 | '税号', | 549 | '税号', |
| 550 | - _onlineCheckEditProvider.orderInfoSunModel != null && | 550 | + (_onlineCheckEditProvider.orderInfoSunModel != null && |
| 551 | _onlineCheckEditProvider | 551 | _onlineCheckEditProvider |
| 552 | .orderInfoSunModel.invoice?.taxnumber != | 552 | .orderInfoSunModel.invoice?.taxnumber != |
| 553 | null && | 553 | null && |
| 554 | _onlineCheckEditProvider | 554 | _onlineCheckEditProvider |
| 555 | .orderInfoSunModel.invoice?.taxnumber != | 555 | .orderInfoSunModel.invoice?.taxnumber != |
| 556 | - '' | ||
| 557 | - ? false | 556 | + '') |
| 557 | + ? _onlineCheckEditProvider | ||
| 558 | + .orderInfoSunModel.invoice?.taxnumber | ||
| 558 | : '', | 559 | : '', |
| 559 | fontsize: 20), | 560 | fontsize: 20), |
| 560 | ), | 561 | ), |
| 561 | ), | 562 | ), |
| 562 | Offstage( | 563 | Offstage( |
| 563 | offstage: | 564 | offstage: |
| 564 | - _onlineCheckEditProvider.orderInfoSunModel != null && | 565 | + (_onlineCheckEditProvider.orderInfoSunModel != null && |
| 565 | _onlineCheckEditProvider.orderInfoSunModel.invoice | 566 | _onlineCheckEditProvider.orderInfoSunModel.invoice |
| 566 | ?.companyaddress != | 567 | ?.companyaddress != |
| 567 | null && | 568 | null && |
| 568 | _onlineCheckEditProvider.orderInfoSunModel.invoice | 569 | _onlineCheckEditProvider.orderInfoSunModel.invoice |
| 569 | ?.companyaddress != | 570 | ?.companyaddress != |
| 570 | - '' | 571 | + '') |
| 571 | ? false | 572 | ? false |
| 572 | : true, | 573 | : true, |
| 573 | child: Padding( | 574 | child: Padding( |
| @@ -584,13 +585,13 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | @@ -584,13 +585,13 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | ||
| 584 | ), | 585 | ), |
| 585 | Offstage( | 586 | Offstage( |
| 586 | offstage: | 587 | offstage: |
| 587 | - _onlineCheckEditProvider.orderInfoSunModel != null && | 588 | + (_onlineCheckEditProvider.orderInfoSunModel != null && |
| 588 | _onlineCheckEditProvider | 589 | _onlineCheckEditProvider |
| 589 | .orderInfoSunModel.invoice?.telephone != | 590 | .orderInfoSunModel.invoice?.telephone != |
| 590 | null && | 591 | null && |
| 591 | _onlineCheckEditProvider | 592 | _onlineCheckEditProvider |
| 592 | .orderInfoSunModel.invoice?.telephone != | 593 | .orderInfoSunModel.invoice?.telephone != |
| 593 | - '' | 594 | + '') |
| 594 | ? false | 595 | ? false |
| 595 | : true, | 596 | : true, |
| 596 | child: Padding( | 597 | child: Padding( |
| @@ -607,13 +608,13 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | @@ -607,13 +608,13 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { | ||
| 607 | ), | 608 | ), |
| 608 | Offstage( | 609 | Offstage( |
| 609 | offstage: | 610 | offstage: |
| 610 | - _onlineCheckEditProvider.orderInfoSunModel != null && | 611 | + (_onlineCheckEditProvider.orderInfoSunModel != null && |
| 611 | _onlineCheckEditProvider | 612 | _onlineCheckEditProvider |
| 612 | .orderInfoSunModel.invoice?.bankname != | 613 | .orderInfoSunModel.invoice?.bankname != |
| 613 | null && | 614 | null && |
| 614 | _onlineCheckEditProvider | 615 | _onlineCheckEditProvider |
| 615 | .orderInfoSunModel.invoice?.bankname != | 616 | .orderInfoSunModel.invoice?.bankname != |
| 616 | - '' | 617 | + '') |
| 617 | ? false | 618 | ? false |
| 618 | : true, | 619 | : true, |
| 619 | child: Padding( | 620 | child: Padding( |
| @@ -332,7 +332,7 @@ class MarketingCenterProvider extends ChangeNotifier { | @@ -332,7 +332,7 @@ class MarketingCenterProvider extends ChangeNotifier { | ||
| 332 | return false; | 332 | return false; |
| 333 | }); | 333 | }); |
| 334 | if (baseResp.code == Constant.status_success) { | 334 | if (baseResp.code == Constant.status_success) { |
| 335 | - rechargeNoticeSunModel = RechargeNoticeModel.fromJson(baseResp.data).data; | 335 | + rechargeNoticeSunModel = RechargeNoticeModel.fromJson(baseResp.responseData).data; |
| 336 | pageStateMessageDetail = PageState.Success; | 336 | pageStateMessageDetail = PageState.Success; |
| 337 | notifyListeners(); | 337 | notifyListeners(); |
| 338 | return true; | 338 | return true; |
-
Please register or login to post a comment