personnelAll.jsx 169 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206
  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 ReactToPrint from "react-to-print";
  8. import "./personnelList.less"
  9. import {
  10. Button,
  11. Form,
  12. Input,
  13. Select,
  14. Spin,
  15. Table,
  16. message,
  17. Modal,
  18. Tabs,
  19. Tag,
  20. RangePicker,
  21. DatePicker,
  22. Radio,
  23. Cascader,
  24. Upload,
  25. Tooltip,
  26. } from "antd";
  27. import UserProfile from './userProfile';
  28. import { getProvinceList } from "@/addressList";
  29. import PicModal from "./picModal"
  30. import AddPicModal from "./addPicModal";
  31. const FormItem = Form.Item;
  32. const { TabPane } = Tabs;
  33. const { TextArea } = Input;
  34. const PersonnelAll = React.createClass({
  35. loadData(pageNo) {
  36. this.state.data = [];
  37. this.setState({
  38. loading: true,
  39. });
  40. $.ajax({
  41. method: "get",
  42. dataType: "json",
  43. crossDomain: false,
  44. url: globalConfig.context + "/api/admin/personnel/selectList",
  45. data: {
  46. pageNo: pageNo || 1,
  47. pageSize: this.state.pagination.pageSize,
  48. name: this.state.nameSearch,
  49. status: this.state.statusSearch,
  50. company: this.state.departmenttList,
  51. sex: this.state.sexSearch,
  52. marriage: this.state.marriageSearch,
  53. politicalOutlook: this.state.politicalOutlookSearch,
  54. birthdayMonth: this.state.birthdayMonthSearch,
  55. promotionStart: this.state.promotionTime[0],
  56. promotionEnd: this.state.promotionTime[1],
  57. entryStart: this.state.entryTime[0],
  58. entryStart: this.state.entryTime[1],
  59. quitStart: this.state.quitTime[0],
  60. quitEnd: this.state.quitTime[1],
  61. system: this.state.systemSearch,
  62. workingYears: this.state.workingYearsSearch,
  63. education: this.state.educationSearch,
  64. contractStart: this.state.contractTime[0],
  65. contractEnd: this.state.contractTime[1],
  66. },
  67. success: function (data) {
  68. let theArr = [];
  69. if (!data.data || !data.data.list) {
  70. if (data.error && data.error.length) {
  71. message.warning(data.error[0].message);
  72. }
  73. } else {
  74. for (let i = 0; i < data.data.list.length; i++) {
  75. let thisdata = data.data.list[i];
  76. thisdata.key = thisdata.id;
  77. theArr.push(thisdata);
  78. }
  79. }
  80. this.state.pagination.current = data.data.pageNo;
  81. this.state.pagination.total = data.data.totalCount;
  82. if (data.data && data.data.list && !data.data.list.length) {
  83. this.state.pagination.current = 0;
  84. this.state.pagination.total = 0;
  85. }
  86. this.setState({
  87. dataSource: theArr,
  88. pagination: this.state.pagination,
  89. });
  90. }.bind(this),
  91. }).always(
  92. function () {
  93. this.setState({
  94. loading: false,
  95. });
  96. }.bind(this)
  97. );
  98. },
  99. getInitialState() {
  100. return {
  101. active: "1",
  102. detailFlag: false,
  103. editWelfareData: {},
  104. contractList: [],
  105. quitList: [],
  106. chooseList: [],
  107. starArr: [],
  108. starArrs: [],
  109. annexName: "",
  110. annexUrl: "",
  111. voucherUrl: [],
  112. ModalData: [],
  113. contractTime: [],
  114. contactList: [],
  115. quitTime: [],
  116. promotionList: [],
  117. promotionTime: [],
  118. entryTime: [],
  119. pic: [],
  120. previewImage: "",
  121. peoVisible: false,
  122. phoneVisible: false,
  123. isAddPeo: false,
  124. searchMore: true,
  125. stayVisible: false,
  126. assignVisible: false,
  127. releaseDate: [],
  128. residence: [],
  129. nativePlace: [],
  130. now: [],
  131. roleName: "",
  132. shouKuanDate: [],
  133. boHuivisible: false,
  134. departmentArr: [],
  135. selectedRowKeys: [],
  136. selectedRows: [],
  137. paginations: false,
  138. loading: false,
  139. pagination: {
  140. defaultCurrent: 1,
  141. defaultPageSize: 10,
  142. showQuickJumper: true,
  143. pageSize: 10,
  144. onChange: function (page) {
  145. this.loadData(page);
  146. }.bind(this),
  147. showTotal: function (total) {
  148. return "共" + total + "条数据";
  149. },
  150. },
  151. columns: [
  152. {
  153. title: "员工编号",
  154. dataIndex: "employeeId",
  155. key: "employeeId",
  156. },
  157. {
  158. title: "门禁编号",
  159. dataIndex: "doorId",
  160. key: "doorId",
  161. },
  162. {
  163. title: "名称",
  164. dataIndex: "name",
  165. key: "name",
  166. },
  167. {
  168. title: "员工状态",
  169. dataIndex: "statusName",
  170. key: "statusName",
  171. },
  172. {
  173. title: "所属系统",
  174. dataIndex: "systemName",
  175. key: "systemName",
  176. },
  177. {
  178. title: "公司名称",
  179. dataIndex: "depName",
  180. key: "depName",
  181. },
  182. {
  183. title: "职位名称",
  184. dataIndex: "jobsName",
  185. key: "jobsName",
  186. },
  187. {
  188. title: "等级名称",
  189. dataIndex: "starName",
  190. key: "starName",
  191. },
  192. {
  193. title: "级别",
  194. dataIndex: "lvlName",
  195. key: "lvlName",
  196. },
  197. {
  198. title: "入职时间",
  199. dataIndex: "entryTimes",
  200. key: "entryTimes",
  201. },
  202. {
  203. title: "转正时间",
  204. dataIndex: "promotionTimes",
  205. key: "promotionTimes",
  206. render: (text) => {
  207. let time = moment(text).valueOf();
  208. let today = Date.parse(new Date());
  209. let sevenDay = 604800000;
  210. if (time - today < sevenDay) {
  211. return (
  212. <span style={{ color: "red", fontWeight: 900 }}>{text}</span>
  213. );
  214. }
  215. return text;
  216. },
  217. },
  218. {
  219. title: "生日日期",
  220. dataIndex: "birthdays",
  221. key: "birthdays",
  222. },
  223. {
  224. title: "性别",
  225. dataIndex: "sex",
  226. key: "sex",
  227. render: (text) => {
  228. if (text == 0) {
  229. return "男";
  230. } else if (text == 1) {
  231. return "女";
  232. }
  233. },
  234. },
  235. {
  236. title: "婚姻状态",
  237. dataIndex: "marriageName",
  238. key: "marriageName",
  239. },
  240. {
  241. title: "子/女",
  242. dataIndex: "son",
  243. key: "son",
  244. render: (text, record) => {
  245. return <span>{text + "/" + record.girl}</span>;
  246. },
  247. },
  248. {
  249. title: "政治面貌",
  250. dataIndex: "politicalOutlookName",
  251. key: "politicalOutlookName",
  252. },
  253. {
  254. title: "教育经历",
  255. dataIndex: "educationName",
  256. key: "educationName",
  257. },
  258. {
  259. title: "毕业学校",
  260. dataIndex: "school",
  261. key: "school",
  262. },
  263. {
  264. title: "专业",
  265. dataIndex: "major",
  266. key: "major",
  267. },
  268. {
  269. title: "职称",
  270. dataIndex: "title",
  271. key: "title",
  272. },
  273. {
  274. title: "晋升备注",
  275. dataIndex: "promotionRemarks",
  276. key: "promotionRemarks",
  277. },
  278. {
  279. title: "晋升时间",
  280. dataIndex: "promotionTime",
  281. key: "promotionTime",
  282. },
  283. {
  284. title: "合同时间",
  285. dataIndex: "contractStart",
  286. key: "contractStart",
  287. render: (text, record) => {
  288. let end = moment(record.contractEnd).valueOf();
  289. let today = Date.parse(new Date());
  290. let sevenDay = 604800000;
  291. if (text) {
  292. if (end - today < sevenDay) {
  293. return (
  294. <span style={{ color: "red", fontWeight: 900 }}>
  295. {text + "~" + record.contractEnd}
  296. </span>
  297. );
  298. }
  299. return text + "~" + record.contractEnd;
  300. }
  301. },
  302. },
  303. {
  304. title: "手机号码",
  305. dataIndex: "mobile",
  306. key: "mobile",
  307. },
  308. {
  309. title: "电话",
  310. dataIndex: "fixedTel",
  311. key: "fixedTel",
  312. },
  313. {
  314. title: "身份证",
  315. dataIndex: "idCard",
  316. key: "idCard",
  317. },
  318. {
  319. title: "发证机构",
  320. dataIndex: "certificationAuthority",
  321. key: "certificationAuthority",
  322. },
  323. {
  324. title: "户籍地址",
  325. dataIndex: "residenceName",
  326. key: "residenceName",
  327. },
  328. {
  329. title: "籍贯",
  330. dataIndex: "nativePlaceName",
  331. key: "nativePlaceName",
  332. },
  333. {
  334. title: "现住地址",
  335. dataIndex: "nowName",
  336. key: "nowName",
  337. },
  338. {
  339. title: "紧急联系人",
  340. dataIndex: "emergencyContact",
  341. key: "emergencyContact",
  342. },
  343. {
  344. title: "紧急联系人电话",
  345. dataIndex: "emergencyMobile",
  346. key: "emergencyMobile",
  347. },
  348. {
  349. title: "离职时间",
  350. dataIndex: "quitTime",
  351. key: "quitTime",
  352. },
  353. {
  354. title: "工作年限",
  355. dataIndex: "workingYear",
  356. key: "workingYear",
  357. },
  358. {
  359. title: "年龄",
  360. dataIndex: "age",
  361. key: "age",
  362. },
  363. {
  364. title: "出生月份",
  365. dataIndex: "month",
  366. key: "month",
  367. },
  368. {
  369. title: "参保时间",
  370. dataIndex: "insuranceStartTimes",
  371. key: "insuranceStartTimes",
  372. },
  373. {
  374. title: "停保时间",
  375. dataIndex: "insuranceEndTimes",
  376. key: "insuranceEndTimes",
  377. },
  378. {
  379. title: "公积金时间",
  380. dataIndex: "fundStartTimes",
  381. key: "fundStartTimes",
  382. },
  383. {
  384. title: "停办公积金时间",
  385. dataIndex: "fundEndTimes",
  386. key: "fundEndTimes",
  387. },
  388. ],
  389. dataSource: [],
  390. resVisible: false,
  391. welfareColumns: [
  392. {
  393. title: "福利类型",
  394. dataIndex: "type",
  395. key: "type",
  396. render: (text) => {
  397. if (text == 0) {
  398. return "社保";
  399. } else if (text == 1) {
  400. return "公积金";
  401. } else if (text == 2) {
  402. return "雇主险";
  403. }
  404. },
  405. },
  406. {
  407. title: "购买状态",
  408. dataIndex: "status",
  409. key: "status",
  410. render: (text) => {
  411. if (text == 0) {
  412. return "未购买";
  413. } else if (text == 1) {
  414. return "已购买";
  415. } else if (text == 2) {
  416. return "已停止";
  417. }
  418. },
  419. },
  420. {
  421. title: "购买时间",
  422. dataIndex: "startTimes",
  423. key: "startTimes",
  424. },
  425. {
  426. title: "停缴时间",
  427. dataIndex: "endTimes",
  428. key: "endTimes",
  429. },
  430. {
  431. title: "公司名称",
  432. dataIndex: "depName",
  433. key: "depName",
  434. },
  435. {
  436. title: "备注信息",
  437. dataIndex: "welfareRemarks",
  438. key: "welfareRemarks",
  439. },
  440. ],
  441. welfareColumnsEdit: [
  442. {
  443. title: "福利类型",
  444. dataIndex: "type",
  445. key: "type",
  446. render: (text) => {
  447. if (text == 0) {
  448. return "社保";
  449. } else if (text == 1) {
  450. return "公积金";
  451. } else if (text == 2) {
  452. return "雇主险";
  453. }
  454. },
  455. },
  456. {
  457. title: "购买状态",
  458. dataIndex: "status",
  459. key: "status",
  460. render: (text) => {
  461. if (text == 0) {
  462. return "未购买";
  463. } else if (text == 1) {
  464. return "已购买";
  465. } else if (text == 2) {
  466. return "已停止";
  467. }
  468. },
  469. },
  470. {
  471. title: "购买时间",
  472. dataIndex: "startTimes",
  473. key: "startTimes",
  474. },
  475. {
  476. title: "停缴时间",
  477. dataIndex: "endTimes",
  478. key: "endTimes",
  479. },
  480. {
  481. title: "公司名称",
  482. dataIndex: "depName",
  483. key: "depName",
  484. },
  485. {
  486. title: "备注信息",
  487. dataIndex: "welfareRemarks",
  488. key: "welfareRemarks",
  489. },
  490. {
  491. title: "操作",
  492. dataIndex: "caozuo",
  493. key: "caozuo",
  494. render: (text, record) => {
  495. return (
  496. <Button
  497. type="primary"
  498. onClick={(e) => {
  499. this.welfareTable(record);
  500. }}
  501. >
  502. 修改
  503. </Button>
  504. );
  505. },
  506. },
  507. ],
  508. table: [
  509. {
  510. key: "员工编号",
  511. value: "employeeId",
  512. },
  513. {
  514. key: "姓名",
  515. value: "name",
  516. },
  517. {
  518. key: "出生日期",
  519. value: "birthdays",
  520. },
  521. {
  522. key: "出生月份",
  523. value: "month",
  524. },
  525. {
  526. key: "门禁编号",
  527. value: "doorId",
  528. },
  529. {
  530. key: "性别",
  531. value: "sex",
  532. render: (e) => {
  533. if (e == 0) {
  534. return "男";
  535. } else if (e == 1) {
  536. return "女";
  537. }
  538. },
  539. },
  540. {
  541. key: "年龄",
  542. value: "age",
  543. },
  544. {
  545. key: "民族",
  546. value: "nation",
  547. },
  548. {
  549. key: "户籍地址",
  550. value: "residenceName",
  551. },
  552. {
  553. key: "籍贯",
  554. value: "nativePlaceName",
  555. },
  556. {
  557. key: "身份证",
  558. value: "idCard",
  559. },
  560. {
  561. key: "领证机关",
  562. value: "certificationAuthority",
  563. },
  564. {
  565. key: "现住地址",
  566. value: "nowName",
  567. },
  568. {
  569. key: "婚姻状态",
  570. value: "marriageName",
  571. },
  572. {
  573. key: "子/女",
  574. value: "son",
  575. render: (e, i) => {
  576. return e + "/" + i;
  577. },
  578. },
  579. {
  580. key: "政治面貌",
  581. value: "politicalOutlookName",
  582. },
  583. ],
  584. };
  585. },
  586. componentWillMount() {
  587. let areaArr = getProvinceList();
  588. let Area = areaSelect(areaArr);
  589. let Birthplaces = Birthplace(areaArr);
  590. this.setState({
  591. Area,
  592. Birthplaces: Birthplaces,
  593. });
  594. //城市
  595. let Province = [];
  596. areaArr.map(function (item) {
  597. var id = String(item.id);
  598. Province.push(
  599. <Select.Option value={id} key={item.name}>
  600. {item.name}
  601. </Select.Option>
  602. );
  603. });
  604. this.state.Provinces = Province;
  605. this.loadData();
  606. this.departmentList();
  607. },
  608. export() {
  609. const data = {
  610. pageSize: 9999,
  611. name: this.state.nameSearch ? this.state.nameSearch : undefined,
  612. status: this.state.statusSearch ? this.state.statusSearch : undefined,
  613. company: this.state.departmenttList
  614. ? this.state.departmenttList
  615. : undefined,
  616. sex: this.state.sexSearch ? this.state.sexSearch : undefined,
  617. marriage: this.state.marriageSearch
  618. ? this.state.marriageSearch
  619. : undefined,
  620. politicalOutlook: this.state.politicalOutlookSearch
  621. ? this.state.politicalOutlookSearch
  622. : undefined,
  623. birthdayMonth: this.state.birthdayMonthSearch
  624. ? this.state.birthdayMonthSearch
  625. : undefined,
  626. promotionStart: this.state.promotionTime[0]
  627. ? this.state.promotionTime[0]
  628. : undefined,
  629. promotionEnd: this.state.promotionTime[1]
  630. ? this.state.promotionTime[1]
  631. : undefined,
  632. entryStart: this.state.entryTime[0] ? this.state.entryTime[0] : undefined,
  633. entryStart: this.state.entryTime[1] ? this.state.entryTime[1] : undefined,
  634. quitStart: this.state.quitTime[0] ? this.state.quitTime[0] : undefined,
  635. quitEnd: this.state.quitTime[1] ? this.state.quitTime[1] : undefined,
  636. system: this.state.systemSearch ? this.state.systemSearch : undefined,
  637. workingYears: this.state.workingYearsSearch
  638. ? this.state.workingYearsSearch
  639. : undefined,
  640. education: this.state.educationSearch
  641. ? this.state.educationSearch
  642. : undefined,
  643. contractStart: this.state.contractTime[0]
  644. ? this.state.contractTime[0]
  645. : undefined,
  646. contractEnd: this.state.contractTime[1]
  647. ? this.state.contractTime[1]
  648. : undefined,
  649. };
  650. for(let key in data) {
  651. if(!data[key]) {
  652. delete data[key]
  653. }
  654. }
  655. window.location.href =
  656. globalConfig.context +
  657. "/api/admin/personnel/exportPersonnelList?" +
  658. $.param(data);
  659. },
  660. departmentList() {
  661. $.ajax({
  662. method: "get",
  663. dataType: "json",
  664. crossDomain: false,
  665. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  666. data: {},
  667. success: function (data) {
  668. let thedata = data.data;
  669. let theArr = [];
  670. if (!thedata) {
  671. if (data.error && data.error.length) {
  672. message.warning(data.error[0].message);
  673. }
  674. } else {
  675. thedata.map(function (item, index) {
  676. theArr.push({
  677. key: index,
  678. name: item.name,
  679. id: item.id,
  680. });
  681. });
  682. }
  683. this.setState({
  684. departmentArr: theArr,
  685. });
  686. }.bind(this),
  687. });
  688. },
  689. welfareTable(record) {
  690. this.setState({
  691. editWelfareVisible: true,
  692. });
  693. if (record) {
  694. this.setState({
  695. editWelfareData: record,
  696. });
  697. } else {
  698. let editWelfareData = {
  699. status: undefined,
  700. id: undefined,
  701. depId: [],
  702. pdId: this.state.ModalData.id,
  703. type: undefined,
  704. welfareRemarks: undefined,
  705. endTimes: undefined,
  706. startTimes: undefined,
  707. };
  708. this.setState({
  709. editWelfareData
  710. });
  711. }
  712. },
  713. editWelfareDataOk() {
  714. this.setState({
  715. loading: true,
  716. });
  717. $.ajax({
  718. method: "post",
  719. dataType: "json",
  720. crossDomain: false,
  721. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  722. data: {
  723. startTimes:
  724. this.state.editWelfareData.status == 1 ||
  725. this.state.editWelfareData.status == 2
  726. ? this.state.editWelfareData.startTimes
  727. : "",
  728. endTimes:
  729. this.state.editWelfareData.status == 2
  730. ? this.state.editWelfareData.endTimes
  731. : "",
  732. pdId: this.state.editWelfareData.pdId,
  733. welfareRemarks:
  734. this.state.editWelfareData.status == 0
  735. ? this.state.editWelfareData.welfareRemarks
  736. : "",
  737. type: this.state.editWelfareData.type,
  738. id: this.state.editWelfareData.id,
  739. status: this.state.editWelfareData.status,
  740. depId: this.state.editWelfareData.status == 0 ? "" : this.state.editWelfareData.depId,
  741. },
  742. success: function (data) {
  743. let theArr = [];
  744. if (data.error && data.error.length) {
  745. message.warning(data.error[0].message);
  746. } else {
  747. message.success("修改成功!");
  748. this.loadData();
  749. this.tableRowClick(this.state.ModalData);
  750. this.setState({
  751. editWelfareVisible: false,
  752. });
  753. }
  754. }.bind(this),
  755. }).always(
  756. function () {
  757. this.setState({
  758. loading: false,
  759. });
  760. }.bind(this)
  761. );
  762. },
  763. getWelfareData() {
  764. this.setState({
  765. loading: true,
  766. });
  767. $.ajax({
  768. method: "post",
  769. dataType: "json",
  770. crossDomain: false,
  771. url: globalConfig.context + "/api/admin/personnel/add",
  772. data: {
  773. name: this.state.name,
  774. doorId: this.state.doorId,
  775. sex: this.state.sex,
  776. nation: this.state.nation,
  777. residenceProvince: this.state.residence[0],
  778. residenceCity: this.state.residence[1],
  779. residenceArea: this.state.residence[2],
  780. residenceAddress: this.state.residenceAddress,
  781. nativePlaceProvince: this.state.nativePlace[0],
  782. nativePlaceCity: this.state.nativePlace[1],
  783. nowProvince: this.state.now[0],
  784. nowCity: this.state.now[1],
  785. nowArea: this.state.now[2],
  786. nowAddress: this.state.nowAddress,
  787. idCard: this.state.idCard,
  788. certificationAuthority: this.state.certificationAuthority,
  789. marriage: this.state.marriage,
  790. politicalOutlook: this.state.politicalOutlook,
  791. son: this.state.son,
  792. girl: this.state.girl,
  793. birthdays: this.state.birthdays,
  794. marriage: this.state.marriage,
  795. },
  796. success: function (data) {
  797. let theArr = [];
  798. if (data.error && data.error.length) {
  799. message.warning(data.error[0].message);
  800. } else {
  801. message.success("添加成功!");
  802. this.loadData();
  803. this.addPeoCancel();
  804. }
  805. }.bind(this),
  806. }).always(
  807. function () {
  808. this.setState({
  809. loading: false,
  810. });
  811. }.bind(this)
  812. );
  813. },
  814. changeList(arr) {
  815. const newArr = [];
  816. this.state.columns.forEach((item) => {
  817. arr.forEach((val) => {
  818. if (val === item.title) {
  819. newArr.push(item);
  820. }
  821. });
  822. });
  823. this.setState({
  824. changeList: newArr,
  825. });
  826. },
  827. addPeo() {
  828. this.setState({
  829. peoVisible: true,
  830. isAddPeo: true,
  831. ModalData: '',
  832. });
  833. },
  834. addPeoCancel() {
  835. this.setState({
  836. id: undefined,
  837. peoVisible: false,
  838. isAddPeo: false,
  839. name: undefined,
  840. doorId: undefined,
  841. sex: undefined,
  842. nation: undefined,
  843. residence: [],
  844. residenceAddress: undefined,
  845. nativePlace: [],
  846. now: [],
  847. nowAddress: undefined,
  848. idCard: undefined,
  849. certificationAuthority: undefined,
  850. marriage: undefined,
  851. politicalOutlook: undefined,
  852. employeeId: undefined,
  853. son: undefined,
  854. girl: undefined,
  855. birthdays: undefined,
  856. });
  857. },
  858. verifyDoor() {
  859. this.setState({
  860. loading: true,
  861. });
  862. $.ajax({
  863. method: "get",
  864. dataType: "json",
  865. crossDomain: false,
  866. url: globalConfig.context + "/api/admin/personnel/checkDoorId",
  867. data: {
  868. doorId: this.state.doorId,
  869. id: this.state.id,
  870. },
  871. success: function (data) {
  872. if (data.error && data.error.length) {
  873. message.warning(data.error[0].message);
  874. } else {
  875. message.success("此编号未被占用");
  876. }
  877. }.bind(this),
  878. }).always(
  879. function () {
  880. this.setState({
  881. loading: false,
  882. });
  883. }.bind(this)
  884. );
  885. },
  886. verifyId() {
  887. this.setState({
  888. loading: true,
  889. });
  890. $.ajax({
  891. method: "get",
  892. dataType: "json",
  893. crossDomain: false,
  894. url: globalConfig.context + "/api/admin/personnel/checkEmployeeId",
  895. data: {
  896. employeeId: this.state.employeeId,
  897. id: this.state.id
  898. },
  899. success: function (data) {
  900. if (data.error && data.error.length) {
  901. message.warning(data.error[0].message);
  902. } else {
  903. message.success("此编号未被占用");
  904. }
  905. }.bind(this),
  906. }).always(
  907. function () {
  908. this.setState({
  909. loading: false,
  910. });
  911. }.bind(this)
  912. );
  913. },
  914. addOk() {
  915. this.setState({
  916. loading: true,
  917. });
  918. $.ajax({
  919. method: "post",
  920. dataType: "json",
  921. crossDomain: false,
  922. url: globalConfig.context + "/api/admin/personnel/add",
  923. data: {
  924. name: this.state.name,
  925. doorId: this.state.doorId,
  926. sex: this.state.sex,
  927. nation: this.state.nation,
  928. residenceProvince: this.state.residence[0],
  929. residenceCity: this.state.residence[1],
  930. residenceArea: this.state.residence[2],
  931. residenceAddress: this.state.residenceAddress,
  932. nativePlaceProvince: this.state.nativePlace[0],
  933. nativePlaceCity: this.state.nativePlace[1],
  934. nowProvince: this.state.now[0],
  935. nowCity: this.state.now[1],
  936. nowArea: this.state.now[2],
  937. nowAddress: this.state.nowAddress,
  938. idCard: this.state.idCard,
  939. certificationAuthority: this.state.certificationAuthority,
  940. marriage: this.state.marriage,
  941. politicalOutlook: this.state.politicalOutlook,
  942. son: this.state.son,
  943. girl: this.state.girl,
  944. birthdays: this.state.birthdays,
  945. marriage: this.state.marriage,
  946. employeeId: this.state.employeeId,
  947. },
  948. success: function (data) {
  949. let theArr = [];
  950. if (data.error && data.error.length) {
  951. message.warning(data.error[0].message);
  952. } else {
  953. message.success("添加成功!");
  954. this.loadData();
  955. this.addPeoCancel();
  956. }
  957. }.bind(this),
  958. }).always(
  959. function () {
  960. this.setState({
  961. loading: false,
  962. });
  963. }.bind(this)
  964. );
  965. },
  966. editOk() {
  967. this.setState({
  968. loading: true,
  969. });
  970. $.ajax({
  971. method: "post",
  972. dataType: "json",
  973. crossDomain: false,
  974. url: globalConfig.context + "/api/admin/personnel/update",
  975. data: {
  976. id: this.state.id,
  977. name: this.state.name,
  978. doorId: this.state.doorId,
  979. sex: this.state.sex,
  980. nation: this.state.nation,
  981. residenceProvince: this.state.residence[0],
  982. residenceCity: this.state.residence[1],
  983. residenceArea: this.state.residence[2],
  984. residenceAddress: this.state.residenceAddress,
  985. nativePlaceProvince: this.state.nativePlace[0],
  986. nativePlaceCity: this.state.nativePlace[1],
  987. nowProvince: this.state.now[0],
  988. nowCity: this.state.now[1],
  989. nowArea: this.state.now[2],
  990. nowAddress: this.state.nowAddress,
  991. idCard: this.state.idCard,
  992. certificationAuthority: this.state.certificationAuthority,
  993. marriage: this.state.marriage,
  994. politicalOutlook: this.state.politicalOutlook,
  995. son: this.state.son,
  996. girl: this.state.girl,
  997. birthdays: this.state.birthdays,
  998. employeeId: this.state.employeeId,
  999. },
  1000. success: function (data) {
  1001. let theArr = [];
  1002. if (data.error && data.error.length) {
  1003. message.warning(data.error[0].message);
  1004. } else {
  1005. message.success("修改成功!");
  1006. this.loadData();
  1007. this.tableRowClick(this.state.ModalData);
  1008. this.addPeoCancel();
  1009. }
  1010. }.bind(this),
  1011. }).always(
  1012. function () {
  1013. this.setState({
  1014. loading: false,
  1015. });
  1016. }.bind(this)
  1017. );
  1018. },
  1019. editPeo() {
  1020. this.setState({
  1021. peoVisible: true,
  1022. isAddPeo: false,
  1023. });
  1024. },
  1025. stayModal(id) {
  1026. this.setState({
  1027. stayVisible: true,
  1028. });
  1029. this.setState({
  1030. loading: true,
  1031. });
  1032. $.ajax({
  1033. method: "get",
  1034. dataType: "json",
  1035. crossDomain: false,
  1036. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1037. data: {
  1038. id: id,
  1039. },
  1040. success: function (data) {
  1041. let res = data.data;
  1042. let theArr = [];
  1043. if (data.error && data.error.length) {
  1044. message.warning(data.error[0].message);
  1045. } else {
  1046. this.setState({
  1047. id: res.id,
  1048. status: res.status + "",
  1049. system: res.system + "",
  1050. jobNature: res.jobNature,
  1051. jobNatureRemarks: res.jobNatureRemarks,
  1052. age: res.age,
  1053. entryTimes: res.entryTimes,
  1054. promotionTimes: res.promotionTimes,
  1055. company: res.company,
  1056. lvl: res.lvl ? res.lvl + "" : [],
  1057. jobs: res.jobs ? res.jobs + "" : [],
  1058. star: res.star ? res.star + "" : [],
  1059. allowance: res.allowance,
  1060. });
  1061. this.getList();
  1062. }
  1063. }.bind(this),
  1064. }).always(
  1065. function () {
  1066. this.setState({
  1067. loading: false,
  1068. });
  1069. }.bind(this)
  1070. );
  1071. },
  1072. stayCancel() {
  1073. this.setState({
  1074. stayVisible: false,
  1075. });
  1076. },
  1077. editStay() {
  1078. if (this.state.star == "" || this.state.star == undefined) {
  1079. message.warning("请选择星级");
  1080. return;
  1081. }
  1082. this.setState({
  1083. loading: true,
  1084. });
  1085. $.ajax({
  1086. method: "post",
  1087. dataType: "json",
  1088. crossDomain: false,
  1089. url: globalConfig.context + "/api/admin/personnel/update",
  1090. data: {
  1091. id: this.state.id,
  1092. status: this.state.status,
  1093. system: this.state.system,
  1094. jobNature: this.state.jobNature,
  1095. jobNatureRemarks: this.state.jobNatureRemarks,
  1096. entryTimes: this.state.entryTimes,
  1097. promotionTimes: this.state.promotionTimes,
  1098. company: this.state.company,
  1099. lvl: this.state.lvl,
  1100. jobs: this.state.jobs,
  1101. star: this.state.star,
  1102. allowance: this.state.allowance,
  1103. },
  1104. success: function (data) {
  1105. let res = data.data;
  1106. let theArr = [];
  1107. if (data.error && data.error.length) {
  1108. message.warning(data.error[0].message);
  1109. } else {
  1110. this.setState({
  1111. stayVisible: false,
  1112. });
  1113. this.tableRowClick(this.state.ModalData);
  1114. message.success("提交成功");
  1115. }
  1116. }.bind(this),
  1117. }).always(
  1118. function () {
  1119. this.setState({
  1120. loading: false,
  1121. });
  1122. }.bind(this)
  1123. );
  1124. },
  1125. phoneModal() {
  1126. let obj = [
  1127. {
  1128. id: undefined,
  1129. pdid: this.state.ModalData.id,
  1130. emergencyContact: "",
  1131. emergencyMobile: "",
  1132. },
  1133. {
  1134. id: undefined,
  1135. pdid: this.state.ModalData.id,
  1136. emergencyContact: "",
  1137. emergencyMobile: "",
  1138. },
  1139. {
  1140. id: undefined,
  1141. pdid: this.state.ModalData.id,
  1142. emergencyContact: "",
  1143. emergencyMobile: "",
  1144. },
  1145. ];
  1146. this.setState({
  1147. phoneVisible: true,
  1148. id: this.state.ModalData.id,
  1149. mobile: this.state.ModalData.mobile,
  1150. fixedTel: this.state.ModalData.fixedTel,
  1151. contactList: this.state.ModalData.contactList.length
  1152. ? JSON.parse(JSON.stringify(this.state.ModalData.contactList))
  1153. : obj,
  1154. });
  1155. },
  1156. phoneCancel() {
  1157. this.setState({
  1158. phoneVisible: false,
  1159. });
  1160. },
  1161. editPhone() {
  1162. this.setState({
  1163. loading: true,
  1164. });
  1165. $.ajax({
  1166. method: "post",
  1167. dataType: "json",
  1168. crossDomain: false,
  1169. url: globalConfig.context + "/api/admin/personnel/updateContact",
  1170. data: {
  1171. id: this.state.id,
  1172. mobile: this.state.mobile,
  1173. fixedTel: this.state.fixedTel,
  1174. contactList: JSON.stringify(this.state.contactList),
  1175. },
  1176. success: function (data) {
  1177. let theArr = [];
  1178. if (data.error && data.error.length) {
  1179. message.warning(data.error[0].message);
  1180. } else {
  1181. this.loadData();
  1182. this.phoneCancel();
  1183. this.tableRowClick(this.state.ModalData);
  1184. message.success("修改成功");
  1185. }
  1186. }.bind(this),
  1187. }).always(
  1188. function () {
  1189. this.setState({
  1190. loading: false,
  1191. });
  1192. }.bind(this)
  1193. );
  1194. },
  1195. entryModal() {
  1196. this.setState({
  1197. entryVisible: true,
  1198. });
  1199. this.setState({
  1200. loading: true,
  1201. });
  1202. $.ajax({
  1203. method: "get",
  1204. dataType: "json",
  1205. crossDomain: false,
  1206. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1207. data: {
  1208. id: this.state.ModalData.id,
  1209. },
  1210. success: function (data) {
  1211. let theArr = [];
  1212. if (data.error && data.error.length) {
  1213. message.warning(data.error[0].message);
  1214. } else {
  1215. this.setState({
  1216. id: data.data.personnelEntry ? data.data.personnelEntry.id : "",
  1217. school: data.data.personnelEntry
  1218. ? data.data.personnelEntry.school
  1219. : "",
  1220. education: data.data.personnelEntry
  1221. ? data.data.personnelEntry.education
  1222. : "",
  1223. major: data.data.personnelEntry
  1224. ? data.data.personnelEntry.major
  1225. : "",
  1226. title: data.data.personnelEntry
  1227. ? data.data.personnelEntry.title
  1228. : "",
  1229. entryRemarks: data.data.personnelEntry
  1230. ? data.data.personnelEntry.entryRemarks
  1231. : "",
  1232. annexUrl: data.data.personnelEntry
  1233. ? data.data.personnelEntry.annexUrl
  1234. ? data.data.personnelEntry.annexUrl
  1235. : ""
  1236. : "",
  1237. annexName: data.data.personnelEntry
  1238. ? data.data.personnelEntry.annexName
  1239. ? data.data.personnelEntry.annexName
  1240. : ""
  1241. : "",
  1242. });
  1243. // }
  1244. }
  1245. }.bind(this),
  1246. }).always(
  1247. function () {
  1248. this.setState({
  1249. loading: false,
  1250. });
  1251. }.bind(this)
  1252. );
  1253. },
  1254. entryCancel() {
  1255. this.tableRowClick(this.state.ModalData);
  1256. this.setState({
  1257. entryVisible: false,
  1258. });
  1259. },
  1260. cancel() {
  1261. this.setState({
  1262. visible: false,
  1263. detailFlag: false,
  1264. active: "1",
  1265. });
  1266. },
  1267. tableRowClick(record) {
  1268. this.setState({
  1269. visible: true,
  1270. id: record.id,
  1271. aid: record.aid,
  1272. });
  1273. this.setState({
  1274. loading: true,
  1275. });
  1276. $.ajax({
  1277. method: "get",
  1278. dataType: "json",
  1279. crossDomain: false,
  1280. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1281. data: {
  1282. id: record.id,
  1283. },
  1284. success: function (data) {
  1285. let theArr = [];
  1286. if (data.error && data.error.length) {
  1287. message.warning(data.error[0].message);
  1288. } else {
  1289. this.setState({
  1290. ModalData: data.data,
  1291. });
  1292. }
  1293. }.bind(this),
  1294. }).always(
  1295. function () {
  1296. this.setState({
  1297. loading: false,
  1298. });
  1299. }.bind(this)
  1300. );
  1301. },
  1302. search() {
  1303. this.loadData();
  1304. },
  1305. addPic() {
  1306. this.setState({
  1307. addPicModal: true,
  1308. });
  1309. },
  1310. addPicModalCancel() {
  1311. this.setState({
  1312. addPicModal: false,
  1313. });
  1314. },
  1315. getVoucherUrl(e) {
  1316. this.setState({
  1317. voucherUrl: e,
  1318. });
  1319. },
  1320. add() {
  1321. if (this.state.entryVisible) {
  1322. return this.addRuzhi;
  1323. } else if (this.state.upgradeVisible) {
  1324. return this.addJinsheng;
  1325. } else if (this.state.contractVisible) {
  1326. return this.addContract;
  1327. } else if (this.state.chooseVisible) {
  1328. return this.addChoose;
  1329. } else if (this.state.quitVisible) {
  1330. return this.addQuit;
  1331. } else if (this.state.welfareVisible) {
  1332. return this.addWelfare;
  1333. }
  1334. },
  1335. addRuzhi(e, i) {
  1336. this.setState({
  1337. addPicModal: false,
  1338. });
  1339. if (this.state.annexUrl.length > 0) {
  1340. this.state.annexUrl += "," + e;
  1341. this.state.annexName += "," + i;
  1342. } else {
  1343. this.state.annexUrl += e;
  1344. this.state.annexName += i;
  1345. }
  1346. this.setState({
  1347. annexUrl: this.state.annexUrl,
  1348. annexName: this.state.annexName,
  1349. });
  1350. },
  1351. addJinsheng(e, i) {
  1352. this.setState({
  1353. addPicModal: false,
  1354. });
  1355. if (
  1356. this.state.promotionList.annexUrl &&
  1357. this.state.promotionList.annexUrl.length > 0
  1358. ) {
  1359. this.state.promotionList.annexUrl += "," + e;
  1360. this.state.promotionList.annexName += "," + i;
  1361. } else {
  1362. this.state.promotionList.annexUrl = e;
  1363. this.state.promotionList.annexName = i;
  1364. }
  1365. this.setState({
  1366. promotionList: this.state.promotionList,
  1367. });
  1368. },
  1369. addContract(e, i) {
  1370. this.setState({
  1371. addPicModal: false,
  1372. });
  1373. if (
  1374. this.state.contractList.annexUrl &&
  1375. this.state.contractList.annexUrl.length > 0
  1376. ) {
  1377. this.state.contractList.annexUrl += "," + e;
  1378. this.state.contractList.annexName += "," + i;
  1379. } else {
  1380. this.state.contractList.annexUrl = e;
  1381. this.state.contractList.annexName = i;
  1382. }
  1383. this.setState({
  1384. contractList: this.state.contractList,
  1385. });
  1386. },
  1387. addChoose(e, i) {
  1388. this.setState({
  1389. addPicModal: false,
  1390. });
  1391. if (
  1392. this.state.chooseList.annexUrl &&
  1393. this.state.chooseList.annexUrl.length > 0
  1394. ) {
  1395. this.state.chooseList.annexUrl += "," + e;
  1396. this.state.chooseList.annexName += "," + i;
  1397. } else {
  1398. this.state.chooseList.annexUrl = e;
  1399. this.state.chooseList.annexName = i;
  1400. }
  1401. this.setState({
  1402. chooseList: this.state.chooseList,
  1403. });
  1404. },
  1405. addQuit(e, i) {
  1406. this.setState({
  1407. addPicModal: false,
  1408. });
  1409. if (
  1410. this.state.quitList.annexUrl &&
  1411. this.state.quitList.annexUrl.length > 0
  1412. ) {
  1413. this.state.quitList.annexUrl += "," + e;
  1414. this.state.quitList.annexName += "," + i;
  1415. } else {
  1416. this.state.quitList.annexUrl = e;
  1417. this.state.quitList.annexName = i;
  1418. }
  1419. this.setState({
  1420. quitList: this.state.quitList,
  1421. });
  1422. },
  1423. addWelfare(e, i) {
  1424. this.setState({
  1425. addPicModal: false,
  1426. });
  1427. if (
  1428. this.state.ModalData.welfareAnnexUrl &&
  1429. this.state.ModalData.welfareAnnexUrl.length > 0
  1430. ) {
  1431. this.state.ModalData.welfareAnnexUrl += "," + e;
  1432. this.state.ModalData.welfareAnnexName += "," + i;
  1433. } else {
  1434. this.state.ModalData.welfareAnnexUrl = e;
  1435. this.state.ModalData.welfareAnnexName = i;
  1436. }
  1437. this.setState({
  1438. ModalData: this.state.ModalData,
  1439. });
  1440. },
  1441. reset() {
  1442. this.state.nameSearch = undefined;
  1443. this.state.statusSearch = undefined;
  1444. this.state.departmenttList = undefined;
  1445. this.state.sexSearch = undefined;
  1446. this.state.marriageSearch = undefined;
  1447. this.state.politicalOutlookSearch = undefined;
  1448. this.state.birthdayMonthSearch = undefined;
  1449. this.state.systemSearch = undefined;
  1450. this.state.workingYearsSearch = undefined;
  1451. this.state.educationSearch = undefined;
  1452. this.state.promotionTime = [];
  1453. this.state.entryTime = [];
  1454. this.state.quitTime = [];
  1455. this.state.contractTime = [];
  1456. this.loadData();
  1457. },
  1458. peoStatus(e) {
  1459. if (e == 0) {
  1460. return "在职(试用期)";
  1461. } else if (e == 1) {
  1462. return "在职(正式工)";
  1463. } else if (e == 2) {
  1464. return "离职";
  1465. }
  1466. },
  1467. jobStatus(e, i) {
  1468. if (e == 0) {
  1469. return "全职";
  1470. } else if (e == 1) {
  1471. return "兼职";
  1472. } else if (e == 2) {
  1473. return i;
  1474. }
  1475. },
  1476. educationStatus(e) {
  1477. if (e == 0) {
  1478. return "高中/中专";
  1479. } else if (e == 1) {
  1480. return "专科/高职";
  1481. } else if (e == 2) {
  1482. return "本科";
  1483. } else if (e == 3) {
  1484. return "研究生";
  1485. } else if (e == 5) {
  1486. return "博士";
  1487. }
  1488. },
  1489. picToArr(e) {
  1490. if (!e) return [];
  1491. let arr = e.split(",");
  1492. return arr;
  1493. },
  1494. ruzhiRemove(e) {
  1495. let url = e.file.response.data;
  1496. let arr = this.state.annexUrl.split(",");
  1497. let arrName = this.state.annexName.split(",");
  1498. let num = "";
  1499. arr.forEach((item, index) => {
  1500. if (item == url) {
  1501. arr.splice(index, 1);
  1502. num = index;
  1503. }
  1504. });
  1505. arrName.splice(num, 1);
  1506. this.setState({
  1507. annexUrl: arr.join(","),
  1508. annexName: arrName.join(","),
  1509. });
  1510. },
  1511. jinshengRemove(e) {
  1512. let url = e.file.response.data;
  1513. let arr = this.state.promotionList.annexUrl.split(",");
  1514. let arrName = this.state.promotionList.annexName.split(",");
  1515. let num = "";
  1516. arr.forEach((item, index) => {
  1517. if (item == url) {
  1518. arr.splice(index, 1);
  1519. num = index;
  1520. }
  1521. });
  1522. arrName.splice(num, 1);
  1523. this.state.promotionList.annexUrl = arr.join(",");
  1524. this.state.promotionList.annexName = arrName.join(",");
  1525. this.setState({
  1526. promotionList: this.state.promotionList,
  1527. });
  1528. },
  1529. contractRemove(e) {
  1530. let url = e.file.response.data;
  1531. let arr = this.state.contractList.annexUrl.split(",");
  1532. let arrName = this.state.contractList.annexName.split(",");
  1533. let num = "";
  1534. arr.forEach((item, index) => {
  1535. if (item == url) {
  1536. arr.splice(index, 1);
  1537. num = index;
  1538. }
  1539. });
  1540. arrName.splice(num, 1);
  1541. this.state.contractList.annexUrl = arr.join(",");
  1542. this.state.contractList.annexName = arrName.join(",");
  1543. this.setState({
  1544. contractList: this.state.contractList,
  1545. });
  1546. },
  1547. chooseRemove(e) {
  1548. let url = e.file.response.data;
  1549. let arr = this.state.chooseList.annexUrl.split(",");
  1550. let arrName = this.state.chooseList.annexName.split(",");
  1551. let num = "";
  1552. arr.forEach((item, index) => {
  1553. if (item == url) {
  1554. arr.splice(index, 1);
  1555. num = index;
  1556. }
  1557. });
  1558. arrName.splice(num, 1);
  1559. this.state.chooseList.annexUrl = arr.join(",");
  1560. this.state.chooseList.annexName = arrName.join(",");
  1561. this.setState({
  1562. chooseList: this.state.chooseList,
  1563. });
  1564. },
  1565. quitRemove(e) {
  1566. let url = e.file.response.data;
  1567. let arr = this.state.quitList.annexUrl.split(",");
  1568. let arrName = this.state.quitList.annexName.split(",");
  1569. let num = "";
  1570. arr.forEach((item, index) => {
  1571. if (item == url) {
  1572. arr.splice(index, 1);
  1573. num = index;
  1574. }
  1575. });
  1576. arrName.splice(num, 1);
  1577. this.state.quitList.annexUrl = arr.join(",");
  1578. this.state.quitList.annexName = arrName.join(",");
  1579. this.setState({
  1580. quitList: this.state.quitList,
  1581. });
  1582. },
  1583. welfareRemove(e) {
  1584. let url = e.file.response.data;
  1585. let arr = this.state.ModalData.welfareAnnexUrl.split(",");
  1586. let arrName = this.state.ModalData.welfareAnnexName.split(",");
  1587. let num = "";
  1588. arr.forEach((item, index) => {
  1589. if (item == url) {
  1590. arr.splice(index, 1);
  1591. num = index;
  1592. }
  1593. });
  1594. arrName.splice(num, 1);
  1595. this.state.ModalData.welfareAnnexUrl = arr.join(",");
  1596. this.state.ModalData.welfareAnnexName = arrName.join(",");
  1597. this.setState({
  1598. ModalData: this.state.ModalData,
  1599. });
  1600. },
  1601. getList(jobs) {
  1602. this.setState({
  1603. loading: true,
  1604. });
  1605. $.ajax({
  1606. method: "get",
  1607. dataType: "json",
  1608. crossDomain: false,
  1609. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1610. data: {},
  1611. success: function (data) {
  1612. let theArr = [];
  1613. if (data.error && data.error.length) {
  1614. message.warning(data.error[0].message);
  1615. } else {
  1616. let arr = data.data;
  1617. let starArr = [];
  1618. arr.forEach((item, index) => {
  1619. if(jobs && item.jobs == jobs) {
  1620. let obj = {
  1621. star: item.lvl + "",
  1622. starName: item.lvlName,
  1623. };
  1624. starArr.push(obj);
  1625. return
  1626. }else if (!jobs && item.jobs == this.state.jobs) {
  1627. let obj = {
  1628. star: item.lvl + "",
  1629. starName: item.lvlName,
  1630. };
  1631. starArr.push(obj);
  1632. }
  1633. });
  1634. this.setState({
  1635. starArr,
  1636. });
  1637. }
  1638. }.bind(this),
  1639. }).always(
  1640. function () {
  1641. this.setState({
  1642. loading: false,
  1643. });
  1644. }.bind(this)
  1645. );
  1646. },
  1647. getLists(jobs) {
  1648. this.setState({
  1649. loading: true,
  1650. });
  1651. $.ajax({
  1652. method: "get",
  1653. dataType: "json",
  1654. crossDomain: false,
  1655. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1656. data: {},
  1657. success: function (data) {
  1658. let theArr = [];
  1659. if (data.error && data.error.length) {
  1660. message.warning(data.error[0].message);
  1661. } else {
  1662. let arr = data.data;
  1663. let starArrs = [];
  1664. arr.forEach((item, index) => {
  1665. if (jobs && item.jobs == jobs) {
  1666. let obj = {
  1667. star: item.lvl + "",
  1668. starName: item.lvlName,
  1669. };
  1670. starArrs.push(obj);
  1671. return;
  1672. }
  1673. if (item.jobs == this.state.jobss) {
  1674. let obj = {
  1675. star: item.lvl + "",
  1676. starName: item.lvlName,
  1677. };
  1678. starArrs.push(obj);
  1679. }
  1680. });
  1681. this.setState({
  1682. starArrs,
  1683. });
  1684. }
  1685. }.bind(this),
  1686. }).always(
  1687. function () {
  1688. this.setState({
  1689. loading: false,
  1690. });
  1691. }.bind(this)
  1692. );
  1693. },
  1694. editRuzi() {
  1695. this.setState({
  1696. loading: true,
  1697. });
  1698. $.ajax({
  1699. method: "post",
  1700. dataType: "json",
  1701. crossDomain: false,
  1702. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  1703. data: {
  1704. id: this.state.ModalData.id,
  1705. school: this.state.school,
  1706. education: this.state.education,
  1707. major: this.state.major,
  1708. title: this.state.title,
  1709. entryRemarks: this.state.entryRemarks,
  1710. annexUrl: this.state.annexUrl,
  1711. annexName: this.state.annexName,
  1712. },
  1713. success: function (data) {
  1714. let theArr = [];
  1715. if (data.error && data.error.length) {
  1716. message.warning(data.error[0].message);
  1717. } else {
  1718. this.loadData();
  1719. this.entryCancel();
  1720. this.tableRowClick(this.state.ModalData);
  1721. message.success("修改成功");
  1722. }
  1723. }.bind(this),
  1724. }).always(
  1725. function () {
  1726. this.setState({
  1727. loading: false,
  1728. });
  1729. }.bind(this)
  1730. );
  1731. },
  1732. upgradeCancel() {
  1733. this.tableRowClick(this.state.ModalData);
  1734. this.setState({
  1735. upgradeVisible: false,
  1736. });
  1737. },
  1738. contractCancel() {
  1739. this.tableRowClick(this.state.ModalData);
  1740. this.setState({
  1741. contractVisible: false,
  1742. });
  1743. },
  1744. chooseCancel() {
  1745. this.tableRowClick(this.state.ModalData);
  1746. this.setState({
  1747. chooseVisible: false,
  1748. });
  1749. },
  1750. quitCancel() {
  1751. this.tableRowClick(this.state.ModalData);
  1752. this.setState({
  1753. quitVisible: false,
  1754. });
  1755. },
  1756. welfareCancel() {
  1757. this.tableRowClick(this.state.ModalData);
  1758. this.setState({
  1759. welfareVisible: false,
  1760. });
  1761. },
  1762. upgradeModal(flag, index) {
  1763. this.setState({
  1764. upgradeVisible: true,
  1765. });
  1766. let obj = {
  1767. id: undefined,
  1768. pdId: this.state.ModalData.id,
  1769. oldJobs: [],
  1770. oldLvl: [],
  1771. newJobs: [],
  1772. newLvl: [],
  1773. promotionTimes: undefined,
  1774. promotionRemarks: undefined,
  1775. annexUrl: "",
  1776. annexName: "",
  1777. };
  1778. this.setState({
  1779. promotionList: flag ? obj : this.state.ModalData.promotionList[index],
  1780. });
  1781. this.getList(flag ? undefined : this.state.ModalData.promotionList[index].oldJobs);
  1782. this.getLists(flag ? undefined : this.state.ModalData.promotionList[index].newJobs);
  1783. },
  1784. contractModal(flag, index) {
  1785. this.setState({
  1786. contractVisible: true,
  1787. });
  1788. let obj = {
  1789. id: undefined,
  1790. pdId: this.state.ModalData.id,
  1791. startTimes: undefined,
  1792. endTimes: undefined,
  1793. contractRemarks: undefined,
  1794. annexUrl: "",
  1795. annexName: "",
  1796. };
  1797. this.setState({
  1798. contractList: flag ? obj : this.state.ModalData.contractList[index],
  1799. });
  1800. },
  1801. chooseModal(flag, index) {
  1802. this.setState({
  1803. chooseVisible: true,
  1804. });
  1805. let obj = {
  1806. id: undefined,
  1807. pdId: this.state.ModalData.id,
  1808. chooseStatus: undefined,
  1809. effectTimes: undefined,
  1810. chooseRemarks: undefined,
  1811. annexUrl: "",
  1812. annexName: "",
  1813. };
  1814. this.setState({
  1815. chooseList: flag ? obj : this.state.ModalData.chooseList[index],
  1816. });
  1817. },
  1818. quitModal(flag, index) {
  1819. this.setState({
  1820. quitVisible: true,
  1821. });
  1822. let obj = {
  1823. id: undefined,
  1824. pdId: this.state.ModalData.id,
  1825. effectTimes: undefined,
  1826. quitRemarks: undefined,
  1827. annexUrl: "",
  1828. annexName: "",
  1829. };
  1830. this.setState({
  1831. quitList: flag ? obj : this.state.ModalData.quitList[index],
  1832. });
  1833. },
  1834. welfareModal() {
  1835. this.setState({
  1836. welfareVisible: true,
  1837. });
  1838. },
  1839. editUpgrade() {
  1840. if(!this.state.promotionList.oldLvl.length || !this.state.promotionList.newLvl.length) {
  1841. message.warning("请选择星级")
  1842. return
  1843. }
  1844. this.setState({
  1845. loading: true,
  1846. });
  1847. $.ajax({
  1848. method: "post",
  1849. dataType: "json",
  1850. crossDomain: false,
  1851. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1852. data: {
  1853. id: this.state.promotionList.id,
  1854. pdId: this.state.promotionList.pdId,
  1855. oldJobs: this.state.promotionList.oldJobs,
  1856. oldLvl: this.state.promotionList.oldLvl,
  1857. newJobs: this.state.promotionList.newJobs,
  1858. newLvl: this.state.promotionList.newLvl,
  1859. promotionTimes: this.state.promotionList.promotionTimes,
  1860. promotionRemarks: this.state.promotionList.promotionRemarks,
  1861. annexUrl: this.state.promotionList.annexUrl,
  1862. annexName: this.state.promotionList.annexName,
  1863. },
  1864. success: function (data) {
  1865. let theArr = [];
  1866. if (data.error && data.error.length) {
  1867. message.warning(data.error[0].message);
  1868. } else {
  1869. this.loadData();
  1870. this.upgradeCancel();
  1871. message.success("修改成功");
  1872. }
  1873. }.bind(this),
  1874. }).always(
  1875. function () {
  1876. this.setState({
  1877. loading: false,
  1878. });
  1879. }.bind(this)
  1880. );
  1881. },
  1882. editContract() {
  1883. this.setState({
  1884. loading: true,
  1885. });
  1886. $.ajax({
  1887. method: "post",
  1888. dataType: "json",
  1889. crossDomain: false,
  1890. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1891. data: {
  1892. id: this.state.contractList.id,
  1893. pdId: this.state.contractList.pdId,
  1894. startTimes: this.state.contractList.startTimes,
  1895. endTimes: this.state.contractList.endTimes,
  1896. contractRemarks: this.state.contractList.contractRemarks,
  1897. annexUrl: this.state.contractList.annexUrl,
  1898. annexName: this.state.contractList.annexName,
  1899. },
  1900. success: function (data) {
  1901. let theArr = [];
  1902. if (data.error && data.error.length) {
  1903. message.warning(data.error[0].message);
  1904. } else {
  1905. this.loadData();
  1906. this.contractCancel();
  1907. message.success("修改成功");
  1908. }
  1909. }.bind(this),
  1910. }).always(
  1911. function () {
  1912. this.setState({
  1913. loading: false,
  1914. });
  1915. }.bind(this)
  1916. );
  1917. },
  1918. editChoose() {
  1919. this.setState({
  1920. loading: true,
  1921. });
  1922. $.ajax({
  1923. method: "post",
  1924. dataType: "json",
  1925. crossDomain: false,
  1926. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1927. data: {
  1928. id: this.state.chooseList.id,
  1929. pdId: this.state.chooseList.pdId,
  1930. chooseStatus: this.state.chooseList.chooseStatus,
  1931. effectTimes: this.state.chooseList.effectTimes,
  1932. chooseRemarks: this.state.chooseList.chooseRemarks,
  1933. annexUrl: this.state.chooseList.annexUrl,
  1934. annexName: this.state.chooseList.annexName,
  1935. },
  1936. success: function (data) {
  1937. let theArr = [];
  1938. if (data.error && data.error.length) {
  1939. message.warning(data.error[0].message);
  1940. } else {
  1941. this.loadData();
  1942. this.chooseCancel();
  1943. message.success("修改成功");
  1944. }
  1945. }.bind(this),
  1946. }).always(
  1947. function () {
  1948. this.setState({
  1949. loading: false,
  1950. });
  1951. }.bind(this)
  1952. );
  1953. },
  1954. editQuit() {
  1955. this.setState({
  1956. loading: true,
  1957. });
  1958. $.ajax({
  1959. method: "post",
  1960. dataType: "json",
  1961. crossDomain: false,
  1962. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1963. data: {
  1964. id: this.state.quitList.id,
  1965. pdId: this.state.quitList.pdId,
  1966. effectTimes: this.state.quitList.effectTimes,
  1967. quitRemarks: this.state.quitList.quitRemarks,
  1968. annexUrl: this.state.quitList.annexUrl,
  1969. annexName: this.state.quitList.annexName,
  1970. },
  1971. success: function (data) {
  1972. let theArr = [];
  1973. if (data.error && data.error.length) {
  1974. message.warning(data.error[0].message);
  1975. } else {
  1976. this.loadData();
  1977. this.quitCancel();
  1978. message.success("修改成功");
  1979. }
  1980. }.bind(this),
  1981. }).always(
  1982. function () {
  1983. this.setState({
  1984. loading: false,
  1985. });
  1986. }.bind(this)
  1987. );
  1988. },
  1989. editWelfare() {
  1990. this.setState({
  1991. loading: true,
  1992. });
  1993. $.ajax({
  1994. method: "post",
  1995. dataType: "json",
  1996. crossDomain: false,
  1997. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  1998. data: {
  1999. pdId: this.state.ModalData.id,
  2000. annexUrl: this.state.ModalData.welfareAnnexUrl,
  2001. annexName: this.state.ModalData.welfareAnnexName,
  2002. remarks: this.state.ModalData.welfareRemarks,
  2003. },
  2004. success: function (data) {
  2005. let theArr = [];
  2006. if (data.error && data.error.length) {
  2007. message.warning(data.error[0].message);
  2008. } else {
  2009. this.loadData();
  2010. this.welfareCancel();
  2011. message.success("修改成功");
  2012. }
  2013. }.bind(this),
  2014. }).always(
  2015. function () {
  2016. this.setState({
  2017. loading: false,
  2018. });
  2019. }.bind(this)
  2020. );
  2021. },
  2022. render() {
  2023. const rowSelection = {
  2024. selectedRowKeys: this.state.selectedRowKeys,
  2025. onChange: (selectedRowKeys, selectedRows) => {
  2026. this.setState({
  2027. selectedRows: selectedRows.slice(-1),
  2028. selectedRowKeys: selectedRowKeys.slice(-1),
  2029. });
  2030. },
  2031. };
  2032. const { RangePicker } = DatePicker;
  2033. const formItemLayout = {
  2034. labelCol: { span: 6 },
  2035. wrapperCol: { span: 16 },
  2036. };
  2037. let departmentArr = this.state.departmentArr || [];
  2038. return (
  2039. <div className="user-content">
  2040. <div className="content-title" style={{ marginBottom: 10 }}>
  2041. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  2042. </div>
  2043. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2044. <TabPane tab="搜索" key="2">
  2045. <div className="user-search" style={{ marginLeft: 10 }}>
  2046. <Input
  2047. placeholder="姓名"
  2048. style={{ width: 120 }}
  2049. value={this.state.nameSearch}
  2050. onChange={(e) => {
  2051. this.setState({ nameSearch: e.target.value });
  2052. }}
  2053. />
  2054. <Select
  2055. placeholder="员工状态"
  2056. onChange={(e) => {
  2057. this.setState({ statusSearch: e });
  2058. }}
  2059. style={{ width: 120, marginRight: 10 }}
  2060. value={this.state.statusSearch}
  2061. >
  2062. <Option value="0">实习生</Option>
  2063. <Option value="1">在职(试用期)</Option>
  2064. <Option value="2">在职(合同期)</Option>
  2065. <Option value="3">兼职</Option>
  2066. <Option value="4">离职</Option>
  2067. </Select>
  2068. <Select
  2069. placeholder="所属公司"
  2070. style={{ width: 120, marginRight: 10 }}
  2071. value={this.state.departmenttList}
  2072. onChange={(e) => {
  2073. this.setState({ departmenttList: e });
  2074. }}
  2075. >
  2076. {departmentArr.map(function (item) {
  2077. return (
  2078. <Select.Option key={item.id}>{item.name}</Select.Option>
  2079. );
  2080. })}
  2081. </Select>
  2082. <Select
  2083. placeholder="性别"
  2084. onChange={(e) => {
  2085. this.setState({ sexSearch: e });
  2086. }}
  2087. style={{ width: 120, marginRight: 10 }}
  2088. value={this.state.sexSearch}
  2089. >
  2090. <Option value="0">男</Option>
  2091. <Option value="1">女</Option>
  2092. </Select>
  2093. <Select
  2094. placeholder="婚姻状态"
  2095. onChange={(e) => {
  2096. this.setState({ marriageSearch: e });
  2097. }}
  2098. style={{ width: 120, marginRight: 10 }}
  2099. value={this.state.marriageSearch}
  2100. >
  2101. <Option value="0">未婚</Option>
  2102. <Option value="1">已婚</Option>
  2103. <Option value="2">离异</Option>
  2104. </Select>
  2105. <Select
  2106. placeholder="政治面貌"
  2107. onChange={(e) => {
  2108. this.setState({ politicalOutlookSearch: e });
  2109. }}
  2110. style={{ width: 120, marginRight: 10 }}
  2111. value={this.state.politicalOutlookSearch}
  2112. >
  2113. <Option value="0">群众</Option>
  2114. <Option value="1">中共预备党员</Option>
  2115. <Option value="2">中共党员</Option>
  2116. <Option value="3">致公党员</Option>
  2117. </Select>
  2118. <Select
  2119. placeholder="生日月份"
  2120. onChange={(e) => {
  2121. this.setState({ birthdayMonthSearch: e });
  2122. }}
  2123. style={{ width: 120, marginRight: 10 }}
  2124. value={this.state.birthdayMonthSearch}
  2125. >
  2126. <Option value="">全部</Option>
  2127. <Option value="1">一月</Option>
  2128. <Option value="2">二月</Option>
  2129. <Option value="3">三月</Option>
  2130. <Option value="4">四月</Option>
  2131. <Option value="5">五月</Option>
  2132. <Option value="6">六月</Option>
  2133. <Option value="7">七月</Option>
  2134. <Option value="8">八月</Option>
  2135. <Option value="9">九月</Option>
  2136. <Option value="10">十月</Option>
  2137. <Option value="11">十一月</Option>
  2138. <Option value="12">十二月</Option>
  2139. </Select>
  2140. <Select
  2141. placeholder="所属系统"
  2142. onChange={(e) => {
  2143. this.setState({ systemSearch: e });
  2144. }}
  2145. style={{ width: 120, marginRight: 10 }}
  2146. value={this.state.systemSearch}
  2147. >
  2148. <Option value="0">管理系统</Option>
  2149. <Option value="1">营销系统</Option>
  2150. <Option value="2">技术系统</Option>
  2151. </Select>
  2152. <Select
  2153. placeholder="工作年限"
  2154. onChange={(e) => {
  2155. this.setState({ workingYearsSearch: e });
  2156. }}
  2157. style={{ width: 120, marginRight: 10 }}
  2158. value={this.state.workingYearsSearch}
  2159. >
  2160. <Option value="0">0-1年</Option>
  2161. <Option value="1">1-3年</Option>
  2162. <Option value="2">3-10年</Option>
  2163. <Option value="3">10年以上</Option>
  2164. </Select>
  2165. <Select
  2166. placeholder="学历"
  2167. onChange={(e) => {
  2168. this.setState({ educationSearch: e });
  2169. }}
  2170. style={{ width: 120 }}
  2171. value={this.state.educationSearch}
  2172. >
  2173. <Option value="0">高中/中专</Option>
  2174. <Option value="1">专科/高职</Option>
  2175. <Option value="2">本科</Option>
  2176. <Option value="3">研究生</Option>
  2177. <Option value="5">博士</Option>
  2178. </Select>
  2179. <br />
  2180. <span style={{}}>转正日期:</span>
  2181. <RangePicker
  2182. style={{ marginRight: 10, width: 170 }}
  2183. value={[
  2184. this.state.promotionTime[0]
  2185. ? moment(this.state.promotionTime[0])
  2186. : null,
  2187. this.state.promotionTime[1]
  2188. ? moment(this.state.promotionTime[1])
  2189. : null,
  2190. ]}
  2191. onChange={(data, dataString) => {
  2192. this.setState({ promotionTime: dataString });
  2193. }}
  2194. />
  2195. <span style={{}}>入职时间:</span>
  2196. <RangePicker
  2197. style={{ marginRight: 10, width: 170 }}
  2198. value={[
  2199. this.state.entryTime[0]
  2200. ? moment(this.state.entryTime[0])
  2201. : null,
  2202. this.state.entryTime[1]
  2203. ? moment(this.state.entryTime[1])
  2204. : null,
  2205. ]}
  2206. onChange={(data, dataString) => {
  2207. this.setState({ entryTime: dataString });
  2208. }}
  2209. />
  2210. <span style={{}}>离职时间:</span>
  2211. <RangePicker
  2212. style={{ marginRight: 10, width: 170 }}
  2213. value={[
  2214. this.state.quitTime[0]
  2215. ? moment(this.state.quitTime[0])
  2216. : null,
  2217. this.state.quitTime[1]
  2218. ? moment(this.state.quitTime[1])
  2219. : null,
  2220. ]}
  2221. onChange={(data, dataString) => {
  2222. this.setState({ quitTime: dataString });
  2223. }}
  2224. />
  2225. <span style={{}}>合同时间:</span>
  2226. <RangePicker
  2227. style={{ marginRight: 10, width: 170 }}
  2228. value={[
  2229. this.state.contractTime[0]
  2230. ? moment(this.state.contractTime[0])
  2231. : null,
  2232. this.state.contractTime[1]
  2233. ? moment(this.state.contractTime[1])
  2234. : null,
  2235. ]}
  2236. onChange={(data, dataString) => {
  2237. this.setState({ contractTime: dataString });
  2238. }}
  2239. />
  2240. <Button
  2241. type="primary"
  2242. onClick={this.search}
  2243. style={{ marginLeft: 10 }}
  2244. >
  2245. 搜索
  2246. </Button>
  2247. <Button onClick={this.reset}>重置</Button>
  2248. </div>
  2249. </TabPane>
  2250. <TabPane tab="新增员工档案" key="3">
  2251. <Button
  2252. type="primary"
  2253. onClick={this.addPeo}
  2254. style={{ margin: "11px 0px 10px 10px" }}
  2255. >
  2256. 新增员工档案
  2257. </Button>
  2258. </TabPane>
  2259. <TabPane tab="导出Excel" key="4">
  2260. <Button
  2261. type="primary"
  2262. onClick={this.export}
  2263. style={{ margin: "11px 0px 10px 10px" }}
  2264. >
  2265. 导出当前列表
  2266. </Button>
  2267. </TabPane>
  2268. <TabPane tab="更改表格显示数据" key="1">
  2269. <div style={{ marginLeft: 10 }}>
  2270. <ChooseList
  2271. columns={this.state.columns}
  2272. changeFn={this.changeList}
  2273. changeList={this.state.changeList}
  2274. top={55}
  2275. margin={11}
  2276. />
  2277. </div>
  2278. </TabPane>
  2279. </Tabs>
  2280. <div className="patent-table" style={{ marginTop: 10 }}>
  2281. <Spin spinning={this.state.loading}>
  2282. <Table
  2283. bordered
  2284. columns={
  2285. this.state.changeList == undefined
  2286. ? this.state.columns
  2287. : this.state.changeList
  2288. }
  2289. onRowClick={this.tableRowClick}
  2290. dataSource={this.state.dataSource}
  2291. scroll={{ x: "max-content", y: 0 }}
  2292. pagination={this.state.pagination}
  2293. size="small"
  2294. />
  2295. </Spin>
  2296. </div>
  2297. <Modal
  2298. maskClosable={false}
  2299. visible={this.state.visible}
  2300. footer={null}
  2301. width={1000}
  2302. onCancel={() => {
  2303. this.setState({
  2304. aid:''
  2305. });
  2306. this.loadData();
  2307. this.cancel();
  2308. }}
  2309. >
  2310. <ReactToPrint
  2311. trigger={() => (
  2312. <Button
  2313. type="primary"
  2314. style={{
  2315. float: "right",
  2316. position:'absolute',
  2317. right: '20px',
  2318. top: '63px',
  2319. zIndex: 1,
  2320. display: this.state.detailFlag ? "block" : "none"
  2321. }}
  2322. >
  2323. 打印
  2324. </Button>
  2325. )}
  2326. content={() => this.refs}
  2327. />
  2328. <Spin
  2329. spinning={this.state.loading}
  2330. ref={(e) => {
  2331. this.refs = e;
  2332. }}
  2333. >
  2334. <h2
  2335. style={{
  2336. textAlign: "center",
  2337. paddingBottom: 10,
  2338. marginBottom: 10,
  2339. }}
  2340. >
  2341. {this.state.ModalData.name + "人事档案"}
  2342. </h2>
  2343. <Button
  2344. type="primary"
  2345. style={{ marginBottom: 15}}
  2346. onClick={(e) => {
  2347. this.setState({ detailFlag: !this.state.detailFlag });
  2348. }}
  2349. >
  2350. {this.state.detailFlag ? "切换编辑模式" : "切换查看模式"}
  2351. </Button>
  2352. <ul onClick={this.editPeo} className="peo-table">
  2353. {this.state.table.map((item) => {
  2354. let value = item.value;
  2355. if (item.render) {
  2356. let fn = item.render;
  2357. return (
  2358. <li>
  2359. <div className="peo-left">{item.key}</div>
  2360. <Tooltip
  2361. placement="top"
  2362. title={fn(
  2363. this.state.ModalData[value],
  2364. value == "son" ? this.state.ModalData.girl : 0
  2365. )}
  2366. >
  2367. <div className="peo-right">
  2368. {fn(
  2369. this.state.ModalData[value],
  2370. value == "son" ? this.state.ModalData.girl : 0
  2371. )}
  2372. </div>
  2373. </Tooltip>
  2374. </li>
  2375. );
  2376. }
  2377. return (
  2378. <li>
  2379. <div className="peo-left">{item.key}</div>
  2380. <Tooltip
  2381. placement="top"
  2382. title={this.state.ModalData[item.value]}
  2383. >
  2384. <div className="peo-right">
  2385. {this.state.ModalData[value] &&
  2386. this.state.ModalData[value].length > 10
  2387. ? this.state.ModalData[value].substring(0, 10) + "..."
  2388. : this.state.ModalData[value]}
  2389. </div>
  2390. </Tooltip>
  2391. </li>
  2392. );
  2393. })}
  2394. </ul>
  2395. {this.state.detailFlag ? (
  2396. <div>
  2397. <div className="title-peo">
  2398. <span>任职信息</span>
  2399. {/* <Button
  2400. type="primary"
  2401. onClick={(e) => {
  2402. this.stayModal(this.state.ModalData.id);
  2403. }}
  2404. style={{ position: "absolute", right: 0, height: 30 }}
  2405. >
  2406. 修改任职信息
  2407. </Button> */}
  2408. </div>
  2409. <div className="clearfix">
  2410. <FormItem
  2411. className="half-item"
  2412. labelCol={{ span: 6 }}
  2413. wrapperCol={{ span: 30 }}
  2414. label="员工状态"
  2415. >
  2416. {this.state.ModalData.statusName}
  2417. </FormItem>
  2418. <FormItem
  2419. className="half-item"
  2420. labelCol={{ span: 6 }}
  2421. wrapperCol={{ span: 30 }}
  2422. label="所属系统"
  2423. >
  2424. {this.state.ModalData.systemName}
  2425. </FormItem>
  2426. </div>
  2427. <div className="clearfix">
  2428. <FormItem
  2429. className="half-item"
  2430. labelCol={{ span: 6 }}
  2431. wrapperCol={{ span: 30 }}
  2432. label="工作性质"
  2433. >
  2434. {this.jobStatus(
  2435. this.state.ModalData.jobNature,
  2436. this.state.ModalData.jobNatureRemarks
  2437. )}
  2438. </FormItem>
  2439. <FormItem
  2440. className="half-item"
  2441. labelCol={{ span: 6 }}
  2442. wrapperCol={{ span: 30 }}
  2443. label="工龄"
  2444. >
  2445. {this.state.ModalData.workingYear}
  2446. </FormItem>
  2447. </div>
  2448. <div className="clearfix">
  2449. <FormItem
  2450. className="half-item"
  2451. labelCol={{ span: 6 }}
  2452. wrapperCol={{ span: 30 }}
  2453. label="入职时间"
  2454. >
  2455. {this.state.ModalData.entryTimes}
  2456. </FormItem>
  2457. <FormItem
  2458. className="half-item"
  2459. labelCol={{ span: 6 }}
  2460. wrapperCol={{ span: 30 }}
  2461. label="转正时间"
  2462. >
  2463. {this.state.ModalData.promotionTimes}
  2464. </FormItem>
  2465. </div>
  2466. <div className="clearfix">
  2467. <FormItem
  2468. className="half-item"
  2469. labelCol={{ span: 6 }}
  2470. wrapperCol={{ span: 30 }}
  2471. label="所属公司"
  2472. >
  2473. {this.state.ModalData.depName}
  2474. </FormItem>
  2475. <FormItem
  2476. className="half-item"
  2477. labelCol={{ span: 6 }}
  2478. wrapperCol={{ span: 30 }}
  2479. label="级别"
  2480. >
  2481. {this.state.ModalData.lvlName}
  2482. </FormItem>
  2483. </div>
  2484. <div className="clearfix">
  2485. <FormItem
  2486. className="half-item"
  2487. labelCol={{ span: 6 }}
  2488. wrapperCol={{ span: 30 }}
  2489. label="职位"
  2490. >
  2491. {this.state.ModalData.jobsName}
  2492. </FormItem>
  2493. <FormItem
  2494. className="half-item"
  2495. labelCol={{ span: 6 }}
  2496. wrapperCol={{ span: 30 }}
  2497. label="岗位津贴"
  2498. >
  2499. {this.state.ModalData.allowance}
  2500. </FormItem>
  2501. </div>
  2502. <div className="clearfix">
  2503. <FormItem
  2504. className="half-item"
  2505. labelCol={{ span: 6 }}
  2506. wrapperCol={{ span: 30 }}
  2507. label="星级"
  2508. >
  2509. {this.state.ModalData.starName}
  2510. </FormItem>
  2511. </div>
  2512. <div className="title-peo">
  2513. <span>联系信息</span>
  2514. {/* <Button
  2515. type="primary"
  2516. onClick={this.phoneModal}
  2517. style={{ position: "absolute", right: 0, height: 30 }}
  2518. >
  2519. 修改联系信息
  2520. </Button> */}
  2521. </div>
  2522. <div className="clearfix">
  2523. <FormItem
  2524. className="half-item"
  2525. labelCol={{ span: 6 }}
  2526. wrapperCol={{ span: 30 }}
  2527. label="手机号码"
  2528. >
  2529. {this.state.ModalData.mobile}
  2530. </FormItem>
  2531. <FormItem
  2532. className="half-item"
  2533. labelCol={{ span: 6 }}
  2534. wrapperCol={{ span: 30 }}
  2535. label="电话"
  2536. >
  2537. {this.state.ModalData.fixedTel}
  2538. </FormItem>
  2539. </div>
  2540. {this.state.ModalData.contactList &&
  2541. this.state.ModalData.contactList.length > 0 ? (
  2542. this.state.ModalData.contactList.map((item, index) => {
  2543. return (
  2544. <div className="clearfix">
  2545. <FormItem
  2546. className="half-item"
  2547. labelCol={{ span: 6 }}
  2548. wrapperCol={{ span: 30 }}
  2549. label={"紧急联系人" + (index + 1)}
  2550. >
  2551. {item.emergencyContact}
  2552. </FormItem>
  2553. <FormItem
  2554. className="half-item"
  2555. labelCol={{ span: 6 }}
  2556. wrapperCol={{ span: 30 }}
  2557. label={"紧急联系人" + (index + 1) + "电话"}
  2558. >
  2559. {item.emergencyMobile}
  2560. </FormItem>
  2561. </div>
  2562. );
  2563. })
  2564. ) : (
  2565. <div
  2566. style={{
  2567. textAlign: "center",
  2568. height: 60,
  2569. lineHeight: "60px",
  2570. }}
  2571. >
  2572. 暂无紧急联系人信息
  2573. </div>
  2574. )}
  2575. <div className="title-peo">
  2576. <span>入职资料</span>
  2577. {/* <Button
  2578. type="primary"
  2579. onClick={this.entryModal}
  2580. style={{ position: "absolute", right: 0, height: 30 }}
  2581. >
  2582. 修改入职信息
  2583. </Button> */}
  2584. </div>
  2585. <div className="clearfix">
  2586. <FormItem
  2587. className="half-item"
  2588. labelCol={{ span: 6 }}
  2589. wrapperCol={{ span: 30 }}
  2590. label="毕业学校"
  2591. >
  2592. {this.state.ModalData.personnelEntry
  2593. ? this.state.ModalData.personnelEntry.school
  2594. : ""}
  2595. </FormItem>
  2596. <FormItem
  2597. className="half-item"
  2598. labelCol={{ span: 6 }}
  2599. wrapperCol={{ span: 30 }}
  2600. label="学历"
  2601. >
  2602. {this.state.ModalData.personnelEntry
  2603. ? this.educationStatus(
  2604. this.state.ModalData.personnelEntry.education
  2605. )
  2606. : ""}
  2607. </FormItem>
  2608. </div>
  2609. <div className="clearfix">
  2610. <FormItem
  2611. className="half-item"
  2612. labelCol={{ span: 6 }}
  2613. wrapperCol={{ span: 30 }}
  2614. label="所学专业"
  2615. >
  2616. {this.state.ModalData.personnelEntry
  2617. ? this.state.ModalData.personnelEntry.major
  2618. : ""}
  2619. </FormItem>
  2620. <FormItem
  2621. className="half-item"
  2622. labelCol={{ span: 6 }}
  2623. wrapperCol={{ span: 30 }}
  2624. label="职称"
  2625. >
  2626. {this.state.ModalData.personnelEntry
  2627. ? this.state.ModalData.personnelEntry.title
  2628. : ""}
  2629. </FormItem>
  2630. </div>
  2631. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2632. <div style={{ marginBottom: 10 }}>附件:</div>
  2633. <PicModal
  2634. remarks={
  2635. this.state.ModalData.personnelEntry
  2636. ? this.picToArr(
  2637. this.state.ModalData.personnelEntry.annexName
  2638. )
  2639. : []
  2640. }
  2641. picUrl={
  2642. this.state.ModalData.personnelEntry
  2643. ? this.picToArr(
  2644. this.state.ModalData.personnelEntry.annexUrl
  2645. )
  2646. : []
  2647. }
  2648. />
  2649. </div>
  2650. <div className="title-peo">
  2651. <span>晋升情况</span>
  2652. {/* <Button
  2653. type="primary"
  2654. onClick={(e) => {
  2655. this.upgradeModal(true);
  2656. }}
  2657. style={{ position: "absolute", right: 0, height: 30 }}
  2658. >
  2659. 新增晋升信息
  2660. </Button> */}
  2661. </div>
  2662. {this.state.ModalData.promotionList &&
  2663. this.state.ModalData.promotionList.length > 0 ? (
  2664. this.state.ModalData.promotionList.map((item, index) => {
  2665. return (
  2666. <div
  2667. style={{
  2668. width: "100%",
  2669. borderBottom: "1px dashed #ccc",
  2670. position: "relative",
  2671. }}
  2672. >
  2673. {/* <Button
  2674. style={{
  2675. position: "absolute",
  2676. right: "50%",
  2677. bottom: 10,
  2678. transform: "translateX(50%)",
  2679. }}
  2680. type="primary"
  2681. onClick={(e) => {
  2682. this.upgradeModal(false, index);
  2683. }}
  2684. >
  2685. 修改信息
  2686. </Button> */}
  2687. <div className="clearfix">
  2688. <FormItem
  2689. className="half-item"
  2690. labelCol={{ span: 6 }}
  2691. wrapperCol={{ span: 30 }}
  2692. label="晋升职位"
  2693. >
  2694. {item.oldJobsName + "--->" + item.newJobsName}
  2695. </FormItem>
  2696. <FormItem
  2697. className="half-item"
  2698. labelCol={{ span: 6 }}
  2699. wrapperCol={{ span: 30 }}
  2700. label="晋升等级"
  2701. >
  2702. {item.oldLvlName + "--->" + item.newLvlName}
  2703. </FormItem>
  2704. </div>
  2705. <div className="clearfix">
  2706. <FormItem
  2707. className="half-item"
  2708. labelCol={{ span: 6 }}
  2709. wrapperCol={{ span: 30 }}
  2710. label="晋升时间"
  2711. >
  2712. {item.promotionTimes}
  2713. </FormItem>
  2714. </div>
  2715. <div className="clearfix">
  2716. <FormItem
  2717. className="half-item"
  2718. labelCol={{ span: 6 }}
  2719. wrapperCol={{ span: 30 }}
  2720. label="晋升备注"
  2721. >
  2722. {item.promotionRemarks}
  2723. </FormItem>
  2724. </div>
  2725. <div
  2726. className="clearfix"
  2727. style={{ paddingLeft: 70, marginBottom: 40 }}
  2728. >
  2729. <div style={{ marginBottom: 10 }}>附件:</div>
  2730. <PicModal
  2731. remarks={this.picToArr(item.annexName)}
  2732. picUrl={this.picToArr(item.annexUrl)}
  2733. />
  2734. </div>
  2735. </div>
  2736. );
  2737. })
  2738. ) : (
  2739. <div
  2740. style={{
  2741. textAlign: "center",
  2742. height: 60,
  2743. lineHeight: "60px",
  2744. }}
  2745. >
  2746. 暂无晋升情况
  2747. </div>
  2748. )}
  2749. <div className="title-peo">
  2750. <span>合同情况</span>
  2751. {/* <Button
  2752. type="primary"
  2753. onClick={(e) => {
  2754. this.contractModal(true);
  2755. }}
  2756. style={{ position: "absolute", right: 0, height: 30 }}
  2757. >
  2758. 新增合同信息
  2759. </Button> */}
  2760. </div>
  2761. {this.state.ModalData.contractList &&
  2762. this.state.ModalData.contractList.length > 0 ? (
  2763. this.state.ModalData.contractList.map((item, index) => {
  2764. return (
  2765. <div
  2766. style={{
  2767. width: "100%",
  2768. borderBottom: "1px dashed #ccc",
  2769. position: "relative",
  2770. }}
  2771. >
  2772. {/* <Button
  2773. style={{
  2774. position: "absolute",
  2775. right: "50%",
  2776. bottom: 10,
  2777. transform: "translateX(50%)",
  2778. }}
  2779. type="primary"
  2780. onClick={(e) => {
  2781. this.contractModal(false, index);
  2782. }}
  2783. >
  2784. 修改信息
  2785. </Button> */}
  2786. <div className="clearfix">
  2787. <FormItem
  2788. className="half-item"
  2789. labelCol={{ span: 6 }}
  2790. wrapperCol={{ span: 30 }}
  2791. label="签订时间"
  2792. >
  2793. {item.startTimes}
  2794. </FormItem>
  2795. <FormItem
  2796. className="half-item"
  2797. labelCol={{ span: 6 }}
  2798. wrapperCol={{ span: 30 }}
  2799. label="到期时间"
  2800. >
  2801. {item.endTimes}
  2802. </FormItem>
  2803. </div>
  2804. <div className="clearfix">
  2805. <FormItem
  2806. style={{ width: "100%", wordBreak: "break-all" }}
  2807. className="half-item"
  2808. labelCol={{ span: 3 }}
  2809. wrapperCol={{ span: 30 }}
  2810. label="备注"
  2811. >
  2812. {item.contractRemarks}
  2813. </FormItem>
  2814. </div>
  2815. <div
  2816. className="clearfix"
  2817. style={{ paddingLeft: 70, marginBottom: 40 }}
  2818. >
  2819. <div style={{ marginBottom: 10 }}>附件:</div>
  2820. <PicModal
  2821. remarks={this.picToArr(item.annexName)}
  2822. picUrl={this.picToArr(item.annexUrl)}
  2823. />
  2824. </div>
  2825. </div>
  2826. );
  2827. })
  2828. ) : (
  2829. <div
  2830. style={{
  2831. textAlign: "center",
  2832. height: 60,
  2833. lineHeight: "60px",
  2834. }}
  2835. >
  2836. 暂无合同情况
  2837. </div>
  2838. )}
  2839. <div className="title-peo">
  2840. <span>奖惩情况</span>
  2841. {/* <Button
  2842. type="primary"
  2843. onClick={(e) => {
  2844. this.chooseModal(true);
  2845. }}
  2846. style={{ position: "absolute", right: 0, height: 30 }}
  2847. >
  2848. 新增奖惩信息
  2849. </Button> */}
  2850. </div>
  2851. {this.state.ModalData.chooseList &&
  2852. this.state.ModalData.chooseList.length > 0 ? (
  2853. this.state.ModalData.chooseList.map((item, index) => {
  2854. return (
  2855. <div
  2856. style={{
  2857. width: "100%",
  2858. borderBottom: "1px dashed #ccc",
  2859. position: "relative",
  2860. }}
  2861. >
  2862. {/* <Button
  2863. style={{
  2864. position: "absolute",
  2865. right: "50%",
  2866. bottom: 10,
  2867. transform: "translateX(50%)",
  2868. }}
  2869. type="primary"
  2870. onClick={(e) => {
  2871. this.chooseModal(false, index);
  2872. }}
  2873. >
  2874. 修改信息
  2875. </Button> */}
  2876. <div className="clearfix">
  2877. <FormItem
  2878. className="half-item"
  2879. labelCol={{ span: 6 }}
  2880. wrapperCol={{ span: 30 }}
  2881. label={"状态"}
  2882. >
  2883. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2884. </FormItem>
  2885. <FormItem
  2886. className="half-item"
  2887. labelCol={{ span: 6 }}
  2888. wrapperCol={{ span: 30 }}
  2889. label="时间"
  2890. >
  2891. {item.effectTimes}
  2892. </FormItem>
  2893. </div>
  2894. <div className="clearfix">
  2895. <FormItem
  2896. className="half-item"
  2897. labelCol={{ span: 6 }}
  2898. wrapperCol={{ span: 30 }}
  2899. label={"内容"}
  2900. >
  2901. {item.chooseRemarks}
  2902. </FormItem>
  2903. </div>
  2904. <div
  2905. className="clearfix"
  2906. style={{ paddingLeft: 70, marginBottom: 40 }}
  2907. >
  2908. <div style={{ marginBottom: 10 }}>附件:</div>
  2909. <PicModal
  2910. remarks={this.picToArr(item.annexName)}
  2911. picUrl={this.picToArr(item.annexUrl)}
  2912. />
  2913. </div>
  2914. </div>
  2915. );
  2916. })
  2917. ) : (
  2918. <div
  2919. style={{
  2920. textAlign: "center",
  2921. height: 60,
  2922. lineHeight: "60px",
  2923. }}
  2924. >
  2925. 暂无奖惩情况
  2926. </div>
  2927. )}
  2928. <div className="title-peo">
  2929. <span>离职情况</span>
  2930. {/* <Button
  2931. type="primary"
  2932. onClick={(e) => {
  2933. this.quitModal(true);
  2934. }}
  2935. style={{ position: "absolute", right: 0, height: 30 }}
  2936. >
  2937. 新增离职信息
  2938. </Button> */}
  2939. </div>
  2940. {this.state.ModalData.quitList &&
  2941. this.state.ModalData.quitList.length > 0 ? (
  2942. this.state.ModalData.quitList.map((item, index) => {
  2943. return (
  2944. <div
  2945. style={{
  2946. width: "100%",
  2947. borderBottom: "1px dashed #ccc",
  2948. position: "relative",
  2949. }}
  2950. >
  2951. {/* <Button
  2952. style={{
  2953. position: "absolute",
  2954. right: "50%",
  2955. bottom: 10,
  2956. transform: "translateX(50%)",
  2957. }}
  2958. type="primary"
  2959. onClick={(e) => {
  2960. this.quitModal(false, index);
  2961. }}
  2962. >
  2963. 修改信息
  2964. </Button> */}
  2965. <div className="clearfix">
  2966. <FormItem
  2967. className="half-item"
  2968. labelCol={{ span: 6 }}
  2969. wrapperCol={{ span: 30 }}
  2970. label="离职时间"
  2971. >
  2972. {item.effectTimes}
  2973. </FormItem>
  2974. <FormItem
  2975. className="half-item"
  2976. labelCol={{ span: 6 }}
  2977. wrapperCol={{ span: 30 }}
  2978. label="离职备注"
  2979. >
  2980. {item.quitRemarks}
  2981. </FormItem>
  2982. </div>
  2983. <div
  2984. className="clearfix"
  2985. style={{ paddingLeft: 70, marginBottom: 40 }}
  2986. >
  2987. <div style={{ marginBottom: 10 }}>附件:</div>
  2988. <PicModal
  2989. remarks={this.picToArr(item.annexName)}
  2990. picUrl={this.picToArr(item.annexUrl)}
  2991. />
  2992. </div>
  2993. </div>
  2994. );
  2995. })
  2996. ) : (
  2997. <div
  2998. style={{
  2999. textAlign: "center",
  3000. height: 60,
  3001. lineHeight: "60px",
  3002. }}
  3003. >
  3004. 暂无离职信息
  3005. </div>
  3006. )}
  3007. <div className="title-peo" style={{ marginBottom: 10 }}>
  3008. <span>福利情况</span>
  3009. {/* <Button
  3010. type="primary"
  3011. onClick={(e) => {
  3012. this.welfareModal();
  3013. }}
  3014. style={{ position: "absolute", right: 0, height: 30 }}
  3015. >
  3016. 修改福利信息
  3017. </Button> */}
  3018. </div>
  3019. <Table
  3020. columns={this.state.welfareColumns}
  3021. dataSource={this.state.ModalData.welfareList}
  3022. pagination={false}
  3023. bordered
  3024. size="small"
  3025. scroll={{ x: "max-content", y: 0 }}
  3026. />
  3027. <div className="clearfix" style={{ marginTop: 10 }}>
  3028. <FormItem
  3029. className="half-item"
  3030. style={{ width: "100%", wordBreak: "break-all" }}
  3031. labelCol={{ span: 3 }}
  3032. wrapperCol={{ span: 30 }}
  3033. label="备注"
  3034. >
  3035. {this.state.ModalData.welfareRemarks}
  3036. </FormItem>
  3037. </div>
  3038. <div
  3039. className="clearfix"
  3040. style={{ paddingLeft: 70, marginBottom: 0 }}
  3041. >
  3042. <div style={{ marginBottom: 10 }}>附件:</div>
  3043. <PicModal
  3044. remarks={this.picToArr(
  3045. this.state.ModalData.welfareAnnexName
  3046. )}
  3047. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  3048. />
  3049. </div>
  3050. </div>
  3051. ) : (
  3052. <Tabs
  3053. activeKey={this.state.active}
  3054. onChange={(e) => {
  3055. this.setState({ active: e });
  3056. }}
  3057. >
  3058. <TabPane tab="任职信息" key={1}>
  3059. <div className="title-peo">
  3060. <span>任职信息</span>
  3061. <Button
  3062. type="primary"
  3063. onClick={(e) => {
  3064. this.stayModal(this.state.ModalData.id);
  3065. }}
  3066. style={{ position: "absolute", right: 0, height: 30 }}
  3067. >
  3068. 修改任职信息
  3069. </Button>
  3070. </div>
  3071. <div className="clearfix">
  3072. <FormItem
  3073. className="half-item"
  3074. labelCol={{ span: 6 }}
  3075. wrapperCol={{ span: 30 }}
  3076. label="员工状态"
  3077. >
  3078. {this.state.ModalData.statusName}
  3079. </FormItem>
  3080. <FormItem
  3081. className="half-item"
  3082. labelCol={{ span: 6 }}
  3083. wrapperCol={{ span: 30 }}
  3084. label="所属系统"
  3085. >
  3086. {this.state.ModalData.systemName}
  3087. </FormItem>
  3088. </div>
  3089. <div className="clearfix">
  3090. <FormItem
  3091. className="half-item"
  3092. labelCol={{ span: 6 }}
  3093. wrapperCol={{ span: 30 }}
  3094. label="工作性质"
  3095. >
  3096. {this.jobStatus(
  3097. this.state.ModalData.jobNature,
  3098. this.state.ModalData.jobNatureRemarks
  3099. )}
  3100. </FormItem>
  3101. <FormItem
  3102. className="half-item"
  3103. labelCol={{ span: 6 }}
  3104. wrapperCol={{ span: 30 }}
  3105. label="工龄"
  3106. >
  3107. {this.state.ModalData.workingYear}
  3108. </FormItem>
  3109. </div>
  3110. <div className="clearfix">
  3111. <FormItem
  3112. className="half-item"
  3113. labelCol={{ span: 6 }}
  3114. wrapperCol={{ span: 30 }}
  3115. label="入职时间"
  3116. >
  3117. {this.state.ModalData.entryTimes}
  3118. </FormItem>
  3119. <FormItem
  3120. className="half-item"
  3121. labelCol={{ span: 6 }}
  3122. wrapperCol={{ span: 30 }}
  3123. label="转正时间"
  3124. >
  3125. {this.state.ModalData.promotionTimes}
  3126. </FormItem>
  3127. </div>
  3128. <div className="clearfix">
  3129. <FormItem
  3130. className="half-item"
  3131. labelCol={{ span: 6 }}
  3132. wrapperCol={{ span: 30 }}
  3133. label="所属公司"
  3134. >
  3135. {this.state.ModalData.depName}
  3136. </FormItem>
  3137. <FormItem
  3138. className="half-item"
  3139. labelCol={{ span: 6 }}
  3140. wrapperCol={{ span: 30 }}
  3141. label="级别"
  3142. >
  3143. {this.state.ModalData.lvlName}
  3144. </FormItem>
  3145. </div>
  3146. <div className="clearfix">
  3147. <FormItem
  3148. className="half-item"
  3149. labelCol={{ span: 6 }}
  3150. wrapperCol={{ span: 30 }}
  3151. label="职位"
  3152. >
  3153. {this.state.ModalData.jobsName}
  3154. </FormItem>
  3155. <FormItem
  3156. className="half-item"
  3157. labelCol={{ span: 6 }}
  3158. wrapperCol={{ span: 30 }}
  3159. label="岗位津贴"
  3160. >
  3161. {this.state.ModalData.allowance}
  3162. </FormItem>
  3163. </div>
  3164. <div className="clearfix">
  3165. <FormItem
  3166. className="half-item"
  3167. labelCol={{ span: 6 }}
  3168. wrapperCol={{ span: 30 }}
  3169. label="星级"
  3170. >
  3171. {this.state.ModalData.starName}
  3172. </FormItem>
  3173. </div>
  3174. </TabPane>
  3175. <TabPane tab="联系信息" key={2}>
  3176. <div className="title-peo">
  3177. <span>联系信息</span>
  3178. <Button
  3179. type="primary"
  3180. onClick={this.phoneModal}
  3181. style={{ position: "absolute", right: 0, height: 30 }}
  3182. >
  3183. 修改联系信息
  3184. </Button>
  3185. </div>
  3186. <div className="clearfix">
  3187. <FormItem
  3188. className="half-item"
  3189. labelCol={{ span: 6 }}
  3190. wrapperCol={{ span: 30 }}
  3191. label="手机号码"
  3192. >
  3193. {this.state.ModalData.mobile}
  3194. </FormItem>
  3195. <FormItem
  3196. className="half-item"
  3197. labelCol={{ span: 6 }}
  3198. wrapperCol={{ span: 30 }}
  3199. label="电话"
  3200. >
  3201. {this.state.ModalData.fixedTel}
  3202. </FormItem>
  3203. </div>
  3204. {this.state.ModalData.contactList &&
  3205. this.state.ModalData.contactList.length > 0 ? (
  3206. this.state.ModalData.contactList.map((item, index) => {
  3207. return (
  3208. <div className="clearfix">
  3209. <FormItem
  3210. className="half-item"
  3211. labelCol={{ span: 6 }}
  3212. wrapperCol={{ span: 30 }}
  3213. label={"紧急联系人" + (index + 1)}
  3214. >
  3215. {item.emergencyContact}
  3216. </FormItem>
  3217. <FormItem
  3218. className="half-item"
  3219. labelCol={{ span: 6 }}
  3220. wrapperCol={{ span: 30 }}
  3221. label={"紧急联系人" + (index + 1) + "电话"}
  3222. >
  3223. {item.emergencyMobile}
  3224. </FormItem>
  3225. </div>
  3226. );
  3227. })
  3228. ) : (
  3229. <div
  3230. style={{
  3231. textAlign: "center",
  3232. height: 60,
  3233. lineHeight: "60px",
  3234. }}
  3235. >
  3236. 暂无紧急联系人信息
  3237. </div>
  3238. )}
  3239. </TabPane>
  3240. <TabPane tab="入职资料" key={3}>
  3241. <div className="title-peo">
  3242. <span>入职资料</span>
  3243. <Button
  3244. type="primary"
  3245. onClick={this.entryModal}
  3246. style={{ position: "absolute", right: 0, height: 30 }}
  3247. >
  3248. 修改入职信息
  3249. </Button>
  3250. </div>
  3251. <div className="clearfix">
  3252. <FormItem
  3253. className="half-item"
  3254. labelCol={{ span: 6 }}
  3255. wrapperCol={{ span: 30 }}
  3256. label="毕业学校"
  3257. >
  3258. {this.state.ModalData.personnelEntry
  3259. ? this.state.ModalData.personnelEntry.school
  3260. : ""}
  3261. </FormItem>
  3262. <FormItem
  3263. className="half-item"
  3264. labelCol={{ span: 6 }}
  3265. wrapperCol={{ span: 30 }}
  3266. label="学历"
  3267. >
  3268. {this.state.ModalData.personnelEntry
  3269. ? this.educationStatus(
  3270. this.state.ModalData.personnelEntry.education
  3271. )
  3272. : ""}
  3273. </FormItem>
  3274. </div>
  3275. <div className="clearfix">
  3276. <FormItem
  3277. className="half-item"
  3278. labelCol={{ span: 6 }}
  3279. wrapperCol={{ span: 30 }}
  3280. label="所学专业"
  3281. >
  3282. {this.state.ModalData.personnelEntry
  3283. ? this.state.ModalData.personnelEntry.major
  3284. : ""}
  3285. </FormItem>
  3286. <FormItem
  3287. className="half-item"
  3288. labelCol={{ span: 6 }}
  3289. wrapperCol={{ span: 30 }}
  3290. label="职称"
  3291. >
  3292. {this.state.ModalData.personnelEntry
  3293. ? this.state.ModalData.personnelEntry.title
  3294. : ""}
  3295. </FormItem>
  3296. </div>
  3297. <div className="clearfix" style={{ paddingLeft: 70 }}>
  3298. <div style={{ marginBottom: 10 }}>附件:</div>
  3299. <PicModal
  3300. remarks={
  3301. this.state.ModalData.personnelEntry
  3302. ? this.picToArr(
  3303. this.state.ModalData.personnelEntry.annexName
  3304. )
  3305. : []
  3306. }
  3307. picUrl={
  3308. this.state.ModalData.personnelEntry
  3309. ? this.picToArr(
  3310. this.state.ModalData.personnelEntry.annexUrl
  3311. )
  3312. : []
  3313. }
  3314. />
  3315. </div>
  3316. </TabPane>
  3317. <TabPane tab="晋升情况" key={4}>
  3318. <div className="title-peo">
  3319. <span>晋升情况</span>
  3320. <Button
  3321. type="primary"
  3322. onClick={(e) => {
  3323. this.upgradeModal(true);
  3324. }}
  3325. style={{ position: "absolute", right: 0, height: 30 }}
  3326. >
  3327. 新增晋升信息
  3328. </Button>
  3329. </div>
  3330. {this.state.ModalData.promotionList &&
  3331. this.state.ModalData.promotionList.length > 0 ? (
  3332. this.state.ModalData.promotionList.map((item, index) => {
  3333. return (
  3334. <div
  3335. style={{
  3336. width: "100%",
  3337. borderBottom: "1px dashed #ccc",
  3338. position: "relative",
  3339. }}
  3340. >
  3341. <Button
  3342. style={{
  3343. position: "absolute",
  3344. right: "50%",
  3345. bottom: 10,
  3346. transform: "translateX(50%)",
  3347. }}
  3348. type="primary"
  3349. onClick={(e) => {
  3350. this.upgradeModal(false, index);
  3351. }}
  3352. >
  3353. 修改信息
  3354. </Button>
  3355. <div className="clearfix">
  3356. <FormItem
  3357. className="half-item"
  3358. labelCol={{ span: 6 }}
  3359. wrapperCol={{ span: 30 }}
  3360. label="晋升职位"
  3361. >
  3362. {item.oldJobsName + "--->" + item.newJobsName}
  3363. </FormItem>
  3364. <FormItem
  3365. className="half-item"
  3366. labelCol={{ span: 6 }}
  3367. wrapperCol={{ span: 30 }}
  3368. label="晋升等级"
  3369. >
  3370. {item.oldLvlName + "--->" + item.newLvlName}
  3371. </FormItem>
  3372. </div>
  3373. <div className="clearfix">
  3374. <FormItem
  3375. className="half-item"
  3376. labelCol={{ span: 6 }}
  3377. wrapperCol={{ span: 30 }}
  3378. label="晋升时间"
  3379. >
  3380. {item.promotionTimes}
  3381. </FormItem>
  3382. </div>
  3383. <div className="clearfix">
  3384. <FormItem
  3385. className="half-item"
  3386. labelCol={{ span: 6 }}
  3387. wrapperCol={{ span: 30 }}
  3388. label="晋升备注"
  3389. >
  3390. {item.promotionRemarks}
  3391. </FormItem>
  3392. </div>
  3393. <div
  3394. className="clearfix"
  3395. style={{ paddingLeft: 70, marginBottom: 40 }}
  3396. >
  3397. <div style={{ marginBottom: 10 }}>附件:</div>
  3398. <PicModal
  3399. remarks={this.picToArr(item.annexName)}
  3400. picUrl={this.picToArr(item.annexUrl)}
  3401. />
  3402. </div>
  3403. </div>
  3404. );
  3405. })
  3406. ) : (
  3407. <div
  3408. style={{
  3409. textAlign: "center",
  3410. height: 60,
  3411. lineHeight: "60px",
  3412. }}
  3413. >
  3414. 暂无晋升情况
  3415. </div>
  3416. )}
  3417. </TabPane>
  3418. <TabPane tab="合同情况" key={5}>
  3419. <div className="title-peo">
  3420. <span>合同情况</span>
  3421. <Button
  3422. type="primary"
  3423. onClick={(e) => {
  3424. this.contractModal(true);
  3425. }}
  3426. style={{ position: "absolute", right: 0, height: 30 }}
  3427. >
  3428. 新增合同信息
  3429. </Button>
  3430. </div>
  3431. {this.state.ModalData.contractList &&
  3432. this.state.ModalData.contractList.length > 0 ? (
  3433. this.state.ModalData.contractList.map((item, index) => {
  3434. return (
  3435. <div
  3436. style={{
  3437. width: "100%",
  3438. borderBottom: "1px dashed #ccc",
  3439. position: "relative",
  3440. }}
  3441. >
  3442. <Button
  3443. style={{
  3444. position: "absolute",
  3445. right: "50%",
  3446. bottom: 10,
  3447. transform: "translateX(50%)",
  3448. }}
  3449. type="primary"
  3450. onClick={(e) => {
  3451. this.contractModal(false, index);
  3452. }}
  3453. >
  3454. 修改信息
  3455. </Button>
  3456. <div className="clearfix">
  3457. <FormItem
  3458. className="half-item"
  3459. labelCol={{ span: 6 }}
  3460. wrapperCol={{ span: 30 }}
  3461. label="签订时间"
  3462. >
  3463. {item.startTimes}
  3464. </FormItem>
  3465. <FormItem
  3466. className="half-item"
  3467. labelCol={{ span: 6 }}
  3468. wrapperCol={{ span: 30 }}
  3469. label="到期时间"
  3470. >
  3471. {item.endTimes}
  3472. </FormItem>
  3473. </div>
  3474. <div className="clearfix">
  3475. <FormItem
  3476. style={{ width: "100%", wordBreak: "break-all" }}
  3477. className="half-item"
  3478. labelCol={{ span: 3 }}
  3479. wrapperCol={{ span: 30 }}
  3480. label="备注"
  3481. >
  3482. {item.contractRemarks}
  3483. </FormItem>
  3484. </div>
  3485. <div
  3486. className="clearfix"
  3487. style={{ paddingLeft: 70, marginBottom: 40 }}
  3488. >
  3489. <div style={{ marginBottom: 10 }}>附件:</div>
  3490. <PicModal
  3491. remarks={this.picToArr(item.annexName)}
  3492. picUrl={this.picToArr(item.annexUrl)}
  3493. />
  3494. </div>
  3495. </div>
  3496. );
  3497. })
  3498. ) : (
  3499. <div
  3500. style={{
  3501. textAlign: "center",
  3502. height: 60,
  3503. lineHeight: "60px",
  3504. }}
  3505. >
  3506. 暂无合同情况
  3507. </div>
  3508. )}
  3509. </TabPane>
  3510. <TabPane tab="奖惩情况" key={6}>
  3511. <div className="title-peo">
  3512. <span>奖惩情况</span>
  3513. <Button
  3514. type="primary"
  3515. onClick={(e) => {
  3516. this.chooseModal(true);
  3517. }}
  3518. style={{ position: "absolute", right: 0, height: 30 }}
  3519. >
  3520. 新增奖惩信息
  3521. </Button>
  3522. </div>
  3523. {this.state.ModalData.chooseList &&
  3524. this.state.ModalData.chooseList.length > 0 ? (
  3525. this.state.ModalData.chooseList.map((item, index) => {
  3526. return (
  3527. <div
  3528. style={{
  3529. width: "100%",
  3530. borderBottom: "1px dashed #ccc",
  3531. position: "relative",
  3532. }}
  3533. >
  3534. <Button
  3535. style={{
  3536. position: "absolute",
  3537. right: "50%",
  3538. bottom: 10,
  3539. transform: "translateX(50%)",
  3540. }}
  3541. type="primary"
  3542. onClick={(e) => {
  3543. this.chooseModal(false, index);
  3544. }}
  3545. >
  3546. 修改信息
  3547. </Button>
  3548. <div className="clearfix">
  3549. <FormItem
  3550. className="half-item"
  3551. labelCol={{ span: 6 }}
  3552. wrapperCol={{ span: 30 }}
  3553. label={"状态"}
  3554. >
  3555. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3556. </FormItem>
  3557. <FormItem
  3558. className="half-item"
  3559. labelCol={{ span: 6 }}
  3560. wrapperCol={{ span: 30 }}
  3561. label="时间"
  3562. >
  3563. {item.effectTimes}
  3564. </FormItem>
  3565. </div>
  3566. <div className="clearfix">
  3567. <FormItem
  3568. className="half-item"
  3569. labelCol={{ span: 6 }}
  3570. wrapperCol={{ span: 30 }}
  3571. label={"内容"}
  3572. >
  3573. {item.chooseRemarks}
  3574. </FormItem>
  3575. </div>
  3576. <div
  3577. className="clearfix"
  3578. style={{ paddingLeft: 70, marginBottom: 40 }}
  3579. >
  3580. <div style={{ marginBottom: 10 }}>附件:</div>
  3581. <PicModal
  3582. remarks={this.picToArr(item.annexName)}
  3583. picUrl={this.picToArr(item.annexUrl)}
  3584. />
  3585. </div>
  3586. </div>
  3587. );
  3588. })
  3589. ) : (
  3590. <div
  3591. style={{
  3592. textAlign: "center",
  3593. height: 60,
  3594. lineHeight: "60px",
  3595. }}
  3596. >
  3597. 暂无奖惩情况
  3598. </div>
  3599. )}
  3600. </TabPane>
  3601. <TabPane tab="离职情况" key={7}>
  3602. <div className="title-peo">
  3603. <span>离职情况</span>
  3604. <Button
  3605. type="primary"
  3606. onClick={(e) => {
  3607. this.quitModal(true);
  3608. }}
  3609. style={{ position: "absolute", right: 0, height: 30 }}
  3610. >
  3611. 新增离职信息
  3612. </Button>
  3613. </div>
  3614. {this.state.ModalData.quitList &&
  3615. this.state.ModalData.quitList.length > 0 ? (
  3616. this.state.ModalData.quitList.map((item, index) => {
  3617. return (
  3618. <div
  3619. style={{
  3620. width: "100%",
  3621. borderBottom: "1px dashed #ccc",
  3622. position: "relative",
  3623. }}
  3624. >
  3625. <Button
  3626. style={{
  3627. position: "absolute",
  3628. right: "50%",
  3629. bottom: 10,
  3630. transform: "translateX(50%)",
  3631. }}
  3632. type="primary"
  3633. onClick={(e) => {
  3634. this.quitModal(false, index);
  3635. }}
  3636. >
  3637. 修改信息
  3638. </Button>
  3639. <div className="clearfix">
  3640. <FormItem
  3641. className="half-item"
  3642. labelCol={{ span: 6 }}
  3643. wrapperCol={{ span: 30 }}
  3644. label="离职时间"
  3645. >
  3646. {item.effectTimes}
  3647. </FormItem>
  3648. <FormItem
  3649. className="half-item"
  3650. labelCol={{ span: 6 }}
  3651. wrapperCol={{ span: 30 }}
  3652. label="离职备注"
  3653. >
  3654. {item.quitRemarks}
  3655. </FormItem>
  3656. </div>
  3657. <div
  3658. className="clearfix"
  3659. style={{ paddingLeft: 70, marginBottom: 40 }}
  3660. >
  3661. <div style={{ marginBottom: 10 }}>附件:</div>
  3662. <PicModal
  3663. remarks={this.picToArr(item.annexName)}
  3664. picUrl={this.picToArr(item.annexUrl)}
  3665. />
  3666. </div>
  3667. </div>
  3668. );
  3669. })
  3670. ) : (
  3671. <div
  3672. style={{
  3673. textAlign: "center",
  3674. height: 60,
  3675. lineHeight: "60px",
  3676. }}
  3677. >
  3678. 暂无离职信息
  3679. </div>
  3680. )}
  3681. </TabPane>
  3682. <TabPane tab="福利情况" key={8}>
  3683. <div className="title-peo" style={{ marginBottom: 10 }}>
  3684. <span>福利情况</span>
  3685. <Button
  3686. type="primary"
  3687. onClick={(e) => {
  3688. this.welfareModal();
  3689. }}
  3690. style={{ position: "absolute", right: 0, height: 30 }}
  3691. >
  3692. 修改福利信息
  3693. </Button>
  3694. </div>
  3695. <Table
  3696. columns={this.state.welfareColumns}
  3697. dataSource={this.state.ModalData.welfareList}
  3698. pagination={false}
  3699. bordered
  3700. size="small"
  3701. scroll={{ x: "max-content", y: 0 }}
  3702. />
  3703. <div className="clearfix" style={{ marginTop: 10 }}>
  3704. <FormItem
  3705. className="half-item"
  3706. style={{ width: "100%", wordBreak: "break-all" }}
  3707. labelCol={{ span: 3 }}
  3708. wrapperCol={{ span: 30 }}
  3709. label="备注"
  3710. >
  3711. {this.state.ModalData.welfareRemarks}
  3712. </FormItem>
  3713. </div>
  3714. <div
  3715. className="clearfix"
  3716. style={{ paddingLeft: 70, marginBottom: 0 }}
  3717. >
  3718. <div style={{ marginBottom: 10 }}>附件:</div>
  3719. <PicModal
  3720. remarks={this.picToArr(
  3721. this.state.ModalData.welfareAnnexName
  3722. )}
  3723. picUrl={this.picToArr(
  3724. this.state.ModalData.welfareAnnexUrl
  3725. )}
  3726. />
  3727. </div>
  3728. </TabPane>
  3729. </Tabs>
  3730. )}
  3731. </Spin>
  3732. </Modal>
  3733. {this.state.peoVisible ? <UserProfile
  3734. id={this.state.id}
  3735. aid={this.state.aid}
  3736. visible={this.state.peoVisible}
  3737. ModalData={this.state.ModalData}
  3738. isAddPeo={this.state.isAddPeo}
  3739. setNowAid={(aid)=>{
  3740. this.setState({
  3741. aid
  3742. })
  3743. }}
  3744. onCancel={() => {
  3745. this.loadData();
  3746. this.addPeoCancel();
  3747. }}
  3748. /> : null}
  3749. <Modal
  3750. maskClosable={false}
  3751. visible={this.state.stayVisible}
  3752. footer={null}
  3753. width={800}
  3754. onCancel={() => {
  3755. this.loadData();
  3756. this.stayCancel();
  3757. }}
  3758. >
  3759. <Spin spinning={this.state.loading}>
  3760. <h3
  3761. style={{
  3762. textAlign: "center",
  3763. paddingBottom: 10,
  3764. marginBottom: 10,
  3765. }}
  3766. >
  3767. 任职信息
  3768. </h3>
  3769. <div className="clearfix">
  3770. <FormItem
  3771. className="half-item"
  3772. labelCol={{ span: 6 }}
  3773. wrapperCol={{ span: 30 }}
  3774. label="员工状态"
  3775. >
  3776. <Select
  3777. placeholder="请选择状态"
  3778. style={{ width: 200 }}
  3779. onChange={(e) => {
  3780. this.setState({ status: e });
  3781. }}
  3782. value={this.state.status}
  3783. >
  3784. <Option value="0">实习生</Option>
  3785. <Option value="1">在职(试用期)</Option>
  3786. <Option value="2">在职(合同期)</Option>
  3787. <Option value="3">兼职</Option>
  3788. <Option value="4">已离职</Option>
  3789. </Select>
  3790. </FormItem>
  3791. <FormItem
  3792. className="half-item"
  3793. {...formItemLayout}
  3794. label="所属系统"
  3795. >
  3796. <Select
  3797. placeholder="请选择所属系统"
  3798. style={{ width: 200 }}
  3799. onChange={(e) => {
  3800. this.setState({ system: e });
  3801. }}
  3802. value={this.state.system}
  3803. >
  3804. <Option value="0">管理系统</Option>
  3805. <Option value="1">营销系统</Option>
  3806. <Option value="2">技术系统</Option>
  3807. </Select>
  3808. </FormItem>
  3809. </div>
  3810. <div className="clearfix">
  3811. <FormItem
  3812. className="half-item"
  3813. labelCol={{ span: 6 }}
  3814. wrapperCol={{ span: 30 }}
  3815. label="工作性质"
  3816. >
  3817. <Radio.Group
  3818. onChange={(e) => {
  3819. this.setState({ jobNature: e.target.value });
  3820. }}
  3821. value={this.state.jobNature}
  3822. >
  3823. <Radio value="0">全职</Radio>
  3824. <Radio value="1">兼职</Radio>
  3825. <Radio value="2">其他</Radio>
  3826. </Radio.Group>
  3827. <Input
  3828. placeholder="输入性质"
  3829. style={{
  3830. width: 80,
  3831. display:
  3832. this.state.jobNature == 2 ? "inline-block" : "none",
  3833. }}
  3834. value={this.state.jobNatureRemarks}
  3835. onChange={(e) => {
  3836. this.setState({
  3837. jobNatureRemarks: e.target.value,
  3838. });
  3839. }}
  3840. />
  3841. </FormItem>
  3842. <FormItem className="half-item" {...formItemLayout} label="工龄">
  3843. <span>{this.state.ModalData.workingYear}</span>
  3844. </FormItem>
  3845. </div>
  3846. <div className="clearfix">
  3847. <FormItem
  3848. className="half-item"
  3849. {...formItemLayout}
  3850. label="入职时间"
  3851. >
  3852. <DatePicker
  3853. value={
  3854. this.state.entryTimes ? moment(this.state.entryTimes) : null
  3855. }
  3856. style={{ width: 200 }}
  3857. onChange={(e, t) => {
  3858. this.setState({
  3859. entryTimes: t,
  3860. });
  3861. }}
  3862. />
  3863. </FormItem>
  3864. <FormItem
  3865. className="half-item"
  3866. {...formItemLayout}
  3867. label="转正时间"
  3868. >
  3869. <DatePicker
  3870. value={
  3871. this.state.promotionTimes
  3872. ? moment(this.state.promotionTimes)
  3873. : null
  3874. }
  3875. style={{ width: 200 }}
  3876. onChange={(e, t) => {
  3877. this.setState({
  3878. promotionTimes: t,
  3879. });
  3880. }}
  3881. />
  3882. </FormItem>
  3883. </div>
  3884. <div className="clearfix">
  3885. <FormItem
  3886. className="half-item"
  3887. {...formItemLayout}
  3888. label="所属公司"
  3889. >
  3890. <Select
  3891. placeholder="选择公司"
  3892. style={{ width: 200, marginRight: 10 }}
  3893. value={this.state.company}
  3894. onChange={(e) => {
  3895. this.setState({ company: e });
  3896. }}
  3897. >
  3898. {departmentArr.map(function (item) {
  3899. return (
  3900. <Select.Option key={item.id}>{item.name}</Select.Option>
  3901. );
  3902. })}
  3903. </Select>
  3904. </FormItem>
  3905. <FormItem className="half-item" {...formItemLayout} label="级别">
  3906. <Select
  3907. placeholder="请选择所属级别"
  3908. style={{ width: 200 }}
  3909. onChange={(e) => {
  3910. this.setState({ lvl: e });
  3911. }}
  3912. value={this.state.lvl}
  3913. >
  3914. <Option value="0">员工</Option>
  3915. <Option value="1">主管</Option>
  3916. <Option value="2">经理</Option>
  3917. <Option value="3">总经理</Option>
  3918. <Option value="4">副总裁</Option>
  3919. <Option value="5">副总</Option>
  3920. <Option value="6">总监</Option>
  3921. <Option value="7">董事长</Option>
  3922. </Select>
  3923. </FormItem>
  3924. </div>
  3925. <div className="clearfix">
  3926. <FormItem className="half-item" {...formItemLayout} label="职位">
  3927. <Select
  3928. placeholder="选择职位"
  3929. style={{ width: 200, marginRight: 10 }}
  3930. value={this.state.jobs}
  3931. onChange={(e) => {
  3932. this.setState({ jobs: e, star: [] });
  3933. this.getList();
  3934. }}
  3935. >
  3936. <Option value="1">员工</Option>
  3937. <Option value="2">试用营销员</Option>
  3938. <Option value="3">试用营销储备经理</Option>
  3939. <Option value="4">营销经理</Option>
  3940. <Option value="5">总监合伙人</Option>
  3941. <Option value="6">技术助理</Option>
  3942. <Option value="7">咨询师</Option>
  3943. <Option value="8">咨询师主管</Option>
  3944. <Option value="9">咨询师经理</Option>
  3945. <Option value="10">高级经理</Option>
  3946. </Select>
  3947. </FormItem>
  3948. <FormItem className="half-item" {...formItemLayout} label="星级">
  3949. <Select
  3950. placeholder="请选择所属星级"
  3951. style={{ width: 200 }}
  3952. onChange={(e) => {
  3953. this.setState({ star: e });
  3954. }}
  3955. value={this.state.star}
  3956. >
  3957. {this.state.starArr
  3958. ? this.state.starArr.map((item, index) => {
  3959. return (
  3960. <Option value={item.star}>{item.starName}</Option>
  3961. );
  3962. })
  3963. : []}
  3964. </Select>
  3965. </FormItem>
  3966. </div>
  3967. <div className="clearfix">
  3968. <FormItem
  3969. className="half-item"
  3970. labelCol={{ span: 6 }}
  3971. wrapperCol={{ span: 30 }}
  3972. label="岗位津贴"
  3973. >
  3974. <Input
  3975. placeholder="输入金额"
  3976. style={{ width: 200 }}
  3977. value={this.state.allowance}
  3978. onChange={(e) => {
  3979. this.setState({
  3980. allowance: e.target.value,
  3981. });
  3982. }}
  3983. />
  3984. </FormItem>
  3985. </div>
  3986. <Button
  3987. type="primary"
  3988. shape="round"
  3989. size="large"
  3990. style={{
  3991. position: "relative",
  3992. left: "50%",
  3993. transform: "translateX(-50%)",
  3994. }}
  3995. onClick={this.editStay}
  3996. >
  3997. 保存
  3998. </Button>
  3999. </Spin>
  4000. </Modal>
  4001. <Modal
  4002. maskClosable={false}
  4003. visible={this.state.phoneVisible}
  4004. footer={null}
  4005. width={800}
  4006. onCancel={() => {
  4007. this.loadData();
  4008. this.phoneCancel();
  4009. }}
  4010. >
  4011. <Spin spinning={this.state.loading}>
  4012. <h3
  4013. style={{
  4014. textAlign: "center",
  4015. paddingBottom: 10,
  4016. marginBottom: 10,
  4017. }}
  4018. >
  4019. 联系信息
  4020. </h3>
  4021. <div className="clearfix">
  4022. <FormItem
  4023. className="half-item"
  4024. labelCol={{ span: 6 }}
  4025. wrapperCol={{ span: 30 }}
  4026. label="手机号码"
  4027. >
  4028. <Input
  4029. placeholder="输入号码"
  4030. style={{ width: 200 }}
  4031. value={this.state.mobile}
  4032. onChange={(e) => {
  4033. this.setState({
  4034. mobile: e.target.value,
  4035. });
  4036. }}
  4037. />
  4038. </FormItem>
  4039. <FormItem
  4040. className="half-item"
  4041. labelCol={{ span: 6 }}
  4042. wrapperCol={{ span: 30 }}
  4043. label="办公室电话"
  4044. >
  4045. <Input
  4046. placeholder="输入电话"
  4047. style={{ width: 200 }}
  4048. value={this.state.fixedTel}
  4049. onChange={(e) => {
  4050. this.setState({
  4051. fixedTel: e.target.value,
  4052. });
  4053. }}
  4054. />
  4055. </FormItem>
  4056. </div>
  4057. <div className="clearfix">
  4058. <FormItem
  4059. className="half-item"
  4060. labelCol={{ span: 6 }}
  4061. wrapperCol={{ span: 30 }}
  4062. label="紧急联系人1"
  4063. >
  4064. <Input
  4065. placeholder="请输入名字"
  4066. style={{ width: 200 }}
  4067. value={
  4068. this.state.contactList.length
  4069. ? this.state.contactList[0].emergencyContact
  4070. : ""
  4071. }
  4072. onChange={(e) => {
  4073. this.state.contactList[0].emergencyContact = e.target.value;
  4074. let obj = this.state.contactList;
  4075. this.setState({
  4076. contactList: obj,
  4077. });
  4078. }}
  4079. />
  4080. </FormItem>
  4081. <FormItem
  4082. className="half-item"
  4083. labelCol={{ span: 6 }}
  4084. wrapperCol={{ span: 30 }}
  4085. label="紧急联系人电话"
  4086. >
  4087. <Input
  4088. placeholder="请输入电话"
  4089. style={{ width: 200 }}
  4090. value={
  4091. this.state.contactList.length
  4092. ? this.state.contactList[0].emergencyMobile
  4093. : ""
  4094. }
  4095. onChange={(e) => {
  4096. this.state.contactList[0].emergencyMobile = e.target.value;
  4097. let obj = this.state.contactList;
  4098. this.setState({
  4099. contactList: obj,
  4100. });
  4101. }}
  4102. />
  4103. </FormItem>
  4104. </div>
  4105. <div className="clearfix">
  4106. <FormItem
  4107. className="half-item"
  4108. labelCol={{ span: 6 }}
  4109. wrapperCol={{ span: 30 }}
  4110. label="紧急联系人2"
  4111. >
  4112. <Input
  4113. placeholder="请输入名字"
  4114. style={{ width: 200 }}
  4115. value={
  4116. this.state.contactList.length
  4117. ? this.state.contactList[1].emergencyContact
  4118. : ""
  4119. }
  4120. onChange={(e) => {
  4121. this.state.contactList[1].emergencyContact = e.target.value;
  4122. let obj = this.state.contactList;
  4123. this.setState({
  4124. contactList: obj,
  4125. });
  4126. }}
  4127. />
  4128. </FormItem>
  4129. <FormItem
  4130. className="half-item"
  4131. labelCol={{ span: 6 }}
  4132. wrapperCol={{ span: 30 }}
  4133. label="紧急联系人电话"
  4134. >
  4135. <Input
  4136. placeholder="请输入电话"
  4137. style={{ width: 200 }}
  4138. value={
  4139. this.state.contactList.length
  4140. ? this.state.contactList[1].emergencyMobile
  4141. : ""
  4142. }
  4143. onChange={(e) => {
  4144. this.state.contactList[1].emergencyMobile = e.target.value;
  4145. let obj = this.state.contactList;
  4146. this.setState({
  4147. contactList: obj,
  4148. });
  4149. }}
  4150. />
  4151. </FormItem>
  4152. </div>
  4153. <div className="clearfix">
  4154. <FormItem
  4155. className="half-item"
  4156. labelCol={{ span: 6 }}
  4157. wrapperCol={{ span: 30 }}
  4158. label="紧急联系人3"
  4159. >
  4160. <Input
  4161. placeholder="请输入名字"
  4162. style={{ width: 200 }}
  4163. value={
  4164. this.state.contactList.length
  4165. ? this.state.contactList[2].emergencyContact
  4166. : ""
  4167. }
  4168. onChange={(e) => {
  4169. this.state.contactList[2].emergencyContact = e.target.value;
  4170. let obj = this.state.contactList;
  4171. this.setState({
  4172. contactList: obj,
  4173. });
  4174. }}
  4175. />
  4176. </FormItem>
  4177. <FormItem
  4178. className="half-item"
  4179. labelCol={{ span: 6 }}
  4180. wrapperCol={{ span: 30 }}
  4181. label="紧急联系人电话"
  4182. >
  4183. <Input
  4184. placeholder="请输入电话"
  4185. style={{ width: 200 }}
  4186. value={
  4187. this.state.contactList.length
  4188. ? this.state.contactList[2].emergencyMobile
  4189. : ""
  4190. }
  4191. onChange={(e) => {
  4192. this.state.contactList[2].emergencyMobile = e.target.value;
  4193. let obj = this.state.contactList;
  4194. this.setState({
  4195. contactList: obj,
  4196. });
  4197. }}
  4198. />
  4199. </FormItem>
  4200. </div>
  4201. <Button
  4202. type="primary"
  4203. shape="round"
  4204. size="large"
  4205. style={{
  4206. position: "relative",
  4207. left: "50%",
  4208. transform: "translateX(-50%)",
  4209. }}
  4210. onClick={this.editPhone}
  4211. >
  4212. 保存
  4213. </Button>
  4214. </Spin>
  4215. </Modal>
  4216. <Modal
  4217. visible={this.state.entryVisible}
  4218. footer={null}
  4219. width={800}
  4220. onCancel={() => {
  4221. this.loadData();
  4222. this.entryCancel();
  4223. }}
  4224. >
  4225. <Spin spinning={this.state.loading}>
  4226. <h3
  4227. style={{
  4228. textAlign: "center",
  4229. paddingBottom: 10,
  4230. marginBottom: 10,
  4231. }}
  4232. >
  4233. 入职信息
  4234. </h3>
  4235. <div className="clearfix">
  4236. <FormItem
  4237. className="half-item"
  4238. labelCol={{ span: 6 }}
  4239. wrapperCol={{ span: 30 }}
  4240. label="毕业学校"
  4241. >
  4242. <Input
  4243. placeholder="输入学校名称"
  4244. style={{ width: 200 }}
  4245. value={this.state.school}
  4246. onChange={(e) => {
  4247. this.setState({
  4248. school: e.target.value,
  4249. });
  4250. }}
  4251. />
  4252. </FormItem>
  4253. <FormItem
  4254. className="half-item"
  4255. labelCol={{ span: 6 }}
  4256. wrapperCol={{ span: 30 }}
  4257. label="学历"
  4258. >
  4259. <Select
  4260. placeholder="请选择学历"
  4261. style={{ width: 200 }}
  4262. onChange={(e) => {
  4263. this.setState({ education: e });
  4264. }}
  4265. value={this.state.education}
  4266. >
  4267. <Option value="0">高中/中专</Option>
  4268. <Option value="1">专科/高职</Option>
  4269. <Option value="2">本科</Option>
  4270. <Option value="3">研究生</Option>
  4271. <Option value="5">博士</Option>
  4272. </Select>
  4273. </FormItem>
  4274. </div>
  4275. <div className="clearfix">
  4276. <FormItem
  4277. className="half-item"
  4278. labelCol={{ span: 6 }}
  4279. wrapperCol={{ span: 30 }}
  4280. label="所学专业"
  4281. >
  4282. <Input
  4283. placeholder="请输入专业名称"
  4284. style={{ width: 200 }}
  4285. value={this.state.major}
  4286. onChange={(e) => {
  4287. this.setState({
  4288. major: e.target.value,
  4289. });
  4290. }}
  4291. />
  4292. </FormItem>
  4293. <FormItem
  4294. className="half-item"
  4295. labelCol={{ span: 6 }}
  4296. wrapperCol={{ span: 30 }}
  4297. label="职称"
  4298. >
  4299. <Input
  4300. placeholder="请输入职称"
  4301. style={{ width: 200 }}
  4302. value={this.state.title}
  4303. onChange={(e) => {
  4304. this.setState({
  4305. title: e.target.value,
  4306. });
  4307. }}
  4308. />
  4309. </FormItem>
  4310. </div>
  4311. <div className="clearfix">
  4312. <FormItem
  4313. className="half-item"
  4314. labelCol={{ span: 6 }}
  4315. wrapperCol={{ span: 30 }}
  4316. label="备注"
  4317. >
  4318. <Input
  4319. placeholder="请输入备注"
  4320. style={{ width: 200 }}
  4321. value={this.state.entryRemarks}
  4322. onChange={(e) => {
  4323. this.setState({
  4324. entryRemarks: e.target.value,
  4325. });
  4326. }}
  4327. />
  4328. </FormItem>
  4329. </div>
  4330. <div
  4331. className="clearfix"
  4332. style={{ paddingLeft: 70, marginBottom: 10 }}
  4333. >
  4334. <div style={{ marginBottom: 10 }}>附件:</div>
  4335. <PicModal
  4336. remarks={this.picToArr(this.state.annexName)}
  4337. picUrl={this.picToArr(this.state.annexUrl)}
  4338. remove={this.ruzhiRemove}
  4339. />
  4340. <Button onClick={this.addPic}>添加附件</Button>
  4341. </div>
  4342. <Button
  4343. type="primary"
  4344. shape="round"
  4345. size="large"
  4346. style={{
  4347. position: "relative",
  4348. left: "50%",
  4349. transform: "translateX(-50%)",
  4350. }}
  4351. onClick={this.editRuzi}
  4352. >
  4353. 保存
  4354. </Button>
  4355. <AddPicModal
  4356. cancel={this.addPicModalCancel}
  4357. add={this.add()}
  4358. visible={this.state.addPicModal}
  4359. />
  4360. </Spin>
  4361. </Modal>
  4362. <Modal
  4363. visible={this.state.upgradeVisible}
  4364. footer={null}
  4365. width={800}
  4366. onCancel={() => {
  4367. this.loadData();
  4368. this.upgradeCancel();
  4369. }}
  4370. >
  4371. <Spin spinning={this.state.loading}>
  4372. <h3
  4373. style={{
  4374. textAlign: "center",
  4375. paddingBottom: 10,
  4376. marginBottom: 10,
  4377. }}
  4378. >
  4379. 晋升信息
  4380. </h3>
  4381. <div>
  4382. <div className="clearfix">
  4383. <FormItem
  4384. className="half-item"
  4385. labelCol={{ span: 6 }}
  4386. wrapperCol={{ span: 30 }}
  4387. label="当前职位"
  4388. >
  4389. <Select
  4390. placeholder="选择职位"
  4391. style={{ width: 200, marginRight: 10 }}
  4392. value={this.state.promotionList.oldJobs}
  4393. onChange={(e) => {
  4394. this.setState({ jobs: e, star: [] });
  4395. this.getList();
  4396. this.state.promotionList.oldJobs = e;
  4397. this.state.promotionList.oldLvl = [];
  4398. this.setState({
  4399. promotionList: this.state.promotionList,
  4400. });
  4401. }}
  4402. >
  4403. <Option value="1">员工</Option>
  4404. <Option value="2">试用营销员</Option>
  4405. <Option value="3">试用营销储备经理</Option>
  4406. <Option value="4">营销经理</Option>
  4407. <Option value="5">总监合伙人</Option>
  4408. <Option value="6">技术助理</Option>
  4409. <Option value="7">咨询师</Option>
  4410. <Option value="8">咨询师主管</Option>
  4411. <Option value="9">咨询师经理</Option>
  4412. <Option value="10">高级经理</Option>
  4413. </Select>
  4414. </FormItem>
  4415. <FormItem
  4416. className="half-item"
  4417. labelCol={{ span: 6 }}
  4418. wrapperCol={{ span: 30 }}
  4419. label="当前星级"
  4420. >
  4421. <Select
  4422. placeholder="请选择所属星级"
  4423. style={{ width: 200 }}
  4424. onChange={(e) => {
  4425. this.state.promotionList.oldLvl = e;
  4426. this.setState({
  4427. promotionList: this.state.promotionList,
  4428. });
  4429. }}
  4430. value={this.state.promotionList.oldLvl}
  4431. >
  4432. {this.state.starArr.map((item, index) => {
  4433. return <Option value={item.star}>{item.starName}</Option>;
  4434. })}
  4435. </Select>
  4436. </FormItem>
  4437. </div>
  4438. <div className="clearfix">
  4439. <FormItem
  4440. className="half-item"
  4441. labelCol={{ span: 6 }}
  4442. wrapperCol={{ span: 30 }}
  4443. label="晋升后职位"
  4444. >
  4445. <Select
  4446. placeholder="选择职位"
  4447. style={{ width: 200, marginRight: 10 }}
  4448. value={this.state.promotionList.newJobs}
  4449. onChange={(e) => {
  4450. this.setState({ jobss: e });
  4451. this.getLists();
  4452. this.state.promotionList.newJobs = e;
  4453. this.state.promotionList.newLvl = [];
  4454. this.setState({
  4455. promotionList: this.state.promotionList,
  4456. });
  4457. }}
  4458. >
  4459. <Option value="1">员工</Option>
  4460. <Option value="2">试用营销员</Option>
  4461. <Option value="3">试用营销储备经理</Option>
  4462. <Option value="4">营销经理</Option>
  4463. <Option value="5">总监合伙人</Option>
  4464. <Option value="6">技术助理</Option>
  4465. <Option value="7">咨询师</Option>
  4466. <Option value="8">咨询师主管</Option>
  4467. <Option value="9">咨询师经理</Option>
  4468. <Option value="10">高级经理</Option>
  4469. </Select>
  4470. </FormItem>
  4471. <FormItem
  4472. className="half-item"
  4473. labelCol={{ span: 6 }}
  4474. wrapperCol={{ span: 30 }}
  4475. label="晋升后星级"
  4476. >
  4477. <Select
  4478. placeholder="请选择所属星级"
  4479. style={{ width: 200 }}
  4480. onChange={(e) => {
  4481. this.state.promotionList.newLvl = e;
  4482. this.setState({
  4483. promotionList: this.state.promotionList,
  4484. });
  4485. }}
  4486. value={this.state.promotionList.newLvl}
  4487. >
  4488. {this.state.starArrs.map((item, index) => {
  4489. return <Option value={item.star}>{item.starName}</Option>;
  4490. })}
  4491. </Select>
  4492. </FormItem>
  4493. </div>
  4494. <div className="clearfix">
  4495. <FormItem
  4496. className="half-item"
  4497. labelCol={{ span: 6 }}
  4498. wrapperCol={{ span: 30 }}
  4499. label="晋升时间"
  4500. >
  4501. <DatePicker
  4502. value={
  4503. this.state.promotionList.promotionTimes
  4504. ? moment(this.state.promotionList.promotionTimes)
  4505. : null
  4506. }
  4507. style={{ width: 200 }}
  4508. onChange={(e, t) => {
  4509. this.state.promotionList.promotionTimes = t;
  4510. this.setState({
  4511. promotionList: this.state.promotionList,
  4512. });
  4513. }}
  4514. />
  4515. </FormItem>
  4516. </div>
  4517. <div className="clearfix">
  4518. <FormItem
  4519. className="half-item"
  4520. labelCol={{ span: 6 }}
  4521. wrapperCol={{ span: 30 }}
  4522. label="备注"
  4523. >
  4524. <Input
  4525. placeholder="请输入备注"
  4526. style={{ width: 200 }}
  4527. value={this.state.promotionList.promotionRemarks}
  4528. onChange={(e) => {
  4529. this.state.promotionList.promotionRemarks =
  4530. e.target.value;
  4531. this.setState({
  4532. promotionList: this.state.promotionList,
  4533. });
  4534. }}
  4535. />
  4536. </FormItem>
  4537. </div>
  4538. <div
  4539. className="clearfix"
  4540. style={{ paddingLeft: 70, marginBottom: 10 }}
  4541. >
  4542. <div style={{ marginBottom: 10 }}>附件:</div>
  4543. <PicModal
  4544. remarks={this.picToArr(this.state.promotionList.annexName)}
  4545. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  4546. remove={this.jinshengRemove}
  4547. />
  4548. <Button onClick={this.addPic}>添加附件</Button>
  4549. </div>
  4550. </div>
  4551. <Button
  4552. type="primary"
  4553. shape="round"
  4554. size="large"
  4555. style={{
  4556. position: "relative",
  4557. left: "50%",
  4558. transform: "translateX(-50%)",
  4559. }}
  4560. onClick={this.editUpgrade}
  4561. >
  4562. 保存
  4563. </Button>
  4564. <AddPicModal
  4565. cancel={this.addPicModalCancel}
  4566. add={this.add()}
  4567. visible={this.state.addPicModal}
  4568. />
  4569. </Spin>
  4570. </Modal>
  4571. <Modal
  4572. visible={this.state.contractVisible}
  4573. footer={null}
  4574. width={800}
  4575. onCancel={() => {
  4576. this.loadData();
  4577. this.contractCancel();
  4578. }}
  4579. >
  4580. <Spin spinning={this.state.loading}>
  4581. <h3
  4582. style={{
  4583. textAlign: "center",
  4584. paddingBottom: 10,
  4585. marginBottom: 10,
  4586. }}
  4587. >
  4588. 合同信息
  4589. </h3>
  4590. <div>
  4591. <div className="clearfix">
  4592. <FormItem
  4593. className="half-item"
  4594. labelCol={{ span: 6 }}
  4595. wrapperCol={{ span: 30 }}
  4596. label="签订时间"
  4597. >
  4598. <DatePicker
  4599. value={
  4600. this.state.contractList.startTimes
  4601. ? moment(this.state.contractList.startTimes)
  4602. : null
  4603. }
  4604. style={{ width: 200 }}
  4605. onChange={(e, t) => {
  4606. this.state.contractList.startTimes = t;
  4607. this.setState({
  4608. contractList: this.state.contractList,
  4609. });
  4610. }}
  4611. />
  4612. </FormItem>
  4613. <FormItem
  4614. className="half-item"
  4615. labelCol={{ span: 6 }}
  4616. wrapperCol={{ span: 30 }}
  4617. label="到期时间"
  4618. >
  4619. <DatePicker
  4620. disabledDate={(e) => {
  4621. let time = moment(e).valueOf();
  4622. let today = moment(
  4623. this.state.contractList.startTimes
  4624. ).valueOf();
  4625. if (time <= today) {
  4626. return true;
  4627. } else if (!this.state.contractList.startTimes) {
  4628. return true;
  4629. }
  4630. }}
  4631. value={
  4632. this.state.contractList.endTimes
  4633. ? moment(this.state.contractList.endTimes)
  4634. : null
  4635. }
  4636. style={{ width: 200 }}
  4637. onChange={(e, t) => {
  4638. this.state.contractList.endTimes = t;
  4639. this.setState({
  4640. contractList: this.state.contractList,
  4641. });
  4642. }}
  4643. />
  4644. </FormItem>
  4645. </div>
  4646. <div className="clearfix">
  4647. <FormItem
  4648. className="half-item"
  4649. labelCol={{ span: 6 }}
  4650. wrapperCol={{ span: 30 }}
  4651. label="备注"
  4652. >
  4653. <Input
  4654. placeholder="请输入备注"
  4655. style={{ width: 200 }}
  4656. value={this.state.contractList.contractRemarks}
  4657. onChange={(e) => {
  4658. this.state.contractList.contractRemarks = e.target.value;
  4659. this.setState({
  4660. contractList: this.state.contractList,
  4661. });
  4662. }}
  4663. />
  4664. </FormItem>
  4665. </div>
  4666. <div
  4667. className="clearfix"
  4668. style={{ paddingLeft: 70, marginBottom: 10 }}
  4669. >
  4670. <div style={{ marginBottom: 10 }}>附件:</div>
  4671. <PicModal
  4672. remarks={this.picToArr(this.state.contractList.annexName)}
  4673. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  4674. remove={this.contractRemove}
  4675. />
  4676. <Button onClick={this.addPic}>添加附件</Button>
  4677. </div>
  4678. </div>
  4679. <Button
  4680. type="primary"
  4681. shape="round"
  4682. size="large"
  4683. style={{
  4684. position: "relative",
  4685. left: "50%",
  4686. transform: "translateX(-50%)",
  4687. }}
  4688. onClick={this.editContract}
  4689. >
  4690. 保存
  4691. </Button>
  4692. <AddPicModal
  4693. cancel={this.addPicModalCancel}
  4694. add={this.add()}
  4695. visible={this.state.addPicModal}
  4696. />
  4697. </Spin>
  4698. </Modal>
  4699. <Modal
  4700. visible={this.state.chooseVisible}
  4701. footer={null}
  4702. width={800}
  4703. onCancel={() => {
  4704. this.loadData();
  4705. this.chooseCancel();
  4706. }}
  4707. >
  4708. <Spin spinning={this.state.loading}>
  4709. <h3
  4710. style={{
  4711. textAlign: "center",
  4712. paddingBottom: 10,
  4713. marginBottom: 10,
  4714. }}
  4715. >
  4716. 奖惩信息
  4717. </h3>
  4718. <div>
  4719. <div className="clearfix">
  4720. <FormItem
  4721. className="half-item"
  4722. labelCol={{ span: 6 }}
  4723. wrapperCol={{ span: 30 }}
  4724. label="类型"
  4725. >
  4726. <Radio.Group
  4727. onChange={(e) => {
  4728. this.state.chooseList.chooseStatus = e.target.value;
  4729. this.setState({ chooseList: this.state.chooseList });
  4730. }}
  4731. value={this.state.chooseList.chooseStatus}
  4732. >
  4733. <Radio value={0}>奖励</Radio>
  4734. <Radio value={1}>罚款</Radio>
  4735. </Radio.Group>
  4736. </FormItem>
  4737. <FormItem
  4738. className="half-item"
  4739. labelCol={{ span: 6 }}
  4740. wrapperCol={{ span: 30 }}
  4741. label="时间"
  4742. >
  4743. <DatePicker
  4744. value={
  4745. this.state.chooseList.effectTimes
  4746. ? moment(this.state.chooseList.effectTimes)
  4747. : null
  4748. }
  4749. style={{ width: 200 }}
  4750. onChange={(e, t) => {
  4751. this.state.chooseList.effectTimes = t;
  4752. this.setState({
  4753. chooseList: this.state.chooseList,
  4754. });
  4755. }}
  4756. />
  4757. </FormItem>
  4758. </div>
  4759. <div className="clearfix">
  4760. <FormItem
  4761. className="half-item"
  4762. labelCol={{ span: 6 }}
  4763. wrapperCol={{ span: 30 }}
  4764. label="内容"
  4765. >
  4766. <Input
  4767. placeholder="请输入内容"
  4768. style={{ width: 200 }}
  4769. value={this.state.chooseList.chooseRemarks}
  4770. onChange={(e) => {
  4771. this.state.chooseList.chooseRemarks = e.target.value;
  4772. this.setState({
  4773. chooseList: this.state.chooseList,
  4774. });
  4775. }}
  4776. />
  4777. </FormItem>
  4778. </div>
  4779. <div
  4780. className="clearfix"
  4781. style={{ paddingLeft: 70, marginBottom: 10 }}
  4782. >
  4783. <div style={{ marginBottom: 10 }}>附件:</div>
  4784. <PicModal
  4785. remarks={this.picToArr(this.state.chooseList.annexName)}
  4786. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  4787. remove={this.chooseRemove}
  4788. />
  4789. <Button onClick={this.addPic}>添加附件</Button>
  4790. </div>
  4791. </div>
  4792. <Button
  4793. type="primary"
  4794. shape="round"
  4795. size="large"
  4796. style={{
  4797. position: "relative",
  4798. left: "50%",
  4799. transform: "translateX(-50%)",
  4800. }}
  4801. onClick={this.editChoose}
  4802. >
  4803. 保存
  4804. </Button>
  4805. <AddPicModal
  4806. cancel={this.addPicModalCancel}
  4807. add={this.add()}
  4808. visible={this.state.addPicModal}
  4809. />
  4810. </Spin>
  4811. </Modal>
  4812. <Modal
  4813. visible={this.state.quitVisible}
  4814. footer={null}
  4815. width={800}
  4816. onCancel={() => {
  4817. this.loadData();
  4818. this.quitCancel();
  4819. }}
  4820. >
  4821. <Spin spinning={this.state.loading}>
  4822. <h3
  4823. style={{
  4824. textAlign: "center",
  4825. paddingBottom: 10,
  4826. marginBottom: 10,
  4827. }}
  4828. >
  4829. 离职信息
  4830. </h3>
  4831. <div>
  4832. <div className="clearfix">
  4833. <FormItem
  4834. className="half-item"
  4835. labelCol={{ span: 6 }}
  4836. wrapperCol={{ span: 30 }}
  4837. label="离职时间"
  4838. >
  4839. <DatePicker
  4840. value={
  4841. this.state.quitList.effectTimes
  4842. ? moment(this.state.quitList.effectTimes)
  4843. : null
  4844. }
  4845. style={{ width: 200 }}
  4846. onChange={(e, t) => {
  4847. this.state.quitList.effectTimes = t;
  4848. this.setState({
  4849. quitList: this.state.quitList,
  4850. });
  4851. }}
  4852. />
  4853. </FormItem>
  4854. </div>
  4855. <div className="clearfix">
  4856. <FormItem
  4857. className="half-item"
  4858. labelCol={{ span: 6 }}
  4859. wrapperCol={{ span: 30 }}
  4860. label="备注"
  4861. >
  4862. <Input
  4863. placeholder="请输入备注"
  4864. style={{ width: 200 }}
  4865. value={this.state.quitList.quitRemarks}
  4866. onChange={(e) => {
  4867. this.state.quitList.quitRemarks = e.target.value;
  4868. this.setState({
  4869. quitList: this.state.quitList,
  4870. });
  4871. }}
  4872. />
  4873. </FormItem>
  4874. </div>
  4875. <div
  4876. className="clearfix"
  4877. style={{ paddingLeft: 70, marginBottom: 10 }}
  4878. >
  4879. <div style={{ marginBottom: 10 }}>附件:</div>
  4880. <PicModal
  4881. remarks={this.picToArr(this.state.quitList.annexName)}
  4882. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  4883. remove={this.quitRemove}
  4884. />
  4885. <Button onClick={this.addPic}>添加附件</Button>
  4886. </div>
  4887. </div>
  4888. <Button
  4889. type="primary"
  4890. shape="round"
  4891. size="large"
  4892. style={{
  4893. position: "relative",
  4894. left: "50%",
  4895. transform: "translateX(-50%)",
  4896. }}
  4897. onClick={this.editQuit}
  4898. >
  4899. 保存
  4900. </Button>
  4901. <AddPicModal
  4902. cancel={this.addPicModalCancel}
  4903. add={this.add()}
  4904. visible={this.state.addPicModal}
  4905. />
  4906. </Spin>
  4907. </Modal>
  4908. <Modal
  4909. visible={this.state.welfareVisible}
  4910. footer={null}
  4911. width={800}
  4912. onCancel={() => {
  4913. this.loadData();
  4914. this.welfareCancel();
  4915. }}
  4916. >
  4917. <Spin spinning={this.state.loading}>
  4918. <h3
  4919. style={{
  4920. textAlign: "center",
  4921. paddingBottom: 10,
  4922. }}
  4923. >
  4924. 福利信息
  4925. </h3>
  4926. <Button
  4927. type="primary"
  4928. style={{ marginBottom: 5 }}
  4929. onClick={(e) => {
  4930. this.welfareTable();
  4931. }}
  4932. >
  4933. 新建信息
  4934. </Button>
  4935. <div>
  4936. <div className="clearfix" style={{ marginBottom: 10 }}>
  4937. <Table
  4938. columns={this.state.welfareColumnsEdit}
  4939. type="textarea"
  4940. dataSource={this.state.ModalData.welfareList}
  4941. pagination={false}
  4942. bordered
  4943. size="small"
  4944. scroll={{ x: "max-content", y: 0 }}
  4945. />
  4946. </div>
  4947. <div className="clearfix">
  4948. <FormItem
  4949. className="half-item"
  4950. labelCol={{ span: 6 }}
  4951. wrapperCol={{ span: 30 }}
  4952. label="备注"
  4953. >
  4954. <Input
  4955. placeholder="请输入备注"
  4956. style={{ width: 200 }}
  4957. value={this.state.ModalData.welfareRemarks}
  4958. onChange={(e) => {
  4959. this.state.ModalData.welfareRemarks = e.target.value;
  4960. this.setState({
  4961. ModalData: this.state.ModalData,
  4962. });
  4963. }}
  4964. />
  4965. </FormItem>
  4966. </div>
  4967. <div
  4968. className="clearfix"
  4969. style={{ paddingLeft: 70, marginBottom: 10 }}
  4970. >
  4971. <div style={{ marginBottom: 10 }}>附件:</div>
  4972. <PicModal
  4973. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  4974. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  4975. remove={this.welfareRemove}
  4976. />
  4977. <Button onClick={this.addPic}>添加附件</Button>
  4978. </div>
  4979. </div>
  4980. <Button
  4981. type="primary"
  4982. shape="round"
  4983. size="large"
  4984. style={{
  4985. position: "relative",
  4986. left: "50%",
  4987. transform: "translateX(-50%)",
  4988. }}
  4989. onClick={this.editWelfare}
  4990. >
  4991. 保存
  4992. </Button>
  4993. <AddPicModal
  4994. cancel={this.addPicModalCancel}
  4995. add={this.add()}
  4996. visible={this.state.addPicModal}
  4997. />
  4998. </Spin>
  4999. </Modal>
  5000. <Modal
  5001. visible={this.state.editWelfareVisible}
  5002. footer={null}
  5003. width={800}
  5004. onCancel={() => {
  5005. this.setState({
  5006. editWelfareVisible: false,
  5007. });
  5008. }}
  5009. >
  5010. <Spin spinning={this.state.loading}>
  5011. <div>
  5012. <div className="clearfix">
  5013. <FormItem
  5014. className="half-item"
  5015. labelCol={{ span: 6 }}
  5016. wrapperCol={{ span: 30 }}
  5017. label="福利类型"
  5018. >
  5019. <Select
  5020. placeholder="请选择类型"
  5021. value={this.state.editWelfareData.type}
  5022. onChange={(e) => {
  5023. this.state.editWelfareData.type = e;
  5024. this.setState({
  5025. editWelfareData: this.state.editWelfareData,
  5026. });
  5027. }}
  5028. style={{ width: 120, marginRight: 10 }}
  5029. >
  5030. <Option value={0}>社保</Option>
  5031. <Option value={1}>公积金</Option>
  5032. <Option value={2}>雇主险</Option>
  5033. </Select>
  5034. </FormItem>
  5035. <FormItem
  5036. className="half-item"
  5037. labelCol={{ span: 6 }}
  5038. wrapperCol={{ span: 30 }}
  5039. label="福利状态"
  5040. >
  5041. <Select
  5042. placeholder="请选择状态"
  5043. onChange={(e) => {
  5044. this.state.editWelfareData.status = e;
  5045. this.setState({
  5046. editWelfareData: this.state.editWelfareData,
  5047. });
  5048. }}
  5049. style={{ width: 120, marginRight: 10 }}
  5050. value={this.state.editWelfareData.status}
  5051. >
  5052. <Option value={0}>未购买</Option>
  5053. <Option value={1}>已购买</Option>
  5054. <Option value={2}>已停止</Option>
  5055. </Select>
  5056. </FormItem>
  5057. </div>
  5058. <div className="clearfix">
  5059. <FormItem
  5060. className="half-item"
  5061. labelCol={{ span: 6 }}
  5062. wrapperCol={{ span: 30 }}
  5063. style={{
  5064. display:
  5065. this.state.editWelfareData.status == 1 ? "block" : "none",
  5066. }}
  5067. label="购买时间"
  5068. >
  5069. <DatePicker
  5070. value={
  5071. this.state.editWelfareData.startTimes
  5072. ? moment(this.state.editWelfareData.startTimes)
  5073. : null
  5074. }
  5075. style={{ width: 200 }}
  5076. onChange={(e, t) => {
  5077. this.state.editWelfareData.startTimes = t;
  5078. this.setState({
  5079. editWelfareData: this.state.editWelfareData,
  5080. });
  5081. }}
  5082. />
  5083. </FormItem>
  5084. <FormItem
  5085. className="half-item"
  5086. labelCol={{ span: 6 }}
  5087. wrapperCol={{ span: 30 }}
  5088. style={{
  5089. display:
  5090. this.state.editWelfareData.status == 2 ? "block" : "none",
  5091. }}
  5092. label="停缴时间"
  5093. >
  5094. <DatePicker
  5095. value={
  5096. this.state.editWelfareData.endTimes
  5097. ? moment(this.state.editWelfareData.endTimes)
  5098. : null
  5099. }
  5100. style={{ width: 200 }}
  5101. onChange={(e, t) => {
  5102. this.state.editWelfareData.endTimes = t;
  5103. this.setState({
  5104. editWelfareData: this.state.editWelfareData,
  5105. });
  5106. }}
  5107. />
  5108. </FormItem>
  5109. </div>
  5110. <div className="clearfix">
  5111. <FormItem
  5112. className="half-item"
  5113. labelCol={{ span: 6 }}
  5114. wrapperCol={{ span: 30 }}
  5115. style={{
  5116. display:
  5117. this.state.editWelfareData.status == 1 ? "block" : "none",
  5118. }}
  5119. label="参保公司"
  5120. >
  5121. <Select
  5122. placeholder="选择公司"
  5123. style={{ width: 200, marginRight: 10 }}
  5124. value={
  5125. this.state.editWelfareData.depId
  5126. ? this.state.editWelfareData.depId
  5127. : undefined
  5128. }
  5129. onChange={(e) => {
  5130. this.state.editWelfareData.depId = e;
  5131. this.setState({
  5132. editWelfareData: this.state.editWelfareData,
  5133. });
  5134. }}
  5135. >
  5136. {departmentArr.map(function (item) {
  5137. return (
  5138. <Select.Option key={item.id}>{item.name}</Select.Option>
  5139. );
  5140. })}
  5141. </Select>
  5142. </FormItem>
  5143. </div>
  5144. <div className="clearfix">
  5145. <FormItem
  5146. className="half-item"
  5147. labelCol={{ span: 6 }}
  5148. wrapperCol={{ span: 30 }}
  5149. style={{
  5150. display:
  5151. this.state.editWelfareData.status == 0 ? "block" : "none",
  5152. }}
  5153. label="未购买备注"
  5154. >
  5155. <Input
  5156. placeholder="请输入备注信息"
  5157. style={{ width: 200 }}
  5158. value={this.state.editWelfareData.welfareRemarks}
  5159. onChange={(e) => {
  5160. this.state.editWelfareData.welfareRemarks =
  5161. e.target.value;
  5162. this.setState({
  5163. editWelfareData: this.state.editWelfareData,
  5164. });
  5165. }}
  5166. />
  5167. </FormItem>
  5168. </div>
  5169. </div>
  5170. <Button
  5171. type="primary"
  5172. shape="round"
  5173. size="large"
  5174. style={{
  5175. position: "relative",
  5176. left: "50%",
  5177. transform: "translateX(-50%)",
  5178. }}
  5179. onClick={this.editWelfareDataOk}
  5180. >
  5181. 保存
  5182. </Button>
  5183. </Spin>
  5184. </Modal>
  5185. </div>
  5186. );
  5187. },
  5188. });
  5189. export default PersonnelAll;