From 73887ca25ca277c0ea883ae07bdc8ade13ca0184 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 28 May 2021 18:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E8=AE=B0=E5=BD=95=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/clock_in_out/clock_record_list_model.dart | 8 ++++---- .../clock_in_out/clock_in_out_record_card.dart | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/models/manager/clock_in_out/clock_record_list_model.dart b/lib/models/manager/clock_in_out/clock_record_list_model.dart index 45dbfe7..fee1f84 100644 --- a/lib/models/manager/clock_in_out/clock_record_list_model.dart +++ b/lib/models/manager/clock_in_out/clock_record_list_model.dart @@ -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); } diff --git a/lib/ui/manage_pages/clock_in_out/clock_in_out_record_card.dart b/lib/ui/manage_pages/clock_in_out/clock_in_out_record_card.dart index 8c4ddc6..f58f710 100644 --- a/lib/ui/manage_pages/clock_in_out/clock_in_out_record_card.dart +++ b/lib/ui/manage_pages/clock_in_out/clock_in_out_record_card.dart @@ -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 { .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 { 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 { .make(), ], ), - ...widget.model.startClockDate == null + ...widget.model.endClockDate == null ? [] : [ 16.w.heightBox,