Commit 3d95a5a40805385cc84eed67368730ff76aa45d7

Authored by wdn127929
1 parent 7391be56

ui

... ... @@ -47,261 +47,290 @@ class _FinalPlanDishPageState extends State<FinalPlanDishPage> {
backgroundColor: MyColours.color_ffffff,
body: Column(
children: [
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.symmetric(horizontal: w(10)),
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: w(1), color: MyColours.color_DBDBDB),
bottom: BorderSide(
width: w(1), color: MyColours.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16),
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入排菜名称",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(16),
fontWeight: FontWeight.bold),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
Expanded(
child: ListView.builder(
itemCount: 20,
shrinkWrap: true,
child: SingleChildScrollView(
controller: controller,
itemBuilder: (context, index) {
return ListView.builder(
itemCount: 2 + 1,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
if (index == 0) {
return Column(
children: [
//头
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding:
EdgeInsets.symmetric(horizontal: w(10)),
child: Column(
children: [
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.symmetric(horizontal: w(10)),
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB),
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16),
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入排菜名称",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(16),
fontWeight: FontWeight.bold),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
ListView.builder(
itemCount: 20,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
return ListView.builder(
itemCount: 2 + 1,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
if (index == 0) {
return Column(
children: [
//头
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.symmetric(
horizontal: w(10)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours
.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text(
'热菜',
style: TextStyle(
fontSize: font(16),
color: MyColours
.color_515151,
fontWeight:
FontWeight.bold),
),
Text(
'6道',
style: TextStyle(
fontSize: font(14),
color:
MyColours.color_515151,
),
),
],
))
],
);
}
int indexReal = index - 1;
return Container(
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(13)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color:
MyColours.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
constraints:
BoxConstraints(maxWidth: w(80)),
child: Text(
'山城辣子鸡',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(14),
color:
MyColours.color_515151),
)),
HEmptyView(8),
_laduWidget(),
Spacer(),
Text(
'热菜',
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151,
fontWeight: FontWeight.bold),
fontSize: font(12),
color: MyColours.color_999999),
),
HEmptyView(28),
Text(
'6道',
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151,
),
fontSize: font(10),
color: MyColours.color_8EBBBE),
),
],
))
],
);
}
int indexReal = index - 1;
return Container(
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(13)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
child: Row(
children: [
Container(
constraints:
BoxConstraints(maxWidth: w(80)),
child: Text(
'山城辣子鸡',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151),
)),
HEmptyView(8),
_laduWidget(),
Spacer(),
Text(
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(12),
color: MyColours.color_999999),
),
HEmptyView(28),
Text(
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(10),
color: MyColours.color_8EBBBE),
),
HEmptyView(20),
Image.asset(
Utils.getImgPath('plan_dish_minus'),
width: w(16),
),
HEmptyView(8),
Container(
width: w(32),
height: w(16),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(r(5)),
border: Border.all(
width: w(1),
color: MyColours.color_999999)),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
HEmptyView(20),
Image.asset(
Utils.getImgPath('plan_dish_minus'),
width: w(16),
),
HEmptyView(8),
Container(
width: w(32),
height: w(16),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(r(5)),
border: Border.all(
width: w(1),
color: MyColours
.color_999999)),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(12)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "数量",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(12)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "数量",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide:
BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType:
TextInputType.number,
textInputAction:
TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
HEmptyView(8),
Image.asset(
Utils.getImgPath('plan_dish_add'),
width: w(16),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
],
),
);
});
}),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(15), vertical: w(7)),
margin: EdgeInsets.only(
top: w(7),
bottom: w(13),
left: w(20),
right: w(20)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border: Border.all(
width: w(1), color: MyColours.color_515151)),
child: TextField(
maxLines: 4,
// controller:
// focusNode: _focusNode,
// autofocus: true,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context).requestFocus(
FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
HEmptyView(8),
Image.asset(
Utils.getImgPath('plan_dish_add'),
width: w(16),
),
],
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入整单备注",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
);
});
})),
Container(
padding: EdgeInsets.symmetric(horizontal: w(15), vertical: w(7)),
margin: EdgeInsets.only(
top: w(7), bottom: w(13), left: w(20), right: w(20)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border: Border.all(width: w(1), color: MyColours.color_515151)),
child: TextField(
maxLines: 4,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style:
TextStyle(color: MyColours.color_515151, fontSize: font(12)),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入整单备注",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border:
OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
],
))),
Container(
decoration: BoxDecoration(
border: Border(
... ...
... ... @@ -144,7 +144,7 @@ class _PlanNewDishPageState extends State<PlanNewDishPage> {
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar('经理排菜'),
body: Consumer<PlanDishProvider>(builder: (context, model, child) {
if (model.pageState == PageState.Success) {
if (model.pageStateMy == PageState.Success) {
return Column(
children: [
MyDivider(
... ...
... ... @@ -355,6 +355,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
color: MyColours
.color_999999),
),
HEmptyView(48),
Text(
'${menuSunModel.member_price}元/${menuSunModel.unit}',
style: TextStyle(
... ... @@ -611,7 +612,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
borderColor: MyColours.color_438E93,
textColor: MyColours.color_438E93,
onPressed: () {
// NavigatorUtil.goFinalPlanDishPage(context);
NavigatorUtil.goOrderEditListShowPage(context);
},
),
RoundButton(
... ... @@ -626,7 +627,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
textColor: MyColours.color_438E93,
isBold: false,
onPressed: () {
// NavigatorUtil.goFinalPlanDishPage(context);
NavigatorUtil.goOrderPreviewPage(context);
},
),
RoundButton(
... ... @@ -639,6 +640,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
fontSize: 36,
isBold: false,
onPressed: () {
Navigator.pop(context);
// NavigatorUtil.goFinalPlanDishPage(context);
},
)
... ...
... ... @@ -434,7 +434,9 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {}, '查看排菜单',
child: _cancelAndChangeBtn(() {
NavigatorUtil.goOrderEditListShowPage(context);
}, '查看排菜单',
fontColor: true
? MyColours.color_999999
: MyColours.color_199095)),
... ... @@ -455,6 +457,7 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
// } else {
// _showCancelWidget(context);
// }
NavigatorUtil.goOrderPreviewPage(context);
}, '分享排菜单',
fontColor: true
? MyColours.color_999999
... ...
import 'package:flutter/material.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../utils/utils.dart';
import '../../../widgets/MyDivider.dart';
import '../../../widgets/h_empty_view.dart';
import '../../../widgets/round_button.dart';
import '../../../widgets/v_empty_view.dart';
import '../../route/navigator_util.dart';
class OrderEditListShowPage extends StatefulWidget {
OrderEditListShowPage({Key key}) : super(key: key);
@override
_OrderEditListShowPageState createState() => _OrderEditListShowPageState();
}
class _OrderEditListShowPageState extends State<OrderEditListShowPage> {
ScrollController controller = ScrollController();
Widget _laduWidget() {
// if (labelIcon[widget
// .cookBookList.labelList[index].icon] is int) {
// int ladu = labelIcon[
// widget.cookBookList.labelList[index].icon];
int ladu = 6;
List<Widget> widgetList = [];
for (var i = 0; i < ladu; i++) {
widgetList.add(Image.asset(
Utils.getImgPath('ladu'),
width: w(10),
));
}
// widgetList.add(HEmptyView(10));
return Row(
children: widgetList,
);
// }else{
// return SizedBox();
// }
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: SystemAppBar('排菜单'),
backgroundColor: MyColours.color_ffffff,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
controller: controller,
child: Column(
children: [
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.symmetric(horizontal: w(10)),
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB),
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
children: [
Expanded(
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16),
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入排菜名称",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(16),
fontWeight: FontWeight.bold),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
Text(
'1份',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151,
),
),
],
)),
ListView.builder(
itemCount: 20,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
return ListView.builder(
itemCount: 2 + 1,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
if (index == 0) {
return Column(
children: [
//头
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.symmetric(
horizontal: w(10)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours
.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text(
'热菜',
style: TextStyle(
fontSize: font(16),
color: MyColours
.color_515151,
fontWeight:
FontWeight.bold),
),
Text(
'6道',
style: TextStyle(
fontSize: font(14),
color:
MyColours.color_515151,
),
),
],
))
],
);
}
int indexReal = index - 1;
return Container(
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(13)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color:
MyColours.color_DBDBDB))),
child: Row(
children: [
Container(
constraints:
BoxConstraints(maxWidth: w(80)),
child: Text(
'山城辣子鸡',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(14),
color:
MyColours.color_515151),
)),
HEmptyView(8),
_laduWidget(),
Spacer(),
Text(
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(12),
color: MyColours.color_999999),
),
HEmptyView(28),
Text(
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(10),
color: MyColours.color_8EBBBE),
),
HEmptyView(20),
Image.asset(
Utils.getImgPath('plan_dish_minus'),
width: w(16),
),
HEmptyView(8),
Container(
width: w(32),
height: w(16),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(r(5)),
border: Border.all(
width: w(1),
color: MyColours
.color_999999)),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(12)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "数量",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide:
BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType:
TextInputType.number,
textInputAction:
TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
HEmptyView(8),
Image.asset(
Utils.getImgPath('plan_dish_add'),
width: w(16),
),
],
),
);
});
}),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(15), vertical: w(7)),
margin: EdgeInsets.only(
top: w(7),
bottom: w(13),
left: w(20),
right: w(20)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border: Border.all(
width: w(1), color: MyColours.color_515151)),
child: TextField(
maxLines: 4,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入整单备注",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border:
OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
],
))),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: w(1), color: MyColours.color_DBDBDB))),
padding: EdgeInsets.symmetric(horizontal: w(20), vertical: w(15)),
child: Row(
children: [
Stack(
clipBehavior: Clip.none,
children: [
Image.asset(
Utils.getImgPath('plan_dish_car'),
width: w(35),
),
Positioned(
top: w(-3),
right: w(-4),
child: Container(
// width: w(16),
constraints: BoxConstraints(minWidth: w(16)),
height: w(16),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(8)),
color: MyColours.color_E34D59),
child: Text(
'23',
style: TextStyle(
fontSize: font(10),
color: MyColours.color_F6F6F6),
),
))
],
),
HEmptyView(66),
Expanded(
child: Column(
children: [
Row(
children: [
Text(
'总计:',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
Text(
'0.00',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_000000),
),
Text(
'元',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
],
),
VEmptyView(20),
Row(
children: [
Text(
'会员价:',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
Text(
'0.00',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_000000),
),
Text(
'元',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
],
)
],
)),
HEmptyView(10),
Text(
'排菜价:',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
),
Container(
width: w(65),
height: w(30),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border: Border.all(
color: MyColours.color_515151, width: w(1))),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_000000, fontSize: font(12)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "0.00",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
Text(
'元',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
),
],
),
),
Container(
color: MyColours.color_FAFAFA,
padding: EdgeInsets.only(
top: w(12), bottom: w(25), left: w(23), right: w(23)),
child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RoundButton(
text: '生成预览',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
textColor: MyColours.color_438E93,
width: w(100),
height: w(43),
radius: r(5),
fontSize: 32,
isBold: false,
onPressed: () {
NavigatorUtil.goOrderPreviewPage(context);
},
),
HEmptyView(30),
Expanded(
child: RoundButton(
text: '保存',
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
height: w(43),
radius: r(5),
fontSize: 36,
isBold: false,
onPressed: () {
Navigator.pop(context);
// NavigatorUtil.goOrderEditListShowPage(context);
},
),
)
],
))
],
),
);
}
}
... ...
import 'package:flutter/material.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../utils/utils.dart';
import '../../../widgets/MyDivider.dart';
import '../../../widgets/h_empty_view.dart';
import '../../../widgets/round_button.dart';
import '../../../widgets/v_empty_view.dart';
/**
* 生成的预览页
*/
class OrderPreviewPage extends StatefulWidget {
OrderPreviewPage({Key key}) : super(key: key);
@override
_OrderPreviewPageState createState() => _OrderPreviewPageState();
}
class _OrderPreviewPageState extends State<OrderPreviewPage> {
ScrollController controller = ScrollController();
@override
void initState() {
super.initState();
Utils.changeStatusColor(color: Colors.transparent);
}
Widget _laduWidget() {
// if (labelIcon[widget
// .cookBookList.labelList[index].icon] is int) {
// int ladu = labelIcon[
// widget.cookBookList.labelList[index].icon];
int ladu = 6;
List<Widget> widgetList = [];
for (var i = 0; i < ladu; i++) {
widgetList.add(Image.asset(
Utils.getImgPath('ladu'),
width: w(10),
));
}
// widgetList.add(HEmptyView(10));
return Row(
children: widgetList,
);
// }else{
// return SizedBox();
// }
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: MyColours.color_ffffff,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
controller: controller,
child: Column(children: [
Container(
width: double.infinity,
margin: EdgeInsets.zero,
padding: EdgeInsets.only(
left: w(20), right: w(20), top: w(30), bottom: w(15)),
// height: w(200),
// constraints: new BoxConstraints.expand(
// height: w(200),
// ),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(Utils.getImgPath('preview_bg')),
fit: BoxFit.cover
// centerSlice: new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),
)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'14号酒庄 贵宾排菜菜单',
style: TextStyle(
fontSize: font(20),
fontWeight: FontWeight.bold,
color: MyColours.color_CFB53B),
),
VEmptyView(26),
Text(
'预定贵宾 | 刘生先生',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_303030),
),
VEmptyView(10),
Text(
'预定时间 | 2022年11月11日 晚餐',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_303030),
),
VEmptyView(10),
Text(
'区域桌台 | 一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_303030),
),
VEmptyView(10),
Text(
'餐厅地址 | 唐山市路北区拥军道88号',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_303030),
),
VEmptyView(10),
Text(
'专属服务 | 张山山 18866668888',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_303030),
),
],
),
),
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.only(left: w(10), right: w(20)),
decoration: BoxDecoration(
border: Border(
// top: BorderSide(
// width: w(1), color: MyColours.color_DBDBDB),
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
children: [
Expanded(
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16),
fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
// hintText: "请输入排菜名称",
hintText: '朋友小聚888套餐(若无名称不展示本行)',
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(16),
fontWeight: FontWeight.bold),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
Text(
'1份',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151),
),
],
)),
ListView.builder(
itemCount: 20,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
return ListView.builder(
itemCount: 2 + 1,
shrinkWrap: true,
controller: controller,
itemBuilder: (context, index) {
if (index == 0) {
return Column(
children: [
//头
Container(
width: double.infinity,
// width: w(32),
height: w(48),
padding: EdgeInsets.only(
left: w(10), right: w(20)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours
.color_DBDBDB))),
// constraints: BoxConstraints(minWidth: w(20)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'热菜',
style: TextStyle(
fontSize: font(16),
color:
MyColours.color_515151,
fontWeight:
FontWeight.bold),
),
Text(
'6道',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151,
),
),
],
))
],
);
}
int indexReal = index - 1;
return Container(
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(13)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
child: Row(
children: [
Container(
constraints:
BoxConstraints(maxWidth: w(80)),
child: Text(
'山城辣子鸡',
maxLines: 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151),
)),
HEmptyView(8),
_laduWidget(),
Spacer(),
Text(
'38元/份',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
HEmptyView(108),
// Text(
// '38元/份',
// maxLines: 2,
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// fontSize: font(10),
// color: MyColours.color_8EBBBE),
// ),
Text(
'1份',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
),
],
),
);
});
}),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(15), vertical: w(7)),
margin: EdgeInsets.only(
top: w(7), bottom: w(13), left: w(20), right: w(20)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border: Border.all(
width: w(1), color: MyColours.color_DBDBDB)),
child: TextField(
maxLines: 4,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_515151, fontSize: font(12)),
textAlign: TextAlign.left,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入整单备注",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(12),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border:
OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
),
),
]))),
Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
width: w(1), color: MyColours.color_DBDBDB))),
padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(15)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
'总计',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
),
Text(
'菜单价:1164元',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
),
Text(
'会员价:1125元',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
),
Text(
'排菜价:1100元',
style: TextStyle(
fontSize: font(12), color: MyColours.color_515151),
)
])),
Text(
'周到安排技术支持 400-000-9690',
style: TextStyle(fontSize: font(12), color: MyColours.color_999999),
),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
top: w(12), bottom: w(25), left: w(23), right: w(23)),
child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RoundButton(
text: '返回',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
textColor: MyColours.color_438E93,
width: w(100),
height: w(43),
radius: r(5),
fontSize: 32,
isBold: false,
onPressed: () {
Navigator.pop(context);
// NavigatorUtil.goOrderPreviewPage(context);
},
),
HEmptyView(30),
Expanded(
child: RoundButton(
text: '分享排菜单',
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
height: w(43),
radius: r(5),
fontSize: 36,
isBold: false,
onPressed: () {
// NavigatorUtil.goOrderPreviewPage(context);
},
),
)
],
))
],
),
);
}
}
... ...
... ... @@ -14,6 +14,7 @@ import '../net/http_url.dart';
*/
class PlanDishProvider extends ChangeNotifier {
PageState pageState = PageState.Loading;
PageState pageStateMy = PageState.Success;
List<MenuModel> menuModel; //菜品数据
// List<CookbookCategorySunModel> categorySunModel; //菜品分类数据
// List<CookbookSpecSunModel> specSunModel; //计价单位
... ...
import 'package:flutter/material.dart';
class MyColours {
static const Color color_303030 = Color(0xff303030);
static const Color color_CFB53B = Color(0xffCFB53B);
static const Color color_99515151 = Color(0x99515151);
static const Color color_F7C797 = Color(0xffF7C797);
static const Color color_FEF3E6 = Color(0xffFEF3E6);
... ...
... ... @@ -1243,4 +1243,42 @@ class NavigatorUtil {
return _navigateTo(context, "${Routes.order_advance_edit_page}",
replace: replace);
}
///经理排菜-预览
static Future<dynamic> goOrderPreviewPage(
BuildContext context, {
replace = false,
}) {
// if (invoice != null) {
// return _navigateTo(context,
// "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}",
// replace: replace);
// }
// if (object != null) {
// return _navigateTo(context,
// "${Routes.order_advance_home_page}?tids=$tids&tableidNow=$tableidNow&fromPage=$fromPage&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");
// }
return _navigateTo(context, "${Routes.order_preview_page}",
replace: replace);
}
///经理排菜-编辑列表展示
static Future<dynamic> goOrderEditListShowPage(
BuildContext context, {
replace = false,
}) {
// if (invoice != null) {
// return _navigateTo(context,
// "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}",
// replace: replace);
// }
// if (object != null) {
// return _navigateTo(context,
// "${Routes.order_advance_home_page}?tids=$tids&tableidNow=$tableidNow&fromPage=$fromPage&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}");
// }
return _navigateTo(context, "${Routes.order_edit_list_show_page}",
replace: replace);
}
}
... ...
... ... @@ -181,6 +181,8 @@ import '../pages/my/plan_dish/plan_new_dish_first_page.dart';
import '../pages/my/plan_dish/plan_new_dish_page.dart';
import '../pages/my/table_manage/merge_table_select_page.dart';
import '../pages/order_advance/order_advance_home_page.dart';
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';
... ... @@ -1955,3 +1957,45 @@ var orderAdvanceEidtPageHandle = new Handler(
return ChangeNotifierProvider<PlanDishProvider>(
create: (_) => PlanDishProvider(), child: OrderAdvanceEidtPage());
});
///经理排菜---预览页
var orderPreviewPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String fromPage = params["fromPage"].first;
// String tids = params["tids"].first;
// String tableidNow = params["tableidNow"].first;
// bool canChoose = params["canChoose"].first == "true" ? true : false;
// List<TableList> res = [];
// if (params.keys.contains('object')) {
// Map object = FluroConvertUtils.string2map(params["object"].first);
// List temp = object['object'];
// for (var item in temp) {
// res.add(TableList.fromJson(item));
// }
// }
return ChangeNotifierProvider<PlanDishProvider>(
create: (_) => PlanDishProvider(), child: OrderPreviewPage());
});
///经理排菜---排菜编辑列表展示
var orderEditListShowPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String fromPage = params["fromPage"].first;
// String tids = params["tids"].first;
// String tableidNow = params["tableidNow"].first;
// bool canChoose = params["canChoose"].first == "true" ? true : false;
// List<TableList> res = [];
// if (params.keys.contains('object')) {
// Map object = FluroConvertUtils.string2map(params["object"].first);
// List temp = object['object'];
// for (var item in temp) {
// res.add(TableList.fromJson(item));
// }
// }
return ChangeNotifierProvider<PlanDishProvider>(
create: (_) => PlanDishProvider(), child: OrderEditListShowPage());
});
... ...
... ... @@ -174,8 +174,10 @@ class Routes {
* 经理排菜
*/
static String order_advance_home_page = "/order_advance_home_page"; //经理预点菜首页
static String order_advance_edit_page = "/order_advance_edit_page"; //经理预点菜编辑
static String order_advance_edit_page = "/order_advance_edit_page"; //经理预点菜编辑
static String order_preview_page = "/order_preview_page"; //预览页
static String order_edit_list_show_page =
"/order_edit_list_show_page"; //经理排菜编辑列表展示
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -341,10 +343,11 @@ class Routes {
handler: planNewDishFirstPageHandle);
router.define(plan_new_dish_page, handler: planNewDishPageHandle);
router.define(final_plan_dish_page, handler: finalPlanDishPageHandle);
router.define(order_advance_home_page, handler: orderAdvanceHomePageHandle);
router.define(order_advance_home_page, handler: orderAdvanceHomePageHandle);
router.define(order_advance_edit_page, handler: orderAdvanceEidtPageHandle);
router.define(order_advance_edit_page, handler: orderAdvanceEidtPageHandle);
router.define(order_preview_page, handler: orderPreviewPageHandle);
router.define(order_edit_list_show_page,
handler: orderEditListShowPageHandle);
}
}
... ...