Commit 721745e44fab9b23ac8ba5d33db1958076b3daaf

Authored by wdn127929
1 parent 00e1bab8

新建宴会选择宴会套餐 setmeal list map

... ... @@ -156,7 +156,7 @@ class MarkReserveModel {
room = json['room'];
pnum = json['pnum'];
address = json['address'];
address = json['address'] == 'null' ? '' : json['address'];
sellerPhone = json['seller_phone'];
managerImage = json['manager_image'];
... ...
... ... @@ -187,20 +187,27 @@ class Setmeal {
// cooklist.add(new Cooklist.fromJson(v));
// });
// }
if (json['cooklist'] != null && json['cooklist'].length > 0) {
if (json['cooklist'] is List) {
cooklist = <Cooklist>[];
dataMenu = {};
Map map = json['cooklist'];
map.forEach((key, v) {
List<Cook> cooktemp = [];
v.forEach((v1) {
cooklist.add(new Cooklist.fromJson(v1));
cooktemp.add(new Cook.fromJson(v1));
});
dataMenu[key] = cooktemp;
json['cooklist'].forEach((v) {
cooklist.add(new Cooklist.fromJson(v));
});
print(dataMenu);
} else {
if (json['cooklist'] != null && json['cooklist'].length > 0) {
cooklist = <Cooklist>[];
dataMenu = {};
Map map = json['cooklist'];
map.forEach((key, v) {
List<Cook> cooktemp = [];
v.forEach((v1) {
cooklist.add(new Cooklist.fromJson(v1));
cooktemp.add(new Cook.fromJson(v1));
});
dataMenu[key] = cooktemp;
});
print(dataMenu);
}
}
// finalPriceC = json['finalPriceC'];
... ...
... ... @@ -63,6 +63,7 @@ class _FeastDishPageState extends State<FeastDishPage> {
bool success = await feastModel.setSetmealCook(context, params);
if (success) {
Utils.showToast(cookid == null ? '添加成功' : '修改成功');
bus.emit('feast_setmeal_list');
_getSetmealClassById();
}
}
... ... @@ -216,8 +217,7 @@ class _FeastDishPageState extends State<FeastDishPage> {
TextEditingController editingController,
FocusNode focusNode,
String subTitle,
{TextInputType inputType =
TextInputType.text}) {
{TextInputType inputType = TextInputType.text}) {
return Container(
height: w(48),
margin: EdgeInsets.only(top: w(12)),
... ...
... ... @@ -314,7 +314,7 @@ class _FeastDishSharePageState extends State<FeastDishSharePage> {
),
VEmptyView(10),
Text(
'餐厅地址 | ${sellerAdr}',
'餐厅地址 | ${sellerAdr ?? ''}',
style: TextStyle(
fontSize: font(14),
color: Colors.transparent),
... ... @@ -368,7 +368,7 @@ class _FeastDishSharePageState extends State<FeastDishSharePage> {
),
VEmptyView(10),
Text(
'餐厅地址 | ${sellerAdr}',
'餐厅地址 | ${sellerAdr ?? ''}',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_CFB53B),
... ...
... ... @@ -566,7 +566,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
fontWeight: FontWeight.bold,
fontSize: font(14))),
VEmptyView(10),
Text('${address}',
Text('${address??''}',
style: TextStyle(
height: 1.3,
color: MyColours.color_000000,
... ...
... ... @@ -472,7 +472,7 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
VEmptyView(10),
Padding(
padding: EdgeInsets.only(left: w(8)),
child: Text('${reserveModel.address}',
child: Text('${reserveModel.address??''}',
style: TextStyle(
height: 1.3,
color: MyColours.color_000000,
... ...