91 lines
3.4 KiB
Dart
Raw Normal View History

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/commonItem.dart';
import '../../../../../tools/titleAppBar.dart';
import '../../../../../translations/trans_lib.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 logic = Get.put(CheckingInStaffDetailLogic());
final 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: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.edit!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {
Get.toNamed(Routers.checkingInAddStaffPage, arguments: {
"getKeyInfosData": state.getKeyInfosData.value,
"companyId": state.companyId.value,
"staffListItem": state.staffListItemData.value,
"isAdd": "2",
});
},
),
],),
body: Column(
children: [
Obx(() => CommonItem(
leftTitel: TranslationLoader.lanKeys!.name!.tr,
rightTitle: state.staffListItemData.value.staffName,
isHaveLine: true)),
Obx(() => CommonItem(
leftTitel: TranslationLoader.lanKeys!.punchingMode!.tr,
rightTitle: state.attendanceType.value,
isHaveLine: true)),
// Obx(() => CommonItem(
// leftTitel: "APP",
// rightTitle: state.staffListItemData.value.attendanceWay,
// isHaveLine: true)),
Obx(() => Visibility(
2024-04-02 17:30:44 +08:00
visible: state.staffListItemData.value.cardStatus == 1 ? true : false,
child: Row(
children: [
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: TranslationLoader.lanKeys!.attendanceRecord!.tr,
rightTitle: "",
isHaveDirection: true,
action: (){
Get.toNamed(Routers.checkingInDetailPage, arguments: {
// "getKeyInfosData": state.getKeyInfosData.value,
"companyId": state.companyId.value,
"staffId": state.staffListItemData.value.staffId,
"staffName": state.staffListItemData.value.staffName,
});
}),
],
),
);
}
}