personnelAll.jsx 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "@/manageCenter/financialManage/distribute/public.less";
  5. import { ChooseList } from "../../order/orderNew/chooseList";
  6. import { citySelect, provinceList, areaSelect, Birthplace } from "@/areaList";
  7. import "./personnelList.less"
  8. import {
  9. Button,
  10. Form,
  11. Input,
  12. Select,
  13. Spin,
  14. Table,
  15. message,
  16. Modal,
  17. Tabs,
  18. Tag,
  19. RangePicker,
  20. DatePicker,
  21. Radio,
  22. Cascader,
  23. Upload,
  24. Tooltip,
  25. } from "antd";
  26. import { splitUrl } from "@/tools";
  27. import { getProvinceList } from "@/addressList";
  28. import PicModal from "./picModal"
  29. import AddPicModal from "./addPicModal";
  30. const FormItem = Form.Item;
  31. const { TabPane } = Tabs;
  32. const { TextArea } = Input;
  33. const PersonnelAll = React.createClass({
  34. loadData(pageNo) {
  35. this.state.data = [];
  36. this.setState({
  37. loading: true,
  38. });
  39. $.ajax({
  40. method: "get",
  41. dataType: "json",
  42. crossDomain: false,
  43. url: globalConfig.context + "/api/admin/personnel/selectList",
  44. data: {
  45. pageNo: pageNo || 1,
  46. pageSize: this.state.pagination.pageSize,
  47. name: this.state.nameSearch,
  48. status: this.state.nameSearch,
  49. company: this.state.nameSearch,
  50. sex: this.state.nameSearch,
  51. marriage: this.state.nameSearch,
  52. politicalOutlook: this.state.nameSearch,
  53. birthdayMonth: this.state.nameSearch,
  54. promotionStart: this.state.promotionTime[0],
  55. promotionEnd: this.state.promotionTime[1],
  56. entryStart: this.state.entryTime[0],
  57. entryStart: this.state.entryTime[1],
  58. quitStart: this.state.quitTime[0],
  59. quitEnd: this.state.quitTime[1],
  60. system: this.state.systemSearch,
  61. workingYears: this.state.workingYearsSearch,
  62. education: this.state.educationSearch,
  63. contractStart: this.state.contractTime[0],
  64. contractEnd: this.state.contractTime[1],
  65. },
  66. success: function (data) {
  67. let theArr = [];
  68. if (!data.data || !data.data.list) {
  69. if (data.error && data.error.length) {
  70. message.warning(data.error[0].message);
  71. }
  72. } else {
  73. for (let i = 0; i < data.data.list.length; i++) {
  74. let thisdata = data.data.list[i];
  75. thisdata.key = thisdata.id
  76. theArr.push(thisdata)
  77. }
  78. }
  79. this.state.pagination.current = data.data.pageNo;
  80. this.state.pagination.total = data.data.totalCount;
  81. if (data.data && data.data.list && !data.data.list.length) {
  82. this.state.pagination.current = 0;
  83. this.state.pagination.total = 0;
  84. }
  85. this.setState({
  86. dataSource: theArr,
  87. pagination: this.state.pagination,
  88. });
  89. }.bind(this),
  90. }).always(
  91. function () {
  92. this.setState({
  93. loading: false,
  94. });
  95. }.bind(this)
  96. );
  97. },
  98. getInitialState() {
  99. return {
  100. annexName: "",
  101. annexUrl: "",
  102. voucherUrl: [],
  103. ModalData: [],
  104. contractTime: [],
  105. quitTime: [],
  106. promotionTime: [],
  107. entryTime: [],
  108. pic: [],
  109. previewImage: "",
  110. peoVisible: false,
  111. phoneVisible: false,
  112. isAddPeo: false,
  113. searchMore: true,
  114. stayVisible: false,
  115. assignVisible: false,
  116. releaseDate: [],
  117. residence: [],
  118. nativePlace: [],
  119. now: [],
  120. roleName: "",
  121. shouKuanDate: [],
  122. boHuivisible: false,
  123. departmentArr: [],
  124. selectedRowKeys: [],
  125. selectedRows: [],
  126. paginations: false,
  127. loading: false,
  128. pagination: {
  129. defaultCurrent: 1,
  130. defaultPageSize: 10,
  131. showQuickJumper: true,
  132. pageSize: 10,
  133. onChange: function (page) {
  134. this.loadData(page);
  135. }.bind(this),
  136. showTotal: function (total) {
  137. return "共" + total + "条数据";
  138. },
  139. },
  140. columns: [
  141. {
  142. title: "人事编号",
  143. dataIndex: "id",
  144. key: "id",
  145. },
  146. {
  147. title: "门禁编号",
  148. dataIndex: "doorId",
  149. key: "doorId",
  150. },
  151. {
  152. title: "名称",
  153. dataIndex: "name",
  154. key: "name",
  155. },
  156. {
  157. title: "员工状态",
  158. dataIndex: "statusName",
  159. key: "statusName",
  160. },
  161. {
  162. title: "所属系统",
  163. dataIndex: "systemName",
  164. key: "systemName",
  165. },
  166. {
  167. title: "公司名称",
  168. dataIndex: "depName",
  169. key: "depName",
  170. },
  171. {
  172. title: "职位名称",
  173. dataIndex: "jobsName",
  174. key: "jobsName",
  175. },
  176. {
  177. title: "等级名称",
  178. dataIndex: "starName",
  179. key: "starName",
  180. },
  181. {
  182. title: "入职时间",
  183. dataIndex: "entryTimes",
  184. key: "entryTimes",
  185. },
  186. {
  187. title: "转正时间",
  188. dataIndex: "promotionTimes",
  189. key: "promotionTimes",
  190. },
  191. {
  192. title: "生日日期",
  193. dataIndex: "birthdays",
  194. key: "birthdays",
  195. },
  196. {
  197. title: "性别",
  198. dataIndex: "sex",
  199. key: "sex",
  200. render: (text) => {
  201. if (text == 0) {
  202. return "男";
  203. } else if (text == 1) {
  204. return "女";
  205. }
  206. },
  207. },
  208. {
  209. title: "婚姻状态",
  210. dataIndex: "marriageName",
  211. key: "marriageName",
  212. },
  213. {
  214. title: "子/女",
  215. dataIndex: "son",
  216. key: "son",
  217. render: (text, record) => {
  218. return <span>{text + "/" + record.girl}</span>;
  219. },
  220. },
  221. {
  222. title: "政治面貌",
  223. dataIndex: "politicalOutlookName",
  224. key: "politicalOutlookName",
  225. },
  226. {
  227. title: "教育经历",
  228. dataIndex: "educationName",
  229. key: "educationName",
  230. },
  231. {
  232. title: "毕业学校",
  233. dataIndex: "school",
  234. key: "school",
  235. },
  236. {
  237. title: "专业",
  238. dataIndex: "major",
  239. key: "major",
  240. },
  241. {
  242. title: "职称",
  243. dataIndex: "title",
  244. key: "title",
  245. },
  246. {
  247. title: "晋升备注",
  248. dataIndex: "promotionRemarks",
  249. key: "promotionRemarks",
  250. },
  251. {
  252. title: "晋升时间",
  253. dataIndex: "promotionTime",
  254. key: "promotionTime",
  255. },
  256. {
  257. title: "合同时间",
  258. dataIndex: "contractStart",
  259. key: "contractStart",
  260. render: (text, record) => {
  261. if (text) {
  262. return text + "~" + record.contractEnd;
  263. }
  264. },
  265. },
  266. {
  267. title: "手机号码",
  268. dataIndex: "mobile",
  269. key: "mobile",
  270. },
  271. {
  272. title: "电话",
  273. dataIndex: "fixedTel",
  274. key: "fixedTel",
  275. },
  276. {
  277. title: "身份证",
  278. dataIndex: "idCard",
  279. key: "idCard",
  280. },
  281. {
  282. title: "发证机构",
  283. dataIndex: "certificationAuthority",
  284. key: "certificationAuthority",
  285. },
  286. {
  287. title: "户籍地址",
  288. dataIndex: "residenceName",
  289. key: "residenceName",
  290. },
  291. {
  292. title: "籍贯",
  293. dataIndex: "nativePlaceName",
  294. key: "nativePlaceName",
  295. },
  296. {
  297. title: "现住地址",
  298. dataIndex: "nowName",
  299. key: "nowName",
  300. },
  301. {
  302. title: "离职时间",
  303. dataIndex: "quitTime",
  304. key: "quitTime",
  305. },
  306. {
  307. title: "工作年限",
  308. dataIndex: "workingYear",
  309. key: "workingYear",
  310. },
  311. {
  312. title: "年龄",
  313. dataIndex: "age",
  314. key: "age",
  315. },
  316. {
  317. title: "出生月份",
  318. dataIndex: "month",
  319. key: "month",
  320. },
  321. {
  322. title: "参保时间",
  323. dataIndex: "insuranceStartTimes",
  324. key: "insuranceStartTimes",
  325. },
  326. {
  327. title: "停保时间",
  328. dataIndex: "insuranceEndTimes",
  329. key: "insuranceEndTimes",
  330. },
  331. {
  332. title: "公积金时间",
  333. dataIndex: "fundStartTimes",
  334. key: "fundStartTimes",
  335. },
  336. {
  337. title: "停办公积金时间",
  338. dataIndex: "fundEndTimes",
  339. key: "fundEndTimes",
  340. },
  341. ],
  342. dataSource: [],
  343. resVisible: false,
  344. table: [
  345. {
  346. key: "员工编号",
  347. value: "id",
  348. },
  349. {
  350. key: "姓名",
  351. value: "name",
  352. },
  353. {
  354. key: "出生日期",
  355. value: "birthdays",
  356. },
  357. {
  358. key: "出生月份",
  359. value: "month",
  360. },
  361. {
  362. key: "门禁编号",
  363. value: "doorId",
  364. },
  365. {
  366. key: "性别",
  367. value: "sex",
  368. render: (e) => {
  369. if (e == 0) {
  370. return "男";
  371. } else if (e == 1) {
  372. return "女";
  373. }
  374. },
  375. },
  376. {
  377. key: "年龄",
  378. value: "age",
  379. },
  380. {
  381. key: "民族",
  382. value: "nation",
  383. },
  384. {
  385. key: "户籍地址",
  386. value: "residenceName",
  387. },
  388. {
  389. key: "籍贯",
  390. value: "nativePlaceName",
  391. },
  392. {
  393. key: "身份证",
  394. value: "idCard",
  395. },
  396. {
  397. key: "领证机关",
  398. value: "certificationAuthority",
  399. },
  400. {
  401. key: "现住地址",
  402. value: "nowName",
  403. },
  404. {
  405. key: "婚姻状态",
  406. value: "marriageName",
  407. },
  408. {
  409. key: "子/女",
  410. value: "son",
  411. render: (e, i) => {
  412. return e + "/" + i;
  413. },
  414. },
  415. {
  416. key: "政治面貌",
  417. value: "politicalOutlookName",
  418. },
  419. ],
  420. };
  421. },
  422. /* 分派 */
  423. evaluate(record, nub) {
  424. this.state.assignData = record;
  425. this.setState(
  426. {
  427. nub,
  428. },
  429. () => {
  430. this.setState({
  431. assignVisible: true,
  432. });
  433. }
  434. );
  435. },
  436. componentWillMount() {
  437. let areaArr = getProvinceList();
  438. let Area = areaSelect(areaArr);
  439. let Birthplaces = Birthplace(areaArr);
  440. this.setState({
  441. Area,
  442. Birthplaces: Birthplaces,
  443. });
  444. //城市
  445. let Province = [];
  446. areaArr.map(function (item) {
  447. var id = String(item.id);
  448. Province.push(
  449. <Select.Option value={id} key={item.name}>
  450. {item.name}
  451. </Select.Option>
  452. );
  453. });
  454. this.state.Provinces = Province;
  455. this.loadData();
  456. this.departmentList()
  457. },
  458. departmentList() {
  459. $.ajax({
  460. method: "get",
  461. dataType: "json",
  462. crossDomain: false,
  463. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  464. data: {},
  465. success: function (data) {
  466. let thedata = data.data;
  467. let theArr = [];
  468. if (!thedata) {
  469. if (data.error && data.error.length) {
  470. message.warning(data.error[0].message);
  471. }
  472. } else {
  473. thedata.map(function (item, index) {
  474. theArr.push({
  475. key: index,
  476. name: item.name,
  477. id: item.id
  478. });
  479. });
  480. }
  481. this.setState({
  482. departmentArr: theArr
  483. });
  484. }.bind(this)
  485. });
  486. },
  487. changeList(arr) {
  488. const newArr = [];
  489. this.state.columns.forEach((item) => {
  490. arr.forEach((val) => {
  491. if (val === item.title) {
  492. newArr.push(item);
  493. }
  494. });
  495. });
  496. this.setState({
  497. changeList: newArr,
  498. });
  499. },
  500. addPeo() {
  501. this.setState({
  502. peoVisible: true,
  503. isAddPeo: true
  504. })
  505. },
  506. addPeoCancel() {
  507. this.setState({
  508. peoVisible: false,
  509. isAddPeo: false,
  510. name: undefined,
  511. doorId: undefined,
  512. sex: undefined,
  513. nation: undefined,
  514. residence: [],
  515. residenceAddress: undefined,
  516. nativePlace: [],
  517. now: [],
  518. nowAddress: undefined,
  519. idCard: undefined,
  520. certificationAuthority: undefined,
  521. marriage: undefined,
  522. politicalOutlook: undefined,
  523. son: undefined,
  524. girl: undefined,
  525. birthdays: undefined,
  526. marriage: undefined,
  527. });
  528. },
  529. addOk() {
  530. this.setState({
  531. loading: true,
  532. });
  533. $.ajax({
  534. method: "post",
  535. dataType: "json",
  536. crossDomain: false,
  537. url: globalConfig.context + "/api/admin/personnel/add",
  538. data: {
  539. name: this.state.name,
  540. doorId: this.state.doorId,
  541. sex: this.state.sex,
  542. nation: this.state.nation,
  543. residenceProvince: this.state.residence[0],
  544. residenceCity: this.state.residence[1],
  545. residenceArea: this.state.residence[2],
  546. residenceAddress: this.state.residenceAddress,
  547. nativePlaceProvince: this.state.nativePlace[0],
  548. nativePlaceCity: this.state.nativePlace[1],
  549. nowProvince: this.state.now[0],
  550. nowCity: this.state.now[1],
  551. nowArea: this.state.now[2],
  552. nowAddress: this.state.nowAddress,
  553. idCard: this.state.idCard,
  554. certificationAuthority: this.state.certificationAuthority,
  555. marriage: this.state.marriage,
  556. politicalOutlook: this.state.politicalOutlook,
  557. son: this.state.son,
  558. girl: this.state.girl,
  559. birthdays: this.state.birthdays,
  560. marriage: this.state.marriage,
  561. },
  562. success: function (data) {
  563. let theArr = [];
  564. if (data.error && data.error.length) {
  565. message.warning(data.error[0].message);
  566. } else {
  567. message.success("添加成功!");
  568. this.loadData();
  569. this.addPeoCancel();
  570. }
  571. }.bind(this),
  572. }).always(
  573. function () {
  574. this.setState({
  575. loading: false,
  576. });
  577. }.bind(this)
  578. );
  579. },
  580. editPeo() {
  581. },
  582. stayModal(id) {
  583. this.setState({
  584. stayVisible: true
  585. })
  586. this.setState({
  587. loading: true,
  588. });
  589. $.ajax({
  590. method: "get",
  591. dataType: "json",
  592. crossDomain: false,
  593. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  594. data: {
  595. id: id
  596. },
  597. success: function (data) {
  598. let res = data.data
  599. let theArr = [];
  600. if (data.error && data.error.length) {
  601. message.warning(data.error[0].message);
  602. } else {
  603. this.setState({
  604. id: res.id,
  605. status: res.status + "",
  606. system: res.system + "",
  607. jobNature: res.jobNature,
  608. jobNatureRemarks: res.jobNatureRemarks,
  609. age: res.age,
  610. entryTimes: res.entryTimes,
  611. promotionTimes: res.promotionTimes,
  612. company: res.company,
  613. lvl: res.lvl + "",
  614. jobs: res.jobs + "",
  615. star: res.star + "",
  616. allowance: res.allowance,
  617. });
  618. this.getList();
  619. }
  620. }.bind(this),
  621. }).always(
  622. function () {
  623. this.setState({
  624. loading: false,
  625. });
  626. }.bind(this)
  627. );
  628. },
  629. stayCancel() {
  630. this.setState({
  631. stayVisible: false
  632. })
  633. },
  634. editStay() {
  635. if(this.state.star == "" || this.state.star == undefined) {
  636. message.warning("请选择星级")
  637. return
  638. }
  639. this.setState({
  640. loading: true,
  641. });
  642. $.ajax({
  643. method: "post",
  644. dataType: "json",
  645. crossDomain: false,
  646. url: globalConfig.context + "/api/admin/personnel/update",
  647. data: {
  648. id: this.state.id,
  649. status: this.state.status,
  650. system: this.state.system,
  651. jobNature: this.state.jobNature,
  652. jobNatureRemarks: this.state.jobNatureRemarks,
  653. entryTimes: this.state.entryTimes,
  654. promotionTimes: this.state.promotionTimes,
  655. company: this.state.company,
  656. lvl: this.state.lvl,
  657. jobs: this.state.jobs,
  658. star: this.state.star,
  659. allowance: this.state.allowance,
  660. },
  661. success: function (data) {
  662. let res = data.data;
  663. let theArr = [];
  664. if (data.error && data.error.length) {
  665. message.warning(data.error[0].message);
  666. } else {
  667. this.setState({
  668. stayVisible: false,
  669. });
  670. this.tableRowClick(this.state.ModalData);
  671. message.success("提交成功")
  672. }
  673. }.bind(this),
  674. }).always(
  675. function () {
  676. this.setState({
  677. loading: false,
  678. });
  679. }.bind(this)
  680. );
  681. },
  682. phoneModal() {
  683. this.setState({
  684. phoneVisible: true
  685. });
  686. },
  687. phoneCancel() {
  688. this.setState({
  689. phoneVisible: false
  690. });
  691. },
  692. editPhone() {
  693. },
  694. entryModal() {
  695. this.setState({
  696. entryVisible: true
  697. });
  698. this.setState({
  699. loading: true,
  700. });
  701. $.ajax({
  702. method: "get",
  703. dataType: "json",
  704. crossDomain: false,
  705. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  706. data: {
  707. id: 3,
  708. },
  709. success: function (data) {
  710. let theArr = [];
  711. if (data.error && data.error.length) {
  712. message.warning(data.error[0].message);
  713. } else {
  714. console.log(data.data);
  715. // let data = data.data.personnelEntry ? data.data.personnelEntry : []
  716. // if(data) {
  717. this.setState({
  718. id: data.data.personnelEntry.id,
  719. school: data.data.personnelEntry.school,
  720. education: data.data.personnelEntry.education,
  721. major: data.data.personnelEntry.major,
  722. title: data.data.personnelEntry.title,
  723. entryRemarks: data.data.personnelEntry.entryRemarks,
  724. annexUrl: data.data.personnelEntry.annexUrl
  725. ? data.data.personnelEntry.annexUrl
  726. : "",
  727. annexName: data.data.personnelEntry.annexName
  728. ? data.data.personnelEntry.annexName
  729. : "",
  730. });
  731. // }
  732. }
  733. }.bind(this),
  734. }).always(
  735. function () {
  736. this.setState({
  737. loading: false,
  738. });
  739. }.bind(this)
  740. );
  741. },
  742. entryCancel() {
  743. this.setState({
  744. entryVisible: false
  745. })
  746. },
  747. cancel() {
  748. this.setState({
  749. visible: false
  750. })
  751. },
  752. tableRowClick(record) {
  753. this.setState({
  754. visible: true,
  755. id: record.id
  756. })
  757. this.setState({
  758. loading: true,
  759. });
  760. $.ajax({
  761. method: "get",
  762. dataType: "json",
  763. crossDomain: false,
  764. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  765. data: {
  766. id: record.id
  767. },
  768. success: function (data) {
  769. let theArr = [];
  770. if (data.error && data.error.length) {
  771. message.warning(data.error[0].message);
  772. } else {
  773. this.setState({
  774. ModalData: data.data
  775. })
  776. }
  777. }.bind(this),
  778. }).always(
  779. function () {
  780. this.setState({
  781. loading: false,
  782. });
  783. }.bind(this)
  784. );
  785. },
  786. search() {
  787. this.loadData()
  788. },
  789. addPic() {
  790. this.setState({
  791. addPicModal: true
  792. })
  793. },
  794. addPicModalCancel() {
  795. this.setState({
  796. addPicModal: false,
  797. })
  798. },
  799. getVoucherUrl(e) {
  800. this.setState({
  801. voucherUrl: e
  802. });
  803. },
  804. addRuzhi(e, i) {
  805. this.setState({
  806. addPicModal: false
  807. })
  808. this.state.annexUrl += "," + e
  809. this.state.annexName += "," + i;
  810. this.setState({
  811. annexUrl: this.state.annexUrl,
  812. annexName: this.state.annexName,
  813. loading: true,
  814. });
  815. $.ajax({
  816. method: "post",
  817. dataType: "json",
  818. crossDomain: false,
  819. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  820. data: {
  821. id: this.state.id,
  822. annexUrl: this.state.annexUrl,
  823. annexName: this.state.annexName,
  824. },
  825. success: function (data) {
  826. let theArr = [];
  827. if (data.error && data.error.length) {
  828. message.warning(data.error[0].message);
  829. } else {
  830. message.warning("保存成功");
  831. }
  832. }.bind(this),
  833. }).always(
  834. function () {
  835. this.setState({
  836. loading: false,
  837. });
  838. }.bind(this)
  839. );
  840. },
  841. reset() {
  842. this.state.nameSearch = undefined
  843. this.state.statusSearch = undefined;
  844. this.state.departmenttList = undefined;
  845. this.state.sexSearch = undefined;
  846. this.state.marriageSearch = undefined;
  847. this.state.politicalOutlookSearch = undefined;
  848. this.state.birthdayMonthSearch = undefined;
  849. this.state.systemSearch = undefined;
  850. this.state.workingYearsSearch = undefined;
  851. this.state.educationSearch = undefined;
  852. this.state.promotionTime = [];
  853. this.state.entryTime = [];
  854. this.state.quitTime = [];
  855. this.state.contractTime = [];
  856. this.loadData()
  857. },
  858. peoStatus(e) {
  859. if(e == 0) {
  860. return "在职(试用期)"
  861. }else if(e == 1) {
  862. return "在职(正式工)"
  863. }else if(e == 2) {
  864. return "离职"
  865. }
  866. },
  867. jobStatus(e, i) {
  868. if(e == 0) {
  869. return "全职"
  870. }else if(e == 1) {
  871. return "兼职"
  872. }else if(e == 2) {
  873. return i
  874. }
  875. },
  876. educationStatus(e) {
  877. if(e == 0) {
  878. return "高中/中专"
  879. }else if(e == 1) {
  880. return "专科/高职"
  881. }else if(e == 2) {
  882. return "本科"
  883. }else if(e == 3) {
  884. return "研究生"
  885. }else if(e == 5) {
  886. return "博士"
  887. }
  888. },
  889. picToArr(e) {
  890. let arr = e.split(",")
  891. return arr
  892. },
  893. ruzhiRemove(e) {
  894. console.log(e.file.response.data);
  895. let url = e.file.response.data
  896. let arr = this.state.annexUrl.split(",")
  897. let arrName = this.state.annexName.split(",")
  898. let num = ""
  899. arr.forEach((item, index) => {
  900. if(item == url) {
  901. arr.splice(index, 1)
  902. num = index
  903. }
  904. })
  905. arrName.splice(num, 1)
  906. this.setState({
  907. annexUrl: arr.join(","),
  908. annexName: arrName.join(","),
  909. loading: true
  910. })
  911. $.ajax({
  912. method: "post",
  913. dataType: "json",
  914. crossDomain: false,
  915. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  916. data: {
  917. id: this.state.id,
  918. annexUrl: this.state.annexUrl,
  919. annexName: this.state.annexName,
  920. },
  921. success: function (data) {
  922. let theArr = [];
  923. if (data.error && data.error.length) {
  924. message.warning(data.error[0].message);
  925. } else {
  926. message.warning("删除成功");
  927. }
  928. }.bind(this),
  929. }).always(
  930. function () {
  931. this.setState({
  932. loading: false,
  933. });
  934. }.bind(this)
  935. );
  936. },
  937. getList() {
  938. this.setState({
  939. loading: true
  940. })
  941. $.ajax({
  942. method: "get",
  943. dataType: "json",
  944. crossDomain: false,
  945. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  946. data: {},
  947. success: function (data) {
  948. let theArr = [];
  949. if (data.error && data.error.length) {
  950. message.warning(data.error[0].message);
  951. } else {
  952. console.log(data);
  953. let arr = data.data
  954. let starArr = []
  955. arr.forEach((item, index) => {
  956. if(item.jobs == this.state.jobs) {
  957. let obj = {
  958. star: item.lvl + "",
  959. starName: item.lvlName,
  960. };
  961. starArr.push(obj)
  962. }
  963. })
  964. this.setState({
  965. starArr
  966. })
  967. }
  968. }.bind(this),
  969. }).always(
  970. function () {
  971. this.setState({
  972. loading: false,
  973. });
  974. }.bind(this)
  975. );
  976. },
  977. render() {
  978. const rowSelection = {
  979. selectedRowKeys: this.state.selectedRowKeys,
  980. onChange: (selectedRowKeys, selectedRows) => {
  981. this.setState({
  982. selectedRows: selectedRows.slice(-1),
  983. selectedRowKeys: selectedRowKeys.slice(-1),
  984. });
  985. },
  986. };
  987. const { RangePicker } = DatePicker;
  988. const formItemLayout = {
  989. labelCol: { span: 6 },
  990. wrapperCol: { span: 16 },
  991. };
  992. let departmentArr = this.state.departmentArr || [];
  993. return (
  994. <div className="user-content">
  995. <div className="content-title" style={{ marginBottom: 10 }}>
  996. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  997. </div>
  998. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  999. <TabPane tab="更改表格显示数据" key="1">
  1000. <div style={{ marginLeft: 10 }}>
  1001. <ChooseList
  1002. columns={this.state.columns}
  1003. changeFn={this.changeList}
  1004. changeList={this.state.changeList}
  1005. top={55}
  1006. margin={11}
  1007. />
  1008. </div>
  1009. </TabPane>
  1010. <TabPane tab="搜索" key="2">
  1011. <div className="user-search" style={{ marginLeft: 10 }}>
  1012. <Input
  1013. placeholder="姓名"
  1014. style={{ width: 120 }}
  1015. value={this.state.nameSearch}
  1016. onChange={(e) => {
  1017. this.setState({ nameSearch: e.target.value });
  1018. }}
  1019. />
  1020. <Select
  1021. placeholder="员工状态"
  1022. onChange={(e) => {
  1023. this.setState({ statusSearch: e });
  1024. }}
  1025. style={{ width: 120, marginRight: 10 }}
  1026. value={this.state.statusSearch}
  1027. >
  1028. <Option value="0">在职(试用期)</Option>
  1029. <Option value="1">在职(合同期)</Option>
  1030. <Option value="2">离职</Option>
  1031. </Select>
  1032. <Select
  1033. placeholder="所属公司"
  1034. style={{ width: 120, marginRight: 10 }}
  1035. value={this.state.departmenttList}
  1036. onChange={(e) => {
  1037. this.setState({ departmenttList: e });
  1038. }}
  1039. >
  1040. {departmentArr.map(function (item) {
  1041. return (
  1042. <Select.Option key={item.id}>{item.name}</Select.Option>
  1043. );
  1044. })}
  1045. </Select>
  1046. <Select
  1047. placeholder="性别"
  1048. onChange={(e) => {
  1049. this.setState({ sexSearch: e });
  1050. }}
  1051. style={{ width: 120, marginRight: 10 }}
  1052. value={this.state.sexSearch}
  1053. >
  1054. <Option value="0">男</Option>
  1055. <Option value="1">女</Option>
  1056. </Select>
  1057. <Select
  1058. placeholder="婚姻状态"
  1059. onChange={(e) => {
  1060. this.setState({ marriageSearch: e });
  1061. }}
  1062. style={{ width: 120, marginRight: 10 }}
  1063. value={this.state.marriageSearch}
  1064. >
  1065. <Option value="0">未婚</Option>
  1066. <Option value="1">已婚</Option>
  1067. <Option value="2">离异</Option>
  1068. </Select>
  1069. <Select
  1070. placeholder="政治面貌"
  1071. onChange={(e) => {
  1072. this.setState({ politicalOutlookSearch: e });
  1073. }}
  1074. style={{ width: 120, marginRight: 10 }}
  1075. value={this.state.politicalOutlookSearch}
  1076. >
  1077. <Option value="0">群众</Option>
  1078. <Option value="1">中共预备党员</Option>
  1079. <Option value="2">中共党员</Option>
  1080. <Option value="3">致公党员</Option>
  1081. </Select>
  1082. <Select
  1083. placeholder="生日月份"
  1084. onChange={(e) => {
  1085. this.setState({ birthdayMonthSearch: e });
  1086. }}
  1087. style={{ width: 120, marginRight: 10 }}
  1088. value={this.state.birthdayMonthSearch}
  1089. >
  1090. <Option value="">全部</Option>
  1091. <Option value="1">一月</Option>
  1092. <Option value="2">二月</Option>
  1093. <Option value="3">三月</Option>
  1094. <Option value="4">四月</Option>
  1095. <Option value="5">五月</Option>
  1096. <Option value="6">六月</Option>
  1097. <Option value="7">七月</Option>
  1098. <Option value="8">八月</Option>
  1099. <Option value="9">九月</Option>
  1100. <Option value="10">十月</Option>
  1101. <Option value="11">十一月</Option>
  1102. <Option value="12">十二月</Option>
  1103. </Select>
  1104. <Select
  1105. placeholder="所属系统"
  1106. onChange={(e) => {
  1107. this.setState({ systemSearch: e });
  1108. }}
  1109. style={{ width: 120, marginRight: 10 }}
  1110. value={this.state.systemSearch}
  1111. >
  1112. <Option value="0">管理系统</Option>
  1113. <Option value="1">营销系统</Option>
  1114. <Option value="2">技术系统</Option>
  1115. </Select>
  1116. <Select
  1117. placeholder="工作年限"
  1118. onChange={(e) => {
  1119. this.setState({ workingYearsSearch: e });
  1120. }}
  1121. style={{ width: 120, marginRight: 10 }}
  1122. value={this.state.workingYearsSearch}
  1123. >
  1124. <Option value="0">0-1年</Option>
  1125. <Option value="1">1-3年</Option>
  1126. <Option value="2">3-10年</Option>
  1127. <Option value="3">10年以上</Option>
  1128. </Select>
  1129. <Select
  1130. placeholder="学历"
  1131. onChange={(e) => {
  1132. this.setState({ educationSearch: e });
  1133. }}
  1134. style={{ width: 120, marginRight: 370 }}
  1135. value={this.state.educationSearch}
  1136. >
  1137. <Option value="0">高中/中专</Option>
  1138. <Option value="1">专科/高职</Option>
  1139. <Option value="2">本科</Option>
  1140. <Option value="3">研究生</Option>
  1141. <Option value="5">博士</Option>
  1142. </Select>
  1143. <span style={{}}>转正日期:</span>
  1144. <RangePicker
  1145. style={{ marginRight: 10 }}
  1146. value={[
  1147. this.state.promotionTime[0]
  1148. ? moment(this.state.promotionTime[0])
  1149. : null,
  1150. this.state.promotionTime[1]
  1151. ? moment(this.state.promotionTime[1])
  1152. : null,
  1153. ]}
  1154. onChange={(data, dataString) => {
  1155. this.setState({ promotionTime: dataString });
  1156. }}
  1157. />
  1158. <span style={{}}>入职时间:</span>
  1159. <RangePicker
  1160. style={{ marginRight: 10 }}
  1161. value={[
  1162. this.state.entryTime[0]
  1163. ? moment(this.state.entryTime[0])
  1164. : null,
  1165. this.state.entryTime[1]
  1166. ? moment(this.state.entryTime[1])
  1167. : null,
  1168. ]}
  1169. onChange={(data, dataString) => {
  1170. this.setState({ entryTime: dataString });
  1171. }}
  1172. />
  1173. <span style={{}}>离职时间:</span>
  1174. <RangePicker
  1175. style={{ marginRight: 21 }}
  1176. value={[
  1177. this.state.quitTime[0]
  1178. ? moment(this.state.quitTime[0])
  1179. : null,
  1180. this.state.quitTime[1]
  1181. ? moment(this.state.quitTime[1])
  1182. : null,
  1183. ]}
  1184. onChange={(data, dataString) => {
  1185. this.setState({ quitTime: dataString });
  1186. }}
  1187. />
  1188. <span style={{}}>合同时间:</span>
  1189. <RangePicker
  1190. style={{ marginRight: 10 }}
  1191. value={[
  1192. this.state.contractTime[0]
  1193. ? moment(this.state.contractTime[0])
  1194. : null,
  1195. this.state.contractTime[1]
  1196. ? moment(this.state.contractTime[1])
  1197. : null,
  1198. ]}
  1199. onChange={(data, dataString) => {
  1200. this.setState({ contractTime: dataString });
  1201. }}
  1202. />
  1203. <Button
  1204. type="primary"
  1205. onClick={this.search}
  1206. style={{ marginLeft: 10 }}
  1207. >
  1208. 搜索
  1209. </Button>
  1210. <Button onClick={this.reset}>重置</Button>
  1211. </div>
  1212. </TabPane>
  1213. <TabPane tab="新增员工档案" key="3">
  1214. <Button
  1215. type="primary"
  1216. onClick={this.addPeo}
  1217. style={{ margin: "11px 0px 10px 10px" }}
  1218. >
  1219. 新增员工档案
  1220. </Button>
  1221. <Button
  1222. type="primary"
  1223. onClick={this.entryModal}
  1224. style={{ margin: "11px 0px 10px 10px" }}
  1225. >
  1226. 修改入职信息
  1227. </Button>
  1228. </TabPane>
  1229. <TabPane tab="导出Excel" key="4">
  1230. <Button type="primary" style={{ margin: "11px 0px 10px 10px" }}>
  1231. 导出当前列表
  1232. </Button>
  1233. </TabPane>
  1234. <TabPane tab="查看" key="5">
  1235. <Button
  1236. type="primary"
  1237. style={{ margin: "11px 0px 10px 10px" }}
  1238. onClick={() => {}}
  1239. >
  1240. 详情收款流水
  1241. </Button>
  1242. </TabPane>
  1243. </Tabs>
  1244. <div className="patent-table">
  1245. <Spin spinning={this.state.loading}>
  1246. <Table
  1247. bordered
  1248. columns={
  1249. this.state.changeList == undefined
  1250. ? this.state.columns
  1251. : this.state.changeList
  1252. }
  1253. onRowClick={this.tableRowClick}
  1254. dataSource={this.state.dataSource}
  1255. scroll={{ x: "max-content", y: 0 }}
  1256. pagination={this.state.pagination}
  1257. size="small"
  1258. />
  1259. </Spin>
  1260. </div>
  1261. <Modal
  1262. visible={this.state.peoVisible}
  1263. onOk={this.checkOk}
  1264. footer={null}
  1265. width={800}
  1266. onCancel={() => {
  1267. this.loadData();
  1268. this.addPeoCancel();
  1269. }}
  1270. >
  1271. <Spin spinning={this.state.loading}>
  1272. <h2
  1273. style={{
  1274. textAlign: "center",
  1275. paddingBottom: 10,
  1276. marginBottom: 10,
  1277. }}
  1278. >
  1279. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  1280. </h2>
  1281. <div className="clearfix">
  1282. <FormItem
  1283. className="half-item"
  1284. {...formItemLayout}
  1285. label="员工编号"
  1286. >
  1287. <Input
  1288. placeholder=""
  1289. style={{ width: 200 }}
  1290. disabled
  1291. value={this.state.contractNoSearch}
  1292. onChange={(e) => {
  1293. this.setState({
  1294. contractNoSearch: e.target.value,
  1295. });
  1296. }}
  1297. />
  1298. </FormItem>
  1299. <FormItem
  1300. className="half-item"
  1301. {...formItemLayout}
  1302. label="门禁编号"
  1303. >
  1304. <Input
  1305. style={{ width: 200 }}
  1306. placeholder="请输入门禁编号"
  1307. value={this.state.doorId}
  1308. onChange={(e) => {
  1309. this.setState({
  1310. doorId: e.target.value,
  1311. });
  1312. }}
  1313. />
  1314. </FormItem>
  1315. </div>
  1316. <div className="clearfix">
  1317. <FormItem className="half-item" {...formItemLayout} label="姓名">
  1318. <Input
  1319. placeholder="请输入姓名"
  1320. style={{ width: 200 }}
  1321. value={this.state.name}
  1322. onChange={(e) => {
  1323. this.setState({
  1324. name: e.target.value,
  1325. });
  1326. }}
  1327. />
  1328. </FormItem>
  1329. <FormItem
  1330. className="half-item"
  1331. {...formItemLayout}
  1332. label="出生日期"
  1333. >
  1334. <DatePicker
  1335. value={
  1336. this.state.birthdays ? moment(this.state.birthdays) : null
  1337. }
  1338. onChange={(e, t) => {
  1339. this.setState({
  1340. birthdays: t,
  1341. });
  1342. }}
  1343. />
  1344. </FormItem>
  1345. </div>
  1346. <div className="clearfix">
  1347. <FormItem className="half-item" {...formItemLayout} label="性别">
  1348. <Radio.Group
  1349. onChange={(e) => {
  1350. this.setState({ sex: e.target.value });
  1351. }}
  1352. value={this.state.sex}
  1353. >
  1354. <Radio value={0}>男</Radio>
  1355. <Radio value={1}>女</Radio>
  1356. </Radio.Group>
  1357. </FormItem>
  1358. <FormItem className="half-item" {...formItemLayout} label="民族">
  1359. <Input
  1360. placeholder="输入民族(例:汉族)"
  1361. style={{ width: 200 }}
  1362. value={this.state.nation}
  1363. onChange={(e) => {
  1364. this.setState({
  1365. nation: e.target.value,
  1366. });
  1367. }}
  1368. />
  1369. </FormItem>
  1370. </div>
  1371. <div className="clearfix">
  1372. <FormItem
  1373. className="half-item"
  1374. {...formItemLayout}
  1375. label="户籍地址"
  1376. >
  1377. <Cascader
  1378. options={this.state.Area}
  1379. value={this.state.residence}
  1380. placeholder="选择城市"
  1381. style={{ width: "200px" }}
  1382. onChange={(e, pre) => {
  1383. this.setState({ residence: e });
  1384. console.log(e, pre);
  1385. }}
  1386. />
  1387. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1388. </FormItem>
  1389. <FormItem
  1390. className="half-item"
  1391. {...formItemLayout}
  1392. label="户籍街道地址"
  1393. >
  1394. <Input
  1395. placeholder="输入街道地址"
  1396. style={{ width: 200 }}
  1397. value={this.state.residenceAddress}
  1398. onChange={(e) => {
  1399. this.setState({
  1400. residenceAddress: e.target.value,
  1401. });
  1402. }}
  1403. />
  1404. </FormItem>
  1405. </div>
  1406. <div className="clearfix">
  1407. <FormItem
  1408. className="half-item"
  1409. {...formItemLayout}
  1410. label="现住地址"
  1411. >
  1412. <Cascader
  1413. options={this.state.Area}
  1414. value={this.state.now}
  1415. placeholder="选择城市"
  1416. style={{ width: "200px" }}
  1417. onChange={(e, pre) => {
  1418. this.setState({ now: e });
  1419. console.log(e, pre);
  1420. }}
  1421. />
  1422. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1423. </FormItem>
  1424. <FormItem
  1425. className="half-item"
  1426. {...formItemLayout}
  1427. label="现住街道地址"
  1428. >
  1429. <Input
  1430. placeholder="输入街道地址"
  1431. style={{ width: 200 }}
  1432. value={this.state.nowAddress}
  1433. onChange={(e) => {
  1434. this.setState({
  1435. nowAddress: e.target.value,
  1436. });
  1437. }}
  1438. />
  1439. </FormItem>
  1440. </div>
  1441. <div className="clearfix">
  1442. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  1443. <Cascader
  1444. options={this.state.Birthplaces}
  1445. value={this.state.nativePlace}
  1446. placeholder="选择城市"
  1447. style={{ width: "200px" }}
  1448. onChange={(e, pre) => {
  1449. this.setState({ nativePlace: e });
  1450. console.log(e, pre);
  1451. }}
  1452. />
  1453. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1454. </FormItem>
  1455. <FormItem
  1456. className="half-item"
  1457. {...formItemLayout}
  1458. label="身份证"
  1459. >
  1460. <Input
  1461. placeholder="输入身份证信息"
  1462. style={{ width: 200 }}
  1463. value={this.state.idCard}
  1464. onChange={(e) => {
  1465. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  1466. this.setState({
  1467. idCard: e.target.value,
  1468. });
  1469. }}
  1470. />
  1471. </FormItem>
  1472. </div>
  1473. <div className="clearfix">
  1474. <FormItem
  1475. className="half-item"
  1476. {...formItemLayout}
  1477. label="身份证领证机关"
  1478. >
  1479. <Input
  1480. placeholder="输入机关名称"
  1481. style={{ width: 200 }}
  1482. value={this.state.certificationAuthority}
  1483. onChange={(e) => {
  1484. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  1485. this.setState({
  1486. certificationAuthority: e.target.value,
  1487. });
  1488. }}
  1489. />
  1490. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1491. </FormItem>
  1492. <FormItem
  1493. className="half-item"
  1494. {...formItemLayout}
  1495. label="婚姻状态"
  1496. >
  1497. <Radio.Group
  1498. onChange={(e) => {
  1499. this.setState({ marriage: e.target.value });
  1500. }}
  1501. value={this.state.marriage}
  1502. >
  1503. <Radio value={0}>未婚</Radio>
  1504. <Radio value={1}>已婚</Radio>
  1505. <Radio value={2}>离异</Radio>
  1506. </Radio.Group>
  1507. </FormItem>
  1508. </div>
  1509. <div className="clearfix">
  1510. <FormItem
  1511. className="half-item"
  1512. labelCol={{ span: 6 }}
  1513. wrapperCol={{ span: 30 }}
  1514. label="子女数量"
  1515. >
  1516. <span>儿子:</span>
  1517. <Input
  1518. placeholder="输入数量"
  1519. style={{ width: 80 }}
  1520. type={"number"}
  1521. value={this.state.son}
  1522. onChange={(e) => {
  1523. this.setState({
  1524. son: e.target.value,
  1525. });
  1526. }}
  1527. />
  1528. <span style={{ marginLeft: 10 }}>女儿:</span>
  1529. <Input
  1530. placeholder="输入数量"
  1531. style={{ width: 80 }}
  1532. type={"number"}
  1533. value={this.state.girl}
  1534. onChange={(e) => {
  1535. this.setState({
  1536. girl: e.target.value,
  1537. });
  1538. }}
  1539. />
  1540. </FormItem>
  1541. <FormItem
  1542. className="half-item"
  1543. {...formItemLayout}
  1544. label="政治面貌"
  1545. >
  1546. <Select
  1547. placeholder="请选择政治面貌"
  1548. style={{ width: 200 }}
  1549. onChange={(e) => {
  1550. this.setState({ politicalOutlook: e });
  1551. }}
  1552. value={this.state.politicalOutlook}
  1553. >
  1554. <Option value="0">群众</Option>
  1555. <Option value="1">中共预备党员</Option>
  1556. <Option value="2">中共党员</Option>
  1557. <Option value="3">致公党党员</Option>
  1558. </Select>
  1559. </FormItem>
  1560. </div>
  1561. <Button
  1562. type="primary"
  1563. shape="round"
  1564. size="large"
  1565. style={{
  1566. position: "relative",
  1567. left: "50%",
  1568. transform: "translateX(-50%)",
  1569. }}
  1570. onClick={this.state.isAddPeo ? this.addOk : this.editPeo}
  1571. >
  1572. 保存
  1573. </Button>
  1574. </Spin>
  1575. </Modal>
  1576. <Modal
  1577. visible={this.state.stayVisible}
  1578. footer={null}
  1579. width={800}
  1580. onCancel={() => {
  1581. this.loadData();
  1582. this.stayCancel();
  1583. }}
  1584. >
  1585. <Spin spinning={this.state.loading}>
  1586. <h2
  1587. style={{
  1588. textAlign: "center",
  1589. paddingBottom: 10,
  1590. marginBottom: 10,
  1591. }}
  1592. >
  1593. 修改任职信息
  1594. </h2>
  1595. <div className="clearfix">
  1596. <FormItem
  1597. className="half-item"
  1598. labelCol={{ span: 6 }}
  1599. wrapperCol={{ span: 30 }}
  1600. label="员工状态"
  1601. >
  1602. <Select
  1603. placeholder="请选择状态"
  1604. style={{ width: 200 }}
  1605. onChange={(e) => {
  1606. this.setState({ status: e });
  1607. }}
  1608. value={this.state.status}
  1609. >
  1610. <Option value="0">实习生</Option>
  1611. <Option value="1">在职(试用期)</Option>
  1612. <Option value="2">在职(合同期)</Option>
  1613. <Option value="3">兼职</Option>
  1614. <Option value="4">已离职</Option>
  1615. </Select>
  1616. </FormItem>
  1617. <FormItem
  1618. className="half-item"
  1619. {...formItemLayout}
  1620. label="所属系统"
  1621. >
  1622. <Select
  1623. placeholder="请选择所属系统"
  1624. style={{ width: 200 }}
  1625. onChange={(e) => {
  1626. this.setState({ system: e });
  1627. }}
  1628. value={this.state.system}
  1629. >
  1630. <Option value="0">管理系统</Option>
  1631. <Option value="1">营销系统</Option>
  1632. <Option value="2">技术系统</Option>
  1633. </Select>
  1634. </FormItem>
  1635. </div>
  1636. <div className="clearfix">
  1637. <FormItem
  1638. className="half-item"
  1639. labelCol={{ span: 6 }}
  1640. wrapperCol={{ span: 30 }}
  1641. label="工作性质"
  1642. >
  1643. <Radio.Group
  1644. onChange={(e) => {
  1645. this.setState({ jobNature: e.target.value });
  1646. }}
  1647. value={this.state.jobNature}
  1648. >
  1649. <Radio value="0">全职</Radio>
  1650. <Radio value="1">兼职</Radio>
  1651. <Radio value="2">其他</Radio>
  1652. </Radio.Group>
  1653. <Input
  1654. placeholder="输入性质"
  1655. style={{
  1656. width: 80,
  1657. display:
  1658. this.state.jobNature == 2 ? "inline-block" : "none",
  1659. }}
  1660. value={this.state.jobNatureRemarks}
  1661. onChange={(e) => {
  1662. this.setState({
  1663. jobNatureRemarks: e.target.value,
  1664. });
  1665. }}
  1666. />
  1667. </FormItem>
  1668. <FormItem className="half-item" {...formItemLayout} label="工龄">
  1669. <span>{this.state.age}</span>
  1670. </FormItem>
  1671. </div>
  1672. <div className="clearfix">
  1673. <FormItem
  1674. className="half-item"
  1675. {...formItemLayout}
  1676. label="入职时间"
  1677. >
  1678. <DatePicker
  1679. value={
  1680. this.state.entryTimes ? moment(this.state.entryTimes) : null
  1681. }
  1682. style={{ width: 200 }}
  1683. onChange={(e, t) => {
  1684. this.setState({
  1685. entryTimes: t,
  1686. });
  1687. }}
  1688. />
  1689. </FormItem>
  1690. <FormItem
  1691. className="half-item"
  1692. {...formItemLayout}
  1693. label="转正时间"
  1694. >
  1695. <DatePicker
  1696. value={
  1697. this.state.promotionTimes
  1698. ? moment(this.state.promotionTimes)
  1699. : null
  1700. }
  1701. style={{ width: 200 }}
  1702. onChange={(e, t) => {
  1703. this.setState({
  1704. promotionTimes: t,
  1705. });
  1706. }}
  1707. />
  1708. </FormItem>
  1709. </div>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. className="half-item"
  1713. {...formItemLayout}
  1714. label="所属公司"
  1715. >
  1716. <Select
  1717. placeholder="选择公司"
  1718. style={{ width: 200, marginRight: 10 }}
  1719. value={this.state.company}
  1720. onChange={(e) => {
  1721. this.setState({ company: e });
  1722. }}
  1723. >
  1724. {departmentArr.map(function (item) {
  1725. return (
  1726. <Select.Option key={item.id}>{item.name}</Select.Option>
  1727. );
  1728. })}
  1729. </Select>
  1730. </FormItem>
  1731. <FormItem className="half-item" {...formItemLayout} label="级别">
  1732. <Select
  1733. placeholder="请选择所属级别"
  1734. style={{ width: 200 }}
  1735. onChange={(e) => {
  1736. this.setState({ lvl: e });
  1737. }}
  1738. value={this.state.lvl}
  1739. >
  1740. <Option value="0">员工</Option>
  1741. <Option value="1">主管</Option>
  1742. <Option value="2">经理</Option>
  1743. <Option value="3">总经理</Option>
  1744. <Option value="4">副总裁</Option>
  1745. <Option value="5">副总</Option>
  1746. <Option value="6">总监</Option>
  1747. <Option value="7">董事长</Option>
  1748. </Select>
  1749. </FormItem>
  1750. </div>
  1751. <div className="clearfix">
  1752. <FormItem className="half-item" {...formItemLayout} label="职位">
  1753. <Select
  1754. placeholder="选择职位"
  1755. style={{ width: 200, marginRight: 10 }}
  1756. value={this.state.jobs}
  1757. onChange={(e) => {
  1758. this.setState({ jobs: e, star: undefined });
  1759. console.log(e);
  1760. this.getList();
  1761. }}
  1762. >
  1763. <Option value="1">员工</Option>
  1764. <Option value="2">试用营销员</Option>
  1765. <Option value="3">试用营销储备经理</Option>
  1766. <Option value="4">营销经理</Option>
  1767. <Option value="5">总监合伙人</Option>
  1768. <Option value="6">技术助理</Option>
  1769. <Option value="7">咨询师</Option>
  1770. <Option value="8">咨询师主管</Option>
  1771. <Option value="9">咨询师经理</Option>
  1772. <Option value="10">高级经理</Option>
  1773. </Select>
  1774. </FormItem>
  1775. <FormItem className="half-item" {...formItemLayout} label="星级">
  1776. <Select
  1777. placeholder="请选择所属星级"
  1778. style={{ width: 200 }}
  1779. onChange={(e) => {
  1780. this.setState({ star: e });
  1781. }}
  1782. value={this.state.star}
  1783. >
  1784. {this.state.starArr
  1785. ? this.state.starArr.map((item, index) => {
  1786. return (
  1787. <Option value={item.star}>{item.starName}</Option>
  1788. );
  1789. })
  1790. : []}
  1791. </Select>
  1792. </FormItem>
  1793. </div>
  1794. <div className="clearfix">
  1795. <FormItem
  1796. className="half-item"
  1797. labelCol={{ span: 6 }}
  1798. wrapperCol={{ span: 30 }}
  1799. label="岗位津贴"
  1800. >
  1801. <Input
  1802. placeholder="输入金额"
  1803. style={{ width: 200 }}
  1804. value={this.state.allowance}
  1805. onChange={(e) => {
  1806. this.setState({
  1807. allowance: e.target.value,
  1808. });
  1809. }}
  1810. />
  1811. </FormItem>
  1812. </div>
  1813. <Button
  1814. type="primary"
  1815. shape="round"
  1816. size="large"
  1817. style={{
  1818. position: "relative",
  1819. left: "50%",
  1820. transform: "translateX(-50%)",
  1821. }}
  1822. onClick={this.editStay}
  1823. >
  1824. 保存
  1825. </Button>
  1826. </Spin>
  1827. </Modal>
  1828. <Modal
  1829. visible={this.state.phoneVisible}
  1830. footer={null}
  1831. width={800}
  1832. onCancel={() => {
  1833. this.loadData();
  1834. this.phoneCancel();
  1835. }}
  1836. >
  1837. <Spin spinning={this.state.loading}>
  1838. <h2
  1839. style={{
  1840. textAlign: "center",
  1841. paddingBottom: 10,
  1842. marginBottom: 10,
  1843. }}
  1844. >
  1845. 修改联系信息
  1846. </h2>
  1847. <div className="clearfix">
  1848. <FormItem
  1849. className="half-item"
  1850. labelCol={{ span: 6 }}
  1851. wrapperCol={{ span: 30 }}
  1852. label="手机号码"
  1853. >
  1854. <Input
  1855. placeholder="输入号码"
  1856. style={{ width: 200 }}
  1857. value={this.state.phone}
  1858. onChange={(e) => {
  1859. this.setState({
  1860. phone: e.target.value,
  1861. });
  1862. }}
  1863. />
  1864. </FormItem>
  1865. <FormItem
  1866. className="half-item"
  1867. labelCol={{ span: 6 }}
  1868. wrapperCol={{ span: 30 }}
  1869. label="办公室电话"
  1870. >
  1871. <Input
  1872. placeholder="输入金额"
  1873. style={{ width: 200 }}
  1874. value={this.state.bgs}
  1875. onChange={(e) => {
  1876. this.setState({
  1877. bgs: e.target.value,
  1878. });
  1879. }}
  1880. />
  1881. </FormItem>
  1882. </div>
  1883. <div className="clearfix">
  1884. <FormItem
  1885. className="half-item"
  1886. labelCol={{ span: 6 }}
  1887. wrapperCol={{ span: 30 }}
  1888. label="紧急联系人1"
  1889. >
  1890. <Input
  1891. placeholder="请输入名字"
  1892. style={{ width: 200 }}
  1893. value={this.state.lianxiren}
  1894. onChange={(e) => {
  1895. this.setState({
  1896. lianxiren: e.target.value,
  1897. });
  1898. }}
  1899. />
  1900. </FormItem>
  1901. <FormItem
  1902. className="half-item"
  1903. labelCol={{ span: 6 }}
  1904. wrapperCol={{ span: 30 }}
  1905. label="紧急联系人电话"
  1906. >
  1907. <Input
  1908. placeholder="请输入电话"
  1909. style={{ width: 200 }}
  1910. value={this.state.jjphone}
  1911. onChange={(e) => {
  1912. this.setState({
  1913. jjphone: e.target.value,
  1914. });
  1915. }}
  1916. />
  1917. </FormItem>
  1918. </div>
  1919. <div className="clearfix">
  1920. <FormItem
  1921. className="half-item"
  1922. labelCol={{ span: 6 }}
  1923. wrapperCol={{ span: 30 }}
  1924. label="紧急联系人2"
  1925. >
  1926. <Input
  1927. placeholder="请输入名字"
  1928. style={{ width: 200 }}
  1929. value={this.state.lianxiren}
  1930. onChange={(e) => {
  1931. this.setState({
  1932. lianxiren: e.target.value,
  1933. });
  1934. }}
  1935. />
  1936. </FormItem>
  1937. <FormItem
  1938. className="half-item"
  1939. labelCol={{ span: 6 }}
  1940. wrapperCol={{ span: 30 }}
  1941. label="紧急联系人电话"
  1942. >
  1943. <Input
  1944. placeholder="请输入电话"
  1945. style={{ width: 200 }}
  1946. value={this.state.jjphone}
  1947. onChange={(e) => {
  1948. this.setState({
  1949. jjphone: e.target.value,
  1950. });
  1951. }}
  1952. />
  1953. </FormItem>
  1954. </div>
  1955. <div className="clearfix">
  1956. <FormItem
  1957. className="half-item"
  1958. labelCol={{ span: 6 }}
  1959. wrapperCol={{ span: 30 }}
  1960. label="紧急联系人3"
  1961. >
  1962. <Input
  1963. placeholder="请输入名字"
  1964. style={{ width: 200 }}
  1965. value={this.state.lianxiren}
  1966. onChange={(e) => {
  1967. this.setState({
  1968. lianxiren: e.target.value,
  1969. });
  1970. }}
  1971. />
  1972. </FormItem>
  1973. <FormItem
  1974. className="half-item"
  1975. labelCol={{ span: 6 }}
  1976. wrapperCol={{ span: 30 }}
  1977. label="紧急联系人电话"
  1978. >
  1979. <Input
  1980. placeholder="请输入电话"
  1981. style={{ width: 200 }}
  1982. value={this.state.jjphone}
  1983. onChange={(e) => {
  1984. this.setState({
  1985. jjphone: e.target.value,
  1986. });
  1987. }}
  1988. />
  1989. </FormItem>
  1990. </div>
  1991. <Button
  1992. type="primary"
  1993. shape="round"
  1994. size="large"
  1995. style={{
  1996. position: "relative",
  1997. left: "50%",
  1998. transform: "translateX(-50%)",
  1999. }}
  2000. onClick={this.editPhone}
  2001. >
  2002. 保存
  2003. </Button>
  2004. </Spin>
  2005. </Modal>
  2006. <Modal
  2007. visible={this.state.entryVisible}
  2008. footer={null}
  2009. width={800}
  2010. onCancel={() => {
  2011. this.loadData();
  2012. this.entryCancel();
  2013. }}
  2014. >
  2015. <Spin spinning={this.state.loading}>
  2016. <h2
  2017. style={{
  2018. textAlign: "center",
  2019. paddingBottom: 10,
  2020. marginBottom: 10,
  2021. }}
  2022. >
  2023. 修改入职信息
  2024. </h2>
  2025. <div className="clearfix">
  2026. <FormItem
  2027. className="half-item"
  2028. labelCol={{ span: 6 }}
  2029. wrapperCol={{ span: 30 }}
  2030. label="毕业学校"
  2031. >
  2032. <Input
  2033. placeholder="输入学校名称"
  2034. style={{ width: 200 }}
  2035. value={this.state.school}
  2036. onChange={(e) => {
  2037. this.setState({
  2038. school: e.target.value,
  2039. });
  2040. }}
  2041. />
  2042. </FormItem>
  2043. <FormItem
  2044. className="half-item"
  2045. labelCol={{ span: 6 }}
  2046. wrapperCol={{ span: 30 }}
  2047. label="学历"
  2048. >
  2049. <Select
  2050. placeholder="请选择学历"
  2051. style={{ width: 200 }}
  2052. onChange={(e) => {
  2053. this.setState({ education: e });
  2054. }}
  2055. value={this.state.education}
  2056. >
  2057. <Option value="0">高中/中专</Option>
  2058. <Option value="1">专科/高职</Option>
  2059. <Option value="2">本科</Option>
  2060. <Option value="3">研究生</Option>
  2061. <Option value="4">博士</Option>
  2062. </Select>
  2063. </FormItem>
  2064. </div>
  2065. <div className="clearfix">
  2066. <FormItem
  2067. className="half-item"
  2068. labelCol={{ span: 6 }}
  2069. wrapperCol={{ span: 30 }}
  2070. label="所学专业"
  2071. >
  2072. <Input
  2073. placeholder="请输入专业名称"
  2074. style={{ width: 200 }}
  2075. value={this.state.major}
  2076. onChange={(e) => {
  2077. this.setState({
  2078. major: e.target.value,
  2079. });
  2080. }}
  2081. />
  2082. </FormItem>
  2083. <FormItem
  2084. className="half-item"
  2085. labelCol={{ span: 6 }}
  2086. wrapperCol={{ span: 30 }}
  2087. label="职称"
  2088. >
  2089. <Input
  2090. placeholder="请输入职称"
  2091. style={{ width: 200 }}
  2092. value={this.state.title}
  2093. onChange={(e) => {
  2094. this.setState({
  2095. title: e.target.value,
  2096. });
  2097. }}
  2098. />
  2099. </FormItem>
  2100. </div>
  2101. <div className="clearfix">
  2102. <FormItem
  2103. className="half-item"
  2104. labelCol={{ span: 6 }}
  2105. wrapperCol={{ span: 30 }}
  2106. label="备注"
  2107. >
  2108. <Input
  2109. placeholder="请输入备注"
  2110. style={{ width: 200 }}
  2111. value={this.state.entryRemarks}
  2112. onChange={(e) => {
  2113. this.setState({
  2114. entryRemarks: e.target.value,
  2115. });
  2116. }}
  2117. />
  2118. </FormItem>
  2119. </div>
  2120. <div
  2121. className="clearfix"
  2122. style={{ paddingLeft: 70, marginBottom: 10 }}
  2123. >
  2124. <div style={{ marginBottom: 10 }}>附件:</div>
  2125. <PicModal
  2126. remarks={this.picToArr(this.state.annexName)}
  2127. picUrl={this.picToArr(this.state.annexUrl)}
  2128. remove={this.ruzhiRemove}
  2129. />
  2130. <Button onClick={this.addPic}>添加附件</Button>
  2131. </div>
  2132. <Button
  2133. type="primary"
  2134. shape="round"
  2135. size="large"
  2136. style={{
  2137. position: "relative",
  2138. left: "50%",
  2139. transform: "translateX(-50%)",
  2140. }}
  2141. onClick={this.editPhone}
  2142. >
  2143. 保存
  2144. </Button>
  2145. </Spin>
  2146. </Modal>
  2147. <Modal
  2148. visible={this.state.visible}
  2149. footer={null}
  2150. width={1000}
  2151. onCancel={() => {
  2152. this.loadData();
  2153. this.cancel();
  2154. }}
  2155. >
  2156. <Spin spinning={this.state.loading}>
  2157. <h2
  2158. style={{
  2159. textAlign: "center",
  2160. paddingBottom: 10,
  2161. marginBottom: 10,
  2162. }}
  2163. >
  2164. {this.state.ModalData.name + "人事档案"}
  2165. </h2>
  2166. <ul className="peo-table">
  2167. {this.state.table.map((item) => {
  2168. let value = item.value;
  2169. if (item.render) {
  2170. let fn = item.render;
  2171. return (
  2172. <li>
  2173. <div className="peo-left">{item.key}</div>
  2174. <Tooltip
  2175. placement="top"
  2176. title={fn(
  2177. this.state.ModalData[value],
  2178. value == "son" ? this.state.ModalData.girl : 0
  2179. )}
  2180. >
  2181. <div className="peo-right">
  2182. {fn(
  2183. this.state.ModalData[value],
  2184. value == "son" ? this.state.ModalData.girl : 0
  2185. )}
  2186. </div>
  2187. </Tooltip>
  2188. </li>
  2189. );
  2190. }
  2191. return (
  2192. <li>
  2193. <div className="peo-left">{item.key}</div>
  2194. <Tooltip
  2195. placement="top"
  2196. title={this.state.ModalData[item.value]}
  2197. >
  2198. <div className="peo-right">
  2199. {this.state.ModalData[value] &&
  2200. this.state.ModalData[value].length > 10
  2201. ? this.state.ModalData[value].substring(0, 10) + "..."
  2202. : this.state.ModalData[value]}
  2203. </div>
  2204. </Tooltip>
  2205. </li>
  2206. );
  2207. })}
  2208. </ul>
  2209. <div className="title-peo">
  2210. <span>任职信息</span>
  2211. <Button
  2212. type="primary"
  2213. onClick={(e) => {
  2214. this.stayModal(this.state.ModalData.id);
  2215. }}
  2216. style={{ position: "absolute", right: 0, height: 30 }}
  2217. >
  2218. 修改任职信息
  2219. </Button>
  2220. </div>
  2221. <div className="clearfix">
  2222. <FormItem
  2223. className="half-item"
  2224. labelCol={{ span: 6 }}
  2225. wrapperCol={{ span: 30 }}
  2226. label="员工状态"
  2227. >
  2228. {this.state.ModalData.statusName}
  2229. </FormItem>
  2230. <FormItem
  2231. className="half-item"
  2232. labelCol={{ span: 6 }}
  2233. wrapperCol={{ span: 30 }}
  2234. label="所属系统"
  2235. >
  2236. {this.state.ModalData.systemName}
  2237. </FormItem>
  2238. </div>
  2239. <div className="clearfix">
  2240. <FormItem
  2241. className="half-item"
  2242. labelCol={{ span: 6 }}
  2243. wrapperCol={{ span: 30 }}
  2244. label="工作性质"
  2245. >
  2246. {this.jobStatus(
  2247. this.state.ModalData.jobNature,
  2248. this.state.ModalData.jobNatureRemarks
  2249. )}
  2250. </FormItem>
  2251. <FormItem
  2252. className="half-item"
  2253. labelCol={{ span: 6 }}
  2254. wrapperCol={{ span: 30 }}
  2255. label="工龄"
  2256. >
  2257. {this.state.ModalData.workingYear}
  2258. </FormItem>
  2259. </div>
  2260. <div className="clearfix">
  2261. <FormItem
  2262. className="half-item"
  2263. labelCol={{ span: 6 }}
  2264. wrapperCol={{ span: 30 }}
  2265. label="入职时间"
  2266. >
  2267. {this.state.ModalData.entryTimes}
  2268. </FormItem>
  2269. <FormItem
  2270. className="half-item"
  2271. labelCol={{ span: 6 }}
  2272. wrapperCol={{ span: 30 }}
  2273. label="转正时间"
  2274. >
  2275. {this.state.ModalData.promotionTimes}
  2276. </FormItem>
  2277. </div>
  2278. <div className="clearfix">
  2279. <FormItem
  2280. className="half-item"
  2281. labelCol={{ span: 6 }}
  2282. wrapperCol={{ span: 30 }}
  2283. label="所属公司"
  2284. >
  2285. {this.state.ModalData.entryTimes}
  2286. </FormItem>
  2287. <FormItem
  2288. className="half-item"
  2289. labelCol={{ span: 6 }}
  2290. wrapperCol={{ span: 30 }}
  2291. label="级别"
  2292. >
  2293. {this.state.ModalData.lvlName}
  2294. </FormItem>
  2295. </div>
  2296. <div className="clearfix">
  2297. <FormItem
  2298. className="half-item"
  2299. labelCol={{ span: 6 }}
  2300. wrapperCol={{ span: 30 }}
  2301. label="职位"
  2302. >
  2303. {this.state.ModalData.jobsName}
  2304. </FormItem>
  2305. <FormItem
  2306. className="half-item"
  2307. labelCol={{ span: 6 }}
  2308. wrapperCol={{ span: 30 }}
  2309. label="岗位津贴"
  2310. >
  2311. {this.state.ModalData.allowance}
  2312. </FormItem>
  2313. </div>
  2314. <div className="clearfix">
  2315. <FormItem
  2316. className="half-item"
  2317. labelCol={{ span: 6 }}
  2318. wrapperCol={{ span: 30 }}
  2319. label="星级"
  2320. >
  2321. {this.state.ModalData.starName}
  2322. </FormItem>
  2323. </div>
  2324. <div className="title-peo">
  2325. <span>联系信息</span>
  2326. <Button
  2327. type="primary"
  2328. onClick={this.phoneModal}
  2329. style={{ position: "absolute", right: 0, height: 30 }}
  2330. >
  2331. 修改联系信息
  2332. </Button>
  2333. </div>
  2334. <div className="clearfix">
  2335. <FormItem
  2336. className="half-item"
  2337. labelCol={{ span: 6 }}
  2338. wrapperCol={{ span: 30 }}
  2339. label="手机号码"
  2340. >
  2341. {this.state.ModalData.mobile}
  2342. </FormItem>
  2343. <FormItem
  2344. className="half-item"
  2345. labelCol={{ span: 6 }}
  2346. wrapperCol={{ span: 30 }}
  2347. label="电话"
  2348. >
  2349. {this.state.ModalData.fixedTel}
  2350. </FormItem>
  2351. </div>
  2352. {this.state.ModalData.contactList &&
  2353. this.state.ModalData.contactList.length > 0 ? (
  2354. this.state.ModalData.contactList.map((item, index) => {
  2355. return (
  2356. <div className="clearfix">
  2357. <FormItem
  2358. className="half-item"
  2359. labelCol={{ span: 6 }}
  2360. wrapperCol={{ span: 30 }}
  2361. label={"紧急联系人" + index}
  2362. >
  2363. {item.emergencyContact}
  2364. </FormItem>
  2365. <FormItem
  2366. className="half-item"
  2367. labelCol={{ span: 6 }}
  2368. wrapperCol={{ span: 30 }}
  2369. label={"紧急联系人" + index + "电话"}
  2370. >
  2371. {item.emergencyMobile}
  2372. </FormItem>
  2373. </div>
  2374. );
  2375. })
  2376. ) : (
  2377. <div
  2378. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2379. >
  2380. 暂无紧急联系人信息
  2381. </div>
  2382. )}
  2383. <div className="title-peo">
  2384. <span>入职资料</span>
  2385. </div>
  2386. <div className="clearfix">
  2387. <FormItem
  2388. className="half-item"
  2389. labelCol={{ span: 6 }}
  2390. wrapperCol={{ span: 30 }}
  2391. label="毕业学校"
  2392. >
  2393. {this.state.ModalData.personnelEntry
  2394. ? this.state.ModalData.personnelEntry.school
  2395. : ""}
  2396. </FormItem>
  2397. <FormItem
  2398. className="half-item"
  2399. labelCol={{ span: 6 }}
  2400. wrapperCol={{ span: 30 }}
  2401. label="学历"
  2402. >
  2403. {this.state.ModalData.personnelEntry
  2404. ? this.educationStatus(
  2405. this.state.ModalData.personnelEntry.education
  2406. )
  2407. : ""}
  2408. </FormItem>
  2409. </div>
  2410. <div className="clearfix">
  2411. <FormItem
  2412. className="half-item"
  2413. labelCol={{ span: 6 }}
  2414. wrapperCol={{ span: 30 }}
  2415. label="所学专业"
  2416. >
  2417. {this.state.ModalData.personnelEntry
  2418. ? this.state.ModalData.personnelEntry.major
  2419. : ""}
  2420. </FormItem>
  2421. <FormItem
  2422. className="half-item"
  2423. labelCol={{ span: 6 }}
  2424. wrapperCol={{ span: 30 }}
  2425. label="职称"
  2426. >
  2427. {this.state.ModalData.personnelEntry
  2428. ? this.state.ModalData.personnelEntry.title
  2429. : ""}
  2430. </FormItem>
  2431. </div>
  2432. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2433. <div style={{ marginBottom: 10 }}>附件:</div>
  2434. <PicModal
  2435. remarks={
  2436. this.state.ModalData.personnelEntry
  2437. ? this.picToArr(
  2438. this.state.ModalData.personnelEntry.annexName
  2439. )
  2440. : []
  2441. }
  2442. picUrl={
  2443. this.state.ModalData.personnelEntry
  2444. ? this.picToArr(
  2445. this.state.ModalData.personnelEntry.annexUrl
  2446. )
  2447. : []
  2448. }
  2449. />
  2450. </div>
  2451. <div className="title-peo">
  2452. <span>晋升情况</span>
  2453. </div>
  2454. {this.state.ModalData.promotionList &&
  2455. this.state.ModalData.promotionList.length > 0 ? (
  2456. this.state.ModalData.promotionList.map((item, index) => {
  2457. return (
  2458. <div
  2459. style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
  2460. >
  2461. <div className="clearfix">
  2462. <FormItem
  2463. className="half-item"
  2464. labelCol={{ span: 6 }}
  2465. wrapperCol={{ span: 30 }}
  2466. label="晋升职位"
  2467. >
  2468. {item.oldJobsName + "--->" + item.newJobsName}
  2469. </FormItem>
  2470. <FormItem
  2471. className="half-item"
  2472. labelCol={{ span: 6 }}
  2473. wrapperCol={{ span: 30 }}
  2474. label="晋升等级"
  2475. >
  2476. {item.oldLvlName + "--->" + item.newLvlName}
  2477. </FormItem>
  2478. </div>
  2479. <div className="clearfix">
  2480. <FormItem
  2481. className="half-item"
  2482. labelCol={{ span: 6 }}
  2483. wrapperCol={{ span: 30 }}
  2484. label="晋升时间"
  2485. >
  2486. {item.promotionTimes}
  2487. </FormItem>
  2488. <FormItem
  2489. className="half-item"
  2490. labelCol={{ span: 6 }}
  2491. wrapperCol={{ span: 30 }}
  2492. label="晋升备注"
  2493. >
  2494. {item.promotionRemarks}
  2495. </FormItem>
  2496. </div>
  2497. <div
  2498. className="clearfix"
  2499. style={{ paddingLeft: 70, marginBottom: 10 }}
  2500. >
  2501. <div style={{ marginBottom: 10 }}>附件:</div>
  2502. <PicModal
  2503. remarks={this.picToArr(item.annexName)}
  2504. picUrl={this.picToArr(item.annexUrl)}
  2505. />
  2506. </div>
  2507. </div>
  2508. );
  2509. })
  2510. ) : (
  2511. <div
  2512. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2513. >
  2514. 暂无晋升情况
  2515. </div>
  2516. )}
  2517. <div className="title-peo">
  2518. <span>合同情况</span>
  2519. </div>
  2520. {this.state.ModalData.contractList &&
  2521. this.state.ModalData.contractList.length > 0 ? (
  2522. this.state.ModalData.contractList.map((item, index) => {
  2523. return (
  2524. <div
  2525. style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
  2526. >
  2527. <div className="clearfix">
  2528. <FormItem
  2529. className="half-item"
  2530. labelCol={{ span: 6 }}
  2531. wrapperCol={{ span: 30 }}
  2532. label="签订时间"
  2533. >
  2534. {item.startTimes}
  2535. </FormItem>
  2536. <FormItem
  2537. className="half-item"
  2538. labelCol={{ span: 6 }}
  2539. wrapperCol={{ span: 30 }}
  2540. label="到期时间"
  2541. >
  2542. {item.endTimes}
  2543. </FormItem>
  2544. </div>
  2545. <div className="clearfix">
  2546. <FormItem
  2547. className="half-item"
  2548. labelCol={{ span: 6 }}
  2549. wrapperCol={{ span: 30 }}
  2550. label="备注"
  2551. >
  2552. {item.contractRemarks}
  2553. </FormItem>
  2554. </div>
  2555. <div
  2556. className="clearfix"
  2557. style={{ paddingLeft: 70, marginBottom: 10 }}
  2558. >
  2559. <div style={{ marginBottom: 10 }}>附件:</div>
  2560. <PicModal
  2561. remarks={this.picToArr(item.annexName)}
  2562. picUrl={this.picToArr(item.annexUrl)}
  2563. />
  2564. </div>
  2565. </div>
  2566. );
  2567. })
  2568. ) : (
  2569. <div
  2570. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2571. >
  2572. 暂无合同情况
  2573. </div>
  2574. )}
  2575. <div className="title-peo">
  2576. <span>奖惩情况</span>
  2577. </div>
  2578. {this.state.ModalData.chooseList &&
  2579. this.state.ModalData.chooseList.length > 0 ? (
  2580. this.state.ModalData.chooseList.map((item, index) => {
  2581. return (
  2582. <div
  2583. style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
  2584. >
  2585. <div className="clearfix">
  2586. <FormItem
  2587. className="half-item"
  2588. labelCol={{ span: 6 }}
  2589. wrapperCol={{ span: 30 }}
  2590. label={item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2591. >
  2592. {item.chooseRemarks}
  2593. </FormItem>
  2594. <FormItem
  2595. className="half-item"
  2596. labelCol={{ span: 6 }}
  2597. wrapperCol={{ span: 30 }}
  2598. label="时间"
  2599. >
  2600. {item.effectTimes}
  2601. </FormItem>
  2602. </div>
  2603. <div
  2604. className="clearfix"
  2605. style={{ paddingLeft: 70, marginBottom: 10 }}
  2606. >
  2607. <div style={{ marginBottom: 10 }}>附件:</div>
  2608. <PicModal
  2609. remarks={this.picToArr(item.annexName)}
  2610. picUrl={this.picToArr(item.annexUrl)}
  2611. />
  2612. </div>
  2613. </div>
  2614. );
  2615. })
  2616. ) : (
  2617. <div
  2618. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2619. >
  2620. 暂无奖惩情况
  2621. </div>
  2622. )}
  2623. <div className="title-peo">
  2624. <span>离职情况</span>
  2625. </div>
  2626. {this.state.ModalData.quitList &&
  2627. this.state.ModalData.quitList.length > 0 ? (
  2628. this.state.ModalData.quitList.map((item, index) => {
  2629. return (
  2630. <div
  2631. style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
  2632. >
  2633. <div className="clearfix">
  2634. <FormItem
  2635. className="half-item"
  2636. labelCol={{ span: 6 }}
  2637. wrapperCol={{ span: 30 }}
  2638. label="离职时间"
  2639. >
  2640. {item.effectTimes}
  2641. </FormItem>
  2642. <FormItem
  2643. className="half-item"
  2644. labelCol={{ span: 6 }}
  2645. wrapperCol={{ span: 30 }}
  2646. label="离职备注"
  2647. >
  2648. {item.quitRemarks}
  2649. </FormItem>
  2650. </div>
  2651. <div
  2652. className="clearfix"
  2653. style={{ paddingLeft: 70, marginBottom: 10 }}
  2654. >
  2655. <div style={{ marginBottom: 10 }}>附件:</div>
  2656. <PicModal
  2657. remarks={this.picToArr(item.annexName)}
  2658. picUrl={this.picToArr(item.annexUrl)}
  2659. />
  2660. </div>
  2661. </div>
  2662. );
  2663. })
  2664. ) : (
  2665. <div
  2666. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2667. >
  2668. 暂无奖惩情况
  2669. </div>
  2670. )}
  2671. </Spin>
  2672. </Modal>
  2673. <AddPicModal
  2674. cancel={this.addPicModalCancel}
  2675. add={this.addRuzhi}
  2676. visible={this.state.addPicModal}
  2677. />
  2678. </div>
  2679. );
  2680. },
  2681. });
  2682. export default PersonnelAll;