personnelAll.jsx 120 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "@/manageCenter/financialManage/distribute/public.less";
  5. import { ChooseList } from "../../order/orderNew/chooseList";
  6. import { citySelect, provinceList, areaSelect, Birthplace } from "@/areaList";
  7. import "./personnelList.less"
  8. import {
  9. Button,
  10. Form,
  11. Input,
  12. Select,
  13. Spin,
  14. Table,
  15. message,
  16. Modal,
  17. Tabs,
  18. Tag,
  19. RangePicker,
  20. DatePicker,
  21. Radio,
  22. Cascader,
  23. Upload,
  24. Tooltip,
  25. } from "antd";
  26. import { splitUrl } from "@/tools";
  27. import { getProvinceList } from "@/addressList";
  28. import PicModal from "./picModal"
  29. import AddPicModal from "./addPicModal";
  30. const FormItem = Form.Item;
  31. const { TabPane } = Tabs;
  32. const { TextArea } = Input;
  33. const PersonnelAll = React.createClass({
  34. loadData(pageNo) {
  35. this.state.data = [];
  36. this.setState({
  37. loading: true,
  38. });
  39. $.ajax({
  40. method: "get",
  41. dataType: "json",
  42. crossDomain: false,
  43. url: globalConfig.context + "/api/admin/personnel/selectList",
  44. data: {
  45. pageNo: pageNo || 1,
  46. pageSize: this.state.pagination.pageSize,
  47. name: this.state.nameSearch,
  48. status: this.state.nameSearch,
  49. company: this.state.nameSearch,
  50. sex: this.state.nameSearch,
  51. marriage: this.state.nameSearch,
  52. politicalOutlook: this.state.nameSearch,
  53. birthdayMonth: this.state.nameSearch,
  54. promotionStart: this.state.promotionTime[0],
  55. promotionEnd: this.state.promotionTime[1],
  56. entryStart: this.state.entryTime[0],
  57. entryStart: this.state.entryTime[1],
  58. quitStart: this.state.quitTime[0],
  59. quitEnd: this.state.quitTime[1],
  60. system: this.state.systemSearch,
  61. workingYears: this.state.workingYearsSearch,
  62. education: this.state.educationSearch,
  63. contractStart: this.state.contractTime[0],
  64. contractEnd: this.state.contractTime[1],
  65. },
  66. success: function (data) {
  67. let theArr = [];
  68. if (!data.data || !data.data.list) {
  69. if (data.error && data.error.length) {
  70. message.warning(data.error[0].message);
  71. }
  72. } else {
  73. for (let i = 0; i < data.data.list.length; i++) {
  74. let thisdata = data.data.list[i];
  75. thisdata.key = thisdata.id;
  76. theArr.push(thisdata);
  77. }
  78. }
  79. this.state.pagination.current = data.data.pageNo;
  80. this.state.pagination.total = data.data.totalCount;
  81. if (data.data && data.data.list && !data.data.list.length) {
  82. this.state.pagination.current = 0;
  83. this.state.pagination.total = 0;
  84. }
  85. this.setState({
  86. dataSource: theArr,
  87. pagination: this.state.pagination,
  88. });
  89. }.bind(this),
  90. }).always(
  91. function () {
  92. this.setState({
  93. loading: false,
  94. });
  95. }.bind(this)
  96. );
  97. },
  98. getInitialState() {
  99. return {
  100. contractList: [],
  101. quitList: [],
  102. chooseList: [],
  103. starArr: [],
  104. starArrs: [],
  105. annexName: "",
  106. annexUrl: "",
  107. voucherUrl: [],
  108. ModalData: [],
  109. contractTime: [],
  110. contactList: [],
  111. quitTime: [],
  112. promotionList: [],
  113. promotionTime: [],
  114. entryTime: [],
  115. pic: [],
  116. previewImage: "",
  117. peoVisible: false,
  118. phoneVisible: false,
  119. isAddPeo: false,
  120. searchMore: true,
  121. stayVisible: false,
  122. assignVisible: false,
  123. releaseDate: [],
  124. residence: [],
  125. nativePlace: [],
  126. now: [],
  127. roleName: "",
  128. shouKuanDate: [],
  129. boHuivisible: false,
  130. departmentArr: [],
  131. selectedRowKeys: [],
  132. selectedRows: [],
  133. paginations: false,
  134. loading: false,
  135. pagination: {
  136. defaultCurrent: 1,
  137. defaultPageSize: 10,
  138. showQuickJumper: true,
  139. pageSize: 10,
  140. onChange: function (page) {
  141. this.loadData(page);
  142. }.bind(this),
  143. showTotal: function (total) {
  144. return "共" + total + "条数据";
  145. },
  146. },
  147. columns: [
  148. {
  149. title: "人事编号",
  150. dataIndex: "id",
  151. key: "id",
  152. },
  153. {
  154. title: "门禁编号",
  155. dataIndex: "doorId",
  156. key: "doorId",
  157. },
  158. {
  159. title: "名称",
  160. dataIndex: "name",
  161. key: "name",
  162. },
  163. {
  164. title: "员工状态",
  165. dataIndex: "statusName",
  166. key: "statusName",
  167. },
  168. {
  169. title: "所属系统",
  170. dataIndex: "systemName",
  171. key: "systemName",
  172. },
  173. {
  174. title: "公司名称",
  175. dataIndex: "depName",
  176. key: "depName",
  177. },
  178. {
  179. title: "职位名称",
  180. dataIndex: "jobsName",
  181. key: "jobsName",
  182. },
  183. {
  184. title: "等级名称",
  185. dataIndex: "starName",
  186. key: "starName",
  187. },
  188. {
  189. title: "入职时间",
  190. dataIndex: "entryTimes",
  191. key: "entryTimes",
  192. },
  193. {
  194. title: "转正时间",
  195. dataIndex: "promotionTimes",
  196. key: "promotionTimes",
  197. },
  198. {
  199. title: "生日日期",
  200. dataIndex: "birthdays",
  201. key: "birthdays",
  202. },
  203. {
  204. title: "性别",
  205. dataIndex: "sex",
  206. key: "sex",
  207. render: (text) => {
  208. if (text == 0) {
  209. return "男";
  210. } else if (text == 1) {
  211. return "女";
  212. }
  213. },
  214. },
  215. {
  216. title: "婚姻状态",
  217. dataIndex: "marriageName",
  218. key: "marriageName",
  219. },
  220. {
  221. title: "子/女",
  222. dataIndex: "son",
  223. key: "son",
  224. render: (text, record) => {
  225. return <span>{text + "/" + record.girl}</span>;
  226. },
  227. },
  228. {
  229. title: "政治面貌",
  230. dataIndex: "politicalOutlookName",
  231. key: "politicalOutlookName",
  232. },
  233. {
  234. title: "教育经历",
  235. dataIndex: "educationName",
  236. key: "educationName",
  237. },
  238. {
  239. title: "毕业学校",
  240. dataIndex: "school",
  241. key: "school",
  242. },
  243. {
  244. title: "专业",
  245. dataIndex: "major",
  246. key: "major",
  247. },
  248. {
  249. title: "职称",
  250. dataIndex: "title",
  251. key: "title",
  252. },
  253. {
  254. title: "晋升备注",
  255. dataIndex: "promotionRemarks",
  256. key: "promotionRemarks",
  257. },
  258. {
  259. title: "晋升时间",
  260. dataIndex: "promotionTime",
  261. key: "promotionTime",
  262. },
  263. {
  264. title: "合同时间",
  265. dataIndex: "contractStart",
  266. key: "contractStart",
  267. render: (text, record) => {
  268. if (text) {
  269. return text + "~" + record.contractEnd;
  270. }
  271. },
  272. },
  273. {
  274. title: "手机号码",
  275. dataIndex: "mobile",
  276. key: "mobile",
  277. },
  278. {
  279. title: "电话",
  280. dataIndex: "fixedTel",
  281. key: "fixedTel",
  282. },
  283. {
  284. title: "身份证",
  285. dataIndex: "idCard",
  286. key: "idCard",
  287. },
  288. {
  289. title: "发证机构",
  290. dataIndex: "certificationAuthority",
  291. key: "certificationAuthority",
  292. },
  293. {
  294. title: "户籍地址",
  295. dataIndex: "residenceName",
  296. key: "residenceName",
  297. },
  298. {
  299. title: "籍贯",
  300. dataIndex: "nativePlaceName",
  301. key: "nativePlaceName",
  302. },
  303. {
  304. title: "现住地址",
  305. dataIndex: "nowName",
  306. key: "nowName",
  307. },
  308. {
  309. title: "离职时间",
  310. dataIndex: "quitTime",
  311. key: "quitTime",
  312. },
  313. {
  314. title: "工作年限",
  315. dataIndex: "workingYear",
  316. key: "workingYear",
  317. },
  318. {
  319. title: "年龄",
  320. dataIndex: "age",
  321. key: "age",
  322. },
  323. {
  324. title: "出生月份",
  325. dataIndex: "month",
  326. key: "month",
  327. },
  328. {
  329. title: "参保时间",
  330. dataIndex: "insuranceStartTimes",
  331. key: "insuranceStartTimes",
  332. },
  333. {
  334. title: "停保时间",
  335. dataIndex: "insuranceEndTimes",
  336. key: "insuranceEndTimes",
  337. },
  338. {
  339. title: "公积金时间",
  340. dataIndex: "fundStartTimes",
  341. key: "fundStartTimes",
  342. },
  343. {
  344. title: "停办公积金时间",
  345. dataIndex: "fundEndTimes",
  346. key: "fundEndTimes",
  347. },
  348. ],
  349. dataSource: [],
  350. resVisible: false,
  351. table: [
  352. {
  353. key: "员工编号",
  354. value: "id",
  355. },
  356. {
  357. key: "姓名",
  358. value: "name",
  359. },
  360. {
  361. key: "出生日期",
  362. value: "birthdays",
  363. },
  364. {
  365. key: "出生月份",
  366. value: "month",
  367. },
  368. {
  369. key: "门禁编号",
  370. value: "doorId",
  371. },
  372. {
  373. key: "性别",
  374. value: "sex",
  375. render: (e) => {
  376. if (e == 0) {
  377. return "男";
  378. } else if (e == 1) {
  379. return "女";
  380. }
  381. },
  382. },
  383. {
  384. key: "年龄",
  385. value: "age",
  386. },
  387. {
  388. key: "民族",
  389. value: "nation",
  390. },
  391. {
  392. key: "户籍地址",
  393. value: "residenceName",
  394. },
  395. {
  396. key: "籍贯",
  397. value: "nativePlaceName",
  398. },
  399. {
  400. key: "身份证",
  401. value: "idCard",
  402. },
  403. {
  404. key: "领证机关",
  405. value: "certificationAuthority",
  406. },
  407. {
  408. key: "现住地址",
  409. value: "nowName",
  410. },
  411. {
  412. key: "婚姻状态",
  413. value: "marriageName",
  414. },
  415. {
  416. key: "子/女",
  417. value: "son",
  418. render: (e, i) => {
  419. return e + "/" + i;
  420. },
  421. },
  422. {
  423. key: "政治面貌",
  424. value: "politicalOutlookName",
  425. },
  426. ],
  427. };
  428. },
  429. /* 分派 */
  430. evaluate(record, nub) {
  431. this.state.assignData = record;
  432. this.setState(
  433. {
  434. nub,
  435. },
  436. () => {
  437. this.setState({
  438. assignVisible: true,
  439. });
  440. }
  441. );
  442. },
  443. componentWillMount() {
  444. let areaArr = getProvinceList();
  445. let Area = areaSelect(areaArr);
  446. let Birthplaces = Birthplace(areaArr);
  447. this.setState({
  448. Area,
  449. Birthplaces: Birthplaces,
  450. });
  451. //城市
  452. let Province = [];
  453. areaArr.map(function (item) {
  454. var id = String(item.id);
  455. Province.push(
  456. <Select.Option value={id} key={item.name}>
  457. {item.name}
  458. </Select.Option>
  459. );
  460. });
  461. this.state.Provinces = Province;
  462. this.loadData();
  463. this.departmentList();
  464. },
  465. departmentList() {
  466. $.ajax({
  467. method: "get",
  468. dataType: "json",
  469. crossDomain: false,
  470. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  471. data: {},
  472. success: function (data) {
  473. let thedata = data.data;
  474. let theArr = [];
  475. if (!thedata) {
  476. if (data.error && data.error.length) {
  477. message.warning(data.error[0].message);
  478. }
  479. } else {
  480. thedata.map(function (item, index) {
  481. theArr.push({
  482. key: index,
  483. name: item.name,
  484. id: item.id,
  485. });
  486. });
  487. }
  488. this.setState({
  489. departmentArr: theArr,
  490. });
  491. }.bind(this),
  492. });
  493. },
  494. changeList(arr) {
  495. const newArr = [];
  496. this.state.columns.forEach((item) => {
  497. arr.forEach((val) => {
  498. if (val === item.title) {
  499. newArr.push(item);
  500. }
  501. });
  502. });
  503. this.setState({
  504. changeList: newArr,
  505. });
  506. },
  507. addPeo() {
  508. this.setState({
  509. peoVisible: true,
  510. isAddPeo: true,
  511. });
  512. },
  513. addPeoCancel() {
  514. this.setState({
  515. peoVisible: false,
  516. isAddPeo: false,
  517. name: undefined,
  518. doorId: undefined,
  519. sex: undefined,
  520. nation: undefined,
  521. residence: [],
  522. residenceAddress: undefined,
  523. nativePlace: [],
  524. now: [],
  525. nowAddress: undefined,
  526. idCard: undefined,
  527. certificationAuthority: undefined,
  528. marriage: undefined,
  529. politicalOutlook: undefined,
  530. son: undefined,
  531. girl: undefined,
  532. birthdays: undefined,
  533. marriage: undefined,
  534. });
  535. },
  536. addOk() {
  537. this.setState({
  538. loading: true,
  539. });
  540. $.ajax({
  541. method: "post",
  542. dataType: "json",
  543. crossDomain: false,
  544. url: globalConfig.context + "/api/admin/personnel/add",
  545. data: {
  546. name: this.state.name,
  547. doorId: this.state.doorId,
  548. sex: this.state.sex,
  549. nation: this.state.nation,
  550. residenceProvince: this.state.residence[0],
  551. residenceCity: this.state.residence[1],
  552. residenceArea: this.state.residence[2],
  553. residenceAddress: this.state.residenceAddress,
  554. nativePlaceProvince: this.state.nativePlace[0],
  555. nativePlaceCity: this.state.nativePlace[1],
  556. nowProvince: this.state.now[0],
  557. nowCity: this.state.now[1],
  558. nowArea: this.state.now[2],
  559. nowAddress: this.state.nowAddress,
  560. idCard: this.state.idCard,
  561. certificationAuthority: this.state.certificationAuthority,
  562. marriage: this.state.marriage,
  563. politicalOutlook: this.state.politicalOutlook,
  564. son: this.state.son,
  565. girl: this.state.girl,
  566. birthdays: this.state.birthdays,
  567. marriage: this.state.marriage,
  568. },
  569. success: function (data) {
  570. let theArr = [];
  571. if (data.error && data.error.length) {
  572. message.warning(data.error[0].message);
  573. } else {
  574. message.success("添加成功!");
  575. this.loadData();
  576. this.addPeoCancel();
  577. }
  578. }.bind(this),
  579. }).always(
  580. function () {
  581. this.setState({
  582. loading: false,
  583. });
  584. }.bind(this)
  585. );
  586. },
  587. editPeo() {},
  588. stayModal(id) {
  589. this.setState({
  590. stayVisible: true,
  591. });
  592. this.setState({
  593. loading: true,
  594. });
  595. $.ajax({
  596. method: "get",
  597. dataType: "json",
  598. crossDomain: false,
  599. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  600. data: {
  601. id: id,
  602. },
  603. success: function (data) {
  604. let res = data.data;
  605. let theArr = [];
  606. if (data.error && data.error.length) {
  607. message.warning(data.error[0].message);
  608. } else {
  609. this.setState({
  610. id: res.id,
  611. status: res.status + "",
  612. system: res.system + "",
  613. jobNature: res.jobNature,
  614. jobNatureRemarks: res.jobNatureRemarks,
  615. age: res.age,
  616. entryTimes: res.entryTimes,
  617. promotionTimes: res.promotionTimes,
  618. company: res.company,
  619. lvl: res.lvl ? res.lvl + "" : [],
  620. jobs: res.jobs ? res.jobs + "" : [],
  621. star: res.star ? res.star + "" : [],
  622. allowance: res.allowance,
  623. });
  624. this.getList();
  625. }
  626. }.bind(this),
  627. }).always(
  628. function () {
  629. this.setState({
  630. loading: false,
  631. });
  632. }.bind(this)
  633. );
  634. },
  635. stayCancel() {
  636. this.setState({
  637. stayVisible: false,
  638. });
  639. },
  640. editStay() {
  641. if (this.state.star == "" || this.state.star == undefined) {
  642. message.warning("请选择星级");
  643. return;
  644. }
  645. this.setState({
  646. loading: true,
  647. });
  648. $.ajax({
  649. method: "post",
  650. dataType: "json",
  651. crossDomain: false,
  652. url: globalConfig.context + "/api/admin/personnel/update",
  653. data: {
  654. id: this.state.id,
  655. status: this.state.status,
  656. system: this.state.system,
  657. jobNature: this.state.jobNature,
  658. jobNatureRemarks: this.state.jobNatureRemarks,
  659. entryTimes: this.state.entryTimes,
  660. promotionTimes: this.state.promotionTimes,
  661. company: this.state.company,
  662. lvl: this.state.lvl,
  663. jobs: this.state.jobs,
  664. star: this.state.star,
  665. allowance: this.state.allowance,
  666. },
  667. success: function (data) {
  668. let res = data.data;
  669. let theArr = [];
  670. if (data.error && data.error.length) {
  671. message.warning(data.error[0].message);
  672. } else {
  673. this.setState({
  674. stayVisible: false,
  675. });
  676. this.tableRowClick(this.state.ModalData);
  677. message.success("提交成功");
  678. }
  679. }.bind(this),
  680. }).always(
  681. function () {
  682. this.setState({
  683. loading: false,
  684. });
  685. }.bind(this)
  686. );
  687. },
  688. phoneModal() {
  689. let obj = [
  690. {
  691. id: undefined,
  692. pdid: this.state.ModalData.id,
  693. emergencyContact: "",
  694. emergencyMobile: "",
  695. },
  696. {
  697. id: undefined,
  698. pdid: this.state.ModalData.id,
  699. emergencyContact: "",
  700. emergencyMobile: "",
  701. },
  702. {
  703. id: undefined,
  704. pdid: this.state.ModalData.id,
  705. emergencyContact: "",
  706. emergencyMobile: "",
  707. },
  708. ];
  709. this.setState({
  710. phoneVisible: true,
  711. id: this.state.ModalData.id,
  712. mobile: this.state.ModalData.mobile,
  713. fixedTel: this.state.ModalData.fixedTel,
  714. contactList: this.state.ModalData.contactList.length
  715. ? JSON.parse(JSON.stringify(this.state.ModalData.contactList))
  716. : obj,
  717. });
  718. },
  719. phoneCancel() {
  720. this.setState({
  721. phoneVisible: false,
  722. });
  723. },
  724. editPhone() {
  725. this.setState({
  726. loading: true,
  727. });
  728. $.ajax({
  729. method: "post",
  730. dataType: "json",
  731. crossDomain: false,
  732. url: globalConfig.context + "/api/admin/personnel/updateContact",
  733. data: {
  734. id: this.state.id,
  735. mobile: this.state.mobile,
  736. fixedTel: this.state.fixedTel,
  737. contactList: JSON.stringify(this.state.contactList),
  738. },
  739. success: function (data) {
  740. let theArr = [];
  741. if (data.error && data.error.length) {
  742. message.warning(data.error[0].message);
  743. } else {
  744. this.loadData();
  745. this.phoneCancel();
  746. this.tableRowClick(this.state.ModalData);
  747. message.success("修改成功");
  748. }
  749. }.bind(this),
  750. }).always(
  751. function () {
  752. this.setState({
  753. loading: false,
  754. });
  755. }.bind(this)
  756. );
  757. },
  758. entryModal() {
  759. this.setState({
  760. entryVisible: true,
  761. });
  762. this.setState({
  763. loading: true,
  764. });
  765. $.ajax({
  766. method: "get",
  767. dataType: "json",
  768. crossDomain: false,
  769. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  770. data: {
  771. id: this.state.ModalData.id,
  772. },
  773. success: function (data) {
  774. let theArr = [];
  775. if (data.error && data.error.length) {
  776. message.warning(data.error[0].message);
  777. } else {
  778. this.setState({
  779. id: data.data.personnelEntry ? data.data.personnelEntry.id : "",
  780. school: data.data.personnelEntry
  781. ? data.data.personnelEntry.school
  782. : "",
  783. education: data.data.personnelEntry
  784. ? data.data.personnelEntry.education
  785. : "",
  786. major: data.data.personnelEntry
  787. ? data.data.personnelEntry.major
  788. : "",
  789. title: data.data.personnelEntry
  790. ? data.data.personnelEntry.title
  791. : "",
  792. entryRemarks: data.data.personnelEntry
  793. ? data.data.personnelEntry.entryRemarks
  794. : "",
  795. annexUrl: data.data.personnelEntry
  796. ? data.data.personnelEntry.annexUrl
  797. ? data.data.personnelEntry.annexUrl
  798. : ""
  799. : "",
  800. annexName: data.data.personnelEntry
  801. ? data.data.personnelEntry.annexName
  802. ? data.data.personnelEntry.annexName
  803. : ""
  804. : "",
  805. });
  806. // }
  807. }
  808. }.bind(this),
  809. }).always(
  810. function () {
  811. this.setState({
  812. loading: false,
  813. });
  814. }.bind(this)
  815. );
  816. },
  817. entryCancel() {
  818. this.tableRowClick(this.state.ModalData);
  819. this.setState({
  820. entryVisible: false,
  821. });
  822. },
  823. cancel() {
  824. this.setState({
  825. visible: false,
  826. });
  827. },
  828. tableRowClick(record) {
  829. this.setState({
  830. visible: true,
  831. id: record.id,
  832. });
  833. this.setState({
  834. loading: true,
  835. });
  836. $.ajax({
  837. method: "get",
  838. dataType: "json",
  839. crossDomain: false,
  840. url: globalConfig.context + "/api/admin/personnel/selectBypdId",
  841. data: {
  842. id: record.id,
  843. },
  844. success: function (data) {
  845. let theArr = [];
  846. if (data.error && data.error.length) {
  847. message.warning(data.error[0].message);
  848. } else {
  849. this.setState({
  850. ModalData: data.data,
  851. });
  852. }
  853. }.bind(this),
  854. }).always(
  855. function () {
  856. this.setState({
  857. loading: false,
  858. });
  859. }.bind(this)
  860. );
  861. },
  862. search() {
  863. this.loadData();
  864. },
  865. addPic() {
  866. this.setState({
  867. addPicModal: true,
  868. });
  869. },
  870. addPicModalCancel() {
  871. this.setState({
  872. addPicModal: false,
  873. });
  874. },
  875. getVoucherUrl(e) {
  876. this.setState({
  877. voucherUrl: e,
  878. });
  879. },
  880. add() {
  881. if (this.state.entryVisible) {
  882. return this.addRuzhi;
  883. } else if (this.state.upgradeVisible) {
  884. return this.addJinsheng;
  885. } else if (this.state.contractVisible) {
  886. return this.addContract;
  887. } else if (this.state.chooseVisible) {
  888. return this.addChoose;
  889. } else if (this.state.quitVisible) {
  890. return this.addQuit
  891. }
  892. },
  893. addRuzhi(e, i) {
  894. this.setState({
  895. addPicModal: false,
  896. });
  897. if (this.state.annexUrl.length > 0) {
  898. this.state.annexUrl += "," + e;
  899. this.state.annexName += "," + i;
  900. } else {
  901. this.state.annexUrl += e;
  902. this.state.annexName += i;
  903. }
  904. this.setState({
  905. annexUrl: this.state.annexUrl,
  906. annexName: this.state.annexName,
  907. });
  908. },
  909. addJinsheng(e, i) {
  910. this.setState({
  911. addPicModal: false,
  912. });
  913. if (
  914. this.state.promotionList.annexUrl &&
  915. this.state.promotionList.annexUrl.length > 0
  916. ) {
  917. this.state.promotionList.annexUrl += "," + e;
  918. this.state.promotionList.annexName += "," + i;
  919. } else {
  920. this.state.promotionList.annexUrl = e;
  921. this.state.promotionList.annexName = i;
  922. }
  923. this.setState({
  924. promotionList: this.state.promotionList,
  925. });
  926. },
  927. addContract(e, i) {
  928. this.setState({
  929. addPicModal: false,
  930. });
  931. if (
  932. this.state.contractList.annexUrl &&
  933. this.state.contractList.annexUrl.length > 0
  934. ) {
  935. this.state.contractList.annexUrl += "," + e;
  936. this.state.contractList.annexName += "," + i;
  937. } else {
  938. this.state.contractList.annexUrl = e;
  939. this.state.contractList.annexName = i;
  940. }
  941. this.setState({
  942. contractList: this.state.contractList,
  943. });
  944. },
  945. addChoose(e, i) {
  946. this.setState({
  947. addPicModal: false,
  948. });
  949. if (
  950. this.state.chooseList.annexUrl &&
  951. this.state.chooseList.annexUrl.length > 0
  952. ) {
  953. this.state.chooseList.annexUrl += "," + e;
  954. this.state.chooseList.annexName += "," + i;
  955. } else {
  956. this.state.chooseList.annexUrl = e;
  957. this.state.chooseList.annexName = i;
  958. }
  959. this.setState({
  960. chooseList: this.state.chooseList,
  961. });
  962. },
  963. addQuit(e, i) {
  964. this.setState({
  965. addPicModal: false,
  966. });
  967. if (
  968. this.state.quitList.annexUrl &&
  969. this.state.quitList.annexUrl.length > 0
  970. ) {
  971. this.state.quitList.annexUrl += "," + e;
  972. this.state.quitList.annexName += "," + i;
  973. } else {
  974. this.state.quitList.annexUrl = e;
  975. this.state.quitList.annexName = i;
  976. }
  977. this.setState({
  978. quitList: this.state.quitList,
  979. });
  980. },
  981. reset() {
  982. this.state.nameSearch = undefined;
  983. this.state.statusSearch = undefined;
  984. this.state.departmenttList = undefined;
  985. this.state.sexSearch = undefined;
  986. this.state.marriageSearch = undefined;
  987. this.state.politicalOutlookSearch = undefined;
  988. this.state.birthdayMonthSearch = undefined;
  989. this.state.systemSearch = undefined;
  990. this.state.workingYearsSearch = undefined;
  991. this.state.educationSearch = undefined;
  992. this.state.promotionTime = [];
  993. this.state.entryTime = [];
  994. this.state.quitTime = [];
  995. this.state.contractTime = [];
  996. this.loadData();
  997. },
  998. peoStatus(e) {
  999. if (e == 0) {
  1000. return "在职(试用期)";
  1001. } else if (e == 1) {
  1002. return "在职(正式工)";
  1003. } else if (e == 2) {
  1004. return "离职";
  1005. }
  1006. },
  1007. jobStatus(e, i) {
  1008. if (e == 0) {
  1009. return "全职";
  1010. } else if (e == 1) {
  1011. return "兼职";
  1012. } else if (e == 2) {
  1013. return i;
  1014. }
  1015. },
  1016. educationStatus(e) {
  1017. if (e == 0) {
  1018. return "高中/中专";
  1019. } else if (e == 1) {
  1020. return "专科/高职";
  1021. } else if (e == 2) {
  1022. return "本科";
  1023. } else if (e == 3) {
  1024. return "研究生";
  1025. } else if (e == 5) {
  1026. return "博士";
  1027. }
  1028. },
  1029. picToArr(e) {
  1030. if (!e) return [];
  1031. let arr = e.split(",");
  1032. return arr;
  1033. },
  1034. ruzhiRemove(e) {
  1035. let url = e.file.response.data;
  1036. let arr = this.state.annexUrl.split(",");
  1037. let arrName = this.state.annexName.split(",");
  1038. let num = "";
  1039. arr.forEach((item, index) => {
  1040. if (item == url) {
  1041. arr.splice(index, 1);
  1042. num = index;
  1043. }
  1044. });
  1045. arrName.splice(num, 1);
  1046. this.setState({
  1047. annexUrl: arr.join(","),
  1048. annexName: arrName.join(","),
  1049. });
  1050. },
  1051. jinshengRemove(e) {
  1052. let url = e.file.response.data;
  1053. let arr = this.state.promotionList.annexUrl.split(",");
  1054. let arrName = this.state.promotionList.annexName.split(",");
  1055. let num = "";
  1056. arr.forEach((item, index) => {
  1057. if (item == url) {
  1058. arr.splice(index, 1);
  1059. num = index;
  1060. }
  1061. });
  1062. arrName.splice(num, 1);
  1063. this.state.promotionList.annexUrl = arr.join(",");
  1064. this.state.promotionList.annexName = arrName.join(",");
  1065. this.setState({
  1066. promotionList: this.state.promotionList,
  1067. });
  1068. },
  1069. contractRemove(e) {
  1070. let url = e.file.response.data;
  1071. let arr = this.state.contractList.annexUrl.split(",");
  1072. let arrName = this.state.contractList.annexName.split(",");
  1073. let num = "";
  1074. arr.forEach((item, index) => {
  1075. if (item == url) {
  1076. arr.splice(index, 1);
  1077. num = index;
  1078. }
  1079. });
  1080. arrName.splice(num, 1);
  1081. this.state.contractList.annexUrl = arr.join(",");
  1082. this.state.contractList.annexName = arrName.join(",");
  1083. this.setState({
  1084. contractList: this.state.contractList,
  1085. });
  1086. },
  1087. chooseRemove(e) {
  1088. let url = e.file.response.data;
  1089. let arr = this.state.chooseList.annexUrl.split(",");
  1090. let arrName = this.state.chooseList.annexName.split(",");
  1091. let num = "";
  1092. arr.forEach((item, index) => {
  1093. if (item == url) {
  1094. arr.splice(index, 1);
  1095. num = index;
  1096. }
  1097. });
  1098. arrName.splice(num, 1);
  1099. this.state.chooseList.annexUrl = arr.join(",");
  1100. this.state.chooseList.annexName = arrName.join(",");
  1101. this.setState({
  1102. chooseList: this.state.chooseList,
  1103. });
  1104. },
  1105. quitRemove(e) {
  1106. let url = e.file.response.data;
  1107. let arr = this.state.quitList.annexUrl.split(",");
  1108. let arrName = this.state.quitList.annexName.split(",");
  1109. let num = "";
  1110. arr.forEach((item, index) => {
  1111. if (item == url) {
  1112. arr.splice(index, 1);
  1113. num = index;
  1114. }
  1115. });
  1116. arrName.splice(num, 1);
  1117. this.state.quitList.annexUrl = arr.join(",");
  1118. this.state.quitList.annexName = arrName.join(",");
  1119. this.setState({
  1120. quitList: this.state.quitList,
  1121. });
  1122. },
  1123. getList() {
  1124. this.setState({
  1125. loading: true,
  1126. });
  1127. $.ajax({
  1128. method: "get",
  1129. dataType: "json",
  1130. crossDomain: false,
  1131. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1132. data: {},
  1133. success: function (data) {
  1134. let theArr = [];
  1135. if (data.error && data.error.length) {
  1136. message.warning(data.error[0].message);
  1137. } else {
  1138. let arr = data.data;
  1139. let starArr = [];
  1140. arr.forEach((item, index) => {
  1141. if (item.jobs == this.state.jobs) {
  1142. let obj = {
  1143. star: item.lvl + "",
  1144. starName: item.lvlName,
  1145. };
  1146. starArr.push(obj);
  1147. }
  1148. });
  1149. this.setState({
  1150. starArr,
  1151. });
  1152. }
  1153. }.bind(this),
  1154. }).always(
  1155. function () {
  1156. this.setState({
  1157. loading: false,
  1158. });
  1159. }.bind(this)
  1160. );
  1161. },
  1162. getLists() {
  1163. this.setState({
  1164. loading: true,
  1165. });
  1166. $.ajax({
  1167. method: "get",
  1168. dataType: "json",
  1169. crossDomain: false,
  1170. url: globalConfig.context + "/api/admin/personnel/selectLvlList",
  1171. data: {},
  1172. success: function (data) {
  1173. let theArr = [];
  1174. if (data.error && data.error.length) {
  1175. message.warning(data.error[0].message);
  1176. } else {
  1177. let arr = data.data;
  1178. let starArrs = [];
  1179. arr.forEach((item, index) => {
  1180. if (item.jobs == this.state.jobss) {
  1181. let obj = {
  1182. star: item.lvl + "",
  1183. starName: item.lvlName,
  1184. };
  1185. starArrs.push(obj);
  1186. }
  1187. });
  1188. this.setState({
  1189. starArrs,
  1190. });
  1191. }
  1192. }.bind(this),
  1193. }).always(
  1194. function () {
  1195. this.setState({
  1196. loading: false,
  1197. });
  1198. }.bind(this)
  1199. );
  1200. },
  1201. editRuzi() {
  1202. this.setState({
  1203. loading: true,
  1204. });
  1205. $.ajax({
  1206. method: "post",
  1207. dataType: "json",
  1208. crossDomain: false,
  1209. url: globalConfig.context + "/api/admin/personnel/updateEntry",
  1210. data: {
  1211. id: this.state.id,
  1212. school: this.state.school,
  1213. education: this.state.education,
  1214. major: this.state.major,
  1215. title: this.state.title,
  1216. entryRemarks: this.state.entryRemarks,
  1217. annexUrl: this.state.annexUrl,
  1218. annexName: this.state.annexName,
  1219. },
  1220. success: function (data) {
  1221. let theArr = [];
  1222. if (data.error && data.error.length) {
  1223. message.warning(data.error[0].message);
  1224. } else {
  1225. this.loadData();
  1226. this.entryCancel();
  1227. this.tableRowClick(this.state.ModalData);
  1228. message.success("修改成功");
  1229. }
  1230. }.bind(this),
  1231. }).always(
  1232. function () {
  1233. this.setState({
  1234. loading: false,
  1235. });
  1236. }.bind(this)
  1237. );
  1238. },
  1239. upgradeCancel() {
  1240. this.tableRowClick(this.state.ModalData);
  1241. this.setState({
  1242. upgradeVisible: false,
  1243. });
  1244. },
  1245. contractCancel() {
  1246. this.tableRowClick(this.state.ModalData);
  1247. this.setState({
  1248. contractVisible: false,
  1249. });
  1250. },
  1251. chooseCancel() {
  1252. this.tableRowClick(this.state.ModalData);
  1253. this.setState({
  1254. chooseVisible: false,
  1255. });
  1256. },
  1257. quitCancel() {
  1258. this.tableRowClick(this.state.ModalData);
  1259. this.setState({
  1260. quitVisible: false,
  1261. });
  1262. },
  1263. upgradeModal(flag, index) {
  1264. this.setState({
  1265. upgradeVisible: true,
  1266. });
  1267. let obj = {
  1268. id: undefined,
  1269. pdId: this.state.ModalData.id,
  1270. oldJobs: [],
  1271. oldLvl: [],
  1272. newJobs: [],
  1273. newLvl: [],
  1274. promotionTimes: undefined,
  1275. promotionRemarks: undefined,
  1276. annexUrl: "",
  1277. annexName: "",
  1278. };
  1279. this.setState({
  1280. promotionList: flag ? obj : this.state.ModalData.promotionList[index],
  1281. });
  1282. },
  1283. contractModal(flag, index) {
  1284. this.setState({
  1285. contractVisible: true,
  1286. });
  1287. let obj = {
  1288. id: undefined,
  1289. pdId: this.state.ModalData.id,
  1290. startTimes: undefined,
  1291. endTimes: undefined,
  1292. contractRemarks: undefined,
  1293. annexUrl: "",
  1294. annexName: "",
  1295. };
  1296. this.setState({
  1297. contractList: flag ? obj : this.state.ModalData.contractList[index],
  1298. });
  1299. },
  1300. chooseModal(flag, index) {
  1301. this.setState({
  1302. chooseVisible: true,
  1303. });
  1304. let obj = {
  1305. id: undefined,
  1306. pdId: this.state.ModalData.id,
  1307. chooseStatus: undefined,
  1308. effectTimes: undefined,
  1309. chooseRemarks: undefined,
  1310. annexUrl: "",
  1311. annexName: "",
  1312. };
  1313. this.setState({
  1314. chooseList: flag ? obj : this.state.ModalData.chooseList[index],
  1315. });
  1316. },
  1317. quitModal(flag, index) {
  1318. this.setState({
  1319. quitVisible: true,
  1320. });
  1321. let obj = {
  1322. id: undefined,
  1323. pdId: this.state.ModalData.id,
  1324. effectTimes: undefined,
  1325. quitRemarks: undefined,
  1326. annexUrl: "",
  1327. annexName: "",
  1328. };
  1329. this.setState({
  1330. quitList: flag ? obj : this.state.ModalData.quitList[index],
  1331. });
  1332. },
  1333. editUpgrade() {
  1334. console.log(this.state.promotionList);
  1335. this.setState({
  1336. loading: true,
  1337. });
  1338. $.ajax({
  1339. method: "post",
  1340. dataType: "json",
  1341. crossDomain: false,
  1342. url: globalConfig.context + "/api/admin/personnel/updatePromotion",
  1343. data: {
  1344. id: this.state.promotionList.id,
  1345. pdId: this.state.promotionList.pdId,
  1346. oldJobs: this.state.promotionList.oldJobs,
  1347. oldLvl: this.state.promotionList.oldLvl,
  1348. newJobs: this.state.promotionList.newJobs,
  1349. newLvl: this.state.promotionList.newLvl,
  1350. promotionTimes: this.state.promotionList.promotionTimes,
  1351. promotionRemarks: this.state.promotionList.promotionRemarks,
  1352. annexUrl: this.state.promotionList.annexUrl,
  1353. annexName: this.state.promotionList.annexName,
  1354. },
  1355. success: function (data) {
  1356. let theArr = [];
  1357. if (data.error && data.error.length) {
  1358. message.warning(data.error[0].message);
  1359. } else {
  1360. this.loadData();
  1361. this.upgradeCancel();
  1362. message.success("修改成功");
  1363. }
  1364. }.bind(this),
  1365. }).always(
  1366. function () {
  1367. this.setState({
  1368. loading: false,
  1369. });
  1370. }.bind(this)
  1371. );
  1372. },
  1373. editContract() {
  1374. this.setState({
  1375. loading: true,
  1376. });
  1377. $.ajax({
  1378. method: "post",
  1379. dataType: "json",
  1380. crossDomain: false,
  1381. url: globalConfig.context + "/api/admin/personnel/updateContract",
  1382. data: {
  1383. id: this.state.contractList.id,
  1384. pdId: this.state.contractList.pdId,
  1385. startTimes: this.state.contractList.startTimes,
  1386. endTimes: this.state.contractList.endTimes,
  1387. contractRemarks: this.state.contractList.contractRemarks,
  1388. annexUrl: this.state.contractList.annexUrl,
  1389. annexName: this.state.contractList.annexName,
  1390. },
  1391. success: function (data) {
  1392. let theArr = [];
  1393. if (data.error && data.error.length) {
  1394. message.warning(data.error[0].message);
  1395. } else {
  1396. this.loadData();
  1397. this.contractCancel();
  1398. message.success("修改成功");
  1399. }
  1400. }.bind(this),
  1401. }).always(
  1402. function () {
  1403. this.setState({
  1404. loading: false,
  1405. });
  1406. }.bind(this)
  1407. );
  1408. },
  1409. editChoose() {
  1410. this.setState({
  1411. loading: true,
  1412. });
  1413. $.ajax({
  1414. method: "post",
  1415. dataType: "json",
  1416. crossDomain: false,
  1417. url: globalConfig.context + "/api/admin/personnel/updateChoose",
  1418. data: {
  1419. id: this.state.chooseList.id,
  1420. pdId: this.state.chooseList.pdId,
  1421. chooseStatus: this.state.chooseList.chooseStatus,
  1422. effectTimes: this.state.chooseList.effectTimes,
  1423. chooseRemarks: this.state.chooseList.chooseRemarks,
  1424. annexUrl: this.state.chooseList.annexUrl,
  1425. annexName: this.state.chooseList.annexName,
  1426. },
  1427. success: function (data) {
  1428. let theArr = [];
  1429. if (data.error && data.error.length) {
  1430. message.warning(data.error[0].message);
  1431. } else {
  1432. this.loadData();
  1433. this.chooseCancel();
  1434. message.success("修改成功");
  1435. }
  1436. }.bind(this),
  1437. }).always(
  1438. function () {
  1439. this.setState({
  1440. loading: false,
  1441. });
  1442. }.bind(this)
  1443. );
  1444. },
  1445. editQuit() {
  1446. this.setState({
  1447. loading: true,
  1448. });
  1449. $.ajax({
  1450. method: "post",
  1451. dataType: "json",
  1452. crossDomain: false,
  1453. url: globalConfig.context + "/api/admin/personnel/updateQuit",
  1454. data: {
  1455. id: this.state.quitList.id,
  1456. pdId: this.state.quitList.pdId,
  1457. effectTimes: this.state.quitList.effectTimes,
  1458. quitRemarks: this.state.quitList.quitRemarks,
  1459. annexUrl: this.state.quitList.annexUrl,
  1460. annexName: this.state.quitList.annexName,
  1461. },
  1462. success: function (data) {
  1463. let theArr = [];
  1464. if (data.error && data.error.length) {
  1465. message.warning(data.error[0].message);
  1466. } else {
  1467. this.loadData();
  1468. this.quitCancel();
  1469. message.success("修改成功");
  1470. }
  1471. }.bind(this),
  1472. }).always(
  1473. function () {
  1474. this.setState({
  1475. loading: false,
  1476. });
  1477. }.bind(this)
  1478. );
  1479. },
  1480. render() {
  1481. const rowSelection = {
  1482. selectedRowKeys: this.state.selectedRowKeys,
  1483. onChange: (selectedRowKeys, selectedRows) => {
  1484. this.setState({
  1485. selectedRows: selectedRows.slice(-1),
  1486. selectedRowKeys: selectedRowKeys.slice(-1),
  1487. });
  1488. },
  1489. };
  1490. const { RangePicker } = DatePicker;
  1491. const formItemLayout = {
  1492. labelCol: { span: 6 },
  1493. wrapperCol: { span: 16 },
  1494. };
  1495. let departmentArr = this.state.departmentArr || [];
  1496. return (
  1497. <div className="user-content">
  1498. <div className="content-title" style={{ marginBottom: 10 }}>
  1499. <span style={{ fontWeight: 900, fontSize: 16 }}>人事档案统计</span>
  1500. </div>
  1501. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1502. <TabPane tab="更改表格显示数据" key="1">
  1503. <div style={{ marginLeft: 10 }}>
  1504. <ChooseList
  1505. columns={this.state.columns}
  1506. changeFn={this.changeList}
  1507. changeList={this.state.changeList}
  1508. top={55}
  1509. margin={11}
  1510. />
  1511. </div>
  1512. </TabPane>
  1513. <TabPane tab="搜索" key="2">
  1514. <div className="user-search" style={{ marginLeft: 10 }}>
  1515. <Input
  1516. placeholder="姓名"
  1517. style={{ width: 120 }}
  1518. value={this.state.nameSearch}
  1519. onChange={(e) => {
  1520. this.setState({ nameSearch: e.target.value });
  1521. }}
  1522. />
  1523. <Select
  1524. placeholder="员工状态"
  1525. onChange={(e) => {
  1526. this.setState({ statusSearch: e });
  1527. }}
  1528. style={{ width: 120, marginRight: 10 }}
  1529. value={this.state.statusSearch}
  1530. >
  1531. <Option value="0">在职(试用期)</Option>
  1532. <Option value="1">在职(合同期)</Option>
  1533. <Option value="2">离职</Option>
  1534. </Select>
  1535. <Select
  1536. placeholder="所属公司"
  1537. style={{ width: 120, marginRight: 10 }}
  1538. value={this.state.departmenttList}
  1539. onChange={(e) => {
  1540. this.setState({ departmenttList: e });
  1541. }}
  1542. >
  1543. {departmentArr.map(function (item) {
  1544. return (
  1545. <Select.Option key={item.id}>{item.name}</Select.Option>
  1546. );
  1547. })}
  1548. </Select>
  1549. <Select
  1550. placeholder="性别"
  1551. onChange={(e) => {
  1552. this.setState({ sexSearch: e });
  1553. }}
  1554. style={{ width: 120, marginRight: 10 }}
  1555. value={this.state.sexSearch}
  1556. >
  1557. <Option value="0">男</Option>
  1558. <Option value="1">女</Option>
  1559. </Select>
  1560. <Select
  1561. placeholder="婚姻状态"
  1562. onChange={(e) => {
  1563. this.setState({ marriageSearch: e });
  1564. }}
  1565. style={{ width: 120, marginRight: 10 }}
  1566. value={this.state.marriageSearch}
  1567. >
  1568. <Option value="0">未婚</Option>
  1569. <Option value="1">已婚</Option>
  1570. <Option value="2">离异</Option>
  1571. </Select>
  1572. <Select
  1573. placeholder="政治面貌"
  1574. onChange={(e) => {
  1575. this.setState({ politicalOutlookSearch: e });
  1576. }}
  1577. style={{ width: 120, marginRight: 10 }}
  1578. value={this.state.politicalOutlookSearch}
  1579. >
  1580. <Option value="0">群众</Option>
  1581. <Option value="1">中共预备党员</Option>
  1582. <Option value="2">中共党员</Option>
  1583. <Option value="3">致公党员</Option>
  1584. </Select>
  1585. <Select
  1586. placeholder="生日月份"
  1587. onChange={(e) => {
  1588. this.setState({ birthdayMonthSearch: e });
  1589. }}
  1590. style={{ width: 120, marginRight: 10 }}
  1591. value={this.state.birthdayMonthSearch}
  1592. >
  1593. <Option value="">全部</Option>
  1594. <Option value="1">一月</Option>
  1595. <Option value="2">二月</Option>
  1596. <Option value="3">三月</Option>
  1597. <Option value="4">四月</Option>
  1598. <Option value="5">五月</Option>
  1599. <Option value="6">六月</Option>
  1600. <Option value="7">七月</Option>
  1601. <Option value="8">八月</Option>
  1602. <Option value="9">九月</Option>
  1603. <Option value="10">十月</Option>
  1604. <Option value="11">十一月</Option>
  1605. <Option value="12">十二月</Option>
  1606. </Select>
  1607. <Select
  1608. placeholder="所属系统"
  1609. onChange={(e) => {
  1610. this.setState({ systemSearch: e });
  1611. }}
  1612. style={{ width: 120, marginRight: 10 }}
  1613. value={this.state.systemSearch}
  1614. >
  1615. <Option value="0">管理系统</Option>
  1616. <Option value="1">营销系统</Option>
  1617. <Option value="2">技术系统</Option>
  1618. </Select>
  1619. <Select
  1620. placeholder="工作年限"
  1621. onChange={(e) => {
  1622. this.setState({ workingYearsSearch: e });
  1623. }}
  1624. style={{ width: 120, marginRight: 10 }}
  1625. value={this.state.workingYearsSearch}
  1626. >
  1627. <Option value="0">0-1年</Option>
  1628. <Option value="1">1-3年</Option>
  1629. <Option value="2">3-10年</Option>
  1630. <Option value="3">10年以上</Option>
  1631. </Select>
  1632. <Select
  1633. placeholder="学历"
  1634. onChange={(e) => {
  1635. this.setState({ educationSearch: e });
  1636. }}
  1637. style={{ width: 120, marginRight: 370 }}
  1638. value={this.state.educationSearch}
  1639. >
  1640. <Option value="0">高中/中专</Option>
  1641. <Option value="1">专科/高职</Option>
  1642. <Option value="2">本科</Option>
  1643. <Option value="3">研究生</Option>
  1644. <Option value="5">博士</Option>
  1645. </Select>
  1646. <span style={{}}>转正日期:</span>
  1647. <RangePicker
  1648. style={{ marginRight: 10 }}
  1649. value={[
  1650. this.state.promotionTime[0]
  1651. ? moment(this.state.promotionTime[0])
  1652. : null,
  1653. this.state.promotionTime[1]
  1654. ? moment(this.state.promotionTime[1])
  1655. : null,
  1656. ]}
  1657. onChange={(data, dataString) => {
  1658. this.setState({ promotionTime: dataString });
  1659. }}
  1660. />
  1661. <span style={{}}>入职时间:</span>
  1662. <RangePicker
  1663. style={{ marginRight: 10 }}
  1664. value={[
  1665. this.state.entryTime[0]
  1666. ? moment(this.state.entryTime[0])
  1667. : null,
  1668. this.state.entryTime[1]
  1669. ? moment(this.state.entryTime[1])
  1670. : null,
  1671. ]}
  1672. onChange={(data, dataString) => {
  1673. this.setState({ entryTime: dataString });
  1674. }}
  1675. />
  1676. <span style={{}}>离职时间:</span>
  1677. <RangePicker
  1678. style={{ marginRight: 21 }}
  1679. value={[
  1680. this.state.quitTime[0]
  1681. ? moment(this.state.quitTime[0])
  1682. : null,
  1683. this.state.quitTime[1]
  1684. ? moment(this.state.quitTime[1])
  1685. : null,
  1686. ]}
  1687. onChange={(data, dataString) => {
  1688. this.setState({ quitTime: dataString });
  1689. }}
  1690. />
  1691. <span style={{}}>合同时间:</span>
  1692. <RangePicker
  1693. style={{ marginRight: 10 }}
  1694. value={[
  1695. this.state.contractTime[0]
  1696. ? moment(this.state.contractTime[0])
  1697. : null,
  1698. this.state.contractTime[1]
  1699. ? moment(this.state.contractTime[1])
  1700. : null,
  1701. ]}
  1702. onChange={(data, dataString) => {
  1703. this.setState({ contractTime: dataString });
  1704. }}
  1705. />
  1706. <Button
  1707. type="primary"
  1708. onClick={this.search}
  1709. style={{ marginLeft: 10 }}
  1710. >
  1711. 搜索
  1712. </Button>
  1713. <Button onClick={this.reset}>重置</Button>
  1714. </div>
  1715. </TabPane>
  1716. <TabPane tab="新增员工档案" key="3">
  1717. <Button
  1718. type="primary"
  1719. onClick={this.addPeo}
  1720. style={{ margin: "11px 0px 10px 10px" }}
  1721. >
  1722. 新增员工档案
  1723. </Button>
  1724. </TabPane>
  1725. <TabPane tab="导出Excel" key="4">
  1726. <Button type="primary" style={{ margin: "11px 0px 10px 10px" }}>
  1727. 导出当前列表
  1728. </Button>
  1729. </TabPane>
  1730. <TabPane tab="查看" key="5">
  1731. <Button
  1732. type="primary"
  1733. style={{ margin: "11px 0px 10px 10px" }}
  1734. onClick={() => {}}
  1735. >
  1736. 详情收款流水
  1737. </Button>
  1738. </TabPane>
  1739. </Tabs>
  1740. <div className="patent-table">
  1741. <Spin spinning={this.state.loading}>
  1742. <Table
  1743. bordered
  1744. columns={
  1745. this.state.changeList == undefined
  1746. ? this.state.columns
  1747. : this.state.changeList
  1748. }
  1749. onRowClick={this.tableRowClick}
  1750. dataSource={this.state.dataSource}
  1751. scroll={{ x: "max-content", y: 0 }}
  1752. pagination={this.state.pagination}
  1753. size="small"
  1754. />
  1755. </Spin>
  1756. </div>
  1757. <Modal
  1758. visible={this.state.peoVisible}
  1759. onOk={this.checkOk}
  1760. footer={null}
  1761. width={800}
  1762. onCancel={() => {
  1763. this.loadData();
  1764. this.addPeoCancel();
  1765. }}
  1766. >
  1767. <Spin spinning={this.state.loading}>
  1768. <h2
  1769. style={{
  1770. textAlign: "center",
  1771. paddingBottom: 10,
  1772. marginBottom: 10,
  1773. }}
  1774. >
  1775. {this.state.isAddPeo ? "新增人事档案" : "修改人事档案"}
  1776. </h2>
  1777. <div className="clearfix">
  1778. <FormItem
  1779. className="half-item"
  1780. {...formItemLayout}
  1781. label="员工编号"
  1782. >
  1783. <Input
  1784. placeholder=""
  1785. style={{ width: 200 }}
  1786. disabled
  1787. value={this.state.contractNoSearch}
  1788. onChange={(e) => {
  1789. this.setState({
  1790. contractNoSearch: e.target.value,
  1791. });
  1792. }}
  1793. />
  1794. </FormItem>
  1795. <FormItem
  1796. className="half-item"
  1797. {...formItemLayout}
  1798. label="门禁编号"
  1799. >
  1800. <Input
  1801. style={{ width: 200 }}
  1802. placeholder="请输入门禁编号"
  1803. value={this.state.doorId}
  1804. onChange={(e) => {
  1805. this.setState({
  1806. doorId: e.target.value,
  1807. });
  1808. }}
  1809. />
  1810. </FormItem>
  1811. </div>
  1812. <div className="clearfix">
  1813. <FormItem className="half-item" {...formItemLayout} label="姓名">
  1814. <Input
  1815. placeholder="请输入姓名"
  1816. style={{ width: 200 }}
  1817. value={this.state.name}
  1818. onChange={(e) => {
  1819. this.setState({
  1820. name: e.target.value,
  1821. });
  1822. }}
  1823. />
  1824. </FormItem>
  1825. <FormItem
  1826. className="half-item"
  1827. {...formItemLayout}
  1828. label="出生日期"
  1829. >
  1830. <DatePicker
  1831. value={
  1832. this.state.birthdays ? moment(this.state.birthdays) : null
  1833. }
  1834. onChange={(e, t) => {
  1835. this.setState({
  1836. birthdays: t,
  1837. });
  1838. }}
  1839. />
  1840. </FormItem>
  1841. </div>
  1842. <div className="clearfix">
  1843. <FormItem className="half-item" {...formItemLayout} label="性别">
  1844. <Radio.Group
  1845. onChange={(e) => {
  1846. this.setState({ sex: e.target.value });
  1847. }}
  1848. value={this.state.sex}
  1849. >
  1850. <Radio value={0}>男</Radio>
  1851. <Radio value={1}>女</Radio>
  1852. </Radio.Group>
  1853. </FormItem>
  1854. <FormItem className="half-item" {...formItemLayout} label="民族">
  1855. <Input
  1856. placeholder="输入民族(例:汉族)"
  1857. style={{ width: 200 }}
  1858. value={this.state.nation}
  1859. onChange={(e) => {
  1860. this.setState({
  1861. nation: e.target.value,
  1862. });
  1863. }}
  1864. />
  1865. </FormItem>
  1866. </div>
  1867. <div className="clearfix">
  1868. <FormItem
  1869. className="half-item"
  1870. {...formItemLayout}
  1871. label="户籍地址"
  1872. >
  1873. <Cascader
  1874. options={this.state.Area}
  1875. value={this.state.residence}
  1876. placeholder="选择城市"
  1877. style={{ width: "200px" }}
  1878. onChange={(e, pre) => {
  1879. this.setState({ residence: e });
  1880. console.log(e, pre);
  1881. }}
  1882. />
  1883. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1884. </FormItem>
  1885. <FormItem
  1886. className="half-item"
  1887. {...formItemLayout}
  1888. label="户籍街道地址"
  1889. >
  1890. <Input
  1891. placeholder="输入街道地址"
  1892. style={{ width: 200 }}
  1893. value={this.state.residenceAddress}
  1894. onChange={(e) => {
  1895. this.setState({
  1896. residenceAddress: e.target.value,
  1897. });
  1898. }}
  1899. />
  1900. </FormItem>
  1901. </div>
  1902. <div className="clearfix">
  1903. <FormItem
  1904. className="half-item"
  1905. {...formItemLayout}
  1906. label="现住地址"
  1907. >
  1908. <Cascader
  1909. options={this.state.Area}
  1910. value={this.state.now}
  1911. placeholder="选择城市"
  1912. style={{ width: "200px" }}
  1913. onChange={(e, pre) => {
  1914. this.setState({ now: e });
  1915. console.log(e, pre);
  1916. }}
  1917. />
  1918. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1919. </FormItem>
  1920. <FormItem
  1921. className="half-item"
  1922. {...formItemLayout}
  1923. label="现住街道地址"
  1924. >
  1925. <Input
  1926. placeholder="输入街道地址"
  1927. style={{ width: 200 }}
  1928. value={this.state.nowAddress}
  1929. onChange={(e) => {
  1930. this.setState({
  1931. nowAddress: e.target.value,
  1932. });
  1933. }}
  1934. />
  1935. </FormItem>
  1936. </div>
  1937. <div className="clearfix">
  1938. <FormItem className="half-item" {...formItemLayout} label="籍贯">
  1939. <Cascader
  1940. options={this.state.Birthplaces}
  1941. value={this.state.nativePlace}
  1942. placeholder="选择城市"
  1943. style={{ width: "200px" }}
  1944. onChange={(e, pre) => {
  1945. this.setState({ nativePlace: e });
  1946. console.log(e, pre);
  1947. }}
  1948. />
  1949. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1950. </FormItem>
  1951. <FormItem
  1952. className="half-item"
  1953. {...formItemLayout}
  1954. label="身份证"
  1955. >
  1956. <Input
  1957. placeholder="输入身份证信息"
  1958. style={{ width: 200 }}
  1959. value={this.state.idCard}
  1960. onChange={(e) => {
  1961. // 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]$/;
  1962. this.setState({
  1963. idCard: e.target.value,
  1964. });
  1965. }}
  1966. />
  1967. </FormItem>
  1968. </div>
  1969. <div className="clearfix">
  1970. <FormItem
  1971. className="half-item"
  1972. {...formItemLayout}
  1973. label="身份证领证机关"
  1974. >
  1975. <Input
  1976. placeholder="输入机关名称"
  1977. style={{ width: 200 }}
  1978. value={this.state.certificationAuthority}
  1979. onChange={(e) => {
  1980. // 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]$/;
  1981. this.setState({
  1982. certificationAuthority: e.target.value,
  1983. });
  1984. }}
  1985. />
  1986. {/* <span style={{ color: "red", marginLeft: "15px" }}>*</span> */}
  1987. </FormItem>
  1988. <FormItem
  1989. className="half-item"
  1990. {...formItemLayout}
  1991. label="婚姻状态"
  1992. >
  1993. <Radio.Group
  1994. onChange={(e) => {
  1995. this.setState({ marriage: e.target.value });
  1996. }}
  1997. value={this.state.marriage}
  1998. >
  1999. <Radio value={0}>未婚</Radio>
  2000. <Radio value={1}>已婚</Radio>
  2001. <Radio value={2}>离异</Radio>
  2002. </Radio.Group>
  2003. </FormItem>
  2004. </div>
  2005. <div className="clearfix">
  2006. <FormItem
  2007. className="half-item"
  2008. labelCol={{ span: 6 }}
  2009. wrapperCol={{ span: 30 }}
  2010. label="子女数量"
  2011. >
  2012. <span>儿子:</span>
  2013. <Input
  2014. placeholder="输入数量"
  2015. style={{ width: 80 }}
  2016. type={"number"}
  2017. value={this.state.son}
  2018. onChange={(e) => {
  2019. this.setState({
  2020. son: e.target.value,
  2021. });
  2022. }}
  2023. />
  2024. <span style={{ marginLeft: 10 }}>女儿:</span>
  2025. <Input
  2026. placeholder="输入数量"
  2027. style={{ width: 80 }}
  2028. type={"number"}
  2029. value={this.state.girl}
  2030. onChange={(e) => {
  2031. this.setState({
  2032. girl: e.target.value,
  2033. });
  2034. }}
  2035. />
  2036. </FormItem>
  2037. <FormItem
  2038. className="half-item"
  2039. {...formItemLayout}
  2040. label="政治面貌"
  2041. >
  2042. <Select
  2043. placeholder="请选择政治面貌"
  2044. style={{ width: 200 }}
  2045. onChange={(e) => {
  2046. this.setState({ politicalOutlook: e });
  2047. }}
  2048. value={this.state.politicalOutlook}
  2049. >
  2050. <Option value="0">群众</Option>
  2051. <Option value="1">中共预备党员</Option>
  2052. <Option value="2">中共党员</Option>
  2053. <Option value="3">致公党党员</Option>
  2054. </Select>
  2055. </FormItem>
  2056. </div>
  2057. <Button
  2058. type="primary"
  2059. shape="round"
  2060. size="large"
  2061. style={{
  2062. position: "relative",
  2063. left: "50%",
  2064. transform: "translateX(-50%)",
  2065. }}
  2066. onClick={this.state.isAddPeo ? this.addOk : this.editPeo}
  2067. >
  2068. 保存
  2069. </Button>
  2070. </Spin>
  2071. </Modal>
  2072. <Modal
  2073. visible={this.state.stayVisible}
  2074. footer={null}
  2075. width={800}
  2076. onCancel={() => {
  2077. this.loadData();
  2078. this.stayCancel();
  2079. }}
  2080. >
  2081. <Spin spinning={this.state.loading}>
  2082. <h3
  2083. style={{
  2084. textAlign: "center",
  2085. paddingBottom: 10,
  2086. marginBottom: 10,
  2087. }}
  2088. >
  2089. 任职信息
  2090. </h3>
  2091. <div className="clearfix">
  2092. <FormItem
  2093. className="half-item"
  2094. labelCol={{ span: 6 }}
  2095. wrapperCol={{ span: 30 }}
  2096. label="员工状态"
  2097. >
  2098. <Select
  2099. placeholder="请选择状态"
  2100. style={{ width: 200 }}
  2101. onChange={(e) => {
  2102. this.setState({ status: e });
  2103. }}
  2104. value={this.state.status}
  2105. >
  2106. <Option value="0">实习生</Option>
  2107. <Option value="1">在职(试用期)</Option>
  2108. <Option value="2">在职(合同期)</Option>
  2109. <Option value="3">兼职</Option>
  2110. <Option value="4">已离职</Option>
  2111. </Select>
  2112. </FormItem>
  2113. <FormItem
  2114. className="half-item"
  2115. {...formItemLayout}
  2116. label="所属系统"
  2117. >
  2118. <Select
  2119. placeholder="请选择所属系统"
  2120. style={{ width: 200 }}
  2121. onChange={(e) => {
  2122. this.setState({ system: e });
  2123. }}
  2124. value={this.state.system}
  2125. >
  2126. <Option value="0">管理系统</Option>
  2127. <Option value="1">营销系统</Option>
  2128. <Option value="2">技术系统</Option>
  2129. </Select>
  2130. </FormItem>
  2131. </div>
  2132. <div className="clearfix">
  2133. <FormItem
  2134. className="half-item"
  2135. labelCol={{ span: 6 }}
  2136. wrapperCol={{ span: 30 }}
  2137. label="工作性质"
  2138. >
  2139. <Radio.Group
  2140. onChange={(e) => {
  2141. this.setState({ jobNature: e.target.value });
  2142. }}
  2143. value={this.state.jobNature}
  2144. >
  2145. <Radio value="0">全职</Radio>
  2146. <Radio value="1">兼职</Radio>
  2147. <Radio value="2">其他</Radio>
  2148. </Radio.Group>
  2149. <Input
  2150. placeholder="输入性质"
  2151. style={{
  2152. width: 80,
  2153. display:
  2154. this.state.jobNature == 2 ? "inline-block" : "none",
  2155. }}
  2156. value={this.state.jobNatureRemarks}
  2157. onChange={(e) => {
  2158. this.setState({
  2159. jobNatureRemarks: e.target.value,
  2160. });
  2161. }}
  2162. />
  2163. </FormItem>
  2164. <FormItem className="half-item" {...formItemLayout} label="工龄">
  2165. <span>{this.state.ModalData.workingYear}</span>
  2166. </FormItem>
  2167. </div>
  2168. <div className="clearfix">
  2169. <FormItem
  2170. className="half-item"
  2171. {...formItemLayout}
  2172. label="入职时间"
  2173. >
  2174. <DatePicker
  2175. value={
  2176. this.state.entryTimes ? moment(this.state.entryTimes) : null
  2177. }
  2178. style={{ width: 200 }}
  2179. onChange={(e, t) => {
  2180. this.setState({
  2181. entryTimes: t,
  2182. });
  2183. }}
  2184. />
  2185. </FormItem>
  2186. <FormItem
  2187. className="half-item"
  2188. {...formItemLayout}
  2189. label="转正时间"
  2190. >
  2191. <DatePicker
  2192. value={
  2193. this.state.promotionTimes
  2194. ? moment(this.state.promotionTimes)
  2195. : null
  2196. }
  2197. style={{ width: 200 }}
  2198. onChange={(e, t) => {
  2199. this.setState({
  2200. promotionTimes: t,
  2201. });
  2202. }}
  2203. />
  2204. </FormItem>
  2205. </div>
  2206. <div className="clearfix">
  2207. <FormItem
  2208. className="half-item"
  2209. {...formItemLayout}
  2210. label="所属公司"
  2211. >
  2212. <Select
  2213. placeholder="选择公司"
  2214. style={{ width: 200, marginRight: 10 }}
  2215. value={this.state.company}
  2216. onChange={(e) => {
  2217. this.setState({ company: e });
  2218. }}
  2219. >
  2220. {departmentArr.map(function (item) {
  2221. return (
  2222. <Select.Option key={item.id}>{item.name}</Select.Option>
  2223. );
  2224. })}
  2225. </Select>
  2226. </FormItem>
  2227. <FormItem className="half-item" {...formItemLayout} label="级别">
  2228. <Select
  2229. placeholder="请选择所属级别"
  2230. style={{ width: 200 }}
  2231. onChange={(e) => {
  2232. this.setState({ lvl: e });
  2233. }}
  2234. value={this.state.lvl}
  2235. >
  2236. <Option value="0">员工</Option>
  2237. <Option value="1">主管</Option>
  2238. <Option value="2">经理</Option>
  2239. <Option value="3">总经理</Option>
  2240. <Option value="4">副总裁</Option>
  2241. <Option value="5">副总</Option>
  2242. <Option value="6">总监</Option>
  2243. <Option value="7">董事长</Option>
  2244. </Select>
  2245. </FormItem>
  2246. </div>
  2247. <div className="clearfix">
  2248. <FormItem className="half-item" {...formItemLayout} label="职位">
  2249. <Select
  2250. placeholder="选择职位"
  2251. style={{ width: 200, marginRight: 10 }}
  2252. value={this.state.jobs}
  2253. onChange={(e) => {
  2254. this.setState({ jobs: e, star: [] });
  2255. console.log(e);
  2256. this.getList();
  2257. }}
  2258. >
  2259. <Option value="1">员工</Option>
  2260. <Option value="2">试用营销员</Option>
  2261. <Option value="3">试用营销储备经理</Option>
  2262. <Option value="4">营销经理</Option>
  2263. <Option value="5">总监合伙人</Option>
  2264. <Option value="6">技术助理</Option>
  2265. <Option value="7">咨询师</Option>
  2266. <Option value="8">咨询师主管</Option>
  2267. <Option value="9">咨询师经理</Option>
  2268. <Option value="10">高级经理</Option>
  2269. </Select>
  2270. </FormItem>
  2271. <FormItem className="half-item" {...formItemLayout} label="星级">
  2272. <Select
  2273. placeholder="请选择所属星级"
  2274. style={{ width: 200 }}
  2275. onChange={(e) => {
  2276. this.setState({ star: e });
  2277. }}
  2278. value={this.state.star}
  2279. >
  2280. {this.state.starArr
  2281. ? this.state.starArr.map((item, index) => {
  2282. return (
  2283. <Option value={item.star}>{item.starName}</Option>
  2284. );
  2285. })
  2286. : []}
  2287. </Select>
  2288. </FormItem>
  2289. </div>
  2290. <div className="clearfix">
  2291. <FormItem
  2292. className="half-item"
  2293. labelCol={{ span: 6 }}
  2294. wrapperCol={{ span: 30 }}
  2295. label="岗位津贴"
  2296. >
  2297. <Input
  2298. placeholder="输入金额"
  2299. style={{ width: 200 }}
  2300. value={this.state.allowance}
  2301. onChange={(e) => {
  2302. this.setState({
  2303. allowance: e.target.value,
  2304. });
  2305. }}
  2306. />
  2307. </FormItem>
  2308. </div>
  2309. <Button
  2310. type="primary"
  2311. shape="round"
  2312. size="large"
  2313. style={{
  2314. position: "relative",
  2315. left: "50%",
  2316. transform: "translateX(-50%)",
  2317. }}
  2318. onClick={this.editStay}
  2319. >
  2320. 保存
  2321. </Button>
  2322. </Spin>
  2323. </Modal>
  2324. <Modal
  2325. visible={this.state.phoneVisible}
  2326. footer={null}
  2327. width={800}
  2328. onCancel={() => {
  2329. this.loadData();
  2330. this.phoneCancel();
  2331. }}
  2332. >
  2333. <Spin spinning={this.state.loading}>
  2334. <h3
  2335. style={{
  2336. textAlign: "center",
  2337. paddingBottom: 10,
  2338. marginBottom: 10,
  2339. }}
  2340. >
  2341. 联系信息
  2342. </h3>
  2343. <div className="clearfix">
  2344. <FormItem
  2345. className="half-item"
  2346. labelCol={{ span: 6 }}
  2347. wrapperCol={{ span: 30 }}
  2348. label="手机号码"
  2349. >
  2350. <Input
  2351. placeholder="输入号码"
  2352. style={{ width: 200 }}
  2353. value={this.state.mobile}
  2354. onChange={(e) => {
  2355. this.setState({
  2356. mobile: e.target.value,
  2357. });
  2358. }}
  2359. />
  2360. </FormItem>
  2361. <FormItem
  2362. className="half-item"
  2363. labelCol={{ span: 6 }}
  2364. wrapperCol={{ span: 30 }}
  2365. label="办公室电话"
  2366. >
  2367. <Input
  2368. placeholder="输入电话"
  2369. style={{ width: 200 }}
  2370. value={this.state.fixedTel}
  2371. onChange={(e) => {
  2372. this.setState({
  2373. fixedTel: e.target.value,
  2374. });
  2375. }}
  2376. />
  2377. </FormItem>
  2378. </div>
  2379. <div className="clearfix">
  2380. <FormItem
  2381. className="half-item"
  2382. labelCol={{ span: 6 }}
  2383. wrapperCol={{ span: 30 }}
  2384. label="紧急联系人1"
  2385. >
  2386. <Input
  2387. placeholder="请输入名字"
  2388. style={{ width: 200 }}
  2389. value={
  2390. this.state.contactList.length
  2391. ? this.state.contactList[0].emergencyContact
  2392. : ""
  2393. }
  2394. onChange={(e) => {
  2395. this.state.contactList[0].emergencyContact = e.target.value;
  2396. let obj = this.state.contactList;
  2397. this.setState({
  2398. contactList: obj,
  2399. });
  2400. }}
  2401. />
  2402. </FormItem>
  2403. <FormItem
  2404. className="half-item"
  2405. labelCol={{ span: 6 }}
  2406. wrapperCol={{ span: 30 }}
  2407. label="紧急联系人电话"
  2408. >
  2409. <Input
  2410. placeholder="请输入电话"
  2411. style={{ width: 200 }}
  2412. value={
  2413. this.state.contactList.length
  2414. ? this.state.contactList[0].emergencyMobile
  2415. : ""
  2416. }
  2417. onChange={(e) => {
  2418. this.state.contactList[0].emergencyMobile = e.target.value;
  2419. let obj = this.state.contactList;
  2420. this.setState({
  2421. contactList: obj,
  2422. });
  2423. }}
  2424. />
  2425. </FormItem>
  2426. </div>
  2427. <div className="clearfix">
  2428. <FormItem
  2429. className="half-item"
  2430. labelCol={{ span: 6 }}
  2431. wrapperCol={{ span: 30 }}
  2432. label="紧急联系人2"
  2433. >
  2434. <Input
  2435. placeholder="请输入名字"
  2436. style={{ width: 200 }}
  2437. value={
  2438. this.state.contactList.length
  2439. ? this.state.contactList[1].emergencyContact
  2440. : ""
  2441. }
  2442. onChange={(e) => {
  2443. this.state.contactList[1].emergencyContact = e.target.value;
  2444. let obj = this.state.contactList;
  2445. this.setState({
  2446. contactList: obj,
  2447. });
  2448. }}
  2449. />
  2450. </FormItem>
  2451. <FormItem
  2452. className="half-item"
  2453. labelCol={{ span: 6 }}
  2454. wrapperCol={{ span: 30 }}
  2455. label="紧急联系人电话"
  2456. >
  2457. <Input
  2458. placeholder="请输入电话"
  2459. style={{ width: 200 }}
  2460. value={
  2461. this.state.contactList.length
  2462. ? this.state.contactList[1].emergencyMobile
  2463. : ""
  2464. }
  2465. onChange={(e) => {
  2466. this.state.contactList[1].emergencyMobile = e.target.value;
  2467. let obj = this.state.contactList;
  2468. this.setState({
  2469. contactList: obj,
  2470. });
  2471. }}
  2472. />
  2473. </FormItem>
  2474. </div>
  2475. <div className="clearfix">
  2476. <FormItem
  2477. className="half-item"
  2478. labelCol={{ span: 6 }}
  2479. wrapperCol={{ span: 30 }}
  2480. label="紧急联系人3"
  2481. >
  2482. <Input
  2483. placeholder="请输入名字"
  2484. style={{ width: 200 }}
  2485. value={
  2486. this.state.contactList.length
  2487. ? this.state.contactList[2].emergencyContact
  2488. : ""
  2489. }
  2490. onChange={(e) => {
  2491. this.state.contactList[2].emergencyContact = e.target.value;
  2492. let obj = this.state.contactList;
  2493. this.setState({
  2494. contactList: obj,
  2495. });
  2496. }}
  2497. />
  2498. </FormItem>
  2499. <FormItem
  2500. className="half-item"
  2501. labelCol={{ span: 6 }}
  2502. wrapperCol={{ span: 30 }}
  2503. label="紧急联系人电话"
  2504. >
  2505. <Input
  2506. placeholder="请输入电话"
  2507. style={{ width: 200 }}
  2508. value={
  2509. this.state.contactList.length
  2510. ? this.state.contactList[2].emergencyMobile
  2511. : ""
  2512. }
  2513. onChange={(e) => {
  2514. this.state.contactList[2].emergencyMobile = e.target.value;
  2515. let obj = this.state.contactList;
  2516. this.setState({
  2517. contactList: obj,
  2518. });
  2519. }}
  2520. />
  2521. </FormItem>
  2522. </div>
  2523. <Button
  2524. type="primary"
  2525. shape="round"
  2526. size="large"
  2527. style={{
  2528. position: "relative",
  2529. left: "50%",
  2530. transform: "translateX(-50%)",
  2531. }}
  2532. onClick={this.editPhone}
  2533. >
  2534. 保存
  2535. </Button>
  2536. </Spin>
  2537. </Modal>
  2538. <Modal
  2539. visible={this.state.entryVisible}
  2540. footer={null}
  2541. width={800}
  2542. onCancel={() => {
  2543. this.loadData();
  2544. this.entryCancel();
  2545. }}
  2546. >
  2547. <Spin spinning={this.state.loading}>
  2548. <h3
  2549. style={{
  2550. textAlign: "center",
  2551. paddingBottom: 10,
  2552. marginBottom: 10,
  2553. }}
  2554. >
  2555. 入职信息
  2556. </h3>
  2557. <div className="clearfix">
  2558. <FormItem
  2559. className="half-item"
  2560. labelCol={{ span: 6 }}
  2561. wrapperCol={{ span: 30 }}
  2562. label="毕业学校"
  2563. >
  2564. <Input
  2565. placeholder="输入学校名称"
  2566. style={{ width: 200 }}
  2567. value={this.state.school}
  2568. onChange={(e) => {
  2569. this.setState({
  2570. school: e.target.value,
  2571. });
  2572. }}
  2573. />
  2574. </FormItem>
  2575. <FormItem
  2576. className="half-item"
  2577. labelCol={{ span: 6 }}
  2578. wrapperCol={{ span: 30 }}
  2579. label="学历"
  2580. >
  2581. <Select
  2582. placeholder="请选择学历"
  2583. style={{ width: 200 }}
  2584. onChange={(e) => {
  2585. this.setState({ education: e });
  2586. }}
  2587. value={this.state.education}
  2588. >
  2589. <Option value="0">高中/中专</Option>
  2590. <Option value="1">专科/高职</Option>
  2591. <Option value="2">本科</Option>
  2592. <Option value="3">研究生</Option>
  2593. <Option value="4">博士</Option>
  2594. </Select>
  2595. </FormItem>
  2596. </div>
  2597. <div className="clearfix">
  2598. <FormItem
  2599. className="half-item"
  2600. labelCol={{ span: 6 }}
  2601. wrapperCol={{ span: 30 }}
  2602. label="所学专业"
  2603. >
  2604. <Input
  2605. placeholder="请输入专业名称"
  2606. style={{ width: 200 }}
  2607. value={this.state.major}
  2608. onChange={(e) => {
  2609. this.setState({
  2610. major: e.target.value,
  2611. });
  2612. }}
  2613. />
  2614. </FormItem>
  2615. <FormItem
  2616. className="half-item"
  2617. labelCol={{ span: 6 }}
  2618. wrapperCol={{ span: 30 }}
  2619. label="职称"
  2620. >
  2621. <Input
  2622. placeholder="请输入职称"
  2623. style={{ width: 200 }}
  2624. value={this.state.title}
  2625. onChange={(e) => {
  2626. this.setState({
  2627. title: e.target.value,
  2628. });
  2629. }}
  2630. />
  2631. </FormItem>
  2632. </div>
  2633. <div className="clearfix">
  2634. <FormItem
  2635. className="half-item"
  2636. labelCol={{ span: 6 }}
  2637. wrapperCol={{ span: 30 }}
  2638. label="备注"
  2639. >
  2640. <Input
  2641. placeholder="请输入备注"
  2642. style={{ width: 200 }}
  2643. value={this.state.entryRemarks}
  2644. onChange={(e) => {
  2645. this.setState({
  2646. entryRemarks: e.target.value,
  2647. });
  2648. }}
  2649. />
  2650. </FormItem>
  2651. </div>
  2652. <div
  2653. className="clearfix"
  2654. style={{ paddingLeft: 70, marginBottom: 10 }}
  2655. >
  2656. <div style={{ marginBottom: 10 }}>附件:</div>
  2657. <PicModal
  2658. remarks={this.picToArr(this.state.annexName)}
  2659. picUrl={this.picToArr(this.state.annexUrl)}
  2660. remove={this.ruzhiRemove}
  2661. />
  2662. <Button onClick={this.addPic}>添加附件</Button>
  2663. </div>
  2664. <Button
  2665. type="primary"
  2666. shape="round"
  2667. size="large"
  2668. style={{
  2669. position: "relative",
  2670. left: "50%",
  2671. transform: "translateX(-50%)",
  2672. }}
  2673. onClick={this.editRuzi}
  2674. >
  2675. 保存
  2676. </Button>
  2677. <AddPicModal
  2678. cancel={this.addPicModalCancel}
  2679. add={this.add()}
  2680. visible={this.state.addPicModal}
  2681. />
  2682. </Spin>
  2683. </Modal>
  2684. <Modal
  2685. visible={this.state.visible}
  2686. footer={null}
  2687. width={1000}
  2688. onCancel={() => {
  2689. this.loadData();
  2690. this.cancel();
  2691. }}
  2692. >
  2693. <Spin spinning={this.state.loading}>
  2694. <h2
  2695. style={{
  2696. textAlign: "center",
  2697. paddingBottom: 10,
  2698. marginBottom: 10,
  2699. }}
  2700. >
  2701. {this.state.ModalData.name + "人事档案"}
  2702. </h2>
  2703. <ul className="peo-table">
  2704. {this.state.table.map((item) => {
  2705. let value = item.value;
  2706. if (item.render) {
  2707. let fn = item.render;
  2708. return (
  2709. <li>
  2710. <div className="peo-left">{item.key}</div>
  2711. <Tooltip
  2712. placement="top"
  2713. title={fn(
  2714. this.state.ModalData[value],
  2715. value == "son" ? this.state.ModalData.girl : 0
  2716. )}
  2717. >
  2718. <div className="peo-right">
  2719. {fn(
  2720. this.state.ModalData[value],
  2721. value == "son" ? this.state.ModalData.girl : 0
  2722. )}
  2723. </div>
  2724. </Tooltip>
  2725. </li>
  2726. );
  2727. }
  2728. return (
  2729. <li>
  2730. <div className="peo-left">{item.key}</div>
  2731. <Tooltip
  2732. placement="top"
  2733. title={this.state.ModalData[item.value]}
  2734. >
  2735. <div className="peo-right">
  2736. {this.state.ModalData[value] &&
  2737. this.state.ModalData[value].length > 10
  2738. ? this.state.ModalData[value].substring(0, 10) + "..."
  2739. : this.state.ModalData[value]}
  2740. </div>
  2741. </Tooltip>
  2742. </li>
  2743. );
  2744. })}
  2745. </ul>
  2746. <div className="title-peo">
  2747. <span>任职信息</span>
  2748. <Button
  2749. type="primary"
  2750. onClick={(e) => {
  2751. this.stayModal(this.state.ModalData.id);
  2752. }}
  2753. style={{ position: "absolute", right: 0, height: 30 }}
  2754. >
  2755. 修改任职信息
  2756. </Button>
  2757. </div>
  2758. <div className="clearfix">
  2759. <FormItem
  2760. className="half-item"
  2761. labelCol={{ span: 6 }}
  2762. wrapperCol={{ span: 30 }}
  2763. label="员工状态"
  2764. >
  2765. {this.state.ModalData.statusName}
  2766. </FormItem>
  2767. <FormItem
  2768. className="half-item"
  2769. labelCol={{ span: 6 }}
  2770. wrapperCol={{ span: 30 }}
  2771. label="所属系统"
  2772. >
  2773. {this.state.ModalData.systemName}
  2774. </FormItem>
  2775. </div>
  2776. <div className="clearfix">
  2777. <FormItem
  2778. className="half-item"
  2779. labelCol={{ span: 6 }}
  2780. wrapperCol={{ span: 30 }}
  2781. label="工作性质"
  2782. >
  2783. {this.jobStatus(
  2784. this.state.ModalData.jobNature,
  2785. this.state.ModalData.jobNatureRemarks
  2786. )}
  2787. </FormItem>
  2788. <FormItem
  2789. className="half-item"
  2790. labelCol={{ span: 6 }}
  2791. wrapperCol={{ span: 30 }}
  2792. label="工龄"
  2793. >
  2794. {this.state.ModalData.workingYear}
  2795. </FormItem>
  2796. </div>
  2797. <div className="clearfix">
  2798. <FormItem
  2799. className="half-item"
  2800. labelCol={{ span: 6 }}
  2801. wrapperCol={{ span: 30 }}
  2802. label="入职时间"
  2803. >
  2804. {this.state.ModalData.entryTimes}
  2805. </FormItem>
  2806. <FormItem
  2807. className="half-item"
  2808. labelCol={{ span: 6 }}
  2809. wrapperCol={{ span: 30 }}
  2810. label="转正时间"
  2811. >
  2812. {this.state.ModalData.promotionTimes}
  2813. </FormItem>
  2814. </div>
  2815. <div className="clearfix">
  2816. <FormItem
  2817. className="half-item"
  2818. labelCol={{ span: 6 }}
  2819. wrapperCol={{ span: 30 }}
  2820. label="所属公司"
  2821. >
  2822. {this.state.ModalData.depName}
  2823. </FormItem>
  2824. <FormItem
  2825. className="half-item"
  2826. labelCol={{ span: 6 }}
  2827. wrapperCol={{ span: 30 }}
  2828. label="级别"
  2829. >
  2830. {this.state.ModalData.lvlName}
  2831. </FormItem>
  2832. </div>
  2833. <div className="clearfix">
  2834. <FormItem
  2835. className="half-item"
  2836. labelCol={{ span: 6 }}
  2837. wrapperCol={{ span: 30 }}
  2838. label="职位"
  2839. >
  2840. {this.state.ModalData.jobsName}
  2841. </FormItem>
  2842. <FormItem
  2843. className="half-item"
  2844. labelCol={{ span: 6 }}
  2845. wrapperCol={{ span: 30 }}
  2846. label="岗位津贴"
  2847. >
  2848. {this.state.ModalData.allowance}
  2849. </FormItem>
  2850. </div>
  2851. <div className="clearfix">
  2852. <FormItem
  2853. className="half-item"
  2854. labelCol={{ span: 6 }}
  2855. wrapperCol={{ span: 30 }}
  2856. label="星级"
  2857. >
  2858. {this.state.ModalData.starName}
  2859. </FormItem>
  2860. </div>
  2861. <div className="title-peo">
  2862. <span>联系信息</span>
  2863. <Button
  2864. type="primary"
  2865. onClick={this.phoneModal}
  2866. style={{ position: "absolute", right: 0, height: 30 }}
  2867. >
  2868. 修改联系信息
  2869. </Button>
  2870. </div>
  2871. <div className="clearfix">
  2872. <FormItem
  2873. className="half-item"
  2874. labelCol={{ span: 6 }}
  2875. wrapperCol={{ span: 30 }}
  2876. label="手机号码"
  2877. >
  2878. {this.state.ModalData.mobile}
  2879. </FormItem>
  2880. <FormItem
  2881. className="half-item"
  2882. labelCol={{ span: 6 }}
  2883. wrapperCol={{ span: 30 }}
  2884. label="电话"
  2885. >
  2886. {this.state.ModalData.fixedTel}
  2887. </FormItem>
  2888. </div>
  2889. {this.state.ModalData.contactList &&
  2890. this.state.ModalData.contactList.length > 0 ? (
  2891. this.state.ModalData.contactList.map((item, index) => {
  2892. return (
  2893. <div className="clearfix">
  2894. <FormItem
  2895. className="half-item"
  2896. labelCol={{ span: 6 }}
  2897. wrapperCol={{ span: 30 }}
  2898. label={"紧急联系人" + (index + 1)}
  2899. >
  2900. {item.emergencyContact}
  2901. </FormItem>
  2902. <FormItem
  2903. className="half-item"
  2904. labelCol={{ span: 6 }}
  2905. wrapperCol={{ span: 30 }}
  2906. label={"紧急联系人" + (index + 1) + "电话"}
  2907. >
  2908. {item.emergencyMobile}
  2909. </FormItem>
  2910. </div>
  2911. );
  2912. })
  2913. ) : (
  2914. <div
  2915. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  2916. >
  2917. 暂无紧急联系人信息
  2918. </div>
  2919. )}
  2920. <div className="title-peo">
  2921. <span>入职资料</span>
  2922. <Button
  2923. type="primary"
  2924. onClick={this.entryModal}
  2925. style={{ position: "absolute", right: 0, height: 30 }}
  2926. >
  2927. 修改入职信息
  2928. </Button>
  2929. </div>
  2930. <div className="clearfix">
  2931. <FormItem
  2932. className="half-item"
  2933. labelCol={{ span: 6 }}
  2934. wrapperCol={{ span: 30 }}
  2935. label="毕业学校"
  2936. >
  2937. {this.state.ModalData.personnelEntry
  2938. ? this.state.ModalData.personnelEntry.school
  2939. : ""}
  2940. </FormItem>
  2941. <FormItem
  2942. className="half-item"
  2943. labelCol={{ span: 6 }}
  2944. wrapperCol={{ span: 30 }}
  2945. label="学历"
  2946. >
  2947. {this.state.ModalData.personnelEntry
  2948. ? this.educationStatus(
  2949. this.state.ModalData.personnelEntry.education
  2950. )
  2951. : ""}
  2952. </FormItem>
  2953. </div>
  2954. <div className="clearfix">
  2955. <FormItem
  2956. className="half-item"
  2957. labelCol={{ span: 6 }}
  2958. wrapperCol={{ span: 30 }}
  2959. label="所学专业"
  2960. >
  2961. {this.state.ModalData.personnelEntry
  2962. ? this.state.ModalData.personnelEntry.major
  2963. : ""}
  2964. </FormItem>
  2965. <FormItem
  2966. className="half-item"
  2967. labelCol={{ span: 6 }}
  2968. wrapperCol={{ span: 30 }}
  2969. label="职称"
  2970. >
  2971. {this.state.ModalData.personnelEntry
  2972. ? this.state.ModalData.personnelEntry.title
  2973. : ""}
  2974. </FormItem>
  2975. </div>
  2976. <div className="clearfix" style={{ paddingLeft: 70 }}>
  2977. <div style={{ marginBottom: 10 }}>附件:</div>
  2978. <PicModal
  2979. remarks={
  2980. this.state.ModalData.personnelEntry
  2981. ? this.picToArr(
  2982. this.state.ModalData.personnelEntry.annexName
  2983. )
  2984. : []
  2985. }
  2986. picUrl={
  2987. this.state.ModalData.personnelEntry
  2988. ? this.picToArr(
  2989. this.state.ModalData.personnelEntry.annexUrl
  2990. )
  2991. : []
  2992. }
  2993. />
  2994. </div>
  2995. <div className="title-peo">
  2996. <span>晋升情况</span>
  2997. <Button
  2998. type="primary"
  2999. onClick={(e) => {
  3000. this.upgradeModal(true);
  3001. }}
  3002. style={{ position: "absolute", right: 0, height: 30 }}
  3003. >
  3004. 新增晋升信息
  3005. </Button>
  3006. </div>
  3007. {this.state.ModalData.promotionList &&
  3008. this.state.ModalData.promotionList.length > 0 ? (
  3009. this.state.ModalData.promotionList.map((item, index) => {
  3010. return (
  3011. <div
  3012. style={{
  3013. width: "100%",
  3014. borderBottom: "1px dashed #ccc",
  3015. position: "relative",
  3016. }}
  3017. >
  3018. <Button
  3019. style={{
  3020. position: "absolute",
  3021. right: "50%",
  3022. bottom: 10,
  3023. transform: "translateX(50%)",
  3024. }}
  3025. type="primary"
  3026. onClick={(e) => {
  3027. this.upgradeModal(false, index);
  3028. }}
  3029. >
  3030. 修改信息
  3031. </Button>
  3032. <div className="clearfix">
  3033. <FormItem
  3034. className="half-item"
  3035. labelCol={{ span: 6 }}
  3036. wrapperCol={{ span: 30 }}
  3037. label="晋升职位"
  3038. >
  3039. {item.oldJobsName + "--->" + item.newJobsName}
  3040. </FormItem>
  3041. <FormItem
  3042. className="half-item"
  3043. labelCol={{ span: 6 }}
  3044. wrapperCol={{ span: 30 }}
  3045. label="晋升等级"
  3046. >
  3047. {item.oldLvlName + "--->" + item.newLvlName}
  3048. </FormItem>
  3049. </div>
  3050. <div className="clearfix">
  3051. <FormItem
  3052. className="half-item"
  3053. labelCol={{ span: 6 }}
  3054. wrapperCol={{ span: 30 }}
  3055. label="晋升时间"
  3056. >
  3057. {item.promotionTimes}
  3058. </FormItem>
  3059. </div>
  3060. <div className="clearfix">
  3061. <FormItem
  3062. className="half-item"
  3063. labelCol={{ span: 6 }}
  3064. wrapperCol={{ span: 30 }}
  3065. label="晋升备注"
  3066. >
  3067. {item.promotionRemarks}
  3068. </FormItem>
  3069. </div>
  3070. <div
  3071. className="clearfix"
  3072. style={{ paddingLeft: 70, marginBottom: 50 }}
  3073. >
  3074. <div style={{ marginBottom: 10 }}>附件:</div>
  3075. <PicModal
  3076. remarks={this.picToArr(item.annexName)}
  3077. picUrl={this.picToArr(item.annexUrl)}
  3078. />
  3079. </div>
  3080. </div>
  3081. );
  3082. })
  3083. ) : (
  3084. <div
  3085. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  3086. >
  3087. 暂无晋升情况
  3088. </div>
  3089. )}
  3090. <div className="title-peo">
  3091. <span>合同情况</span>
  3092. <Button
  3093. type="primary"
  3094. onClick={(e) => {
  3095. this.contractModal(true);
  3096. }}
  3097. style={{ position: "absolute", right: 0, height: 30 }}
  3098. >
  3099. 新增合同信息
  3100. </Button>
  3101. </div>
  3102. {this.state.ModalData.contractList &&
  3103. this.state.ModalData.contractList.length > 0 ? (
  3104. this.state.ModalData.contractList.map((item, index) => {
  3105. return (
  3106. <div
  3107. style={{
  3108. width: "100%",
  3109. borderBottom: "1px dashed #ccc",
  3110. position: "relative",
  3111. }}
  3112. >
  3113. <Button
  3114. style={{
  3115. position: "absolute",
  3116. right: "50%",
  3117. bottom: 10,
  3118. transform: "translateX(50%)",
  3119. }}
  3120. type="primary"
  3121. onClick={(e) => {
  3122. this.contractModal(false, index);
  3123. }}
  3124. >
  3125. 修改信息
  3126. </Button>
  3127. <div className="clearfix">
  3128. <FormItem
  3129. className="half-item"
  3130. labelCol={{ span: 6 }}
  3131. wrapperCol={{ span: 30 }}
  3132. label="签订时间"
  3133. >
  3134. {item.startTimes}
  3135. </FormItem>
  3136. <FormItem
  3137. className="half-item"
  3138. labelCol={{ span: 6 }}
  3139. wrapperCol={{ span: 30 }}
  3140. label="到期时间"
  3141. >
  3142. {item.endTimes}
  3143. </FormItem>
  3144. </div>
  3145. <div className="clearfix">
  3146. <FormItem
  3147. className="half-item"
  3148. labelCol={{ span: 6 }}
  3149. wrapperCol={{ span: 30 }}
  3150. label="备注"
  3151. >
  3152. {item.contractRemarks}
  3153. </FormItem>
  3154. </div>
  3155. <div
  3156. className="clearfix"
  3157. style={{ paddingLeft: 70, marginBottom: 50 }}
  3158. >
  3159. <div style={{ marginBottom: 10 }}>附件:</div>
  3160. <PicModal
  3161. remarks={this.picToArr(item.annexName)}
  3162. picUrl={this.picToArr(item.annexUrl)}
  3163. />
  3164. </div>
  3165. </div>
  3166. );
  3167. })
  3168. ) : (
  3169. <div
  3170. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  3171. >
  3172. 暂无合同情况
  3173. </div>
  3174. )}
  3175. <div className="title-peo">
  3176. <span>奖惩情况</span>
  3177. <Button
  3178. type="primary"
  3179. onClick={(e) => {
  3180. this.chooseModal(true);
  3181. }}
  3182. style={{ position: "absolute", right: 0, height: 30 }}
  3183. >
  3184. 新增奖惩信息
  3185. </Button>
  3186. </div>
  3187. {this.state.ModalData.chooseList &&
  3188. this.state.ModalData.chooseList.length > 0 ? (
  3189. this.state.ModalData.chooseList.map((item, index) => {
  3190. return (
  3191. <div
  3192. style={{
  3193. width: "100%",
  3194. borderBottom: "1px dashed #ccc",
  3195. position: "relative",
  3196. }}
  3197. >
  3198. <Button
  3199. style={{
  3200. position: "absolute",
  3201. right: "50%",
  3202. bottom: 10,
  3203. transform: "translateX(50%)",
  3204. }}
  3205. type="primary"
  3206. onClick={(e) => {
  3207. this.chooseModal(false, index);
  3208. }}
  3209. >
  3210. 修改信息
  3211. </Button>
  3212. <div className="clearfix">
  3213. <FormItem
  3214. className="half-item"
  3215. labelCol={{ span: 6 }}
  3216. wrapperCol={{ span: 30 }}
  3217. label={"状态"}
  3218. >
  3219. {item.chooseStatus == 0 ? "奖励" : "惩罚"}
  3220. </FormItem>
  3221. <FormItem
  3222. className="half-item"
  3223. labelCol={{ span: 6 }}
  3224. wrapperCol={{ span: 30 }}
  3225. label="时间"
  3226. >
  3227. {item.effectTimes}
  3228. </FormItem>
  3229. </div>
  3230. <div className="clearfix">
  3231. <FormItem
  3232. className="half-item"
  3233. labelCol={{ span: 6 }}
  3234. wrapperCol={{ span: 30 }}
  3235. label={"内容"}
  3236. >
  3237. {item.chooseRemarks}
  3238. </FormItem>
  3239. </div>
  3240. <div
  3241. className="clearfix"
  3242. style={{ paddingLeft: 70, marginBottom: 50 }}
  3243. >
  3244. <div style={{ marginBottom: 10 }}>附件:</div>
  3245. <PicModal
  3246. remarks={this.picToArr(item.annexName)}
  3247. picUrl={this.picToArr(item.annexUrl)}
  3248. />
  3249. </div>
  3250. </div>
  3251. );
  3252. })
  3253. ) : (
  3254. <div
  3255. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  3256. >
  3257. 暂无奖惩情况
  3258. </div>
  3259. )}
  3260. <div className="title-peo">
  3261. <span>离职情况</span>
  3262. <Button
  3263. type="primary"
  3264. onClick={(e) => {
  3265. this.quitModal(true);
  3266. }}
  3267. style={{ position: "absolute", right: 0, height: 30 }}
  3268. >
  3269. 新增离职信息
  3270. </Button>
  3271. </div>
  3272. {this.state.ModalData.quitList &&
  3273. this.state.ModalData.quitList.length > 0 ? (
  3274. this.state.ModalData.quitList.map((item, index) => {
  3275. return (
  3276. <div
  3277. style={{ width: "100%", borderBottom: "1px dashed #ccc", position: "relative" }}
  3278. >
  3279. <Button
  3280. style={{
  3281. position: "absolute",
  3282. right: "50%",
  3283. bottom: 10,
  3284. transform: "translateX(50%)",
  3285. }}
  3286. type="primary"
  3287. onClick={(e) => {
  3288. this.quitModal(false, index);
  3289. }}
  3290. >
  3291. 修改信息
  3292. </Button>
  3293. <div className="clearfix">
  3294. <FormItem
  3295. className="half-item"
  3296. labelCol={{ span: 6 }}
  3297. wrapperCol={{ span: 30 }}
  3298. label="离职时间"
  3299. >
  3300. {item.effectTimes}
  3301. </FormItem>
  3302. <FormItem
  3303. className="half-item"
  3304. labelCol={{ span: 6 }}
  3305. wrapperCol={{ span: 30 }}
  3306. label="离职备注"
  3307. >
  3308. {item.quitRemarks}
  3309. </FormItem>
  3310. </div>
  3311. <div
  3312. className="clearfix"
  3313. style={{ paddingLeft: 70, marginBottom: 50 }}
  3314. >
  3315. <div style={{ marginBottom: 10 }}>附件:</div>
  3316. <PicModal
  3317. remarks={this.picToArr(item.annexName)}
  3318. picUrl={this.picToArr(item.annexUrl)}
  3319. />
  3320. </div>
  3321. </div>
  3322. );
  3323. })
  3324. ) : (
  3325. <div
  3326. style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
  3327. >
  3328. 暂无奖惩情况
  3329. </div>
  3330. )}
  3331. </Spin>
  3332. </Modal>
  3333. <Modal
  3334. visible={this.state.upgradeVisible}
  3335. footer={null}
  3336. width={800}
  3337. onCancel={() => {
  3338. this.loadData();
  3339. this.upgradeCancel();
  3340. }}
  3341. >
  3342. <Spin spinning={this.state.loading}>
  3343. <h3
  3344. style={{
  3345. textAlign: "center",
  3346. paddingBottom: 10,
  3347. marginBottom: 10,
  3348. }}
  3349. >
  3350. 晋升信息
  3351. </h3>
  3352. <div>
  3353. <div className="clearfix">
  3354. <FormItem
  3355. className="half-item"
  3356. labelCol={{ span: 6 }}
  3357. wrapperCol={{ span: 30 }}
  3358. label="当前职位"
  3359. >
  3360. <Select
  3361. placeholder="选择职位"
  3362. style={{ width: 200, marginRight: 10 }}
  3363. value={this.state.promotionList.oldJobs}
  3364. onChange={(e) => {
  3365. this.setState({ jobs: e, star: [] });
  3366. this.getList();
  3367. this.state.promotionList.oldJobs = e;
  3368. this.state.promotionList.oldLvl = [];
  3369. this.setState({
  3370. promotionList: this.state.promotionList,
  3371. });
  3372. console.log(this.state.promotionList);
  3373. }}
  3374. >
  3375. <Option value="1">员工</Option>
  3376. <Option value="2">试用营销员</Option>
  3377. <Option value="3">试用营销储备经理</Option>
  3378. <Option value="4">营销经理</Option>
  3379. <Option value="5">总监合伙人</Option>
  3380. <Option value="6">技术助理</Option>
  3381. <Option value="7">咨询师</Option>
  3382. <Option value="8">咨询师主管</Option>
  3383. <Option value="9">咨询师经理</Option>
  3384. <Option value="10">高级经理</Option>
  3385. </Select>
  3386. </FormItem>
  3387. <FormItem
  3388. className="half-item"
  3389. labelCol={{ span: 6 }}
  3390. wrapperCol={{ span: 30 }}
  3391. label="当前星级"
  3392. >
  3393. <Select
  3394. placeholder="请选择所属星级"
  3395. style={{ width: 200 }}
  3396. onChange={(e) => {
  3397. this.state.promotionList.oldLvl = e;
  3398. this.setState({
  3399. promotionList: this.state.promotionList,
  3400. });
  3401. }}
  3402. value={this.state.promotionList.oldLvl}
  3403. >
  3404. {this.state.starArr.map((item, index) => {
  3405. return <Option value={item.star}>{item.starName}</Option>;
  3406. })}
  3407. </Select>
  3408. </FormItem>
  3409. </div>
  3410. <div className="clearfix">
  3411. <FormItem
  3412. className="half-item"
  3413. labelCol={{ span: 6 }}
  3414. wrapperCol={{ span: 30 }}
  3415. label="晋升后职位"
  3416. >
  3417. <Select
  3418. placeholder="选择职位"
  3419. style={{ width: 200, marginRight: 10 }}
  3420. value={this.state.promotionList.newJobs}
  3421. onChange={(e) => {
  3422. this.setState({ jobss: e });
  3423. this.getLists();
  3424. this.state.promotionList.newJobs = e;
  3425. this.state.promotionList.newLvl = [];
  3426. this.setState({
  3427. promotionList: this.state.promotionList,
  3428. });
  3429. }}
  3430. >
  3431. <Option value="1">员工</Option>
  3432. <Option value="2">试用营销员</Option>
  3433. <Option value="3">试用营销储备经理</Option>
  3434. <Option value="4">营销经理</Option>
  3435. <Option value="5">总监合伙人</Option>
  3436. <Option value="6">技术助理</Option>
  3437. <Option value="7">咨询师</Option>
  3438. <Option value="8">咨询师主管</Option>
  3439. <Option value="9">咨询师经理</Option>
  3440. <Option value="10">高级经理</Option>
  3441. </Select>
  3442. </FormItem>
  3443. <FormItem
  3444. className="half-item"
  3445. labelCol={{ span: 6 }}
  3446. wrapperCol={{ span: 30 }}
  3447. label="晋升后星级"
  3448. >
  3449. <Select
  3450. placeholder="请选择所属星级"
  3451. style={{ width: 200 }}
  3452. onChange={(e) => {
  3453. this.state.promotionList.newLvl = e;
  3454. this.setState({
  3455. promotionList: this.state.promotionList,
  3456. });
  3457. }}
  3458. value={this.state.promotionList.newLvl}
  3459. >
  3460. {this.state.starArrs.map((item, index) => {
  3461. return <Option value={item.star}>{item.starName}</Option>;
  3462. })}
  3463. </Select>
  3464. </FormItem>
  3465. </div>
  3466. <div className="clearfix">
  3467. <FormItem
  3468. className="half-item"
  3469. labelCol={{ span: 6 }}
  3470. wrapperCol={{ span: 30 }}
  3471. label="晋升时间"
  3472. >
  3473. <DatePicker
  3474. value={
  3475. this.state.promotionList.promotionTimes
  3476. ? moment(this.state.promotionList.promotionTimes)
  3477. : null
  3478. }
  3479. style={{ width: 200 }}
  3480. onChange={(e, t) => {
  3481. this.state.promotionList.promotionTimes = t;
  3482. this.setState({
  3483. promotionList: this.state.promotionList,
  3484. });
  3485. }}
  3486. />
  3487. </FormItem>
  3488. </div>
  3489. <div className="clearfix">
  3490. <FormItem
  3491. className="half-item"
  3492. labelCol={{ span: 6 }}
  3493. wrapperCol={{ span: 30 }}
  3494. label="备注"
  3495. >
  3496. <Input
  3497. placeholder="请输入备注"
  3498. style={{ width: 200 }}
  3499. value={this.state.promotionList.promotionRemarks}
  3500. onChange={(e) => {
  3501. this.state.promotionList.promotionRemarks =
  3502. e.target.value;
  3503. this.setState({
  3504. promotionList: this.state.promotionList,
  3505. });
  3506. }}
  3507. />
  3508. </FormItem>
  3509. </div>
  3510. <div
  3511. className="clearfix"
  3512. style={{ paddingLeft: 70, marginBottom: 10 }}
  3513. >
  3514. <div style={{ marginBottom: 10 }}>附件:</div>
  3515. <PicModal
  3516. remarks={this.picToArr(this.state.promotionList.annexName)}
  3517. picUrl={this.picToArr(this.state.promotionList.annexUrl)}
  3518. remove={this.jinshengRemove}
  3519. />
  3520. <Button onClick={this.addPic}>添加附件</Button>
  3521. </div>
  3522. </div>
  3523. <Button
  3524. type="primary"
  3525. shape="round"
  3526. size="large"
  3527. style={{
  3528. position: "relative",
  3529. left: "50%",
  3530. transform: "translateX(-50%)",
  3531. }}
  3532. onClick={this.editUpgrade}
  3533. >
  3534. 保存
  3535. </Button>
  3536. <AddPicModal
  3537. cancel={this.addPicModalCancel}
  3538. add={this.add()}
  3539. visible={this.state.addPicModal}
  3540. />
  3541. </Spin>
  3542. </Modal>
  3543. <Modal
  3544. visible={this.state.contractVisible}
  3545. footer={null}
  3546. width={800}
  3547. onCancel={() => {
  3548. this.loadData();
  3549. this.contractCancel();
  3550. }}
  3551. >
  3552. <Spin spinning={this.state.loading}>
  3553. <h3
  3554. style={{
  3555. textAlign: "center",
  3556. paddingBottom: 10,
  3557. marginBottom: 10,
  3558. }}
  3559. >
  3560. 合同信息
  3561. </h3>
  3562. <div>
  3563. <div className="clearfix">
  3564. <FormItem
  3565. className="half-item"
  3566. labelCol={{ span: 6 }}
  3567. wrapperCol={{ span: 30 }}
  3568. label="签订时间"
  3569. >
  3570. <DatePicker
  3571. value={
  3572. this.state.contractList.startTimes
  3573. ? moment(this.state.contractList.startTimes)
  3574. : null
  3575. }
  3576. style={{ width: 200 }}
  3577. onChange={(e, t) => {
  3578. this.state.contractList.startTimes = t;
  3579. this.setState({
  3580. contractList: this.state.contractList,
  3581. });
  3582. }}
  3583. />
  3584. </FormItem>
  3585. <FormItem
  3586. className="half-item"
  3587. labelCol={{ span: 6 }}
  3588. wrapperCol={{ span: 30 }}
  3589. label="到期时间"
  3590. >
  3591. <DatePicker
  3592. value={
  3593. this.state.contractList.endTimes
  3594. ? moment(this.state.contractList.endTimes)
  3595. : null
  3596. }
  3597. style={{ width: 200 }}
  3598. onChange={(e, t) => {
  3599. this.state.contractList.endTimes = t;
  3600. this.setState({
  3601. contractList: this.state.contractList,
  3602. });
  3603. }}
  3604. />
  3605. </FormItem>
  3606. </div>
  3607. <div className="clearfix">
  3608. <FormItem
  3609. className="half-item"
  3610. labelCol={{ span: 6 }}
  3611. wrapperCol={{ span: 30 }}
  3612. label="备注"
  3613. >
  3614. <Input
  3615. placeholder="请输入备注"
  3616. style={{ width: 200 }}
  3617. value={this.state.contractList.contractRemarks}
  3618. onChange={(e) => {
  3619. this.state.contractList.contractRemarks = e.target.value;
  3620. this.setState({
  3621. contractList: this.state.contractList,
  3622. });
  3623. }}
  3624. />
  3625. </FormItem>
  3626. </div>
  3627. <div
  3628. className="clearfix"
  3629. style={{ paddingLeft: 70, marginBottom: 10 }}
  3630. >
  3631. <div style={{ marginBottom: 10 }}>附件:</div>
  3632. <PicModal
  3633. remarks={this.picToArr(this.state.contractList.annexName)}
  3634. picUrl={this.picToArr(this.state.contractList.annexUrl)}
  3635. remove={this.contractRemove}
  3636. />
  3637. <Button onClick={this.addPic}>添加附件</Button>
  3638. </div>
  3639. </div>
  3640. <Button
  3641. type="primary"
  3642. shape="round"
  3643. size="large"
  3644. style={{
  3645. position: "relative",
  3646. left: "50%",
  3647. transform: "translateX(-50%)",
  3648. }}
  3649. onClick={this.editContract}
  3650. >
  3651. 保存
  3652. </Button>
  3653. <AddPicModal
  3654. cancel={this.addPicModalCancel}
  3655. add={this.add()}
  3656. visible={this.state.addPicModal}
  3657. />
  3658. </Spin>
  3659. </Modal>
  3660. <Modal
  3661. visible={this.state.chooseVisible}
  3662. footer={null}
  3663. width={800}
  3664. onCancel={() => {
  3665. this.loadData();
  3666. this.chooseCancel();
  3667. }}
  3668. >
  3669. <Spin spinning={this.state.loading}>
  3670. <h3
  3671. style={{
  3672. textAlign: "center",
  3673. paddingBottom: 10,
  3674. marginBottom: 10,
  3675. }}
  3676. >
  3677. 奖惩信息
  3678. </h3>
  3679. <div>
  3680. <div className="clearfix">
  3681. <FormItem
  3682. className="half-item"
  3683. labelCol={{ span: 6 }}
  3684. wrapperCol={{ span: 30 }}
  3685. label="类型"
  3686. >
  3687. <Radio.Group
  3688. onChange={(e) => {
  3689. this.state.chooseList.chooseStatus = e.target.value;
  3690. this.setState({ chooseList: this.state.chooseList });
  3691. }}
  3692. value={this.state.chooseList.chooseStatus}
  3693. >
  3694. <Radio value={0}>奖励</Radio>
  3695. <Radio value={1}>罚款</Radio>
  3696. </Radio.Group>
  3697. </FormItem>
  3698. <FormItem
  3699. className="half-item"
  3700. labelCol={{ span: 6 }}
  3701. wrapperCol={{ span: 30 }}
  3702. label="时间"
  3703. >
  3704. <DatePicker
  3705. value={
  3706. this.state.chooseList.effectTimes
  3707. ? moment(this.state.chooseList.effectTimes)
  3708. : null
  3709. }
  3710. style={{ width: 200 }}
  3711. onChange={(e, t) => {
  3712. this.state.chooseList.effectTimes = t;
  3713. this.setState({
  3714. chooseList: this.state.chooseList,
  3715. });
  3716. }}
  3717. />
  3718. </FormItem>
  3719. </div>
  3720. <div className="clearfix">
  3721. <FormItem
  3722. className="half-item"
  3723. labelCol={{ span: 6 }}
  3724. wrapperCol={{ span: 30 }}
  3725. label="内容"
  3726. >
  3727. <Input
  3728. placeholder="请输入内容"
  3729. style={{ width: 200 }}
  3730. value={this.state.chooseList.chooseRemarks}
  3731. onChange={(e) => {
  3732. this.state.chooseList.chooseRemarks = e.target.value;
  3733. this.setState({
  3734. chooseList: this.state.chooseList,
  3735. });
  3736. }}
  3737. />
  3738. </FormItem>
  3739. </div>
  3740. <div
  3741. className="clearfix"
  3742. style={{ paddingLeft: 70, marginBottom: 10 }}
  3743. >
  3744. <div style={{ marginBottom: 10 }}>附件:</div>
  3745. <PicModal
  3746. remarks={this.picToArr(this.state.chooseList.annexName)}
  3747. picUrl={this.picToArr(this.state.chooseList.annexUrl)}
  3748. remove={this.chooseRemove}
  3749. />
  3750. <Button onClick={this.addPic}>添加附件</Button>
  3751. </div>
  3752. </div>
  3753. <Button
  3754. type="primary"
  3755. shape="round"
  3756. size="large"
  3757. style={{
  3758. position: "relative",
  3759. left: "50%",
  3760. transform: "translateX(-50%)",
  3761. }}
  3762. onClick={this.editChoose}
  3763. >
  3764. 保存
  3765. </Button>
  3766. <AddPicModal
  3767. cancel={this.addPicModalCancel}
  3768. add={this.add()}
  3769. visible={this.state.addPicModal}
  3770. />
  3771. </Spin>
  3772. </Modal>
  3773. <Modal
  3774. visible={this.state.quitVisible}
  3775. footer={null}
  3776. width={800}
  3777. onCancel={() => {
  3778. this.loadData();
  3779. this.quitCancel();
  3780. }}
  3781. >
  3782. <Spin spinning={this.state.loading}>
  3783. <h3
  3784. style={{
  3785. textAlign: "center",
  3786. paddingBottom: 10,
  3787. marginBottom: 10,
  3788. }}
  3789. >
  3790. 离职信息
  3791. </h3>
  3792. <div>
  3793. <div className="clearfix">
  3794. <FormItem
  3795. className="half-item"
  3796. labelCol={{ span: 6 }}
  3797. wrapperCol={{ span: 30 }}
  3798. label="离职时间"
  3799. >
  3800. <DatePicker
  3801. value={
  3802. this.state.quitList.effectTimes
  3803. ? moment(this.state.quitList.effectTimes)
  3804. : null
  3805. }
  3806. style={{ width: 200 }}
  3807. onChange={(e, t) => {
  3808. this.state.quitList.effectTimes = t;
  3809. this.setState({
  3810. quitList: this.state.quitList,
  3811. });
  3812. }}
  3813. />
  3814. </FormItem>
  3815. </div>
  3816. <div className="clearfix">
  3817. <FormItem
  3818. className="half-item"
  3819. labelCol={{ span: 6 }}
  3820. wrapperCol={{ span: 30 }}
  3821. label="备注"
  3822. >
  3823. <Input
  3824. placeholder="请输入备注"
  3825. style={{ width: 200 }}
  3826. value={this.state.quitList.quitRemarks}
  3827. onChange={(e) => {
  3828. this.state.quitList.quitRemarks = e.target.value;
  3829. this.setState({
  3830. quitList: this.state.quitList,
  3831. });
  3832. }}
  3833. />
  3834. </FormItem>
  3835. </div>
  3836. <div
  3837. className="clearfix"
  3838. style={{ paddingLeft: 70, marginBottom: 10 }}
  3839. >
  3840. <div style={{ marginBottom: 10 }}>附件:</div>
  3841. <PicModal
  3842. remarks={this.picToArr(this.state.quitList.annexName)}
  3843. picUrl={this.picToArr(this.state.quitList.annexUrl)}
  3844. remove={this.quitRemove}
  3845. />
  3846. <Button onClick={this.addPic}>添加附件</Button>
  3847. </div>
  3848. </div>
  3849. <Button
  3850. type="primary"
  3851. shape="round"
  3852. size="large"
  3853. style={{
  3854. position: "relative",
  3855. left: "50%",
  3856. transform: "translateX(-50%)",
  3857. }}
  3858. onClick={this.editQuit}
  3859. >
  3860. 保存
  3861. </Button>
  3862. <AddPicModal
  3863. cancel={this.addPicModalCancel}
  3864. add={this.add()}
  3865. visible={this.state.addPicModal}
  3866. />
  3867. </Spin>
  3868. </Modal>
  3869. </div>
  3870. );
  3871. },
  3872. });
  3873. export default PersonnelAll;