统计报表页面修复 店铺图片白条 字体大小 日期格式等问题

master
章文轩 4 years ago
parent 167784db2d
commit 9e83dfd663

@ -34,6 +34,7 @@
<application
android:name="io.flutter.app.FlutterApplication"
android:label="瑞库客"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
tools:replace="android:label,android:allowBackup"
android:requestLegacyExternalStorage="true"

@ -17,6 +17,7 @@ class AppColor {
static const Color greenColor = Color.fromARGB(255, 37, 186, 114);
static const Color backgroundColor = Color(0xFFF9F9F9);
static const Color secondColor = Color(0xFF3F8FFE);
static const Color whiteColor = Color(0xFFFFFFFF);
//
static const Color frenchColor = Color(0xFFF8F7F8);
static const Color blackColor = Color(0xff16182b);

@ -17,6 +17,7 @@ import 'package:recook/widgets/weather_page/weather_city_model.dart';
import 'package:velocity_x/velocity_x.dart';
import 'choose_city_page.dart';
import 'choose_tickets_page.dart';
class ChooseTicketsTypePage extends StatefulWidget {
ChooseTicketsTypePage({Key key}) : super(key: key);
@ -34,7 +35,8 @@ class _ChooseTicketsTypePageState extends State<ChooseTicketsTypePage> {
AMapFlutterLocation _amapFlutterLocation;
Map<String, Object> _location;
WeatherCityModel cityModel;
DateTime _date = DateTime.now();
DateTime _date = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day, 0, 0);
String _dateText = DateUtil.formatDate(DateTime.now(), format: 'M月d日');
//DateTime _selectedDay;
//CalendarFormat _calendarFormat = CalendarFormat.month;
@ -484,7 +486,11 @@ class _ChooseTicketsTypePageState extends State<ChooseTicketsTypePage> {
},
));
} else {
Get.to();
print(_date);
Get.to(ChooseTicketsPage(
fromText: _originText,
toText: _destinationText,
originDate: _date));
}
print('查询');
},

@ -84,6 +84,42 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
bool _onload = true;
List _gone = [];
@override
void initState() {
super.initState();
if (widget.receivedType == '未到账') {
_TformatType = 'yyyy-MM';
_TTableformatType = 'M月d日';
} else if (widget.receivedType == '已到账') {
_TformatType = 'yyyy';
_TTableformatType = 'M月';
}
if (!_notSelfNotGUide) {
if (widget.receivedType == '已到账') {
if (_yearChoose == true) {
formatType = 'yyyy';
} else if (_monthChoose == true) {
formatType = 'yyyy-MM';
}
} else if (widget.receivedType == '未到账') {
if (_yearChoose == true) {
formatType = 'yyyy';
} else if (_monthChoose == true) {
formatType = 'yyyy-MM';
}
}
_onload = false;
} else {
//
if (widget.receivedType == '未到账') {
formatType = 'yyyy-MM';
} else if (widget.receivedType == '已到账') {
formatType = 'yyyy';
}
}
}
_chooseMonth() {
String MonthText = '';
if (widget.receivedType == '未到账') {
@ -136,14 +172,6 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
}
_chooseSelf() {
if (widget.receivedType == '未到账') {
_TformatType = 'yyyy-MM';
_TTableformatType = 'M月d日';
} else if (widget.receivedType == '已到账') {
_TformatType = 'yyyy';
_TTableformatType = 'M月';
}
return CustomImageButton(
onPressed: () {
_selfChoose = true;
@ -350,25 +378,28 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
clipBehavior: Clip.antiAlias,
height: 146.rw,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(5.rw),
boxShadow: [
BoxShadow(
color: Color(0xFFA6A6AD).withOpacity(0.41),
offset: Offset(0, 2.rw),
offset: Offset(0, 1.rw),
color: Color.fromRGBO(166, 166, 173, 0.43),
blurRadius: 6.rw,
),
)
],
borderRadius: BorderRadius.circular(4.rw),
image: DecorationImage(
image: AssetImage(UserLevelTool.currentCardImagePath()),
fit: BoxFit.cover,
),
),
child: Column(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(UserLevelTool.currentCardImagePath()),
),
),
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(UserLevelTool.currentCardImagePath()),
),
color: Colors.transparent),
padding: EdgeInsets.only(
top: 20.rw, bottom: 10.rw, left: 20.rw, right: 20.rw),
child: Row(
@ -468,21 +499,17 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
if (!_notSelfNotGUide) {
if (widget.receivedType == '已到账') {
if (_yearChoose == true) {
formatType = 'yyyy';
_models = await UserBenefitFunc.receicedIncome(
DateUtil.formatDate(_date, format: 'yyyy'), BenefitType);
} else if (_monthChoose == true) {
formatType = 'yyyy-MM';
_models = await UserBenefitFunc.receicedIncome(
DateUtil.formatDate(_date, format: 'yyyyMM'), BenefitType);
}
} else if (widget.receivedType == '未到账') {
if (_yearChoose == true) {
formatType = 'yyyy';
_models = await UserBenefitFunc.notReceicedIncome(
DateUtil.formatDate(_date, format: 'yyyy'), BenefitType);
} else if (_monthChoose == true) {
formatType = 'yyyy-MM';
_models = await UserBenefitFunc.notReceicedIncome(
DateUtil.formatDate(_date, format: 'yyyyMM'), BenefitType);
}
@ -492,10 +519,8 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
//
if (widget.receivedType == '未到账') {
formatType = 'yyyy';
_models = await UserBenefitFunc.teamNotReceicedIncome(team_level);
} else if (widget.receivedType == '已到账') {
formatType = 'yyyy-MM';
_models = await UserBenefitFunc.teamReceicedIncome(
int.parse(DateUtil.formatDate(_date, format: 'yyyy')),
team_level);
@ -567,7 +592,7 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
? Container(
padding: EdgeInsets.only(left: 30.w),
child: DateUtil.formatDate(_date,
format: _TformatType)
format: formatType)
.text
.black
.size(14.rsp)
@ -594,7 +619,7 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
child: Row(
children: [
DateUtil.formatDate(_date,
format: _TformatType)
format: formatType)
.text
.black
.size(14.rsp)
@ -844,8 +869,8 @@ class _UserBenefitCurrencyPageState extends State<UserBenefitCurrencyPage> {
size: 22, color: Color(0xff999999))
: Icon(Icons.keyboard_arrow_down,
size: 22, color: Color(0xff999999))
: SizedBox()
: SizedBox(),
: Icon(null, size: 22, color: Color(0xff999999))
: Icon(null, size: 22, color: Color(0xff999999)),
20.wb
],
),

@ -97,7 +97,7 @@ class _UserBenefitShopPageState extends State<UserBenefitShopPage> {
Container(
child: Column(
children: [
'销售额(元)'.text.color(Colors.black54).size(15.rsp).make(),
'销售额(元)'.text.color(Colors.black54).size(14.rsp).make(),
20.hb,
_salesVolume.text
.color(Color(0xFF333333))
@ -110,7 +110,7 @@ class _UserBenefitShopPageState extends State<UserBenefitShopPage> {
Container(
child: Column(
children: [
'品牌推广补贴(%)'.text.color(Colors.black54).size(15.rsp).make(),
'品牌推广补贴(%)'.text.color(Colors.black54).size(14.rsp).make(),
20.hb,
_subsidy.text.color(Color(0xFF333333)).size(16.rsp).make(),
],
@ -120,7 +120,7 @@ class _UserBenefitShopPageState extends State<UserBenefitShopPage> {
Container(
child: Column(
children: [
('订单数(笔)').text.color(Colors.black54).size(15.rsp).make(),
('订单数(笔)').text.color(Colors.black54).size(14.rsp).make(),
20.hb,
_count.text.color(Color(0xFF333333)).size(16.rsp).make(),
],

@ -98,15 +98,13 @@ class _XiataCalendarWidgetState extends State<XiataCalendarWidget> {
? (DateTime date) {
if (rangeMinDate == null) {
setState(() {
print(rangeMinDate);
print('1111');
rangeMinDate = date;
//rangeMaxDate = null;
});
} else {
setState(() {
print(rangeMinDate);
print('2222');
//rangeMaxDate = date;
rangeMinDate = date;
});
@ -184,8 +182,6 @@ class _MonthView extends StatelessWidget {
return const SizedBox();
} else {
bool isSelected = false;
print(day);
print(rangeMinDate);
if (rangeFeatureEnabled) {
if (rangeMinDate != null) {

@ -15,8 +15,10 @@ import 'package:recook/utils/text_utils.dart';
///
typedef SelectedListener = Function(int selectedIndex, FilterItemModel item);
///
typedef PopOptionHandle = Function(OptionListStatus status);
/// filterBar
typedef FilterToolBarListener = Function(bool update);
@ -82,7 +84,8 @@ class FilterToolBarResultContainer extends StatefulWidget {
final FilterToolBarController controller;
final Widget body;
const FilterToolBarResultContainer({GlobalKey key, this.controller, this.body})
const FilterToolBarResultContainer(
{GlobalKey key, this.controller, this.body})
: assert(controller != null, "controller 不为空");
@override
@ -139,12 +142,11 @@ class _FilterToolBarResultContainerState
});
if (widget.key == null) {
widget.controller._containerKey = GlobalKey();
}else {
widget.controller._containerKey = GlobalKey();
} else {
widget.controller._containerKey = widget.key;
}
super.initState();
}
@ -156,7 +158,6 @@ class _FilterToolBarResultContainerState
@override
Widget build(BuildContext context) {
return Container(
key: widget.controller._containerKey,
child: _buildBody(context),
@ -193,34 +194,33 @@ class _FilterToolBarResultContainerState
Widget _maskView() {
return widget.controller._toolBarKey == null
? Container()
:
Positioned(
top: widget.controller.toolBarDy + 40,
left: 0,
right: 0,
bottom: 0,
child: Offstage(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
widget.controller.helper.changeOptionListStatus(
OptionListStatus.close,
);
widget.controller.updateToolBarState(false);
_animationController.reset();
},
child: Opacity(
opacity: 0.3,
child: Container(
color: Colors.black,
),
? Container()
: Positioned(
top: widget.controller.toolBarDy + 40,
left: 0,
right: 0,
bottom: 0,
child: Offstage(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
widget.controller.helper.changeOptionListStatus(
OptionListStatus.close,
);
widget.controller.updateToolBarState(false);
_animationController.reset();
},
child: Opacity(
opacity: 0.3,
child: Container(
color: Colors.black,
),
),
offstage: _animation == null ||
(_animation.status == AnimationStatus.dismissed),
),
);
offstage: _animation == null ||
(_animation.status == AnimationStatus.dismissed),
),
);
}
/// [widget.maxLines]
@ -272,7 +272,6 @@ class _FilterToolBarResultContainerState
height: _lineHeight,
child: RawMaterialButton(
onPressed: () {
widget.controller.helper
.changeOptionListStatus(OptionListStatus.close);
widget.controller.updateToolBarState(false);
@ -337,7 +336,8 @@ class FilterToolBar extends StatefulWidget {
this.selectedColor,
this.maxLines = 4,
this.trialing,
this.fontSize = 15.0, this.height = 40,
this.fontSize = 15.0,
this.height = 40,
}) : assert(listener != null, "请设置监听事件"),
assert(controller != null, "请设置controller");
@ -403,7 +403,9 @@ class _FilterToolBarState extends State<FilterToolBar>
height: 40,
decoration: BoxDecoration(
color: Colors.white,
border: Border(top: BorderSide(color: Colors.grey[200], width: 0.5), bottom: BorderSide(color: Colors.grey[200], width: 0.5))),
border: Border(
top: BorderSide(color: Colors.grey[200], width: 0.5),
bottom: BorderSide(color: Colors.grey[200], width: 0.5))),
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: items,
@ -547,6 +549,7 @@ class FilterItemModel {
final FilterItemType type;
String title;
final List<String> subtitles;
///
final List<String> subtitleShort;
bool topSelected;

Loading…
Cancel
Save