From cadeb062cebf2c87641c42360a16aa93995d0471 Mon Sep 17 00:00:00 2001 From: wuqun Date: Wed, 23 Nov 2022 14:53:12 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E9=94=80=E5=94=AE=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=96=B0=E5=A2=9E-=E6=90=9C=E7=B4=A2=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=E5=92=8C?= =?UTF-8?q?web=E7=9B=B8=E5=BA=94=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/member/index.js | 4 ++ .../personnelDistribution.jsx | 54 ++++++++++--------- .../salersDistribution/salesMemberModal.js | 4 +- 3 files changed, 34 insertions(+), 28 deletions(-) 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 || '-'}
}