Browse Source

(+)添加是否在职字段

master
周沫沫历险记 2 years ago
parent
commit
6f59ac7176
  1. 4
      api/app/lib/controllers/salesDistribution/index.js
  2. 16
      web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx

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

@ -8,7 +8,7 @@ async function salesList(ctx) {
const { const {
keywordTarget, keyword, limit, page, state, keywordTarget, keyword, limit, page, state,
hiredateStart, hiredateEnd, marital, native, workPlace, hiredateStart, hiredateEnd, marital, native, workPlace,
orderBy, orderDirection, placeSearch orderBy, orderDirection, placeSearch,userActiveStatus
} = ctx.query } = ctx.query
const userRes = await memberList({ const userRes = await memberList({
@ -55,10 +55,12 @@ async function salesList(ctx) {
department: info.departmrnt, department: info.departmrnt,
hireDate: info.hiredate,//入职时间 hireDate: info.hiredate,//入职时间
regularDate: info.regularDate,//转正时间 regularDate: info.regularDate,//转正时间
userActiveStatus:info.userActiveStatus,
...d.dataValues ...d.dataValues
} }
rslt.push(item); rslt.push(item);
}) })
rslt = rslt.filter(i => i.userActiveStatus == userActiveStatus)
ctx.status = 200; ctx.status = 200;
ctx.body = { ctx.body = {
count: res.count, count: res.count,

16
web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx

@ -12,6 +12,7 @@ const PersonnelDistribution = (props) => {
const { dispatch, actions } = props const { dispatch, actions } = props
const { humanAffairs } = actions; const { humanAffairs } = actions;
const [keywordTarget, setKeywordTarget] = useState('dep'); const [keywordTarget, setKeywordTarget] = useState('dep');
const [userActiveStatus, setuserActiveStatus] = useState(1);
const [keyword, setKeyword] = useState('');// const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()// const [limits, setLimits] = useState()//
const [query, setQuery] = useState({ limit: 10, page: 0 }); // const [query, setQuery] = useState({ limit: 10, page: 0 }); //
@ -37,7 +38,7 @@ const PersonnelDistribution = (props) => {
let kt = keywordTarget == 'place' ? '' : keywordTarget; let kt = keywordTarget == 'place' ? '' : keywordTarget;
let k = keywordTarget == 'place' ? '' : keyword; let k = keywordTarget == 'place' ? '' : keyword;
let placeSearch = keywordTarget == 'place' ? keyword : ''; let placeSearch = keywordTarget == 'place' ? keyword : '';
dispatch(humanAffairs.getSalesList({ keywordTarget: kt, keyword: k, placeSearch, ...query })).then(r => { dispatch(humanAffairs.getSalesList({ keywordTarget: kt, keyword: k,userActiveStatus, placeSearch, ...query })).then(r => {
if (r.success) { if (r.success) {
setTableData(r.payload?.data?.rows); setTableData(r.payload?.data?.rows);
setLimits(r.payload?.data?.count) setLimits(r.payload?.data?.count)
@ -117,6 +118,12 @@ const PersonnelDistribution = (props) => {
let arrStr = text.map(t => t.name); let arrStr = text.map(t => t.name);
return getMultis(arrStr); return getMultis(arrStr);
} }
},{
title: '在职状态',
dataIndex: 'userActiveStatus',
key: 'userActiveStatus',
width: 200,
render: (text, r, index) => text == '1'?'在职':text == '2'?'离职':'特殊账号-特殊状态'
}, { }, {
title: '销售区域(省/直辖市)', title: '销售区域(省/直辖市)',
dataIndex: 'provinces', dataIndex: 'provinces',
@ -227,6 +234,13 @@ const PersonnelDistribution = (props) => {
<Select.Option value='place'>地区</Select.Option> <Select.Option value='place'>地区</Select.Option>
</Select> </Select>
</div> </div>
<div>
<Select value={userActiveStatus} style={{ width: 170, marginLeft: 15 }} onChange={setuserActiveStatus} >
<Select.Option value={1}>在职</Select.Option>
<Select.Option value={2}>离职</Select.Option>
<Select.Option value={3}>特殊账号-特殊状态</Select.Option>
</Select>
</div>
<div style={{ margin: '0px 18px' }}> <div style={{ margin: '0px 18px' }}>
<Input suffix={<IconSearch />} <Input suffix={<IconSearch />}
showClear showClear

Loading…
Cancel
Save