From fedf1ce36046ae0e7b4779c68ac5524a84d16565 Mon Sep 17 00:00:00 2001 From: luotaiqian <1147642922@qq.com> Date: Tue, 7 Jul 2026 11:52:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonnelInfo/Certificate/index.js | 59 ++++++++++++++----- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js index b3692cc..a87e45f 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js @@ -59,21 +59,29 @@ function StaffCertificatePage(props) { }; return ( - + { setCurrentId(""); setAddModalOpen(true); }}>新增证书 + } + > + + , , - - + + , - - + + , ]} onReset={() => { @@ -88,8 +96,10 @@ function StaffCertificatePage(props) { - - - - - - @@ -278,7 +282,25 @@ function CertModal({ > - + + + + + + + + + + + + + + + + + + + {info.certName} - {info.certCategory} + {info.certTypeCode} + {info.certTypeName} + {info.certCategoryCode} + {info.certCategoryName} + {info.operationCategoryCode} + {info.operationCategoryName} {info.certNo} {info.issueOrg} {info.validStartDate} {info.validEndDate} - {info.reviewDate} + {info.reviewDate} From 9073e492bcf26fa14e4dbdb37b981c5780fbf090 Mon Sep 17 00:00:00 2001 From: luotaiqian <1147642922@qq.com> Date: Tue, 7 Jul 2026 13:38:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonnelInfo/Certificate/index.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js index a87e45f..c759517 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js @@ -2,6 +2,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Button, DatePicker, Descriptions, Form, Input, message, Modal, Select, Table, Upload } from "antd"; import { UploadOutlined } from "@ant-design/icons"; import { useEffect, useState } from "react"; +import dayjs from "dayjs"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; @@ -186,9 +187,16 @@ function CertModal({ const res = await staffCertificateInfo({ id: currentId }); if (cancelled || !res?.data) return; const data = { ...res.data }; - // 将 validStartDate/validEndDate 合并为 validDate(RangePicker) + // 将 validStartDate/validEndDate 合并为 validDate(RangePicker 需要 dayjs 对象) if (data.validStartDate || data.validEndDate) { - data.validDate = [data.validStartDate, data.validEndDate]; + data.validDate = [ + data.validStartDate ? dayjs(data.validStartDate) : undefined, + data.validEndDate ? dayjs(data.validEndDate) : undefined, + ]; + } + // 复核日期需要转为 dayjs 对象 + if (data.reviewDate) { + data.reviewDate = dayjs(data.reviewDate); } // 处理证书附件 fileList let fileList = []; @@ -231,8 +239,9 @@ function CertModal({ const payload = { ...values, personnelId: staffId, - validStartDate: values.validDate?.[0], - validEndDate: values.validDate?.[1], + validStartDate: values.validDate?.[0] ? dayjs(values.validDate[0]).format("YYYY-MM-DD") : undefined, + validEndDate: values.validDate?.[1] ? dayjs(values.validDate[1]).format("YYYY-MM-DD") : undefined, + reviewDate: values.reviewDate ? dayjs(values.reviewDate).format("YYYY-MM-DD") : undefined, certAttachmentUrl: Array.isArray(values.certAttachmentUrl) ? values.certAttachmentUrl.map((f) => f.url || f.response?.url).filter(Boolean).join(",") : "",