Showing
29 changed files
with
222 additions
and
113 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "405" | 15 | +def flutterVersionCode = "407" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '405' | 17 | + flutterVersionCode = '407' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "4.0.5" | 20 | +def flutterVersionName = "4.0.7" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '4.0.5' | 22 | + flutterVersionName = '4.0.7' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -35,11 +35,10 @@ class GetSellerUserBySelleridSunModel extends Object { | @@ -35,11 +35,10 @@ class GetSellerUserBySelleridSunModel extends Object { | ||
| 35 | @JsonKey(name: 'role_name') | 35 | @JsonKey(name: 'role_name') |
| 36 | String roleName; | 36 | String roleName; |
| 37 | 37 | ||
| 38 | - GetSellerUserBySelleridSunModel( | ||
| 39 | - this.nickName, | ||
| 40 | - this.id, | ||
| 41 | - this.roleName | ||
| 42 | - ); | 38 | + @JsonKey(name: 'account') |
| 39 | + String account; | ||
| 40 | + | ||
| 41 | + GetSellerUserBySelleridSunModel(this.nickName, this.id, this.roleName,this.account); | ||
| 43 | 42 | ||
| 44 | factory GetSellerUserBySelleridSunModel.fromJson( | 43 | factory GetSellerUserBySelleridSunModel.fromJson( |
| 45 | Map<String, dynamic> srcJson) => | 44 | Map<String, dynamic> srcJson) => |
| @@ -34,6 +34,7 @@ GetSellerUserBySelleridSunModel _$GetSellerUserBySelleridSunModelFromJson( | @@ -34,6 +34,7 @@ GetSellerUserBySelleridSunModel _$GetSellerUserBySelleridSunModelFromJson( | ||
| 34 | json['nick_name'] as String, | 34 | json['nick_name'] as String, |
| 35 | json['id'] as String, | 35 | json['id'] as String, |
| 36 | json['role_name'] as String, | 36 | json['role_name'] as String, |
| 37 | + json['account'] as String | ||
| 37 | ); | 38 | ); |
| 38 | } | 39 | } |
| 39 | 40 | ||
| @@ -42,5 +43,6 @@ Map<String, dynamic> _$GetSellerUserBySelleridSunModelToJson( | @@ -42,5 +43,6 @@ Map<String, dynamic> _$GetSellerUserBySelleridSunModelToJson( | ||
| 42 | <String, dynamic>{ | 43 | <String, dynamic>{ |
| 43 | 'nick_name': instance.nickName, | 44 | 'nick_name': instance.nickName, |
| 44 | 'id': instance.id, | 45 | 'id': instance.id, |
| 45 | - 'role_name': instance.roleName | 46 | + 'role_name': instance.roleName, |
| 47 | + 'account':instance.account | ||
| 46 | }; | 48 | }; |
| @@ -203,6 +203,9 @@ class Last extends Object { | @@ -203,6 +203,9 @@ class Last extends Object { | ||
| 203 | @JsonKey(name: 'con_amount') | 203 | @JsonKey(name: 'con_amount') |
| 204 | String conAmount; | 204 | String conAmount; |
| 205 | 205 | ||
| 206 | + @JsonKey(name: 'account') | ||
| 207 | + String account; | ||
| 208 | + | ||
| 206 | String get ddateSoltStr { | 209 | String get ddateSoltStr { |
| 207 | switch (ddateSolt) { | 210 | switch (ddateSolt) { |
| 208 | case "1": | 211 | case "1": |
| @@ -244,7 +247,8 @@ class Last extends Object { | @@ -244,7 +247,8 @@ class Last extends Object { | ||
| 244 | this.sellerUserNickName, | 247 | this.sellerUserNickName, |
| 245 | this.sellerUserPhone, | 248 | this.sellerUserPhone, |
| 246 | this.actualPum, | 249 | this.actualPum, |
| 247 | - this.conAmount); | 250 | + this.conAmount, |
| 251 | + this.account); | ||
| 248 | 252 | ||
| 249 | factory Last.fromJson(Map<String, dynamic> srcJson) => | 253 | factory Last.fromJson(Map<String, dynamic> srcJson) => |
| 250 | _$LastFromJson(srcJson); | 254 | _$LastFromJson(srcJson); |
| @@ -121,6 +121,7 @@ Last _$LastFromJson(Map<String, dynamic> json) { | @@ -121,6 +121,7 @@ Last _$LastFromJson(Map<String, dynamic> json) { | ||
| 121 | json['seller_user_phone'] as String, | 121 | json['seller_user_phone'] as String, |
| 122 | json['actual_pum'] as String, | 122 | json['actual_pum'] as String, |
| 123 | json['con_amount'] as String, | 123 | json['con_amount'] as String, |
| 124 | + json['account'] as String | ||
| 124 | ); | 125 | ); |
| 125 | } | 126 | } |
| 126 | 127 | ||
| @@ -134,6 +135,7 @@ Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{ | @@ -134,6 +135,7 @@ Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{ | ||
| 134 | 'seller_user_phone': instance.sellerUserPhone, | 135 | 'seller_user_phone': instance.sellerUserPhone, |
| 135 | 'actual_pum': instance.actualPum, | 136 | 'actual_pum': instance.actualPum, |
| 136 | 'con_amount': instance.conAmount, | 137 | 'con_amount': instance.conAmount, |
| 138 | + 'account':instance.account | ||
| 137 | }; | 139 | }; |
| 138 | 140 | ||
| 139 | Count _$CountFromJson(Map<String, dynamic> json) { | 141 | Count _$CountFromJson(Map<String, dynamic> json) { |
| @@ -118,10 +118,14 @@ class SellerUser extends Object { | @@ -118,10 +118,14 @@ class SellerUser extends Object { | ||
| 118 | @JsonKey(name: 'nick_name') | 118 | @JsonKey(name: 'nick_name') |
| 119 | String nickName; | 119 | String nickName; |
| 120 | 120 | ||
| 121 | + @JsonKey(name: 'account') | ||
| 122 | + String account; | ||
| 123 | + | ||
| 121 | SellerUser( | 124 | SellerUser( |
| 122 | this.id, | 125 | this.id, |
| 123 | this.finishedStatus, | 126 | this.finishedStatus, |
| 124 | this.nickName, | 127 | this.nickName, |
| 128 | + this.account | ||
| 125 | ); | 129 | ); |
| 126 | 130 | ||
| 127 | factory SellerUser.fromJson(Map<String, dynamic> srcJson) => | 131 | factory SellerUser.fromJson(Map<String, dynamic> srcJson) => |
| @@ -68,11 +68,8 @@ Map<String, dynamic> _$MarketingByIdSunModelToJson( | @@ -68,11 +68,8 @@ Map<String, dynamic> _$MarketingByIdSunModelToJson( | ||
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | SellerUser _$SellerUserFromJson(Map<String, dynamic> json) { | 70 | SellerUser _$SellerUserFromJson(Map<String, dynamic> json) { |
| 71 | - return SellerUser( | ||
| 72 | - json['id'] as String, | ||
| 73 | - json['finished_status'] as int, | ||
| 74 | - json['nick_name'] as String, | ||
| 75 | - ); | 71 | + return SellerUser(json['id'] as String, json['finished_status'] as int, |
| 72 | + json['nick_name'] as String, json['account'] as String); | ||
| 76 | } | 73 | } |
| 77 | 74 | ||
| 78 | Map<String, dynamic> _$SellerUserToJson(SellerUser instance) => | 75 | Map<String, dynamic> _$SellerUserToJson(SellerUser instance) => |
| @@ -80,4 +77,5 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) => | @@ -80,4 +77,5 @@ Map<String, dynamic> _$SellerUserToJson(SellerUser instance) => | ||
| 80 | 'id': instance.id, | 77 | 'id': instance.id, |
| 81 | 'finished_status': instance.finishedStatus, | 78 | 'finished_status': instance.finishedStatus, |
| 82 | 'nick_name': instance.nickName, | 79 | 'nick_name': instance.nickName, |
| 80 | + 'account': instance.account | ||
| 83 | }; | 81 | }; |
| @@ -331,5 +331,7 @@ class HttpUrl { | @@ -331,5 +331,7 @@ class HttpUrl { | ||
| 331 | 331 | ||
| 332 | static const String get_banquet_by_date = | 332 | static const String get_banquet_by_date = |
| 333 | "?service=App.Banquet.GetBanquetByDate"; //指定日期、时段宴会预定 | 333 | "?service=App.Banquet.GetBanquetByDate"; //指定日期、时段宴会预定 |
| 334 | + static const String set_cookbook_by_id = | ||
| 335 | + "?service=App.Cookbook.SetCookbookById"; //修改菜品 | ||
| 334 | 336 | ||
| 335 | } | 337 | } |
| @@ -107,7 +107,7 @@ class _FeastItemState extends State<FeastItem> { | @@ -107,7 +107,7 @@ class _FeastItemState extends State<FeastItem> { | ||
| 107 | fontSize: ScreenUtil().setSp(28)), | 107 | fontSize: ScreenUtil().setSp(28)), |
| 108 | ), | 108 | ), |
| 109 | Text( | 109 | Text( |
| 110 | - '跟单经理:${widget.sunModel.nickName}', | 110 | + '跟单经理:${widget.sunModel.nickName ?? widget.sunModel.account}', |
| 111 | style: TextStyle( | 111 | style: TextStyle( |
| 112 | color: MyColours.color_515151, | 112 | color: MyColours.color_515151, |
| 113 | fontSize: ScreenUtil().setSp(28)), | 113 | fontSize: ScreenUtil().setSp(28)), |
| @@ -17,6 +17,10 @@ import 'package:one_key/widgets/round_button.dart'; | @@ -17,6 +17,10 @@ import 'package:one_key/widgets/round_button.dart'; | ||
| 17 | import 'package:one_key/widgets/system_app_bar.dart'; | 17 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 18 | import 'package:one_key/widgets/v_empty_view.dart'; | 18 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 19 | import 'package:provider/provider.dart'; | 19 | import 'package:provider/provider.dart'; |
| 20 | +/** | ||
| 21 | + * | ||
| 22 | + * 我的客户详情 | ||
| 23 | + */ | ||
| 20 | 24 | ||
| 21 | class MyCustomerDetailPage extends StatefulWidget { | 25 | class MyCustomerDetailPage extends StatefulWidget { |
| 22 | final CustomerListSunModel userHistoryEntity; | 26 | final CustomerListSunModel userHistoryEntity; |
| @@ -435,7 +439,7 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { | @@ -435,7 +439,7 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> { | ||
| 435 | color: MyColours.color_333333), | 439 | color: MyColours.color_333333), |
| 436 | ), | 440 | ), |
| 437 | Text( | 441 | Text( |
| 438 | - '${customerProvider.guestInfoSunModel.last.sellerUserNickName} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}', | 442 | + '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? customerProvider.guestInfoSunModel.last.account} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}', |
| 439 | style: TextStyle( | 443 | style: TextStyle( |
| 440 | fontSize: ScreenUtil().setSp(24), | 444 | fontSize: ScreenUtil().setSp(24), |
| 441 | color: MyColours.color_199095), | 445 | color: MyColours.color_199095), |
| @@ -13,6 +13,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | @@ -13,6 +13,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 13 | import 'package:one_key/widgets/v_empty_view.dart'; | 13 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 14 | import 'package:provider/provider.dart'; | 14 | import 'package:provider/provider.dart'; |
| 15 | 15 | ||
| 16 | +import '../../../../provider/user_model.dart'; | ||
| 17 | + | ||
| 16 | class MyCustomerOrderPage extends StatefulWidget { | 18 | class MyCustomerOrderPage extends StatefulWidget { |
| 17 | final String id; | 19 | final String id; |
| 18 | final String phone; | 20 | final String phone; |
| @@ -38,7 +40,8 @@ class _MyCustomerOrderPageState extends State<MyCustomerOrderPage> { | @@ -38,7 +40,8 @@ class _MyCustomerOrderPageState extends State<MyCustomerOrderPage> { | ||
| 38 | Map<String, String> params = { | 40 | Map<String, String> params = { |
| 39 | "id": widget.id, | 41 | "id": widget.id, |
| 40 | "phone": widget.phone, | 42 | "phone": widget.phone, |
| 41 | - 'year': year.toString() | 43 | + 'year': year.toString(), |
| 44 | + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid | ||
| 42 | }; | 45 | }; |
| 43 | await customerProvider.getGuestReserve(context, params, | 46 | await customerProvider.getGuestReserve(context, params, |
| 44 | showLoading: showLoading); | 47 | showLoading: showLoading); |
| @@ -130,24 +130,25 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> { | @@ -130,24 +130,25 @@ class _MyFestivalEditPageState extends State<MyFestivalEditPage> { | ||
| 130 | String dayStr = ''; | 130 | String dayStr = ''; |
| 131 | bool gongli = true; | 131 | bool gongli = true; |
| 132 | String content = str.substring(0, str.indexOf(':')); | 132 | String content = str.substring(0, str.indexOf(':')); |
| 133 | - if (str.contains('年')) { | ||
| 134 | - yearStr = str.substring( | ||
| 135 | - str.indexOf(':') + 1, str.indexOf('年')); | 133 | + String tempStr = str.substring(str.indexOf(':'), str.length); |
| 134 | + if (tempStr.contains('年')) { | ||
| 135 | + yearStr = tempStr.substring( | ||
| 136 | + tempStr.indexOf(':') + 1, tempStr.indexOf('年')); | ||
| 136 | } | 137 | } |
| 137 | - if (str.contains('月')) { | ||
| 138 | - if (str.contains('年')) { | ||
| 139 | - monthStr = str.substring( | ||
| 140 | - str.indexOf('年') + 1, str.indexOf('月')); | 138 | + if (tempStr.contains('月')) { |
| 139 | + if (tempStr.contains('年')) { | ||
| 140 | + monthStr = tempStr.substring( | ||
| 141 | + tempStr.indexOf('年') + 1, tempStr.indexOf('月')); | ||
| 141 | } else { | 142 | } else { |
| 142 | - monthStr = str.substring( | ||
| 143 | - str.indexOf(':') + 1, str.indexOf('月')); | 143 | + monthStr = tempStr.substring( |
| 144 | + tempStr.indexOf(':') + 1, tempStr.indexOf('月')); | ||
| 144 | } | 145 | } |
| 145 | } | 146 | } |
| 146 | - if (str.contains('日')) { | ||
| 147 | - dayStr = str.substring( | ||
| 148 | - str.indexOf('月') + 1, str.indexOf('日')); | 147 | + if (tempStr.contains('日')) { |
| 148 | + dayStr = tempStr.substring( | ||
| 149 | + tempStr.indexOf('月') + 1, tempStr.indexOf('日')); | ||
| 149 | } | 150 | } |
| 150 | - if (str.contains('农历')) { | 151 | + if (tempStr.contains('农历')) { |
| 151 | gongli = false; | 152 | gongli = false; |
| 152 | } | 153 | } |
| 153 | 154 |
| @@ -143,18 +143,18 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -143,18 +143,18 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 143 | model.sellerUser != null && | 143 | model.sellerUser != null && |
| 144 | model.sellerUser.length > 0) { | 144 | model.sellerUser.length > 0) { |
| 145 | for (SellerUser item in model.sellerUser) { | 145 | for (SellerUser item in model.sellerUser) { |
| 146 | - if (item.nickName != null) { | ||
| 147 | - FilterBtnModel model = FilterBtnModel(); | ||
| 148 | - model.id = item.uid; | ||
| 149 | - model.title = item.nickName; | ||
| 150 | - if (widget.uidStr == model.id) { | ||
| 151 | - model.select = true; | ||
| 152 | - } else { | ||
| 153 | - model.select = false; | ||
| 154 | - } | ||
| 155 | - | ||
| 156 | - customerProvider.filterManageList.add(model); | 146 | + // if (item.nickName != null) { |
| 147 | + FilterBtnModel model = FilterBtnModel(); | ||
| 148 | + model.id = item.uid; | ||
| 149 | + model.title = item.nickName ?? item.account; | ||
| 150 | + if (widget.uidStr == model.id) { | ||
| 151 | + model.select = true; | ||
| 152 | + } else { | ||
| 153 | + model.select = false; | ||
| 157 | } | 154 | } |
| 155 | + | ||
| 156 | + customerProvider.filterManageList.add(model); | ||
| 157 | + // } | ||
| 158 | } | 158 | } |
| 159 | // setState(() {}); | 159 | // setState(() {}); |
| 160 | } | 160 | } |
| @@ -13,6 +13,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | @@ -13,6 +13,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 13 | import 'package:one_key/widgets/v_empty_view.dart'; | 13 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 14 | import 'package:provider/provider.dart'; | 14 | import 'package:provider/provider.dart'; |
| 15 | 15 | ||
| 16 | +import '../../../../provider/user_model.dart'; | ||
| 17 | + | ||
| 16 | class CustomerOrderPage extends StatefulWidget { | 18 | class CustomerOrderPage extends StatefulWidget { |
| 17 | final String id; | 19 | final String id; |
| 18 | final String phone; | 20 | final String phone; |
| @@ -38,7 +40,8 @@ class _CustomerOrderPageState extends State<CustomerOrderPage> { | @@ -38,7 +40,8 @@ class _CustomerOrderPageState extends State<CustomerOrderPage> { | ||
| 38 | Map<String, String> params = { | 40 | Map<String, String> params = { |
| 39 | "id": widget.id, | 41 | "id": widget.id, |
| 40 | "phone": widget.phone, | 42 | "phone": widget.phone, |
| 41 | - 'year': year.toString() | 43 | + 'year': year.toString(), |
| 44 | + 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid | ||
| 42 | }; | 45 | }; |
| 43 | await customerProvider.getGuestReserve(context, params, | 46 | await customerProvider.getGuestReserve(context, params, |
| 44 | showLoading: showLoading); | 47 | showLoading: showLoading); |
| @@ -131,25 +131,30 @@ class _FestivalEditPageState extends State<FestivalEditPage> { | @@ -131,25 +131,30 @@ class _FestivalEditPageState extends State<FestivalEditPage> { | ||
| 131 | bool gongli = true; | 131 | bool gongli = true; |
| 132 | String content = str.substring(0, str.indexOf(':')); | 132 | String content = str.substring(0, str.indexOf(':')); |
| 133 | 133 | ||
| 134 | - str = str.substring(content.length); | ||
| 135 | - if (str.contains('年')) { | ||
| 136 | - yearStr = str.substring( | ||
| 137 | - str.indexOf(':') + 1, str.indexOf('年')); | 134 | + String tempStr = |
| 135 | + str.substring(str.indexOf(':'), str.length); | ||
| 136 | + if (tempStr.contains('年')) { | ||
| 137 | + yearStr = tempStr.substring( | ||
| 138 | + tempStr.indexOf(':') + 1, | ||
| 139 | + tempStr.indexOf('年')); | ||
| 138 | } | 140 | } |
| 139 | - if (str.contains('月')) { | ||
| 140 | - if (str.contains('年')) { | ||
| 141 | - monthStr = str.substring( | ||
| 142 | - str.indexOf('年') + 1, str.indexOf('月')); | 141 | + if (tempStr.contains('月')) { |
| 142 | + if (tempStr.contains('年')) { | ||
| 143 | + monthStr = tempStr.substring( | ||
| 144 | + tempStr.indexOf('年') + 1, | ||
| 145 | + tempStr.indexOf('月')); | ||
| 143 | } else { | 146 | } else { |
| 144 | - monthStr = str.substring( | ||
| 145 | - str.indexOf(':') + 1, str.indexOf('月')); | 147 | + monthStr = tempStr.substring( |
| 148 | + tempStr.indexOf(':') + 1, | ||
| 149 | + tempStr.indexOf('月')); | ||
| 146 | } | 150 | } |
| 147 | } | 151 | } |
| 148 | - if (str.contains('日')) { | ||
| 149 | - dayStr = str.substring( | ||
| 150 | - str.indexOf('月') + 1, str.indexOf('日')); | 152 | + if (tempStr.contains('日')) { |
| 153 | + dayStr = tempStr.substring( | ||
| 154 | + tempStr.indexOf('月') + 1, | ||
| 155 | + tempStr.indexOf('日')); | ||
| 151 | } | 156 | } |
| 152 | - if (str.contains('农历')) { | 157 | + if (tempStr.contains('农历')) { |
| 153 | gongli = false; | 158 | gongli = false; |
| 154 | } | 159 | } |
| 155 | 160 |
| @@ -111,7 +111,7 @@ class _MarketingRecordsDetailPageState | @@ -111,7 +111,7 @@ class _MarketingRecordsDetailPageState | ||
| 111 | List<Widget> items = []; | 111 | List<Widget> items = []; |
| 112 | 112 | ||
| 113 | for (SellerUser item in data) { | 113 | for (SellerUser item in data) { |
| 114 | - String title = '${item.nickName}经理'; | 114 | + String title = '${item.nickName ?? item.account}经理'; |
| 115 | title += item.finishedStatus == 0 ? '(未完成)' : '(已完成)'; | 115 | title += item.finishedStatus == 0 ? '(未完成)' : '(已完成)'; |
| 116 | 116 | ||
| 117 | items.add(InkWell( | 117 | items.add(InkWell( |
| @@ -13,6 +13,11 @@ import 'package:one_key/widgets/page_exception.dart'; | @@ -13,6 +13,11 @@ import 'package:one_key/widgets/page_exception.dart'; | ||
| 13 | import 'package:one_key/widgets/round_button.dart'; | 13 | import 'package:one_key/widgets/round_button.dart'; |
| 14 | import 'package:one_key/widgets/system_app_bar.dart'; | 14 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 15 | import 'package:provider/provider.dart'; | 15 | import 'package:provider/provider.dart'; |
| 16 | +/** | ||
| 17 | + * | ||
| 18 | + * 全店营销记录 | ||
| 19 | + * | ||
| 20 | + */ | ||
| 16 | 21 | ||
| 17 | class MarketingRecordsPage extends StatefulWidget { | 22 | class MarketingRecordsPage extends StatefulWidget { |
| 18 | final FromPage fromPage; | 23 | final FromPage fromPage; |
| @@ -51,6 +51,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | @@ -51,6 +51,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | ||
| 51 | String categoryStr = '请选择'; | 51 | String categoryStr = '请选择'; |
| 52 | List<String> specStrList = []; | 52 | List<String> specStrList = []; |
| 53 | String specStr = '请选择'; | 53 | String specStr = '请选择'; |
| 54 | + String mid = ''; | ||
| 54 | @override | 55 | @override |
| 55 | void initState() { | 56 | void initState() { |
| 56 | super.initState(); | 57 | super.initState(); |
| @@ -83,6 +84,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | @@ -83,6 +84,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | ||
| 83 | _priceController.text = menuManageProvider.cookbookOneSunModel.price; | 84 | _priceController.text = menuManageProvider.cookbookOneSunModel.price; |
| 84 | categoryStr = menuManageProvider.cookbookOneSunModel.className; | 85 | categoryStr = menuManageProvider.cookbookOneSunModel.className; |
| 85 | specStr = menuManageProvider.cookbookOneSunModel.unit; | 86 | specStr = menuManageProvider.cookbookOneSunModel.unit; |
| 87 | + mid = menuManageProvider.cookbookOneSunModel.id; | ||
| 86 | if (menuManageProvider.cookbookOneSunModel.image != null && | 88 | if (menuManageProvider.cookbookOneSunModel.image != null && |
| 87 | menuManageProvider.cookbookOneSunModel.image != 'null' && | 89 | menuManageProvider.cookbookOneSunModel.image != 'null' && |
| 88 | menuManageProvider.cookbookOneSunModel.image != '') { | 90 | menuManageProvider.cookbookOneSunModel.image != '') { |
| @@ -147,12 +149,22 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | @@ -147,12 +149,22 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { | ||
| 147 | 'status': swichState ? '1' : '0', | 149 | 'status': swichState ? '1' : '0', |
| 148 | 'price': _priceController.text | 150 | 'price': _priceController.text |
| 149 | }; | 151 | }; |
| 152 | + if (mid != '') { | ||
| 153 | + params['id'] = mid; | ||
| 154 | + } | ||
| 150 | if (uploadImageProvider.dish.qiniuUrl != null && | 155 | if (uploadImageProvider.dish.qiniuUrl != null && |
| 151 | uploadImageProvider.dish.qiniuUrl != '') { | 156 | uploadImageProvider.dish.qiniuUrl != '') { |
| 152 | params['image'] = uploadImageProvider.dish.qiniuUrl; | 157 | params['image'] = uploadImageProvider.dish.qiniuUrl; |
| 153 | } | 158 | } |
| 154 | - bool sucess = await menuManageProvider.addCookbook(context, params, | ||
| 155 | - showLoading: showLoading); | 159 | + bool sucess = false; |
| 160 | + if (mid != '') { | ||
| 161 | + sucess = await menuManageProvider.setCookbookById(context, params, | ||
| 162 | + showLoading: showLoading); | ||
| 163 | + } else { | ||
| 164 | + sucess = await menuManageProvider.addCookbook(context, params, | ||
| 165 | + showLoading: showLoading); | ||
| 166 | + } | ||
| 167 | + | ||
| 156 | if (sucess) { | 168 | if (sucess) { |
| 157 | EventBus().emit('menu_manage_page'); | 169 | EventBus().emit('menu_manage_page'); |
| 158 | Navigator.of(context).pop(); | 170 | Navigator.of(context).pop(); |
| @@ -154,6 +154,7 @@ class _MenuCategoryPageState extends State<MenuCategoryPage> { | @@ -154,6 +154,7 @@ class _MenuCategoryPageState extends State<MenuCategoryPage> { | ||
| 154 | // | 154 | // |
| 155 | DialogUtil.textfeildAlertDialog(context, | 155 | DialogUtil.textfeildAlertDialog(context, |
| 156 | title: '添加分类', | 156 | title: '添加分类', |
| 157 | + text: '', | ||
| 157 | hintText: '输入分类名称', | 158 | hintText: '输入分类名称', |
| 158 | lenghtLimit: true, | 159 | lenghtLimit: true, |
| 159 | toast: '请输入分类名称', rCallback: (name) { | 160 | toast: '请输入分类名称', rCallback: (name) { |
| @@ -291,7 +291,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -291,7 +291,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 291 | fontWeight: | 291 | fontWeight: |
| 292 | FontWeight.bold), | 292 | FontWeight.bold), |
| 293 | ), | 293 | ), |
| 294 | - VEmptyView(10), | 294 | + VEmptyView(8), |
| 295 | Text( | 295 | Text( |
| 296 | '${model.price}元/${model.unit}', | 296 | '${model.price}元/${model.unit}', |
| 297 | style: TextStyle( | 297 | style: TextStyle( |
| @@ -17,6 +17,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | @@ -17,6 +17,8 @@ import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 17 | import 'package:one_key/widgets/v_empty_view.dart'; | 17 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 18 | import 'package:provider/provider.dart'; | 18 | import 'package:provider/provider.dart'; |
| 19 | 19 | ||
| 20 | +import '../../../utils/screen_util.dart'; | ||
| 21 | + | ||
| 20 | class PersonnelManagePage extends StatefulWidget { | 22 | class PersonnelManagePage extends StatefulWidget { |
| 21 | PersonnelManagePage({Key key}) : super(key: key); | 23 | PersonnelManagePage({Key key}) : super(key: key); |
| 22 | 24 | ||
| @@ -378,24 +380,33 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> { | @@ -378,24 +380,33 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> { | ||
| 378 | CrossAxisAlignment | 380 | CrossAxisAlignment |
| 379 | .center, | 381 | .center, |
| 380 | children: [ | 382 | children: [ |
| 381 | - Text( | ||
| 382 | - model.nickName != | ||
| 383 | - null && | ||
| 384 | - model.nickName != | ||
| 385 | - 'null' | ||
| 386 | - ? model.nickName | ||
| 387 | - : '暂未设置名称', | ||
| 388 | - style: TextStyle( | ||
| 389 | - fontSize: | ||
| 390 | - ScreenUtil() | ||
| 391 | - .setWidth( | ||
| 392 | - 32), | ||
| 393 | - color: isWechat | ||
| 394 | - ? MyColours | ||
| 395 | - .color_438E93 | ||
| 396 | - : MyColours | ||
| 397 | - .color_999999), | ||
| 398 | - ), | 383 | + Container( |
| 384 | + constraints: | ||
| 385 | + BoxConstraints( | ||
| 386 | + maxWidth: | ||
| 387 | + w(120)), | ||
| 388 | + child: Text( | ||
| 389 | + model.nickName != | ||
| 390 | + null && | ||
| 391 | + model.nickName != | ||
| 392 | + 'null' | ||
| 393 | + ? model.nickName | ||
| 394 | + : '暂未设置名称', | ||
| 395 | + style: TextStyle( | ||
| 396 | + fontSize: | ||
| 397 | + ScreenUtil() | ||
| 398 | + .setWidth( | ||
| 399 | + 32), | ||
| 400 | + color: isWechat | ||
| 401 | + ? MyColours | ||
| 402 | + .color_438E93 | ||
| 403 | + : MyColours | ||
| 404 | + .color_999999), | ||
| 405 | + overflow: | ||
| 406 | + TextOverflow | ||
| 407 | + .ellipsis, | ||
| 408 | + maxLines: 10, | ||
| 409 | + )), | ||
| 399 | HEmptyView(8), | 410 | HEmptyView(8), |
| 400 | Text( | 411 | Text( |
| 401 | model.phone ?? '', | 412 | model.phone ?? '', |
| @@ -425,6 +425,16 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { | @@ -425,6 +425,16 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { | ||
| 425 | SetSellerInfoSunModel sunModel = | 425 | SetSellerInfoSunModel sunModel = |
| 426 | await _baseIndoProvider.setSellerInfoById(context, formData); | 426 | await _baseIndoProvider.setSellerInfoById(context, formData); |
| 427 | if (sunModel != null) { | 427 | if (sunModel != null) { |
| 428 | + UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 429 | + userModel.user.morning = morningStr; | ||
| 430 | + userModel.user.noon = noonStr; | ||
| 431 | + userModel.user.night = nightStr; | ||
| 432 | + print(userModel.user); | ||
| 433 | + // morning = | ||
| 434 | + // userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning; | ||
| 435 | + // noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon; | ||
| 436 | + // night = userModel.user.night.isEmpty ? "0 | ||
| 437 | + | ||
| 428 | //修改成功 | 438 | //修改成功 |
| 429 | Utils.showToast('保存店铺信息成功'); | 439 | Utils.showToast('保存店铺信息成功'); |
| 430 | EventBus().emit('changeStatusColor'); | 440 | EventBus().emit('changeStatusColor'); |
| @@ -293,6 +293,11 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { | @@ -293,6 +293,11 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { | ||
| 293 | tableManagerModel.tableOuterList[i].selectTables | 293 | tableManagerModel.tableOuterList[i].selectTables |
| 294 | .removeWhere((t) => t.id == table.id); | 294 | .removeWhere((t) => t.id == table.id); |
| 295 | } | 295 | } |
| 296 | + tableManagerModel | ||
| 297 | + .tableOuterList[tableManagerModel.selectNumber] | ||
| 298 | + .isAll = | ||
| 299 | + tableManagerModel.tableOuterList[i].list | ||
| 300 | + .every((element) => element.selected); | ||
| 296 | } else { | 301 | } else { |
| 297 | // for (t.Table item | 302 | // for (t.Table item |
| 298 | // in tableManagerModel.tableOuterList[i].list) { | 303 | // in tableManagerModel.tableOuterList[i].list) { |
| @@ -1273,12 +1273,12 @@ class CustomerProvider extends ChangeNotifier { | @@ -1273,12 +1273,12 @@ class CustomerProvider extends ChangeNotifier { | ||
| 1273 | sellerManageList = []; | 1273 | sellerManageList = []; |
| 1274 | if (sunmodel != null && sunmodel.length > 0) { | 1274 | if (sunmodel != null && sunmodel.length > 0) { |
| 1275 | for (GetSellerUserBySelleridSunModel item in sunmodel) { | 1275 | for (GetSellerUserBySelleridSunModel item in sunmodel) { |
| 1276 | - if (item.nickName != null) { | 1276 | + // if (item.nickName != null) { |
| 1277 | FilterBtnModel model = FilterBtnModel(); | 1277 | FilterBtnModel model = FilterBtnModel(); |
| 1278 | model.id = item.id; | 1278 | model.id = item.id; |
| 1279 | - model.title = item.nickName; | 1279 | + model.title = item.nickName ?? item.account; |
| 1280 | sellerManageList.add(model); | 1280 | sellerManageList.add(model); |
| 1281 | - } | 1281 | + // } |
| 1282 | } | 1282 | } |
| 1283 | } | 1283 | } |
| 1284 | } else { | 1284 | } else { |
| @@ -1615,11 +1615,11 @@ class FeastModel extends ChangeNotifier { | @@ -1615,11 +1615,11 @@ class FeastModel extends ChangeNotifier { | ||
| 1615 | if (baseResp.code == Constant.status_success) { | 1615 | if (baseResp.code == Constant.status_success) { |
| 1616 | if (baseResp.data == false) { | 1616 | if (baseResp.data == false) { |
| 1617 | isDepositBack = false; | 1617 | isDepositBack = false; |
| 1618 | - Map<String, String> pramas = { | 1618 | + Map<String, String> setpramas = { |
| 1619 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 1619 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| 1620 | 'is_deposit_back': '0' | 1620 | 'is_deposit_back': '0' |
| 1621 | }; | 1621 | }; |
| 1622 | - await setBanquetConf(context, params); | 1622 | + await setBanquetConf(context, setpramas); |
| 1623 | } else { | 1623 | } else { |
| 1624 | isDepositBack = baseResp.data['is_deposit_back'] == '1' ? true : false; | 1624 | isDepositBack = baseResp.data['is_deposit_back'] == '1' ? true : false; |
| 1625 | } | 1625 | } |
| @@ -190,6 +190,27 @@ class MenuManageProvider extends ChangeNotifier { | @@ -190,6 +190,27 @@ class MenuManageProvider extends ChangeNotifier { | ||
| 190 | return false; | 190 | return false; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | + | ||
| 194 | +///修改菜品 | ||
| 195 | + Future<bool> setCookbookById(BuildContext context, Map<String, String> params, | ||
| 196 | + {showLoading = false}) async { | ||
| 197 | + BaseResp<dynamic> baseResp = await DioUtil() | ||
| 198 | + .request<dynamic>(context, Method.get, HttpUrl.set_cookbook_by_id, | ||
| 199 | + data: params, showLoading: showLoading) | ||
| 200 | + .catchError((error) { | ||
| 201 | + print(error.toString()); | ||
| 202 | + }); | ||
| 203 | + | ||
| 204 | + if (baseResp != null && baseResp.code == Constant.status_success) { | ||
| 205 | + if (baseResp.data['data'] != '') { | ||
| 206 | + return true; | ||
| 207 | + } | ||
| 208 | + } else { | ||
| 209 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 210 | + } | ||
| 211 | + return false; | ||
| 212 | + } | ||
| 213 | + | ||
| 193 | ///添加菜品分类信息 | 214 | ///添加菜品分类信息 |
| 194 | 215 | ||
| 195 | Future<bool> addCookbookClass( | 216 | Future<bool> addCookbookClass( |
| @@ -329,6 +329,16 @@ class MyTableManageHomeModel with ChangeNotifier { | @@ -329,6 +329,16 @@ class MyTableManageHomeModel with ChangeNotifier { | ||
| 329 | } else { | 329 | } else { |
| 330 | Utils.showToast(baseResp.msg ?? '删除区域失败!'); | 330 | Utils.showToast(baseResp.msg ?? '删除区域失败!'); |
| 331 | } | 331 | } |
| 332 | + } else if (baseResp.code == 402) { | ||
| 333 | + if (baseResp.msg.contains('非法请求:')) { | ||
| 334 | + String msg = baseResp.msg.substring(5, baseResp.msg.length); | ||
| 335 | + if (msg.endsWith(',')) { | ||
| 336 | + msg = msg.substring(0, msg.length - 1); | ||
| 337 | + } | ||
| 338 | + Utils.showToast('桌位“${msg}”还有未赴约预订,不能被删除。'); | ||
| 339 | + } else { | ||
| 340 | + Utils.showToast('桌位还有未赴约预订,不能被删除。'); | ||
| 341 | + } | ||
| 332 | } else { | 342 | } else { |
| 333 | Utils.showToast(baseResp.msg ?? '删除区域失败!'); | 343 | Utils.showToast(baseResp.msg ?? '删除区域失败!'); |
| 334 | } | 344 | } |
| @@ -167,11 +167,15 @@ class PersonnelProvider extends ChangeNotifier { | @@ -167,11 +167,15 @@ class PersonnelProvider extends ChangeNotifier { | ||
| 167 | print(error.toString()); | 167 | print(error.toString()); |
| 168 | }); | 168 | }); |
| 169 | if (baseResp != null && baseResp.code == Constant.status_success) { | 169 | if (baseResp != null && baseResp.code == Constant.status_success) { |
| 170 | - if (baseResp.data.length == 1 && baseResp.data[0] == 1) { | 170 | + if (baseResp.data.length == 1 ) { |
| 171 | return true; | 171 | return true; |
| 172 | } | 172 | } |
| 173 | } else { | 173 | } else { |
| 174 | - Utils.showToast(baseResp.msg ?? ""); | 174 | + if (baseResp.code == 397) { |
| 175 | + return true; | ||
| 176 | + } else { | ||
| 177 | + Utils.showToast(baseResp.msg ?? ""); | ||
| 178 | + } | ||
| 175 | } | 179 | } |
| 176 | return false; | 180 | return false; |
| 177 | } | 181 | } |
| @@ -187,9 +191,9 @@ class PersonnelProvider extends ChangeNotifier { | @@ -187,9 +191,9 @@ class PersonnelProvider extends ChangeNotifier { | ||
| 187 | print(error.toString()); | 191 | print(error.toString()); |
| 188 | }); | 192 | }); |
| 189 | if (baseResp != null && baseResp.code == Constant.status_success) { | 193 | if (baseResp != null && baseResp.code == Constant.status_success) { |
| 190 | - if (baseResp.data == 1) { | 194 | + // if (baseResp.data == 1) { |
| 191 | return true; | 195 | return true; |
| 192 | - } | 196 | + // } |
| 193 | } else { | 197 | } else { |
| 194 | Utils.showToast(baseResp.msg ?? ""); | 198 | Utils.showToast(baseResp.msg ?? ""); |
| 195 | } | 199 | } |
| @@ -627,7 +627,7 @@ class DialogUtil { | @@ -627,7 +627,7 @@ class DialogUtil { | ||
| 627 | ], | 627 | ], |
| 628 | ), | 628 | ), |
| 629 | ), | 629 | ), |
| 630 | - VEmptyView(80), | 630 | + VEmptyView(60), |
| 631 | MyDivider(double.infinity, ScreenUtil().setWidth(2), | 631 | MyDivider(double.infinity, ScreenUtil().setWidth(2), |
| 632 | color: MyColours.color_f3f3f3), | 632 | color: MyColours.color_f3f3f3), |
| 633 | Row( | 633 | Row( |
| @@ -975,11 +975,11 @@ class DialogUtil { | @@ -975,11 +975,11 @@ class DialogUtil { | ||
| 975 | 975 | ||
| 976 | return; | 976 | return; |
| 977 | } | 977 | } |
| 978 | - if (numC.text.trim() == '') { | ||
| 979 | - Utils.showToast('请输入菜品数量!'); | 978 | + // if (numC.text.trim() == '') { |
| 979 | + // Utils.showToast('请输入菜品数量!'); | ||
| 980 | 980 | ||
| 981 | - return; | ||
| 982 | - } | 981 | + // return; |
| 982 | + // } | ||
| 983 | if (perC.text.trim() == '') { | 983 | if (perC.text.trim() == '') { |
| 984 | Utils.showToast('请输入${pricetitle}!'); | 984 | Utils.showToast('请输入${pricetitle}!'); |
| 985 | return; | 985 | return; |
| @@ -3377,7 +3377,7 @@ class DialogUtil { | @@ -3377,7 +3377,7 @@ class DialogUtil { | ||
| 3377 | ], | 3377 | ], |
| 3378 | ), | 3378 | ), |
| 3379 | ), | 3379 | ), |
| 3380 | - VEmptyView(80), | 3380 | + VEmptyView(70), |
| 3381 | RoundButton( | 3381 | RoundButton( |
| 3382 | text: '保存', | 3382 | text: '保存', |
| 3383 | width: ScreenUtil().setWidth(300), | 3383 | width: ScreenUtil().setWidth(300), |
| @@ -5462,22 +5462,25 @@ class DialogUtil { | @@ -5462,22 +5462,25 @@ class DialogUtil { | ||
| 5462 | fontSize: ScreenUtil().setSp(fontSize), | 5462 | fontSize: ScreenUtil().setSp(fontSize), |
| 5463 | color: MyColours.color_353535)), | 5463 | color: MyColours.color_353535)), |
| 5464 | ), | 5464 | ), |
| 5465 | - Positioned( | ||
| 5466 | - right: 0, | ||
| 5467 | - top: 0, | ||
| 5468 | - child: InkWell( | ||
| 5469 | - onTap: delCallback, | ||
| 5470 | - child: Padding( | ||
| 5471 | - padding: EdgeInsets.only( | ||
| 5472 | - top: ScreenUtil().setWidth(36)), | ||
| 5473 | - child: Text('删除', | ||
| 5474 | - style: TextStyle( | ||
| 5475 | - decoration: | ||
| 5476 | - TextDecoration.underline, | ||
| 5477 | - fontSize: | ||
| 5478 | - ScreenUtil().setSp(26), | ||
| 5479 | - color: MyColours.color_199095)), | ||
| 5480 | - ))) | 5465 | + monthStr == '' |
| 5466 | + ? SizedBox() | ||
| 5467 | + : Positioned( | ||
| 5468 | + right: 0, | ||
| 5469 | + top: 0, | ||
| 5470 | + child: InkWell( | ||
| 5471 | + onTap: delCallback, | ||
| 5472 | + child: Padding( | ||
| 5473 | + padding: EdgeInsets.only( | ||
| 5474 | + top: ScreenUtil().setWidth(36)), | ||
| 5475 | + child: Text('删除', | ||
| 5476 | + style: TextStyle( | ||
| 5477 | + decoration: TextDecoration | ||
| 5478 | + .underline, | ||
| 5479 | + fontSize: | ||
| 5480 | + ScreenUtil().setSp(26), | ||
| 5481 | + color: MyColours | ||
| 5482 | + .color_199095)), | ||
| 5483 | + ))) | ||
| 5481 | ]), | 5484 | ]), |
| 5482 | 5485 | ||
| 5483 | Container( | 5486 | Container( |
| @@ -6016,8 +6019,8 @@ class DialogUtil { | @@ -6016,8 +6019,8 @@ class DialogUtil { | ||
| 6016 | //输入弹框 | 6019 | //输入弹框 |
| 6017 | static Future textfeildAlertDialog(BuildContext context, | 6020 | static Future textfeildAlertDialog(BuildContext context, |
| 6018 | {String title = "标题", | 6021 | {String title = "标题", |
| 6019 | - String text = "内容", | ||
| 6020 | - String hintText = "内容", | 6022 | + String text = "", |
| 6023 | + String hintText = "请输入", | ||
| 6021 | String lTitle = "取消", | 6024 | String lTitle = "取消", |
| 6022 | String rTitle = "确定", | 6025 | String rTitle = "确定", |
| 6023 | String toast = '请输入', | 6026 | String toast = '请输入', |
-
Please register or login to post a comment