personnelAll.jsx 169 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201
  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. onCancel={() => {
  3740. this.loadData();
  3741. this.addPeoCancel();
  3742. }}
  3743. /> : null}
  3744. <Modal
  3745. maskClosable={false}
  3746. visible={this.state.stayVisible}
  3747. footer={null}
  3748. width={800}
  3749. onCancel={() => {
  3750. this.loadData();
  3751. this.stayCancel();
  3752. }}
  3753. >
  3754. <Spin spinning={this.state.loading}>
  3755. <h3
  3756. style={{
  3757. textAlign: "center",
  3758. paddingBottom: 10,
  3759. marginBottom: 10,
  3760. }}
  3761. >
  3762. 任职信息
  3763. </h3>
  3764. <div className="clearfix">
  3765. <FormItem
  3766. className="half-item"
  3767. labelCol={{ span: 6 }}
  3768. wrapperCol={{ span: 30 }}
  3769. label="员工状态"
  3770. >
  3771. <Select
  3772. placeholder="请选择状态"
  3773. style={{ width: 200 }}
  3774. onChange={(e) => {
  3775. this.setState({ status: e });
  3776. }}
  3777. value={this.state.status}
  3778. >
  3779. <Option value="0">实习生</Option>
  3780. <Option value="1">在职(试用期)</Option>
  3781. <Option value="2">在职(合同期)</Option>
  3782. <Option value="3">兼职</Option>
  3783. <Option value="4">已离职</Option>
  3784. </Select>
  3785. </FormItem>
  3786. <FormItem
  3787. className="half-item"
  3788. {...formItemLayout}
  3789. label="所属系统"
  3790. >
  3791. <Select
  3792. placeholder="请选择所属系统"
  3793. style={{ width: 200 }}
  3794. onChange={(e) => {
  3795. this.setState({ system: e });
  3796. }}
  3797. value={this.state.system}
  3798. >
  3799. <Option value="0">管理系统</Option>
  3800. <Option value="1">营销系统</Option>
  3801. <Option value="2">技术系统</Option>
  3802. </Select>
  3803. </FormItem>
  3804. </div>
  3805. <div className="clearfix">
  3806. <FormItem
  3807. className="half-item"
  3808. labelCol={{ span: 6 }}
  3809. wrapperCol={{ span: 30 }}
  3810. label="工作性质"
  3811. >
  3812. <Radio.Group
  3813. onChange={(e) => {
  3814. this.setState({ jobNature: e.target.value });
  3815. }}
  3816. value={this.state.jobNature}
  3817. >
  3818. <Radio value="0">全职</Radio>
  3819. <Radio value="1">兼职</Radio>
  3820. <Radio value="2">其他</Radio>
  3821. </Radio.Group>
  3822. <Input
  3823. placeholder="输入性质"
  3824. style={{
  3825. width: 80,
  3826. display:
  3827. this.state.jobNature == 2 ? "inline-block" : "none",
  3828. }}
  3829. value={this.state.jobNatureRemarks}
  3830. onChange={(e) => {
  3831. this.setState({
  3832. jobNatureRemarks: e.target.value,
  3833. });
  3834. }}
  3835. />
  3836. </FormItem>
  3837. <FormItem className="half-item" {...formItemLayout} label="工龄">
  3838. <span>{this.state.ModalData.workingYear}</span>
  3839. </FormItem>
  3840. </div>
  3841. <div className="clearfix">
  3842. <FormItem
  3843. className="half-item"
  3844. {...formItemLayout}
  3845. label="入职时间"
  3846. >
  3847. <DatePicker
  3848. value={
  3849. this.state.entryTimes ? moment(this.state.entryTimes) : null
  3850. }
  3851. style={{ width: 200 }}
  3852. onChange={(e, t) => {
  3853. this.setState({
  3854. entryTimes: t,
  3855. });
  3856. }}
  3857. />
  3858. </FormItem>
  3859. <FormItem
  3860. className="half-item"
  3861. {...formItemLayout}
  3862. label="转正时间"
  3863. >
  3864. <DatePicker
  3865. value={
  3866. this.state.promotionTimes
  3867. ? moment(this.state.promotionTimes)
  3868. : null
  3869. }
  3870. style={{ width: 200 }}
  3871. onChange={(e, t) => {
  3872. this.setState({
  3873. promotionTimes: t,
  3874. });
  3875. }}
  3876. />
  3877. </FormItem>
  3878. </div>
  3879. <div className="clearfix">
  3880. <FormItem
  3881. className="half-item"
  3882. {...formItemLayout}
  3883. label="所属公司"
  3884. >
  3885. <Select
  3886. placeholder="选择公司"
  3887. style={{ width: 200, marginRight: 10 }}
  3888. value={this.state.company}
  3889. onChange={(e) => {
  3890. this.setState({ company: e });
  3891. }}
  3892. >
  3893. {departmentArr.map(function (item) {
  3894. return (
  3895. <Select.Option key={item.id}>{item.name}</Select.Option>
  3896. );
  3897. })}
  3898. </Select>
  3899. </FormItem>
  3900. <FormItem className="half-item" {...formItemLayout} label="级别">
  3901. <Select
  3902. placeholder="请选择所属级别"
  3903. style={{ width: 200 }}
  3904. onChange={(e) => {
  3905. this.setState({ lvl: e });
  3906. }}
  3907. value={this.state.lvl}
  3908. >
  3909. <Option value="0">员工</Option>
  3910. <Option value="1">主管</Option>
  3911. <Option value="2">经理</Option>
  3912. <Option value="3">总经理</Option>
  3913. <Option value="4">副总裁</Option>
  3914. <Option value="5">副总</Option>
  3915. <Option value="6">总监</Option>
  3916. <Option value="7">董事长</Option>
  3917. </Select>
  3918. </FormItem>
  3919. </div>
  3920. <div className="clearfix">
  3921. <FormItem className="half-item" {...formItemLayout} label="职位">
  3922. <Select
  3923. placeholder="选择职位"
  3924. style={{ width: 200, marginRight: 10 }}
  3925. value={this.state.jobs}
  3926. onChange={(e) => {
  3927. this.setState({ jobs: e, star: [] });
  3928. this.getList();
  3929. }}
  3930. >
  3931. <Option value="1">员工</Option>
  3932. <Option value="2">试用营销员</Option>
  3933. <Option value="3">试用营销储备经理</Option>
  3934. <Option value="4">营销经理</Option>
  3935. <Option value="5">总监合伙人</Option>
  3936. <Option value="6">技术助理</Option>
  3937. <Option value="7">咨询师</Option>
  3938. <Option value="8">咨询师主管</Option>
  3939. <Option value="9">咨询师经理</Option>
  3940. <Option value="10">高级经理</Option>
  3941. </Select>
  3942. </FormItem>
  3943. <FormItem className="half-item" {...formItemLayout} label="星级">
  3944. <Select
  3945. placeholder="请选择所属星级"
  3946. style={{ width: 200 }}
  3947. onChange={(e) => {
  3948. this.setState({ star: e });
  3949. }}
  3950. value={this.state.star}
  3951. >
  3952. {this.state.starArr
  3953. ? this.state.starArr.map((item, index) => {
  3954. return (
  3955. <Option value={item.star}>{item.starName}</Option>
  3956. );
  3957. })
  3958. : []}
  3959. </Select>
  3960. </FormItem>
  3961. </div>
  3962. <div className="clearfix">
  3963. <FormItem
  3964. className="half-item"
  3965. labelCol={{ span: 6 }}
  3966. wrapperCol={{ span: 30 }}
  3967. label="岗位津贴"
  3968. >
  3969. <Input
  3970. placeholder="输入金额"
  3971. style={{ width: 200 }}
  3972. value={this.state.allowance}
  3973. onChange={(e) => {
  3974. this.setState({
  3975. allowance: e.target.value,
  3976. });
  3977. }}
  3978. />
  3979. </FormItem>
  3980. </div>
  3981. <Button
  3982. type="primary"
  3983. shape="round"
  3984. size="large"
  3985. style={{
  3986. position: "relative",
  3987. left: "50%",
  3988. transform: "translateX(-50%)",
  3989. }}
  3990. onClick={this.editStay}
  3991. >
  3992. 保存
  3993. </Button>
  3994. </Spin>
  3995. </Modal>
  3996. <Modal
  3997. maskClosable={false}
  3998. visible={this.state.phoneVisible}
  3999. footer={null}
  4000. width={800}
  4001. onCancel={() => {
  4002. this.loadData();
  4003. this.phoneCancel();
  4004. }}
  4005. >
  4006. <Spin spinning={this.state.loading}>
  4007. <h3
  4008. style={{
  4009. textAlign: "center",
  4010. paddingBottom: 10,
  4011. marginBottom: 10,
  4012. }}
  4013. >
  4014. 联系信息
  4015. </h3>
  4016. <div className="clearfix">
  4017. <FormItem
  4018. className="half-item"
  4019. labelCol={{ span: 6 }}
  4020. wrapperCol={{ span: 30 }}
  4021. label="手机号码"
  4022. >
  4023. <Input
  4024. placeholder="输入号码"
  4025. style={{ width: 200 }}
  4026. value={this.state.mobile}
  4027. onChange={(e) => {
  4028. this.setState({
  4029. mobile: e.target.value,
  4030. });
  4031. }}
  4032. />
  4033. </FormItem>
  4034. <FormItem
  4035. className="half-item"
  4036. labelCol={{ span: 6 }}
  4037. wrapperCol={{ span: 30 }}
  4038. label="办公室电话"
  4039. >
  4040. <Input
  4041. placeholder="输入电话"
  4042. style={{ width: 200 }}
  4043. value={this.state.fixedTel}
  4044. onChange={(e) => {
  4045. this.setState({
  4046. fixedTel: e.target.value,
  4047. });
  4048. }}
  4049. />
  4050. </FormItem>
  4051. </div>
  4052. <div className="clearfix">
  4053. <FormItem
  4054. className="half-item"
  4055. labelCol={{ span: 6 }}
  4056. wrapperCol={{ span: 30 }}
  4057. label="紧急联系人1"
  4058. >
  4059. <Input
  4060. placeholder="请输入名字"
  4061. style={{ width: 200 }}
  4062. value={
  4063. this.state.contactList.length
  4064. ? this.state.contactList[0].emergencyContact
  4065. : ""
  4066. }
  4067. onChange={(e) => {
  4068. this.state.contactList[0].emergencyContact = e.target.value;
  4069. let obj = this.state.contactList;
  4070. this.setState({
  4071. contactList: obj,
  4072. });
  4073. }}
  4074. />
  4075. </FormItem>
  4076. <FormItem
  4077. className="half-item"
  4078. labelCol={{ span: 6 }}
  4079. wrapperCol={{ span: 30 }}
  4080. label="紧急联系人电话"
  4081. >
  4082. <Input
  4083. placeholder="请输入电话"
  4084. style={{ width: 200 }}
  4085. value={
  4086. this.state.contactList.length
  4087. ? this.state.contactList[0].emergencyMobile
  4088. : ""
  4089. }
  4090. onChange={(e) => {
  4091. this.state.contactList[0].emergencyMobile = e.target.value;
  4092. let obj = this.state.contactList;
  4093. this.setState({
  4094. contactList: obj,
  4095. });
  4096. }}
  4097. />
  4098. </FormItem>
  4099. </div>
  4100. <div className="clearfix">
  4101. <FormItem
  4102. className="half-item"
  4103. labelCol={{ span: 6 }}
  4104. wrapperCol={{ span: 30 }}
  4105. label="紧急联系人2"
  4106. >
  4107. <Input
  4108. placeholder="请输入名字"
  4109. style={{ width: 200 }}
  4110. value={
  4111. this.state.contactList.length
  4112. ? this.state.contactList[1].emergencyContact
  4113. : ""
  4114. }
  4115. onChange={(e) => {
  4116. this.state.contactList[1].emergencyContact = e.target.value;
  4117. let obj = this.state.contactList;
  4118. this.setState({
  4119. contactList: obj,
  4120. });
  4121. }}
  4122. />
  4123. </FormItem>
  4124. <FormItem
  4125. className="half-item"
  4126. labelCol={{ span: 6 }}
  4127. wrapperCol={{ span: 30 }}
  4128. label="紧急联系人电话"
  4129. >
  4130. <Input
  4131. placeholder="请输入电话"
  4132. style={{ width: 200 }}
  4133. value={
  4134. this.state.contactList.length
  4135. ? this.state.contactList[1].emergencyMobile
  4136. : ""
  4137. }
  4138. onChange={(e) => {
  4139. this.state.contactList[1].emergencyMobile = e.target.value;
  4140. let obj = this.state.contactList;
  4141. this.setState({
  4142. contactList: obj,
  4143. });
  4144. }}
  4145. />
  4146. </FormItem>
  4147. </div>
  4148. <div className="clearfix">
  4149. <FormItem
  4150. className="half-item"
  4151. labelCol={{ span: 6 }}
  4152. wrapperCol={{ span: 30 }}
  4153. label="紧急联系人3"
  4154. >
  4155. <Input
  4156. placeholder="请输入名字"
  4157. style={{ width: 200 }}
  4158. value={
  4159. this.state.contactList.length
  4160. ? this.state.contactList[2].emergencyContact
  4161. : ""
  4162. }
  4163. onChange={(e) => {
  4164. this.state.contactList[2].emergencyContact = e.target.value;
  4165. let obj = this.state.contactList;
  4166. this.setState({
  4167. contactList: obj,
  4168. });
  4169. }}
  4170. />
  4171. </FormItem>
  4172. <FormItem
  4173. className="half-item"
  4174. labelCol={{ span: 6 }}
  4175. wrapperCol={{ span: 30 }}
  4176. label="紧急联系人电话"
  4177. >
  4178. <Input
  4179. placeholder="请输入电话"
  4180. style={{ width: 200 }}
  4181. value={
  4182. this.state.contactList.length
  4183. ? this.state.contactList[2].emergencyMobile
  4184. : ""
  4185. }
  4186. onChange={(e) => {
  4187. this.state.contactList[2].emergencyMobile = e.target.value;
  4188. let obj = this.state.contactList;
  4189. this.setState({
  4190. contactList: obj,
  4191. });
  4192. }}
  4193. />
  4194. </FormItem>
  4195. </div>
  4196. <Button
  4197. type="primary"
  4198. shape="round"
  4199. size="large"
  4200. style={{
  4201. position: "relative",
  4202. left: "50%",
  4203. transform: "translateX(-50%)",
  4204. }}
  4205. onClick={this.editPhone}
  4206. >
  4207. 保存
  4208. </Button>
  4209. </Spin>
  4210. </Modal>
  4211. <Modal
  4212. visible={this.state.entryVisible}
  4213. footer={null}
  4214. width={800}
  4215. onCancel={() => {
  4216. this.loadData();
  4217. this.entryCancel();
  4218. }}
  4219. >
  4220. <Spin spinning={this.state.loading}>
  4221. <h3
  4222. style={{
  4223. textAlign: "center",
  4224. paddingBottom: 10,
  4225. marginBottom: 10,
  4226. }}
  4227. >
  4228. 入职信息
  4229. </h3>
  4230. <div className="clearfix">
  4231. <FormItem
  4232. className="half-item"
  4233. labelCol={{ span: 6 }}
  4234. wrapperCol={{ span: 30 }}
  4235. label="毕业学校"
  4236. >
  4237. <Input
  4238. placeholder="输入学校名称"
  4239. style={{ width: 200 }}
  4240. value={this.state.school}
  4241. onChange={(e) => {
  4242. this.setState({
  4243. school: e.target.value,
  4244. });
  4245. }}
  4246. />
  4247. </FormItem>
  4248. <FormItem
  4249. className="half-item"
  4250. labelCol={{ span: 6 }}
  4251. wrapperCol={{ span: 30 }}
  4252. label="学历"
  4253. >
  4254. <Select
  4255. placeholder="请选择学历"
  4256. style={{ width: 200 }}
  4257. onChange={(e) => {
  4258. this.setState({ education: e });
  4259. }}
  4260. value={this.state.education}
  4261. >
  4262. <Option value="0">高中/中专</Option>
  4263. <Option value="1">专科/高职</Option>
  4264. <Option value="2">本科</Option>
  4265. <Option value="3">研究生</Option>
  4266. <Option value="5">博士</Option>
  4267. </Select>
  4268. </FormItem>
  4269. </div>
  4270. <div className="clearfix">
  4271. <FormItem
  4272. className="half-item"
  4273. labelCol={{ span: 6 }}
  4274. wrapperCol={{ span: 30 }}
  4275. label="所学专业"
  4276. >
  4277. <Input
  4278. placeholder="请输入专业名称"
  4279. style={{ width: 200 }}
  4280. value={this.state.major}
  4281. onChange={(e) => {
  4282. this.setState({
  4283. major: e.target.value,
  4284. });
  4285. }}
  4286. />
  4287. </FormItem>
  4288. <FormItem
  4289. className="half-item"
  4290. labelCol={{ span: 6 }}
  4291. wrapperCol={{ span: 30 }}
  4292. label="职称"
  4293. >
  4294. <Input
  4295. placeholder="请输入职称"
  4296. style={{ width: 200 }}
  4297. value={this.state.title}
  4298. onChange={(e) => {
  4299. this.setState({
  4300. title: e.target.value,
  4301. });
  4302. }}
  4303. />
  4304. </FormItem>
  4305. </div>
  4306. <div className="clearfix">
  4307. <FormItem
  4308. className="half-item"
  4309. labelCol={{ span: 6 }}
  4310. wrapperCol={{ span: 30 }}
  4311. label="备注"
  4312. >
  4313. <Input
  4314. placeholder="请输入备注"
  4315. style={{ width: 200 }}
  4316. value={this.state.entryRemarks}
  4317. onChange={(e) => {
  4318. this.setState({
  4319. entryRemarks: e.target.value,
  4320. });
  4321. }}
  4322. />
  4323. </FormItem>
  4324. </div>
  4325. <div
  4326. className="clearfix"
  4327. style={{ paddingLeft: 70, marginBottom: 10 }}
  4328. >
  4329. <div style={{ marginBottom: 10 }}>附件:</div>
  4330. <PicModal
  4331. remarks={this.picToArr(this.state.annexName)}
  4332. picUrl={this.picToArr(this.state.annexUrl)}
  4333. remove={this.ruzhiRemove}
  4334. />
  4335. <Button onClick={this.addPic}>添加附件</Button>
  4336. </div>
  4337. <Button
  4338. type="primary"
  4339. shape="round"
  4340. size="large"
  4341. style={{
  4342. position: "relative",
  4343. left: "50%",
  4344. transform: "translateX(-50%)",
  4345. }}
  4346. onClick={this.editRuzi}
  4347. >
  4348. 保存
  4349. </Button>
  4350. <AddPicModal
  4351. cancel={this.addPicModalCancel}
  4352. add={this.add()}
  4353. visible={this.state.addPicModal}
  4354. />
  4355. </Spin>
  4356. </Modal>
  4357. <Modal
  4358. visible={this.state.upgradeVisible}
  4359. footer={null}
  4360. width={800}
  4361. onCancel={() => {
  4362. this.loadData();
  4363. this.upgradeCancel();
  4364. }}
  4365. >
  4366. <Spin spinning={this.state.loading}>
  4367. <h3
  4368. style={{
  4369. textAlign: "center",
  4370. paddingBottom: 10,
  4371. marginBottom: 10,
  4372. }}
  4373. >
  4374. 晋升信息
  4375. </h3>
  4376. <div>
  4377. <div className="clearfix">
  4378. <FormItem
  4379. className="half-item"
  4380. labelCol={{ span: 6 }}
  4381. wrapperCol={{ span: 30 }}
  4382. label="当前职位"
  4383. >
  4384. <Select
  4385. placeholder="选择职位"
  4386. style={{ width: 200, marginRight: 10 }}
  4387. value={this.state.promotionList.oldJobs}
  4388. onChange={(e) => {
  4389. this.setState({ jobs: e, star: [] });
  4390. this.getList();
  4391. this.state.promotionList.oldJobs = e;
  4392. this.state.promotionList.oldLvl = [];
  4393. this.setState({
  4394. promotionList: this.state.promotionList,
  4395. });
  4396. }}
  4397. >
  4398. <Option value="1">员工</Option>
  4399. <Option value="2">试用营销员</Option>
  4400. <Option value="3">试用营销储备经理</Option>
  4401. <Option value="4">营销经理</Option>
  4402. <Option value="5">总监合伙人</Option>
  4403. <Option value="6">技术助理</Option>
  4404. <Option value="7">咨询师</Option>
  4405. <Option value="8">咨询师主管</Option>
  4406. <Option value="9">咨询师经理</Option>
  4407. <Option value="10">高级经理</Option>
  4408. </Select>
  4409. </FormItem>
  4410. <FormItem
  4411. className="half-item"
  4412. labelCol={{ span: 6 }}
  4413. wrapperCol={{ span: 30 }}
  4414. label="当前星级"
  4415. >
  4416. <Select
  4417. placeholder="请选择所属星级"
  4418. style={{ width: 200 }}
  4419. onChange={(e) => {
  4420. this.state.promotionList.oldLvl = e;
  4421. this.setState({
  4422. promotionList: this.state.promotionList,
  4423. });
  4424. }}
  4425. value={this.state.promotionList.oldLvl}
  4426. >
  4427. {this.state.starArr.map((item, index) => {
  4428. return <Option value={item.star}>{item.starName}</Option>;
  4429. })}
  4430. </Select>
  4431. </FormItem>
  4432. </div>
  4433. <div className="clearfix">
  4434. <FormItem
  4435. className="half-item"
  4436. labelCol={{ span: 6 }}
  4437. wrapperCol={{ span: 30 }}
  4438. label="晋升后职位"
  4439. >
  4440. <Select
  4441. placeholder="选择职位"
  4442. style={{ width: 200, marginRight: 10 }}
  4443. value={this.state.promotionList.newJobs}
  4444. onChange={(e) => {
  4445. this.setState({ jobss: e });
  4446. this.getLists();
  4447. this.state.promotionList.newJobs = e;
  4448. this.state.promotionList.newLvl = [];
  4449. this.setState({
  4450. promotionList: this.state.promotionList,
  4451. });
  4452. }}
  4453. >
  4454. <Option value="1">员工</Option>
  4455. <Option value="2">试用营销员</Option>
  4456. <Option value="3">试用营销储备经理</Option>
  4457. <Option value="4">营销经理</Option>
  4458. <Option value="5">总监合伙人</Option>
  4459. <Option value="6">技术助理</Option>
  4460. <Option value="7">咨询师</Option>
  4461. <Option value="8">咨询师主管</Option>
  4462. <Option value="9">咨询师经理</Option>
  4463. <Option value="10">高级经理</Option>
  4464. </Select>
  4465. </FormItem>
  4466. <FormItem
  4467. className="half-item"
  4468. labelCol={{ span: 6 }}
  4469. wrapperCol={{ span: 30 }}
  4470. label="晋升后星级"
  4471. >
  4472. <Select
  4473. placeholder="请选择所属星级"
  4474. style={{ width: 200 }}
  4475. onChange={(e) => {
  4476. this.state.promotionList.newLvl = e;
  4477. this.setState({
  4478. promotionList: this.state.promotionList,
  4479. });
  4480. }}
  4481. value={this.state.promotionList.newLvl}
  4482. >
  4483. {this.state.starArrs.map((item, index) => {
  4484. return <Option value={item.star}>{item.starName}</Option>;
  4485. })}
  4486. </Select>
  4487. </FormItem>
  4488. </div>
  4489. <div className="clearfix">
  4490. <FormItem
  4491. className="half-item"
  4492. labelCol={{ span: 6 }}
  4493. wrapperCol={{ span: 30 }}
  4494. label="晋升时间"
  4495. >
  4496. <DatePicker
  4497. value={
  4498. this.state.promotionList.promotionTimes
  4499. ? moment(this.state.promotionList.promotionTimes)
  4500. : null
  4501. }
  4502. style={{ width: 200 }}
  4503. onChange={(e, t) => {
  4504. this.state.promotionList.promotionTimes = t;
  4505. this.setState({
  4506. promotionList: this.state.promotionList,
  4507. });
  4508. }}
  4509. />
  4510. </FormItem>
  4511. </div>
  4512. <div className="clearfix">
  4513. <FormItem
  4514. className="half-item"
  4515. labelCol={{ span: 6 }}
  4516. wrapperCol={{ span: 30 }}
  4517. label="备注"
  4518. >
  4519. <Input
  4520. placeholder="请输入备注"
  4521. style={{ width: 200 }}
  4522. value={this.state.promotionList.promotionRemarks}
  4523. onChange={(e) => {
  4524. this.state.promotionList.promotionRemarks =
  4525. e.target.value;
  4526. this.setState({
  4527. promotionList: this.state.promotionList,
  4528. });
  4529. }}
  4530. />
  4531. </FormItem>
  4532. </div>
  4533. <div
  4534. className="clearfix"
  4535. style={{ paddingLeft: 70, marginBottom: 10 }}
  4536. >
  4537. <div style={{ marginBottom: 10 }}>附件:</div>
  4538. <PicModal
  4539. remarks={this.picToArr(this.state.promotionList.annexName)}
  4540. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  4541. remove={this.jinshengRemove}
  4542. />
  4543. <Button onClick={this.addPic}>添加附件</Button>
  4544. </div>
  4545. </div>
  4546. <Button
  4547. type="primary"
  4548. shape="round"
  4549. size="large"
  4550. style={{
  4551. position: "relative",
  4552. left: "50%",
  4553. transform: "translateX(-50%)",
  4554. }}
  4555. onClick={this.editUpgrade}
  4556. >
  4557. 保存
  4558. </Button>
  4559. <AddPicModal
  4560. cancel={this.addPicModalCancel}
  4561. add={this.add()}
  4562. visible={this.state.addPicModal}
  4563. />
  4564. </Spin>
  4565. </Modal>
  4566. <Modal
  4567. visible={this.state.contractVisible}
  4568. footer={null}
  4569. width={800}
  4570. onCancel={() => {
  4571. this.loadData();
  4572. this.contractCancel();
  4573. }}
  4574. >
  4575. <Spin spinning={this.state.loading}>
  4576. <h3
  4577. style={{
  4578. textAlign: "center",
  4579. paddingBottom: 10,
  4580. marginBottom: 10,
  4581. }}
  4582. >
  4583. 合同信息
  4584. </h3>
  4585. <div>
  4586. <div className="clearfix">
  4587. <FormItem
  4588. className="half-item"
  4589. labelCol={{ span: 6 }}
  4590. wrapperCol={{ span: 30 }}
  4591. label="签订时间"
  4592. >
  4593. <DatePicker
  4594. value={
  4595. this.state.contractList.startTimes
  4596. ? moment(this.state.contractList.startTimes)
  4597. : null
  4598. }
  4599. style={{ width: 200 }}
  4600. onChange={(e, t) => {
  4601. this.state.contractList.startTimes = t;
  4602. this.setState({
  4603. contractList: this.state.contractList,
  4604. });
  4605. }}
  4606. />
  4607. </FormItem>
  4608. <FormItem
  4609. className="half-item"
  4610. labelCol={{ span: 6 }}
  4611. wrapperCol={{ span: 30 }}
  4612. label="到期时间"
  4613. >
  4614. <DatePicker
  4615. disabledDate={(e) => {
  4616. let time = moment(e).valueOf();
  4617. let today = moment(
  4618. this.state.contractList.startTimes
  4619. ).valueOf();
  4620. if (time <= today) {
  4621. return true;
  4622. } else if (!this.state.contractList.startTimes) {
  4623. return true;
  4624. }
  4625. }}
  4626. value={
  4627. this.state.contractList.endTimes
  4628. ? moment(this.state.contractList.endTimes)
  4629. : null
  4630. }
  4631. style={{ width: 200 }}
  4632. onChange={(e, t) => {
  4633. this.state.contractList.endTimes = t;
  4634. this.setState({
  4635. contractList: this.state.contractList,
  4636. });
  4637. }}
  4638. />
  4639. </FormItem>
  4640. </div>
  4641. <div className="clearfix">
  4642. <FormItem
  4643. className="half-item"
  4644. labelCol={{ span: 6 }}
  4645. wrapperCol={{ span: 30 }}
  4646. label="备注"
  4647. >
  4648. <Input
  4649. placeholder="请输入备注"
  4650. style={{ width: 200 }}
  4651. value={this.state.contractList.contractRemarks}
  4652. onChange={(e) => {
  4653. this.state.contractList.contractRemarks = e.target.value;
  4654. this.setState({
  4655. contractList: this.state.contractList,
  4656. });
  4657. }}
  4658. />
  4659. </FormItem>
  4660. </div>
  4661. <div
  4662. className="clearfix"
  4663. style={{ paddingLeft: 70, marginBottom: 10 }}
  4664. >
  4665. <div style={{ marginBottom: 10 }}>附件:</div>
  4666. <PicModal
  4667. remarks={this.picToArr(this.state.contractList.annexName)}
  4668. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  4669. remove={this.contractRemove}
  4670. />
  4671. <Button onClick={this.addPic}>添加附件</Button>
  4672. </div>
  4673. </div>
  4674. <Button
  4675. type="primary"
  4676. shape="round"
  4677. size="large"
  4678. style={{
  4679. position: "relative",
  4680. left: "50%",
  4681. transform: "translateX(-50%)",
  4682. }}
  4683. onClick={this.editContract}
  4684. >
  4685. 保存
  4686. </Button>
  4687. <AddPicModal
  4688. cancel={this.addPicModalCancel}
  4689. add={this.add()}
  4690. visible={this.state.addPicModal}
  4691. />
  4692. </Spin>
  4693. </Modal>
  4694. <Modal
  4695. visible={this.state.chooseVisible}
  4696. footer={null}
  4697. width={800}
  4698. onCancel={() => {
  4699. this.loadData();
  4700. this.chooseCancel();
  4701. }}
  4702. >
  4703. <Spin spinning={this.state.loading}>
  4704. <h3
  4705. style={{
  4706. textAlign: "center",
  4707. paddingBottom: 10,
  4708. marginBottom: 10,
  4709. }}
  4710. >
  4711. 奖惩信息
  4712. </h3>
  4713. <div>
  4714. <div className="clearfix">
  4715. <FormItem
  4716. className="half-item"
  4717. labelCol={{ span: 6 }}
  4718. wrapperCol={{ span: 30 }}
  4719. label="类型"
  4720. >
  4721. <Radio.Group
  4722. onChange={(e) => {
  4723. this.state.chooseList.chooseStatus = e.target.value;
  4724. this.setState({ chooseList: this.state.chooseList });
  4725. }}
  4726. value={this.state.chooseList.chooseStatus}
  4727. >
  4728. <Radio value={0}>奖励</Radio>
  4729. <Radio value={1}>罚款</Radio>
  4730. </Radio.Group>
  4731. </FormItem>
  4732. <FormItem
  4733. className="half-item"
  4734. labelCol={{ span: 6 }}
  4735. wrapperCol={{ span: 30 }}
  4736. label="时间"
  4737. >
  4738. <DatePicker
  4739. value={
  4740. this.state.chooseList.effectTimes
  4741. ? moment(this.state.chooseList.effectTimes)
  4742. : null
  4743. }
  4744. style={{ width: 200 }}
  4745. onChange={(e, t) => {
  4746. this.state.chooseList.effectTimes = t;
  4747. this.setState({
  4748. chooseList: this.state.chooseList,
  4749. });
  4750. }}
  4751. />
  4752. </FormItem>
  4753. </div>
  4754. <div className="clearfix">
  4755. <FormItem
  4756. className="half-item"
  4757. labelCol={{ span: 6 }}
  4758. wrapperCol={{ span: 30 }}
  4759. label="内容"
  4760. >
  4761. <Input
  4762. placeholder="请输入内容"
  4763. style={{ width: 200 }}
  4764. value={this.state.chooseList.chooseRemarks}
  4765. onChange={(e) => {
  4766. this.state.chooseList.chooseRemarks = e.target.value;
  4767. this.setState({
  4768. chooseList: this.state.chooseList,
  4769. });
  4770. }}
  4771. />
  4772. </FormItem>
  4773. </div>
  4774. <div
  4775. className="clearfix"
  4776. style={{ paddingLeft: 70, marginBottom: 10 }}
  4777. >
  4778. <div style={{ marginBottom: 10 }}>附件:</div>
  4779. <PicModal
  4780. remarks={this.picToArr(this.state.chooseList.annexName)}
  4781. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  4782. remove={this.chooseRemove}
  4783. />
  4784. <Button onClick={this.addPic}>添加附件</Button>
  4785. </div>
  4786. </div>
  4787. <Button
  4788. type="primary"
  4789. shape="round"
  4790. size="large"
  4791. style={{
  4792. position: "relative",
  4793. left: "50%",
  4794. transform: "translateX(-50%)",
  4795. }}
  4796. onClick={this.editChoose}
  4797. >
  4798. 保存
  4799. </Button>
  4800. <AddPicModal
  4801. cancel={this.addPicModalCancel}
  4802. add={this.add()}
  4803. visible={this.state.addPicModal}
  4804. />
  4805. </Spin>
  4806. </Modal>
  4807. <Modal
  4808. visible={this.state.quitVisible}
  4809. footer={null}
  4810. width={800}
  4811. onCancel={() => {
  4812. this.loadData();
  4813. this.quitCancel();
  4814. }}
  4815. >
  4816. <Spin spinning={this.state.loading}>
  4817. <h3
  4818. style={{
  4819. textAlign: "center",
  4820. paddingBottom: 10,
  4821. marginBottom: 10,
  4822. }}
  4823. >
  4824. 离职信息
  4825. </h3>
  4826. <div>
  4827. <div className="clearfix">
  4828. <FormItem
  4829. className="half-item"
  4830. labelCol={{ span: 6 }}
  4831. wrapperCol={{ span: 30 }}
  4832. label="离职时间"
  4833. >
  4834. <DatePicker
  4835. value={
  4836. this.state.quitList.effectTimes
  4837. ? moment(this.state.quitList.effectTimes)
  4838. : null
  4839. }
  4840. style={{ width: 200 }}
  4841. onChange={(e, t) => {
  4842. this.state.quitList.effectTimes = t;
  4843. this.setState({
  4844. quitList: this.state.quitList,
  4845. });
  4846. }}
  4847. />
  4848. </FormItem>
  4849. </div>
  4850. <div className="clearfix">
  4851. <FormItem
  4852. className="half-item"
  4853. labelCol={{ span: 6 }}
  4854. wrapperCol={{ span: 30 }}
  4855. label="备注"
  4856. >
  4857. <Input
  4858. placeholder="请输入备注"
  4859. style={{ width: 200 }}
  4860. value={this.state.quitList.quitRemarks}
  4861. onChange={(e) => {
  4862. this.state.quitList.quitRemarks = e.target.value;
  4863. this.setState({
  4864. quitList: this.state.quitList,
  4865. });
  4866. }}
  4867. />
  4868. </FormItem>
  4869. </div>
  4870. <div
  4871. className="clearfix"
  4872. style={{ paddingLeft: 70, marginBottom: 10 }}
  4873. >
  4874. <div style={{ marginBottom: 10 }}>附件:</div>
  4875. <PicModal
  4876. remarks={this.picToArr(this.state.quitList.annexName)}
  4877. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  4878. remove={this.quitRemove}
  4879. />
  4880. <Button onClick={this.addPic}>添加附件</Button>
  4881. </div>
  4882. </div>
  4883. <Button
  4884. type="primary"
  4885. shape="round"
  4886. size="large"
  4887. style={{
  4888. position: "relative",
  4889. left: "50%",
  4890. transform: "translateX(-50%)",
  4891. }}
  4892. onClick={this.editQuit}
  4893. >
  4894. 保存
  4895. </Button>
  4896. <AddPicModal
  4897. cancel={this.addPicModalCancel}
  4898. add={this.add()}
  4899. visible={this.state.addPicModal}
  4900. />
  4901. </Spin>
  4902. </Modal>
  4903. <Modal
  4904. visible={this.state.welfareVisible}
  4905. footer={null}
  4906. width={800}
  4907. onCancel={() => {
  4908. this.loadData();
  4909. this.welfareCancel();
  4910. }}
  4911. >
  4912. <Spin spinning={this.state.loading}>
  4913. <h3
  4914. style={{
  4915. textAlign: "center",
  4916. paddingBottom: 10,
  4917. }}
  4918. >
  4919. 福利信息
  4920. </h3>
  4921. <Button
  4922. type="primary"
  4923. style={{ marginBottom: 5 }}
  4924. onClick={(e) => {
  4925. this.welfareTable();
  4926. }}
  4927. >
  4928. 新建信息
  4929. </Button>
  4930. <div>
  4931. <div className="clearfix" style={{ marginBottom: 10 }}>
  4932. <Table
  4933. columns={this.state.welfareColumnsEdit}
  4934. type="textarea"
  4935. dataSource={this.state.ModalData.welfareList}
  4936. pagination={false}
  4937. bordered
  4938. size="small"
  4939. scroll={{ x: "max-content", y: 0 }}
  4940. />
  4941. </div>
  4942. <div className="clearfix">
  4943. <FormItem
  4944. className="half-item"
  4945. labelCol={{ span: 6 }}
  4946. wrapperCol={{ span: 30 }}
  4947. label="备注"
  4948. >
  4949. <Input
  4950. placeholder="请输入备注"
  4951. style={{ width: 200 }}
  4952. value={this.state.ModalData.welfareRemarks}
  4953. onChange={(e) => {
  4954. this.state.ModalData.welfareRemarks = e.target.value;
  4955. this.setState({
  4956. ModalData: this.state.ModalData,
  4957. });
  4958. }}
  4959. />
  4960. </FormItem>
  4961. </div>
  4962. <div
  4963. className="clearfix"
  4964. style={{ paddingLeft: 70, marginBottom: 10 }}
  4965. >
  4966. <div style={{ marginBottom: 10 }}>附件:</div>
  4967. <PicModal
  4968. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  4969. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  4970. remove={this.welfareRemove}
  4971. />
  4972. <Button onClick={this.addPic}>添加附件</Button>
  4973. </div>
  4974. </div>
  4975. <Button
  4976. type="primary"
  4977. shape="round"
  4978. size="large"
  4979. style={{
  4980. position: "relative",
  4981. left: "50%",
  4982. transform: "translateX(-50%)",
  4983. }}
  4984. onClick={this.editWelfare}
  4985. >
  4986. 保存
  4987. </Button>
  4988. <AddPicModal
  4989. cancel={this.addPicModalCancel}
  4990. add={this.add()}
  4991. visible={this.state.addPicModal}
  4992. />
  4993. </Spin>
  4994. </Modal>
  4995. <Modal
  4996. visible={this.state.editWelfareVisible}
  4997. footer={null}
  4998. width={800}
  4999. onCancel={() => {
  5000. this.setState({
  5001. editWelfareVisible: false,
  5002. });
  5003. }}
  5004. >
  5005. <Spin spinning={this.state.loading}>
  5006. <div>
  5007. <div className="clearfix">
  5008. <FormItem
  5009. className="half-item"
  5010. labelCol={{ span: 6 }}
  5011. wrapperCol={{ span: 30 }}
  5012. label="福利类型"
  5013. >
  5014. <Select
  5015. placeholder="请选择类型"
  5016. value={this.state.editWelfareData.type}
  5017. onChange={(e) => {
  5018. this.state.editWelfareData.type = e;
  5019. this.setState({
  5020. editWelfareData: this.state.editWelfareData,
  5021. });
  5022. }}
  5023. style={{ width: 120, marginRight: 10 }}
  5024. >
  5025. <Option value={0}>社保</Option>
  5026. <Option value={1}>公积金</Option>
  5027. <Option value={2}>雇主险</Option>
  5028. </Select>
  5029. </FormItem>
  5030. <FormItem
  5031. className="half-item"
  5032. labelCol={{ span: 6 }}
  5033. wrapperCol={{ span: 30 }}
  5034. label="福利状态"
  5035. >
  5036. <Select
  5037. placeholder="请选择状态"
  5038. onChange={(e) => {
  5039. this.state.editWelfareData.status = e;
  5040. this.setState({
  5041. editWelfareData: this.state.editWelfareData,
  5042. });
  5043. }}
  5044. style={{ width: 120, marginRight: 10 }}
  5045. value={this.state.editWelfareData.status}
  5046. >
  5047. <Option value={0}>未购买</Option>
  5048. <Option value={1}>已购买</Option>
  5049. <Option value={2}>已停止</Option>
  5050. </Select>
  5051. </FormItem>
  5052. </div>
  5053. <div className="clearfix">
  5054. <FormItem
  5055. className="half-item"
  5056. labelCol={{ span: 6 }}
  5057. wrapperCol={{ span: 30 }}
  5058. style={{
  5059. display:
  5060. this.state.editWelfareData.status == 1 ? "block" : "none",
  5061. }}
  5062. label="购买时间"
  5063. >
  5064. <DatePicker
  5065. value={
  5066. this.state.editWelfareData.startTimes
  5067. ? moment(this.state.editWelfareData.startTimes)
  5068. : null
  5069. }
  5070. style={{ width: 200 }}
  5071. onChange={(e, t) => {
  5072. this.state.editWelfareData.startTimes = t;
  5073. this.setState({
  5074. editWelfareData: this.state.editWelfareData,
  5075. });
  5076. }}
  5077. />
  5078. </FormItem>
  5079. <FormItem
  5080. className="half-item"
  5081. labelCol={{ span: 6 }}
  5082. wrapperCol={{ span: 30 }}
  5083. style={{
  5084. display:
  5085. this.state.editWelfareData.status == 2 ? "block" : "none",
  5086. }}
  5087. label="停缴时间"
  5088. >
  5089. <DatePicker
  5090. value={
  5091. this.state.editWelfareData.endTimes
  5092. ? moment(this.state.editWelfareData.endTimes)
  5093. : null
  5094. }
  5095. style={{ width: 200 }}
  5096. onChange={(e, t) => {
  5097. this.state.editWelfareData.endTimes = t;
  5098. this.setState({
  5099. editWelfareData: this.state.editWelfareData,
  5100. });
  5101. }}
  5102. />
  5103. </FormItem>
  5104. </div>
  5105. <div className="clearfix">
  5106. <FormItem
  5107. className="half-item"
  5108. labelCol={{ span: 6 }}
  5109. wrapperCol={{ span: 30 }}
  5110. style={{
  5111. display:
  5112. this.state.editWelfareData.status == 1 ? "block" : "none",
  5113. }}
  5114. label="参保公司"
  5115. >
  5116. <Select
  5117. placeholder="选择公司"
  5118. style={{ width: 200, marginRight: 10 }}
  5119. value={
  5120. this.state.editWelfareData.depId
  5121. ? this.state.editWelfareData.depId
  5122. : undefined
  5123. }
  5124. onChange={(e) => {
  5125. this.state.editWelfareData.depId = e;
  5126. this.setState({
  5127. editWelfareData: this.state.editWelfareData,
  5128. });
  5129. }}
  5130. >
  5131. {departmentArr.map(function (item) {
  5132. return (
  5133. <Select.Option key={item.id}>{item.name}</Select.Option>
  5134. );
  5135. })}
  5136. </Select>
  5137. </FormItem>
  5138. </div>
  5139. <div className="clearfix">
  5140. <FormItem
  5141. className="half-item"
  5142. labelCol={{ span: 6 }}
  5143. wrapperCol={{ span: 30 }}
  5144. style={{
  5145. display:
  5146. this.state.editWelfareData.status == 0 ? "block" : "none",
  5147. }}
  5148. label="未购买备注"
  5149. >
  5150. <Input
  5151. placeholder="请输入备注信息"
  5152. style={{ width: 200 }}
  5153. value={this.state.editWelfareData.welfareRemarks}
  5154. onChange={(e) => {
  5155. this.state.editWelfareData.welfareRemarks =
  5156. e.target.value;
  5157. this.setState({
  5158. editWelfareData: this.state.editWelfareData,
  5159. });
  5160. }}
  5161. />
  5162. </FormItem>
  5163. </div>
  5164. </div>
  5165. <Button
  5166. type="primary"
  5167. shape="round"
  5168. size="large"
  5169. style={{
  5170. position: "relative",
  5171. left: "50%",
  5172. transform: "translateX(-50%)",
  5173. }}
  5174. onClick={this.editWelfareDataOk}
  5175. >
  5176. 保存
  5177. </Button>
  5178. </Spin>
  5179. </Modal>
  5180. </div>
  5181. );
  5182. },
  5183. });
  5184. export default PersonnelAll;