From 791cc21d1f8ea498800851579c612721b03c12ca Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 20 Apr 2023 17:21:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E9=80=89=E6=8B=A9=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/settlement/settlement.dart | 131 +++++++++++++++++++++++++-------- 1 file changed, 99 insertions(+), 32 deletions(-) diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 464de1c7..cdf58a04 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -1127,7 +1127,7 @@ class _Settlement extends State { date.timeZoneOffset.inHours.toString()); }, onConfirm: (date) { reservationTime = date.toString().substring(0, 16); - subTime = date.toString().substring(0, 19); + subTime = date.toUtc().toIso8601String().toString(); setState(() {}); }, currentTime: minTime, locale: LocaleType.zh); } @@ -1142,7 +1142,7 @@ class _Settlement extends State { ) { return Container( width: double.infinity, - height: 270.h, + height: 280.h, padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 16.h), decoration: new BoxDecoration( color: Colors.white, @@ -1155,38 +1155,69 @@ class _Settlement extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - padding: - EdgeInsets.symmetric(vertical: 10.h, horizontal: 14.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GestureDetector( - onTap: () { + // Container( + // padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 14.w), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // GestureDetector( + // onTap: () { + // Navigator.of(context).pop(); + // }, + // child: Text( + // S.of(context).quxiao, + // style: + // TextStyle(fontSize: 18.sp, color: Colors.black), + // ), + // ), + // GestureDetector( + // onTap: () { + // setState(() { + // subscribeStoresName = + // subscribeParam.stores[storesIndex]; + // }); + // Navigator.of(context).pop(); + // }, + // child: Text( + // S.of(context).queding, + // style: TextStyle( + // fontSize: 18.sp, color: Color(0xFF32A060)), + // ), + // ), + // ], + // ), + // ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + alignment: Alignment.center, + margin: EdgeInsets.symmetric(vertical:5.h), + child: Text( + "请选择预约门店", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF353535), + ), + ), + )), + GestureDetector( + onTap: () { + setState(() { Navigator.of(context).pop(); - }, - child: Text( - S.of(context).quxiao, - style: - TextStyle(fontSize: 18.sp, color: Colors.black), - ), + }); + }, + child: Icon( + Icons.clear, + color: Colors.black, + size: 18, ), - GestureDetector( - onTap: () { - setState(() { - subscribeStoresName = - subscribeParam.stores[storesIndex]; - }); - Navigator.of(context).pop(); - }, - child: Text( - S.of(context).queding, - style: TextStyle( - fontSize: 18.sp, color: Color(0xFF32A060)), - ), - ) - ], - ), + ), + // SizedBox(width:4.w), + ], ), Expanded( child: ListView.builder( @@ -1202,6 +1233,33 @@ class _Settlement extends State { ); }), ), + GestureDetector( + onTap: (){ + setState(() { + subscribeStoresName = + subscribeParam.stores[storesIndex]; + }); + Navigator.of(context).pop(); + }, + child: Container( + width: double.infinity, + height: 40.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + color:Color(0xFF32A060), + ), + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 10.h,), + child: Text( + S.of(context).queding, + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 16.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ), ], ), ); @@ -1214,8 +1272,17 @@ class _Settlement extends State { Widget storesNameItem(index) { return Container( width: double.infinity, + margin: EdgeInsets.symmetric(vertical:8.h), padding: EdgeInsets.symmetric(vertical: 10.h), alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius:BorderRadius.circular(6), + border: Border.all( + color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7), + width: storesIndex == index ? 1 :0, + ), + color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7), + ), child: Text( subscribeParam.stores[index], style: TextStyle(