|
@@ -168,7 +168,7 @@ class AttendanceReviewController extends GetxController with DioCancelableMixin
|
|
NotifyEngine.showSuccess("Successful".tr);
|
|
NotifyEngine.showSuccess("Successful".tr);
|
|
|
|
|
|
//调用接口刷新指定的Staff的信息
|
|
//调用接口刷新指定的Staff的信息
|
|
- _removeItemsByList(recordIds);
|
|
|
|
|
|
+ _removeItemsByIds(recordIds);
|
|
} else {
|
|
} else {
|
|
ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
|
|
ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
|
|
return;
|
|
return;
|
|
@@ -189,7 +189,7 @@ class AttendanceReviewController extends GetxController with DioCancelableMixin
|
|
NotifyEngine.showSuccess("Successful".tr);
|
|
NotifyEngine.showSuccess("Successful".tr);
|
|
|
|
|
|
//调用接口刷新指定的Staff的信息
|
|
//调用接口刷新指定的Staff的信息
|
|
- _removeItemsByList(recordIds);
|
|
|
|
|
|
+ _removeItemsByIds(recordIds);
|
|
} else {
|
|
} else {
|
|
ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
|
|
ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
|
|
return;
|
|
return;
|
|
@@ -242,14 +242,23 @@ class AttendanceReviewController extends GetxController with DioCancelableMixin
|
|
}
|
|
}
|
|
|
|
|
|
/// 删除对应的recordId的Item数据
|
|
/// 删除对应的recordId的Item数据
|
|
- void _removeItemsByList(String recordIds) {
|
|
|
|
|
|
+ void _removeItemsByIds(String recordIds) {
|
|
|
|
+ // Log.d("需要移除的recordIds ${recordIds}");
|
|
// 将逗号分隔的字符串转换为数组
|
|
// 将逗号分隔的字符串转换为数组
|
|
List<String> recordIdList = recordIds.split(',');
|
|
List<String> recordIdList = recordIds.split(',');
|
|
-
|
|
|
|
// 移除列表中符合条件的项
|
|
// 移除列表中符合条件的项
|
|
- state.datas.removeWhere((e) => recordIdList.contains(e.recordId));
|
|
|
|
|
|
+ state.datas.removeWhere((e) {
|
|
|
|
+ final recordIdStr = e.recordId?.toString();
|
|
|
|
+ final shouldRemove = recordIdStr != null && recordIdList.contains(recordIdStr);
|
|
|
|
+ if (shouldRemove) {
|
|
|
|
+ Log.d("移除项目 recordId: ${recordIdStr}");
|
|
|
|
+ }
|
|
|
|
+ return shouldRemove;
|
|
|
|
+ });
|
|
|
|
|
|
|
|
+ Log.d("移除后的 state.datas ${state.datas}");
|
|
update();
|
|
update();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/// 去用工审核流程页面
|
|
/// 去用工审核流程页面
|