Showing
9 changed files
with
1042 additions
and
3 deletions
| @@ -665,7 +665,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -665,7 +665,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 665 | child: _item( | 665 | child: _item( |
| 666 | Utils.getImgPath('cdgl'), '套餐排菜')), | 666 | Utils.getImgPath('cdgl'), '套餐排菜')), |
| 667 | InkWell( | 667 | InkWell( |
| 668 | - onTap: () {}, child: _item('', '空空空空')), | 668 | + onTap: () { |
| 669 | + NavigatorUtil.goStoreWineManageHomePage( | ||
| 670 | + context); | ||
| 671 | + }, | ||
| 672 | + child: _item( | ||
| 673 | + Utils.getImgPath('cdgl'), '客户存酒')), | ||
| 669 | InkWell( | 674 | InkWell( |
| 670 | onTap: () {}, child: _item('', '空空空空')), | 675 | onTap: () {}, child: _item('', '空空空空')), |
| 671 | InkWell( | 676 | InkWell( |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/widgets/MyDivider.dart'; | ||
| 4 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 5 | +import 'package:provider/provider.dart'; | ||
| 6 | + | ||
| 7 | +import '../../../provider/store_wine_provider.dart'; | ||
| 8 | +import '../../../res/colors.dart'; | ||
| 9 | +import '../../../utils/dialog_util.dart'; | ||
| 10 | +import '../../../utils/screen_util.dart'; | ||
| 11 | +import '../../../utils/utils.dart'; | ||
| 12 | +import '../../../widgets/h_empty_view.dart'; | ||
| 13 | +import '../../../widgets/round_button.dart'; | ||
| 14 | +import '../../../widgets/system_app_bar.dart'; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * 新建存酒 | ||
| 18 | + */ | ||
| 19 | + | ||
| 20 | +class CreateStoreWinePage extends StatefulWidget { | ||
| 21 | + CreateStoreWinePage({Key key}) : super(key: key); | ||
| 22 | + | ||
| 23 | + @override | ||
| 24 | + _CreateStoreWinePageState createState() => _CreateStoreWinePageState(); | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +class _CreateStoreWinePageState extends State<CreateStoreWinePage> { | ||
| 28 | + StoreWineProvider storeWineProvider; | ||
| 29 | + int sexSelectIndex = 0; | ||
| 30 | + String sexStr = '先生'; | ||
| 31 | + List sexList = []; | ||
| 32 | + | ||
| 33 | + @override | ||
| 34 | + void initState() { | ||
| 35 | + // TODO: implement initState | ||
| 36 | + super.initState(); | ||
| 37 | + sexList = ['先生', '女士', '公司']; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @override | ||
| 41 | + Widget build(BuildContext context) { | ||
| 42 | + storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true); | ||
| 43 | + return Scaffold( | ||
| 44 | + appBar: SystemAppBar( | ||
| 45 | + '新建存酒', | ||
| 46 | + onTap: () { | ||
| 47 | + Navigator.pop(context); | ||
| 48 | + }, | ||
| 49 | + ), | ||
| 50 | + body: Container( | ||
| 51 | + child: Column( | ||
| 52 | + children: [ | ||
| 53 | + Expanded( | ||
| 54 | + child: SingleChildScrollView( | ||
| 55 | + child: Column( | ||
| 56 | + children: [ | ||
| 57 | + Container( | ||
| 58 | + color: Colors.white, | ||
| 59 | + padding: EdgeInsets.only( | ||
| 60 | + left: ScreenUtil().setWidth(16 * 2)), | ||
| 61 | + child: Column( | ||
| 62 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 63 | + mainAxisAlignment: MainAxisAlignment.start, | ||
| 64 | + children: [ | ||
| 65 | + VEmptyView(32), | ||
| 66 | + Container( | ||
| 67 | + height: ScreenUtil().setWidth(48 * 2), | ||
| 68 | + padding: EdgeInsets.only( | ||
| 69 | + right: ScreenUtil().setWidth(16 * 2)), | ||
| 70 | + child: Row( | ||
| 71 | + mainAxisAlignment: | ||
| 72 | + MainAxisAlignment.spaceBetween, | ||
| 73 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 74 | + children: [ | ||
| 75 | + Text( | ||
| 76 | + '联系电话', | ||
| 77 | + style: TextStyle( | ||
| 78 | + color: MyColours.color_515151, | ||
| 79 | + fontSize: font(16)), | ||
| 80 | + ), | ||
| 81 | + Expanded( | ||
| 82 | + child: Container( | ||
| 83 | + height: | ||
| 84 | + ScreenUtil().setWidth(16 * 2), | ||
| 85 | + alignment: Alignment.centerRight, | ||
| 86 | + child: TextField( | ||
| 87 | + maxLines: 1, | ||
| 88 | + //输入文本的样式 | ||
| 89 | + style: TextStyle( | ||
| 90 | + fontSize: | ||
| 91 | + ScreenUtil().setSp(32), | ||
| 92 | + color: | ||
| 93 | + MyColours.color_515151), | ||
| 94 | + // controller: _baseIndoProvider.phoneController, | ||
| 95 | + // focusNode: _phoneNode, | ||
| 96 | + textAlign: TextAlign.right, | ||
| 97 | + textAlignVertical: | ||
| 98 | + TextAlignVertical.center, | ||
| 99 | + | ||
| 100 | + // textAlignVertical: | ||
| 101 | + // TextAlignVertical.center, | ||
| 102 | + decoration: InputDecoration( | ||
| 103 | + hintText: "点击输入客人电话", | ||
| 104 | + hintStyle: TextStyle( | ||
| 105 | + color: MyColours.color_999999, | ||
| 106 | + fontSize: | ||
| 107 | + ScreenUtil().setSp(32), | ||
| 108 | + ), | ||
| 109 | + contentPadding: EdgeInsets.zero, | ||
| 110 | + // contentPadding: | ||
| 111 | + // EdgeInsets.symmetric( | ||
| 112 | + // vertical: w(12)), | ||
| 113 | + border: OutlineInputBorder( | ||
| 114 | + borderSide: | ||
| 115 | + BorderSide.none), | ||
| 116 | + ), | ||
| 117 | + onChanged: (value) { | ||
| 118 | + print(value); | ||
| 119 | + // if (value.trim().isEmpty || value.trim().length > 11) { | ||
| 120 | + // //内容为空,或 超过11位 | ||
| 121 | + // setState(() { | ||
| 122 | + // _baseIndoProvider.userHistorys.clear(); | ||
| 123 | + // }); | ||
| 124 | + // return; | ||
| 125 | + // } | ||
| 126 | + // Map<String, String> params = { | ||
| 127 | + // "keywords": value.trim(), | ||
| 128 | + // "sid": Provider.of<UserModel>(context, listen: false) | ||
| 129 | + // .user | ||
| 130 | + // .sellerid, | ||
| 131 | + // }; | ||
| 132 | + // _baseIndoProvider.getUserHistorys(context, params); | ||
| 133 | + }, | ||
| 134 | + onEditingComplete: () { | ||
| 135 | + // _phoneNode.unfocus(); | ||
| 136 | + }, | ||
| 137 | + onTap: () { | ||
| 138 | + // setState(() { | ||
| 139 | + // showPhoneHistory = true; | ||
| 140 | + // }); | ||
| 141 | + // Future.delayed(Duration(milliseconds: 300), () { | ||
| 142 | + // _controller.jumpTo(_controller.position.maxScrollExtent); | ||
| 143 | + // }); | ||
| 144 | + }, | ||
| 145 | + keyboardType: | ||
| 146 | + TextInputType.number, | ||
| 147 | + ))), | ||
| 148 | + // InkWell( | ||
| 149 | + // onTap: () { | ||
| 150 | + // // _openAddressBook(); | ||
| 151 | + // }, | ||
| 152 | + // child: Container( | ||
| 153 | + // width: ScreenUtil().setWidth(74) * 2, | ||
| 154 | + // height: ScreenUtil().setWidth(48), | ||
| 155 | + // alignment: Alignment.centerRight, | ||
| 156 | + // child: Text('一键录入', | ||
| 157 | + // style: TextStyle( | ||
| 158 | + // color: MyColours.color_515151, | ||
| 159 | + // fontSize: ScreenUtil().setSp(28), | ||
| 160 | + // )), | ||
| 161 | + // ), | ||
| 162 | + // ), | ||
| 163 | + ], | ||
| 164 | + )), | ||
| 165 | + MyDivider( | ||
| 166 | + double.infinity, | ||
| 167 | + h(0.5), | ||
| 168 | + color: MyColours.color_E7E7E7, | ||
| 169 | + ), | ||
| 170 | + Container( | ||
| 171 | + height: ScreenUtil().setWidth(48 * 2), | ||
| 172 | + padding: EdgeInsets.only( | ||
| 173 | + top: ScreenUtil().setWidth(16 * 2), | ||
| 174 | + right: ScreenUtil().setWidth(16 * 2)), | ||
| 175 | + child: Row( | ||
| 176 | + mainAxisAlignment: | ||
| 177 | + MainAxisAlignment.spaceBetween, | ||
| 178 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
| 179 | + children: [ | ||
| 180 | + Text( | ||
| 181 | + '客人姓名', | ||
| 182 | + style: TextStyle( | ||
| 183 | + color: MyColours.color_515151, | ||
| 184 | + fontSize: font(16)), | ||
| 185 | + ), | ||
| 186 | + Expanded( | ||
| 187 | + child: Container( | ||
| 188 | + height: | ||
| 189 | + ScreenUtil().setWidth(16 * 2), | ||
| 190 | + alignment: Alignment.centerRight, | ||
| 191 | + child: TextField( | ||
| 192 | + maxLines: 1, | ||
| 193 | + //输入文本的样式 | ||
| 194 | + style: TextStyle( | ||
| 195 | + fontSize: | ||
| 196 | + ScreenUtil().setSp(32), | ||
| 197 | + color: | ||
| 198 | + MyColours.color_515151), | ||
| 199 | + // controller: _baseIndoProvider.phoneController, | ||
| 200 | + // focusNode: _phoneNode, | ||
| 201 | + textAlign: TextAlign.right, | ||
| 202 | + textAlignVertical: | ||
| 203 | + TextAlignVertical.center, | ||
| 204 | + | ||
| 205 | + // textAlignVertical: | ||
| 206 | + // TextAlignVertical.center, | ||
| 207 | + decoration: InputDecoration( | ||
| 208 | + hintText: "点击输入", | ||
| 209 | + hintStyle: TextStyle( | ||
| 210 | + color: MyColours.color_999999, | ||
| 211 | + fontSize: | ||
| 212 | + ScreenUtil().setSp(32), | ||
| 213 | + ), | ||
| 214 | + contentPadding: EdgeInsets.zero, | ||
| 215 | + // contentPadding: | ||
| 216 | + // EdgeInsets.symmetric( | ||
| 217 | + // vertical: w(12)), | ||
| 218 | + border: OutlineInputBorder( | ||
| 219 | + borderSide: | ||
| 220 | + BorderSide.none), | ||
| 221 | + ), | ||
| 222 | + onChanged: (value) { | ||
| 223 | + print(value); | ||
| 224 | + // if (value.trim().isEmpty || value.trim().length > 11) { | ||
| 225 | + // //内容为空,或 超过11位 | ||
| 226 | + // setState(() { | ||
| 227 | + // _baseIndoProvider.userHistorys.clear(); | ||
| 228 | + // }); | ||
| 229 | + // return; | ||
| 230 | + // } | ||
| 231 | + // Map<String, String> params = { | ||
| 232 | + // "keywords": value.trim(), | ||
| 233 | + // "sid": Provider.of<UserModel>(context, listen: false) | ||
| 234 | + // .user | ||
| 235 | + // .sellerid, | ||
| 236 | + // }; | ||
| 237 | + // _baseIndoProvider.getUserHistorys(context, params); | ||
| 238 | + }, | ||
| 239 | + onEditingComplete: () { | ||
| 240 | + // _phoneNode.unfocus(); | ||
| 241 | + }, | ||
| 242 | + onTap: () { | ||
| 243 | + // setState(() { | ||
| 244 | + // showPhoneHistory = true; | ||
| 245 | + // }); | ||
| 246 | + // Future.delayed(Duration(milliseconds: 300), () { | ||
| 247 | + // _controller.jumpTo(_controller.position.maxScrollExtent); | ||
| 248 | + // }); | ||
| 249 | + }, | ||
| 250 | + keyboardType: | ||
| 251 | + TextInputType.number, | ||
| 252 | + ))), | ||
| 253 | + HEmptyView(10), | ||
| 254 | + InkWell( | ||
| 255 | + onTap: () { | ||
| 256 | + FocusScope.of(context) | ||
| 257 | + .requestFocus(FocusNode()); //隐藏键盘 | ||
| 258 | + | ||
| 259 | + DialogUtil.showSelectCusmanDialog( | ||
| 260 | + context, sexList, (value) async { | ||
| 261 | + if (value != null) { | ||
| 262 | + sexSelectIndex = value.first; | ||
| 263 | + sexStr = sexList[sexSelectIndex]; | ||
| 264 | + | ||
| 265 | + setState(() {}); | ||
| 266 | + } | ||
| 267 | + }, selecteds: [sexSelectIndex]).then( | ||
| 268 | + (value) {}); | ||
| 269 | + }, | ||
| 270 | + child: Row(children: [ | ||
| 271 | + Text( | ||
| 272 | + sexStr, | ||
| 273 | + style: TextStyle( | ||
| 274 | + color: MyColours.color_515151, | ||
| 275 | + fontSize: ScreenUtil().setSp(32), | ||
| 276 | + ), | ||
| 277 | + ), | ||
| 278 | + Image.asset( | ||
| 279 | + Utils.getImgPath('quan_down_f'), | ||
| 280 | + width: ScreenUtil().setWidth(28), | ||
| 281 | + height: ScreenUtil().setWidth(28)), | ||
| 282 | + ]), | ||
| 283 | + ), | ||
| 284 | + HEmptyView(40), | ||
| 285 | + Container( | ||
| 286 | + width: w(100), | ||
| 287 | + alignment: Alignment.centerRight, | ||
| 288 | + child: Text( | ||
| 289 | + // '会员状态未知', | ||
| 290 | + '会员', | ||
| 291 | + style: TextStyle( | ||
| 292 | + color: true | ||
| 293 | + ? MyColours.color_999999 | ||
| 294 | + : MyColours.color_515151, | ||
| 295 | + fontSize: ScreenUtil().setSp(32), | ||
| 296 | + ), | ||
| 297 | + ), | ||
| 298 | + ), | ||
| 299 | + ], | ||
| 300 | + )), | ||
| 301 | + ], | ||
| 302 | + )) | ||
| 303 | + ], | ||
| 304 | + ), | ||
| 305 | + )), | ||
| 306 | + Container( | ||
| 307 | + height: ScreenUtil().setWidth(91 * 2), | ||
| 308 | + width: double.infinity, | ||
| 309 | + padding: EdgeInsets.only( | ||
| 310 | + top: ScreenUtil().setWidth(16 * 2), | ||
| 311 | + bottom: ScreenUtil().setWidth(35 * 2), | ||
| 312 | + left: ScreenUtil().setWidth(45 * 2), | ||
| 313 | + right: ScreenUtil().setWidth(45 * 2), | ||
| 314 | + ), | ||
| 315 | + decoration: BoxDecoration( | ||
| 316 | + color: MyColours.color_ffffff, | ||
| 317 | + boxShadow: [ | ||
| 318 | + BoxShadow( | ||
| 319 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 320 | + color: Color.fromRGBO(0, 0, 0, 0.1), | ||
| 321 | + offset: Offset(0, ScreenUtil().setWidth(-2)), | ||
| 322 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 323 | + ], | ||
| 324 | + borderRadius: BorderRadius.all( | ||
| 325 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 326 | + ), | ||
| 327 | + ), | ||
| 328 | + child: RoundButton( | ||
| 329 | + text: '保存', | ||
| 330 | + height: ScreenUtil().setWidth(80), | ||
| 331 | + radius: ScreenUtil().setWidth(10), | ||
| 332 | + isBold: true, | ||
| 333 | + fontSize: 32, | ||
| 334 | + onPressed: () async { | ||
| 335 | + // UserModel userModel = | ||
| 336 | + // Provider.of<UserModel>(context, listen: false); | ||
| 337 | + // if (userModel.user.role_name == '管理员' || | ||
| 338 | + // userModel.user.role_name == '店长') { | ||
| 339 | + // NavigatorUtil.goCouponCreateSelectTypePage(context); | ||
| 340 | + // } else { | ||
| 341 | + // bool needRefresh = | ||
| 342 | + // await NavigatorUtil.goCouponEditPage(context); | ||
| 343 | + // print(needRefresh); | ||
| 344 | + // if (needRefresh != null && needRefresh) { | ||
| 345 | + // bus.emit('refresh_coupon_list_f'); | ||
| 346 | + // //刷新页面数据 | ||
| 347 | + // // _controller.callRefresh(); | ||
| 348 | + // // _couponNetworkData(tabController.index); | ||
| 349 | + // } | ||
| 350 | + // } | ||
| 351 | + }, | ||
| 352 | + ), | ||
| 353 | + ) | ||
| 354 | + ], | ||
| 355 | + ), | ||
| 356 | + )); | ||
| 357 | + } | ||
| 358 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/pages/my/store_wine_manage/wine_in_store_item.dart'; | ||
| 4 | +import 'package:one_key/pages/my/store_wine_manage/wine_out_store_item.dart'; | ||
| 5 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 6 | +import 'package:provider/provider.dart'; | ||
| 7 | + | ||
| 8 | +import '../../../provider/store_wine_provider.dart'; | ||
| 9 | +import '../../../res/colors.dart'; | ||
| 10 | +import '../../../route/navigator_util.dart'; | ||
| 11 | +import '../../../utils/event_bus.dart'; | ||
| 12 | +import '../../../utils/utils.dart'; | ||
| 13 | +import '../../../widgets/custom_tab_indicator.dart'; | ||
| 14 | +import '../../../widgets/round_button.dart'; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * | ||
| 18 | + * 存酒首页 | ||
| 19 | + */ | ||
| 20 | + | ||
| 21 | +class StoreWineManageHomePage extends StatefulWidget { | ||
| 22 | + StoreWineManageHomePage({Key key}) : super(key: key); | ||
| 23 | + | ||
| 24 | + @override | ||
| 25 | + _StoreWineManageHomePageState createState() => | ||
| 26 | + _StoreWineManageHomePageState(); | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +class _StoreWineManageHomePageState extends State<StoreWineManageHomePage> | ||
| 30 | + with TickerProviderStateMixin { | ||
| 31 | + StoreWineProvider storeWineProvider; | ||
| 32 | + | ||
| 33 | + TextEditingController searchC = TextEditingController(); //搜索框控制器 | ||
| 34 | + List _tabBarTitle; | ||
| 35 | + TabController tabController; | ||
| 36 | + int index = 0; | ||
| 37 | + ScrollController listInStoreC = ScrollController(); | ||
| 38 | + | ||
| 39 | + @override | ||
| 40 | + void initState() { | ||
| 41 | + _tabBarTitle = ['全部在店', '取酒记录']; | ||
| 42 | + super.initState(); | ||
| 43 | + tabController = TabController(length: 2, vsync: this); | ||
| 44 | + tabController.index = 0; | ||
| 45 | + | ||
| 46 | + tabController.addListener(() { | ||
| 47 | + if (tabController.index == tabController.animation.value) { | ||
| 48 | + if (index == tabController.index) { | ||
| 49 | + return; | ||
| 50 | + } | ||
| 51 | + print(tabController.index); | ||
| 52 | + index = tabController.index; | ||
| 53 | + | ||
| 54 | + // _getContantData(first: true); | ||
| 55 | + } | ||
| 56 | + }); | ||
| 57 | + WidgetsBinding.instance.addPostFrameCallback((_) async { | ||
| 58 | + index = tabController.index; | ||
| 59 | + | ||
| 60 | + // _getContantData(first: first); | ||
| 61 | + }); | ||
| 62 | + // bus.on("refresh_guest_list_my", (arg) { | ||
| 63 | + // _getContantData(); | ||
| 64 | + // }); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + /// 搜索框 | ||
| 68 | + Widget _searchWidget() { | ||
| 69 | + return Container( | ||
| 70 | + color: MyColours.color_ffffff, | ||
| 71 | + padding: EdgeInsets.symmetric( | ||
| 72 | + horizontal: ScreenUtil().setWidth(40), | ||
| 73 | + ), | ||
| 74 | + height: ScreenUtil().setWidth(45 * 2), | ||
| 75 | + // alignment: Alignment.center, | ||
| 76 | + | ||
| 77 | + child: Container( | ||
| 78 | + alignment: Alignment.center, | ||
| 79 | + padding: EdgeInsets.only( | ||
| 80 | + left: ScreenUtil().setWidth(20 * 2), | ||
| 81 | + ), | ||
| 82 | + decoration: BoxDecoration( | ||
| 83 | + color: MyColours.color_ffffff, | ||
| 84 | + borderRadius: | ||
| 85 | + BorderRadius.circular(ScreenUtil().setWidth(24 * 2)), | ||
| 86 | + border: Border.all(color: Color.fromRGBO(228, 228, 228, 1)), | ||
| 87 | + boxShadow: [ | ||
| 88 | + BoxShadow( | ||
| 89 | + color: Color.fromRGBO(220, 220, 220, 1), //投影颜色 | ||
| 90 | + offset: Offset(2, 3), //x,y轴 | ||
| 91 | + blurRadius: ScreenUtil().setWidth(6) //投影距离 | ||
| 92 | + ) | ||
| 93 | + ]), | ||
| 94 | + child: Row(children: [ | ||
| 95 | + Expanded( | ||
| 96 | + child: TextField( | ||
| 97 | + maxLines: 1, | ||
| 98 | + controller: searchC, | ||
| 99 | + // focusNode: _focusNode, | ||
| 100 | + // autofocus: true, | ||
| 101 | + | ||
| 102 | + style: TextStyle( | ||
| 103 | + color: MyColours.color_333333, | ||
| 104 | + fontSize: ScreenUtil().setSp(26)), | ||
| 105 | + // textAlignVertical: TextAlignVertical.center, | ||
| 106 | + decoration: InputDecoration( | ||
| 107 | + hintText: "输入手机号或姓名", | ||
| 108 | + hintStyle: TextStyle( | ||
| 109 | + color: MyColours.color_999999, | ||
| 110 | + fontSize: ScreenUtil().setSp(26), | ||
| 111 | + ), | ||
| 112 | + // isCollapsed: | ||
| 113 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 114 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 115 | + contentPadding: EdgeInsets.zero, | ||
| 116 | + // 左边图标设置 | ||
| 117 | + icon: Image.asset( | ||
| 118 | + Utils.getImgPath('search'), | ||
| 119 | + width: ScreenUtil().setWidth(30), | ||
| 120 | + ), | ||
| 121 | + //右边图标设置 | ||
| 122 | + // suffixIcon: | ||
| 123 | + ), | ||
| 124 | + keyboardType: TextInputType.text, | ||
| 125 | + textInputAction: TextInputAction.done, | ||
| 126 | + | ||
| 127 | + onChanged: (value) { | ||
| 128 | + // _getContantData(showLoading: false); | ||
| 129 | + }, | ||
| 130 | + onEditingComplete: () { | ||
| 131 | + FocusScope.of(context) | ||
| 132 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 133 | + // _getContantData(showLoading: false); | ||
| 134 | + }, | ||
| 135 | + ), | ||
| 136 | + ), | ||
| 137 | + Offstage( | ||
| 138 | + offstage: searchC.text == '', | ||
| 139 | + child: GestureDetector( | ||
| 140 | + child: Container( | ||
| 141 | + padding: EdgeInsets.symmetric( | ||
| 142 | + horizontal: ScreenUtil().setWidth(40), | ||
| 143 | + vertical: ScreenUtil().setWidth(20), | ||
| 144 | + ), | ||
| 145 | + // color: Colors.orange, | ||
| 146 | + alignment: Alignment.centerRight, | ||
| 147 | + child: Image.asset( | ||
| 148 | + Utils.getImgPath('clear'), | ||
| 149 | + width: ScreenUtil().setWidth(30), | ||
| 150 | + height: ScreenUtil().setWidth(30), | ||
| 151 | + ), | ||
| 152 | + ), | ||
| 153 | + onTap: () { | ||
| 154 | + WidgetsBinding.instance.addPostFrameCallback(((_) { | ||
| 155 | + searchC.clear(); | ||
| 156 | + FocusScope.of(context) | ||
| 157 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 158 | + // _getContantData(showLoading: false); | ||
| 159 | + })); | ||
| 160 | + }, | ||
| 161 | + )), | ||
| 162 | + // Offstage( | ||
| 163 | + // offstage: false, | ||
| 164 | + // child: GestureDetector( | ||
| 165 | + // child: Container( | ||
| 166 | + // padding: EdgeInsets.only( | ||
| 167 | + // right: ScreenUtil().setWidth(30), | ||
| 168 | + // bottom: ScreenUtil().setWidth(20), | ||
| 169 | + // top: ScreenUtil().setWidth(20), | ||
| 170 | + // ), | ||
| 171 | + // child: Text( | ||
| 172 | + // '搜索', | ||
| 173 | + // style: TextStyle( | ||
| 174 | + // color: MyColours.color_199095, | ||
| 175 | + // fontSize: ScreenUtil().setSp(28)), | ||
| 176 | + // ), | ||
| 177 | + // ), | ||
| 178 | + // onTap: () { | ||
| 179 | + // customerProvider.searchData( | ||
| 180 | + // customerProvider.controller.text); | ||
| 181 | + // }, | ||
| 182 | + // )) | ||
| 183 | + ]))); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + Widget _menuWidget() { | ||
| 187 | + return Container( | ||
| 188 | + margin: EdgeInsets.symmetric( | ||
| 189 | + horizontal: ScreenUtil().setWidth(40), | ||
| 190 | + vertical: ScreenUtil().setWidth(20)), | ||
| 191 | + decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [ | ||
| 192 | + BoxShadow( | ||
| 193 | + // color: Colors.red, | ||
| 194 | + color: Color.fromRGBO(220, 220, 220, 1), //投影颜色 | ||
| 195 | + offset: Offset(2, 2), //x,y轴 | ||
| 196 | + blurRadius: ScreenUtil().setWidth(6) //投影距离 | ||
| 197 | + ) | ||
| 198 | + ]), | ||
| 199 | + child: Row( | ||
| 200 | + children: [ | ||
| 201 | + Expanded( | ||
| 202 | + child: Container( | ||
| 203 | + padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)), | ||
| 204 | + margin: | ||
| 205 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)), | ||
| 206 | + child: TabBar( | ||
| 207 | + controller: tabController, | ||
| 208 | + // isScrollable: true, | ||
| 209 | + indicator: CustomTabIndicator( | ||
| 210 | + radius: 0, | ||
| 211 | + ), | ||
| 212 | + indicatorColor: MyColours.color_199095, | ||
| 213 | + indicatorSize: TabBarIndicatorSize.tab, | ||
| 214 | + // indicatorPadding: EdgeInsets.symmetric( | ||
| 215 | + // horizontal: ScreenUtil().setWidth(12)), | ||
| 216 | + labelColor: MyColours.color_199095, | ||
| 217 | + labelStyle: TextStyle( | ||
| 218 | + fontSize: ScreenUtil().setSp(32), | ||
| 219 | + fontWeight: FontWeight.bold), | ||
| 220 | + labelPadding: EdgeInsets.zero, | ||
| 221 | + unselectedLabelStyle: TextStyle( | ||
| 222 | + fontWeight: FontWeight.normal, | ||
| 223 | + fontSize: ScreenUtil().setSp(28), | ||
| 224 | + ), | ||
| 225 | + unselectedLabelColor: MyColours.color_999999, | ||
| 226 | + tabs: _tabBarTitle.map((value) { | ||
| 227 | + return Tab( | ||
| 228 | + child: Text(value), | ||
| 229 | + ); | ||
| 230 | + }).toList()), | ||
| 231 | + )), | ||
| 232 | + ], | ||
| 233 | + )); | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + @override | ||
| 237 | + Widget build(BuildContext context) { | ||
| 238 | + storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true); | ||
| 239 | + return Scaffold( | ||
| 240 | + appBar: SystemAppBar( | ||
| 241 | + '存酒管理', | ||
| 242 | + onTap: () { | ||
| 243 | + EventBus().emit('changeStatusColor'); | ||
| 244 | + Navigator.pop(context); | ||
| 245 | + }, | ||
| 246 | + ), | ||
| 247 | + body: WillPopScope( | ||
| 248 | + onWillPop: () async { | ||
| 249 | + EventBus().emit('changeStatusColor'); | ||
| 250 | + return true; | ||
| 251 | + }, | ||
| 252 | + child: SafeArea( | ||
| 253 | + child: Column(children: [ | ||
| 254 | + _searchWidget(), _menuWidget(), | ||
| 255 | + Expanded( | ||
| 256 | + child: TabBarView(controller: tabController, | ||
| 257 | + // physics: NeverScrollableScrollPhysics(), | ||
| 258 | + children: [ | ||
| 259 | + ListView.builder( | ||
| 260 | + itemCount: 100, | ||
| 261 | + controller: listInStoreC, | ||
| 262 | + itemBuilder: (context, index) { | ||
| 263 | + return WineInStoreItem( | ||
| 264 | + controller: listInStoreC, | ||
| 265 | + ); | ||
| 266 | + }), | ||
| 267 | + ListView.builder( | ||
| 268 | + itemCount: 100, | ||
| 269 | + controller: listInStoreC, | ||
| 270 | + itemBuilder: (context, index) { | ||
| 271 | + return WineOutStoreItem( | ||
| 272 | + controller: listInStoreC, | ||
| 273 | + ); | ||
| 274 | + }) | ||
| 275 | + ])), | ||
| 276 | + | ||
| 277 | + Container( | ||
| 278 | + height: ScreenUtil().setWidth(91 * 2), | ||
| 279 | + width: double.infinity, | ||
| 280 | + padding: EdgeInsets.only( | ||
| 281 | + top: ScreenUtil().setWidth(12 * 2), | ||
| 282 | + bottom: ScreenUtil().setWidth(25 * 2), | ||
| 283 | + left: ScreenUtil().setWidth(45 * 2), | ||
| 284 | + right: ScreenUtil().setWidth(45 * 2), | ||
| 285 | + ), | ||
| 286 | + decoration: BoxDecoration( | ||
| 287 | + color: MyColours.color_ffffff, | ||
| 288 | + boxShadow: [ | ||
| 289 | + BoxShadow( | ||
| 290 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 291 | + color: Color.fromRGBO(0, 0, 0, 0.1), | ||
| 292 | + offset: Offset(0, ScreenUtil().setWidth(-2)), | ||
| 293 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 294 | + ], | ||
| 295 | + borderRadius: BorderRadius.all( | ||
| 296 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 297 | + ), | ||
| 298 | + ), | ||
| 299 | + child: RoundButton( | ||
| 300 | + text: '新建存酒', | ||
| 301 | + height: ScreenUtil().setWidth(80), | ||
| 302 | + radius: ScreenUtil().setWidth(10), | ||
| 303 | + isBold: true, | ||
| 304 | + fontSize: 32, | ||
| 305 | + textColor: MyColours.color_F8F9FD, | ||
| 306 | + onPressed: () async { | ||
| 307 | + // UserModel userModel = | ||
| 308 | + // Provider.of<UserModel>(context, listen: false); | ||
| 309 | + // if (userModel.user.role_name == '管理员' || | ||
| 310 | + // userModel.user.role_name == '店长') { | ||
| 311 | + NavigatorUtil.goCreateStoreWinePage(context); | ||
| 312 | + // } else { | ||
| 313 | + // bool needRefresh = | ||
| 314 | + // await NavigatorUtil.goCouponEditPage(context); | ||
| 315 | + // print(needRefresh); | ||
| 316 | + // if (needRefresh != null && needRefresh) { | ||
| 317 | + // bus.emit('refresh_coupon_list_f'); | ||
| 318 | + // //刷新页面数据 | ||
| 319 | + // // _controller.callRefresh(); | ||
| 320 | + // // _couponNetworkData(tabController.index); | ||
| 321 | + // } | ||
| 322 | + // } | ||
| 323 | + }, | ||
| 324 | + ), | ||
| 325 | + ) | ||
| 326 | + | ||
| 327 | + // _searchWidget(), | ||
| 328 | + // Positioned( | ||
| 329 | + // top: 0, | ||
| 330 | + // left: ScreenUtil().setWidth(40), | ||
| 331 | + // right: ScreenUtil().setWidth(40), | ||
| 332 | + // child: _filterWidget()) | ||
| 333 | + // ], | ||
| 334 | + ])), | ||
| 335 | + ), | ||
| 336 | + ); | ||
| 337 | + } | ||
| 338 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 4 | + | ||
| 5 | +import '../../../res/colors.dart'; | ||
| 6 | +import '../../../utils/screen_util.dart'; | ||
| 7 | +import '../../../widgets/v_empty_view.dart'; | ||
| 8 | + | ||
| 9 | +class WineInStoreItem extends StatefulWidget { | ||
| 10 | + // final VoidCallback onPressed; | ||
| 11 | + | ||
| 12 | + final ScrollController controller; | ||
| 13 | + | ||
| 14 | + // final CouponSunModel couponSonModel; | ||
| 15 | + | ||
| 16 | + WineInStoreItem({Key key, this.controller}) : super(key: key); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + _WineInStoreItemState createState() => _WineInStoreItemState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _WineInStoreItemState extends State<WineInStoreItem> { | ||
| 23 | + @override | ||
| 24 | + Widget build(BuildContext context) { | ||
| 25 | + return InkWell( | ||
| 26 | + onTap: () {}, | ||
| 27 | + child: Container( | ||
| 28 | + // width: ScreenUtil().setWidth(610), | ||
| 29 | + margin: EdgeInsets.fromLTRB( | ||
| 30 | + ScreenUtil().setWidth(40), | ||
| 31 | + ScreenUtil().setWidth(0), | ||
| 32 | + ScreenUtil().setWidth(40), | ||
| 33 | + ScreenUtil().setWidth(32)), | ||
| 34 | + decoration: BoxDecoration( | ||
| 35 | + color: MyColours.color_ffffff, | ||
| 36 | + boxShadow: [ | ||
| 37 | + BoxShadow( | ||
| 38 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 39 | + color: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 40 | + offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 41 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 42 | + ], | ||
| 43 | + borderRadius: BorderRadius.all( | ||
| 44 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 45 | + ), | ||
| 46 | + ), | ||
| 47 | + child: Column( | ||
| 48 | + // mainAxisSize: MainAxisSize.min, | ||
| 49 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 50 | + children: [ | ||
| 51 | + Container( | ||
| 52 | + height: ScreenUtil().setWidth(70), | ||
| 53 | + padding: | ||
| 54 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)), | ||
| 55 | + decoration: BoxDecoration( | ||
| 56 | + color: MyColours.color_438E93, | ||
| 57 | + borderRadius: BorderRadius.only( | ||
| 58 | + topLeft: Radius.circular(ScreenUtil().setWidth(16)), | ||
| 59 | + topRight: Radius.circular(ScreenUtil().setWidth(16)))), | ||
| 60 | + child: Row( | ||
| 61 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 62 | + children: [ | ||
| 63 | + Text( | ||
| 64 | + '欧阳正德先生', | ||
| 65 | + style: TextStyle( | ||
| 66 | + color: MyColours.color_F8F9FD, | ||
| 67 | + fontWeight: FontWeight.bold, | ||
| 68 | + fontSize: ScreenUtil().setSp(36)), | ||
| 69 | + ), | ||
| 70 | + Text('188****6688', | ||
| 71 | + maxLines: 1, | ||
| 72 | + overflow: TextOverflow.ellipsis, | ||
| 73 | + style: TextStyle( | ||
| 74 | + color: MyColours.color_F8F9FD, | ||
| 75 | + fontSize: ScreenUtil().setSp(20))), | ||
| 76 | + ], | ||
| 77 | + ), | ||
| 78 | + ), | ||
| 79 | + Container( | ||
| 80 | + padding: EdgeInsets.fromLTRB( | ||
| 81 | + ScreenUtil().setWidth(20 * 2), | ||
| 82 | + ScreenUtil().setWidth(9 * 2), | ||
| 83 | + ScreenUtil().setWidth(20 * 2), | ||
| 84 | + ScreenUtil().setWidth(4 * 2)), | ||
| 85 | + child: ListView.builder( | ||
| 86 | + itemCount: 5, | ||
| 87 | + shrinkWrap: true, | ||
| 88 | + controller: widget.controller, | ||
| 89 | + itemBuilder: (context, index) { | ||
| 90 | + return Container( | ||
| 91 | + height: ScreenUtil().setWidth(14 * 2), | ||
| 92 | + margin: EdgeInsets.only(bottom: w(5)), | ||
| 93 | + child: Row( | ||
| 94 | + // crossAxisAlignment: CrossAxisAlignment.start, | ||
| 95 | + children: [ | ||
| 96 | + Container( | ||
| 97 | + constraints: BoxConstraints( | ||
| 98 | + maxWidth: ScreenUtil().setWidth(150 * 2)), | ||
| 99 | + // width:, | ||
| 100 | + child: Text( | ||
| 101 | + '兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒', | ||
| 102 | + maxLines: 1, | ||
| 103 | + overflow: TextOverflow.ellipsis, | ||
| 104 | + style: TextStyle( | ||
| 105 | + color: MyColours.color_515151, | ||
| 106 | + fontSize: ScreenUtil().setSp(20), | ||
| 107 | + ), | ||
| 108 | + ), | ||
| 109 | + ), | ||
| 110 | + Spacer(), | ||
| 111 | + Container( | ||
| 112 | + // width: ScreenUtil().setWidth(60 * 2), | ||
| 113 | + child: Text('12瓶', | ||
| 114 | + maxLines: 1, | ||
| 115 | + overflow: TextOverflow.ellipsis, | ||
| 116 | + style: TextStyle( | ||
| 117 | + color: MyColours.color_515151, | ||
| 118 | + fontSize: ScreenUtil().setSp(20), | ||
| 119 | + )), | ||
| 120 | + ), | ||
| 121 | + HEmptyView(40), | ||
| 122 | + Container( | ||
| 123 | + child: Text('存酒号12334567', | ||
| 124 | + style: TextStyle( | ||
| 125 | + color: MyColours.color_515151, | ||
| 126 | + fontSize: ScreenUtil().setSp(20), | ||
| 127 | + )), | ||
| 128 | + ), | ||
| 129 | + ], | ||
| 130 | + )); | ||
| 131 | + })) | ||
| 132 | + ], | ||
| 133 | + ), | ||
| 134 | + )); | ||
| 135 | + } | ||
| 136 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 4 | + | ||
| 5 | +import '../../../res/colors.dart'; | ||
| 6 | +import '../../../utils/screen_util.dart'; | ||
| 7 | +import '../../../widgets/v_empty_view.dart'; | ||
| 8 | + | ||
| 9 | +class WineOutStoreItem extends StatefulWidget { | ||
| 10 | + // final VoidCallback onPressed; | ||
| 11 | + | ||
| 12 | + final ScrollController controller; | ||
| 13 | + | ||
| 14 | + // final CouponSunModel couponSonModel; | ||
| 15 | + | ||
| 16 | + WineOutStoreItem({Key key, this.controller}) : super(key: key); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + _WineOutStoreItemState createState() => _WineOutStoreItemState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _WineOutStoreItemState extends State<WineOutStoreItem> { | ||
| 23 | + @override | ||
| 24 | + Widget build(BuildContext context) { | ||
| 25 | + return InkWell( | ||
| 26 | + onTap: () {}, | ||
| 27 | + child: Container( | ||
| 28 | + // width: ScreenUtil().setWidth(610), | ||
| 29 | + margin: EdgeInsets.fromLTRB( | ||
| 30 | + ScreenUtil().setWidth(40), | ||
| 31 | + ScreenUtil().setWidth(0), | ||
| 32 | + ScreenUtil().setWidth(40), | ||
| 33 | + ScreenUtil().setWidth(32)), | ||
| 34 | + decoration: BoxDecoration( | ||
| 35 | + color: MyColours.color_ffffff, | ||
| 36 | + boxShadow: [ | ||
| 37 | + BoxShadow( | ||
| 38 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 39 | + color: Color.fromRGBO(0, 0, 0, 0.25), | ||
| 40 | + offset: Offset(0, ScreenUtil().setWidth(8)), | ||
| 41 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 42 | + ], | ||
| 43 | + borderRadius: BorderRadius.all( | ||
| 44 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 45 | + ), | ||
| 46 | + ), | ||
| 47 | + child: Column( | ||
| 48 | + // mainAxisSize: MainAxisSize.min, | ||
| 49 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 50 | + children: [ | ||
| 51 | + Container( | ||
| 52 | + height: ScreenUtil().setWidth(70), | ||
| 53 | + padding: | ||
| 54 | + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)), | ||
| 55 | + decoration: BoxDecoration( | ||
| 56 | + color: MyColours.color_999999, | ||
| 57 | + borderRadius: BorderRadius.only( | ||
| 58 | + topLeft: Radius.circular(ScreenUtil().setWidth(16)), | ||
| 59 | + topRight: Radius.circular(ScreenUtil().setWidth(16)))), | ||
| 60 | + child: Row( | ||
| 61 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 62 | + children: [ | ||
| 63 | + Text( | ||
| 64 | + '欧阳正德先生', | ||
| 65 | + style: TextStyle( | ||
| 66 | + color: MyColours.color_F8F9FD, | ||
| 67 | + fontWeight: FontWeight.bold, | ||
| 68 | + fontSize: ScreenUtil().setSp(36)), | ||
| 69 | + ), | ||
| 70 | + Text('188****6688', | ||
| 71 | + maxLines: 1, | ||
| 72 | + overflow: TextOverflow.ellipsis, | ||
| 73 | + style: TextStyle( | ||
| 74 | + color: MyColours.color_F8F9FD, | ||
| 75 | + fontSize: ScreenUtil().setSp(20))), | ||
| 76 | + Text('接待:诸葛孔明', | ||
| 77 | + maxLines: 1, | ||
| 78 | + overflow: TextOverflow.ellipsis, | ||
| 79 | + style: TextStyle( | ||
| 80 | + color: MyColours.color_F8F9FD, | ||
| 81 | + fontSize: ScreenUtil().setSp(20))), | ||
| 82 | + ], | ||
| 83 | + ), | ||
| 84 | + ), | ||
| 85 | + Container( | ||
| 86 | + padding: EdgeInsets.fromLTRB( | ||
| 87 | + ScreenUtil().setWidth(20 * 2), | ||
| 88 | + ScreenUtil().setWidth(9 * 2), | ||
| 89 | + ScreenUtil().setWidth(20 * 2), | ||
| 90 | + ScreenUtil().setWidth(4 * 2)), | ||
| 91 | + child: ListView.builder( | ||
| 92 | + itemCount: 2, | ||
| 93 | + shrinkWrap: true, | ||
| 94 | + controller: widget.controller, | ||
| 95 | + itemBuilder: (context, index) { | ||
| 96 | + return Container( | ||
| 97 | + height: ScreenUtil().setWidth(14 * 2), | ||
| 98 | + margin: EdgeInsets.only(bottom: w(5)), | ||
| 99 | + child: Row( | ||
| 100 | + // crossAxisAlignment: CrossAxisAlignment.start, | ||
| 101 | + children: [ | ||
| 102 | + Container( | ||
| 103 | + constraints: BoxConstraints( | ||
| 104 | + maxWidth: ScreenUtil().setWidth(150 * 2)), | ||
| 105 | + // width:, | ||
| 106 | + child: Text( | ||
| 107 | + '兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒', | ||
| 108 | + maxLines: 1, | ||
| 109 | + overflow: TextOverflow.ellipsis, | ||
| 110 | + style: TextStyle( | ||
| 111 | + color: MyColours.color_515151, | ||
| 112 | + fontSize: ScreenUtil().setSp(20), | ||
| 113 | + ), | ||
| 114 | + ), | ||
| 115 | + ), | ||
| 116 | + Spacer(), | ||
| 117 | + Container( | ||
| 118 | + // width: ScreenUtil().setWidth(60 * 2), | ||
| 119 | + child: Text('2023-02-14 取出', | ||
| 120 | + maxLines: 1, | ||
| 121 | + overflow: TextOverflow.ellipsis, | ||
| 122 | + style: TextStyle( | ||
| 123 | + color: MyColours.color_515151, | ||
| 124 | + fontSize: ScreenUtil().setSp(20), | ||
| 125 | + )), | ||
| 126 | + ), | ||
| 127 | + HEmptyView(40), | ||
| 128 | + Container( | ||
| 129 | + child: Text('222瓶', | ||
| 130 | + style: TextStyle( | ||
| 131 | + color: MyColours.color_515151, | ||
| 132 | + fontSize: ScreenUtil().setSp(20), | ||
| 133 | + )), | ||
| 134 | + ), | ||
| 135 | + ], | ||
| 136 | + )); | ||
| 137 | + })) | ||
| 138 | + ], | ||
| 139 | + ), | ||
| 140 | + )); | ||
| 141 | + } | ||
| 142 | +} |
lib/provider/store_wine_provider.dart
0 → 100644
| @@ -1385,4 +1385,22 @@ class NavigatorUtil { | @@ -1385,4 +1385,22 @@ class NavigatorUtil { | ||
| 1385 | "${Routes.order_customer_detail_page}?detail=${FluroConvertUtils.object2string(detailEntity)}", | 1385 | "${Routes.order_customer_detail_page}?detail=${FluroConvertUtils.object2string(detailEntity)}", |
| 1386 | replace: replace); | 1386 | replace: replace); |
| 1387 | } | 1387 | } |
| 1388 | + | ||
| 1389 | + ///我的------存酒管理首页 | ||
| 1390 | + static Future<dynamic> goStoreWineManageHomePage( | ||
| 1391 | + BuildContext context, { | ||
| 1392 | + replace = false, | ||
| 1393 | + }) { | ||
| 1394 | + return _navigateTo(context, "${Routes.store_wine_manag_home_page}", | ||
| 1395 | + replace: replace); | ||
| 1396 | + } | ||
| 1397 | + | ||
| 1398 | + ///我的------新建存酒 | ||
| 1399 | + static Future<dynamic> goCreateStoreWinePage( | ||
| 1400 | + BuildContext context, { | ||
| 1401 | + replace = false, | ||
| 1402 | + }) { | ||
| 1403 | + return _navigateTo(context, "${Routes.create_store_wine_page}", | ||
| 1404 | + replace: replace); | ||
| 1405 | + } | ||
| 1388 | } | 1406 | } |
| @@ -108,6 +108,7 @@ import 'package:one_key/pages/my/sms_recharge_page.dart'; | @@ -108,6 +108,7 @@ import 'package:one_key/pages/my/sms_recharge_page.dart'; | ||
| 108 | import 'package:one_key/pages/my/store_base_info_page.dart'; | 108 | import 'package:one_key/pages/my/store_base_info_page.dart'; |
| 109 | import 'package:one_key/pages/my/store_base_info_page_old.dart'; | 109 | import 'package:one_key/pages/my/store_base_info_page_old.dart'; |
| 110 | import 'package:one_key/pages/my/store_type_fill_manage_page.dart'; | 110 | import 'package:one_key/pages/my/store_type_fill_manage_page.dart'; |
| 111 | +import 'package:one_key/pages/my/store_wine_manage/create_store_wine_page.dart'; | ||
| 111 | import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart'; | 112 | import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart'; |
| 112 | import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart'; | 113 | import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart'; |
| 113 | import 'package:one_key/pages/notebook/statistics_page.dart'; | 114 | import 'package:one_key/pages/notebook/statistics_page.dart'; |
| @@ -183,6 +184,7 @@ import '../pages/my/plan_dish/plan_dish_create_select_type_page.dart'; | @@ -183,6 +184,7 @@ import '../pages/my/plan_dish/plan_dish_create_select_type_page.dart'; | ||
| 183 | import '../pages/my/plan_dish/plan_dish_eidt_page.dart'; | 184 | import '../pages/my/plan_dish/plan_dish_eidt_page.dart'; |
| 184 | import '../pages/my/plan_dish/plan_new_dish_first_page.dart'; | 185 | import '../pages/my/plan_dish/plan_new_dish_first_page.dart'; |
| 185 | import '../pages/my/plan_dish/plan_new_dish_page.dart'; | 186 | import '../pages/my/plan_dish/plan_new_dish_page.dart'; |
| 187 | +import '../pages/my/store_wine_manage/store_wine_manage_home_page.dart'; | ||
| 186 | import '../pages/my/table_manage/merge_table_select_page.dart'; | 188 | import '../pages/my/table_manage/merge_table_select_page.dart'; |
| 187 | import '../pages/order_advance/customer_detail_page.dart'; | 189 | import '../pages/order_advance/customer_detail_page.dart'; |
| 188 | import '../pages/order_advance/order_advance_home_page.dart'; | 190 | import '../pages/order_advance/order_advance_home_page.dart'; |
| @@ -191,6 +193,7 @@ import '../pages/order_advance/order_edit_list_show_page.dart'; | @@ -191,6 +193,7 @@ import '../pages/order_advance/order_edit_list_show_page.dart'; | ||
| 191 | import '../pages/order_advance/order_preview_page.dart'; | 193 | import '../pages/order_advance/order_preview_page.dart'; |
| 192 | import '../provider/feast_model.dart'; | 194 | import '../provider/feast_model.dart'; |
| 193 | import '../provider/plan_dish_provider.dart'; | 195 | import '../provider/plan_dish_provider.dart'; |
| 196 | +import '../provider/store_wine_provider.dart'; | ||
| 194 | 197 | ||
| 195 | // 登录页 | 198 | // 登录页 |
| 196 | var loginHandler = new Handler( | 199 | var loginHandler = new Handler( |
| @@ -2154,7 +2157,7 @@ var orderEditListShowPageHandle = new Handler( | @@ -2154,7 +2157,7 @@ var orderEditListShowPageHandle = new Handler( | ||
| 2154 | data: res, | 2157 | data: res, |
| 2155 | storeList: storeList, | 2158 | storeList: storeList, |
| 2156 | mineList: mineList, | 2159 | mineList: mineList, |
| 2157 | - oftenList:oftenList, | 2160 | + oftenList: oftenList, |
| 2158 | planPrice: planPrice, | 2161 | planPrice: planPrice, |
| 2159 | planCookByRidSunModel: planCookByRidSunModel, | 2162 | planCookByRidSunModel: planCookByRidSunModel, |
| 2160 | detailEntity: detailEntity, | 2163 | detailEntity: detailEntity, |
| @@ -2280,3 +2283,21 @@ var orderCustomerDetailPageHandle = new Handler( | @@ -2280,3 +2283,21 @@ var orderCustomerDetailPageHandle = new Handler( | ||
| 2280 | create: (_) => CustomerProvider(), | 2283 | create: (_) => CustomerProvider(), |
| 2281 | child: OrderCustomerDetailPage(detailEntity: detailEntity)); | 2284 | child: OrderCustomerDetailPage(detailEntity: detailEntity)); |
| 2282 | }); | 2285 | }); |
| 2286 | + | ||
| 2287 | +///我的----存酒管理 | ||
| 2288 | +var storeWineManageHomePageHandle = new Handler( | ||
| 2289 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 2290 | + // String idstr = params["idstr"].first; | ||
| 2291 | + | ||
| 2292 | + return ChangeNotifierProvider<StoreWineProvider>( | ||
| 2293 | + create: (_) => StoreWineProvider(), child: StoreWineManageHomePage()); | ||
| 2294 | +}); | ||
| 2295 | +///我的----新建存酒 | ||
| 2296 | +var createStoreWinePageHandle = new Handler( | ||
| 2297 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 2298 | + // String idstr = params["idstr"].first; | ||
| 2299 | + | ||
| 2300 | + return ChangeNotifierProvider<StoreWineProvider>( | ||
| 2301 | + create: (_) => StoreWineProvider(), child: CreateStoreWinePage()); | ||
| 2302 | +}); | ||
| 2303 | + |
| @@ -186,7 +186,12 @@ class Routes { | @@ -186,7 +186,12 @@ class Routes { | ||
| 186 | static String order_customer_detail_page = | 186 | static String order_customer_detail_page = |
| 187 | "/order_customer_detail_page"; //经理排菜---客情 | 187 | "/order_customer_detail_page"; //经理排菜---客情 |
| 188 | 188 | ||
| 189 | - | 189 | + /** |
| 190 | + * 存酒管理 | ||
| 191 | + */ | ||
| 192 | + static String store_wine_manag_home_page = | ||
| 193 | + "/store_wine_manag_home_page"; //我的---存酒管理首页 | ||
| 194 | + static String create_store_wine_page = "/create_store_wine_page"; //新建存酒 | ||
| 190 | 195 | ||
| 191 | static void configureRoutes(FluroRouter router) { | 196 | static void configureRoutes(FluroRouter router) { |
| 192 | router.notFoundHandler = new Handler( | 197 | router.notFoundHandler = new Handler( |
| @@ -368,5 +373,10 @@ class Routes { | @@ -368,5 +373,10 @@ class Routes { | ||
| 368 | 373 | ||
| 369 | router.define(order_customer_detail_page, | 374 | router.define(order_customer_detail_page, |
| 370 | handler: orderCustomerDetailPageHandle); | 375 | handler: orderCustomerDetailPageHandle); |
| 376 | + | ||
| 377 | + router.define(store_wine_manag_home_page, | ||
| 378 | + handler: storeWineManageHomePageHandle); | ||
| 379 | + | ||
| 380 | + router.define(create_store_wine_page, handler: createStoreWinePageHandle); | ||
| 371 | } | 381 | } |
| 372 | } | 382 | } |
-
Please register or login to post a comment