110 lines
4.0 KiB
Dart
110 lines
4.0 KiB
Dart
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),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|