Commit 8fbb8d70e737ceefd59ed422a28310f5c2d895de

Authored by wdn127929
1 parent c8f4d1b8

2/2.1

... ... @@ -12,14 +12,14 @@ if (flutterRoot == null) {
}
def flutterVersionCode = "422"
def flutterVersionCode = "430"
if (flutterVersionCode == null) {
flutterVersionCode = '422'
flutterVersionCode = '430'
}
def flutterVersionName = "4.2.2"
def flutterVersionName = "4.3.0"
if (flutterVersionName == null) {
flutterVersionName = '4.2.2'
flutterVersionName = '4.3.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
... ...
... ... @@ -22,7 +22,7 @@
<application
android:label="周到安排商家"
android:label="一键订"
tools:replace="android:label"
android:icon="@mipmap/ic_launcher">
<activity
... ...
... ... @@ -47,6 +47,7 @@ import 'package:one_key/models/table.dart' as t;
import '../../app.dart';
import '../../utils/screen_util.dart';
import '../../widgets/special_text/my_extended_text_selection_controls.dart';
class NotebookDetailPage extends StatefulWidget {
... ... @@ -110,8 +111,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
WidgetsBinding.instance.addPostFrameCallback((_) async {
_myExtendedMaterialTextSelectionControls =
MyTextSelectionControls(callback: (value) {
detailModel.phoneController.value = TextEditingValue(
detailModel.phoneController.value = TextEditingValue(
text: value,
selection: TextSelection.fromPosition(TextPosition(
affinity: TextAffinity.downstream,
... ... @@ -2609,6 +2609,50 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
? SizedBox()
: Row(
children: [
detailEntity.order.cookbooklist
.length ==
0
? Expanded(
flex: 1,
child: InkWell(
onTap: () {
NavigatorUtil
.goOrderAdvanceHomePage(
context,
);
},
child: Container(
margin: EdgeInsets.only(
right: ScreenUtil()
.setWidth(20)),
decoration: BoxDecoration(
color: MyColours
.color_ffffff,
border: Border.all(
width: w(1),
color: MyColours
.color_438E93),
borderRadius:
BorderRadius.circular(
ScreenUtil()
.setWidth(
10)),
),
child: Align(
alignment:
Alignment.center,
child: Text('预点菜',
style: TextStyle(
color: MyColours
.color_438E93,
fontSize:
ScreenUtil()
.setSp(
34))),
),
),
))
: SizedBox(),
Expanded(
flex: 2,
child: InkWell(
... ...
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../res/colors.dart';
import '../../../utils/screen_util.dart';
import '../../../widgets/round_button.dart';
/**
* 订座详情---预点菜入口
*/
class OrderAdvanceHomePage extends StatefulWidget {
OrderAdvanceHomePage({Key key}) : super(key: key);
@override
_OrderAdvanceHomePageState createState() => _OrderAdvanceHomePageState();
}
class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
TextEditingController noFoodController = TextEditingController();
TextEditingController likeController = TextEditingController();
TextEditingController serviceController = TextEditingController();
@override
void initState() {
super.initState();
}
Widget _selectItem(String title, bool select, String hintText,
TextEditingController controller) {
return Row(
children: [
HEmptyView(86),
Image.asset(
Utils.getImgPath(
select ? 'plan_dish_select' : 'plan_dish_unselect'),
width: w(20)),
HEmptyView(10),
Text(
title,
style: TextStyle(fontSize: font(16), color: MyColours.color_515151),
),
HEmptyView(20),
select
? Expanded(
child: TextField(
maxLines: 1,
controller: controller,
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_438E93, fontSize: font(14)),
textAlign: TextAlign.right,
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_438E93,
fontSize: font(14),
),
isCollapsed: true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(borderSide: BorderSide.none),
contentPadding: EdgeInsets.zero,
),
keyboardType: TextInputType.numberWithOptions(),
textInputAction: TextInputAction.done,
onChanged: (value) {
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
))
: SizedBox(),
select
? Text(
'元',
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151),
)
: SizedBox(),
],
);
}
///忌口和喜好
Widget _textMulLine(
String title, String hintText, TextEditingController controller) {
return Container(
// height: ScreenUtil().setWidth(380),
child: Row(
children: [
Text(
title,
textAlign: TextAlign.left,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28)),
),
HEmptyView(54),
Expanded(
child: TextField(
controller: controller,
// keyboardType: TextInputType.number, //键盘类型,数字键盘
maxLines: 2,
// maxLength: 50,
// maxLengthEnforced: true,
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: title == '喜好'
? MyColours.color_438E93
: title == '忌口'
? MyColours.color_E34D59
: MyColours.color_333333), //输入文本的样式
decoration: InputDecoration(
contentPadding:
EdgeInsets.symmetric(horizontal: w(11), vertical: w(8)),
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(28),
),
// fillColor: MyColours.color_F9F9F9,
// fillColor: Colors.red,
// filled: true,
enabledBorder: OutlineInputBorder(
//未选中时候的颜色
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
borderSide: BorderSide(
color: MyColours.color_cccccc,
width: ScreenUtil().setWidth(2)),
),
focusedBorder: OutlineInputBorder(
//选中时外边框颜色
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
borderSide: BorderSide(
color: MyColours.app_main,
),
),
// border: OutlineInputBorder(
// borderRadius:
// BorderRadius.circular(ScreenUtil().setWidth(20)),
// borderSide: BorderSide(
// color: Colors.red, width: ScreenUtil().setWidth(2))),
),
onChanged: (value) {},
)),
],
),
);
}
/// 查看排菜单,分享排菜单按钮
Widget _cancelAndChangeBtn(GestureTapCallback onTap, String title,
{Color bgColor = MyColours.color_ffffff,
double width,
Color fontColor = MyColours.color_199095}) {
return InkWell(
onTap: onTap,
child: Container(
width: width,
decoration: BoxDecoration(
color: bgColor,
border: Border.all(
color: Colors.transparent, width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
),
child: Align(
alignment: Alignment.center,
child: Text(title,
style: TextStyle(
color: fontColor,
fontSize: title == '查看排菜单'
? ScreenUtil().setSp(32)
: ScreenUtil().setSp(36))),
),
),
);
}
@override
Widget build(BuildContext context) {
return KeyboardDismissOnTap(
// dismissOnCapturedTaps: true,
child: Scaffold(
appBar: SystemAppBar('预点菜'),
backgroundColor: MyColours.color_ffffff,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
// controller: controller,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: w(20)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: w(48),
child: Row(
children: [
Text(
'就餐时段',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
),
Spacer(),
Text(
'2022-11-08 午餐',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_99515151),
),
],
),
),
MyDivider(
double.infinity,
w(1),
color: MyColours.color_DBDBDB,
),
Container(
height: w(48),
child: Row(
children: [
Text(
'就餐人数',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
),
Spacer(),
Image.asset(
Utils.getImgPath('plan_dish_minus'),
width: w(16),
),
Container(
width: w(50),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
// controller:
// focusNode: _focusNode,
// autofocus: true,
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(16)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "人数",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(16),
),
// 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();
},
)),
Image.asset(
Utils.getImgPath('plan_dish_add'),
width: w(16),
),
],
),
),
VEmptyView(24),
Text(
'用餐标准',
style: TextStyle(
fontSize: font(16), color: MyColours.color_515151),
),
VEmptyView(48),
_selectItem('预计人均', false, '点击这里输入预计人均金额', null),
VEmptyView(30),
_selectItem('预计总价', true, '点击这里输入预计总金额', null),
VEmptyView(46),
MyDivider(
double.infinity,
w(1),
color: MyColours.color_DBDBDB,
),
Container(
padding: EdgeInsets.symmetric(vertical: w(10)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'客户偏好参考',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
),
Image.asset(
Utils.getImgPath('merge_arrow'),
width: w(20),
)
],
),
),
VEmptyView(32),
_textMulLine('喜好', '点这里输入客户喜好的东西,请用逗号隔开。', likeController),
VEmptyView(20),
_textMulLine('忌口', '点这里输入客户忌口的东西,请用逗号隔开。', noFoodController),
VEmptyView(20),
_textMulLine('服务', '点这里输入客户需要的服务,如安静的包间、远离厕所等,请用逗号隔开。', serviceController),
],
),
),
),
),
Column(children: [
Container(
// width: double.infinity,
height: ScreenUtil().setWidth(84),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20),
horizontal: ScreenUtil().setHeight(40)),
child: Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
// NavigatorUtil
// .goOrderAdvanceHomePage(
// context,
// );
},
child: Container(
margin:
EdgeInsets.only(right: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
border: Border.all(
width: w(1), color: MyColours.color_438E93),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('客户自己点',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(32))),
),
),
)),
Expanded(
flex: 2,
child: InkWell(
onTap: () {
// NavigatorUtil
// .goInvicationPage(
// context,
// detailEntity.id,
// );
},
child: Container(
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
child: Align(
alignment: Alignment.center,
child: Text('经理排菜',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(36))),
),
),
)),
],
),
),
Container(
width: double.infinity,
height: ScreenUtil().setWidth(84),
margin:
EdgeInsets.symmetric(horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color:
true ? MyColours.color_999999 : MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
),
// child: Text('fff'),
child: Material(
color: Colors.transparent,
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {}, '查看排菜单',
fontColor: true
? MyColours.color_999999
: MyColours.color_199095)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: true
? MyColours.color_999999
: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
// if (userModel.user.role_name != '管理员' &&
// userModel.user.role_name != '店长' &&
// widget.uid != "null" &&
// widget.uid !=
// userModel.user.openid) {
// } else {
// _showCancelWidget(context);
// }
}, '分享排菜单',
fontColor: true
? MyColours.color_999999
: MyColours.color_199095)),
],
)),
),
VEmptyView(ScreenUtil().setWidth(60))
])
],
),
));
}
}
... ...
import 'package:flutter/material.dart';
class MyColours {
static const Color color_99515151 = Color(0x99515151);
static const Color color_F7C797 = Color(0xffF7C797);
static const Color color_FEF3E6 = Color(0xffFEF3E6);
static const Color color_66000000 = Color(0x66000000);
... ...
... ... @@ -1205,4 +1205,23 @@ class NavigatorUtil {
return _navigateTo(context, "${Routes.final_plan_dish_page}",
replace: replace);
}
///经理排菜-首页
static Future<dynamic> goOrderAdvanceHomePage(
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_advance_home_page}",
replace: replace);
}
}
... ...
... ... @@ -179,6 +179,7 @@ import '../pages/my/plan_dish/my_plan_dish_home_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/table_manage/merge_table_select_page.dart';
import '../pages/order_advance/order_advance_home_page.dart';
import '../provider/feast_model.dart';
import '../provider/plan_dish_provider.dart';
... ... @@ -1911,3 +1912,24 @@ var finalPlanDishPageHandle = new Handler(
return ChangeNotifierProvider<PlanDishProvider>(
create: (_) => PlanDishProvider(), child: FinalPlanDishPage());
});
///经理排菜---首页
var orderAdvanceHomePageHandle = 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: OrderAdvanceHomePage());
});
... ...
... ... @@ -161,15 +161,19 @@ class Routes {
static String merge_table_select_page =
"/merge_table_select_page"; //桌位管理---合并桌位选择桌位页面
/**
* 排菜
* 排菜管理
*/
static String my_plan_dish_home_page = "/my_plan_dish_home_page"; //我的-我的排菜
static String plan_new_dish_first_page =
"/plan_new_dish_first_page"; //我的-我的排菜-创建新排菜前置条件录入
static String plan_new_dish_page = "/plan_new_dish_page"; //排菜菜单点菜
static String final_plan_dish_page = "/final_plan_dish_page"; //排菜单
static String final_plan_dish_page = "/final_plan_dish_page"; //排菜单
/**
* 经理排菜
*/
static String order_advance_home_page = "/order_advance_home_page"; //经理预点菜首页
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -334,7 +338,8 @@ static String final_plan_dish_page = "/final_plan_dish_page"; //排菜单
router.define(plan_new_dish_first_page,
handler: planNewDishFirstPageHandle);
router.define(plan_new_dish_page, handler: planNewDishPageHandle);
router.define(final_plan_dish_page, handler: finalPlanDishPageHandle);
router.define(final_plan_dish_page, handler: finalPlanDishPageHandle);
router.define(order_advance_home_page, handler: orderAdvanceHomePageHandle);
}
}
... ...