提交移动文件夹文件
This commit is contained in:
parent
4bdd341131
commit
d90c1c9f3d
@ -1,149 +0,0 @@
|
||||
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,
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
|
||||
|
||||
import 'package:date_format/date_format.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import 'checkingInStaffList_state.dart';
|
||||
|
||||
class CheckingInStaffManageLogic extends BaseGetXController{
|
||||
CheckingInStaffManageState state = CheckingInStaffManageState();
|
||||
|
||||
// 获取员工列表
|
||||
void getStaffList() async{
|
||||
var entity = await ApiRepository.to.getStaffListData(
|
||||
companyId: state.companyId.value,
|
||||
lockId:state.getKeyInfosData.value.lockId.toString(),
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
print("onReady()");
|
||||
|
||||
getStaffList();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
print("onInit()");
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,116 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'checkingInStaffList_logic.dart';
|
||||
|
||||
class CheckingInStaffListPage extends StatefulWidget {
|
||||
const CheckingInStaffListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CheckingInStaffListPage> createState() =>
|
||||
_CheckingInStaffListPageState();
|
||||
}
|
||||
|
||||
class _CheckingInStaffListPageState extends State<CheckingInStaffListPage> {
|
||||
final logic = Get.put(CheckingInStaffManageLogic());
|
||||
final state = Get.find<CheckingInStaffManageLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.greyBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.staff!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, Routers.checkingInAddStaffPage, arguments: {
|
||||
"getKeyInfosData": state.getKeyInfosData.value,
|
||||
"companyId": state.companyId.value
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
'images/icon_add_white.png',
|
||||
width: 36.w,
|
||||
height: 36.w,
|
||||
)),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Container(
|
||||
color: Colors.white,
|
||||
child: ListView.separated(
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _checkingInStaffManageItem('images/icon_lock.png', "张三",
|
||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||
});
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider(
|
||||
height: 1, indent: 20, color: AppColors.greyLineColor);
|
||||
},
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle,
|
||||
String beginTime, String endTime, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 60.h,
|
||||
margin:
|
||||
EdgeInsets.only(left: 10.w, right: 10.w, top: 10.h, bottom: 10.h),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.w),
|
||||
// ),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/controls_user.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
),
|
||||
// Container(
|
||||
// width: 60.h,
|
||||
// height: 60.h,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColors.mainColor,
|
||||
// border: Border.all(width: 1, color: AppColors.mainColor),
|
||||
// borderRadius: BorderRadius.circular(30.h),
|
||||
// ),
|
||||
// padding: EdgeInsets.all(10.w),
|
||||
// child: Image.asset(
|
||||
// 'images/controls_user.png',
|
||||
// width: 40.w,
|
||||
// height: 40.w,
|
||||
// color: Colors.white,
|
||||
// )),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../lockMian/entity/lockInfoEntity.dart';
|
||||
|
||||
class CheckingInStaffManageState{
|
||||
final getKeyInfosData = KeyInfos().obs;
|
||||
final companyId = "".obs;
|
||||
|
||||
CheckingInStaffManageState() {
|
||||
Map map = Get.arguments;
|
||||
getKeyInfosData.value = map["getKeyInfosData"];
|
||||
companyId.value = map["companyId"];
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user