fix:修复 开锁页-考勤-设置-节假日-姓名 输长位的显示半截,另输完后显示不全,应限制30位
This commit is contained in:
parent
a394c339a2
commit
faf006c677
@ -1,7 +1,9 @@
|
|||||||
import 'package:date_format/date_format.dart';
|
import 'package:date_format/date_format.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/checkingIn/checkingInHolidays/checkingInAddHolidays/checkingInAddHolidays_state.dart';
|
||||||
|
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/commonItem.dart';
|
import '../../../../../tools/commonItem.dart';
|
||||||
@ -20,8 +22,10 @@ class CheckingInAddHolidaysPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||||
final logic = Get.put(CheckingInAddHolidaysLogic());
|
final CheckingInAddHolidaysLogic logic =
|
||||||
final state = Get.find<CheckingInAddHolidaysLogic>().state;
|
Get.put(CheckingInAddHolidaysLogic());
|
||||||
|
final CheckingInAddHolidaysState state =
|
||||||
|
Get.find<CheckingInAddHolidaysLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -32,27 +36,31 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
|||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
|
setHeight: false,
|
||||||
rightWidget: getTFWidget(
|
rightWidget: getTFWidget(
|
||||||
"(${TranslationLoader.lanKeys!.mustFillIn!.tr})")),
|
'(${TranslationLoader.lanKeys!.mustFillIn!.tr})')),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.startDate!.tr,
|
leftTitel: TranslationLoader.lanKeys!.startDate!.tr,
|
||||||
rightTitle: state.beginDate.value.isEmpty ? "(${TranslationLoader.lanKeys!.mustFillIn!.tr})" : state.beginDate.value,
|
rightTitle: state.beginDate.value.isEmpty
|
||||||
|
? '(${TranslationLoader.lanKeys!.mustFillIn!.tr})'
|
||||||
|
: state.beginDate.value,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
action: () async {
|
action: () async {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (BuildContext context) {
|
||||||
return ShowCalendar(
|
return ShowCalendar(
|
||||||
datePickerMode: DatePickerMode.day,
|
datePickerMode: DatePickerMode.day,
|
||||||
selectAction: (dateTime) {
|
selectAction: (DateTime dateTime) {
|
||||||
String beginDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]);
|
final String beginDate = formatDate(
|
||||||
|
dateTime, <String>[yyyy, '-', mm, '-', dd]);
|
||||||
state.beginDate.value = beginDate;
|
state.beginDate.value = beginDate;
|
||||||
Get.back();
|
Get.back();
|
||||||
// Navigator.of(context).pop(true);
|
// Navigator.of(context).pop(true);
|
||||||
@ -61,17 +69,20 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
|||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.endDate!.tr,
|
leftTitel: TranslationLoader.lanKeys!.endDate!.tr,
|
||||||
rightTitle: state.endDate.value.isEmpty ? "(${TranslationLoader.lanKeys!.mustFillIn!.tr})" : state.endDate.value,
|
rightTitle: state.endDate.value.isEmpty
|
||||||
|
? '(${TranslationLoader.lanKeys!.mustFillIn!.tr})'
|
||||||
|
: state.endDate.value,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
action: () async {
|
action: () async {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (BuildContext context) {
|
||||||
return ShowCalendar(
|
return ShowCalendar(
|
||||||
datePickerMode: DatePickerMode.day,
|
datePickerMode: DatePickerMode.day,
|
||||||
selectAction: (dateTime) {
|
selectAction: (DateTime dateTime) {
|
||||||
String endDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]);
|
final String endDate = formatDate(
|
||||||
|
dateTime, <String>[yyyy, '-', mm, '-', dd]);
|
||||||
state.endDate.value = endDate;
|
state.endDate.value = endDate;
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
@ -85,11 +96,12 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
|||||||
action: () async {
|
action: () async {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (BuildContext context) {
|
||||||
return ShowCalendar(
|
return ShowCalendar(
|
||||||
datePickerMode: DatePickerMode.day,
|
datePickerMode: DatePickerMode.day,
|
||||||
selectAction: (dateTime) {
|
selectAction: (DateTime dateTime) {
|
||||||
String makeUpWorkDate = formatDate(dateTime, [yyyy,'-',mm,'-',dd]);
|
final String makeUpWorkDate = formatDate(
|
||||||
|
dateTime, <String>[yyyy, '-', mm, '-', dd]);
|
||||||
state.makeUpWorkDate.value = makeUpWorkDate;
|
state.makeUpWorkDate.value = makeUpWorkDate;
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
@ -112,30 +124,26 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget getTFWidget(String tfStr) {
|
Widget getTFWidget(String tfStr) {
|
||||||
return Container(
|
return Expanded(
|
||||||
height: 50.h,
|
child: TextField(
|
||||||
width: 300.w,
|
//输入框一行
|
||||||
// color: Colors.red,
|
maxLines: 2,
|
||||||
child: Row(
|
minLines: 1,
|
||||||
children: [
|
controller: state.staffNameController,
|
||||||
Expanded(
|
autofocus: false,
|
||||||
child: TextField(
|
textAlign: TextAlign.end,
|
||||||
//输入框一行
|
decoration: InputDecoration(
|
||||||
maxLines: 1,
|
//输入里面输入文字内边距设置
|
||||||
controller: state.staffNameController,
|
contentPadding: const EdgeInsets.only(bottom: 3),
|
||||||
autofocus: false,
|
hintText: tfStr,
|
||||||
textAlign: TextAlign.end,
|
hintStyle: TextStyle(
|
||||||
decoration: InputDecoration(
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor, height: 1),
|
||||||
//输入里面输入文字内边距设置
|
//不需要输入框下划线
|
||||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
border: InputBorder.none,
|
||||||
hintText: tfStr,
|
isCollapsed: true,
|
||||||
hintStyle: TextStyle(
|
),
|
||||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
inputFormatters: <TextInputFormatter>[
|
||||||
//不需要输入框下划线
|
LengthLimitingTextInputFormatter(30),
|
||||||
border: InputBorder.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -145,7 +153,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/icon_round_unSelect.png',
|
'images/icon_round_unSelect.png',
|
||||||
width: 40.w,
|
width: 40.w,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_state.dart';
|
||||||
import 'package:star_lock/tools/noData.dart';
|
import 'package:star_lock/tools/noData.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/style/picker_style.dart';
|
import 'package:star_lock/tools/pickers/style/picker_style.dart';
|
||||||
@ -25,8 +26,10 @@ class CheckingInSetHolidaysPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||||
final logic = Get.put(CheckingInSetHolidaysLogic());
|
final CheckingInSetHolidaysLogic logic =
|
||||||
final state = Get.find<CheckingInSetHolidaysLogic>().state;
|
Get.put(CheckingInSetHolidaysLogic());
|
||||||
|
final CheckingInSetHolidaysState state =
|
||||||
|
Get.find<CheckingInSetHolidaysLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -37,12 +40,14 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
titleWidget: titleWidget(),
|
titleWidget: titleWidget(),
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
actionsList: [
|
actionsList: <Widget>[
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var data = await Get.toNamed(
|
final dynamic data = await Get.toNamed(
|
||||||
Routers.checkingInAddHolidaysPage,
|
Routers.checkingInAddHolidaysPage,
|
||||||
arguments: {"companyId": state.companyId.value});
|
arguments: <String, String>{
|
||||||
|
'companyId': state.companyId.value
|
||||||
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
logic.editStaffLoadData();
|
logic.editStaffLoadData();
|
||||||
}
|
}
|
||||||
@ -58,12 +63,12 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Obx(() {
|
body: Obx(() {
|
||||||
return state.holidaysListData.value!.isNotEmpty
|
return state.holidaysListData.isNotEmpty
|
||||||
? ListView.builder(
|
? ListView.builder(
|
||||||
itemCount: state.holidaysListData.value!.length,
|
itemCount: state.holidaysListData.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (BuildContext c, int index) {
|
||||||
HolidaysMonthListData holidaysMonthListData =
|
final HolidaysMonthListData holidaysMonthListData =
|
||||||
state.holidaysListData.value![index];
|
state.holidaysListData[index];
|
||||||
return _checkingInListMouthItem(holidaysMonthListData);
|
return _checkingInListMouthItem(holidaysMonthListData);
|
||||||
})
|
})
|
||||||
: NoData();
|
: NoData();
|
||||||
@ -71,34 +76,44 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _checkingInListMouthItem(HolidaysMonthListData holidaysMonthListData) {
|
Widget _checkingInListMouthItem(HolidaysMonthListData holidaysMonthListData) {
|
||||||
|
final double width = Get.width - 20.w * 2;
|
||||||
|
final double l = width * 0.2;
|
||||||
|
final double r = width * 0.8;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 140.h * holidaysMonthListData.listItem!.length + 20.w,
|
decoration: BoxDecoration(
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
gradient: LinearGradient(
|
||||||
|
colors: <Color>[
|
||||||
|
colorWithMonth(int.parse(
|
||||||
|
holidaysMonthListData.listItem![0].month.toString())),
|
||||||
|
Colors.white
|
||||||
|
],
|
||||||
|
stops: const <double>[0.2, 0.2],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
color: colorWithMonth(int.parse(
|
color: colorWithMonth(int.parse(
|
||||||
holidaysMonthListData.listItem![0].month.toString())),
|
holidaysMonthListData.listItem![0].month.toString())),
|
||||||
width: 100.w,
|
width: l,
|
||||||
height: 140.h * holidaysMonthListData.listItem!.length,
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${holidaysMonthListData.listItem![0].month}\n${TranslationLoader.lanKeys!.month!.tr}",
|
'${holidaysMonthListData.listItem![0].month}\n${TranslationLoader.lanKeys!.month!.tr}',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontSize: 28.sp, color: Colors.white),
|
style: TextStyle(fontSize: 28.sp, color: Colors.white),
|
||||||
))),
|
))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 140.h * holidaysMonthListData.listItem!.length,
|
width: r,
|
||||||
width: 1.sw - 100.w - 20.w * 2,
|
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
itemCount: holidaysMonthListData.listItem!.length,
|
itemCount: holidaysMonthListData.listItem!.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (BuildContext c, int index) {
|
||||||
ListItem listItem = holidaysMonthListData.listItem![index];
|
final ListItem listItem =
|
||||||
|
holidaysMonthListData.listItem![index];
|
||||||
return _checkingInListItem(
|
return _checkingInListItem(
|
||||||
index,
|
|
||||||
listItem.vacationName,
|
listItem.vacationName,
|
||||||
DateTool().dateToYMDString(
|
DateTool().dateToYMDString(
|
||||||
listItem.vacationStartDate.toString()),
|
listItem.vacationStartDate.toString()),
|
||||||
@ -107,10 +122,10 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
listItem.fillClassDate!.isNotEmpty
|
listItem.fillClassDate!.isNotEmpty
|
||||||
? DateTool().dateToYMDString(
|
? DateTool().dateToYMDString(
|
||||||
listItem.fillClassDate.toString())
|
listItem.fillClassDate.toString())
|
||||||
: "", () async {
|
: '', () async {
|
||||||
var data = await Get.toNamed(
|
final dynamic data = await Get.toNamed(
|
||||||
Routers.checkingInDeletHolidaysPage,
|
Routers.checkingInDeletHolidaysPage,
|
||||||
arguments: {"listItem": listItem});
|
arguments: <String, ListItem>{'listItem': listItem});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
logic.editStaffLoadData();
|
logic.editStaffLoadData();
|
||||||
}
|
}
|
||||||
@ -123,83 +138,66 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _checkingInListItem(
|
Widget _checkingInListItem(String? lockTypeTitle, String? vacationStartDate,
|
||||||
int index,
|
String? vacationEndDate, String? makeUpClass, Function() action) {
|
||||||
String? lockTypeTitle,
|
|
||||||
String? vacationStartDate,
|
|
||||||
String? vacationEndDate,
|
|
||||||
String? makeUpClass,
|
|
||||||
Function() action) {
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Column(
|
child: Container(
|
||||||
children: [
|
padding:
|
||||||
Container(
|
EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h, bottom: 10.h),
|
||||||
color: Colors.white,
|
decoration: BoxDecoration(
|
||||||
height: 140.h,
|
border: Border(
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h),
|
bottom: BorderSide(
|
||||||
child: Row(
|
color: AppColors.mainBackgroundColor, width: 1.h, // 设置边框宽度
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
lockTypeTitle!,
|
|
||||||
style: TextStyle(fontSize: 24.sp),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"${TranslationLoader.lanKeys!.libertyDay!.tr}:$vacationStartDate - $vacationEndDate",
|
|
||||||
style: TextStyle(fontSize: 20.sp),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 5.h),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"${TranslationLoader.lanKeys!.coverDate!.tr}:$makeUpClass",
|
|
||||||
style: TextStyle(fontSize: 20.sp),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 20.h),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(color: AppColors.mainBackgroundColor, height: 1.h)
|
),
|
||||||
],
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
Characters(lockTypeTitle!).join('\u{200B}'),
|
||||||
|
style: TextStyle(fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
'${TranslationLoader.lanKeys!.libertyDay!.tr}:$vacationStartDate - $vacationEndDate',
|
||||||
|
style: TextStyle(fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 5.h),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
'${TranslationLoader.lanKeys!.coverDate!.tr}:$makeUpClass',
|
||||||
|
style: TextStyle(fontSize: 20.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget titleWidget() {
|
Widget titleWidget() {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: showListType,
|
||||||
showListType();
|
|
||||||
},
|
|
||||||
child: Obx(() => Container(
|
child: Obx(() => Container(
|
||||||
width: 300.w,
|
width: 300.w,
|
||||||
height: 50.h,
|
height: 50.h,
|
||||||
color: AppColors.mainColor,
|
color: AppColors.mainColor,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
"${state.selectYear.value}${TranslationLoader.lanKeys!.year!.tr}",
|
'${state.selectYear.value}${TranslationLoader.lanKeys!.year!.tr}',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 26.sp),
|
style: TextStyle(color: Colors.white, fontSize: 26.sp),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -226,9 +224,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
// 样式 详见下方样式
|
// 样式 详见下方样式
|
||||||
pickerStyle: PickerStyle(
|
pickerStyle: PickerStyle(
|
||||||
cancelButton: GestureDetector(
|
cancelButton: GestureDetector(
|
||||||
onTap: () {
|
onTap: Get.back,
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: const EdgeInsets.only(left: 22, right: 12),
|
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||||
@ -237,9 +233,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
commitButton: GestureDetector(
|
commitButton: GestureDetector(
|
||||||
onTap: () {
|
onTap: Get.back,
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: const EdgeInsets.only(left: 22, right: 12),
|
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||||
@ -252,7 +246,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
|||||||
selectDate: PDuration(year: 2023),
|
selectDate: PDuration(year: 2023),
|
||||||
minDate: PDuration(year: 1900),
|
minDate: PDuration(year: 1900),
|
||||||
maxDate: PDuration(year: 2100),
|
maxDate: PDuration(year: 2100),
|
||||||
onConfirm: (p) {
|
onConfirm: (PDuration p) {
|
||||||
state.selectYear.value = p.year!;
|
state.selectYear.value = p.year!;
|
||||||
logic.editStaffLoadData();
|
logic.editStaffLoadData();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -12,6 +12,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
this.isHaveLine = false,
|
this.isHaveLine = false,
|
||||||
this.isHaveRightWidget = false,
|
this.isHaveRightWidget = false,
|
||||||
this.isPadding = true,
|
this.isPadding = true,
|
||||||
|
this.setHeight = true,
|
||||||
this.rightWidget,
|
this.rightWidget,
|
||||||
this.isTipsImg,
|
this.isTipsImg,
|
||||||
this.action,
|
this.action,
|
||||||
@ -26,6 +27,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
Function()? action;
|
Function()? action;
|
||||||
Function()? tipsImgAction;
|
Function()? tipsImgAction;
|
||||||
double? allHeight;
|
double? allHeight;
|
||||||
|
bool? setHeight;
|
||||||
bool? isTipsImg;
|
bool? isTipsImg;
|
||||||
bool? isPadding;
|
bool? isPadding;
|
||||||
|
|
||||||
@ -34,7 +36,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: allHeight ?? 65.h,
|
height: setHeight == true ? allHeight ?? 65.h : null,
|
||||||
padding: isPadding == true
|
padding: isPadding == true
|
||||||
? EdgeInsets.only(left: 20.w, right: 10.w)
|
? EdgeInsets.only(left: 20.w, right: 10.w)
|
||||||
: EdgeInsets.zero,
|
: EdgeInsets.zero,
|
||||||
@ -67,9 +69,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
height: 20.w,
|
height: 20.w,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
else
|
|
||||||
Container(),
|
|
||||||
if (isHaveRightWidget!) ...<Widget>[
|
if (isHaveRightWidget!) ...<Widget>[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
rightWidget!
|
rightWidget!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user