Browse Source

增加预约时间;

首页更改
new_revision_app
wurong 2 years ago
parent
commit
424d578679
  1. 1
      lib/login/new_login_page.dart
  2. 18
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  3. 10
      lib/store/store_order.dart

1
lib/login/new_login_page.dart

@ -284,6 +284,7 @@ class _NewLoginPage extends State<NewLoginPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false,
body: GestureDetector( body: GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
onTap: () { onTap: () {

18
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/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';
import '../../view_widget/cupertino_date_picker.dart';
class ActivityCouponRemarks extends StatefulWidget { class ActivityCouponRemarks extends StatefulWidget {
final Function() couponCart; final Function() couponCart;
@ -290,6 +293,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
showDateSelector();
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -329,6 +333,20 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
); );
} }
///
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 activityText() {
String promotion = ""; String promotion = "";
if (widget.promotions == null || widget.promotions == "") { if (widget.promotions == null || widget.promotions == "") {

10
lib/store/store_order.dart

@ -515,12 +515,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
Spacer(), Spacer(),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
// if(AppUtils.compareTime(storeInfo.openStartTime,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())))){ &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){
toDownOrder(); toDownOrder();
// } }
// else else
// SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center); SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center);
}, },
child: RoundButton( child: RoundButton(
width: 103.w, width: 103.w,

Loading…
Cancel
Save