Showing
7 changed files
with
178 additions
and
156 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "430" | 15 | +def flutterVersionCode = "423" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '430' | 17 | + flutterVersionCode = '423' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "4.3.0" | 20 | +def flutterVersionName = "4.2.3" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '4.3.0' | 22 | + flutterVersionName = '4.2.3' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -33,9 +33,15 @@ class ClassifySunModel { | @@ -33,9 +33,15 @@ class ClassifySunModel { | ||
| 33 | String className; | 33 | String className; |
| 34 | String status; | 34 | String status; |
| 35 | dynamic cdate; | 35 | dynamic cdate; |
| 36 | + String isDefault; | ||
| 36 | 37 | ||
| 37 | ClassifySunModel( | 38 | ClassifySunModel( |
| 38 | - {this.id, this.sid, this.className, this.status, this.cdate}); | 39 | + {this.id, |
| 40 | + this.sid, | ||
| 41 | + this.className, | ||
| 42 | + this.status, | ||
| 43 | + this.cdate, | ||
| 44 | + this.isDefault}); | ||
| 39 | 45 | ||
| 40 | ClassifySunModel.fromJson(Map<String, dynamic> json) { | 46 | ClassifySunModel.fromJson(Map<String, dynamic> json) { |
| 41 | id = json['id']; | 47 | id = json['id']; |
| @@ -43,6 +49,7 @@ class ClassifySunModel { | @@ -43,6 +49,7 @@ class ClassifySunModel { | ||
| 43 | className = json['class_name']; | 49 | className = json['class_name']; |
| 44 | status = json['status']; | 50 | status = json['status']; |
| 45 | cdate = json['cdate']; | 51 | cdate = json['cdate']; |
| 52 | + isDefault = json['is_default']; | ||
| 46 | } | 53 | } |
| 47 | 54 | ||
| 48 | Map<String, dynamic> toJson() { | 55 | Map<String, dynamic> toJson() { |
| @@ -52,6 +59,7 @@ class ClassifySunModel { | @@ -52,6 +59,7 @@ class ClassifySunModel { | ||
| 52 | data['class_name'] = this.className; | 59 | data['class_name'] = this.className; |
| 53 | data['status'] = this.status; | 60 | data['status'] = this.status; |
| 54 | data['cdate'] = this.cdate; | 61 | data['cdate'] = this.cdate; |
| 62 | + data['is_default'] = this.isDefault; | ||
| 55 | return data; | 63 | return data; |
| 56 | } | 64 | } |
| 57 | } | 65 | } |
| @@ -33,8 +33,10 @@ class GetDepositSunModel { | @@ -33,8 +33,10 @@ class GetDepositSunModel { | ||
| 33 | String dname; | 33 | String dname; |
| 34 | String status; | 34 | String status; |
| 35 | String cdate; | 35 | String cdate; |
| 36 | + String isDefault; | ||
| 36 | 37 | ||
| 37 | - GetDepositSunModel({this.id, this.sid, this.dname, this.status, this.cdate}); | 38 | + GetDepositSunModel( |
| 39 | + {this.id, this.sid, this.dname, this.status, this.cdate, this.isDefault}); | ||
| 38 | 40 | ||
| 39 | GetDepositSunModel.fromJson(Map<String, dynamic> json) { | 41 | GetDepositSunModel.fromJson(Map<String, dynamic> json) { |
| 40 | id = json['id']; | 42 | id = json['id']; |
| @@ -42,6 +44,7 @@ class GetDepositSunModel { | @@ -42,6 +44,7 @@ class GetDepositSunModel { | ||
| 42 | dname = json['dname']; | 44 | dname = json['dname']; |
| 43 | status = json['status']; | 45 | status = json['status']; |
| 44 | cdate = json['cdate']; | 46 | cdate = json['cdate']; |
| 47 | + isDefault = json['is_default']; | ||
| 45 | } | 48 | } |
| 46 | 49 | ||
| 47 | Map<String, dynamic> toJson() { | 50 | Map<String, dynamic> toJson() { |
| @@ -51,6 +54,7 @@ class GetDepositSunModel { | @@ -51,6 +54,7 @@ class GetDepositSunModel { | ||
| 51 | data['dname'] = this.dname; | 54 | data['dname'] = this.dname; |
| 52 | data['status'] = this.status; | 55 | data['status'] = this.status; |
| 53 | data['cdate'] = this.cdate; | 56 | data['cdate'] = this.cdate; |
| 57 | + data['is_default'] = this.isDefault; | ||
| 54 | return data; | 58 | return data; |
| 55 | } | 59 | } |
| 56 | } | 60 | } |
| @@ -2609,50 +2609,50 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | @@ -2609,50 +2609,50 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { | ||
| 2609 | ? SizedBox() | 2609 | ? SizedBox() |
| 2610 | : Row( | 2610 | : Row( |
| 2611 | children: [ | 2611 | children: [ |
| 2612 | - detailEntity.order.cookbooklist | ||
| 2613 | - .length == | ||
| 2614 | - 0 | ||
| 2615 | - ? Expanded( | ||
| 2616 | - flex: 1, | ||
| 2617 | - child: InkWell( | ||
| 2618 | - onTap: () { | ||
| 2619 | - NavigatorUtil | ||
| 2620 | - .goOrderAdvanceHomePage( | ||
| 2621 | - context, | ||
| 2622 | - ); | ||
| 2623 | - }, | ||
| 2624 | - child: Container( | ||
| 2625 | - margin: EdgeInsets.only( | ||
| 2626 | - right: ScreenUtil() | ||
| 2627 | - .setWidth(20)), | ||
| 2628 | - decoration: BoxDecoration( | ||
| 2629 | - color: MyColours | ||
| 2630 | - .color_ffffff, | ||
| 2631 | - border: Border.all( | ||
| 2632 | - width: w(1), | ||
| 2633 | - color: MyColours | ||
| 2634 | - .color_438E93), | ||
| 2635 | - borderRadius: | ||
| 2636 | - BorderRadius.circular( | ||
| 2637 | - ScreenUtil() | ||
| 2638 | - .setWidth( | ||
| 2639 | - 10)), | ||
| 2640 | - ), | ||
| 2641 | - child: Align( | ||
| 2642 | - alignment: | ||
| 2643 | - Alignment.center, | ||
| 2644 | - child: Text('预点菜', | ||
| 2645 | - style: TextStyle( | ||
| 2646 | - color: MyColours | ||
| 2647 | - .color_438E93, | ||
| 2648 | - fontSize: | ||
| 2649 | - ScreenUtil() | ||
| 2650 | - .setSp( | ||
| 2651 | - 34))), | ||
| 2652 | - ), | ||
| 2653 | - ), | ||
| 2654 | - )) | ||
| 2655 | - : SizedBox(), | 2612 | + // detailEntity.order.cookbooklist |
| 2613 | + // .length == | ||
| 2614 | + // 0 | ||
| 2615 | + // ? Expanded( | ||
| 2616 | + // flex: 1, | ||
| 2617 | + // child: InkWell( | ||
| 2618 | + // onTap: () { | ||
| 2619 | + // NavigatorUtil | ||
| 2620 | + // .goOrderAdvanceHomePage( | ||
| 2621 | + // context, | ||
| 2622 | + // ); | ||
| 2623 | + // }, | ||
| 2624 | + // child: Container( | ||
| 2625 | + // margin: EdgeInsets.only( | ||
| 2626 | + // right: ScreenUtil() | ||
| 2627 | + // .setWidth(20)), | ||
| 2628 | + // decoration: BoxDecoration( | ||
| 2629 | + // color: MyColours | ||
| 2630 | + // .color_ffffff, | ||
| 2631 | + // border: Border.all( | ||
| 2632 | + // width: w(1), | ||
| 2633 | + // color: MyColours | ||
| 2634 | + // .color_438E93), | ||
| 2635 | + // borderRadius: | ||
| 2636 | + // BorderRadius.circular( | ||
| 2637 | + // ScreenUtil() | ||
| 2638 | + // .setWidth( | ||
| 2639 | + // 10)), | ||
| 2640 | + // ), | ||
| 2641 | + // child: Align( | ||
| 2642 | + // alignment: | ||
| 2643 | + // Alignment.center, | ||
| 2644 | + // child: Text('预点菜', | ||
| 2645 | + // style: TextStyle( | ||
| 2646 | + // color: MyColours | ||
| 2647 | + // .color_438E93, | ||
| 2648 | + // fontSize: | ||
| 2649 | + // ScreenUtil() | ||
| 2650 | + // .setSp( | ||
| 2651 | + // 34))), | ||
| 2652 | + // ), | ||
| 2653 | + // ), | ||
| 2654 | + // )) | ||
| 2655 | + // : SizedBox(), | ||
| 2656 | Expanded( | 2656 | Expanded( |
| 2657 | flex: 2, | 2657 | flex: 2, |
| 2658 | child: InkWell( | 2658 | child: InkWell( |
| @@ -109,50 +109,55 @@ class _FeastDepositTypePageState extends State<FeastDepositTypePage> { | @@ -109,50 +109,55 @@ class _FeastDepositTypePageState extends State<FeastDepositTypePage> { | ||
| 109 | TextStyle(fontSize: font(16), color: MyColours.color_E6000000), | 109 | TextStyle(fontSize: font(16), color: MyColours.color_E6000000), |
| 110 | ), | 110 | ), |
| 111 | Spacer(), | 111 | Spacer(), |
| 112 | - InkWell( | ||
| 113 | - onTap: () { | ||
| 114 | - DialogUtil.textfeildAlertDialog(context, | ||
| 115 | - title: '输入类型名称', | ||
| 116 | - hintText: '请输入', | ||
| 117 | - text: sunModel.dname, | ||
| 118 | - lenghtLimit: true, | ||
| 119 | - toast: '请输入类型名称', rCallback: (name) { | ||
| 120 | - // _addCookbookClass(name, showLoading: true); | ||
| 121 | - _setDeposit(name, did: sunModel.id); | ||
| 122 | - }); | ||
| 123 | - }, | ||
| 124 | - child: Text( | ||
| 125 | - '修改', | ||
| 126 | - style: TextStyle( | ||
| 127 | - decoration: TextDecoration.underline, | ||
| 128 | - fontSize: font(16), | ||
| 129 | - color: MyColours.color_438E93), | ||
| 130 | - )), | 112 | + sunModel.isDefault == '1' |
| 113 | + ? SizedBox() | ||
| 114 | + : InkWell( | ||
| 115 | + onTap: () { | ||
| 116 | + DialogUtil.textfeildAlertDialog(context, | ||
| 117 | + title: '输入类型名称', | ||
| 118 | + hintText: '请输入', | ||
| 119 | + text: sunModel.dname, | ||
| 120 | + lenghtLimit: true, | ||
| 121 | + toast: '请输入类型名称', rCallback: (name) { | ||
| 122 | + // _addCookbookClass(name, showLoading: true); | ||
| 123 | + _setDeposit(name, did: sunModel.id); | ||
| 124 | + }); | ||
| 125 | + }, | ||
| 126 | + child: Text( | ||
| 127 | + '修改', | ||
| 128 | + style: TextStyle( | ||
| 129 | + decoration: TextDecoration.underline, | ||
| 130 | + fontSize: font(16), | ||
| 131 | + color: MyColours.color_438E93), | ||
| 132 | + )), | ||
| 131 | HEmptyView(32), | 133 | HEmptyView(32), |
| 132 | - InkWell( | ||
| 133 | - onTap: () { | ||
| 134 | - //已经传到服务器,弹提醒窗口,是否删除 | ||
| 135 | - //修改之前有内容,则弹框 | ||
| 136 | - DialogUtil.cupertinoAlertDialogFeast(context, | ||
| 137 | - rTitle: '删除', | ||
| 138 | - title: "是否确认删除", | ||
| 139 | - content: sunModel.dname, lCallback: () { | ||
| 140 | - print("取消"); | ||
| 141 | - }, rCallback: () async { | ||
| 142 | - print("确定"); | ||
| 143 | - Map<String, String> pramas = {'id': sunModel.id}; | ||
| 144 | - bool success = await feastModel.delDeposit(context, pramas); | ||
| 145 | - if (success) { | ||
| 146 | - Utils.showToast('删除成功'); | ||
| 147 | - _getDeposit(isShowLoading: true); | ||
| 148 | - } | ||
| 149 | - }); | ||
| 150 | - }, | ||
| 151 | - child: Image.asset( | ||
| 152 | - Utils.getImgPath('f_delete_red'), | ||
| 153 | - width: w(32), | ||
| 154 | - height: w(32), | ||
| 155 | - )), | 134 | + sunModel.isDefault == '1' |
| 135 | + ? SizedBox() | ||
| 136 | + : InkWell( | ||
| 137 | + onTap: () { | ||
| 138 | + //已经传到服务器,弹提醒窗口,是否删除 | ||
| 139 | + //修改之前有内容,则弹框 | ||
| 140 | + DialogUtil.cupertinoAlertDialogFeast(context, | ||
| 141 | + rTitle: '删除', | ||
| 142 | + title: "是否确认删除", | ||
| 143 | + content: sunModel.dname, lCallback: () { | ||
| 144 | + print("取消"); | ||
| 145 | + }, rCallback: () async { | ||
| 146 | + print("确定"); | ||
| 147 | + Map<String, String> pramas = {'id': sunModel.id}; | ||
| 148 | + bool success = | ||
| 149 | + await feastModel.delDeposit(context, pramas); | ||
| 150 | + if (success) { | ||
| 151 | + Utils.showToast('删除成功'); | ||
| 152 | + _getDeposit(isShowLoading: true); | ||
| 153 | + } | ||
| 154 | + }); | ||
| 155 | + }, | ||
| 156 | + child: Image.asset( | ||
| 157 | + Utils.getImgPath('f_delete_red'), | ||
| 158 | + width: w(32), | ||
| 159 | + height: w(32), | ||
| 160 | + )), | ||
| 156 | HEmptyView(32), | 161 | HEmptyView(32), |
| 157 | ], | 162 | ], |
| 158 | ), | 163 | ), |
| @@ -106,52 +106,57 @@ class _FeastTypePageState extends State<FeastTypePage> { | @@ -106,52 +106,57 @@ class _FeastTypePageState extends State<FeastTypePage> { | ||
| 106 | TextStyle(fontSize: font(16), color: MyColours.color_E6000000), | 106 | TextStyle(fontSize: font(16), color: MyColours.color_E6000000), |
| 107 | ), | 107 | ), |
| 108 | Spacer(), | 108 | Spacer(), |
| 109 | - InkWell( | ||
| 110 | - onTap: () { | ||
| 111 | - DialogUtil.textfeildAlertDialog(context, | ||
| 112 | - title: '输入类型名称', | ||
| 113 | - hintText: '请输入', | ||
| 114 | - text: data.className, | ||
| 115 | - lenghtLimit: true, | ||
| 116 | - toast: '请输入类型名称', rCallback: (name) { | ||
| 117 | - _setClassify(name, idstr: data.id); | ||
| 118 | - }); | ||
| 119 | - }, | ||
| 120 | - child: Text( | ||
| 121 | - '修改', | ||
| 122 | - style: TextStyle( | ||
| 123 | - decoration: TextDecoration.underline, | ||
| 124 | - fontSize: font(16), | ||
| 125 | - color: MyColours.color_438E93), | ||
| 126 | - )), | 109 | + data.isDefault == '1' |
| 110 | + ? SizedBox() | ||
| 111 | + : InkWell( | ||
| 112 | + onTap: () { | ||
| 113 | + DialogUtil.textfeildAlertDialog(context, | ||
| 114 | + title: '输入类型名称', | ||
| 115 | + hintText: '请输入', | ||
| 116 | + text: data.className, | ||
| 117 | + lenghtLimit: true, | ||
| 118 | + toast: '请输入类型名称', rCallback: (name) { | ||
| 119 | + _setClassify(name, idstr: data.id); | ||
| 120 | + }); | ||
| 121 | + }, | ||
| 122 | + child: Text( | ||
| 123 | + '修改', | ||
| 124 | + style: TextStyle( | ||
| 125 | + decoration: TextDecoration.underline, | ||
| 126 | + fontSize: font(16), | ||
| 127 | + color: MyColours.color_438E93), | ||
| 128 | + )), | ||
| 127 | HEmptyView(32), | 129 | HEmptyView(32), |
| 128 | - InkWell( | ||
| 129 | - onTap: () { | ||
| 130 | - if (index == 0) { | ||
| 131 | - return; | ||
| 132 | - } | ||
| 133 | - DialogUtil.cupertinoAlertDialogFeast(context, | ||
| 134 | - rTitle: '删除', | ||
| 135 | - title: "是否确认删除", | ||
| 136 | - content: data.className, lCallback: () { | ||
| 137 | - print("取消"); | ||
| 138 | - }, rCallback: () async { | ||
| 139 | - print("确定"); | 130 | + data.isDefault == '1' |
| 131 | + ? SizedBox() | ||
| 132 | + : InkWell( | ||
| 133 | + onTap: () { | ||
| 134 | + if (index == 0) { | ||
| 135 | + return; | ||
| 136 | + } | ||
| 137 | + DialogUtil.cupertinoAlertDialogFeast(context, | ||
| 138 | + rTitle: '删除', | ||
| 139 | + title: "是否确认删除", | ||
| 140 | + content: data.className, lCallback: () { | ||
| 141 | + print("取消"); | ||
| 142 | + }, rCallback: () async { | ||
| 143 | + print("确定"); | ||
| 140 | 144 | ||
| 141 | - Map<String, String> pramas = {'id': data.id}; | ||
| 142 | - bool success = await feastModel.delClassify(context, pramas); | ||
| 143 | - if (success) { | ||
| 144 | - Utils.showToast('删除成功'); | ||
| 145 | - _getClassify(isShowLoading: true); | ||
| 146 | - } | ||
| 147 | - }); | ||
| 148 | - }, | ||
| 149 | - child: Image.asset( | ||
| 150 | - Utils.getImgPath( | ||
| 151 | - index == 0 ? 'f_delete_red_un' : 'f_delete_red'), | ||
| 152 | - width: w(32), | ||
| 153 | - height: w(32), | ||
| 154 | - )), | 145 | + Map<String, String> pramas = {'id': data.id}; |
| 146 | + bool success = | ||
| 147 | + await feastModel.delClassify(context, pramas); | ||
| 148 | + if (success) { | ||
| 149 | + Utils.showToast('删除成功'); | ||
| 150 | + _getClassify(isShowLoading: true); | ||
| 151 | + } | ||
| 152 | + }); | ||
| 153 | + }, | ||
| 154 | + child: Image.asset( | ||
| 155 | + Utils.getImgPath( | ||
| 156 | + index == 0 ? 'f_delete_red_un' : 'f_delete_red'), | ||
| 157 | + width: w(32), | ||
| 158 | + height: w(32), | ||
| 159 | + )), | ||
| 155 | HEmptyView(32), | 160 | HEmptyView(32), |
| 156 | ], | 161 | ], |
| 157 | ), | 162 | ), |
| @@ -649,25 +649,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -649,25 +649,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 649 | Utils.getImgPath('cybz'), '常用备注')), | 649 | Utils.getImgPath('cybz'), '常用备注')), |
| 650 | ], | 650 | ], |
| 651 | ), | 651 | ), |
| 652 | - VEmptyView(68), | ||
| 653 | - Row( | ||
| 654 | - mainAxisAlignment: | ||
| 655 | - MainAxisAlignment.spaceEvenly, | ||
| 656 | - children: [ | ||
| 657 | - InkWell( | ||
| 658 | - onTap: () { | ||
| 659 | - NavigatorUtil.goMyPlanDishHomePage( | ||
| 660 | - context); | ||
| 661 | - }, | ||
| 662 | - child: _item( | ||
| 663 | - Utils.getImgPath('cdgl'), '我的排菜')), | ||
| 664 | - InkWell( | ||
| 665 | - onTap: () {}, child: _item('', '空空空空')), | ||
| 666 | - InkWell( | ||
| 667 | - onTap: () {}, child: _item('', '空空空空')), | ||
| 668 | - InkWell( | ||
| 669 | - onTap: () {}, child: _item('', '空空空空')), | ||
| 670 | - ]) | 652 | + // VEmptyView(68), |
| 653 | + // Row( | ||
| 654 | + // mainAxisAlignment: | ||
| 655 | + // MainAxisAlignment.spaceEvenly, | ||
| 656 | + // children: [ | ||
| 657 | + // InkWell( | ||
| 658 | + // onTap: () { | ||
| 659 | + // NavigatorUtil.goMyPlanDishHomePage( | ||
| 660 | + // context); | ||
| 661 | + // }, | ||
| 662 | + // child: _item( | ||
| 663 | + // Utils.getImgPath('cdgl'), '我的排菜')), | ||
| 664 | + // InkWell( | ||
| 665 | + // onTap: () {}, child: _item('', '空空空空')), | ||
| 666 | + // InkWell( | ||
| 667 | + // onTap: () {}, child: _item('', '空空空空')), | ||
| 668 | + // InkWell( | ||
| 669 | + // onTap: () {}, child: _item('', '空空空空')), | ||
| 670 | + // ]) | ||
| 671 | ]), | 671 | ]), |
| 672 | )), | 672 | )), |
| 673 | VEmptyView(20), | 673 | VEmptyView(20), |
-
Please register or login to post a comment