91 lines
3.4 KiB
Dart
Executable File
91 lines
3.4 KiB
Dart
Executable File
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
import 'package:get/get.dart';
|
||
import 'package:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInStaffDetail/checkingInStaffDetail_state.dart';
|
||
|
||
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> {
|
||
final CheckingInStaffDetailLogic logic = Get.put(CheckingInStaffDetailLogic());
|
||
final CheckingInStaffDetailState state = Get.find<CheckingInStaffDetailLogic>().state;
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
backgroundColor: AppColors.mainBackgroundColor,
|
||
appBar: TitleAppBar(
|
||
barTitle: '员工信息'.tr,
|
||
haveBack: true,
|
||
backgroundColor: AppColors.mainColor,
|
||
actionsList: <Widget>[
|
||
TextButton(
|
||
child: Text(
|
||
'编辑'.tr,
|
||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||
),
|
||
onPressed: () {
|
||
Get.toNamed(Routers.checkingInAddStaffPage, arguments: <String, Object>{
|
||
'getKeyInfosData': state.getKeyInfosData.value,
|
||
'companyId': state.companyId.value,
|
||
'staffListItem': state.staffListItemData.value,
|
||
'isAdd': '2',
|
||
});
|
||
},
|
||
),
|
||
],),
|
||
body: Column(
|
||
children: <Widget>[
|
||
Obx(() => CommonItem(
|
||
leftTitel: '姓名'.tr,
|
||
rightTitle: state.staffListItemData.value.staffName,
|
||
isHaveLine: true)),
|
||
Obx(() => CommonItem(
|
||
leftTitel: '打卡方式'.tr,
|
||
rightTitle: state.attendanceType.value,
|
||
isHaveLine: true)),
|
||
// Obx(() => CommonItem(
|
||
// leftTitel: "APP",
|
||
// rightTitle: state.staffListItemData.value.attendanceWay,
|
||
// isHaveLine: true)),
|
||
Obx(() => Visibility(
|
||
visible: state.staffListItemData.value.cardStatus == 1,
|
||
child: Row(
|
||
children: <Widget>[
|
||
Container(
|
||
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)))
|
||
],
|
||
),
|
||
)),
|
||
CommonItem(
|
||
leftTitel: '考勤记录'.tr,
|
||
rightTitle: '',
|
||
isHaveDirection: true,
|
||
action: (){
|
||
Get.toNamed(Routers.checkingInDetailPage, arguments: <String, Object?>{
|
||
// "getKeyInfosData": state.getKeyInfosData.value,
|
||
'companyId': state.companyId.value,
|
||
'staffId': state.staffListItemData.value.staffId,
|
||
'staffName': state.staffListItemData.value.staffName,
|
||
});
|
||
}),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
}
|