Showing
25 changed files
with
3184 additions
and
1098 deletions
Too many changes to show.
To preserve performance only 25 of 25+ files are displayed.
| @@ -20,19 +20,19 @@ if (flutterRoot == null) { | @@ -20,19 +20,19 @@ if (flutterRoot == null) { | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -def flutterVersionCode = "580" | 23 | +def flutterVersionCode = "700" |
| 24 | if (flutterVersionCode == null) { | 24 | if (flutterVersionCode == null) { |
| 25 | - flutterVersionCode = '580' | 25 | + flutterVersionCode = '700' |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | -def flutterVersionName = "5.8.0" | 32 | +def flutterVersionName = "7.0.0" |
| 33 | 33 | ||
| 34 | if (flutterVersionName == null) { | 34 | if (flutterVersionName == null) { |
| 35 | - flutterVersionName = '5.8.0' | 35 | + flutterVersionName = '7.0.0' |
| 36 | 36 | ||
| 37 | } | 37 | } |
| 38 | 38 |
| @@ -87,6 +87,14 @@ class Constant { | @@ -87,6 +87,14 @@ class Constant { | ||
| 87 | '管理员', | 87 | '管理员', |
| 88 | '店长', | 88 | '店长', |
| 89 | ], | 89 | ], |
| 90 | + '消费金': [ | ||
| 91 | + '管理员', | ||
| 92 | + '店长', | ||
| 93 | + ], | ||
| 94 | + '会员充值': [ | ||
| 95 | + '管理员', | ||
| 96 | + '店长', | ||
| 97 | + ], | ||
| 90 | '评价管理': [ | 98 | '评价管理': [ |
| 91 | '管理员', | 99 | '管理员', |
| 92 | '店长', | 100 | '店长', |
| @@ -233,6 +241,16 @@ class Constant { | @@ -233,6 +241,16 @@ class Constant { | ||
| 233 | '管理员', | 241 | '管理员', |
| 234 | '店长', | 242 | '店长', |
| 235 | ], | 243 | ], |
| 244 | + | ||
| 245 | + '预订管理': [ | ||
| 246 | + '管理员', | ||
| 247 | + '店长', | ||
| 248 | + ], | ||
| 249 | + | ||
| 250 | + '客户管理': [ | ||
| 251 | + '管理员', | ||
| 252 | + '店长', | ||
| 253 | + ], | ||
| 236 | '优惠券详情-编辑发放人': [ | 254 | '优惠券详情-编辑发放人': [ |
| 237 | '管理员', | 255 | '管理员', |
| 238 | '店长', | 256 | '店长', |
| @@ -196,10 +196,10 @@ class _CouponPageState extends State<CouponPage> with TickerProviderStateMixin { | @@ -196,10 +196,10 @@ class _CouponPageState extends State<CouponPage> with TickerProviderStateMixin { | ||
| 196 | appBar: Utils.getAuthority(context, '线上券-设置') | 196 | appBar: Utils.getAuthority(context, '线上券-设置') |
| 197 | ? SystemAppBar( | 197 | ? SystemAppBar( |
| 198 | '优惠券', | 198 | '优惠券', |
| 199 | - rightImgName: 'set_g.png', | ||
| 200 | - onTapRight: () { | ||
| 201 | - NavigatorUtil.goCouponSettingPage(context); | ||
| 202 | - }, | 199 | + // rightImgName: 'set_g.png', |
| 200 | + // onTapRight: () { | ||
| 201 | + // NavigatorUtil.goCouponSettingPage(context); | ||
| 202 | + // }, | ||
| 203 | ) | 203 | ) |
| 204 | : SystemAppBar( | 204 | : SystemAppBar( |
| 205 | '优惠券', | 205 | '优惠券', |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/provider/user_model.dart'; | ||
| 4 | +import 'package:one_key/res/colors.dart'; | ||
| 5 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 6 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 7 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 8 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 9 | +import 'package:provider/provider.dart'; | ||
| 10 | + | ||
| 11 | +import '../../../utils/screen_util.dart'; | ||
| 12 | +import '../../../widgets/system_app_bar.dart'; | ||
| 13 | + | ||
| 14 | +/*** | ||
| 15 | + * 预订管理首页 | ||
| 16 | + */ | ||
| 17 | + | ||
| 18 | +class BookManageHomePage extends StatefulWidget { | ||
| 19 | + BookManageHomePage({ | ||
| 20 | + Key? key, | ||
| 21 | + }) : super(key: key); | ||
| 22 | + | ||
| 23 | + @override | ||
| 24 | + _BookManageHomePageState createState() => _BookManageHomePageState(); | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class _BookManageHomePageState extends State<BookManageHomePage> { | ||
| 28 | + @override | ||
| 29 | + void initState() { | ||
| 30 | + super.initState(); | ||
| 31 | + | ||
| 32 | + WidgetsBinding.instance.addPostFrameCallback((_) {}); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @override | ||
| 36 | + void dispose() { | ||
| 37 | + EventBus().emit('changeStatusColor'); | ||
| 38 | + | ||
| 39 | + super.dispose(); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + @override | ||
| 43 | + Widget build(BuildContext context) { | ||
| 44 | + UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 45 | + return Scaffold( | ||
| 46 | + backgroundColor: Colors.white, | ||
| 47 | + appBar: SystemAppBar( | ||
| 48 | + '预订管理', | ||
| 49 | + ), | ||
| 50 | + body: Column( | ||
| 51 | + children: [ | ||
| 52 | + Expanded( | ||
| 53 | + child: SingleChildScrollView( | ||
| 54 | + child: Column( | ||
| 55 | + children: [ | ||
| 56 | + InkWell( | ||
| 57 | + onTap: () async { | ||
| 58 | + // | ||
| 59 | + NavigatorUtil.goCustomerNoticeSettingPage(context); | ||
| 60 | + }, | ||
| 61 | + child: Padding( | ||
| 62 | + padding: EdgeInsets.only( | ||
| 63 | + left: w(16), | ||
| 64 | + top: w(12), | ||
| 65 | + bottom: w(12), | ||
| 66 | + right: w(12)), | ||
| 67 | + child: Row( | ||
| 68 | + children: [ | ||
| 69 | + Text( | ||
| 70 | + '客户通知设置', | ||
| 71 | + style: TextStyle( | ||
| 72 | + color: MyColours.color_515151, | ||
| 73 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 74 | + ), | ||
| 75 | + Spacer(), | ||
| 76 | + Container( | ||
| 77 | + padding: EdgeInsets.symmetric( | ||
| 78 | + horizontal: w(7), vertical: w(4)), | ||
| 79 | + child: Image.asset( | ||
| 80 | + "assets/arrow_right_new.png", | ||
| 81 | + width: ScreenUtil().setWidth(18), | ||
| 82 | + height: ScreenUtil().setWidth(32), | ||
| 83 | + ), | ||
| 84 | + ) | ||
| 85 | + ], | ||
| 86 | + ))), | ||
| 87 | + Padding( | ||
| 88 | + padding: EdgeInsets.only(left: w(16)), | ||
| 89 | + child: MyDivider(double.infinity, w(0.5), | ||
| 90 | + color: MyColours.color_E7E7E7)), | ||
| 91 | + VEmptyView(24), | ||
| 92 | + InkWell( | ||
| 93 | + onTap: () { | ||
| 94 | + // | ||
| 95 | + NavigatorUtil.goPaymentSettingPage(context); | ||
| 96 | + }, | ||
| 97 | + child: Padding( | ||
| 98 | + padding: EdgeInsets.only( | ||
| 99 | + left: w(16), | ||
| 100 | + top: w(12), | ||
| 101 | + bottom: w(12), | ||
| 102 | + right: w(12)), | ||
| 103 | + child: Row( | ||
| 104 | + children: [ | ||
| 105 | + Text( | ||
| 106 | + '预订订金设置', | ||
| 107 | + style: TextStyle( | ||
| 108 | + color: MyColours.color_515151, | ||
| 109 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 110 | + ), | ||
| 111 | + Spacer(), | ||
| 112 | + Container( | ||
| 113 | + padding: EdgeInsets.symmetric( | ||
| 114 | + horizontal: w(7), vertical: w(4)), | ||
| 115 | + child: Image.asset( | ||
| 116 | + "assets/arrow_right_new.png", | ||
| 117 | + width: ScreenUtil().setWidth(18), | ||
| 118 | + height: ScreenUtil().setWidth(32), | ||
| 119 | + ), | ||
| 120 | + ) | ||
| 121 | + ], | ||
| 122 | + ))), | ||
| 123 | + Padding( | ||
| 124 | + padding: EdgeInsets.only(left: w(16)), | ||
| 125 | + child: MyDivider(double.infinity, w(0.5), | ||
| 126 | + color: MyColours.color_E7E7E7)), | ||
| 127 | + VEmptyView(24), | ||
| 128 | + InkWell( | ||
| 129 | + onTap: () { | ||
| 130 | + // | ||
| 131 | + | ||
| 132 | + // NavigatorUtil.goCustomLabelPage(context); | ||
| 133 | + | ||
| 134 | + NavigatorUtil.goCommentsSettingPage(context); | ||
| 135 | + }, | ||
| 136 | + child: Padding( | ||
| 137 | + padding: EdgeInsets.only( | ||
| 138 | + left: w(16), | ||
| 139 | + top: w(12), | ||
| 140 | + bottom: w(12), | ||
| 141 | + right: w(12)), | ||
| 142 | + child: Row( | ||
| 143 | + children: [ | ||
| 144 | + Text( | ||
| 145 | + '意见反馈设置', | ||
| 146 | + style: TextStyle( | ||
| 147 | + color: MyColours.color_515151, | ||
| 148 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 149 | + ), | ||
| 150 | + Spacer(), | ||
| 151 | + Container( | ||
| 152 | + padding: EdgeInsets.symmetric( | ||
| 153 | + horizontal: w(7), vertical: w(4)), | ||
| 154 | + child: Image.asset( | ||
| 155 | + "assets/arrow_right_new.png", | ||
| 156 | + width: ScreenUtil().setWidth(18), | ||
| 157 | + height: ScreenUtil().setWidth(32), | ||
| 158 | + ), | ||
| 159 | + ) | ||
| 160 | + ], | ||
| 161 | + ))), | ||
| 162 | + Padding( | ||
| 163 | + padding: EdgeInsets.only(left: w(16)), | ||
| 164 | + child: MyDivider(double.infinity, w(0.5), | ||
| 165 | + color: MyColours.color_E7E7E7)), | ||
| 166 | + VEmptyView(24), | ||
| 167 | + InkWell( | ||
| 168 | + onTap: () { | ||
| 169 | + // | ||
| 170 | + | ||
| 171 | + NavigatorUtil.goOrderManageHomePage(context); | ||
| 172 | + }, | ||
| 173 | + child: Padding( | ||
| 174 | + padding: EdgeInsets.only( | ||
| 175 | + left: w(16), | ||
| 176 | + top: w(12), | ||
| 177 | + bottom: w(12), | ||
| 178 | + right: w(12)), | ||
| 179 | + child: Row( | ||
| 180 | + children: [ | ||
| 181 | + Text( | ||
| 182 | + '预订订单管理', | ||
| 183 | + style: TextStyle( | ||
| 184 | + color: MyColours.color_515151, | ||
| 185 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 186 | + ), | ||
| 187 | + Spacer(), | ||
| 188 | + Container( | ||
| 189 | + padding: EdgeInsets.symmetric( | ||
| 190 | + horizontal: w(7), vertical: w(4)), | ||
| 191 | + child: Image.asset( | ||
| 192 | + "assets/arrow_right_new.png", | ||
| 193 | + width: ScreenUtil().setWidth(18), | ||
| 194 | + height: ScreenUtil().setWidth(32), | ||
| 195 | + ), | ||
| 196 | + ) | ||
| 197 | + ], | ||
| 198 | + ))), | ||
| 199 | + Padding( | ||
| 200 | + padding: EdgeInsets.only(left: w(16)), | ||
| 201 | + child: MyDivider(double.infinity, w(0.5), | ||
| 202 | + color: MyColours.color_E7E7E7)), | ||
| 203 | + ], | ||
| 204 | + ), | ||
| 205 | + )), | ||
| 206 | + ], | ||
| 207 | + )); | ||
| 208 | + } | ||
| 209 | +} |
| 1 | +import 'dart:async'; | ||
| 2 | +import 'dart:convert'; | ||
| 3 | + | ||
| 4 | +import 'package:flutter/material.dart'; | ||
| 5 | +import 'package:flutter/services.dart'; | ||
| 6 | +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; | ||
| 7 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 8 | +import 'package:one_key/models/customer_label_model.dart'; | ||
| 9 | +import 'package:one_key/provider/customer_provider.dart'; | ||
| 10 | +import 'package:one_key/provider/user_model.dart'; | ||
| 11 | +import 'package:one_key/res/colors.dart'; | ||
| 12 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 13 | +import 'package:one_key/utils/utils.dart'; | ||
| 14 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 15 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 16 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 17 | +import 'package:provider/provider.dart'; | ||
| 18 | + | ||
| 19 | +import '../../../../provider/marketing_center_provider.dart'; | ||
| 20 | +import '../../../../utils/screen_util.dart'; | ||
| 21 | +import '../../../../widgets/h_empty_view.dart'; | ||
| 22 | +import '../../../../widgets/round_button.dart'; | ||
| 23 | + | ||
| 24 | +class OrderCancelSetPage extends StatefulWidget { | ||
| 25 | + OrderCancelSetPage({Key? key}) : super(key: key); | ||
| 26 | + | ||
| 27 | + @override | ||
| 28 | + _OrderCancelSetPageState createState() => _OrderCancelSetPageState(); | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +class _OrderCancelSetPageState extends State<OrderCancelSetPage> { | ||
| 32 | + late CustomerProvider customerProvider; | ||
| 33 | + bool swichSync = false; //会员系统同步 | ||
| 34 | + | ||
| 35 | + String memberShow = ''; | ||
| 36 | + bool showLabel = false; | ||
| 37 | + | ||
| 38 | + late MarketingCenterProvider marketingCenterProvider; | ||
| 39 | + TextEditingController controllerDay = TextEditingController(); | ||
| 40 | + | ||
| 41 | + TextEditingController controllerDeadline = TextEditingController(); | ||
| 42 | + TextEditingController controllerConsumptionTimes = TextEditingController(); | ||
| 43 | + TextEditingController controllerHighValue = TextEditingController(); | ||
| 44 | + | ||
| 45 | + @override | ||
| 46 | + void initState() { | ||
| 47 | + WidgetsBinding.instance.addPostFrameCallback((_) async { | ||
| 48 | + // _getContantData(); | ||
| 49 | + _sellerGuestGet(); | ||
| 50 | + _getLabelBySellerid(); | ||
| 51 | + getDzSellerConf(); | ||
| 52 | + }); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + getDzSellerConf() async { | ||
| 56 | + bool success = await marketingCenterProvider.getDzSellerConf(context); | ||
| 57 | + if (success && marketingCenterProvider.dzSellerConfModel != null) { | ||
| 58 | + customerProvider.isReservePhoneApp = | ||
| 59 | + marketingCenterProvider.dzSellerConfModel!.appPhoneSwitch == '1' | ||
| 60 | + ? true | ||
| 61 | + : false; | ||
| 62 | + customerProvider.ispcphone = | ||
| 63 | + marketingCenterProvider.dzSellerConfModel!.pcNotPhone == '1' | ||
| 64 | + ? true | ||
| 65 | + : false; | ||
| 66 | + customerProvider.isAddOver = | ||
| 67 | + marketingCenterProvider.dzSellerConfModel!.isAddOver == '1' | ||
| 68 | + ? true | ||
| 69 | + : false; | ||
| 70 | + customerProvider.isSetOver = | ||
| 71 | + marketingCenterProvider.dzSellerConfModel!.isSetOver == '1' | ||
| 72 | + ? true | ||
| 73 | + : false; | ||
| 74 | + customerProvider.isReserveOver = | ||
| 75 | + marketingCenterProvider.dzSellerConfModel!.isReserveOver == '1' | ||
| 76 | + ? true | ||
| 77 | + : false; | ||
| 78 | + customerProvider.isReserveCancel = | ||
| 79 | + marketingCenterProvider.dzSellerConfModel!.isReserveCancel == '1' | ||
| 80 | + ? true | ||
| 81 | + : false; | ||
| 82 | + | ||
| 83 | + customerProvider.ispcname = | ||
| 84 | + marketingCenterProvider.dzSellerConfModel!.pcNotName == '1' | ||
| 85 | + ? true | ||
| 86 | + : false; | ||
| 87 | + | ||
| 88 | + controllerDay.text = | ||
| 89 | + marketingCenterProvider.dzSellerConfModel!.cancelDay!; | ||
| 90 | + customerProvider.cancelOrderdayShopowner = | ||
| 91 | + marketingCenterProvider.dzSellerConfModel!.cancelShopowner == '1' | ||
| 92 | + ? true | ||
| 93 | + : false; | ||
| 94 | + customerProvider.cancelOrderdayManager = | ||
| 95 | + marketingCenterProvider.dzSellerConfModel!.cancelManager == '1' | ||
| 96 | + ? true | ||
| 97 | + : false; | ||
| 98 | + customerProvider.cancelOrderdayOther = | ||
| 99 | + marketingCenterProvider.dzSellerConfModel!.cancelOther == '1' | ||
| 100 | + ? true | ||
| 101 | + : false; | ||
| 102 | + } | ||
| 103 | + setState(() {}); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + ///修改客情配置 | ||
| 107 | + | ||
| 108 | + Future<bool> _sellerGuestSet() async { | ||
| 109 | + Map<String, String?> params = { | ||
| 110 | + "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 111 | + 'is_additional': customerProvider.isrepair ? "1" : "0", | ||
| 112 | + 'is_enter_self': customerProvider.isselfphone ? '1' : '0', | ||
| 113 | + 'is_high_frequency': customerProvider.isHighFrequency ? '1' : '0', | ||
| 114 | + 'high_frequency_day': controllerDeadline.text, | ||
| 115 | + 'high_frequency_reserve': controllerConsumptionTimes.text, | ||
| 116 | + 'is_high_consumption': customerProvider.isHighConsumption ? '1' : '0', | ||
| 117 | + 'is_high_money': controllerHighValue.text | ||
| 118 | + }; | ||
| 119 | + bool success = await customerProvider.setSellerGuest(context, params, | ||
| 120 | + showLoading: true); | ||
| 121 | + if (success) { | ||
| 122 | + return true; | ||
| 123 | + } else { | ||
| 124 | + return false; | ||
| 125 | + } | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + _saveData() async { | ||
| 129 | + (bool, bool) result = await (_setConfings(), _sellerGuestSet()).wait; | ||
| 130 | + | ||
| 131 | + if (result.$1 && result.$2) { | ||
| 132 | + // 全部保存成功 | ||
| 133 | + Utils.showToast('保存成功!'); | ||
| 134 | + } else { | ||
| 135 | + Utils.showToast('保存失败,请重试'); | ||
| 136 | + } | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + Future<bool> _setConfings() async { | ||
| 140 | + Map<String, dynamic> data = { | ||
| 141 | + 'app_phone_switch': customerProvider.isReservePhoneApp ? '1' : '0', | ||
| 142 | + 'pc_not_rname': customerProvider.ispcname ? '1' : '0', | ||
| 143 | + "pc_not_phone": customerProvider.ispcphone ? '1' : '0', | ||
| 144 | + "is_add_over": customerProvider.isAddOver ? '1' : '0', | ||
| 145 | + "is_set_over": customerProvider.isSetOver ? '1' : '0', | ||
| 146 | + "is_reserve_over": customerProvider.isReserveOver ? '1' : '0', | ||
| 147 | + "is_reserve_cancel": customerProvider.isReserveCancel ? '1' : '0', | ||
| 148 | + 'temp_cancel_day': controllerDay.text, | ||
| 149 | + 'temp_for_shopowner': | ||
| 150 | + customerProvider.cancelOrderdayShopowner ? '1' : '0', | ||
| 151 | + 'temp_for_manager': customerProvider.cancelOrderdayManager ? '1' : '0', | ||
| 152 | + 'temp_for_other': customerProvider.cancelOrderdayOther ? '1' : '0', | ||
| 153 | + }; | ||
| 154 | + Map<String, String?> params = { | ||
| 155 | + 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 156 | + 'data': jsonEncode(data), | ||
| 157 | + }; | ||
| 158 | + bool success = await marketingCenterProvider.setConfings(context, params, | ||
| 159 | + needToast: false); | ||
| 160 | + if (success) { | ||
| 161 | + return true; | ||
| 162 | + } else { | ||
| 163 | + return false; | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + ///获取客情配置 | ||
| 168 | + _sellerGuestGet() async { | ||
| 169 | + bool success = await customerProvider.getSellerGuest(context); | ||
| 170 | + if (success) { | ||
| 171 | + controllerDeadline.text = | ||
| 172 | + customerProvider.sellerGuestData?.highFrequencyDay ?? ''; | ||
| 173 | + controllerConsumptionTimes.text = | ||
| 174 | + customerProvider.sellerGuestData?.highFrequencyReserve ?? ''; | ||
| 175 | + controllerHighValue.text = | ||
| 176 | + customerProvider.sellerGuestData?.isHighMoney ?? ''; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + // if (success) { | ||
| 180 | + // customerProvider.isrepair = true; | ||
| 181 | + // } else { | ||
| 182 | + // customerProvider.isrepair = false; | ||
| 183 | + // } | ||
| 184 | + setState(() {}); | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + ///获取商家标签 | ||
| 188 | + _getLabelBySellerid() async { | ||
| 189 | + await customerProvider.getLabelBySellerid(context); | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + ///商家创建商家标签 | ||
| 193 | + _createLabelBySellerid(String? name) async { | ||
| 194 | + Map<String, String?> params = { | ||
| 195 | + "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 196 | + 'label': name | ||
| 197 | + }; | ||
| 198 | + bool success = | ||
| 199 | + await customerProvider.createLabelBySellerid(context, params); | ||
| 200 | + if (success) { | ||
| 201 | + //刷新当前标签列表 | ||
| 202 | + Utils.showToast('标签添加成功'); | ||
| 203 | + //调用获取标签接口 | ||
| 204 | + // 。。。。。。 | ||
| 205 | + _getLabelBySellerid(); | ||
| 206 | + } | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + ///商家修改标签 | ||
| 210 | + _setLabelBySellerid(String? id, String? name) async { | ||
| 211 | + Map<String, String?> params = {"id": id, 'label': name}; | ||
| 212 | + bool success = await customerProvider.setLabelBySellerid(context, params); | ||
| 213 | + if (success) { | ||
| 214 | + //刷新当前标签列表 | ||
| 215 | + Utils.showToast('标签修改成功'); | ||
| 216 | + //调用获取标签接口 | ||
| 217 | + // 。。。。。。 | ||
| 218 | + _getLabelBySellerid(); | ||
| 219 | + } | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + //构建标签 | ||
| 223 | + List<Widget> _buildLabelItem(List<CustomerLabelSunModel> data) { | ||
| 224 | + List<Widget> items = []; | ||
| 225 | + | ||
| 226 | + for (CustomerLabelSunModel item in data) { | ||
| 227 | + items.add(InkWell( | ||
| 228 | + onTap: () { | ||
| 229 | + DialogUtil.textfeildAlertDialog(context, | ||
| 230 | + title: '自定义标签名称', | ||
| 231 | + hintText: '例:高频客户', | ||
| 232 | + text: item.label!, | ||
| 233 | + lenghtLimit: false, | ||
| 234 | + toast: '请输入标签名称', rCallback: (name) { | ||
| 235 | + print(name); | ||
| 236 | + _setLabelBySellerid(item.id, name as String?); | ||
| 237 | + // _addCookbookClass(name, showLoading: true); | ||
| 238 | + }); | ||
| 239 | + }, | ||
| 240 | + child: Container( | ||
| 241 | + // height: ScreenUtil().setWidth(40), | ||
| 242 | + padding: EdgeInsets.symmetric(horizontal: w(6), vertical: w(3)), | ||
| 243 | + decoration: BoxDecoration( | ||
| 244 | + border: Border.all(width: w(1), color: MyColours.color_A78E44), | ||
| 245 | + borderRadius: BorderRadius.circular(r(5))), | ||
| 246 | + child: Text( | ||
| 247 | + item.label!, | ||
| 248 | + style: TextStyle( | ||
| 249 | + color: MyColours.color_A78E44, | ||
| 250 | + fontSize: ScreenUtil().setSp(22), | ||
| 251 | + ), | ||
| 252 | + ), | ||
| 253 | + ))); | ||
| 254 | + } | ||
| 255 | + items.add(InkWell( | ||
| 256 | + onTap: () { | ||
| 257 | + DialogUtil.textfeildAlertDialog(context, | ||
| 258 | + title: '自定义标签名称', | ||
| 259 | + hintText: '例:高频客户', | ||
| 260 | + text: '', | ||
| 261 | + lenghtLimit: false, | ||
| 262 | + toast: '请输入标签名称', | ||
| 263 | + lCallback: () {}, rCallback: (name) { | ||
| 264 | + print(name); | ||
| 265 | + // _addCookbookClass(name, showLoading: true); | ||
| 266 | + _createLabelBySellerid(name as String?); | ||
| 267 | + }); | ||
| 268 | + }, | ||
| 269 | + child: Container( | ||
| 270 | + width: ScreenUtil().setWidth(90), | ||
| 271 | + height: ScreenUtil().setWidth(40), | ||
| 272 | + alignment: Alignment.center, | ||
| 273 | + decoration: BoxDecoration( | ||
| 274 | + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 275 | + border: Border.all( | ||
| 276 | + color: MyColours.color_199095, | ||
| 277 | + width: ScreenUtil().setWidth(2))), | ||
| 278 | + child: Image.asset(Utils.getImgPath('add_area'), | ||
| 279 | + width: ScreenUtil().setWidth(14)), | ||
| 280 | + ), | ||
| 281 | + )); | ||
| 282 | + return items; | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + Widget _itemWidget(String title, String hintText, | ||
| 286 | + TextEditingController controller, FocusNode node) { | ||
| 287 | + return Row( | ||
| 288 | + children: [ | ||
| 289 | + Container( | ||
| 290 | + width: w(112), | ||
| 291 | + child: Text( | ||
| 292 | + title, | ||
| 293 | + style: TextStyle( | ||
| 294 | + color: MyColours.color_515151, | ||
| 295 | + fontSize: ScreenUtil().setSp(32)), | ||
| 296 | + )), | ||
| 297 | + HEmptyView(24), | ||
| 298 | + Expanded( | ||
| 299 | + child: Container( | ||
| 300 | + height: w(30), | ||
| 301 | + padding: EdgeInsets.symmetric(horizontal: w(10)), | ||
| 302 | + alignment: Alignment.center, | ||
| 303 | + decoration: BoxDecoration( | ||
| 304 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 305 | + border: | ||
| 306 | + Border.all(color: MyColours.color_E7E7E7, width: w(1)), | ||
| 307 | + ), | ||
| 308 | + child: TextField( | ||
| 309 | + controller: controller, | ||
| 310 | + focusNode: node, | ||
| 311 | + // autofocus: _sellerCodeController.text.isEmpty, | ||
| 312 | + style: TextStyle( | ||
| 313 | + color: MyColours.color_515151, | ||
| 314 | + fontSize: ScreenUtil().setSp(24), | ||
| 315 | + ), | ||
| 316 | + textAlignVertical: TextAlignVertical.top, | ||
| 317 | + decoration: InputDecoration( | ||
| 318 | + hintText: hintText, | ||
| 319 | + hintStyle: TextStyle( | ||
| 320 | + color: MyColours.color_999999, | ||
| 321 | + fontSize: ScreenUtil().setSp(24), | ||
| 322 | + ), | ||
| 323 | + contentPadding: EdgeInsets.zero, | ||
| 324 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 325 | + ), | ||
| 326 | + onChanged: (_) { | ||
| 327 | + // setActivate(); | ||
| 328 | + }, | ||
| 329 | + keyboardType: TextInputType.numberWithOptions(decimal: true), | ||
| 330 | + ))), | ||
| 331 | + ], | ||
| 332 | + ); | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + @override | ||
| 336 | + Widget build(BuildContext context) { | ||
| 337 | + customerProvider = Provider.of<CustomerProvider>(context, listen: true); | ||
| 338 | + marketingCenterProvider = | ||
| 339 | + Provider.of<MarketingCenterProvider>(context, listen: true); | ||
| 340 | + return KeyboardDismissOnTap( | ||
| 341 | + child: Scaffold( | ||
| 342 | + backgroundColor: MyColours.color_ffffff, | ||
| 343 | + appBar: SystemAppBar( | ||
| 344 | + '临餐取消预订限制设置', | ||
| 345 | + onTap: () { | ||
| 346 | + if (Navigator.canPop(context)) { | ||
| 347 | + Navigator.pop(context); | ||
| 348 | + } | ||
| 349 | + }, | ||
| 350 | + ), | ||
| 351 | + body: Padding( | ||
| 352 | + padding: EdgeInsets.only( | ||
| 353 | + left: ScreenUtil().setWidth(0), top: ScreenUtil().setWidth(40)), | ||
| 354 | + child: Column( | ||
| 355 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 356 | + children: [ | ||
| 357 | + Expanded( | ||
| 358 | + child: SingleChildScrollView( | ||
| 359 | + child: Column( | ||
| 360 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 361 | + children: [ | ||
| 362 | + Row( | ||
| 363 | + children: [ | ||
| 364 | + Expanded( | ||
| 365 | + child: Container( | ||
| 366 | + padding: EdgeInsets.symmetric( | ||
| 367 | + vertical: w(8), horizontal: w(14)), | ||
| 368 | + child: Text('临餐取消预订限制(前台及管理员除外)', | ||
| 369 | + overflow: TextOverflow.ellipsis, | ||
| 370 | + maxLines: 10, | ||
| 371 | + style: TextStyle( | ||
| 372 | + color: MyColours.color_515151, | ||
| 373 | + fontSize: ScreenUtil().setSp(28))))), | ||
| 374 | + HEmptyView(2), | ||
| 375 | + Container( | ||
| 376 | + width: w(40), | ||
| 377 | + child: TextField( | ||
| 378 | + controller: controllerDay, | ||
| 379 | + textAlign: TextAlign.right, | ||
| 380 | + textAlignVertical: TextAlignVertical.bottom, | ||
| 381 | + maxLines: 1, | ||
| 382 | + // //光标颜色 | ||
| 383 | + // cursorColor: | ||
| 384 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 385 | + //输入文本的样式 | ||
| 386 | + style: TextStyle( | ||
| 387 | + color: MyColours.color_515151, | ||
| 388 | + fontSize: ScreenUtil().setSp(32), | ||
| 389 | + ), | ||
| 390 | + inputFormatters: <TextInputFormatter>[ | ||
| 391 | + FilteringTextInputFormatter.allow( | ||
| 392 | + RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 393 | + ], | ||
| 394 | + decoration: InputDecoration( | ||
| 395 | + isCollapsed: true, | ||
| 396 | + border: | ||
| 397 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 398 | + hintText: '输入', | ||
| 399 | + hintStyle: TextStyle( | ||
| 400 | + color: MyColours.color_999999, | ||
| 401 | + fontSize: ScreenUtil().setSp(28), | ||
| 402 | + ), | ||
| 403 | + enabledBorder: new UnderlineInputBorder( | ||
| 404 | + borderSide: BorderSide.none, | ||
| 405 | + ), | ||
| 406 | + focusedBorder: new UnderlineInputBorder( | ||
| 407 | + borderSide: BorderSide.none, | ||
| 408 | + ), | ||
| 409 | + ), | ||
| 410 | + onChanged: (value) {}, | ||
| 411 | + onEditingComplete: () { | ||
| 412 | + FocusScope.of(context) | ||
| 413 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 414 | + }, | ||
| 415 | + keyboardType: TextInputType.number), | ||
| 416 | + ), | ||
| 417 | + Text('天', | ||
| 418 | + style: TextStyle( | ||
| 419 | + color: MyColours.color_515151, | ||
| 420 | + fontSize: ScreenUtil().setSp(28))), | ||
| 421 | + HEmptyView(28), | ||
| 422 | + ], | ||
| 423 | + ), | ||
| 424 | + VEmptyView(22), | ||
| 425 | + Padding( | ||
| 426 | + padding: EdgeInsets.symmetric(horizontal: w(14)), | ||
| 427 | + child: MyDivider( | ||
| 428 | + double.infinity, | ||
| 429 | + w(1), | ||
| 430 | + color: MyColours.color_E7E7E7, | ||
| 431 | + )), | ||
| 432 | + VEmptyView(24), | ||
| 433 | + InkWell( | ||
| 434 | + onTap: () { | ||
| 435 | + setState(() { | ||
| 436 | + customerProvider.cancelOrderdayShopowner = | ||
| 437 | + !customerProvider.cancelOrderdayShopowner; | ||
| 438 | + }); | ||
| 439 | + // _sellerGuestSet(); | ||
| 440 | + }, | ||
| 441 | + child: Container( | ||
| 442 | + padding: EdgeInsets.symmetric( | ||
| 443 | + vertical: w(8), horizontal: w(14)), | ||
| 444 | + child: Row( | ||
| 445 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 446 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 447 | + children: [ | ||
| 448 | + Text('允许店长临餐取消预订', | ||
| 449 | + style: TextStyle( | ||
| 450 | + color: MyColours.color_515151, | ||
| 451 | + fontSize: ScreenUtil().setSp(28))), | ||
| 452 | + Image.asset( | ||
| 453 | + customerProvider.cancelOrderdayShopowner | ||
| 454 | + ? Utils.getImgPath('swich_on') | ||
| 455 | + : Utils.getImgPath('swich_off'), | ||
| 456 | + width: ScreenUtil().setWidth(88), | ||
| 457 | + // height: ScreenUtil().setWidth(82), | ||
| 458 | + ), | ||
| 459 | + ], | ||
| 460 | + )), | ||
| 461 | + ), | ||
| 462 | + Padding( | ||
| 463 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 464 | + child: MyDivider( | ||
| 465 | + double.infinity, | ||
| 466 | + w(1), | ||
| 467 | + color: MyColours.color_E7E7E7, | ||
| 468 | + )), | ||
| 469 | + VEmptyView(24), | ||
| 470 | + InkWell( | ||
| 471 | + onTap: () { | ||
| 472 | + setState(() { | ||
| 473 | + customerProvider.cancelOrderdayManager = | ||
| 474 | + !customerProvider.cancelOrderdayManager; | ||
| 475 | + }); | ||
| 476 | + }, | ||
| 477 | + child: Container( | ||
| 478 | + padding: EdgeInsets.symmetric( | ||
| 479 | + vertical: w(8), horizontal: w(14)), | ||
| 480 | + child: Row( | ||
| 481 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 482 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 483 | + children: [ | ||
| 484 | + Text('允许经理临餐取消预订', | ||
| 485 | + style: TextStyle( | ||
| 486 | + color: MyColours.color_515151, | ||
| 487 | + fontSize: ScreenUtil().setSp(28))), | ||
| 488 | + Image.asset( | ||
| 489 | + customerProvider.cancelOrderdayManager | ||
| 490 | + ? Utils.getImgPath('swich_on') | ||
| 491 | + : Utils.getImgPath('swich_off'), | ||
| 492 | + width: ScreenUtil().setWidth(88), | ||
| 493 | + // height: ScreenUtil().setWidth(82), | ||
| 494 | + ), | ||
| 495 | + ], | ||
| 496 | + ), | ||
| 497 | + )), | ||
| 498 | + Padding( | ||
| 499 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 500 | + child: MyDivider( | ||
| 501 | + double.infinity, | ||
| 502 | + w(1), | ||
| 503 | + color: MyColours.color_E7E7E7, | ||
| 504 | + )), | ||
| 505 | + VEmptyView(24), | ||
| 506 | + InkWell( | ||
| 507 | + onTap: () { | ||
| 508 | + setState(() { | ||
| 509 | + customerProvider.cancelOrderdayOther = | ||
| 510 | + !customerProvider.cancelOrderdayOther; | ||
| 511 | + }); | ||
| 512 | + }, | ||
| 513 | + child: Container( | ||
| 514 | + padding: EdgeInsets.symmetric( | ||
| 515 | + vertical: w(8), horizontal: w(14)), | ||
| 516 | + child: Row( | ||
| 517 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 518 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 519 | + children: [ | ||
| 520 | + Text('允许服务员及其他人员临餐取消预订', | ||
| 521 | + style: TextStyle( | ||
| 522 | + color: MyColours.color_515151, | ||
| 523 | + fontSize: ScreenUtil().setSp(28))), | ||
| 524 | + Image.asset( | ||
| 525 | + customerProvider.cancelOrderdayOther | ||
| 526 | + ? Utils.getImgPath('swich_on') | ||
| 527 | + : Utils.getImgPath('swich_off'), | ||
| 528 | + width: ScreenUtil().setWidth(88), | ||
| 529 | + // height: ScreenUtil().setWidth(82), | ||
| 530 | + ), | ||
| 531 | + ], | ||
| 532 | + ), | ||
| 533 | + )), | ||
| 534 | + Padding( | ||
| 535 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 536 | + child: MyDivider( | ||
| 537 | + double.infinity, | ||
| 538 | + w(1), | ||
| 539 | + color: MyColours.color_E7E7E7, | ||
| 540 | + )), | ||
| 541 | + VEmptyView(48), | ||
| 542 | + // Container( | ||
| 543 | + // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 544 | + // child: Text('优质客户标记', | ||
| 545 | + // style: TextStyle( | ||
| 546 | + // color: MyColours.color_515151, | ||
| 547 | + // fontSize: ScreenUtil().setSp(32)))), | ||
| 548 | + // VEmptyView(22), | ||
| 549 | + // MyDivider( | ||
| 550 | + // double.infinity, | ||
| 551 | + // w(1), | ||
| 552 | + // color: MyColours.color_E7E7E7, | ||
| 553 | + // ), | ||
| 554 | + // VEmptyView(24), | ||
| 555 | + // InkWell( | ||
| 556 | + // onTap: () { | ||
| 557 | + // setState(() { | ||
| 558 | + // customerProvider.isHighFrequency = | ||
| 559 | + // !customerProvider.isHighFrequency; | ||
| 560 | + // }); | ||
| 561 | + // }, | ||
| 562 | + // child: Container( | ||
| 563 | + // padding: EdgeInsets.symmetric( | ||
| 564 | + // vertical: w(8), horizontal: w(14)), | ||
| 565 | + // child: Row( | ||
| 566 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 567 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 568 | + // children: [ | ||
| 569 | + // Text('高频客户标记', | ||
| 570 | + // style: TextStyle( | ||
| 571 | + // color: MyColours.color_515151, | ||
| 572 | + // fontSize: ScreenUtil().setSp(28))), | ||
| 573 | + // Image.asset( | ||
| 574 | + // customerProvider.isHighFrequency | ||
| 575 | + // ? Utils.getImgPath('swich_on') | ||
| 576 | + // : Utils.getImgPath('swich_off'), | ||
| 577 | + // width: ScreenUtil().setWidth(88), | ||
| 578 | + // // height: ScreenUtil().setWidth(82), | ||
| 579 | + // ), | ||
| 580 | + // ], | ||
| 581 | + // ), | ||
| 582 | + // )), | ||
| 583 | + // Padding( | ||
| 584 | + // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 585 | + // child: MyDivider( | ||
| 586 | + // double.infinity, | ||
| 587 | + // w(1), | ||
| 588 | + // color: MyColours.color_E7E7E7, | ||
| 589 | + // )), | ||
| 590 | + // VEmptyView(24), | ||
| 591 | + // Container( | ||
| 592 | + // padding: | ||
| 593 | + // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 594 | + // child: Row( | ||
| 595 | + // children: [ | ||
| 596 | + // Expanded( | ||
| 597 | + // child: Container( | ||
| 598 | + // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 599 | + // child: Text('指定期限', | ||
| 600 | + // overflow: TextOverflow.ellipsis, | ||
| 601 | + // maxLines: 10, | ||
| 602 | + // style: TextStyle( | ||
| 603 | + // color: MyColours.color_515151, | ||
| 604 | + // fontSize: ScreenUtil().setSp(28))))), | ||
| 605 | + // HEmptyView(2), | ||
| 606 | + // Container( | ||
| 607 | + // width: w(40), | ||
| 608 | + // child: TextField( | ||
| 609 | + // controller: controllerDeadline, | ||
| 610 | + // textAlign: TextAlign.right, | ||
| 611 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 612 | + // maxLines: 1, | ||
| 613 | + // // //光标颜色 | ||
| 614 | + // // cursorColor: | ||
| 615 | + // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 616 | + // //输入文本的样式 | ||
| 617 | + // style: TextStyle( | ||
| 618 | + // color: MyColours.color_515151, | ||
| 619 | + // fontSize: ScreenUtil().setSp(28), | ||
| 620 | + // ), | ||
| 621 | + // inputFormatters: <TextInputFormatter>[ | ||
| 622 | + // FilteringTextInputFormatter.allow( | ||
| 623 | + // RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 624 | + // ], | ||
| 625 | + // decoration: InputDecoration( | ||
| 626 | + // isCollapsed: true, | ||
| 627 | + // border: OutlineInputBorder( | ||
| 628 | + // borderSide: BorderSide.none), | ||
| 629 | + // hintText: '输入', | ||
| 630 | + // hintStyle: TextStyle( | ||
| 631 | + // color: MyColours.color_999999, | ||
| 632 | + // fontSize: ScreenUtil().setSp(28), | ||
| 633 | + // ), | ||
| 634 | + // enabledBorder: new UnderlineInputBorder( | ||
| 635 | + // borderSide: BorderSide.none, | ||
| 636 | + // ), | ||
| 637 | + // focusedBorder: new UnderlineInputBorder( | ||
| 638 | + // borderSide: BorderSide.none, | ||
| 639 | + // ), | ||
| 640 | + // ), | ||
| 641 | + // onChanged: (value) {}, | ||
| 642 | + // onEditingComplete: () { | ||
| 643 | + // FocusScope.of(context) | ||
| 644 | + // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 645 | + // }, | ||
| 646 | + // keyboardType: TextInputType.number), | ||
| 647 | + // ), | ||
| 648 | + // HEmptyView(5), | ||
| 649 | + // Text('天', | ||
| 650 | + // style: TextStyle( | ||
| 651 | + // color: MyColours.color_999999, | ||
| 652 | + // fontSize: ScreenUtil().setSp(28))), | ||
| 653 | + // // HEmptyView(24), | ||
| 654 | + // ], | ||
| 655 | + // )), | ||
| 656 | + // Padding( | ||
| 657 | + // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 658 | + // child: MyDivider( | ||
| 659 | + // double.infinity, | ||
| 660 | + // w(1), | ||
| 661 | + // color: MyColours.color_E7E7E7, | ||
| 662 | + // )), | ||
| 663 | + // VEmptyView(24), | ||
| 664 | + // Container( | ||
| 665 | + // padding: | ||
| 666 | + // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 667 | + // child: Row( | ||
| 668 | + // children: [ | ||
| 669 | + // Expanded( | ||
| 670 | + // child: Container( | ||
| 671 | + // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 672 | + // child: Text('消费次数', | ||
| 673 | + // overflow: TextOverflow.ellipsis, | ||
| 674 | + // maxLines: 10, | ||
| 675 | + // style: TextStyle( | ||
| 676 | + // color: MyColours.color_515151, | ||
| 677 | + // fontSize: ScreenUtil().setSp(28))))), | ||
| 678 | + // HEmptyView(2), | ||
| 679 | + // Container( | ||
| 680 | + // width: w(40), | ||
| 681 | + // child: TextField( | ||
| 682 | + // controller: controllerConsumptionTimes, | ||
| 683 | + // textAlign: TextAlign.right, | ||
| 684 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 685 | + // maxLines: 1, | ||
| 686 | + // // //光标颜色 | ||
| 687 | + // // cursorColor: | ||
| 688 | + // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 689 | + // //输入文本的样式 | ||
| 690 | + // style: TextStyle( | ||
| 691 | + // color: MyColours.color_515151, | ||
| 692 | + // fontSize: ScreenUtil().setSp(28), | ||
| 693 | + // ), | ||
| 694 | + // inputFormatters: <TextInputFormatter>[ | ||
| 695 | + // FilteringTextInputFormatter.allow( | ||
| 696 | + // RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 697 | + // ], | ||
| 698 | + // decoration: InputDecoration( | ||
| 699 | + // isCollapsed: true, | ||
| 700 | + // border: OutlineInputBorder( | ||
| 701 | + // borderSide: BorderSide.none), | ||
| 702 | + // hintText: '输入', | ||
| 703 | + // hintStyle: TextStyle( | ||
| 704 | + // color: MyColours.color_999999, | ||
| 705 | + // fontSize: ScreenUtil().setSp(28), | ||
| 706 | + // ), | ||
| 707 | + // enabledBorder: new UnderlineInputBorder( | ||
| 708 | + // borderSide: BorderSide.none, | ||
| 709 | + // ), | ||
| 710 | + // focusedBorder: new UnderlineInputBorder( | ||
| 711 | + // borderSide: BorderSide.none, | ||
| 712 | + // ), | ||
| 713 | + // ), | ||
| 714 | + // onChanged: (value) {}, | ||
| 715 | + // onEditingComplete: () { | ||
| 716 | + // FocusScope.of(context) | ||
| 717 | + // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 718 | + // }, | ||
| 719 | + // keyboardType: TextInputType.number), | ||
| 720 | + // ), | ||
| 721 | + // HEmptyView(5), | ||
| 722 | + // Text('次', | ||
| 723 | + // style: TextStyle( | ||
| 724 | + // color: MyColours.color_999999, | ||
| 725 | + // fontSize: ScreenUtil().setSp(28))), | ||
| 726 | + // // HEmptyView(24), | ||
| 727 | + // ], | ||
| 728 | + // )), | ||
| 729 | + // Padding( | ||
| 730 | + // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 731 | + // child: MyDivider( | ||
| 732 | + // double.infinity, | ||
| 733 | + // w(1), | ||
| 734 | + // color: MyColours.color_E7E7E7, | ||
| 735 | + // )), | ||
| 736 | + // VEmptyView(24), | ||
| 737 | + // InkWell( | ||
| 738 | + // onTap: () { | ||
| 739 | + // setState(() { | ||
| 740 | + // customerProvider.isHighConsumption = | ||
| 741 | + // !customerProvider.isHighConsumption; | ||
| 742 | + // }); | ||
| 743 | + // }, | ||
| 744 | + // child: Container( | ||
| 745 | + // padding: EdgeInsets.symmetric( | ||
| 746 | + // vertical: w(8), horizontal: w(14)), | ||
| 747 | + // child: Row( | ||
| 748 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 749 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 750 | + // children: [ | ||
| 751 | + // Text('高消费客户标记', | ||
| 752 | + // style: TextStyle( | ||
| 753 | + // color: MyColours.color_515151, | ||
| 754 | + // fontSize: ScreenUtil().setSp(28))), | ||
| 755 | + // Image.asset( | ||
| 756 | + // customerProvider.isHighConsumption | ||
| 757 | + // ? Utils.getImgPath('swich_on') | ||
| 758 | + // : Utils.getImgPath('swich_off'), | ||
| 759 | + // width: ScreenUtil().setWidth(88), | ||
| 760 | + // // height: ScreenUtil().setWidth(82), | ||
| 761 | + // ), | ||
| 762 | + // ], | ||
| 763 | + // ), | ||
| 764 | + // )), | ||
| 765 | + // Padding( | ||
| 766 | + // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 767 | + // child: MyDivider( | ||
| 768 | + // double.infinity, | ||
| 769 | + // w(1), | ||
| 770 | + // color: MyColours.color_E7E7E7, | ||
| 771 | + // )), | ||
| 772 | + // VEmptyView(24), | ||
| 773 | + // Container( | ||
| 774 | + // padding: | ||
| 775 | + // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 776 | + // child: Row( | ||
| 777 | + // children: [ | ||
| 778 | + // Expanded( | ||
| 779 | + // child: Container( | ||
| 780 | + // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 781 | + // child: Text('客户人均消费到达设置金额标记为高单值', | ||
| 782 | + // overflow: TextOverflow.ellipsis, | ||
| 783 | + // maxLines: 10, | ||
| 784 | + // style: TextStyle( | ||
| 785 | + // color: MyColours.color_515151, | ||
| 786 | + // fontSize: ScreenUtil().setSp(28))))), | ||
| 787 | + // HEmptyView(2), | ||
| 788 | + // Container( | ||
| 789 | + // width: w(40), | ||
| 790 | + // child: TextField( | ||
| 791 | + // controller: controllerHighValue, | ||
| 792 | + // textAlign: TextAlign.right, | ||
| 793 | + // textAlignVertical: TextAlignVertical.bottom, | ||
| 794 | + // maxLines: 1, | ||
| 795 | + // // //光标颜色 | ||
| 796 | + // // cursorColor: | ||
| 797 | + // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 798 | + // //输入文本的样式 | ||
| 799 | + // style: TextStyle( | ||
| 800 | + // color: MyColours.color_515151, | ||
| 801 | + // fontSize: ScreenUtil().setSp(28), | ||
| 802 | + // ), | ||
| 803 | + // inputFormatters: <TextInputFormatter>[ | ||
| 804 | + // FilteringTextInputFormatter.allow( | ||
| 805 | + // RegExp("[0-9.]")), | ||
| 806 | + // ], | ||
| 807 | + // decoration: InputDecoration( | ||
| 808 | + // isCollapsed: true, | ||
| 809 | + // border: OutlineInputBorder( | ||
| 810 | + // borderSide: BorderSide.none), | ||
| 811 | + // hintText: '输入', | ||
| 812 | + // hintStyle: TextStyle( | ||
| 813 | + // color: MyColours.color_999999, | ||
| 814 | + // fontSize: ScreenUtil().setSp(28), | ||
| 815 | + // ), | ||
| 816 | + // enabledBorder: new UnderlineInputBorder( | ||
| 817 | + // borderSide: BorderSide.none, | ||
| 818 | + // ), | ||
| 819 | + // focusedBorder: new UnderlineInputBorder( | ||
| 820 | + // borderSide: BorderSide.none, | ||
| 821 | + // ), | ||
| 822 | + // ), | ||
| 823 | + // onChanged: (value) {}, | ||
| 824 | + // onEditingComplete: () { | ||
| 825 | + // FocusScope.of(context) | ||
| 826 | + // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 827 | + // }, | ||
| 828 | + // keyboardType: TextInputType.number), | ||
| 829 | + // ), | ||
| 830 | + // HEmptyView(5), | ||
| 831 | + // Text('元', | ||
| 832 | + // style: TextStyle( | ||
| 833 | + // color: MyColours.color_999999, | ||
| 834 | + // fontSize: ScreenUtil().setSp(28))), | ||
| 835 | + // // HEmptyView(24), | ||
| 836 | + // ], | ||
| 837 | + // )), | ||
| 838 | + // Padding( | ||
| 839 | + // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 840 | + // child: MyDivider( | ||
| 841 | + // double.infinity, | ||
| 842 | + // w(1), | ||
| 843 | + // color: MyColours.color_E7E7E7, | ||
| 844 | + // )), | ||
| 845 | + // VEmptyView(24), | ||
| 846 | + // VEmptyView(48), | ||
| 847 | + ], | ||
| 848 | + ))), | ||
| 849 | + | ||
| 850 | + Container( | ||
| 851 | + color: MyColours.color_ffffff, | ||
| 852 | + padding: EdgeInsets.symmetric(horizontal: w(48)), | ||
| 853 | + margin: EdgeInsets.only(bottom: w(35), top: w(25)), | ||
| 854 | + child: RoundButton( | ||
| 855 | + // content: widget.fromPage == 'tablePhoto' | ||
| 856 | + // ? '确定' | ||
| 857 | + // : "已选${selectNum}个 确定", | ||
| 858 | + text: '保存', | ||
| 859 | + // width: w(128), | ||
| 860 | + height: w(40), | ||
| 861 | + radius: r(4), | ||
| 862 | + isBold: false, | ||
| 863 | + gradientStart: MyColours.color_438E93, | ||
| 864 | + gradientEnd: MyColours.color_438E93, | ||
| 865 | + fontSize: 28, | ||
| 866 | + textColor: MyColours.color_ffffff, | ||
| 867 | + onPressed: () { | ||
| 868 | + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 869 | + | ||
| 870 | + //前置条件判断 | ||
| 871 | + // if (customerProvider.isHighFrequency) { | ||
| 872 | + // if (controllerDeadline.text.trim().length == 0) { | ||
| 873 | + // Utils.showToast('请输入指定期限'); | ||
| 874 | + // return; | ||
| 875 | + // } | ||
| 876 | + // if (controllerConsumptionTimes.text.trim().length == 0) { | ||
| 877 | + // Utils.showToast('请输入消费次数'); | ||
| 878 | + // return; | ||
| 879 | + // } | ||
| 880 | + // } | ||
| 881 | + // if (customerProvider.isHighConsumption) { | ||
| 882 | + // if (controllerHighValue.text.trim().length == 0) { | ||
| 883 | + // Utils.showToast('请设置客户人均消费到达金额'); | ||
| 884 | + // return; | ||
| 885 | + // } | ||
| 886 | + // } | ||
| 887 | + _saveData(); | ||
| 888 | + }, | ||
| 889 | + ), | ||
| 890 | + ) | ||
| 891 | + | ||
| 892 | + // VEmptyView(34), | ||
| 893 | + // MyDivider( | ||
| 894 | + // double.infinity, | ||
| 895 | + // w(1), | ||
| 896 | + // color: MyColours.color_E7E7E7, | ||
| 897 | + // ), | ||
| 898 | + // VEmptyView(52), | ||
| 899 | + // InkWell( | ||
| 900 | + // onTap: () { | ||
| 901 | + // setState(() { | ||
| 902 | + // swichSync = !swichSync; | ||
| 903 | + // }); | ||
| 904 | + // // _sellerGuestSet(); | ||
| 905 | + // }, | ||
| 906 | + // child: Row( | ||
| 907 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 908 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 909 | + // children: [ | ||
| 910 | + // Text('是否与会员系统同步', | ||
| 911 | + // style: TextStyle( | ||
| 912 | + // color: MyColours.color_515151, | ||
| 913 | + // fontSize: ScreenUtil().setSp(32))), | ||
| 914 | + // Image.asset( | ||
| 915 | + // swichSync | ||
| 916 | + // ? Utils.getImgPath('f_swich_on') | ||
| 917 | + // : Utils.getImgPath('f_swich_off'), | ||
| 918 | + // width: ScreenUtil().setWidth(70), | ||
| 919 | + // // height: ScreenUtil().setWidth(82), | ||
| 920 | + // ), | ||
| 921 | + // ], | ||
| 922 | + // ), | ||
| 923 | + // ), | ||
| 924 | + // VEmptyView(48), | ||
| 925 | + // InkWell( | ||
| 926 | + // onTap: () { | ||
| 927 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 928 | + // // DialogUtil.showSelectCusmanDialog(context, memberList, | ||
| 929 | + // // (value) { | ||
| 930 | + // // if (value != null) { | ||
| 931 | + // // setState(() { | ||
| 932 | + // // memberIndex = value.first; | ||
| 933 | + // // memberShow = memberList[memberIndex]; | ||
| 934 | + // // }); | ||
| 935 | + // // } | ||
| 936 | + // // }, selecteds: memberIndex == null ? [] : [memberIndex]) | ||
| 937 | + // // .then((value) {}); | ||
| 938 | + // }, | ||
| 939 | + // child: Container( | ||
| 940 | + // // height: ScreenUtil().setWidth(60), | ||
| 941 | + // padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)), | ||
| 942 | + // child: Row( | ||
| 943 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 944 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 945 | + // children: [ | ||
| 946 | + // Container( | ||
| 947 | + // // color: Colors.red, | ||
| 948 | + // width: ScreenUtil().setWidth(150), | ||
| 949 | + // height: ScreenUtil().setWidth(35), | ||
| 950 | + // child: Text( | ||
| 951 | + // '会员系统选择', | ||
| 952 | + // style: TextStyle( | ||
| 953 | + // fontSize: ScreenUtil().setSp(32), | ||
| 954 | + // color: MyColours.color_515151), | ||
| 955 | + // ), | ||
| 956 | + // ), | ||
| 957 | + // Expanded( | ||
| 958 | + // child: Text( | ||
| 959 | + // memberShow, | ||
| 960 | + // overflow: TextOverflow.ellipsis, | ||
| 961 | + // style: TextStyle( | ||
| 962 | + // color: MyColours.color_353535, | ||
| 963 | + // fontSize: ScreenUtil().setSp(28), | ||
| 964 | + // ), | ||
| 965 | + // )), | ||
| 966 | + // HEmptyView(10), | ||
| 967 | + // Image.asset( | ||
| 968 | + // Utils.getImgPath( | ||
| 969 | + // showLabel ? 'c_arrow_up' : 'c_arrow_down'), | ||
| 970 | + // width: ScreenUtil().setWidth(24), | ||
| 971 | + // // height: ScreenUtil().setWidth(10), | ||
| 972 | + // ) | ||
| 973 | + // ], | ||
| 974 | + // ), | ||
| 975 | + // )), | ||
| 976 | + // _itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null), | ||
| 977 | + // VEmptyView(50), | ||
| 978 | + // _itemWidget('管理员账号', "点击这里输入管理员账号", null, null), | ||
| 979 | + // VEmptyView(50), | ||
| 980 | + // _itemWidget('密码', "点击这里输入管理员密码", null, null), | ||
| 981 | + // VEmptyView(40), | ||
| 982 | + // Center( | ||
| 983 | + // child: Text( | ||
| 984 | + // '请与纳极客服400-000-9690 联系对接事宜', | ||
| 985 | + // style: TextStyle( | ||
| 986 | + // color: MyColours.color_999999, fontSize: font(12)), | ||
| 987 | + // )) | ||
| 988 | + ], | ||
| 989 | + ), | ||
| 990 | + ), | ||
| 991 | + )); | ||
| 992 | + } | ||
| 993 | +} |
| 1 | +import 'dart:async'; | ||
| 2 | +import 'dart:convert'; | ||
| 3 | + | ||
| 4 | +import 'package:flutter/material.dart'; | ||
| 5 | +import 'package:flutter/services.dart'; | ||
| 6 | +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; | ||
| 7 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 8 | +import 'package:one_key/models/customer_label_model.dart'; | ||
| 9 | +import 'package:one_key/provider/customer_provider.dart'; | ||
| 10 | +import 'package:one_key/provider/user_model.dart'; | ||
| 11 | +import 'package:one_key/res/colors.dart'; | ||
| 12 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 13 | +import 'package:one_key/utils/utils.dart'; | ||
| 14 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 15 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 16 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 17 | +import 'package:provider/provider.dart'; | ||
| 18 | + | ||
| 19 | +import '../../../../provider/marketing_center_provider.dart'; | ||
| 20 | +import '../../../../utils/screen_util.dart'; | ||
| 21 | +import '../../../../widgets/h_empty_view.dart'; | ||
| 22 | +import '../../../../widgets/round_button.dart'; | ||
| 23 | + | ||
| 24 | +/** | ||
| 25 | + * 历史订单设置页面 | ||
| 26 | + */ | ||
| 27 | + | ||
| 28 | +class OrderHistorySetPage extends StatefulWidget { | ||
| 29 | + OrderHistorySetPage({Key? key}) : super(key: key); | ||
| 30 | + | ||
| 31 | + @override | ||
| 32 | + _OrderHistorySetPageState createState() => _OrderHistorySetPageState(); | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +class _OrderHistorySetPageState extends State<OrderHistorySetPage> { | ||
| 36 | + late CustomerProvider customerProvider; | ||
| 37 | + bool swichSync = false; //会员系统同步 | ||
| 38 | + | ||
| 39 | + String memberShow = ''; | ||
| 40 | + bool showLabel = false; | ||
| 41 | + | ||
| 42 | + late MarketingCenterProvider marketingCenterProvider; | ||
| 43 | + TextEditingController controllerDay = TextEditingController(); | ||
| 44 | + | ||
| 45 | + TextEditingController controllerDeadline = TextEditingController(); | ||
| 46 | + TextEditingController controllerConsumptionTimes = TextEditingController(); | ||
| 47 | + TextEditingController controllerHighValue = TextEditingController(); | ||
| 48 | + | ||
| 49 | + @override | ||
| 50 | + void initState() { | ||
| 51 | + WidgetsBinding.instance.addPostFrameCallback((_) async { | ||
| 52 | + // _getContantData(); | ||
| 53 | + _sellerGuestGet(); | ||
| 54 | + _getLabelBySellerid(); | ||
| 55 | + getDzSellerConf(); | ||
| 56 | + }); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + getDzSellerConf() async { | ||
| 60 | + bool success = await marketingCenterProvider.getDzSellerConf(context); | ||
| 61 | + if (success && marketingCenterProvider.dzSellerConfModel != null) { | ||
| 62 | + customerProvider.isReservePhoneApp = | ||
| 63 | + marketingCenterProvider.dzSellerConfModel!.appPhoneSwitch == '1' | ||
| 64 | + ? true | ||
| 65 | + : false; | ||
| 66 | + customerProvider.ispcphone = | ||
| 67 | + marketingCenterProvider.dzSellerConfModel!.pcNotPhone == '1' | ||
| 68 | + ? true | ||
| 69 | + : false; | ||
| 70 | + customerProvider.isAddOver = | ||
| 71 | + marketingCenterProvider.dzSellerConfModel!.isAddOver == '1' | ||
| 72 | + ? true | ||
| 73 | + : false; | ||
| 74 | + customerProvider.isSetOver = | ||
| 75 | + marketingCenterProvider.dzSellerConfModel!.isSetOver == '1' | ||
| 76 | + ? true | ||
| 77 | + : false; | ||
| 78 | + customerProvider.isReserveOver = | ||
| 79 | + marketingCenterProvider.dzSellerConfModel!.isReserveOver == '1' | ||
| 80 | + ? true | ||
| 81 | + : false; | ||
| 82 | + customerProvider.isReserveCancel = | ||
| 83 | + marketingCenterProvider.dzSellerConfModel!.isReserveCancel == '1' | ||
| 84 | + ? true | ||
| 85 | + : false; | ||
| 86 | + | ||
| 87 | + customerProvider.ispcname = | ||
| 88 | + marketingCenterProvider.dzSellerConfModel!.pcNotName == '1' | ||
| 89 | + ? true | ||
| 90 | + : false; | ||
| 91 | + | ||
| 92 | + controllerDay.text = | ||
| 93 | + marketingCenterProvider.dzSellerConfModel!.cancelDay!; | ||
| 94 | + customerProvider.cancelOrderdayShopowner = | ||
| 95 | + marketingCenterProvider.dzSellerConfModel!.cancelShopowner == '1' | ||
| 96 | + ? true | ||
| 97 | + : false; | ||
| 98 | + customerProvider.cancelOrderdayManager = | ||
| 99 | + marketingCenterProvider.dzSellerConfModel!.cancelManager == '1' | ||
| 100 | + ? true | ||
| 101 | + : false; | ||
| 102 | + customerProvider.cancelOrderdayOther = | ||
| 103 | + marketingCenterProvider.dzSellerConfModel!.cancelOther == '1' | ||
| 104 | + ? true | ||
| 105 | + : false; | ||
| 106 | + } | ||
| 107 | + setState(() {}); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + ///修改客情配置 | ||
| 111 | + | ||
| 112 | + Future<bool> _sellerGuestSet() async { | ||
| 113 | + Map<String, String?> params = { | ||
| 114 | + "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 115 | + 'is_additional': customerProvider.isrepair ? "1" : "0", | ||
| 116 | + 'is_enter_self': customerProvider.isselfphone ? '1' : '0', | ||
| 117 | + 'is_high_frequency': customerProvider.isHighFrequency ? '1' : '0', | ||
| 118 | + 'high_frequency_day': controllerDeadline.text, | ||
| 119 | + 'high_frequency_reserve': controllerConsumptionTimes.text, | ||
| 120 | + 'is_high_consumption': customerProvider.isHighConsumption ? '1' : '0', | ||
| 121 | + 'is_high_money': controllerHighValue.text | ||
| 122 | + }; | ||
| 123 | + bool success = await customerProvider.setSellerGuest(context, params, | ||
| 124 | + showLoading: true); | ||
| 125 | + if (success) { | ||
| 126 | + return true; | ||
| 127 | + } else { | ||
| 128 | + return false; | ||
| 129 | + } | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + _saveData() async { | ||
| 133 | + (bool, bool) result = await (_setConfings(), _sellerGuestSet()).wait; | ||
| 134 | + | ||
| 135 | + if (result.$1 && result.$2) { | ||
| 136 | + // 全部保存成功 | ||
| 137 | + Utils.showToast('保存成功!'); | ||
| 138 | + } else { | ||
| 139 | + Utils.showToast('保存失败,请重试'); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + Future<bool> _setConfings() async { | ||
| 144 | + Map<String, dynamic> data = { | ||
| 145 | + 'app_phone_switch': customerProvider.isReservePhoneApp ? '1' : '0', | ||
| 146 | + 'pc_not_rname': customerProvider.ispcname ? '1' : '0', | ||
| 147 | + "pc_not_phone": customerProvider.ispcphone ? '1' : '0', | ||
| 148 | + "is_add_over": customerProvider.isAddOver ? '1' : '0', | ||
| 149 | + "is_set_over": customerProvider.isSetOver ? '1' : '0', | ||
| 150 | + "is_reserve_over": customerProvider.isReserveOver ? '1' : '0', | ||
| 151 | + "is_reserve_cancel": customerProvider.isReserveCancel ? '1' : '0', | ||
| 152 | + 'temp_cancel_day': controllerDay.text, | ||
| 153 | + 'temp_for_shopowner': | ||
| 154 | + customerProvider.cancelOrderdayShopowner ? '1' : '0', | ||
| 155 | + 'temp_for_manager': customerProvider.cancelOrderdayManager ? '1' : '0', | ||
| 156 | + 'temp_for_other': customerProvider.cancelOrderdayOther ? '1' : '0', | ||
| 157 | + }; | ||
| 158 | + Map<String, String?> params = { | ||
| 159 | + 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 160 | + 'data': jsonEncode(data), | ||
| 161 | + }; | ||
| 162 | + bool success = await marketingCenterProvider.setConfings(context, params, | ||
| 163 | + needToast: false); | ||
| 164 | + if (success) { | ||
| 165 | + return true; | ||
| 166 | + } else { | ||
| 167 | + return false; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + ///获取客情配置 | ||
| 172 | + _sellerGuestGet() async { | ||
| 173 | + bool success = await customerProvider.getSellerGuest(context); | ||
| 174 | + if (success) { | ||
| 175 | + controllerDeadline.text = | ||
| 176 | + customerProvider.sellerGuestData?.highFrequencyDay ?? ''; | ||
| 177 | + controllerConsumptionTimes.text = | ||
| 178 | + customerProvider.sellerGuestData?.highFrequencyReserve ?? ''; | ||
| 179 | + controllerHighValue.text = | ||
| 180 | + customerProvider.sellerGuestData?.isHighMoney ?? ''; | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + // if (success) { | ||
| 184 | + // customerProvider.isrepair = true; | ||
| 185 | + // } else { | ||
| 186 | + // customerProvider.isrepair = false; | ||
| 187 | + // } | ||
| 188 | + setState(() {}); | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + ///获取商家标签 | ||
| 192 | + _getLabelBySellerid() async { | ||
| 193 | + await customerProvider.getLabelBySellerid(context); | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + ///商家创建商家标签 | ||
| 197 | + _createLabelBySellerid(String? name) async { | ||
| 198 | + Map<String, String?> params = { | ||
| 199 | + "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 200 | + 'label': name | ||
| 201 | + }; | ||
| 202 | + bool success = | ||
| 203 | + await customerProvider.createLabelBySellerid(context, params); | ||
| 204 | + if (success) { | ||
| 205 | + //刷新当前标签列表 | ||
| 206 | + Utils.showToast('标签添加成功'); | ||
| 207 | + //调用获取标签接口 | ||
| 208 | + // 。。。。。。 | ||
| 209 | + _getLabelBySellerid(); | ||
| 210 | + } | ||
| 211 | + } | ||
| 212 | + | ||
| 213 | + ///商家修改标签 | ||
| 214 | + _setLabelBySellerid(String? id, String? name) async { | ||
| 215 | + Map<String, String?> params = {"id": id, 'label': name}; | ||
| 216 | + bool success = await customerProvider.setLabelBySellerid(context, params); | ||
| 217 | + if (success) { | ||
| 218 | + //刷新当前标签列表 | ||
| 219 | + Utils.showToast('标签修改成功'); | ||
| 220 | + //调用获取标签接口 | ||
| 221 | + // 。。。。。。 | ||
| 222 | + _getLabelBySellerid(); | ||
| 223 | + } | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + | ||
| 227 | + @override | ||
| 228 | + Widget build(BuildContext context) { | ||
| 229 | + customerProvider = Provider.of<CustomerProvider>(context, listen: true); | ||
| 230 | + marketingCenterProvider = | ||
| 231 | + Provider.of<MarketingCenterProvider>(context, listen: true); | ||
| 232 | + return KeyboardDismissOnTap( | ||
| 233 | + child: Scaffold( | ||
| 234 | + backgroundColor: MyColours.color_ffffff, | ||
| 235 | + appBar: SystemAppBar( | ||
| 236 | + '历史订单修改限制设置', | ||
| 237 | + onTap: () { | ||
| 238 | + if (Navigator.canPop(context)) { | ||
| 239 | + Navigator.pop(context); | ||
| 240 | + } | ||
| 241 | + }, | ||
| 242 | + ), | ||
| 243 | + body: Padding( | ||
| 244 | + padding: EdgeInsets.only( | ||
| 245 | + left: ScreenUtil().setWidth(4), top: ScreenUtil().setWidth(40)), | ||
| 246 | + child: Column( | ||
| 247 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 248 | + children: [ | ||
| 249 | + Expanded( | ||
| 250 | + child: SingleChildScrollView( | ||
| 251 | + child: Column( | ||
| 252 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 253 | + children: [ | ||
| 254 | + InkWell( | ||
| 255 | + onTap: () { | ||
| 256 | + setState(() { | ||
| 257 | + customerProvider.isAddOver = !customerProvider.isAddOver; | ||
| 258 | + }); | ||
| 259 | + // _sellerGuestSet(); | ||
| 260 | + }, | ||
| 261 | + child: Container( | ||
| 262 | + padding: EdgeInsets.symmetric( | ||
| 263 | + vertical: w(8), horizontal: w(14)), | ||
| 264 | + child: Row( | ||
| 265 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 266 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 267 | + children: [ | ||
| 268 | + Text('允许新建过去餐段的订单', | ||
| 269 | + style: TextStyle( | ||
| 270 | + color: MyColours.color_515151, | ||
| 271 | + fontSize: ScreenUtil().setSp(28))), | ||
| 272 | + Image.asset( | ||
| 273 | + customerProvider.isAddOver | ||
| 274 | + ? Utils.getImgPath('swich_on') | ||
| 275 | + : Utils.getImgPath('swich_off'), | ||
| 276 | + width: ScreenUtil().setWidth(88), | ||
| 277 | + // height: ScreenUtil().setWidth(82), | ||
| 278 | + ), | ||
| 279 | + ], | ||
| 280 | + )), | ||
| 281 | + ), | ||
| 282 | + Padding( | ||
| 283 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 284 | + child: MyDivider( | ||
| 285 | + double.infinity, | ||
| 286 | + w(1), | ||
| 287 | + color: MyColours.color_E7E7E7, | ||
| 288 | + )), | ||
| 289 | + VEmptyView(24), | ||
| 290 | + InkWell( | ||
| 291 | + onTap: () { | ||
| 292 | + setState(() { | ||
| 293 | + customerProvider.isSetOver = | ||
| 294 | + !customerProvider.isSetOver; | ||
| 295 | + }); | ||
| 296 | + }, | ||
| 297 | + child: Container( | ||
| 298 | + padding: EdgeInsets.symmetric( | ||
| 299 | + vertical: w(8), horizontal: w(14)), | ||
| 300 | + child: Row( | ||
| 301 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 302 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 303 | + children: [ | ||
| 304 | + Text('允许变更过去餐段订单', | ||
| 305 | + style: TextStyle( | ||
| 306 | + color: MyColours.color_515151, | ||
| 307 | + fontSize: ScreenUtil().setSp(28))), | ||
| 308 | + Image.asset( | ||
| 309 | + customerProvider.isSetOver | ||
| 310 | + ? Utils.getImgPath('swich_on') | ||
| 311 | + : Utils.getImgPath('swich_off'), | ||
| 312 | + width: ScreenUtil().setWidth(88), | ||
| 313 | + // height: ScreenUtil().setWidth(82), | ||
| 314 | + ), | ||
| 315 | + ], | ||
| 316 | + ), | ||
| 317 | + )), | ||
| 318 | + Padding( | ||
| 319 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 320 | + child: MyDivider( | ||
| 321 | + double.infinity, | ||
| 322 | + w(1), | ||
| 323 | + color: MyColours.color_E7E7E7, | ||
| 324 | + )), | ||
| 325 | + VEmptyView(24), | ||
| 326 | + InkWell( | ||
| 327 | + onTap: () { | ||
| 328 | + setState(() { | ||
| 329 | + customerProvider.isReserveOver = | ||
| 330 | + !customerProvider.isReserveOver; | ||
| 331 | + }); | ||
| 332 | + }, | ||
| 333 | + child: Container( | ||
| 334 | + padding: EdgeInsets.symmetric( | ||
| 335 | + vertical: w(8), horizontal: w(14)), | ||
| 336 | + child: Row( | ||
| 337 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 338 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 339 | + children: [ | ||
| 340 | + Text('允许变更订单到过去餐段', | ||
| 341 | + style: TextStyle( | ||
| 342 | + color: MyColours.color_515151, | ||
| 343 | + fontSize: ScreenUtil().setSp(28))), | ||
| 344 | + Image.asset( | ||
| 345 | + customerProvider.isReserveOver | ||
| 346 | + ? Utils.getImgPath('swich_on') | ||
| 347 | + : Utils.getImgPath('swich_off'), | ||
| 348 | + width: ScreenUtil().setWidth(88), | ||
| 349 | + // height: ScreenUtil().setWidth(82), | ||
| 350 | + ), | ||
| 351 | + ], | ||
| 352 | + ), | ||
| 353 | + )), | ||
| 354 | + Padding( | ||
| 355 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 356 | + child: MyDivider( | ||
| 357 | + double.infinity, | ||
| 358 | + w(1), | ||
| 359 | + color: MyColours.color_E7E7E7, | ||
| 360 | + )), | ||
| 361 | + VEmptyView(24), | ||
| 362 | + InkWell( | ||
| 363 | + onTap: () { | ||
| 364 | + setState(() { | ||
| 365 | + customerProvider.isReserveCancel = | ||
| 366 | + !customerProvider.isReserveCancel; | ||
| 367 | + }); | ||
| 368 | + }, | ||
| 369 | + child: Container( | ||
| 370 | + padding: EdgeInsets.symmetric( | ||
| 371 | + vertical: w(8), horizontal: w(14)), | ||
| 372 | + child: Row( | ||
| 373 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 374 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 375 | + children: [ | ||
| 376 | + Text('允许取消过去餐段的订单', | ||
| 377 | + style: TextStyle( | ||
| 378 | + color: MyColours.color_515151, | ||
| 379 | + fontSize: ScreenUtil().setSp(28))), | ||
| 380 | + Image.asset( | ||
| 381 | + customerProvider.isReserveCancel | ||
| 382 | + ? Utils.getImgPath('swich_on') | ||
| 383 | + : Utils.getImgPath('swich_off'), | ||
| 384 | + width: ScreenUtil().setWidth(88), | ||
| 385 | + // height: ScreenUtil().setWidth(82), | ||
| 386 | + ), | ||
| 387 | + ], | ||
| 388 | + ), | ||
| 389 | + )), | ||
| 390 | + Padding( | ||
| 391 | + padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 392 | + child: MyDivider( | ||
| 393 | + double.infinity, | ||
| 394 | + w(1), | ||
| 395 | + color: MyColours.color_E7E7E7, | ||
| 396 | + )), | ||
| 397 | + ], | ||
| 398 | + ))), | ||
| 399 | + | ||
| 400 | + Container( | ||
| 401 | + color: MyColours.color_ffffff, | ||
| 402 | + padding: EdgeInsets.symmetric(horizontal: w(48)), | ||
| 403 | + margin: EdgeInsets.only(bottom: w(35), top: w(25)), | ||
| 404 | + child: RoundButton( | ||
| 405 | + // content: widget.fromPage == 'tablePhoto' | ||
| 406 | + // ? '确定' | ||
| 407 | + // : "已选${selectNum}个 确定", | ||
| 408 | + text: '保存', | ||
| 409 | + // width: w(128), | ||
| 410 | + height: w(40), | ||
| 411 | + radius: r(4), | ||
| 412 | + isBold: false, | ||
| 413 | + gradientStart: MyColours.color_438E93, | ||
| 414 | + gradientEnd: MyColours.color_438E93, | ||
| 415 | + fontSize: 28, | ||
| 416 | + textColor: MyColours.color_ffffff, | ||
| 417 | + onPressed: () { | ||
| 418 | + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 419 | + | ||
| 420 | + //前置条件判断 | ||
| 421 | + if (customerProvider.isHighFrequency) { | ||
| 422 | + if (controllerDeadline.text.trim().length == 0) { | ||
| 423 | + Utils.showToast('请输入指定期限'); | ||
| 424 | + return; | ||
| 425 | + } | ||
| 426 | + if (controllerConsumptionTimes.text.trim().length == 0) { | ||
| 427 | + Utils.showToast('请输入消费次数'); | ||
| 428 | + return; | ||
| 429 | + } | ||
| 430 | + } | ||
| 431 | + if (customerProvider.isHighConsumption) { | ||
| 432 | + if (controllerHighValue.text.trim().length == 0) { | ||
| 433 | + Utils.showToast('请设置客户人均消费到达金额'); | ||
| 434 | + return; | ||
| 435 | + } | ||
| 436 | + } | ||
| 437 | + _saveData(); | ||
| 438 | + }, | ||
| 439 | + ), | ||
| 440 | + ) | ||
| 441 | + | ||
| 442 | + // VEmptyView(34), | ||
| 443 | + // MyDivider( | ||
| 444 | + // double.infinity, | ||
| 445 | + // w(1), | ||
| 446 | + // color: MyColours.color_E7E7E7, | ||
| 447 | + // ), | ||
| 448 | + // VEmptyView(52), | ||
| 449 | + // InkWell( | ||
| 450 | + // onTap: () { | ||
| 451 | + // setState(() { | ||
| 452 | + // swichSync = !swichSync; | ||
| 453 | + // }); | ||
| 454 | + // // _sellerGuestSet(); | ||
| 455 | + // }, | ||
| 456 | + // child: Row( | ||
| 457 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 458 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 459 | + // children: [ | ||
| 460 | + // Text('是否与会员系统同步', | ||
| 461 | + // style: TextStyle( | ||
| 462 | + // color: MyColours.color_515151, | ||
| 463 | + // fontSize: ScreenUtil().setSp(32))), | ||
| 464 | + // Image.asset( | ||
| 465 | + // swichSync | ||
| 466 | + // ? Utils.getImgPath('f_swich_on') | ||
| 467 | + // : Utils.getImgPath('f_swich_off'), | ||
| 468 | + // width: ScreenUtil().setWidth(70), | ||
| 469 | + // // height: ScreenUtil().setWidth(82), | ||
| 470 | + // ), | ||
| 471 | + // ], | ||
| 472 | + // ), | ||
| 473 | + // ), | ||
| 474 | + // VEmptyView(48), | ||
| 475 | + // InkWell( | ||
| 476 | + // onTap: () { | ||
| 477 | + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘 | ||
| 478 | + // // DialogUtil.showSelectCusmanDialog(context, memberList, | ||
| 479 | + // // (value) { | ||
| 480 | + // // if (value != null) { | ||
| 481 | + // // setState(() { | ||
| 482 | + // // memberIndex = value.first; | ||
| 483 | + // // memberShow = memberList[memberIndex]; | ||
| 484 | + // // }); | ||
| 485 | + // // } | ||
| 486 | + // // }, selecteds: memberIndex == null ? [] : [memberIndex]) | ||
| 487 | + // // .then((value) {}); | ||
| 488 | + // }, | ||
| 489 | + // child: Container( | ||
| 490 | + // // height: ScreenUtil().setWidth(60), | ||
| 491 | + // padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)), | ||
| 492 | + // child: Row( | ||
| 493 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 494 | + // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 495 | + // children: [ | ||
| 496 | + // Container( | ||
| 497 | + // // color: Colors.red, | ||
| 498 | + // width: ScreenUtil().setWidth(150), | ||
| 499 | + // height: ScreenUtil().setWidth(35), | ||
| 500 | + // child: Text( | ||
| 501 | + // '会员系统选择', | ||
| 502 | + // style: TextStyle( | ||
| 503 | + // fontSize: ScreenUtil().setSp(32), | ||
| 504 | + // color: MyColours.color_515151), | ||
| 505 | + // ), | ||
| 506 | + // ), | ||
| 507 | + // Expanded( | ||
| 508 | + // child: Text( | ||
| 509 | + // memberShow, | ||
| 510 | + // overflow: TextOverflow.ellipsis, | ||
| 511 | + // style: TextStyle( | ||
| 512 | + // color: MyColours.color_353535, | ||
| 513 | + // fontSize: ScreenUtil().setSp(28), | ||
| 514 | + // ), | ||
| 515 | + // )), | ||
| 516 | + // HEmptyView(10), | ||
| 517 | + // Image.asset( | ||
| 518 | + // Utils.getImgPath( | ||
| 519 | + // showLabel ? 'c_arrow_up' : 'c_arrow_down'), | ||
| 520 | + // width: ScreenUtil().setWidth(24), | ||
| 521 | + // // height: ScreenUtil().setWidth(10), | ||
| 522 | + // ) | ||
| 523 | + // ], | ||
| 524 | + // ), | ||
| 525 | + // )), | ||
| 526 | + // _itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null), | ||
| 527 | + // VEmptyView(50), | ||
| 528 | + // _itemWidget('管理员账号', "点击这里输入管理员账号", null, null), | ||
| 529 | + // VEmptyView(50), | ||
| 530 | + // _itemWidget('密码', "点击这里输入管理员密码", null, null), | ||
| 531 | + // VEmptyView(40), | ||
| 532 | + // Center( | ||
| 533 | + // child: Text( | ||
| 534 | + // '请与纳极客服400-000-9690 联系对接事宜', | ||
| 535 | + // style: TextStyle( | ||
| 536 | + // color: MyColours.color_999999, fontSize: font(12)), | ||
| 537 | + // )) | ||
| 538 | + ], | ||
| 539 | + ), | ||
| 540 | + ), | ||
| 541 | + )); | ||
| 542 | + } | ||
| 543 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/provider/user_model.dart'; | ||
| 4 | +import 'package:one_key/res/colors.dart'; | ||
| 5 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 6 | +import 'package:one_key/utils/screen_util.dart'; | ||
| 7 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 8 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 9 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 10 | +import 'package:provider/provider.dart'; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 预订订单首页home | ||
| 14 | + */ | ||
| 15 | +class OrderManageHomePage extends StatefulWidget { | ||
| 16 | + const OrderManageHomePage({super.key}); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + State<OrderManageHomePage> createState() => _OrderManageHomePageState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _OrderManageHomePageState extends State<OrderManageHomePage> { | ||
| 23 | + @override | ||
| 24 | + Widget build(BuildContext context) { | ||
| 25 | + UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 26 | + return Scaffold( | ||
| 27 | + backgroundColor: Colors.white, | ||
| 28 | + appBar: SystemAppBar( | ||
| 29 | + '预订订单管理', | ||
| 30 | + ), | ||
| 31 | + body: Column( | ||
| 32 | + children: [ | ||
| 33 | + Expanded( | ||
| 34 | + child: SingleChildScrollView( | ||
| 35 | + child: Column( | ||
| 36 | + children: [ | ||
| 37 | + InkWell( | ||
| 38 | + onTap: () async { | ||
| 39 | + NavigatorUtil.goCustomerSetPage(context); | ||
| 40 | + }, | ||
| 41 | + child: Padding( | ||
| 42 | + padding: EdgeInsets.only( | ||
| 43 | + left: w(16), | ||
| 44 | + top: w(12), | ||
| 45 | + bottom: w(12), | ||
| 46 | + right: w(12)), | ||
| 47 | + child: Row( | ||
| 48 | + children: [ | ||
| 49 | + Text( | ||
| 50 | + '预订客人信息录入限制设置', | ||
| 51 | + style: TextStyle( | ||
| 52 | + color: MyColours.color_515151, | ||
| 53 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 54 | + ), | ||
| 55 | + Spacer(), | ||
| 56 | + Container( | ||
| 57 | + padding: EdgeInsets.symmetric( | ||
| 58 | + horizontal: w(7), vertical: w(4)), | ||
| 59 | + child: Image.asset( | ||
| 60 | + "assets/arrow_right_new.png", | ||
| 61 | + width: ScreenUtil().setWidth(18), | ||
| 62 | + height: ScreenUtil().setWidth(32), | ||
| 63 | + ), | ||
| 64 | + ) | ||
| 65 | + ], | ||
| 66 | + ))), | ||
| 67 | + Padding( | ||
| 68 | + padding: EdgeInsets.only(left: w(16)), | ||
| 69 | + child: MyDivider(double.infinity, w(0.5), | ||
| 70 | + color: MyColours.color_E7E7E7)), | ||
| 71 | + VEmptyView(24), | ||
| 72 | + InkWell( | ||
| 73 | + onTap: () { | ||
| 74 | + // | ||
| 75 | + NavigatorUtil.goOrderHistorySetPage(context); | ||
| 76 | + }, | ||
| 77 | + child: Padding( | ||
| 78 | + padding: EdgeInsets.only( | ||
| 79 | + left: w(16), | ||
| 80 | + top: w(12), | ||
| 81 | + bottom: w(12), | ||
| 82 | + right: w(12)), | ||
| 83 | + child: Row( | ||
| 84 | + children: [ | ||
| 85 | + Text( | ||
| 86 | + '历史订单修改限制设置', | ||
| 87 | + style: TextStyle( | ||
| 88 | + color: MyColours.color_515151, | ||
| 89 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 90 | + ), | ||
| 91 | + Spacer(), | ||
| 92 | + Container( | ||
| 93 | + padding: EdgeInsets.symmetric( | ||
| 94 | + horizontal: w(7), vertical: w(4)), | ||
| 95 | + child: Image.asset( | ||
| 96 | + "assets/arrow_right_new.png", | ||
| 97 | + width: ScreenUtil().setWidth(18), | ||
| 98 | + height: ScreenUtil().setWidth(32), | ||
| 99 | + ), | ||
| 100 | + ) | ||
| 101 | + ], | ||
| 102 | + ))), | ||
| 103 | + Padding( | ||
| 104 | + padding: EdgeInsets.only(left: w(16)), | ||
| 105 | + child: MyDivider(double.infinity, w(0.5), | ||
| 106 | + color: MyColours.color_E7E7E7)), | ||
| 107 | + VEmptyView(24), | ||
| 108 | + InkWell( | ||
| 109 | + onTap: () { | ||
| 110 | + // | ||
| 111 | + | ||
| 112 | + // NavigatorUtil.goCustomLabelPage(context); | ||
| 113 | + | ||
| 114 | + NavigatorUtil.goOrderCancelSetPage(context); | ||
| 115 | + }, | ||
| 116 | + child: Padding( | ||
| 117 | + padding: EdgeInsets.only( | ||
| 118 | + left: w(16), | ||
| 119 | + top: w(12), | ||
| 120 | + bottom: w(12), | ||
| 121 | + right: w(12)), | ||
| 122 | + child: Row( | ||
| 123 | + children: [ | ||
| 124 | + Text( | ||
| 125 | + '临餐取消预订限制设置', | ||
| 126 | + style: TextStyle( | ||
| 127 | + color: MyColours.color_515151, | ||
| 128 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 129 | + ), | ||
| 130 | + Spacer(), | ||
| 131 | + Container( | ||
| 132 | + padding: EdgeInsets.symmetric( | ||
| 133 | + horizontal: w(7), vertical: w(4)), | ||
| 134 | + child: Image.asset( | ||
| 135 | + "assets/arrow_right_new.png", | ||
| 136 | + width: ScreenUtil().setWidth(18), | ||
| 137 | + height: ScreenUtil().setWidth(32), | ||
| 138 | + ), | ||
| 139 | + ) | ||
| 140 | + ], | ||
| 141 | + ))), | ||
| 142 | + Padding( | ||
| 143 | + padding: EdgeInsets.only(left: w(16)), | ||
| 144 | + child: MyDivider(double.infinity, w(0.5), | ||
| 145 | + color: MyColours.color_E7E7E7)), | ||
| 146 | + VEmptyView(24), | ||
| 147 | + ], | ||
| 148 | + ), | ||
| 149 | + )), | ||
| 150 | + ], | ||
| 151 | + )); | ||
| 152 | + } | ||
| 153 | +} |
| 1 | - | ||
| 2 | import 'dart:async'; | 1 | import 'dart:async'; |
| 3 | import 'dart:io'; | 2 | import 'dart:io'; |
| 4 | import 'dart:ui'; | 3 | import 'dart:ui'; |
| @@ -111,7 +110,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -111,7 +110,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 111 | }; | 110 | }; |
| 112 | 111 | ||
| 113 | bool success = await commentManageProvider.setComment(context, pramas, | 112 | bool success = await commentManageProvider.setComment(context, pramas, |
| 114 | - isShowLoading: isShowLoading) ; | 113 | + isShowLoading: isShowLoading); |
| 115 | if (success) { | 114 | if (success) { |
| 116 | //成功 刷新列表 | 115 | //成功 刷新列表 |
| 117 | _getSellerComments(isShowLoading: false); | 116 | _getSellerComments(isShowLoading: false); |
| @@ -180,7 +179,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -180,7 +179,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 180 | // return data; | 179 | // return data; |
| 181 | // } | 180 | // } |
| 182 | 181 | ||
| 183 | - Future<String?>? getThumbnailFile( | 182 | + Future<String?>? getThumbnailFile( |
| 184 | List<CommentsImageModel> imags, int index) async { | 183 | List<CommentsImageModel> imags, int index) async { |
| 185 | final fileName = await VideoThumbnail.thumbnailFile( | 184 | final fileName = await VideoThumbnail.thumbnailFile( |
| 186 | video: imags[index].url!, | 185 | video: imags[index].url!, |
| @@ -197,7 +196,6 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -197,7 +196,6 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 197 | Widget _getGridImg(List<CommentsImageModel> imags) { | 196 | Widget _getGridImg(List<CommentsImageModel> imags) { |
| 198 | imags.removeWhere((element) => element.url == null || element.url == ''); | 197 | imags.removeWhere((element) => element.url == null || element.url == ''); |
| 199 | 198 | ||
| 200 | - | ||
| 201 | return GridView.builder( | 199 | return GridView.builder( |
| 202 | controller: controller, | 200 | controller: controller, |
| 203 | padding: EdgeInsets.symmetric(vertical: w(7)), | 201 | padding: EdgeInsets.symmetric(vertical: w(7)), |
| @@ -214,7 +212,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -214,7 +212,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 214 | crossAxisSpacing: w(7), | 212 | crossAxisSpacing: w(7), |
| 215 | //子组件宽高长度比例 | 213 | //子组件宽高长度比例 |
| 216 | childAspectRatio: 1.0), | 214 | childAspectRatio: 1.0), |
| 217 | - itemBuilder: (BuildContext context, int index){ | 215 | + itemBuilder: (BuildContext context, int index) { |
| 218 | if (imags[index].avinfo != null && | 216 | if (imags[index].avinfo != null && |
| 219 | imags[index].avinfo != 'false' && | 217 | imags[index].avinfo != 'false' && |
| 220 | imags[index].avinfo != '0') { | 218 | imags[index].avinfo != '0') { |
| @@ -409,7 +407,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -409,7 +407,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 409 | Provider.of<CommentManageProvider>(context, listen: true); | 407 | Provider.of<CommentManageProvider>(context, listen: true); |
| 410 | return Scaffold( | 408 | return Scaffold( |
| 411 | backgroundColor: MyColours.color_ffffff, | 409 | backgroundColor: MyColours.color_ffffff, |
| 412 | - appBar: SystemAppBar('评价管理'), | 410 | + appBar: SystemAppBar('意见本'), |
| 413 | body: Consumer<CommentManageProvider>(builder: (context1, model, _) { | 411 | body: Consumer<CommentManageProvider>(builder: (context1, model, _) { |
| 414 | if (model.pageState != PageState.Success) { | 412 | if (model.pageState != PageState.Success) { |
| 415 | return ExceptionPage( | 413 | return ExceptionPage( |
lib/pages/my/consume/consume_home_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/res/colors.dart'; | ||
| 4 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 5 | +import 'package:one_key/utils/event_bus.dart'; | ||
| 6 | +import 'package:one_key/utils/screen_util.dart'; | ||
| 7 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 8 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 9 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 10 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 11 | +import 'package:provider/provider.dart'; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 消费金home | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +class ConsumeHomePage extends StatefulWidget { | ||
| 18 | + ConsumeHomePage({ | ||
| 19 | + Key? key, | ||
| 20 | + }) : super(key: key); | ||
| 21 | + | ||
| 22 | + @override | ||
| 23 | + _ConsumeHomePageState createState() => _ConsumeHomePageState(); | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +class _ConsumeHomePageState extends State<ConsumeHomePage> { | ||
| 27 | + @override | ||
| 28 | + void initState() { | ||
| 29 | + super.initState(); | ||
| 30 | + | ||
| 31 | + WidgetsBinding.instance.addPostFrameCallback((_) {}); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @override | ||
| 35 | + void dispose() { | ||
| 36 | + EventBus().emit('changeStatusColor'); | ||
| 37 | + | ||
| 38 | + super.dispose(); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @override | ||
| 42 | + Widget build(BuildContext context) { | ||
| 43 | + return Scaffold( | ||
| 44 | + backgroundColor: Colors.white, | ||
| 45 | + appBar: SystemAppBar( | ||
| 46 | + '消费金', | ||
| 47 | + ), | ||
| 48 | + body: Column( | ||
| 49 | + children: [ | ||
| 50 | + Expanded( | ||
| 51 | + child: SingleChildScrollView( | ||
| 52 | + child: Column( | ||
| 53 | + children: [ | ||
| 54 | + InkWell( | ||
| 55 | + onTap: () async { | ||
| 56 | + NavigatorUtil.goGrantPage(context); | ||
| 57 | + }, | ||
| 58 | + child: Padding( | ||
| 59 | + padding: EdgeInsets.only( | ||
| 60 | + left: w(16), | ||
| 61 | + top: w(12), | ||
| 62 | + bottom: w(12), | ||
| 63 | + right: w(12)), | ||
| 64 | + child: Row( | ||
| 65 | + children: [ | ||
| 66 | + Text( | ||
| 67 | + '扫码发放消费金', | ||
| 68 | + style: TextStyle( | ||
| 69 | + color: MyColours.color_515151, | ||
| 70 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 71 | + ), | ||
| 72 | + Spacer(), | ||
| 73 | + Container( | ||
| 74 | + padding: EdgeInsets.symmetric( | ||
| 75 | + horizontal: w(7), vertical: w(4)), | ||
| 76 | + child: Image.asset( | ||
| 77 | + "assets/arrow_right_new.png", | ||
| 78 | + width: ScreenUtil().setWidth(18), | ||
| 79 | + height: ScreenUtil().setWidth(32), | ||
| 80 | + ), | ||
| 81 | + ) | ||
| 82 | + ], | ||
| 83 | + ))), | ||
| 84 | + Padding( | ||
| 85 | + padding: EdgeInsets.only(left: w(16)), | ||
| 86 | + child: MyDivider(double.infinity, w(0.5), | ||
| 87 | + color: MyColours.color_E7E7E7)), | ||
| 88 | + VEmptyView(24), | ||
| 89 | + InkWell( | ||
| 90 | + onTap: () { | ||
| 91 | + NavigatorUtil.goReturnMoneyPage(context); | ||
| 92 | + }, | ||
| 93 | + child: Padding( | ||
| 94 | + padding: EdgeInsets.only( | ||
| 95 | + left: w(16), | ||
| 96 | + top: w(12), | ||
| 97 | + bottom: w(12), | ||
| 98 | + right: w(12)), | ||
| 99 | + child: Row( | ||
| 100 | + children: [ | ||
| 101 | + Text( | ||
| 102 | + '支付返消费金', | ||
| 103 | + style: TextStyle( | ||
| 104 | + color: MyColours.color_515151, | ||
| 105 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 106 | + ), | ||
| 107 | + Spacer(), | ||
| 108 | + Container( | ||
| 109 | + padding: EdgeInsets.symmetric( | ||
| 110 | + horizontal: w(7), vertical: w(4)), | ||
| 111 | + child: Image.asset( | ||
| 112 | + "assets/arrow_right_new.png", | ||
| 113 | + width: ScreenUtil().setWidth(18), | ||
| 114 | + height: ScreenUtil().setWidth(32), | ||
| 115 | + ), | ||
| 116 | + ) | ||
| 117 | + ], | ||
| 118 | + ))), | ||
| 119 | + Padding( | ||
| 120 | + padding: EdgeInsets.only(left: w(16)), | ||
| 121 | + child: MyDivider(double.infinity, w(0.5), | ||
| 122 | + color: MyColours.color_E7E7E7)), | ||
| 123 | + VEmptyView(24), | ||
| 124 | + InkWell( | ||
| 125 | + onTap: () { | ||
| 126 | + NavigatorUtil.goGiveMoneyBeforePayPage(context); | ||
| 127 | + }, | ||
| 128 | + child: Padding( | ||
| 129 | + padding: EdgeInsets.only( | ||
| 130 | + left: w(16), | ||
| 131 | + top: w(12), | ||
| 132 | + bottom: w(12), | ||
| 133 | + right: w(12)), | ||
| 134 | + child: Row( | ||
| 135 | + children: [ | ||
| 136 | + Text( | ||
| 137 | + '支付前送消费金', | ||
| 138 | + style: TextStyle( | ||
| 139 | + color: MyColours.color_515151, | ||
| 140 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 141 | + ), | ||
| 142 | + Spacer(), | ||
| 143 | + Container( | ||
| 144 | + padding: EdgeInsets.symmetric( | ||
| 145 | + horizontal: w(7), vertical: w(4)), | ||
| 146 | + child: Image.asset( | ||
| 147 | + "assets/arrow_right_new.png", | ||
| 148 | + width: ScreenUtil().setWidth(18), | ||
| 149 | + height: ScreenUtil().setWidth(32), | ||
| 150 | + ), | ||
| 151 | + ) | ||
| 152 | + ], | ||
| 153 | + ))), | ||
| 154 | + Padding( | ||
| 155 | + padding: EdgeInsets.only(left: w(16)), | ||
| 156 | + child: MyDivider(double.infinity, w(0.5), | ||
| 157 | + color: MyColours.color_E7E7E7)), | ||
| 158 | + VEmptyView(24), | ||
| 159 | + InkWell( | ||
| 160 | + onTap: () { | ||
| 161 | + // | ||
| 162 | + }, | ||
| 163 | + child: Padding( | ||
| 164 | + padding: EdgeInsets.only( | ||
| 165 | + left: w(16), | ||
| 166 | + top: w(12), | ||
| 167 | + bottom: w(12), | ||
| 168 | + right: w(12)), | ||
| 169 | + child: Row( | ||
| 170 | + children: [ | ||
| 171 | + Text( | ||
| 172 | + '客户裂变设置', | ||
| 173 | + style: TextStyle( | ||
| 174 | + color: MyColours.color_515151, | ||
| 175 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 176 | + ), | ||
| 177 | + Spacer(), | ||
| 178 | + Container( | ||
| 179 | + padding: EdgeInsets.symmetric( | ||
| 180 | + horizontal: w(7), vertical: w(4)), | ||
| 181 | + child: Image.asset( | ||
| 182 | + "assets/arrow_right_new.png", | ||
| 183 | + width: ScreenUtil().setWidth(18), | ||
| 184 | + height: ScreenUtil().setWidth(32), | ||
| 185 | + ), | ||
| 186 | + ) | ||
| 187 | + ], | ||
| 188 | + ))), | ||
| 189 | + Padding( | ||
| 190 | + padding: EdgeInsets.only(left: w(16)), | ||
| 191 | + child: MyDivider(double.infinity, w(0.5), | ||
| 192 | + color: MyColours.color_E7E7E7)), | ||
| 193 | + ], | ||
| 194 | + ), | ||
| 195 | + )), | ||
| 196 | + ], | ||
| 197 | + )); | ||
| 198 | + } | ||
| 199 | +} |
| @@ -19,7 +19,7 @@ import 'package:one_key/widgets/v_empty_view.dart'; | @@ -19,7 +19,7 @@ import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 19 | import 'package:provider/provider.dart'; | 19 | import 'package:provider/provider.dart'; |
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | - * 买单前送消费金 配置页 | 22 | + * 支付前送消费金 配置页 |
| 23 | */ | 23 | */ |
| 24 | class GiveMoneyBeforePayPage extends StatefulWidget { | 24 | class GiveMoneyBeforePayPage extends StatefulWidget { |
| 25 | const GiveMoneyBeforePayPage({super.key}); | 25 | const GiveMoneyBeforePayPage({super.key}); |
| @@ -629,14 +629,14 @@ class _GiveMoneyBeforePayPageState extends State<GiveMoneyBeforePayPage> { | @@ -629,14 +629,14 @@ class _GiveMoneyBeforePayPageState extends State<GiveMoneyBeforePayPage> { | ||
| 629 | return KeyboardDismissOnTap( | 629 | return KeyboardDismissOnTap( |
| 630 | child: Scaffold( | 630 | child: Scaffold( |
| 631 | backgroundColor: MyColours.color_ffffff, | 631 | backgroundColor: MyColours.color_ffffff, |
| 632 | - appBar: SystemAppBar('买单前送消费金'), | 632 | + appBar: SystemAppBar('支付前送消费金'), |
| 633 | key: scaffoldKey, | 633 | key: scaffoldKey, |
| 634 | body: Column(children: [ | 634 | body: Column(children: [ |
| 635 | Expanded( | 635 | Expanded( |
| 636 | child: SingleChildScrollView( | 636 | child: SingleChildScrollView( |
| 637 | controller: controller, | 637 | controller: controller, |
| 638 | child: Column(children: [ | 638 | child: Column(children: [ |
| 639 | - _canUse('新用户买单前送消费金', isNew, () { | 639 | + _canUse('新用户支付前送消费金', isNew, () { |
| 640 | setState(() { | 640 | setState(() { |
| 641 | isNew = !isNew; | 641 | isNew = !isNew; |
| 642 | }); | 642 | }); |
| @@ -742,7 +742,7 @@ class _GiveMoneyBeforePayPageState extends State<GiveMoneyBeforePayPage> { | @@ -742,7 +742,7 @@ class _GiveMoneyBeforePayPageState extends State<GiveMoneyBeforePayPage> { | ||
| 742 | _randomWidget( | 742 | _randomWidget( |
| 743 | minCNew, minNodeNew, maxCNew, maxNodeNew), | 743 | minCNew, minNodeNew, maxCNew, maxNodeNew), |
| 744 | VEmptyView(24), | 744 | VEmptyView(24), |
| 745 | - _canUse('老用户买单前送消费金', isOld, () { | 745 | + _canUse('老用户支付前送消费金', isOld, () { |
| 746 | setState(() { | 746 | setState(() { |
| 747 | isOld = !isOld; | 747 | isOld = !isOld; |
| 748 | }); | 748 | }); |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/models/customer_label_model.dart'; | ||
| 4 | +import 'package:one_key/provider/customer_provider.dart'; | ||
| 5 | +import 'package:one_key/provider/user_model.dart'; | ||
| 6 | +import 'package:one_key/res/colors.dart'; | ||
| 7 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 8 | +import 'package:one_key/utils/screen_util.dart'; | ||
| 9 | +import 'package:one_key/utils/utils.dart'; | ||
| 10 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 11 | +import 'package:provider/provider.dart'; | ||
| 12 | + | ||
| 13 | +class CustomLabelPage extends StatefulWidget { | ||
| 14 | + const CustomLabelPage({super.key}); | ||
| 15 | + | ||
| 16 | + @override | ||
| 17 | + State<CustomLabelPage> createState() => _CustomLabelPageState(); | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +class _CustomLabelPageState extends State<CustomLabelPage> { | ||
| 21 | + late CustomerProvider customerProvider; | ||
| 22 | + | ||
| 23 | + @override | ||
| 24 | + void initState() { | ||
| 25 | + WidgetsBinding.instance.addPostFrameCallback((_) async { | ||
| 26 | + _getLabelBySellerid(); | ||
| 27 | + }); | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + ///获取商家标签 | ||
| 31 | + _getLabelBySellerid() async { | ||
| 32 | + await customerProvider.getLabelBySellerid(context); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + ///商家创建商家标签 | ||
| 36 | + _createLabelBySellerid(String? name) async { | ||
| 37 | + Map<String, String?> params = { | ||
| 38 | + "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 39 | + 'label': name | ||
| 40 | + }; | ||
| 41 | + bool success = | ||
| 42 | + await customerProvider.createLabelBySellerid(context, params); | ||
| 43 | + if (success) { | ||
| 44 | + //刷新当前标签列表 | ||
| 45 | + Utils.showToast('标签添加成功'); | ||
| 46 | + //调用获取标签接口 | ||
| 47 | + // 。。。。。。 | ||
| 48 | + _getLabelBySellerid(); | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + ///商家修改标签 | ||
| 53 | + _setLabelBySellerid(String? id, String? name) async { | ||
| 54 | + Map<String, String?> params = {"id": id, 'label': name}; | ||
| 55 | + bool success = await customerProvider.setLabelBySellerid(context, params); | ||
| 56 | + if (success) { | ||
| 57 | + //刷新当前标签列表 | ||
| 58 | + Utils.showToast('标签修改成功'); | ||
| 59 | + //调用获取标签接口 | ||
| 60 | + // 。。。。。。 | ||
| 61 | + _getLabelBySellerid(); | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + //构建标签 | ||
| 66 | + List<Widget> _buildLabelItem(List<CustomerLabelSunModel> data) { | ||
| 67 | + List<Widget> items = []; | ||
| 68 | + | ||
| 69 | + for (CustomerLabelSunModel item in data) { | ||
| 70 | + items.add(InkWell( | ||
| 71 | + onTap: () { | ||
| 72 | + DialogUtil.textfeildAlertDialog(context, | ||
| 73 | + title: '自定义标签名称', | ||
| 74 | + hintText: '例:高频客户', | ||
| 75 | + text: item.label!, | ||
| 76 | + lenghtLimit: false, | ||
| 77 | + toast: '请输入标签名称', rCallback: (name) { | ||
| 78 | + print(name); | ||
| 79 | + _setLabelBySellerid(item.id, name as String?); | ||
| 80 | + // _addCookbookClass(name, showLoading: true); | ||
| 81 | + }); | ||
| 82 | + }, | ||
| 83 | + child: Container( | ||
| 84 | + // height: ScreenUtil().setWidth(40), | ||
| 85 | + padding: EdgeInsets.symmetric(horizontal: w(6), vertical: w(3)), | ||
| 86 | + decoration: BoxDecoration( | ||
| 87 | + border: Border.all(width: w(1), color: MyColours.color_A78E44), | ||
| 88 | + borderRadius: BorderRadius.circular(r(5))), | ||
| 89 | + child: Text( | ||
| 90 | + item.label!, | ||
| 91 | + style: TextStyle( | ||
| 92 | + color: MyColours.color_A78E44, | ||
| 93 | + fontSize: ScreenUtil().setSp(22), | ||
| 94 | + ), | ||
| 95 | + ), | ||
| 96 | + ))); | ||
| 97 | + } | ||
| 98 | + items.add(InkWell( | ||
| 99 | + onTap: () { | ||
| 100 | + DialogUtil.textfeildAlertDialog(context, | ||
| 101 | + title: '自定义标签名称', | ||
| 102 | + hintText: '例:高频客户', | ||
| 103 | + text: '', | ||
| 104 | + lenghtLimit: false, | ||
| 105 | + toast: '请输入标签名称', | ||
| 106 | + lCallback: () {}, rCallback: (name) { | ||
| 107 | + print(name); | ||
| 108 | + // _addCookbookClass(name, showLoading: true); | ||
| 109 | + _createLabelBySellerid(name as String?); | ||
| 110 | + }); | ||
| 111 | + }, | ||
| 112 | + child: Container( | ||
| 113 | + width: ScreenUtil().setWidth(90), | ||
| 114 | + height: ScreenUtil().setWidth(40), | ||
| 115 | + alignment: Alignment.center, | ||
| 116 | + decoration: BoxDecoration( | ||
| 117 | + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)), | ||
| 118 | + border: Border.all( | ||
| 119 | + color: MyColours.color_199095, | ||
| 120 | + width: ScreenUtil().setWidth(2))), | ||
| 121 | + child: Image.asset(Utils.getImgPath('add_area'), | ||
| 122 | + width: ScreenUtil().setWidth(14)), | ||
| 123 | + ), | ||
| 124 | + )); | ||
| 125 | + return items; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + @override | ||
| 129 | + Widget build(BuildContext context) { | ||
| 130 | + customerProvider = Provider.of<CustomerProvider>(context, listen: true); | ||
| 131 | + return Scaffold( | ||
| 132 | + appBar: SystemAppBar('客户自定义标签'), | ||
| 133 | + backgroundColor: MyColours.color_ffffff, | ||
| 134 | + body: SingleChildScrollView( | ||
| 135 | + child: Container( | ||
| 136 | + padding: EdgeInsets.symmetric(vertical: w(20), horizontal: w(14)), | ||
| 137 | + child: Wrap( | ||
| 138 | + spacing: ScreenUtil().setWidth(20), | ||
| 139 | + runSpacing: ScreenUtil().setWidth(10), | ||
| 140 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 141 | + children: _buildLabelItem(customerProvider.labelList!))), | ||
| 142 | + ), | ||
| 143 | + ); | ||
| 144 | + } | ||
| 145 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 4 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 5 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 6 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 7 | +import 'package:provider/provider.dart'; | ||
| 8 | + | ||
| 9 | +import '../../../provider/collect_store_provider.dart'; | ||
| 10 | +import '../../../provider/marketing_center_provider.dart'; | ||
| 11 | +import '../../../provider/user_model.dart'; | ||
| 12 | +import '../../../res/colors.dart'; | ||
| 13 | +import '../../../utils/dialog_util.dart'; | ||
| 14 | +import '../../../utils/event_bus.dart'; | ||
| 15 | +import '../../../utils/screen_util.dart'; | ||
| 16 | +import '../../../utils/utils.dart'; | ||
| 17 | +import '../../../widgets/round_button.dart'; | ||
| 18 | +import '../../../widgets/system_app_bar.dart'; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * 客户管理home | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | +class CustomerHomePage extends StatefulWidget { | ||
| 25 | + final bool sellerNormalSpecial; | ||
| 26 | + final bool sellerPreserve; | ||
| 27 | + final bool sellerMarketing; | ||
| 28 | + CustomerHomePage({ | ||
| 29 | + Key? key, | ||
| 30 | + required this.sellerNormalSpecial, | ||
| 31 | + required this.sellerPreserve, | ||
| 32 | + required this.sellerMarketing, | ||
| 33 | + }) : super(key: key); | ||
| 34 | + | ||
| 35 | + @override | ||
| 36 | + _CustomerHomePageState createState() => _CustomerHomePageState(); | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +class _CustomerHomePageState extends State<CustomerHomePage> { | ||
| 40 | + @override | ||
| 41 | + void initState() { | ||
| 42 | + super.initState(); | ||
| 43 | + | ||
| 44 | + WidgetsBinding.instance.addPostFrameCallback((_) {}); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @override | ||
| 48 | + void dispose() { | ||
| 49 | + EventBus().emit('changeStatusColor'); | ||
| 50 | + | ||
| 51 | + super.dispose(); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @override | ||
| 55 | + Widget build(BuildContext context) { | ||
| 56 | + UserModel userModel = Provider.of<UserModel>(context, listen: false); | ||
| 57 | + return Scaffold( | ||
| 58 | + backgroundColor: Colors.white, | ||
| 59 | + appBar: SystemAppBar( | ||
| 60 | + '菜单管理', | ||
| 61 | + ), | ||
| 62 | + body: Column( | ||
| 63 | + children: [ | ||
| 64 | + Expanded( | ||
| 65 | + child: SingleChildScrollView( | ||
| 66 | + child: Column( | ||
| 67 | + children: [ | ||
| 68 | + InkWell( | ||
| 69 | + onTap: () async { | ||
| 70 | + if (userModel.user?.role_name == '管理员' || | ||
| 71 | + userModel.user?.role_name == '店长') { | ||
| 72 | + if (Utils.getAuthority(context, '全店客情')) { | ||
| 73 | + if (widget.sellerNormalSpecial) { | ||
| 74 | + //标准版 | ||
| 75 | + | ||
| 76 | + if (widget.sellerPreserve || | ||
| 77 | + widget.sellerMarketing) { | ||
| 78 | + NavigatorUtil.goStoreCustomerPage(context); | ||
| 79 | + } else { | ||
| 80 | + NavigatorUtil.goCustomerListPageSim(context); | ||
| 81 | + } | ||
| 82 | + } else { | ||
| 83 | + NavigatorUtil.goStoreCustomerPage(context); | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + } else { | ||
| 87 | + if (Utils.getAuthority(context, '我的客情')) { | ||
| 88 | + if (widget.sellerNormalSpecial) { | ||
| 89 | + //标准版 | ||
| 90 | + if (widget.sellerPreserve || | ||
| 91 | + widget.sellerMarketing) { | ||
| 92 | + NavigatorUtil.goMyCustomerPage(context); | ||
| 93 | + } else { | ||
| 94 | + NavigatorUtil.goMyCustomerListPageSim(context); | ||
| 95 | + } | ||
| 96 | + } else { | ||
| 97 | + NavigatorUtil.goMyCustomerPage(context); | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + }, | ||
| 102 | + child: Padding( | ||
| 103 | + padding: EdgeInsets.only( | ||
| 104 | + left: w(16), | ||
| 105 | + top: w(12), | ||
| 106 | + bottom: w(12), | ||
| 107 | + right: w(12)), | ||
| 108 | + child: Row( | ||
| 109 | + children: [ | ||
| 110 | + Text( | ||
| 111 | + '客户汇总', | ||
| 112 | + style: TextStyle( | ||
| 113 | + color: MyColours.color_515151, | ||
| 114 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 115 | + ), | ||
| 116 | + Spacer(), | ||
| 117 | + Container( | ||
| 118 | + padding: EdgeInsets.symmetric( | ||
| 119 | + horizontal: w(7), vertical: w(4)), | ||
| 120 | + child: Image.asset( | ||
| 121 | + "assets/arrow_right_new.png", | ||
| 122 | + width: ScreenUtil().setWidth(18), | ||
| 123 | + height: ScreenUtil().setWidth(32), | ||
| 124 | + ), | ||
| 125 | + ) | ||
| 126 | + ], | ||
| 127 | + ))), | ||
| 128 | + Padding( | ||
| 129 | + padding: EdgeInsets.only(left: w(16)), | ||
| 130 | + child: MyDivider(double.infinity, w(0.5), | ||
| 131 | + color: MyColours.color_E7E7E7)), | ||
| 132 | + VEmptyView(24), | ||
| 133 | + InkWell( | ||
| 134 | + onTap: () { | ||
| 135 | + if (userModel.user?.role_name == '管理员' || | ||
| 136 | + userModel.user?.role_name == '店长') { | ||
| 137 | + if (Utils.getAuthority(context, '全店客情')) { | ||
| 138 | + if (widget.sellerNormalSpecial) { | ||
| 139 | + //标准版 | ||
| 140 | + | ||
| 141 | + if (widget.sellerPreserve || | ||
| 142 | + widget.sellerMarketing) { | ||
| 143 | + NavigatorUtil.goStoreCustomerPage(context); | ||
| 144 | + } else { | ||
| 145 | + NavigatorUtil.goCustomerListPageSim(context); | ||
| 146 | + } | ||
| 147 | + } else { | ||
| 148 | + NavigatorUtil.goStoreCustomerPage(context); | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + } else { | ||
| 152 | + if (Utils.getAuthority(context, '我的客情')) { | ||
| 153 | + if (widget.sellerNormalSpecial) { | ||
| 154 | + //标准版 | ||
| 155 | + if (widget.sellerPreserve || | ||
| 156 | + widget.sellerMarketing) { | ||
| 157 | + NavigatorUtil.goMyCustomerPage(context); | ||
| 158 | + } else { | ||
| 159 | + NavigatorUtil.goMyCustomerListPageSim(context); | ||
| 160 | + } | ||
| 161 | + } else { | ||
| 162 | + NavigatorUtil.goMyCustomerPage(context); | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + }, | ||
| 167 | + child: Padding( | ||
| 168 | + padding: EdgeInsets.only( | ||
| 169 | + left: w(16), | ||
| 170 | + top: w(12), | ||
| 171 | + bottom: w(12), | ||
| 172 | + right: w(12)), | ||
| 173 | + child: Row( | ||
| 174 | + children: [ | ||
| 175 | + Text( | ||
| 176 | + '客户列表', | ||
| 177 | + style: TextStyle( | ||
| 178 | + color: MyColours.color_515151, | ||
| 179 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 180 | + ), | ||
| 181 | + Spacer(), | ||
| 182 | + Container( | ||
| 183 | + padding: EdgeInsets.symmetric( | ||
| 184 | + horizontal: w(7), vertical: w(4)), | ||
| 185 | + child: Image.asset( | ||
| 186 | + "assets/arrow_right_new.png", | ||
| 187 | + width: ScreenUtil().setWidth(18), | ||
| 188 | + height: ScreenUtil().setWidth(32), | ||
| 189 | + ), | ||
| 190 | + ) | ||
| 191 | + ], | ||
| 192 | + ))), | ||
| 193 | + Padding( | ||
| 194 | + padding: EdgeInsets.only(left: w(16)), | ||
| 195 | + child: MyDivider(double.infinity, w(0.5), | ||
| 196 | + color: MyColours.color_E7E7E7)), | ||
| 197 | + VEmptyView(24), | ||
| 198 | + InkWell( | ||
| 199 | + onTap: () { | ||
| 200 | + // | ||
| 201 | + | ||
| 202 | + NavigatorUtil.goCustomLabelPage(context); | ||
| 203 | + }, | ||
| 204 | + child: Padding( | ||
| 205 | + padding: EdgeInsets.only( | ||
| 206 | + left: w(16), | ||
| 207 | + top: w(12), | ||
| 208 | + bottom: w(12), | ||
| 209 | + right: w(12)), | ||
| 210 | + child: Row( | ||
| 211 | + children: [ | ||
| 212 | + Text( | ||
| 213 | + '客户自定义标签', | ||
| 214 | + style: TextStyle( | ||
| 215 | + color: MyColours.color_515151, | ||
| 216 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 217 | + ), | ||
| 218 | + Spacer(), | ||
| 219 | + Container( | ||
| 220 | + padding: EdgeInsets.symmetric( | ||
| 221 | + horizontal: w(7), vertical: w(4)), | ||
| 222 | + child: Image.asset( | ||
| 223 | + "assets/arrow_right_new.png", | ||
| 224 | + width: ScreenUtil().setWidth(18), | ||
| 225 | + height: ScreenUtil().setWidth(32), | ||
| 226 | + ), | ||
| 227 | + ) | ||
| 228 | + ], | ||
| 229 | + ))), | ||
| 230 | + Padding( | ||
| 231 | + padding: EdgeInsets.only(left: w(16)), | ||
| 232 | + child: MyDivider(double.infinity, w(0.5), | ||
| 233 | + color: MyColours.color_E7E7E7)), | ||
| 234 | + ], | ||
| 235 | + ), | ||
| 236 | + )), | ||
| 237 | + ], | ||
| 238 | + )); | ||
| 239 | + } | ||
| 240 | +} |
| 1 | - | ||
| 2 | import 'dart:convert'; | 1 | import 'dart:convert'; |
| 3 | import 'dart:ui'; | 2 | import 'dart:ui'; |
| 4 | 3 | ||
| @@ -316,9 +315,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -316,9 +315,9 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 316 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); | 315 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); |
| 317 | return Scaffold( | 316 | return Scaffold( |
| 318 | backgroundColor: MyColours.color_f3f3f3, | 317 | backgroundColor: MyColours.color_f3f3f3, |
| 319 | - appBar: SystemAppBar('我的客情', onTap: () { | 318 | + appBar: SystemAppBar('客户汇总', onTap: () { |
| 320 | if (Navigator.canPop(context)) { | 319 | if (Navigator.canPop(context)) { |
| 321 | - Navigator.pop(context); | 320 | + Navigator.pop(context); |
| 322 | } | 321 | } |
| 323 | }), | 322 | }), |
| 324 | body: Consumer<CustomerProvider>(builder: (context, model, _) { | 323 | body: Consumer<CustomerProvider>(builder: (context, model, _) { |
| @@ -426,11 +425,12 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -426,11 +425,12 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 426 | .guestSunmodel!.tips!.task!.length == | 425 | .guestSunmodel!.tips!.task!.length == |
| 427 | 0 | 426 | 0 |
| 428 | ? 0 | 427 | ? 0 |
| 429 | - : customerProvider.guestSunmodel!.tips!.task!.length, | 428 | + : customerProvider |
| 429 | + .guestSunmodel!.tips!.task!.length, | ||
| 430 | itemBuilder: (BuildContext context, int index) { | 430 | itemBuilder: (BuildContext context, int index) { |
| 431 | // locationState = state; | 431 | // locationState = state; |
| 432 | - Task data = | ||
| 433 | - (customerProvider.guestSunmodel!.tips!.task![index])!; | 432 | + Task data = (customerProvider |
| 433 | + .guestSunmodel!.tips!.task![index])!; | ||
| 434 | return Column( | 434 | return Column( |
| 435 | children: [ | 435 | children: [ |
| 436 | VEmptyView(10), | 436 | VEmptyView(10), |
| @@ -543,8 +543,8 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -543,8 +543,8 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 543 | itemCount: | 543 | itemCount: |
| 544 | customerProvider.guestSunmodel!.tips!.recover == | 544 | customerProvider.guestSunmodel!.tips!.recover == |
| 545 | null || | 545 | null || |
| 546 | - customerProvider.guestSunmodel!.tips!.recover! | ||
| 547 | - .length == | 546 | + customerProvider.guestSunmodel!.tips! |
| 547 | + .recover!.length == | ||
| 548 | 0 | 548 | 0 |
| 549 | ? 0 | 549 | ? 0 |
| 550 | : 1, | 550 | : 1, |
| @@ -614,13 +614,14 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | @@ -614,13 +614,14 @@ class _MyCustomerHomePageState extends State<MyCustomerHomePage> { | ||
| 614 | controller: _controller, | 614 | controller: _controller, |
| 615 | shrinkWrap: true, | 615 | shrinkWrap: true, |
| 616 | cacheExtent: ScreenUtil().setWidth(0), | 616 | cacheExtent: ScreenUtil().setWidth(0), |
| 617 | - itemCount: customerProvider.guestSunmodel!.tips!.awaken == | ||
| 618 | - null || | ||
| 619 | - customerProvider | ||
| 620 | - .guestSunmodel!.tips!.awaken!.length == | ||
| 621 | - 0 | ||
| 622 | - ? 0 | ||
| 623 | - : 1, | 617 | + itemCount: |
| 618 | + customerProvider.guestSunmodel!.tips!.awaken == | ||
| 619 | + null || | ||
| 620 | + customerProvider.guestSunmodel!.tips! | ||
| 621 | + .awaken!.length == | ||
| 622 | + 0 | ||
| 623 | + ? 0 | ||
| 624 | + : 1, | ||
| 624 | itemBuilder: (BuildContext context, int index) { | 625 | itemBuilder: (BuildContext context, int index) { |
| 625 | // locationState = state; | 626 | // locationState = state; |
| 626 | 627 |
| @@ -341,7 +341,7 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | @@ -341,7 +341,7 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | ||
| 341 | child: Scaffold( | 341 | child: Scaffold( |
| 342 | backgroundColor: MyColours.color_ffffff, | 342 | backgroundColor: MyColours.color_ffffff, |
| 343 | appBar: SystemAppBar( | 343 | appBar: SystemAppBar( |
| 344 | - '客情设置', | 344 | + '预订客人信息录入限制设置', |
| 345 | onTap: () { | 345 | onTap: () { |
| 346 | if (Navigator.canPop(context)) { | 346 | if (Navigator.canPop(context)) { |
| 347 | Navigator.pop(context); | 347 | Navigator.pop(context); |
| @@ -359,18 +359,6 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | @@ -359,18 +359,6 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | ||
| 359 | child: Column( | 359 | child: Column( |
| 360 | crossAxisAlignment: CrossAxisAlignment.start, | 360 | crossAxisAlignment: CrossAxisAlignment.start, |
| 361 | children: [ | 361 | children: [ |
| 362 | - Container( | ||
| 363 | - padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 364 | - child: Text('客人信息录入', | ||
| 365 | - style: TextStyle( | ||
| 366 | - color: MyColours.color_515151, | ||
| 367 | - fontSize: ScreenUtil().setSp(32)))), | ||
| 368 | - MyDivider( | ||
| 369 | - double.infinity, | ||
| 370 | - w(1), | ||
| 371 | - color: MyColours.color_E7E7E7, | ||
| 372 | - ), | ||
| 373 | - VEmptyView(24), | ||
| 374 | InkWell( | 362 | InkWell( |
| 375 | onTap: () { | 363 | onTap: () { |
| 376 | setState(() { | 364 | setState(() { |
| @@ -553,667 +541,7 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | @@ -553,667 +541,7 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | ||
| 553 | w(1), | 541 | w(1), |
| 554 | color: MyColours.color_E7E7E7, | 542 | color: MyColours.color_E7E7E7, |
| 555 | )), | 543 | )), |
| 556 | - VEmptyView(48), | ||
| 557 | - Container( | ||
| 558 | - padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 559 | - child: Text('历史订单', | ||
| 560 | - style: TextStyle( | ||
| 561 | - color: MyColours.color_515151, | ||
| 562 | - fontSize: ScreenUtil().setSp(32)))), | ||
| 563 | - VEmptyView(22), | ||
| 564 | - MyDivider( | ||
| 565 | - double.infinity, | ||
| 566 | - w(1), | ||
| 567 | - color: MyColours.color_E7E7E7, | ||
| 568 | - ), | ||
| 569 | - VEmptyView(24), | ||
| 570 | - InkWell( | ||
| 571 | - onTap: () { | ||
| 572 | - setState(() { | ||
| 573 | - customerProvider.isAddOver = !customerProvider.isAddOver; | ||
| 574 | - }); | ||
| 575 | - // _sellerGuestSet(); | ||
| 576 | - }, | ||
| 577 | - child: Container( | ||
| 578 | - padding: EdgeInsets.symmetric( | ||
| 579 | - vertical: w(8), horizontal: w(14)), | ||
| 580 | - child: Row( | ||
| 581 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 582 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 583 | - children: [ | ||
| 584 | - Text('允许新建过去餐段的订单', | ||
| 585 | - style: TextStyle( | ||
| 586 | - color: MyColours.color_515151, | ||
| 587 | - fontSize: ScreenUtil().setSp(28))), | ||
| 588 | - Image.asset( | ||
| 589 | - customerProvider.isAddOver | ||
| 590 | - ? Utils.getImgPath('swich_on') | ||
| 591 | - : Utils.getImgPath('swich_off'), | ||
| 592 | - width: ScreenUtil().setWidth(88), | ||
| 593 | - // height: ScreenUtil().setWidth(82), | ||
| 594 | - ), | ||
| 595 | - ], | ||
| 596 | - )), | ||
| 597 | - ), | ||
| 598 | - Padding( | ||
| 599 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 600 | - child: MyDivider( | ||
| 601 | - double.infinity, | ||
| 602 | - w(1), | ||
| 603 | - color: MyColours.color_E7E7E7, | ||
| 604 | - )), | ||
| 605 | - VEmptyView(24), | ||
| 606 | - InkWell( | ||
| 607 | - onTap: () { | ||
| 608 | - setState(() { | ||
| 609 | - customerProvider.isSetOver = | ||
| 610 | - !customerProvider.isSetOver; | ||
| 611 | - }); | ||
| 612 | - }, | ||
| 613 | - child: Container( | ||
| 614 | - padding: EdgeInsets.symmetric( | ||
| 615 | - vertical: w(8), horizontal: w(14)), | ||
| 616 | - child: Row( | ||
| 617 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 618 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 619 | - children: [ | ||
| 620 | - Text('允许变更过去餐段订单', | ||
| 621 | - style: TextStyle( | ||
| 622 | - color: MyColours.color_515151, | ||
| 623 | - fontSize: ScreenUtil().setSp(28))), | ||
| 624 | - Image.asset( | ||
| 625 | - customerProvider.isSetOver | ||
| 626 | - ? Utils.getImgPath('swich_on') | ||
| 627 | - : Utils.getImgPath('swich_off'), | ||
| 628 | - width: ScreenUtil().setWidth(88), | ||
| 629 | - // height: ScreenUtil().setWidth(82), | ||
| 630 | - ), | ||
| 631 | - ], | ||
| 632 | - ), | ||
| 633 | - )), | ||
| 634 | - Padding( | ||
| 635 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 636 | - child: MyDivider( | ||
| 637 | - double.infinity, | ||
| 638 | - w(1), | ||
| 639 | - color: MyColours.color_E7E7E7, | ||
| 640 | - )), | ||
| 641 | - VEmptyView(24), | ||
| 642 | - InkWell( | ||
| 643 | - onTap: () { | ||
| 644 | - setState(() { | ||
| 645 | - customerProvider.isReserveOver = | ||
| 646 | - !customerProvider.isReserveOver; | ||
| 647 | - }); | ||
| 648 | - }, | ||
| 649 | - child: Container( | ||
| 650 | - padding: EdgeInsets.symmetric( | ||
| 651 | - vertical: w(8), horizontal: w(14)), | ||
| 652 | - child: Row( | ||
| 653 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 654 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 655 | - children: [ | ||
| 656 | - Text('允许变更订单到过去餐段', | ||
| 657 | - style: TextStyle( | ||
| 658 | - color: MyColours.color_515151, | ||
| 659 | - fontSize: ScreenUtil().setSp(28))), | ||
| 660 | - Image.asset( | ||
| 661 | - customerProvider.isReserveOver | ||
| 662 | - ? Utils.getImgPath('swich_on') | ||
| 663 | - : Utils.getImgPath('swich_off'), | ||
| 664 | - width: ScreenUtil().setWidth(88), | ||
| 665 | - // height: ScreenUtil().setWidth(82), | ||
| 666 | - ), | ||
| 667 | - ], | ||
| 668 | - ), | ||
| 669 | - )), | ||
| 670 | - Padding( | ||
| 671 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 672 | - child: MyDivider( | ||
| 673 | - double.infinity, | ||
| 674 | - w(1), | ||
| 675 | - color: MyColours.color_E7E7E7, | ||
| 676 | - )), | ||
| 677 | - VEmptyView(24), | ||
| 678 | - InkWell( | ||
| 679 | - onTap: () { | ||
| 680 | - setState(() { | ||
| 681 | - customerProvider.isReserveCancel = | ||
| 682 | - !customerProvider.isReserveCancel; | ||
| 683 | - }); | ||
| 684 | - }, | ||
| 685 | - child: Container( | ||
| 686 | - padding: EdgeInsets.symmetric( | ||
| 687 | - vertical: w(8), horizontal: w(14)), | ||
| 688 | - child: Row( | ||
| 689 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 690 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 691 | - children: [ | ||
| 692 | - Text('允许取消过去餐段的订单', | ||
| 693 | - style: TextStyle( | ||
| 694 | - color: MyColours.color_515151, | ||
| 695 | - fontSize: ScreenUtil().setSp(28))), | ||
| 696 | - Image.asset( | ||
| 697 | - customerProvider.isReserveCancel | ||
| 698 | - ? Utils.getImgPath('swich_on') | ||
| 699 | - : Utils.getImgPath('swich_off'), | ||
| 700 | - width: ScreenUtil().setWidth(88), | ||
| 701 | - // height: ScreenUtil().setWidth(82), | ||
| 702 | - ), | ||
| 703 | - ], | ||
| 704 | - ), | ||
| 705 | - )), | ||
| 706 | - Padding( | ||
| 707 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 708 | - child: MyDivider( | ||
| 709 | - double.infinity, | ||
| 710 | - w(1), | ||
| 711 | - color: MyColours.color_E7E7E7, | ||
| 712 | - )), | ||
| 713 | - VEmptyView(48), | ||
| 714 | - Row( | ||
| 715 | - children: [ | ||
| 716 | - Expanded( | ||
| 717 | - child: Container( | ||
| 718 | - padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 719 | - child: Text('临餐取消预订限制(前台及管理员除外)', | ||
| 720 | - overflow: TextOverflow.ellipsis, | ||
| 721 | - maxLines: 10, | ||
| 722 | - style: TextStyle( | ||
| 723 | - color: MyColours.color_515151, | ||
| 724 | - fontSize: ScreenUtil().setSp(32))))), | ||
| 725 | - HEmptyView(2), | ||
| 726 | - Container( | ||
| 727 | - width: w(40), | ||
| 728 | - child: TextField( | ||
| 729 | - controller: controllerDay, | ||
| 730 | - textAlign: TextAlign.right, | ||
| 731 | - textAlignVertical: TextAlignVertical.bottom, | ||
| 732 | - maxLines: 1, | ||
| 733 | - // //光标颜色 | ||
| 734 | - // cursorColor: | ||
| 735 | - // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 736 | - //输入文本的样式 | ||
| 737 | - style: TextStyle( | ||
| 738 | - color: MyColours.color_515151, | ||
| 739 | - fontSize: ScreenUtil().setSp(32), | ||
| 740 | - ), | ||
| 741 | - inputFormatters: <TextInputFormatter>[ | ||
| 742 | - FilteringTextInputFormatter.allow( | ||
| 743 | - RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 744 | - ], | ||
| 745 | - decoration: InputDecoration( | ||
| 746 | - isCollapsed: true, | ||
| 747 | - border: | ||
| 748 | - OutlineInputBorder(borderSide: BorderSide.none), | ||
| 749 | - hintText: '输入', | ||
| 750 | - hintStyle: TextStyle( | ||
| 751 | - color: MyColours.color_999999, | ||
| 752 | - fontSize: ScreenUtil().setSp(32), | ||
| 753 | - ), | ||
| 754 | - enabledBorder: new UnderlineInputBorder( | ||
| 755 | - borderSide: BorderSide.none, | ||
| 756 | - ), | ||
| 757 | - focusedBorder: new UnderlineInputBorder( | ||
| 758 | - borderSide: BorderSide.none, | ||
| 759 | - ), | ||
| 760 | - ), | ||
| 761 | - onChanged: (value) {}, | ||
| 762 | - onEditingComplete: () { | ||
| 763 | - FocusScope.of(context) | ||
| 764 | - .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 765 | - }, | ||
| 766 | - keyboardType: TextInputType.number), | ||
| 767 | - ), | ||
| 768 | - Text('天', | ||
| 769 | - style: TextStyle( | ||
| 770 | - color: MyColours.color_515151, | ||
| 771 | - fontSize: ScreenUtil().setSp(32))), | ||
| 772 | - HEmptyView(24), | ||
| 773 | - ], | ||
| 774 | - ), | ||
| 775 | - VEmptyView(22), | ||
| 776 | - MyDivider( | ||
| 777 | - double.infinity, | ||
| 778 | - w(1), | ||
| 779 | - color: MyColours.color_E7E7E7, | ||
| 780 | - ), | ||
| 781 | - VEmptyView(24), | ||
| 782 | - InkWell( | ||
| 783 | - onTap: () { | ||
| 784 | - setState(() { | ||
| 785 | - customerProvider.cancelOrderdayShopowner = | ||
| 786 | - !customerProvider.cancelOrderdayShopowner; | ||
| 787 | - }); | ||
| 788 | - // _sellerGuestSet(); | ||
| 789 | - }, | ||
| 790 | - child: Container( | ||
| 791 | - padding: EdgeInsets.symmetric( | ||
| 792 | - vertical: w(8), horizontal: w(14)), | ||
| 793 | - child: Row( | ||
| 794 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 795 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 796 | - children: [ | ||
| 797 | - Text('允许店长临餐取消预订', | ||
| 798 | - style: TextStyle( | ||
| 799 | - color: MyColours.color_515151, | ||
| 800 | - fontSize: ScreenUtil().setSp(28))), | ||
| 801 | - Image.asset( | ||
| 802 | - customerProvider.cancelOrderdayShopowner | ||
| 803 | - ? Utils.getImgPath('swich_on') | ||
| 804 | - : Utils.getImgPath('swich_off'), | ||
| 805 | - width: ScreenUtil().setWidth(88), | ||
| 806 | - // height: ScreenUtil().setWidth(82), | ||
| 807 | - ), | ||
| 808 | - ], | ||
| 809 | - )), | ||
| 810 | - ), | ||
| 811 | - Padding( | ||
| 812 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 813 | - child: MyDivider( | ||
| 814 | - double.infinity, | ||
| 815 | - w(1), | ||
| 816 | - color: MyColours.color_E7E7E7, | ||
| 817 | - )), | ||
| 818 | - VEmptyView(24), | ||
| 819 | - InkWell( | ||
| 820 | - onTap: () { | ||
| 821 | - setState(() { | ||
| 822 | - customerProvider.cancelOrderdayManager = | ||
| 823 | - !customerProvider.cancelOrderdayManager; | ||
| 824 | - }); | ||
| 825 | - }, | ||
| 826 | - child: Container( | ||
| 827 | - padding: EdgeInsets.symmetric( | ||
| 828 | - vertical: w(8), horizontal: w(14)), | ||
| 829 | - child: Row( | ||
| 830 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 831 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 832 | - children: [ | ||
| 833 | - Text('允许经理临餐取消预订', | ||
| 834 | - style: TextStyle( | ||
| 835 | - color: MyColours.color_515151, | ||
| 836 | - fontSize: ScreenUtil().setSp(28))), | ||
| 837 | - Image.asset( | ||
| 838 | - customerProvider.cancelOrderdayManager | ||
| 839 | - ? Utils.getImgPath('swich_on') | ||
| 840 | - : Utils.getImgPath('swich_off'), | ||
| 841 | - width: ScreenUtil().setWidth(88), | ||
| 842 | - // height: ScreenUtil().setWidth(82), | ||
| 843 | - ), | ||
| 844 | - ], | ||
| 845 | - ), | ||
| 846 | - )), | ||
| 847 | - Padding( | ||
| 848 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 849 | - child: MyDivider( | ||
| 850 | - double.infinity, | ||
| 851 | - w(1), | ||
| 852 | - color: MyColours.color_E7E7E7, | ||
| 853 | - )), | ||
| 854 | - VEmptyView(24), | ||
| 855 | - InkWell( | ||
| 856 | - onTap: () { | ||
| 857 | - setState(() { | ||
| 858 | - customerProvider.cancelOrderdayOther = | ||
| 859 | - !customerProvider.cancelOrderdayOther; | ||
| 860 | - }); | ||
| 861 | - }, | ||
| 862 | - child: Container( | ||
| 863 | - padding: EdgeInsets.symmetric( | ||
| 864 | - vertical: w(8), horizontal: w(14)), | ||
| 865 | - child: Row( | ||
| 866 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 867 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
| 868 | - children: [ | ||
| 869 | - Text('允许服务员及其他人员临餐取消预订', | ||
| 870 | - style: TextStyle( | ||
| 871 | - color: MyColours.color_515151, | ||
| 872 | - fontSize: ScreenUtil().setSp(28))), | ||
| 873 | - Image.asset( | ||
| 874 | - customerProvider.cancelOrderdayOther | ||
| 875 | - ? Utils.getImgPath('swich_on') | ||
| 876 | - : Utils.getImgPath('swich_off'), | ||
| 877 | - width: ScreenUtil().setWidth(88), | ||
| 878 | - // height: ScreenUtil().setWidth(82), | ||
| 879 | - ), | ||
| 880 | - ], | ||
| 881 | - ), | ||
| 882 | - )), | ||
| 883 | - Padding( | ||
| 884 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 885 | - child: MyDivider( | ||
| 886 | - double.infinity, | ||
| 887 | - w(1), | ||
| 888 | - color: MyColours.color_E7E7E7, | ||
| 889 | - )), | ||
| 890 | - VEmptyView(48), | ||
| 891 | - // Container( | ||
| 892 | - // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 893 | - // child: Text('优质客户标记', | ||
| 894 | - // style: TextStyle( | ||
| 895 | - // color: MyColours.color_515151, | ||
| 896 | - // fontSize: ScreenUtil().setSp(32)))), | ||
| 897 | - // VEmptyView(22), | ||
| 898 | - // MyDivider( | ||
| 899 | - // double.infinity, | ||
| 900 | - // w(1), | ||
| 901 | - // color: MyColours.color_E7E7E7, | ||
| 902 | - // ), | ||
| 903 | - // VEmptyView(24), | ||
| 904 | - // InkWell( | ||
| 905 | - // onTap: () { | ||
| 906 | - // setState(() { | ||
| 907 | - // customerProvider.isHighFrequency = | ||
| 908 | - // !customerProvider.isHighFrequency; | ||
| 909 | - // }); | ||
| 910 | - // }, | ||
| 911 | - // child: Container( | ||
| 912 | - // padding: EdgeInsets.symmetric( | ||
| 913 | - // vertical: w(8), horizontal: w(14)), | ||
| 914 | - // child: Row( | ||
| 915 | - // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 916 | - // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 917 | - // children: [ | ||
| 918 | - // Text('高频客户标记', | ||
| 919 | - // style: TextStyle( | ||
| 920 | - // color: MyColours.color_515151, | ||
| 921 | - // fontSize: ScreenUtil().setSp(28))), | ||
| 922 | - // Image.asset( | ||
| 923 | - // customerProvider.isHighFrequency | ||
| 924 | - // ? Utils.getImgPath('swich_on') | ||
| 925 | - // : Utils.getImgPath('swich_off'), | ||
| 926 | - // width: ScreenUtil().setWidth(88), | ||
| 927 | - // // height: ScreenUtil().setWidth(82), | ||
| 928 | - // ), | ||
| 929 | - // ], | ||
| 930 | - // ), | ||
| 931 | - // )), | ||
| 932 | - // Padding( | ||
| 933 | - // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 934 | - // child: MyDivider( | ||
| 935 | - // double.infinity, | ||
| 936 | - // w(1), | ||
| 937 | - // color: MyColours.color_E7E7E7, | ||
| 938 | - // )), | ||
| 939 | - // VEmptyView(24), | ||
| 940 | - // Container( | ||
| 941 | - // padding: | ||
| 942 | - // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 943 | - // child: Row( | ||
| 944 | - // children: [ | ||
| 945 | - // Expanded( | ||
| 946 | - // child: Container( | ||
| 947 | - // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 948 | - // child: Text('指定期限', | ||
| 949 | - // overflow: TextOverflow.ellipsis, | ||
| 950 | - // maxLines: 10, | ||
| 951 | - // style: TextStyle( | ||
| 952 | - // color: MyColours.color_515151, | ||
| 953 | - // fontSize: ScreenUtil().setSp(28))))), | ||
| 954 | - // HEmptyView(2), | ||
| 955 | - // Container( | ||
| 956 | - // width: w(40), | ||
| 957 | - // child: TextField( | ||
| 958 | - // controller: controllerDeadline, | ||
| 959 | - // textAlign: TextAlign.right, | ||
| 960 | - // textAlignVertical: TextAlignVertical.bottom, | ||
| 961 | - // maxLines: 1, | ||
| 962 | - // // //光标颜色 | ||
| 963 | - // // cursorColor: | ||
| 964 | - // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 965 | - // //输入文本的样式 | ||
| 966 | - // style: TextStyle( | ||
| 967 | - // color: MyColours.color_515151, | ||
| 968 | - // fontSize: ScreenUtil().setSp(28), | ||
| 969 | - // ), | ||
| 970 | - // inputFormatters: <TextInputFormatter>[ | ||
| 971 | - // FilteringTextInputFormatter.allow( | ||
| 972 | - // RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 973 | - // ], | ||
| 974 | - // decoration: InputDecoration( | ||
| 975 | - // isCollapsed: true, | ||
| 976 | - // border: OutlineInputBorder( | ||
| 977 | - // borderSide: BorderSide.none), | ||
| 978 | - // hintText: '输入', | ||
| 979 | - // hintStyle: TextStyle( | ||
| 980 | - // color: MyColours.color_999999, | ||
| 981 | - // fontSize: ScreenUtil().setSp(28), | ||
| 982 | - // ), | ||
| 983 | - // enabledBorder: new UnderlineInputBorder( | ||
| 984 | - // borderSide: BorderSide.none, | ||
| 985 | - // ), | ||
| 986 | - // focusedBorder: new UnderlineInputBorder( | ||
| 987 | - // borderSide: BorderSide.none, | ||
| 988 | - // ), | ||
| 989 | - // ), | ||
| 990 | - // onChanged: (value) {}, | ||
| 991 | - // onEditingComplete: () { | ||
| 992 | - // FocusScope.of(context) | ||
| 993 | - // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 994 | - // }, | ||
| 995 | - // keyboardType: TextInputType.number), | ||
| 996 | - // ), | ||
| 997 | - // HEmptyView(5), | ||
| 998 | - // Text('天', | ||
| 999 | - // style: TextStyle( | ||
| 1000 | - // color: MyColours.color_999999, | ||
| 1001 | - // fontSize: ScreenUtil().setSp(28))), | ||
| 1002 | - // // HEmptyView(24), | ||
| 1003 | - // ], | ||
| 1004 | - // )), | ||
| 1005 | - // Padding( | ||
| 1006 | - // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 1007 | - // child: MyDivider( | ||
| 1008 | - // double.infinity, | ||
| 1009 | - // w(1), | ||
| 1010 | - // color: MyColours.color_E7E7E7, | ||
| 1011 | - // )), | ||
| 1012 | - // VEmptyView(24), | ||
| 1013 | - // Container( | ||
| 1014 | - // padding: | ||
| 1015 | - // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 1016 | - // child: Row( | ||
| 1017 | - // children: [ | ||
| 1018 | - // Expanded( | ||
| 1019 | - // child: Container( | ||
| 1020 | - // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 1021 | - // child: Text('消费次数', | ||
| 1022 | - // overflow: TextOverflow.ellipsis, | ||
| 1023 | - // maxLines: 10, | ||
| 1024 | - // style: TextStyle( | ||
| 1025 | - // color: MyColours.color_515151, | ||
| 1026 | - // fontSize: ScreenUtil().setSp(28))))), | ||
| 1027 | - // HEmptyView(2), | ||
| 1028 | - // Container( | ||
| 1029 | - // width: w(40), | ||
| 1030 | - // child: TextField( | ||
| 1031 | - // controller: controllerConsumptionTimes, | ||
| 1032 | - // textAlign: TextAlign.right, | ||
| 1033 | - // textAlignVertical: TextAlignVertical.bottom, | ||
| 1034 | - // maxLines: 1, | ||
| 1035 | - // // //光标颜色 | ||
| 1036 | - // // cursorColor: | ||
| 1037 | - // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 1038 | - // //输入文本的样式 | ||
| 1039 | - // style: TextStyle( | ||
| 1040 | - // color: MyColours.color_515151, | ||
| 1041 | - // fontSize: ScreenUtil().setSp(28), | ||
| 1042 | - // ), | ||
| 1043 | - // inputFormatters: <TextInputFormatter>[ | ||
| 1044 | - // FilteringTextInputFormatter.allow( | ||
| 1045 | - // RegExp(r'[0-9]')), //设置只允许输入数字 | ||
| 1046 | - // ], | ||
| 1047 | - // decoration: InputDecoration( | ||
| 1048 | - // isCollapsed: true, | ||
| 1049 | - // border: OutlineInputBorder( | ||
| 1050 | - // borderSide: BorderSide.none), | ||
| 1051 | - // hintText: '输入', | ||
| 1052 | - // hintStyle: TextStyle( | ||
| 1053 | - // color: MyColours.color_999999, | ||
| 1054 | - // fontSize: ScreenUtil().setSp(28), | ||
| 1055 | - // ), | ||
| 1056 | - // enabledBorder: new UnderlineInputBorder( | ||
| 1057 | - // borderSide: BorderSide.none, | ||
| 1058 | - // ), | ||
| 1059 | - // focusedBorder: new UnderlineInputBorder( | ||
| 1060 | - // borderSide: BorderSide.none, | ||
| 1061 | - // ), | ||
| 1062 | - // ), | ||
| 1063 | - // onChanged: (value) {}, | ||
| 1064 | - // onEditingComplete: () { | ||
| 1065 | - // FocusScope.of(context) | ||
| 1066 | - // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 1067 | - // }, | ||
| 1068 | - // keyboardType: TextInputType.number), | ||
| 1069 | - // ), | ||
| 1070 | - // HEmptyView(5), | ||
| 1071 | - // Text('次', | ||
| 1072 | - // style: TextStyle( | ||
| 1073 | - // color: MyColours.color_999999, | ||
| 1074 | - // fontSize: ScreenUtil().setSp(28))), | ||
| 1075 | - // // HEmptyView(24), | ||
| 1076 | - // ], | ||
| 1077 | - // )), | ||
| 1078 | - // Padding( | ||
| 1079 | - // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 1080 | - // child: MyDivider( | ||
| 1081 | - // double.infinity, | ||
| 1082 | - // w(1), | ||
| 1083 | - // color: MyColours.color_E7E7E7, | ||
| 1084 | - // )), | ||
| 1085 | - // VEmptyView(24), | ||
| 1086 | - // InkWell( | ||
| 1087 | - // onTap: () { | ||
| 1088 | - // setState(() { | ||
| 1089 | - // customerProvider.isHighConsumption = | ||
| 1090 | - // !customerProvider.isHighConsumption; | ||
| 1091 | - // }); | ||
| 1092 | - // }, | ||
| 1093 | - // child: Container( | ||
| 1094 | - // padding: EdgeInsets.symmetric( | ||
| 1095 | - // vertical: w(8), horizontal: w(14)), | ||
| 1096 | - // child: Row( | ||
| 1097 | - // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1098 | - // crossAxisAlignment: CrossAxisAlignment.center, | ||
| 1099 | - // children: [ | ||
| 1100 | - // Text('高消费客户标记', | ||
| 1101 | - // style: TextStyle( | ||
| 1102 | - // color: MyColours.color_515151, | ||
| 1103 | - // fontSize: ScreenUtil().setSp(28))), | ||
| 1104 | - // Image.asset( | ||
| 1105 | - // customerProvider.isHighConsumption | ||
| 1106 | - // ? Utils.getImgPath('swich_on') | ||
| 1107 | - // : Utils.getImgPath('swich_off'), | ||
| 1108 | - // width: ScreenUtil().setWidth(88), | ||
| 1109 | - // // height: ScreenUtil().setWidth(82), | ||
| 1110 | - // ), | ||
| 1111 | - // ], | ||
| 1112 | - // ), | ||
| 1113 | - // )), | ||
| 1114 | - // Padding( | ||
| 1115 | - // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 1116 | - // child: MyDivider( | ||
| 1117 | - // double.infinity, | ||
| 1118 | - // w(1), | ||
| 1119 | - // color: MyColours.color_E7E7E7, | ||
| 1120 | - // )), | ||
| 1121 | - // VEmptyView(24), | ||
| 1122 | - // Container( | ||
| 1123 | - // padding: | ||
| 1124 | - // EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)), | ||
| 1125 | - // child: Row( | ||
| 1126 | - // children: [ | ||
| 1127 | - // Expanded( | ||
| 1128 | - // child: Container( | ||
| 1129 | - // padding: EdgeInsets.symmetric(vertical: w(8)), | ||
| 1130 | - // child: Text('客户人均消费到达设置金额标记为高单值', | ||
| 1131 | - // overflow: TextOverflow.ellipsis, | ||
| 1132 | - // maxLines: 10, | ||
| 1133 | - // style: TextStyle( | ||
| 1134 | - // color: MyColours.color_515151, | ||
| 1135 | - // fontSize: ScreenUtil().setSp(28))))), | ||
| 1136 | - // HEmptyView(2), | ||
| 1137 | - // Container( | ||
| 1138 | - // width: w(40), | ||
| 1139 | - // child: TextField( | ||
| 1140 | - // controller: controllerHighValue, | ||
| 1141 | - // textAlign: TextAlign.right, | ||
| 1142 | - // textAlignVertical: TextAlignVertical.bottom, | ||
| 1143 | - // maxLines: 1, | ||
| 1144 | - // // //光标颜色 | ||
| 1145 | - // // cursorColor: | ||
| 1146 | - // // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 1147 | - // //输入文本的样式 | ||
| 1148 | - // style: TextStyle( | ||
| 1149 | - // color: MyColours.color_515151, | ||
| 1150 | - // fontSize: ScreenUtil().setSp(28), | ||
| 1151 | - // ), | ||
| 1152 | - // inputFormatters: <TextInputFormatter>[ | ||
| 1153 | - // FilteringTextInputFormatter.allow( | ||
| 1154 | - // RegExp("[0-9.]")), | ||
| 1155 | - // ], | ||
| 1156 | - // decoration: InputDecoration( | ||
| 1157 | - // isCollapsed: true, | ||
| 1158 | - // border: OutlineInputBorder( | ||
| 1159 | - // borderSide: BorderSide.none), | ||
| 1160 | - // hintText: '输入', | ||
| 1161 | - // hintStyle: TextStyle( | ||
| 1162 | - // color: MyColours.color_999999, | ||
| 1163 | - // fontSize: ScreenUtil().setSp(28), | ||
| 1164 | - // ), | ||
| 1165 | - // enabledBorder: new UnderlineInputBorder( | ||
| 1166 | - // borderSide: BorderSide.none, | ||
| 1167 | - // ), | ||
| 1168 | - // focusedBorder: new UnderlineInputBorder( | ||
| 1169 | - // borderSide: BorderSide.none, | ||
| 1170 | - // ), | ||
| 1171 | - // ), | ||
| 1172 | - // onChanged: (value) {}, | ||
| 1173 | - // onEditingComplete: () { | ||
| 1174 | - // FocusScope.of(context) | ||
| 1175 | - // .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 1176 | - // }, | ||
| 1177 | - // keyboardType: TextInputType.number), | ||
| 1178 | - // ), | ||
| 1179 | - // HEmptyView(5), | ||
| 1180 | - // Text('元', | ||
| 1181 | - // style: TextStyle( | ||
| 1182 | - // color: MyColours.color_999999, | ||
| 1183 | - // fontSize: ScreenUtil().setSp(28))), | ||
| 1184 | - // // HEmptyView(24), | ||
| 1185 | - // ], | ||
| 1186 | - // )), | ||
| 1187 | - // Padding( | ||
| 1188 | - // padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 1189 | - // child: MyDivider( | ||
| 1190 | - // double.infinity, | ||
| 1191 | - // w(1), | ||
| 1192 | - // color: MyColours.color_E7E7E7, | ||
| 1193 | - // )), | ||
| 1194 | - // VEmptyView(24), | ||
| 1195 | - // VEmptyView(48), | ||
| 1196 | - Text('店内自定义标签', | ||
| 1197 | - style: TextStyle( | ||
| 1198 | - color: MyColours.color_515151, | ||
| 1199 | - fontSize: ScreenUtil().setSp(32))), | ||
| 1200 | - VEmptyView(48), | ||
| 1201 | - Container( | ||
| 1202 | - padding: EdgeInsets.symmetric( | ||
| 1203 | - vertical: w(18), horizontal: w(14)), | ||
| 1204 | - child: Wrap( | ||
| 1205 | - spacing: ScreenUtil().setWidth(20), | ||
| 1206 | - runSpacing: ScreenUtil().setWidth(10), | ||
| 1207 | - crossAxisAlignment: WrapCrossAlignment.center, | ||
| 1208 | - children: | ||
| 1209 | - _buildLabelItem(customerProvider.labelList!))), | ||
| 1210 | - Padding( | ||
| 1211 | - padding: EdgeInsets.only(left: w(14), right: w(10)), | ||
| 1212 | - child: MyDivider( | ||
| 1213 | - double.infinity, | ||
| 1214 | - w(1), | ||
| 1215 | - color: MyColours.color_E7E7E7, | ||
| 1216 | - )), | 544 | + |
| 1217 | ], | 545 | ], |
| 1218 | ))), | 546 | ))), |
| 1219 | 547 | ||
| @@ -1238,22 +566,22 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | @@ -1238,22 +566,22 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { | ||
| 1238 | FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | 566 | FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 |
| 1239 | 567 | ||
| 1240 | //前置条件判断 | 568 | //前置条件判断 |
| 1241 | - if (customerProvider.isHighFrequency) { | ||
| 1242 | - if (controllerDeadline.text.trim().length == 0) { | ||
| 1243 | - Utils.showToast('请输入指定期限'); | ||
| 1244 | - return; | ||
| 1245 | - } | ||
| 1246 | - if (controllerConsumptionTimes.text.trim().length == 0) { | ||
| 1247 | - Utils.showToast('请输入消费次数'); | ||
| 1248 | - return; | ||
| 1249 | - } | ||
| 1250 | - } | ||
| 1251 | - if (customerProvider.isHighConsumption) { | ||
| 1252 | - if (controllerHighValue.text.trim().length == 0) { | ||
| 1253 | - Utils.showToast('请设置客户人均消费到达金额'); | ||
| 1254 | - return; | ||
| 1255 | - } | ||
| 1256 | - } | 569 | + // if (customerProvider.isHighFrequency) { |
| 570 | + // if (controllerDeadline.text.trim().length == 0) { | ||
| 571 | + // Utils.showToast('请输入指定期限'); | ||
| 572 | + // return; | ||
| 573 | + // } | ||
| 574 | + // if (controllerConsumptionTimes.text.trim().length == 0) { | ||
| 575 | + // Utils.showToast('请输入消费次数'); | ||
| 576 | + // return; | ||
| 577 | + // } | ||
| 578 | + // } | ||
| 579 | + // if (customerProvider.isHighConsumption) { | ||
| 580 | + // if (controllerHighValue.text.trim().length == 0) { | ||
| 581 | + // Utils.showToast('请设置客户人均消费到达金额'); | ||
| 582 | + // return; | ||
| 583 | + // } | ||
| 584 | + // } | ||
| 1257 | _saveData(); | 585 | _saveData(); |
| 1258 | }, | 586 | }, |
| 1259 | ), | 587 | ), |
| @@ -72,11 +72,11 @@ class _StoreCustomerHomePageState extends State<StoreCustomerHomePage> | @@ -72,11 +72,11 @@ class _StoreCustomerHomePageState extends State<StoreCustomerHomePage> | ||
| 72 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); | 72 | customerProvider = Provider.of<CustomerProvider>(context, listen: false); |
| 73 | return Scaffold( | 73 | return Scaffold( |
| 74 | appBar: SystemAppBar( | 74 | appBar: SystemAppBar( |
| 75 | - '全店客情', | ||
| 76 | - rightImgName: 'c_set.png', | ||
| 77 | - onTapRight: () { | ||
| 78 | - NavigatorUtil.goCustomerSetPage(context); | ||
| 79 | - }, | 75 | + '客户汇总', |
| 76 | + // rightImgName: 'c_set.png', | ||
| 77 | + // onTapRight: () { | ||
| 78 | + // NavigatorUtil.goCustomerSetPage(context); | ||
| 79 | + // }, | ||
| 80 | ), | 80 | ), |
| 81 | body: Column( | 81 | body: Column( |
| 82 | children: [ | 82 | children: [ |
| @@ -71,19 +71,20 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> { | @@ -71,19 +71,20 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> { | ||
| 71 | // NavigatorUtil.goEnterpriseInformationUploadPage(context); | 71 | // NavigatorUtil.goEnterpriseInformationUploadPage(context); |
| 72 | // }), | 72 | // }), |
| 73 | // _item('微信商户账户开通结果查询', () {}), | 73 | // _item('微信商户账户开通结果查询', () {}), |
| 74 | - _item('门店收款码', () { | ||
| 75 | - NavigatorUtil.goPaymentCodePage(context); | ||
| 76 | - }), | 74 | + |
| 77 | _item('支付返券', () { | 75 | _item('支付返券', () { |
| 78 | NavigatorUtil.goPaymentGiftPage(context); | 76 | NavigatorUtil.goPaymentGiftPage(context); |
| 79 | }), | 77 | }), |
| 80 | - _item('支付返消费金', () { | ||
| 81 | - NavigatorUtil.goReturnMoneyPage(context); | 78 | + _item('门店收款码', () { |
| 79 | + NavigatorUtil.goPaymentCodePage(context); | ||
| 82 | }), | 80 | }), |
| 81 | + // _item('支付返消费金', () { | ||
| 82 | + // NavigatorUtil.goReturnMoneyPage(context); | ||
| 83 | + // }), | ||
| 83 | 84 | ||
| 84 | - _item('买单前送消费金', () { | ||
| 85 | - NavigatorUtil.goGiveMoneyBeforePayPage(context); | ||
| 86 | - }), | 85 | + // _item('买单前送消费金', () { |
| 86 | + // NavigatorUtil.goGiveMoneyBeforePayPage(context); | ||
| 87 | + // }), | ||
| 87 | 88 | ||
| 88 | _item('交易记录', () { | 89 | _item('交易记录', () { |
| 89 | NavigatorUtil.goTransactionRecordHomePage(context); | 90 | NavigatorUtil.goTransactionRecordHomePage(context); |
| @@ -437,7 +437,7 @@ class _CommentsSettingPageState extends State<CommentsSettingPage> { | @@ -437,7 +437,7 @@ class _CommentsSettingPageState extends State<CommentsSettingPage> { | ||
| 437 | Provider.of<MarketingCenterProvider>(context, listen: false); | 437 | Provider.of<MarketingCenterProvider>(context, listen: false); |
| 438 | return Scaffold( | 438 | return Scaffold( |
| 439 | backgroundColor: MyColours.color_ffffff, | 439 | backgroundColor: MyColours.color_ffffff, |
| 440 | - appBar: SystemAppBar('用户评价设置'), | 440 | + appBar: SystemAppBar('意见反馈设置'), |
| 441 | body: Column( | 441 | body: Column( |
| 442 | children: [ | 442 | children: [ |
| 443 | Expanded( | 443 | Expanded( |
| @@ -35,7 +35,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -35,7 +35,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 35 | bool cancelSms = false; //取消预订发送短信默认关闭 | 35 | bool cancelSms = false; //取消预订发送短信默认关闭 |
| 36 | bool noticeSms = false; //使用店铺手机发送通知短信 | 36 | bool noticeSms = false; //使用店铺手机发送通知短信 |
| 37 | bool marketingSms = false; //使用店铺手机发送营销短信 | 37 | bool marketingSms = false; //使用店铺手机发送营销短信 |
| 38 | - bool select = false; //启用预订安排通知图文模式 | 38 | + // bool select = false; //启用预订安排通知图文模式 |
| 39 | late MarketingCenterProvider marketingCenterProvider; | 39 | late MarketingCenterProvider marketingCenterProvider; |
| 40 | // String themeName = ''; | 40 | // String themeName = ''; |
| 41 | // String previewUrl = ''; //效果预览的图片链接 | 41 | // String previewUrl = ''; //效果预览的图片链接 |
| @@ -70,11 +70,12 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -70,11 +70,12 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | getDzSellerConf() async { | 72 | getDzSellerConf() async { |
| 73 | - bool success = await marketingCenterProvider.getDzSellerConf(context,showLoading: false); | 73 | + bool success = await marketingCenterProvider.getDzSellerConf(context, |
| 74 | + showLoading: false); | ||
| 74 | if (success && marketingCenterProvider.dzSellerConfModel != null) { | 75 | if (success && marketingCenterProvider.dzSellerConfModel != null) { |
| 75 | - select = marketingCenterProvider.dzSellerConfModel!.isNewTemplate == '1' | ||
| 76 | - ? true | ||
| 77 | - : false; | 76 | + // select = marketingCenterProvider.dzSellerConfModel!.isNewTemplate == '1' |
| 77 | + // ? true | ||
| 78 | + // : false; | ||
| 78 | cancelSms = marketingCenterProvider.dzSellerConfModel!.isOpenCancel == '1' | 79 | cancelSms = marketingCenterProvider.dzSellerConfModel!.isOpenCancel == '1' |
| 79 | ? true | 80 | ? true |
| 80 | : false; | 81 | : false; |
| @@ -162,14 +163,14 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -162,14 +163,14 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 162 | 163 | ||
| 163 | ///保存接口 | 164 | ///保存接口 |
| 164 | _setData() async { | 165 | _setData() async { |
| 165 | - (bool, bool,bool, bool) result = await ( | 166 | + (bool, bool) result = await ( |
| 166 | _setCancelSMS(), | 167 | _setCancelSMS(), |
| 167 | _setNotice(), | 168 | _setNotice(), |
| 168 | - _setMarketing(), | ||
| 169 | - _setNewType(), | 169 | + // _setMarketing(), |
| 170 | + // _setNewType(), | ||
| 170 | ).wait; | 171 | ).wait; |
| 171 | 172 | ||
| 172 | - if (result.$1 && result.$2 && result.$3 && result.$4) { | 173 | + if (result.$1 && result.$2) { |
| 173 | Utils.showToast('设置成功'); | 174 | Utils.showToast('设置成功'); |
| 174 | } else { | 175 | } else { |
| 175 | Utils.showToast('设置失败,请重试'); | 176 | Utils.showToast('设置失败,请重试'); |
| @@ -177,7 +178,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -177,7 +178,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 177 | } | 178 | } |
| 178 | 179 | ||
| 179 | ///客户取消预订时自动发送通知短信 | 180 | ///客户取消预订时自动发送通知短信 |
| 180 | - Future<bool> _setCancelSMS({bool isShowLoading = true}) async { | 181 | + Future<bool> _setCancelSMS({bool isShowLoading = true}) async { |
| 181 | Map<String, String?> params = { | 182 | Map<String, String?> params = { |
| 182 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | 183 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, |
| 183 | 'key': 'is_open_cancel_temp', | 184 | 'key': 'is_open_cancel_temp', |
| @@ -206,7 +207,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -206,7 +207,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 206 | } | 207 | } |
| 207 | 208 | ||
| 208 | ///使用店铺手机发送通知短信 | 209 | ///使用店铺手机发送通知短信 |
| 209 | - Future<bool> _setNotice({bool isShowLoading = true}) async { | 210 | + Future<bool> _setNotice({bool isShowLoading = true}) async { |
| 210 | Map<String, String?> params = { | 211 | Map<String, String?> params = { |
| 211 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | 212 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, |
| 212 | 'key': 'is_seller_notice', | 213 | 'key': 'is_seller_notice', |
| @@ -224,7 +225,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -224,7 +225,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 224 | } | 225 | } |
| 225 | 226 | ||
| 226 | ///使用店铺手机发送营销短信 | 227 | ///使用店铺手机发送营销短信 |
| 227 | - Future<bool> _setMarketing({bool isShowLoading = true}) async { | 228 | + Future<bool> _setMarketing({bool isShowLoading = true}) async { |
| 228 | Map<String, String?> params = { | 229 | Map<String, String?> params = { |
| 229 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | 230 | 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, |
| 230 | 'key': 'is_seller_marketing', | 231 | 'key': 'is_seller_marketing', |
| @@ -242,22 +243,22 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -242,22 +243,22 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 242 | } | 243 | } |
| 243 | 244 | ||
| 244 | ///启用预订安排通知图文模式 | 245 | ///启用预订安排通知图文模式 |
| 245 | - Future<bool> _setNewType({bool isShowLoading = true}) async { | ||
| 246 | - Map<String, String?> params = { | ||
| 247 | - 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 248 | - 'key': 'is_new_template', | ||
| 249 | - 'value': select ? '1' : '0' | ||
| 250 | - }; | ||
| 251 | - | ||
| 252 | - bool success = await marketingCenterProvider.setConfing(context, params, | ||
| 253 | - needToast: false); | ||
| 254 | - | ||
| 255 | - if (success) { | ||
| 256 | - return true; | ||
| 257 | - } else { | ||
| 258 | - return false; | ||
| 259 | - } | ||
| 260 | - } | 246 | + // Future<bool> _setNewType({bool isShowLoading = true}) async { |
| 247 | + // Map<String, String?> params = { | ||
| 248 | + // 'sid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 249 | + // 'key': 'is_new_template', | ||
| 250 | + // 'value': select ? '1' : '0' | ||
| 251 | + // }; | ||
| 252 | + | ||
| 253 | + // bool success = await marketingCenterProvider.setConfing(context, params, | ||
| 254 | + // needToast: false); | ||
| 255 | + | ||
| 256 | + // if (success) { | ||
| 257 | + // return true; | ||
| 258 | + // } else { | ||
| 259 | + // return false; | ||
| 260 | + // } | ||
| 261 | + // } | ||
| 261 | 262 | ||
| 262 | _showPhotoView(BuildContext context, int index, List<String> imgs, | 263 | _showPhotoView(BuildContext context, int index, List<String> imgs, |
| 263 | {isShow = false, List? dashName}) async { | 264 | {isShow = false, List? dashName}) async { |
| @@ -447,17 +448,29 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -447,17 +448,29 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 447 | child: Column( | 448 | child: Column( |
| 448 | crossAxisAlignment: CrossAxisAlignment.start, | 449 | crossAxisAlignment: CrossAxisAlignment.start, |
| 449 | children: [ | 450 | children: [ |
| 451 | + _title('充值优惠活动设置'), | ||
| 452 | + _item('预订安排中附带的营销推广', onTap: () { | ||
| 453 | + NavigatorUtil.goRechargeSettingPage(context); | ||
| 454 | + }), | ||
| 455 | + VEmptyView(40), | ||
| 456 | + _title('优惠券设置'), | ||
| 457 | + _item('预订安排中附带的营销推广', onTap: () { | ||
| 458 | + NavigatorUtil.goCouponSettingPage(context); | ||
| 459 | + }), | ||
| 460 | + VEmptyView(40), | ||
| 450 | _title('短信通知'), | 461 | _title('短信通知'), |
| 451 | _itemSmsWidget(cancelSms, '客户取消预订时自动发送通知短信', | 462 | _itemSmsWidget(cancelSms, '客户取消预订时自动发送通知短信', |
| 452 | onTap: () { | 463 | onTap: () { |
| 453 | setState(() { | 464 | setState(() { |
| 454 | cancelSms = !cancelSms; | 465 | cancelSms = !cancelSms; |
| 455 | }); | 466 | }); |
| 467 | + _setCancelSMS(); | ||
| 456 | }), | 468 | }), |
| 457 | _itemSmsWidget(noticeSms, '使用店铺手机发送通知短信', onTap: () { | 469 | _itemSmsWidget(noticeSms, '使用店铺手机发送通知短信', onTap: () { |
| 458 | setState(() { | 470 | setState(() { |
| 459 | noticeSms = !noticeSms; | 471 | noticeSms = !noticeSms; |
| 460 | }); | 472 | }); |
| 473 | + _setNotice(); | ||
| 461 | }), | 474 | }), |
| 462 | VEmptyView(28), | 475 | VEmptyView(28), |
| 463 | InkWell( | 476 | InkWell( |
| @@ -608,49 +621,49 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -608,49 +621,49 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 608 | ], | 621 | ], |
| 609 | )), | 622 | )), |
| 610 | )), | 623 | )), |
| 611 | - Container( | ||
| 612 | - color: MyColours.color_ffffff, | ||
| 613 | - padding: EdgeInsets.only( | ||
| 614 | - left: w(23), right: w(23), top: w(12), bottom: w(25)), | ||
| 615 | - child: Row( | ||
| 616 | - children: [ | ||
| 617 | - // RoundButton( | ||
| 618 | - // text: '图文预览', | ||
| 619 | - // width: w(100), | ||
| 620 | - // gradientStart: MyColours.color_ffffff, | ||
| 621 | - // gradientEnd: MyColours.color_ffffff, | ||
| 622 | - // borderColor: MyColours.color_438E93, | ||
| 623 | - // radius: r(5), | ||
| 624 | - // fontSize: 32, | ||
| 625 | - // height: w(40), | ||
| 626 | - // textColor: MyColours.color_438E93, | ||
| 627 | - // isBold: true, | ||
| 628 | - // onPressed: () async { | ||
| 629 | - // // NavigatorUtil.goMarkingPreviewPage(context); | ||
| 630 | - // if (previewUrl == '') { | ||
| 631 | - // Utils.showToast('暂时没有可预览的图文信息'); | ||
| 632 | - // return; | ||
| 633 | - // } | ||
| 634 | - // // | ||
| 635 | - // _showPhotoView(context, 0, [previewUrl]); | ||
| 636 | - // }), | ||
| 637 | - // HEmptyView(30), | ||
| 638 | - Expanded( | ||
| 639 | - child: RoundButton( | ||
| 640 | - text: '保存', | ||
| 641 | - gradientStart: MyColours.color_199095, | ||
| 642 | - gradientEnd: MyColours.color_199095, | ||
| 643 | - // borderColor: MyColours.color_999999, | ||
| 644 | - radius: r(5), | ||
| 645 | - fontSize: 32, | ||
| 646 | - height: w(40), | ||
| 647 | - isBold: true, | ||
| 648 | - onPressed: () async { | ||
| 649 | - //调用接口 | ||
| 650 | - _setData(); | ||
| 651 | - })) | ||
| 652 | - ], | ||
| 653 | - )) | 624 | + // Container( |
| 625 | + // color: MyColours.color_ffffff, | ||
| 626 | + // padding: EdgeInsets.only( | ||
| 627 | + // left: w(23), right: w(23), top: w(12), bottom: w(25)), | ||
| 628 | + // child: Row( | ||
| 629 | + // children: [ | ||
| 630 | + // // RoundButton( | ||
| 631 | + // // text: '图文预览', | ||
| 632 | + // // width: w(100), | ||
| 633 | + // // gradientStart: MyColours.color_ffffff, | ||
| 634 | + // // gradientEnd: MyColours.color_ffffff, | ||
| 635 | + // // borderColor: MyColours.color_438E93, | ||
| 636 | + // // radius: r(5), | ||
| 637 | + // // fontSize: 32, | ||
| 638 | + // // height: w(40), | ||
| 639 | + // // textColor: MyColours.color_438E93, | ||
| 640 | + // // isBold: true, | ||
| 641 | + // // onPressed: () async { | ||
| 642 | + // // // NavigatorUtil.goMarkingPreviewPage(context); | ||
| 643 | + // // if (previewUrl == '') { | ||
| 644 | + // // Utils.showToast('暂时没有可预览的图文信息'); | ||
| 645 | + // // return; | ||
| 646 | + // // } | ||
| 647 | + // // // | ||
| 648 | + // // _showPhotoView(context, 0, [previewUrl]); | ||
| 649 | + // // }), | ||
| 650 | + // // HEmptyView(30), | ||
| 651 | + // Expanded( | ||
| 652 | + // child: RoundButton( | ||
| 653 | + // text: '保存', | ||
| 654 | + // gradientStart: MyColours.color_199095, | ||
| 655 | + // gradientEnd: MyColours.color_199095, | ||
| 656 | + // // borderColor: MyColours.color_999999, | ||
| 657 | + // radius: r(5), | ||
| 658 | + // fontSize: 32, | ||
| 659 | + // height: w(40), | ||
| 660 | + // isBold: true, | ||
| 661 | + // onPressed: () async { | ||
| 662 | + // //调用接口 | ||
| 663 | + // _setData(); | ||
| 664 | + // })) | ||
| 665 | + // ], | ||
| 666 | + // )) | ||
| 654 | ], | 667 | ], |
| 655 | ); | 668 | ); |
| 656 | } | 669 | } |
| @@ -175,170 +175,170 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | @@ -175,170 +175,170 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | ||
| 175 | child: SingleChildScrollView( | 175 | child: SingleChildScrollView( |
| 176 | child: Column( | 176 | child: Column( |
| 177 | children: [ | 177 | children: [ |
| 178 | - InkWell( | ||
| 179 | - onTap: () { | ||
| 180 | - if (!collectStoreProvider.sellerCoupon) { | ||
| 181 | - //没有购买优惠券模块 | ||
| 182 | - //提示购买 | 178 | + // InkWell( |
| 179 | + // onTap: () { | ||
| 180 | + // if (!collectStoreProvider.sellerCoupon) { | ||
| 181 | + // //没有购买优惠券模块 | ||
| 182 | + // //提示购买 | ||
| 183 | 183 | ||
| 184 | - DialogUtil.showSellerVersionBuyDialog( | ||
| 185 | - context, '储值营销', (v) {}); | ||
| 186 | - return; | ||
| 187 | - } | ||
| 188 | - NavigatorUtil.goRechargeHomePage(context); | ||
| 189 | - }, | ||
| 190 | - child: Padding( | ||
| 191 | - padding: EdgeInsets.only( | ||
| 192 | - left: w(16), | ||
| 193 | - top: w(12), | ||
| 194 | - bottom: w(12), | ||
| 195 | - right: w(12)), | ||
| 196 | - child: Row( | ||
| 197 | - children: [ | ||
| 198 | - Text( | ||
| 199 | - '会员充值优惠活动', | ||
| 200 | - style: TextStyle( | ||
| 201 | - color: MyColours.color_515151, | ||
| 202 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 203 | - ), | ||
| 204 | - Spacer(), | ||
| 205 | - Container( | ||
| 206 | - padding: EdgeInsets.symmetric( | ||
| 207 | - horizontal: w(7), vertical: w(4)), | ||
| 208 | - child: Image.asset( | ||
| 209 | - "assets/arrow_right_new.png", | ||
| 210 | - width: ScreenUtil().setWidth(18), | ||
| 211 | - height: ScreenUtil().setWidth(32), | ||
| 212 | - ), | ||
| 213 | - ) | ||
| 214 | - ], | ||
| 215 | - ))), | ||
| 216 | - Padding( | ||
| 217 | - padding: EdgeInsets.only(left: w(16)), | ||
| 218 | - child: MyDivider(double.infinity, w(0.5), | ||
| 219 | - color: MyColours.color_E7E7E7)), | ||
| 220 | - VEmptyView(24), | ||
| 221 | - InkWell( | ||
| 222 | - onTap: () { | ||
| 223 | - if (!collectStoreProvider.sellerOrderCustomer) { | ||
| 224 | - //没有购买提前点餐模块 | ||
| 225 | - //提示购买 | 184 | + // DialogUtil.showSellerVersionBuyDialog( |
| 185 | + // context, '储值营销', (v) {}); | ||
| 186 | + // return; | ||
| 187 | + // } | ||
| 188 | + // NavigatorUtil.goRechargeHomePage(context); | ||
| 189 | + // }, | ||
| 190 | + // child: Padding( | ||
| 191 | + // padding: EdgeInsets.only( | ||
| 192 | + // left: w(16), | ||
| 193 | + // top: w(12), | ||
| 194 | + // bottom: w(12), | ||
| 195 | + // right: w(12)), | ||
| 196 | + // child: Row( | ||
| 197 | + // children: [ | ||
| 198 | + // Text( | ||
| 199 | + // '会员充值优惠活动', | ||
| 200 | + // style: TextStyle( | ||
| 201 | + // color: MyColours.color_515151, | ||
| 202 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 203 | + // ), | ||
| 204 | + // Spacer(), | ||
| 205 | + // Container( | ||
| 206 | + // padding: EdgeInsets.symmetric( | ||
| 207 | + // horizontal: w(7), vertical: w(4)), | ||
| 208 | + // child: Image.asset( | ||
| 209 | + // "assets/arrow_right_new.png", | ||
| 210 | + // width: ScreenUtil().setWidth(18), | ||
| 211 | + // height: ScreenUtil().setWidth(32), | ||
| 212 | + // ), | ||
| 213 | + // ) | ||
| 214 | + // ], | ||
| 215 | + // ))), | ||
| 216 | + // Padding( | ||
| 217 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 218 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 219 | + // color: MyColours.color_E7E7E7)), | ||
| 220 | + // VEmptyView(24), | ||
| 221 | + // InkWell( | ||
| 222 | + // onTap: () { | ||
| 223 | + // if (!collectStoreProvider.sellerOrderCustomer) { | ||
| 224 | + // //没有购买提前点餐模块 | ||
| 225 | + // //提示购买 | ||
| 226 | 226 | ||
| 227 | - DialogUtil.showSellerVersionBuyDialog( | ||
| 228 | - context, '提前点餐', (v) {}); | ||
| 229 | - return; | ||
| 230 | - } | ||
| 231 | - NavigatorUtil.goOrderSettingPage(context); | ||
| 232 | - }, | ||
| 233 | - child: Padding( | ||
| 234 | - padding: EdgeInsets.only( | ||
| 235 | - left: w(16), | ||
| 236 | - top: w(12), | ||
| 237 | - bottom: w(12), | ||
| 238 | - right: w(12)), | ||
| 239 | - child: Row( | ||
| 240 | - children: [ | ||
| 241 | - Text( | ||
| 242 | - '提前点菜', | ||
| 243 | - style: TextStyle( | ||
| 244 | - color: MyColours.color_515151, | ||
| 245 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 246 | - ), | ||
| 247 | - Spacer(), | ||
| 248 | - Container( | ||
| 249 | - padding: EdgeInsets.symmetric( | ||
| 250 | - horizontal: w(7), vertical: w(4)), | ||
| 251 | - child: Image.asset( | ||
| 252 | - "assets/arrow_right_new.png", | ||
| 253 | - width: ScreenUtil().setWidth(18), | ||
| 254 | - height: ScreenUtil().setWidth(32), | ||
| 255 | - ), | ||
| 256 | - ) | ||
| 257 | - ], | ||
| 258 | - ))), | ||
| 259 | - Padding( | ||
| 260 | - padding: EdgeInsets.only(left: w(16)), | ||
| 261 | - child: MyDivider(double.infinity, w(0.5), | ||
| 262 | - color: MyColours.color_E7E7E7)), | ||
| 263 | - VEmptyView(24), | ||
| 264 | - InkWell( | ||
| 265 | - onTap: () { | ||
| 266 | - if (!collectStoreProvider.sellerOrderManager) { | ||
| 267 | - //没有购买经理排菜模块 | ||
| 268 | - //提示购买 | 227 | + // DialogUtil.showSellerVersionBuyDialog( |
| 228 | + // context, '提前点餐', (v) {}); | ||
| 229 | + // return; | ||
| 230 | + // } | ||
| 231 | + // NavigatorUtil.goOrderSettingPage(context); | ||
| 232 | + // }, | ||
| 233 | + // child: Padding( | ||
| 234 | + // padding: EdgeInsets.only( | ||
| 235 | + // left: w(16), | ||
| 236 | + // top: w(12), | ||
| 237 | + // bottom: w(12), | ||
| 238 | + // right: w(12)), | ||
| 239 | + // child: Row( | ||
| 240 | + // children: [ | ||
| 241 | + // Text( | ||
| 242 | + // '提前点菜', | ||
| 243 | + // style: TextStyle( | ||
| 244 | + // color: MyColours.color_515151, | ||
| 245 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 246 | + // ), | ||
| 247 | + // Spacer(), | ||
| 248 | + // Container( | ||
| 249 | + // padding: EdgeInsets.symmetric( | ||
| 250 | + // horizontal: w(7), vertical: w(4)), | ||
| 251 | + // child: Image.asset( | ||
| 252 | + // "assets/arrow_right_new.png", | ||
| 253 | + // width: ScreenUtil().setWidth(18), | ||
| 254 | + // height: ScreenUtil().setWidth(32), | ||
| 255 | + // ), | ||
| 256 | + // ) | ||
| 257 | + // ], | ||
| 258 | + // ))), | ||
| 259 | + // Padding( | ||
| 260 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 261 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 262 | + // color: MyColours.color_E7E7E7)), | ||
| 263 | + // VEmptyView(24), | ||
| 264 | + // InkWell( | ||
| 265 | + // onTap: () { | ||
| 266 | + // if (!collectStoreProvider.sellerOrderManager) { | ||
| 267 | + // //没有购买经理排菜模块 | ||
| 268 | + // //提示购买 | ||
| 269 | 269 | ||
| 270 | - DialogUtil.showSellerVersionBuyDialog( | ||
| 271 | - context, '经理排菜', (v) {}); | ||
| 272 | - return; | ||
| 273 | - } | ||
| 274 | - NavigatorUtil.goOrderSettingManagerPage(context); | ||
| 275 | - }, | ||
| 276 | - child: Padding( | ||
| 277 | - padding: EdgeInsets.only( | ||
| 278 | - left: w(16), | ||
| 279 | - top: w(12), | ||
| 280 | - bottom: w(12), | ||
| 281 | - right: w(12)), | ||
| 282 | - child: Row( | ||
| 283 | - children: [ | ||
| 284 | - Text( | ||
| 285 | - '经理预排菜设置', | ||
| 286 | - style: TextStyle( | ||
| 287 | - color: MyColours.color_515151, | ||
| 288 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 289 | - ), | ||
| 290 | - Spacer(), | ||
| 291 | - Container( | ||
| 292 | - padding: EdgeInsets.symmetric( | ||
| 293 | - horizontal: w(7), vertical: w(4)), | ||
| 294 | - child: Image.asset( | ||
| 295 | - "assets/arrow_right_new.png", | ||
| 296 | - width: ScreenUtil().setWidth(18), | ||
| 297 | - height: ScreenUtil().setWidth(32), | ||
| 298 | - ), | ||
| 299 | - ) | ||
| 300 | - ], | ||
| 301 | - ))), | ||
| 302 | - Padding( | ||
| 303 | - padding: EdgeInsets.only(left: w(16)), | ||
| 304 | - child: MyDivider(double.infinity, w(0.5), | ||
| 305 | - color: MyColours.color_E7E7E7)), | ||
| 306 | - VEmptyView(24), | ||
| 307 | - InkWell( | ||
| 308 | - onTap: () { | ||
| 309 | - NavigatorUtil.goCommentsSettingPage(context); | ||
| 310 | - }, | ||
| 311 | - child: Padding( | ||
| 312 | - padding: EdgeInsets.only( | ||
| 313 | - left: w(16), | ||
| 314 | - top: w(12), | ||
| 315 | - bottom: w(12), | ||
| 316 | - right: w(12)), | ||
| 317 | - child: Row( | ||
| 318 | - children: [ | ||
| 319 | - Text( | ||
| 320 | - '用户评价反馈', | ||
| 321 | - style: TextStyle( | ||
| 322 | - color: MyColours.color_515151, | ||
| 323 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 324 | - ), | ||
| 325 | - Spacer(), | ||
| 326 | - Container( | ||
| 327 | - padding: EdgeInsets.symmetric( | ||
| 328 | - horizontal: w(7), vertical: w(4)), | ||
| 329 | - child: Image.asset( | ||
| 330 | - "assets/arrow_right_new.png", | ||
| 331 | - width: ScreenUtil().setWidth(18), | ||
| 332 | - height: ScreenUtil().setWidth(32), | ||
| 333 | - ), | ||
| 334 | - ) | ||
| 335 | - ], | ||
| 336 | - ))), | ||
| 337 | - Padding( | ||
| 338 | - padding: EdgeInsets.only(left: w(16)), | ||
| 339 | - child: MyDivider(double.infinity, w(0.5), | ||
| 340 | - color: MyColours.color_E7E7E7)), | ||
| 341 | - VEmptyView(24), | 270 | + // DialogUtil.showSellerVersionBuyDialog( |
| 271 | + // context, '经理排菜', (v) {}); | ||
| 272 | + // return; | ||
| 273 | + // } | ||
| 274 | + // NavigatorUtil.goOrderSettingManagerPage(context); | ||
| 275 | + // }, | ||
| 276 | + // child: Padding( | ||
| 277 | + // padding: EdgeInsets.only( | ||
| 278 | + // left: w(16), | ||
| 279 | + // top: w(12), | ||
| 280 | + // bottom: w(12), | ||
| 281 | + // right: w(12)), | ||
| 282 | + // child: Row( | ||
| 283 | + // children: [ | ||
| 284 | + // Text( | ||
| 285 | + // '经理预排菜设置', | ||
| 286 | + // style: TextStyle( | ||
| 287 | + // color: MyColours.color_515151, | ||
| 288 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 289 | + // ), | ||
| 290 | + // Spacer(), | ||
| 291 | + // Container( | ||
| 292 | + // padding: EdgeInsets.symmetric( | ||
| 293 | + // horizontal: w(7), vertical: w(4)), | ||
| 294 | + // child: Image.asset( | ||
| 295 | + // "assets/arrow_right_new.png", | ||
| 296 | + // width: ScreenUtil().setWidth(18), | ||
| 297 | + // height: ScreenUtil().setWidth(32), | ||
| 298 | + // ), | ||
| 299 | + // ) | ||
| 300 | + // ], | ||
| 301 | + // ))), | ||
| 302 | + // Padding( | ||
| 303 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 304 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 305 | + // color: MyColours.color_E7E7E7)), | ||
| 306 | + // VEmptyView(24), | ||
| 307 | + // InkWell( | ||
| 308 | + // onTap: () { | ||
| 309 | + // NavigatorUtil.goCommentsSettingPage(context); | ||
| 310 | + // }, | ||
| 311 | + // child: Padding( | ||
| 312 | + // padding: EdgeInsets.only( | ||
| 313 | + // left: w(16), | ||
| 314 | + // top: w(12), | ||
| 315 | + // bottom: w(12), | ||
| 316 | + // right: w(12)), | ||
| 317 | + // child: Row( | ||
| 318 | + // children: [ | ||
| 319 | + // Text( | ||
| 320 | + // '用户评价反馈', | ||
| 321 | + // style: TextStyle( | ||
| 322 | + // color: MyColours.color_515151, | ||
| 323 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 324 | + // ), | ||
| 325 | + // Spacer(), | ||
| 326 | + // Container( | ||
| 327 | + // padding: EdgeInsets.symmetric( | ||
| 328 | + // horizontal: w(7), vertical: w(4)), | ||
| 329 | + // child: Image.asset( | ||
| 330 | + // "assets/arrow_right_new.png", | ||
| 331 | + // width: ScreenUtil().setWidth(18), | ||
| 332 | + // height: ScreenUtil().setWidth(32), | ||
| 333 | + // ), | ||
| 334 | + // ) | ||
| 335 | + // ], | ||
| 336 | + // ))), | ||
| 337 | + // Padding( | ||
| 338 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 339 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 340 | + // color: MyColours.color_E7E7E7)), | ||
| 341 | + // VEmptyView(24), | ||
| 342 | InkWell( | 342 | InkWell( |
| 343 | onTap: () { | 343 | onTap: () { |
| 344 | NavigatorUtil.goCustomerNoticeSettingPage(context); | 344 | NavigatorUtil.goCustomerNoticeSettingPage(context); |
| @@ -409,75 +409,75 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | @@ -409,75 +409,75 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | ||
| 409 | child: MyDivider(double.infinity, w(0.5), | 409 | child: MyDivider(double.infinity, w(0.5), |
| 410 | color: MyColours.color_E7E7E7)), | 410 | color: MyColours.color_E7E7E7)), |
| 411 | VEmptyView(24), | 411 | VEmptyView(24), |
| 412 | - InkWell( | ||
| 413 | - onTap: () { | ||
| 414 | - NavigatorUtil.goPaymentSettingPage(context); | ||
| 415 | - }, | ||
| 416 | - child: Padding( | ||
| 417 | - padding: EdgeInsets.only( | ||
| 418 | - left: w(16), | ||
| 419 | - top: w(12), | ||
| 420 | - bottom: w(12), | ||
| 421 | - right: w(12)), | ||
| 422 | - child: Row( | ||
| 423 | - children: [ | ||
| 424 | - Text( | ||
| 425 | - '预订订金', | ||
| 426 | - style: TextStyle( | ||
| 427 | - color: MyColours.color_515151, | ||
| 428 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 429 | - ), | ||
| 430 | - Spacer(), | ||
| 431 | - Container( | ||
| 432 | - padding: EdgeInsets.symmetric( | ||
| 433 | - horizontal: w(7), vertical: w(4)), | ||
| 434 | - child: Image.asset( | ||
| 435 | - "assets/arrow_right_new.png", | ||
| 436 | - width: ScreenUtil().setWidth(18), | ||
| 437 | - height: ScreenUtil().setWidth(32), | ||
| 438 | - ), | ||
| 439 | - ) | ||
| 440 | - ], | ||
| 441 | - ))), | ||
| 442 | - Padding( | ||
| 443 | - padding: EdgeInsets.only(left: w(16)), | ||
| 444 | - child: MyDivider(double.infinity, w(0.5), | ||
| 445 | - color: MyColours.color_E7E7E7)), | ||
| 446 | - VEmptyView(24), | ||
| 447 | - InkWell( | ||
| 448 | - onTap: () { | ||
| 449 | - NavigatorUtil.goGrantPage(context); | ||
| 450 | - }, | ||
| 451 | - child: Padding( | ||
| 452 | - padding: EdgeInsets.only( | ||
| 453 | - left: w(16), | ||
| 454 | - top: w(12), | ||
| 455 | - bottom: w(12), | ||
| 456 | - right: w(12)), | ||
| 457 | - child: Row( | ||
| 458 | - children: [ | ||
| 459 | - Text( | ||
| 460 | - '向客户发放消费金', | ||
| 461 | - style: TextStyle( | ||
| 462 | - color: MyColours.color_515151, | ||
| 463 | - fontSize: ScreenUtil().setWidth(32)), | ||
| 464 | - ), | ||
| 465 | - Spacer(), | ||
| 466 | - Container( | ||
| 467 | - padding: EdgeInsets.symmetric( | ||
| 468 | - horizontal: w(7), vertical: w(4)), | ||
| 469 | - child: Image.asset( | ||
| 470 | - "assets/arrow_right_new.png", | ||
| 471 | - width: ScreenUtil().setWidth(18), | ||
| 472 | - height: ScreenUtil().setWidth(32), | ||
| 473 | - ), | ||
| 474 | - ) | ||
| 475 | - ], | ||
| 476 | - ))), | ||
| 477 | - Padding( | ||
| 478 | - padding: EdgeInsets.only(left: w(16)), | ||
| 479 | - child: MyDivider(double.infinity, w(0.5), | ||
| 480 | - color: MyColours.color_E7E7E7)), | 412 | + // InkWell( |
| 413 | + // onTap: () { | ||
| 414 | + // NavigatorUtil.goPaymentSettingPage(context); | ||
| 415 | + // }, | ||
| 416 | + // child: Padding( | ||
| 417 | + // padding: EdgeInsets.only( | ||
| 418 | + // left: w(16), | ||
| 419 | + // top: w(12), | ||
| 420 | + // bottom: w(12), | ||
| 421 | + // right: w(12)), | ||
| 422 | + // child: Row( | ||
| 423 | + // children: [ | ||
| 424 | + // Text( | ||
| 425 | + // '预订订金', | ||
| 426 | + // style: TextStyle( | ||
| 427 | + // color: MyColours.color_515151, | ||
| 428 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 429 | + // ), | ||
| 430 | + // Spacer(), | ||
| 431 | + // Container( | ||
| 432 | + // padding: EdgeInsets.symmetric( | ||
| 433 | + // horizontal: w(7), vertical: w(4)), | ||
| 434 | + // child: Image.asset( | ||
| 435 | + // "assets/arrow_right_new.png", | ||
| 436 | + // width: ScreenUtil().setWidth(18), | ||
| 437 | + // height: ScreenUtil().setWidth(32), | ||
| 438 | + // ), | ||
| 439 | + // ) | ||
| 440 | + // ], | ||
| 441 | + // ))), | ||
| 442 | + // Padding( | ||
| 443 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 444 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 445 | + // color: MyColours.color_E7E7E7)), | ||
| 446 | + // VEmptyView(24), | ||
| 447 | + // InkWell( | ||
| 448 | + // onTap: () { | ||
| 449 | + // NavigatorUtil.goGrantPage(context); | ||
| 450 | + // }, | ||
| 451 | + // child: Padding( | ||
| 452 | + // padding: EdgeInsets.only( | ||
| 453 | + // left: w(16), | ||
| 454 | + // top: w(12), | ||
| 455 | + // bottom: w(12), | ||
| 456 | + // right: w(12)), | ||
| 457 | + // child: Row( | ||
| 458 | + // children: [ | ||
| 459 | + // Text( | ||
| 460 | + // '向客户发放消费金', | ||
| 461 | + // style: TextStyle( | ||
| 462 | + // color: MyColours.color_515151, | ||
| 463 | + // fontSize: ScreenUtil().setWidth(32)), | ||
| 464 | + // ), | ||
| 465 | + // Spacer(), | ||
| 466 | + // Container( | ||
| 467 | + // padding: EdgeInsets.symmetric( | ||
| 468 | + // horizontal: w(7), vertical: w(4)), | ||
| 469 | + // child: Image.asset( | ||
| 470 | + // "assets/arrow_right_new.png", | ||
| 471 | + // width: ScreenUtil().setWidth(18), | ||
| 472 | + // height: ScreenUtil().setWidth(32), | ||
| 473 | + // ), | ||
| 474 | + // ) | ||
| 475 | + // ], | ||
| 476 | + // ))), | ||
| 477 | + // Padding( | ||
| 478 | + // padding: EdgeInsets.only(left: w(16)), | ||
| 479 | + // child: MyDivider(double.infinity, w(0.5), | ||
| 480 | + // color: MyColours.color_E7E7E7)), | ||
| 481 | // InkWell( | 481 | // InkWell( |
| 482 | // onTap: () { | 482 | // onTap: () { |
| 483 | // setState(() { | 483 | // setState(() { |
| @@ -131,17 +131,20 @@ class _RechargeHomePageState extends State<RechargeHomePage> { | @@ -131,17 +131,20 @@ class _RechargeHomePageState extends State<RechargeHomePage> { | ||
| 131 | bool showBtn = Utils.getAuthority(context, '编辑优惠'); | 131 | bool showBtn = Utils.getAuthority(context, '编辑优惠'); |
| 132 | return Scaffold( | 132 | return Scaffold( |
| 133 | backgroundColor: MyColours.color_f3f3f3, | 133 | backgroundColor: MyColours.color_f3f3f3, |
| 134 | - appBar: Utils.getAuthority(context, '充值优惠-设置') | ||
| 135 | - ? SystemAppBar( | ||
| 136 | - '充值优惠', | ||
| 137 | - rightImgName: 'set_g.png', | ||
| 138 | - onTapRight: () { | ||
| 139 | - NavigatorUtil.goRechargeSettingPage(context); | ||
| 140 | - }, | ||
| 141 | - ) | ||
| 142 | - : SystemAppBar( | ||
| 143 | - '充值优惠', | ||
| 144 | - ), | 134 | + appBar: SystemAppBar( |
| 135 | + '充值优惠', | ||
| 136 | + ), | ||
| 137 | + // Utils.getAuthority(context, '充值优惠-设置') | ||
| 138 | + // ? SystemAppBar( | ||
| 139 | + // '充值优惠', | ||
| 140 | + // rightImgName: 'set_g.png', | ||
| 141 | + // onTapRight: () { | ||
| 142 | + // NavigatorUtil.goRechargeSettingPage(context); | ||
| 143 | + // }, | ||
| 144 | + // ) | ||
| 145 | + // : SystemAppBar( | ||
| 146 | + // '充值优惠', | ||
| 147 | + // ), | ||
| 145 | body: Container( | 148 | body: Container( |
| 146 | child: Column( | 149 | child: Column( |
| 147 | children: [ | 150 | children: [ |
lib/pages/my/menu_type/menu_home_page.dart
0 → 100644
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/route/navigator_util.dart'; | ||
| 4 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 5 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 6 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 7 | +import 'package:provider/provider.dart'; | ||
| 8 | + | ||
| 9 | +import '../../../provider/collect_store_provider.dart'; | ||
| 10 | +import '../../../provider/marketing_center_provider.dart'; | ||
| 11 | +import '../../../provider/user_model.dart'; | ||
| 12 | +import '../../../res/colors.dart'; | ||
| 13 | +import '../../../utils/dialog_util.dart'; | ||
| 14 | +import '../../../utils/event_bus.dart'; | ||
| 15 | +import '../../../utils/screen_util.dart'; | ||
| 16 | +import '../../../utils/utils.dart'; | ||
| 17 | +import '../../../widgets/round_button.dart'; | ||
| 18 | +import '../../../widgets/system_app_bar.dart'; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * 菜单管理home | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | +class MenuHomePage extends StatefulWidget { | ||
| 25 | + final bool sellerOrderManager; | ||
| 26 | + final bool sellerOrderCustomer; | ||
| 27 | + MenuHomePage( | ||
| 28 | + {Key? key, | ||
| 29 | + required this.sellerOrderManager, | ||
| 30 | + required this.sellerOrderCustomer}) | ||
| 31 | + : super(key: key); | ||
| 32 | + | ||
| 33 | + @override | ||
| 34 | + _MenuHomePageState createState() => _MenuHomePageState(); | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +class _MenuHomePageState extends State<MenuHomePage> { | ||
| 38 | + @override | ||
| 39 | + void initState() { | ||
| 40 | + super.initState(); | ||
| 41 | + | ||
| 42 | + WidgetsBinding.instance.addPostFrameCallback((_) {}); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @override | ||
| 46 | + void dispose() { | ||
| 47 | + EventBus().emit('changeStatusColor'); | ||
| 48 | + | ||
| 49 | + super.dispose(); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @override | ||
| 53 | + Widget build(BuildContext context) { | ||
| 54 | + return Scaffold( | ||
| 55 | + backgroundColor: Colors.white, | ||
| 56 | + appBar: SystemAppBar( | ||
| 57 | + '菜单管理', | ||
| 58 | + ), | ||
| 59 | + body: Column( | ||
| 60 | + children: [ | ||
| 61 | + Expanded( | ||
| 62 | + child: SingleChildScrollView( | ||
| 63 | + child: Column( | ||
| 64 | + children: [ | ||
| 65 | + InkWell( | ||
| 66 | + onTap: () async { | ||
| 67 | + // | ||
| 68 | + bool? needRefresh = | ||
| 69 | + await NavigatorUtil.goMenuCategoryPage(context); | ||
| 70 | + print(needRefresh); | ||
| 71 | + if (needRefresh != null && needRefresh) { | ||
| 72 | + //刷新页面数据 | ||
| 73 | + // _controller.callRefresh(); | ||
| 74 | + // _couponNetworkData(); | ||
| 75 | + } | ||
| 76 | + }, | ||
| 77 | + child: Padding( | ||
| 78 | + padding: EdgeInsets.only( | ||
| 79 | + left: w(16), | ||
| 80 | + top: w(12), | ||
| 81 | + bottom: w(12), | ||
| 82 | + right: w(12)), | ||
| 83 | + child: Row( | ||
| 84 | + children: [ | ||
| 85 | + Text( | ||
| 86 | + '分类管理', | ||
| 87 | + style: TextStyle( | ||
| 88 | + color: MyColours.color_515151, | ||
| 89 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 90 | + ), | ||
| 91 | + Spacer(), | ||
| 92 | + Container( | ||
| 93 | + padding: EdgeInsets.symmetric( | ||
| 94 | + horizontal: w(7), vertical: w(4)), | ||
| 95 | + child: Image.asset( | ||
| 96 | + "assets/arrow_right_new.png", | ||
| 97 | + width: ScreenUtil().setWidth(18), | ||
| 98 | + height: ScreenUtil().setWidth(32), | ||
| 99 | + ), | ||
| 100 | + ) | ||
| 101 | + ], | ||
| 102 | + ))), | ||
| 103 | + Padding( | ||
| 104 | + padding: EdgeInsets.only(left: w(16)), | ||
| 105 | + child: MyDivider(double.infinity, w(0.5), | ||
| 106 | + color: MyColours.color_E7E7E7)), | ||
| 107 | + VEmptyView(24), | ||
| 108 | + InkWell( | ||
| 109 | + onTap: () { | ||
| 110 | + // | ||
| 111 | + NavigatorUtil.goMenuManagePage(context); | ||
| 112 | + }, | ||
| 113 | + child: Padding( | ||
| 114 | + padding: EdgeInsets.only( | ||
| 115 | + left: w(16), | ||
| 116 | + top: w(12), | ||
| 117 | + bottom: w(12), | ||
| 118 | + right: w(12)), | ||
| 119 | + child: Row( | ||
| 120 | + children: [ | ||
| 121 | + Text( | ||
| 122 | + '菜品管理', | ||
| 123 | + style: TextStyle( | ||
| 124 | + color: MyColours.color_515151, | ||
| 125 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 126 | + ), | ||
| 127 | + Spacer(), | ||
| 128 | + Container( | ||
| 129 | + padding: EdgeInsets.symmetric( | ||
| 130 | + horizontal: w(7), vertical: w(4)), | ||
| 131 | + child: Image.asset( | ||
| 132 | + "assets/arrow_right_new.png", | ||
| 133 | + width: ScreenUtil().setWidth(18), | ||
| 134 | + height: ScreenUtil().setWidth(32), | ||
| 135 | + ), | ||
| 136 | + ) | ||
| 137 | + ], | ||
| 138 | + ))), | ||
| 139 | + Padding( | ||
| 140 | + padding: EdgeInsets.only(left: w(16)), | ||
| 141 | + child: MyDivider(double.infinity, w(0.5), | ||
| 142 | + color: MyColours.color_E7E7E7)), | ||
| 143 | + VEmptyView(24), | ||
| 144 | + InkWell( | ||
| 145 | + onTap: () { | ||
| 146 | + // | ||
| 147 | + if (!widget.sellerOrderManager) { | ||
| 148 | + //没有购买经理排菜模块 | ||
| 149 | + //提示购买 | ||
| 150 | + | ||
| 151 | + DialogUtil.showSellerVersionBuyDialog( | ||
| 152 | + context, '经理排菜', (v) {}); | ||
| 153 | + return; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + if (Utils.getAuthority(context, '套餐排菜')) { | ||
| 157 | + NavigatorUtil.goMyPlanDishHomePage(context); | ||
| 158 | + } | ||
| 159 | + }, | ||
| 160 | + child: Padding( | ||
| 161 | + padding: EdgeInsets.only( | ||
| 162 | + left: w(16), | ||
| 163 | + top: w(12), | ||
| 164 | + bottom: w(12), | ||
| 165 | + right: w(12)), | ||
| 166 | + child: Row( | ||
| 167 | + children: [ | ||
| 168 | + Text( | ||
| 169 | + '套餐排菜', | ||
| 170 | + style: TextStyle( | ||
| 171 | + color: MyColours.color_515151, | ||
| 172 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 173 | + ), | ||
| 174 | + Spacer(), | ||
| 175 | + Container( | ||
| 176 | + padding: EdgeInsets.symmetric( | ||
| 177 | + horizontal: w(7), vertical: w(4)), | ||
| 178 | + child: Image.asset( | ||
| 179 | + "assets/arrow_right_new.png", | ||
| 180 | + width: ScreenUtil().setWidth(18), | ||
| 181 | + height: ScreenUtil().setWidth(32), | ||
| 182 | + ), | ||
| 183 | + ) | ||
| 184 | + ], | ||
| 185 | + ))), | ||
| 186 | + Padding( | ||
| 187 | + padding: EdgeInsets.only(left: w(16)), | ||
| 188 | + child: MyDivider(double.infinity, w(0.5), | ||
| 189 | + color: MyColours.color_E7E7E7)), | ||
| 190 | + VEmptyView(24), | ||
| 191 | + InkWell( | ||
| 192 | + onTap: () { | ||
| 193 | + // | ||
| 194 | + | ||
| 195 | + if (!widget.sellerOrderCustomer) { | ||
| 196 | + //没有购买提前点餐模块 | ||
| 197 | + //提示购买 | ||
| 198 | + | ||
| 199 | + DialogUtil.showSellerVersionBuyDialog( | ||
| 200 | + context, '提前点餐', (v) {}); | ||
| 201 | + return; | ||
| 202 | + } | ||
| 203 | + NavigatorUtil.goOrderSettingPage(context); | ||
| 204 | + }, | ||
| 205 | + child: Padding( | ||
| 206 | + padding: EdgeInsets.only( | ||
| 207 | + left: w(16), | ||
| 208 | + top: w(12), | ||
| 209 | + bottom: w(12), | ||
| 210 | + right: w(12)), | ||
| 211 | + child: Row( | ||
| 212 | + children: [ | ||
| 213 | + Text( | ||
| 214 | + '提前点餐设置', | ||
| 215 | + style: TextStyle( | ||
| 216 | + color: MyColours.color_515151, | ||
| 217 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 218 | + ), | ||
| 219 | + Spacer(), | ||
| 220 | + Container( | ||
| 221 | + padding: EdgeInsets.symmetric( | ||
| 222 | + horizontal: w(7), vertical: w(4)), | ||
| 223 | + child: Image.asset( | ||
| 224 | + "assets/arrow_right_new.png", | ||
| 225 | + width: ScreenUtil().setWidth(18), | ||
| 226 | + height: ScreenUtil().setWidth(32), | ||
| 227 | + ), | ||
| 228 | + ) | ||
| 229 | + ], | ||
| 230 | + ))), | ||
| 231 | + Padding( | ||
| 232 | + padding: EdgeInsets.only(left: w(16)), | ||
| 233 | + child: MyDivider(double.infinity, w(0.5), | ||
| 234 | + color: MyColours.color_E7E7E7)), | ||
| 235 | + ], | ||
| 236 | + ), | ||
| 237 | + )), | ||
| 238 | + ], | ||
| 239 | + )); | ||
| 240 | + } | ||
| 241 | +} |
| 1 | - | ||
| 2 | import 'dart:convert'; | 1 | import 'dart:convert'; |
| 3 | 2 | ||
| 4 | // import 'package:amap_map_fluttify/amap_map_fluttify.dart'; | 3 | // import 'package:amap_map_fluttify/amap_map_fluttify.dart'; |
| @@ -237,8 +236,8 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -237,8 +236,8 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 237 | //小图 | 236 | //小图 |
| 238 | //判断下一个是大图还是小图 | 237 | //判断下一个是大图还是小图 |
| 239 | if (menuManageProvider.menuModel![i].cookbooklist!.length - 1 > j) { | 238 | if (menuManageProvider.menuModel![i].cookbooklist!.length - 1 > j) { |
| 240 | - if (menuManageProvider | ||
| 241 | - .menuModel![i].cookbooklist![j + 1].cookStyle!.imageType == | 239 | + if (menuManageProvider.menuModel![i].cookbooklist![j + 1] |
| 240 | + .cookStyle!.imageType == | ||
| 242 | '1') { | 241 | '1') { |
| 243 | //下一个是大图 | 242 | //下一个是大图 |
| 244 | menuSunModel.indexNew = j; | 243 | menuSunModel.indexNew = j; |
| @@ -740,7 +739,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -740,7 +739,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 740 | context, | 739 | context, |
| 741 | model.nameTypeList, | 740 | model.nameTypeList, |
| 742 | model.imageTypeList, | 741 | model.imageTypeList, |
| 743 | - model.moveList(cookbooklist.length)) ; | 742 | + model.moveList(cookbooklist.length)); |
| 744 | if (object != null) { | 743 | if (object != null) { |
| 745 | print(object); | 744 | print(object); |
| 746 | if (object['name_type'] != null) { | 745 | if (object['name_type'] != null) { |
| @@ -823,7 +822,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -823,7 +822,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 823 | return Scaffold( | 822 | return Scaffold( |
| 824 | backgroundColor: MyColours.color_DBDBDB, | 823 | backgroundColor: MyColours.color_DBDBDB, |
| 825 | appBar: SystemAppBar( | 824 | appBar: SystemAppBar( |
| 826 | - '菜单管理', | 825 | + '菜品管理', |
| 827 | rightImgName: 'set_g.png', | 826 | rightImgName: 'set_g.png', |
| 828 | onTapRight: () { | 827 | onTapRight: () { |
| 829 | NavigatorUtil.goMenuThemeColorSetPage( | 828 | NavigatorUtil.goMenuThemeColorSetPage( |
| @@ -890,7 +889,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -890,7 +889,7 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 890 | onPressed: () async { | 889 | onPressed: () async { |
| 891 | bool? needRefresh = | 890 | bool? needRefresh = |
| 892 | await NavigatorUtil.goMenuCategoryPage( | 891 | await NavigatorUtil.goMenuCategoryPage( |
| 893 | - context) ; | 892 | + context); |
| 894 | print(needRefresh); | 893 | print(needRefresh); |
| 895 | if (needRefresh != null && needRefresh) { | 894 | if (needRefresh != null && needRefresh) { |
| 896 | //刷新页面数据 | 895 | //刷新页面数据 |
| @@ -1068,7 +1067,8 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -1068,7 +1067,8 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 1068 | .nameType == | 1067 | .nameType == |
| 1069 | '1' | 1068 | '1' |
| 1070 | ? CrossAxisAlignment.start | 1069 | ? CrossAxisAlignment.start |
| 1071 | - : model.cookStyle!.imageType != | 1070 | + : model.cookStyle! |
| 1071 | + .imageType != | ||
| 1072 | '2' && | 1072 | '2' && |
| 1073 | model.cookStyle! | 1073 | model.cookStyle! |
| 1074 | .nameType == | 1074 | .nameType == |
| @@ -1289,54 +1289,55 @@ class _MenuManagePageState extends State<MenuManagePage> { | @@ -1289,54 +1289,55 @@ class _MenuManagePageState extends State<MenuManagePage> { | ||
| 1289 | if (model.pageState == PageState.Success || | 1289 | if (model.pageState == PageState.Success || |
| 1290 | model.pageState == PageState.Empty) | 1290 | model.pageState == PageState.Empty) |
| 1291 | Container( | 1291 | Container( |
| 1292 | - padding: EdgeInsets.symmetric(horizontal: w(23)), | 1292 | + padding: EdgeInsets.symmetric(horizontal: w(45)), |
| 1293 | // height: w(80), | 1293 | // height: w(80), |
| 1294 | color: MyColours.color_FAFAFA, | 1294 | color: MyColours.color_FAFAFA, |
| 1295 | child: Row( | 1295 | child: Row( |
| 1296 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | 1296 | + mainAxisAlignment: MainAxisAlignment.center, |
| 1297 | children: [ | 1297 | children: [ |
| 1298 | - Padding( | ||
| 1299 | - padding: EdgeInsets.only(top: w(12), bottom: w(25)), | ||
| 1300 | - child: RoundButton( | ||
| 1301 | - onPressed: () async { | ||
| 1302 | - bool? needRefresh = | ||
| 1303 | - await NavigatorUtil.goMenuCategoryPage( | ||
| 1304 | - context) ; | ||
| 1305 | - print(needRefresh); | ||
| 1306 | - if (needRefresh != null && needRefresh) { | ||
| 1307 | - //刷新页面数据 | ||
| 1308 | - // _controller.callRefresh(); | ||
| 1309 | - // _couponNetworkData(); | ||
| 1310 | - } | ||
| 1311 | - }, | ||
| 1312 | - text: '分类管理', | ||
| 1313 | - fontSize: 32, | ||
| 1314 | - gradientStart: MyColours.color_ffffff, | ||
| 1315 | - gradientEnd: MyColours.color_ffffff, | ||
| 1316 | - borderColor: MyColours.color_438E93, | ||
| 1317 | - textColor: MyColours.color_438E93, | ||
| 1318 | - isBold: true, | ||
| 1319 | - height: w(43), | ||
| 1320 | - width: w(100), | ||
| 1321 | - radius: r(5), | ||
| 1322 | - )), | 1298 | + // Padding( |
| 1299 | + // padding: EdgeInsets.only(top: w(12), bottom: w(25)), | ||
| 1300 | + // child: RoundButton( | ||
| 1301 | + // onPressed: () async { | ||
| 1302 | + // bool? needRefresh = | ||
| 1303 | + // await NavigatorUtil.goMenuCategoryPage( | ||
| 1304 | + // context); | ||
| 1305 | + // print(needRefresh); | ||
| 1306 | + // if (needRefresh != null && needRefresh) { | ||
| 1307 | + // //刷新页面数据 | ||
| 1308 | + // // _controller.callRefresh(); | ||
| 1309 | + // // _couponNetworkData(); | ||
| 1310 | + // } | ||
| 1311 | + // }, | ||
| 1312 | + // text: '分类管理', | ||
| 1313 | + // fontSize: 32, | ||
| 1314 | + // gradientStart: MyColours.color_ffffff, | ||
| 1315 | + // gradientEnd: MyColours.color_ffffff, | ||
| 1316 | + // borderColor: MyColours.color_438E93, | ||
| 1317 | + // textColor: MyColours.color_438E93, | ||
| 1318 | + // isBold: true, | ||
| 1319 | + // height: w(43), | ||
| 1320 | + // width: w(100), | ||
| 1321 | + // radius: r(5), | ||
| 1322 | + // )), | ||
| 1323 | !isShow | 1323 | !isShow |
| 1324 | ? SizedBox() | 1324 | ? SizedBox() |
| 1325 | - : Padding( | ||
| 1326 | - padding: | ||
| 1327 | - EdgeInsets.only(top: w(12), bottom: w(25)), | ||
| 1328 | - child: RoundButton( | ||
| 1329 | - onPressed: () async { | ||
| 1330 | - await NavigatorUtil.goMenuAddDishesPage( | ||
| 1331 | - context); | ||
| 1332 | - }, | ||
| 1333 | - text: '添加菜品', | ||
| 1334 | - fontSize: 32, | ||
| 1335 | - isBold: true, | ||
| 1336 | - width: w(218), | ||
| 1337 | - height: w(43), | ||
| 1338 | - radius: r(5), | ||
| 1339 | - )) | 1325 | + : Expanded( |
| 1326 | + child: Padding( | ||
| 1327 | + padding: EdgeInsets.only( | ||
| 1328 | + top: w(12), bottom: w(25)), | ||
| 1329 | + child: RoundButton( | ||
| 1330 | + onPressed: () async { | ||
| 1331 | + await NavigatorUtil.goMenuAddDishesPage( | ||
| 1332 | + context); | ||
| 1333 | + }, | ||
| 1334 | + text: '添加菜品', | ||
| 1335 | + fontSize: 32, | ||
| 1336 | + isBold: true, | ||
| 1337 | + width: w(218), | ||
| 1338 | + height: w(43), | ||
| 1339 | + radius: r(5), | ||
| 1340 | + ))) | ||
| 1340 | ], | 1341 | ], |
| 1341 | )) | 1342 | )) |
| 1342 | ]); | 1343 | ]); |
-
Please register or login to post a comment