From 412b8479c0eea4ebc08a90edb6a9fb9f9dfbece2 Mon Sep 17 00:00:00 2001
From: huwei <3313749341@qq.com>
Date: Tue, 7 Jul 2026 16:30:26 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=8A=A4=EF=BC=8C=E4=BA=BA?=
=?UTF-8?q?=E5=91=98=E9=87=8D=E7=BD=AE=E5=AF=86=E7=A0=81=E3=80=81=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E7=AD=89=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/staffInfo/index.js | 10 ++--
.../PersonnelInfo/List/index.js | 53 +------------------
.../EnterpriseInfo/QualificationCert/index.js | 7 +++
3 files changed, 12 insertions(+), 58 deletions(-)
diff --git a/src/api/staffInfo/index.js b/src/api/staffInfo/index.js
index 8ef9e4d..49d53b5 100644
--- a/src/api/staffInfo/index.js
+++ b/src/api/staffInfo/index.js
@@ -1,5 +1,6 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
-import { apiPost, apiPostDelete, safeAction } from "../enterpriseInfo/http";
+import { apiPost, safeAction } from "../enterpriseInfo/http";
+import { asId } from "../enterpriseInfo/idUtil";
export const staffInfoList = declareRequest(
"staffInfoLoading",
@@ -25,13 +26,10 @@ export const staffInfoEdit = declareRequest(
export const staffInfoRemove = declareRequest(
"staffInfoLoading",
- safeAction(async ({ id }) => apiPostDelete("/safetyEval/org-personnel/delete", id)),
+ safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/delete", { data: asId(id) })),
);
export const staffInfoResetPassword = declareRequest(
"staffInfoLoading",
- safeAction(async ({ id }) => {
- const url = `/safetyEval/org-personnel/reset-password?id=${encodeURIComponent(id)}`;
- return apiPost(url, {});
- }),
+ safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/reset-password", { data: asId(id) })),
);
\ No newline at end of file
diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
index adfda40..be78e73 100644
--- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
+++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
@@ -1,6 +1,5 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
-import { Button, DatePicker, Form, Image, Input, message, Modal, Row, Col, Select, Table, Upload } from "antd";
-import { UploadOutlined } from "@ant-design/icons";
+import { Button, DatePicker, Form, Input, message, Modal, Row, Col, Select, Table } from "antd";
import { useEffect, useRef, useState } from "react";
import dayjs from "dayjs";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
@@ -319,14 +318,10 @@ function StaffFormModal({
const [detailLoading, setDetailLoading] = useState(false);
const [deptPositionOptions, setDeptPositionOptions] = useState([]);
const [positionLoading, setPositionLoading] = useState(false);
- const [uploadFileList, setUploadFileList] = useState([]);
- const [previewImage, setPreviewImage] = useState("");
const watchedDeptId = Form.useWatch("deptId", form);
const wasOpenRef = useRef(false);
const inflightDeptRef = useRef(null);
- const isImage = (url) => /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(url || "");
-
const loadPositionsByDept = async (deptId) => {
const id = deptId;
if (!id) {
@@ -363,8 +358,6 @@ function StaffFormModal({
if (!currentId) {
form.resetFields();
setDeptPositionOptions([]);
- setUploadFileList([]);
- setPreviewImage("");
form.setFieldsValue({
registerEngineerFlag: 2,
});
@@ -372,8 +365,6 @@ function StaffFormModal({
}
if (!open) {
setDeptPositionOptions([]);
- setUploadFileList([]);
- setPreviewImage("");
}
wasOpenRef.current = open;
}, [open, currentId, form]);
@@ -410,8 +401,6 @@ function StaffFormModal({
const handleCancel = () => {
form.resetFields();
setDeptPositionOptions([]);
- setUploadFileList([]);
- setPreviewImage("");
onCancel();
};
@@ -661,46 +650,6 @@ function StaffFormModal({
label="申报专业能力证明材料"
maxCount={5}
/>
-
{
- if (Array.isArray(e)) return e;
- return e?.fileList;
- }}
- >
- {
- setUploadFileList(info.fileList);
- }}
- onPreview={(file) => {
- const src = file.url || file.response?.data?.url || file.thumbUrl;
- if (!src) return;
- if (isImage(src)) {
- setPreviewImage(src);
- } else {
- window.open(src, "_blank");
- }
- }}
- >
- }>上传文件
-
-
- {
- if (!visible) setPreviewImage("");
- },
- }}
- />
diff --git a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js
index 4d090dc..a6773bd 100644
--- a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js
+++ b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js
@@ -59,6 +59,13 @@ function QualificationCertPage(props) {
...router.query,
current: router.query.current || 1,
pageSize: router.query.pageSize || 10,
+ // 映射后端期望的字段名:前端 likeCertName → 后端 certName
+ certName: router.query.likeCertName || undefined,
+ // 映射日期筛选:前端 validStartDate/validEndDate → 后端 startTime/endTime (LocalDateTime 格式)
+ startTime: router.query.validStartDate ? `${router.query.validStartDate} 00:00:00` : undefined,
+ endTime: router.query.validEndDate ? `${router.query.validEndDate} 23:59:59` : undefined,
+ // 后端分页字段名为 size
+ size: router.query.pageSize || 10,
};
const res = await props.orgQualificationCertList(params);
if (res?.success !== false) {
From c4861a858d8110958acb02ad1995d06012ee93ee Mon Sep 17 00:00:00 2001
From: huwei <3313749341@qq.com>
Date: Tue, 7 Jul 2026 16:46:27 +0800
Subject: [PATCH 2/4] =?UTF-8?q?bug=E4=BF=AE=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Container/EnterpriseInfo/DepartmentPosition/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js
index 0b47aff..f8dd9bb 100644
--- a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js
+++ b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js
@@ -55,9 +55,9 @@ function DepartmentPositionPage(props) {
try {
const res = await props.staffInfoList?.({ pageIndex: 1, pageSize: 500 });
setStaffOptions((res?.data || []).map((s) => ({
- label: `${s.staffName}(${s.account})`,
+ label: `${s.userName ?? s.staffName}(${s.account})`,
value: s.account,
- staffName: s.staffName,
+ staffName: s.userName ?? s.staffName,
})));
}
catch (err) {
From 8d08ce35fcbea5898f8f2c3c3b1e1ec85b1f93ea Mon Sep 17 00:00:00 2001
From: huwei <3313749341@qq.com>
Date: Tue, 7 Jul 2026 16:47:44 +0800
Subject: [PATCH 3/4] =?UTF-8?q?bug=E4=BF=AE=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../EnterpriseInfo/ResignationApply/index.js | 55 ++++---------------
1 file changed, 10 insertions(+), 45 deletions(-)
diff --git a/src/pages/Container/EnterpriseInfo/ResignationApply/index.js b/src/pages/Container/EnterpriseInfo/ResignationApply/index.js
index 7930e3b..75e4fa3 100644
--- a/src/pages/Container/EnterpriseInfo/ResignationApply/index.js
+++ b/src/pages/Container/EnterpriseInfo/ResignationApply/index.js
@@ -13,7 +13,6 @@ import {
} from "antd";
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import AttachmentUpload from "~/components/AttachmentUpload";
-import { UploadOutlined } from "@ant-design/icons";
import PreviewUrlButton from "~/components/PreviewUrlButton";
import { useEffect, useState } from "react";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
@@ -222,6 +221,12 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
const handleSubmit = async () => {
try {
const values = await form.validateFields();
+ if (!values.reportFileUrl?.length) {
+ form.setFields([
+ { name: "reportFileUrl", errors: ["请上传离职通知报告"] },
+ ]);
+ return;
+ }
setSubmitting(true);
values.applyTime =
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
@@ -292,52 +297,12 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
-
-
- {
- const url = form.getFieldValue("reportFileUrl");
- if (url) window.open(url);
- }}
- onChange={(info) => {
- if (info.file.status === "uploading") {
- setUploading(true);
- } else {
- setUploading(false);
- if (info.file.status === "done") {
- const data = info.file.response?.data;
- if (data) {
- const url = data.url || data;
- form.setFieldsValue({ reportFileUrl: url });
- } else {
- message.error("上传失败,未获取到文件地址");
- }
- } else if (info.file.status === "error") {
- message.error(`${info.file.name} 上传失败`);
- }
- }
- }}
- onRemove={() => {
- form.setFieldsValue({ reportFileUrl: "" });
- }}
- >
- }>
- 上传文件
-
-
-
+ maxCount={1}
+ accept=".pdf"
+ />
);
From 3d637b65925ae9ac209463622de4149b27a2f518 Mon Sep 17 00:00:00 2001
From: huwei <3313749341@qq.com>
Date: Tue, 7 Jul 2026 16:50:31 +0800
Subject: [PATCH 4/4] =?UTF-8?q?bug=E4=BF=AE=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Container/EnterpriseInfo/PersonnelChange/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pages/Container/EnterpriseInfo/PersonnelChange/index.js b/src/pages/Container/EnterpriseInfo/PersonnelChange/index.js
index 72376ec..9e51dc2 100644
--- a/src/pages/Container/EnterpriseInfo/PersonnelChange/index.js
+++ b/src/pages/Container/EnterpriseInfo/PersonnelChange/index.js
@@ -181,8 +181,8 @@ function PersonnelChangePage(props) {
width: 140,
render: (_, record) => {
const code = record.resignAuditStatus ?? record.auditStatus ?? record.auditStatusCode;
- return RESIGN_AUDIT_STATUS_LABEL[code] ? {label} : "-";
-
+ const label = RESIGN_AUDIT_STATUS_LABEL[code];
+ return label ? {label} : "-";
},
},
{