From a722262e4e2723ac01e81d999772581770a50b97 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Wed, 19 Oct 2022 15:28:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/humanAffairs/components/personnelModal.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/client/src/sections/humanAffairs/components/personnelModal.jsx b/web/client/src/sections/humanAffairs/components/personnelModal.jsx index 59d311f..5769d4b 100644 --- a/web/client/src/sections/humanAffairs/components/personnelModal.jsx +++ b/web/client/src/sections/humanAffairs/components/personnelModal.jsx @@ -93,7 +93,7 @@ function pushModal (props) { form.current .validate() .then((values) => { - if (peoplePro.userCode) { + if (peoplePro?.userCode) { if (values.userCode == peoplePro.userCode) { let obj = values if (values.nativePlace) { @@ -549,7 +549,7 @@ function pushModal (props) { label='工作经验:' maxLength="2" style={{ width: 288 }} - initValue={editObj?.experienceYear || ""} + initValue={String(editObj?.experienceYear) || ""} placeholder="请输入工作经验,不超过2位数字" showClear rules={[{ pattern: "^[0-9]*[1-9][0-9]*$", message: "请输入工作经验,不超过2位数字" },]} From 400d02eb108167bce9f2d910383c2642524b2ec8 Mon Sep 17 00:00:00 2001 From: wuqun Date: Wed, 19 Oct 2022 16:54:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(*)=E5=88=A0=E9=99=A4=E7=9A=84=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E5=86=8D=E6=AC=A1=E5=AF=BC=E5=85=A5,del=E6=94=B9?= =?UTF-8?q?=E4=B8=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/member/index.js | 5 +++-- .../sections/humanAffairs/containers/import-members-modal.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index de5d31f..5235fc0 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -706,7 +706,7 @@ async function addMembersBulk (ctx) { for (let i in editMembers) { let { pepUserId, name, idNumber, gender, birthday, nativePlace, marital, politicsStatus, phoneNumber, workPlace, graduatedFrom, educationBackground, specialty, graduationDate, - hiredate, turnProbationPeriod, regularDate, dimissionDate, experienceYear, occupationalHistory } = editMembers[i]; + hiredate, turnProbationPeriod, regularDate, dimissionDate, experienceYear, occupationalHistory, del } = editMembers[i]; let dataToUpdate = { name, @@ -727,7 +727,8 @@ async function addMembersBulk (ctx) { regularDate, dimissionDate, experienceYear, - occupationalHistory + occupationalHistory, + del } await models.Member.update(dataToUpdate, { where: { pepUserId: pepUserId } }); } diff --git a/web/client/src/sections/humanAffairs/containers/import-members-modal.js b/web/client/src/sections/humanAffairs/containers/import-members-modal.js index 54332f9..4526bef 100644 --- a/web/client/src/sections/humanAffairs/containers/import-members-modal.js +++ b/web/client/src/sections/humanAffairs/containers/import-members-modal.js @@ -104,7 +104,7 @@ const ImportMembersModal = props => { const workbook = XLSX.read(result, { type: "binary", cellDates: true,//设为true,将天数的时间戳转为时间格式 - codepage: 936 + codepage: 936//解决了乱码问题 }); let data = []; // 存储获取到的数据 // 遍历每张工作表进行读取(这里默认只读取第一张表)