添加考勤记录

添加 申请情况
hmxc
张萌 4 years ago
parent 61bc7c22bf
commit 1637228100

@ -0,0 +1,111 @@
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';
import 'package:aku_community_manager/tools/extensions/list_extension_tool.dart';
class ClockInOutApplyCard extends StatefulWidget {
ClockInOutApplyCard({Key key}) : super(key: key);
@override
_ClockInOutApplyCardState createState() => _ClockInOutApplyCardState();
}
class _ClockInOutApplyCardState extends State<ClockInOutApplyCard> {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.all(24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
'Name'.text.size(32.sp).color(kTextPrimaryColor).bold.make(),
Spacer(),
'待审核'.text.size(28.sp).bold.color(kPrimaryColor).make()
],
),
16.w.heightBox,
AkuDivider.horizontal(),
24.w.heightBox,
...<Widget>[
_rowTile(
R.ASSETS_MANAGE_IC_RENWU_PNG,
'开始时间',
'2021-05-19 10:00:00'
.text
.size(24.sp)
.color(kTextSubColor)
.make()),
_rowTile(
R.ASSETS_MANAGE_LOCK_PNG,
'结束时间',
'2021-05-19 10:00:00'
.text
.size(24.sp)
.color(kTextSubColor)
.make()),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(
width: 40.w,
height: 40.w,
child: Image.asset(R.ASSETS_MANAGE_IC_RENWU_PNG),
),
12.w.widthBox,
'申请备注'.text.size(24.sp).color(kTextSubColor).make(),
],
),
160.w.widthBox,
Row(
children: [
'弟弟结婚,需要回趟家帮忙张罗婚礼的筹备'
.text
.size(24.sp)
.maxLines(2)
.overflow(TextOverflow.ellipsis)
.align(TextAlign.end)
.color(kTextSubColor)
.make().expand()
],
).expand()
],
),
_rowTile(
R.ASSETS_MANAGE_LOCK_PNG,
'申请时间',
'2021-05-19 10:00:00'
.text
.size(24.sp)
.color(kTextSubColor)
.make()),
].sepWidget(separate: 12.w.heightBox),
],
),
);
}
Widget _rowTile(String iconPath, String title, Widget content) {
return Row(
children: [
SizedBox(
width: 40.w,
height: 40.w,
child: Image.asset(iconPath),
),
12.w.widthBox,
title.text.size(24.sp).color(kTextSubColor).make(),
Spacer(),
content,
],
);
}
}

@ -0,0 +1,122 @@
import 'package:aku_community_manager/style/app_style.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class ClockInOutRecordCard extends StatefulWidget {
ClockInOutRecordCard({Key key}) : super(key: key);
@override
_ClockInOutRecordCardState createState() => _ClockInOutRecordCardState();
}
class _ClockInOutRecordCardState extends State<ClockInOutRecordCard> {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(8.w)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
'2021.05.19'
.text
.size(28.sp)
.bold
.color(kTextPrimaryColor)
.bold
.make(),
Spacer(),
'周三'.text.size(32.sp).bold.color(kTextPrimaryColor).make(),
],
),
40.w.heightBox,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
width: 16.w,
height: 16.w,
decoration: BoxDecoration(
color: Color(0xFF3F8FFE),
borderRadius: BorderRadius.circular(8.w),
),
),
8.w.widthBox,
'上班打卡时间'
.text
.size(28.sp)
.color(kTextPrimaryColor)
.bold
.make(),
],
),
16.w.heightBox,
Row(
children: [
24.w.widthBox,
(DateUtil.formatDateStr('2020-10-11 08:24:30',
format: 'HH:mm:ss'))
.text
.size(32.sp)
.color(kTextPrimaryColor)
.bold
.make(),
],
),
],
),
130.w.widthBox,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
width: 16.w,
height: 16.w,
decoration: BoxDecoration(
color: Color(0xFF3F8FFE),
borderRadius: BorderRadius.circular(8.w),
),
),
8.w.widthBox,
'下班打卡时间'
.text
.size(28.sp)
.color(kTextPrimaryColor)
.bold
.make(),
],
),
16.w.heightBox,
Row(
children: [
24.w.widthBox,
DateUtil.formatDateStr('08:24:09', format: 'HH:mm:ss')
.text
.size(32.sp)
.color(kTextPrimaryColor)
.bold
.make(),
],
),
],
),
],
),
],
),
);
}
}

@ -1,4 +1,7 @@
import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_in_out_apply_card.dart';
import 'package:aku_community_manager/ui/manage_pages/clock_in_out/clock_in_out_record_card.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ClockInOutView extends StatefulWidget {
final int index;
@ -11,6 +14,18 @@ class ClockInOutView extends StatefulWidget {
class _ClockInOutViewState extends State<ClockInOutView> {
@override
Widget build(BuildContext context) {
return ListView();
return widget.index == 1
? ListView(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
children: [
ClockInOutRecordCard(),
],
)
: ListView(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
children: [
ClockInOutApplyCard(),
],
);
}
}

Loading…
Cancel
Save