organization.jsx 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457
  1. import React from 'react';
  2. import ReactDom from 'react-dom';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import '../content.less';
  6. import { citySelect } from '../../../NewDicProvinceList';
  7. import {
  8. getNewDiccityArr,
  9. } from "@/tools.js";
  10. import { Form, Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload, Popconfirm, AutoComplete, Tabs } from 'antd';
  11. import { patternOrganization, conditionOrganization } from '../../../dataDic.js';
  12. import { getPattern, getCondition } from '../../../tools.js';
  13. import { ChooseList } from "../../order/orderNew/chooseList";
  14. const confirm = Modal.confirm;
  15. const { TabPane } = Tabs
  16. const Organization = Form.create()(React.createClass({
  17. loadData(pageNo) {
  18. this.state.data = [];
  19. this.setState({
  20. loading: true,
  21. });
  22. $.ajax({
  23. method: "post",
  24. dataType: "json",
  25. crossDomain: false,
  26. url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
  27. data: {
  28. pageNo: pageNo || 1,
  29. pageSize: this.state.pagination.pageSize,
  30. name: this.state.name, //组织名称
  31. superId: this.state.superId,//上级组织
  32. type: this.state.type,//组织类型
  33. depNo: this.state.depNo1,//组织编号
  34. },
  35. success: function (data) {
  36. let theArr = [];
  37. if (!data.data || !data.data.list) {
  38. if (data.error && data.error.length) {
  39. message.warning(data.error[0].message);
  40. };
  41. } else {
  42. for (let i = 0; i < data.data.list.length; i++) {
  43. let thisdata = data.data.list[i];
  44. theArr.push({
  45. key: i,
  46. id: thisdata.id,//每一条记录的ID
  47. depNo: thisdata.depNo,//组织编号
  48. name: thisdata.name,//组织名称
  49. type: thisdata.type,//组织类型
  50. managerId: thisdata.managerName,//负责人
  51. superId: thisdata.superName,//上级组织
  52. status: thisdata.status,//组织状态
  53. workingHoursName: thisdata.workingHoursName,
  54. hideSign: thisdata.hideSign,//显示标识
  55. approval: thisdata.approval,
  56. });
  57. };
  58. this.state.pagination.current = data.data.pageNo;
  59. this.state.pagination.total = data.data.totalCount;
  60. this.setState({
  61. dataSource: theArr,
  62. page: data.data.pageNo,
  63. pagination: this.state.pagination
  64. });
  65. };
  66. }.bind(this),
  67. }).always(function () {
  68. this.setState({
  69. loading: false
  70. });
  71. }.bind(this));
  72. },
  73. getInitialState() {
  74. return {
  75. approval: 1,
  76. editvisible: false,
  77. workingHoursType: 0,
  78. searchMore: true,
  79. selectedRowKeys: [],
  80. selectedRows: [],
  81. loading: false,
  82. workTimeList: [],
  83. pagination: {
  84. defaultCurrent: 1,
  85. defaultPageSize: 10,
  86. showQuickJumper: true,
  87. pageSize: 10,
  88. onChange: function (page) {
  89. this.loadData(page);
  90. }.bind(this),
  91. showTotal: function (total) {
  92. return '共' + total + '条数据';
  93. }
  94. },
  95. columns: [
  96. {
  97. title: '组织编号',
  98. dataIndex: 'depNo',
  99. key: 'depNo',
  100. }, {
  101. title: '组织名称',
  102. dataIndex: 'name',
  103. key: 'name',
  104. }, {
  105. title: '负责人',
  106. dataIndex: 'managerId',
  107. key: 'managerId',
  108. }, {
  109. title: '组织类型',
  110. dataIndex: 'type',
  111. key: 'type',
  112. render: text => { return getPattern(text) }
  113. }, {
  114. title: '上级组织',
  115. dataIndex: 'superId',
  116. key: 'superId',
  117. }, {
  118. title: '组织状态',
  119. dataIndex: 'status',
  120. key: 'status',
  121. render: text => { return getCondition(text) }
  122. }, {
  123. title: '作息时间类型',
  124. dataIndex: 'workingHoursName',
  125. key: 'workingHoursName',
  126. }, {
  127. title: '显示标识',
  128. dataIndex: 'hideSign',
  129. key: 'hideSign',
  130. render: text => { return ["不显示", "显示"][text] }
  131. },
  132. ],
  133. dataSource: [],
  134. searchTime: [,],
  135. };
  136. },
  137. componentWillMount() {
  138. this.selectSuperId();
  139. this.getWorkTimeList();
  140. },
  141. //获取上级组织
  142. selectSuperId() {
  143. this.state.data = []
  144. $.ajax({
  145. method: "get",
  146. dataType: "json",
  147. crossDomain: false,
  148. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  149. data: {
  150. hideSign: 2,//查询所有(0不显示 1显示 2所有)
  151. },
  152. success: function (data) {
  153. let theArr = [];
  154. let theId = [];//用于保存上级组织的ID和名称
  155. let thedata = data.data;
  156. if (!thedata) {
  157. if (data.error && data.error.length) {
  158. message.warning(data.error[0].message);
  159. };
  160. thedata = {};
  161. };
  162. var contactIds = [];
  163. for (var i = 0; i < data.data.length; i++) {
  164. let theData = data.data[i];
  165. theArr.push(
  166. <Select.Option value={theData.id} key={theData.id}>{theData.name}</Select.Option>
  167. );
  168. theId.push(
  169. [theData.id, theData.name]
  170. );
  171. };
  172. this.setState({
  173. SuperArr: thedata,
  174. contactsOption: theArr,
  175. theId: theId,
  176. orderStatusOptions: data.data,
  177. });
  178. }.bind(this),
  179. }).always(function () {
  180. this.loadData(this.state.page);
  181. this.setState({
  182. loading: false
  183. });
  184. }.bind(this));
  185. },
  186. //获取作息时间
  187. getWorkTimeList() {
  188. $.ajax({
  189. method: "get",
  190. dataType: "json",
  191. crossDomain: false,
  192. url: globalConfig.context + "/api/admin/department/workingHours/list",
  193. data: {},
  194. success: function (data) {
  195. if (data.error.length === 0) {
  196. this.setState({
  197. workTimeList: data.data,
  198. });
  199. } else {
  200. message.warning(data.error[0].message);
  201. }
  202. }.bind(this),
  203. }).always(function () {
  204. this.setState({
  205. loading: false
  206. });
  207. }.bind(this));
  208. },
  209. //编辑部门,保存
  210. edithandleSubmit(e) {
  211. e.preventDefault();
  212. if (!this.state.depNo) {
  213. message.warning('请填写组织编号');
  214. return
  215. }
  216. //上级组织字典
  217. let nameText = this.state.SuperArr
  218. let superText = this.state.editSuperId;
  219. let upId = this.state.theId;
  220. let oldId = '';
  221. let superOne = this.state.editDataSource[0].editSuperId;
  222. if (superOne == superText) {
  223. for (let j = 0; j < upId.length; j++) {
  224. if (superText == upId[j][1]) {
  225. oldId = upId[j][0]
  226. }
  227. }
  228. };
  229. let remarksText = (this.state.editRemarks) ? this.state.editRemarks : '该组织没有职能说明,请完善!';
  230. let isStatus = this.state.editStatus;
  231. let _this = this;
  232. if (isStatus == 1) {
  233. confirm({
  234. title: '是否要解散该部门?',
  235. onOk() {
  236. if (!(superOne == superText)) {
  237. confirm({
  238. title: '上级组织已修改,是否保存?',
  239. onOk() {
  240. $.ajax({
  241. method: "post",
  242. dataType: "json",
  243. crossDomain: false,
  244. url:
  245. globalConfig.context +
  246. "/api/admin/organization/updateOrganization",
  247. data: {
  248. name: _this.state.editName, //组织名称
  249. type: _this.state.editType, //组织类型
  250. managerId: _this.state.theTypes
  251. ? _this.state.theTypes
  252. : _this.state.managerIdOrganizationId, //负责人ID
  253. financeId: _this.state.theTypes2
  254. ? _this.state.theTypes2
  255. : _this.state.financeId, //负责人ID
  256. approvalAid: _this.state.theTypes1
  257. ? _this.state.theTypes1
  258. : _this.state.approvalAid, //审核人ID
  259. retrialFinanceId: _this.state.theTypes3
  260. ? _this.state.theTypes3
  261. : _this.state.reviewerId, // 复审人
  262. expenseFinanceId: _this.state.theTypes4
  263. ? _this.state.theTypes4
  264. : _this.state.accountrId, // 报销审核人
  265. superId: _this.state.editSuperId, //上级组织
  266. status: _this.state.editStatus, //组织状态
  267. remarks: remarksText, //组织职能说明
  268. id: _this.state.editId, //组织ID
  269. updateOrganization: _this.state.updateOrganization,
  270. abbreviation: _this.state.abbreviation,
  271. workingHoursType: _this.state.workingHoursType,
  272. hideSign: _this.state.hideSign,//显示标识
  273. depNo: _this.state.depNo,//组织编号
  274. approval: _this.state.approval, //是否需要特批审核
  275. }
  276. }).done(
  277. function (data) {
  278. _this.setState({
  279. loading: false
  280. });
  281. if (!data.error.length) {
  282. message.success("保存成功!");
  283. _this.edithandleCancel();
  284. _this.selectSuperId();
  285. } else {
  286. message.warning(data.error[0].message);
  287. }
  288. }.bind(_this)
  289. );
  290. return false
  291. }
  292. })
  293. } else {
  294. $.ajax({
  295. method: "post",
  296. dataType: "json",
  297. crossDomain: false,
  298. url:
  299. globalConfig.context +
  300. "/api/admin/organization/updateOrganization",
  301. data: {
  302. name: _this.state.editName, //组织名称
  303. type: _this.state.editType, //组织类型
  304. managerId: _this.state.theTypes
  305. ? _this.state.theTypes
  306. : _this.state.managerIdOrganizationId, //负责人ID
  307. financeId: _this.state.theTypes2
  308. ? _this.state.theTypes2
  309. : _this.state.financeId, //负责人ID
  310. approvalAid: _this.state.theTypes1
  311. ? _this.state.theTypes1
  312. : _this.state.approvalAid, //审核人ID
  313. retrialFinanceId: _this.state.theTypes3
  314. ? _this.state.theTypes3
  315. : _this.state.reviewerId, // 复审人
  316. expenseFinanceId: _this.state.theTypes4
  317. ? _this.state.theTypes4
  318. : _this.state.accountrId, // 报销审核人
  319. superId: oldId, //上级组织
  320. status: _this.state.editStatus, //组织状态
  321. remarks: remarksText, //组织职能说明
  322. id: _this.state.editId, //组织ID
  323. abbreviation: _this.state.abbreviation,
  324. workingHoursType: _this.state.workingHoursType,
  325. hideSign: _this.state.hideSign,//显示标识
  326. depNo: _this.state.depNo,//组织编号
  327. approval: _this.state.approval, //是否需要特批审核
  328. }
  329. }).done(
  330. function (data) {
  331. _this.setState({
  332. loading: false
  333. });
  334. if (!data.error.length) {
  335. message.success("保存成功!");
  336. _this.edithandleCancel();
  337. _this.selectSuperId();
  338. } else {
  339. message.warning(data.error[0].message);
  340. }
  341. }.bind(_this)
  342. );
  343. }
  344. }
  345. })
  346. } else {
  347. if (!(superOne == superText)) {
  348. confirm({
  349. title: '上级组织已修改,是否保存?',
  350. onOk() {
  351. $.ajax({
  352. method: "post",
  353. dataType: "json",
  354. crossDomain: false,
  355. url:
  356. globalConfig.context +
  357. "/api/admin/organization/updateOrganization",
  358. data: {
  359. name: _this.state.editName, //组织名称
  360. type: _this.state.editType, //组织类型
  361. managerId: _this.state.theTypes
  362. ? _this.state.theTypes
  363. : _this.state.managerIdOrganizationId, //负责人ID
  364. financeId: _this.state.theTypes2
  365. ? _this.state.theTypes2
  366. : _this.state.financeId, //负责人ID
  367. approvalAid: _this.state.theTypes1
  368. ? _this.state.theTypes1
  369. : _this.state.approvalAid, //审核人ID
  370. retrialFinanceId: _this.state.theTypes3
  371. ? _this.state.theTypes3
  372. : _this.state.reviewerId, // 复审人
  373. expenseFinanceId: _this.state.theTypes4
  374. ? _this.state.theTypes4
  375. : _this.state.accountrId, // 报销审核人
  376. superId: _this.state.editSuperId, //上级组织
  377. status: _this.state.editStatus, //组织状态
  378. province: _this.state.province,//省份
  379. remarks: remarksText, //组织职能说明
  380. id: _this.state.editId, //组织ID
  381. abbreviation: _this.state.abbreviation,
  382. workingHoursType: _this.state.workingHoursType,
  383. hideSign: _this.state.hideSign,//显示标识
  384. depNo: _this.state.depNo,//组织编号
  385. approval: _this.state.approval, //是否需要特批审核
  386. }
  387. }).done(
  388. function (data) {
  389. _this.setState({
  390. loading: false
  391. });
  392. if (!data.error.length) {
  393. message.success("保存成功!");
  394. _this.edithandleCancel();
  395. _this.selectSuperId();
  396. } else {
  397. message.warning(data.error[0].message);
  398. }
  399. }.bind(_this)
  400. );
  401. return false
  402. }
  403. })
  404. } else {
  405. $.ajax({
  406. method: "post",
  407. dataType: "json",
  408. crossDomain: false,
  409. url:
  410. globalConfig.context +
  411. "/api/admin/organization/updateOrganization",
  412. data: {
  413. name: _this.state.editName, //组织名称
  414. type: _this.state.editType, //组织类型
  415. managerId: _this.state.theTypes
  416. ? _this.state.theTypes
  417. : _this.state.managerIdOrganizationId, //负责人ID
  418. financeId: _this.state.theTypes2
  419. ? _this.state.theTypes2
  420. : _this.state.financeId, //负责人ID
  421. approvalAid: _this.state.theTypes1
  422. ? _this.state.theTypes1
  423. : _this.state.approvalAid, //审核人ID
  424. retrialFinanceId: _this.state.theTypes3
  425. ? _this.state.theTypes3
  426. : _this.state.reviewerId, // 复审人
  427. expenseFinanceId: _this.state.theTypes4
  428. ? _this.state.theTypes4
  429. : _this.state.accountrId, // 报销审核人
  430. superId: oldId, //上级组织
  431. status: _this.state.editStatus, //组织状态
  432. remarks: remarksText, //组织职能说明
  433. id: _this.state.editId, //组织ID
  434. abbreviation: _this.state.abbreviation,
  435. province: _this.state.province,
  436. workingHoursType: _this.state.workingHoursType,
  437. hideSign: _this.state.hideSign,//显示标识
  438. depNo: _this.state.depNo,//组织编号
  439. approval: _this.state.approval,
  440. }
  441. }).done(
  442. function (data) {
  443. _this.setState({
  444. loading: false
  445. });
  446. if (!data.error.length) {
  447. message.success("保存成功!");
  448. _this.edithandleCancel();
  449. _this.selectSuperId();
  450. } else {
  451. message.warning(data.error[0].message);
  452. }
  453. }.bind(_this)
  454. );
  455. }
  456. }
  457. },
  458. //整行点击
  459. tableRowClick(record, index) {
  460. this.selectSuperId();
  461. this.state.RowData = record;
  462. this.setState({
  463. editvisible: true,
  464. selectedRowKeys: [],
  465. rowId: record.businessId,
  466. })
  467. $.ajax({
  468. method: "post",
  469. dataType: "json",
  470. crossDomain: false,
  471. url: globalConfig.context + "/api/admin/organization/selectAllById",
  472. data: {
  473. id: record.id
  474. },
  475. success: function (data) {
  476. let theArr = [];
  477. let thisdata = data.data;
  478. if (data.error.length === 0) {
  479. theArr.push({
  480. editId: thisdata.id, //每一条记录的ID
  481. editName: thisdata.name, //组织名称
  482. editManagerId: thisdata.managerId, //负责人
  483. editType: thisdata.type, //组织类型
  484. editStatus: thisdata.status, //组织状态
  485. province: thisdata.province,//省份
  486. editSuperId: thisdata.superId, //上级组织
  487. depNo: thisdata.depNo, //组织编号
  488. editCreateId: thisdata.createId, //创建人
  489. editTime: thisdata.createTime, //创建时间
  490. editRemarks: thisdata.remarks, //组织职能说明
  491. workingHoursType: thisdata.workingHoursType,//作息时间类型
  492. financeId: thisdata.financeId, // 财务负责人
  493. approvalAid: thisdata.approvalAid, // 审核人
  494. reviewerId: thisdata.retrialFinanceId, // 财务复审
  495. reviewerName: thisdata.retrialFinanceName,
  496. accountrId: thisdata.expenseFinanceId, // 报销审核
  497. accountrName: thisdata.expenseFinanceName,
  498. hideSign: thisdata.hideSign,//显示标识
  499. approval: thisdata.approval, // 特批审核
  500. });
  501. this.setState({
  502. editId: thisdata.id, //每一条记录的ID
  503. financeId: thisdata.financeId,
  504. financeName: thisdata.financeName,
  505. approvalAid: thisdata.approvalAid, // 审核人
  506. approvalName: thisdata.approvalName, // 审核人
  507. editName: thisdata.name, //组织名称
  508. managerIdOrganization: thisdata.managerName, //负责人名字
  509. managerIdOrganizationId: thisdata.managerId, //负责人idmanagerName
  510. reviewerId: thisdata.retrialFinanceId, // 财务复审
  511. reviewerName: thisdata.retrialFinanceName,
  512. accountrId: thisdata.expenseFinanceId, // 报销审核
  513. accountrName: thisdata.expenseFinanceName,
  514. editType: thisdata.type, //组织类型
  515. editStatus: thisdata.status, //组织状态
  516. province: thisdata.province, //省份
  517. editSuperId: thisdata.superId, //上级组织
  518. depNo: thisdata.depNo, //组织编号
  519. editCreateId: thisdata.createId, //创建人
  520. editTime: thisdata.createTime, //创建时间
  521. editRemarks: thisdata.remarks, //组织职能说明
  522. workingHoursType: thisdata.workingHoursType,//作息时间类型
  523. editDataSource: theArr,
  524. abbreviation: thisdata.abbreviation,
  525. hideSign: thisdata.hideSign,//显示标识
  526. approval: thisdata.approval, // 特批审核
  527. });
  528. } else {
  529. message.warning(data.error[0].message);
  530. }
  531. }.bind(this),
  532. }).always(function (data) {
  533. this.setState({
  534. loading: false
  535. });
  536. }.bind(this));
  537. },
  538. //整行删除
  539. delectRow() {
  540. let deletedIds = '';
  541. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  542. let rowItem = this.state.selectedRows[idx];
  543. if (rowItem.id) {
  544. deletedIds = rowItem.id;
  545. };
  546. };
  547. this.setState({
  548. selectedRowKeys: [],
  549. loading: deletedIds.length > 0
  550. });
  551. $.ajax({
  552. method: "POST",
  553. dataType: "json",
  554. crossDomain: false,
  555. url: globalConfig.context + "/api/admin/organization/deleteById",
  556. data: {
  557. id: deletedIds
  558. }
  559. }).done(function (data) {
  560. if (!data.error.length) {
  561. message.success('删除成功!');
  562. this.setState({
  563. loading: false,
  564. });
  565. } else {
  566. message.warning(data.error[0].message);
  567. };
  568. this.selectSuperId();
  569. }.bind(this));
  570. },
  571. //新增一个部门,保存
  572. addhandleSubmit(e) {
  573. e.preventDefault();
  574. // if(!this.state.theTypes){
  575. // message.warning('请输入负责人姓名');
  576. // return false;
  577. // }
  578. if (!this.state.typeOrganization) {
  579. message.warning('请选择组织类型');
  580. return false;
  581. }
  582. if (!this.state.upOrganization) {
  583. message.warning('请选择上级组织');
  584. return false;
  585. }
  586. if (!this.state.depNo) {
  587. message.warning('请填写组织编号');
  588. return false;
  589. }
  590. this.props.form.validateFields((err, values) => {
  591. if (!err) {
  592. this.setState({
  593. loading: true
  594. });
  595. $.ajax({
  596. method: "post",
  597. dataType: "json",
  598. crossDomain: false,
  599. url: globalConfig.context + '/api/admin/organization/addOrganization',
  600. data: {
  601. name: this.state.nameOrganization,//组织名称
  602. managerId: this.state.theTypes,//负责人ID
  603. type: this.state.typeOrganization, //组织类型
  604. superId: this.state.upOrganization,//上级组织
  605. remarks: this.state.remarksOrganization,//组织职能说明
  606. workingHoursType: this.state.workingHoursType,//作息时间
  607. hideSign: this.state.hideSign,//显示标识
  608. depNo: this.state.depNo,//组织编号
  609. }
  610. }).done(function (data) {
  611. this.setState({
  612. loading: false
  613. });
  614. if (!data.error.length) {
  615. message.success('保存成功!');
  616. this.handleCancel();
  617. this.selectSuperId();
  618. } else {
  619. message.warning(data.error[0].message);
  620. }
  621. }.bind(this));
  622. }
  623. });
  624. },
  625. //主管初始加载(自动补全)
  626. supervisor(e) {
  627. $.ajax({
  628. method: "post",
  629. dataType: "json",
  630. crossDomain: false,
  631. url: globalConfig.context + "/api/admin/organization/selectName",
  632. data: {
  633. name: e
  634. },
  635. success: function (data) {
  636. let thedata = data.data;
  637. if (!thedata) {
  638. if (data.error && data.error.length) {
  639. message.warning(data.error[0].message);
  640. };
  641. thedata = {};
  642. };
  643. this.setState({
  644. customerArr: thedata,
  645. });
  646. }.bind(this),
  647. }).always(function () {
  648. this.setState({
  649. loading: false
  650. });
  651. }.bind(this));
  652. },
  653. //上级主管输入框失去焦点是判断客户是否存在
  654. selectAuto(value, options) {
  655. this.setState({
  656. managerIdOrganization: value
  657. })
  658. let theType = '';
  659. let contactLists = this.state.customerArr || [];
  660. if (value) {
  661. contactLists.map(function (item) {
  662. if (item.name == value.toString()) {
  663. theType = item.id;
  664. }
  665. });
  666. }
  667. this.setState({
  668. theTypes: theType
  669. })
  670. },
  671. selectAuto1(value, options) {
  672. this.setState({
  673. approvalAid: value
  674. })
  675. let theType = '';
  676. let contactLists = this.state.customerArr || [];
  677. if (value) {
  678. contactLists.map(function (item) {
  679. if (item.name == value.toString()) {
  680. theType = item.id;
  681. }
  682. });
  683. }
  684. this.setState({
  685. theTypes1: theType
  686. })
  687. },
  688. selectAuto2(value, options) {
  689. this.setState({
  690. financeId: value
  691. })
  692. let theType = '';
  693. let contactLists = this.state.customerArr || [];
  694. if (value) {
  695. contactLists.map(function (item) {
  696. if (item.name == value.toString()) {
  697. theType = item.id;
  698. }
  699. });
  700. }
  701. this.setState({
  702. theTypes2: theType
  703. })
  704. },
  705. selectAuto3(value, options) {
  706. this.setState({
  707. reviewerId: value
  708. })
  709. let theType = '';
  710. let contactLists = this.state.customerArr || [];
  711. if (value) {
  712. contactLists.map(function (item) {
  713. if (item.name == value.toString()) {
  714. theType = item.id;
  715. }
  716. });
  717. }
  718. this.setState({
  719. theTypes3: theType
  720. })
  721. },
  722. selectAuto4(value, options) {
  723. this.setState({
  724. accountrId: value
  725. })
  726. let theType = '';
  727. let contactLists = this.state.customerArr || [];
  728. if (value) {
  729. contactLists.map(function (item) {
  730. if (item.name == value.toString()) {
  731. theType = item.id;
  732. }
  733. });
  734. }
  735. this.setState({
  736. theTypes4: theType
  737. })
  738. },
  739. //失去焦点时
  740. blurChange(e) {
  741. let theType = '';
  742. let contactLists = this.state.customerArr || [];
  743. if (e) {
  744. contactLists.map(function (item) {
  745. if (item.name == e.toString()) {
  746. theType = item.id
  747. }
  748. });
  749. } else {
  750. this.setState({
  751. reviewerId: null
  752. })
  753. }
  754. this.setState({
  755. theTypes3: theType,
  756. })
  757. },
  758. //值改变时请求客户名称
  759. httpChange(e) {
  760. if (e.length >= 1) {
  761. this.supervisor(e);
  762. }
  763. this.setState({
  764. managerIdOrganization: e
  765. })
  766. },
  767. httpChange1(e) {
  768. if (e.length >= 1) {
  769. this.supervisor(e);
  770. }
  771. this.setState({
  772. approvalName: e
  773. })
  774. },
  775. httpChange2(e) {
  776. if (e.length >= 1) {
  777. this.supervisor(e);
  778. }
  779. this.setState({
  780. financeName: e
  781. })
  782. },
  783. httpChange3(e) {
  784. if (e.length >= 1) {
  785. this.supervisor(e);
  786. }
  787. this.setState({
  788. reviewerName: e
  789. })
  790. },
  791. httpChange4(e) {
  792. if (e.length >= 1) {
  793. this.supervisor(e);
  794. }
  795. this.setState({
  796. accountrName: e
  797. })
  798. },
  799. addClick() {
  800. this.state.DepN = '';//组织编号
  801. this.state.theTypes = '';
  802. this.state.nameOrganization = '';//组织名称清零
  803. this.state.managerIdOrganization = '';//负责人ID清零
  804. this.state.financeId = "";//负责人ID清零
  805. this.state.financeName = "";//负责人ID清零
  806. this.state.approvalAid = "";//审核人ID清零
  807. this.state.approvalName = "";//审核人清零
  808. this.state.reviewerId = "";//复审人
  809. this.state.reviewerName = "";//复审人
  810. this.state.accountrId = "";//报销审核人
  811. this.state.accountrName = "";//报销审核人
  812. this.state.approvalName = ""; //特批审核人
  813. this.state.typeOrganization = undefined; //组织类型清零
  814. this.state.upOrganization = undefined;//上级组织清零
  815. this.state.remarksOrganization = '';//组织职能说明清零
  816. this.state.hideSign = 1;//显示标识默认为1(显示)
  817. this.state.approval = 1;//特批审核 1(需要)
  818. this.state.RowData = {};
  819. this.setState({
  820. workingHoursType: 0,
  821. visible: true
  822. });
  823. this.selectSuperId();
  824. },
  825. editClick() {
  826. this.state.RowData = {};
  827. this.setState({
  828. editvisible: true
  829. });
  830. },
  831. handleCancel() {
  832. this.setState({ visible: false })
  833. },
  834. edithandleCancel() {
  835. this.loadData(this.state.page);
  836. this.setState({ editvisible: false })
  837. },
  838. search() {
  839. this.loadData();
  840. },
  841. //把搜索的部分置零
  842. reset() {
  843. this.state.superId = undefined;//上级组织清零
  844. this.state.name = '';//组织名称清零
  845. this.state.type = undefined;//组织类型清零
  846. this.state.depNo1 = '';//组织编号清零
  847. this.loadData();
  848. },
  849. searchSwitch() {
  850. this.setState({
  851. searchMore: !this.state.searchMore
  852. });
  853. },
  854. changeList(arr) {
  855. const newArr = [];
  856. this.state.columns.forEach(item => {
  857. arr.forEach(val => {
  858. if (val === item.title) {
  859. newArr.push(item);
  860. }
  861. });
  862. });
  863. this.setState({
  864. changeList: newArr
  865. });
  866. },
  867. render() {
  868. const FormItem = Form.Item
  869. const rowSelection = {
  870. selectedRowKeys: this.state.selectedRowKeys,
  871. onChange: (selectedRowKeys, selectedRows) => {
  872. this.setState({
  873. selectedRows: selectedRows.slice(-1),
  874. selectedRowKeys: selectedRowKeys.slice(-1)
  875. });
  876. },
  877. onSelect: (recordt, selected, selectedRows) => {
  878. this.setState({
  879. recordt: recordt.id
  880. })
  881. },
  882. };
  883. const formItemLayout = {
  884. labelCol: { span: 8 },
  885. wrapperCol: { span: 14 },
  886. };
  887. const { getFieldDecorator } = this.props.form;
  888. const hasSelected = this.state.selectedRowKeys.length > 0;
  889. const { RangePicker } = DatePicker;
  890. const dataSources = this.state.customerArr || [];
  891. const options = dataSources.map((group, index) =>
  892. <Option key={index} value={group.name}>{group.name}</Option>
  893. )
  894. const options2 = dataSources.map((group, index) =>
  895. <Option key={index} value={group.name}>{group.name}</Option>
  896. )
  897. return (
  898. <div className="user-content" >
  899. <div className="content-title">
  900. <Tabs
  901. defaultActiveKey="1"
  902. onChange={this.callback}
  903. className="test">
  904. <TabPane tab="搜索" key="1">
  905. <div className="user-search">
  906. <Input placeholder="组织名称" style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
  907. value={this.state.name}
  908. onChange={(e) => { this.setState({ name: e.target.value }); }} />
  909. <Select placeholder="上级组织"
  910. style={{ width: '200px', marginRight: '10px' }}
  911. value={this.state.superId}
  912. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  913. {this.state.contactsOption}
  914. </Select>
  915. <Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>搜索</Button>
  916. <Button onClick={this.reset} style={{ marginRight: '10px' }}>重置</Button>
  917. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  918. <Button style={{ background: "#ea0862", border: "none", color: "#fff", marginRight: '10px', marginLeft: '10px' }}
  919. disabled={!hasSelected}
  920. >删除<Icon type="minus" />
  921. </Button>
  922. </Popconfirm>
  923. <span style={{ marginRight: '20px' }}>更多搜索 <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  924. <div style={this.state.searchMore ? { display: 'none' } : { display: 'inline-block' }}>
  925. <Input placeholder="组织编号" style={{ width: '150px', marginRight: '10px' }}
  926. value={this.state.depNo1}
  927. onChange={(e) => { this.setState({ depNo1: e.target.value }); }} />
  928. <Select placeholder="组织类型"
  929. style={{ width: '150px', marginRight: '50px' }}
  930. value={this.state.type}
  931. onChange={(e) => { this.setState({ type: e }) }}>
  932. <Select.Option value="0" >公司</Select.Option>
  933. <Select.Option value="1" >部门</Select.Option>
  934. <Select.Option value="2" >团队</Select.Option>
  935. </Select>
  936. </div>
  937. </div>
  938. </TabPane>
  939. <TabPane tab="新增组织" key="2" >
  940. <Button
  941. type="primary"
  942. className="addButton"
  943. onClick={this.addClick}
  944. style={{ marginBottom: '10px', float: 'left' }}
  945. >新增组织<Icon type="plus" /></Button>
  946. </TabPane>
  947. <TabPane tab="更改表格显示数据" key="3">
  948. <div style={{ marginLeft: 10 }}>
  949. <ChooseList
  950. columns={this.state.columns}
  951. changeFn={this.changeList}
  952. changeList={this.state.changeList}
  953. top={55}
  954. margin={11}
  955. />
  956. </div>
  957. </TabPane>
  958. </Tabs>
  959. <div className="patent-table">
  960. <Spin spinning={this.state.loading}>
  961. <Table size="middle" columns={
  962. this.state.changeList
  963. ? this.state.changeList
  964. : this.state.columns
  965. }
  966. dataSource={this.state.dataSource}
  967. rowSelection={rowSelection}
  968. style={{
  969. cursor: 'pointer',
  970. }}
  971. pagination={this.state.pagination}
  972. onRowClick={this.tableRowClick} />
  973. </Spin>
  974. </div>
  975. <div className="patent-desc">
  976. <Modal maskClosable={false} visible={this.state.visible}
  977. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  978. width='600px'
  979. title='新增组织'
  980. footer=''
  981. className="admin-desc-content">
  982. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  983. <Spin spinning={this.state.loading}>
  984. <div className="clearfix">
  985. <FormItem
  986. labelCol={{ span: 7 }}
  987. wrapperCol={{ span: 12 }}
  988. label="组织名称" >
  989. <Input placeholder="组织名称" value={this.state.nameOrganization} style={{ width: '95%' }}
  990. onChange={(e) => { this.setState({ nameOrganization: e.target.value }) }} required="required" />
  991. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  992. </FormItem>
  993. </div>
  994. <div className="clearfix">
  995. <FormItem
  996. labelCol={{ span: 7 }}
  997. wrapperCol={{ span: 12 }}
  998. label="负责人"
  999. >
  1000. <AutoComplete
  1001. className="certain-category-search"
  1002. dropdownClassName="certain-category-search-dropdown"
  1003. dropdownMatchSelectWidth={false}
  1004. dataSource={options}
  1005. placeholder="输入名称"
  1006. value={this.state.managerIdOrganization}
  1007. onChange={this.httpChange}
  1008. filterOption={true}
  1009. // onBlur={this.blurChange}
  1010. onSelect={this.selectAuto}
  1011. // style={{ width: '95%' }}
  1012. >
  1013. <Input />
  1014. </AutoComplete>
  1015. {/*<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>*/}
  1016. </FormItem>
  1017. </div>
  1018. <div className="clearfix">
  1019. <FormItem
  1020. labelCol={{ span: 7 }}
  1021. wrapperCol={{ span: 12 }}
  1022. label="组织类型"
  1023. >
  1024. <Select placeholder="组织类型" value={this.state.typeOrganization}
  1025. onChange={(e) => { this.setState({ typeOrganization: e }) }} style={{ width: '95%' }} required="required">
  1026. {
  1027. patternOrganization.map(function (item) {
  1028. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1029. })
  1030. }
  1031. </Select>
  1032. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  1033. </FormItem>
  1034. </div>
  1035. <div className="clearfix">
  1036. <FormItem
  1037. labelCol={{ span: 7 }}
  1038. wrapperCol={{ span: 12 }}
  1039. label="上级组织"
  1040. >
  1041. <Select placeholder="请选择上级组织"
  1042. value={this.state.upOrganization}
  1043. onChange={(e) => { this.setState({ upOrganization: e }) }}
  1044. notFoundContent="未获取到上级组织列表"
  1045. style={{ width: '95%' }} required="required">
  1046. {this.state.contactsOption}
  1047. </Select>
  1048. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  1049. </FormItem>
  1050. </div>
  1051. <div className="clearfix">
  1052. <FormItem
  1053. labelCol={{ span: 7 }}
  1054. wrapperCol={{ span: 12 }}
  1055. label="选择作息时间类型"
  1056. >
  1057. <Select placeholder="请选择作息时间类型"
  1058. style={{ width: '95%' }}
  1059. value={this.state.workingHoursType}
  1060. onChange={(e) => { this.setState({ workingHoursType: e }) }}
  1061. notFoundContent="未获取到作息时间类型">
  1062. {this.state.workTimeList.map((v, k) => (
  1063. <Select.Option value={v.type} key={k}>{v.name}</Select.Option>
  1064. ))}
  1065. </Select>
  1066. </FormItem>
  1067. </div>
  1068. <div className="clearfix">
  1069. <FormItem
  1070. labelCol={{ span: 7 }}
  1071. wrapperCol={{ span: 12 }}
  1072. label="组织编号"
  1073. >
  1074. <Input
  1075. placeholder='组织编号'
  1076. value={this.state.depNo}
  1077. onChange={(e) => {
  1078. this.setState({
  1079. depNo: e.target.value
  1080. })
  1081. }}
  1082. />
  1083. </FormItem>
  1084. </div>
  1085. <div className="clearfix">
  1086. <FormItem
  1087. labelCol={{ span: 7 }}
  1088. wrapperCol={{ span: 12 }}
  1089. label="组织职能说明" >
  1090. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.remarksOrganization}
  1091. onChange={(e) => { this.setState({ remarksOrganization: e.target.value }) }} style={{ width: '95%' }} />
  1092. </FormItem>
  1093. </div>
  1094. <div className="clearfix">
  1095. <FormItem
  1096. labelCol={{ span: 7 }}
  1097. wrapperCol={{ span: 12 }}
  1098. label="显示标识"
  1099. >
  1100. <Select placeholder="显示标识"
  1101. value={this.state.hideSign}
  1102. onChange={(e) => { this.setState({ hideSign: e }) }}
  1103. style={{ width: '95%' }}
  1104. required="required"
  1105. >
  1106. <Option value={0}>不显示</Option>
  1107. <Option value={1}>显示</Option>
  1108. </Select>
  1109. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  1110. </FormItem>
  1111. </div>
  1112. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1113. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1114. <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{ marginLeft: '100px' }}>取消</Button>
  1115. </FormItem>
  1116. </Spin>
  1117. </Form >
  1118. </Modal>
  1119. </div>
  1120. <div className="patent-desc">
  1121. <Modal maskClosable={false} visible={this.state.editvisible}
  1122. onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
  1123. width='600px'
  1124. title='编辑组织'
  1125. footer=''
  1126. className="admin-desc-content">
  1127. <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">
  1128. <Spin spinning={this.state.loading}>
  1129. <div className="clearfix">
  1130. <FormItem
  1131. labelCol={{ span: 7 }}
  1132. wrapperCol={{ span: 12 }}
  1133. label="组织名称" >
  1134. <Input placeholder="组织名称" value={this.state.editName}
  1135. onChange={(e) => { this.setState({ editName: e.target.value }) }} />
  1136. </FormItem>
  1137. </div>
  1138. <div className="clearfix">
  1139. <FormItem
  1140. labelCol={{ span: 7 }}
  1141. wrapperCol={{ span: 12 }}
  1142. label="负责人"
  1143. >
  1144. <AutoComplete
  1145. className="certain-category-search"
  1146. dropdownClassName="certain-category-search-dropdown"
  1147. dropdownMatchSelectWidth={false}
  1148. dataSource={options}
  1149. placeholder="输入名称"
  1150. value={this.state.managerIdOrganization}
  1151. onChange={this.httpChange}
  1152. filterOption={true}
  1153. // onBlur={this.blurChange}
  1154. onSelect={this.selectAuto}
  1155. // style={{ width: '95%' }}
  1156. >
  1157. <Input />
  1158. </AutoComplete>
  1159. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1160. </FormItem>
  1161. </div>
  1162. <div className="clearfix">
  1163. <FormItem
  1164. labelCol={{ span: 7 }}
  1165. wrapperCol={{ span: 12 }}
  1166. label="特批审核"
  1167. >
  1168. <Select placeholder="特批审核"
  1169. value={this.state.approval}
  1170. onChange={(e) => { this.setState({ approval: e }) }}
  1171. required="required"
  1172. >
  1173. <Option value={0}>不需要</Option>
  1174. <Option value={1}>需要</Option>
  1175. </Select>
  1176. </FormItem>
  1177. </div>
  1178. <div className="clearfix">
  1179. <FormItem
  1180. labelCol={{ span: 7 }}
  1181. wrapperCol={{ span: 12 }}
  1182. label="审核人"
  1183. >
  1184. <AutoComplete
  1185. disabled={this.state.approval != 1}
  1186. className="certain-category-search"
  1187. dropdownClassName="certain-category-search-dropdown"
  1188. dropdownMatchSelectWidth={false}
  1189. dataSource={options}
  1190. placeholder="输入名称"
  1191. value={this.state.approvalName}
  1192. onChange={this.httpChange1}
  1193. filterOption={true}
  1194. // onBlur={this.blurChange}
  1195. onSelect={this.selectAuto1}
  1196. >
  1197. <Input />
  1198. </AutoComplete>
  1199. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>特批/变更审核</span> */}
  1200. </FormItem>
  1201. </div>
  1202. <div className="clearfix">
  1203. <FormItem
  1204. labelCol={{ span: 7 }}
  1205. wrapperCol={{ span: 12 }}
  1206. label="组织类型"
  1207. >
  1208. <Select placeholder="组织类型" value={this.state.editType}
  1209. onChange={(e) => { this.setState({ editType: e }) }}>
  1210. {
  1211. patternOrganization.map(function (item) {
  1212. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1213. })
  1214. }
  1215. </Select>
  1216. </FormItem>
  1217. </div>
  1218. <div className="clearfix">
  1219. <FormItem
  1220. labelCol={{ span: 7 }}
  1221. wrapperCol={{ span: 12 }}
  1222. label="组织状态"
  1223. >
  1224. <Select placeholder="组织状态" value={this.state.editStatus}
  1225. onChange={(e) => { this.setState({ editStatus: e }) }}>
  1226. {
  1227. conditionOrganization.map(function (item) {
  1228. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1229. })
  1230. }
  1231. </Select>
  1232. </FormItem>
  1233. </div>
  1234. <div className="clearfix">
  1235. <FormItem
  1236. labelCol={{ span: 7 }}
  1237. wrapperCol={{ span: 12 }}
  1238. label="省份"
  1239. >
  1240. <Select
  1241. placeholder="请选择省份"
  1242. value={getNewDiccityArr(this.state.province)}
  1243. onChange={e => {
  1244. this.setState({ province: e });
  1245. }}
  1246. >
  1247. {citySelect().map(function (item) {
  1248. return (
  1249. <Select.Option key={item.value} value={item.value}>{item.label}</Select.Option>
  1250. );
  1251. })}
  1252. </Select>
  1253. </FormItem>
  1254. </div>
  1255. <div className="clearfix">
  1256. <FormItem
  1257. labelCol={{ span: 7 }}
  1258. wrapperCol={{ span: 12 }}
  1259. label="上级组织"
  1260. >
  1261. <Select placeholder="请选择上级组织"
  1262. value={this.state.editSuperId}
  1263. onChange={(e) => { this.setState({ editSuperId: e }) }}
  1264. notFoundContent="未获取到上级组织列表">
  1265. {this.state.contactsOption}
  1266. </Select>
  1267. </FormItem>
  1268. </div>
  1269. <div className="clearfix">
  1270. <FormItem
  1271. labelCol={{ span: 7 }}
  1272. wrapperCol={{ span: 12 }}
  1273. label="缩写" >
  1274. <Input placeholder="缩写" value={this.state.abbreviation}
  1275. onChange={(e) => { this.setState({ abbreviation: e.target.value }) }} />
  1276. </FormItem>
  1277. </div>
  1278. <div className="clearfix">
  1279. <FormItem
  1280. labelCol={{ span: 7 }}
  1281. wrapperCol={{ span: 12 }}
  1282. label="财务负责人"
  1283. >
  1284. <AutoComplete
  1285. className="certain-category-search"
  1286. dropdownClassName="certain-category-search-dropdown"
  1287. dropdownMatchSelectWidth={false}
  1288. dataSource={options2}
  1289. placeholder="输入名称"
  1290. value={this.state.financeName}
  1291. onChange={this.httpChange2}
  1292. filterOption={true}
  1293. // onBlur={this.blurChange}
  1294. onSelect={this.selectAuto2}
  1295. // style={{ width: '95%' }}
  1296. >
  1297. <Input />
  1298. </AutoComplete>
  1299. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1300. </FormItem>
  1301. </div>
  1302. <div className="clearfix">
  1303. <FormItem
  1304. labelCol={{ span: 7 }}
  1305. wrapperCol={{ span: 12 }}
  1306. label="财务复审"
  1307. >
  1308. <AutoComplete
  1309. className="certain-category-search"
  1310. dropdownClassName="certain-category-search-dropdown"
  1311. dropdownMatchSelectWidth={false}
  1312. dataSource={options}
  1313. placeholder="输入名称"
  1314. value={this.state.reviewerName}
  1315. onChange={this.httpChange3}
  1316. filterOption={true}
  1317. onBlur={this.blurChange}
  1318. onSelect={this.selectAuto3}
  1319. // style={{ width: '95%' }}
  1320. >
  1321. <Input />
  1322. </AutoComplete>
  1323. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1324. </FormItem>
  1325. </div>
  1326. <div className="clearfix">
  1327. <FormItem
  1328. labelCol={{ span: 7 }}
  1329. wrapperCol={{ span: 12 }}
  1330. label="报销审核人"
  1331. >
  1332. <AutoComplete
  1333. className="certain-category-search"
  1334. dropdownClassName="certain-category-search-dropdown"
  1335. dropdownMatchSelectWidth={false}
  1336. dataSource={options}
  1337. placeholder="输入名称"
  1338. value={this.state.accountrName}
  1339. onChange={this.httpChange4}
  1340. filterOption={true}
  1341. // onBlur={this.blurChange}
  1342. onSelect={this.selectAuto4}
  1343. // style={{ width: '95%' }}
  1344. >
  1345. <Input />
  1346. </AutoComplete>
  1347. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1348. </FormItem>
  1349. </div>
  1350. <div className="clearfix">
  1351. <FormItem
  1352. labelCol={{ span: 7 }}
  1353. wrapperCol={{ span: 12 }}
  1354. label="选择作息时间类型"
  1355. >
  1356. <Select placeholder="请选择作息时间类型"
  1357. value={this.state.workingHoursType}
  1358. onChange={(e) => { this.setState({ workingHoursType: e }) }}
  1359. notFoundContent="未获取到作息时间类型">
  1360. {this.state.workTimeList.map((v, k) => (
  1361. <Select.Option value={v.type} key={k}>{v.name}</Select.Option>
  1362. ))}
  1363. </Select>
  1364. </FormItem>
  1365. </div>
  1366. <div className="clearfix">
  1367. <FormItem
  1368. labelCol={{ span: 7 }}
  1369. wrapperCol={{ span: 12 }}
  1370. label="组织编号"
  1371. >
  1372. <Input
  1373. placeholder='组织编号'
  1374. value={this.state.depNo}
  1375. onChange={(e) => {
  1376. this.setState({
  1377. depNo: e.target.value
  1378. })
  1379. }}
  1380. />
  1381. </FormItem>
  1382. </div>
  1383. <div className="clearfix" >
  1384. <FormItem
  1385. labelCol={{ span: 7 }}
  1386. wrapperCol={{ span: 12 }}
  1387. label="创建人"
  1388. >
  1389. <span>{this.state.editCreateId}</span>
  1390. </FormItem>
  1391. </div>
  1392. <div className="clearfix">
  1393. <FormItem
  1394. labelCol={{ span: 7 }}
  1395. wrapperCol={{ span: 12 }}
  1396. label="创建时间"
  1397. >
  1398. <span>{this.state.editTime}</span>
  1399. </FormItem>
  1400. </div>
  1401. <div className="clearfix">
  1402. <FormItem
  1403. labelCol={{ span: 7 }}
  1404. wrapperCol={{ span: 12 }}
  1405. label="组织职能说明" >
  1406. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.editRemarks}
  1407. onChange={(e) => { this.setState({ editRemarks: e.target.value }) }} />
  1408. </FormItem>
  1409. </div>
  1410. <div className="clearfix">
  1411. <FormItem
  1412. labelCol={{ span: 7 }}
  1413. wrapperCol={{ span: 12 }}
  1414. label="显示标识"
  1415. >
  1416. <Select placeholder="显示标识"
  1417. value={this.state.hideSign}
  1418. onChange={(e) => { this.setState({ hideSign: e }) }}
  1419. style={{ width: '95%' }}
  1420. required="required"
  1421. >
  1422. <Option value={0}>不显示</Option>
  1423. <Option value={1}>显示</Option>
  1424. </Select>
  1425. </FormItem>
  1426. </div>
  1427. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1428. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1429. <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{ marginLeft: '100px' }}>取消</Button>
  1430. </FormItem>
  1431. </Spin>
  1432. </Form >
  1433. </Modal>
  1434. </div>
  1435. </div>
  1436. </div>
  1437. );
  1438. }
  1439. }));
  1440. export default Organization;