Browse Source

(*)删除人员档案接口修改

master
wuqun 2 years ago
parent
commit
c9b4bd05c2
  1. 8
      api/app/lib/controllers/member/index.js
  2. 1
      api/app/lib/controllers/salesDistribution/index.js
  3. 2
      web/client/src/sections/humanAffairs/containers/import-members-modal.js
  4. 12
      web/client/src/sections/humanAffairs/containers/salersDistribution/importSalersModal.js

8
api/app/lib/controllers/member/index.js

@ -185,7 +185,13 @@ async function del(ctx) {
pepUserId,
}
})
await models.SalesDistribution.update({//顺便把销售人员删了
del: true,
}, {
where: {
pepUserId,
}
})
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);

1
api/app/lib/controllers/salesDistribution/index.js

@ -27,6 +27,7 @@ async function salesList(ctx) {
where: { del: false },
offset: Number(page) * Number(limit),
limit: Number(limit),
order: [['id', 'DESC']]
})
let rslt = []

2
web/client/src/sections/humanAffairs/containers/import-members-modal.js

@ -343,7 +343,7 @@ const ImportMembersModal = props => {
error(`${i + 2}行工作经验(年)错误,请填写非负数`)
return
}
postData.push({//人员编号 待办todotodo
postData.push({
pepUserId: xqExist.pepUserId, name, idNumber, gender, birthday, nativePlace, marital,
politicsStatus, phoneNumber, workPlace, graduatedFrom, educationBackground, specialty, graduationDate,
hiredate, turnProbationPeriod, regularDate, dimissionDate, experienceYear, occupationalHistory,

12
web/client/src/sections/humanAffairs/containers/salersDistribution/importSalersModal.js

@ -5,7 +5,6 @@ import { Modal, Form, Button, Notification } from '@douyinfe/semi-ui';
import { IconUpload } from '@douyinfe/semi-icons';
import cityData from '../../components/city.json';
import XLSX from 'xlsx'
import { membersBulkAdd } from '../../actions/personnelFiles'
//下载模板和上传文件读取
const ImportSalersModal = props => {
const { dispatch, actions, onCancel, rzMembers } = props
@ -147,7 +146,7 @@ const ImportSalersModal = props => {
return (
<Modal
title="导入" visible={true}
onOk={confirm}
onOk={confirm} width={620}
confirmLoading={loading}
onCancel={() => {
setMsg('')
@ -224,7 +223,7 @@ const ImportSalersModal = props => {
error(`${i + 2}行销售区域(市)错误`)
return
}
postData.push({//人员编号 待办todotodo
postData.push({
pepUserId: rzExist.pepUserId, name,
provinces: provinces.split('、'), cities: cities.split('、'),
del: false
@ -244,6 +243,13 @@ const ImportSalersModal = props => {
<div style={{ color: '#ccc' }}>最大不超过200M导入文件需与
<span onClick={() => download()} style={{ cursor: 'pointer', color: '#0066FF' }}>导入模板</span>
一致</div>
<div style={{ marginTop: 20, border: '1px solid #C7E1FF', background: '#F4F8FF', borderRadius: 2, padding: '8px 0px 7px 12px', alignItems: 'center', color: '#0F7EFB', fontSize: 12 }}>
<div>填写要求</div>
<div>员工编号必填唯一数字和字母的组合</div>
<div>姓名必填若与员工编号对应的项企用户姓名不同将以项企数据为准</div>
<div>销售区域/直辖市必填省或直辖市顿号隔开北京市江西省江苏省</div>
<div>销售区域非必填归属所填省的地级市顿号隔开南昌市镇江市</div>
</div>
</Form>
</Modal >
)

Loading…
Cancel
Save