diff --git a/lib/business_system/date_select/custom_page.dart b/lib/business_system/date_select/custom_page.dart index 2f7076b3..f13fa5d1 100644 --- a/lib/business_system/date_select/custom_page.dart +++ b/lib/business_system/date_select/custom_page.dart @@ -66,6 +66,9 @@ class _CustomPage extends State{ initialSelectedRange: PickerDateRange( DateTime.now().subtract(const Duration(days: 4)), DateTime.now().add(const Duration(days: 3))), + startRangeSelectionColor: Color(0xFF30415B), + endRangeSelectionColor: Color(0xFF30415B), + todayHighlightColor: Color(0xFF30415B), ), ) ], diff --git a/lib/business_system/date_select/monthly_report_page.dart b/lib/business_system/date_select/monthly_report_page.dart index c4632fcf..6c026dbb 100644 --- a/lib/business_system/date_select/monthly_report_page.dart +++ b/lib/business_system/date_select/monthly_report_page.dart @@ -1,6 +1,4 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; import 'package:syncfusion_flutter_datepicker/datepicker.dart'; import '../../view_widget/my_appbar.dart'; @@ -52,32 +50,15 @@ class _MonthlyReportPage extends State{ children: [ Positioned( left: 0, - right: 0, top: 0, - height: 80, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Selected date: ' + _monthlyDate), - ], - ), - ), - Positioned( - left: 0, - top: 80, right: 0, bottom: 0, child: SfDateRangePicker( onSelectionChanged: _onSelectionChanged, selectionMode: DateRangePickerSelectionMode.single, - // selectionShape: DateRangePickerSelectionShape.rectangle, - // initialSelectedRange: PickerDateRange( - // DateTime.now().subtract(const Duration(days: 4)), - // DateTime.now().add(const Duration(days: 3))), view: DateRangePickerView.year, controller: _controller, + selectionColor: Color(0xFF30415B), ), ) ], diff --git a/lib/business_system/home/business_home_page.dart b/lib/business_system/home/business_home_page.dart index 858aa3fb..ae650ab2 100644 --- a/lib/business_system/home/business_home_page.dart +++ b/lib/business_system/home/business_home_page.dart @@ -598,7 +598,7 @@ class _BusinessHomePage extends State child: salesVolumeItem(), ); }, - ) + ), ], ), ); diff --git a/lib/business_system/home/home_view/my_line_chart.dart b/lib/business_system/home/home_view/my_line_chart.dart index 9772482a..30421be0 100644 --- a/lib/business_system/home/home_view/my_line_chart.dart +++ b/lib/business_system/home/home_view/my_line_chart.dart @@ -171,6 +171,7 @@ class _LineChartSample2State extends State { tooltipPadding: const EdgeInsets.symmetric(vertical:5,horizontal:6), tooltipMargin: 5, tooltipRoundedRadius: 2, + tooltipHorizontalAlignment: FLHorizontalAlignment.center, getTooltipItems: (touchedSpots) { return touchedSpots.map((LineBarSpot touchedSpot) { return LineTooltipItem( diff --git a/lib/business_system/home/overview/trade_summary.dart b/lib/business_system/home/overview/trade_summary.dart index 8bc7f5f1..96b4e67c 100644 --- a/lib/business_system/home/overview/trade_summary.dart +++ b/lib/business_system/home/overview/trade_summary.dart @@ -27,14 +27,14 @@ class _TradeSummary extends State { int expensesSelect = 0; int dateIndex = 0; String selectedDate = ""; - String dayDate = "${DateTime.now().year}年${ DateTime.now().month}月${ DateTime.now().day}日"; + String dayDate = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; String weekDate =""; - String weekDateNum = "${DateTime.now().year}年${ DateTime.now().month}月${ DateTime.now().day}日 至 " - "${DateFormat("yyyy年MM月dd日").format(DateTime.parse(DateTime.now().add(Duration(days:6)).toString().substring(0,10)))}"; + String weekDateNum = "${DateFormat("yyyy年MM月dd日").format(DateTime.now().subtract(Duration(days:6)))} 至 " + "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; String monthlyDate =""; - String monthlyDateNum = "${DateTime.now().year}年${ DateTime.now().month}月"; + String monthlyDateNum = "${DateFormat("yyyy年MM月").format(DateTime.now())}"; String customDate =""; - String customDateNum = "${DateTime.now().year}年${ DateTime.now().month}月${ DateTime.now().day}日"; + String customDateNum = "${DateFormat("yyyy年MM月dd日").format(DateTime.now())}"; List lineChartSample2DataAmount = [LineChartSample2Data(0,40,"2023-03-09"), LineChartSample2Data(1,10,"2023-03-10"), @@ -295,14 +295,19 @@ class _TradeSummary extends State { String timeDate(){ if(dateIndex == 0){ - return (selectedDate == "" || selectedDate == null) ? "${dayDate}(今日)":"${DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))}(今日)"; + return (selectedDate == "" || selectedDate == null) ? "${dayDate ?? ""}(今日)":(dayDate == DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate)) + ?"${DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))}(今日)":DateFormat("yyyy年MM月dd日").format(DateTime.parse(selectedDate))); } else if(dateIndex == 1){ return (weekDate == "" || weekDate == null) ? weekDateNum : weekDate;} else if(dateIndex == 2){ - return (monthlyDate == "" || monthlyDate == null) ? "${monthlyDateNum}(当月)":"${(DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)).substring(0,8))}(当月)";} + return (monthlyDate == "" || monthlyDate == null) ? "${monthlyDateNum ?? ""}(当月)": + (monthlyDateNum == (DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)).substring(0,8))? + "${(DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)).substring(0,8))}(当月)" + :DateFormat("yyyy年MM月dd日").format(DateTime.parse(monthlyDate)).substring(0,8)); + } else if(dateIndex == 3){ - return (customDate == "" || customDate == null) ? "${customDateNum}(今日)" : customDate;} + return (customDate == "" || customDate == null) ? "${customDateNum??""}(今日)" : customDate;} } ///经营分析 @@ -383,7 +388,7 @@ class _TradeSummary extends State { margin: EdgeInsets.only(bottom:30.h), ), if(operateSelect== 0) - Padding(padding: EdgeInsets.symmetric(horizontal: 20.w), + Container(padding: EdgeInsets.symmetric(horizontal: 20.w), child:LineChartSample2(lineChartSample2DataAmount,"金额"),), if(operateSelect == 1) Padding(padding: EdgeInsets.symmetric(horizontal: 20.w), diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index ab653393..abd19e2f 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -177,10 +177,10 @@ class _StoreInfoView extends State { ), ), SizedBox( - width: 16.w, + width: 8.w, ), GestureDetector( - behavior: HitTestBehavior.opaque, + behavior: HitTestBehavior.translucent, onTap: () { Navigator.of(context).pushNamed( '/router/location_map', @@ -192,7 +192,7 @@ class _StoreInfoView extends State { ); }, child:Container( - padding:EdgeInsets.only(right: 8.w) , + padding:EdgeInsets.only(left: 8.w,right: 8.w) , child: Image.asset( "assets/image/icon_union_location.webp", width: 24.w, @@ -202,7 +202,7 @@ class _StoreInfoView extends State { ), if((widget?.storeInfo?.tel ?? "") != "") GestureDetector( - behavior: HitTestBehavior.opaque, + behavior: HitTestBehavior.translucent, onTap: () { showCallMobile(); },