2023-09-15 16:04:11 +08:00
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
import 'package:get/get.dart';
|
2024-06-05 09:30:04 +08:00
|
|
|
|
import 'package:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_state.dart';
|
2023-09-15 16:04:11 +08:00
|
|
|
|
|
|
|
|
|
|
import '../../../../../appRouters.dart';
|
|
|
|
|
|
import '../../../../../app_settings/app_colors.dart';
|
|
|
|
|
|
import '../../../../../tools/commonItem.dart';
|
|
|
|
|
|
import '../../../../../tools/titleAppBar.dart';
|
|
|
|
|
|
import 'checkingInStaffDetail_logic.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class CheckingInStaffDetailPage extends StatefulWidget {
|
|
|
|
|
|
const CheckingInStaffDetailPage({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
State<CheckingInStaffDetailPage> createState() => _CheckingInStaffDetailPageState();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _CheckingInStaffDetailPageState extends State<CheckingInStaffDetailPage> {
|
2024-06-05 09:30:04 +08:00
|
|
|
|
final CheckingInStaffDetailLogic logic = Get.put(CheckingInStaffDetailLogic());
|
|
|
|
|
|
final CheckingInStaffDetailState state = Get.find<CheckingInStaffDetailLogic>().state;
|
2023-09-15 16:04:11 +08:00
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
|
backgroundColor: AppColors.mainBackgroundColor,
|
|
|
|
|
|
appBar: TitleAppBar(
|
2024-06-05 09:30:04 +08:00
|
|
|
|
barTitle: '员工信息'.tr,
|
2023-09-15 16:04:11 +08:00
|
|
|
|
haveBack: true,
|
|
|
|
|
|
backgroundColor: AppColors.mainColor,
|
2024-06-05 09:30:04 +08:00
|
|
|
|
actionsList: <Widget>[
|
2023-09-15 16:04:11 +08:00
|
|
|
|
TextButton(
|
|
|
|
|
|
child: Text(
|
2024-08-02 13:52:37 +08:00
|
|
|
|
'编辑'.tr,
|
2023-09-15 16:04:11 +08:00
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
|
|
|
|
|
),
|
|
|
|
|
|
onPressed: () {
|
2024-06-05 09:30:04 +08:00
|
|
|
|
Get.toNamed(Routers.checkingInAddStaffPage, arguments: <String, Object>{
|
|
|
|
|
|
'getKeyInfosData': state.getKeyInfosData.value,
|
|
|
|
|
|
'companyId': state.companyId.value,
|
|
|
|
|
|
'staffListItem': state.staffListItemData.value,
|
|
|
|
|
|
'isAdd': '2',
|
2023-09-15 16:04:11 +08:00
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
),
|
|
|
|
|
|
],),
|
|
|
|
|
|
body: Column(
|
2024-06-05 09:30:04 +08:00
|
|
|
|
children: <Widget>[
|
2023-09-15 16:04:11 +08:00
|
|
|
|
Obx(() => CommonItem(
|
2024-07-26 09:21:22 +08:00
|
|
|
|
leftTitel: '姓名'.tr,
|
2023-09-15 16:04:11 +08:00
|
|
|
|
rightTitle: state.staffListItemData.value.staffName,
|
|
|
|
|
|
isHaveLine: true)),
|
|
|
|
|
|
Obx(() => CommonItem(
|
2024-07-29 19:30:29 +08:00
|
|
|
|
leftTitel: '打卡方式'.tr,
|
2023-09-15 16:04:11 +08:00
|
|
|
|
rightTitle: state.attendanceType.value,
|
|
|
|
|
|
isHaveLine: true)),
|
2024-03-28 13:46:35 +08:00
|
|
|
|
// Obx(() => CommonItem(
|
|
|
|
|
|
// leftTitel: "APP",
|
|
|
|
|
|
// rightTitle: state.staffListItemData.value.attendanceWay,
|
|
|
|
|
|
// isHaveLine: true)),
|
|
|
|
|
|
Obx(() => Visibility(
|
2024-06-05 09:30:04 +08:00
|
|
|
|
visible: state.staffListItemData.value.cardStatus == 1,
|
2024-03-28 13:46:35 +08:00
|
|
|
|
child: Row(
|
2024-06-05 09:30:04 +08:00
|
|
|
|
children: <Widget>[
|
2024-03-28 13:46:35 +08:00
|
|
|
|
Container(
|
2024-04-07 14:03:59 +08:00
|
|
|
|
width: 1.sw,
|
|
|
|
|
|
// height: 50.h,
|
|
|
|
|
|
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 10.h),
|
|
|
|
|
|
child: Text("${state.staffListItemData.value.reason},${"打卡方式无效".tr}", style: TextStyle(fontSize: 22.sp, color: AppColors.openPassageModeColor)))
|
2024-03-28 13:46:35 +08:00
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
)),
|
2023-09-15 16:04:11 +08:00
|
|
|
|
CommonItem(
|
2024-07-31 17:24:30 +08:00
|
|
|
|
leftTitel: '考勤记录'.tr,
|
2024-06-05 09:30:04 +08:00
|
|
|
|
rightTitle: '',
|
2024-02-29 17:31:30 +08:00
|
|
|
|
isHaveDirection: true,
|
|
|
|
|
|
action: (){
|
2024-06-05 09:30:04 +08:00
|
|
|
|
Get.toNamed(Routers.checkingInDetailPage, arguments: <String, Object?>{
|
2024-02-29 17:31:30 +08:00
|
|
|
|
// "getKeyInfosData": state.getKeyInfosData.value,
|
2024-06-05 09:30:04 +08:00
|
|
|
|
'companyId': state.companyId.value,
|
|
|
|
|
|
'staffId': state.staffListItemData.value.staffId,
|
|
|
|
|
|
'staffName': state.staffListItemData.value.staffName,
|
2024-02-29 17:31:30 +08:00
|
|
|
|
});
|
|
|
|
|
|
}),
|
2023-09-15 16:04:11 +08:00
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|