修复 考勤打卡记录显示问题

hmxc
张萌 4 years ago
parent 02bb4572b7
commit 73887ca25c

@ -46,13 +46,13 @@ class ClockRecordListModel {
}
String get startClockString =>
DateUtil.formatDateStr(this.startClockDate, format: 'HH:mm:ss');
DateUtil.formatDateStr(this.startClockDate??'', format: 'HH:mm:ss');
String get endClockString =>
DateUtil.formatDateStr(this.endClockDate, format: 'HH:mm:ss');
DateUtil.formatDateStr(this.endClockDate??'', format: 'HH:mm:ss');
String get clockDateString =>
DateUtil.formatDateStr(this.startClockDate, format: 'yyyy.MM.dd');
DateUtil.formatDateStr(this.createDate??'', format: 'yyyy.MM.dd');
String get weekDay => WeekDaysToChinese.fromInt(
DateUtil.getDateTime(this.startClockDate).weekday);
DateUtil.getDateTime(this.createDate??'')?.weekday);
}

@ -1,5 +1,6 @@
import 'package:aku_community_manager/models/manager/clock_in_out/clock_record_list_model.dart';
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/aku_divider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
@ -39,7 +40,9 @@ class _ClockInOutRecordCardState extends State<ClockInOutRecordCard> {
.make(),
],
),
40.w.heightBox,
16.w.heightBox,
AkuDivider.horizontal(),
24.w.heightBox,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -95,14 +98,14 @@ class _ClockInOutRecordCardState extends State<ClockInOutRecordCard> {
width: 16.w,
height: 16.w,
decoration: BoxDecoration(
color: widget.model.startClockDate == null
color: widget.model.endClockDate == null
? Color(0xFFE60E0E)
: Color(0xFF3F8FFE),
borderRadius: BorderRadius.circular(8.w),
),
),
8.w.widthBox,
(widget.model.startClockDate == null ? '下班未打卡' : '下班打卡时间')
(widget.model.endClockDate == null ? '下班未打卡' : '下班打卡时间')
.text
.size(28.sp)
.color(kTextPrimaryColor)
@ -110,7 +113,7 @@ class _ClockInOutRecordCardState extends State<ClockInOutRecordCard> {
.make(),
],
),
...widget.model.startClockDate == null
...widget.model.endClockDate == null
? []
: [
16.w.heightBox,

Loading…
Cancel
Save