diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 37d5b84..909a336 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -107,6 +107,7 @@ async function searchPepMember (ctx) { user.name AS userName, role.name AS roleName, role.id AS roleId, + basicdata_post.name AS userPost, department.name AS depName, department.id AS depId FROM @@ -115,6 +116,8 @@ async function searchPepMember (ctx) { ON user_role.user = user.id LEFT JOIN role ON role.id = user_role.role + LEFT JOIN basicdata_post + ON basicdata_post.id = user.post LEFT JOIN department_user ON department_user.user = user.id LEFT JOIN department @@ -146,6 +149,7 @@ async function searchPepMember (ctx) { pepUserId: u.pepUserId, name: u.userName, userCode: u.userCode, + userPost: u.userPost, departmrnt: u.depId ? [{ id: u.depId, name: u.depName diff --git a/web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx b/web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx index 6f11520..bc53ec6 100644 --- a/web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx +++ b/web/client/src/sections/humanAffairs/containers/salersDistribution/personnelDistribution.jsx @@ -71,26 +71,27 @@ const PersonnelDistribution = (props) => { const getMultis = (arrStr) => {//默认展示2个 return
{ - arrStr.map((ite, idx) => { - return ( -
- {idx < 2 ? -
- {ite} -
: '' - } - { - arrStr.length > 2 && idx == 2 ? - -
- +{arrStr.length - 2} -
-
- : '' - } -
- ) - }) + arrStr.length ? + arrStr.map((ite, idx) => { + return ( +
+ {idx < 2 ? +
+ {ite} +
: '' + } + { + arrStr.length > 2 && idx == 2 ? + +
+ +{arrStr.length - 2} +
+
+ : '' + } +
+ ) + }) : '-' }
} @@ -111,7 +112,7 @@ const PersonnelDistribution = (props) => { title: starHeader('部门名称'), dataIndex: 'department', key: 'department', - width: '15%', + width: '18%', render: (text, r, index) => { let arrStr = text.map(t => t.name); return getMultis(arrStr); @@ -136,18 +137,19 @@ const PersonnelDistribution = (props) => { title: starHeader('岗位'), dataIndex: 'post', key: 'post', - width: '10%', + width: '11%', + render: (text, record) => {text || '-'} }, { title: starHeader('入职时间'), dataIndex: 'hireDate', key: 'hireDate', - width: '10%', + width: '8%', render: (text, record) => {text || '-'} }, { title: starHeader('转正时间'), dataIndex: 'regularDate', key: 'regularDate', - width: '10%', + width: '8%', render: (text, record) => {text || '-'} }, { title: starHeader('工龄'), @@ -236,9 +238,9 @@ const PersonnelDistribution = (props) => { onClick={() => { setImportModalV(true); }}> 导入 -
+ {/*
导出 -
+
*/} diff --git a/web/client/src/sections/humanAffairs/containers/salersDistribution/salesMemberModal.js b/web/client/src/sections/humanAffairs/containers/salersDistribution/salesMemberModal.js index a886338..ac554dd 100644 --- a/web/client/src/sections/humanAffairs/containers/salersDistribution/salesMemberModal.js +++ b/web/client/src/sections/humanAffairs/containers/salersDistribution/salesMemberModal.js @@ -94,7 +94,7 @@ const SalesMemberModal = (props) => { hireDate: exist.hiredate, regularDate: exist.regularDate, userCode: user.userCode, - post: '岗位todo' + post: user.userPost//岗位 } setPeoplePro(item) } @@ -143,7 +143,7 @@ const SalesMemberModal = (props) => { {label}
- {value} + {value || '-'}
}