diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 79faf03..bd5af13 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -598,7 +598,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, @@ -619,7 +619,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/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位数字" },]} 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 = []; // 存储获取到的数据 // 遍历每张工作表进行读取(这里默认只读取第一张表)