personnelAll.jsx 193 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893
  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. this.setState({
  1871. loading: true,
  1872. });
  1873. $.ajax({
  1874. method: "post",
  1875. dataType: "json",
  1876. crossDomain: false,
  1877. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1878. data: {
  1879. id: this.state.promotionList.id,
  1880. pdId: this.state.promotionList.pdId,
  1881. oldJobs: this.state.promotionList.oldJobs,
  1882. oldLvl: this.state.promotionList.oldLvl,
  1883. newJobs: this.state.promotionList.newJobs,
  1884. newLvl: this.state.promotionList.newLvl,
  1885. promotionTimes: this.state.promotionList.promotionTimes,
  1886. promotionRemarks: this.state.promotionList.promotionRemarks,
  1887. annexUrl: this.state.promotionList.annexUrl,
  1888. annexName: this.state.promotionList.annexName,
  1889. },
  1890. success: function (data) {
  1891. let theArr = [];
  1892. if (data.error && data.error.length) {
  1893. message.warning(data.error[0].message);
  1894. } else {
  1895. this.loadData();
  1896. this.upgradeCancel();
  1897. message.success("修改成功");
  1898. }
  1899. }.bind(this),
  1900. }).always(
  1901. function () {
  1902. this.setState({
  1903. loading: false,
  1904. });
  1905. }.bind(this)
  1906. );
  1907. },
  1908. editContract() {
  1909. this.setState({
  1910. loading: true,
  1911. });
  1912. $.ajax({
  1913. method: "post",
  1914. dataType: "json",
  1915. crossDomain: false,
  1916. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1917. data: {
  1918. id: this.state.contractList.id,
  1919. pdId: this.state.contractList.pdId,
  1920. startTimes: this.state.contractList.startTimes,
  1921. endTimes: this.state.contractList.endTimes,
  1922. contractRemarks: this.state.contractList.contractRemarks,
  1923. annexUrl: this.state.contractList.annexUrl,
  1924. annexName: this.state.contractList.annexName,
  1925. },
  1926. success: function (data) {
  1927. let theArr = [];
  1928. if (data.error && data.error.length) {
  1929. message.warning(data.error[0].message);
  1930. } else {
  1931. this.loadData();
  1932. this.contractCancel();
  1933. message.success("修改成功");
  1934. }
  1935. }.bind(this),
  1936. }).always(
  1937. function () {
  1938. this.setState({
  1939. loading: false,
  1940. });
  1941. }.bind(this)
  1942. );
  1943. },
  1944. editChoose() {
  1945. this.setState({
  1946. loading: true,
  1947. });
  1948. $.ajax({
  1949. method: "post",
  1950. dataType: "json",
  1951. crossDomain: false,
  1952. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1953. data: {
  1954. id: this.state.chooseList.id,
  1955. pdId: this.state.chooseList.pdId,
  1956. chooseStatus: this.state.chooseList.chooseStatus,
  1957. effectTimes: this.state.chooseList.effectTimes,
  1958. chooseRemarks: this.state.chooseList.chooseRemarks,
  1959. annexUrl: this.state.chooseList.annexUrl,
  1960. annexName: this.state.chooseList.annexName,
  1961. },
  1962. success: function (data) {
  1963. let theArr = [];
  1964. if (data.error && data.error.length) {
  1965. message.warning(data.error[0].message);
  1966. } else {
  1967. this.loadData();
  1968. this.chooseCancel();
  1969. message.success("修改成功");
  1970. }
  1971. }.bind(this),
  1972. }).always(
  1973. function () {
  1974. this.setState({
  1975. loading: false,
  1976. });
  1977. }.bind(this)
  1978. );
  1979. },
  1980. editQuit() {
  1981. this.setState({
  1982. loading: true,
  1983. });
  1984. $.ajax({
  1985. method: "post",
  1986. dataType: "json",
  1987. crossDomain: false,
  1988. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1989. data: {
  1990. id: this.state.quitList.id,
  1991. pdId: this.state.quitList.pdId,
  1992. effectTimes: this.state.quitList.effectTimes,
  1993. quitRemarks: this.state.quitList.quitRemarks,
  1994. annexUrl: this.state.quitList.annexUrl,
  1995. annexName: this.state.quitList.annexName,
  1996. },
  1997. success: function (data) {
  1998. let theArr = [];
  1999. if (data.error && data.error.length) {
  2000. message.warning(data.error[0].message);
  2001. } else {
  2002. this.loadData();
  2003. this.quitCancel();
  2004. message.success("修改成功");
  2005. }
  2006. }.bind(this),
  2007. }).always(
  2008. function () {
  2009. this.setState({
  2010. loading: false,
  2011. });
  2012. }.bind(this)
  2013. );
  2014. },
  2015. editWelfare() {
  2016. this.setState({
  2017. loading: true,
  2018. });
  2019. $.ajax({
  2020. method: "post",
  2021. dataType: "json",
  2022. crossDomain: false,
  2023. url: globalConfig.context + "/api/admin/personnel/updateWelfare",
  2024. data: {
  2025. pdId: this.state.ModalData.id,
  2026. annexUrl: this.state.ModalData.welfareAnnexUrl,
  2027. annexName: this.state.ModalData.welfareAnnexName,
  2028. remarks: this.state.ModalData.welfareRemarks,
  2029. },
  2030. success: function (data) {
  2031. let theArr = [];
  2032. if (data.error && data.error.length) {
  2033. message.warning(data.error[0].message);
  2034. } else {
  2035. this.loadData();
  2036. this.welfareCancel();
  2037. message.success("修改成功");
  2038. }
  2039. }.bind(this),
  2040. }).always(
  2041. function () {
  2042. this.setState({
  2043. loading: false,
  2044. });
  2045. }.bind(this)
  2046. );
  2047. },
  2048. render() {
  2049. const rowSelection = {
  2050. selectedRowKeys: this.state.selectedRowKeys,
  2051. onChange: (selectedRowKeys, selectedRows) => {
  2052. this.setState({
  2053. selectedRows: selectedRows.slice(-1),
  2054. selectedRowKeys: selectedRowKeys.slice(-1),
  2055. });
  2056. },
  2057. };
  2058. const { RangePicker } = DatePicker;
  2059. const formItemLayout = {
  2060. labelCol: { span: 6 },
  2061. wrapperCol: { span: 16 },
  2062. };
  2063. let departmentArr = this.state.departmentArr || [];
  2064. return (
  2065. <div className="user-content">
  2066. <div className="content-title" style={{ marginBottom: 10 }}>
  2067. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  2068. </div>
  2069. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2070. <TabPane tab="更改表格显示数据" key="1">
  2071. <div style={{ marginLeft: 10 }}>
  2072. <ChooseList
  2073. columns={this.state.columns}
  2074. changeFn={this.changeList}
  2075. changeList={this.state.changeList}
  2076. top={55}
  2077. margin={11}
  2078. />
  2079. </div>
  2080. </TabPane>
  2081. <TabPane tab="搜索" key="2">
  2082. <div className="user-search" style={{ marginLeft: 10 }}>
  2083. <Input
  2084. placeholder="姓名"
  2085. style={{ width: 120 }}
  2086. value={this.state.nameSearch}
  2087. onChange={(e) => {
  2088. this.setState({ nameSearch: e.target.value });
  2089. }}
  2090. />
  2091. <Select
  2092. placeholder="员工状态"
  2093. onChange={(e) => {
  2094. this.setState({ statusSearch: e });
  2095. }}
  2096. style={{ width: 120, marginRight: 10 }}
  2097. value={this.state.statusSearch}
  2098. >
  2099. <Option value="0">在职(试用期)</Option>
  2100. <Option value="1">在职(合同期)</Option>
  2101. <Option value="2">离职</Option>
  2102. </Select>
  2103. <Select
  2104. placeholder="所属公司"
  2105. style={{ width: 120, marginRight: 10 }}
  2106. value={this.state.departmenttList}
  2107. onChange={(e) => {
  2108. this.setState({ departmenttList: e });
  2109. }}
  2110. >
  2111. {departmentArr.map(function (item) {
  2112. return (
  2113. <Select.Option key={item.id}>{item.name}</Select.Option>
  2114. );
  2115. })}
  2116. </Select>
  2117. <Select
  2118. placeholder="性别"
  2119. onChange={(e) => {
  2120. this.setState({ sexSearch: e });
  2121. }}
  2122. style={{ width: 120, marginRight: 10 }}
  2123. value={this.state.sexSearch}
  2124. >
  2125. <Option value="0">男</Option>
  2126. <Option value="1">女</Option>
  2127. </Select>
  2128. <Select
  2129. placeholder="婚姻状态"
  2130. onChange={(e) => {
  2131. this.setState({ marriageSearch: e });
  2132. }}
  2133. style={{ width: 120, marginRight: 10 }}
  2134. value={this.state.marriageSearch}
  2135. >
  2136. <Option value="0">未婚</Option>
  2137. <Option value="1">已婚</Option>
  2138. <Option value="2">离异</Option>
  2139. </Select>
  2140. <Select
  2141. placeholder="政治面貌"
  2142. onChange={(e) => {
  2143. this.setState({ politicalOutlookSearch: e });
  2144. }}
  2145. style={{ width: 120, marginRight: 10 }}
  2146. value={this.state.politicalOutlookSearch}
  2147. >
  2148. <Option value="0">群众</Option>
  2149. <Option value="1">中共预备党员</Option>
  2150. <Option value="2">中共党员</Option>
  2151. <Option value="3">致公党员</Option>
  2152. </Select>
  2153. <Select
  2154. placeholder="生日月份"
  2155. onChange={(e) => {
  2156. this.setState({ birthdayMonthSearch: e });
  2157. }}
  2158. style={{ width: 120, marginRight: 10 }}
  2159. value={this.state.birthdayMonthSearch}
  2160. >
  2161. <Option value="">全部</Option>
  2162. <Option value="1">一月</Option>
  2163. <Option value="2">二月</Option>
  2164. <Option value="3">三月</Option>
  2165. <Option value="4">四月</Option>
  2166. <Option value="5">五月</Option>
  2167. <Option value="6">六月</Option>
  2168. <Option value="7">七月</Option>
  2169. <Option value="8">八月</Option>
  2170. <Option value="9">九月</Option>
  2171. <Option value="10">十月</Option>
  2172. <Option value="11">十一月</Option>
  2173. <Option value="12">十二月</Option>
  2174. </Select>
  2175. <Select
  2176. placeholder="所属系统"
  2177. onChange={(e) => {
  2178. this.setState({ systemSearch: e });
  2179. }}
  2180. style={{ width: 120, marginRight: 10 }}
  2181. value={this.state.systemSearch}
  2182. >
  2183. <Option value="0">管理系统</Option>
  2184. <Option value="1">营销系统</Option>
  2185. <Option value="2">技术系统</Option>
  2186. </Select>
  2187. <Select
  2188. placeholder="工作年限"
  2189. onChange={(e) => {
  2190. this.setState({ workingYearsSearch: e });
  2191. }}
  2192. style={{ width: 120, marginRight: 10 }}
  2193. value={this.state.workingYearsSearch}
  2194. >
  2195. <Option value="0">0-1年</Option>
  2196. <Option value="1">1-3年</Option>
  2197. <Option value="2">3-10年</Option>
  2198. <Option value="3">10年以上</Option>
  2199. </Select>
  2200. <Select
  2201. placeholder="学历"
  2202. onChange={(e) => {
  2203. this.setState({ educationSearch: e });
  2204. }}
  2205. style={{ width: 120 }}
  2206. value={this.state.educationSearch}
  2207. >
  2208. <Option value="0">高中/中专</Option>
  2209. <Option value="1">专科/高职</Option>
  2210. <Option value="2">本科</Option>
  2211. <Option value="3">研究生</Option>
  2212. <Option value="5">博士</Option>
  2213. </Select>
  2214. <br />
  2215. <span style={{}}>转正日期:</span>
  2216. <RangePicker
  2217. style={{ marginRight: 10, width: 170 }}
  2218. value={[
  2219. this.state.promotionTime[0]
  2220. ? moment(this.state.promotionTime[0])
  2221. : null,
  2222. this.state.promotionTime[1]
  2223. ? moment(this.state.promotionTime[1])
  2224. : null,
  2225. ]}
  2226. onChange={(data, dataString) => {
  2227. this.setState({ promotionTime: dataString });
  2228. }}
  2229. />
  2230. <span style={{}}>入职时间:</span>
  2231. <RangePicker
  2232. style={{ marginRight: 10, width: 170 }}
  2233. value={[
  2234. this.state.entryTime[0]
  2235. ? moment(this.state.entryTime[0])
  2236. : null,
  2237. this.state.entryTime[1]
  2238. ? moment(this.state.entryTime[1])
  2239. : null,
  2240. ]}
  2241. onChange={(data, dataString) => {
  2242. this.setState({ entryTime: dataString });
  2243. }}
  2244. />
  2245. <span style={{}}>离职时间:</span>
  2246. <RangePicker
  2247. style={{ marginRight: 10, width: 170 }}
  2248. value={[
  2249. this.state.quitTime[0]
  2250. ? moment(this.state.quitTime[0])
  2251. : null,
  2252. this.state.quitTime[1]
  2253. ? moment(this.state.quitTime[1])
  2254. : null,
  2255. ]}
  2256. onChange={(data, dataString) => {
  2257. this.setState({ quitTime: dataString });
  2258. }}
  2259. />
  2260. <span style={{}}>合同时间:</span>
  2261. <RangePicker
  2262. style={{ marginRight: 10, width: 170 }}
  2263. value={[
  2264. this.state.contractTime[0]
  2265. ? moment(this.state.contractTime[0])
  2266. : null,
  2267. this.state.contractTime[1]
  2268. ? moment(this.state.contractTime[1])
  2269. : null,
  2270. ]}
  2271. onChange={(data, dataString) => {
  2272. this.setState({ contractTime: dataString });
  2273. }}
  2274. />
  2275. <Button
  2276. type="primary"
  2277. onClick={this.search}
  2278. style={{ marginLeft: 10 }}
  2279. >
  2280. 搜索
  2281. </Button>
  2282. <Button onClick={this.reset}>重置</Button>
  2283. </div>
  2284. </TabPane>
  2285. <TabPane tab="新增员工档案" key="3">
  2286. <Button
  2287. type="primary"
  2288. onClick={this.addPeo}
  2289. style={{ margin: "11px 0px 10px 10px" }}
  2290. >
  2291. 新增员工档案
  2292. </Button>
  2293. </TabPane>
  2294. <TabPane tab="导出Excel" key="4">
  2295. <Button
  2296. type="primary"
  2297. onClick={this.export}
  2298. style={{ margin: "11px 0px 10px 10px" }}
  2299. >
  2300. 导出当前列表
  2301. </Button>
  2302. </TabPane>
  2303. </Tabs>
  2304. <div className="patent-table" style={{ marginTop: 10 }}>
  2305. <Spin spinning={this.state.loading}>
  2306. <Table
  2307. bordered
  2308. columns={
  2309. this.state.changeList == undefined
  2310. ? this.state.columns
  2311. : this.state.changeList
  2312. }
  2313. onRowClick={this.tableRowClick}
  2314. dataSource={this.state.dataSource}
  2315. scroll={{ x: "max-content", y: 0 }}
  2316. pagination={this.state.pagination}
  2317. size="small"
  2318. />
  2319. </Spin>
  2320. </div>
  2321. <Modal
  2322. visible={this.state.visible}
  2323. footer={null}
  2324. width={1000}
  2325. onCancel={() => {
  2326. this.loadData();
  2327. this.cancel();
  2328. }}
  2329. >
  2330. <ReactToPrint
  2331. trigger={() => (
  2332. <Button
  2333. type="primary"
  2334. style={{
  2335. float: "right",
  2336. marginTop: 10,
  2337. position: "absolute",
  2338. top: 30,
  2339. right: 15,
  2340. zIndex: 1,
  2341. display: this.state.detailFlag ? "block" : "none"
  2342. }}
  2343. >
  2344. 打印
  2345. </Button>
  2346. )}
  2347. content={() => this.refs}
  2348. />
  2349. <Spin
  2350. spinning={this.state.loading}
  2351. ref={(e) => {
  2352. this.refs = e;
  2353. }}
  2354. >
  2355. <h2
  2356. style={{
  2357. textAlign: "center",
  2358. paddingBottom: 10,
  2359. marginBottom: 10,
  2360. }}
  2361. >
  2362. {this.state.ModalData.name + "人事档案"}
  2363. </h2>
  2364. <Button
  2365. type="primary"
  2366. style={{ position: "absolute", top: 25 }}
  2367. onClick={(e) => {
  2368. this.setState({ detailFlag: !this.state.detailFlag });
  2369. }}
  2370. >
  2371. {this.state.detailFlag ? "切换编辑模式" : "切换查看模式"}
  2372. </Button>
  2373. <ul onClick={this.editPeo} className="peo-table">
  2374. {this.state.table.map((item) => {
  2375. let value = item.value;
  2376. if (item.render) {
  2377. let fn = item.render;
  2378. return (
  2379. <li>
  2380. <div className="peo-left">{item.key}</div>
  2381. <Tooltip
  2382. placement="top"
  2383. title={fn(
  2384. this.state.ModalData[value],
  2385. value == "son" ? this.state.ModalData.girl : 0
  2386. )}
  2387. >
  2388. <div className="peo-right">
  2389. {fn(
  2390. this.state.ModalData[value],
  2391. value == "son" ? this.state.ModalData.girl : 0
  2392. )}
  2393. </div>
  2394. </Tooltip>
  2395. </li>
  2396. );
  2397. }
  2398. return (
  2399. <li>
  2400. <div className="peo-left">{item.key}</div>
  2401. <Tooltip
  2402. placement="top"
  2403. title={this.state.ModalData[item.value]}
  2404. >
  2405. <div className="peo-right">
  2406. {this.state.ModalData[value] &&
  2407. this.state.ModalData[value].length > 10
  2408. ? this.state.ModalData[value].substring(0, 10) + "..."
  2409. : this.state.ModalData[value]}
  2410. </div>
  2411. </Tooltip>
  2412. </li>
  2413. );
  2414. })}
  2415. </ul>
  2416. {this.state.detailFlag ? (
  2417. <div>
  2418. <div className="title-peo">
  2419. <span>任职信息</span>
  2420. {/* <Button
  2421. type="primary"
  2422. onClick={(e) => {
  2423. this.stayModal(this.state.ModalData.id);
  2424. }}
  2425. style={{ position: "absolute", right: 0, height: 30 }}
  2426. >
  2427. 修改任职信息
  2428. </Button> */}
  2429. </div>
  2430. <div className="clearfix">
  2431. <FormItem
  2432. className="half-item"
  2433. labelCol={{ span: 6 }}
  2434. wrapperCol={{ span: 30 }}
  2435. label="员工状态"
  2436. >
  2437. {this.state.ModalData.statusName}
  2438. </FormItem>
  2439. <FormItem
  2440. className="half-item"
  2441. labelCol={{ span: 6 }}
  2442. wrapperCol={{ span: 30 }}
  2443. label="所属系统"
  2444. >
  2445. {this.state.ModalData.systemName}
  2446. </FormItem>
  2447. </div>
  2448. <div className="clearfix">
  2449. <FormItem
  2450. className="half-item"
  2451. labelCol={{ span: 6 }}
  2452. wrapperCol={{ span: 30 }}
  2453. label="工作性质"
  2454. >
  2455. {this.jobStatus(
  2456. this.state.ModalData.jobNature,
  2457. this.state.ModalData.jobNatureRemarks
  2458. )}
  2459. </FormItem>
  2460. <FormItem
  2461. className="half-item"
  2462. labelCol={{ span: 6 }}
  2463. wrapperCol={{ span: 30 }}
  2464. label="工龄"
  2465. >
  2466. {this.state.ModalData.workingYear}
  2467. </FormItem>
  2468. </div>
  2469. <div className="clearfix">
  2470. <FormItem
  2471. className="half-item"
  2472. labelCol={{ span: 6 }}
  2473. wrapperCol={{ span: 30 }}
  2474. label="入职时间"
  2475. >
  2476. {this.state.ModalData.entryTimes}
  2477. </FormItem>
  2478. <FormItem
  2479. className="half-item"
  2480. labelCol={{ span: 6 }}
  2481. wrapperCol={{ span: 30 }}
  2482. label="转正时间"
  2483. >
  2484. {this.state.ModalData.promotionTimes}
  2485. </FormItem>
  2486. </div>
  2487. <div className="clearfix">
  2488. <FormItem
  2489. className="half-item"
  2490. labelCol={{ span: 6 }}
  2491. wrapperCol={{ span: 30 }}
  2492. label="所属公司"
  2493. >
  2494. {this.state.ModalData.depName}
  2495. </FormItem>
  2496. <FormItem
  2497. className="half-item"
  2498. labelCol={{ span: 6 }}
  2499. wrapperCol={{ span: 30 }}
  2500. label="级别"
  2501. >
  2502. {this.state.ModalData.lvlName}
  2503. </FormItem>
  2504. </div>
  2505. <div className="clearfix">
  2506. <FormItem
  2507. className="half-item"
  2508. labelCol={{ span: 6 }}
  2509. wrapperCol={{ span: 30 }}
  2510. label="职位"
  2511. >
  2512. {this.state.ModalData.jobsName}
  2513. </FormItem>
  2514. <FormItem
  2515. className="half-item"
  2516. labelCol={{ span: 6 }}
  2517. wrapperCol={{ span: 30 }}
  2518. label="岗位津贴"
  2519. >
  2520. {this.state.ModalData.allowance}
  2521. </FormItem>
  2522. </div>
  2523. <div className="clearfix">
  2524. <FormItem
  2525. className="half-item"
  2526. labelCol={{ span: 6 }}
  2527. wrapperCol={{ span: 30 }}
  2528. label="星级"
  2529. >
  2530. {this.state.ModalData.starName}
  2531. </FormItem>
  2532. </div>
  2533. <div className="title-peo">
  2534. <span>联系信息</span>
  2535. {/* <Button
  2536. type="primary"
  2537. onClick={this.phoneModal}
  2538. style={{ position: "absolute", right: 0, height: 30 }}
  2539. >
  2540. 修改联系信息
  2541. </Button> */}
  2542. </div>
  2543. <div className="clearfix">
  2544. <FormItem
  2545. className="half-item"
  2546. labelCol={{ span: 6 }}
  2547. wrapperCol={{ span: 30 }}
  2548. label="手机号码"
  2549. >
  2550. {this.state.ModalData.mobile}
  2551. </FormItem>
  2552. <FormItem
  2553. className="half-item"
  2554. labelCol={{ span: 6 }}
  2555. wrapperCol={{ span: 30 }}
  2556. label="电话"
  2557. >
  2558. {this.state.ModalData.fixedTel}
  2559. </FormItem>
  2560. </div>
  2561. {this.state.ModalData.contactList &&
  2562. this.state.ModalData.contactList.length > 0 ? (
  2563. this.state.ModalData.contactList.map((item, index) => {
  2564. return (
  2565. <div className="clearfix">
  2566. <FormItem
  2567. className="half-item"
  2568. labelCol={{ span: 6 }}
  2569. wrapperCol={{ span: 30 }}
  2570. label={"紧急联系人" + (index + 1)}
  2571. >
  2572. {item.emergencyContact}
  2573. </FormItem>
  2574. <FormItem
  2575. className="half-item"
  2576. labelCol={{ span: 6 }}
  2577. wrapperCol={{ span: 30 }}
  2578. label={"紧急联系人" + (index + 1) + "电话"}
  2579. >
  2580. {item.emergencyMobile}
  2581. </FormItem>
  2582. </div>
  2583. );
  2584. })
  2585. ) : (
  2586. <div
  2587. style={{
  2588. textAlign: "center",
  2589. height: 60,
  2590. lineHeight: "60px",
  2591. }}
  2592. >
  2593. 暂无紧急联系人信息
  2594. </div>
  2595. )}
  2596. <div className="title-peo">
  2597. <span>入职资料</span>
  2598. {/* <Button
  2599. type="primary"
  2600. onClick={this.entryModal}
  2601. style={{ position: "absolute", right: 0, height: 30 }}
  2602. >
  2603. 修改入职信息
  2604. </Button> */}
  2605. </div>
  2606. <div className="clearfix">
  2607. <FormItem
  2608. className="half-item"
  2609. labelCol={{ span: 6 }}
  2610. wrapperCol={{ span: 30 }}
  2611. label="毕业学校"
  2612. >
  2613. {this.state.ModalData.personnelEntry
  2614. ? this.state.ModalData.personnelEntry.school
  2615. : ""}
  2616. </FormItem>
  2617. <FormItem
  2618. className="half-item"
  2619. labelCol={{ span: 6 }}
  2620. wrapperCol={{ span: 30 }}
  2621. label="学历"
  2622. >
  2623. {this.state.ModalData.personnelEntry
  2624. ? this.educationStatus(
  2625. this.state.ModalData.personnelEntry.education
  2626. )
  2627. : ""}
  2628. </FormItem>
  2629. </div>
  2630. <div className="clearfix">
  2631. <FormItem
  2632. className="half-item"
  2633. labelCol={{ span: 6 }}
  2634. wrapperCol={{ span: 30 }}
  2635. label="所学专业"
  2636. >
  2637. {this.state.ModalData.personnelEntry
  2638. ? this.state.ModalData.personnelEntry.major
  2639. : ""}
  2640. </FormItem>
  2641. <FormItem
  2642. className="half-item"
  2643. labelCol={{ span: 6 }}
  2644. wrapperCol={{ span: 30 }}
  2645. label="职称"
  2646. >
  2647. {this.state.ModalData.personnelEntry
  2648. ? this.state.ModalData.personnelEntry.title
  2649. : ""}
  2650. </FormItem>
  2651. </div>
  2652. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2653. <div style={{ marginBottom: 10 }}>附件:</div>
  2654. <PicModal
  2655. remarks={
  2656. this.state.ModalData.personnelEntry
  2657. ? this.picToArr(
  2658. this.state.ModalData.personnelEntry.annexName
  2659. )
  2660. : []
  2661. }
  2662. picUrl={
  2663. this.state.ModalData.personnelEntry
  2664. ? this.picToArr(
  2665. this.state.ModalData.personnelEntry.annexUrl
  2666. )
  2667. : []
  2668. }
  2669. />
  2670. </div>
  2671. <div className="title-peo">
  2672. <span>晋升情况</span>
  2673. {/* <Button
  2674. type="primary"
  2675. onClick={(e) => {
  2676. this.upgradeModal(true);
  2677. }}
  2678. style={{ position: "absolute", right: 0, height: 30 }}
  2679. >
  2680. 新增晋升信息
  2681. </Button> */}
  2682. </div>
  2683. {this.state.ModalData.promotionList &&
  2684. this.state.ModalData.promotionList.length > 0 ? (
  2685. this.state.ModalData.promotionList.map((item, index) => {
  2686. return (
  2687. <div
  2688. style={{
  2689. width: "100%",
  2690. borderBottom: "1px dashed #ccc",
  2691. position: "relative",
  2692. }}
  2693. >
  2694. {/* <Button
  2695. style={{
  2696. position: "absolute",
  2697. right: "50%",
  2698. bottom: 10,
  2699. transform: "translateX(50%)",
  2700. }}
  2701. type="primary"
  2702. onClick={(e) => {
  2703. this.upgradeModal(false, index);
  2704. }}
  2705. >
  2706. 修改信息
  2707. </Button> */}
  2708. <div className="clearfix">
  2709. <FormItem
  2710. className="half-item"
  2711. labelCol={{ span: 6 }}
  2712. wrapperCol={{ span: 30 }}
  2713. label="晋升职位"
  2714. >
  2715. {item.oldJobsName + "--->" + item.newJobsName}
  2716. </FormItem>
  2717. <FormItem
  2718. className="half-item"
  2719. labelCol={{ span: 6 }}
  2720. wrapperCol={{ span: 30 }}
  2721. label="晋升等级"
  2722. >
  2723. {item.oldLvlName + "--->" + item.newLvlName}
  2724. </FormItem>
  2725. </div>
  2726. <div className="clearfix">
  2727. <FormItem
  2728. className="half-item"
  2729. labelCol={{ span: 6 }}
  2730. wrapperCol={{ span: 30 }}
  2731. label="晋升时间"
  2732. >
  2733. {item.promotionTimes}
  2734. </FormItem>
  2735. </div>
  2736. <div className="clearfix">
  2737. <FormItem
  2738. className="half-item"
  2739. labelCol={{ span: 6 }}
  2740. wrapperCol={{ span: 30 }}
  2741. label="晋升备注"
  2742. >
  2743. {item.promotionRemarks}
  2744. </FormItem>
  2745. </div>
  2746. <div
  2747. className="clearfix"
  2748. style={{ paddingLeft: 70, marginBottom: 40 }}
  2749. >
  2750. <div style={{ marginBottom: 10 }}>附件:</div>
  2751. <PicModal
  2752. remarks={this.picToArr(item.annexName)}
  2753. picUrl={this.picToArr(item.annexUrl)}
  2754. />
  2755. </div>
  2756. </div>
  2757. );
  2758. })
  2759. ) : (
  2760. <div
  2761. style={{
  2762. textAlign: "center",
  2763. height: 60,
  2764. lineHeight: "60px",
  2765. }}
  2766. >
  2767. 暂无晋升情况
  2768. </div>
  2769. )}
  2770. <div className="title-peo">
  2771. <span>合同情况</span>
  2772. {/* <Button
  2773. type="primary"
  2774. onClick={(e) => {
  2775. this.contractModal(true);
  2776. }}
  2777. style={{ position: "absolute", right: 0, height: 30 }}
  2778. >
  2779. 新增合同信息
  2780. </Button> */}
  2781. </div>
  2782. {this.state.ModalData.contractList &&
  2783. this.state.ModalData.contractList.length > 0 ? (
  2784. this.state.ModalData.contractList.map((item, index) => {
  2785. return (
  2786. <div
  2787. style={{
  2788. width: "100%",
  2789. borderBottom: "1px dashed #ccc",
  2790. position: "relative",
  2791. }}
  2792. >
  2793. {/* <Button
  2794. style={{
  2795. position: "absolute",
  2796. right: "50%",
  2797. bottom: 10,
  2798. transform: "translateX(50%)",
  2799. }}
  2800. type="primary"
  2801. onClick={(e) => {
  2802. this.contractModal(false, index);
  2803. }}
  2804. >
  2805. 修改信息
  2806. </Button> */}
  2807. <div className="clearfix">
  2808. <FormItem
  2809. className="half-item"
  2810. labelCol={{ span: 6 }}
  2811. wrapperCol={{ span: 30 }}
  2812. label="签订时间"
  2813. >
  2814. {item.startTimes}
  2815. </FormItem>
  2816. <FormItem
  2817. className="half-item"
  2818. labelCol={{ span: 6 }}
  2819. wrapperCol={{ span: 30 }}
  2820. label="到期时间"
  2821. >
  2822. {item.endTimes}
  2823. </FormItem>
  2824. </div>
  2825. <div className="clearfix">
  2826. <FormItem
  2827. style={{ width: "100%", wordBreak: "break-all" }}
  2828. className="half-item"
  2829. labelCol={{ span: 3 }}
  2830. wrapperCol={{ span: 30 }}
  2831. label="备注"
  2832. >
  2833. {item.contractRemarks}
  2834. </FormItem>
  2835. </div>
  2836. <div
  2837. className="clearfix"
  2838. style={{ paddingLeft: 70, marginBottom: 40 }}
  2839. >
  2840. <div style={{ marginBottom: 10 }}>附件:</div>
  2841. <PicModal
  2842. remarks={this.picToArr(item.annexName)}
  2843. picUrl={this.picToArr(item.annexUrl)}
  2844. />
  2845. </div>
  2846. </div>
  2847. );
  2848. })
  2849. ) : (
  2850. <div
  2851. style={{
  2852. textAlign: "center",
  2853. height: 60,
  2854. lineHeight: "60px",
  2855. }}
  2856. >
  2857. 暂无合同情况
  2858. </div>
  2859. )}
  2860. <div className="title-peo">
  2861. <span>奖惩情况</span>
  2862. {/* <Button
  2863. type="primary"
  2864. onClick={(e) => {
  2865. this.chooseModal(true);
  2866. }}
  2867. style={{ position: "absolute", right: 0, height: 30 }}
  2868. >
  2869. 新增奖惩信息
  2870. </Button> */}
  2871. </div>
  2872. {this.state.ModalData.chooseList &&
  2873. this.state.ModalData.chooseList.length > 0 ? (
  2874. this.state.ModalData.chooseList.map((item, index) => {
  2875. return (
  2876. <div
  2877. style={{
  2878. width: "100%",
  2879. borderBottom: "1px dashed #ccc",
  2880. position: "relative",
  2881. }}
  2882. >
  2883. {/* <Button
  2884. style={{
  2885. position: "absolute",
  2886. right: "50%",
  2887. bottom: 10,
  2888. transform: "translateX(50%)",
  2889. }}
  2890. type="primary"
  2891. onClick={(e) => {
  2892. this.chooseModal(false, index);
  2893. }}
  2894. >
  2895. 修改信息
  2896. </Button> */}
  2897. <div className="clearfix">
  2898. <FormItem
  2899. className="half-item"
  2900. labelCol={{ span: 6 }}
  2901. wrapperCol={{ span: 30 }}
  2902. label={"状态"}
  2903. >
  2904. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  2905. </FormItem>
  2906. <FormItem
  2907. className="half-item"
  2908. labelCol={{ span: 6 }}
  2909. wrapperCol={{ span: 30 }}
  2910. label="时间"
  2911. >
  2912. {item.effectTimes}
  2913. </FormItem>
  2914. </div>
  2915. <div className="clearfix">
  2916. <FormItem
  2917. className="half-item"
  2918. labelCol={{ span: 6 }}
  2919. wrapperCol={{ span: 30 }}
  2920. label={"内容"}
  2921. >
  2922. {item.chooseRemarks}
  2923. </FormItem>
  2924. </div>
  2925. <div
  2926. className="clearfix"
  2927. style={{ paddingLeft: 70, marginBottom: 40 }}
  2928. >
  2929. <div style={{ marginBottom: 10 }}>附件:</div>
  2930. <PicModal
  2931. remarks={this.picToArr(item.annexName)}
  2932. picUrl={this.picToArr(item.annexUrl)}
  2933. />
  2934. </div>
  2935. </div>
  2936. );
  2937. })
  2938. ) : (
  2939. <div
  2940. style={{
  2941. textAlign: "center",
  2942. height: 60,
  2943. lineHeight: "60px",
  2944. }}
  2945. >
  2946. 暂无奖惩情况
  2947. </div>
  2948. )}
  2949. <div className="title-peo">
  2950. <span>离职情况</span>
  2951. {/* <Button
  2952. type="primary"
  2953. onClick={(e) => {
  2954. this.quitModal(true);
  2955. }}
  2956. style={{ position: "absolute", right: 0, height: 30 }}
  2957. >
  2958. 新增离职信息
  2959. </Button> */}
  2960. </div>
  2961. {this.state.ModalData.quitList &&
  2962. this.state.ModalData.quitList.length > 0 ? (
  2963. this.state.ModalData.quitList.map((item, index) => {
  2964. return (
  2965. <div
  2966. style={{
  2967. width: "100%",
  2968. borderBottom: "1px dashed #ccc",
  2969. position: "relative",
  2970. }}
  2971. >
  2972. {/* <Button
  2973. style={{
  2974. position: "absolute",
  2975. right: "50%",
  2976. bottom: 10,
  2977. transform: "translateX(50%)",
  2978. }}
  2979. type="primary"
  2980. onClick={(e) => {
  2981. this.quitModal(false, index);
  2982. }}
  2983. >
  2984. 修改信息
  2985. </Button> */}
  2986. <div className="clearfix">
  2987. <FormItem
  2988. className="half-item"
  2989. labelCol={{ span: 6 }}
  2990. wrapperCol={{ span: 30 }}
  2991. label="离职时间"
  2992. >
  2993. {item.effectTimes}
  2994. </FormItem>
  2995. <FormItem
  2996. className="half-item"
  2997. labelCol={{ span: 6 }}
  2998. wrapperCol={{ span: 30 }}
  2999. label="离职备注"
  3000. >
  3001. {item.quitRemarks}
  3002. </FormItem>
  3003. </div>
  3004. <div
  3005. className="clearfix"
  3006. style={{ paddingLeft: 70, marginBottom: 40 }}
  3007. >
  3008. <div style={{ marginBottom: 10 }}>附件:</div>
  3009. <PicModal
  3010. remarks={this.picToArr(item.annexName)}
  3011. picUrl={this.picToArr(item.annexUrl)}
  3012. />
  3013. </div>
  3014. </div>
  3015. );
  3016. })
  3017. ) : (
  3018. <div
  3019. style={{
  3020. textAlign: "center",
  3021. height: 60,
  3022. lineHeight: "60px",
  3023. }}
  3024. >
  3025. 暂无离职信息
  3026. </div>
  3027. )}
  3028. <div className="title-peo" style={{ marginBottom: 10 }}>
  3029. <span>福利情况</span>
  3030. {/* <Button
  3031. type="primary"
  3032. onClick={(e) => {
  3033. this.welfareModal();
  3034. }}
  3035. style={{ position: "absolute", right: 0, height: 30 }}
  3036. >
  3037. 修改福利信息
  3038. </Button> */}
  3039. </div>
  3040. <Table
  3041. columns={this.state.welfareColumns}
  3042. dataSource={this.state.ModalData.welfareList}
  3043. pagination={false}
  3044. bordered
  3045. size="small"
  3046. scroll={{ x: "max-content", y: 0 }}
  3047. />
  3048. <div className="clearfix" style={{ marginTop: 10 }}>
  3049. <FormItem
  3050. className="half-item"
  3051. style={{ width: "100%", wordBreak: "break-all" }}
  3052. labelCol={{ span: 3 }}
  3053. wrapperCol={{ span: 30 }}
  3054. label="备注"
  3055. >
  3056. {this.state.ModalData.welfareRemarks}
  3057. </FormItem>
  3058. </div>
  3059. <div
  3060. className="clearfix"
  3061. style={{ paddingLeft: 70, marginBottom: 0 }}
  3062. >
  3063. <div style={{ marginBottom: 10 }}>附件:</div>
  3064. <PicModal
  3065. remarks={this.picToArr(
  3066. this.state.ModalData.welfareAnnexName
  3067. )}
  3068. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  3069. />
  3070. </div>
  3071. </div>
  3072. ) : (
  3073. <Tabs
  3074. activeKey={this.state.active}
  3075. onChange={(e) => {
  3076. this.setState({ active: e });
  3077. }}
  3078. >
  3079. <TabPane tab="任职信息" key={1}>
  3080. <div className="title-peo">
  3081. <span>任职信息</span>
  3082. <Button
  3083. type="primary"
  3084. onClick={(e) => {
  3085. this.stayModal(this.state.ModalData.id);
  3086. }}
  3087. style={{ position: "absolute", right: 0, height: 30 }}
  3088. >
  3089. 修改任职信息
  3090. </Button>
  3091. </div>
  3092. <div className="clearfix">
  3093. <FormItem
  3094. className="half-item"
  3095. labelCol={{ span: 6 }}
  3096. wrapperCol={{ span: 30 }}
  3097. label="员工状态"
  3098. >
  3099. {this.state.ModalData.statusName}
  3100. </FormItem>
  3101. <FormItem
  3102. className="half-item"
  3103. labelCol={{ span: 6 }}
  3104. wrapperCol={{ span: 30 }}
  3105. label="所属系统"
  3106. >
  3107. {this.state.ModalData.systemName}
  3108. </FormItem>
  3109. </div>
  3110. <div className="clearfix">
  3111. <FormItem
  3112. className="half-item"
  3113. labelCol={{ span: 6 }}
  3114. wrapperCol={{ span: 30 }}
  3115. label="工作性质"
  3116. >
  3117. {this.jobStatus(
  3118. this.state.ModalData.jobNature,
  3119. this.state.ModalData.jobNatureRemarks
  3120. )}
  3121. </FormItem>
  3122. <FormItem
  3123. className="half-item"
  3124. labelCol={{ span: 6 }}
  3125. wrapperCol={{ span: 30 }}
  3126. label="工龄"
  3127. >
  3128. {this.state.ModalData.workingYear}
  3129. </FormItem>
  3130. </div>
  3131. <div className="clearfix">
  3132. <FormItem
  3133. className="half-item"
  3134. labelCol={{ span: 6 }}
  3135. wrapperCol={{ span: 30 }}
  3136. label="入职时间"
  3137. >
  3138. {this.state.ModalData.entryTimes}
  3139. </FormItem>
  3140. <FormItem
  3141. className="half-item"
  3142. labelCol={{ span: 6 }}
  3143. wrapperCol={{ span: 30 }}
  3144. label="转正时间"
  3145. >
  3146. {this.state.ModalData.promotionTimes}
  3147. </FormItem>
  3148. </div>
  3149. <div className="clearfix">
  3150. <FormItem
  3151. className="half-item"
  3152. labelCol={{ span: 6 }}
  3153. wrapperCol={{ span: 30 }}
  3154. label="所属公司"
  3155. >
  3156. {this.state.ModalData.depName}
  3157. </FormItem>
  3158. <FormItem
  3159. className="half-item"
  3160. labelCol={{ span: 6 }}
  3161. wrapperCol={{ span: 30 }}
  3162. label="级别"
  3163. >
  3164. {this.state.ModalData.lvlName}
  3165. </FormItem>
  3166. </div>
  3167. <div className="clearfix">
  3168. <FormItem
  3169. className="half-item"
  3170. labelCol={{ span: 6 }}
  3171. wrapperCol={{ span: 30 }}
  3172. label="职位"
  3173. >
  3174. {this.state.ModalData.jobsName}
  3175. </FormItem>
  3176. <FormItem
  3177. className="half-item"
  3178. labelCol={{ span: 6 }}
  3179. wrapperCol={{ span: 30 }}
  3180. label="岗位津贴"
  3181. >
  3182. {this.state.ModalData.allowance}
  3183. </FormItem>
  3184. </div>
  3185. <div className="clearfix">
  3186. <FormItem
  3187. className="half-item"
  3188. labelCol={{ span: 6 }}
  3189. wrapperCol={{ span: 30 }}
  3190. label="星级"
  3191. >
  3192. {this.state.ModalData.starName}
  3193. </FormItem>
  3194. </div>
  3195. </TabPane>
  3196. <TabPane tab="联系信息" key={2}>
  3197. <div className="title-peo">
  3198. <span>联系信息</span>
  3199. <Button
  3200. type="primary"
  3201. onClick={this.phoneModal}
  3202. style={{ position: "absolute", right: 0, height: 30 }}
  3203. >
  3204. 修改联系信息
  3205. </Button>
  3206. </div>
  3207. <div className="clearfix">
  3208. <FormItem
  3209. className="half-item"
  3210. labelCol={{ span: 6 }}
  3211. wrapperCol={{ span: 30 }}
  3212. label="手机号码"
  3213. >
  3214. {this.state.ModalData.mobile}
  3215. </FormItem>
  3216. <FormItem
  3217. className="half-item"
  3218. labelCol={{ span: 6 }}
  3219. wrapperCol={{ span: 30 }}
  3220. label="电话"
  3221. >
  3222. {this.state.ModalData.fixedTel}
  3223. </FormItem>
  3224. </div>
  3225. {this.state.ModalData.contactList &&
  3226. this.state.ModalData.contactList.length > 0 ? (
  3227. this.state.ModalData.contactList.map((item, index) => {
  3228. return (
  3229. <div className="clearfix">
  3230. <FormItem
  3231. className="half-item"
  3232. labelCol={{ span: 6 }}
  3233. wrapperCol={{ span: 30 }}
  3234. label={"紧急联系人" + (index + 1)}
  3235. >
  3236. {item.emergencyContact}
  3237. </FormItem>
  3238. <FormItem
  3239. className="half-item"
  3240. labelCol={{ span: 6 }}
  3241. wrapperCol={{ span: 30 }}
  3242. label={"紧急联系人" + (index + 1) + "电话"}
  3243. >
  3244. {item.emergencyMobile}
  3245. </FormItem>
  3246. </div>
  3247. );
  3248. })
  3249. ) : (
  3250. <div
  3251. style={{
  3252. textAlign: "center",
  3253. height: 60,
  3254. lineHeight: "60px",
  3255. }}
  3256. >
  3257. 暂无紧急联系人信息
  3258. </div>
  3259. )}
  3260. </TabPane>
  3261. <TabPane tab="入职资料" key={3}>
  3262. <div className="title-peo">
  3263. <span>入职资料</span>
  3264. <Button
  3265. type="primary"
  3266. onClick={this.entryModal}
  3267. style={{ position: "absolute", right: 0, height: 30 }}
  3268. >
  3269. 修改入职信息
  3270. </Button>
  3271. </div>
  3272. <div className="clearfix">
  3273. <FormItem
  3274. className="half-item"
  3275. labelCol={{ span: 6 }}
  3276. wrapperCol={{ span: 30 }}
  3277. label="毕业学校"
  3278. >
  3279. {this.state.ModalData.personnelEntry
  3280. ? this.state.ModalData.personnelEntry.school
  3281. : ""}
  3282. </FormItem>
  3283. <FormItem
  3284. className="half-item"
  3285. labelCol={{ span: 6 }}
  3286. wrapperCol={{ span: 30 }}
  3287. label="学历"
  3288. >
  3289. {this.state.ModalData.personnelEntry
  3290. ? this.educationStatus(
  3291. this.state.ModalData.personnelEntry.education
  3292. )
  3293. : ""}
  3294. </FormItem>
  3295. </div>
  3296. <div className="clearfix">
  3297. <FormItem
  3298. className="half-item"
  3299. labelCol={{ span: 6 }}
  3300. wrapperCol={{ span: 30 }}
  3301. label="所学专业"
  3302. >
  3303. {this.state.ModalData.personnelEntry
  3304. ? this.state.ModalData.personnelEntry.major
  3305. : ""}
  3306. </FormItem>
  3307. <FormItem
  3308. className="half-item"
  3309. labelCol={{ span: 6 }}
  3310. wrapperCol={{ span: 30 }}
  3311. label="职称"
  3312. >
  3313. {this.state.ModalData.personnelEntry
  3314. ? this.state.ModalData.personnelEntry.title
  3315. : ""}
  3316. </FormItem>
  3317. </div>
  3318. <div className="clearfix" style={{ paddingLeft: 70 }}>
  3319. <div style={{ marginBottom: 10 }}>附件:</div>
  3320. <PicModal
  3321. remarks={
  3322. this.state.ModalData.personnelEntry
  3323. ? this.picToArr(
  3324. this.state.ModalData.personnelEntry.annexName
  3325. )
  3326. : []
  3327. }
  3328. picUrl={
  3329. this.state.ModalData.personnelEntry
  3330. ? this.picToArr(
  3331. this.state.ModalData.personnelEntry.annexUrl
  3332. )
  3333. : []
  3334. }
  3335. />
  3336. </div>
  3337. </TabPane>
  3338. <TabPane tab="晋升情况" key={4}>
  3339. <div className="title-peo">
  3340. <span>晋升情况</span>
  3341. <Button
  3342. type="primary"
  3343. onClick={(e) => {
  3344. this.upgradeModal(true);
  3345. }}
  3346. style={{ position: "absolute", right: 0, height: 30 }}
  3347. >
  3348. 新增晋升信息
  3349. </Button>
  3350. </div>
  3351. {this.state.ModalData.promotionList &&
  3352. this.state.ModalData.promotionList.length > 0 ? (
  3353. this.state.ModalData.promotionList.map((item, index) => {
  3354. return (
  3355. <div
  3356. style={{
  3357. width: "100%",
  3358. borderBottom: "1px dashed #ccc",
  3359. position: "relative",
  3360. }}
  3361. >
  3362. <Button
  3363. style={{
  3364. position: "absolute",
  3365. right: "50%",
  3366. bottom: 10,
  3367. transform: "translateX(50%)",
  3368. }}
  3369. type="primary"
  3370. onClick={(e) => {
  3371. this.upgradeModal(false, index);
  3372. }}
  3373. >
  3374. 修改信息
  3375. </Button>
  3376. <div className="clearfix">
  3377. <FormItem
  3378. className="half-item"
  3379. labelCol={{ span: 6 }}
  3380. wrapperCol={{ span: 30 }}
  3381. label="晋升职位"
  3382. >
  3383. {item.oldJobsName + "--->" + item.newJobsName}
  3384. </FormItem>
  3385. <FormItem
  3386. className="half-item"
  3387. labelCol={{ span: 6 }}
  3388. wrapperCol={{ span: 30 }}
  3389. label="晋升等级"
  3390. >
  3391. {item.oldLvlName + "--->" + item.newLvlName}
  3392. </FormItem>
  3393. </div>
  3394. <div className="clearfix">
  3395. <FormItem
  3396. className="half-item"
  3397. labelCol={{ span: 6 }}
  3398. wrapperCol={{ span: 30 }}
  3399. label="晋升时间"
  3400. >
  3401. {item.promotionTimes}
  3402. </FormItem>
  3403. </div>
  3404. <div className="clearfix">
  3405. <FormItem
  3406. className="half-item"
  3407. labelCol={{ span: 6 }}
  3408. wrapperCol={{ span: 30 }}
  3409. label="晋升备注"
  3410. >
  3411. {item.promotionRemarks}
  3412. </FormItem>
  3413. </div>
  3414. <div
  3415. className="clearfix"
  3416. style={{ paddingLeft: 70, marginBottom: 40 }}
  3417. >
  3418. <div style={{ marginBottom: 10 }}>附件:</div>
  3419. <PicModal
  3420. remarks={this.picToArr(item.annexName)}
  3421. picUrl={this.picToArr(item.annexUrl)}
  3422. />
  3423. </div>
  3424. </div>
  3425. );
  3426. })
  3427. ) : (
  3428. <div
  3429. style={{
  3430. textAlign: "center",
  3431. height: 60,
  3432. lineHeight: "60px",
  3433. }}
  3434. >
  3435. 暂无晋升情况
  3436. </div>
  3437. )}
  3438. </TabPane>
  3439. <TabPane tab="合同情况" key={5}>
  3440. <div className="title-peo">
  3441. <span>合同情况</span>
  3442. <Button
  3443. type="primary"
  3444. onClick={(e) => {
  3445. this.contractModal(true);
  3446. }}
  3447. style={{ position: "absolute", right: 0, height: 30 }}
  3448. >
  3449. 新增合同信息
  3450. </Button>
  3451. </div>
  3452. {this.state.ModalData.contractList &&
  3453. this.state.ModalData.contractList.length > 0 ? (
  3454. this.state.ModalData.contractList.map((item, index) => {
  3455. return (
  3456. <div
  3457. style={{
  3458. width: "100%",
  3459. borderBottom: "1px dashed #ccc",
  3460. position: "relative",
  3461. }}
  3462. >
  3463. <Button
  3464. style={{
  3465. position: "absolute",
  3466. right: "50%",
  3467. bottom: 10,
  3468. transform: "translateX(50%)",
  3469. }}
  3470. type="primary"
  3471. onClick={(e) => {
  3472. this.contractModal(false, index);
  3473. }}
  3474. >
  3475. 修改信息
  3476. </Button>
  3477. <div className="clearfix">
  3478. <FormItem
  3479. className="half-item"
  3480. labelCol={{ span: 6 }}
  3481. wrapperCol={{ span: 30 }}
  3482. label="签订时间"
  3483. >
  3484. {item.startTimes}
  3485. </FormItem>
  3486. <FormItem
  3487. className="half-item"
  3488. labelCol={{ span: 6 }}
  3489. wrapperCol={{ span: 30 }}
  3490. label="到期时间"
  3491. >
  3492. {item.endTimes}
  3493. </FormItem>
  3494. </div>
  3495. <div className="clearfix">
  3496. <FormItem
  3497. style={{ width: "100%", wordBreak: "break-all" }}
  3498. className="half-item"
  3499. labelCol={{ span: 3 }}
  3500. wrapperCol={{ span: 30 }}
  3501. label="备注"
  3502. >
  3503. {item.contractRemarks}
  3504. </FormItem>
  3505. </div>
  3506. <div
  3507. className="clearfix"
  3508. style={{ paddingLeft: 70, marginBottom: 40 }}
  3509. >
  3510. <div style={{ marginBottom: 10 }}>附件:</div>
  3511. <PicModal
  3512. remarks={this.picToArr(item.annexName)}
  3513. picUrl={this.picToArr(item.annexUrl)}
  3514. />
  3515. </div>
  3516. </div>
  3517. );
  3518. })
  3519. ) : (
  3520. <div
  3521. style={{
  3522. textAlign: "center",
  3523. height: 60,
  3524. lineHeight: "60px",
  3525. }}
  3526. >
  3527. 暂无合同情况
  3528. </div>
  3529. )}
  3530. </TabPane>
  3531. <TabPane tab="奖惩情况" key={6}>
  3532. <div className="title-peo">
  3533. <span>奖惩情况</span>
  3534. <Button
  3535. type="primary"
  3536. onClick={(e) => {
  3537. this.chooseModal(true);
  3538. }}
  3539. style={{ position: "absolute", right: 0, height: 30 }}
  3540. >
  3541. 新增奖惩信息
  3542. </Button>
  3543. </div>
  3544. {this.state.ModalData.chooseList &&
  3545. this.state.ModalData.chooseList.length > 0 ? (
  3546. this.state.ModalData.chooseList.map((item, index) => {
  3547. return (
  3548. <div
  3549. style={{
  3550. width: "100%",
  3551. borderBottom: "1px dashed #ccc",
  3552. position: "relative",
  3553. }}
  3554. >
  3555. <Button
  3556. style={{
  3557. position: "absolute",
  3558. right: "50%",
  3559. bottom: 10,
  3560. transform: "translateX(50%)",
  3561. }}
  3562. type="primary"
  3563. onClick={(e) => {
  3564. this.chooseModal(false, index);
  3565. }}
  3566. >
  3567. 修改信息
  3568. </Button>
  3569. <div className="clearfix">
  3570. <FormItem
  3571. className="half-item"
  3572. labelCol={{ span: 6 }}
  3573. wrapperCol={{ span: 30 }}
  3574. label={"状态"}
  3575. >
  3576. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3577. </FormItem>
  3578. <FormItem
  3579. className="half-item"
  3580. labelCol={{ span: 6 }}
  3581. wrapperCol={{ span: 30 }}
  3582. label="时间"
  3583. >
  3584. {item.effectTimes}
  3585. </FormItem>
  3586. </div>
  3587. <div className="clearfix">
  3588. <FormItem
  3589. className="half-item"
  3590. labelCol={{ span: 6 }}
  3591. wrapperCol={{ span: 30 }}
  3592. label={"内容"}
  3593. >
  3594. {item.chooseRemarks}
  3595. </FormItem>
  3596. </div>
  3597. <div
  3598. className="clearfix"
  3599. style={{ paddingLeft: 70, marginBottom: 40 }}
  3600. >
  3601. <div style={{ marginBottom: 10 }}>附件:</div>
  3602. <PicModal
  3603. remarks={this.picToArr(item.annexName)}
  3604. picUrl={this.picToArr(item.annexUrl)}
  3605. />
  3606. </div>
  3607. </div>
  3608. );
  3609. })
  3610. ) : (
  3611. <div
  3612. style={{
  3613. textAlign: "center",
  3614. height: 60,
  3615. lineHeight: "60px",
  3616. }}
  3617. >
  3618. 暂无奖惩情况
  3619. </div>
  3620. )}
  3621. </TabPane>
  3622. <TabPane tab="离职情况" key={7}>
  3623. <div className="title-peo">
  3624. <span>离职情况</span>
  3625. <Button
  3626. type="primary"
  3627. onClick={(e) => {
  3628. this.quitModal(true);
  3629. }}
  3630. style={{ position: "absolute", right: 0, height: 30 }}
  3631. >
  3632. 新增离职信息
  3633. </Button>
  3634. </div>
  3635. {this.state.ModalData.quitList &&
  3636. this.state.ModalData.quitList.length > 0 ? (
  3637. this.state.ModalData.quitList.map((item, index) => {
  3638. return (
  3639. <div
  3640. style={{
  3641. width: "100%",
  3642. borderBottom: "1px dashed #ccc",
  3643. position: "relative",
  3644. }}
  3645. >
  3646. <Button
  3647. style={{
  3648. position: "absolute",
  3649. right: "50%",
  3650. bottom: 10,
  3651. transform: "translateX(50%)",
  3652. }}
  3653. type="primary"
  3654. onClick={(e) => {
  3655. this.quitModal(false, index);
  3656. }}
  3657. >
  3658. 修改信息
  3659. </Button>
  3660. <div className="clearfix">
  3661. <FormItem
  3662. className="half-item"
  3663. labelCol={{ span: 6 }}
  3664. wrapperCol={{ span: 30 }}
  3665. label="离职时间"
  3666. >
  3667. {item.effectTimes}
  3668. </FormItem>
  3669. <FormItem
  3670. className="half-item"
  3671. labelCol={{ span: 6 }}
  3672. wrapperCol={{ span: 30 }}
  3673. label="离职备注"
  3674. >
  3675. {item.quitRemarks}
  3676. </FormItem>
  3677. </div>
  3678. <div
  3679. className="clearfix"
  3680. style={{ paddingLeft: 70, marginBottom: 40 }}
  3681. >
  3682. <div style={{ marginBottom: 10 }}>附件:</div>
  3683. <PicModal
  3684. remarks={this.picToArr(item.annexName)}
  3685. picUrl={this.picToArr(item.annexUrl)}
  3686. />
  3687. </div>
  3688. </div>
  3689. );
  3690. })
  3691. ) : (
  3692. <div
  3693. style={{
  3694. textAlign: "center",
  3695. height: 60,
  3696. lineHeight: "60px",
  3697. }}
  3698. >
  3699. 暂无离职信息
  3700. </div>
  3701. )}
  3702. </TabPane>
  3703. <TabPane tab="福利情况" key={8}>
  3704. <div className="title-peo" style={{ marginBottom: 10 }}>
  3705. <span>福利情况</span>
  3706. <Button
  3707. type="primary"
  3708. onClick={(e) => {
  3709. this.welfareModal();
  3710. }}
  3711. style={{ position: "absolute", right: 0, height: 30 }}
  3712. >
  3713. 修改福利信息
  3714. </Button>
  3715. </div>
  3716. <Table
  3717. columns={this.state.welfareColumns}
  3718. dataSource={this.state.ModalData.welfareList}
  3719. pagination={false}
  3720. bordered
  3721. size="small"
  3722. scroll={{ x: "max-content", y: 0 }}
  3723. />
  3724. <div className="clearfix" style={{ marginTop: 10 }}>
  3725. <FormItem
  3726. className="half-item"
  3727. style={{ width: "100%", wordBreak: "break-all" }}
  3728. labelCol={{ span: 3 }}
  3729. wrapperCol={{ span: 30 }}
  3730. label="备注"
  3731. >
  3732. {this.state.ModalData.welfareRemarks}
  3733. </FormItem>
  3734. </div>
  3735. <div
  3736. className="clearfix"
  3737. style={{ paddingLeft: 70, marginBottom: 0 }}
  3738. >
  3739. <div style={{ marginBottom: 10 }}>附件:</div>
  3740. <PicModal
  3741. remarks={this.picToArr(
  3742. this.state.ModalData.welfareAnnexName
  3743. )}
  3744. picUrl={this.picToArr(
  3745. this.state.ModalData.welfareAnnexUrl
  3746. )}
  3747. />
  3748. </div>
  3749. </TabPane>
  3750. </Tabs>
  3751. )}
  3752. </Spin>
  3753. <Modal
  3754. visible={this.state.peoVisible}
  3755. onOk={this.checkOk}
  3756. footer={null}
  3757. width={800}
  3758. style={{ position: "relative", zIndex: 9999 }}
  3759. onCancel={() => {
  3760. this.loadData();
  3761. this.addPeoCancel();
  3762. }}
  3763. >
  3764. <Spin spinning={this.state.loading}>
  3765. <h2
  3766. style={{
  3767. textAlign: "center",
  3768. paddingBottom: 10,
  3769. marginBottom: 10,
  3770. }}
  3771. >
  3772. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  3773. </h2>
  3774. <div className="clearfix">
  3775. <FormItem
  3776. className="half-item"
  3777. {...formItemLayout}
  3778. label="员工编号"
  3779. >
  3780. <Input
  3781. placeholder="请输入员工编号"
  3782. style={{ width: 200 }}
  3783. value={this.state.employeeId}
  3784. onChange={(e) => {
  3785. this.setState({
  3786. employeeId: e.target.value,
  3787. });
  3788. }}
  3789. />
  3790. <Button
  3791. disabled={
  3792. this.state.employeeId || this.state.employeeId == 0
  3793. ? false
  3794. : true
  3795. }
  3796. style={{ position: "absolute" }}
  3797. type={"primary"}
  3798. onClick={this.verifyId}
  3799. >
  3800. 验证重复
  3801. </Button>
  3802. </FormItem>
  3803. <FormItem
  3804. className="half-item"
  3805. {...formItemLayout}
  3806. label="门禁编号"
  3807. >
  3808. <Input
  3809. style={{ width: 200 }}
  3810. placeholder="请输入门禁编号"
  3811. value={this.state.doorId}
  3812. onChange={(e) => {
  3813. this.setState({
  3814. doorId: e.target.value,
  3815. });
  3816. }}
  3817. />
  3818. <Button
  3819. disabled={
  3820. this.state.doorId || this.state.doorId == 0 ? false : true
  3821. }
  3822. style={{ position: "absolute" }}
  3823. type={"primary"}
  3824. onClick={this.verifyDoor}
  3825. >
  3826. 验证重复
  3827. </Button>
  3828. </FormItem>
  3829. </div>
  3830. <div className="clearfix">
  3831. <FormItem
  3832. className="half-item"
  3833. {...formItemLayout}
  3834. label="姓名"
  3835. >
  3836. <Input
  3837. placeholder="请输入姓名"
  3838. style={{ width: 200 }}
  3839. value={this.state.name}
  3840. onChange={(e) => {
  3841. this.setState({
  3842. name: e.target.value,
  3843. });
  3844. }}
  3845. />
  3846. </FormItem>
  3847. <FormItem
  3848. className="half-item"
  3849. {...formItemLayout}
  3850. label="出生日期"
  3851. >
  3852. <DatePicker
  3853. value={
  3854. this.state.birthdays ? moment(this.state.birthdays) : null
  3855. }
  3856. onChange={(e, t) => {
  3857. this.setState({
  3858. birthdays: t,
  3859. });
  3860. }}
  3861. />
  3862. </FormItem>
  3863. </div>
  3864. <div className="clearfix">
  3865. <FormItem
  3866. className="half-item"
  3867. {...formItemLayout}
  3868. label="性别"
  3869. >
  3870. <Radio.Group
  3871. onChange={(e) => {
  3872. this.setState({ sex: e.target.value });
  3873. }}
  3874. value={this.state.sex}
  3875. >
  3876. <Radio value={0}>男</Radio>
  3877. <Radio value={1}>女</Radio>
  3878. </Radio.Group>
  3879. </FormItem>
  3880. <FormItem
  3881. className="half-item"
  3882. {...formItemLayout}
  3883. label="民族"
  3884. >
  3885. <Input
  3886. placeholder="输入民族(例:汉族)"
  3887. style={{ width: 200 }}
  3888. value={this.state.nation}
  3889. onChange={(e) => {
  3890. this.setState({
  3891. nation: e.target.value,
  3892. });
  3893. }}
  3894. />
  3895. </FormItem>
  3896. </div>
  3897. <div className="clearfix">
  3898. <FormItem
  3899. className="half-item"
  3900. {...formItemLayout}
  3901. label="户籍地址"
  3902. >
  3903. <Cascader
  3904. options={this.state.Area}
  3905. value={this.state.residence}
  3906. placeholder="选择城市"
  3907. style={{ width: "200px" }}
  3908. onChange={(e, pre) => {
  3909. this.setState({ residence: e });
  3910. }}
  3911. />
  3912. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3913. </FormItem>
  3914. <FormItem
  3915. className="half-item"
  3916. {...formItemLayout}
  3917. label="户籍街道地址"
  3918. >
  3919. <Input
  3920. placeholder="输入街道地址"
  3921. style={{ width: 200 }}
  3922. value={this.state.residenceAddress}
  3923. onChange={(e) => {
  3924. this.setState({
  3925. residenceAddress: e.target.value,
  3926. });
  3927. }}
  3928. />
  3929. </FormItem>
  3930. </div>
  3931. <div className="clearfix">
  3932. <FormItem
  3933. className="half-item"
  3934. {...formItemLayout}
  3935. label="现住地址"
  3936. >
  3937. <Cascader
  3938. options={this.state.Area}
  3939. value={this.state.now}
  3940. placeholder="选择城市"
  3941. style={{ width: "200px" }}
  3942. onChange={(e, pre) => {
  3943. this.setState({ now: e });
  3944. }}
  3945. />
  3946. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3947. </FormItem>
  3948. <FormItem
  3949. className="half-item"
  3950. {...formItemLayout}
  3951. label="现住街道地址"
  3952. >
  3953. <Input
  3954. placeholder="输入街道地址"
  3955. style={{ width: 200 }}
  3956. value={this.state.nowAddress}
  3957. onChange={(e) => {
  3958. this.setState({
  3959. nowAddress: e.target.value,
  3960. });
  3961. }}
  3962. />
  3963. </FormItem>
  3964. </div>
  3965. <div className="clearfix">
  3966. <FormItem
  3967. className="half-item"
  3968. {...formItemLayout}
  3969. label="籍贯"
  3970. >
  3971. <Cascader
  3972. options={this.state.Birthplaces}
  3973. value={this.state.nativePlace}
  3974. placeholder="选择城市"
  3975. style={{ width: "200px" }}
  3976. onChange={(e, pre) => {
  3977. this.setState({ nativePlace: e });
  3978. }}
  3979. />
  3980. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  3981. </FormItem>
  3982. <FormItem
  3983. className="half-item"
  3984. {...formItemLayout}
  3985. label="身份证"
  3986. >
  3987. <Input
  3988. placeholder="输入身份证信息"
  3989. style={{ width: 200 }}
  3990. value={this.state.idCard}
  3991. onChange={(e) => {
  3992. // 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]$/;
  3993. this.setState({
  3994. idCard: e.target.value,
  3995. });
  3996. }}
  3997. />
  3998. </FormItem>
  3999. </div>
  4000. <div className="clearfix">
  4001. <FormItem
  4002. className="half-item"
  4003. {...formItemLayout}
  4004. label="身份证领证机关"
  4005. >
  4006. <Input
  4007. placeholder="输入机关名称"
  4008. style={{ width: 200 }}
  4009. value={this.state.certificationAuthority}
  4010. onChange={(e) => {
  4011. // 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]$/;
  4012. this.setState({
  4013. certificationAuthority: e.target.value,
  4014. });
  4015. }}
  4016. />
  4017. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4018. </FormItem>
  4019. <FormItem
  4020. className="half-item"
  4021. {...formItemLayout}
  4022. label="婚姻状态"
  4023. >
  4024. <Radio.Group
  4025. onChange={(e) => {
  4026. this.setState({ marriage: e.target.value });
  4027. }}
  4028. value={this.state.marriage}
  4029. >
  4030. <Radio value={0}>未婚</Radio>
  4031. <Radio value={1}>已婚</Radio>
  4032. <Radio value={2}>离异</Radio>
  4033. </Radio.Group>
  4034. </FormItem>
  4035. </div>
  4036. <div className="clearfix">
  4037. <FormItem
  4038. className="half-item"
  4039. labelCol={{ span: 6 }}
  4040. wrapperCol={{ span: 30 }}
  4041. label="子女数量"
  4042. >
  4043. <span>儿子:</span>
  4044. <Input
  4045. placeholder="输入数量"
  4046. style={{ width: 80 }}
  4047. type={"number"}
  4048. value={this.state.son}
  4049. onChange={(e) => {
  4050. this.setState({
  4051. son: e.target.value,
  4052. });
  4053. }}
  4054. />
  4055. <span style={{ marginLeft: 10 }}>女儿:</span>
  4056. <Input
  4057. placeholder="输入数量"
  4058. style={{ width: 80 }}
  4059. type={"number"}
  4060. value={this.state.girl}
  4061. onChange={(e) => {
  4062. this.setState({
  4063. girl: e.target.value,
  4064. });
  4065. }}
  4066. />
  4067. </FormItem>
  4068. <FormItem
  4069. className="half-item"
  4070. {...formItemLayout}
  4071. label="政治面貌"
  4072. >
  4073. <Select
  4074. placeholder="请选择政治面貌"
  4075. style={{ width: 200 }}
  4076. onChange={(e) => {
  4077. this.setState({ politicalOutlook: e });
  4078. }}
  4079. value={this.state.politicalOutlook}
  4080. >
  4081. <Option value={0}>群众</Option>
  4082. <Option value={1}>中共预备党员</Option>
  4083. <Option value={2}>中共党员</Option>
  4084. <Option value={3}>致公党党员</Option>
  4085. </Select>
  4086. </FormItem>
  4087. </div>
  4088. <Button
  4089. type="primary"
  4090. shape="round"
  4091. size="large"
  4092. style={{
  4093. position: "relative",
  4094. left: "50%",
  4095. transform: "translateX(-50%)",
  4096. }}
  4097. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4098. >
  4099. 保存
  4100. </Button>
  4101. </Spin>
  4102. </Modal>
  4103. </Modal>
  4104. <Modal
  4105. visible={this.state.peoVisible}
  4106. onOk={this.checkOk}
  4107. footer={null}
  4108. width={800}
  4109. style={{ position: "relative", zIndex: 9999 }}
  4110. onCancel={() => {
  4111. this.loadData();
  4112. this.addPeoCancel();
  4113. }}
  4114. >
  4115. <Spin spinning={this.state.loading}>
  4116. <h2
  4117. style={{
  4118. textAlign: "center",
  4119. paddingBottom: 10,
  4120. marginBottom: 10,
  4121. }}
  4122. >
  4123. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  4124. </h2>
  4125. <div className="clearfix">
  4126. <FormItem
  4127. className="half-item"
  4128. {...formItemLayout}
  4129. label="员工编号"
  4130. >
  4131. <Input
  4132. placeholder="请输入员工编号"
  4133. style={{ width: 200 }}
  4134. value={this.state.employeeId}
  4135. onChange={(e) => {
  4136. this.setState({
  4137. employeeId: e.target.value,
  4138. });
  4139. }}
  4140. />
  4141. <Button
  4142. disabled={
  4143. this.state.employeeId || this.state.employeeId == 0
  4144. ? false
  4145. : true
  4146. }
  4147. style={{ position: "absolute" }}
  4148. type={"primary"}
  4149. onClick={this.verifyId}
  4150. >
  4151. 验证重复
  4152. </Button>
  4153. </FormItem>
  4154. <FormItem
  4155. className="half-item"
  4156. {...formItemLayout}
  4157. label="门禁编号"
  4158. >
  4159. <Input
  4160. style={{ width: 200 }}
  4161. placeholder="请输入门禁编号"
  4162. value={this.state.doorId}
  4163. onChange={(e) => {
  4164. this.setState({
  4165. doorId: e.target.value,
  4166. });
  4167. }}
  4168. />
  4169. <Button
  4170. disabled={
  4171. this.state.doorId || this.state.doorId == 0 ? false : true
  4172. }
  4173. style={{ position: "absolute" }}
  4174. type={"primary"}
  4175. onClick={this.verifyDoor}
  4176. >
  4177. 验证重复
  4178. </Button>
  4179. </FormItem>
  4180. </div>
  4181. <div className="clearfix">
  4182. <FormItem className="half-item" {...formItemLayout} label="姓名">
  4183. <Input
  4184. placeholder="请输入姓名"
  4185. style={{ width: 200 }}
  4186. value={this.state.name}
  4187. onChange={(e) => {
  4188. this.setState({
  4189. name: e.target.value,
  4190. });
  4191. }}
  4192. />
  4193. </FormItem>
  4194. <FormItem
  4195. className="half-item"
  4196. {...formItemLayout}
  4197. label="出生日期"
  4198. >
  4199. <DatePicker
  4200. value={
  4201. this.state.birthdays ? moment(this.state.birthdays) : null
  4202. }
  4203. onChange={(e, t) => {
  4204. this.setState({
  4205. birthdays: t,
  4206. });
  4207. }}
  4208. />
  4209. </FormItem>
  4210. </div>
  4211. <div className="clearfix">
  4212. <FormItem className="half-item" {...formItemLayout} label="性别">
  4213. <Radio.Group
  4214. onChange={(e) => {
  4215. this.setState({ sex: e.target.value });
  4216. }}
  4217. value={this.state.sex}
  4218. >
  4219. <Radio value={0}>男</Radio>
  4220. <Radio value={1}>女</Radio>
  4221. </Radio.Group>
  4222. </FormItem>
  4223. <FormItem className="half-item" {...formItemLayout} label="民族">
  4224. <Input
  4225. placeholder="输入民族(例:汉族)"
  4226. style={{ width: 200 }}
  4227. value={this.state.nation}
  4228. onChange={(e) => {
  4229. this.setState({
  4230. nation: e.target.value,
  4231. });
  4232. }}
  4233. />
  4234. </FormItem>
  4235. </div>
  4236. <div className="clearfix">
  4237. <FormItem
  4238. className="half-item"
  4239. {...formItemLayout}
  4240. label="户籍地址"
  4241. >
  4242. <Cascader
  4243. options={this.state.Area}
  4244. value={this.state.residence}
  4245. placeholder="选择城市"
  4246. style={{ width: "200px" }}
  4247. onChange={(e, pre) => {
  4248. this.setState({ residence: e });
  4249. }}
  4250. />
  4251. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4252. </FormItem>
  4253. <FormItem
  4254. className="half-item"
  4255. {...formItemLayout}
  4256. label="户籍街道地址"
  4257. >
  4258. <Input
  4259. placeholder="输入街道地址"
  4260. style={{ width: 200 }}
  4261. value={this.state.residenceAddress}
  4262. onChange={(e) => {
  4263. this.setState({
  4264. residenceAddress: e.target.value,
  4265. });
  4266. }}
  4267. />
  4268. </FormItem>
  4269. </div>
  4270. <div className="clearfix">
  4271. <FormItem
  4272. className="half-item"
  4273. {...formItemLayout}
  4274. label="现住地址"
  4275. >
  4276. <Cascader
  4277. options={this.state.Area}
  4278. value={this.state.now}
  4279. placeholder="选择城市"
  4280. style={{ width: "200px" }}
  4281. onChange={(e, pre) => {
  4282. this.setState({ now: e });
  4283. }}
  4284. />
  4285. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4286. </FormItem>
  4287. <FormItem
  4288. className="half-item"
  4289. {...formItemLayout}
  4290. label="现住街道地址"
  4291. >
  4292. <Input
  4293. placeholder="输入街道地址"
  4294. style={{ width: 200 }}
  4295. value={this.state.nowAddress}
  4296. onChange={(e) => {
  4297. this.setState({
  4298. nowAddress: e.target.value,
  4299. });
  4300. }}
  4301. />
  4302. </FormItem>
  4303. </div>
  4304. <div className="clearfix">
  4305. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  4306. <Cascader
  4307. options={this.state.Birthplaces}
  4308. value={this.state.nativePlace}
  4309. placeholder="选择城市"
  4310. style={{ width: "200px" }}
  4311. onChange={(e, pre) => {
  4312. this.setState({ nativePlace: e });
  4313. }}
  4314. />
  4315. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4316. </FormItem>
  4317. <FormItem
  4318. className="half-item"
  4319. {...formItemLayout}
  4320. label="身份证"
  4321. >
  4322. <Input
  4323. placeholder="输入身份证信息"
  4324. style={{ width: 200 }}
  4325. value={this.state.idCard}
  4326. onChange={(e) => {
  4327. // 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]$/;
  4328. this.setState({
  4329. idCard: e.target.value,
  4330. });
  4331. }}
  4332. />
  4333. </FormItem>
  4334. </div>
  4335. <div className="clearfix">
  4336. <FormItem
  4337. className="half-item"
  4338. {...formItemLayout}
  4339. label="身份证领证机关"
  4340. >
  4341. <Input
  4342. placeholder="输入机关名称"
  4343. style={{ width: 200 }}
  4344. value={this.state.certificationAuthority}
  4345. onChange={(e) => {
  4346. // 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]$/;
  4347. this.setState({
  4348. certificationAuthority: e.target.value,
  4349. });
  4350. }}
  4351. />
  4352. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  4353. </FormItem>
  4354. <FormItem
  4355. className="half-item"
  4356. {...formItemLayout}
  4357. label="婚姻状态"
  4358. >
  4359. <Radio.Group
  4360. onChange={(e) => {
  4361. this.setState({ marriage: e.target.value });
  4362. }}
  4363. value={this.state.marriage}
  4364. >
  4365. <Radio value={0}>未婚</Radio>
  4366. <Radio value={1}>已婚</Radio>
  4367. <Radio value={2}>离异</Radio>
  4368. </Radio.Group>
  4369. </FormItem>
  4370. </div>
  4371. <div className="clearfix">
  4372. <FormItem
  4373. className="half-item"
  4374. labelCol={{ span: 6 }}
  4375. wrapperCol={{ span: 30 }}
  4376. label="子女数量"
  4377. >
  4378. <span>儿子:</span>
  4379. <Input
  4380. placeholder="输入数量"
  4381. style={{ width: 80 }}
  4382. type={"number"}
  4383. value={this.state.son}
  4384. onChange={(e) => {
  4385. this.setState({
  4386. son: e.target.value,
  4387. });
  4388. }}
  4389. />
  4390. <span style={{ marginLeft: 10 }}>女儿:</span>
  4391. <Input
  4392. placeholder="输入数量"
  4393. style={{ width: 80 }}
  4394. type={"number"}
  4395. value={this.state.girl}
  4396. onChange={(e) => {
  4397. this.setState({
  4398. girl: e.target.value,
  4399. });
  4400. }}
  4401. />
  4402. </FormItem>
  4403. <FormItem
  4404. className="half-item"
  4405. {...formItemLayout}
  4406. label="政治面貌"
  4407. >
  4408. <Select
  4409. placeholder="请选择政治面貌"
  4410. style={{ width: 200 }}
  4411. onChange={(e) => {
  4412. this.setState({ politicalOutlook: e });
  4413. }}
  4414. value={this.state.politicalOutlook}
  4415. >
  4416. <Option value={0}>群众</Option>
  4417. <Option value={1}>中共预备党员</Option>
  4418. <Option value={2}>中共党员</Option>
  4419. <Option value={3}>致公党党员</Option>
  4420. </Select>
  4421. </FormItem>
  4422. </div>
  4423. <Button
  4424. type="primary"
  4425. shape="round"
  4426. size="large"
  4427. style={{
  4428. position: "relative",
  4429. left: "50%",
  4430. transform: "translateX(-50%)",
  4431. }}
  4432. onClick={this.state.isAddPeo ? this.addOk : this.editOk}
  4433. >
  4434. 保存
  4435. </Button>
  4436. </Spin>
  4437. </Modal>
  4438. <Modal
  4439. visible={this.state.stayVisible}
  4440. footer={null}
  4441. width={800}
  4442. onCancel={() => {
  4443. this.loadData();
  4444. this.stayCancel();
  4445. }}
  4446. >
  4447. <Spin spinning={this.state.loading}>
  4448. <h3
  4449. style={{
  4450. textAlign: "center",
  4451. paddingBottom: 10,
  4452. marginBottom: 10,
  4453. }}
  4454. >
  4455. 任职信息
  4456. </h3>
  4457. <div className="clearfix">
  4458. <FormItem
  4459. className="half-item"
  4460. labelCol={{ span: 6 }}
  4461. wrapperCol={{ span: 30 }}
  4462. label="员工状态"
  4463. >
  4464. <Select
  4465. placeholder="请选择状态"
  4466. style={{ width: 200 }}
  4467. onChange={(e) => {
  4468. this.setState({ status: e });
  4469. }}
  4470. value={this.state.status}
  4471. >
  4472. <Option value="0">实习生</Option>
  4473. <Option value="1">在职(试用期)</Option>
  4474. <Option value="2">在职(合同期)</Option>
  4475. <Option value="3">兼职</Option>
  4476. <Option value="4">已离职</Option>
  4477. </Select>
  4478. </FormItem>
  4479. <FormItem
  4480. className="half-item"
  4481. {...formItemLayout}
  4482. label="所属系统"
  4483. >
  4484. <Select
  4485. placeholder="请选择所属系统"
  4486. style={{ width: 200 }}
  4487. onChange={(e) => {
  4488. this.setState({ system: e });
  4489. }}
  4490. value={this.state.system}
  4491. >
  4492. <Option value="0">管理系统</Option>
  4493. <Option value="1">营销系统</Option>
  4494. <Option value="2">技术系统</Option>
  4495. </Select>
  4496. </FormItem>
  4497. </div>
  4498. <div className="clearfix">
  4499. <FormItem
  4500. className="half-item"
  4501. labelCol={{ span: 6 }}
  4502. wrapperCol={{ span: 30 }}
  4503. label="工作性质"
  4504. >
  4505. <Radio.Group
  4506. onChange={(e) => {
  4507. this.setState({ jobNature: e.target.value });
  4508. }}
  4509. value={this.state.jobNature}
  4510. >
  4511. <Radio value="0">全职</Radio>
  4512. <Radio value="1">兼职</Radio>
  4513. <Radio value="2">其他</Radio>
  4514. </Radio.Group>
  4515. <Input
  4516. placeholder="输入性质"
  4517. style={{
  4518. width: 80,
  4519. display:
  4520. this.state.jobNature == 2 ? "inline-block" : "none",
  4521. }}
  4522. value={this.state.jobNatureRemarks}
  4523. onChange={(e) => {
  4524. this.setState({
  4525. jobNatureRemarks: e.target.value,
  4526. });
  4527. }}
  4528. />
  4529. </FormItem>
  4530. <FormItem className="half-item" {...formItemLayout} label="工龄">
  4531. <span>{this.state.ModalData.workingYear}</span>
  4532. </FormItem>
  4533. </div>
  4534. <div className="clearfix">
  4535. <FormItem
  4536. className="half-item"
  4537. {...formItemLayout}
  4538. label="入职时间"
  4539. >
  4540. <DatePicker
  4541. value={
  4542. this.state.entryTimes ? moment(this.state.entryTimes) : null
  4543. }
  4544. style={{ width: 200 }}
  4545. onChange={(e, t) => {
  4546. this.setState({
  4547. entryTimes: t,
  4548. });
  4549. }}
  4550. />
  4551. </FormItem>
  4552. <FormItem
  4553. className="half-item"
  4554. {...formItemLayout}
  4555. label="转正时间"
  4556. >
  4557. <DatePicker
  4558. value={
  4559. this.state.promotionTimes
  4560. ? moment(this.state.promotionTimes)
  4561. : null
  4562. }
  4563. style={{ width: 200 }}
  4564. onChange={(e, t) => {
  4565. this.setState({
  4566. promotionTimes: t,
  4567. });
  4568. }}
  4569. />
  4570. </FormItem>
  4571. </div>
  4572. <div className="clearfix">
  4573. <FormItem
  4574. className="half-item"
  4575. {...formItemLayout}
  4576. label="所属公司"
  4577. >
  4578. <Select
  4579. placeholder="选择公司"
  4580. style={{ width: 200, marginRight: 10 }}
  4581. value={this.state.company}
  4582. onChange={(e) => {
  4583. this.setState({ company: e });
  4584. }}
  4585. >
  4586. {departmentArr.map(function (item) {
  4587. return (
  4588. <Select.Option key={item.id}>{item.name}</Select.Option>
  4589. );
  4590. })}
  4591. </Select>
  4592. </FormItem>
  4593. <FormItem className="half-item" {...formItemLayout} label="级别">
  4594. <Select
  4595. placeholder="请选择所属级别"
  4596. style={{ width: 200 }}
  4597. onChange={(e) => {
  4598. this.setState({ lvl: e });
  4599. }}
  4600. value={this.state.lvl}
  4601. >
  4602. <Option value="0">员工</Option>
  4603. <Option value="1">主管</Option>
  4604. <Option value="2">经理</Option>
  4605. <Option value="3">总经理</Option>
  4606. <Option value="4">副总裁</Option>
  4607. <Option value="5">副总</Option>
  4608. <Option value="6">总监</Option>
  4609. <Option value="7">董事长</Option>
  4610. </Select>
  4611. </FormItem>
  4612. </div>
  4613. <div className="clearfix">
  4614. <FormItem className="half-item" {...formItemLayout} label="职位">
  4615. <Select
  4616. placeholder="选择职位"
  4617. style={{ width: 200, marginRight: 10 }}
  4618. value={this.state.jobs}
  4619. onChange={(e) => {
  4620. this.setState({ jobs: e, star: [] });
  4621. this.getList();
  4622. }}
  4623. >
  4624. <Option value="1">员工</Option>
  4625. <Option value="2">试用营销员</Option>
  4626. <Option value="3">试用营销储备经理</Option>
  4627. <Option value="4">营销经理</Option>
  4628. <Option value="5">总监合伙人</Option>
  4629. <Option value="6">技术助理</Option>
  4630. <Option value="7">咨询师</Option>
  4631. <Option value="8">咨询师主管</Option>
  4632. <Option value="9">咨询师经理</Option>
  4633. <Option value="10">高级经理</Option>
  4634. </Select>
  4635. </FormItem>
  4636. <FormItem className="half-item" {...formItemLayout} label="星级">
  4637. <Select
  4638. placeholder="请选择所属星级"
  4639. style={{ width: 200 }}
  4640. onChange={(e) => {
  4641. this.setState({ star: e });
  4642. }}
  4643. value={this.state.star}
  4644. >
  4645. {this.state.starArr
  4646. ? this.state.starArr.map((item, index) => {
  4647. return (
  4648. <Option value={item.star}>{item.starName}</Option>
  4649. );
  4650. })
  4651. : []}
  4652. </Select>
  4653. </FormItem>
  4654. </div>
  4655. <div className="clearfix">
  4656. <FormItem
  4657. className="half-item"
  4658. labelCol={{ span: 6 }}
  4659. wrapperCol={{ span: 30 }}
  4660. label="岗位津贴"
  4661. >
  4662. <Input
  4663. placeholder="输入金额"
  4664. style={{ width: 200 }}
  4665. value={this.state.allowance}
  4666. onChange={(e) => {
  4667. this.setState({
  4668. allowance: e.target.value,
  4669. });
  4670. }}
  4671. />
  4672. </FormItem>
  4673. </div>
  4674. <Button
  4675. type="primary"
  4676. shape="round"
  4677. size="large"
  4678. style={{
  4679. position: "relative",
  4680. left: "50%",
  4681. transform: "translateX(-50%)",
  4682. }}
  4683. onClick={this.editStay}
  4684. >
  4685. 保存
  4686. </Button>
  4687. </Spin>
  4688. </Modal>
  4689. <Modal
  4690. visible={this.state.phoneVisible}
  4691. footer={null}
  4692. width={800}
  4693. onCancel={() => {
  4694. this.loadData();
  4695. this.phoneCancel();
  4696. }}
  4697. >
  4698. <Spin spinning={this.state.loading}>
  4699. <h3
  4700. style={{
  4701. textAlign: "center",
  4702. paddingBottom: 10,
  4703. marginBottom: 10,
  4704. }}
  4705. >
  4706. 联系信息
  4707. </h3>
  4708. <div className="clearfix">
  4709. <FormItem
  4710. className="half-item"
  4711. labelCol={{ span: 6 }}
  4712. wrapperCol={{ span: 30 }}
  4713. label="手机号码"
  4714. >
  4715. <Input
  4716. placeholder="输入号码"
  4717. style={{ width: 200 }}
  4718. value={this.state.mobile}
  4719. onChange={(e) => {
  4720. this.setState({
  4721. mobile: e.target.value,
  4722. });
  4723. }}
  4724. />
  4725. </FormItem>
  4726. <FormItem
  4727. className="half-item"
  4728. labelCol={{ span: 6 }}
  4729. wrapperCol={{ span: 30 }}
  4730. label="办公室电话"
  4731. >
  4732. <Input
  4733. placeholder="输入电话"
  4734. style={{ width: 200 }}
  4735. value={this.state.fixedTel}
  4736. onChange={(e) => {
  4737. this.setState({
  4738. fixedTel: e.target.value,
  4739. });
  4740. }}
  4741. />
  4742. </FormItem>
  4743. </div>
  4744. <div className="clearfix">
  4745. <FormItem
  4746. className="half-item"
  4747. labelCol={{ span: 6 }}
  4748. wrapperCol={{ span: 30 }}
  4749. label="紧急联系人1"
  4750. >
  4751. <Input
  4752. placeholder="请输入名字"
  4753. style={{ width: 200 }}
  4754. value={
  4755. this.state.contactList.length
  4756. ? this.state.contactList[0].emergencyContact
  4757. : ""
  4758. }
  4759. onChange={(e) => {
  4760. this.state.contactList[0].emergencyContact = e.target.value;
  4761. let obj = this.state.contactList;
  4762. this.setState({
  4763. contactList: obj,
  4764. });
  4765. }}
  4766. />
  4767. </FormItem>
  4768. <FormItem
  4769. className="half-item"
  4770. labelCol={{ span: 6 }}
  4771. wrapperCol={{ span: 30 }}
  4772. label="紧急联系人电话"
  4773. >
  4774. <Input
  4775. placeholder="请输入电话"
  4776. style={{ width: 200 }}
  4777. value={
  4778. this.state.contactList.length
  4779. ? this.state.contactList[0].emergencyMobile
  4780. : ""
  4781. }
  4782. onChange={(e) => {
  4783. this.state.contactList[0].emergencyMobile = e.target.value;
  4784. let obj = this.state.contactList;
  4785. this.setState({
  4786. contactList: obj,
  4787. });
  4788. }}
  4789. />
  4790. </FormItem>
  4791. </div>
  4792. <div className="clearfix">
  4793. <FormItem
  4794. className="half-item"
  4795. labelCol={{ span: 6 }}
  4796. wrapperCol={{ span: 30 }}
  4797. label="紧急联系人2"
  4798. >
  4799. <Input
  4800. placeholder="请输入名字"
  4801. style={{ width: 200 }}
  4802. value={
  4803. this.state.contactList.length
  4804. ? this.state.contactList[1].emergencyContact
  4805. : ""
  4806. }
  4807. onChange={(e) => {
  4808. this.state.contactList[1].emergencyContact = e.target.value;
  4809. let obj = this.state.contactList;
  4810. this.setState({
  4811. contactList: obj,
  4812. });
  4813. }}
  4814. />
  4815. </FormItem>
  4816. <FormItem
  4817. className="half-item"
  4818. labelCol={{ span: 6 }}
  4819. wrapperCol={{ span: 30 }}
  4820. label="紧急联系人电话"
  4821. >
  4822. <Input
  4823. placeholder="请输入电话"
  4824. style={{ width: 200 }}
  4825. value={
  4826. this.state.contactList.length
  4827. ? this.state.contactList[1].emergencyMobile
  4828. : ""
  4829. }
  4830. onChange={(e) => {
  4831. this.state.contactList[1].emergencyMobile = e.target.value;
  4832. let obj = this.state.contactList;
  4833. this.setState({
  4834. contactList: obj,
  4835. });
  4836. }}
  4837. />
  4838. </FormItem>
  4839. </div>
  4840. <div className="clearfix">
  4841. <FormItem
  4842. className="half-item"
  4843. labelCol={{ span: 6 }}
  4844. wrapperCol={{ span: 30 }}
  4845. label="紧急联系人3"
  4846. >
  4847. <Input
  4848. placeholder="请输入名字"
  4849. style={{ width: 200 }}
  4850. value={
  4851. this.state.contactList.length
  4852. ? this.state.contactList[2].emergencyContact
  4853. : ""
  4854. }
  4855. onChange={(e) => {
  4856. this.state.contactList[2].emergencyContact = e.target.value;
  4857. let obj = this.state.contactList;
  4858. this.setState({
  4859. contactList: obj,
  4860. });
  4861. }}
  4862. />
  4863. </FormItem>
  4864. <FormItem
  4865. className="half-item"
  4866. labelCol={{ span: 6 }}
  4867. wrapperCol={{ span: 30 }}
  4868. label="紧急联系人电话"
  4869. >
  4870. <Input
  4871. placeholder="请输入电话"
  4872. style={{ width: 200 }}
  4873. value={
  4874. this.state.contactList.length
  4875. ? this.state.contactList[2].emergencyMobile
  4876. : ""
  4877. }
  4878. onChange={(e) => {
  4879. this.state.contactList[2].emergencyMobile = e.target.value;
  4880. let obj = this.state.contactList;
  4881. this.setState({
  4882. contactList: obj,
  4883. });
  4884. }}
  4885. />
  4886. </FormItem>
  4887. </div>
  4888. <Button
  4889. type="primary"
  4890. shape="round"
  4891. size="large"
  4892. style={{
  4893. position: "relative",
  4894. left: "50%",
  4895. transform: "translateX(-50%)",
  4896. }}
  4897. onClick={this.editPhone}
  4898. >
  4899. 保存
  4900. </Button>
  4901. </Spin>
  4902. </Modal>
  4903. <Modal
  4904. visible={this.state.entryVisible}
  4905. footer={null}
  4906. width={800}
  4907. onCancel={() => {
  4908. this.loadData();
  4909. this.entryCancel();
  4910. }}
  4911. >
  4912. <Spin spinning={this.state.loading}>
  4913. <h3
  4914. style={{
  4915. textAlign: "center",
  4916. paddingBottom: 10,
  4917. marginBottom: 10,
  4918. }}
  4919. >
  4920. 入职信息
  4921. </h3>
  4922. <div className="clearfix">
  4923. <FormItem
  4924. className="half-item"
  4925. labelCol={{ span: 6 }}
  4926. wrapperCol={{ span: 30 }}
  4927. label="毕业学校"
  4928. >
  4929. <Input
  4930. placeholder="输入学校名称"
  4931. style={{ width: 200 }}
  4932. value={this.state.school}
  4933. onChange={(e) => {
  4934. this.setState({
  4935. school: e.target.value,
  4936. });
  4937. }}
  4938. />
  4939. </FormItem>
  4940. <FormItem
  4941. className="half-item"
  4942. labelCol={{ span: 6 }}
  4943. wrapperCol={{ span: 30 }}
  4944. label="学历"
  4945. >
  4946. <Select
  4947. placeholder="请选择学历"
  4948. style={{ width: 200 }}
  4949. onChange={(e) => {
  4950. this.setState({ education: e });
  4951. }}
  4952. value={this.state.education}
  4953. >
  4954. <Option value="0">高中/中专</Option>
  4955. <Option value="1">专科/高职</Option>
  4956. <Option value="2">本科</Option>
  4957. <Option value="3">研究生</Option>
  4958. <Option value="5">博士</Option>
  4959. </Select>
  4960. </FormItem>
  4961. </div>
  4962. <div className="clearfix">
  4963. <FormItem
  4964. className="half-item"
  4965. labelCol={{ span: 6 }}
  4966. wrapperCol={{ span: 30 }}
  4967. label="所学专业"
  4968. >
  4969. <Input
  4970. placeholder="请输入专业名称"
  4971. style={{ width: 200 }}
  4972. value={this.state.major}
  4973. onChange={(e) => {
  4974. this.setState({
  4975. major: e.target.value,
  4976. });
  4977. }}
  4978. />
  4979. </FormItem>
  4980. <FormItem
  4981. className="half-item"
  4982. labelCol={{ span: 6 }}
  4983. wrapperCol={{ span: 30 }}
  4984. label="职称"
  4985. >
  4986. <Input
  4987. placeholder="请输入职称"
  4988. style={{ width: 200 }}
  4989. value={this.state.title}
  4990. onChange={(e) => {
  4991. this.setState({
  4992. title: e.target.value,
  4993. });
  4994. }}
  4995. />
  4996. </FormItem>
  4997. </div>
  4998. <div className="clearfix">
  4999. <FormItem
  5000. className="half-item"
  5001. labelCol={{ span: 6 }}
  5002. wrapperCol={{ span: 30 }}
  5003. label="备注"
  5004. >
  5005. <Input
  5006. placeholder="请输入备注"
  5007. style={{ width: 200 }}
  5008. value={this.state.entryRemarks}
  5009. onChange={(e) => {
  5010. this.setState({
  5011. entryRemarks: e.target.value,
  5012. });
  5013. }}
  5014. />
  5015. </FormItem>
  5016. </div>
  5017. <div
  5018. className="clearfix"
  5019. style={{ paddingLeft: 70, marginBottom: 10 }}
  5020. >
  5021. <div style={{ marginBottom: 10 }}>附件:</div>
  5022. <PicModal
  5023. remarks={this.picToArr(this.state.annexName)}
  5024. picUrl={this.picToArr(this.state.annexUrl)}
  5025. remove={this.ruzhiRemove}
  5026. />
  5027. <Button onClick={this.addPic}>添加附件</Button>
  5028. </div>
  5029. <Button
  5030. type="primary"
  5031. shape="round"
  5032. size="large"
  5033. style={{
  5034. position: "relative",
  5035. left: "50%",
  5036. transform: "translateX(-50%)",
  5037. }}
  5038. onClick={this.editRuzi}
  5039. >
  5040. 保存
  5041. </Button>
  5042. <AddPicModal
  5043. cancel={this.addPicModalCancel}
  5044. add={this.add()}
  5045. visible={this.state.addPicModal}
  5046. />
  5047. </Spin>
  5048. </Modal>
  5049. <Modal
  5050. visible={this.state.upgradeVisible}
  5051. footer={null}
  5052. width={800}
  5053. onCancel={() => {
  5054. this.loadData();
  5055. this.upgradeCancel();
  5056. }}
  5057. >
  5058. <Spin spinning={this.state.loading}>
  5059. <h3
  5060. style={{
  5061. textAlign: "center",
  5062. paddingBottom: 10,
  5063. marginBottom: 10,
  5064. }}
  5065. >
  5066. 晋升信息
  5067. </h3>
  5068. <div>
  5069. <div className="clearfix">
  5070. <FormItem
  5071. className="half-item"
  5072. labelCol={{ span: 6 }}
  5073. wrapperCol={{ span: 30 }}
  5074. label="当前职位"
  5075. >
  5076. <Select
  5077. placeholder="选择职位"
  5078. style={{ width: 200, marginRight: 10 }}
  5079. value={this.state.promotionList.oldJobs}
  5080. onChange={(e) => {
  5081. this.setState({ jobs: e, star: [] });
  5082. this.getList();
  5083. this.state.promotionList.oldJobs = e;
  5084. this.state.promotionList.oldLvl = [];
  5085. this.setState({
  5086. promotionList: this.state.promotionList,
  5087. });
  5088. }}
  5089. >
  5090. <Option value="1">员工</Option>
  5091. <Option value="2">试用营销员</Option>
  5092. <Option value="3">试用营销储备经理</Option>
  5093. <Option value="4">营销经理</Option>
  5094. <Option value="5">总监合伙人</Option>
  5095. <Option value="6">技术助理</Option>
  5096. <Option value="7">咨询师</Option>
  5097. <Option value="8">咨询师主管</Option>
  5098. <Option value="9">咨询师经理</Option>
  5099. <Option value="10">高级经理</Option>
  5100. </Select>
  5101. </FormItem>
  5102. <FormItem
  5103. className="half-item"
  5104. labelCol={{ span: 6 }}
  5105. wrapperCol={{ span: 30 }}
  5106. label="当前星级"
  5107. >
  5108. <Select
  5109. placeholder="请选择所属星级"
  5110. style={{ width: 200 }}
  5111. onChange={(e) => {
  5112. this.state.promotionList.oldLvl = e;
  5113. this.setState({
  5114. promotionList: this.state.promotionList,
  5115. });
  5116. }}
  5117. value={this.state.promotionList.oldLvl}
  5118. >
  5119. {this.state.starArr.map((item, index) => {
  5120. return <Option value={item.star}>{item.starName}</Option>;
  5121. })}
  5122. </Select>
  5123. </FormItem>
  5124. </div>
  5125. <div className="clearfix">
  5126. <FormItem
  5127. className="half-item"
  5128. labelCol={{ span: 6 }}
  5129. wrapperCol={{ span: 30 }}
  5130. label="晋升后职位"
  5131. >
  5132. <Select
  5133. placeholder="选择职位"
  5134. style={{ width: 200, marginRight: 10 }}
  5135. value={this.state.promotionList.newJobs}
  5136. onChange={(e) => {
  5137. this.setState({ jobss: e });
  5138. this.getLists();
  5139. this.state.promotionList.newJobs = e;
  5140. this.state.promotionList.newLvl = [];
  5141. this.setState({
  5142. promotionList: this.state.promotionList,
  5143. });
  5144. }}
  5145. >
  5146. <Option value="1">员工</Option>
  5147. <Option value="2">试用营销员</Option>
  5148. <Option value="3">试用营销储备经理</Option>
  5149. <Option value="4">营销经理</Option>
  5150. <Option value="5">总监合伙人</Option>
  5151. <Option value="6">技术助理</Option>
  5152. <Option value="7">咨询师</Option>
  5153. <Option value="8">咨询师主管</Option>
  5154. <Option value="9">咨询师经理</Option>
  5155. <Option value="10">高级经理</Option>
  5156. </Select>
  5157. </FormItem>
  5158. <FormItem
  5159. className="half-item"
  5160. labelCol={{ span: 6 }}
  5161. wrapperCol={{ span: 30 }}
  5162. label="晋升后星级"
  5163. >
  5164. <Select
  5165. placeholder="请选择所属星级"
  5166. style={{ width: 200 }}
  5167. onChange={(e) => {
  5168. this.state.promotionList.newLvl = e;
  5169. this.setState({
  5170. promotionList: this.state.promotionList,
  5171. });
  5172. }}
  5173. value={this.state.promotionList.newLvl}
  5174. >
  5175. {this.state.starArrs.map((item, index) => {
  5176. return <Option value={item.star}>{item.starName}</Option>;
  5177. })}
  5178. </Select>
  5179. </FormItem>
  5180. </div>
  5181. <div className="clearfix">
  5182. <FormItem
  5183. className="half-item"
  5184. labelCol={{ span: 6 }}
  5185. wrapperCol={{ span: 30 }}
  5186. label="晋升时间"
  5187. >
  5188. <DatePicker
  5189. value={
  5190. this.state.promotionList.promotionTimes
  5191. ? moment(this.state.promotionList.promotionTimes)
  5192. : null
  5193. }
  5194. style={{ width: 200 }}
  5195. onChange={(e, t) => {
  5196. this.state.promotionList.promotionTimes = t;
  5197. this.setState({
  5198. promotionList: this.state.promotionList,
  5199. });
  5200. }}
  5201. />
  5202. </FormItem>
  5203. </div>
  5204. <div className="clearfix">
  5205. <FormItem
  5206. className="half-item"
  5207. labelCol={{ span: 6 }}
  5208. wrapperCol={{ span: 30 }}
  5209. label="备注"
  5210. >
  5211. <Input
  5212. placeholder="请输入备注"
  5213. style={{ width: 200 }}
  5214. value={this.state.promotionList.promotionRemarks}
  5215. onChange={(e) => {
  5216. this.state.promotionList.promotionRemarks =
  5217. e.target.value;
  5218. this.setState({
  5219. promotionList: this.state.promotionList,
  5220. });
  5221. }}
  5222. />
  5223. </FormItem>
  5224. </div>
  5225. <div
  5226. className="clearfix"
  5227. style={{ paddingLeft: 70, marginBottom: 10 }}
  5228. >
  5229. <div style={{ marginBottom: 10 }}>附件:</div>
  5230. <PicModal
  5231. remarks={this.picToArr(this.state.promotionList.annexName)}
  5232. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  5233. remove={this.jinshengRemove}
  5234. />
  5235. <Button onClick={this.addPic}>添加附件</Button>
  5236. </div>
  5237. </div>
  5238. <Button
  5239. type="primary"
  5240. shape="round"
  5241. size="large"
  5242. style={{
  5243. position: "relative",
  5244. left: "50%",
  5245. transform: "translateX(-50%)",
  5246. }}
  5247. onClick={this.editUpgrade}
  5248. >
  5249. 保存
  5250. </Button>
  5251. <AddPicModal
  5252. cancel={this.addPicModalCancel}
  5253. add={this.add()}
  5254. visible={this.state.addPicModal}
  5255. />
  5256. </Spin>
  5257. </Modal>
  5258. <Modal
  5259. visible={this.state.contractVisible}
  5260. footer={null}
  5261. width={800}
  5262. onCancel={() => {
  5263. this.loadData();
  5264. this.contractCancel();
  5265. }}
  5266. >
  5267. <Spin spinning={this.state.loading}>
  5268. <h3
  5269. style={{
  5270. textAlign: "center",
  5271. paddingBottom: 10,
  5272. marginBottom: 10,
  5273. }}
  5274. >
  5275. 合同信息
  5276. </h3>
  5277. <div>
  5278. <div className="clearfix">
  5279. <FormItem
  5280. className="half-item"
  5281. labelCol={{ span: 6 }}
  5282. wrapperCol={{ span: 30 }}
  5283. label="签订时间"
  5284. >
  5285. <DatePicker
  5286. value={
  5287. this.state.contractList.startTimes
  5288. ? moment(this.state.contractList.startTimes)
  5289. : null
  5290. }
  5291. style={{ width: 200 }}
  5292. onChange={(e, t) => {
  5293. this.state.contractList.startTimes = t;
  5294. this.setState({
  5295. contractList: this.state.contractList,
  5296. });
  5297. }}
  5298. />
  5299. </FormItem>
  5300. <FormItem
  5301. className="half-item"
  5302. labelCol={{ span: 6 }}
  5303. wrapperCol={{ span: 30 }}
  5304. label="到期时间"
  5305. >
  5306. <DatePicker
  5307. disabledDate={(e) => {
  5308. let time = moment(e).valueOf();
  5309. let today = moment(
  5310. this.state.contractList.startTimes
  5311. ).valueOf();
  5312. if (time <= today) {
  5313. return true;
  5314. } else if (!this.state.contractList.startTimes) {
  5315. return true;
  5316. }
  5317. }}
  5318. value={
  5319. this.state.contractList.endTimes
  5320. ? moment(this.state.contractList.endTimes)
  5321. : null
  5322. }
  5323. style={{ width: 200 }}
  5324. onChange={(e, t) => {
  5325. this.state.contractList.endTimes = t;
  5326. this.setState({
  5327. contractList: this.state.contractList,
  5328. });
  5329. }}
  5330. />
  5331. </FormItem>
  5332. </div>
  5333. <div className="clearfix">
  5334. <FormItem
  5335. className="half-item"
  5336. labelCol={{ span: 6 }}
  5337. wrapperCol={{ span: 30 }}
  5338. label="备注"
  5339. >
  5340. <Input
  5341. placeholder="请输入备注"
  5342. style={{ width: 200 }}
  5343. value={this.state.contractList.contractRemarks}
  5344. onChange={(e) => {
  5345. this.state.contractList.contractRemarks = e.target.value;
  5346. this.setState({
  5347. contractList: this.state.contractList,
  5348. });
  5349. }}
  5350. />
  5351. </FormItem>
  5352. </div>
  5353. <div
  5354. className="clearfix"
  5355. style={{ paddingLeft: 70, marginBottom: 10 }}
  5356. >
  5357. <div style={{ marginBottom: 10 }}>附件:</div>
  5358. <PicModal
  5359. remarks={this.picToArr(this.state.contractList.annexName)}
  5360. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  5361. remove={this.contractRemove}
  5362. />
  5363. <Button onClick={this.addPic}>添加附件</Button>
  5364. </div>
  5365. </div>
  5366. <Button
  5367. type="primary"
  5368. shape="round"
  5369. size="large"
  5370. style={{
  5371. position: "relative",
  5372. left: "50%",
  5373. transform: "translateX(-50%)",
  5374. }}
  5375. onClick={this.editContract}
  5376. >
  5377. 保存
  5378. </Button>
  5379. <AddPicModal
  5380. cancel={this.addPicModalCancel}
  5381. add={this.add()}
  5382. visible={this.state.addPicModal}
  5383. />
  5384. </Spin>
  5385. </Modal>
  5386. <Modal
  5387. visible={this.state.chooseVisible}
  5388. footer={null}
  5389. width={800}
  5390. onCancel={() => {
  5391. this.loadData();
  5392. this.chooseCancel();
  5393. }}
  5394. >
  5395. <Spin spinning={this.state.loading}>
  5396. <h3
  5397. style={{
  5398. textAlign: "center",
  5399. paddingBottom: 10,
  5400. marginBottom: 10,
  5401. }}
  5402. >
  5403. 奖惩信息
  5404. </h3>
  5405. <div>
  5406. <div className="clearfix">
  5407. <FormItem
  5408. className="half-item"
  5409. labelCol={{ span: 6 }}
  5410. wrapperCol={{ span: 30 }}
  5411. label="类型"
  5412. >
  5413. <Radio.Group
  5414. onChange={(e) => {
  5415. this.state.chooseList.chooseStatus = e.target.value;
  5416. this.setState({ chooseList: this.state.chooseList });
  5417. }}
  5418. value={this.state.chooseList.chooseStatus}
  5419. >
  5420. <Radio value={0}>奖励</Radio>
  5421. <Radio value={1}>罚款</Radio>
  5422. </Radio.Group>
  5423. </FormItem>
  5424. <FormItem
  5425. className="half-item"
  5426. labelCol={{ span: 6 }}
  5427. wrapperCol={{ span: 30 }}
  5428. label="时间"
  5429. >
  5430. <DatePicker
  5431. value={
  5432. this.state.chooseList.effectTimes
  5433. ? moment(this.state.chooseList.effectTimes)
  5434. : null
  5435. }
  5436. style={{ width: 200 }}
  5437. onChange={(e, t) => {
  5438. this.state.chooseList.effectTimes = t;
  5439. this.setState({
  5440. chooseList: this.state.chooseList,
  5441. });
  5442. }}
  5443. />
  5444. </FormItem>
  5445. </div>
  5446. <div className="clearfix">
  5447. <FormItem
  5448. className="half-item"
  5449. labelCol={{ span: 6 }}
  5450. wrapperCol={{ span: 30 }}
  5451. label="内容"
  5452. >
  5453. <Input
  5454. placeholder="请输入内容"
  5455. style={{ width: 200 }}
  5456. value={this.state.chooseList.chooseRemarks}
  5457. onChange={(e) => {
  5458. this.state.chooseList.chooseRemarks = e.target.value;
  5459. this.setState({
  5460. chooseList: this.state.chooseList,
  5461. });
  5462. }}
  5463. />
  5464. </FormItem>
  5465. </div>
  5466. <div
  5467. className="clearfix"
  5468. style={{ paddingLeft: 70, marginBottom: 10 }}
  5469. >
  5470. <div style={{ marginBottom: 10 }}>附件:</div>
  5471. <PicModal
  5472. remarks={this.picToArr(this.state.chooseList.annexName)}
  5473. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  5474. remove={this.chooseRemove}
  5475. />
  5476. <Button onClick={this.addPic}>添加附件</Button>
  5477. </div>
  5478. </div>
  5479. <Button
  5480. type="primary"
  5481. shape="round"
  5482. size="large"
  5483. style={{
  5484. position: "relative",
  5485. left: "50%",
  5486. transform: "translateX(-50%)",
  5487. }}
  5488. onClick={this.editChoose}
  5489. >
  5490. 保存
  5491. </Button>
  5492. <AddPicModal
  5493. cancel={this.addPicModalCancel}
  5494. add={this.add()}
  5495. visible={this.state.addPicModal}
  5496. />
  5497. </Spin>
  5498. </Modal>
  5499. <Modal
  5500. visible={this.state.quitVisible}
  5501. footer={null}
  5502. width={800}
  5503. onCancel={() => {
  5504. this.loadData();
  5505. this.quitCancel();
  5506. }}
  5507. >
  5508. <Spin spinning={this.state.loading}>
  5509. <h3
  5510. style={{
  5511. textAlign: "center",
  5512. paddingBottom: 10,
  5513. marginBottom: 10,
  5514. }}
  5515. >
  5516. 离职信息
  5517. </h3>
  5518. <div>
  5519. <div className="clearfix">
  5520. <FormItem
  5521. className="half-item"
  5522. labelCol={{ span: 6 }}
  5523. wrapperCol={{ span: 30 }}
  5524. label="离职时间"
  5525. >
  5526. <DatePicker
  5527. value={
  5528. this.state.quitList.effectTimes
  5529. ? moment(this.state.quitList.effectTimes)
  5530. : null
  5531. }
  5532. style={{ width: 200 }}
  5533. onChange={(e, t) => {
  5534. this.state.quitList.effectTimes = t;
  5535. this.setState({
  5536. quitList: this.state.quitList,
  5537. });
  5538. }}
  5539. />
  5540. </FormItem>
  5541. </div>
  5542. <div className="clearfix">
  5543. <FormItem
  5544. className="half-item"
  5545. labelCol={{ span: 6 }}
  5546. wrapperCol={{ span: 30 }}
  5547. label="备注"
  5548. >
  5549. <Input
  5550. placeholder="请输入备注"
  5551. style={{ width: 200 }}
  5552. value={this.state.quitList.quitRemarks}
  5553. onChange={(e) => {
  5554. this.state.quitList.quitRemarks = e.target.value;
  5555. this.setState({
  5556. quitList: this.state.quitList,
  5557. });
  5558. }}
  5559. />
  5560. </FormItem>
  5561. </div>
  5562. <div
  5563. className="clearfix"
  5564. style={{ paddingLeft: 70, marginBottom: 10 }}
  5565. >
  5566. <div style={{ marginBottom: 10 }}>附件:</div>
  5567. <PicModal
  5568. remarks={this.picToArr(this.state.quitList.annexName)}
  5569. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  5570. remove={this.quitRemove}
  5571. />
  5572. <Button onClick={this.addPic}>添加附件</Button>
  5573. </div>
  5574. </div>
  5575. <Button
  5576. type="primary"
  5577. shape="round"
  5578. size="large"
  5579. style={{
  5580. position: "relative",
  5581. left: "50%",
  5582. transform: "translateX(-50%)",
  5583. }}
  5584. onClick={this.editQuit}
  5585. >
  5586. 保存
  5587. </Button>
  5588. <AddPicModal
  5589. cancel={this.addPicModalCancel}
  5590. add={this.add()}
  5591. visible={this.state.addPicModal}
  5592. />
  5593. </Spin>
  5594. </Modal>
  5595. <Modal
  5596. visible={this.state.welfareVisible}
  5597. footer={null}
  5598. width={800}
  5599. onCancel={() => {
  5600. this.loadData();
  5601. this.welfareCancel();
  5602. }}
  5603. >
  5604. <Spin spinning={this.state.loading}>
  5605. <h3
  5606. style={{
  5607. textAlign: "center",
  5608. paddingBottom: 10,
  5609. }}
  5610. >
  5611. 福利信息
  5612. </h3>
  5613. <Button
  5614. type="primary"
  5615. style={{ marginBottom: 5 }}
  5616. onClick={(e) => {
  5617. this.welfareTable();
  5618. }}
  5619. >
  5620. 新建信息
  5621. </Button>
  5622. <div>
  5623. <div className="clearfix" style={{ marginBottom: 10 }}>
  5624. <Table
  5625. columns={this.state.welfareColumnsEdit}
  5626. type="textarea"
  5627. dataSource={this.state.ModalData.welfareList}
  5628. pagination={false}
  5629. bordered
  5630. size="small"
  5631. scroll={{ x: "max-content", y: 0 }}
  5632. />
  5633. </div>
  5634. <div className="clearfix">
  5635. <FormItem
  5636. className="half-item"
  5637. labelCol={{ span: 6 }}
  5638. wrapperCol={{ span: 30 }}
  5639. label="备注"
  5640. >
  5641. <Input
  5642. placeholder="请输入备注"
  5643. style={{ width: 200 }}
  5644. value={this.state.ModalData.welfareRemarks}
  5645. onChange={(e) => {
  5646. this.state.ModalData.welfareRemarks = e.target.value;
  5647. this.setState({
  5648. ModalData: this.state.ModalData,
  5649. });
  5650. }}
  5651. />
  5652. </FormItem>
  5653. </div>
  5654. <div
  5655. className="clearfix"
  5656. style={{ paddingLeft: 70, marginBottom: 10 }}
  5657. >
  5658. <div style={{ marginBottom: 10 }}>附件:</div>
  5659. <PicModal
  5660. remarks={this.picToArr(this.state.ModalData.welfareAnnexName)}
  5661. picUrl={this.picToArr(this.state.ModalData.welfareAnnexUrl)}
  5662. remove={this.welfareRemove}
  5663. />
  5664. <Button onClick={this.addPic}>添加附件</Button>
  5665. </div>
  5666. </div>
  5667. <Button
  5668. type="primary"
  5669. shape="round"
  5670. size="large"
  5671. style={{
  5672. position: "relative",
  5673. left: "50%",
  5674. transform: "translateX(-50%)",
  5675. }}
  5676. onClick={this.editWelfare}
  5677. >
  5678. 保存
  5679. </Button>
  5680. <AddPicModal
  5681. cancel={this.addPicModalCancel}
  5682. add={this.add()}
  5683. visible={this.state.addPicModal}
  5684. />
  5685. </Spin>
  5686. </Modal>
  5687. <Modal
  5688. visible={this.state.editWelfareVisible}
  5689. footer={null}
  5690. width={800}
  5691. onCancel={() => {
  5692. this.setState({
  5693. editWelfareVisible: false,
  5694. });
  5695. }}
  5696. >
  5697. <Spin spinning={this.state.loading}>
  5698. <div>
  5699. <div className="clearfix">
  5700. <FormItem
  5701. className="half-item"
  5702. labelCol={{ span: 6 }}
  5703. wrapperCol={{ span: 30 }}
  5704. label="福利类型"
  5705. >
  5706. <Select
  5707. placeholder="请选择类型"
  5708. value={this.state.editWelfareData.type}
  5709. onChange={(e) => {
  5710. this.state.editWelfareData.type = e;
  5711. this.setState({
  5712. editWelfareData: this.state.editWelfareData,
  5713. });
  5714. }}
  5715. style={{ width: 120, marginRight: 10 }}
  5716. >
  5717. <Option value={0}>社保</Option>
  5718. <Option value={1}>公积金</Option>
  5719. <Option value={2}>雇主险</Option>
  5720. </Select>
  5721. </FormItem>
  5722. <FormItem
  5723. className="half-item"
  5724. labelCol={{ span: 6 }}
  5725. wrapperCol={{ span: 30 }}
  5726. label="福利状态"
  5727. >
  5728. <Select
  5729. placeholder="请选择状态"
  5730. onChange={(e) => {
  5731. this.state.editWelfareData.status = e;
  5732. this.setState({
  5733. editWelfareData: this.state.editWelfareData,
  5734. });
  5735. }}
  5736. style={{ width: 120, marginRight: 10 }}
  5737. value={this.state.editWelfareData.status}
  5738. >
  5739. <Option value={0}>未购买</Option>
  5740. <Option value={1}>已购买</Option>
  5741. <Option value={2}>已停止</Option>
  5742. </Select>
  5743. </FormItem>
  5744. </div>
  5745. <div className="clearfix">
  5746. <FormItem
  5747. className="half-item"
  5748. labelCol={{ span: 6 }}
  5749. wrapperCol={{ span: 30 }}
  5750. style={{
  5751. display:
  5752. this.state.editWelfareData.status == 1 ? "block" : "none",
  5753. }}
  5754. label="购买时间"
  5755. >
  5756. <DatePicker
  5757. value={
  5758. this.state.editWelfareData.startTimes
  5759. ? moment(this.state.editWelfareData.startTimes)
  5760. : null
  5761. }
  5762. style={{ width: 200 }}
  5763. onChange={(e, t) => {
  5764. this.state.editWelfareData.startTimes = t;
  5765. this.setState({
  5766. editWelfareData: this.state.editWelfareData,
  5767. });
  5768. }}
  5769. />
  5770. </FormItem>
  5771. <FormItem
  5772. className="half-item"
  5773. labelCol={{ span: 6 }}
  5774. wrapperCol={{ span: 30 }}
  5775. style={{
  5776. display:
  5777. this.state.editWelfareData.status == 2 ? "block" : "none",
  5778. }}
  5779. label="停缴时间"
  5780. >
  5781. <DatePicker
  5782. value={
  5783. this.state.editWelfareData.endTimes
  5784. ? moment(this.state.editWelfareData.endTimes)
  5785. : null
  5786. }
  5787. style={{ width: 200 }}
  5788. onChange={(e, t) => {
  5789. this.state.editWelfareData.endTimes = t;
  5790. this.setState({
  5791. editWelfareData: this.state.editWelfareData,
  5792. });
  5793. }}
  5794. />
  5795. </FormItem>
  5796. </div>
  5797. <div className="clearfix">
  5798. <FormItem
  5799. className="half-item"
  5800. labelCol={{ span: 6 }}
  5801. wrapperCol={{ span: 30 }}
  5802. style={{
  5803. display:
  5804. this.state.editWelfareData.status == 1 ? "block" : "none",
  5805. }}
  5806. label="参保公司"
  5807. >
  5808. <Select
  5809. placeholder="选择公司"
  5810. style={{ width: 200, marginRight: 10 }}
  5811. value={
  5812. this.state.editWelfareData.depId
  5813. ? this.state.editWelfareData.depId
  5814. : undefined
  5815. }
  5816. onChange={(e) => {
  5817. this.state.editWelfareData.depId = e;
  5818. this.setState({
  5819. editWelfareData: this.state.editWelfareData,
  5820. });
  5821. }}
  5822. >
  5823. {departmentArr.map(function (item) {
  5824. return (
  5825. <Select.Option key={item.id}>{item.name}</Select.Option>
  5826. );
  5827. })}
  5828. </Select>
  5829. </FormItem>
  5830. </div>
  5831. <div className="clearfix">
  5832. <FormItem
  5833. className="half-item"
  5834. labelCol={{ span: 6 }}
  5835. wrapperCol={{ span: 30 }}
  5836. style={{
  5837. display:
  5838. this.state.editWelfareData.status == 0 ? "block" : "none",
  5839. }}
  5840. label="未购买备注"
  5841. >
  5842. <Input
  5843. placeholder="请输入备注信息"
  5844. style={{ width: 200 }}
  5845. value={this.state.editWelfareData.welfareRemarks}
  5846. onChange={(e) => {
  5847. this.state.editWelfareData.welfareRemarks =
  5848. e.target.value;
  5849. this.setState({
  5850. editWelfareData: this.state.editWelfareData,
  5851. });
  5852. }}
  5853. />
  5854. </FormItem>
  5855. </div>
  5856. </div>
  5857. <Button
  5858. type="primary"
  5859. shape="round"
  5860. size="large"
  5861. style={{
  5862. position: "relative",
  5863. left: "50%",
  5864. transform: "translateX(-50%)",
  5865. }}
  5866. onClick={this.editWelfareDataOk}
  5867. >
  5868. 保存
  5869. </Button>
  5870. </Spin>
  5871. </Modal>
  5872. </div>
  5873. );
  5874. },
  5875. });
  5876. export default PersonnelAll;