完善考勤添加员工添加指纹、卡功能

This commit is contained in:
魏少阳 2023-09-21 14:12:22 +08:00
parent 8f00a142ae
commit d4e64da5aa
21 changed files with 410 additions and 144 deletions

View File

@ -405,5 +405,15 @@
"pleaseEnterWifiPwd":"Please Enter WiFi Password",
"edit":"Edit",
"stressFingerprint":"Stress Fingerprint",
"effectiveDay":"Effective Day"
"effectiveDay":"Effective Day",
"whetherTheEmployeeHasPassword":"If The Employee Has A Password",
"whetherTheEmployeeHasCard":"If The Employee Has A Card",
"whetherTheEmployeeHasFingerprint":"If The Employee Has A Fingerprint",
"seletPassword":"Selet Password",
"seletCard":"Selet Card",
"seletFingerprint":"Selet Fingerprint",
"getKey":"Get Key",
"getCard":"Get Card",
"getFingerprint":"Get Fingerprint"
}

View File

@ -405,5 +405,15 @@
"pleaseEnterWifiPwd":"pleaseEnterWifiPwd",
"edit":"edit",
"stressFingerprint":"stressFingerprint",
"effectiveDay":"effectiveDay"
"effectiveDay":"effectiveDay",
"whetherTheEmployeeHasPassword":"whetherTheEmployeeHasPassword",
"whetherTheEmployeeHasCard":"whetherTheEmployeeHasCard",
"whetherTheEmployeeHasFingerprint":"whetherTheEmployeeHasFingerprint",
"seletPassword":"seletPassword",
"seletCard":"seletCard",
"seletFingerprint":"seletFingerprint",
"getKey":"getKey",
"getCard":"getCard",
"getFingerprint":"getFingerprint"
}

View File

@ -408,5 +408,15 @@
"pleaseEnterWifiPwd":"请输入WiFi密码",
"edit":"编辑",
"stressFingerprint":"胁迫指纹",
"effectiveDay":"有效日"
"effectiveDay":"有效日",
"whetherTheEmployeeHasPassword":"员工是否有密码",
"whetherTheEmployeeHasCard":"员工是否有卡",
"whetherTheEmployeeHasFingerprint":"员工是否有指纹",
"seletPassword":"选择密码",
"seletCard":"选择卡",
"seletFingerprint":"选择指纹",
"getKey":"获取钥匙",
"getCard":"获取卡",
"getFingerprint":"获取指纹"
}

View File

@ -1,4 +1,6 @@
import 'dart:async';
import 'package:get/get.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/toast.dart';
@ -11,6 +13,16 @@ typedef KeyClickCallback = void Function(List<CheckingInAddStaffKeyEntity> selet
class CheckingInAddStaffLogic extends BaseGetXController{
CheckingInAddStaffState state = CheckingInAddStaffState();
//
StreamSubscription? _getNumberEvent;
void _initLoadDataAction() {
// eventBus
_getNumberEvent =
eventBus.on<ChickInAddStaffCardAndFingerprintBlockNumberEvent>().listen((event) {
state.getDataPassword.value = event.number;
});
}
//
void addStaffLoadData() async{
var attendanceWay = "";
@ -51,11 +63,6 @@ class CheckingInAddStaffLogic extends BaseGetXController{
break;
}
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
var entity = await ApiRepository.to.addStaffData(
attendanceType: state.seletPrintingMethodType.value,
attendanceWay: attendanceWay,
@ -72,11 +79,11 @@ class CheckingInAddStaffLogic extends BaseGetXController{
}
}
// -
// - 1APP234attendanceWay分别为用户名
void addStaffSeletKey(KeyClickCallback kyClickCallback) async{
var entity = await ApiRepository.to.addStaffSeletKeyData(
companyId: state.companyId.value,
type:"1",
type:state.seletPrintingMethodType.value,
);
if(entity.errorCode!.codeIsSuccessful){
state.keyEntity.value = entity.data!;
@ -124,11 +131,6 @@ class CheckingInAddStaffLogic extends BaseGetXController{
break;
}
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
var entity = await ApiRepository.to.editStaffData(
attendanceType: state.seletPrintingMethodType.value,
attendanceWay: attendanceWay,
@ -146,12 +148,38 @@ class CheckingInAddStaffLogic extends BaseGetXController{
}
}
//
void getKeyboardPwdRequest() async {
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
var entity = await ApiRepository.to.getPasswordKey(
"0",
'0',
state.staffNameController.text,
2.toString(),
'0',
state.getKeyInfosData.value.lockId.toString(),
'0',
"0",
'0');
if (entity.errorCode!.codeIsSuccessful) {
print('获取密码成功');
if (entity.data != null) {
state.getDataPassword.value = entity.data!.keyboardPwd!;
}
} else {
Toast.show(msg: '${entity.errorMsg}');
}
}
@override
void onReady() {
// TODO: implement onReady
super.onReady();
print("onReady()");
_initLoadDataAction();
}
@override
@ -159,13 +187,14 @@ class CheckingInAddStaffLogic extends BaseGetXController{
// TODO: implement onInit
super.onInit();
print("onInit()");
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
_getNumberEvent!.cancel();
}
}

View File

@ -8,6 +8,7 @@ import '../../../../../tools/commonItem.dart';
import '../../../../../tools/showBottomSheetTool.dart';
import '../../../../../tools/submitBtn.dart';
import '../../../../../tools/titleAppBar.dart';
import '../../../../../tools/toast.dart';
import '../../../../../translations/trans_lib.dart';
import 'checkingInAddStaff_logic.dart';
@ -49,12 +50,10 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
var list = ["APP", "密码", "", "指纹"];
_showSeletClockInType(list, "1");
})),
SizedBox(
height: 10.h,
),
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr,
SizedBox(height: 10.h,),
//App
Obx(() => CommonItem(
leftTitel:addStaffGetIfHaveKey(),
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
@ -72,9 +71,10 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
});
}),
],
)),
))),
// App时显示
Obx(() => Visibility(
visible: state.appUnHaveAccount.value,
visible: (state.appUnHaveAccount.value && state.seletPrintingMethodType.value == "1") ? true : false,
child: Column(
children: [
CommonItem(
@ -108,10 +108,77 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
],
),
)),
//
Obx(() => Visibility(
visible: (state.seletPrintingMethodType.value != "1" && state.appUnHaveAccount.value) ? true : false,
child: CommonItem(
leftTitel: addStaffGetKeyType(),
isHaveLine: false,
isHaveRightWidget: true,
rightWidget: Row(
children: [
Obx(() => Text(state.getDataPassword.value, style: TextStyle(fontSize: 24.sp))),
SizedBox(width: 30.w,),
SizedBox(
width: 130.w,
height: 40.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: AppColors.mainColor,),
child: Text(addStaffSeletKeyType(), style: TextStyle(color: Colors.white, fontSize: 22.sp)),
onPressed: () async {
switch(int.parse(state.seletPrintingMethodType.value)){
case 2:
//
logic.getKeyboardPwdRequest();
break;
case 3:
//
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
var data = await Get.toNamed(Routers.otherTypeKeyManagePage, arguments: {
"lockId": state.getKeyInfosData.value.lockId,
"keyType": 0,
"fromType": 2, // 1 2
"fromTypeTwoStaffName" :state.staffNameController.text
});
if(data != null) {
}
break;
case 4:
//
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
var data = await Get.toNamed(Routers.otherTypeKeyManagePage, arguments: {
"lockId": state.getKeyInfosData.value.lockId,
"keyType": 1,
"fromType": 2, // 1 2
"fromTypeTwoStaffName" :state.staffNameController.text
});
if(data != null) {
}
break;
break;
}
}
),
),
],
)),
)),
//
Obx(() => Visibility(
visible: !state.appUnHaveAccount.value,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.selectKey!.tr,
leftTitel: addStaffGetKeyType(),
rightTitle: state.seletKey.value,
isHaveLine: false,
isHaveDirection: true,
@ -126,15 +193,18 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
}),
)),
SizedBox(
height: 50.w,
),
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: () {
if(state.staffNameController.text.isEmpty){
Toast.show(msg: "请输入姓名");
return;
}
if(state.isAdd.value == "2"){
logic.editStaffLoadData();
}else{
@ -191,13 +261,16 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
data: list,
//
clickCallBack: (int index, var str) {
print("object:$index str:$str");
if(type == "1"){
state.seletPrintingMethodType.value = (index+1).toString();
state.seletPrintingMethodStr.value = str.toString();
}else{
state.seletKey.value = str.toString();
}
setState(() {
if(type == "1"){
state.seletPrintingMethodType.value = (index+1).toString();
state.seletPrintingMethodStr.value = str.toString();
state.getDataPassword.value = "";
}else{
state.seletKey.value = str.toString();
}
print("object:$index str:$str type:$type state.seletPrintingMethodType.value:${state.seletPrintingMethodType.value}");
});
});
}
@ -224,4 +297,62 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
),
);
}
String addStaffGetIfHaveKey(){
String title = "";
switch(int.parse(state.seletPrintingMethodType.value)){
case 1:
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr;
break;
case 2:
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasPassword!.tr;
break;
case 3:
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasCard!.tr;
break;
case 4:
title = TranslationLoader.lanKeys!.whetherTheEmployeeHasFingerprint!.tr;
break;
}
return title;
}
String addStaffGetKeyType(){
String title = "";
switch(int.parse(state.seletPrintingMethodType.value)){
case 1:
title = TranslationLoader.lanKeys!.accountNumber!.tr;
break;
case 2:
title = TranslationLoader.lanKeys!.password!.tr;
break;
case 3:
title = TranslationLoader.lanKeys!.card!.tr;
break;
case 4:
title = TranslationLoader.lanKeys!.fingerprint!.tr;
break;
}
return title;
}
String addStaffSeletKeyType(){
String title = "";
switch(int.parse(state.seletPrintingMethodType.value)){
case 1:
title = TranslationLoader.lanKeys!.getKey!.tr;
break;
case 2:
title = TranslationLoader.lanKeys!.getPassword!.tr;
break;
case 3:
title = TranslationLoader.lanKeys!.getCard!.tr;
break;
case 4:
title = TranslationLoader.lanKeys!.getFingerprint!.tr;
break;
}
return title;
}
}

View File

@ -25,6 +25,7 @@ class CheckingInAddStaffState{
final seletKey = "".obs;
final isAdd = "1".obs; // 1 2
final getDataPassword = "".obs;
CheckingInAddStaffState() {
Map map = Get.arguments;

View File

@ -86,8 +86,8 @@ class _CheckingInStaffListPageState extends State<CheckingInStaffListPage> {
child: Row(
children: [
SizedBox(width: 30.w,),
CustomNetworkImage(url: staffListItem.headurl!, width: 40.w , height: 40.w),
// Image.asset('images/controls_user.png', width: 40.w, height: 40.w),
// CustomNetworkImage(url: staffListItem.headurl!, width: 40.w , height: 40.w),
Image.asset('images/controls_user.png', width: 40.w, height: 40.w),
SizedBox(width: 30.w,),
Text(staffListItem.staffName!, style: TextStyle(fontSize: 24.sp)),
],

View File

@ -14,6 +14,7 @@ import '../../../../../blue/io_tool/manager_event_bus.dart';
import '../../../../../blue/sender_manage.dart';
import '../../../../../network/api_repository.dart';
import '../../../../../tools/baseGetXController.dart';
import '../../../../../tools/eventBusEventManage.dart';
import '../../../../../tools/storage.dart';
import '../../../../../tools/toast.dart';
import 'addFingerprint_state.dart';
@ -231,6 +232,10 @@ class AddFingerprintLogic extends BaseGetXController {
);
if(entity.errorCode!.codeIsSuccessful){
Toast.show(msg: "添加成功");
if(state.fromType.value == 2){
//
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(""));
}
Get.close(3);
}
}

View File

@ -13,6 +13,7 @@ class AddFingerprintState{
final isCoerced = "".obs;
final startDate = "".obs;
final weekDay = [].obs;
final fromType = 0.obs;
AddFingerprintState() {
Map map = Get.arguments;
@ -26,5 +27,6 @@ class AddFingerprintState{
startDate.value = map["startDate"];
lockId.value = map["lockId"];
weekDay.value = map["weekDay"];
fromType.value = map["fromType"];
}
}

View File

@ -11,6 +11,7 @@ class AddFingerprintTipState{
final isCoerced = "".obs;
final startDate = "".obs;
final weekDay = [].obs;
final fromType = 0.obs;
AddFingerprintTipState() {
Map map = Get.arguments;
@ -24,5 +25,6 @@ class AddFingerprintTipState{
startDate.value = map["startDate"];
lockId.value = map["lockId"];
weekDay.value = map["weekDay"];
fromType.value = map["fromType"];
}
}

View File

@ -14,6 +14,7 @@ import '../../../../blue/io_tool/io_tool.dart';
import '../../../../blue/io_tool/manager_event_bus.dart';
import '../../../../blue/sender_manage.dart';
import '../../../../network/api_repository.dart';
import '../../../../tools/eventBusEventManage.dart';
import '../../../../tools/storage.dart';
import '../../../../tools/toast.dart';
import 'addICCard_state.dart';
@ -186,7 +187,11 @@ class AddICCardLogic extends BaseGetXController{
);
if(entity.errorCode!.codeIsSuccessful){
Toast.show(msg: "添加成功");
Get.close(3);
if(state.fromType.value == 2){
//
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(""));
}
Get.close(2);
}
}

View File

@ -13,6 +13,7 @@ class AddICCardState{
final isCoerced = "".obs;
final startDate = "".obs;
final weekDay = [].obs;
final fromType = 0.obs;
AddICCardState() {
Map map = Get.arguments;
@ -26,5 +27,6 @@ class AddICCardState{
startDate.value = map["startDate"];
lockId.value = map["lockId"];
weekDay.value = map["weekDay"];
fromType.value = map["fromType"];
}
}

View File

@ -73,7 +73,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
}
switch (state.fromType.value) {
switch (state.lockType.value) {
case 0:
//
Get.toNamed(Routers.addICCardPage, arguments: {
@ -86,6 +86,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
"startDate": startDate,
"weekDay": state.weekdaysList.value,
"fromType": state.fromType.value,
});
// var entity = await ApiRepository.to.addICCardData(
@ -117,6 +118,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
"startDate": startDate,
"weekDay": state.weekdaysList.value,
"fromType": state.fromType.value,
});
// var entity = await ApiRepository.to.addFingerprintsData(

View File

@ -18,8 +18,10 @@ class OtherTypeAddKeyPage extends StatefulWidget {
final String seletType;
final int lockType; // 0 1 2
final int lockId;
final int fromType;// // 1 2
final String fromTypeTwoStaffName;//
const OtherTypeAddKeyPage(
{Key? key, required this.seletType, required this.lockType, required this.lockId}) : super(key: key);
{Key? key, required this.seletType, required this.lockType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName}) : super(key: key);
@override
State<OtherTypeAddKeyPage> createState() => _OtherTypeAddKeyPageState();
@ -32,8 +34,9 @@ class _OtherTypeAddKeyPageState extends State<OtherTypeAddKeyPage> {
@override
Widget build(BuildContext context) {
state.seletType.value = widget.seletType;
state.fromType.value = widget.lockType;
state.lockType.value = widget.lockType;
state.lockId.value = widget.lockId;
state.nameController.text = widget.fromTypeTwoStaffName;
return indexChangeWidget();
}

View File

@ -6,7 +6,8 @@ import 'package:get/get.dart';
class OtherTypeAddKeyState{
final lockId = 0.obs;
final seletType = "0".obs;// 0 1 2
final fromType = 0.obs;// 0 1 2
final lockType = 0.obs;// 0 1 2
final fromType = 0.obs; // // 1 2
final isStressFingerprint = false.obs;
var beginTime = "".obs;//
@ -20,8 +21,8 @@ class OtherTypeAddKeyState{
final TextEditingController nameController = TextEditingController();
OtherTypeAddKeyState() {
Map map = Get.arguments;
lockId.value = map["lockId"];
fromType.value = map["fromType"];
// Map map = Get.arguments;
// lockId.value = map["lockId"];
// fromType.value = map["fromType"];
}
}

View File

@ -251,95 +251,95 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
);
}
Widget addControlsBtn(int type) {
List<Widget> widgetList = [];
List<Map<String, dynamic>> routerList = [];
//
if (type == 0) {
routerList.add({
'btnTitle': '设置密码',
'routerName': Routers.passwordKeyDetailPage,
'type': 9
});
routerList.add({
'btnTitle': '设置指纹',
'routerName': Routers.otherTypeKeyManagePage,
'type': 1
});
routerList.add({
'btnTitle': '设置遥控',
'routerName': Routers.otherTypeKeyManagePage,
'type': 2
});
} else if (type == 1) {
//
routerList.add({
'btnTitle': '设置密码',
'routerName': Routers.passwordKeyDetailPage,
'type': 9
});
routerList.add({
'btnTitle': '设置卡',
'routerName': Routers.otherTypeKeyManagePage,
'type': 0
});
routerList.add({
'btnTitle': '设置遥控',
'routerName': Routers.otherTypeKeyManagePage,
'type': 2
});
} else if (type == 2) {
//
routerList.add({
'btnTitle': '设置密码',
'routerName': Routers.passwordKeyDetailPage,
'type': 9
});
routerList.add({
'btnTitle': '设置卡',
'routerName': Routers.otherTypeKeyManagePage,
'type': 0
});
routerList.add({
'btnTitle': '设置指纹',
'routerName': Routers.otherTypeKeyManagePage,
'type': 1
});
}
for (int i = 0; i < routerList.length; i++) {
widgetList.add(SizedBox(
width: ScreenUtil().screenWidth - 40.w,
height: 60.h,
child: OutlinedButton(
style: OutlinedButton.styleFrom(
// backgroundColor: Colors.white,
side: BorderSide(width: 1, color: AppColors.mainColor)),
onPressed: () {
if (routerList[i]['type'] == 9) {
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
} else {
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
arguments: routerList[i]['type']);
}
},
child: Text(
routerList[i]['btnTitle'],
style: TextStyle(color: AppColors.mainColor, fontSize: 24.sp),
)),
));
widgetList.add(
SizedBox(
height: 10.h,
),
);
}
return Column(
children: widgetList,
);
}
// Widget addControlsBtn(int type) {
// List<Widget> widgetList = [];
// List<Map<String, dynamic>> routerList = [];
// //
// if (type == 0) {
// routerList.add({
// 'btnTitle': '设置密码',
// 'routerName': Routers.passwordKeyDetailPage,
// 'type': 9
// });
// routerList.add({
// 'btnTitle': '设置指纹',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 1
// });
// routerList.add({
// 'btnTitle': '设置遥控',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 2
// });
// } else if (type == 1) {
// //
// routerList.add({
// 'btnTitle': '设置密码',
// 'routerName': Routers.passwordKeyDetailPage,
// 'type': 9
// });
// routerList.add({
// 'btnTitle': '设置卡',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 0
// });
// routerList.add({
// 'btnTitle': '设置遥控',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 2
// });
// } else if (type == 2) {
// //
// routerList.add({
// 'btnTitle': '设置密码',
// 'routerName': Routers.passwordKeyDetailPage,
// 'type': 9
// });
// routerList.add({
// 'btnTitle': '设置卡',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 0
// });
// routerList.add({
// 'btnTitle': '设置指纹',
// 'routerName': Routers.otherTypeKeyManagePage,
// 'type': 1
// });
// }
//
// for (int i = 0; i < routerList.length; i++) {
// widgetList.add(SizedBox(
// width: ScreenUtil().screenWidth - 40.w,
// height: 60.h,
// child: OutlinedButton(
// style: OutlinedButton.styleFrom(
// // backgroundColor: Colors.white,
// side: BorderSide(width: 1, color: AppColors.mainColor)),
// onPressed: () {
// if (routerList[i]['type'] == 9) {
// Navigator.pushNamed(context, Routers.passwordKeyManagePage);
// } else {
// Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
// arguments: routerList[i]['type']);
// }
// },
// child: Text(
// routerList[i]['btnTitle'],
// style: TextStyle(color: AppColors.mainColor, fontSize: 24.sp),
// )),
// ));
//
// widgetList.add(
// SizedBox(
// height: 10.h,
// ),
// );
// }
//
// return Column(
// children: widgetList,
// );
// }
String getAppBarTitle(int type) {
String title = "";

View File

@ -70,7 +70,8 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
onClick: () async {
var data = await Get.toNamed(Routers.otherTypeKeyManagePage, arguments: {
"lockId": state.lockId.value,
"fromType": state.fromType.value
"keyType": state.fromType.value,
"fromType": 1 // 1 2
});
if(data != null) {
switch (state.fromType.value) {

View File

@ -22,18 +22,23 @@ class _OtherTypeKeyManagePageState extends State<OtherTypeKeyManagePage> {
// 0 1 2
Map map = Get.arguments;
var lockId = map["lockId"];
var lockType = map["fromType"];
var lockKeyType = map["keyType"];
var fromType = map["fromType"]; // 1 2
var fromTypeTwoStaffName = "";
if(fromType == 2){
fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; //
}
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.addTip!.tr}${getAppBarTitle(lockType)}",
"${TranslationLoader.lanKeys!.addTip!.tr}${getAppBarTitle(lockKeyType)}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Column(
children: [
OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType, lockId: lockId),
OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockKeyType, lockId: lockId, fromType: fromType, fromTypeTwoStaffName:fromTypeTwoStaffName),
],
),
);

View File

@ -11,8 +11,10 @@ class OtherTypeKeyManageTabbar extends StatefulWidget {
var initialIndex = 1;
var lockType = 0;
var lockId = 0;
var fromType = 0; // 1 2
var fromTypeTwoStaffName = "";//
OtherTypeKeyManageTabbar(
{Key? key, required this.initialIndex, required this.lockType, required this.lockId})
{Key? key, required this.initialIndex, required this.lockType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName})
: super(key: key);
@override
@ -91,6 +93,8 @@ class _OtherTypeKeyManageTabbarState extends State<OtherTypeKeyManageTabbar>
seletType: item.seletType,
lockType: widget.lockType,
lockId: widget.lockId,
fromType: widget.fromType,
fromTypeTwoStaffName:widget.fromTypeTwoStaffName
))
.toList(),
),

View File

@ -24,3 +24,9 @@ class PassCurrentLockInformationEvent{
class OtherTypeRefreshListEvent{
OtherTypeRefreshListEvent();
}
/// number
class ChickInAddStaffCardAndFingerprintBlockNumberEvent{
String number;
ChickInAddStaffCardAndFingerprintBlockNumberEvent(this.number);
}

View File

@ -387,10 +387,19 @@ class LanKeyEntity {
this.wifiPwd,
this.pleaseEnterWifiPwd,
this.wifiDistributionNetwork,
this.attendanceRecord,
this.edit,
this.stressFingerprint,
this.effectiveDay
this.attendanceRecord,
this.edit,
this.stressFingerprint,
this.effectiveDay,
this.whetherTheEmployeeHasPassword,
this.whetherTheEmployeeHasCard,
this.whetherTheEmployeeHasFingerprint,
this.seletPassword,
this.seletCard,
this.seletFingerprint,
this.getKey,
this.getCard,
this.getFingerprint,
});
LanKeyEntity.fromJson(dynamic json) {
@ -815,6 +824,15 @@ class LanKeyEntity {
edit = json['edit'];
stressFingerprint = json['stressFingerprint'];
effectiveDay = json['effectiveDay'];
whetherTheEmployeeHasPassword = json['whetherTheEmployeeHasPassword'];
whetherTheEmployeeHasCard = json['whetherTheEmployeeHasCard'];
whetherTheEmployeeHasFingerprint = json['whetherTheEmployeeHasFingerprint'];
seletPassword = json['seletPassword'];
seletCard = json['seletCard'];
seletFingerprint = json['seletFingerprint'];
getKey = json['getKey'];
getCard = json['getCard'];
getFingerprint = json['getFingerprint'];
}
String? starLock;
String? clickUnlockAndHoldDownClose;
@ -1225,6 +1243,16 @@ class LanKeyEntity {
String? edit;
String? stressFingerprint;
String? effectiveDay;
String? whetherTheEmployeeHasPassword;
String? whetherTheEmployeeHasCard;
String? whetherTheEmployeeHasFingerprint;
String? seletPassword;
String? seletCard;
String? seletFingerprint;
String? getKey;
String? getCard;
String? getFingerprint;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['starLock'] = starLock;
@ -1645,6 +1673,15 @@ class LanKeyEntity {
map['edit'] = edit;
map['stressFingerprint'] = stressFingerprint;
map['effectiveDay'] = effectiveDay;
map['whetherTheEmployeeHasPassword'] = whetherTheEmployeeHasPassword;
map['whetherTheEmployeeHasCard'] = whetherTheEmployeeHasCard;
map['whetherTheEmployeeHasFingerprint'] = whetherTheEmployeeHasFingerprint;
map['seletPassword'] = seletPassword;
map['seletCard'] = seletCard;
map['seletFingerprint'] = seletFingerprint;
map['getKey'] = getKey;
map['getCard'] = getCard;
map['getFingerprint'] = getFingerprint;
return map;
}
}