巴林闲侠 2 years ago
parent
commit
ce5fa93b1a
  1. 5
      api/app/lib/controllers/member/index.js
  2. 4
      web/client/src/sections/humanAffairs/components/personnelModal.jsx
  3. 2
      web/client/src/sections/humanAffairs/containers/import-members-modal.js

5
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 } });
}

4
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位数字" },]}

2
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 = []; // 存储获取到的数据
// 遍历每张工作表进行读取(这里默认只读取第一张表)

Loading…
Cancel
Save