|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
|
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
...
|
...
|
@@ -137,6 +139,21 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
_handleData();
|
|
|
|
}
|
|
|
|
|
|
|
|
///修改菜品样式
|
|
|
|
_setCookbookById(String mid, Map cookStyle) async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
"id": mid,
|
|
|
|
'cook_style': json.encode(cookStyle)
|
|
|
|
};
|
|
|
|
print(params);
|
|
|
|
bool sucess = await menuManageProvider.setCookbookById(context, params,
|
|
|
|
showLoading: true);
|
|
|
|
if (sucess) {
|
|
|
|
Utils.showToast('修改成功!');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///处理数据
|
|
|
|
_handleData({isMove = false}) {
|
|
|
|
if (menuManageProvider.menuModel != null) {
|
|
...
|
...
|
@@ -220,40 +237,112 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
Text(
|
|
|
|
model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: model.taste != null && model.taste != ''
|
|
|
|
? '味型:${model.taste}'
|
|
|
|
: model.cooks != null && model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
])),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text('味型:咸鲜 烹调:熬煮',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
])),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
model.price == null
|
|
|
|
? Column(children: _priceWidget(model))
|
|
|
|
: Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Widget> _priceWidget(MenuSunModel model) {
|
|
|
|
List<SpecModel> tempPrice = [];
|
|
|
|
if (model.price == null) {
|
|
|
|
//新添加菜品
|
|
|
|
model.spec.forEach((element) {
|
|
|
|
if (element.status == '1') {
|
|
|
|
//规格启用状态
|
|
|
|
tempPrice.add(element);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
List<Widget> textWidgetList = [];
|
|
|
|
tempPrice.forEach((element) {
|
|
|
|
textWidgetList.add(
|
|
|
|
Text(
|
|
|
|
'¥${element.price}/${element.specs} 会员 ¥${element.memberPrice ?? ''}/${element.specs} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
return textWidgetList;
|
|
|
|
}
|
|
|
|
|
|
|
|
//右边
|
|
|
|
Widget _topRight(MenuSunModel model) {
|
|
|
|
return Container(
|
|
...
|
...
|
@@ -274,36 +363,59 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
Text(
|
|
|
|
model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: model.taste != null && model.taste != ''
|
|
|
|
? '味型:${model.taste}'
|
|
|
|
: model.cooks != null && model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
])),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text('味型:咸鲜 烹调:熬煮',
|
|
|
|
style:
|
|
|
|
TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
])),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
model.price == null
|
|
|
|
? Column(children: _priceWidget(model))
|
|
|
|
: Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.member_price ?? ''}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
...
|
...
|
@@ -334,38 +446,76 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text('味型:咸鲜 烹调:熬煮',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]))
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
Text(
|
|
|
|
model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: model.taste != null && model.taste != ''
|
|
|
|
? '味型:${model.taste}'
|
|
|
|
: model.cooks != null && model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
model.price == null
|
|
|
|
? Column(children: _priceWidget(model))
|
|
|
|
: Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
...
|
...
|
@@ -394,41 +544,64 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
)),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
VEmptyView(20),
|
|
|
|
if ((model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != '') ||
|
|
|
|
(model.taste != null && model.taste != '') ||
|
|
|
|
(model.cooks != null && model.cooks != ''))
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
child: Text(
|
|
|
|
model.taste != null &&
|
|
|
|
model.taste != '' &&
|
|
|
|
model.cooks != null &&
|
|
|
|
model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: model.taste != null && model.taste != ''
|
|
|
|
? '味型:${model.taste}'
|
|
|
|
: model.cooks != null && model.cooks != ''
|
|
|
|
? '味型:${model.taste} 烹调:${model.cooks}'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
)),
|
|
|
|
VEmptyView(20),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'味型:咸鲜 烹调:熬煮',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
)),
|
|
|
|
VEmptyView(20),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
)),
|
|
|
|
child: model.price == null
|
|
|
|
? Column(children: _priceWidget(model))
|
|
|
|
: Text(
|
|
|
|
'¥${model.price}/${model.unit} 会员 ¥${model.member_price}/${model.unit} ',
|
|
|
|
textAlign: TextAlign.right,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
shadows: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_FBF6F1,
|
|
|
|
offset: Offset(0, 1),
|
|
|
|
blurRadius: w(2),
|
|
|
|
spreadRadius: w(20))
|
|
|
|
]),
|
|
|
|
)),
|
|
|
|
VEmptyView(30),
|
|
|
|
if (model.image != null)
|
|
|
|
CachedNetworkImage(
|
|
...
|
...
|
@@ -437,11 +610,11 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
width: ScreenUtil().screenWidth / 2,
|
|
|
|
height: w(125),
|
|
|
|
),
|
|
|
|
if (true)
|
|
|
|
if (model.desc != null && model.desc != '')
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'江南传统名菜,口味咸鲜,汤白汁浓,肉质酥肥,笋清香脆嫩,鲜味浓厚。',
|
|
|
|
model.desc ?? "",
|
|
|
|
style: TextStyle(
|
|
|
|
color: themeColerModel.name == '珍珠白'
|
|
|
|
? MyColours.color_515151
|
|
...
|
...
|
@@ -509,6 +682,13 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
} else {
|
|
|
|
_handleData();
|
|
|
|
}
|
|
|
|
|
|
|
|
Map cookStyle = {
|
|
|
|
'name_type': object['name_type'],
|
|
|
|
'image_type': '',
|
|
|
|
'sort': ''
|
|
|
|
};
|
|
|
|
_setCookbookById(model.id, cookStyle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -580,57 +760,59 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(23)),
|
|
|
|
// height: w(80),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goMenuCategoryPage(
|
|
|
|
context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类管理',
|
|
|
|
fontSize: 32,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
isBold: true,
|
|
|
|
height: w(43),
|
|
|
|
width: w(100),
|
|
|
|
radius: r(5),
|
|
|
|
)),
|
|
|
|
!isShow
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
await NavigatorUtil.goMenuAddDishesPage(
|
|
|
|
context);
|
|
|
|
},
|
|
|
|
text: '添加菜品',
|
|
|
|
fontSize: 32,
|
|
|
|
isBold: true,
|
|
|
|
width: w(218),
|
|
|
|
height: w(43),
|
|
|
|
radius: r(5),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
if (model.pageState == PageState.Empty ||
|
|
|
|
model.pageState == PageState.Success)
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(23)),
|
|
|
|
// height: w(80),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goMenuCategoryPage(
|
|
|
|
context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类管理',
|
|
|
|
fontSize: 32,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
isBold: true,
|
|
|
|
height: w(43),
|
|
|
|
width: w(100),
|
|
|
|
radius: r(5),
|
|
|
|
)),
|
|
|
|
!isShow
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
await NavigatorUtil.goMenuAddDishesPage(
|
|
|
|
context);
|
|
|
|
},
|
|
|
|
text: '添加菜品',
|
|
|
|
fontSize: 32,
|
|
|
|
isBold: true,
|
|
|
|
width: w(218),
|
|
|
|
height: w(43),
|
|
|
|
radius: r(5),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]);
|
|
|
|
} else {
|
|
|
|
// double cellWidth = (MediaQuery.of(context).size.width -
|
|
...
|
...
|
@@ -811,7 +993,8 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
width: double.infinity,
|
|
|
|
height: w(250),
|
|
|
|
),
|
|
|
|
if (true)
|
|
|
|
if (model.desc != null &&
|
|
|
|
model.desc != '')
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets
|
|
|
|
.symmetric(
|
|
...
|
...
|
@@ -820,7 +1003,7 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
vertical:
|
|
|
|
w(10)),
|
|
|
|
child: Text(
|
|
|
|
'江南传统名菜,口味咸鲜,汤白汁浓,肉质酥肥,笋清香脆嫩,鲜味浓厚。',
|
|
|
|
model.desc,
|
|
|
|
style: TextStyle(
|
|
|
|
color: themeColerModel1
|
|
|
|
.name ==
|
|
...
|
...
|
@@ -973,58 +1156,60 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
],
|
|
|
|
);
|
|
|
|
})),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(23)),
|
|
|
|
// height: w(80),
|
|
|
|
color: MyColours.color_FAFAFA,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goMenuCategoryPage(
|
|
|
|
context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类管理',
|
|
|
|
fontSize: 32,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
isBold: true,
|
|
|
|
height: w(43),
|
|
|
|
width: w(100),
|
|
|
|
radius: r(5),
|
|
|
|
)),
|
|
|
|
!isShow
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
await NavigatorUtil.goMenuAddDishesPage(
|
|
|
|
context);
|
|
|
|
},
|
|
|
|
text: '添加菜品',
|
|
|
|
fontSize: 32,
|
|
|
|
isBold: true,
|
|
|
|
width: w(218),
|
|
|
|
height: w(43),
|
|
|
|
radius: r(5),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
if (model.pageState == PageState.Success ||
|
|
|
|
model.pageState == PageState.Empty)
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(23)),
|
|
|
|
// height: w(80),
|
|
|
|
color: MyColours.color_FAFAFA,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goMenuCategoryPage(
|
|
|
|
context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类管理',
|
|
|
|
fontSize: 32,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
isBold: true,
|
|
|
|
height: w(43),
|
|
|
|
width: w(100),
|
|
|
|
radius: r(5),
|
|
|
|
)),
|
|
|
|
!isShow
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(12), bottom: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
await NavigatorUtil.goMenuAddDishesPage(
|
|
|
|
context);
|
|
|
|
},
|
|
|
|
text: '添加菜品',
|
|
|
|
fontSize: 32,
|
|
|
|
isBold: true,
|
|
|
|
width: w(218),
|
|
|
|
height: w(43),
|
|
|
|
radius: r(5),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
},
|
...
|
...
|
|