Commit 7af8dd92188e31c19b2df767c9156271e831731d

Authored by wdn127929
1 parent e8f9609c

存酒列表+新建存酒(电话+姓名)UI

... ... @@ -665,7 +665,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
child: _item(
Utils.getImgPath('cdgl'), '套餐排菜')),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
onTap: () {
NavigatorUtil.goStoreWineManageHomePage(
context);
},
child: _item(
Utils.getImgPath('cdgl'), '客户存酒')),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../../provider/store_wine_provider.dart';
import '../../../res/colors.dart';
import '../../../utils/dialog_util.dart';
import '../../../utils/screen_util.dart';
import '../../../utils/utils.dart';
import '../../../widgets/h_empty_view.dart';
import '../../../widgets/round_button.dart';
import '../../../widgets/system_app_bar.dart';
/**
* 新建存酒
*/
class CreateStoreWinePage extends StatefulWidget {
CreateStoreWinePage({Key key}) : super(key: key);
@override
_CreateStoreWinePageState createState() => _CreateStoreWinePageState();
}
class _CreateStoreWinePageState extends State<CreateStoreWinePage> {
StoreWineProvider storeWineProvider;
int sexSelectIndex = 0;
String sexStr = '先生';
List sexList = [];
@override
void initState() {
// TODO: implement initState
super.initState();
sexList = ['先生', '女士', '公司'];
}
@override
Widget build(BuildContext context) {
storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true);
return Scaffold(
appBar: SystemAppBar(
'新建存酒',
onTap: () {
Navigator.pop(context);
},
),
body: Container(
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
color: Colors.white,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(16 * 2)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
VEmptyView(32),
Container(
height: ScreenUtil().setWidth(48 * 2),
padding: EdgeInsets.only(
right: ScreenUtil().setWidth(16 * 2)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'联系电话',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Expanded(
child: Container(
height:
ScreenUtil().setWidth(16 * 2),
alignment: Alignment.centerRight,
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_515151),
// controller: _baseIndoProvider.phoneController,
// focusNode: _phoneNode,
textAlign: TextAlign.right,
textAlignVertical:
TextAlignVertical.center,
// textAlignVertical:
// TextAlignVertical.center,
decoration: InputDecoration(
hintText: "点击输入客人电话",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize:
ScreenUtil().setSp(32),
),
contentPadding: EdgeInsets.zero,
// contentPadding:
// EdgeInsets.symmetric(
// vertical: w(12)),
border: OutlineInputBorder(
borderSide:
BorderSide.none),
),
onChanged: (value) {
print(value);
// if (value.trim().isEmpty || value.trim().length > 11) {
// //内容为空,或 超过11位
// setState(() {
// _baseIndoProvider.userHistorys.clear();
// });
// return;
// }
// Map<String, String> params = {
// "keywords": value.trim(),
// "sid": Provider.of<UserModel>(context, listen: false)
// .user
// .sellerid,
// };
// _baseIndoProvider.getUserHistorys(context, params);
},
onEditingComplete: () {
// _phoneNode.unfocus();
},
onTap: () {
// setState(() {
// showPhoneHistory = true;
// });
// Future.delayed(Duration(milliseconds: 300), () {
// _controller.jumpTo(_controller.position.maxScrollExtent);
// });
},
keyboardType:
TextInputType.number,
))),
// InkWell(
// onTap: () {
// // _openAddressBook();
// },
// child: Container(
// width: ScreenUtil().setWidth(74) * 2,
// height: ScreenUtil().setWidth(48),
// alignment: Alignment.centerRight,
// child: Text('一键录入',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setSp(28),
// )),
// ),
// ),
],
)),
MyDivider(
double.infinity,
h(0.5),
color: MyColours.color_E7E7E7,
),
Container(
height: ScreenUtil().setWidth(48 * 2),
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(16 * 2),
right: ScreenUtil().setWidth(16 * 2)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'客人姓名',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Expanded(
child: Container(
height:
ScreenUtil().setWidth(16 * 2),
alignment: Alignment.centerRight,
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize:
ScreenUtil().setSp(32),
color:
MyColours.color_515151),
// controller: _baseIndoProvider.phoneController,
// focusNode: _phoneNode,
textAlign: TextAlign.right,
textAlignVertical:
TextAlignVertical.center,
// textAlignVertical:
// TextAlignVertical.center,
decoration: InputDecoration(
hintText: "点击输入",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize:
ScreenUtil().setSp(32),
),
contentPadding: EdgeInsets.zero,
// contentPadding:
// EdgeInsets.symmetric(
// vertical: w(12)),
border: OutlineInputBorder(
borderSide:
BorderSide.none),
),
onChanged: (value) {
print(value);
// if (value.trim().isEmpty || value.trim().length > 11) {
// //内容为空,或 超过11位
// setState(() {
// _baseIndoProvider.userHistorys.clear();
// });
// return;
// }
// Map<String, String> params = {
// "keywords": value.trim(),
// "sid": Provider.of<UserModel>(context, listen: false)
// .user
// .sellerid,
// };
// _baseIndoProvider.getUserHistorys(context, params);
},
onEditingComplete: () {
// _phoneNode.unfocus();
},
onTap: () {
// setState(() {
// showPhoneHistory = true;
// });
// Future.delayed(Duration(milliseconds: 300), () {
// _controller.jumpTo(_controller.position.maxScrollExtent);
// });
},
keyboardType:
TextInputType.number,
))),
HEmptyView(10),
InkWell(
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //隐藏键盘
DialogUtil.showSelectCusmanDialog(
context, sexList, (value) async {
if (value != null) {
sexSelectIndex = value.first;
sexStr = sexList[sexSelectIndex];
setState(() {});
}
}, selecteds: [sexSelectIndex]).then(
(value) {});
},
child: Row(children: [
Text(
sexStr,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32),
),
),
Image.asset(
Utils.getImgPath('quan_down_f'),
width: ScreenUtil().setWidth(28),
height: ScreenUtil().setWidth(28)),
]),
),
HEmptyView(40),
Container(
width: w(100),
alignment: Alignment.centerRight,
child: Text(
// '会员状态未知',
'会员',
style: TextStyle(
color: true
? MyColours.color_999999
: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32),
),
),
),
],
)),
],
))
],
),
)),
Container(
height: ScreenUtil().setWidth(91 * 2),
width: double.infinity,
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(16 * 2),
bottom: ScreenUtil().setWidth(35 * 2),
left: ScreenUtil().setWidth(45 * 2),
right: ScreenUtil().setWidth(45 * 2),
),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.1),
offset: Offset(0, ScreenUtil().setWidth(-2)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: RoundButton(
text: '保存',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(10),
isBold: true,
fontSize: 32,
onPressed: () async {
// UserModel userModel =
// Provider.of<UserModel>(context, listen: false);
// if (userModel.user.role_name == '管理员' ||
// userModel.user.role_name == '店长') {
// NavigatorUtil.goCouponCreateSelectTypePage(context);
// } else {
// bool needRefresh =
// await NavigatorUtil.goCouponEditPage(context);
// print(needRefresh);
// if (needRefresh != null && needRefresh) {
// bus.emit('refresh_coupon_list_f');
// //刷新页面数据
// // _controller.callRefresh();
// // _couponNetworkData(tabController.index);
// }
// }
},
),
)
],
),
));
}
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/pages/my/store_wine_manage/wine_in_store_item.dart';
import 'package:one_key/pages/my/store_wine_manage/wine_out_store_item.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:provider/provider.dart';
import '../../../provider/store_wine_provider.dart';
import '../../../res/colors.dart';
import '../../../route/navigator_util.dart';
import '../../../utils/event_bus.dart';
import '../../../utils/utils.dart';
import '../../../widgets/custom_tab_indicator.dart';
import '../../../widgets/round_button.dart';
/**
*
* 存酒首页
*/
class StoreWineManageHomePage extends StatefulWidget {
StoreWineManageHomePage({Key key}) : super(key: key);
@override
_StoreWineManageHomePageState createState() =>
_StoreWineManageHomePageState();
}
class _StoreWineManageHomePageState extends State<StoreWineManageHomePage>
with TickerProviderStateMixin {
StoreWineProvider storeWineProvider;
TextEditingController searchC = TextEditingController(); //搜索框控制器
List _tabBarTitle;
TabController tabController;
int index = 0;
ScrollController listInStoreC = ScrollController();
@override
void initState() {
_tabBarTitle = ['全部在店', '取酒记录'];
super.initState();
tabController = TabController(length: 2, vsync: this);
tabController.index = 0;
tabController.addListener(() {
if (tabController.index == tabController.animation.value) {
if (index == tabController.index) {
return;
}
print(tabController.index);
index = tabController.index;
// _getContantData(first: true);
}
});
WidgetsBinding.instance.addPostFrameCallback((_) async {
index = tabController.index;
// _getContantData(first: first);
});
// bus.on("refresh_guest_list_my", (arg) {
// _getContantData();
// });
}
/// 搜索框
Widget _searchWidget() {
return Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
),
height: ScreenUtil().setWidth(45 * 2),
// alignment: Alignment.center,
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(20 * 2),
),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(24 * 2)),
border: Border.all(color: Color.fromRGBO(228, 228, 228, 1)),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
offset: Offset(2, 3), //x,y轴
blurRadius: ScreenUtil().setWidth(6) //投影距离
)
]),
child: Row(children: [
Expanded(
child: TextField(
maxLines: 1,
controller: searchC,
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "输入手机号或姓名",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(26),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
// 左边图标设置
icon: Image.asset(
Utils.getImgPath('search'),
width: ScreenUtil().setWidth(30),
),
//右边图标设置
// suffixIcon:
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// _getContantData(showLoading: false);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// _getContantData(showLoading: false);
},
),
),
Offstage(
offstage: searchC.text == '',
child: GestureDetector(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20),
),
// color: Colors.orange,
alignment: Alignment.centerRight,
child: Image.asset(
Utils.getImgPath('clear'),
width: ScreenUtil().setWidth(30),
height: ScreenUtil().setWidth(30),
),
),
onTap: () {
WidgetsBinding.instance.addPostFrameCallback(((_) {
searchC.clear();
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// _getContantData(showLoading: false);
}));
},
)),
// Offstage(
// offstage: false,
// child: GestureDetector(
// child: Container(
// padding: EdgeInsets.only(
// right: ScreenUtil().setWidth(30),
// bottom: ScreenUtil().setWidth(20),
// top: ScreenUtil().setWidth(20),
// ),
// child: Text(
// '搜索',
// style: TextStyle(
// color: MyColours.color_199095,
// fontSize: ScreenUtil().setSp(28)),
// ),
// ),
// onTap: () {
// customerProvider.searchData(
// customerProvider.controller.text);
// },
// ))
])));
}
Widget _menuWidget() {
return Container(
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [
BoxShadow(
// color: Colors.red,
color: Color.fromRGBO(220, 220, 220, 1), //投影颜色
offset: Offset(2, 2), //x,y轴
blurRadius: ScreenUtil().setWidth(6) //投影距离
)
]),
child: Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
margin:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
child: TabBar(
controller: tabController,
// isScrollable: true,
indicator: CustomTabIndicator(
radius: 0,
),
indicatorColor: MyColours.color_199095,
indicatorSize: TabBarIndicatorSize.tab,
// indicatorPadding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(12)),
labelColor: MyColours.color_199095,
labelStyle: TextStyle(
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.bold),
labelPadding: EdgeInsets.zero,
unselectedLabelStyle: TextStyle(
fontWeight: FontWeight.normal,
fontSize: ScreenUtil().setSp(28),
),
unselectedLabelColor: MyColours.color_999999,
tabs: _tabBarTitle.map((value) {
return Tab(
child: Text(value),
);
}).toList()),
)),
],
));
}
@override
Widget build(BuildContext context) {
storeWineProvider = Provider.of<StoreWineProvider>(context, listen: true);
return Scaffold(
appBar: SystemAppBar(
'存酒管理',
onTap: () {
EventBus().emit('changeStatusColor');
Navigator.pop(context);
},
),
body: WillPopScope(
onWillPop: () async {
EventBus().emit('changeStatusColor');
return true;
},
child: SafeArea(
child: Column(children: [
_searchWidget(), _menuWidget(),
Expanded(
child: TabBarView(controller: tabController,
// physics: NeverScrollableScrollPhysics(),
children: [
ListView.builder(
itemCount: 100,
controller: listInStoreC,
itemBuilder: (context, index) {
return WineInStoreItem(
controller: listInStoreC,
);
}),
ListView.builder(
itemCount: 100,
controller: listInStoreC,
itemBuilder: (context, index) {
return WineOutStoreItem(
controller: listInStoreC,
);
})
])),
Container(
height: ScreenUtil().setWidth(91 * 2),
width: double.infinity,
padding: EdgeInsets.only(
top: ScreenUtil().setWidth(12 * 2),
bottom: ScreenUtil().setWidth(25 * 2),
left: ScreenUtil().setWidth(45 * 2),
right: ScreenUtil().setWidth(45 * 2),
),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.1),
offset: Offset(0, ScreenUtil().setWidth(-2)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: RoundButton(
text: '新建存酒',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(10),
isBold: true,
fontSize: 32,
textColor: MyColours.color_F8F9FD,
onPressed: () async {
// UserModel userModel =
// Provider.of<UserModel>(context, listen: false);
// if (userModel.user.role_name == '管理员' ||
// userModel.user.role_name == '店长') {
NavigatorUtil.goCreateStoreWinePage(context);
// } else {
// bool needRefresh =
// await NavigatorUtil.goCouponEditPage(context);
// print(needRefresh);
// if (needRefresh != null && needRefresh) {
// bus.emit('refresh_coupon_list_f');
// //刷新页面数据
// // _controller.callRefresh();
// // _couponNetworkData(tabController.index);
// }
// }
},
),
)
// _searchWidget(),
// Positioned(
// top: 0,
// left: ScreenUtil().setWidth(40),
// right: ScreenUtil().setWidth(40),
// child: _filterWidget())
// ],
])),
),
);
}
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../widgets/v_empty_view.dart';
class WineInStoreItem extends StatefulWidget {
// final VoidCallback onPressed;
final ScrollController controller;
// final CouponSunModel couponSonModel;
WineInStoreItem({Key key, this.controller}) : super(key: key);
@override
_WineInStoreItemState createState() => _WineInStoreItemState();
}
class _WineInStoreItemState extends State<WineInStoreItem> {
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {},
child: Container(
// width: ScreenUtil().setWidth(610),
margin: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(32)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.25),
offset: Offset(0, ScreenUtil().setWidth(8)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: Column(
// mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: ScreenUtil().setWidth(70),
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(ScreenUtil().setWidth(16)),
topRight: Radius.circular(ScreenUtil().setWidth(16)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'欧阳正德先生',
style: TextStyle(
color: MyColours.color_F8F9FD,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(36)),
),
Text('188****6688',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_F8F9FD,
fontSize: ScreenUtil().setSp(20))),
],
),
),
Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(20 * 2),
ScreenUtil().setWidth(9 * 2),
ScreenUtil().setWidth(20 * 2),
ScreenUtil().setWidth(4 * 2)),
child: ListView.builder(
itemCount: 5,
shrinkWrap: true,
controller: widget.controller,
itemBuilder: (context, index) {
return Container(
height: ScreenUtil().setWidth(14 * 2),
margin: EdgeInsets.only(bottom: w(5)),
child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: BoxConstraints(
maxWidth: ScreenUtil().setWidth(150 * 2)),
// width:,
child: Text(
'兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
),
Spacer(),
Container(
// width: ScreenUtil().setWidth(60 * 2),
child: Text('12瓶',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
)),
),
HEmptyView(40),
Container(
child: Text('存酒号12334567',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
)),
),
],
));
}))
],
),
));
}
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../widgets/v_empty_view.dart';
class WineOutStoreItem extends StatefulWidget {
// final VoidCallback onPressed;
final ScrollController controller;
// final CouponSunModel couponSonModel;
WineOutStoreItem({Key key, this.controller}) : super(key: key);
@override
_WineOutStoreItemState createState() => _WineOutStoreItemState();
}
class _WineOutStoreItemState extends State<WineOutStoreItem> {
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {},
child: Container(
// width: ScreenUtil().setWidth(610),
margin: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(32)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.25),
offset: Offset(0, ScreenUtil().setWidth(8)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: Column(
// mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: ScreenUtil().setWidth(70),
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(30)),
decoration: BoxDecoration(
color: MyColours.color_999999,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(ScreenUtil().setWidth(16)),
topRight: Radius.circular(ScreenUtil().setWidth(16)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'欧阳正德先生',
style: TextStyle(
color: MyColours.color_F8F9FD,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(36)),
),
Text('188****6688',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_F8F9FD,
fontSize: ScreenUtil().setSp(20))),
Text('接待:诸葛孔明',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_F8F9FD,
fontSize: ScreenUtil().setSp(20))),
],
),
),
Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(20 * 2),
ScreenUtil().setWidth(9 * 2),
ScreenUtil().setWidth(20 * 2),
ScreenUtil().setWidth(4 * 2)),
child: ListView.builder(
itemCount: 2,
shrinkWrap: true,
controller: widget.controller,
itemBuilder: (context, index) {
return Container(
height: ScreenUtil().setWidth(14 * 2),
margin: EdgeInsets.only(bottom: w(5)),
child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: BoxConstraints(
maxWidth: ScreenUtil().setWidth(150 * 2)),
// width:,
child: Text(
'兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒兰帕德精酿啤酒',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
),
Spacer(),
Container(
// width: ScreenUtil().setWidth(60 * 2),
child: Text('2023-02-14 取出',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
)),
),
HEmptyView(40),
Container(
child: Text('222瓶',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
)),
),
],
));
}))
],
),
));
}
}
... ...
import 'package:flutter/material.dart';
/**
* 餐厅详情
*/
class StoreWineProvider with ChangeNotifier {
}
... ...
... ... @@ -1385,4 +1385,22 @@ class NavigatorUtil {
"${Routes.order_customer_detail_page}?detail=${FluroConvertUtils.object2string(detailEntity)}",
replace: replace);
}
///我的------存酒管理首页
static Future<dynamic> goStoreWineManageHomePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.store_wine_manag_home_page}",
replace: replace);
}
///我的------新建存酒
static Future<dynamic> goCreateStoreWinePage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.create_store_wine_page}",
replace: replace);
}
}
... ...
... ... @@ -108,6 +108,7 @@ import 'package:one_key/pages/my/sms_recharge_page.dart';
import 'package:one_key/pages/my/store_base_info_page.dart';
import 'package:one_key/pages/my/store_base_info_page_old.dart';
import 'package:one_key/pages/my/store_type_fill_manage_page.dart';
import 'package:one_key/pages/my/store_wine_manage/create_store_wine_page.dart';
import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart';
import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart';
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';
import '../pages/my/plan_dish/plan_dish_eidt_page.dart';
import '../pages/my/plan_dish/plan_new_dish_first_page.dart';
import '../pages/my/plan_dish/plan_new_dish_page.dart';
import '../pages/my/store_wine_manage/store_wine_manage_home_page.dart';
import '../pages/my/table_manage/merge_table_select_page.dart';
import '../pages/order_advance/customer_detail_page.dart';
import '../pages/order_advance/order_advance_home_page.dart';
... ... @@ -191,6 +193,7 @@ import '../pages/order_advance/order_edit_list_show_page.dart';
import '../pages/order_advance/order_preview_page.dart';
import '../provider/feast_model.dart';
import '../provider/plan_dish_provider.dart';
import '../provider/store_wine_provider.dart';
// 登录页
var loginHandler = new Handler(
... ... @@ -2154,7 +2157,7 @@ var orderEditListShowPageHandle = new Handler(
data: res,
storeList: storeList,
mineList: mineList,
oftenList:oftenList,
oftenList: oftenList,
planPrice: planPrice,
planCookByRidSunModel: planCookByRidSunModel,
detailEntity: detailEntity,
... ... @@ -2280,3 +2283,21 @@ var orderCustomerDetailPageHandle = new Handler(
create: (_) => CustomerProvider(),
child: OrderCustomerDetailPage(detailEntity: detailEntity));
});
///我的----存酒管理
var storeWineManageHomePageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
return ChangeNotifierProvider<StoreWineProvider>(
create: (_) => StoreWineProvider(), child: StoreWineManageHomePage());
});
///我的----新建存酒
var createStoreWinePageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
return ChangeNotifierProvider<StoreWineProvider>(
create: (_) => StoreWineProvider(), child: CreateStoreWinePage());
});
... ...
... ... @@ -186,7 +186,12 @@ class Routes {
static String order_customer_detail_page =
"/order_customer_detail_page"; //经理排菜---客情
/**
* 存酒管理
*/
static String store_wine_manag_home_page =
"/store_wine_manag_home_page"; //我的---存酒管理首页
static String create_store_wine_page = "/create_store_wine_page"; //新建存酒
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -368,5 +373,10 @@ class Routes {
router.define(order_customer_detail_page,
handler: orderCustomerDetailPageHandle);
router.define(store_wine_manag_home_page,
handler: storeWineManageHomePageHandle);
router.define(create_store_wine_page, handler: createStoreWinePageHandle);
}
}
... ...