Commit 62bf481a78f15758cc68430d81196320991e6adb

Authored by wdn127929
1 parent a22e89ae

排菜页面数据编辑

@@ -11,6 +11,7 @@ class MenuModel { @@ -11,6 +11,7 @@ class MenuModel {
11 String status; 11 String status;
12 String classType; 12 String classType;
13 List<MenuSunModel> cookbooklist; 13 List<MenuSunModel> cookbooklist;
  14 + int allSum; //总共选中菜数量
14 15
15 MenuModel( 16 MenuModel(
16 {this.id, 17 {this.id,
@@ -102,7 +103,9 @@ class MenuSunModel { @@ -102,7 +103,9 @@ class MenuSunModel {
102 List<MenuModel> cookList; 103 List<MenuModel> cookList;
103 104
104 int amount; //菜品数量 105 int amount; //菜品数量
  106 +
105 TextEditingController amountC = TextEditingController(); 107 TextEditingController amountC = TextEditingController();
  108 + int moreSum = 0; //排菜编辑页展示选中总数
106 109
107 MenuSunModel( 110 MenuSunModel(
108 {this.id, 111 {this.id,
@@ -799,7 +799,7 @@ class _PlanDishEidtPageState extends State<PlanDishEidtPage> { @@ -799,7 +799,7 @@ class _PlanDishEidtPageState extends State<PlanDishEidtPage> {
799 color: MyColours.color_DBDBDB), 799 color: MyColours.color_DBDBDB),
800 VEmptyView(24), 800 VEmptyView(24),
801 _select('菜品', '编辑', () async { 801 _select('菜品', '编辑', () async {
802 - if (widget.onlyShow) { 802 + if (!widget.onlyShow) {
803 FocusScope.of(context) 803 FocusScope.of(context)
804 .requestFocus(FocusNode()); //点击空白处隐藏键盘 804 .requestFocus(FocusNode()); //点击空白处隐藏键盘
805 Map temp; 805 Map temp;
@@ -117,7 +117,7 @@ class _PlanDishSunPageState extends State<PlanDishSunPage> { @@ -117,7 +117,7 @@ class _PlanDishSunPageState extends State<PlanDishSunPage> {
117 onTap: () async { 117 onTap: () async {
118 UserModel userModel = 118 UserModel userModel =
119 Provider.of<UserModel>(context, listen: false); 119 Provider.of<UserModel>(context, listen: false);
120 - bool canedit = widget.data[index].type == '0' || 120 + bool canedit = widget.data[index].type == '2' ||
121 userModel.user.role_name == '管理员' || 121 userModel.user.role_name == '管理员' ||
122 userModel.user.role_name == '店长'; 122 userModel.user.role_name == '店长';
123 123
This diff could not be displayed because it is too large.