From 424d578679368fbc0e2781f27862103837207ca4 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Mon, 17 Apr 2023 17:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=84=E7=BA=A6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=EF=BC=9B=20=E9=A6=96=E9=A1=B5=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/login/new_login_page.dart | 1 + .../activity_coupon_remarks.dart | 18 ++++++++++++++++++ lib/store/store_order.dart | 10 +++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index ff90b763..a584b3eb 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -284,6 +284,7 @@ class _NewLoginPage extends State { @override Widget build(BuildContext context) { return Scaffold( + resizeToAvoidBottomInset: false, body: GestureDetector( behavior: HitTestBehavior.translucent, onTap: () { diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index 534434c1..1b4fe348 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -8,6 +8,9 @@ import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:intl/intl.dart'; + +import '../../view_widget/cupertino_date_picker.dart'; class ActivityCouponRemarks extends StatefulWidget { final Function() couponCart; @@ -290,6 +293,7 @@ class _ActivityCouponRemarks extends State { ), InkWell( onTap: () { + showDateSelector(); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -329,6 +333,20 @@ class _ActivityCouponRemarks extends State { ); } + ///立即预约时间选择 + showDateSelector() async { + DateTime dateTime = await showModalBottomSheet( + backgroundColor: Colors.transparent, + context: context, + builder: (_) { + return CupertinoDatePickerWidget(); + }); + if (dateTime != null) { + String time = DateFormat("yyyy-MM-dd").format(dateTime) ; + setState(() {}); + } + } + String activityText() { String promotion = ""; if (widget.promotions == null || widget.promotions == "") { diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 11a20298..d305b7a7 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -515,12 +515,12 @@ class _StoreOrderPage extends State Spacer(), GestureDetector( onTap: () { - // if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now())) - // &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){ + if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now())) + &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){ toDownOrder(); - // } - // else - // SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center); + } + else + SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center); }, child: RoundButton( width: 103.w,