personnelAll.jsx 194 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899
  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 { splitUrl } from "@/tools";
  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. console.log(data);
  654. }
  655. }
  656. window.location.href =
  657. globalConfig.context +
  658. "/api/admin/personnel/exportPersonnelList?" +
  659. $.param(data);
  660. },
  661. departmentList() {
  662. $.ajax({
  663. method: "get",
  664. dataType: "json",
  665. crossDomain: false,
  666. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  667. data: {},
  668. success: function (data) {
  669. let thedata = data.data;
  670. let theArr = [];
  671. if (!thedata) {
  672. if (data.error && data.error.length) {
  673. message.warning(data.error[0].message);
  674. }
  675. } else {
  676. thedata.map(function (item, index) {
  677. theArr.push({
  678. key: index,
  679. name: item.name,
  680. id: item.id,
  681. });
  682. });
  683. }
  684. this.setState({
  685. departmentArr: theArr,
  686. });
  687. }.bind(this),
  688. });
  689. },
  690. welfareTable(record) {
  691. this.setState({
  692. editWelfareVisible: true,
  693. });
  694. if (record) {
  695. this.setState({
  696. editWelfareData: record,
  697. });
  698. } else {
  699. let editWelfareData = {
  700. status: undefined,
  701. id: undefined,
  702. depId: [],
  703. pdId: this.state.ModalData.id,
  704. type: undefined,
  705. welfareRemarks: undefined,
  706. endTimes: undefined,
  707. startTimes: undefined,
  708. };
  709. this.setState({
  710. editWelfareData
  711. });
  712. }
  713. },
  714. editWelfareDataOk() {
  715. this.setState({
  716. loading: true,
  717. });
  718. $.ajax({
  719. method: "post",
  720. dataType: "json",
  721. crossDomain: false,
  722. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  723. data: {
  724. startTimes:
  725. this.state.editWelfareData.status == 1 ||
  726. this.state.editWelfareData.status == 2
  727. ? this.state.editWelfareData.startTimes
  728. : "",
  729. endTimes:
  730. this.state.editWelfareData.status == 2
  731. ? this.state.editWelfareData.endTimes
  732. : "",
  733. pdId: this.state.editWelfareData.pdId,
  734. welfareRemarks:
  735. this.state.editWelfareData.status == 0
  736. ? this.state.editWelfareData.welfareRemarks
  737. : "",
  738. type: this.state.editWelfareData.type,
  739. id: this.state.editWelfareData.id,
  740. status: this.state.editWelfareData.status,
  741. depId: this.state.editWelfareData.status == 0 ? "" : this.state.editWelfareData.depId,
  742. },
  743. success: function (data) {
  744. let theArr = [];
  745. if (data.error && data.error.length) {
  746. message.warning(data.error[0].message);
  747. } else {
  748. message.success("修改成功!");
  749. this.loadData();
  750. this.tableRowClick(this.state.ModalData);
  751. this.setState({
  752. editWelfareVisible: false,
  753. });
  754. }
  755. }.bind(this),
  756. }).always(
  757. function () {
  758. this.setState({
  759. loading: false,
  760. });
  761. }.bind(this)
  762. );
  763. },
  764. getWelfareData() {
  765. this.setState({
  766. loading: true,
  767. });
  768. $.ajax({
  769. method: "post",
  770. dataType: "json",
  771. crossDomain: false,
  772. url: globalConfig.context + "/api/admin/personnel/add",
  773. data: {
  774. name: this.state.name,
  775. doorId: this.state.doorId,
  776. sex: this.state.sex,
  777. nation: this.state.nation,
  778. residenceProvince: this.state.residence[0],
  779. residenceCity: this.state.residence[1],
  780. residenceArea: this.state.residence[2],
  781. residenceAddress: this.state.residenceAddress,
  782. nativePlaceProvince: this.state.nativePlace[0],
  783. nativePlaceCity: this.state.nativePlace[1],
  784. nowProvince: this.state.now[0],
  785. nowCity: this.state.now[1],
  786. nowArea: this.state.now[2],
  787. nowAddress: this.state.nowAddress,
  788. idCard: this.state.idCard,
  789. certificationAuthority: this.state.certificationAuthority,
  790. marriage: this.state.marriage,
  791. politicalOutlook: this.state.politicalOutlook,
  792. son: this.state.son,
  793. girl: this.state.girl,
  794. birthdays: this.state.birthdays,
  795. marriage: this.state.marriage,
  796. },
  797. success: function (data) {
  798. let theArr = [];
  799. if (data.error && data.error.length) {
  800. message.warning(data.error[0].message);
  801. } else {
  802. message.success("添加成功!");
  803. this.loadData();
  804. this.addPeoCancel();
  805. }
  806. }.bind(this),
  807. }).always(
  808. function () {
  809. this.setState({
  810. loading: false,
  811. });
  812. }.bind(this)
  813. );
  814. },
  815. changeList(arr) {
  816. const newArr = [];
  817. this.state.columns.forEach((item) => {
  818. arr.forEach((val) => {
  819. if (val === item.title) {
  820. newArr.push(item);
  821. }
  822. });
  823. });
  824. this.setState({
  825. changeList: newArr,
  826. });
  827. },
  828. addPeo() {
  829. this.setState({
  830. peoVisible: true,
  831. isAddPeo: true,
  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. marriage: undefined,
  857. });
  858. },
  859. verifyDoor() {
  860. this.setState({
  861. loading: true,
  862. });
  863. $.ajax({
  864. method: "get",
  865. dataType: "json",
  866. crossDomain: false,
  867. url: globalConfig.context + "/api/admin/personnel/checkDoorId",
  868. data: {
  869. doorId: this.state.doorId,
  870. id: this.state.id,
  871. },
  872. success: function (data) {
  873. if (data.error && data.error.length) {
  874. message.warning(data.error[0].message);
  875. } else {
  876. message.success("此编号未被占用");
  877. }
  878. }.bind(this),
  879. }).always(
  880. function () {
  881. this.setState({
  882. loading: false,
  883. });
  884. }.bind(this)
  885. );
  886. },
  887. verifyId() {
  888. this.setState({
  889. loading: true,
  890. });
  891. $.ajax({
  892. method: "get",
  893. dataType: "json",
  894. crossDomain: false,
  895. url: globalConfig.context + "/api/admin/personnel/checkEmployeeId",
  896. data: {
  897. employeeId: this.state.employeeId,
  898. id: this.state.id
  899. },
  900. success: function (data) {
  901. if (data.error && data.error.length) {
  902. message.warning(data.error[0].message);
  903. } else {
  904. message.success("此编号未被占用");
  905. }
  906. }.bind(this),
  907. }).always(
  908. function () {
  909. this.setState({
  910. loading: false,
  911. });
  912. }.bind(this)
  913. );
  914. },
  915. addOk() {
  916. this.setState({
  917. loading: true,
  918. });
  919. $.ajax({
  920. method: "post",
  921. dataType: "json",
  922. crossDomain: false,
  923. url: globalConfig.context + "/api/admin/personnel/add",
  924. data: {
  925. name: this.state.name,
  926. doorId: this.state.doorId,
  927. sex: this.state.sex,
  928. nation: this.state.nation,
  929. residenceProvince: this.state.residence[0],
  930. residenceCity: this.state.residence[1],
  931. residenceArea: this.state.residence[2],
  932. residenceAddress: this.state.residenceAddress,
  933. nativePlaceProvince: this.state.nativePlace[0],
  934. nativePlaceCity: this.state.nativePlace[1],
  935. nowProvince: this.state.now[0],
  936. nowCity: this.state.now[1],
  937. nowArea: this.state.now[2],
  938. nowAddress: this.state.nowAddress,
  939. idCard: this.state.idCard,
  940. certificationAuthority: this.state.certificationAuthority,
  941. marriage: this.state.marriage,
  942. politicalOutlook: this.state.politicalOutlook,
  943. son: this.state.son,
  944. girl: this.state.girl,
  945. birthdays: this.state.birthdays,
  946. marriage: this.state.marriage,
  947. employeeId: this.state.employeeId,
  948. },
  949. success: function (data) {
  950. let theArr = [];
  951. if (data.error && data.error.length) {
  952. message.warning(data.error[0].message);
  953. } else {
  954. message.success("添加成功!");
  955. this.loadData();
  956. this.addPeoCancel();
  957. }
  958. }.bind(this),
  959. }).always(
  960. function () {
  961. this.setState({
  962. loading: false,
  963. });
  964. }.bind(this)
  965. );
  966. },
  967. editOk() {
  968. this.setState({
  969. loading: true,
  970. });
  971. $.ajax({
  972. method: "post",
  973. dataType: "json",
  974. crossDomain: false,
  975. url: globalConfig.context + "/api/admin/personnel/update",
  976. data: {
  977. id: this.state.id,
  978. name: this.state.name,
  979. doorId: this.state.doorId,
  980. sex: this.state.sex,
  981. nation: this.state.nation,
  982. residenceProvince: this.state.residence[0],
  983. residenceCity: this.state.residence[1],
  984. residenceArea: this.state.residence[2],
  985. residenceAddress: this.state.residenceAddress,
  986. nativePlaceProvince: this.state.nativePlace[0],
  987. nativePlaceCity: this.state.nativePlace[1],
  988. nowProvince: this.state.now[0],
  989. nowCity: this.state.now[1],
  990. nowArea: this.state.now[2],
  991. nowAddress: this.state.nowAddress,
  992. idCard: this.state.idCard,
  993. certificationAuthority: this.state.certificationAuthority,
  994. marriage: this.state.marriage,
  995. politicalOutlook: this.state.politicalOutlook,
  996. son: this.state.son,
  997. girl: this.state.girl,
  998. birthdays: this.state.birthdays,
  999. marriage: this.state.marriage,
  1000. employeeId: this.state.employeeId,
  1001. },
  1002. success: function (data) {
  1003. let theArr = [];
  1004. if (data.error && data.error.length) {
  1005. message.warning(data.error[0].message);
  1006. } else {
  1007. message.success("修改成功!");
  1008. this.loadData();
  1009. this.tableRowClick(this.state.ModalData);
  1010. this.addPeoCancel();
  1011. }
  1012. }.bind(this),
  1013. }).always(
  1014. function () {
  1015. this.setState({
  1016. loading: false,
  1017. });
  1018. }.bind(this)
  1019. );
  1020. },
  1021. editPeo() {
  1022. this.state.residence[0] = this.state.ModalData.residenceProvince;
  1023. this.state.residence[1] = this.state.ModalData.residenceCity;
  1024. this.state.residence[2] = this.state.ModalData.residenceArea;
  1025. this.state.nativePlace[0] = this.state.ModalData.nativePlaceProvince;
  1026. this.state.nativePlace[1] = this.state.ModalData.nativePlaceCity;
  1027. this.state.now[0] = this.state.ModalData.nowProvince;
  1028. this.state.now[1] = this.state.ModalData.nowCity;
  1029. this.state.now[2] = this.state.ModalData.nowArea;
  1030. this.setState({
  1031. peoVisible: true,
  1032. isAddPeo: false,
  1033. id: this.state.ModalData.id,
  1034. doorId: this.state.ModalData.doorId,
  1035. name: this.state.ModalData.name,
  1036. birthdays: this.state.ModalData.birthdays,
  1037. sex: this.state.ModalData.sex,
  1038. nation: this.state.ModalData.nation,
  1039. residence: this.state.residence ? this.state.residence : [],
  1040. residenceAddress: this.state.ModalData.residenceAddress,
  1041. now: this.state.now ? this.state.now : [],
  1042. nowAddress: this.state.ModalData.nowAddress,
  1043. nativePlace: this.state.nativePlace ? this.state.nativePlace : [],
  1044. idCard: this.state.ModalData.idCard,
  1045. certificationAuthority: this.state.ModalData.certificationAuthority,
  1046. marriage: this.state.ModalData.marriage,
  1047. son: this.state.ModalData.son,
  1048. girl: this.state.ModalData.girl,
  1049. politicalOutlook: this.state.ModalData.politicalOutlook || this.state.ModalData.politicalOutlook == 0
  1050. ? this.state.ModalData.politicalOutlook
  1051. : undefined,
  1052. marriage: this.state.ModalData.marriage,
  1053. employeeId: this.state.ModalData.employeeId,
  1054. });
  1055. },
  1056. stayModal(id) {
  1057. this.setState({
  1058. stayVisible: true,
  1059. });
  1060. this.setState({
  1061. loading: true,
  1062. });
  1063. $.ajax({
  1064. method: "get",
  1065. dataType: "json",
  1066. crossDomain: false,
  1067. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1068. data: {
  1069. id: id,
  1070. },
  1071. success: function (data) {
  1072. let res = data.data;
  1073. let theArr = [];
  1074. if (data.error && data.error.length) {
  1075. message.warning(data.error[0].message);
  1076. } else {
  1077. this.setState({
  1078. id: res.id,
  1079. status: res.status + "",
  1080. system: res.system + "",
  1081. jobNature: res.jobNature,
  1082. jobNatureRemarks: res.jobNatureRemarks,
  1083. age: res.age,
  1084. entryTimes: res.entryTimes,
  1085. promotionTimes: res.promotionTimes,
  1086. company: res.company,
  1087. lvl: res.lvl ? res.lvl + "" : [],
  1088. jobs: res.jobs ? res.jobs + "" : [],
  1089. star: res.star ? res.star + "" : [],
  1090. allowance: res.allowance,
  1091. });
  1092. this.getList();
  1093. }
  1094. }.bind(this),
  1095. }).always(
  1096. function () {
  1097. this.setState({
  1098. loading: false,
  1099. });
  1100. }.bind(this)
  1101. );
  1102. },
  1103. stayCancel() {
  1104. this.setState({
  1105. stayVisible: false,
  1106. });
  1107. },
  1108. editStay() {
  1109. if (this.state.star == "" || this.state.star == undefined) {
  1110. message.warning("请选择星级");
  1111. return;
  1112. }
  1113. this.setState({
  1114. loading: true,
  1115. });
  1116. $.ajax({
  1117. method: "post",
  1118. dataType: "json",
  1119. crossDomain: false,
  1120. url: globalConfig.context + "/api/admin/personnel/update",
  1121. data: {
  1122. id: this.state.id,
  1123. status: this.state.status,
  1124. system: this.state.system,
  1125. jobNature: this.state.jobNature,
  1126. jobNatureRemarks: this.state.jobNatureRemarks,
  1127. entryTimes: this.state.entryTimes,
  1128. promotionTimes: this.state.promotionTimes,
  1129. company: this.state.company,
  1130. lvl: this.state.lvl,
  1131. jobs: this.state.jobs,
  1132. star: this.state.star,
  1133. allowance: this.state.allowance,
  1134. },
  1135. success: function (data) {
  1136. let res = data.data;
  1137. let theArr = [];
  1138. if (data.error && data.error.length) {
  1139. message.warning(data.error[0].message);
  1140. } else {
  1141. this.setState({
  1142. stayVisible: false,
  1143. });
  1144. this.tableRowClick(this.state.ModalData);
  1145. message.success("提交成功");
  1146. }
  1147. }.bind(this),
  1148. }).always(
  1149. function () {
  1150. this.setState({
  1151. loading: false,
  1152. });
  1153. }.bind(this)
  1154. );
  1155. },
  1156. phoneModal() {
  1157. let obj = [
  1158. {
  1159. id: undefined,
  1160. pdid: this.state.ModalData.id,
  1161. emergencyContact: "",
  1162. emergencyMobile: "",
  1163. },
  1164. {
  1165. id: undefined,
  1166. pdid: this.state.ModalData.id,
  1167. emergencyContact: "",
  1168. emergencyMobile: "",
  1169. },
  1170. {
  1171. id: undefined,
  1172. pdid: this.state.ModalData.id,
  1173. emergencyContact: "",
  1174. emergencyMobile: "",
  1175. },
  1176. ];
  1177. this.setState({
  1178. phoneVisible: true,
  1179. id: this.state.ModalData.id,
  1180. mobile: this.state.ModalData.mobile,
  1181. fixedTel: this.state.ModalData.fixedTel,
  1182. contactList: this.state.ModalData.contactList.length
  1183. ? JSON.parse(JSON.stringify(this.state.ModalData.contactList))
  1184. : obj,
  1185. });
  1186. },
  1187. phoneCancel() {
  1188. this.setState({
  1189. phoneVisible: false,
  1190. });
  1191. },
  1192. editPhone() {
  1193. this.setState({
  1194. loading: true,
  1195. });
  1196. $.ajax({
  1197. method: "post",
  1198. dataType: "json",
  1199. crossDomain: false,
  1200. url: globalConfig.context + "/api/admin/personnel/updateContact",
  1201. data: {
  1202. id: this.state.id,
  1203. mobile: this.state.mobile,
  1204. fixedTel: this.state.fixedTel,
  1205. contactList: JSON.stringify(this.state.contactList),
  1206. },
  1207. success: function (data) {
  1208. let theArr = [];
  1209. if (data.error && data.error.length) {
  1210. message.warning(data.error[0].message);
  1211. } else {
  1212. this.loadData();
  1213. this.phoneCancel();
  1214. this.tableRowClick(this.state.ModalData);
  1215. message.success("修改成功");
  1216. }
  1217. }.bind(this),
  1218. }).always(
  1219. function () {
  1220. this.setState({
  1221. loading: false,
  1222. });
  1223. }.bind(this)
  1224. );
  1225. },
  1226. entryModal() {
  1227. this.setState({
  1228. entryVisible: true,
  1229. });
  1230. this.setState({
  1231. loading: true,
  1232. });
  1233. $.ajax({
  1234. method: "get",
  1235. dataType: "json",
  1236. crossDomain: false,
  1237. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1238. data: {
  1239. id: this.state.ModalData.id,
  1240. },
  1241. success: function (data) {
  1242. let theArr = [];
  1243. if (data.error && data.error.length) {
  1244. message.warning(data.error[0].message);
  1245. } else {
  1246. this.setState({
  1247. id: data.data.personnelEntry ? data.data.personnelEntry.id : "",
  1248. school: data.data.personnelEntry
  1249. ? data.data.personnelEntry.school
  1250. : "",
  1251. education: data.data.personnelEntry
  1252. ? data.data.personnelEntry.education
  1253. : "",
  1254. major: data.data.personnelEntry
  1255. ? data.data.personnelEntry.major
  1256. : "",
  1257. title: data.data.personnelEntry
  1258. ? data.data.personnelEntry.title
  1259. : "",
  1260. entryRemarks: data.data.personnelEntry
  1261. ? data.data.personnelEntry.entryRemarks
  1262. : "",
  1263. annexUrl: data.data.personnelEntry
  1264. ? data.data.personnelEntry.annexUrl
  1265. ? data.data.personnelEntry.annexUrl
  1266. : ""
  1267. : "",
  1268. annexName: data.data.personnelEntry
  1269. ? data.data.personnelEntry.annexName
  1270. ? data.data.personnelEntry.annexName
  1271. : ""
  1272. : "",
  1273. });
  1274. // }
  1275. }
  1276. }.bind(this),
  1277. }).always(
  1278. function () {
  1279. this.setState({
  1280. loading: false,
  1281. });
  1282. }.bind(this)
  1283. );
  1284. },
  1285. entryCancel() {
  1286. this.tableRowClick(this.state.ModalData);
  1287. this.setState({
  1288. entryVisible: false,
  1289. });
  1290. },
  1291. cancel() {
  1292. this.setState({
  1293. visible: false,
  1294. detailFlag: false,
  1295. active: "1",
  1296. });
  1297. },
  1298. tableRowClick(record) {
  1299. this.setState({
  1300. visible: true,
  1301. id: record.id,
  1302. });
  1303. this.setState({
  1304. loading: true,
  1305. });
  1306. $.ajax({
  1307. method: "get",
  1308. dataType: "json",
  1309. crossDomain: false,
  1310. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  1311. data: {
  1312. id: record.id,
  1313. },
  1314. success: function (data) {
  1315. let theArr = [];
  1316. if (data.error && data.error.length) {
  1317. message.warning(data.error[0].message);
  1318. } else {
  1319. this.setState({
  1320. ModalData: data.data,
  1321. });
  1322. }
  1323. }.bind(this),
  1324. }).always(
  1325. function () {
  1326. this.setState({
  1327. loading: false,
  1328. });
  1329. }.bind(this)
  1330. );
  1331. },
  1332. search() {
  1333. this.loadData();
  1334. },
  1335. addPic() {
  1336. this.setState({
  1337. addPicModal: true,
  1338. });
  1339. },
  1340. addPicModalCancel() {
  1341. this.setState({
  1342. addPicModal: false,
  1343. });
  1344. },
  1345. getVoucherUrl(e) {
  1346. this.setState({
  1347. voucherUrl: e,
  1348. });
  1349. },
  1350. add() {
  1351. if (this.state.entryVisible) {
  1352. return this.addRuzhi;
  1353. } else if (this.state.upgradeVisible) {
  1354. return this.addJinsheng;
  1355. } else if (this.state.contractVisible) {
  1356. return this.addContract;
  1357. } else if (this.state.chooseVisible) {
  1358. return this.addChoose;
  1359. } else if (this.state.quitVisible) {
  1360. return this.addQuit;
  1361. } else if (this.state.welfareVisible) {
  1362. return this.addWelfare;
  1363. }
  1364. },
  1365. addRuzhi(e, i) {
  1366. this.setState({
  1367. addPicModal: false,
  1368. });
  1369. if (this.state.annexUrl.length > 0) {
  1370. this.state.annexUrl += "," + e;
  1371. this.state.annexName += "," + i;
  1372. } else {
  1373. this.state.annexUrl += e;
  1374. this.state.annexName += i;
  1375. }
  1376. this.setState({
  1377. annexUrl: this.state.annexUrl,
  1378. annexName: this.state.annexName,
  1379. });
  1380. },
  1381. addJinsheng(e, i) {
  1382. this.setState({
  1383. addPicModal: false,
  1384. });
  1385. if (
  1386. this.state.promotionList.annexUrl &&
  1387. this.state.promotionList.annexUrl.length > 0
  1388. ) {
  1389. this.state.promotionList.annexUrl += "," + e;
  1390. this.state.promotionList.annexName += "," + i;
  1391. } else {
  1392. this.state.promotionList.annexUrl = e;
  1393. this.state.promotionList.annexName = i;
  1394. }
  1395. this.setState({
  1396. promotionList: this.state.promotionList,
  1397. });
  1398. },
  1399. addContract(e, i) {
  1400. this.setState({
  1401. addPicModal: false,
  1402. });
  1403. if (
  1404. this.state.contractList.annexUrl &&
  1405. this.state.contractList.annexUrl.length > 0
  1406. ) {
  1407. this.state.contractList.annexUrl += "," + e;
  1408. this.state.contractList.annexName += "," + i;
  1409. } else {
  1410. this.state.contractList.annexUrl = e;
  1411. this.state.contractList.annexName = i;
  1412. }
  1413. this.setState({
  1414. contractList: this.state.contractList,
  1415. });
  1416. },
  1417. addChoose(e, i) {
  1418. this.setState({
  1419. addPicModal: false,
  1420. });
  1421. if (
  1422. this.state.chooseList.annexUrl &&
  1423. this.state.chooseList.annexUrl.length > 0
  1424. ) {
  1425. this.state.chooseList.annexUrl += "," + e;
  1426. this.state.chooseList.annexName += "," + i;
  1427. } else {
  1428. this.state.chooseList.annexUrl = e;
  1429. this.state.chooseList.annexName = i;
  1430. }
  1431. this.setState({
  1432. chooseList: this.state.chooseList,
  1433. });
  1434. },
  1435. addQuit(e, i) {
  1436. this.setState({
  1437. addPicModal: false,
  1438. });
  1439. if (
  1440. this.state.quitList.annexUrl &&
  1441. this.state.quitList.annexUrl.length > 0
  1442. ) {
  1443. this.state.quitList.annexUrl += "," + e;
  1444. this.state.quitList.annexName += "," + i;
  1445. } else {
  1446. this.state.quitList.annexUrl = e;
  1447. this.state.quitList.annexName = i;
  1448. }
  1449. this.setState({
  1450. quitList: this.state.quitList,
  1451. });
  1452. },
  1453. addWelfare(e, i) {
  1454. this.setState({
  1455. addPicModal: false,
  1456. });
  1457. if (
  1458. this.state.ModalData.welfareAnnexUrl &&
  1459. this.state.ModalData.welfareAnnexUrl.length > 0
  1460. ) {
  1461. this.state.ModalData.welfareAnnexUrl += "," + e;
  1462. this.state.ModalData.welfareAnnexName += "," + i;
  1463. } else {
  1464. this.state.ModalData.welfareAnnexUrl = e;
  1465. this.state.ModalData.welfareAnnexName = i;
  1466. }
  1467. this.setState({
  1468. ModalData: this.state.ModalData,
  1469. });
  1470. },
  1471. reset() {
  1472. this.state.nameSearch = undefined;
  1473. this.state.statusSearch = undefined;
  1474. this.state.departmenttList = undefined;
  1475. this.state.sexSearch = undefined;
  1476. this.state.marriageSearch = undefined;
  1477. this.state.politicalOutlookSearch = undefined;
  1478. this.state.birthdayMonthSearch = undefined;
  1479. this.state.systemSearch = undefined;
  1480. this.state.workingYearsSearch = undefined;
  1481. this.state.educationSearch = undefined;
  1482. this.state.promotionTime = [];
  1483. this.state.entryTime = [];
  1484. this.state.quitTime = [];
  1485. this.state.contractTime = [];
  1486. this.loadData();
  1487. },
  1488. peoStatus(e) {
  1489. if (e == 0) {
  1490. return "在职(试用期)";
  1491. } else if (e == 1) {
  1492. return "在职(正式工)";
  1493. } else if (e == 2) {
  1494. return "离职";
  1495. }
  1496. },
  1497. jobStatus(e, i) {
  1498. if (e == 0) {
  1499. return "全职";
  1500. } else if (e == 1) {
  1501. return "兼职";
  1502. } else if (e == 2) {
  1503. return i;
  1504. }
  1505. },
  1506. educationStatus(e) {
  1507. if (e == 0) {
  1508. return "高中/中专";
  1509. } else if (e == 1) {
  1510. return "专科/高职";
  1511. } else if (e == 2) {
  1512. return "本科";
  1513. } else if (e == 3) {
  1514. return "研究生";
  1515. } else if (e == 5) {
  1516. return "博士";
  1517. }
  1518. },
  1519. picToArr(e) {
  1520. if (!e) return [];
  1521. let arr = e.split(",");
  1522. return arr;
  1523. },
  1524. ruzhiRemove(e) {
  1525. let url = e.file.response.data;
  1526. let arr = this.state.annexUrl.split(",");
  1527. let arrName = this.state.annexName.split(",");
  1528. let num = "";
  1529. arr.forEach((item, index) => {
  1530. if (item == url) {
  1531. arr.splice(index, 1);
  1532. num = index;
  1533. }
  1534. });
  1535. arrName.splice(num, 1);
  1536. this.setState({
  1537. annexUrl: arr.join(","),
  1538. annexName: arrName.join(","),
  1539. });
  1540. },
  1541. jinshengRemove(e) {
  1542. let url = e.file.response.data;
  1543. let arr = this.state.promotionList.annexUrl.split(",");
  1544. let arrName = this.state.promotionList.annexName.split(",");
  1545. let num = "";
  1546. arr.forEach((item, index) => {
  1547. if (item == url) {
  1548. arr.splice(index, 1);
  1549. num = index;
  1550. }
  1551. });
  1552. arrName.splice(num, 1);
  1553. this.state.promotionList.annexUrl = arr.join(",");
  1554. this.state.promotionList.annexName = arrName.join(",");
  1555. this.setState({
  1556. promotionList: this.state.promotionList,
  1557. });
  1558. },
  1559. contractRemove(e) {
  1560. let url = e.file.response.data;
  1561. let arr = this.state.contractList.annexUrl.split(",");
  1562. let arrName = this.state.contractList.annexName.split(",");
  1563. let num = "";
  1564. arr.forEach((item, index) => {
  1565. if (item == url) {
  1566. arr.splice(index, 1);
  1567. num = index;
  1568. }
  1569. });
  1570. arrName.splice(num, 1);
  1571. this.state.contractList.annexUrl = arr.join(",");
  1572. this.state.contractList.annexName = arrName.join(",");
  1573. this.setState({
  1574. contractList: this.state.contractList,
  1575. });
  1576. },
  1577. chooseRemove(e) {
  1578. let url = e.file.response.data;
  1579. let arr = this.state.chooseList.annexUrl.split(",");
  1580. let arrName = this.state.chooseList.annexName.split(",");
  1581. let num = "";
  1582. arr.forEach((item, index) => {
  1583. if (item == url) {
  1584. arr.splice(index, 1);
  1585. num = index;
  1586. }
  1587. });
  1588. arrName.splice(num, 1);
  1589. this.state.chooseList.annexUrl = arr.join(",");
  1590. this.state.chooseList.annexName = arrName.join(",");
  1591. this.setState({
  1592. chooseList: this.state.chooseList,
  1593. });
  1594. },
  1595. quitRemove(e) {
  1596. let url = e.file.response.data;
  1597. let arr = this.state.quitList.annexUrl.split(",");
  1598. let arrName = this.state.quitList.annexName.split(",");
  1599. let num = "";
  1600. arr.forEach((item, index) => {
  1601. if (item == url) {
  1602. arr.splice(index, 1);
  1603. num = index;
  1604. }
  1605. });
  1606. arrName.splice(num, 1);
  1607. this.state.quitList.annexUrl = arr.join(",");
  1608. this.state.quitList.annexName = arrName.join(",");
  1609. this.setState({
  1610. quitList: this.state.quitList,
  1611. });
  1612. },
  1613. welfareRemove(e) {
  1614. let url = e.file.response.data;
  1615. let arr = this.state.ModalData.welfareAnnexUrl.split(",");
  1616. let arrName = this.state.ModalData.welfareAnnexName.split(",");
  1617. let num = "";
  1618. arr.forEach((item, index) => {
  1619. if (item == url) {
  1620. arr.splice(index, 1);
  1621. num = index;
  1622. }
  1623. });
  1624. arrName.splice(num, 1);
  1625. this.state.ModalData.welfareAnnexUrl = arr.join(",");
  1626. this.state.ModalData.welfareAnnexName = arrName.join(",");
  1627. this.setState({
  1628. ModalData: this.state.ModalData,
  1629. });
  1630. },
  1631. getList(jobs) {
  1632. this.setState({
  1633. loading: true,
  1634. });
  1635. $.ajax({
  1636. method: "get",
  1637. dataType: "json",
  1638. crossDomain: false,
  1639. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1640. data: {},
  1641. success: function (data) {
  1642. let theArr = [];
  1643. if (data.error && data.error.length) {
  1644. message.warning(data.error[0].message);
  1645. } else {
  1646. let arr = data.data;
  1647. let starArr = [];
  1648. arr.forEach((item, index) => {
  1649. if(jobs && item.jobs == jobs) {
  1650. let obj = {
  1651. star: item.lvl + "",
  1652. starName: item.lvlName,
  1653. };
  1654. starArr.push(obj);
  1655. return
  1656. }else if (!jobs && item.jobs == this.state.jobs) {
  1657. let obj = {
  1658. star: item.lvl + "",
  1659. starName: item.lvlName,
  1660. };
  1661. starArr.push(obj);
  1662. }
  1663. });
  1664. this.setState({
  1665. starArr,
  1666. });
  1667. }
  1668. }.bind(this),
  1669. }).always(
  1670. function () {
  1671. this.setState({
  1672. loading: false,
  1673. });
  1674. }.bind(this)
  1675. );
  1676. },
  1677. getLists(jobs) {
  1678. this.setState({
  1679. loading: true,
  1680. });
  1681. $.ajax({
  1682. method: "get",
  1683. dataType: "json",
  1684. crossDomain: false,
  1685. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1686. data: {},
  1687. success: function (data) {
  1688. let theArr = [];
  1689. if (data.error && data.error.length) {
  1690. message.warning(data.error[0].message);
  1691. } else {
  1692. let arr = data.data;
  1693. let starArrs = [];
  1694. arr.forEach((item, index) => {
  1695. if (jobs && item.jobs == jobs) {
  1696. let obj = {
  1697. star: item.lvl + "",
  1698. starName: item.lvlName,
  1699. };
  1700. starArrs.push(obj);
  1701. return;
  1702. }
  1703. if (item.jobs == this.state.jobss) {
  1704. let obj = {
  1705. star: item.lvl + "",
  1706. starName: item.lvlName,
  1707. };
  1708. starArrs.push(obj);
  1709. }
  1710. });
  1711. this.setState({
  1712. starArrs,
  1713. });
  1714. }
  1715. }.bind(this),
  1716. }).always(
  1717. function () {
  1718. this.setState({
  1719. loading: false,
  1720. });
  1721. }.bind(this)
  1722. );
  1723. },
  1724. editRuzi() {
  1725. this.setState({
  1726. loading: true,
  1727. });
  1728. $.ajax({
  1729. method: "post",
  1730. dataType: "json",
  1731. crossDomain: false,
  1732. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  1733. data: {
  1734. id: this.state.ModalData.id,
  1735. school: this.state.school,
  1736. education: this.state.education,
  1737. major: this.state.major,
  1738. title: this.state.title,
  1739. entryRemarks: this.state.entryRemarks,
  1740. annexUrl: this.state.annexUrl,
  1741. annexName: this.state.annexName,
  1742. },
  1743. success: function (data) {
  1744. let theArr = [];
  1745. if (data.error && data.error.length) {
  1746. message.warning(data.error[0].message);
  1747. } else {
  1748. this.loadData();
  1749. this.entryCancel();
  1750. this.tableRowClick(this.state.ModalData);
  1751. message.success("修改成功");
  1752. }
  1753. }.bind(this),
  1754. }).always(
  1755. function () {
  1756. this.setState({
  1757. loading: false,
  1758. });
  1759. }.bind(this)
  1760. );
  1761. },
  1762. upgradeCancel() {
  1763. this.tableRowClick(this.state.ModalData);
  1764. this.setState({
  1765. upgradeVisible: false,
  1766. });
  1767. },
  1768. contractCancel() {
  1769. this.tableRowClick(this.state.ModalData);
  1770. this.setState({
  1771. contractVisible: false,
  1772. });
  1773. },
  1774. chooseCancel() {
  1775. this.tableRowClick(this.state.ModalData);
  1776. this.setState({
  1777. chooseVisible: false,
  1778. });
  1779. },
  1780. quitCancel() {
  1781. this.tableRowClick(this.state.ModalData);
  1782. this.setState({
  1783. quitVisible: false,
  1784. });
  1785. },
  1786. welfareCancel() {
  1787. this.tableRowClick(this.state.ModalData);
  1788. this.setState({
  1789. welfareVisible: false,
  1790. });
  1791. },
  1792. upgradeModal(flag, index) {
  1793. this.setState({
  1794. upgradeVisible: true,
  1795. });
  1796. let obj = {
  1797. id: undefined,
  1798. pdId: this.state.ModalData.id,
  1799. oldJobs: [],
  1800. oldLvl: [],
  1801. newJobs: [],
  1802. newLvl: [],
  1803. promotionTimes: undefined,
  1804. promotionRemarks: undefined,
  1805. annexUrl: "",
  1806. annexName: "",
  1807. };
  1808. this.setState({
  1809. promotionList: flag ? obj : this.state.ModalData.promotionList[index],
  1810. });
  1811. this.getList(flag ? undefined : this.state.ModalData.promotionList[index].oldJobs);
  1812. this.getLists(flag ? undefined : this.state.ModalData.promotionList[index].newJobs);
  1813. },
  1814. contractModal(flag, index) {
  1815. this.setState({
  1816. contractVisible: true,
  1817. });
  1818. let obj = {
  1819. id: undefined,
  1820. pdId: this.state.ModalData.id,
  1821. startTimes: undefined,
  1822. endTimes: undefined,
  1823. contractRemarks: undefined,
  1824. annexUrl: "",
  1825. annexName: "",
  1826. };
  1827. this.setState({
  1828. contractList: flag ? obj : this.state.ModalData.contractList[index],
  1829. });
  1830. },
  1831. chooseModal(flag, index) {
  1832. this.setState({
  1833. chooseVisible: true,
  1834. });
  1835. let obj = {
  1836. id: undefined,
  1837. pdId: this.state.ModalData.id,
  1838. chooseStatus: undefined,
  1839. effectTimes: undefined,
  1840. chooseRemarks: undefined,
  1841. annexUrl: "",
  1842. annexName: "",
  1843. };
  1844. this.setState({
  1845. chooseList: flag ? obj : this.state.ModalData.chooseList[index],
  1846. });
  1847. },
  1848. quitModal(flag, index) {
  1849. this.setState({
  1850. quitVisible: true,
  1851. });
  1852. let obj = {
  1853. id: undefined,
  1854. pdId: this.state.ModalData.id,
  1855. effectTimes: undefined,
  1856. quitRemarks: undefined,
  1857. annexUrl: "",
  1858. annexName: "",
  1859. };
  1860. this.setState({
  1861. quitList: flag ? obj : this.state.ModalData.quitList[index],
  1862. });
  1863. },
  1864. welfareModal() {
  1865. this.setState({
  1866. welfareVisible: true,
  1867. });
  1868. },
  1869. editUpgrade() {
  1870. if(!this.state.promotionList.oldLvl.length || !this.state.promotionList.newLvl.length) {
  1871. message.warning("请选择星级")
  1872. return
  1873. }
  1874. this.setState({
  1875. loading: true,
  1876. });
  1877. $.ajax({
  1878. method: "post",
  1879. dataType: "json",
  1880. crossDomain: false,
  1881. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1882. data: {
  1883. id: this.state.promotionList.id,
  1884. pdId: this.state.promotionList.pdId,
  1885. oldJobs: this.state.promotionList.oldJobs,
  1886. oldLvl: this.state.promotionList.oldLvl,
  1887. newJobs: this.state.promotionList.newJobs,
  1888. newLvl: this.state.promotionList.newLvl,
  1889. promotionTimes: this.state.promotionList.promotionTimes,
  1890. promotionRemarks: this.state.promotionList.promotionRemarks,
  1891. annexUrl: this.state.promotionList.annexUrl,
  1892. annexName: this.state.promotionList.annexName,
  1893. },
  1894. success: function (data) {
  1895. let theArr = [];
  1896. if (data.error && data.error.length) {
  1897. message.warning(data.error[0].message);
  1898. } else {
  1899. this.loadData();
  1900. this.upgradeCancel();
  1901. message.success("修改成功");
  1902. }
  1903. }.bind(this),
  1904. }).always(
  1905. function () {
  1906. this.setState({
  1907. loading: false,
  1908. });
  1909. }.bind(this)
  1910. );
  1911. },
  1912. editContract() {
  1913. this.setState({
  1914. loading: true,
  1915. });
  1916. $.ajax({
  1917. method: "post",
  1918. dataType: "json",
  1919. crossDomain: false,
  1920. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1921. data: {
  1922. id: this.state.contractList.id,
  1923. pdId: this.state.contractList.pdId,
  1924. startTimes: this.state.contractList.startTimes,
  1925. endTimes: this.state.contractList.endTimes,
  1926. contractRemarks: this.state.contractList.contractRemarks,
  1927. annexUrl: this.state.contractList.annexUrl,
  1928. annexName: this.state.contractList.annexName,
  1929. },
  1930. success: function (data) {
  1931. let theArr = [];
  1932. if (data.error && data.error.length) {
  1933. message.warning(data.error[0].message);
  1934. } else {
  1935. this.loadData();
  1936. this.contractCancel();
  1937. message.success("修改成功");
  1938. }
  1939. }.bind(this),
  1940. }).always(
  1941. function () {
  1942. this.setState({
  1943. loading: false,
  1944. });
  1945. }.bind(this)
  1946. );
  1947. },
  1948. editChoose() {
  1949. this.setState({
  1950. loading: true,
  1951. });
  1952. $.ajax({
  1953. method: "post",
  1954. dataType: "json",
  1955. crossDomain: false,
  1956. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1957. data: {
  1958. id: this.state.chooseList.id,
  1959. pdId: this.state.chooseList.pdId,
  1960. chooseStatus: this.state.chooseList.chooseStatus,
  1961. effectTimes: this.state.chooseList.effectTimes,
  1962. chooseRemarks: this.state.chooseList.chooseRemarks,
  1963. annexUrl: this.state.chooseList.annexUrl,
  1964. annexName: this.state.chooseList.annexName,
  1965. },
  1966. success: function (data) {
  1967. let theArr = [];
  1968. if (data.error && data.error.length) {
  1969. message.warning(data.error[0].message);
  1970. } else {
  1971. this.loadData();
  1972. this.chooseCancel();
  1973. message.success("修改成功");
  1974. }
  1975. }.bind(this),
  1976. }).always(
  1977. function () {
  1978. this.setState({
  1979. loading: false,
  1980. });
  1981. }.bind(this)
  1982. );
  1983. },
  1984. editQuit() {
  1985. this.setState({
  1986. loading: true,
  1987. });
  1988. $.ajax({
  1989. method: "post",
  1990. dataType: "json",
  1991. crossDomain: false,
  1992. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1993. data: {
  1994. id: this.state.quitList.id,
  1995. pdId: this.state.quitList.pdId,
  1996. effectTimes: this.state.quitList.effectTimes,
  1997. quitRemarks: this.state.quitList.quitRemarks,
  1998. annexUrl: this.state.quitList.annexUrl,
  1999. annexName: this.state.quitList.annexName,
  2000. },
  2001. success: function (data) {
  2002. let theArr = [];
  2003. if (data.error && data.error.length) {
  2004. message.warning(data.error[0].message);
  2005. } else {
  2006. this.loadData();
  2007. this.quitCancel();
  2008. message.success("修改成功");
  2009. }
  2010. }.bind(this),
  2011. }).always(
  2012. function () {
  2013. this.setState({
  2014. loading: false,
  2015. });
  2016. }.bind(this)
  2017. );
  2018. },
  2019. editWelfare() {
  2020. this.setState({
  2021. loading: true,
  2022. });
  2023. $.ajax({
  2024. method: "post",
  2025. dataType: "json",
  2026. crossDomain: false,
  2027. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  2028. data: {
  2029. pdId: this.state.ModalData.id,
  2030. annexUrl: this.state.ModalData.welfareAnnexUrl,
  2031. annexName: this.state.ModalData.welfareAnnexName,
  2032. remarks: this.state.ModalData.welfareRemarks,
  2033. },
  2034. success: function (data) {
  2035. let theArr = [];
  2036. if (data.error && data.error.length) {
  2037. message.warning(data.error[0].message);
  2038. } else {
  2039. this.loadData();
  2040. this.welfareCancel();
  2041. message.success("修改成功");
  2042. }
  2043. }.bind(this),
  2044. }).always(
  2045. function () {
  2046. this.setState({
  2047. loading: false,
  2048. });
  2049. }.bind(this)
  2050. );
  2051. },
  2052. render() {
  2053. const rowSelection = {
  2054. selectedRowKeys: this.state.selectedRowKeys,
  2055. onChange: (selectedRowKeys, selectedRows) => {
  2056. this.setState({
  2057. selectedRows: selectedRows.slice(-1),
  2058. selectedRowKeys: selectedRowKeys.slice(-1),
  2059. });
  2060. },
  2061. };
  2062. const { RangePicker } = DatePicker;
  2063. const formItemLayout = {
  2064. labelCol: { span: 6 },
  2065. wrapperCol: { span: 16 },
  2066. };
  2067. let departmentArr = this.state.departmentArr || [];
  2068. return (
  2069. <div className="user-content">
  2070. <div className="content-title" style={{ marginBottom: 10 }}>
  2071. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  2072. </div>
  2073. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2074. <TabPane tab="更改表格显示数据" key="1">
  2075. <div style={{ marginLeft: 10 }}>
  2076. <ChooseList
  2077. columns={this.state.columns}
  2078. changeFn={this.changeList}
  2079. changeList={this.state.changeList}
  2080. top={55}
  2081. margin={11}
  2082. />
  2083. </div>
  2084. </TabPane>
  2085. <TabPane tab="搜索" key="2">
  2086. <div className="user-search" style={{ marginLeft: 10 }}>
  2087. <Input
  2088. placeholder="姓名"
  2089. style={{ width: 120 }}
  2090. value={this.state.nameSearch}
  2091. onChange={(e) => {
  2092. this.setState({ nameSearch: e.target.value });
  2093. }}
  2094. />
  2095. <Select
  2096. placeholder="员工状态"
  2097. onChange={(e) => {
  2098. this.setState({ statusSearch: e });
  2099. }}
  2100. style={{ width: 120, marginRight: 10 }}
  2101. value={this.state.statusSearch}
  2102. >
  2103. <Option value="0">实习生</Option>
  2104. <Option value="1">在职(试用期)</Option>
  2105. <Option value="2">在职(合同期)</Option>
  2106. <Option value="3">兼职</Option>
  2107. <Option value="4">离职</Option>
  2108. </Select>
  2109. <Select
  2110. placeholder="所属公司"
  2111. style={{ width: 120, marginRight: 10 }}
  2112. value={this.state.departmenttList}
  2113. onChange={(e) => {
  2114. this.setState({ departmenttList: e });
  2115. }}
  2116. >
  2117. {departmentArr.map(function (item) {
  2118. return (
  2119. <Select.Option key={item.id}>{item.name}</Select.Option>
  2120. );
  2121. })}
  2122. </Select>
  2123. <Select
  2124. placeholder="性别"
  2125. onChange={(e) => {
  2126. this.setState({ sexSearch: e });
  2127. }}
  2128. style={{ width: 120, marginRight: 10 }}
  2129. value={this.state.sexSearch}
  2130. >
  2131. <Option value="0">男</Option>
  2132. <Option value="1">女</Option>
  2133. </Select>
  2134. <Select
  2135. placeholder="婚姻状态"
  2136. onChange={(e) => {
  2137. this.setState({ marriageSearch: e });
  2138. }}
  2139. style={{ width: 120, marginRight: 10 }}
  2140. value={this.state.marriageSearch}
  2141. >
  2142. <Option value="0">未婚</Option>
  2143. <Option value="1">已婚</Option>
  2144. <Option value="2">离异</Option>
  2145. </Select>
  2146. <Select
  2147. placeholder="政治面貌"
  2148. onChange={(e) => {
  2149. this.setState({ politicalOutlookSearch: e });
  2150. }}
  2151. style={{ width: 120, marginRight: 10 }}
  2152. value={this.state.politicalOutlookSearch}
  2153. >
  2154. <Option value="0">群众</Option>
  2155. <Option value="1">中共预备党员</Option>
  2156. <Option value="2">中共党员</Option>
  2157. <Option value="3">致公党员</Option>
  2158. </Select>
  2159. <Select
  2160. placeholder="生日月份"
  2161. onChange={(e) => {
  2162. this.setState({ birthdayMonthSearch: e });
  2163. }}
  2164. style={{ width: 120, marginRight: 10 }}
  2165. value={this.state.birthdayMonthSearch}
  2166. >
  2167. <Option value="">全部</Option>
  2168. <Option value="1">一月</Option>
  2169. <Option value="2">二月</Option>
  2170. <Option value="3">三月</Option>
  2171. <Option value="4">四月</Option>
  2172. <Option value="5">五月</Option>
  2173. <Option value="6">六月</Option>
  2174. <Option value="7">七月</Option>
  2175. <Option value="8">八月</Option>
  2176. <Option value="9">九月</Option>
  2177. <Option value="10">十月</Option>
  2178. <Option value="11">十一月</Option>
  2179. <Option value="12">十二月</Option>
  2180. </Select>
  2181. <Select
  2182. placeholder="所属系统"
  2183. onChange={(e) => {
  2184. this.setState({ systemSearch: e });
  2185. }}
  2186. style={{ width: 120, marginRight: 10 }}
  2187. value={this.state.systemSearch}
  2188. >
  2189. <Option value="0">管理系统</Option>
  2190. <Option value="1">营销系统</Option>
  2191. <Option value="2">技术系统</Option>
  2192. </Select>
  2193. <Select
  2194. placeholder="工作年限"
  2195. onChange={(e) => {
  2196. this.setState({ workingYearsSearch: e });
  2197. }}
  2198. style={{ width: 120, marginRight: 10 }}
  2199. value={this.state.workingYearsSearch}
  2200. >
  2201. <Option value="0">0-1年</Option>
  2202. <Option value="1">1-3年</Option>
  2203. <Option value="2">3-10年</Option>
  2204. <Option value="3">10年以上</Option>
  2205. </Select>
  2206. <Select
  2207. placeholder="学历"
  2208. onChange={(e) => {
  2209. this.setState({ educationSearch: e });
  2210. }}
  2211. style={{ width: 120 }}
  2212. value={this.state.educationSearch}
  2213. >
  2214. <Option value="0">高中/中专</Option>
  2215. <Option value="1">专科/高职</Option>
  2216. <Option value="2">本科</Option>
  2217. <Option value="3">研究生</Option>
  2218. <Option value="5">博士</Option>
  2219. </Select>
  2220. <br />
  2221. <span style={{}}>转正日期:</span>
  2222. <RangePicker
  2223. style={{ marginRight: 10, width: 170 }}
  2224. value={[
  2225. this.state.promotionTime[0]
  2226. ? moment(this.state.promotionTime[0])
  2227. : null,
  2228. this.state.promotionTime[1]
  2229. ? moment(this.state.promotionTime[1])
  2230. : null,
  2231. ]}
  2232. onChange={(data, dataString) => {
  2233. this.setState({ promotionTime: dataString });
  2234. }}
  2235. />
  2236. <span style={{}}>入职时间:</span>
  2237. <RangePicker
  2238. style={{ marginRight: 10, width: 170 }}
  2239. value={[
  2240. this.state.entryTime[0]
  2241. ? moment(this.state.entryTime[0])
  2242. : null,
  2243. this.state.entryTime[1]
  2244. ? moment(this.state.entryTime[1])
  2245. : null,
  2246. ]}
  2247. onChange={(data, dataString) => {
  2248. this.setState({ entryTime: dataString });
  2249. }}
  2250. />
  2251. <span style={{}}>离职时间:</span>
  2252. <RangePicker
  2253. style={{ marginRight: 10, width: 170 }}
  2254. value={[
  2255. this.state.quitTime[0]
  2256. ? moment(this.state.quitTime[0])
  2257. : null,
  2258. this.state.quitTime[1]
  2259. ? moment(this.state.quitTime[1])
  2260. : null,
  2261. ]}
  2262. onChange={(data, dataString) => {
  2263. this.setState({ quitTime: dataString });
  2264. }}
  2265. />
  2266. <span style={{}}>合同时间:</span>
  2267. <RangePicker
  2268. style={{ marginRight: 10, width: 170 }}
  2269. value={[
  2270. this.state.contractTime[0]
  2271. ? moment(this.state.contractTime[0])
  2272. : null,
  2273. this.state.contractTime[1]
  2274. ? moment(this.state.contractTime[1])
  2275. : null,
  2276. ]}
  2277. onChange={(data, dataString) => {
  2278. this.setState({ contractTime: dataString });
  2279. }}
  2280. />
  2281. <Button
  2282. type="primary"
  2283. onClick={this.search}
  2284. style={{ marginLeft: 10 }}
  2285. >
  2286. 搜索
  2287. </Button>
  2288. <Button onClick={this.reset}>重置</Button>
  2289. </div>
  2290. </TabPane>
  2291. <TabPane tab="新增员工档案" key="3">
  2292. <Button
  2293. type="primary"
  2294. onClick={this.addPeo}
  2295. style={{ margin: "11px 0px 10px 10px" }}
  2296. >
  2297. 新增员工档案
  2298. </Button>
  2299. </TabPane>
  2300. <TabPane tab="导出Excel" key="4">
  2301. <Button
  2302. type="primary"
  2303. onClick={this.export}
  2304. style={{ margin: "11px 0px 10px 10px" }}
  2305. >
  2306. 导出当前列表
  2307. </Button>
  2308. </TabPane>
  2309. </Tabs>
  2310. <div className="patent-table" style={{ marginTop: 10 }}>
  2311. <Spin spinning={this.state.loading}>
  2312. <Table
  2313. bordered
  2314. columns={
  2315. this.state.changeList == undefined
  2316. ? this.state.columns
  2317. : this.state.changeList
  2318. }
  2319. onRowClick={this.tableRowClick}
  2320. dataSource={this.state.dataSource}
  2321. scroll={{ x: "max-content", y: 0 }}
  2322. pagination={this.state.pagination}
  2323. size="small"
  2324. />
  2325. </Spin>
  2326. </div>
  2327. <Modal
  2328. visible={this.state.visible}
  2329. footer={null}
  2330. width={1000}
  2331. onCancel={() => {
  2332. this.loadData();
  2333. this.cancel();
  2334. }}
  2335. >
  2336. <ReactToPrint
  2337. trigger={() => (
  2338. <Button
  2339. type="primary"
  2340. style={{
  2341. float: "right",
  2342. marginTop: 10,
  2343. position: "absolute",
  2344. top: 30,
  2345. right: 15,
  2346. zIndex: 1,
  2347. display: this.state.detailFlag ? "block" : "none"
  2348. }}
  2349. >
  2350. 打印
  2351. </Button>
  2352. )}
  2353. content={() => this.refs}
  2354. />
  2355. <Spin
  2356. spinning={this.state.loading}
  2357. ref={(e) => {
  2358. this.refs = e;
  2359. }}
  2360. >
  2361. <h2
  2362. style={{
  2363. textAlign: "center",
  2364. paddingBottom: 10,
  2365. marginBottom: 10,
  2366. }}
  2367. >
  2368. {this.state.ModalData.name + "人事档案"}
  2369. </h2>
  2370. <Button
  2371. type="primary"
  2372. style={{ position: "absolute", top: 25 }}
  2373. onClick={(e) => {
  2374. this.setState({ detailFlag: !this.state.detailFlag });
  2375. }}
  2376. >
  2377. {this.state.detailFlag ? "切换编辑模式" : "切换查看模式"}
  2378. </Button>
  2379. <ul onClick={this.editPeo} className="peo-table">
  2380. {this.state.table.map((item) => {
  2381. let value = item.value;
  2382. if (item.render) {
  2383. let fn = item.render;
  2384. return (
  2385. <li>
  2386. <div className="peo-left">{item.key}</div>
  2387. <Tooltip
  2388. placement="top"
  2389. title={fn(
  2390. this.state.ModalData[value],
  2391. value == "son" ? this.state.ModalData.girl : 0
  2392. )}
  2393. >
  2394. <div className="peo-right">
  2395. {fn(
  2396. this.state.ModalData[value],
  2397. value == "son" ? this.state.ModalData.girl : 0
  2398. )}
  2399. </div>
  2400. </Tooltip>
  2401. </li>
  2402. );
  2403. }
  2404. return (
  2405. <li>
  2406. <div className="peo-left">{item.key}</div>
  2407. <Tooltip
  2408. placement="top"
  2409. title={this.state.ModalData[item.value]}
  2410. >
  2411. <div className="peo-right">
  2412. {this.state.ModalData[value] &&
  2413. this.state.ModalData[value].length > 10
  2414. ? this.state.ModalData[value].substring(0, 10) + "..."
  2415. : this.state.ModalData[value]}
  2416. </div>
  2417. </Tooltip>
  2418. </li>
  2419. );
  2420. })}
  2421. </ul>
  2422. {this.state.detailFlag ? (
  2423. <div>
  2424. <div className="title-peo">
  2425. <span>任职信息</span>
  2426. {/* <Button
  2427. type="primary"
  2428. onClick={(e) => {
  2429. this.stayModal(this.state.ModalData.id);
  2430. }}
  2431. style={{ position: "absolute", right: 0, height: 30 }}
  2432. >
  2433. 修改任职信息
  2434. </Button> */}
  2435. </div>
  2436. <div className="clearfix">
  2437. <FormItem
  2438. className="half-item"
  2439. labelCol={{ span: 6 }}
  2440. wrapperCol={{ span: 30 }}
  2441. label="员工状态"
  2442. >
  2443. {this.state.ModalData.statusName}
  2444. </FormItem>
  2445. <FormItem
  2446. className="half-item"
  2447. labelCol={{ span: 6 }}
  2448. wrapperCol={{ span: 30 }}
  2449. label="所属系统"
  2450. >
  2451. {this.state.ModalData.systemName}
  2452. </FormItem>
  2453. </div>
  2454. <div className="clearfix">
  2455. <FormItem
  2456. className="half-item"
  2457. labelCol={{ span: 6 }}
  2458. wrapperCol={{ span: 30 }}
  2459. label="工作性质"
  2460. >
  2461. {this.jobStatus(
  2462. this.state.ModalData.jobNature,
  2463. this.state.ModalData.jobNatureRemarks
  2464. )}
  2465. </FormItem>
  2466. <FormItem
  2467. className="half-item"
  2468. labelCol={{ span: 6 }}
  2469. wrapperCol={{ span: 30 }}
  2470. label="工龄"
  2471. >
  2472. {this.state.ModalData.workingYear}
  2473. </FormItem>
  2474. </div>
  2475. <div className="clearfix">
  2476. <FormItem
  2477. className="half-item"
  2478. labelCol={{ span: 6 }}
  2479. wrapperCol={{ span: 30 }}
  2480. label="入职时间"
  2481. >
  2482. {this.state.ModalData.entryTimes}
  2483. </FormItem>
  2484. <FormItem
  2485. className="half-item"
  2486. labelCol={{ span: 6 }}
  2487. wrapperCol={{ span: 30 }}
  2488. label="转正时间"
  2489. >
  2490. {this.state.ModalData.promotionTimes}
  2491. </FormItem>
  2492. </div>
  2493. <div className="clearfix">
  2494. <FormItem
  2495. className="half-item"
  2496. labelCol={{ span: 6 }}
  2497. wrapperCol={{ span: 30 }}
  2498. label="所属公司"
  2499. >
  2500. {this.state.ModalData.depName}
  2501. </FormItem>
  2502. <FormItem
  2503. className="half-item"
  2504. labelCol={{ span: 6 }}
  2505. wrapperCol={{ span: 30 }}
  2506. label="级别"
  2507. >
  2508. {this.state.ModalData.lvlName}
  2509. </FormItem>
  2510. </div>
  2511. <div className="clearfix">
  2512. <FormItem
  2513. className="half-item"
  2514. labelCol={{ span: 6 }}
  2515. wrapperCol={{ span: 30 }}
  2516. label="职位"
  2517. >
  2518. {this.state.ModalData.jobsName}
  2519. </FormItem>
  2520. <FormItem
  2521. className="half-item"
  2522. labelCol={{ span: 6 }}
  2523. wrapperCol={{ span: 30 }}
  2524. label="岗位津贴"
  2525. >
  2526. {this.state.ModalData.allowance}
  2527. </FormItem>
  2528. </div>
  2529. <div className="clearfix">
  2530. <FormItem
  2531. className="half-item"
  2532. labelCol={{ span: 6 }}
  2533. wrapperCol={{ span: 30 }}
  2534. label="星级"
  2535. >
  2536. {this.state.ModalData.starName}
  2537. </FormItem>
  2538. </div>
  2539. <div className="title-peo">
  2540. <span>联系信息</span>
  2541. {/* <Button
  2542. type="primary"
  2543. onClick={this.phoneModal}
  2544. style={{ position: "absolute", right: 0, height: 30 }}
  2545. >
  2546. 修改联系信息
  2547. </Button> */}
  2548. </div>
  2549. <div className="clearfix">
  2550. <FormItem
  2551. className="half-item"
  2552. labelCol={{ span: 6 }}
  2553. wrapperCol={{ span: 30 }}
  2554. label="手机号码"
  2555. >
  2556. {this.state.ModalData.mobile}
  2557. </FormItem>
  2558. <FormItem
  2559. className="half-item"
  2560. labelCol={{ span: 6 }}
  2561. wrapperCol={{ span: 30 }}
  2562. label="电话"
  2563. >
  2564. {this.state.ModalData.fixedTel}
  2565. </FormItem>
  2566. </div>
  2567. {this.state.ModalData.contactList &&
  2568. this.state.ModalData.contactList.length > 0 ? (
  2569. this.state.ModalData.contactList.map((item, index) => {
  2570. return (
  2571. <div className="clearfix">
  2572. <FormItem
  2573. className="half-item"
  2574. labelCol={{ span: 6 }}
  2575. wrapperCol={{ span: 30 }}
  2576. label={"紧急联系人" + (index + 1)}
  2577. >
  2578. {item.emergencyContact}
  2579. </FormItem>
  2580. <FormItem
  2581. className="half-item"
  2582. labelCol={{ span: 6 }}
  2583. wrapperCol={{ span: 30 }}
  2584. label={"紧急联系人" + (index + 1) + "电话"}
  2585. >
  2586. {item.emergencyMobile}
  2587. </FormItem>
  2588. </div>
  2589. );
  2590. })
  2591. ) : (
  2592. <div
  2593. style={{
  2594. textAlign: "center",
  2595. height: 60,
  2596. lineHeight: "60px",
  2597. }}
  2598. >
  2599. 暂无紧急联系人信息
  2600. </div>
  2601. )}
  2602. <div className="title-peo">
  2603. <span>入职资料</span>
  2604. {/* <Button
  2605. type="primary"
  2606. onClick={this.entryModal}
  2607. style={{ position: "absolute", right: 0, height: 30 }}
  2608. >
  2609. 修改入职信息
  2610. </Button> */}
  2611. </div>
  2612. <div className="clearfix">
  2613. <FormItem
  2614. className="half-item"
  2615. labelCol={{ span: 6 }}
  2616. wrapperCol={{ span: 30 }}
  2617. label="毕业学校"
  2618. >
  2619. {this.state.ModalData.personnelEntry
  2620. ? this.state.ModalData.personnelEntry.school
  2621. : ""}
  2622. </FormItem>
  2623. <FormItem
  2624. className="half-item"
  2625. labelCol={{ span: 6 }}
  2626. wrapperCol={{ span: 30 }}
  2627. label="学历"
  2628. >
  2629. {this.state.ModalData.personnelEntry
  2630. ? this.educationStatus(
  2631. this.state.ModalData.personnelEntry.education
  2632. )
  2633. : ""}
  2634. </FormItem>
  2635. </div>
  2636. <div className="clearfix">
  2637. <FormItem
  2638. className="half-item"
  2639. labelCol={{ span: 6 }}
  2640. wrapperCol={{ span: 30 }}
  2641. label="所学专业"
  2642. >
  2643. {this.state.ModalData.personnelEntry
  2644. ? this.state.ModalData.personnelEntry.major
  2645. : ""}
  2646. </FormItem>
  2647. <FormItem
  2648. className="half-item"
  2649. labelCol={{ span: 6 }}
  2650. wrapperCol={{ span: 30 }}
  2651. label="职称"
  2652. >
  2653. {this.state.ModalData.personnelEntry
  2654. ? this.state.ModalData.personnelEntry.title
  2655. : ""}
  2656. </FormItem>
  2657. </div>
  2658. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2659. <div style={{ marginBottom: 10 }}>附件:</div>
  2660. <PicModal
  2661. remarks={
  2662. this.state.ModalData.personnelEntry
  2663. ? this.picToArr(
  2664. this.state.ModalData.personnelEntry.annexName
  2665. )
  2666. : []
  2667. }
  2668. picUrl={
  2669. this.state.ModalData.personnelEntry
  2670. ? this.picToArr(
  2671. this.state.ModalData.personnelEntry.annexUrl
  2672. )
  2673. : []
  2674. }
  2675. />
  2676. </div>
  2677. <div className="title-peo">
  2678. <span>晋升情况</span>
  2679. {/* <Button
  2680. type="primary"
  2681. onClick={(e) => {
  2682. this.upgradeModal(true);
  2683. }}
  2684. style={{ position: "absolute", right: 0, height: 30 }}
  2685. >
  2686. 新增晋升信息
  2687. </Button> */}
  2688. </div>
  2689. {this.state.ModalData.promotionList &&
  2690. this.state.ModalData.promotionList.length > 0 ? (
  2691. this.state.ModalData.promotionList.map((item, index) => {
  2692. return (
  2693. <div
  2694. style={{
  2695. width: "100%",
  2696. borderBottom: "1px dashed #ccc",
  2697. position: "relative",
  2698. }}
  2699. >
  2700. {/* <Button
  2701. style={{
  2702. position: "absolute",
  2703. right: "50%",
  2704. bottom: 10,
  2705. transform: "translateX(50%)",
  2706. }}
  2707. type="primary"
  2708. onClick={(e) => {
  2709. this.upgradeModal(false, index);
  2710. }}
  2711. >
  2712. 修改信息
  2713. </Button> */}
  2714. <div className="clearfix">
  2715. <FormItem
  2716. className="half-item"
  2717. labelCol={{ span: 6 }}
  2718. wrapperCol={{ span: 30 }}
  2719. label="晋升职位"
  2720. >
  2721. {item.oldJobsName + "--->" + item.newJobsName}
  2722. </FormItem>
  2723. <FormItem
  2724. className="half-item"
  2725. labelCol={{ span: 6 }}
  2726. wrapperCol={{ span: 30 }}
  2727. label="晋升等级"
  2728. >
  2729. {item.oldLvlName + "--->" + item.newLvlName}
  2730. </FormItem>
  2731. </div>
  2732. <div className="clearfix">
  2733. <FormItem
  2734. className="half-item"
  2735. labelCol={{ span: 6 }}
  2736. wrapperCol={{ span: 30 }}
  2737. label="晋升时间"
  2738. >
  2739. {item.promotionTimes}
  2740. </FormItem>
  2741. </div>
  2742. <div className="clearfix">
  2743. <FormItem
  2744. className="half-item"
  2745. labelCol={{ span: 6 }}
  2746. wrapperCol={{ span: 30 }}
  2747. label="晋升备注"
  2748. >
  2749. {item.promotionRemarks}
  2750. </FormItem>
  2751. </div>
  2752. <div
  2753. className="clearfix"
  2754. style={{ paddingLeft: 70, marginBottom: 40 }}
  2755. >
  2756. <div style={{ marginBottom: 10 }}>附件:</div>
  2757. <PicModal
  2758. remarks={this.picToArr(item.annexName)}
  2759. picUrl={this.picToArr(item.annexUrl)}
  2760. />
  2761. </div>
  2762. </div>
  2763. );
  2764. })
  2765. ) : (
  2766. <div
  2767. style={{
  2768. textAlign: "center",
  2769. height: 60,
  2770. lineHeight: "60px",
  2771. }}
  2772. >
  2773. 暂无晋升情况
  2774. </div>
  2775. )}
  2776. <div className="title-peo">
  2777. <span>合同情况</span>
  2778. {/* <Button
  2779. type="primary"
  2780. onClick={(e) => {
  2781. this.contractModal(true);
  2782. }}
  2783. style={{ position: "absolute", right: 0, height: 30 }}
  2784. >
  2785. 新增合同信息
  2786. </Button> */}
  2787. </div>
  2788. {this.state.ModalData.contractList &&
  2789. this.state.ModalData.contractList.length > 0 ? (
  2790. this.state.ModalData.contractList.map((item, index) => {
  2791. return (
  2792. <div
  2793. style={{
  2794. width: "100%",
  2795. borderBottom: "1px dashed #ccc",
  2796. position: "relative",
  2797. }}
  2798. >
  2799. {/* <Button
  2800. style={{
  2801. position: "absolute",
  2802. right: "50%",
  2803. bottom: 10,
  2804. transform: "translateX(50%)",
  2805. }}
  2806. type="primary"
  2807. onClick={(e) => {
  2808. this.contractModal(false, index);
  2809. }}
  2810. >
  2811. 修改信息
  2812. </Button> */}
  2813. <div className="clearfix">
  2814. <FormItem
  2815. className="half-item"
  2816. labelCol={{ span: 6 }}
  2817. wrapperCol={{ span: 30 }}
  2818. label="签订时间"
  2819. >
  2820. {item.startTimes}
  2821. </FormItem>
  2822. <FormItem
  2823. className="half-item"
  2824. labelCol={{ span: 6 }}
  2825. wrapperCol={{ span: 30 }}
  2826. label="到期时间"
  2827. >
  2828. {item.endTimes}
  2829. </FormItem>
  2830. </div>
  2831. <div className="clearfix">
  2832. <FormItem
  2833. style={{ width: "100%", wordBreak: "break-all" }}
  2834. className="half-item"
  2835. labelCol={{ span: 3 }}
  2836. wrapperCol={{ span: 30 }}
  2837. label="备注"
  2838. >
  2839. {item.contractRemarks}
  2840. </FormItem>
  2841. </div>
  2842. <div
  2843. className="clearfix"
  2844. style={{ paddingLeft: 70, marginBottom: 40 }}
  2845. >
  2846. <div style={{ marginBottom: 10 }}>附件:</div>
  2847. <PicModal
  2848. remarks={this.picToArr(item.annexName)}
  2849. picUrl={this.picToArr(item.annexUrl)}
  2850. />
  2851. </div>
  2852. </div>
  2853. );
  2854. })
  2855. ) : (
  2856. <div
  2857. style={{
  2858. textAlign: "center",
  2859. height: 60,
  2860. lineHeight: "60px",
  2861. }}
  2862. >
  2863. 暂无合同情况
  2864. </div>
  2865. )}
  2866. <div className="title-peo">
  2867. <span>奖惩情况</span>
  2868. {/* <Button
  2869. type="primary"
  2870. onClick={(e) => {
  2871. this.chooseModal(true);
  2872. }}
  2873. style={{ position: "absolute", right: 0, height: 30 }}
  2874. >
  2875. 新增奖惩信息
  2876. </Button> */}
  2877. </div>
  2878. {this.state.ModalData.chooseList &&
  2879. this.state.ModalData.chooseList.length > 0 ? (
  2880. this.state.ModalData.chooseList.map((item, index) => {
  2881. return (
  2882. <div
  2883. style={{
  2884. width: "100%",
  2885. borderBottom: "1px dashed #ccc",
  2886. position: "relative",
  2887. }}
  2888. >
  2889. {/* <Button
  2890. style={{
  2891. position: "absolute",
  2892. right: "50%",
  2893. bottom: 10,
  2894. transform: "translateX(50%)",
  2895. }}
  2896. type="primary"
  2897. onClick={(e) => {
  2898. this.chooseModal(false, index);
  2899. }}
  2900. >
  2901. 修改信息
  2902. </Button> */}
  2903. <div className="clearfix">
  2904. <FormItem
  2905. className="half-item"
  2906. labelCol={{ span: 6 }}
  2907. wrapperCol={{ span: 30 }}
  2908. label={"状态"}
  2909. >
  2910. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2911. </FormItem>
  2912. <FormItem
  2913. className="half-item"
  2914. labelCol={{ span: 6 }}
  2915. wrapperCol={{ span: 30 }}
  2916. label="时间"
  2917. >
  2918. {item.effectTimes}
  2919. </FormItem>
  2920. </div>
  2921. <div className="clearfix">
  2922. <FormItem
  2923. className="half-item"
  2924. labelCol={{ span: 6 }}
  2925. wrapperCol={{ span: 30 }}
  2926. label={"内容"}
  2927. >
  2928. {item.chooseRemarks}
  2929. </FormItem>
  2930. </div>
  2931. <div
  2932. className="clearfix"
  2933. style={{ paddingLeft: 70, marginBottom: 40 }}
  2934. >
  2935. <div style={{ marginBottom: 10 }}>附件:</div>
  2936. <PicModal
  2937. remarks={this.picToArr(item.annexName)}
  2938. picUrl={this.picToArr(item.annexUrl)}
  2939. />
  2940. </div>
  2941. </div>
  2942. );
  2943. })
  2944. ) : (
  2945. <div
  2946. style={{
  2947. textAlign: "center",
  2948. height: 60,
  2949. lineHeight: "60px",
  2950. }}
  2951. >
  2952. 暂无奖惩情况
  2953. </div>
  2954. )}
  2955. <div className="title-peo">
  2956. <span>离职情况</span>
  2957. {/* <Button
  2958. type="primary"
  2959. onClick={(e) => {
  2960. this.quitModal(true);
  2961. }}
  2962. style={{ position: "absolute", right: 0, height: 30 }}
  2963. >
  2964. 新增离职信息
  2965. </Button> */}
  2966. </div>
  2967. {this.state.ModalData.quitList &&
  2968. this.state.ModalData.quitList.length > 0 ? (
  2969. this.state.ModalData.quitList.map((item, index) => {
  2970. return (
  2971. <div
  2972. style={{
  2973. width: "100%",
  2974. borderBottom: "1px dashed #ccc",
  2975. position: "relative",
  2976. }}
  2977. >
  2978. {/* <Button
  2979. style={{
  2980. position: "absolute",
  2981. right: "50%",
  2982. bottom: 10,
  2983. transform: "translateX(50%)",
  2984. }}
  2985. type="primary"
  2986. onClick={(e) => {
  2987. this.quitModal(false, index);
  2988. }}
  2989. >
  2990. 修改信息
  2991. </Button> */}
  2992. <div className="clearfix">
  2993. <FormItem
  2994. className="half-item"
  2995. labelCol={{ span: 6 }}
  2996. wrapperCol={{ span: 30 }}
  2997. label="离职时间"
  2998. >
  2999. {item.effectTimes}
  3000. </FormItem>
  3001. <FormItem
  3002. className="half-item"
  3003. labelCol={{ span: 6 }}
  3004. wrapperCol={{ span: 30 }}
  3005. label="离职备注"
  3006. >
  3007. {item.quitRemarks}
  3008. </FormItem>
  3009. </div>
  3010. <div
  3011. className="clearfix"
  3012. style={{ paddingLeft: 70, marginBottom: 40 }}
  3013. >
  3014. <div style={{ marginBottom: 10 }}>附件:</div>
  3015. <PicModal
  3016. remarks={this.picToArr(item.annexName)}
  3017. picUrl={this.picToArr(item.annexUrl)}
  3018. />
  3019. </div>
  3020. </div>
  3021. );
  3022. })
  3023. ) : (
  3024. <div
  3025. style={{
  3026. textAlign: "center",
  3027. height: 60,
  3028. lineHeight: "60px",
  3029. }}
  3030. >
  3031. 暂无离职信息
  3032. </div>
  3033. )}
  3034. <div className="title-peo" style={{ marginBottom: 10 }}>
  3035. <span>福利情况</span>
  3036. {/* <Button
  3037. type="primary"
  3038. onClick={(e) => {
  3039. this.welfareModal();
  3040. }}
  3041. style={{ position: "absolute", right: 0, height: 30 }}
  3042. >
  3043. 修改福利信息
  3044. </Button> */}
  3045. </div>
  3046. <Table
  3047. columns={this.state.welfareColumns}
  3048. dataSource={this.state.ModalData.welfareList}
  3049. pagination={false}
  3050. bordered
  3051. size="small"
  3052. scroll={{ x: "max-content", y: 0 }}
  3053. />
  3054. <div className="clearfix" style={{ marginTop: 10 }}>
  3055. <FormItem
  3056. className="half-item"
  3057. style={{ width: "100%", wordBreak: "break-all" }}
  3058. labelCol={{ span: 3 }}
  3059. wrapperCol={{ span: 30 }}
  3060. label="备注"
  3061. >
  3062. {this.state.ModalData.welfareRemarks}
  3063. </FormItem>
  3064. </div>
  3065. <div
  3066. className="clearfix"
  3067. style={{ paddingLeft: 70, marginBottom: 0 }}
  3068. >
  3069. <div style={{ marginBottom: 10 }}>附件:</div>
  3070. <PicModal
  3071. remarks={this.picToArr(
  3072. this.state.ModalData.welfareAnnexName
  3073. )}
  3074. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  3075. />
  3076. </div>
  3077. </div>
  3078. ) : (
  3079. <Tabs
  3080. activeKey={this.state.active}
  3081. onChange={(e) => {
  3082. this.setState({ active: e });
  3083. }}
  3084. >
  3085. <TabPane tab="任职信息" key={1}>
  3086. <div className="title-peo">
  3087. <span>任职信息</span>
  3088. <Button
  3089. type="primary"
  3090. onClick={(e) => {
  3091. this.stayModal(this.state.ModalData.id);
  3092. }}
  3093. style={{ position: "absolute", right: 0, height: 30 }}
  3094. >
  3095. 修改任职信息
  3096. </Button>
  3097. </div>
  3098. <div className="clearfix">
  3099. <FormItem
  3100. className="half-item"
  3101. labelCol={{ span: 6 }}
  3102. wrapperCol={{ span: 30 }}
  3103. label="员工状态"
  3104. >
  3105. {this.state.ModalData.statusName}
  3106. </FormItem>
  3107. <FormItem
  3108. className="half-item"
  3109. labelCol={{ span: 6 }}
  3110. wrapperCol={{ span: 30 }}
  3111. label="所属系统"
  3112. >
  3113. {this.state.ModalData.systemName}
  3114. </FormItem>
  3115. </div>
  3116. <div className="clearfix">
  3117. <FormItem
  3118. className="half-item"
  3119. labelCol={{ span: 6 }}
  3120. wrapperCol={{ span: 30 }}
  3121. label="工作性质"
  3122. >
  3123. {this.jobStatus(
  3124. this.state.ModalData.jobNature,
  3125. this.state.ModalData.jobNatureRemarks
  3126. )}
  3127. </FormItem>
  3128. <FormItem
  3129. className="half-item"
  3130. labelCol={{ span: 6 }}
  3131. wrapperCol={{ span: 30 }}
  3132. label="工龄"
  3133. >
  3134. {this.state.ModalData.workingYear}
  3135. </FormItem>
  3136. </div>
  3137. <div className="clearfix">
  3138. <FormItem
  3139. className="half-item"
  3140. labelCol={{ span: 6 }}
  3141. wrapperCol={{ span: 30 }}
  3142. label="入职时间"
  3143. >
  3144. {this.state.ModalData.entryTimes}
  3145. </FormItem>
  3146. <FormItem
  3147. className="half-item"
  3148. labelCol={{ span: 6 }}
  3149. wrapperCol={{ span: 30 }}
  3150. label="转正时间"
  3151. >
  3152. {this.state.ModalData.promotionTimes}
  3153. </FormItem>
  3154. </div>
  3155. <div className="clearfix">
  3156. <FormItem
  3157. className="half-item"
  3158. labelCol={{ span: 6 }}
  3159. wrapperCol={{ span: 30 }}
  3160. label="所属公司"
  3161. >
  3162. {this.state.ModalData.depName}
  3163. </FormItem>
  3164. <FormItem
  3165. className="half-item"
  3166. labelCol={{ span: 6 }}
  3167. wrapperCol={{ span: 30 }}
  3168. label="级别"
  3169. >
  3170. {this.state.ModalData.lvlName}
  3171. </FormItem>
  3172. </div>
  3173. <div className="clearfix">
  3174. <FormItem
  3175. className="half-item"
  3176. labelCol={{ span: 6 }}
  3177. wrapperCol={{ span: 30 }}
  3178. label="职位"
  3179. >
  3180. {this.state.ModalData.jobsName}
  3181. </FormItem>
  3182. <FormItem
  3183. className="half-item"
  3184. labelCol={{ span: 6 }}
  3185. wrapperCol={{ span: 30 }}
  3186. label="岗位津贴"
  3187. >
  3188. {this.state.ModalData.allowance}
  3189. </FormItem>
  3190. </div>
  3191. <div className="clearfix">
  3192. <FormItem
  3193. className="half-item"
  3194. labelCol={{ span: 6 }}
  3195. wrapperCol={{ span: 30 }}
  3196. label="星级"
  3197. >
  3198. {this.state.ModalData.starName}
  3199. </FormItem>
  3200. </div>
  3201. </TabPane>
  3202. <TabPane tab="联系信息" key={2}>
  3203. <div className="title-peo">
  3204. <span>联系信息</span>
  3205. <Button
  3206. type="primary"
  3207. onClick={this.phoneModal}
  3208. style={{ position: "absolute", right: 0, height: 30 }}
  3209. >
  3210. 修改联系信息
  3211. </Button>
  3212. </div>
  3213. <div className="clearfix">
  3214. <FormItem
  3215. className="half-item"
  3216. labelCol={{ span: 6 }}
  3217. wrapperCol={{ span: 30 }}
  3218. label="手机号码"
  3219. >
  3220. {this.state.ModalData.mobile}
  3221. </FormItem>
  3222. <FormItem
  3223. className="half-item"
  3224. labelCol={{ span: 6 }}
  3225. wrapperCol={{ span: 30 }}
  3226. label="电话"
  3227. >
  3228. {this.state.ModalData.fixedTel}
  3229. </FormItem>
  3230. </div>
  3231. {this.state.ModalData.contactList &&
  3232. this.state.ModalData.contactList.length > 0 ? (
  3233. this.state.ModalData.contactList.map((item, index) => {
  3234. return (
  3235. <div className="clearfix">
  3236. <FormItem
  3237. className="half-item"
  3238. labelCol={{ span: 6 }}
  3239. wrapperCol={{ span: 30 }}
  3240. label={"紧急联系人" + (index + 1)}
  3241. >
  3242. {item.emergencyContact}
  3243. </FormItem>
  3244. <FormItem
  3245. className="half-item"
  3246. labelCol={{ span: 6 }}
  3247. wrapperCol={{ span: 30 }}
  3248. label={"紧急联系人" + (index + 1) + "电话"}
  3249. >
  3250. {item.emergencyMobile}
  3251. </FormItem>
  3252. </div>
  3253. );
  3254. })
  3255. ) : (
  3256. <div
  3257. style={{
  3258. textAlign: "center",
  3259. height: 60,
  3260. lineHeight: "60px",
  3261. }}
  3262. >
  3263. 暂无紧急联系人信息
  3264. </div>
  3265. )}
  3266. </TabPane>
  3267. <TabPane tab="入职资料" key={3}>
  3268. <div className="title-peo">
  3269. <span>入职资料</span>
  3270. <Button
  3271. type="primary"
  3272. onClick={this.entryModal}
  3273. style={{ position: "absolute", right: 0, height: 30 }}
  3274. >
  3275. 修改入职信息
  3276. </Button>
  3277. </div>
  3278. <div className="clearfix">
  3279. <FormItem
  3280. className="half-item"
  3281. labelCol={{ span: 6 }}
  3282. wrapperCol={{ span: 30 }}
  3283. label="毕业学校"
  3284. >
  3285. {this.state.ModalData.personnelEntry
  3286. ? this.state.ModalData.personnelEntry.school
  3287. : ""}
  3288. </FormItem>
  3289. <FormItem
  3290. className="half-item"
  3291. labelCol={{ span: 6 }}
  3292. wrapperCol={{ span: 30 }}
  3293. label="学历"
  3294. >
  3295. {this.state.ModalData.personnelEntry
  3296. ? this.educationStatus(
  3297. this.state.ModalData.personnelEntry.education
  3298. )
  3299. : ""}
  3300. </FormItem>
  3301. </div>
  3302. <div className="clearfix">
  3303. <FormItem
  3304. className="half-item"
  3305. labelCol={{ span: 6 }}
  3306. wrapperCol={{ span: 30 }}
  3307. label="所学专业"
  3308. >
  3309. {this.state.ModalData.personnelEntry
  3310. ? this.state.ModalData.personnelEntry.major
  3311. : ""}
  3312. </FormItem>
  3313. <FormItem
  3314. className="half-item"
  3315. labelCol={{ span: 6 }}
  3316. wrapperCol={{ span: 30 }}
  3317. label="职称"
  3318. >
  3319. {this.state.ModalData.personnelEntry
  3320. ? this.state.ModalData.personnelEntry.title
  3321. : ""}
  3322. </FormItem>
  3323. </div>
  3324. <div className="clearfix" style={{ paddingLeft: 70 }}>
  3325. <div style={{ marginBottom: 10 }}>附件:</div>
  3326. <PicModal
  3327. remarks={
  3328. this.state.ModalData.personnelEntry
  3329. ? this.picToArr(
  3330. this.state.ModalData.personnelEntry.annexName
  3331. )
  3332. : []
  3333. }
  3334. picUrl={
  3335. this.state.ModalData.personnelEntry
  3336. ? this.picToArr(
  3337. this.state.ModalData.personnelEntry.annexUrl
  3338. )
  3339. : []
  3340. }
  3341. />
  3342. </div>
  3343. </TabPane>
  3344. <TabPane tab="晋升情况" key={4}>
  3345. <div className="title-peo">
  3346. <span>晋升情况</span>
  3347. <Button
  3348. type="primary"
  3349. onClick={(e) => {
  3350. this.upgradeModal(true);
  3351. }}
  3352. style={{ position: "absolute", right: 0, height: 30 }}
  3353. >
  3354. 新增晋升信息
  3355. </Button>
  3356. </div>
  3357. {this.state.ModalData.promotionList &&
  3358. this.state.ModalData.promotionList.length > 0 ? (
  3359. this.state.ModalData.promotionList.map((item, index) => {
  3360. return (
  3361. <div
  3362. style={{
  3363. width: "100%",
  3364. borderBottom: "1px dashed #ccc",
  3365. position: "relative",
  3366. }}
  3367. >
  3368. <Button
  3369. style={{
  3370. position: "absolute",
  3371. right: "50%",
  3372. bottom: 10,
  3373. transform: "translateX(50%)",
  3374. }}
  3375. type="primary"
  3376. onClick={(e) => {
  3377. this.upgradeModal(false, index);
  3378. }}
  3379. >
  3380. 修改信息
  3381. </Button>
  3382. <div className="clearfix">
  3383. <FormItem
  3384. className="half-item"
  3385. labelCol={{ span: 6 }}
  3386. wrapperCol={{ span: 30 }}
  3387. label="晋升职位"
  3388. >
  3389. {item.oldJobsName + "--->" + item.newJobsName}
  3390. </FormItem>
  3391. <FormItem
  3392. className="half-item"
  3393. labelCol={{ span: 6 }}
  3394. wrapperCol={{ span: 30 }}
  3395. label="晋升等级"
  3396. >
  3397. {item.oldLvlName + "--->" + item.newLvlName}
  3398. </FormItem>
  3399. </div>
  3400. <div className="clearfix">
  3401. <FormItem
  3402. className="half-item"
  3403. labelCol={{ span: 6 }}
  3404. wrapperCol={{ span: 30 }}
  3405. label="晋升时间"
  3406. >
  3407. {item.promotionTimes}
  3408. </FormItem>
  3409. </div>
  3410. <div className="clearfix">
  3411. <FormItem
  3412. className="half-item"
  3413. labelCol={{ span: 6 }}
  3414. wrapperCol={{ span: 30 }}
  3415. label="晋升备注"
  3416. >
  3417. {item.promotionRemarks}
  3418. </FormItem>
  3419. </div>
  3420. <div
  3421. className="clearfix"
  3422. style={{ paddingLeft: 70, marginBottom: 40 }}
  3423. >
  3424. <div style={{ marginBottom: 10 }}>附件:</div>
  3425. <PicModal
  3426. remarks={this.picToArr(item.annexName)}
  3427. picUrl={this.picToArr(item.annexUrl)}
  3428. />
  3429. </div>
  3430. </div>
  3431. );
  3432. })
  3433. ) : (
  3434. <div
  3435. style={{
  3436. textAlign: "center",
  3437. height: 60,
  3438. lineHeight: "60px",
  3439. }}
  3440. >
  3441. 暂无晋升情况
  3442. </div>
  3443. )}
  3444. </TabPane>
  3445. <TabPane tab="合同情况" key={5}>
  3446. <div className="title-peo">
  3447. <span>合同情况</span>
  3448. <Button
  3449. type="primary"
  3450. onClick={(e) => {
  3451. this.contractModal(true);
  3452. }}
  3453. style={{ position: "absolute", right: 0, height: 30 }}
  3454. >
  3455. 新增合同信息
  3456. </Button>
  3457. </div>
  3458. {this.state.ModalData.contractList &&
  3459. this.state.ModalData.contractList.length > 0 ? (
  3460. this.state.ModalData.contractList.map((item, index) => {
  3461. return (
  3462. <div
  3463. style={{
  3464. width: "100%",
  3465. borderBottom: "1px dashed #ccc",
  3466. position: "relative",
  3467. }}
  3468. >
  3469. <Button
  3470. style={{
  3471. position: "absolute",
  3472. right: "50%",
  3473. bottom: 10,
  3474. transform: "translateX(50%)",
  3475. }}
  3476. type="primary"
  3477. onClick={(e) => {
  3478. this.contractModal(false, index);
  3479. }}
  3480. >
  3481. 修改信息
  3482. </Button>
  3483. <div className="clearfix">
  3484. <FormItem
  3485. className="half-item"
  3486. labelCol={{ span: 6 }}
  3487. wrapperCol={{ span: 30 }}
  3488. label="签订时间"
  3489. >
  3490. {item.startTimes}
  3491. </FormItem>
  3492. <FormItem
  3493. className="half-item"
  3494. labelCol={{ span: 6 }}
  3495. wrapperCol={{ span: 30 }}
  3496. label="到期时间"
  3497. >
  3498. {item.endTimes}
  3499. </FormItem>
  3500. </div>
  3501. <div className="clearfix">
  3502. <FormItem
  3503. style={{ width: "100%", wordBreak: "break-all" }}
  3504. className="half-item"
  3505. labelCol={{ span: 3 }}
  3506. wrapperCol={{ span: 30 }}
  3507. label="备注"
  3508. >
  3509. {item.contractRemarks}
  3510. </FormItem>
  3511. </div>
  3512. <div
  3513. className="clearfix"
  3514. style={{ paddingLeft: 70, marginBottom: 40 }}
  3515. >
  3516. <div style={{ marginBottom: 10 }}>附件:</div>
  3517. <PicModal
  3518. remarks={this.picToArr(item.annexName)}
  3519. picUrl={this.picToArr(item.annexUrl)}
  3520. />
  3521. </div>
  3522. </div>
  3523. );
  3524. })
  3525. ) : (
  3526. <div
  3527. style={{
  3528. textAlign: "center",
  3529. height: 60,
  3530. lineHeight: "60px",
  3531. }}
  3532. >
  3533. 暂无合同情况
  3534. </div>
  3535. )}
  3536. </TabPane>
  3537. <TabPane tab="奖惩情况" key={6}>
  3538. <div className="title-peo">
  3539. <span>奖惩情况</span>
  3540. <Button
  3541. type="primary"
  3542. onClick={(e) => {
  3543. this.chooseModal(true);
  3544. }}
  3545. style={{ position: "absolute", right: 0, height: 30 }}
  3546. >
  3547. 新增奖惩信息
  3548. </Button>
  3549. </div>
  3550. {this.state.ModalData.chooseList &&
  3551. this.state.ModalData.chooseList.length > 0 ? (
  3552. this.state.ModalData.chooseList.map((item, index) => {
  3553. return (
  3554. <div
  3555. style={{
  3556. width: "100%",
  3557. borderBottom: "1px dashed #ccc",
  3558. position: "relative",
  3559. }}
  3560. >
  3561. <Button
  3562. style={{
  3563. position: "absolute",
  3564. right: "50%",
  3565. bottom: 10,
  3566. transform: "translateX(50%)",
  3567. }}
  3568. type="primary"
  3569. onClick={(e) => {
  3570. this.chooseModal(false, index);
  3571. }}
  3572. >
  3573. 修改信息
  3574. </Button>
  3575. <div className="clearfix">
  3576. <FormItem
  3577. className="half-item"
  3578. labelCol={{ span: 6 }}
  3579. wrapperCol={{ span: 30 }}
  3580. label={"状态"}
  3581. >
  3582. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3583. </FormItem>
  3584. <FormItem
  3585. className="half-item"
  3586. labelCol={{ span: 6 }}
  3587. wrapperCol={{ span: 30 }}
  3588. label="时间"
  3589. >
  3590. {item.effectTimes}
  3591. </FormItem>
  3592. </div>
  3593. <div className="clearfix">
  3594. <FormItem
  3595. className="half-item"
  3596. labelCol={{ span: 6 }}
  3597. wrapperCol={{ span: 30 }}
  3598. label={"内容"}
  3599. >
  3600. {item.chooseRemarks}
  3601. </FormItem>
  3602. </div>
  3603. <div
  3604. className="clearfix"
  3605. style={{ paddingLeft: 70, marginBottom: 40 }}
  3606. >
  3607. <div style={{ marginBottom: 10 }}>附件:</div>
  3608. <PicModal
  3609. remarks={this.picToArr(item.annexName)}
  3610. picUrl={this.picToArr(item.annexUrl)}
  3611. />
  3612. </div>
  3613. </div>
  3614. );
  3615. })
  3616. ) : (
  3617. <div
  3618. style={{
  3619. textAlign: "center",
  3620. height: 60,
  3621. lineHeight: "60px",
  3622. }}
  3623. >
  3624. 暂无奖惩情况
  3625. </div>
  3626. )}
  3627. </TabPane>
  3628. <TabPane tab="离职情况" key={7}>
  3629. <div className="title-peo">
  3630. <span>离职情况</span>
  3631. <Button
  3632. type="primary"
  3633. onClick={(e) => {
  3634. this.quitModal(true);
  3635. }}
  3636. style={{ position: "absolute", right: 0, height: 30 }}
  3637. >
  3638. 新增离职信息
  3639. </Button>
  3640. </div>
  3641. {this.state.ModalData.quitList &&
  3642. this.state.ModalData.quitList.length > 0 ? (
  3643. this.state.ModalData.quitList.map((item, index) => {
  3644. return (
  3645. <div
  3646. style={{
  3647. width: "100%",
  3648. borderBottom: "1px dashed #ccc",
  3649. position: "relative",
  3650. }}
  3651. >
  3652. <Button
  3653. style={{
  3654. position: "absolute",
  3655. right: "50%",
  3656. bottom: 10,
  3657. transform: "translateX(50%)",
  3658. }}
  3659. type="primary"
  3660. onClick={(e) => {
  3661. this.quitModal(false, index);
  3662. }}
  3663. >
  3664. 修改信息
  3665. </Button>
  3666. <div className="clearfix">
  3667. <FormItem
  3668. className="half-item"
  3669. labelCol={{ span: 6 }}
  3670. wrapperCol={{ span: 30 }}
  3671. label="离职时间"
  3672. >
  3673. {item.effectTimes}
  3674. </FormItem>
  3675. <FormItem
  3676. className="half-item"
  3677. labelCol={{ span: 6 }}
  3678. wrapperCol={{ span: 30 }}
  3679. label="离职备注"
  3680. >
  3681. {item.quitRemarks}
  3682. </FormItem>
  3683. </div>
  3684. <div
  3685. className="clearfix"
  3686. style={{ paddingLeft: 70, marginBottom: 40 }}
  3687. >
  3688. <div style={{ marginBottom: 10 }}>附件:</div>
  3689. <PicModal
  3690. remarks={this.picToArr(item.annexName)}
  3691. picUrl={this.picToArr(item.annexUrl)}
  3692. />
  3693. </div>
  3694. </div>
  3695. );
  3696. })
  3697. ) : (
  3698. <div
  3699. style={{
  3700. textAlign: "center",
  3701. height: 60,
  3702. lineHeight: "60px",
  3703. }}
  3704. >
  3705. 暂无离职信息
  3706. </div>
  3707. )}
  3708. </TabPane>
  3709. <TabPane tab="福利情况" key={8}>
  3710. <div className="title-peo" style={{ marginBottom: 10 }}>
  3711. <span>福利情况</span>
  3712. <Button
  3713. type="primary"
  3714. onClick={(e) => {
  3715. this.welfareModal();
  3716. }}
  3717. style={{ position: "absolute", right: 0, height: 30 }}
  3718. >
  3719. 修改福利信息
  3720. </Button>
  3721. </div>
  3722. <Table
  3723. columns={this.state.welfareColumns}
  3724. dataSource={this.state.ModalData.welfareList}
  3725. pagination={false}
  3726. bordered
  3727. size="small"
  3728. scroll={{ x: "max-content", y: 0 }}
  3729. />
  3730. <div className="clearfix" style={{ marginTop: 10 }}>
  3731. <FormItem
  3732. className="half-item"
  3733. style={{ width: "100%", wordBreak: "break-all" }}
  3734. labelCol={{ span: 3 }}
  3735. wrapperCol={{ span: 30 }}
  3736. label="备注"
  3737. >
  3738. {this.state.ModalData.welfareRemarks}
  3739. </FormItem>
  3740. </div>
  3741. <div
  3742. className="clearfix"
  3743. style={{ paddingLeft: 70, marginBottom: 0 }}
  3744. >
  3745. <div style={{ marginBottom: 10 }}>附件:</div>
  3746. <PicModal
  3747. remarks={this.picToArr(
  3748. this.state.ModalData.welfareAnnexName
  3749. )}
  3750. picUrl={this.picToArr(
  3751. this.state.ModalData.welfareAnnexUrl
  3752. )}
  3753. />
  3754. </div>
  3755. </TabPane>
  3756. </Tabs>
  3757. )}
  3758. </Spin>
  3759. <Modal
  3760. visible={this.state.peoVisible}
  3761. onOk={this.checkOk}
  3762. footer={null}
  3763. width={800}
  3764. style={{ position: "relative", zIndex: 9999 }}
  3765. onCancel={() => {
  3766. this.loadData();
  3767. this.addPeoCancel();
  3768. }}
  3769. >
  3770. <Spin spinning={this.state.loading}>
  3771. <h2
  3772. style={{
  3773. textAlign: "center",
  3774. paddingBottom: 10,
  3775. marginBottom: 10,
  3776. }}
  3777. >
  3778. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  3779. </h2>
  3780. <div className="clearfix">
  3781. <FormItem
  3782. className="half-item"
  3783. {...formItemLayout}
  3784. label="员工编号"
  3785. >
  3786. <Input
  3787. placeholder="请输入员工编号"
  3788. style={{ width: 200 }}
  3789. value={this.state.employeeId}
  3790. onChange={(e) => {
  3791. this.setState({
  3792. employeeId: e.target.value,
  3793. });
  3794. }}
  3795. />
  3796. <Button
  3797. disabled={
  3798. this.state.employeeId || this.state.employeeId == 0
  3799. ? false
  3800. : true
  3801. }
  3802. style={{ position: "absolute" }}
  3803. type={"primary"}
  3804. onClick={this.verifyId}
  3805. >
  3806. 验证重复
  3807. </Button>
  3808. </FormItem>
  3809. <FormItem
  3810. className="half-item"
  3811. {...formItemLayout}
  3812. label="门禁编号"
  3813. >
  3814. <Input
  3815. style={{ width: 200 }}
  3816. placeholder="请输入门禁编号"
  3817. value={this.state.doorId}
  3818. onChange={(e) => {
  3819. this.setState({
  3820. doorId: e.target.value,
  3821. });
  3822. }}
  3823. />
  3824. <Button
  3825. disabled={
  3826. this.state.doorId || this.state.doorId == 0 ? false : true
  3827. }
  3828. style={{ position: "absolute" }}
  3829. type={"primary"}
  3830. onClick={this.verifyDoor}
  3831. >
  3832. 验证重复
  3833. </Button>
  3834. </FormItem>
  3835. </div>
  3836. <div className="clearfix">
  3837. <FormItem
  3838. className="half-item"
  3839. {...formItemLayout}
  3840. label="姓名"
  3841. >
  3842. <Input
  3843. placeholder="请输入姓名"
  3844. style={{ width: 200 }}
  3845. value={this.state.name}
  3846. onChange={(e) => {
  3847. this.setState({
  3848. name: e.target.value,
  3849. });
  3850. }}
  3851. />
  3852. </FormItem>
  3853. <FormItem
  3854. className="half-item"
  3855. {...formItemLayout}
  3856. label="出生日期"
  3857. >
  3858. <DatePicker
  3859. value={
  3860. this.state.birthdays ? moment(this.state.birthdays) : null
  3861. }
  3862. onChange={(e, t) => {
  3863. this.setState({
  3864. birthdays: t,
  3865. });
  3866. }}
  3867. />
  3868. </FormItem>
  3869. </div>
  3870. <div className="clearfix">
  3871. <FormItem
  3872. className="half-item"
  3873. {...formItemLayout}
  3874. label="性别"
  3875. >
  3876. <Radio.Group
  3877. onChange={(e) => {
  3878. this.setState({ sex: e.target.value });
  3879. }}
  3880. value={this.state.sex}
  3881. >
  3882. <Radio value={0}>男</Radio>
  3883. <Radio value={1}>女</Radio>
  3884. </Radio.Group>
  3885. </FormItem>
  3886. <FormItem
  3887. className="half-item"
  3888. {...formItemLayout}
  3889. label="民族"
  3890. >
  3891. <Input
  3892. placeholder="输入民族(例:汉族)"
  3893. style={{ width: 200 }}
  3894. value={this.state.nation}
  3895. onChange={(e) => {
  3896. this.setState({
  3897. nation: e.target.value,
  3898. });
  3899. }}
  3900. />
  3901. </FormItem>
  3902. </div>
  3903. <div className="clearfix">
  3904. <FormItem
  3905. className="half-item"
  3906. {...formItemLayout}
  3907. label="户籍地址"
  3908. >
  3909. <Cascader
  3910. options={this.state.Area}
  3911. value={this.state.residence}
  3912. placeholder="选择城市"
  3913. style={{ width: "200px" }}
  3914. onChange={(e, pre) => {
  3915. this.setState({ residence: e });
  3916. }}
  3917. />
  3918. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3919. </FormItem>
  3920. <FormItem
  3921. className="half-item"
  3922. {...formItemLayout}
  3923. label="户籍街道地址"
  3924. >
  3925. <Input
  3926. placeholder="输入街道地址"
  3927. style={{ width: 200 }}
  3928. value={this.state.residenceAddress}
  3929. onChange={(e) => {
  3930. this.setState({
  3931. residenceAddress: e.target.value,
  3932. });
  3933. }}
  3934. />
  3935. </FormItem>
  3936. </div>
  3937. <div className="clearfix">
  3938. <FormItem
  3939. className="half-item"
  3940. {...formItemLayout}
  3941. label="现住地址"
  3942. >
  3943. <Cascader
  3944. options={this.state.Area}
  3945. value={this.state.now}
  3946. placeholder="选择城市"
  3947. style={{ width: "200px" }}
  3948. onChange={(e, pre) => {
  3949. this.setState({ now: e });
  3950. }}
  3951. />
  3952. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3953. </FormItem>
  3954. <FormItem
  3955. className="half-item"
  3956. {...formItemLayout}
  3957. label="现住街道地址"
  3958. >
  3959. <Input
  3960. placeholder="输入街道地址"
  3961. style={{ width: 200 }}
  3962. value={this.state.nowAddress}
  3963. onChange={(e) => {
  3964. this.setState({
  3965. nowAddress: e.target.value,
  3966. });
  3967. }}
  3968. />
  3969. </FormItem>
  3970. </div>
  3971. <div className="clearfix">
  3972. <FormItem
  3973. className="half-item"
  3974. {...formItemLayout}
  3975. label="籍贯"
  3976. >
  3977. <Cascader
  3978. options={this.state.Birthplaces}
  3979. value={this.state.nativePlace}
  3980. placeholder="选择城市"
  3981. style={{ width: "200px" }}
  3982. onChange={(e, pre) => {
  3983. this.setState({ nativePlace: e });
  3984. }}
  3985. />
  3986. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3987. </FormItem>
  3988. <FormItem
  3989. className="half-item"
  3990. {...formItemLayout}
  3991. label="身份证"
  3992. >
  3993. <Input
  3994. placeholder="输入身份证信息"
  3995. style={{ width: 200 }}
  3996. value={this.state.idCard}
  3997. onChange={(e) => {
  3998. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  3999. this.setState({
  4000. idCard: e.target.value,
  4001. });
  4002. }}
  4003. />
  4004. </FormItem>
  4005. </div>
  4006. <div className="clearfix">
  4007. <FormItem
  4008. className="half-item"
  4009. {...formItemLayout}
  4010. label="身份证领证机关"
  4011. >
  4012. <Input
  4013. placeholder="输入机关名称"
  4014. style={{ width: 200 }}
  4015. value={this.state.certificationAuthority}
  4016. onChange={(e) => {
  4017. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4018. this.setState({
  4019. certificationAuthority: e.target.value,
  4020. });
  4021. }}
  4022. />
  4023. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4024. </FormItem>
  4025. <FormItem
  4026. className="half-item"
  4027. {...formItemLayout}
  4028. label="婚姻状态"
  4029. >
  4030. <Radio.Group
  4031. onChange={(e) => {
  4032. this.setState({ marriage: e.target.value });
  4033. }}
  4034. value={this.state.marriage}
  4035. >
  4036. <Radio value={0}>未婚</Radio>
  4037. <Radio value={1}>已婚</Radio>
  4038. <Radio value={2}>离异</Radio>
  4039. </Radio.Group>
  4040. </FormItem>
  4041. </div>
  4042. <div className="clearfix">
  4043. <FormItem
  4044. className="half-item"
  4045. labelCol={{ span: 6 }}
  4046. wrapperCol={{ span: 30 }}
  4047. label="子女数量"
  4048. >
  4049. <span>儿子:</span>
  4050. <Input
  4051. placeholder="输入数量"
  4052. style={{ width: 80 }}
  4053. type={"number"}
  4054. value={this.state.son}
  4055. onChange={(e) => {
  4056. this.setState({
  4057. son: e.target.value,
  4058. });
  4059. }}
  4060. />
  4061. <span style={{ marginLeft: 10 }}>女儿:</span>
  4062. <Input
  4063. placeholder="输入数量"
  4064. style={{ width: 80 }}
  4065. type={"number"}
  4066. value={this.state.girl}
  4067. onChange={(e) => {
  4068. this.setState({
  4069. girl: e.target.value,
  4070. });
  4071. }}
  4072. />
  4073. </FormItem>
  4074. <FormItem
  4075. className="half-item"
  4076. {...formItemLayout}
  4077. label="政治面貌"
  4078. >
  4079. <Select
  4080. placeholder="请选择政治面貌"
  4081. style={{ width: 200 }}
  4082. onChange={(e) => {
  4083. this.setState({ politicalOutlook: e });
  4084. }}
  4085. value={this.state.politicalOutlook}
  4086. >
  4087. <Option value={0}>群众</Option>
  4088. <Option value={1}>中共预备党员</Option>
  4089. <Option value={2}>中共党员</Option>
  4090. <Option value={3}>致公党党员</Option>
  4091. </Select>
  4092. </FormItem>
  4093. </div>
  4094. <Button
  4095. type="primary"
  4096. shape="round"
  4097. size="large"
  4098. style={{
  4099. position: "relative",
  4100. left: "50%",
  4101. transform: "translateX(-50%)",
  4102. }}
  4103. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4104. >
  4105. 保存
  4106. </Button>
  4107. </Spin>
  4108. </Modal>
  4109. </Modal>
  4110. <Modal
  4111. visible={this.state.peoVisible}
  4112. onOk={this.checkOk}
  4113. footer={null}
  4114. width={800}
  4115. style={{ position: "relative", zIndex: 9999 }}
  4116. onCancel={() => {
  4117. this.loadData();
  4118. this.addPeoCancel();
  4119. }}
  4120. >
  4121. <Spin spinning={this.state.loading}>
  4122. <h2
  4123. style={{
  4124. textAlign: "center",
  4125. paddingBottom: 10,
  4126. marginBottom: 10,
  4127. }}
  4128. >
  4129. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  4130. </h2>
  4131. <div className="clearfix">
  4132. <FormItem
  4133. className="half-item"
  4134. {...formItemLayout}
  4135. label="员工编号"
  4136. >
  4137. <Input
  4138. placeholder="请输入员工编号"
  4139. style={{ width: 200 }}
  4140. value={this.state.employeeId}
  4141. onChange={(e) => {
  4142. this.setState({
  4143. employeeId: e.target.value,
  4144. });
  4145. }}
  4146. />
  4147. <Button
  4148. disabled={
  4149. this.state.employeeId || this.state.employeeId == 0
  4150. ? false
  4151. : true
  4152. }
  4153. style={{ position: "absolute" }}
  4154. type={"primary"}
  4155. onClick={this.verifyId}
  4156. >
  4157. 验证重复
  4158. </Button>
  4159. </FormItem>
  4160. <FormItem
  4161. className="half-item"
  4162. {...formItemLayout}
  4163. label="门禁编号"
  4164. >
  4165. <Input
  4166. style={{ width: 200 }}
  4167. placeholder="请输入门禁编号"
  4168. value={this.state.doorId}
  4169. onChange={(e) => {
  4170. this.setState({
  4171. doorId: e.target.value,
  4172. });
  4173. }}
  4174. />
  4175. <Button
  4176. disabled={
  4177. this.state.doorId || this.state.doorId == 0 ? false : true
  4178. }
  4179. style={{ position: "absolute" }}
  4180. type={"primary"}
  4181. onClick={this.verifyDoor}
  4182. >
  4183. 验证重复
  4184. </Button>
  4185. </FormItem>
  4186. </div>
  4187. <div className="clearfix">
  4188. <FormItem className="half-item" {...formItemLayout} label="姓名">
  4189. <Input
  4190. placeholder="请输入姓名"
  4191. style={{ width: 200 }}
  4192. value={this.state.name}
  4193. onChange={(e) => {
  4194. this.setState({
  4195. name: e.target.value,
  4196. });
  4197. }}
  4198. />
  4199. </FormItem>
  4200. <FormItem
  4201. className="half-item"
  4202. {...formItemLayout}
  4203. label="出生日期"
  4204. >
  4205. <DatePicker
  4206. value={
  4207. this.state.birthdays ? moment(this.state.birthdays) : null
  4208. }
  4209. onChange={(e, t) => {
  4210. this.setState({
  4211. birthdays: t,
  4212. });
  4213. }}
  4214. />
  4215. </FormItem>
  4216. </div>
  4217. <div className="clearfix">
  4218. <FormItem className="half-item" {...formItemLayout} label="性别">
  4219. <Radio.Group
  4220. onChange={(e) => {
  4221. this.setState({ sex: e.target.value });
  4222. }}
  4223. value={this.state.sex}
  4224. >
  4225. <Radio value={0}>男</Radio>
  4226. <Radio value={1}>女</Radio>
  4227. </Radio.Group>
  4228. </FormItem>
  4229. <FormItem className="half-item" {...formItemLayout} label="民族">
  4230. <Input
  4231. placeholder="输入民族(例:汉族)"
  4232. style={{ width: 200 }}
  4233. value={this.state.nation}
  4234. onChange={(e) => {
  4235. this.setState({
  4236. nation: e.target.value,
  4237. });
  4238. }}
  4239. />
  4240. </FormItem>
  4241. </div>
  4242. <div className="clearfix">
  4243. <FormItem
  4244. className="half-item"
  4245. {...formItemLayout}
  4246. label="户籍地址"
  4247. >
  4248. <Cascader
  4249. options={this.state.Area}
  4250. value={this.state.residence}
  4251. placeholder="选择城市"
  4252. style={{ width: "200px" }}
  4253. onChange={(e, pre) => {
  4254. this.setState({ residence: e });
  4255. }}
  4256. />
  4257. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4258. </FormItem>
  4259. <FormItem
  4260. className="half-item"
  4261. {...formItemLayout}
  4262. label="户籍街道地址"
  4263. >
  4264. <Input
  4265. placeholder="输入街道地址"
  4266. style={{ width: 200 }}
  4267. value={this.state.residenceAddress}
  4268. onChange={(e) => {
  4269. this.setState({
  4270. residenceAddress: e.target.value,
  4271. });
  4272. }}
  4273. />
  4274. </FormItem>
  4275. </div>
  4276. <div className="clearfix">
  4277. <FormItem
  4278. className="half-item"
  4279. {...formItemLayout}
  4280. label="现住地址"
  4281. >
  4282. <Cascader
  4283. options={this.state.Area}
  4284. value={this.state.now}
  4285. placeholder="选择城市"
  4286. style={{ width: "200px" }}
  4287. onChange={(e, pre) => {
  4288. this.setState({ now: e });
  4289. }}
  4290. />
  4291. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4292. </FormItem>
  4293. <FormItem
  4294. className="half-item"
  4295. {...formItemLayout}
  4296. label="现住街道地址"
  4297. >
  4298. <Input
  4299. placeholder="输入街道地址"
  4300. style={{ width: 200 }}
  4301. value={this.state.nowAddress}
  4302. onChange={(e) => {
  4303. this.setState({
  4304. nowAddress: e.target.value,
  4305. });
  4306. }}
  4307. />
  4308. </FormItem>
  4309. </div>
  4310. <div className="clearfix">
  4311. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  4312. <Cascader
  4313. options={this.state.Birthplaces}
  4314. value={this.state.nativePlace}
  4315. placeholder="选择城市"
  4316. style={{ width: "200px" }}
  4317. onChange={(e, pre) => {
  4318. this.setState({ nativePlace: e });
  4319. }}
  4320. />
  4321. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4322. </FormItem>
  4323. <FormItem
  4324. className="half-item"
  4325. {...formItemLayout}
  4326. label="身份证"
  4327. >
  4328. <Input
  4329. placeholder="输入身份证信息"
  4330. style={{ width: 200 }}
  4331. value={this.state.idCard}
  4332. onChange={(e) => {
  4333. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4334. this.setState({
  4335. idCard: e.target.value,
  4336. });
  4337. }}
  4338. />
  4339. </FormItem>
  4340. </div>
  4341. <div className="clearfix">
  4342. <FormItem
  4343. className="half-item"
  4344. {...formItemLayout}
  4345. label="身份证领证机关"
  4346. >
  4347. <Input
  4348. placeholder="输入机关名称"
  4349. style={{ width: 200 }}
  4350. value={this.state.certificationAuthority}
  4351. onChange={(e) => {
  4352. // let reg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  4353. this.setState({
  4354. certificationAuthority: e.target.value,
  4355. });
  4356. }}
  4357. />
  4358. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4359. </FormItem>
  4360. <FormItem
  4361. className="half-item"
  4362. {...formItemLayout}
  4363. label="婚姻状态"
  4364. >
  4365. <Radio.Group
  4366. onChange={(e) => {
  4367. this.setState({ marriage: e.target.value });
  4368. }}
  4369. value={this.state.marriage}
  4370. >
  4371. <Radio value={0}>未婚</Radio>
  4372. <Radio value={1}>已婚</Radio>
  4373. <Radio value={2}>离异</Radio>
  4374. </Radio.Group>
  4375. </FormItem>
  4376. </div>
  4377. <div className="clearfix">
  4378. <FormItem
  4379. className="half-item"
  4380. labelCol={{ span: 6 }}
  4381. wrapperCol={{ span: 30 }}
  4382. label="子女数量"
  4383. >
  4384. <span>儿子:</span>
  4385. <Input
  4386. placeholder="输入数量"
  4387. style={{ width: 80 }}
  4388. type={"number"}
  4389. value={this.state.son}
  4390. onChange={(e) => {
  4391. this.setState({
  4392. son: e.target.value,
  4393. });
  4394. }}
  4395. />
  4396. <span style={{ marginLeft: 10 }}>女儿:</span>
  4397. <Input
  4398. placeholder="输入数量"
  4399. style={{ width: 80 }}
  4400. type={"number"}
  4401. value={this.state.girl}
  4402. onChange={(e) => {
  4403. this.setState({
  4404. girl: e.target.value,
  4405. });
  4406. }}
  4407. />
  4408. </FormItem>
  4409. <FormItem
  4410. className="half-item"
  4411. {...formItemLayout}
  4412. label="政治面貌"
  4413. >
  4414. <Select
  4415. placeholder="请选择政治面貌"
  4416. style={{ width: 200 }}
  4417. onChange={(e) => {
  4418. this.setState({ politicalOutlook: e });
  4419. }}
  4420. value={this.state.politicalOutlook}
  4421. >
  4422. <Option value={0}>群众</Option>
  4423. <Option value={1}>中共预备党员</Option>
  4424. <Option value={2}>中共党员</Option>
  4425. <Option value={3}>致公党党员</Option>
  4426. </Select>
  4427. </FormItem>
  4428. </div>
  4429. <Button
  4430. type="primary"
  4431. shape="round"
  4432. size="large"
  4433. style={{
  4434. position: "relative",
  4435. left: "50%",
  4436. transform: "translateX(-50%)",
  4437. }}
  4438. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4439. >
  4440. 保存
  4441. </Button>
  4442. </Spin>
  4443. </Modal>
  4444. <Modal
  4445. visible={this.state.stayVisible}
  4446. footer={null}
  4447. width={800}
  4448. onCancel={() => {
  4449. this.loadData();
  4450. this.stayCancel();
  4451. }}
  4452. >
  4453. <Spin spinning={this.state.loading}>
  4454. <h3
  4455. style={{
  4456. textAlign: "center",
  4457. paddingBottom: 10,
  4458. marginBottom: 10,
  4459. }}
  4460. >
  4461. 任职信息
  4462. </h3>
  4463. <div className="clearfix">
  4464. <FormItem
  4465. className="half-item"
  4466. labelCol={{ span: 6 }}
  4467. wrapperCol={{ span: 30 }}
  4468. label="员工状态"
  4469. >
  4470. <Select
  4471. placeholder="请选择状态"
  4472. style={{ width: 200 }}
  4473. onChange={(e) => {
  4474. this.setState({ status: e });
  4475. }}
  4476. value={this.state.status}
  4477. >
  4478. <Option value="0">实习生</Option>
  4479. <Option value="1">在职(试用期)</Option>
  4480. <Option value="2">在职(合同期)</Option>
  4481. <Option value="3">兼职</Option>
  4482. <Option value="4">已离职</Option>
  4483. </Select>
  4484. </FormItem>
  4485. <FormItem
  4486. className="half-item"
  4487. {...formItemLayout}
  4488. label="所属系统"
  4489. >
  4490. <Select
  4491. placeholder="请选择所属系统"
  4492. style={{ width: 200 }}
  4493. onChange={(e) => {
  4494. this.setState({ system: e });
  4495. }}
  4496. value={this.state.system}
  4497. >
  4498. <Option value="0">管理系统</Option>
  4499. <Option value="1">营销系统</Option>
  4500. <Option value="2">技术系统</Option>
  4501. </Select>
  4502. </FormItem>
  4503. </div>
  4504. <div className="clearfix">
  4505. <FormItem
  4506. className="half-item"
  4507. labelCol={{ span: 6 }}
  4508. wrapperCol={{ span: 30 }}
  4509. label="工作性质"
  4510. >
  4511. <Radio.Group
  4512. onChange={(e) => {
  4513. this.setState({ jobNature: e.target.value });
  4514. }}
  4515. value={this.state.jobNature}
  4516. >
  4517. <Radio value="0">全职</Radio>
  4518. <Radio value="1">兼职</Radio>
  4519. <Radio value="2">其他</Radio>
  4520. </Radio.Group>
  4521. <Input
  4522. placeholder="输入性质"
  4523. style={{
  4524. width: 80,
  4525. display:
  4526. this.state.jobNature == 2 ? "inline-block" : "none",
  4527. }}
  4528. value={this.state.jobNatureRemarks}
  4529. onChange={(e) => {
  4530. this.setState({
  4531. jobNatureRemarks: e.target.value,
  4532. });
  4533. }}
  4534. />
  4535. </FormItem>
  4536. <FormItem className="half-item" {...formItemLayout} label="工龄">
  4537. <span>{this.state.ModalData.workingYear}</span>
  4538. </FormItem>
  4539. </div>
  4540. <div className="clearfix">
  4541. <FormItem
  4542. className="half-item"
  4543. {...formItemLayout}
  4544. label="入职时间"
  4545. >
  4546. <DatePicker
  4547. value={
  4548. this.state.entryTimes ? moment(this.state.entryTimes) : null
  4549. }
  4550. style={{ width: 200 }}
  4551. onChange={(e, t) => {
  4552. this.setState({
  4553. entryTimes: t,
  4554. });
  4555. }}
  4556. />
  4557. </FormItem>
  4558. <FormItem
  4559. className="half-item"
  4560. {...formItemLayout}
  4561. label="转正时间"
  4562. >
  4563. <DatePicker
  4564. value={
  4565. this.state.promotionTimes
  4566. ? moment(this.state.promotionTimes)
  4567. : null
  4568. }
  4569. style={{ width: 200 }}
  4570. onChange={(e, t) => {
  4571. this.setState({
  4572. promotionTimes: t,
  4573. });
  4574. }}
  4575. />
  4576. </FormItem>
  4577. </div>
  4578. <div className="clearfix">
  4579. <FormItem
  4580. className="half-item"
  4581. {...formItemLayout}
  4582. label="所属公司"
  4583. >
  4584. <Select
  4585. placeholder="选择公司"
  4586. style={{ width: 200, marginRight: 10 }}
  4587. value={this.state.company}
  4588. onChange={(e) => {
  4589. this.setState({ company: e });
  4590. }}
  4591. >
  4592. {departmentArr.map(function (item) {
  4593. return (
  4594. <Select.Option key={item.id}>{item.name}</Select.Option>
  4595. );
  4596. })}
  4597. </Select>
  4598. </FormItem>
  4599. <FormItem className="half-item" {...formItemLayout} label="级别">
  4600. <Select
  4601. placeholder="请选择所属级别"
  4602. style={{ width: 200 }}
  4603. onChange={(e) => {
  4604. this.setState({ lvl: e });
  4605. }}
  4606. value={this.state.lvl}
  4607. >
  4608. <Option value="0">员工</Option>
  4609. <Option value="1">主管</Option>
  4610. <Option value="2">经理</Option>
  4611. <Option value="3">总经理</Option>
  4612. <Option value="4">副总裁</Option>
  4613. <Option value="5">副总</Option>
  4614. <Option value="6">总监</Option>
  4615. <Option value="7">董事长</Option>
  4616. </Select>
  4617. </FormItem>
  4618. </div>
  4619. <div className="clearfix">
  4620. <FormItem className="half-item" {...formItemLayout} label="职位">
  4621. <Select
  4622. placeholder="选择职位"
  4623. style={{ width: 200, marginRight: 10 }}
  4624. value={this.state.jobs}
  4625. onChange={(e) => {
  4626. this.setState({ jobs: e, star: [] });
  4627. this.getList();
  4628. }}
  4629. >
  4630. <Option value="1">员工</Option>
  4631. <Option value="2">试用营销员</Option>
  4632. <Option value="3">试用营销储备经理</Option>
  4633. <Option value="4">营销经理</Option>
  4634. <Option value="5">总监合伙人</Option>
  4635. <Option value="6">技术助理</Option>
  4636. <Option value="7">咨询师</Option>
  4637. <Option value="8">咨询师主管</Option>
  4638. <Option value="9">咨询师经理</Option>
  4639. <Option value="10">高级经理</Option>
  4640. </Select>
  4641. </FormItem>
  4642. <FormItem className="half-item" {...formItemLayout} label="星级">
  4643. <Select
  4644. placeholder="请选择所属星级"
  4645. style={{ width: 200 }}
  4646. onChange={(e) => {
  4647. this.setState({ star: e });
  4648. }}
  4649. value={this.state.star}
  4650. >
  4651. {this.state.starArr
  4652. ? this.state.starArr.map((item, index) => {
  4653. return (
  4654. <Option value={item.star}>{item.starName}</Option>
  4655. );
  4656. })
  4657. : []}
  4658. </Select>
  4659. </FormItem>
  4660. </div>
  4661. <div className="clearfix">
  4662. <FormItem
  4663. className="half-item"
  4664. labelCol={{ span: 6 }}
  4665. wrapperCol={{ span: 30 }}
  4666. label="岗位津贴"
  4667. >
  4668. <Input
  4669. placeholder="输入金额"
  4670. style={{ width: 200 }}
  4671. value={this.state.allowance}
  4672. onChange={(e) => {
  4673. this.setState({
  4674. allowance: e.target.value,
  4675. });
  4676. }}
  4677. />
  4678. </FormItem>
  4679. </div>
  4680. <Button
  4681. type="primary"
  4682. shape="round"
  4683. size="large"
  4684. style={{
  4685. position: "relative",
  4686. left: "50%",
  4687. transform: "translateX(-50%)",
  4688. }}
  4689. onClick={this.editStay}
  4690. >
  4691. 保存
  4692. </Button>
  4693. </Spin>
  4694. </Modal>
  4695. <Modal
  4696. visible={this.state.phoneVisible}
  4697. footer={null}
  4698. width={800}
  4699. onCancel={() => {
  4700. this.loadData();
  4701. this.phoneCancel();
  4702. }}
  4703. >
  4704. <Spin spinning={this.state.loading}>
  4705. <h3
  4706. style={{
  4707. textAlign: "center",
  4708. paddingBottom: 10,
  4709. marginBottom: 10,
  4710. }}
  4711. >
  4712. 联系信息
  4713. </h3>
  4714. <div className="clearfix">
  4715. <FormItem
  4716. className="half-item"
  4717. labelCol={{ span: 6 }}
  4718. wrapperCol={{ span: 30 }}
  4719. label="手机号码"
  4720. >
  4721. <Input
  4722. placeholder="输入号码"
  4723. style={{ width: 200 }}
  4724. value={this.state.mobile}
  4725. onChange={(e) => {
  4726. this.setState({
  4727. mobile: e.target.value,
  4728. });
  4729. }}
  4730. />
  4731. </FormItem>
  4732. <FormItem
  4733. className="half-item"
  4734. labelCol={{ span: 6 }}
  4735. wrapperCol={{ span: 30 }}
  4736. label="办公室电话"
  4737. >
  4738. <Input
  4739. placeholder="输入电话"
  4740. style={{ width: 200 }}
  4741. value={this.state.fixedTel}
  4742. onChange={(e) => {
  4743. this.setState({
  4744. fixedTel: e.target.value,
  4745. });
  4746. }}
  4747. />
  4748. </FormItem>
  4749. </div>
  4750. <div className="clearfix">
  4751. <FormItem
  4752. className="half-item"
  4753. labelCol={{ span: 6 }}
  4754. wrapperCol={{ span: 30 }}
  4755. label="紧急联系人1"
  4756. >
  4757. <Input
  4758. placeholder="请输入名字"
  4759. style={{ width: 200 }}
  4760. value={
  4761. this.state.contactList.length
  4762. ? this.state.contactList[0].emergencyContact
  4763. : ""
  4764. }
  4765. onChange={(e) => {
  4766. this.state.contactList[0].emergencyContact = e.target.value;
  4767. let obj = this.state.contactList;
  4768. this.setState({
  4769. contactList: obj,
  4770. });
  4771. }}
  4772. />
  4773. </FormItem>
  4774. <FormItem
  4775. className="half-item"
  4776. labelCol={{ span: 6 }}
  4777. wrapperCol={{ span: 30 }}
  4778. label="紧急联系人电话"
  4779. >
  4780. <Input
  4781. placeholder="请输入电话"
  4782. style={{ width: 200 }}
  4783. value={
  4784. this.state.contactList.length
  4785. ? this.state.contactList[0].emergencyMobile
  4786. : ""
  4787. }
  4788. onChange={(e) => {
  4789. this.state.contactList[0].emergencyMobile = e.target.value;
  4790. let obj = this.state.contactList;
  4791. this.setState({
  4792. contactList: obj,
  4793. });
  4794. }}
  4795. />
  4796. </FormItem>
  4797. </div>
  4798. <div className="clearfix">
  4799. <FormItem
  4800. className="half-item"
  4801. labelCol={{ span: 6 }}
  4802. wrapperCol={{ span: 30 }}
  4803. label="紧急联系人2"
  4804. >
  4805. <Input
  4806. placeholder="请输入名字"
  4807. style={{ width: 200 }}
  4808. value={
  4809. this.state.contactList.length
  4810. ? this.state.contactList[1].emergencyContact
  4811. : ""
  4812. }
  4813. onChange={(e) => {
  4814. this.state.contactList[1].emergencyContact = e.target.value;
  4815. let obj = this.state.contactList;
  4816. this.setState({
  4817. contactList: obj,
  4818. });
  4819. }}
  4820. />
  4821. </FormItem>
  4822. <FormItem
  4823. className="half-item"
  4824. labelCol={{ span: 6 }}
  4825. wrapperCol={{ span: 30 }}
  4826. label="紧急联系人电话"
  4827. >
  4828. <Input
  4829. placeholder="请输入电话"
  4830. style={{ width: 200 }}
  4831. value={
  4832. this.state.contactList.length
  4833. ? this.state.contactList[1].emergencyMobile
  4834. : ""
  4835. }
  4836. onChange={(e) => {
  4837. this.state.contactList[1].emergencyMobile = e.target.value;
  4838. let obj = this.state.contactList;
  4839. this.setState({
  4840. contactList: obj,
  4841. });
  4842. }}
  4843. />
  4844. </FormItem>
  4845. </div>
  4846. <div className="clearfix">
  4847. <FormItem
  4848. className="half-item"
  4849. labelCol={{ span: 6 }}
  4850. wrapperCol={{ span: 30 }}
  4851. label="紧急联系人3"
  4852. >
  4853. <Input
  4854. placeholder="请输入名字"
  4855. style={{ width: 200 }}
  4856. value={
  4857. this.state.contactList.length
  4858. ? this.state.contactList[2].emergencyContact
  4859. : ""
  4860. }
  4861. onChange={(e) => {
  4862. this.state.contactList[2].emergencyContact = e.target.value;
  4863. let obj = this.state.contactList;
  4864. this.setState({
  4865. contactList: obj,
  4866. });
  4867. }}
  4868. />
  4869. </FormItem>
  4870. <FormItem
  4871. className="half-item"
  4872. labelCol={{ span: 6 }}
  4873. wrapperCol={{ span: 30 }}
  4874. label="紧急联系人电话"
  4875. >
  4876. <Input
  4877. placeholder="请输入电话"
  4878. style={{ width: 200 }}
  4879. value={
  4880. this.state.contactList.length
  4881. ? this.state.contactList[2].emergencyMobile
  4882. : ""
  4883. }
  4884. onChange={(e) => {
  4885. this.state.contactList[2].emergencyMobile = e.target.value;
  4886. let obj = this.state.contactList;
  4887. this.setState({
  4888. contactList: obj,
  4889. });
  4890. }}
  4891. />
  4892. </FormItem>
  4893. </div>
  4894. <Button
  4895. type="primary"
  4896. shape="round"
  4897. size="large"
  4898. style={{
  4899. position: "relative",
  4900. left: "50%",
  4901. transform: "translateX(-50%)",
  4902. }}
  4903. onClick={this.editPhone}
  4904. >
  4905. 保存
  4906. </Button>
  4907. </Spin>
  4908. </Modal>
  4909. <Modal
  4910. visible={this.state.entryVisible}
  4911. footer={null}
  4912. width={800}
  4913. onCancel={() => {
  4914. this.loadData();
  4915. this.entryCancel();
  4916. }}
  4917. >
  4918. <Spin spinning={this.state.loading}>
  4919. <h3
  4920. style={{
  4921. textAlign: "center",
  4922. paddingBottom: 10,
  4923. marginBottom: 10,
  4924. }}
  4925. >
  4926. 入职信息
  4927. </h3>
  4928. <div className="clearfix">
  4929. <FormItem
  4930. className="half-item"
  4931. labelCol={{ span: 6 }}
  4932. wrapperCol={{ span: 30 }}
  4933. label="毕业学校"
  4934. >
  4935. <Input
  4936. placeholder="输入学校名称"
  4937. style={{ width: 200 }}
  4938. value={this.state.school}
  4939. onChange={(e) => {
  4940. this.setState({
  4941. school: e.target.value,
  4942. });
  4943. }}
  4944. />
  4945. </FormItem>
  4946. <FormItem
  4947. className="half-item"
  4948. labelCol={{ span: 6 }}
  4949. wrapperCol={{ span: 30 }}
  4950. label="学历"
  4951. >
  4952. <Select
  4953. placeholder="请选择学历"
  4954. style={{ width: 200 }}
  4955. onChange={(e) => {
  4956. this.setState({ education: e });
  4957. }}
  4958. value={this.state.education}
  4959. >
  4960. <Option value="0">高中/中专</Option>
  4961. <Option value="1">专科/高职</Option>
  4962. <Option value="2">本科</Option>
  4963. <Option value="3">研究生</Option>
  4964. <Option value="5">博士</Option>
  4965. </Select>
  4966. </FormItem>
  4967. </div>
  4968. <div className="clearfix">
  4969. <FormItem
  4970. className="half-item"
  4971. labelCol={{ span: 6 }}
  4972. wrapperCol={{ span: 30 }}
  4973. label="所学专业"
  4974. >
  4975. <Input
  4976. placeholder="请输入专业名称"
  4977. style={{ width: 200 }}
  4978. value={this.state.major}
  4979. onChange={(e) => {
  4980. this.setState({
  4981. major: e.target.value,
  4982. });
  4983. }}
  4984. />
  4985. </FormItem>
  4986. <FormItem
  4987. className="half-item"
  4988. labelCol={{ span: 6 }}
  4989. wrapperCol={{ span: 30 }}
  4990. label="职称"
  4991. >
  4992. <Input
  4993. placeholder="请输入职称"
  4994. style={{ width: 200 }}
  4995. value={this.state.title}
  4996. onChange={(e) => {
  4997. this.setState({
  4998. title: e.target.value,
  4999. });
  5000. }}
  5001. />
  5002. </FormItem>
  5003. </div>
  5004. <div className="clearfix">
  5005. <FormItem
  5006. className="half-item"
  5007. labelCol={{ span: 6 }}
  5008. wrapperCol={{ span: 30 }}
  5009. label="备注"
  5010. >
  5011. <Input
  5012. placeholder="请输入备注"
  5013. style={{ width: 200 }}
  5014. value={this.state.entryRemarks}
  5015. onChange={(e) => {
  5016. this.setState({
  5017. entryRemarks: e.target.value,
  5018. });
  5019. }}
  5020. />
  5021. </FormItem>
  5022. </div>
  5023. <div
  5024. className="clearfix"
  5025. style={{ paddingLeft: 70, marginBottom: 10 }}
  5026. >
  5027. <div style={{ marginBottom: 10 }}>附件:</div>
  5028. <PicModal
  5029. remarks={this.picToArr(this.state.annexName)}
  5030. picUrl={this.picToArr(this.state.annexUrl)}
  5031. remove={this.ruzhiRemove}
  5032. />
  5033. <Button onClick={this.addPic}>添加附件</Button>
  5034. </div>
  5035. <Button
  5036. type="primary"
  5037. shape="round"
  5038. size="large"
  5039. style={{
  5040. position: "relative",
  5041. left: "50%",
  5042. transform: "translateX(-50%)",
  5043. }}
  5044. onClick={this.editRuzi}
  5045. >
  5046. 保存
  5047. </Button>
  5048. <AddPicModal
  5049. cancel={this.addPicModalCancel}
  5050. add={this.add()}
  5051. visible={this.state.addPicModal}
  5052. />
  5053. </Spin>
  5054. </Modal>
  5055. <Modal
  5056. visible={this.state.upgradeVisible}
  5057. footer={null}
  5058. width={800}
  5059. onCancel={() => {
  5060. this.loadData();
  5061. this.upgradeCancel();
  5062. }}
  5063. >
  5064. <Spin spinning={this.state.loading}>
  5065. <h3
  5066. style={{
  5067. textAlign: "center",
  5068. paddingBottom: 10,
  5069. marginBottom: 10,
  5070. }}
  5071. >
  5072. 晋升信息
  5073. </h3>
  5074. <div>
  5075. <div className="clearfix">
  5076. <FormItem
  5077. className="half-item"
  5078. labelCol={{ span: 6 }}
  5079. wrapperCol={{ span: 30 }}
  5080. label="当前职位"
  5081. >
  5082. <Select
  5083. placeholder="选择职位"
  5084. style={{ width: 200, marginRight: 10 }}
  5085. value={this.state.promotionList.oldJobs}
  5086. onChange={(e) => {
  5087. this.setState({ jobs: e, star: [] });
  5088. this.getList();
  5089. this.state.promotionList.oldJobs = e;
  5090. this.state.promotionList.oldLvl = [];
  5091. this.setState({
  5092. promotionList: this.state.promotionList,
  5093. });
  5094. }}
  5095. >
  5096. <Option value="1">员工</Option>
  5097. <Option value="2">试用营销员</Option>
  5098. <Option value="3">试用营销储备经理</Option>
  5099. <Option value="4">营销经理</Option>
  5100. <Option value="5">总监合伙人</Option>
  5101. <Option value="6">技术助理</Option>
  5102. <Option value="7">咨询师</Option>
  5103. <Option value="8">咨询师主管</Option>
  5104. <Option value="9">咨询师经理</Option>
  5105. <Option value="10">高级经理</Option>
  5106. </Select>
  5107. </FormItem>
  5108. <FormItem
  5109. className="half-item"
  5110. labelCol={{ span: 6 }}
  5111. wrapperCol={{ span: 30 }}
  5112. label="当前星级"
  5113. >
  5114. <Select
  5115. placeholder="请选择所属星级"
  5116. style={{ width: 200 }}
  5117. onChange={(e) => {
  5118. this.state.promotionList.oldLvl = e;
  5119. this.setState({
  5120. promotionList: this.state.promotionList,
  5121. });
  5122. }}
  5123. value={this.state.promotionList.oldLvl}
  5124. >
  5125. {this.state.starArr.map((item, index) => {
  5126. return <Option value={item.star}>{item.starName}</Option>;
  5127. })}
  5128. </Select>
  5129. </FormItem>
  5130. </div>
  5131. <div className="clearfix">
  5132. <FormItem
  5133. className="half-item"
  5134. labelCol={{ span: 6 }}
  5135. wrapperCol={{ span: 30 }}
  5136. label="晋升后职位"
  5137. >
  5138. <Select
  5139. placeholder="选择职位"
  5140. style={{ width: 200, marginRight: 10 }}
  5141. value={this.state.promotionList.newJobs}
  5142. onChange={(e) => {
  5143. this.setState({ jobss: e });
  5144. this.getLists();
  5145. this.state.promotionList.newJobs = e;
  5146. this.state.promotionList.newLvl = [];
  5147. this.setState({
  5148. promotionList: this.state.promotionList,
  5149. });
  5150. }}
  5151. >
  5152. <Option value="1">员工</Option>
  5153. <Option value="2">试用营销员</Option>
  5154. <Option value="3">试用营销储备经理</Option>
  5155. <Option value="4">营销经理</Option>
  5156. <Option value="5">总监合伙人</Option>
  5157. <Option value="6">技术助理</Option>
  5158. <Option value="7">咨询师</Option>
  5159. <Option value="8">咨询师主管</Option>
  5160. <Option value="9">咨询师经理</Option>
  5161. <Option value="10">高级经理</Option>
  5162. </Select>
  5163. </FormItem>
  5164. <FormItem
  5165. className="half-item"
  5166. labelCol={{ span: 6 }}
  5167. wrapperCol={{ span: 30 }}
  5168. label="晋升后星级"
  5169. >
  5170. <Select
  5171. placeholder="请选择所属星级"
  5172. style={{ width: 200 }}
  5173. onChange={(e) => {
  5174. this.state.promotionList.newLvl = e;
  5175. this.setState({
  5176. promotionList: this.state.promotionList,
  5177. });
  5178. }}
  5179. value={this.state.promotionList.newLvl}
  5180. >
  5181. {this.state.starArrs.map((item, index) => {
  5182. return <Option value={item.star}>{item.starName}</Option>;
  5183. })}
  5184. </Select>
  5185. </FormItem>
  5186. </div>
  5187. <div className="clearfix">
  5188. <FormItem
  5189. className="half-item"
  5190. labelCol={{ span: 6 }}
  5191. wrapperCol={{ span: 30 }}
  5192. label="晋升时间"
  5193. >
  5194. <DatePicker
  5195. value={
  5196. this.state.promotionList.promotionTimes
  5197. ? moment(this.state.promotionList.promotionTimes)
  5198. : null
  5199. }
  5200. style={{ width: 200 }}
  5201. onChange={(e, t) => {
  5202. this.state.promotionList.promotionTimes = t;
  5203. this.setState({
  5204. promotionList: this.state.promotionList,
  5205. });
  5206. }}
  5207. />
  5208. </FormItem>
  5209. </div>
  5210. <div className="clearfix">
  5211. <FormItem
  5212. className="half-item"
  5213. labelCol={{ span: 6 }}
  5214. wrapperCol={{ span: 30 }}
  5215. label="备注"
  5216. >
  5217. <Input
  5218. placeholder="请输入备注"
  5219. style={{ width: 200 }}
  5220. value={this.state.promotionList.promotionRemarks}
  5221. onChange={(e) => {
  5222. this.state.promotionList.promotionRemarks =
  5223. e.target.value;
  5224. this.setState({
  5225. promotionList: this.state.promotionList,
  5226. });
  5227. }}
  5228. />
  5229. </FormItem>
  5230. </div>
  5231. <div
  5232. className="clearfix"
  5233. style={{ paddingLeft: 70, marginBottom: 10 }}
  5234. >
  5235. <div style={{ marginBottom: 10 }}>附件:</div>
  5236. <PicModal
  5237. remarks={this.picToArr(this.state.promotionList.annexName)}
  5238. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  5239. remove={this.jinshengRemove}
  5240. />
  5241. <Button onClick={this.addPic}>添加附件</Button>
  5242. </div>
  5243. </div>
  5244. <Button
  5245. type="primary"
  5246. shape="round"
  5247. size="large"
  5248. style={{
  5249. position: "relative",
  5250. left: "50%",
  5251. transform: "translateX(-50%)",
  5252. }}
  5253. onClick={this.editUpgrade}
  5254. >
  5255. 保存
  5256. </Button>
  5257. <AddPicModal
  5258. cancel={this.addPicModalCancel}
  5259. add={this.add()}
  5260. visible={this.state.addPicModal}
  5261. />
  5262. </Spin>
  5263. </Modal>
  5264. <Modal
  5265. visible={this.state.contractVisible}
  5266. footer={null}
  5267. width={800}
  5268. onCancel={() => {
  5269. this.loadData();
  5270. this.contractCancel();
  5271. }}
  5272. >
  5273. <Spin spinning={this.state.loading}>
  5274. <h3
  5275. style={{
  5276. textAlign: "center",
  5277. paddingBottom: 10,
  5278. marginBottom: 10,
  5279. }}
  5280. >
  5281. 合同信息
  5282. </h3>
  5283. <div>
  5284. <div className="clearfix">
  5285. <FormItem
  5286. className="half-item"
  5287. labelCol={{ span: 6 }}
  5288. wrapperCol={{ span: 30 }}
  5289. label="签订时间"
  5290. >
  5291. <DatePicker
  5292. value={
  5293. this.state.contractList.startTimes
  5294. ? moment(this.state.contractList.startTimes)
  5295. : null
  5296. }
  5297. style={{ width: 200 }}
  5298. onChange={(e, t) => {
  5299. this.state.contractList.startTimes = t;
  5300. this.setState({
  5301. contractList: this.state.contractList,
  5302. });
  5303. }}
  5304. />
  5305. </FormItem>
  5306. <FormItem
  5307. className="half-item"
  5308. labelCol={{ span: 6 }}
  5309. wrapperCol={{ span: 30 }}
  5310. label="到期时间"
  5311. >
  5312. <DatePicker
  5313. disabledDate={(e) => {
  5314. let time = moment(e).valueOf();
  5315. let today = moment(
  5316. this.state.contractList.startTimes
  5317. ).valueOf();
  5318. if (time <= today) {
  5319. return true;
  5320. } else if (!this.state.contractList.startTimes) {
  5321. return true;
  5322. }
  5323. }}
  5324. value={
  5325. this.state.contractList.endTimes
  5326. ? moment(this.state.contractList.endTimes)
  5327. : null
  5328. }
  5329. style={{ width: 200 }}
  5330. onChange={(e, t) => {
  5331. this.state.contractList.endTimes = t;
  5332. this.setState({
  5333. contractList: this.state.contractList,
  5334. });
  5335. }}
  5336. />
  5337. </FormItem>
  5338. </div>
  5339. <div className="clearfix">
  5340. <FormItem
  5341. className="half-item"
  5342. labelCol={{ span: 6 }}
  5343. wrapperCol={{ span: 30 }}
  5344. label="备注"
  5345. >
  5346. <Input
  5347. placeholder="请输入备注"
  5348. style={{ width: 200 }}
  5349. value={this.state.contractList.contractRemarks}
  5350. onChange={(e) => {
  5351. this.state.contractList.contractRemarks = e.target.value;
  5352. this.setState({
  5353. contractList: this.state.contractList,
  5354. });
  5355. }}
  5356. />
  5357. </FormItem>
  5358. </div>
  5359. <div
  5360. className="clearfix"
  5361. style={{ paddingLeft: 70, marginBottom: 10 }}
  5362. >
  5363. <div style={{ marginBottom: 10 }}>附件:</div>
  5364. <PicModal
  5365. remarks={this.picToArr(this.state.contractList.annexName)}
  5366. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  5367. remove={this.contractRemove}
  5368. />
  5369. <Button onClick={this.addPic}>添加附件</Button>
  5370. </div>
  5371. </div>
  5372. <Button
  5373. type="primary"
  5374. shape="round"
  5375. size="large"
  5376. style={{
  5377. position: "relative",
  5378. left: "50%",
  5379. transform: "translateX(-50%)",
  5380. }}
  5381. onClick={this.editContract}
  5382. >
  5383. 保存
  5384. </Button>
  5385. <AddPicModal
  5386. cancel={this.addPicModalCancel}
  5387. add={this.add()}
  5388. visible={this.state.addPicModal}
  5389. />
  5390. </Spin>
  5391. </Modal>
  5392. <Modal
  5393. visible={this.state.chooseVisible}
  5394. footer={null}
  5395. width={800}
  5396. onCancel={() => {
  5397. this.loadData();
  5398. this.chooseCancel();
  5399. }}
  5400. >
  5401. <Spin spinning={this.state.loading}>
  5402. <h3
  5403. style={{
  5404. textAlign: "center",
  5405. paddingBottom: 10,
  5406. marginBottom: 10,
  5407. }}
  5408. >
  5409. 奖惩信息
  5410. </h3>
  5411. <div>
  5412. <div className="clearfix">
  5413. <FormItem
  5414. className="half-item"
  5415. labelCol={{ span: 6 }}
  5416. wrapperCol={{ span: 30 }}
  5417. label="类型"
  5418. >
  5419. <Radio.Group
  5420. onChange={(e) => {
  5421. this.state.chooseList.chooseStatus = e.target.value;
  5422. this.setState({ chooseList: this.state.chooseList });
  5423. }}
  5424. value={this.state.chooseList.chooseStatus}
  5425. >
  5426. <Radio value={0}>奖励</Radio>
  5427. <Radio value={1}>罚款</Radio>
  5428. </Radio.Group>
  5429. </FormItem>
  5430. <FormItem
  5431. className="half-item"
  5432. labelCol={{ span: 6 }}
  5433. wrapperCol={{ span: 30 }}
  5434. label="时间"
  5435. >
  5436. <DatePicker
  5437. value={
  5438. this.state.chooseList.effectTimes
  5439. ? moment(this.state.chooseList.effectTimes)
  5440. : null
  5441. }
  5442. style={{ width: 200 }}
  5443. onChange={(e, t) => {
  5444. this.state.chooseList.effectTimes = t;
  5445. this.setState({
  5446. chooseList: this.state.chooseList,
  5447. });
  5448. }}
  5449. />
  5450. </FormItem>
  5451. </div>
  5452. <div className="clearfix">
  5453. <FormItem
  5454. className="half-item"
  5455. labelCol={{ span: 6 }}
  5456. wrapperCol={{ span: 30 }}
  5457. label="内容"
  5458. >
  5459. <Input
  5460. placeholder="请输入内容"
  5461. style={{ width: 200 }}
  5462. value={this.state.chooseList.chooseRemarks}
  5463. onChange={(e) => {
  5464. this.state.chooseList.chooseRemarks = e.target.value;
  5465. this.setState({
  5466. chooseList: this.state.chooseList,
  5467. });
  5468. }}
  5469. />
  5470. </FormItem>
  5471. </div>
  5472. <div
  5473. className="clearfix"
  5474. style={{ paddingLeft: 70, marginBottom: 10 }}
  5475. >
  5476. <div style={{ marginBottom: 10 }}>附件:</div>
  5477. <PicModal
  5478. remarks={this.picToArr(this.state.chooseList.annexName)}
  5479. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  5480. remove={this.chooseRemove}
  5481. />
  5482. <Button onClick={this.addPic}>添加附件</Button>
  5483. </div>
  5484. </div>
  5485. <Button
  5486. type="primary"
  5487. shape="round"
  5488. size="large"
  5489. style={{
  5490. position: "relative",
  5491. left: "50%",
  5492. transform: "translateX(-50%)",
  5493. }}
  5494. onClick={this.editChoose}
  5495. >
  5496. 保存
  5497. </Button>
  5498. <AddPicModal
  5499. cancel={this.addPicModalCancel}
  5500. add={this.add()}
  5501. visible={this.state.addPicModal}
  5502. />
  5503. </Spin>
  5504. </Modal>
  5505. <Modal
  5506. visible={this.state.quitVisible}
  5507. footer={null}
  5508. width={800}
  5509. onCancel={() => {
  5510. this.loadData();
  5511. this.quitCancel();
  5512. }}
  5513. >
  5514. <Spin spinning={this.state.loading}>
  5515. <h3
  5516. style={{
  5517. textAlign: "center",
  5518. paddingBottom: 10,
  5519. marginBottom: 10,
  5520. }}
  5521. >
  5522. 离职信息
  5523. </h3>
  5524. <div>
  5525. <div className="clearfix">
  5526. <FormItem
  5527. className="half-item"
  5528. labelCol={{ span: 6 }}
  5529. wrapperCol={{ span: 30 }}
  5530. label="离职时间"
  5531. >
  5532. <DatePicker
  5533. value={
  5534. this.state.quitList.effectTimes
  5535. ? moment(this.state.quitList.effectTimes)
  5536. : null
  5537. }
  5538. style={{ width: 200 }}
  5539. onChange={(e, t) => {
  5540. this.state.quitList.effectTimes = t;
  5541. this.setState({
  5542. quitList: this.state.quitList,
  5543. });
  5544. }}
  5545. />
  5546. </FormItem>
  5547. </div>
  5548. <div className="clearfix">
  5549. <FormItem
  5550. className="half-item"
  5551. labelCol={{ span: 6 }}
  5552. wrapperCol={{ span: 30 }}
  5553. label="备注"
  5554. >
  5555. <Input
  5556. placeholder="请输入备注"
  5557. style={{ width: 200 }}
  5558. value={this.state.quitList.quitRemarks}
  5559. onChange={(e) => {
  5560. this.state.quitList.quitRemarks = e.target.value;
  5561. this.setState({
  5562. quitList: this.state.quitList,
  5563. });
  5564. }}
  5565. />
  5566. </FormItem>
  5567. </div>
  5568. <div
  5569. className="clearfix"
  5570. style={{ paddingLeft: 70, marginBottom: 10 }}
  5571. >
  5572. <div style={{ marginBottom: 10 }}>附件:</div>
  5573. <PicModal
  5574. remarks={this.picToArr(this.state.quitList.annexName)}
  5575. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  5576. remove={this.quitRemove}
  5577. />
  5578. <Button onClick={this.addPic}>添加附件</Button>
  5579. </div>
  5580. </div>
  5581. <Button
  5582. type="primary"
  5583. shape="round"
  5584. size="large"
  5585. style={{
  5586. position: "relative",
  5587. left: "50%",
  5588. transform: "translateX(-50%)",
  5589. }}
  5590. onClick={this.editQuit}
  5591. >
  5592. 保存
  5593. </Button>
  5594. <AddPicModal
  5595. cancel={this.addPicModalCancel}
  5596. add={this.add()}
  5597. visible={this.state.addPicModal}
  5598. />
  5599. </Spin>
  5600. </Modal>
  5601. <Modal
  5602. visible={this.state.welfareVisible}
  5603. footer={null}
  5604. width={800}
  5605. onCancel={() => {
  5606. this.loadData();
  5607. this.welfareCancel();
  5608. }}
  5609. >
  5610. <Spin spinning={this.state.loading}>
  5611. <h3
  5612. style={{
  5613. textAlign: "center",
  5614. paddingBottom: 10,
  5615. }}
  5616. >
  5617. 福利信息
  5618. </h3>
  5619. <Button
  5620. type="primary"
  5621. style={{ marginBottom: 5 }}
  5622. onClick={(e) => {
  5623. this.welfareTable();
  5624. }}
  5625. >
  5626. 新建信息
  5627. </Button>
  5628. <div>
  5629. <div className="clearfix" style={{ marginBottom: 10 }}>
  5630. <Table
  5631. columns={this.state.welfareColumnsEdit}
  5632. type="textarea"
  5633. dataSource={this.state.ModalData.welfareList}
  5634. pagination={false}
  5635. bordered
  5636. size="small"
  5637. scroll={{ x: "max-content", y: 0 }}
  5638. />
  5639. </div>
  5640. <div className="clearfix">
  5641. <FormItem
  5642. className="half-item"
  5643. labelCol={{ span: 6 }}
  5644. wrapperCol={{ span: 30 }}
  5645. label="备注"
  5646. >
  5647. <Input
  5648. placeholder="请输入备注"
  5649. style={{ width: 200 }}
  5650. value={this.state.ModalData.welfareRemarks}
  5651. onChange={(e) => {
  5652. this.state.ModalData.welfareRemarks = e.target.value;
  5653. this.setState({
  5654. ModalData: this.state.ModalData,
  5655. });
  5656. }}
  5657. />
  5658. </FormItem>
  5659. </div>
  5660. <div
  5661. className="clearfix"
  5662. style={{ paddingLeft: 70, marginBottom: 10 }}
  5663. >
  5664. <div style={{ marginBottom: 10 }}>附件:</div>
  5665. <PicModal
  5666. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  5667. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  5668. remove={this.welfareRemove}
  5669. />
  5670. <Button onClick={this.addPic}>添加附件</Button>
  5671. </div>
  5672. </div>
  5673. <Button
  5674. type="primary"
  5675. shape="round"
  5676. size="large"
  5677. style={{
  5678. position: "relative",
  5679. left: "50%",
  5680. transform: "translateX(-50%)",
  5681. }}
  5682. onClick={this.editWelfare}
  5683. >
  5684. 保存
  5685. </Button>
  5686. <AddPicModal
  5687. cancel={this.addPicModalCancel}
  5688. add={this.add()}
  5689. visible={this.state.addPicModal}
  5690. />
  5691. </Spin>
  5692. </Modal>
  5693. <Modal
  5694. visible={this.state.editWelfareVisible}
  5695. footer={null}
  5696. width={800}
  5697. onCancel={() => {
  5698. this.setState({
  5699. editWelfareVisible: false,
  5700. });
  5701. }}
  5702. >
  5703. <Spin spinning={this.state.loading}>
  5704. <div>
  5705. <div className="clearfix">
  5706. <FormItem
  5707. className="half-item"
  5708. labelCol={{ span: 6 }}
  5709. wrapperCol={{ span: 30 }}
  5710. label="福利类型"
  5711. >
  5712. <Select
  5713. placeholder="请选择类型"
  5714. value={this.state.editWelfareData.type}
  5715. onChange={(e) => {
  5716. this.state.editWelfareData.type = e;
  5717. this.setState({
  5718. editWelfareData: this.state.editWelfareData,
  5719. });
  5720. }}
  5721. style={{ width: 120, marginRight: 10 }}
  5722. >
  5723. <Option value={0}>社保</Option>
  5724. <Option value={1}>公积金</Option>
  5725. <Option value={2}>雇主险</Option>
  5726. </Select>
  5727. </FormItem>
  5728. <FormItem
  5729. className="half-item"
  5730. labelCol={{ span: 6 }}
  5731. wrapperCol={{ span: 30 }}
  5732. label="福利状态"
  5733. >
  5734. <Select
  5735. placeholder="请选择状态"
  5736. onChange={(e) => {
  5737. this.state.editWelfareData.status = e;
  5738. this.setState({
  5739. editWelfareData: this.state.editWelfareData,
  5740. });
  5741. }}
  5742. style={{ width: 120, marginRight: 10 }}
  5743. value={this.state.editWelfareData.status}
  5744. >
  5745. <Option value={0}>未购买</Option>
  5746. <Option value={1}>已购买</Option>
  5747. <Option value={2}>已停止</Option>
  5748. </Select>
  5749. </FormItem>
  5750. </div>
  5751. <div className="clearfix">
  5752. <FormItem
  5753. className="half-item"
  5754. labelCol={{ span: 6 }}
  5755. wrapperCol={{ span: 30 }}
  5756. style={{
  5757. display:
  5758. this.state.editWelfareData.status == 1 ? "block" : "none",
  5759. }}
  5760. label="购买时间"
  5761. >
  5762. <DatePicker
  5763. value={
  5764. this.state.editWelfareData.startTimes
  5765. ? moment(this.state.editWelfareData.startTimes)
  5766. : null
  5767. }
  5768. style={{ width: 200 }}
  5769. onChange={(e, t) => {
  5770. this.state.editWelfareData.startTimes = t;
  5771. this.setState({
  5772. editWelfareData: this.state.editWelfareData,
  5773. });
  5774. }}
  5775. />
  5776. </FormItem>
  5777. <FormItem
  5778. className="half-item"
  5779. labelCol={{ span: 6 }}
  5780. wrapperCol={{ span: 30 }}
  5781. style={{
  5782. display:
  5783. this.state.editWelfareData.status == 2 ? "block" : "none",
  5784. }}
  5785. label="停缴时间"
  5786. >
  5787. <DatePicker
  5788. value={
  5789. this.state.editWelfareData.endTimes
  5790. ? moment(this.state.editWelfareData.endTimes)
  5791. : null
  5792. }
  5793. style={{ width: 200 }}
  5794. onChange={(e, t) => {
  5795. this.state.editWelfareData.endTimes = t;
  5796. this.setState({
  5797. editWelfareData: this.state.editWelfareData,
  5798. });
  5799. }}
  5800. />
  5801. </FormItem>
  5802. </div>
  5803. <div className="clearfix">
  5804. <FormItem
  5805. className="half-item"
  5806. labelCol={{ span: 6 }}
  5807. wrapperCol={{ span: 30 }}
  5808. style={{
  5809. display:
  5810. this.state.editWelfareData.status == 1 ? "block" : "none",
  5811. }}
  5812. label="参保公司"
  5813. >
  5814. <Select
  5815. placeholder="选择公司"
  5816. style={{ width: 200, marginRight: 10 }}
  5817. value={
  5818. this.state.editWelfareData.depId
  5819. ? this.state.editWelfareData.depId
  5820. : undefined
  5821. }
  5822. onChange={(e) => {
  5823. this.state.editWelfareData.depId = e;
  5824. this.setState({
  5825. editWelfareData: this.state.editWelfareData,
  5826. });
  5827. }}
  5828. >
  5829. {departmentArr.map(function (item) {
  5830. return (
  5831. <Select.Option key={item.id}>{item.name}</Select.Option>
  5832. );
  5833. })}
  5834. </Select>
  5835. </FormItem>
  5836. </div>
  5837. <div className="clearfix">
  5838. <FormItem
  5839. className="half-item"
  5840. labelCol={{ span: 6 }}
  5841. wrapperCol={{ span: 30 }}
  5842. style={{
  5843. display:
  5844. this.state.editWelfareData.status == 0 ? "block" : "none",
  5845. }}
  5846. label="未购买备注"
  5847. >
  5848. <Input
  5849. placeholder="请输入备注信息"
  5850. style={{ width: 200 }}
  5851. value={this.state.editWelfareData.welfareRemarks}
  5852. onChange={(e) => {
  5853. this.state.editWelfareData.welfareRemarks =
  5854. e.target.value;
  5855. this.setState({
  5856. editWelfareData: this.state.editWelfareData,
  5857. });
  5858. }}
  5859. />
  5860. </FormItem>
  5861. </div>
  5862. </div>
  5863. <Button
  5864. type="primary"
  5865. shape="round"
  5866. size="large"
  5867. style={{
  5868. position: "relative",
  5869. left: "50%",
  5870. transform: "translateX(-50%)",
  5871. }}
  5872. onClick={this.editWelfareDataOk}
  5873. >
  5874. 保存
  5875. </Button>
  5876. </Spin>
  5877. </Modal>
  5878. </div>
  5879. );
  5880. },
  5881. });
  5882. export default PersonnelAll;