1,锁设置--开锁提醒接口字段修改
2,购买记录页面bug修改 3,添加指纹/卡/人脸模块限时类型添加时间数据不同步问题修改
This commit is contained in:
parent
3feba32a08
commit
ffd709a1ae
@ -680,7 +680,7 @@
|
||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "After the password is generated, please use it once for activation before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. After the password is activated, it can be used unlimited times within the validity period.",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock. The clear code is used to clear all the passwords generated before 0 o'clock today.",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。": "After the password is generated, please use it before 23:59 on the same day, otherwise it will be invalid after 0 o'clock.",
|
||||
"清空密码底部提示": "The password is valid until 24 o 'clock on the day of emptying\nEmpty content 1: All passwords except custom generated before 0 o 'clock on the same day (passwords generated after 0 o 'clock on the same day are not affected by the empty password and can continue to be used) \nEmpty content 2: Clear passwords Clear all custom passwords (used and unused) immediately after use \nTo completely clear all passwords, use the Reset All Passwords feature",
|
||||
"清空密码底部提示": "The password is valid until 24 o 'clock on the day of emptying\n Empty Content 1: All passwords generated before 0:00 of the day (Passwords generated after 0:00 of the day are not affected by clearing passwords and can continue to be used) \nEmpty content 2: Clear passwords Clear all custom passwords (used and unused) immediately after use \nTo completely clear all passwords, use the Reset All Passwords feature",
|
||||
"相机": "camera",
|
||||
"相册": "photos",
|
||||
"读写": "storage",
|
||||
|
||||
@ -683,7 +683,7 @@
|
||||
"密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。": "密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。": "密码生成后,请在当日23:59前使用,否则过0点后失效。清空码用于清空今天0点之前生成的所有密码。",
|
||||
"密码生成后,请在当日23:59前使用,否则过0点后失效。": "密码生成后,请在当日23:59前使用,否则过0点后失效。",
|
||||
"清空密码底部提示": "清空密码当日24点前有效\n清空内容1:当日0点前生成的除自定义以外所有密码(当日0点后生成的密码,不受清空密码影响,可继续使用)\n清空内容2:清空密码使用后,立即清除所有自定义密码(含使用过和未使用过的)\n如需彻底清除所有密码,请使用重置所有密码功能",
|
||||
"清空密码底部提示": "清空密码当日24点前有效\n清空内容1:当日0点前生成的所有密码(当日0点后生成的密码,不受清空密码影响,可继续使用)\n清空内容2:清空密码使用后,立即清除所有自定义密码(含使用过和未使用过的)\n如需彻底清除所有密码,请使用重置所有密码功能",
|
||||
"密码不一致哦": "密码不一致哦",
|
||||
"相机": "相机",
|
||||
"相册": "相册",
|
||||
|
||||
@ -20,14 +20,13 @@ class AddICCardState{
|
||||
final startDate = "".obs;
|
||||
final weekDay = [].obs;
|
||||
final fromType = 0.obs;
|
||||
final effectiveDateTime = "".obs;// 生效时间
|
||||
final failureDateTime = "".obs;// 失效时间
|
||||
final selectType = "0".obs;// 0永久 1显示 2循环
|
||||
final effectiveDateTime = "".obs; // 生效时间
|
||||
final failureDateTime = "".obs; // 失效时间
|
||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||
|
||||
AddICCardState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
cardName.value = map["cardName"];
|
||||
cardNumber.value = map["cardNumber"];
|
||||
@ -40,5 +39,12 @@ class AddICCardState{
|
||||
effectiveDateTime.value = map["effectiveTime"];
|
||||
failureDateTime.value = map["failureTime"];
|
||||
selectType.value = map["selectType"];
|
||||
//循环类型下,结束时间加一天
|
||||
if (selectType.value == '2') {
|
||||
endDate.value =
|
||||
"${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
} else {
|
||||
endDate.value = map["endDate"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,12 +153,15 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
rightTitle: state.adder.value,)),
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
isHaveLine: true,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
rightTitle: DateTool().dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
SizedBox(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.stressCard!.tr,
|
||||
|
||||
@ -26,14 +26,13 @@ class AddFaceState {
|
||||
final startDate = "".obs;
|
||||
final weekDay = [].obs;
|
||||
final fromType = 0.obs;
|
||||
final effectiveDateTime = "".obs;// 生效时间
|
||||
final failureDateTime = "".obs;// 失效时间
|
||||
final selectType = "0".obs;// 0永久 1显示 2循环
|
||||
final effectiveDateTime = "".obs; // 生效时间
|
||||
final failureDateTime = "".obs; // 失效时间
|
||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||
|
||||
AddFaceState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
faceName.value = map["faceName"];
|
||||
faceType.value = map["faceType"];
|
||||
@ -48,5 +47,12 @@ class AddFaceState {
|
||||
effectiveDateTime.value = map["effectiveTime"];
|
||||
failureDateTime.value = map["failureTime"];
|
||||
selectType.value = map["selectType"];
|
||||
//循环类型下,结束时间加一天
|
||||
if (selectType.value == '2') {
|
||||
endDate.value =
|
||||
"${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
} else {
|
||||
endDate.value = map["endDate"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,14 +22,13 @@ class AddFingerprintState{
|
||||
final startDate = "".obs;
|
||||
final weekDay = [].obs;
|
||||
final fromType = 1.obs;
|
||||
final effectiveDateTime = "".obs;// 生效时间
|
||||
final failureDateTime = "".obs;// 失效时间
|
||||
final selectType = "0".obs;// 0永久 1显示 2循环
|
||||
final effectiveDateTime = "".obs; // 生效时间
|
||||
final failureDateTime = "".obs; // 失效时间
|
||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||
|
||||
AddFingerprintState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = "${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
addType.value = map["addType"];
|
||||
fingerprintName.value = map["fingerprintName"];
|
||||
fingerprintType.value = map["fingerprintType"];
|
||||
@ -42,5 +41,12 @@ class AddFingerprintState{
|
||||
effectiveDateTime.value = map["effectiveTime"];
|
||||
failureDateTime.value = map["failureTime"];
|
||||
selectType.value = map["selectType"];
|
||||
//循环类型下,结束时间加一天
|
||||
if (selectType.value == '2') {
|
||||
endDate.value =
|
||||
"${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||
} else {
|
||||
endDate.value = map["endDate"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
@ -24,7 +23,8 @@ import 'lockSetInfo_entity.dart';
|
||||
import 'lockSet_state.dart';
|
||||
|
||||
typedef BlockSetStateCallback = void Function();
|
||||
typedef BlockSetCheckInCallback = void Function(CheckingInInfoDataEntity checkingInInfoDataEntity);
|
||||
typedef BlockSetCheckInCallback = void Function(
|
||||
CheckingInInfoDataEntity checkingInInfoDataEntity);
|
||||
|
||||
class LockSetLogic extends BaseGetXController {
|
||||
final LockSetState state = LockSetState();
|
||||
@ -40,12 +40,14 @@ class LockSetLogic extends BaseGetXController {
|
||||
// }
|
||||
|
||||
// 恢复出厂设置
|
||||
if (reply is FactoryDataResetReply && (state.ifCurrentScreen.value == true)) {
|
||||
if (reply is FactoryDataResetReply &&
|
||||
(state.ifCurrentScreen.value == true)) {
|
||||
_replyFactoryDataResetKey(reply);
|
||||
}
|
||||
|
||||
// 设置支持功能(不带参数)
|
||||
if ((reply is SetSupportFunctionsNoParametersReply) && (state.ifCurrentScreen.value == true)) {
|
||||
if ((reply is SetSupportFunctionsNoParametersReply) &&
|
||||
(state.ifCurrentScreen.value == true)) {
|
||||
_replySetSupportFunctionsWithParameters(reply);
|
||||
}
|
||||
|
||||
@ -124,7 +126,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
IoSenderManage.senderFactoryDataReset(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
userID: await Storage.getUid(),
|
||||
keyID: "1",
|
||||
keyID: '1',
|
||||
needAuthor: 1,
|
||||
publicKey: publicKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
@ -241,11 +243,14 @@ class LockSetLogic extends BaseGetXController {
|
||||
// 恢复出厂设置
|
||||
Future<void> factoryDataResetAction() async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(isShowBlueConnetctToast: false, action: (){
|
||||
dismissEasyLoading();
|
||||
showDeletAlertTipDialog();
|
||||
});
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
|
||||
showBlueConnetctToastTimer(
|
||||
isShowBlueConnetctToast: false,
|
||||
action: () {
|
||||
dismissEasyLoading();
|
||||
showDeletAlertTipDialog();
|
||||
});
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState connectionState) async {
|
||||
if (connectionState == BluetoothConnectionState.connected) {
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
@ -259,7 +264,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
IoSenderManage.senderFactoryDataReset(
|
||||
lockID: BlueManage().connectDeviceName,
|
||||
userID: await Storage.getUid(),
|
||||
keyID: "1",
|
||||
keyID: '1',
|
||||
needAuthor: 1,
|
||||
publicKey: publicKeyDataList,
|
||||
privateKey: getPrivateKeyList,
|
||||
@ -267,7 +272,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showDeletAlertTipDialog();
|
||||
}
|
||||
}
|
||||
@ -303,10 +308,11 @@ class LockSetLogic extends BaseGetXController {
|
||||
// 设置支持功能(带参数)
|
||||
Future<void> sendBurglarAlarm(int type) async {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(action: (){
|
||||
showBlueConnetctToastTimer(action: () {
|
||||
dismissEasyLoading();
|
||||
});
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async {
|
||||
BlueManage().blueSendData(BlueManage().connectDeviceName,
|
||||
(BluetoothConnectionState connectionState) async {
|
||||
if (connectionState == BluetoothConnectionState.connected) {
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
@ -345,7 +351,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
} else if (connectionState == BluetoothConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
if (state.ifCurrentScreen.value == true) {
|
||||
showBlueConnetctToast();
|
||||
}
|
||||
}
|
||||
@ -360,23 +366,28 @@ class LockSetLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.lockSetInfoData.value = entity.data!;
|
||||
CommonDataManage().currentLockSetInfoData = entity.data!;
|
||||
|
||||
state.lockSettingInfo.value = state.lockSetInfoData.value.lockSettingInfo!;
|
||||
|
||||
state.lockSettingInfo.value =
|
||||
state.lockSetInfoData.value.lockSettingInfo!;
|
||||
state.lockFeature.value = state.lockSetInfoData.value.lockFeature!;
|
||||
state.lockStatus.value = state.lockSetInfoData.value.lockStatus!;
|
||||
state.lockBasicInfo.value = state.lockSetInfoData.value.lockBasicInfo!;
|
||||
|
||||
state.isAttendance.value = state.lockSettingInfo.value.attendance!;
|
||||
state.isOpenLockNeedOnline.value = state.lockSettingInfo.value.appUnlockOnline!;
|
||||
state.isOpenLockNeedOnline.value =
|
||||
state.lockSettingInfo.value.appUnlockOnline!;
|
||||
|
||||
state.isOpenBlueBroadcast.value = state.lockSettingInfo.value.bluetoothBroadcast!;
|
||||
state.isOpenExceptionWarnings.value = state.lockSettingInfo.value.bluetoothBroadcast!;
|
||||
state.isOpenBlueBroadcast.value =
|
||||
state.lockSettingInfo.value.bluetoothBroadcast!;
|
||||
state.isOpenExceptionWarnings.value =
|
||||
state.lockSettingInfo.value.bluetoothBroadcast!;
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
// 开启考勤获取是否有公司
|
||||
void openCheckingInData(BlockSetCheckInCallback blockSetCheckInCallback) async {
|
||||
void openCheckingInData(
|
||||
BlockSetCheckInCallback blockSetCheckInCallback) async {
|
||||
var entity = await ApiRepository.to.openCheckingInData(
|
||||
lockId: state.lockSetInfoData.value.lockId.toString(),
|
||||
);
|
||||
@ -394,23 +405,26 @@ class LockSetLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.isAttendance.value = (state.isAttendance.value == 1 ? 0 : 1);
|
||||
state.lockSettingInfo.value.attendance = state.isAttendance.value;
|
||||
showToast("设置成功".tr, something: (){
|
||||
showToast('设置成功'.tr, something: () {
|
||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(0, state.lockSettingInfo.value.attendance!.toString()));
|
||||
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(
|
||||
0, state.lockSettingInfo.value.attendance!.toString()));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 设置是否打开开锁提醒
|
||||
void setLockPickingReminder() async {
|
||||
Future<void> setLockPickingReminder() async {
|
||||
var entity = await ApiRepository.to.setLockPickingReminderData(
|
||||
lockId: state.lockSetInfoData.value.lockId!,
|
||||
unlockReminderPush: state.isLockPickingReminder.value == 1 ? 0 : 1,
|
||||
unlockReminder: state.isLockPickingReminder.value == 1 ? 0 : 1,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.isLockPickingReminder.value = (state.isLockPickingReminder.value == 1 ? 0 : 1);
|
||||
state.lockSettingInfo.value.unlockReminderPush = state.isLockPickingReminder.value;
|
||||
showToast("设置成功".tr, something: (){
|
||||
state.isLockPickingReminder.value =
|
||||
(state.isLockPickingReminder.value == 1 ? 0 : 1);
|
||||
state.lockSettingInfo.value.unlockReminderPush =
|
||||
state.isLockPickingReminder.value;
|
||||
showToast('设置成功'.tr, something: () {
|
||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||
});
|
||||
}
|
||||
@ -423,11 +437,14 @@ class LockSetLogic extends BaseGetXController {
|
||||
appUnlockOnline: state.isOpenLockNeedOnline.value == 1 ? 0 : 1,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.isOpenLockNeedOnline.value = (state.isOpenLockNeedOnline.value == 1 ? 0 : 1);
|
||||
state.lockSettingInfo.value.appUnlockOnline = state.isOpenLockNeedOnline.value;
|
||||
state.isOpenLockNeedOnline.value =
|
||||
(state.isOpenLockNeedOnline.value == 1 ? 0 : 1);
|
||||
state.lockSettingInfo.value.appUnlockOnline =
|
||||
state.isOpenLockNeedOnline.value;
|
||||
|
||||
showToast("设置成功".tr,something: (){
|
||||
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(1, state.lockSettingInfo.value.appUnlockOnline!.toString()));
|
||||
showToast('设置成功'.tr, something: () {
|
||||
eventBus.fire(LockSetChangeSetRefreshLockDetailWithType(
|
||||
1, state.lockSettingInfo.value.appUnlockOnline!.toString()));
|
||||
eventBus.fire(RefreshLockListInfoDataEvent());
|
||||
});
|
||||
}
|
||||
@ -437,37 +454,42 @@ class LockSetLogic extends BaseGetXController {
|
||||
StreamSubscription? _passCurrentLockInformationEvent;
|
||||
void initLoadDataAction(BlockSetStateCallback blockSetStateCallback) {
|
||||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||
_passCurrentLockInformationEvent = eventBus.on<PassCurrentLockInformationEvent>().listen((event) {
|
||||
_passCurrentLockInformationEvent =
|
||||
eventBus.on<PassCurrentLockInformationEvent>().listen((event) {
|
||||
getLockSettingInfoData();
|
||||
});
|
||||
}
|
||||
|
||||
void showDeletAlertTipDialog({String? showContent = ""}) {
|
||||
var content = showContent!.isEmpty ? "${"删除设备失败,请确保在设备附近,设备未被连接,设备已打开".tr}${BlueManage().connectDeviceName!.contains("T9A") == true ? "。如果是全自动锁,请使屏幕变亮".tr : ""}" : showContent;
|
||||
void showDeletAlertTipDialog({String? showContent = ''}) {
|
||||
var content = showContent!.isEmpty
|
||||
? "${"删除设备失败,请确保在设备附近,设备未被连接,设备已打开".tr}${BlueManage().connectDeviceName!.contains("T9A") == true ? "。如果是全自动锁,请使屏幕变亮".tr : ""}"
|
||||
: showContent;
|
||||
ShowTipView().showSureAlertDialog(content);
|
||||
}
|
||||
|
||||
|
||||
/// 以下为删除逻辑
|
||||
deleyLockLogicOfRoles(){
|
||||
/// 以下为删除逻辑
|
||||
deleyLockLogicOfRoles() {
|
||||
if (state.lockBasicInfo.value.isLockOwner == 1) {
|
||||
// 超级管理员必须通过连接蓝牙删除
|
||||
ShowTipView().showIosTipWithContentDialog("删除锁后,所有信息都会一起删除,确定删除锁吗?".tr, (){
|
||||
ShowTipView().showIosTipWithContentDialog('删除锁后,所有信息都会一起删除,确定删除锁吗?'.tr,
|
||||
() {
|
||||
// 删除锁
|
||||
ShowTipView().showTFViewAlertDialog(state.passwordTF, "请输入登录密码".tr, "请输入登录密码".tr, (){
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.passwordTF, '请输入登录密码'.tr, '请输入登录密码'.tr, () {
|
||||
checkLoginPassword();
|
||||
});
|
||||
});
|
||||
} else if (state.lockBasicInfo.value.keyRight == 1){
|
||||
} else if (state.lockBasicInfo.value.keyRight == 1) {
|
||||
// 授权管理员弹框提示
|
||||
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog("同时删除其发送的所有钥匙,钥匙删除后不能恢复".tr, (a){
|
||||
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog(
|
||||
'同时删除其发送的所有钥匙,钥匙删除后不能恢复'.tr, (a) {
|
||||
// 授权管理员删除
|
||||
state.deleteAdministratorIsHaveAllData.value = a;
|
||||
deletKeyData();
|
||||
});
|
||||
} else{
|
||||
} else {
|
||||
// 普通用户直接删除
|
||||
ShowTipView().showIosTipWithContentDialog("是否删除钥匙?".tr, (){
|
||||
ShowTipView().showIosTipWithContentDialog('是否删除钥匙?'.tr, () {
|
||||
deletKeyData();
|
||||
});
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: _lockRemindSwitch())),
|
||||
),
|
||||
@ -661,7 +661,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: (state.isLockPickingReminder.value) == 1 ? true : false,
|
||||
value: state.isLockPickingReminder.value == 1 ? true : false,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
logic.setLockPickingReminder();
|
||||
|
||||
@ -73,6 +73,7 @@ class RecordItem {
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
String? useDate;
|
||||
String? buyDate;
|
||||
|
||||
RecordItem(
|
||||
{this.id,
|
||||
@ -88,7 +89,8 @@ class RecordItem {
|
||||
this.amount,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.useDate});
|
||||
this.useDate,
|
||||
this.buyDate});
|
||||
|
||||
RecordItem.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
@ -105,6 +107,7 @@ class RecordItem {
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
useDate = json['useDate'];
|
||||
buyDate = json['buyDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@ -123,6 +126,7 @@ class RecordItem {
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
data['useDate'] = useDate;
|
||||
data['buyDate'] = buyDate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ class _PurchaseRecords extends StatelessWidget {
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
itemData.createdAt?.substring(0, 10) ?? '',
|
||||
itemData.buyDate ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: AppColors.blackColor,
|
||||
|
||||
@ -891,13 +891,12 @@ class ApiProvider extends BaseProvider {
|
||||
isUnShowLoading: true);
|
||||
|
||||
// 获取开锁提醒
|
||||
Future<Response> setLockPickingReminderData(
|
||||
int lockId, int unlockReminderPush) =>
|
||||
Future<Response> setLockPickingReminderData(int lockId, int unlockReminder) =>
|
||||
post(
|
||||
updateLockSettingUrl.toUrl,
|
||||
jsonEncode({
|
||||
'lockId': lockId,
|
||||
'unlockReminderPush': unlockReminderPush,
|
||||
'unlockReminder': unlockReminder,
|
||||
}));
|
||||
|
||||
// 获取员工列表
|
||||
|
||||
@ -1095,10 +1095,10 @@ class ApiRepository {
|
||||
// 设置锁开锁提醒
|
||||
Future<LoginEntity> setLockPickingReminderData({
|
||||
required int lockId,
|
||||
required int unlockReminderPush,
|
||||
required int unlockReminder,
|
||||
}) async {
|
||||
final res = await apiProvider.setLockPickingReminderData(
|
||||
lockId, unlockReminderPush);
|
||||
final res =
|
||||
await apiProvider.setLockPickingReminderData(lockId, unlockReminder);
|
||||
return LoginEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user