完成考勤模块UI
This commit is contained in:
parent
5900cfc672
commit
f73c7984a5
BIN
star_lock/images/icon_grayPullDown.png
Normal file
BIN
star_lock/images/icon_grayPullDown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
star_lock/images/icon_left_black.png
Normal file
BIN
star_lock/images/icon_left_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
star_lock/images/icon_right_black.png
Normal file
BIN
star_lock/images/icon_right_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@ -26,13 +26,20 @@
|
|||||||
"failureTime":"Failure Time",
|
"failureTime":"Failure Time",
|
||||||
"effectiveDate":"Effective Date",
|
"effectiveDate":"Effective Date",
|
||||||
"failureDate":"Failure Date",
|
"failureDate":"Failure Date",
|
||||||
"Monday":"M",
|
"monday":"Monday",
|
||||||
"Tuesday":"T",
|
"tuesday":"Tuesday",
|
||||||
"Wednesday":"W",
|
"wednesday":"Wednesday",
|
||||||
"Thursday":"T",
|
"thursday":"Thursday",
|
||||||
"Friday":"F",
|
"friday":"Friday",
|
||||||
"Saturday":"S",
|
"saturday":"Saturday",
|
||||||
"Sunday":"S",
|
"sunday":"Sunday",
|
||||||
|
"mondayShort":"M",
|
||||||
|
"tuesdayShort":"T",
|
||||||
|
"wednesdayShort":"W",
|
||||||
|
"thursdayShort":"T",
|
||||||
|
"fridayShort":"F",
|
||||||
|
"saturdayShort":"S",
|
||||||
|
"sundayShort":"S",
|
||||||
|
|
||||||
"realNameAuthentication":"RealNameAuthentication",
|
"realNameAuthentication":"RealNameAuthentication",
|
||||||
"sendKeyBottomTip":"The recipient can use it unlimited times during the validity period",
|
"sendKeyBottomTip":"The recipient can use it unlimited times during the validity period",
|
||||||
@ -82,6 +89,32 @@
|
|||||||
"work":"Work",
|
"work":"Work",
|
||||||
"workday":"Workday",
|
"workday":"Workday",
|
||||||
"holidays":"Holidays",
|
"holidays":"Holidays",
|
||||||
|
"punchingMode":"Punching Mode",
|
||||||
|
"whetherTheEmployeeHasAKey":"If The Employee Has A Key",
|
||||||
|
"selectKey":"Select Key",
|
||||||
|
"officeHours":"Office Hours",
|
||||||
|
"closingTime":"Closing Time",
|
||||||
|
"thisWeek":"This Week",
|
||||||
|
"singleDayWeekend":"Single Day Weekend",
|
||||||
|
"twoDaysOff":"Two Days Off",
|
||||||
|
"oddOrEvenDaysOff":"Odd Or Even Days Off",
|
||||||
|
"year":"Year",
|
||||||
|
"month":"Month",
|
||||||
|
"libertyDay":"Liberty Day",
|
||||||
|
"coverDate":"Cover Date",
|
||||||
|
"addedHoliday":"Added Holiday",
|
||||||
|
"startDate":"Start Date",
|
||||||
|
"accessDate":"Access Date",
|
||||||
|
"mustFillIn":"Must Fill In",
|
||||||
|
"endDate":"End Date",
|
||||||
|
"dailyCharts":"Daily Charts",
|
||||||
|
"monthlyLeaderboard":"Monthly Leader board",
|
||||||
|
"noAttendanceRecord":"No Attendance Record",
|
||||||
|
"everyoneIsVeryMotivated":"Everyone Is Very Motivated",
|
||||||
|
"workingHoursWereNotReleased":"Working Hours Were Not Released",
|
||||||
|
"beLate":"Be Late",
|
||||||
|
"leaveEarly":"Leave Early",
|
||||||
|
"noCardPunched":"No Card Punched",
|
||||||
|
|
||||||
"basicInformation":"Basic Information",
|
"basicInformation":"Basic Information",
|
||||||
"wirelessKeyboard":"Wireless Keyboard",
|
"wirelessKeyboard":"Wireless Keyboard",
|
||||||
|
|||||||
@ -26,13 +26,20 @@
|
|||||||
"failureTime":"failureTime",
|
"failureTime":"failureTime",
|
||||||
"effectiveDate":"effectiveDate",
|
"effectiveDate":"effectiveDate",
|
||||||
"failureDate":"failureDate",
|
"failureDate":"failureDate",
|
||||||
"Monday":"Monday",
|
"monday":"monday",
|
||||||
"Tuesday":"Tuesday",
|
"tuesday":"tuesday",
|
||||||
"Wednesday":"Wednesday",
|
"wednesday":"wednesday",
|
||||||
"Thursday":"Thursday",
|
"thursday":"thursday",
|
||||||
"Friday":"Friday",
|
"friday":"friday",
|
||||||
"Saturday":"Saturday",
|
"saturday":"saturday",
|
||||||
"Sunday":"Sunday",
|
"sunday":"sunday",
|
||||||
|
"mondayShort":"mondayShort",
|
||||||
|
"tuesdayShort":"tuesdayShort",
|
||||||
|
"wednesdayShort":"wednesdayShort",
|
||||||
|
"thursdayShort":"thursdayShort",
|
||||||
|
"fridayShort":"fridayShort",
|
||||||
|
"saturdayShort":"saturdayShort",
|
||||||
|
"sundayShort":"sundayShort",
|
||||||
|
|
||||||
"realNameAuthentication":"realNameAuthentication",
|
"realNameAuthentication":"realNameAuthentication",
|
||||||
"sendKeyBottomTip":"sendKeyBottomTip",
|
"sendKeyBottomTip":"sendKeyBottomTip",
|
||||||
@ -82,6 +89,32 @@
|
|||||||
"work":"work",
|
"work":"work",
|
||||||
"workday":"workday",
|
"workday":"workday",
|
||||||
"holidays":"holidays",
|
"holidays":"holidays",
|
||||||
|
"punchingMode":"punchingMode",
|
||||||
|
"whetherTheEmployeeHasAKey":"whetherTheEmployeeHasAKey",
|
||||||
|
"selectKey":"selectKey",
|
||||||
|
"officeHours":"officeHours",
|
||||||
|
"closingTime":"closingTime",
|
||||||
|
"thisWeek":"thisWeek",
|
||||||
|
"singleDayWeekend":"singleDayWeekend",
|
||||||
|
"twoDaysOff":"twoDaysOff",
|
||||||
|
"oddOrEvenDaysOff":"oddOrEvenDaysOff",
|
||||||
|
"year":"year",
|
||||||
|
"month":"month",
|
||||||
|
"libertyDay":"libertyDay",
|
||||||
|
"coverDate":"coverDate",
|
||||||
|
"addedHoliday":"addedHoliday",
|
||||||
|
"startDate":"startDate",
|
||||||
|
"accessDate":"accessDate",
|
||||||
|
"mustFillIn":"mustFillIn",
|
||||||
|
"endDate":"endDate",
|
||||||
|
"dailyCharts":"dailyCharts",
|
||||||
|
"monthlyLeaderboard":"monthlyLeaderboard",
|
||||||
|
"noAttendanceRecord":"noAttendanceRecord",
|
||||||
|
"everyoneIsVeryMotivated":"everyoneIsVeryMotivated",
|
||||||
|
"workingHoursWereNotReleased":"workingHoursWereNotReleased",
|
||||||
|
"beLate":"beLate",
|
||||||
|
"leaveEarly":"leaveEarly",
|
||||||
|
"noCardPunched":"noCardPunched",
|
||||||
|
|
||||||
"basicInformation":"basicInformation",
|
"basicInformation":"basicInformation",
|
||||||
"wirelessKeyboard":"wirelessKeyboard",
|
"wirelessKeyboard":"wirelessKeyboard",
|
||||||
|
|||||||
@ -26,13 +26,20 @@
|
|||||||
"failureTime":"失效时间",
|
"failureTime":"失效时间",
|
||||||
"effectiveDate":"生效日期",
|
"effectiveDate":"生效日期",
|
||||||
"failureDate":"失效日期",
|
"failureDate":"失效日期",
|
||||||
"Monday":"一",
|
"monday":"星期一",
|
||||||
"Tuesday":"二",
|
"tuesday":"星期二",
|
||||||
"Wednesday":"三",
|
"wednesday":"星期三",
|
||||||
"Thursday":"四",
|
"thursday":"星期四",
|
||||||
"Friday":"五",
|
"friday":"星期五",
|
||||||
"Saturday":"六",
|
"saturday":"星期六",
|
||||||
"Sunday":"日",
|
"sunday":"星期日",
|
||||||
|
"mondayShort":"一",
|
||||||
|
"tuesdayShort":"二",
|
||||||
|
"wednesdayShort":"三",
|
||||||
|
"thursdayShort":"四",
|
||||||
|
"fridayShort":"五",
|
||||||
|
"saturdayShort":"六",
|
||||||
|
"sundayShort":"日",
|
||||||
|
|
||||||
"realNameAuthentication":"实名认证",
|
"realNameAuthentication":"实名认证",
|
||||||
"sendKeyBottomTip":"接收者在有效期内可以不限次数使用",
|
"sendKeyBottomTip":"接收者在有效期内可以不限次数使用",
|
||||||
@ -82,6 +89,32 @@
|
|||||||
"work":"工作",
|
"work":"工作",
|
||||||
"workday":"工作日",
|
"workday":"工作日",
|
||||||
"holidays":"节假日",
|
"holidays":"节假日",
|
||||||
|
"punchingMode":"打卡方式",
|
||||||
|
"whetherTheEmployeeHasAKey":"员工是否有钥匙",
|
||||||
|
"selectKey":"选择钥匙",
|
||||||
|
"officeHours":"上班时间",
|
||||||
|
"closingTime":"下班时间",
|
||||||
|
"thisWeek":"本周",
|
||||||
|
"singleDayWeekend":"单休",
|
||||||
|
"twoDaysOff":"双休",
|
||||||
|
"oddOrEvenDaysOff":"单双休",
|
||||||
|
"year":"年",
|
||||||
|
"month":"月",
|
||||||
|
"libertyDay":"放假日期",
|
||||||
|
"coverDate":"补班日期",
|
||||||
|
"addedHoliday":"添加假日",
|
||||||
|
"startDate":"开始日期",
|
||||||
|
"accessDate":"接入日期",
|
||||||
|
"mustFillIn":"必填",
|
||||||
|
"endDate":"结束日期",
|
||||||
|
"dailyCharts":"日榜",
|
||||||
|
"monthlyLeaderboard":"月榜",
|
||||||
|
"noAttendanceRecord":"无考勤记录",
|
||||||
|
"everyoneIsVeryMotivated":"大家干劲十足",
|
||||||
|
"workingHoursWereNotReleased":"工作时长未出炉",
|
||||||
|
"beLate":"迟到",
|
||||||
|
"leaveEarly":"早退",
|
||||||
|
"noCardPunched":"未打卡",
|
||||||
|
|
||||||
"basicInformation":"基本信息",
|
"basicInformation":"基本信息",
|
||||||
"wirelessKeyboard":"无线键盘",
|
"wirelessKeyboard":"无线键盘",
|
||||||
|
|||||||
BIN
star_lock/images/main/icon_checkInRankingListTop.png
Normal file
BIN
star_lock/images/main/icon_checkInRankingListTop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
@ -6,9 +6,12 @@ import 'login/forgetPassword/starLock_forgetPassword_page.dart';
|
|||||||
import 'login/login/starLock_login_page.dart';
|
import 'login/login/starLock_login_page.dart';
|
||||||
import 'login/register/starLock_register_page.dart';
|
import 'login/register/starLock_register_page.dart';
|
||||||
import 'login/seletCountryRegion/seletCountryRegion_page.dart';
|
import 'login/seletCountryRegion/seletCountryRegion_page.dart';
|
||||||
|
import 'main/lockDetail/checkingIn/checkingInAddHolidays/checkingInAddHolidays_page.dart';
|
||||||
|
import 'main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart';
|
||||||
|
import 'main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_page.dart';
|
||||||
import 'main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart';
|
import 'main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart';
|
||||||
@ -127,6 +130,9 @@ abstract class Routers {
|
|||||||
static const checkingInAddStaffPage = '/CheckingInAddStaffPage';// 添加员工
|
static const checkingInAddStaffPage = '/CheckingInAddStaffPage';// 添加员工
|
||||||
static const checkingInSetWorkTimePage = '/CheckingInSetWorkTimePage';// 工作时间设置
|
static const checkingInSetWorkTimePage = '/CheckingInSetWorkTimePage';// 工作时间设置
|
||||||
static const checkingInSetWorkdaySet = '/CheckingInSetWorkdaySet';// 工作日设置
|
static const checkingInSetWorkdaySet = '/CheckingInSetWorkdaySet';// 工作日设置
|
||||||
|
static const checkingInSetHolidaysPage = '/CheckingInSetHolidaysPage';// 节假日设置
|
||||||
|
static const checkingInAddHolidaysPage = '/CheckingInAddHolidaysPage';// 添加假日
|
||||||
|
static const checkingInDetailPage = '/CheckingInDetailPage';// 考勤详情
|
||||||
|
|
||||||
static const mineSetPage = '/MineSetPage';// 我的设置
|
static const mineSetPage = '/MineSetPage';// 我的设置
|
||||||
static const mineMultiLanguagePage = '/MineMultiLanguagePage';// 我的设置
|
static const mineMultiLanguagePage = '/MineMultiLanguagePage';// 我的设置
|
||||||
@ -399,5 +405,17 @@ abstract class AppRouters {
|
|||||||
name: Routers.checkingInSetWorkdaySet,
|
name: Routers.checkingInSetWorkdaySet,
|
||||||
page: () => const CheckingInSetWorkdaySet(),
|
page: () => const CheckingInSetWorkdaySet(),
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.checkingInSetHolidaysPage,
|
||||||
|
page: () => const CheckingInSetHolidaysPage(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.checkingInAddHolidaysPage,
|
||||||
|
page: () => const CheckingInAddHolidaysPage(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.checkingInDetailPage,
|
||||||
|
page: () => CheckingInDetailPage(),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/commonItem.dart';
|
||||||
|
import '../../../../tools/showCalendar.dart';
|
||||||
|
import '../../../../tools/submitBtn.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class CheckingInAddHolidaysPage extends StatefulWidget {
|
||||||
|
const CheckingInAddHolidaysPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CheckingInAddHolidaysPage> createState() => _CheckingInAddHolidaysPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys.addedHoliday.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys.mustFillIn.tr})")),
|
||||||
|
CommonItem(leftTitel:TranslationLoader.lanKeys.startDate.tr, rightTitle:"(${TranslationLoader.lanKeys.mustFillIn.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
|
||||||
|
await showDialog(context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||||
|
print("111111$dateTime");
|
||||||
|
Navigator.of(context).pop(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
CommonItem(leftTitel:TranslationLoader.lanKeys.endDate.tr, rightTitle:"(${TranslationLoader.lanKeys.mustFillIn.tr})", isHaveLine: true, isHaveDirection: false, action: () async {
|
||||||
|
await showDialog(context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||||
|
Navigator.of(context).pop(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
CommonItem(leftTitel:TranslationLoader.lanKeys.coverDate.tr, rightTitle:"", isHaveLine: false, isHaveDirection: false, action: () async {
|
||||||
|
await showDialog(context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||||
|
Navigator.of(context).pop(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
SizedBox(height: 50.w,),
|
||||||
|
SubmitBtn(btnName: TranslationLoader.lanKeys.sure.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
|
onClick: (){
|
||||||
|
|
||||||
|
}
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget getTFWidget(String tfStr){
|
||||||
|
return Container(
|
||||||
|
height: 50.h,
|
||||||
|
width: 300.w,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TextField(
|
||||||
|
//输入框一行
|
||||||
|
maxLines: 1,
|
||||||
|
// controller: _controller,
|
||||||
|
autofocus: false,
|
||||||
|
textAlign:TextAlign.end,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
//输入里面输入文字内边距设置
|
||||||
|
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||||
|
hintText: tfStr,
|
||||||
|
//不需要输入框下划线
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10.w,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget whetherTheEmployeeHasAKeyWidget(String title, Function action){
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
|
||||||
|
SizedBox(width: 5.w,),
|
||||||
|
Text(title),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,500 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class CheckingInDetailPage extends StatefulWidget {
|
||||||
|
const CheckingInDetailPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_CheckingInDetailPageState createState() => _CheckingInDetailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||||
|
int _year = DateTime.now().year;
|
||||||
|
int _month = DateTime.now().month;
|
||||||
|
int _day = DateTime.now().day;
|
||||||
|
final List<CalendarModel> _datas = [];
|
||||||
|
final List<CalendarModel> _listDatas = [];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
//设置默认当前月日期
|
||||||
|
_setDatas(year: _year, month: _month);
|
||||||
|
|
||||||
|
//设置模拟数据,日历月事件,可根据接口返回的结果
|
||||||
|
_loadAttendanceMonthRecord( "$_year-$_month");
|
||||||
|
//日历日事件
|
||||||
|
_loadAttendanceDayRecord("$_year-$_month-$_day");
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载月历事件,请求接口
|
||||||
|
_loadAttendanceMonthRecord(String dateTime) async {
|
||||||
|
CalendarModel bean1 = CalendarModel(year: _year,month: _month,day: 1,workType: "2");
|
||||||
|
CalendarModel bean2 = CalendarModel(year: _year,month: _month,day: 2,workType: "1");
|
||||||
|
CalendarModel bean3 = CalendarModel(year: _year,month: _month,day: 3,workType: "2");
|
||||||
|
CalendarModel bean4 = CalendarModel(year: _year,month: _month,day: 4,workType: "0");
|
||||||
|
CalendarModel bean5 = CalendarModel(year: _year,month: _month,day: 5,workType: "0");
|
||||||
|
CalendarModel bean6 = CalendarModel(year: _year,month: _month,day: 6,workType: "1");
|
||||||
|
_listDatas.add(bean1);
|
||||||
|
_listDatas.add(bean2);
|
||||||
|
_listDatas.add(bean3);
|
||||||
|
_listDatas.add(bean4);
|
||||||
|
_listDatas.add(bean5);
|
||||||
|
_listDatas.add(bean6);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
for (int i = 0; i < _datas.length; i++) {
|
||||||
|
for (int j = 0; j < _listDatas.length; j++) {
|
||||||
|
if (_datas[i].year== _listDatas[j].year &&
|
||||||
|
_datas[i].month == _listDatas[j].month &&
|
||||||
|
_datas[i].day == _listDatas[j].day) {
|
||||||
|
_datas[i].workType = _listDatas[j].workType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载日事件,请求接口
|
||||||
|
_loadAttendanceDayRecord(String dateTime) async{
|
||||||
|
//可根据接口返回的内容在日历下面打卡信息或者其余内容
|
||||||
|
print("点击的是$dateTime");
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: TitleAppBar(barTitle:"张三", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
// margin: EdgeInsets.all(20.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
//设置颜色
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(12.r)),
|
||||||
|
//设置四周边框
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
_yearHeader(),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
|
_weekHeader(),
|
||||||
|
_everyDay(),
|
||||||
|
_bottomStatisticsWidget()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
//下面可以添加日事件中的信息,例如打卡信息
|
||||||
|
Container(),
|
||||||
|
],
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
//头部年
|
||||||
|
Widget _yearHeader() {
|
||||||
|
return Container(
|
||||||
|
height: 30,
|
||||||
|
margin: const EdgeInsets.only(top: 10),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_lastMonth();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
// margin: EdgeInsets.only(left: 20.w),
|
||||||
|
child: Image(
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
image: const AssetImage("images/icon_left_black.png"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 60.w,),
|
||||||
|
Text("$_year-$_month", style: TextStyle(fontSize: 34.sp, color: Colors.black, fontWeight: FontWeight.w500)),
|
||||||
|
SizedBox(width: 60.w,),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_nextMonth();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
// margin: EdgeInsets.only(right: 20.sp),
|
||||||
|
child: Image(
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.h,
|
||||||
|
image: const AssetImage("images/icon_right_black.png"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//中部周
|
||||||
|
Widget _weekHeader() {
|
||||||
|
var array = ["一", "二", "三", "四", "五", "六", "日"];
|
||||||
|
return Container(
|
||||||
|
height: 50.h,
|
||||||
|
child: GridView.builder(
|
||||||
|
padding: const EdgeInsets.only(left: 10, right: 10),
|
||||||
|
itemCount: array.length,
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
//横轴元素个数
|
||||||
|
crossAxisCount: 7,
|
||||||
|
//纵轴间距
|
||||||
|
// mainAxisSpacing: ScreenUtil().setHeight(10),
|
||||||
|
// 横轴间距
|
||||||
|
// crossAxisSpacing: ScreenUtil().setWidth(15),
|
||||||
|
//子组件宽高长度比例
|
||||||
|
childAspectRatio: 2),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
array[index],
|
||||||
|
style: TextStyle(
|
||||||
|
color: index == 5 || index == 6
|
||||||
|
? const Color(0xFFC4C8D0)
|
||||||
|
: const Color(0xFF3C3E43),
|
||||||
|
fontSize: 30.sp),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//底部日
|
||||||
|
Widget _everyDay() {
|
||||||
|
return Container(
|
||||||
|
child: GridView.builder(
|
||||||
|
padding: EdgeInsets.only(left: 10.sp, top: 10.sp, right: 10.sp),
|
||||||
|
itemCount: _getRowsForMonthYear(year: _year, month: _month) * 7,
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
//横轴元素个数
|
||||||
|
crossAxisCount: 7,
|
||||||
|
// //纵轴间距
|
||||||
|
// mainAxisSpacing: ScreenUtil().setHeight(10),
|
||||||
|
// // 横轴间距
|
||||||
|
// crossAxisSpacing: ScreenUtil().setWidth(10),
|
||||||
|
//子组件宽高长度比例
|
||||||
|
childAspectRatio: 1),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
if (_datas[index].month == _month) {
|
||||||
|
//判断点击的是否是当月日期,只对当前月点击的日期做处理
|
||||||
|
for (int i = 0; i < _datas.length; i++) {
|
||||||
|
if (i == index) {
|
||||||
|
//切换至选中的日期
|
||||||
|
_day = _datas[i].day;
|
||||||
|
_datas[i].isSelect = true;
|
||||||
|
|
||||||
|
//加载选中的日期事件
|
||||||
|
_loadAttendanceDayRecord( "${_datas[i].year}-${_datas[i].month}-${_datas[i].day}");
|
||||||
|
} else {
|
||||||
|
_datas[i].isSelect = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//不是当月的不做处理
|
||||||
|
// _datas[index].is_select=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
//设置底部背景
|
||||||
|
decoration: _datas[index].isSelect
|
||||||
|
? const BoxDecoration(
|
||||||
|
color: Color(0xFF2C91F6),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
)
|
||||||
|
: const BoxDecoration(),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
//不是当前月不显示值
|
||||||
|
_datas[index].month == _month
|
||||||
|
? _datas[index].day.toString()
|
||||||
|
: "",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
//设置选中字体颜色,以及周末和工作日颜色
|
||||||
|
style: _datas[index].isSelect
|
||||||
|
? TextStyle(
|
||||||
|
fontSize: 32.sp, color: const Color(0xFFFFFFFF))
|
||||||
|
: (index % 7 == 5 || index % 7 == 6
|
||||||
|
? TextStyle(
|
||||||
|
fontSize: 32.sp, color: const Color(0xFFC4C8D0))
|
||||||
|
: TextStyle(
|
||||||
|
fontSize: 32.sp, color: const Color(0xFF3C3E43))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
//设置底部小圆点,非当前月的不显示,设置为透明,其余的根据状态判断显示
|
||||||
|
_datas[index].month == _month &&
|
||||||
|
_datas[index].workType != "" &&
|
||||||
|
_datas[index].workType != "0"
|
||||||
|
? Container(
|
||||||
|
height: 6.0,
|
||||||
|
width: 6.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: _datas[index].workType == "1"
|
||||||
|
? const Color(0xFFF48835)
|
||||||
|
: const Color(0xFF2C91F6)),
|
||||||
|
)
|
||||||
|
: Container(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _bottomStatisticsWidget(){
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 1.sw,
|
||||||
|
// height: 40.h,
|
||||||
|
padding: EdgeInsets.only(left: 50.w,top: 5.h, bottom: 5.h),
|
||||||
|
color: Colors.grey,
|
||||||
|
child: Text("月统计", style: TextStyle(color: Colors.white, fontSize: 32.sp, fontWeight: FontWeight.w500),),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
_bottomStatisticsItemWidget(Colors.red ,"迟到", "0"),
|
||||||
|
_bottomStatisticsItemWidget(Colors.orange ,"早退", "0"),
|
||||||
|
_bottomStatisticsItemWidget(Colors.grey ,"未打卡", "0"),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _bottomStatisticsItemWidget(Color color,String leftTitel, String rightTitle,){
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 70.h,
|
||||||
|
padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(width:20.w),
|
||||||
|
Container(
|
||||||
|
width: 35.w,
|
||||||
|
height: 35.w,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: color,
|
||||||
|
borderRadius:BorderRadius.all(Radius.circular(35.h))
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width:20.w),
|
||||||
|
Expanded(child: Text(leftTitel, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))),
|
||||||
|
SizedBox(width:20.w),
|
||||||
|
Text(rightTitle, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500)),
|
||||||
|
SizedBox(width:10.w),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(height: 0.5.h, color: Colors.grey,)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取行数
|
||||||
|
int _getRowsForMonthYear({int year, int month}) {
|
||||||
|
//当前月天数
|
||||||
|
var currentMonthDays = _getCurrentMonthDays(year: year, month: month);
|
||||||
|
//
|
||||||
|
var placeholderDays = _getPlaceholderDays(year: year, month: month);
|
||||||
|
|
||||||
|
int rows = (currentMonthDays + placeholderDays) ~/ 7;
|
||||||
|
|
||||||
|
int remainder = (currentMonthDays + placeholderDays) % 7;
|
||||||
|
if (remainder > 0) {
|
||||||
|
rows = rows + 1;
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 得到这个月的第一天是星期几
|
||||||
|
int _getPlaceholderDays({int year, int month}) {
|
||||||
|
return DateTime(year, month).weekday - 1 % 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前月份天数
|
||||||
|
int _getCurrentMonthDays({int year, int month}) {
|
||||||
|
if (month == 2) {
|
||||||
|
//判断2月份是闰年月还是平年
|
||||||
|
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
|
||||||
|
return 29;
|
||||||
|
} else {
|
||||||
|
return 28;
|
||||||
|
}
|
||||||
|
} else if (month == 1 ||
|
||||||
|
month == 3 ||
|
||||||
|
month == 5 ||
|
||||||
|
month == 7 ||
|
||||||
|
month == 8 ||
|
||||||
|
month == 10 ||
|
||||||
|
month == 12) {
|
||||||
|
return 31;
|
||||||
|
} else {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 获取展示信息
|
||||||
|
_setDatas({int year, int month}) {
|
||||||
|
/// 上个月占位
|
||||||
|
var lastYear = year;
|
||||||
|
var lastMonth = month - 1;
|
||||||
|
if (month == 1) {
|
||||||
|
lastYear = year - 1;
|
||||||
|
lastMonth = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
var placeholderDays = _getPlaceholderDays(year: year, month: month);
|
||||||
|
var lastMonthDays = _getCurrentMonthDays(year: lastYear, month: lastMonth);
|
||||||
|
var firstDay = lastMonthDays - placeholderDays;
|
||||||
|
for (var i = 0; i < placeholderDays; i++) {
|
||||||
|
_datas.add(CalendarModel(
|
||||||
|
year: lastYear,
|
||||||
|
month: lastMonth,
|
||||||
|
day: firstDay + i + 1,
|
||||||
|
isSelect: false,
|
||||||
|
workType: ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 本月显示
|
||||||
|
var currentMonthDays = _getCurrentMonthDays(year: year, month: month);
|
||||||
|
for (var i = 0; i < currentMonthDays; i++) {
|
||||||
|
if (i == _day - 1) {
|
||||||
|
_datas.add(CalendarModel(
|
||||||
|
year: year,
|
||||||
|
month: month,
|
||||||
|
day: i + 1,
|
||||||
|
isSelect: true,
|
||||||
|
workType: ""));
|
||||||
|
} else {
|
||||||
|
_datas.add(CalendarModel(
|
||||||
|
year: year,
|
||||||
|
month: month,
|
||||||
|
day: i + 1,
|
||||||
|
isSelect: false,
|
||||||
|
workType: ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 下个月占位
|
||||||
|
var nextYear = year;
|
||||||
|
var nextMonth = month + 1;
|
||||||
|
if (month == 12) {
|
||||||
|
nextYear = year + 1;
|
||||||
|
nextMonth = 1;
|
||||||
|
}
|
||||||
|
var nextPlaceholderDays =
|
||||||
|
_getPlaceholderDays(year: nextYear, month: nextMonth);
|
||||||
|
for (var i = 0; i < 7 - nextPlaceholderDays; i++) {
|
||||||
|
_datas.add(CalendarModel(
|
||||||
|
year: nextYear,
|
||||||
|
month: nextMonth,
|
||||||
|
day: i + 1,
|
||||||
|
isSelect: false,
|
||||||
|
workType: ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上月
|
||||||
|
_lastMonth() {
|
||||||
|
setState(() {
|
||||||
|
if (_month == 1) {
|
||||||
|
_year = _year - 1;
|
||||||
|
_month = 12;
|
||||||
|
} else {
|
||||||
|
_month = _month - 1;
|
||||||
|
}
|
||||||
|
_day = 1; //查看上一个月时,默认选中的为第一天
|
||||||
|
_datas.clear();
|
||||||
|
_setDatas(year: _year, month: _month);
|
||||||
|
//更新月历事件
|
||||||
|
_loadAttendanceMonthRecord( "$_year-$_month");
|
||||||
|
//更新日事件
|
||||||
|
_loadAttendanceDayRecord("$_year-$_month-$_day");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下月
|
||||||
|
_nextMonth() {
|
||||||
|
if(_month==12){//当前月是12月,下一个月就是下一年
|
||||||
|
if(DateTime.now().year>=_year+1){//判断下一年是否大于当前年
|
||||||
|
_setNextMonthData();
|
||||||
|
}
|
||||||
|
}else{//当前月不是12月,还处于当前年
|
||||||
|
if(DateTime.now().month>=_month+1){
|
||||||
|
//判断下一个月是否超过当前月,超过当前月不做操作
|
||||||
|
_setNextMonthData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置下个月的数据
|
||||||
|
_setNextMonthData(){
|
||||||
|
setState(() {
|
||||||
|
if (_month == 12) {
|
||||||
|
_year = _year + 1;
|
||||||
|
_month = 1;
|
||||||
|
} else {
|
||||||
|
_month = _month + 1;
|
||||||
|
}
|
||||||
|
if (_month == DateTime.now().month) {
|
||||||
|
//如果下个月时当前月,默认选中当天
|
||||||
|
_day = DateTime.now().day;
|
||||||
|
} else {
|
||||||
|
//如果不是当前月,默认选中第一天
|
||||||
|
_day = 1;
|
||||||
|
}
|
||||||
|
_datas.clear();
|
||||||
|
_setDatas(year: _year, month: _month);
|
||||||
|
//更新月历事件
|
||||||
|
_loadAttendanceMonthRecord( "$_year-$_month");
|
||||||
|
//更新日事件
|
||||||
|
_loadAttendanceDayRecord("$_year-$_month-$_day");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//日历bean
|
||||||
|
class CalendarModel {
|
||||||
|
int year;
|
||||||
|
int month;
|
||||||
|
int day;
|
||||||
|
String workType = "";//日期事件,0,休息,1,异常,2,正常
|
||||||
|
bool isSelect = false;
|
||||||
|
|
||||||
|
CalendarModel(
|
||||||
|
{this.year, this.month, this.day, this.isSelect, this.workType});
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@ import 'package:get/get.dart';
|
|||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/showBottomSheetTool.dart';
|
import '../../../../tools/showBottomSheetTool.dart';
|
||||||
|
import '../../../../tools/showCalendar.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
@ -31,14 +32,157 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
|||||||
SizedBox(width: 30.w,),
|
SizedBox(width: 30.w,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: ListView.builder(
|
body: Column(
|
||||||
itemCount:10,
|
children: [
|
||||||
itemBuilder: (c, index){
|
topInfo(),
|
||||||
return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
SizedBox(height: 10.h,),
|
||||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
middleDayInfo(),
|
||||||
});
|
Expanded(child: bottomList())
|
||||||
}
|
],
|
||||||
)
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget topInfo(){
|
||||||
|
return Container(
|
||||||
|
width: 1.sw,
|
||||||
|
// height: 370.h,
|
||||||
|
color: Colors.white,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 30.h,),
|
||||||
|
Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w),
|
||||||
|
SizedBox(height: 10.h,),
|
||||||
|
Text(TranslationLoader.lanKeys.noAttendanceRecord.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)),
|
||||||
|
SizedBox(height: 30.h,),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// SizedBox(width: 30.w,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 40.w,),
|
||||||
|
Container(
|
||||||
|
// width: 150.w,
|
||||||
|
height: 70.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Text(TranslationLoader.lanKeys.dailyCharts.tr, style: TextStyle(color: AppColors.mainColor)),
|
||||||
|
Container(width: 20.w, height: 2.h, color: AppColors.mainColor)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 40.w,),
|
||||||
|
Container(
|
||||||
|
// width: 100.w,
|
||||||
|
height: 70.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Text(TranslationLoader.lanKeys.monthlyLeaderboard.tr, style: TextStyle(color: Colors.black)),
|
||||||
|
Container(width: 20.w, height: 2.h, color: Colors.black)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
await showDialog(context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){
|
||||||
|
Navigator.of(context).pop(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text("07-12", style: const TextStyle(color: Colors.black),),
|
||||||
|
Image.asset('images/icon_grayPullDown.png', width: 50.w, height: 30.w,),
|
||||||
|
SizedBox(width: 10.w,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// Container(height: 10.h, color: AppColors.mainBackgroundColor,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget middleDayInfo(){
|
||||||
|
return Visibility(
|
||||||
|
visible: true,
|
||||||
|
child: Container(
|
||||||
|
height: 80.h,
|
||||||
|
color: Colors.white,
|
||||||
|
margin: EdgeInsets.only(left:15.h, right: 15.h, bottom: 10.h),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
// width: 100.w,
|
||||||
|
// height: 80.h,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
Text("0", style: TextStyle(color: Colors.black)),
|
||||||
|
Text(TranslationLoader.lanKeys.beLate.tr, style: TextStyle(color: Colors.black)),
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
// width: 100.w,
|
||||||
|
// height: 80.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
Text("0", style: TextStyle(color: Colors.black)),
|
||||||
|
Text(TranslationLoader.lanKeys.leaveEarly.tr, style: TextStyle(color: Colors.black)),
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
// width: 100.w,
|
||||||
|
// height: 80.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
Text("0", style: TextStyle(color: Colors.black)),
|
||||||
|
Text(TranslationLoader.lanKeys.noCardPunched.tr, style: TextStyle(color: Colors.black)),
|
||||||
|
SizedBox(height: 5.h,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget bottomList(){
|
||||||
|
return ListView.separated(
|
||||||
|
itemCount:10,
|
||||||
|
itemBuilder: (c, index){
|
||||||
|
return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||||
|
Navigator.pushNamed(context, Routers.checkingInDetailPage);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return const Divider(height:1, color: Colors.grey);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +190,8 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 100.h,
|
height: 80.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
borderRadius: BorderRadius.circular(10.w),
|
||||||
@ -55,36 +199,24 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(width: 30.w,),
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
Text("1", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(width: 20.w,),
|
||||||
Expanded(
|
Container(
|
||||||
child: Column(
|
width: 60.h, height: 60.h,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
decoration: BoxDecoration(
|
||||||
children: [
|
color: AppColors.mainColor,
|
||||||
Container(
|
border: Border.all(width: 1, color: AppColors.mainColor),
|
||||||
// color: Colors.red,
|
borderRadius: BorderRadius.circular(30.h),
|
||||||
child: Row(
|
),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
padding: EdgeInsets.all(10.w),
|
||||||
children: [
|
child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 40.w, height: 40.w, color: Colors.white,)
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
|
||||||
SizedBox(width:20.w),
|
|
||||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width:20.w),
|
|
||||||
Container(
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width:20.h),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 20.w,),
|
||||||
|
Expanded(
|
||||||
|
child: Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||||
|
),
|
||||||
|
SizedBox(width:20.h),
|
||||||
|
Image.asset("images/icon_right.png", width: 50.w, height: 50.w,),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width:20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
|||||||
Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet);
|
Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet);
|
||||||
}),
|
}),
|
||||||
CommonItem(leftTitel:TranslationLoader.lanKeys.holidays.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
CommonItem(leftTitel:TranslationLoader.lanKeys.holidays.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||||
// Navigator.pushNamed(context, Routers.lockEscalationPage);
|
Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage);
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 30.h,),
|
SizedBox(height: 30.h,),
|
||||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys.delete.tr} ${TranslationLoader.lanKeys.company.tr}",
|
SubmitBtn(btnName: "${TranslationLoader.lanKeys.delete.tr} ${TranslationLoader.lanKeys.company.tr}",
|
||||||
|
|||||||
@ -26,11 +26,11 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
|||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)),
|
CommonItem(leftTitel:TranslationLoader.lanKeys.name.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)),
|
||||||
CommonItem(leftTitel:"打卡方式", rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
|
CommonItem(leftTitel:TranslationLoader.lanKeys.punchingMode.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){
|
||||||
_showSeletClockInType();
|
_showSeletClockInType();
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 10.h,),
|
SizedBox(height: 10.h,),
|
||||||
CommonItem(leftTitel:"员工是否有钥匙", rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row(
|
CommonItem(leftTitel:TranslationLoader.lanKeys.whetherTheEmployeeHasAKey.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row(
|
||||||
children: [
|
children: [
|
||||||
whetherTheEmployeeHasAKeyWidget("有", (){
|
whetherTheEmployeeHasAKeyWidget("有", (){
|
||||||
|
|
||||||
@ -43,11 +43,11 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
|||||||
)),
|
)),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible:true,
|
visible:true,
|
||||||
child: CommonItem(leftTitel:"账号", rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("请输入员工账号")),
|
child: CommonItem(leftTitel:TranslationLoader.lanKeys.accountNumber.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys.pleaseEnter.tr)),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible:true,
|
visible:true,
|
||||||
child: CommonItem(leftTitel:"选择钥匙", rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
child: CommonItem(leftTitel:TranslationLoader.lanKeys.selectKey.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||||
_showSeletClockInType();
|
_showSeletClockInType();
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@ -65,7 +65,8 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
|||||||
Widget getTFWidget(String tfStr){
|
Widget getTFWidget(String tfStr){
|
||||||
return Container(
|
return Container(
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
width: 500.w,
|
width: 300.w,
|
||||||
|
// color: Colors.red,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -0,0 +1,187 @@
|
|||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_pickers/pickers.dart';
|
||||||
|
import 'package:flutter_pickers/style/default_style.dart';
|
||||||
|
import 'package:flutter_pickers/style/picker_style.dart';
|
||||||
|
import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
||||||
|
import 'package:flutter_pickers/time_picker/model/pduration.dart';
|
||||||
|
import 'package:flutter_pickers/time_picker/model/suffix.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../appRouters.dart';
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/showBottomSheetTool.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
class CheckingInSetHolidaysPage extends StatefulWidget {
|
||||||
|
const CheckingInSetHolidaysPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CheckingInSetHolidaysPage> createState() => _CheckingInSetHolidaysPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(haveTitleWidget: true, titleWidget:titleWidget(), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
Navigator.pushNamed(context, Routers.checkingInAddHolidaysPage);
|
||||||
|
},
|
||||||
|
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
|
||||||
|
),
|
||||||
|
SizedBox(width: 30.w,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: ListView.builder(
|
||||||
|
itemCount:10,
|
||||||
|
itemBuilder: (c, index){
|
||||||
|
return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||||
|
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function action){
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: action,
|
||||||
|
child: Container(
|
||||||
|
height: 140.h,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(10.w),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
color: const Color(0xFFAFB5D7),
|
||||||
|
width: 100.w,
|
||||||
|
height: 140.h,
|
||||||
|
child: Center(child: Text("7\n${TranslationLoader.lanKeys.month.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),))
|
||||||
|
),
|
||||||
|
SizedBox(width: 30.w,),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600), ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height:10.h),
|
||||||
|
Container(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text("${TranslationLoader.lanKeys.libertyDay.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height:5.h),
|
||||||
|
Container(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text("${TranslationLoader.lanKeys.coverDate.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width:20.h),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget titleWidget(){
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
showListType();
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text("${DateTime.now().year}${TranslationLoader.lanKeys.year.tr}", style: const TextStyle(color: Colors.white),),
|
||||||
|
SizedBox(width: 5.w,),
|
||||||
|
Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showListType(){
|
||||||
|
Pickers.showDatePicker(
|
||||||
|
context,
|
||||||
|
// 模式,详见下方
|
||||||
|
mode: DateMode.Y,
|
||||||
|
// 后缀 默认Suffix.normal(),为空的话Suffix()
|
||||||
|
suffix: Suffix(years: ' 年'),
|
||||||
|
// 样式 详见下方样式
|
||||||
|
pickerStyle: PickerStyle(
|
||||||
|
cancelButton:GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||||
|
child: Text(TranslationLoader.lanKeys.cancel.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
commitButton: GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||||
|
child: Text(TranslationLoader.lanKeys.sure.tr,
|
||||||
|
style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 默认选中
|
||||||
|
selectDate: PDuration(year: 2023),
|
||||||
|
minDate: PDuration(year: 1900),
|
||||||
|
maxDate: PDuration(year: 2100),
|
||||||
|
onConfirm: (p) {
|
||||||
|
print('longer >>> 返回数据:$p');
|
||||||
|
},
|
||||||
|
// onChanged: (p) => print(p),
|
||||||
|
);
|
||||||
|
// var list = [TranslationLoader.lanKeys.earlyArrivalList.tr, TranslationLoader.lanKeys.lateList.tr, TranslationLoader.lanKeys.hardWorkingList.tr];
|
||||||
|
// ShowBottomSheetTool().showSingleRowPicker(
|
||||||
|
// //上下文
|
||||||
|
// context,
|
||||||
|
// //默认的索引
|
||||||
|
// normalIndex: 0,
|
||||||
|
// title: "",
|
||||||
|
// cancelTitle: TranslationLoader.lanKeys.cancel.tr,
|
||||||
|
// sureTitle: TranslationLoader.lanKeys.sure.tr,
|
||||||
|
// //要显示的列表
|
||||||
|
// //可自定义数据适配器
|
||||||
|
// //adapter: PickerAdapter(),
|
||||||
|
// data: list,
|
||||||
|
// //选择事件的回调
|
||||||
|
// clickCallBack: (int index, var str) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -29,12 +29,12 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
|
|||||||
Widget buildMainUI(){
|
Widget buildMainUI(){
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(leftTitel:"上班时间", rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){
|
CommonItem(leftTitel:TranslationLoader.lanKeys.officeHours.tr, rightTitle:"11:49", isHaveDirection: true, isHaveLine: true, action:(){
|
||||||
// ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<int> index) {
|
// ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<int> index) {
|
||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
}),
|
}),
|
||||||
CommonItem(leftTitel:"下班时间", rightTitle:"11:49", isHaveDirection: true, action:(){
|
CommonItem(leftTitel:TranslationLoader.lanKeys.closingTime.tr, rightTitle:"11:49", isHaveDirection: true, action:(){
|
||||||
// ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List<int> index) {
|
// ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List<int> index) {
|
||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Center(child: Text("自定义", style: TextStyle(fontSize: 32.sp, color: Colors.white))),
|
Center(child: Text(TranslationLoader.lanKeys.custom.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -72,10 +72,11 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
|||||||
width: (1.sw - 10*3)/2,
|
width: (1.sw - 10*3)/2,
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
|
padding: EdgeInsets.all(10.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Center(child: Text("单双休", style: TextStyle(fontSize: 32.sp, color: Colors.white))),
|
Expanded(child: Center(child: Text(TranslationLoader.lanKeys.oddOrEvenDaysOff.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -89,15 +90,15 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
|||||||
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(leftTitel:"本周", rightTitle:"", allHeight:70.h, isHaveLine: true),
|
CommonItem(leftTitel:TranslationLoader.lanKeys.thisWeek.tr, rightTitle:"", allHeight:70.h, isHaveLine: true),
|
||||||
CommonItem(leftTitel:"单休", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.singleDayWeekend.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"双休", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.twoDaysOff.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
@ -115,49 +116,49 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
|||||||
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(leftTitel:"星期一", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.monday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期二", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.tuesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期三", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.wednesday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期四", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.thursday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期五", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.friday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期六", rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.saturday.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||||
),
|
),
|
||||||
CommonItem(leftTitel:"星期日", rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
CommonItem(leftTitel:TranslationLoader.lanKeys.sunday.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
|
|
||||||
|
|||||||
@ -67,25 +67,25 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
|||||||
String dateStr;
|
String dateStr;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
dateStr = TranslationLoader.lanKeys.Sunday.tr;
|
dateStr = TranslationLoader.lanKeys.sundayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
dateStr = TranslationLoader.lanKeys.Monday.tr;
|
dateStr = TranslationLoader.lanKeys.mondayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dateStr = TranslationLoader.lanKeys.Tuesday.tr;
|
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
dateStr = TranslationLoader.lanKeys.Wednesday.tr;
|
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
dateStr = TranslationLoader.lanKeys.Thursday.tr;
|
dateStr = TranslationLoader.lanKeys.thursdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
dateStr = TranslationLoader.lanKeys.Friday.tr;
|
dateStr = TranslationLoader.lanKeys.fridayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
dateStr = TranslationLoader.lanKeys.Saturday.tr;
|
dateStr = TranslationLoader.lanKeys.saturdayShort.tr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -102,25 +102,25 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
|||||||
String dateStr;
|
String dateStr;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
dateStr = TranslationLoader.lanKeys.Sunday.tr;
|
dateStr = TranslationLoader.lanKeys.sundayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
dateStr = TranslationLoader.lanKeys.Monday.tr;
|
dateStr = TranslationLoader.lanKeys.mondayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dateStr = TranslationLoader.lanKeys.Tuesday.tr;
|
dateStr = TranslationLoader.lanKeys.tuesdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
dateStr = TranslationLoader.lanKeys.Wednesday.tr;
|
dateStr = TranslationLoader.lanKeys.wednesdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
dateStr = TranslationLoader.lanKeys.Thursday.tr;
|
dateStr = TranslationLoader.lanKeys.thursdayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
dateStr = TranslationLoader.lanKeys.Friday.tr;
|
dateStr = TranslationLoader.lanKeys.fridayShort.tr;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
dateStr = TranslationLoader.lanKeys.Saturday.tr;
|
dateStr = TranslationLoader.lanKeys.saturdayShort.tr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
54
star_lock/lib/tools/showCalendar.dart
Normal file
54
star_lock/lib/tools/showCalendar.dart
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
typedef SeletDateCallback(DateTime dateTime);
|
||||||
|
|
||||||
|
class ShowCalendar extends StatelessWidget {
|
||||||
|
SeletDateCallback seletAction;
|
||||||
|
DatePickerMode datePickerMode;
|
||||||
|
|
||||||
|
ShowCalendar({Key key, this.seletAction, this.datePickerMode}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
// insetPadding: EdgeInsets.all(10), //距离
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20))), //形状
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
clipBehavior: Clip.antiAlias, //强制裁剪
|
||||||
|
elevation: 10,
|
||||||
|
child: SizedBox(
|
||||||
|
//需要在内部限制下高度和宽度才能更好的显示
|
||||||
|
height: 350,
|
||||||
|
width: 1.sw - 40.w,
|
||||||
|
child: _calendarDatePicker(datePickerMode),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
CalendarDatePicker _calendarDatePicker(DatePickerMode mode){
|
||||||
|
return CalendarDatePicker(
|
||||||
|
initialDate: DateTime.now(), // 初始化选中日期
|
||||||
|
// currentDate: DateTime(2020, 10, 18),
|
||||||
|
firstDate: DateTime(2000, 1, 1), // 开始日期
|
||||||
|
lastDate: DateTime(2100, 1, 1), // 结束日期
|
||||||
|
initialCalendarMode: mode, // 日期选择样式
|
||||||
|
// 选中日期改变回调函数
|
||||||
|
onDateChanged:seletAction,
|
||||||
|
// 月份改变回调函数
|
||||||
|
onDisplayedMonthChanged: (dateTime){
|
||||||
|
print("onDisplayedMonthChanged $dateTime");
|
||||||
|
},
|
||||||
|
// 筛选日期可不可点回调函数
|
||||||
|
selectableDayPredicate: (dayTime){
|
||||||
|
if(dayTime == DateTime(2020, 10, 15) || dayTime == DateTime(2020, 10, 16) || dayTime == DateTime(2020, 10, 17)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,13 +27,20 @@ class LanKeyEntity {
|
|||||||
this.failureTime,
|
this.failureTime,
|
||||||
this.effectiveDate,
|
this.effectiveDate,
|
||||||
this.failureDate,
|
this.failureDate,
|
||||||
this.Monday,
|
this.monday,
|
||||||
this.Tuesday,
|
this.tuesday,
|
||||||
this.Wednesday,
|
this.wednesday,
|
||||||
this.Thursday,
|
this.thursday,
|
||||||
this.Friday,
|
this.friday,
|
||||||
this.Saturday,
|
this.saturday,
|
||||||
this.Sunday,
|
this.sunday,
|
||||||
|
this.mondayShort,
|
||||||
|
this.tuesdayShort,
|
||||||
|
this.wednesdayShort,
|
||||||
|
this.thursdayShort,
|
||||||
|
this.fridayShort,
|
||||||
|
this.saturdayShort,
|
||||||
|
this.sundayShort,
|
||||||
|
|
||||||
this.realNameAuthentication,
|
this.realNameAuthentication,
|
||||||
this.sendKeyBottomTip,
|
this.sendKeyBottomTip,
|
||||||
@ -151,6 +158,32 @@ class LanKeyEntity {
|
|||||||
this.work,
|
this.work,
|
||||||
this.workday,
|
this.workday,
|
||||||
this.holidays,
|
this.holidays,
|
||||||
|
this.punchingMode,
|
||||||
|
this.whetherTheEmployeeHasAKey,
|
||||||
|
this.selectKey,
|
||||||
|
this.officeHours,
|
||||||
|
this.closingTime,
|
||||||
|
this.thisWeek,
|
||||||
|
this.singleDayWeekend,
|
||||||
|
this.twoDaysOff,
|
||||||
|
this.oddOrEvenDaysOff,
|
||||||
|
this.year,
|
||||||
|
this.month,
|
||||||
|
this.libertyDay,
|
||||||
|
this.coverDate,
|
||||||
|
this.addedHoliday,
|
||||||
|
this.startDate,
|
||||||
|
this.accessDate,
|
||||||
|
this.mustFillIn,
|
||||||
|
this.endDate,
|
||||||
|
this.dailyCharts,
|
||||||
|
this.monthlyLeaderboard,
|
||||||
|
this.noAttendanceRecord,
|
||||||
|
this.everyoneIsVeryMotivated,
|
||||||
|
this.workingHoursWereNotReleased,
|
||||||
|
this.beLate,
|
||||||
|
this.leaveEarly,
|
||||||
|
this.noCardPunched,
|
||||||
|
|
||||||
this.lanEnglish,
|
this.lanEnglish,
|
||||||
this.lanChinese,
|
this.lanChinese,
|
||||||
@ -244,13 +277,20 @@ class LanKeyEntity {
|
|||||||
failureTime = json['failureTime'];
|
failureTime = json['failureTime'];
|
||||||
effectiveDate = json['effectiveDate'];
|
effectiveDate = json['effectiveDate'];
|
||||||
failureDate = json['failureDate'];
|
failureDate = json['failureDate'];
|
||||||
Monday = json['Monday'];
|
monday = json['monday'];
|
||||||
Tuesday = json['Tuesday'];
|
tuesday = json['tuesday'];
|
||||||
Wednesday = json['Wednesday'];
|
wednesday = json['wednesday'];
|
||||||
Thursday = json['Thursday'];
|
thursday = json['thursday'];
|
||||||
Friday = json['Friday'];
|
friday = json['friday'];
|
||||||
Saturday = json['Saturday'];
|
saturday = json['saturday'];
|
||||||
Sunday = json['Sunday'];
|
sunday = json['sunday'];
|
||||||
|
mondayShort = json['mondayShort'];
|
||||||
|
tuesdayShort = json['tuesdayShort'];
|
||||||
|
wednesdayShort = json['wednesdayShort'];
|
||||||
|
thursdayShort = json['thursdayShort'];
|
||||||
|
fridayShort = json['fridayShort'];
|
||||||
|
saturdayShort = json['saturdayShort'];
|
||||||
|
sundayShort = json['sundayShort'];
|
||||||
|
|
||||||
realNameAuthentication = json['realNameAuthentication'];
|
realNameAuthentication = json['realNameAuthentication'];
|
||||||
sendKeyBottomTip = json['sendKeyBottomTip'];
|
sendKeyBottomTip = json['sendKeyBottomTip'];
|
||||||
@ -368,6 +408,32 @@ class LanKeyEntity {
|
|||||||
work = json['work'];
|
work = json['work'];
|
||||||
workday = json['workday'];
|
workday = json['workday'];
|
||||||
holidays = json['holidays'];
|
holidays = json['holidays'];
|
||||||
|
punchingMode = json['punchingMode'];
|
||||||
|
whetherTheEmployeeHasAKey = json['whetherTheEmployeeHasAKey'];
|
||||||
|
selectKey = json['selectKey'];
|
||||||
|
officeHours = json['officeHours'];
|
||||||
|
closingTime = json['closingTime'];
|
||||||
|
thisWeek = json['thisWeek'];
|
||||||
|
singleDayWeekend = json['singleDayWeekend'];
|
||||||
|
twoDaysOff = json['twoDaysOff'];
|
||||||
|
oddOrEvenDaysOff = json['oddOrEvenDaysOff'];
|
||||||
|
year = json['year'];
|
||||||
|
month = json['month'];
|
||||||
|
libertyDay = json['libertyDay'];
|
||||||
|
coverDate = json['coverDate'];
|
||||||
|
addedHoliday = json['addedHoliday'];
|
||||||
|
startDate = json['startDate'];
|
||||||
|
accessDate = json['accessDate'];
|
||||||
|
mustFillIn = json['mustFillIn'];
|
||||||
|
endDate = json['endDate'];
|
||||||
|
dailyCharts = json['dailyCharts'];
|
||||||
|
monthlyLeaderboard = json['monthlyLeaderboard'];
|
||||||
|
noAttendanceRecord = json['noAttendanceRecord'];
|
||||||
|
everyoneIsVeryMotivated = json['everyoneIsVeryMotivated'];
|
||||||
|
workingHoursWereNotReleased = json['workingHoursWereNotReleased'];
|
||||||
|
beLate = json['beLate'];
|
||||||
|
leaveEarly = json['leaveEarly'];
|
||||||
|
noCardPunched = json['noCardPunched'];
|
||||||
|
|
||||||
lanEnglish = json['lanEnglish'];
|
lanEnglish = json['lanEnglish'];
|
||||||
lanChinese = json['lanChinese'];
|
lanChinese = json['lanChinese'];
|
||||||
@ -459,13 +525,20 @@ class LanKeyEntity {
|
|||||||
String failureTime;
|
String failureTime;
|
||||||
String effectiveDate;
|
String effectiveDate;
|
||||||
String failureDate;
|
String failureDate;
|
||||||
String Monday;
|
String monday;
|
||||||
String Tuesday;
|
String tuesday;
|
||||||
String Wednesday;
|
String wednesday;
|
||||||
String Thursday;
|
String thursday;
|
||||||
String Friday;
|
String friday;
|
||||||
String Saturday;
|
String saturday;
|
||||||
String Sunday;
|
String sunday;
|
||||||
|
String mondayShort;
|
||||||
|
String tuesdayShort;
|
||||||
|
String wednesdayShort;
|
||||||
|
String thursdayShort;
|
||||||
|
String fridayShort;
|
||||||
|
String saturdayShort;
|
||||||
|
String sundayShort;
|
||||||
|
|
||||||
String realNameAuthentication;
|
String realNameAuthentication;
|
||||||
String sendKeyBottomTip;
|
String sendKeyBottomTip;
|
||||||
@ -548,6 +621,33 @@ class LanKeyEntity {
|
|||||||
String work;
|
String work;
|
||||||
String workday;
|
String workday;
|
||||||
String holidays;
|
String holidays;
|
||||||
|
String punchingMode;
|
||||||
|
String whetherTheEmployeeHasAKey;
|
||||||
|
String selectKey;
|
||||||
|
String officeHours;
|
||||||
|
String closingTime;
|
||||||
|
String thisWeek;
|
||||||
|
String singleDayWeekend;
|
||||||
|
String twoDaysOff;
|
||||||
|
String oddOrEvenDaysOff;
|
||||||
|
String year;
|
||||||
|
String month;
|
||||||
|
String libertyDay;
|
||||||
|
String coverDate;
|
||||||
|
String addedHoliday;
|
||||||
|
String startDate;
|
||||||
|
String accessDate;
|
||||||
|
String mustFillIn;
|
||||||
|
String endDate;
|
||||||
|
String dailyCharts;
|
||||||
|
String monthlyLeaderboard;
|
||||||
|
String noAttendanceRecord;
|
||||||
|
String everyoneIsVeryMotivated;
|
||||||
|
String workingHoursWereNotReleased;
|
||||||
|
String beLate;
|
||||||
|
String leaveEarly;
|
||||||
|
String noCardPunched;
|
||||||
|
|
||||||
|
|
||||||
String basicInformation;
|
String basicInformation;
|
||||||
String wirelessKeyboard;
|
String wirelessKeyboard;
|
||||||
@ -676,13 +776,20 @@ class LanKeyEntity {
|
|||||||
map['failureTime'] = failureTime;
|
map['failureTime'] = failureTime;
|
||||||
map['effectiveDate'] = effectiveDate;
|
map['effectiveDate'] = effectiveDate;
|
||||||
map['failureDate'] = failureDate;
|
map['failureDate'] = failureDate;
|
||||||
map['Monday'] = Monday;
|
map['monday'] = monday;
|
||||||
map['Tuesday'] = Tuesday;
|
map['tuesday'] = tuesday;
|
||||||
map['Wednesday'] = Wednesday;
|
map['wednesday'] = wednesday;
|
||||||
map['Thursday'] = Thursday;
|
map['thursday'] = thursday;
|
||||||
map['Friday'] = Friday;
|
map['friday'] = friday;
|
||||||
map['Saturday'] = Saturday;
|
map['saturday'] = saturday;
|
||||||
map['Sunday'] = Sunday;
|
map['sunday'] = sunday;
|
||||||
|
map['mondayShort'] = mondayShort;
|
||||||
|
map['tuesdayShort'] = tuesdayShort;
|
||||||
|
map['wednesdayShort'] = wednesdayShort;
|
||||||
|
map['thursdayShort'] = thursdayShort;
|
||||||
|
map['fridayShort'] = fridayShort;
|
||||||
|
map['saturdayShort'] = saturdayShort;
|
||||||
|
map['sundayShort'] = sundayShort;
|
||||||
|
|
||||||
map['realNameAuthentication'] = realNameAuthentication;
|
map['realNameAuthentication'] = realNameAuthentication;
|
||||||
map['sendKeyBottomTip'] = sendKeyBottomTip;
|
map['sendKeyBottomTip'] = sendKeyBottomTip;
|
||||||
@ -801,7 +908,33 @@ class LanKeyEntity {
|
|||||||
map['work'] = work;
|
map['work'] = work;
|
||||||
map['workday'] = workday;
|
map['workday'] = workday;
|
||||||
map['holidays'] = holidays;
|
map['holidays'] = holidays;
|
||||||
|
map['punchingMode'] = punchingMode;
|
||||||
|
map['whetherTheEmployeeHasAKey'] = whetherTheEmployeeHasAKey;
|
||||||
|
map['selectKey'] = selectKey;
|
||||||
|
map['officeHours'] = officeHours;
|
||||||
|
map['closingTime'] = closingTime;
|
||||||
|
map['thisWeek'] = thisWeek;
|
||||||
|
map['singleDayWeekend'] = singleDayWeekend;
|
||||||
|
map['twoDaysOff'] = twoDaysOff;
|
||||||
|
map['oddOrEvenDaysOff'] = oddOrEvenDaysOff;
|
||||||
|
map['year'] = year;
|
||||||
|
map['month'] = month;
|
||||||
|
map['libertyDay'] = libertyDay;
|
||||||
|
map['coverDate'] = coverDate;
|
||||||
|
map['addedHoliday'] = addedHoliday;
|
||||||
|
map['startDate'] = startDate;
|
||||||
|
map['accessDate'] = accessDate;
|
||||||
|
map['mustFillIn'] = mustFillIn;
|
||||||
|
map['endDate'] = endDate;
|
||||||
|
map['dailyCharts'] = dailyCharts;
|
||||||
|
map['monthlyLeaderboard'] = monthlyLeaderboard;
|
||||||
|
map['noAttendanceRecord'] = noAttendanceRecord;
|
||||||
|
map['everyoneIsVeryMotivated'] = everyoneIsVeryMotivated;
|
||||||
|
map['workingHoursWereNotReleased'] = workingHoursWereNotReleased;
|
||||||
|
map['beLate'] = beLate;
|
||||||
|
map['leaveEarly'] = leaveEarly;
|
||||||
|
map['noCardPunched'] = noCardPunched;
|
||||||
|
|
||||||
map['lanEnglish'] = lanEnglish;
|
map['lanEnglish'] = lanEnglish;
|
||||||
map['lanChinese'] = lanChinese;
|
map['lanChinese'] = lanChinese;
|
||||||
map['multilingual'] = multilingual;
|
map['multilingual'] = multilingual;
|
||||||
|
|||||||
@ -58,7 +58,10 @@ dependencies:
|
|||||||
flutter_picker: ^2.1.0
|
flutter_picker: ^2.1.0
|
||||||
#生成二维码
|
#生成二维码
|
||||||
qr_flutter: ^4.0.0
|
qr_flutter: ^4.0.0
|
||||||
|
#底部选择
|
||||||
|
flutter_pickers: ^2.1.9
|
||||||
|
#万年历
|
||||||
|
syncfusion_flutter_datepicker: ^18.4.48
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user