EmployeeForm.jsx 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. import React from 'react'
  2. import { Col, Row } from 'antd'
  3. import EditableForm from '@/components/EditableForm'
  4. import ChangeSupervisor from '@/pages/Staff/Employee/components/ChangeSupervisor'
  5. const EmployeeForm = props => {
  6. const { staff } = props
  7. const changeCopInputData = {
  8. staffName: staff.supervisorName,
  9. staffId: staff.id,
  10. clientId: staff.id
  11. }
  12. const columns = [
  13. {
  14. dataIndex: 'jobNumber',
  15. label: '工号',
  16. span: 12
  17. },
  18. {
  19. dataIndex: 'username',
  20. label: '姓名',
  21. span: 12
  22. },
  23. {
  24. dataIndex: 'departmentId',
  25. label: '办事处/部门',
  26. span: 12,
  27. editCellType: 'treeSelect'
  28. },
  29. {
  30. dataIndex: 'supervisorName',
  31. label: '部门上司',
  32. editCellType: 'custom',
  33. customCell: <ChangeSupervisor dataSource={changeCopInputData} />,
  34. span: 24
  35. },
  36. {
  37. dataIndex: 'majorName',
  38. label: '岗位',
  39. span: 24
  40. },
  41. {
  42. dataIndex: 'hiredate',
  43. label: '入职时间',
  44. span: 12
  45. },
  46. {
  47. dataIndex: 'telephone',
  48. label: '手机',
  49. span: 12
  50. },
  51. {
  52. dataIndex: 'qq',
  53. label: 'QQ',
  54. span: 12
  55. },
  56. {
  57. dataIndex: 'wecat',
  58. label: '微信',
  59. span: 12
  60. },
  61. {
  62. dataIndex: 'phone',
  63. label: '电话',
  64. span: 12
  65. },
  66. {
  67. dataIndex: 'email',
  68. label: '邮箱',
  69. span: 12
  70. },
  71. {
  72. dataIndex: 'gender',
  73. label: '性别',
  74. editCellType: 'select',
  75. span: 12
  76. },
  77. {
  78. dataIndex: 'birthday',
  79. label: '出生日期',
  80. span: 12
  81. },
  82. {
  83. dataIndex: 'nation',
  84. label: '民族',
  85. span: 12
  86. },
  87. {
  88. dataIndex: 'marriage',
  89. label: '婚姻状况',
  90. editCellType: 'select',
  91. span: 12
  92. },
  93. {
  94. dataIndex: 'IDcards',
  95. label: '身份证',
  96. span: 12
  97. },
  98. {
  99. dataIndex: 'IDcardsValidity',
  100. label: '身份证有效期',
  101. span: 12
  102. },
  103. {
  104. dataIndex: 'IDcardsImgA',
  105. label: '身份证扫描件',
  106. span: 12
  107. },
  108. {
  109. dataIndex: 'nativePlace',
  110. label: '籍贯',
  111. span: 12
  112. },
  113. {
  114. dataIndex: 'householdRegistrationType',
  115. label: '户口类型',
  116. span: 12
  117. },
  118. {
  119. dataIndex: 'registeredResidence',
  120. label: '户口所在地',
  121. span: 24,
  122. editCellType: 'textarea'
  123. },
  124. {
  125. dataIndex: 'living',
  126. label: '现居住地',
  127. span: 24,
  128. editCellType: 'textarea'
  129. },
  130. {
  131. dataIndex: 'emergencyContacts',
  132. label: '紧急联系人',
  133. span: 24,
  134. editCellType: 'textarea'
  135. },
  136. {
  137. dataIndex: 'graduateInstitutions',
  138. label: '毕业院校',
  139. span: 24
  140. },
  141. {
  142. dataIndex: 'major',
  143. label: '所学专业',
  144. span: 12
  145. },
  146. {
  147. dataIndex: 'education',
  148. label: '毕业学历',
  149. span: 12
  150. },
  151. {
  152. dataIndex: 'graduationTime',
  153. label: '毕业时间',
  154. span: 12
  155. },
  156. {
  157. dataIndex: 'certificate',
  158. label: '毕业证书',
  159. span: 12
  160. },
  161. {
  162. dataIndex: 'diploma',
  163. label: '学位证书',
  164. span: 12
  165. },
  166. {
  167. dataIndex: 'professionalTitle',
  168. label: '职称',
  169. span: 12
  170. },
  171. {
  172. dataIndex: 'stay',
  173. label: '个人简历电子档',
  174. span: 12
  175. },
  176. {
  177. dataIndex: 'stayName',
  178. label: '原单位离职证明',
  179. span: 12
  180. },
  181. {
  182. dataIndex: 'remittanceName',
  183. label: '收款人户名',
  184. span: 12
  185. },
  186. {
  187. dataIndex: 'salaryBank',
  188. label: '收款银行',
  189. span: 12
  190. },
  191. {
  192. dataIndex: 'bankName',
  193. label: '收款开户银行名称',
  194. span: 24
  195. },
  196. {
  197. dataIndex: 'bankNumber',
  198. label: '收款帐号',
  199. span: 12
  200. },
  201. {
  202. dataIndex: 'coupletNumber',
  203. label: '联行号',
  204. span: 12
  205. },
  206. {
  207. dataIndex: 'salaryCard',
  208. label: '银行卡号',
  209. span: 24
  210. },
  211. {
  212. dataIndex: 'salaryBankName',
  213. label: '开户行',
  214. span: 24,
  215. editCellType: 'textarea'
  216. }
  217. ]
  218. return (
  219. <div>
  220. <Row>
  221. <Col span={8}>
  222. <h2 className="text-gray-500">员工详情</h2>
  223. </Col>
  224. <Col span={16} className="text-right text-gray-500">
  225. {staff.username}入职于{staff.hiredate}
  226. </Col>
  227. <Col span={22}>
  228. <h2 className="text-2xl pb-4">{staff.username}</h2>
  229. </Col>
  230. <Col span={2} />
  231. </Row>
  232. <EditableForm
  233. columns={columns}
  234. dataSource={staff}
  235. type="employee"
  236. tartgetUrl="/staff/change/department"
  237. />
  238. </div>
  239. )
  240. }
  241. export default EmployeeForm