Commit a897a84da54668134577bf3bd67dd889c61c8275

Authored by wdn127929
1 parent 708a63b4

调菜OK

@@ -2,6 +2,7 @@ import 'package:dotted_border/dotted_border.dart'; @@ -2,6 +2,7 @@ import 'package:dotted_border/dotted_border.dart';
2 import 'package:flutter/gestures.dart'; 2 import 'package:flutter/gestures.dart';
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
  5 +import 'package:one_key/route/navigator_util.dart';
5 import 'package:one_key/widgets/MyDivider.dart'; 6 import 'package:one_key/widgets/MyDivider.dart';
6 import 'package:one_key/widgets/round_button.dart'; 7 import 'package:one_key/widgets/round_button.dart';
7 import 'package:one_key/widgets/v_empty_view.dart'; 8 import 'package:one_key/widgets/v_empty_view.dart';
@@ -933,23 +934,28 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -933,23 +934,28 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
933 fontSize: font(16)), 934 fontSize: font(16)),
934 )), 935 )),
935 InkWell( 936 InkWell(
  937 + onTap: () {
  938 + NavigatorUtil
  939 + .goFeastMenuPage(
  940 + context);
  941 + },
936 child: Row( 942 child: Row(
937 - children: [  
938 - Image.asset(  
939 - Utils.getImgPath(  
940 - 'f_tiaocai'),  
941 - width: w(20),  
942 - ),  
943 - HEmptyView(8),  
944 - Text(  
945 - '调菜',  
946 - style: TextStyle(  
947 - color: MyColours  
948 - .color_515151,  
949 - fontSize: font(14)),  
950 - ),  
951 - ],  
952 - )), 943 + children: [
  944 + Image.asset(
  945 + Utils.getImgPath(
  946 + 'f_tiaocai'),
  947 + width: w(20),
  948 + ),
  949 + HEmptyView(8),
  950 + Text(
  951 + '调菜',
  952 + style: TextStyle(
  953 + color: MyColours
  954 + .color_515151,
  955 + fontSize: font(14)),
  956 + ),
  957 + ],
  958 + )),
953 HEmptyView(32), 959 HEmptyView(32),
954 InkWell( 960 InkWell(
955 child: Image.asset( 961 child: Image.asset(
@@ -1188,6 +1194,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -1188,6 +1194,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
1188 isBold: false, 1194 isBold: false,
1189 gradientStart: MyColours.color_438E93, 1195 gradientStart: MyColours.color_438E93,
1190 gradientEnd: MyColours.color_438E93, 1196 gradientEnd: MyColours.color_438E93,
  1197 + onPressed: () {
  1198 + NavigatorUtil.goFeastDepositPage(context);
  1199 + },
1191 ), 1200 ),
1192 ], 1201 ],
1193 )), 1202 )),
@@ -1326,7 +1335,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -1326,7 +1335,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
1326 '担保人', 1335 '担保人',
1327 style: TextStyle( 1336 style: TextStyle(
1328 fontSize: ScreenUtil().setSp(28), 1337 fontSize: ScreenUtil().setSp(28),
1329 - color: MyColours.color_333333), 1338 + color: MyColours.color_515151),
1330 ), 1339 ),
1331 ), 1340 ),
1332 HEmptyView(60), 1341 HEmptyView(60),
@@ -1365,7 +1374,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -1365,7 +1374,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
1365 ], 1374 ],
1366 ), 1375 ),
1367 ), 1376 ),
1368 - remark(customCdb, customFdb,hintText: '担保说明'), 1377 + remark(customCdb, customFdb, hintText: '担保说明'),
1369 Padding( 1378 Padding(
1370 padding: EdgeInsets.fromLTRB( 1379 padding: EdgeInsets.fromLTRB(
1371 ScreenUtil().setWidth(32), 1380 ScreenUtil().setWidth(32),
  1 +import 'package:common_utils/common_utils.dart';
  2 +import 'package:flutter/gestures.dart';
  3 +import 'package:flutter/material.dart';
  4 +import 'package:flutter_picker/Picker.dart';
  5 +import 'package:flutter_screenutil/flutter_screenutil.dart';
  6 +import 'package:one_key/widgets/v_empty_view.dart';
  7 +
  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/system_app_bar.dart';
  14 +
  15 +class FeastDepositPage extends StatefulWidget {
  16 + FeastDepositPage({Key key}) : super(key: key);
  17 +
  18 + @override
  19 + _FeastDepositPageState createState() => _FeastDepositPageState();
  20 +}
  21 +
  22 +class _FeastDepositPageState extends State<FeastDepositPage> {
  23 + String money = '请输入'; //金额
  24 + String paymentP = '请输入'; //付款人
  25 + String collectionP = '请选择'; //收款人
  26 + String paymentTime = '请选择'; //付款时间
  27 + String paymentType = '请选择'; //支付方式
  28 + String depositType = '请选择'; //定金类型
  29 + String receiptNumber = '请输入'; //收据编号
  30 +
  31 + TextEditingController moneyC = TextEditingController();
  32 + FocusNode moneyF = FocusNode();
  33 + TextEditingController paymentC = TextEditingController();
  34 + FocusNode paymentF = FocusNode();
  35 + TextEditingController receiptNumberC = TextEditingController();
  36 + FocusNode receiptNumberF = FocusNode();
  37 + bool showDateSelWidget = false;
  38 + final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
  39 +
  40 + @override
  41 + void initState() {
  42 + // TODO: implement initState
  43 + super.initState();
  44 +
  45 + Utils.changeStatusColor(color: MyColours.color_438E93);
  46 +
  47 + moneyF.addListener(() {
  48 + if (moneyF.hasFocus) {
  49 + //有焦点
  50 + if (showDateSelWidget) {
  51 + Navigator.pop(context);
  52 + showDateSelWidget = false;
  53 + }
  54 + } else {
  55 + //失去焦点
  56 + // _editingController.text = '';
  57 + }
  58 + });
  59 + paymentF.addListener(() {
  60 + if (moneyF.hasFocus) {
  61 + //有焦点
  62 + if (showDateSelWidget) {
  63 + Navigator.pop(context);
  64 + showDateSelWidget = false;
  65 + }
  66 + } else {
  67 + //失去焦点
  68 + // _editingController.text = '';
  69 + }
  70 + });
  71 + receiptNumberF.addListener(() {
  72 + if (moneyF.hasFocus) {
  73 + //有焦点
  74 + if (showDateSelWidget) {
  75 + Navigator.pop(context);
  76 + showDateSelWidget = false;
  77 + }
  78 + } else {
  79 + //失去焦点
  80 + // _editingController.text = '';
  81 + }
  82 + });
  83 +
  84 + WidgetsBinding.instance.addPostFrameCallback((_) {});
  85 + }
  86 +
  87 + ///请输入
  88 + ///输入框
  89 + Widget _textfield(
  90 + String title,
  91 + String hintText,
  92 + TextEditingController editingController,
  93 + FocusNode focusNode,
  94 + String subTitle,
  95 + {TextInputType inputType = TextInputType.number}) {
  96 + return Container(
  97 + child: Row(
  98 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  99 + children: [
  100 + Container(
  101 + // color: Colors.red,
  102 + width: ScreenUtil().setWidth(160),
  103 + height: ScreenUtil().setWidth(35),
  104 + child: Text(
  105 + title,
  106 + style: TextStyle(
  107 + fontSize: ScreenUtil().setSp(28),
  108 + color: MyColours.color_515151),
  109 + ),
  110 + ),
  111 + HEmptyView(60),
  112 + Expanded(
  113 + child: Container(
  114 + decoration: BoxDecoration(
  115 + border: Border(
  116 + bottom: BorderSide(
  117 + width: h(1), color: MyColours.color_DBDBDB))),
  118 + child: Row(
  119 + children: [
  120 + Expanded(
  121 + child: Container(
  122 + // height: ScreenUtil().setHeight(120),
  123 + height: ScreenUtil().setWidth(64),
  124 + child: TextField(
  125 + controller: editingController,
  126 + // textAlign: TextAlign.right,
  127 + // textAlignVertical: TextAlignVertical.bottom,
  128 + maxLines: 1,
  129 + inputFormatters: [],
  130 +
  131 + // //光标颜色
  132 + // cursorColor:
  133 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  134 + //输入文本的样式
  135 + style: TextStyle(
  136 + fontSize: ScreenUtil().setSp(32),
  137 + ),
  138 + focusNode: focusNode,
  139 + decoration: InputDecoration(
  140 + border:
  141 + OutlineInputBorder(borderSide: BorderSide.none),
  142 + hintText: hintText,
  143 + hintStyle: TextStyle(
  144 + color: hintText == '请输入'
  145 + ? MyColours.color_999999
  146 + : MyColours.color_515151,
  147 + fontSize: ScreenUtil().setSp(28),
  148 + ),
  149 + contentPadding: EdgeInsets.zero,
  150 + ),
  151 + onChanged: (value) {},
  152 + onEditingComplete: () {
  153 + FocusScope.of(context)
  154 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  155 + },
  156 + keyboardType: inputType,
  157 + )),
  158 + ),
  159 + Container(
  160 + child: Text(
  161 + subTitle,
  162 + style: TextStyle(
  163 + color: MyColours.color_515151,
  164 + fontSize: ScreenUtil().setSp(28)),
  165 + ),
  166 + ),
  167 + ],
  168 + ),
  169 + ))
  170 + ],
  171 + ),
  172 + );
  173 + }
  174 +
  175 + ///请选择
  176 + Widget _selectWidget(String title, String labelShow,
  177 + {GestureTapCallback onTap, bool need = true}) {
  178 + return InkWell(
  179 + onTap: onTap,
  180 + // () {
  181 + // FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
  182 + // DialogUtil.showSelectCusmanDialog(
  183 + // context,
  184 + // customerProvider.labelList.map((item) {
  185 + // return item.label;
  186 + // }).toList(), (value) {
  187 + // if (value != null) {
  188 + // setState(() {
  189 + // customerProvider.labelSelIndex =
  190 + // value.first;
  191 + // labelShow = customerProvider
  192 + // .labelList[
  193 + // customerProvider.labelSelIndex]
  194 + // .label;
  195 + // });
  196 + // }
  197 + // },
  198 + // selecteds:
  199 + // customerProvider.labelSelIndex == null
  200 + // ? []
  201 + // : [
  202 + // customerProvider.labelSelIndex
  203 + // ])
  204 + // .then((value) {});
  205 + // },
  206 + child: Row(
  207 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  208 + crossAxisAlignment: CrossAxisAlignment.center,
  209 + children: [
  210 + Container(
  211 + // color: Colors.red,
  212 + width: ScreenUtil().setWidth(160),
  213 + height: ScreenUtil().setWidth(35),
  214 + child: Text(
  215 + title,
  216 + style: TextStyle(
  217 + fontSize: ScreenUtil().setSp(28),
  218 + color: MyColours.color_515151),
  219 + ),
  220 + ),
  221 + HEmptyView(60),
  222 + Expanded(
  223 + child: Container(
  224 + height: ScreenUtil().setWidth(64),
  225 + decoration: BoxDecoration(
  226 + border: Border(
  227 + bottom: BorderSide(
  228 + width: ScreenUtil().setWidth(2),
  229 + color: Color.fromRGBO(220, 220, 220, 1)))),
  230 + child: Row(
  231 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  232 + children: [
  233 + Expanded(
  234 + child: Text(
  235 + labelShow,
  236 + overflow: TextOverflow.ellipsis,
  237 + style: TextStyle(
  238 + color: labelShow == '请选择'
  239 + ? MyColours.color_999999
  240 + : MyColours.color_515151,
  241 + fontSize: ScreenUtil().setSp(28),
  242 + ),
  243 + )),
  244 + HEmptyView(10),
  245 + Image.asset(
  246 + Utils.getImgPath('f_arrow_down'),
  247 + width: ScreenUtil().setWidth(64),
  248 + // height: ScreenUtil().setWidth(10),
  249 + ),
  250 + HEmptyView(16),
  251 + ],
  252 + ))),
  253 + ],
  254 + ),
  255 + );
  256 + }
  257 +
  258 + Widget _callButton(
  259 + {GestureTapCallback onPress,
  260 + content,
  261 + hasLeftBorder = true,
  262 + isSelect = false}) {
  263 + return InkWell(
  264 + onTap: onPress,
  265 + child: Container(
  266 + height: h(48),
  267 + decoration: BoxDecoration(
  268 + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
  269 + border: Border(
  270 + bottom: BorderSide(
  271 + color: MyColours.color_438E93,
  272 + width: ScreenUtil().setWidth(2)),
  273 + top: BorderSide(
  274 + color: MyColours.color_438E93,
  275 + width: ScreenUtil().setWidth(2)),
  276 + left: hasLeftBorder
  277 + ? BorderSide(
  278 + color: MyColours.color_438E93,
  279 + width: ScreenUtil().setWidth(2))
  280 + : BorderSide.none,
  281 + right: BorderSide(
  282 + color: MyColours.color_438E93,
  283 + width: ScreenUtil().setWidth(2)))),
  284 + child: Align(
  285 + alignment: Alignment.center,
  286 + child: Text(
  287 + content,
  288 + style: TextStyle(
  289 + color:
  290 + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93,
  291 + fontSize: ScreenUtil().setSp(36)),
  292 + ),
  293 + ),
  294 + ),
  295 + );
  296 + }
  297 +
  298 + @override
  299 + Widget build(BuildContext context) {
  300 + return Scaffold(
  301 + backgroundColor: MyColours.color_ffffff,
  302 + key: scaffoldKey,
  303 + appBar: SystemAppBar(
  304 + '添加定金',
  305 + needWhite: true,
  306 + bgColor: MyColours.color_438E93,
  307 + titleColor: MyColours.color_F6F6F6,
  308 + onTap: () {
  309 + Navigator.pop(context);
  310 + },
  311 + ),
  312 + body: Column(
  313 + children: [
  314 + Expanded(
  315 + child: SingleChildScrollView(
  316 + child: Padding(
  317 + padding: EdgeInsets.only(left: w(30), right: w(13)),
  318 + child: Column(
  319 + children: [
  320 + VEmptyView(50),
  321 + _textfield('金额', money, moneyC, moneyF, '元'),
  322 + VEmptyView(66),
  323 + _textfield('付款人', paymentP, paymentC, paymentF, ''),
  324 + VEmptyView(66),
  325 + _selectWidget('收款人', collectionP),
  326 + VEmptyView(66),
  327 + _selectWidget('付款时间', paymentTime, onTap: () {
  328 + FocusScope.of(context)
  329 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  330 + //弹出时间选择器
  331 + // showPickerDateTime(context);
  332 + showDateSelWidget = true;
  333 + DialogUtil.showPickerDateTime24Feast(
  334 + context,
  335 + scaffoldKey,
  336 + (value) {
  337 + // {'text': picker.adapter.text, 'select': selecteds}
  338 + if (value != null) {
  339 + setState(() {
  340 + print(value);
  341 + paymentTime = DateUtil.formatDateStr(value,
  342 + format: DateFormats.y_mo_d);
  343 + });
  344 + }
  345 + showDateSelWidget = false;
  346 + },
  347 + pickerDateTimeType: PickerDateTimeType.kYMD,
  348 + dateTime: DateUtil.getDateTime(paymentTime),
  349 + cancelText: '',
  350 + title: '选择付款时间',
  351 + onCancel: () {
  352 + showDateSelWidget = false;
  353 + });
  354 + }),
  355 + VEmptyView(66),
  356 + _selectWidget('支付方式', paymentType),
  357 + VEmptyView(66),
  358 + _selectWidget('定金类型', depositType),
  359 + VEmptyView(66),
  360 + _textfield('收据编号', receiptNumber, receiptNumberC,
  361 + receiptNumberF, ''),
  362 + ],
  363 + )),
  364 + )),
  365 + Row(
  366 + children: [
  367 + Expanded(
  368 + child: _callButton(
  369 + onPress: () {
  370 + Navigator.pop(context);
  371 + },
  372 + content: '返回',
  373 + hasLeftBorder: true,
  374 + isSelect: false)),
  375 + Expanded(
  376 + child: _callButton(
  377 + onPress: () {},
  378 + content: '保存并返回',
  379 + hasLeftBorder: true,
  380 + isSelect: true))
  381 + ],
  382 + )
  383 + ],
  384 + ));
  385 + }
  386 +}
  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/h_empty_view.dart';
  5 +
  6 +import '../../res/colors.dart';
  7 +import '../../utils/screen_util.dart';
  8 +import '../../utils/utils.dart';
  9 +import '../../widgets/system_app_bar.dart';
  10 +import '../../widgets/v_empty_view.dart';
  11 +
  12 +/**
  13 + *
  14 + * 调菜
  15 + */
  16 +class FeastMenuPage extends StatefulWidget {
  17 + FeastMenuPage({Key key}) : super(key: key);
  18 +
  19 + @override
  20 + _FeastMenuPageState createState() => _FeastMenuPageState();
  21 +}
  22 +
  23 +class _FeastMenuPageState extends State<FeastMenuPage> {
  24 + ScrollController controller = ScrollController();
  25 + @override
  26 + void initState() {
  27 + // TODO: implement initState
  28 + super.initState();
  29 +
  30 + Utils.changeStatusColor(color: MyColours.color_438E93);
  31 + }
  32 +
  33 + Widget _callButton(
  34 + {GestureTapCallback onPress,
  35 + content,
  36 + hasLeftBorder = true,
  37 + isSelect = false}) {
  38 + return InkWell(
  39 + onTap: onPress,
  40 + child: Container(
  41 + height: h(48),
  42 + decoration: BoxDecoration(
  43 + color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
  44 + border: Border(
  45 + bottom: BorderSide(
  46 + color: MyColours.color_438E93,
  47 + width: ScreenUtil().setWidth(2)),
  48 + top: BorderSide(
  49 + color: MyColours.color_438E93,
  50 + width: ScreenUtil().setWidth(2)),
  51 + left: hasLeftBorder
  52 + ? BorderSide(
  53 + color: MyColours.color_438E93,
  54 + width: ScreenUtil().setWidth(2))
  55 + : BorderSide.none,
  56 + right: BorderSide(
  57 + color: MyColours.color_438E93,
  58 + width: ScreenUtil().setWidth(2)))),
  59 + child: Align(
  60 + alignment: Alignment.center,
  61 + child: Text(
  62 + content,
  63 + style: TextStyle(
  64 + color:
  65 + isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93,
  66 + fontSize: ScreenUtil().setSp(36)),
  67 + ),
  68 + ),
  69 + ),
  70 + );
  71 + }
  72 +
  73 + // 根据index展示不同的widget
  74 + Widget buildItemWidget(BuildContext context, int index) {
  75 + return _itemBuildWidget(context, index);
  76 + }
  77 +
  78 + ///输入框
  79 + Widget _textfield(String hintText, TextEditingController editingController,
  80 + FocusNode focusNode,
  81 + {TextInputType inputType = TextInputType.text, double width}) {
  82 + return Container(
  83 + width: width,
  84 + padding: EdgeInsets.symmetric(horizontal: w(6)),
  85 + decoration: BoxDecoration(
  86 + border: Border.all(width: h(1), color: MyColours.color_DBDBDB)),
  87 + child: Container(
  88 + // height: ScreenUtil().setHeight(120),
  89 + height: ScreenUtil().setWidth(64),
  90 + child: TextField(
  91 + controller: editingController,
  92 + // textAlign: TextAlign.right,
  93 + // textAlignVertical: TextAlignVertical.bottom,
  94 + maxLines: 1,
  95 + inputFormatters: [],
  96 +
  97 + // //光标颜色
  98 + // cursorColor:
  99 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  100 + //输入文本的样式
  101 + style: TextStyle(
  102 + fontSize: ScreenUtil().setSp(32),
  103 + ),
  104 + focusNode: focusNode,
  105 + decoration: InputDecoration(
  106 + border: OutlineInputBorder(borderSide: BorderSide.none),
  107 + hintText: hintText,
  108 + hintStyle: TextStyle(
  109 + color: hintText == '菜名' || hintText == '数量'
  110 + ? MyColours.color_999999
  111 + : MyColours.color_515151,
  112 + fontSize: ScreenUtil().setSp(24),
  113 + ),
  114 + contentPadding: EdgeInsets.zero,
  115 + ),
  116 + onChanged: (value) {},
  117 + onEditingComplete: () {
  118 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  119 + },
  120 + keyboardType: inputType,
  121 + )),
  122 + );
  123 + }
  124 +
  125 + Widget _itemBuildWidget(BuildContext context, int index) {
  126 + return ListView.builder(
  127 + shrinkWrap: true,
  128 + controller: controller,
  129 + padding: EdgeInsets.only(right: w(12)),
  130 + itemCount: _getItemListCount(),
  131 + itemBuilder: (BuildContext context, int index) {
  132 + if (index < 1) {
  133 + return _buildHeaderWidget(context, index);
  134 + } else {
  135 + int itemIndex = index - 1;
  136 + return Container(
  137 + margin: new EdgeInsets.only(bottom: h(12)),
  138 + color: MyColours.color_ffffff,
  139 + child: new GestureDetector(
  140 + onTap: () {
  141 + // _gotoProjectDetail(projectModelList[index]);
  142 + },
  143 + child: new Container(
  144 + color: MyColours.color_ffffff,
  145 + child: Row(
  146 + children: [
  147 + Container(
  148 + width: h(90),
  149 + child: Text(
  150 + '鱼香肉丝',
  151 + overflow: TextOverflow.ellipsis,
  152 + maxLines: 10,
  153 + style: TextStyle(
  154 + color: MyColours.color_515151,
  155 + fontSize: ScreenUtil().setSp(32)),
  156 + )),
  157 + HEmptyView(16),
  158 + Container(
  159 + width: h(36),
  160 + child: Text(
  161 + '10份',
  162 + overflow: TextOverflow.ellipsis,
  163 + maxLines: 1,
  164 + style: TextStyle(
  165 + color: MyColours.color_515151,
  166 + fontSize: ScreenUtil().setSp(32)),
  167 + )),
  168 + HEmptyView(16),
  169 + Text(
  170 + '调为',
  171 + overflow: TextOverflow.ellipsis,
  172 + maxLines: 1,
  173 + style: TextStyle(
  174 + color: MyColours.color_438E93,
  175 + fontSize: ScreenUtil().setSp(32)),
  176 + ),
  177 + HEmptyView(16),
  178 + Expanded(child: _textfield('菜名', null, null)),
  179 + HEmptyView(16),
  180 + _textfield('数量', null, null, width: w(56))
  181 + ],
  182 + )),
  183 + ),
  184 + );
  185 + }
  186 + },
  187 + );
  188 + }
  189 +
  190 + // 总count数
  191 + int _getItemListCount() {
  192 + return 3 + 1;
  193 + }
  194 +
  195 + // header内容
  196 + Widget _buildHeaderWidget(BuildContext context, int index) {
  197 + return Padding(
  198 + padding: EdgeInsets.only(bottom: h(12)),
  199 + child: Text(
  200 + '热菜',
  201 + style: TextStyle(
  202 + color: MyColours.color_515151,
  203 + fontSize: font(16),
  204 + fontWeight: FontWeight.bold),
  205 + ));
  206 + }
  207 +
  208 + @override
  209 + Widget build(BuildContext context) {
  210 + return Scaffold(
  211 + backgroundColor: MyColours.color_ffffff,
  212 + appBar: SystemAppBar(
  213 + '调菜',
  214 + needWhite: true,
  215 + bgColor: MyColours.color_438E93,
  216 + titleColor: MyColours.color_F6F6F6,
  217 + onTap: () {
  218 + Navigator.pop(context);
  219 + },
  220 + ),
  221 + body: Column(
  222 + crossAxisAlignment: CrossAxisAlignment.start,
  223 + children: [
  224 + Expanded(
  225 + child: SingleChildScrollView(
  226 + controller: controller,
  227 + child: Padding(
  228 + padding: EdgeInsets.only(left: w(16)),
  229 + child: Column(
  230 + crossAxisAlignment: CrossAxisAlignment.start,
  231 + children: [
  232 + VEmptyView(64),
  233 + Text(
  234 + '1299套餐',
  235 + style: TextStyle(
  236 + color: MyColours.color_E6000000,
  237 + fontSize: font(16)),
  238 + ),
  239 + VEmptyView(24),
  240 + MyDivider(
  241 + double.infinity,
  242 + h(1),
  243 + color: MyColours.color_E7E7E7,
  244 + ),
  245 + VEmptyView(64),
  246 + ListView.builder(
  247 + shrinkWrap: true,
  248 + controller: controller,
  249 + padding: EdgeInsets.only(right: w(12)),
  250 + itemCount: 10,
  251 + itemBuilder: (BuildContext context, int index) {
  252 + return buildItemWidget(context, index);
  253 + },
  254 + )
  255 + ],
  256 + )),
  257 + )),
  258 + Row(
  259 + children: [
  260 + Expanded(
  261 + child: _callButton(
  262 + onPress: () {
  263 + Navigator.pop(context);
  264 + },
  265 + content: '返回',
  266 + hasLeftBorder: true,
  267 + isSelect: false)),
  268 + Expanded(
  269 + child: _callButton(
  270 + onPress: () {},
  271 + content: '保存并返回',
  272 + hasLeftBorder: true,
  273 + isSelect: true))
  274 + ],
  275 + )
  276 + ],
  277 + ));
  278 + }
  279 +}
@@ -291,7 +291,7 @@ class _MenuManagePageState extends State<MenuManagePage> { @@ -291,7 +291,7 @@ class _MenuManagePageState extends State<MenuManagePage> {
291 fontWeight: 291 fontWeight:
292 FontWeight.bold), 292 FontWeight.bold),
293 ), 293 ),
294 - VEmptyView(20), 294 + VEmptyView(10),
295 Text( 295 Text(
296 '${model.price}元/${model.unit}', 296 '${model.price}元/${model.unit}',
297 style: TextStyle( 297 style: TextStyle(
@@ -58,6 +58,8 @@ class MyColours { @@ -58,6 +58,8 @@ class MyColours {
58 static const Color color_131313 = Color(0xff131313); 58 static const Color color_131313 = Color(0xff131313);
59 static const Color color_2e000000 = Color(0x2e000000); 59 static const Color color_2e000000 = Color(0x2e000000);
60 static const Color color_14000000 = Color(0x14000000); 60 static const Color color_14000000 = Color(0x14000000);
  61 +
  62 + static const Color color_40000000 = Color(0x40000000);
61 static const Color color_1F000000 = Color(0x1F000000); 63 static const Color color_1F000000 = Color(0x1F000000);
62 64
63 static const Color color_bfbfbf = Color(0xffBFBFBF); 65 static const Color color_bfbfbf = Color(0xffBFBFBF);
@@ -854,4 +854,17 @@ class NavigatorUtil { @@ -854,4 +854,17 @@ class NavigatorUtil {
854 return _navigateTo(context, "${Routes.feast_create_page}", 854 return _navigateTo(context, "${Routes.feast_create_page}",
855 replace: replace); 855 replace: replace);
856 } 856 }
  857 +
  858 + ///宴会----添加定金
  859 + static Future<dynamic> goFeastDepositPage(BuildContext context,
  860 + {replace = false, bool onlyShow = false}) {
  861 + return _navigateTo(context, "${Routes.feast_deposit_page}",
  862 + replace: replace);
  863 + }
  864 +
  865 + ///宴会----调菜
  866 + static Future<dynamic> goFeastMenuPage(BuildContext context,
  867 + {replace = false, bool onlyShow = false}) {
  868 + return _navigateTo(context, "${Routes.feast_menu_page}", replace: replace);
  869 + }
857 } 870 }
@@ -143,6 +143,8 @@ import 'package:provider/provider.dart'; @@ -143,6 +143,8 @@ import 'package:provider/provider.dart';
143 143
144 import '../pages/feast/feast_board.dart'; 144 import '../pages/feast/feast_board.dart';
145 import '../pages/feast/feast_create_page.dart'; 145 import '../pages/feast/feast_create_page.dart';
  146 +import '../pages/feast/feast_deposit_page.dart';
  147 +import '../pages/feast/feast_menu_page.dart';
146 import '../provider/feast_model.dart'; 148 import '../provider/feast_model.dart';
147 149
148 // 登录页 150 // 登录页
@@ -1340,3 +1342,23 @@ var feastCreatePageHandle = new Handler( @@ -1340,3 +1342,23 @@ var feastCreatePageHandle = new Handler(
1340 return ChangeNotifierProvider<FeastModel>( 1342 return ChangeNotifierProvider<FeastModel>(
1341 create: (_) => FeastModel(), child: FeastCreatePage()); 1343 create: (_) => FeastModel(), child: FeastCreatePage());
1342 }); 1344 });
  1345 +
  1346 +///宴会----添加定金
  1347 +var feastDepositPageHandle = new Handler(
  1348 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  1349 + // String uids = params["uids"].first;
  1350 +
  1351 + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first);
  1352 + return ChangeNotifierProvider<FeastModel>(
  1353 + create: (_) => FeastModel(), child: FeastDepositPage());
  1354 +});
  1355 +
  1356 +///宴会----调菜
  1357 +var feastMenuPageHandle = new Handler(
  1358 + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
  1359 + // String uids = params["uids"].first;
  1360 +
  1361 + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first);
  1362 + return ChangeNotifierProvider<FeastModel>(
  1363 + create: (_) => FeastModel(), child: FeastMenuPage());
  1364 +});
@@ -117,6 +117,8 @@ class Routes { @@ -117,6 +117,8 @@ class Routes {
117 "/coupon_to_personnel_page"; //优惠券----可发放员工 117 "/coupon_to_personnel_page"; //优惠券----可发放员工
118 static String feast_board_page = "/feast_board_page"; //宴会----宴会看板 118 static String feast_board_page = "/feast_board_page"; //宴会----宴会看板
119 static String feast_create_page = "/feast_create_page"; //宴会----新建宴会 119 static String feast_create_page = "/feast_create_page"; //宴会----新建宴会
  120 + static String feast_deposit_page = "/feast_deposit_page"; //宴会----定金
  121 + static String feast_menu_page = "/feast_menu_page"; //宴会----调菜
120 122
121 static void configureRoutes(FluroRouter router) { 123 static void configureRoutes(FluroRouter router) {
122 router.notFoundHandler = new Handler( 124 router.notFoundHandler = new Handler(
@@ -237,5 +239,8 @@ class Routes { @@ -237,5 +239,8 @@ class Routes {
237 handler: couponToPersonnelPageHandle); 239 handler: couponToPersonnelPageHandle);
238 router.define(feast_board_page, handler: feastBoardPageHandle); 240 router.define(feast_board_page, handler: feastBoardPageHandle);
239 router.define(feast_create_page, handler: feastCreatePageHandle); 241 router.define(feast_create_page, handler: feastCreatePageHandle);
  242 + router.define(feast_deposit_page, handler: feastDepositPageHandle);
  243 +
  244 + router.define(feast_menu_page, handler: feastMenuPageHandle);
240 } 245 }
241 } 246 }
@@ -4123,13 +4123,89 @@ class DialogUtil { @@ -4123,13 +4123,89 @@ class DialogUtil {
4123 } 4123 }
4124 4124
4125 ///年月日时分秒选择器 4125 ///年月日时分秒选择器
  4126 + static Future showPickerDateTime24Feast(BuildContext context,
  4127 + GlobalKey<ScaffoldState> scaffoldKey, ValueChanged valueChanged,
  4128 + {int pickerDateTimeType = PickerDateTimeType.kYMDHMS,
  4129 + List<int> selecteds,
  4130 + Color cancelTextColor = const Color.fromRGBO(0, 0, 0, 0.6),
  4131 + String title = '',
  4132 + VoidCallback onCancel,
  4133 + String cancelText = '取消',
  4134 + DateTime dateTime}) {
  4135 + new Picker(
  4136 + selecteds: selecteds,
  4137 + adapter: new DateTimePickerAdapter(
  4138 + type: pickerDateTimeType,
  4139 + isNumberMonth: true,
  4140 + yearSuffix: "年",
  4141 + monthSuffix: "月",
  4142 + daySuffix: "日",
  4143 + minHour: 00,
  4144 + maxHour: 23,
  4145 + yearBegin: DateTime.now().year,
  4146 + yearEnd: 2030,
  4147 + minValue: DateTime.now(),
  4148 + value: dateTime),
  4149 + height: ScreenUtil().setWidth(480),
  4150 + hideHeader: false,
  4151 + headerDecoration: BoxDecoration(
  4152 + color: MyColours.color_ffffff,
  4153 + border: Border(
  4154 + bottom: BorderSide(
  4155 + width: ScreenUtil().setWidth(2),
  4156 + color: MyColours.color_E7E7E7),
  4157 + )),
  4158 + title: Text(
  4159 + title,
  4160 + style: TextStyle(
  4161 + fontWeight: FontWeight.bold,
  4162 + color: MyColours.color_515151,
  4163 + fontSize: ScreenUtil().setSp(32)),
  4164 + ),
  4165 + cancelText: cancelText,
  4166 + cancelTextStyle:
  4167 + TextStyle(color: cancelTextColor, fontSize: ScreenUtil().setSp(32)),
  4168 + confirmText: "确定",
  4169 + itemExtent: ScreenUtil().setWidth(80),
  4170 + confirmTextStyle: TextStyle(
  4171 + color: MyColours.color_438E93, fontSize: ScreenUtil().setSp(32)),
  4172 + selectedTextStyle: TextStyle(
  4173 + color: MyColours.color_000000, fontSize: ScreenUtil().setSp(32)),
  4174 + textStyle: TextStyle(
  4175 + color: Color.fromRGBO(0, 0, 0, 0.26),
  4176 + fontSize: ScreenUtil().setSp(32)),
  4177 + selectionOverlay: Container(
  4178 + height: ScreenUtil().setWidth(80),
  4179 + decoration: BoxDecoration(
  4180 + border: Border(
  4181 + bottom: BorderSide(
  4182 + width: ScreenUtil().setWidth(2),
  4183 + color: MyColours.color_E7E7E7),
  4184 + top: BorderSide(
  4185 + width: ScreenUtil().setWidth(2),
  4186 + color: MyColours.color_E7E7E7))),
  4187 + ),
  4188 + onCancel: onCancel,
  4189 + onConfirm: (Picker picker, List<int> selecteds) {
  4190 + // print(value.toString());
  4191 + // print(picker.adapter.toString());
  4192 + if (valueChanged != null) {
  4193 + valueChanged(picker.adapter.text);
  4194 + }
  4195 + }).showModal(context,backgroundColor: MyColours.color_40000000);
  4196 + }
  4197 +
  4198 + ///年月日时分秒选择器
4126 static Future showPickerDateTime24(BuildContext context, 4199 static Future showPickerDateTime24(BuildContext context,
4127 GlobalKey<ScaffoldState> scaffoldKey, ValueChanged valueChanged, 4200 GlobalKey<ScaffoldState> scaffoldKey, ValueChanged valueChanged,
4128 - {List<int> selecteds, VoidCallback onCancel, DateTime dateTime}) { 4201 + {int pickerDateTimeType = PickerDateTimeType.kYMDHMS,
  4202 + List<int> selecteds,
  4203 + VoidCallback onCancel,
  4204 + DateTime dateTime}) {
4129 new Picker( 4205 new Picker(
4130 selecteds: selecteds, 4206 selecteds: selecteds,
4131 adapter: new DateTimePickerAdapter( 4207 adapter: new DateTimePickerAdapter(
4132 - type: PickerDateTimeType.kYMDHMS, 4208 + type: pickerDateTimeType,
4133 isNumberMonth: true, 4209 isNumberMonth: true,
4134 yearSuffix: "年", 4210 yearSuffix: "年",
4135 monthSuffix: "月", 4211 monthSuffix: "月",