Commit a22e89ae0037b736d77a952bba08e5d0b6aca782

Authored by wdn127929
1 parent 2286d476

排菜编辑数据

@@ -102,37 +102,39 @@ class MenuSunModel { @@ -102,37 +102,39 @@ class MenuSunModel {
102 List<MenuModel> cookList; 102 List<MenuModel> cookList;
103 103
104 int amount; //菜品数量 104 int amount; //菜品数量
  105 + TextEditingController amountC = TextEditingController();
105 106
106 - MenuSunModel({  
107 - this.id,  
108 - this.sellerid,  
109 - this.mid,  
110 - this.cid,  
111 - this.lid,  
112 - this.unit,  
113 - this.name,  
114 - this.price,  
115 - this.member_price,  
116 - this.first_name,  
117 - this.search_code,  
118 - this.channel,  
119 - this.dishesvideo,  
120 - this.dishesgif,  
121 - this.status,  
122 - this.setup,  
123 - this.give,  
124 - this.clear_num,  
125 - this.record_num,  
126 - this.image,  
127 - this.is_weigh,  
128 - this.desc,  
129 - this.order_o,  
130 - this.cdate,  
131 - this.spec,  
132 - this.isSpec,  
133 - this.practice,  
134 - this.amount = 0,  
135 - }); 107 + MenuSunModel(
  108 + {this.id,
  109 + this.sellerid,
  110 + this.mid,
  111 + this.cid,
  112 + this.lid,
  113 + this.unit,
  114 + this.name,
  115 + this.price,
  116 + this.member_price,
  117 + this.first_name,
  118 + this.search_code,
  119 + this.channel,
  120 + this.dishesvideo,
  121 + this.dishesgif,
  122 + this.status,
  123 + this.setup,
  124 + this.give,
  125 + this.clear_num,
  126 + this.record_num,
  127 + this.image,
  128 + this.is_weigh,
  129 + this.desc,
  130 + this.order_o,
  131 + this.cdate,
  132 + this.spec,
  133 + this.isSpec,
  134 + this.practice,
  135 + this.amount = 0,
  136 + this.cookList,
  137 + this.amountC});
136 138
137 MenuSunModel.fromJson(Map<String, dynamic> json) { 139 MenuSunModel.fromJson(Map<String, dynamic> json) {
138 id = json['id']; 140 id = json['id'];
@@ -162,6 +164,13 @@ class MenuSunModel { @@ -162,6 +164,13 @@ class MenuSunModel {
162 isSpec = json['isSpec']; 164 isSpec = json['isSpec'];
163 practice = json['practice']; 165 practice = json['practice'];
164 amount = 0; 166 amount = 0;
  167 + amountC.text = '0';
  168 + if (json['cookList'] != null) {
  169 + cookList = [];
  170 + json['cookList'].forEach((v) {
  171 + cookList.add(new MenuModel.fromJson2(v));
  172 + });
  173 + }
165 } 174 }
166 175
167 MenuSunModel.fromJson2(Map<String, dynamic> json) { 176 MenuSunModel.fromJson2(Map<String, dynamic> json) {
@@ -192,6 +201,13 @@ class MenuSunModel { @@ -192,6 +201,13 @@ class MenuSunModel {
192 isSpec = json['isSpec']; 201 isSpec = json['isSpec'];
193 practice = json['practice']; 202 practice = json['practice'];
194 amount = json['amount'] ?? 0; 203 amount = json['amount'] ?? 0;
  204 + amountC.text = amount.toString();
  205 + if (json['cookList'] != null) {
  206 + cookList = [];
  207 + json['cookList'].forEach((v) {
  208 + cookList.add(new MenuModel.fromJson2(v));
  209 + });
  210 + }
195 } 211 }
196 212
197 Map<String, dynamic> toJson() { 213 Map<String, dynamic> toJson() {
@@ -224,6 +240,7 @@ class MenuSunModel { @@ -224,6 +240,7 @@ class MenuSunModel {
224 data['isSpec'] = this.isSpec; 240 data['isSpec'] = this.isSpec;
225 data['practice'] = this.practice; 241 data['practice'] = this.practice;
226 data['amount'] = this.amount; 242 data['amount'] = this.amount;
  243 + data['cookList'] = this.cookList;
227 return data; 244 return data;
228 } 245 }
229 } 246 }
@@ -812,11 +812,16 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { @@ -812,11 +812,16 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
812 borderColor: MyColours.color_438E93, 812 borderColor: MyColours.color_438E93,
813 textColor: MyColours.color_438E93, 813 textColor: MyColours.color_438E93,
814 onPressed: () { 814 onPressed: () {
815 - _planDishProvider.menuModel.forEach((element) {  
816 - _planDishProvider.menuModelForManager  
817 - .forEach((value) {});  
818 - });  
819 - NavigatorUtil.goOrderEditListShowPage(context); 815 + // _planDishProvider.menuModel.forEach((element) {
  816 + // _planDishProvider.menuModelForManager
  817 + // .forEach((value) {});
  818 + // });
  819 +
  820 + NavigatorUtil.goOrderEditListShowPage(context,
  821 + object: {
  822 + 'object':
  823 + _planDishProvider.menuModelForManager
  824 + });
820 }, 825 },
821 ), 826 ),
822 RoundButton( 827 RoundButton(
@@ -8,10 +8,13 @@ import '../../../widgets/MyDivider.dart'; @@ -8,10 +8,13 @@ import '../../../widgets/MyDivider.dart';
8 import '../../../widgets/h_empty_view.dart'; 8 import '../../../widgets/h_empty_view.dart';
9 import '../../../widgets/round_button.dart'; 9 import '../../../widgets/round_button.dart';
10 import '../../../widgets/v_empty_view.dart'; 10 import '../../../widgets/v_empty_view.dart';
  11 +import '../../models/cookbook_model.dart';
  12 +import '../../provider/plan_dish_provider.dart';
11 import '../../route/navigator_util.dart'; 13 import '../../route/navigator_util.dart';
12 14
13 class OrderEditListShowPage extends StatefulWidget { 15 class OrderEditListShowPage extends StatefulWidget {
14 - OrderEditListShowPage({Key key}) : super(key: key); 16 + final List<MenuModel> data;
  17 + OrderEditListShowPage({Key key, this.data}) : super(key: key);
15 18
16 @override 19 @override
17 _OrderEditListShowPageState createState() => _OrderEditListShowPageState(); 20 _OrderEditListShowPageState createState() => _OrderEditListShowPageState();
@@ -19,6 +22,9 @@ class OrderEditListShowPage extends StatefulWidget { @@ -19,6 +22,9 @@ class OrderEditListShowPage extends StatefulWidget {
19 22
20 class _OrderEditListShowPageState extends State<OrderEditListShowPage> { 23 class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
21 ScrollController controller = ScrollController(); 24 ScrollController controller = ScrollController();
  25 + List<MenuSunModel> dataLocalShowMore = []; //二级菜单
  26 + List<MenuModel> dataLocalShowOne = []; //一级菜单
  27 +
22 Widget _laduWidget() { 28 Widget _laduWidget() {
23 // if (labelIcon[widget 29 // if (labelIcon[widget
24 // .cookBookList.labelList[index].icon] is int) { 30 // .cookBookList.labelList[index].icon] is int) {
@@ -42,6 +48,62 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -42,6 +48,62 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
42 } 48 }
43 49
44 @override 50 @override
  51 + void initState() {
  52 + super.initState();
  53 + dataLocalShowMore = []; //二级菜单
  54 + dataLocalShowOne = []; //一级菜单
  55 +
  56 + if (widget.data != null) {
  57 + widget.data.forEach((element) {
  58 + if (element.className == '套餐' || element.className == '我的排菜') {
  59 + //如果是套餐,则看cooklist有没有选中的
  60 + element.cookbooklist.forEach((value) {
  61 + if (value.amount > 0) {
  62 + dataLocalShowMore.add(value);
  63 + }
  64 + });
  65 + } else if (element.className == '店内常点') {
  66 + // //如果是我的排菜,则看cooklist有没有选中的
  67 +
  68 + // bool hasmMine =
  69 + // element.cookbooklist.any(((value) => value.amount > 0));
  70 + // if (hasmMine) {
  71 + // //套餐中有被选中
  72 + // maxIndex++;
  73 + // }
  74 + } else if (element.className == '临时加菜') {
  75 + } else {
  76 + //单菜
  77 + bool hasmMenu =
  78 + element.cookbooklist.any(((value) => value.amount > 0));
  79 + if (hasmMenu) {
  80 + //单品此类有选中菜品
  81 + MenuModel menuModel = MenuModel();
  82 + menuModel.className = element.className;
  83 + menuModel.classLabel = element.classLabel;
  84 + menuModel.classType = element.classType;
  85 + menuModel.id = element.id;
  86 + menuModel.order = element.order;
  87 + menuModel.sellerid = element.sellerid;
  88 + menuModel.status = element.status;
  89 + menuModel.cookbooklist = [];
  90 + List<MenuSunModel> cookbooklist = [];
  91 + element.cookbooklist.forEach((value) {
  92 + if (value.amount > 0) {
  93 + cookbooklist.add(value);
  94 + }
  95 + });
  96 + menuModel.cookbooklist.addAll(cookbooklist);
  97 + dataLocalShowOne.add(menuModel);
  98 + }
  99 + }
  100 + });
  101 + }
  102 + print(dataLocalShowMore);
  103 + print(dataLocalShowOne);
  104 + }
  105 +
  106 + @override
45 Widget build(BuildContext context) { 107 Widget build(BuildContext context) {
46 return Scaffold( 108 return Scaffold(
47 appBar: SystemAppBar('排菜单'), 109 appBar: SystemAppBar('排菜单'),
@@ -121,12 +183,282 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -121,12 +183,282 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
121 ], 183 ],
122 )), 184 )),
123 ListView.builder( 185 ListView.builder(
124 - itemCount: 20, 186 + controller: controller,
  187 + itemCount: dataLocalShowMore.length,
  188 + shrinkWrap: true,
  189 + itemBuilder: (context, index) {
  190 + MenuSunModel menuSunModel =
  191 + dataLocalShowMore[index];
  192 + return ListView.builder(
  193 + itemCount: 2,
  194 + controller: controller,
  195 + shrinkWrap: true,
  196 + itemBuilder: (context, index) {
  197 + if (index == 0) {
  198 + return Column(
  199 + children: [
  200 + //头
  201 + Container(
  202 + width: double.infinity,
  203 + // width: w(32),
  204 + height: w(48),
  205 + padding: EdgeInsets.symmetric(
  206 + horizontal: w(10)),
  207 + decoration: BoxDecoration(
  208 + border: Border(
  209 + bottom: BorderSide(
  210 + width: w(1),
  211 + color: MyColours
  212 + .color_DBDBDB))),
  213 + // constraints: BoxConstraints(minWidth: w(20)),
  214 + child: Row(
  215 + mainAxisAlignment:
  216 + MainAxisAlignment
  217 + .spaceBetween,
  218 + children: [
  219 + Text(
  220 + menuSunModel.name,
  221 + style: TextStyle(
  222 + fontSize: font(16),
  223 + color: MyColours
  224 + .color_515151,
  225 + fontWeight:
  226 + FontWeight.bold),
  227 + ),
  228 + Text(
  229 + '6道',
  230 + style: TextStyle(
  231 + fontSize: font(14),
  232 + color:
  233 + MyColours.color_515151,
  234 + ),
  235 + ),
  236 + ],
  237 + ))
  238 + ],
  239 + );
  240 + }
  241 +
  242 + return ListView.builder(
  243 + itemCount: menuSunModel.cookList.length,
  244 + shrinkWrap: true,
  245 + controller: controller,
  246 + itemBuilder: (context, index) {
  247 + MenuModel menuModel =
  248 + menuSunModel.cookList[index];
  249 + return ListView.builder(
  250 + itemCount:
  251 + menuModel.cookbooklist.length +
  252 + 1,
  253 + shrinkWrap: true,
  254 + controller: controller,
  255 + itemBuilder: (context, index) {
  256 + if (index == 0) {
  257 + return Column(
  258 + children: [
  259 + //头
  260 + Container(
  261 + width: double.infinity,
  262 + // width: w(32),
  263 + height: w(48),
  264 + padding: EdgeInsets
  265 + .symmetric(
  266 + horizontal:
  267 + w(10)),
  268 + decoration: BoxDecoration(
  269 + border: Border(
  270 + bottom: BorderSide(
  271 + width: w(1),
  272 + color: MyColours
  273 + .color_DBDBDB))),
  274 + // constraints: BoxConstraints(minWidth: w(20)),
  275 + child: Row(
  276 + mainAxisAlignment:
  277 + MainAxisAlignment
  278 + .spaceBetween,
  279 + children: [
  280 + Text(
  281 + menuModel
  282 + .className,
  283 + style: TextStyle(
  284 + fontSize:
  285 + font(16),
  286 + color: MyColours
  287 + .color_515151,
  288 + fontWeight:
  289 + FontWeight
  290 + .bold),
  291 + ),
  292 + Text(
  293 + '6道',
  294 + style: TextStyle(
  295 + fontSize:
  296 + font(14),
  297 + color: MyColours
  298 + .color_515151,
  299 + ),
  300 + ),
  301 + ],
  302 + ))
  303 + ],
  304 + );
  305 + }
  306 + int indexReal = index - 1;
  307 + MenuSunModel menuSunModel =
  308 + menuModel
  309 + .cookbooklist[indexReal];
  310 + return Container(
  311 + padding: EdgeInsets.symmetric(
  312 + horizontal: w(20),
  313 + vertical: w(13)),
  314 + decoration: BoxDecoration(
  315 + border: Border(
  316 + bottom: BorderSide(
  317 + width: w(1),
  318 + color: MyColours
  319 + .color_DBDBDB))),
  320 + child: Row(
  321 + children: [
  322 + Container(
  323 + constraints:
  324 + BoxConstraints(
  325 + maxWidth:
  326 + w(80)),
  327 + child: Text(
  328 + menuSunModel.name,
  329 + maxLines: 10,
  330 + overflow: TextOverflow
  331 + .ellipsis,
  332 + style: TextStyle(
  333 + fontSize:
  334 + font(14),
  335 + color: MyColours
  336 + .color_515151),
  337 + )),
  338 + // HEmptyView(8),
  339 + // _laduWidget(),
  340 + Spacer(),
  341 + Text(
  342 + '${menuSunModel.price}元/${menuSunModel.unit}',
  343 + maxLines: 2,
  344 + overflow:
  345 + TextOverflow.ellipsis,
  346 + style: TextStyle(
  347 + fontSize: font(12),
  348 + color: MyColours
  349 + .color_999999),
  350 + ),
  351 + HEmptyView(28),
  352 + Text(
  353 + '${menuSunModel.member_price}元/${menuSunModel.unit}',
  354 + maxLines: 2,
  355 + overflow:
  356 + TextOverflow.ellipsis,
  357 + style: TextStyle(
  358 + fontSize: font(10),
  359 + color: MyColours
  360 + .color_8EBBBE),
  361 + ),
  362 + HEmptyView(20),
  363 + Image.asset(
  364 + Utils.getImgPath(
  365 + 'plan_dish_minus'),
  366 + width: w(16),
  367 + ),
  368 + HEmptyView(8),
  369 + Container(
  370 + width: w(32),
  371 + height: w(16),
  372 + decoration: BoxDecoration(
  373 + borderRadius:
  374 + BorderRadius
  375 + .circular(
  376 + r(5)),
  377 + border: Border.all(
  378 + width: w(1),
  379 + color: MyColours
  380 + .color_999999)),
  381 + // constraints: BoxConstraints(minWidth: w(20)),
  382 + child: TextField(
  383 + maxLines: 1,
  384 + controller:
  385 + menuSunModel
  386 + .amountC,
  387 + // focusNode: _focusNode,
  388 + // autofocus: true,
  389 +
  390 + style: TextStyle(
  391 + color: MyColours
  392 + .color_438E93,
  393 + fontSize:
  394 + font(12)),
  395 + textAlign:
  396 + TextAlign.center,
  397 + // textAlignVertical: TextAlignVertical.center,
  398 + decoration:
  399 + InputDecoration(
  400 + hintText: "数量",
  401 + hintStyle:
  402 + TextStyle(
  403 + color: MyColours
  404 + .color_999999,
  405 + fontSize:
  406 + font(12),
  407 + ),
  408 + // isCollapsed:
  409 + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
  410 + border: OutlineInputBorder(
  411 + borderSide:
  412 + BorderSide
  413 + .none),
  414 + contentPadding:
  415 + EdgeInsets.zero,
  416 + ),
  417 + keyboardType:
  418 + TextInputType
  419 + .number,
  420 + textInputAction:
  421 + TextInputAction
  422 + .done,
  423 +
  424 + onChanged: (value) {
  425 + // setState(() {});
  426 + // _searchSellerLocation();
  427 + // customerProvider.searchData(value);
  428 + },
  429 + onEditingComplete:
  430 + () {
  431 + FocusScope.of(
  432 + context)
  433 + .requestFocus(
  434 + FocusNode()); //点击空白处隐藏键盘
  435 + // contantShowModel.searchData(
  436 + // contantShowModel.controller.text);
  437 + // _searchSellerLocation();
  438 + // _focusNode.unfocus();
  439 + },
  440 + )),
  441 + HEmptyView(8),
  442 + Image.asset(
  443 + Utils.getImgPath(
  444 + 'plan_dish_add'),
  445 + width: w(16),
  446 + ),
  447 + ],
  448 + ),
  449 + );
  450 + });
  451 + });
  452 + });
  453 + }),
  454 + ListView.builder(
  455 + itemCount: dataLocalShowOne.length,
125 shrinkWrap: true, 456 shrinkWrap: true,
126 controller: controller, 457 controller: controller,
127 itemBuilder: (context, index) { 458 itemBuilder: (context, index) {
  459 + MenuModel menuModel = dataLocalShowOne[index];
128 return ListView.builder( 460 return ListView.builder(
129 - itemCount: 2 + 1, 461 + itemCount: menuModel.cookbooklist.length + 1,
130 shrinkWrap: true, 462 shrinkWrap: true,
131 controller: controller, 463 controller: controller,
132 itemBuilder: (context, index) { 464 itemBuilder: (context, index) {
@@ -153,7 +485,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -153,7 +485,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
153 .spaceBetween, 485 .spaceBetween,
154 children: [ 486 children: [
155 Text( 487 Text(
156 - '热菜', 488 + menuModel.className,
157 style: TextStyle( 489 style: TextStyle(
158 fontSize: font(16), 490 fontSize: font(16),
159 color: MyColours 491 color: MyColours
@@ -175,6 +507,8 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -175,6 +507,8 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
175 ); 507 );
176 } 508 }
177 int indexReal = index - 1; 509 int indexReal = index - 1;
  510 + MenuSunModel menuSunModel =
  511 + menuModel.cookbooklist[indexReal];
178 return Container( 512 return Container(
179 padding: EdgeInsets.symmetric( 513 padding: EdgeInsets.symmetric(
180 horizontal: w(20), vertical: w(13)), 514 horizontal: w(20), vertical: w(13)),
@@ -190,7 +524,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -190,7 +524,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
190 constraints: 524 constraints:
191 BoxConstraints(maxWidth: w(80)), 525 BoxConstraints(maxWidth: w(80)),
192 child: Text( 526 child: Text(
193 - '山城辣子鸡', 527 + menuSunModel.name,
194 maxLines: 10, 528 maxLines: 10,
195 overflow: TextOverflow.ellipsis, 529 overflow: TextOverflow.ellipsis,
196 style: TextStyle( 530 style: TextStyle(
@@ -198,11 +532,11 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -198,11 +532,11 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
198 color: 532 color:
199 MyColours.color_515151), 533 MyColours.color_515151),
200 )), 534 )),
201 - HEmptyView(8),  
202 - _laduWidget(), 535 + // HEmptyView(8),
  536 + // _laduWidget(),
203 Spacer(), 537 Spacer(),
204 Text( 538 Text(
205 - '38元/份', 539 + '${menuSunModel.price}元/${menuSunModel.unit}',
206 maxLines: 2, 540 maxLines: 2,
207 overflow: TextOverflow.ellipsis, 541 overflow: TextOverflow.ellipsis,
208 style: TextStyle( 542 style: TextStyle(
@@ -211,7 +545,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -211,7 +545,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
211 ), 545 ),
212 HEmptyView(28), 546 HEmptyView(28),
213 Text( 547 Text(
214 - '38元/份', 548 + '${menuSunModel.member_price}元/${menuSunModel.unit}',
215 maxLines: 2, 549 maxLines: 2,
216 overflow: TextOverflow.ellipsis, 550 overflow: TextOverflow.ellipsis,
217 style: TextStyle( 551 style: TextStyle(
@@ -237,7 +571,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> { @@ -237,7 +571,7 @@ class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
237 // constraints: BoxConstraints(minWidth: w(20)), 571 // constraints: BoxConstraints(minWidth: w(20)),
238 child: TextField( 572 child: TextField(
239 maxLines: 1, 573 maxLines: 1,
240 - // controller: 574 + controller: menuSunModel.amountC,
241 // focusNode: _focusNode, 575 // focusNode: _focusNode,
242 // autofocus: true, 576 // autofocus: true,
243 577
@@ -1265,19 +1265,17 @@ class NavigatorUtil { @@ -1265,19 +1265,17 @@ class NavigatorUtil {
1265 1265
1266 ///经理排菜-编辑列表展示 1266 ///经理排菜-编辑列表展示
1267 1267
1268 - static Future<dynamic> goOrderEditListShowPage(  
1269 - BuildContext context, {  
1270 - replace = false,  
1271 - }) { 1268 + static Future<dynamic> goOrderEditListShowPage(BuildContext context,
  1269 + {replace = false, Map object}) {
1272 // if (invoice != null) { 1270 // if (invoice != null) {
1273 // return _navigateTo(context, 1271 // return _navigateTo(context,
1274 // "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}", 1272 // "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}",
1275 // replace: replace); 1273 // replace: replace);
1276 // } 1274 // }
1277 - // if (object != null) {  
1278 - // return _navigateTo(context,  
1279 - // "${Routes.order_advance_home_page}?tids=$tids&tableidNow=$tableidNow&fromPage=$fromPage&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");  
1280 - // } 1275 + if (object != null) {
  1276 + return _navigateTo(context,
  1277 + "${Routes.order_edit_list_show_page}?object=${FluroConvertUtils.object2string(object)}");
  1278 + }
1281 return _navigateTo(context, "${Routes.order_edit_list_show_page}", 1279 return _navigateTo(context, "${Routes.order_edit_list_show_page}",
1282 replace: replace); 1280 replace: replace);
1283 } 1281 }
@@ -2007,8 +2007,24 @@ var orderEditListShowPageHandle = new Handler( @@ -2007,8 +2007,24 @@ var orderEditListShowPageHandle = new Handler(
2007 // res.add(TableList.fromJson(item)); 2007 // res.add(TableList.fromJson(item));
2008 // } 2008 // }
2009 // } 2009 // }
2010 - return ChangeNotifierProvider<PlanDishProvider>(  
2011 - create: (_) => PlanDishProvider(), child: OrderEditListShowPage()); 2010 +
  2011 + List<MenuModel> res = [];
  2012 + // String planDishPrice = '';
  2013 + if (params.keys.contains('object')) {
  2014 + Map object = FluroConvertUtils.string2map(params["object"].first);
  2015 + List temp = object['object'];
  2016 +
  2017 + // planDishPrice = params["planDishPrice"].first;
  2018 +
  2019 + for (var item in temp) {
  2020 + // MenuModel menuModel = MenuModel.fromJson2(item);
  2021 + // res.add(menuModel);
  2022 + // print(res);
  2023 + res.add(MenuModel.fromJson2(item));
  2024 + }
  2025 + }
  2026 +
  2027 + return OrderEditListShowPage(data: res);
2012 }); 2028 });
2013 2029
2014 ///经理排菜--类型选择 2030 ///经理排菜--类型选择