Commit a7734a574adba81e0f864826278db4d77a775b76

Authored by wdn127929
1 parent bee31144

菜单文本颜色

No preview for this file type
@@ -42,6 +42,8 @@ class GetDzSellerConfSunModel { @@ -42,6 +42,8 @@ class GetDzSellerConfSunModel {
42 String isNewTemplate; 42 String isNewTemplate;
43 AllCookStyle cookStyle; 43 AllCookStyle cookStyle;
44 String cdate; 44 String cdate;
  45 + String isStoreSms;
  46 + String storeDate;
45 47
46 GetDzSellerConfSunModel( 48 GetDzSellerConfSunModel(
47 {this.id, 49 {this.id,
@@ -58,7 +60,9 @@ class GetDzSellerConfSunModel { @@ -58,7 +60,9 @@ class GetDzSellerConfSunModel {
58 this.isDisplayDish, 60 this.isDisplayDish,
59 this.isNewTemplate, 61 this.isNewTemplate,
60 this.cookStyle, 62 this.cookStyle,
61 - this.cdate}); 63 + this.cdate,
  64 + this.isStoreSms,
  65 + this.storeDate});
62 66
63 GetDzSellerConfSunModel.fromJson(Map<String, dynamic> json) { 67 GetDzSellerConfSunModel.fromJson(Map<String, dynamic> json) {
64 id = json['id']; 68 id = json['id'];
@@ -74,8 +78,12 @@ class GetDzSellerConfSunModel { @@ -74,8 +78,12 @@ class GetDzSellerConfSunModel {
74 reserveMode = json['reserve_mode']; 78 reserveMode = json['reserve_mode'];
75 isDisplayDish = json['is_display_dish']; 79 isDisplayDish = json['is_display_dish'];
76 isNewTemplate = json['is_new_template']; 80 isNewTemplate = json['is_new_template'];
77 - cookStyle = json['cook_style'] == null ? null: AllCookStyle.fromJson(convert.json.decode(json['cook_style'])); 81 + cookStyle = json['cook_style'] == null
  82 + ? null
  83 + : AllCookStyle.fromJson(convert.json.decode(json['cook_style']));
78 cdate = json['cdate']; 84 cdate = json['cdate'];
  85 + isStoreSms = json['is_store_sms'];
  86 + storeDate = json['store_date'];
79 } 87 }
80 88
81 Map<String, dynamic> toJson() { 89 Map<String, dynamic> toJson() {
@@ -95,6 +103,8 @@ class GetDzSellerConfSunModel { @@ -95,6 +103,8 @@ class GetDzSellerConfSunModel {
95 data['is_new_template'] = this.isNewTemplate; 103 data['is_new_template'] = this.isNewTemplate;
96 data['cook_style'] = this.cookStyle; 104 data['cook_style'] = this.cookStyle;
97 data['cdate'] = this.cdate; 105 data['cdate'] = this.cdate;
  106 + data['is_store_sms'] = this.isStoreSms;
  107 + data['store_date'] = this.storeDate;
98 return data; 108 return data;
99 } 109 }
100 } 110 }
  1 +import 'package:one_key/models/recharge_list_model.dart';
  2 +import 'dart:convert' as convert;
  3 +
  4 +class RechargeNoticeModel {
  5 + int ret;
  6 + RechargeNoticeSunModel data;
  7 + String msg;
  8 +
  9 + RechargeNoticeModel({this.ret, this.data, this.msg});
  10 +
  11 + RechargeNoticeModel.fromJson(Map<String, dynamic> json) {
  12 + ret = json['ret'];
  13 + data = json['data'] != null
  14 + ? new RechargeNoticeSunModel.fromJson(json['data'])
  15 + : null;
  16 + msg = json['msg'];
  17 + }
  18 +
  19 + Map<String, dynamic> toJson() {
  20 + final Map<String, dynamic> data = new Map<String, dynamic>();
  21 + data['ret'] = this.ret;
  22 + if (this.data != null) {
  23 + data['data'] = this.data.toJson();
  24 + }
  25 + data['msg'] = this.msg;
  26 + return data;
  27 + }
  28 +}
  29 +
  30 +class RechargeNoticeSunModel {
  31 + Recharge recharge;
  32 + Guest guest;
  33 +
  34 + RechargeNoticeSunModel({this.recharge, this.guest});
  35 +
  36 + RechargeNoticeSunModel.fromJson(Map<String, dynamic> json) {
  37 + recharge = json['recharge'] != null
  38 + ? new Recharge.fromJson(json['recharge'])
  39 + : null;
  40 + guest = json['guest'] != null ? new Guest.fromJson(json['guest']) : null;
  41 + }
  42 +
  43 + Map<String, dynamic> toJson() {
  44 + final Map<String, dynamic> data = new Map<String, dynamic>();
  45 + if (this.recharge != null) {
  46 + data['recharge'] = this.recharge.toJson();
  47 + }
  48 + if (this.guest != null) {
  49 + data['guest'] = this.guest.toJson();
  50 + }
  51 + return data;
  52 + }
  53 +}
  54 +
  55 +class Recharge {
  56 + String id;
  57 + String uid;
  58 + String sellerid;
  59 + String rname;
  60 + String rechargeMoney;
  61 + RechargeListDataModel rechargeList;
  62 + RechargeDateModel expDate;
  63 + String explain;
  64 + String isOpen;
  65 + String status;
  66 + String isExamine;
  67 + String stime;
  68 + String etime;
  69 + String qrcode;
  70 + String cdate;
  71 +
  72 + Recharge(
  73 + {this.id,
  74 + this.uid,
  75 + this.sellerid,
  76 + this.rname,
  77 + this.rechargeMoney,
  78 + this.rechargeList,
  79 + this.expDate,
  80 + this.explain,
  81 + this.isOpen,
  82 + this.status,
  83 + this.isExamine,
  84 + this.stime,
  85 + this.etime,
  86 + this.qrcode,
  87 + this.cdate});
  88 +
  89 + Recharge.fromJson(Map<String, dynamic> json) {
  90 + id = json['id'];
  91 + uid = json['uid'];
  92 + sellerid = json['sellerid'];
  93 + rname = json['rname'];
  94 + rechargeMoney = json['recharge_money'];
  95 + rechargeList = json['recharge_list'] == null
  96 + ? null
  97 + : json['recharge_list'] is Map
  98 + ? RechargeListDataModel.fromJson(json['recharge_list'])
  99 + : RechargeListDataModel.fromJson(convert
  100 + .jsonDecode(json['recharge_list']) as Map<String, dynamic>);
  101 + expDate = json['exp_date'] == null
  102 + ? null
  103 + : json['exp_date'] is Map
  104 + ? RechargeDateModel.fromJson(json['exp_date'])
  105 + : RechargeDateModel.fromJson(
  106 + convert.jsonDecode(json['exp_date']) as Map<String, dynamic>);
  107 + explain = json['explain'];
  108 + isOpen = json['is_open'];
  109 + status = json['status'];
  110 + isExamine = json['is_examine'];
  111 + stime = json['stime'];
  112 + etime = json['etime'];
  113 + qrcode = json['qrcode'];
  114 + cdate = json['cdate'];
  115 + }
  116 +
  117 + Map<String, dynamic> toJson() {
  118 + final Map<String, dynamic> data = new Map<String, dynamic>();
  119 + data['id'] = this.id;
  120 + data['uid'] = this.uid;
  121 + data['sellerid'] = this.sellerid;
  122 + data['rname'] = this.rname;
  123 + data['recharge_money'] = this.rechargeMoney;
  124 + data['recharge_list'] = this.rechargeList;
  125 + data['exp_date'] = this.expDate;
  126 + data['explain'] = this.explain;
  127 + data['is_open'] = this.isOpen;
  128 + data['status'] = this.status;
  129 + data['is_examine'] = this.isExamine;
  130 + data['stime'] = this.stime;
  131 + data['etime'] = this.etime;
  132 + data['qrcode'] = this.qrcode;
  133 + data['cdate'] = this.cdate;
  134 + return data;
  135 + }
  136 +}
  137 +
  138 +class Guest {
  139 + String id;
  140 + String sellerid;
  141 + String uid;
  142 + String rname;
  143 + String sex;
  144 + String phone;
  145 + Null company;
  146 + Null section;
  147 + String label;
  148 + Null position;
  149 + Null taboos;
  150 + Null like;
  151 + Null serve;
  152 + String cDay;
  153 + String isMember;
  154 + Null cdate;
  155 + Null udate;
  156 +
  157 + Guest(
  158 + {this.id,
  159 + this.sellerid,
  160 + this.uid,
  161 + this.rname,
  162 + this.sex,
  163 + this.phone,
  164 + this.company,
  165 + this.section,
  166 + this.label,
  167 + this.position,
  168 + this.taboos,
  169 + this.like,
  170 + this.serve,
  171 + this.cDay,
  172 + this.isMember,
  173 + this.cdate,
  174 + this.udate});
  175 +
  176 + Guest.fromJson(Map<String, dynamic> json) {
  177 + id = json['id'];
  178 + sellerid = json['sellerid'];
  179 + uid = json['uid'];
  180 + rname = json['rname'];
  181 + sex = json['sex'];
  182 + phone = json['phone'];
  183 + company = json['company'];
  184 + section = json['section'];
  185 + label = json['label'];
  186 + position = json['position'];
  187 + taboos = json['taboos'];
  188 + like = json['like'];
  189 + serve = json['serve'];
  190 + cDay = json['c_day'];
  191 + isMember = json['is_member'];
  192 + cdate = json['cdate'];
  193 + udate = json['udate'];
  194 + }
  195 +
  196 + Map<String, dynamic> toJson() {
  197 + final Map<String, dynamic> data = new Map<String, dynamic>();
  198 + data['id'] = this.id;
  199 + data['sellerid'] = this.sellerid;
  200 + data['uid'] = this.uid;
  201 + data['rname'] = this.rname;
  202 + data['sex'] = this.sex;
  203 + data['phone'] = this.phone;
  204 + data['company'] = this.company;
  205 + data['section'] = this.section;
  206 + data['label'] = this.label;
  207 + data['position'] = this.position;
  208 + data['taboos'] = this.taboos;
  209 + data['like'] = this.like;
  210 + data['serve'] = this.serve;
  211 + data['c_day'] = this.cDay;
  212 + data['is_member'] = this.isMember;
  213 + data['cdate'] = this.cdate;
  214 + data['udate'] = this.udate;
  215 + return data;
  216 + }
  217 +}
@@ -436,4 +436,8 @@ class HttpUrl { @@ -436,4 +436,8 @@ class HttpUrl {
436 static const String get_is_examine_list = 436 static const String get_is_examine_list =
437 "?service=App.Activity.GetIsExamineList"; // 商家券核销列表 437 "?service=App.Activity.GetIsExamineList"; // 商家券核销列表
438 438
  439 +
  440 + static const String get_pay_message_by_id =
  441 + "?service=App.Activity.GetPayMessageByID"; // 充值成功通知消息获取详情
  442 +
439 } 443 }
@@ -338,6 +338,11 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -338,6 +338,11 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
338 context, notifyParam['rid'], notifyParam["uid"], 338 context, notifyParam['rid'], notifyParam["uid"],
339 mid: notifyParam['mid'], fromNotify: true); 339 mid: notifyParam['mid'], fromNotify: true);
340 break; 340 break;
  341 + case "17":
  342 + //充值优惠活动充值成功
  343 + print('fff');
  344 + NavigatorUtil.goMessageRechargeInfoPage(context, notifyParam['id']);
  345 + break;
341 case "1": 346 case "1":
342 NavigatorUtil.goHasOrderFoodPage(context, 347 NavigatorUtil.goHasOrderFoodPage(context,
343 rid: notifyParam["rid"], fromNotify: true); 348 rid: notifyParam["rid"], fromNotify: true);
@@ -552,6 +557,11 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -552,6 +557,11 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
552 context, custom['rid'].toString(), custom["uid"].toString(), 557 context, custom['rid'].toString(), custom["uid"].toString(),
553 mid: custom['mid'].toString(), fromNotify: true); 558 mid: custom['mid'].toString(), fromNotify: true);
554 break; 559 break;
  560 + case "17":
  561 + //充值优惠活动充值成功
  562 + print('fff');
  563 + NavigatorUtil.goMessageRechargeInfoPage(context, custom['id']);
  564 + break;
555 case "1": 565 case "1":
556 //提前点餐消息 566 //提前点餐消息
557 NavigatorUtil.goHasOrderFoodPage(context, 567 NavigatorUtil.goHasOrderFoodPage(context,
@@ -24,8 +24,8 @@ import '../../../../widgets/v_empty_view.dart'; @@ -24,8 +24,8 @@ import '../../../../widgets/v_empty_view.dart';
24 */ 24 */
25 25
26 class MessageRechargeInfoPage extends StatefulWidget { 26 class MessageRechargeInfoPage extends StatefulWidget {
27 - final String idstr;  
28 - MessageRechargeInfoPage({Key key, this.idstr}) : super(key: key); 27 + final String idStr;
  28 + MessageRechargeInfoPage({Key key, this.idStr}) : super(key: key);
29 29
30 @override 30 @override
31 _MessageRechargeInfoPageState createState() => 31 _MessageRechargeInfoPageState createState() =>
@@ -43,12 +43,13 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> { @@ -43,12 +43,13 @@ class _MessageRechargeInfoPageState extends State<MessageRechargeInfoPage> {
43 // if (widget.idstr != null && widget.idstr != 'null') { 43 // if (widget.idstr != null && widget.idstr != 'null') {
44 // _getNewRechargeDetail(); 44 // _getNewRechargeDetail();
45 // } 45 // }
  46 + _getPayMessageByID();
46 }); 47 });
47 } 48 }
48 49
49 - _getNewRechargeDetail() async {  
50 - bool success = await marketingCenterProvider.getNewRechargeDetail(  
51 - context, widget.idstr); 50 + _getPayMessageByID() async {
  51 + bool success =
  52 + await marketingCenterProvider.getPayMessageByID(context, widget.idStr);
52 } 53 }
53 54
54 ///输入框 55 ///输入框
@@ -79,12 +79,16 @@ class MessageTreatedPageState extends State<MessageTreatedPage> { @@ -79,12 +79,16 @@ class MessageTreatedPageState extends State<MessageTreatedPage> {
79 MessageMenuModel model5 = MessageMenuModel(); 79 MessageMenuModel model5 = MessageMenuModel();
80 model5.title = '在线买单'; 80 model5.title = '在线买单';
81 model5.select = false; 81 model5.select = false;
82 - // MessageMenuModel model6 = MessageMenuModel();  
83 - // model6.title = '会员充值';  
84 - // model6.select = false; 82 + MessageMenuModel model6 = MessageMenuModel();
  83 + model6.title = '会员充值';
  84 + model6.select = false;
85 85
86 - // menuTitle = [model1, model2, model3, model4, model5, model6];  
87 - menuTitle = [model1, model2, model3, model4, model5]; 86 + MessageMenuModel model7 = MessageMenuModel();
  87 + model7.title = '存酒超期';
  88 + model7.select = false;
  89 +
  90 + menuTitle = [model1, model2, model3, model4, model5, model6, model7];
  91 + // menuTitle = [model1, model2, model3, model4, model5];
88 } 92 }
89 93
90 @override 94 @override
@@ -167,11 +171,13 @@ class MessageTreatedPageState extends State<MessageTreatedPage> { @@ -167,11 +171,13 @@ class MessageTreatedPageState extends State<MessageTreatedPage> {
167 } else if (index == 4) { 171 } else if (index == 4) {
168 //在线买单 172 //在线买单
169 typeid = '12'; 173 typeid = '12';
  174 + } else if (index == 5) {
  175 + //会员充值
  176 + typeid = '17';
  177 + } else if (index == 6) {
  178 + //存酒超期
  179 + // typeid = '17';
170 } 180 }
171 - // else if (index == 5) {  
172 - // //会员充值  
173 - // typeid = '12';  
174 - // }  
175 getMessage(typeid, showLoading: true); 181 getMessage(typeid, showLoading: true);
176 }, 182 },
177 child: Container( 183 child: Container(
@@ -318,7 +318,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -318,7 +318,8 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
318 fontSize: ScreenUtil().setSp(20), 318 fontSize: ScreenUtil().setSp(20),
319 ), 319 ),
320 )), 320 )),
321 - if (customerProvider.guestInfoSunModel.guest.rnameStr != '') HEmptyView(6), 321 + if (customerProvider.guestInfoSunModel.guest.rnameStr != '')
  322 + HEmptyView(6),
322 Text( 323 Text(
323 customerProvider.guestInfoSunModel.guest.phone, 324 customerProvider.guestInfoSunModel.guest.phone,
324 overflow: TextOverflow.ellipsis, 325 overflow: TextOverflow.ellipsis,
@@ -599,7 +600,30 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { @@ -599,7 +600,30 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
599 customerProvider.guestInfoSunModel.guest.id, 600 customerProvider.guestInfoSunModel.guest.id,
600 customerProvider.guestInfoSunModel.guest.phone); 601 customerProvider.guestInfoSunModel.guest.phone);
601 }, 602 },
602 - ) 603 + ),
  604 + if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
  605 + '0')
  606 + VEmptyView(20),
  607 + if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
  608 + '0')
  609 + RoundButton(
  610 + text: '存酒详情',
  611 + gradientStart: MyColours.color_ffffff,
  612 + gradientEnd: MyColours.color_ffffff,
  613 + textColor: MyColours.color_438E93,
  614 + borderColor: MyColours.color_438E93,
  615 + width: w(72),
  616 + radius: r(11),
  617 + fontSize: 24,
  618 + isBold: true,
  619 + height: w(22),
  620 + onPressed: () {
  621 + // NavigatorUtil.goMyCustomerOrderPage(
  622 + // context,
  623 + // customerProvider.guestInfoSunModel.guest.id,
  624 + // customerProvider.guestInfoSunModel.guest.phone);
  625 + },
  626 + )
603 ], 627 ],
604 )) 628 ))
605 ], 629 ],
@@ -611,7 +611,30 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { @@ -611,7 +611,30 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
611 customerProvider.guestInfoSunModel.guest.id, 611 customerProvider.guestInfoSunModel.guest.id,
612 customerProvider.guestInfoSunModel.guest.phone); 612 customerProvider.guestInfoSunModel.guest.phone);
613 }, 613 },
614 - ) 614 + ),
  615 + if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
  616 + '0')
  617 + VEmptyView(20),
  618 + if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
  619 + '0')
  620 + RoundButton(
  621 + text: '存酒详情',
  622 + gradientStart: MyColours.color_ffffff,
  623 + gradientEnd: MyColours.color_ffffff,
  624 + textColor: MyColours.color_438E93,
  625 + borderColor: MyColours.color_438E93,
  626 + width: w(72),
  627 + radius: r(11),
  628 + fontSize: 24,
  629 + isBold: true,
  630 + height: w(22),
  631 + onPressed: () {
  632 + // NavigatorUtil.goMyCustomerOrderPage(
  633 + // context,
  634 + // customerProvider.guestInfoSunModel.guest.id,
  635 + // customerProvider.guestInfoSunModel.guest.phone);
  636 + },
  637 + )
615 ], 638 ],
616 )) 639 ))
617 ], 640 ],
@@ -246,14 +246,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -246,14 +246,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
246 style: TextStyle( 246 style: TextStyle(
247 fontWeight: FontWeight.bold, 247 fontWeight: FontWeight.bold,
248 fontSize: font(20), 248 fontSize: font(20),
249 - color: MyColours.color_515151,  
250 - shadows: [  
251 - BoxShadow(  
252 - color: MyColours.color_FBF6F1,  
253 - offset: Offset(0, 1),  
254 - blurRadius: w(2),  
255 - spreadRadius: w(20))  
256 - ]), 249 + color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  250 + // shadows: [
  251 + // BoxShadow(
  252 + // color: MyColours.color_FBF6F1,
  253 + // offset: Offset(0, 1),
  254 + // blurRadius: w(2),
  255 + // spreadRadius: w(20))
  256 + // ]
  257 + ),
257 ), 258 ),
258 if ((model.taste != null && 259 if ((model.taste != null &&
259 model.taste != '' && 260 model.taste != '' &&
@@ -282,14 +283,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -282,14 +283,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
282 style: TextStyle( 283 style: TextStyle(
283 fontWeight: FontWeight.bold, 284 fontWeight: FontWeight.bold,
284 fontSize: font(12), 285 fontSize: font(12),
285 - color: MyColours.color_515151,  
286 - shadows: [  
287 - BoxShadow(  
288 - color: MyColours.color_FBF6F1,  
289 - offset: Offset(0, 1),  
290 - blurRadius: w(2),  
291 - spreadRadius: w(20))  
292 - ])), 286 + color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD,
  287 + // shadows: [
  288 + // BoxShadow(
  289 + // color: MyColours.color_FBF6F1,
  290 + // offset: Offset(0, 1),
  291 + // blurRadius: w(2),
  292 + // spreadRadius: w(20))
  293 + // ]
  294 + )),
293 VEmptyView(20), 295 VEmptyView(20),
294 model.spec != null 296 model.spec != null
295 ? Column( 297 ? Column(
@@ -301,14 +303,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -301,14 +303,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
301 style: TextStyle( 303 style: TextStyle(
302 fontWeight: FontWeight.bold, 304 fontWeight: FontWeight.bold,
303 fontSize: font(14), 305 fontSize: font(14),
304 - color: MyColours.color_515151,  
305 - shadows: [  
306 - BoxShadow(  
307 - color: MyColours.color_FBF6F1,  
308 - offset: Offset(0, 1),  
309 - blurRadius: w(2),  
310 - spreadRadius: w(20))  
311 - ]), 306 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  307 + // shadows: [
  308 + // BoxShadow(
  309 + // color: MyColours.color_FBF6F1,
  310 + // offset: Offset(0, 1),
  311 + // blurRadius: w(2),
  312 + // spreadRadius: w(20))
  313 + // ]
  314 + ),
312 ), 315 ),
313 ], 316 ],
314 ), 317 ),
@@ -335,14 +338,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -335,14 +338,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
335 style: TextStyle( 338 style: TextStyle(
336 fontWeight: FontWeight.bold, 339 fontWeight: FontWeight.bold,
337 fontSize: font(14), 340 fontSize: font(14),
338 - color: MyColours.color_515151,  
339 - shadows: [  
340 - BoxShadow(  
341 - color: MyColours.color_FBF6F1,  
342 - offset: Offset(0, 1),  
343 - blurRadius: w(2),  
344 - spreadRadius: w(20))  
345 - ]), 341 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  342 + // shadows: [
  343 + // BoxShadow(
  344 + // color: MyColours.color_FBF6F1,
  345 + // offset: Offset(0, 1),
  346 + // blurRadius: w(2),
  347 + // spreadRadius: w(20))
  348 + // ]
  349 + ),
346 ), 350 ),
347 ); 351 );
348 }); 352 });
@@ -360,14 +364,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -360,14 +364,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
360 style: TextStyle( 364 style: TextStyle(
361 fontWeight: FontWeight.bold, 365 fontWeight: FontWeight.bold,
362 fontSize: font(20), 366 fontSize: font(20),
363 - color: MyColours.color_515151,  
364 - shadows: [  
365 - BoxShadow(  
366 - color: MyColours.color_FBF6F1,  
367 - offset: Offset(0, 1),  
368 - blurRadius: w(2),  
369 - spreadRadius: w(20))  
370 - ]), 367 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  368 + // shadows: [
  369 + // BoxShadow(
  370 + // color: MyColours.color_FBF6F1,
  371 + // offset: Offset(0, 1),
  372 + // blurRadius: w(2),
  373 + // spreadRadius: w(20))
  374 + // ]
  375 + ),
371 ), 376 ),
372 if ((model.taste != null && 377 if ((model.taste != null &&
373 model.taste != '' && 378 model.taste != '' &&
@@ -396,14 +401,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -396,14 +401,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
396 style: TextStyle( 401 style: TextStyle(
397 fontWeight: FontWeight.bold, 402 fontWeight: FontWeight.bold,
398 fontSize: font(12), 403 fontSize: font(12),
399 - color: MyColours.color_515151,  
400 - shadows: [  
401 - BoxShadow(  
402 - color: MyColours.color_FBF6F1,  
403 - offset: Offset(0, 1),  
404 - blurRadius: w(2),  
405 - spreadRadius: w(20))  
406 - ])), 404 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD
  405 + // shadows: [
  406 + // BoxShadow(
  407 + // color: MyColours.color_FBF6F1,
  408 + // offset: Offset(0, 1),
  409 + // blurRadius: w(2),
  410 + // spreadRadius: w(20))
  411 + // ]
  412 + )),
407 VEmptyView(20), 413 VEmptyView(20),
408 model.spec != null 414 model.spec != null
409 ? Column( 415 ? Column(
@@ -415,14 +421,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -415,14 +421,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
415 style: TextStyle( 421 style: TextStyle(
416 fontWeight: FontWeight.bold, 422 fontWeight: FontWeight.bold,
417 fontSize: font(14), 423 fontSize: font(14),
418 - color: MyColours.color_515151,  
419 - shadows: [  
420 - BoxShadow(  
421 - color: MyColours.color_FBF6F1,  
422 - offset: Offset(0, 1),  
423 - blurRadius: w(2),  
424 - spreadRadius: w(20))  
425 - ]), 424 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD
  425 + // shadows: [
  426 + // BoxShadow(
  427 + // color: MyColours.color_FBF6F1,
  428 + // offset: Offset(0, 1),
  429 + // blurRadius: w(2),
  430 + // spreadRadius: w(20))
  431 + // ]
  432 + ),
426 ), 433 ),
427 ], 434 ],
428 ), 435 ),
@@ -446,14 +453,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -446,14 +453,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
446 style: TextStyle( 453 style: TextStyle(
447 fontWeight: FontWeight.bold, 454 fontWeight: FontWeight.bold,
448 fontSize: font(20), 455 fontSize: font(20),
449 - color: MyColours.color_515151,  
450 - shadows: [  
451 - BoxShadow(  
452 - color: MyColours.color_FBF6F1,  
453 - offset: Offset(0, 1),  
454 - blurRadius: w(2),  
455 - spreadRadius: w(20))  
456 - ]), 456 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  457 + // shadows: [
  458 + // BoxShadow(
  459 + // color: MyColours.color_FBF6F1,
  460 + // offset: Offset(0, 1),
  461 + // blurRadius: w(2),
  462 + // spreadRadius: w(20))
  463 + // ]
  464 + ),
457 ), 465 ),
458 if ((model.taste != null && 466 if ((model.taste != null &&
459 model.taste != '' && 467 model.taste != '' &&
@@ -482,14 +490,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -482,14 +490,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
482 style: TextStyle( 490 style: TextStyle(
483 fontWeight: FontWeight.bold, 491 fontWeight: FontWeight.bold,
484 fontSize: font(12), 492 fontSize: font(12),
485 - color: MyColours.color_515151,  
486 - shadows: [  
487 - BoxShadow(  
488 - color: MyColours.color_FBF6F1,  
489 - offset: Offset(0, 1),  
490 - blurRadius: w(2),  
491 - spreadRadius: w(20))  
492 - ])) 493 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  494 + // shadows: [
  495 + // BoxShadow(
  496 + // color: MyColours.color_FBF6F1,
  497 + // offset: Offset(0, 1),
  498 + // blurRadius: w(2),
  499 + // spreadRadius: w(20))
  500 + // ]
  501 + ))
493 ], 502 ],
494 ), 503 ),
495 )), 504 )),
@@ -504,14 +513,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -504,14 +513,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
504 style: TextStyle( 513 style: TextStyle(
505 fontWeight: FontWeight.bold, 514 fontWeight: FontWeight.bold,
506 fontSize: font(14), 515 fontSize: font(14),
507 - color: MyColours.color_515151,  
508 - shadows: [  
509 - BoxShadow(  
510 - color: MyColours.color_FBF6F1,  
511 - offset: Offset(0, 1),  
512 - blurRadius: w(2),  
513 - spreadRadius: w(20))  
514 - ]), 516 + color: themeColerModel1.name == '珍珠白' ? MyColours.color_515151 :MyColours.color_F8F9FD,
  517 + // shadows: [
  518 + // BoxShadow(
  519 + // color: MyColours.color_FBF6F1,
  520 + // offset: Offset(0, 1),
  521 + // blurRadius: w(2),
  522 + // spreadRadius: w(20))
  523 + // ]
  524 + ),
515 ), 525 ),
516 ], 526 ],
517 ); 527 );
@@ -532,14 +542,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -532,14 +542,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
532 style: TextStyle( 542 style: TextStyle(
533 fontWeight: FontWeight.bold, 543 fontWeight: FontWeight.bold,
534 fontSize: font(20), 544 fontSize: font(20),
535 - color: MyColours.color_515151,  
536 - shadows: [  
537 - BoxShadow(  
538 - color: MyColours.color_FBF6F1,  
539 - offset: Offset(0, 1),  
540 - blurRadius: w(2),  
541 - spreadRadius: w(20))  
542 - ]), 545 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  546 + // shadows: [
  547 + // BoxShadow(
  548 + // color: MyColours.color_FBF6F1,
  549 + // offset: Offset(0, 1),
  550 + // blurRadius: w(2),
  551 + // spreadRadius: w(20))
  552 + // ]
  553 + ),
543 )), 554 )),
544 if ((model.taste != null && 555 if ((model.taste != null &&
545 model.taste != '' && 556 model.taste != '' &&
@@ -570,14 +581,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -570,14 +581,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
570 style: TextStyle( 581 style: TextStyle(
571 fontWeight: FontWeight.bold, 582 fontWeight: FontWeight.bold,
572 fontSize: font(12), 583 fontSize: font(12),
573 - color: MyColours.color_515151,  
574 - shadows: [  
575 - BoxShadow(  
576 - color: MyColours.color_FBF6F1,  
577 - offset: Offset(0, 1),  
578 - blurRadius: w(2),  
579 - spreadRadius: w(20))  
580 - ]), 584 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  585 + // shadows: [
  586 + // BoxShadow(
  587 + // color: MyColours.color_FBF6F1,
  588 + // offset: Offset(0, 1),
  589 + // blurRadius: w(2),
  590 + // spreadRadius: w(20))
  591 + // ]
  592 + ),
581 )), 593 )),
582 VEmptyView(20), 594 VEmptyView(20),
583 Padding( 595 Padding(
@@ -592,14 +604,15 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -592,14 +604,15 @@ class _MenuManagePageState extends State<MenuManagePage> {
592 style: TextStyle( 604 style: TextStyle(
593 fontWeight: FontWeight.bold, 605 fontWeight: FontWeight.bold,
594 fontSize: font(14), 606 fontSize: font(14),
595 - color: MyColours.color_515151,  
596 - shadows: [  
597 - BoxShadow(  
598 - color: MyColours.color_FBF6F1,  
599 - offset: Offset(0, 1),  
600 - blurRadius: w(2),  
601 - spreadRadius: w(20))  
602 - ]), 607 + color:themeColerModel1.name == '珍珠白' ? MyColours.color_515151 : MyColours.color_F8F9FD,
  608 + // shadows: [
  609 + // BoxShadow(
  610 + // color: MyColours.color_FBF6F1,
  611 + // offset: Offset(0, 1),
  612 + // blurRadius: w(2),
  613 + // spreadRadius: w(20))
  614 + // ]
  615 + ),
603 )), 616 )),
604 VEmptyView(30), 617 VEmptyView(30),
605 if (model.image != null) 618 if (model.image != null)
@@ -303,16 +303,19 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -303,16 +303,19 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
303 Text( 303 Text(
304 model.name, 304 model.name,
305 style: TextStyle( 305 style: TextStyle(
306 - fontWeight: FontWeight.bold,  
307 - fontSize: font(20),  
308 - color: MyColours.color_515151,  
309 - shadows: [  
310 - BoxShadow(  
311 - color: MyColours.color_FBF6F1,  
312 - offset: Offset(0, 1),  
313 - blurRadius: w(2),  
314 - spreadRadius: w(20))  
315 - ]), 306 + fontWeight: FontWeight.bold,
  307 + fontSize: font(20),
  308 + color: themeColorData[themeColorIndex].name == '珍珠白'
  309 + ? MyColours.color_515151
  310 + : MyColours.color_F8F9FD,
  311 + // shadows: [
  312 + // BoxShadow(
  313 + // color: MyColours.color_FBF6F1,
  314 + // offset: Offset(0, 1),
  315 + // blurRadius: w(2),
  316 + // spreadRadius: w(20))
  317 + // ]
  318 + ),
316 ), 319 ),
317 if ((model.taste != null && 320 if ((model.taste != null &&
318 model.taste != '' && 321 model.taste != '' &&
@@ -341,14 +344,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -341,14 +344,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
341 style: TextStyle( 344 style: TextStyle(
342 fontWeight: FontWeight.bold, 345 fontWeight: FontWeight.bold,
343 fontSize: font(12), 346 fontSize: font(12),
344 - color: MyColours.color_515151,  
345 - shadows: [  
346 - BoxShadow(  
347 - color: MyColours.color_FBF6F1,  
348 - offset: Offset(0, 1),  
349 - blurRadius: w(2),  
350 - spreadRadius: w(20))  
351 - ])), 347 + color: themeColorData[themeColorIndex].name == '珍珠白'
  348 + ? MyColours.color_515151
  349 + : MyColours.color_F8F9FD
  350 + // shadows: [
  351 + // BoxShadow(
  352 + // color: MyColours.color_FBF6F1,
  353 + // offset: Offset(0, 1),
  354 + // blurRadius: w(2),
  355 + // spreadRadius: w(20))
  356 + // ]
  357 + )),
352 VEmptyView(20), 358 VEmptyView(20),
353 model.spec != null 359 model.spec != null
354 ? Column( 360 ? Column(
@@ -360,14 +366,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -360,14 +366,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
360 style: TextStyle( 366 style: TextStyle(
361 fontWeight: FontWeight.bold, 367 fontWeight: FontWeight.bold,
362 fontSize: font(14), 368 fontSize: font(14),
363 - color: MyColours.color_515151,  
364 - shadows: [  
365 - BoxShadow(  
366 - color: MyColours.color_FBF6F1,  
367 - offset: Offset(0, 1),  
368 - blurRadius: w(2),  
369 - spreadRadius: w(20))  
370 - ]), 369 + color: themeColorData[themeColorIndex].name == '珍珠白'
  370 + ? MyColours.color_515151
  371 + : MyColours.color_F8F9FD
  372 + // shadows: [
  373 + // BoxShadow(
  374 + // color: MyColours.color_FBF6F1,
  375 + // offset: Offset(0, 1),
  376 + // blurRadius: w(2),
  377 + // spreadRadius: w(20))
  378 + // ]
  379 + ),
371 ), 380 ),
372 ], 381 ],
373 ), 382 ),
@@ -394,14 +403,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -394,14 +403,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
394 style: TextStyle( 403 style: TextStyle(
395 fontWeight: FontWeight.bold, 404 fontWeight: FontWeight.bold,
396 fontSize: font(14), 405 fontSize: font(14),
397 - color: MyColours.color_515151,  
398 - shadows: [  
399 - BoxShadow(  
400 - color: MyColours.color_FBF6F1,  
401 - offset: Offset(0, 1),  
402 - blurRadius: w(2),  
403 - spreadRadius: w(20))  
404 - ]), 406 + color: themeColorData[themeColorIndex].name == '珍珠白'
  407 + ? MyColours.color_515151
  408 + : MyColours.color_F8F9FD
  409 + // shadows: [
  410 + // BoxShadow(
  411 + // color: MyColours.color_FBF6F1,
  412 + // offset: Offset(0, 1),
  413 + // blurRadius: w(2),
  414 + // spreadRadius: w(20))
  415 + // ]
  416 + ),
405 ), 417 ),
406 ); 418 );
407 }); 419 });
@@ -419,14 +431,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -419,14 +431,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
419 style: TextStyle( 431 style: TextStyle(
420 fontWeight: FontWeight.bold, 432 fontWeight: FontWeight.bold,
421 fontSize: font(20), 433 fontSize: font(20),
422 - color: MyColours.color_515151,  
423 - shadows: [  
424 - BoxShadow(  
425 - color: MyColours.color_FBF6F1,  
426 - offset: Offset(0, 1),  
427 - blurRadius: w(2),  
428 - spreadRadius: w(20))  
429 - ]), 434 + color: themeColorData[themeColorIndex].name == '珍珠白'
  435 + ? MyColours.color_515151
  436 + : MyColours.color_F8F9FD
  437 + // shadows: [
  438 + // BoxShadow(
  439 + // color: MyColours.color_FBF6F1,
  440 + // offset: Offset(0, 1),
  441 + // blurRadius: w(2),
  442 + // spreadRadius: w(20))
  443 + // ]
  444 + ),
430 ), 445 ),
431 if ((model.taste != null && 446 if ((model.taste != null &&
432 model.taste != '' && 447 model.taste != '' &&
@@ -455,14 +470,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -455,14 +470,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
455 style: TextStyle( 470 style: TextStyle(
456 fontWeight: FontWeight.bold, 471 fontWeight: FontWeight.bold,
457 fontSize: font(12), 472 fontSize: font(12),
458 - color: MyColours.color_515151,  
459 - shadows: [  
460 - BoxShadow(  
461 - color: MyColours.color_FBF6F1,  
462 - offset: Offset(0, 1),  
463 - blurRadius: w(2),  
464 - spreadRadius: w(20))  
465 - ])), 473 + color: themeColorData[themeColorIndex].name == '珍珠白'
  474 + ? MyColours.color_515151
  475 + : MyColours.color_F8F9FD
  476 + // shadows: [
  477 + // BoxShadow(
  478 + // color: MyColours.color_FBF6F1,
  479 + // offset: Offset(0, 1),
  480 + // blurRadius: w(2),
  481 + // spreadRadius: w(20))
  482 + // ]
  483 + )),
466 VEmptyView(20), 484 VEmptyView(20),
467 model.spec != null 485 model.spec != null
468 ? Column( 486 ? Column(
@@ -474,14 +492,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -474,14 +492,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
474 style: TextStyle( 492 style: TextStyle(
475 fontWeight: FontWeight.bold, 493 fontWeight: FontWeight.bold,
476 fontSize: font(14), 494 fontSize: font(14),
477 - color: MyColours.color_515151,  
478 - shadows: [  
479 - BoxShadow(  
480 - color: MyColours.color_FBF6F1,  
481 - offset: Offset(0, 1),  
482 - blurRadius: w(2),  
483 - spreadRadius: w(20))  
484 - ]), 495 + color: themeColorData[themeColorIndex].name == '珍珠白'
  496 + ? MyColours.color_515151
  497 + : MyColours.color_F8F9FD
  498 + // shadows: [
  499 + // BoxShadow(
  500 + // color: MyColours.color_FBF6F1,
  501 + // offset: Offset(0, 1),
  502 + // blurRadius: w(2),
  503 + // spreadRadius: w(20))
  504 + // ]
  505 + ),
485 ), 506 ),
486 ], 507 ],
487 ), 508 ),
@@ -505,14 +526,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -505,14 +526,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
505 style: TextStyle( 526 style: TextStyle(
506 fontWeight: FontWeight.bold, 527 fontWeight: FontWeight.bold,
507 fontSize: font(20), 528 fontSize: font(20),
508 - color: MyColours.color_515151,  
509 - shadows: [  
510 - BoxShadow(  
511 - color: MyColours.color_FBF6F1,  
512 - offset: Offset(0, 1),  
513 - blurRadius: w(2),  
514 - spreadRadius: w(20))  
515 - ]), 529 + color: themeColorData[themeColorIndex].name == '珍珠白'
  530 + ? MyColours.color_515151
  531 + : MyColours.color_F8F9FD
  532 + // shadows: [
  533 + // BoxShadow(
  534 + // color: MyColours.color_FBF6F1,
  535 + // offset: Offset(0, 1),
  536 + // blurRadius: w(2),
  537 + // spreadRadius: w(20))
  538 + // ]
  539 + ),
516 ), 540 ),
517 if ((model.taste != null && 541 if ((model.taste != null &&
518 model.taste != '' && 542 model.taste != '' &&
@@ -541,19 +565,22 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -541,19 +565,22 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
541 style: TextStyle( 565 style: TextStyle(
542 fontWeight: FontWeight.bold, 566 fontWeight: FontWeight.bold,
543 fontSize: font(12), 567 fontSize: font(12),
544 - color: MyColours.color_515151,  
545 - shadows: [  
546 - BoxShadow(  
547 - color: MyColours.color_FBF6F1,  
548 - offset: Offset(0, 1),  
549 - blurRadius: w(2),  
550 - spreadRadius: w(20))  
551 - ])) 568 + color: themeColorData[themeColorIndex].name == '珍珠白'
  569 + ? MyColours.color_515151
  570 + : MyColours.color_F8F9FD
  571 + // shadows: [
  572 + // BoxShadow(
  573 + // color: MyColours.color_FBF6F1,
  574 + // offset: Offset(0, 1),
  575 + // blurRadius: w(2),
  576 + // spreadRadius: w(20))
  577 + // ]
  578 + ))
552 ], 579 ],
553 ), 580 ),
554 )), 581 )),
555 HEmptyView(10), 582 HEmptyView(10),
556 - model.spec != null 583 + model.spec != null
557 ? Column( 584 ? Column(
558 crossAxisAlignment: CrossAxisAlignment.start, 585 crossAxisAlignment: CrossAxisAlignment.start,
559 children: _priceWidget(model)) 586 children: _priceWidget(model))
@@ -563,14 +590,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -563,14 +590,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
563 style: TextStyle( 590 style: TextStyle(
564 fontWeight: FontWeight.bold, 591 fontWeight: FontWeight.bold,
565 fontSize: font(14), 592 fontSize: font(14),
566 - color: MyColours.color_515151,  
567 - shadows: [  
568 - BoxShadow(  
569 - color: MyColours.color_FBF6F1,  
570 - offset: Offset(0, 1),  
571 - blurRadius: w(2),  
572 - spreadRadius: w(20))  
573 - ]), 593 + color: themeColorData[themeColorIndex].name == '珍珠白'
  594 + ? MyColours.color_515151
  595 + : MyColours.color_F8F9FD
  596 + // shadows: [
  597 + // BoxShadow(
  598 + // color: MyColours.color_FBF6F1,
  599 + // offset: Offset(0, 1),
  600 + // blurRadius: w(2),
  601 + // spreadRadius: w(20))
  602 + // ]
  603 + ),
574 ), 604 ),
575 ], 605 ],
576 ); 606 );
@@ -591,14 +621,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -591,14 +621,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
591 style: TextStyle( 621 style: TextStyle(
592 fontWeight: FontWeight.bold, 622 fontWeight: FontWeight.bold,
593 fontSize: font(20), 623 fontSize: font(20),
594 - color: MyColours.color_515151,  
595 - shadows: [  
596 - BoxShadow(  
597 - color: MyColours.color_FBF6F1,  
598 - offset: Offset(0, 1),  
599 - blurRadius: w(2),  
600 - spreadRadius: w(20))  
601 - ]), 624 + color: themeColorData[themeColorIndex].name == '珍珠白'
  625 + ? MyColours.color_515151
  626 + : MyColours.color_F8F9FD
  627 + // shadows: [
  628 + // BoxShadow(
  629 + // color: MyColours.color_FBF6F1,
  630 + // offset: Offset(0, 1),
  631 + // blurRadius: w(2),
  632 + // spreadRadius: w(20))
  633 + // ]
  634 + ),
602 )), 635 )),
603 if ((model.taste != null && 636 if ((model.taste != null &&
604 model.taste != '' && 637 model.taste != '' &&
@@ -629,14 +662,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -629,14 +662,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
629 style: TextStyle( 662 style: TextStyle(
630 fontWeight: FontWeight.bold, 663 fontWeight: FontWeight.bold,
631 fontSize: font(12), 664 fontSize: font(12),
632 - color: MyColours.color_515151,  
633 - shadows: [  
634 - BoxShadow(  
635 - color: MyColours.color_FBF6F1,  
636 - offset: Offset(0, 1),  
637 - blurRadius: w(2),  
638 - spreadRadius: w(20))  
639 - ]), 665 + color: themeColorData[themeColorIndex].name == '珍珠白'
  666 + ? MyColours.color_515151
  667 + : MyColours.color_F8F9FD
  668 + // shadows: [
  669 + // BoxShadow(
  670 + // color: MyColours.color_FBF6F1,
  671 + // offset: Offset(0, 1),
  672 + // blurRadius: w(2),
  673 + // spreadRadius: w(20))
  674 + // ]
  675 + ),
640 )), 676 )),
641 VEmptyView(20), 677 VEmptyView(20),
642 Padding( 678 Padding(
@@ -651,14 +687,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -651,14 +687,17 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
651 style: TextStyle( 687 style: TextStyle(
652 fontWeight: FontWeight.bold, 688 fontWeight: FontWeight.bold,
653 fontSize: font(14), 689 fontSize: font(14),
654 - color: MyColours.color_515151,  
655 - shadows: [  
656 - BoxShadow(  
657 - color: MyColours.color_FBF6F1,  
658 - offset: Offset(0, 1),  
659 - blurRadius: w(2),  
660 - spreadRadius: w(20))  
661 - ]), 690 + color: themeColorData[themeColorIndex].name == '珍珠白'
  691 + ? MyColours.color_515151
  692 + : MyColours.color_F8F9FD
  693 + // shadows: [
  694 + // BoxShadow(
  695 + // color: MyColours.color_FBF6F1,
  696 + // offset: Offset(0, 1),
  697 + // blurRadius: w(2),
  698 + // spreadRadius: w(20))
  699 + // ]
  700 + ),
662 )), 701 )),
663 VEmptyView(30), 702 VEmptyView(30),
664 if (model.image != null) 703 if (model.image != null)
@@ -960,8 +999,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -960,8 +999,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
960 ), 999 ),
961 Positioned( 1000 Positioned(
962 bottom: ScreenUtil().setWidth(14), 1001 bottom: ScreenUtil().setWidth(14),
963 - right:  
964 - ScreenUtil().setWidth(150), 1002 + right: ScreenUtil().setWidth(150),
965 child: model.status == '1' 1003 child: model.status == '1'
966 ? SizedBox() 1004 ? SizedBox()
967 : Image.asset( 1005 : Image.asset(
  1 +import 'dart:convert';
  2 +
  3 +import 'package:common_utils/common_utils.dart';
1 import 'package:flutter/material.dart'; 4 import 'package:flutter/material.dart';
2 import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; 5 import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 import 'package:flutter_screenutil/flutter_screenutil.dart';
  7 +import 'package:one_key/utils/dialog_util.dart';
4 import 'package:provider/provider.dart'; 8 import 'package:provider/provider.dart';
5 9
6 import '../../../models/wine_manage_model.dart'; 10 import '../../../models/wine_manage_model.dart';
7 import '../../../provider/customer_provider.dart'; 11 import '../../../provider/customer_provider.dart';
  12 +import '../../../provider/menu_provider.dart';
8 import '../../../provider/store_wine_provider.dart'; 13 import '../../../provider/store_wine_provider.dart';
9 import '../../../provider/user_model.dart'; 14 import '../../../provider/user_model.dart';
10 import '../../../res/colors.dart'; 15 import '../../../res/colors.dart';
11 import '../../../route/navigator_util.dart'; 16 import '../../../route/navigator_util.dart';
  17 +import '../../../utils/event_bus.dart';
12 import '../../../utils/screen_util.dart'; 18 import '../../../utils/screen_util.dart';
13 import '../../../utils/utils.dart'; 19 import '../../../utils/utils.dart';
14 import '../../../widgets/MyDivider.dart'; 20 import '../../../widgets/MyDivider.dart';
@@ -35,6 +41,8 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -35,6 +41,8 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
35 41
36 ScrollController _controller = ScrollController(); 42 ScrollController _controller = ScrollController();
37 String isMember = ''; 43 String isMember = '';
  44 + MenuManageProvider menuManageProvider;
  45 + bool needSms = true;
38 46
39 @override 47 @override
40 void initState() { 48 void initState() {
@@ -45,7 +53,20 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -45,7 +53,20 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
45 element.wineNumC.text = element.wineStock; //出库数量初始化剩余库存量 53 element.wineNumC.text = element.wineStock; //出库数量初始化剩余库存量
46 element.checkAmount = element.wineStock; //出库数量初始化剩余库存量 54 element.checkAmount = element.wineStock; //出库数量初始化剩余库存量
47 }); 55 });
48 - _getIsMemberByPhone(); 56 +
  57 + WidgetsBinding.instance.addPostFrameCallback((_) async {
  58 + _getIsMemberByPhone();
  59 + _getDzSellerConf();
  60 + });
  61 + }
  62 +
  63 + _getDzSellerConf() async {
  64 + bool success =
  65 + await menuManageProvider.getDzSellerConf(context, showLoading: false);
  66 + if (success) {
  67 + needSms =
  68 + menuManageProvider.dzSellerConfModel.isStoreSms == '0' ? false : true;
  69 + }
49 } 70 }
50 71
51 ///获取手机号是否为商家会员 72 ///获取手机号是否为商家会员
@@ -70,6 +91,102 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -70,6 +91,102 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
70 setState(() {}); 91 setState(() {});
71 } 92 }
72 93
  94 + //出库
  95 +
  96 + _outWine(WineManageModel detail) async {
  97 + //出库申请提交接口
  98 +
  99 + List<WineCheckModel> outWineData = [];
  100 +
  101 + for (int i = 0; i < detail.wineDataMove.length; i++) {
  102 + WineManageSunMoveModel element = detail.wineDataMove[i];
  103 + // if (element.wineNameC.text.trim().length == 0) {
  104 + // Utils.showToast('请输入酒品名称!');
  105 + // // return false;
  106 + // can = false;
  107 + // break outerloop;
  108 + // }
  109 +
  110 + if (element.checkAmount != null &&
  111 + element.checkAmount != '' &&
  112 + double.parse(element.checkAmount) > 0) {
  113 + //有输入数量
  114 + WineCheckModel sunMoveModel = WineCheckModel();
  115 + sunMoveModel.wineName = element.wineName;
  116 + sunMoveModel.checkAmount = element.checkAmount;
  117 + sunMoveModel.wineNumber = element.wineNumber;
  118 + sunMoveModel.unit = element.unit;
  119 +
  120 + sunMoveModel.img = element.img;
  121 +
  122 + outWineData.add(sunMoveModel);
  123 + }
  124 + }
  125 +
  126 + Map<String, String> pramas = {
  127 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  128 + 'uid': Provider.of<UserModel>(context, listen: false).user.openid,
  129 + 'wid': detail.id,
  130 + 'wine_check': jsonEncode(outWineData)
  131 + };
  132 +
  133 + bool success = await storeWineProvider
  134 + .setStoreWineBySellerCheck(context, pramas, showLoading: true);
  135 +
  136 + if (success) {
  137 + List<Map<String, String>> data = [];
  138 + widget.wineManageDetail.wineDataMove.forEach((element) {
  139 + double wineStock =
  140 + double.parse(element.wineStock) - double.parse(element.checkAmount);
  141 + String winestockStr =
  142 + (NumUtil.getNumByValueDouble(wineStock, 2)).toStringAsFixed(2);
  143 + Map<String, String> map = {
  144 + 'wine_name': element.wineName, //酒名称
  145 + 'wine_amount': element.wineAmount, //初始存酒量
  146 + 'unit': element.unit, //单位
  147 + 'wine_number': element.wineNumber, //存酒编号
  148 + 'wine_stock': '${winestockStr}', //剩余库存,
  149 + 'cdate': element.cdate,
  150 + 'img': element.img == null || element.img.length == 0
  151 + ? null
  152 + : json.encode(element.img),
  153 + };
  154 + data.add(map);
  155 + });
  156 +
  157 + Map<String, String> pramasreresh = {
  158 + 'id': detail.id,
  159 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  160 + 'uid': Provider.of<UserModel>(context, listen: false).user.openid,
  161 + 'rname': detail.rname,
  162 + 'sex': detail.sex, //性别 1 男 2 女 3 公司
  163 + 'is_member': detail.isMember, //会员状态
  164 + 'phone': detail.phone,
  165 + 'wine': json.encode(data)
  166 + };
  167 + // if (widget.id != null) {
  168 + //修改存酒信息
  169 + // pramas['id'] = widget.id;
  170 + // }
  171 + bool succesReresh = await storeWineProvider
  172 + .setStoreWineBySeller(context, pramasreresh, showLoading: true);
  173 + if (succesReresh) {
  174 + //刷新库存数量成功
  175 + //
  176 + Navigator.pop(context);
  177 + Navigator.pop(context);
  178 + // Navigator.pop(context);
  179 + //刷新首页数据
  180 + bus.emit('refresh_wine_home_list', {'index': 1});
  181 +
  182 + DialogUtil.cupertinoAlertDialogOnly(context,
  183 + content:
  184 + '客户${detail.rname + detail.sexStr}的酒品已经出库。\n您可以在存酒管理-出库记录中查看详细信息。',
  185 + rTitle: '我知道了');
  186 + }
  187 + }
  188 + }
  189 +
73 Widget _textItemWidget( 190 Widget _textItemWidget(
74 String title, 191 String title,
75 String subTitle, 192 String subTitle,
@@ -106,6 +223,7 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -106,6 +223,7 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
106 @override 223 @override
107 Widget build(BuildContext context) { 224 Widget build(BuildContext context) {
108 storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true); 225 storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true);
  226 + menuManageProvider = Provider.of<MenuManageProvider>(context, listen: false);
109 return KeyboardDismissOnTap( 227 return KeyboardDismissOnTap(
110 child: Scaffold( 228 child: Scaffold(
111 appBar: SystemAppBar( 229 appBar: SystemAppBar(
@@ -276,9 +394,17 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -276,9 +394,17 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
276 widget.wineManageDetail.toJson()); 394 widget.wineManageDetail.toJson());
277 395
278 modelTemp.wineData = []; 396 modelTemp.wineData = [];
279 -  
280 - NavigatorUtil.goSmsCodeInputPage(  
281 - context, modelTemp); 397 + if (needSms) {
  398 + NavigatorUtil.goSmsCodeInputPage(
  399 + context, modelTemp);
  400 + } else {
  401 + //直接出库
  402 + DialogUtil.cupertinoAlertDialog(context,title: '',
  403 + content: '确定要取出当前酒品么?', rCallback: () {
  404 + //确定
  405 + _outWine(modelTemp);
  406 + });
  407 + }
282 } else { 408 } else {
283 Utils.showToast('请输入出库数量!'); 409 Utils.showToast('请输入出库数量!');
284 } 410 }
@@ -380,12 +380,26 @@ class _StoreWineManageHomePageState extends State<StoreWineManageHomePage> @@ -380,12 +380,26 @@ class _StoreWineManageHomePageState extends State<StoreWineManageHomePage>
380 return KeyboardDismissOnTap( 380 return KeyboardDismissOnTap(
381 child: Scaffold( 381 child: Scaffold(
382 resizeToAvoidBottomInset: false, 382 resizeToAvoidBottomInset: false,
  383 +
383 appBar: SystemAppBar( 384 appBar: SystemAppBar(
384 '存酒管理', 385 '存酒管理',
385 onTap: () { 386 onTap: () {
386 EventBus().emit('changeStatusColor'); 387 EventBus().emit('changeStatusColor');
387 Navigator.pop(context); 388 Navigator.pop(context);
388 }, 389 },
  390 + rightImgName: 'set_g.png',
  391 + onTapRight: () {
  392 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  393 + bool isRole = userModel.user.role_name == '管理员' ||
  394 + userModel.user.role_name == '店长'
  395 + ? true
  396 + : false;
  397 + if (isRole) {
  398 + NavigatorUtil.goWineSettingPage(context);
  399 + } else {
  400 + Utils.showToast('您不是店铺的管理员或者店长,无权进行相关操作。');
  401 + }
  402 + },
389 ), 403 ),
390 body: WillPopScope( 404 body: WillPopScope(
391 onWillPop: () async { 405 onWillPop: () async {
  1 +import 'dart:convert';
  2 +
  3 +import 'package:flutter/material.dart';
  4 +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
  5 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  6 +import 'package:one_key/provider/menu_provider.dart';
  7 +import 'package:one_key/res/colors.dart';
  8 +import 'package:one_key/utils/utils.dart';
  9 +import 'package:one_key/widgets/MyDivider.dart';
  10 +import 'package:one_key/widgets/round_button.dart';
  11 +import 'package:one_key/widgets/system_app_bar.dart';
  12 +import 'package:provider/provider.dart';
  13 +
  14 +import '../../../provider/user_model.dart';
  15 +import '../../../utils/screen_util.dart';
  16 +import '../../../widgets/h_empty_view.dart';
  17 +
  18 +/**
  19 + * 存酒配置
  20 + */
  21 +
  22 +class WineSettingPage extends StatefulWidget {
  23 + WineSettingPage({Key key}) : super(key: key);
  24 +
  25 + @override
  26 + _WineSettingPageState createState() => _WineSettingPageState();
  27 +}
  28 +
  29 +class _WineSettingPageState extends State<WineSettingPage> {
  30 + TextEditingController dayC = TextEditingController();
  31 + FocusNode dayF = FocusNode();
  32 + bool swich = true;
  33 + MenuManageProvider menuManageProvider;
  34 +
  35 + @override
  36 + void initState() {
  37 + super.initState();
  38 + WidgetsBinding.instance.addPostFrameCallback((_) async {
  39 + _getDzSellerConf();
  40 + });
  41 + }
  42 +
  43 + _getDzSellerConf() async {
  44 + bool success =
  45 + await menuManageProvider.getDzSellerConf(context, showLoading: false);
  46 + if (success) {
  47 + swich =
  48 + menuManageProvider.dzSellerConfModel.isStoreSms == '0' ? false : true;
  49 + dayC.text = menuManageProvider.dzSellerConfModel.storeDate ?? '';
  50 + setState(() {});
  51 + }
  52 + }
  53 +
  54 + Widget _divider() {
  55 + return Padding(
  56 + padding: EdgeInsets.only(left: w(16)),
  57 + child: MyDivider(
  58 + double.infinity,
  59 + w(1),
  60 + color: MyColours.color_E7E7E7,
  61 + ),
  62 + );
  63 + }
  64 +
  65 + ///请输入
  66 + ///输入框
  67 + Widget _textfield(
  68 + BuildContext context,
  69 + String title,
  70 + String hintText,
  71 + TextEditingController editingController,
  72 + FocusNode focusNode,
  73 + String subTitle,
  74 + {TextInputType inputType = TextInputType.number}) {
  75 + return Container(
  76 + height: w(48),
  77 + margin: EdgeInsets.only(top: w(12)),
  78 + child: Row(
  79 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  80 + children: [
  81 + Container(
  82 + // width: w(81),
  83 + // height: w(48),
  84 + // alignment: Alignment.center,
  85 + child: Text(
  86 + title,
  87 + style: TextStyle(
  88 + fontSize: ScreenUtil().setSp(32),
  89 + color: MyColours.color_515151),
  90 + ),
  91 + ),
  92 + HEmptyView(32),
  93 + Expanded(
  94 + child: Container(
  95 + // height: ScreenUtil().setHeight(120),
  96 + height: w(48),
  97 + padding: EdgeInsets.only(top: w(4)),
  98 + child: TextField(
  99 + controller: editingController,
  100 + textAlign: TextAlign.right,
  101 + // textAlignVertical: TextAlignVertical.bottom,
  102 + maxLines: 1,
  103 + // inputFormatters: [],
  104 +
  105 + // //光标颜色
  106 + // cursorColor:
  107 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  108 + //输入文本的样式
  109 + style: TextStyle(
  110 + fontSize: ScreenUtil().setSp(32),
  111 + color: MyColours.color_515151),
  112 + focusNode: focusNode,
  113 + decoration: InputDecoration(
  114 + border: OutlineInputBorder(borderSide: BorderSide.none),
  115 + hintText: hintText,
  116 + hintStyle: TextStyle(
  117 + color: hintText == '请输入'
  118 + ? MyColours.color_999999
  119 + : MyColours.color_515151,
  120 + fontSize: ScreenUtil().setSp(32),
  121 + ),
  122 + contentPadding: EdgeInsets.zero,
  123 + ),
  124 + onChanged: (value) {},
  125 + onEditingComplete: () {
  126 + FocusScope.of(context)
  127 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  128 + },
  129 + keyboardType: inputType,
  130 + )),
  131 + ),
  132 + Container(
  133 + padding: EdgeInsets.only(left: w(4)),
  134 + child: Text(
  135 + subTitle,
  136 + style: TextStyle(
  137 + color: MyColours.color_515151,
  138 + fontSize: ScreenUtil().setSp(32)),
  139 + ),
  140 + ),
  141 + ],
  142 + ),
  143 + );
  144 + }
  145 +
  146 + ///获取经理数据
  147 + Future<bool> _setIsStoreSms() async {
  148 + Map<String, String> params = {
  149 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  150 + 'key': 'is_store_sms',
  151 + 'value': swich ? '1' : '0'
  152 + };
  153 +
  154 + bool success =
  155 + await menuManageProvider.setConfing(context, params, needToast: false);
  156 + if (success) {
  157 + return true;
  158 + } else {
  159 + return false;
  160 + }
  161 + }
  162 +
  163 + ///
  164 + Future<bool> _setStoreDate() async {
  165 + Map<String, String> params = {
  166 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  167 + 'key': 'store_date',
  168 + 'value': dayC.text.trim()
  169 + };
  170 +
  171 + bool success =
  172 + await menuManageProvider.setConfing(context, params, needToast: false);
  173 + if (success) {
  174 + return true;
  175 + } else {
  176 + return false;
  177 + }
  178 + }
  179 +
  180 + _setData() async {
  181 + await Future.wait<bool>([_setIsStoreSms(), _setStoreDate()])
  182 + .then((results) async {
  183 + print(results[0]);
  184 + if (results[0] && results[1]) {
  185 + //都成功
  186 + Utils.showToast('设置成功');
  187 + } else {
  188 + if (results[0]) {
  189 + //取酒是否需要短信验证码成功
  190 + Utils.showToast('取酒需要提供短信验证码设置成功');
  191 + } else {
  192 + //取酒是否需要短信验证码成功失败
  193 + Utils.showToast('取酒需要提供短信验证码设置失败');
  194 + }
  195 + if (results[1]) {
  196 + //超期提醒天数成功
  197 + Utils.showToast('超期提醒天数设置成功');
  198 + } else {
  199 + //超期提醒天数失败
  200 + Utils.showToast('超期提醒天数设置失败');
  201 + }
  202 + }
  203 + }).catchError((e) {
  204 + print(e);
  205 + });
  206 + }
  207 +
  208 + @override
  209 + Widget build(BuildContext context) {
  210 + menuManageProvider =
  211 + Provider.of<MenuManageProvider>(context, listen: false);
  212 + return KeyboardDismissOnTap(
  213 + child: Scaffold(
  214 + backgroundColor: MyColours.color_ffffff,
  215 + appBar: SystemAppBar(
  216 + '存酒配置',
  217 + ),
  218 + body: Column(
  219 + children: [
  220 + Expanded(
  221 + child: SingleChildScrollView(
  222 + child: Column(
  223 + children: [
  224 + InkWell(
  225 + onTap: () {
  226 + setState(() {
  227 + swich = !swich;
  228 + });
  229 + },
  230 + child: Container(
  231 + height: w(48),
  232 + padding: EdgeInsets.symmetric(horizontal: w(16)),
  233 + child: Row(
  234 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  235 + children: [
  236 + Text(
  237 + '取酒需要提供短信验证码',
  238 + style: TextStyle(
  239 + fontSize: font(16),
  240 + color: MyColours.color_515151),
  241 + ),
  242 + Image.asset(
  243 + Utils.getImgPath(swich ? 'swich_on' : 'swich_off'),
  244 + width: w(44),
  245 + )
  246 + ],
  247 + ),
  248 + )),
  249 + _divider(),
  250 + Container(
  251 + height: w(48),
  252 + padding: EdgeInsets.symmetric(horizontal: w(16)),
  253 + child:
  254 + _textfield(context, '存酒超期提醒', '请输入', dayC, dayF, '天')),
  255 + _divider(),
  256 + ],
  257 + )),
  258 + ),
  259 + RoundButton(
  260 + text: '保存',
  261 + height: w(40),
  262 + margin: EdgeInsets.only(
  263 + left: w(45), right: w(45), top: w(13), bottom: w(26)),
  264 + bgColor: MyColours.color_438E93,
  265 + textColor: MyColours.color_F9F9F9,
  266 + isBold: true,
  267 + fontSize: 32,
  268 + radius: r(8),
  269 + onPressed: () async {
  270 + if (dayC.text.trim().length == 0) {
  271 + Utils.showToast('请输入存酒超期提醒天数!');
  272 + return;
  273 + }
  274 + if (!Utils.isInteger(dayC.text.trim())) {
  275 + Utils.showToast('请输入数字!');
  276 + return;
  277 + }
  278 +
  279 + //接口保存
  280 + //
  281 + //调用接口
  282 +
  283 + _setData();
  284 + },
  285 + )
  286 + ],
  287 + ),
  288 + ));
  289 + }
  290 +}
@@ -7,6 +7,7 @@ import 'package:provider/provider.dart'; @@ -7,6 +7,7 @@ import 'package:provider/provider.dart';
7 import '../constant/constant.dart'; 7 import '../constant/constant.dart';
8 import '../constant/error.dart'; 8 import '../constant/error.dart';
9 import '../models/mark_data_model.dart'; 9 import '../models/mark_data_model.dart';
  10 +import '../models/recharge_notice_model.dart';
10 import '../models/tableOuter.dart'; 11 import '../models/tableOuter.dart';
11 import '../net/base_resp.dart'; 12 import '../net/base_resp.dart';
12 import '../net/dio_util.dart'; 13 import '../net/dio_util.dart';
@@ -30,7 +31,10 @@ class MarketingCenterProvider extends ChangeNotifier { @@ -30,7 +31,10 @@ class MarketingCenterProvider extends ChangeNotifier {
30 31
31 PageState pageStateHistory = PageState.Loading; 32 PageState pageStateHistory = PageState.Loading;
32 33
33 - PageState pageStateMessageDetail = PageState.Success; 34 + PageState pageStateMessageDetail = PageState.Loading;
  35 +
  36 + RechargeNoticeSunModel rechargeNoticeSunModel;
  37 +
34 38
35 //获取桌位列表 39 //获取桌位列表
36 getTableList(context, {needLoading = true}) async { 40 getTableList(context, {needLoading = true}) async {
@@ -274,4 +278,36 @@ class MarketingCenterProvider extends ChangeNotifier { @@ -274,4 +278,36 @@ class MarketingCenterProvider extends ChangeNotifier {
274 notifyListeners(); 278 notifyListeners();
275 return false; 279 return false;
276 } 280 }
  281 +
  282 +// 充值成功通知消息获取详情
  283 + Future<bool> getPayMessageByID(BuildContext context, String id,
  284 + {bool showLoading = true}) async {
  285 + Map<String, String> params = {
  286 + "id": id,
  287 + };
  288 + BaseResp<dynamic> baseResp = await DioUtil()
  289 + .request<dynamic>(context, Method.get, HttpUrl.get_pay_message_by_id,
  290 + data: params,
  291 + showLoading:
  292 + pageStateDetail == PageState.Loading ? false : showLoading)
  293 + .catchError((error) {
  294 + pageStateMessageDetail = PageState.ConnectivityError;
  295 + print(error.toString());
  296 + Utils.showToast('获取新充值活动详情失败,请重试');
  297 + notifyListeners();
  298 + return false;
  299 + });
  300 + if (baseResp.code == Constant.status_success) {
  301 + rechargeNoticeSunModel =
  302 + RechargeNoticeModel.fromJson(baseResp.data).data;
  303 + pageStateMessageDetail = PageState.Success;
  304 + notifyListeners();
  305 + return true;
  306 + } else {
  307 + Utils.showToast(baseResp.msg);
  308 + pageStateMessageDetail = PageState.ConnectivityError;
  309 + }
  310 + notifyListeners();
  311 + return false;
  312 + }
277 } 313 }
@@ -171,24 +171,34 @@ class MenuManageProvider extends ChangeNotifier { @@ -171,24 +171,34 @@ class MenuManageProvider extends ChangeNotifier {
171 171
172 // 设置订座商家配置信息 172 // 设置订座商家配置信息
173 Future<bool> setConfing(BuildContext context, Map<String, String> params, 173 Future<bool> setConfing(BuildContext context, Map<String, String> params,
174 - {bool showLoading = true}) async { 174 + {bool showLoading = true, bool needToast = true}) async {
175 BaseResp<dynamic> baseResp = await DioUtil() 175 BaseResp<dynamic> baseResp = await DioUtil()
176 .request<dynamic>(context, Method.get, HttpUrl.set_confing, 176 .request<dynamic>(context, Method.get, HttpUrl.set_confing,
177 data: params, showLoading: showLoading) 177 data: params, showLoading: showLoading)
178 .catchError((error) { 178 .catchError((error) {
179 print(error.toString()); 179 print(error.toString());
180 - Utils.showToast('设置失败,请重试'); 180 + if (needToast) {
  181 + Utils.showToast('设置失败,请重试');
  182 + }
  183 +
181 return false; 184 return false;
182 }); 185 });
183 if (baseResp.code == Constant.status_success) { 186 if (baseResp.code == Constant.status_success) {
184 if (baseResp.data == 0 || baseResp.data == 1) { 187 if (baseResp.data == 0 || baseResp.data == 1) {
185 - Utils.showToast('设置成功'); 188 + if (needToast) {
  189 + Utils.showToast('设置成功');
  190 + }
  191 +
186 return true; 192 return true;
187 } else { 193 } else {
188 - Utils.showToast('设置失败,请重试'); 194 + if (needToast) {
  195 + Utils.showToast('设置失败,请重试');
  196 + }
189 } 197 }
190 } else { 198 } else {
191 - Utils.showToast(baseResp.msg ?? '设置失败,请重试'); 199 + if (needToast) {
  200 + Utils.showToast(baseResp.msg ?? '设置失败,请重试');
  201 + }
192 } 202 }
193 return false; 203 return false;
194 } 204 }
@@ -1699,9 +1699,9 @@ class NavigatorUtil { @@ -1699,9 +1699,9 @@ class NavigatorUtil {
1699 } 1699 }
1700 1700
1701 /// 消息中心---会员充值 1701 /// 消息中心---会员充值
1702 - static void goMessageRechargeInfoPage(BuildContext context, 1702 + static void goMessageRechargeInfoPage(BuildContext context,String idStr,
1703 {replace = false}) { 1703 {replace = false}) {
1704 - _navigateTo(context, "${Routes.message_recharge_info_page}", 1704 + _navigateTo(context, "${Routes.message_recharge_info_page}?idStr=$idStr",
1705 replace: replace); 1705 replace: replace);
1706 } 1706 }
1707 1707
@@ -1724,4 +1724,12 @@ class NavigatorUtil { @@ -1724,4 +1724,12 @@ class NavigatorUtil {
1724 "${Routes.coupon_verification_detail_page}?isExamineSunModel=${FluroConvertUtils.object2string(isExamineSunModel)}&idStr=$idStr", 1724 "${Routes.coupon_verification_detail_page}?isExamineSunModel=${FluroConvertUtils.object2string(isExamineSunModel)}&idStr=$idStr",
1725 replace: replace); 1725 replace: replace);
1726 } 1726 }
  1727 +
  1728 + /// 存酒设置页
  1729 + static Future<dynamic> goWineSettingPage(
  1730 + BuildContext context,
  1731 + {replace = false, }) {
  1732 + return _navigateTo(context, "${Routes.wine_setting_page}",
  1733 + replace: replace);
  1734 + }
1727 } 1735 }
@@ -223,6 +223,7 @@ import '../pages/my/store_wine_manage/out_store_record_page.dart'; @@ -223,6 +223,7 @@ import '../pages/my/store_wine_manage/out_store_record_page.dart';
223 import '../pages/my/store_wine_manage/sms_code_input_page.dart'; 223 import '../pages/my/store_wine_manage/sms_code_input_page.dart';
224 import '../pages/my/store_wine_manage/store_wine_manage_home_page.dart'; 224 import '../pages/my/store_wine_manage/store_wine_manage_home_page.dart';
225 import '../pages/my/store_wine_manage/wine_detail_page.dart'; 225 import '../pages/my/store_wine_manage/wine_detail_page.dart';
  226 +import '../pages/my/store_wine_manage/wine_setting_page.dart';
226 import '../pages/my/table_manage/merge_table_select_page.dart'; 227 import '../pages/my/table_manage/merge_table_select_page.dart';
227 import '../pages/order_advance/customer_detail_page.dart'; 228 import '../pages/order_advance/customer_detail_page.dart';
228 import '../pages/order_advance/order_advance_home_page.dart'; 229 import '../pages/order_advance/order_advance_home_page.dart';
@@ -2505,7 +2506,9 @@ var applyOutStorePageHandle = new Handler( @@ -2505,7 +2506,9 @@ var applyOutStorePageHandle = new Handler(
2505 create: (_) => StoreWineProvider(), 2506 create: (_) => StoreWineProvider(),
2506 child: ChangeNotifierProvider<CustomerProvider>( 2507 child: ChangeNotifierProvider<CustomerProvider>(
2507 create: (_) => CustomerProvider(), 2508 create: (_) => CustomerProvider(),
2508 - child: ApplyOutStorePage(wineManageDetail: wineManageDetail))); 2509 + child: ChangeNotifierProvider<MenuManageProvider>(
  2510 + create: (_) => MenuManageProvider(),
  2511 + child: ApplyOutStorePage(wineManageDetail: wineManageDetail))));
2509 }); 2512 });
2510 2513
2511 ///我的----申请出库短信验证输入 2514 ///我的----申请出库短信验证输入
@@ -2762,12 +2765,12 @@ var rechargeHistoryPageHandle = new Handler( @@ -2762,12 +2765,12 @@ var rechargeHistoryPageHandle = new Handler(
2762 //消息中心---会员充值 2765 //消息中心---会员充值
2763 var messageRechargeInfoPageHandle = new Handler( 2766 var messageRechargeInfoPageHandle = new Handler(
2764 handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { 2767 handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
2765 - // String idstr = params["idstr"].first; 2768 + String idStr = params["idStr"].first;
2766 // NotebookDetail detailEntity = NotebookDetail.fromJson(json 2769 // NotebookDetail detailEntity = NotebookDetail.fromJson(json
2767 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); 2770 // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
2768 return ChangeNotifierProvider<MarketingCenterProvider>( 2771 return ChangeNotifierProvider<MarketingCenterProvider>(
2769 create: (_) => MarketingCenterProvider(), 2772 create: (_) => MarketingCenterProvider(),
2770 - child: MessageRechargeInfoPage()); 2773 + child: MessageRechargeInfoPage(idStr: idStr));
2771 }); 2774 });
2772 2775
2773 //宴会套餐---分享预览 2776 //宴会套餐---分享预览
@@ -2794,3 +2797,16 @@ var couponVerificationDetailPageHandle = new Handler( @@ -2794,3 +2797,16 @@ var couponVerificationDetailPageHandle = new Handler(
2794 2797
2795 return CouponVerificationDetailPage(isExamineSunModel: isExamineSunModel); 2798 return CouponVerificationDetailPage(isExamineSunModel: isExamineSunModel);
2796 }); 2799 });
  2800 +
  2801 +//存酒配置
  2802 +var wineSettingPageHandle = new Handler(
  2803 + handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  2804 + // String idStr = params["idStr"].first;
  2805 + // IsExamineSunModel isExamineSunModel = IsExamineSunModel.fromJson(json.decode(
  2806 + // FluroConvertUtils.fluroCnParamsDecode(
  2807 + // params["isExamineSunModel"].first)));
  2808 + // }
  2809 +
  2810 + return ChangeNotifierProvider<MenuManageProvider>(
  2811 + create: (_) => MenuManageProvider(), child: WineSettingPage());
  2812 +});
@@ -266,8 +266,13 @@ class Routes { @@ -266,8 +266,13 @@ class Routes {
266 /** 266 /**
267 * 优惠券 267 * 优惠券
268 */ 268 */
269 - static String coupon_verification_detail_page = "/coupon_verification_detail_page"; //优惠券核销详情  
270 - 269 + static String coupon_verification_detail_page =
  270 + "/coupon_verification_detail_page"; //优惠券核销详情
  271 +
  272 + /**
  273 + * 存酒设置
  274 + */
  275 + static String wine_setting_page = "/wine_setting_page"; // 存酒设置
271 276
272 static void configureRoutes(FluroRouter router) { 277 static void configureRoutes(FluroRouter router) {
273 router.notFoundHandler = new Handler( 278 router.notFoundHandler = new Handler(
@@ -499,7 +504,9 @@ class Routes { @@ -499,7 +504,9 @@ class Routes {
499 handler: messageRechargeInfoPageHandle); 504 handler: messageRechargeInfoPageHandle);
500 505
501 router.define(feast_dish_share_page, handler: feastDishSharePageHandle); 506 router.define(feast_dish_share_page, handler: feastDishSharePageHandle);
502 - router.define(coupon_verification_detail_page,handler: couponVerificationDetailPageHandle);  
503 - 507 + router.define(coupon_verification_detail_page,
  508 + handler: couponVerificationDetailPageHandle);
  509 +
  510 + router.define(wine_setting_page, handler: wineSettingPageHandle);
504 } 511 }
505 } 512 }