organization.jsx 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388
  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. superId: _this.state.editSuperId, //上级组织
  263. status: _this.state.editStatus, //组织状态
  264. remarks: remarksText, //组织职能说明
  265. id: _this.state.editId, //组织ID
  266. updateOrganization: _this.state.updateOrganization,
  267. abbreviation: _this.state.abbreviation,
  268. workingHoursType: _this.state.workingHoursType,
  269. hideSign: _this.state.hideSign,//显示标识
  270. depNo: _this.state.depNo,//组织编号
  271. approval: _this.state.approval, //是否需要特批审核
  272. }
  273. }).done(
  274. function (data) {
  275. _this.setState({
  276. loading: false
  277. });
  278. if (!data.error.length) {
  279. message.success("保存成功!");
  280. _this.edithandleCancel();
  281. _this.selectSuperId();
  282. } else {
  283. message.warning(data.error[0].message);
  284. }
  285. }.bind(_this)
  286. );
  287. return false
  288. }
  289. })
  290. } else {
  291. $.ajax({
  292. method: "post",
  293. dataType: "json",
  294. crossDomain: false,
  295. url:
  296. globalConfig.context +
  297. "/api/admin/organization/updateOrganization",
  298. data: {
  299. name: _this.state.editName, //组织名称
  300. type: _this.state.editType, //组织类型
  301. managerId: _this.state.theTypes
  302. ? _this.state.theTypes
  303. : _this.state.managerIdOrganizationId, //负责人ID
  304. financeId: _this.state.theTypes2
  305. ? _this.state.theTypes2
  306. : _this.state.financeId, //负责人ID
  307. approvalAid: _this.state.theTypes1
  308. ? _this.state.theTypes1
  309. : _this.state.approvalAid, //审核人ID
  310. retrialFinanceId: _this.state.theTypes3
  311. ? _this.state.theTypes3
  312. : _this.state.reviewerId, // 复审人
  313. superId: oldId, //上级组织
  314. status: _this.state.editStatus, //组织状态
  315. remarks: remarksText, //组织职能说明
  316. id: _this.state.editId, //组织ID
  317. abbreviation: _this.state.abbreviation,
  318. workingHoursType: _this.state.workingHoursType,
  319. hideSign: _this.state.hideSign,//显示标识
  320. depNo: _this.state.depNo,//组织编号
  321. approval: _this.state.approval, //是否需要特批审核
  322. }
  323. }).done(
  324. function (data) {
  325. _this.setState({
  326. loading: false
  327. });
  328. if (!data.error.length) {
  329. message.success("保存成功!");
  330. _this.edithandleCancel();
  331. _this.selectSuperId();
  332. } else {
  333. message.warning(data.error[0].message);
  334. }
  335. }.bind(_this)
  336. );
  337. }
  338. }
  339. })
  340. } else {
  341. if (!(superOne == superText)) {
  342. confirm({
  343. title: '上级组织已修改,是否保存?',
  344. onOk() {
  345. $.ajax({
  346. method: "post",
  347. dataType: "json",
  348. crossDomain: false,
  349. url:
  350. globalConfig.context +
  351. "/api/admin/organization/updateOrganization",
  352. data: {
  353. name: _this.state.editName, //组织名称
  354. type: _this.state.editType, //组织类型
  355. managerId: _this.state.theTypes
  356. ? _this.state.theTypes
  357. : _this.state.managerIdOrganizationId, //负责人ID
  358. financeId: _this.state.theTypes2
  359. ? _this.state.theTypes2
  360. : _this.state.financeId, //负责人ID
  361. approvalAid: _this.state.theTypes1
  362. ? _this.state.theTypes1
  363. : _this.state.approvalAid, //审核人ID
  364. retrialFinanceId: _this.state.theTypes3
  365. ? _this.state.theTypes3
  366. : _this.state.reviewerId, // 复审人
  367. superId: _this.state.editSuperId, //上级组织
  368. status: _this.state.editStatus, //组织状态
  369. province: _this.state.province,//省份
  370. remarks: remarksText, //组织职能说明
  371. id: _this.state.editId, //组织ID
  372. abbreviation: _this.state.abbreviation,
  373. workingHoursType: _this.state.workingHoursType,
  374. hideSign: _this.state.hideSign,//显示标识
  375. depNo: _this.state.depNo,//组织编号
  376. approval: _this.state.approval, //是否需要特批审核
  377. }
  378. }).done(
  379. function (data) {
  380. _this.setState({
  381. loading: false
  382. });
  383. if (!data.error.length) {
  384. message.success("保存成功!");
  385. _this.edithandleCancel();
  386. _this.selectSuperId();
  387. } else {
  388. message.warning(data.error[0].message);
  389. }
  390. }.bind(_this)
  391. );
  392. return false
  393. }
  394. })
  395. } else {
  396. $.ajax({
  397. method: "post",
  398. dataType: "json",
  399. crossDomain: false,
  400. url:
  401. globalConfig.context +
  402. "/api/admin/organization/updateOrganization",
  403. data: {
  404. name: _this.state.editName, //组织名称
  405. type: _this.state.editType, //组织类型
  406. managerId: _this.state.theTypes
  407. ? _this.state.theTypes
  408. : _this.state.managerIdOrganizationId, //负责人ID
  409. financeId: _this.state.theTypes2
  410. ? _this.state.theTypes2
  411. : _this.state.financeId, //负责人ID
  412. approvalAid: _this.state.theTypes1
  413. ? _this.state.theTypes1
  414. : _this.state.approvalAid, //审核人ID
  415. retrialFinanceId: _this.state.theTypes3
  416. ? _this.state.theTypes3
  417. : _this.state.reviewerId, // 复审人
  418. superId: oldId, //上级组织
  419. status: _this.state.editStatus, //组织状态
  420. remarks: remarksText, //组织职能说明
  421. id: _this.state.editId, //组织ID
  422. abbreviation: _this.state.abbreviation,
  423. province: _this.state.province,
  424. workingHoursType: _this.state.workingHoursType,
  425. hideSign: _this.state.hideSign,//显示标识
  426. depNo: _this.state.depNo,//组织编号
  427. approval: _this.state.approval,
  428. }
  429. }).done(
  430. function (data) {
  431. _this.setState({
  432. loading: false
  433. });
  434. if (!data.error.length) {
  435. message.success("保存成功!");
  436. _this.edithandleCancel();
  437. _this.selectSuperId();
  438. } else {
  439. message.warning(data.error[0].message);
  440. }
  441. }.bind(_this)
  442. );
  443. }
  444. }
  445. },
  446. //整行点击
  447. tableRowClick(record, index) {
  448. this.selectSuperId();
  449. this.state.RowData = record;
  450. this.setState({
  451. editvisible: true,
  452. selectedRowKeys: [],
  453. rowId: record.businessId,
  454. })
  455. $.ajax({
  456. method: "post",
  457. dataType: "json",
  458. crossDomain: false,
  459. url: globalConfig.context + "/api/admin/organization/selectAllById",
  460. data: {
  461. id: record.id
  462. },
  463. success: function (data) {
  464. let theArr = [];
  465. let thisdata = data.data;
  466. if (data.error.length === 0) {
  467. theArr.push({
  468. editId: thisdata.id, //每一条记录的ID
  469. editName: thisdata.name, //组织名称
  470. editManagerId: thisdata.managerId, //负责人
  471. editType: thisdata.type, //组织类型
  472. editStatus: thisdata.status, //组织状态
  473. province: thisdata.province,//省份
  474. editSuperId: thisdata.superId, //上级组织
  475. depNo: thisdata.depNo, //组织编号
  476. editCreateId: thisdata.createId, //创建人
  477. editTime: thisdata.createTime, //创建时间
  478. editRemarks: thisdata.remarks, //组织职能说明
  479. workingHoursType: thisdata.workingHoursType,//作息时间类型
  480. financeId: thisdata.financeId, // 财务负责人
  481. approvalAid: thisdata.approvalAid, // 审核人
  482. reviewerId: thisdata.retrialFinanceId, // 财务复审
  483. hideSign: thisdata.hideSign,//显示标识
  484. approval: thisdata.approval, // 特批审核
  485. });
  486. this.setState({
  487. editId: thisdata.id, //每一条记录的ID
  488. financeId: thisdata.financeId,
  489. financeName: thisdata.financeName,
  490. approvalAid: thisdata.approvalAid, // 审核人
  491. approvalName: thisdata.approvalName, // 审核人
  492. editName: thisdata.name, //组织名称
  493. managerIdOrganization: thisdata.managerName, //负责人名字
  494. managerIdOrganizationId: thisdata.managerId, //负责人idmanagerName
  495. reviewerId: thisdata.retrialFinanceId, // 财务复审
  496. reviewerName: thisdata.retrialFinanceName,
  497. editType: thisdata.type, //组织类型
  498. editStatus: thisdata.status, //组织状态
  499. province: thisdata.province, //省份
  500. editSuperId: thisdata.superId, //上级组织
  501. depNo: thisdata.depNo, //组织编号
  502. editCreateId: thisdata.createId, //创建人
  503. editTime: thisdata.createTime, //创建时间
  504. editRemarks: thisdata.remarks, //组织职能说明
  505. workingHoursType: thisdata.workingHoursType,//作息时间类型
  506. editDataSource: theArr,
  507. abbreviation: thisdata.abbreviation,
  508. hideSign: thisdata.hideSign,//显示标识
  509. approval: thisdata.approval, // 特批审核
  510. });
  511. } else {
  512. message.warning(data.error[0].message);
  513. }
  514. }.bind(this),
  515. }).always(function (data) {
  516. this.setState({
  517. loading: false
  518. });
  519. }.bind(this));
  520. },
  521. //整行删除
  522. delectRow() {
  523. let deletedIds = '';
  524. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  525. let rowItem = this.state.selectedRows[idx];
  526. if (rowItem.id) {
  527. deletedIds = rowItem.id;
  528. };
  529. };
  530. this.setState({
  531. selectedRowKeys: [],
  532. loading: deletedIds.length > 0
  533. });
  534. $.ajax({
  535. method: "POST",
  536. dataType: "json",
  537. crossDomain: false,
  538. url: globalConfig.context + "/api/admin/organization/deleteById",
  539. data: {
  540. id: deletedIds
  541. }
  542. }).done(function (data) {
  543. if (!data.error.length) {
  544. message.success('删除成功!');
  545. this.setState({
  546. loading: false,
  547. });
  548. } else {
  549. message.warning(data.error[0].message);
  550. };
  551. this.selectSuperId();
  552. }.bind(this));
  553. },
  554. //新增一个部门,保存
  555. addhandleSubmit(e) {
  556. e.preventDefault();
  557. // if(!this.state.theTypes){
  558. // message.warning('请输入负责人姓名');
  559. // return false;
  560. // }
  561. if (!this.state.typeOrganization) {
  562. message.warning('请选择组织类型');
  563. return false;
  564. }
  565. if (!this.state.upOrganization) {
  566. message.warning('请选择上级组织');
  567. return false;
  568. }
  569. if (!this.state.depNo) {
  570. message.warning('请填写组织编号');
  571. return false;
  572. }
  573. this.props.form.validateFields((err, values) => {
  574. if (!err) {
  575. this.setState({
  576. loading: true
  577. });
  578. $.ajax({
  579. method: "post",
  580. dataType: "json",
  581. crossDomain: false,
  582. url: globalConfig.context + '/api/admin/organization/addOrganization',
  583. data: {
  584. name: this.state.nameOrganization,//组织名称
  585. managerId: this.state.theTypes,//负责人ID
  586. type: this.state.typeOrganization, //组织类型
  587. superId: this.state.upOrganization,//上级组织
  588. remarks: this.state.remarksOrganization,//组织职能说明
  589. workingHoursType: this.state.workingHoursType,//作息时间
  590. hideSign: this.state.hideSign,//显示标识
  591. depNo: this.state.depNo,//组织编号
  592. }
  593. }).done(function (data) {
  594. this.setState({
  595. loading: false
  596. });
  597. if (!data.error.length) {
  598. message.success('保存成功!');
  599. this.handleCancel();
  600. this.selectSuperId();
  601. } else {
  602. message.warning(data.error[0].message);
  603. }
  604. }.bind(this));
  605. }
  606. });
  607. },
  608. //主管初始加载(自动补全)
  609. supervisor(e) {
  610. $.ajax({
  611. method: "post",
  612. dataType: "json",
  613. crossDomain: false,
  614. url: globalConfig.context + "/api/admin/organization/selectName",
  615. data: {
  616. name: e
  617. },
  618. success: function (data) {
  619. let thedata = data.data;
  620. if (!thedata) {
  621. if (data.error && data.error.length) {
  622. message.warning(data.error[0].message);
  623. };
  624. thedata = {};
  625. };
  626. this.setState({
  627. customerArr: thedata,
  628. });
  629. }.bind(this),
  630. }).always(function () {
  631. this.setState({
  632. loading: false
  633. });
  634. }.bind(this));
  635. },
  636. //上级主管输入框失去焦点是判断客户是否存在
  637. selectAuto(value, options) {
  638. this.setState({
  639. managerIdOrganization: value
  640. })
  641. let theType = '';
  642. let contactLists = this.state.customerArr || [];
  643. if (value) {
  644. contactLists.map(function (item) {
  645. if (item.name == value.toString()) {
  646. theType = item.id;
  647. }
  648. });
  649. }
  650. this.setState({
  651. theTypes: theType
  652. })
  653. },
  654. selectAuto1(value, options) {
  655. this.setState({
  656. approvalAid: 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. theTypes1: theType
  669. })
  670. },
  671. selectAuto2(value, options) {
  672. this.setState({
  673. financeId: 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. theTypes2: theType
  686. })
  687. },
  688. selectAuto3(value, options) {
  689. this.setState({
  690. reviewerId: 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. theTypes3: theType
  703. })
  704. },
  705. //失去焦点时
  706. blurChange(e) {
  707. let theType = '';
  708. let contactLists = this.state.customerArr || [];
  709. if (e) {
  710. contactLists.map(function (item) {
  711. if (item.name == e.toString()) {
  712. theType = item.id
  713. }
  714. });
  715. } else {
  716. this.setState({
  717. reviewerId: null
  718. })
  719. }
  720. this.setState({
  721. theTypes3: theType,
  722. })
  723. },
  724. //值改变时请求客户名称
  725. httpChange(e) {
  726. if (e.length >= 1) {
  727. this.supervisor(e);
  728. }
  729. this.setState({
  730. managerIdOrganization: e
  731. })
  732. },
  733. httpChange1(e) {
  734. if (e.length >= 1) {
  735. this.supervisor(e);
  736. }
  737. this.setState({
  738. approvalName: e
  739. })
  740. },
  741. httpChange2(e) {
  742. if (e.length >= 1) {
  743. this.supervisor(e);
  744. }
  745. this.setState({
  746. financeName: e
  747. })
  748. },
  749. httpChange3(e) {
  750. if (e.length >= 1) {
  751. this.supervisor(e);
  752. }
  753. this.setState({
  754. reviewerName: e
  755. })
  756. },
  757. addClick() {
  758. this.state.DepN = '';//组织编号
  759. this.state.theTypes = '';
  760. this.state.nameOrganization = '';//组织名称清零
  761. this.state.managerIdOrganization = '';//负责人ID清零
  762. this.state.financeId = "";//负责人ID清零
  763. this.state.financeName = "";//负责人ID清零
  764. this.state.approvalAid = "";//审核人ID清零
  765. this.state.approvalName = "";//审核人清零
  766. this.state.reviewerId = "";//复审人
  767. this.state.reviewerName = "";//复审人
  768. this.state.approvalName = ""; //特批审核人
  769. this.state.typeOrganization = undefined; //组织类型清零
  770. this.state.upOrganization = undefined;//上级组织清零
  771. this.state.remarksOrganization = '';//组织职能说明清零
  772. this.state.hideSign = 1;//显示标识默认为1(显示)
  773. this.state.approval = 1;//特批审核 1(需要)
  774. this.state.RowData = {};
  775. this.setState({
  776. workingHoursType: 0,
  777. visible: true
  778. });
  779. this.selectSuperId();
  780. },
  781. editClick() {
  782. this.state.RowData = {};
  783. this.setState({
  784. editvisible: true
  785. });
  786. },
  787. handleCancel() {
  788. this.setState({ visible: false })
  789. },
  790. edithandleCancel() {
  791. this.loadData(this.state.page);
  792. this.setState({ editvisible: false })
  793. },
  794. search() {
  795. this.loadData();
  796. },
  797. //把搜索的部分置零
  798. reset() {
  799. this.state.superId = undefined;//上级组织清零
  800. this.state.name = '';//组织名称清零
  801. this.state.type = undefined;//组织类型清零
  802. this.state.depNo1 = '';//组织编号清零
  803. this.loadData();
  804. },
  805. searchSwitch() {
  806. this.setState({
  807. searchMore: !this.state.searchMore
  808. });
  809. },
  810. changeList(arr) {
  811. const newArr = [];
  812. this.state.columns.forEach(item => {
  813. arr.forEach(val => {
  814. if (val === item.title) {
  815. newArr.push(item);
  816. }
  817. });
  818. });
  819. this.setState({
  820. changeList: newArr
  821. });
  822. },
  823. render() {
  824. const FormItem = Form.Item
  825. const rowSelection = {
  826. selectedRowKeys: this.state.selectedRowKeys,
  827. onChange: (selectedRowKeys, selectedRows) => {
  828. this.setState({
  829. selectedRows: selectedRows.slice(-1),
  830. selectedRowKeys: selectedRowKeys.slice(-1)
  831. });
  832. },
  833. onSelect: (recordt, selected, selectedRows) => {
  834. this.setState({
  835. recordt: recordt.id
  836. })
  837. },
  838. };
  839. const formItemLayout = {
  840. labelCol: { span: 8 },
  841. wrapperCol: { span: 14 },
  842. };
  843. const { getFieldDecorator } = this.props.form;
  844. const hasSelected = this.state.selectedRowKeys.length > 0;
  845. const { RangePicker } = DatePicker;
  846. const dataSources = this.state.customerArr || [];
  847. const options = dataSources.map((group, index) =>
  848. <Option key={index} value={group.name}>{group.name}</Option>
  849. )
  850. const options2 = dataSources.map((group, index) =>
  851. <Option key={index} value={group.name}>{group.name}</Option>
  852. )
  853. return (
  854. <div className="user-content" >
  855. <div className="content-title">
  856. <Tabs
  857. defaultActiveKey="1"
  858. onChange={this.callback}
  859. className="test">
  860. <TabPane tab="搜索" key="1">
  861. <div className="user-search">
  862. <Input placeholder="组织名称" style={{ width: '150px', marginRight: '10px', marginBottom: '10px' }}
  863. value={this.state.name}
  864. onChange={(e) => { this.setState({ name: e.target.value }); }} />
  865. <Select placeholder="上级组织"
  866. style={{ width: '200px', marginRight: '10px' }}
  867. value={this.state.superId}
  868. onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
  869. {this.state.contactsOption}
  870. </Select>
  871. <Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>搜索</Button>
  872. <Button onClick={this.reset} style={{ marginRight: '10px' }}>重置</Button>
  873. <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
  874. <Button style={{ background: "#ea0862", border: "none", color: "#fff", marginRight: '10px', marginLeft: '10px' }}
  875. disabled={!hasSelected}
  876. >删除<Icon type="minus" />
  877. </Button>
  878. </Popconfirm>
  879. <span style={{ marginRight: '20px' }}>更多搜索 <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  880. <div style={this.state.searchMore ? { display: 'none' } : { display: 'inline-block' }}>
  881. <Input placeholder="组织编号" style={{ width: '150px', marginRight: '10px' }}
  882. value={this.state.depNo1}
  883. onChange={(e) => { this.setState({ depNo1: e.target.value }); }} />
  884. <Select placeholder="组织类型"
  885. style={{ width: '150px', marginRight: '50px' }}
  886. value={this.state.type}
  887. onChange={(e) => { this.setState({ type: e }) }}>
  888. <Select.Option value="0" >公司</Select.Option>
  889. <Select.Option value="1" >部门</Select.Option>
  890. <Select.Option value="2" >团队</Select.Option>
  891. </Select>
  892. </div>
  893. </div>
  894. </TabPane>
  895. <TabPane tab="新增组织" key="2" >
  896. <Button
  897. type="primary"
  898. className="addButton"
  899. onClick={this.addClick}
  900. style={{ marginBottom: '10px', float: 'left' }}
  901. >新增组织<Icon type="plus" /></Button>
  902. </TabPane>
  903. <TabPane tab="更改表格显示数据" key="3">
  904. <div style={{ marginLeft: 10 }}>
  905. <ChooseList
  906. columns={this.state.columns}
  907. changeFn={this.changeList}
  908. changeList={this.state.changeList}
  909. top={55}
  910. margin={11}
  911. />
  912. </div>
  913. </TabPane>
  914. </Tabs>
  915. <div className="patent-table">
  916. <Spin spinning={this.state.loading}>
  917. <Table size="middle" columns={
  918. this.state.changeList
  919. ? this.state.changeList
  920. : this.state.columns
  921. }
  922. dataSource={this.state.dataSource}
  923. rowSelection={rowSelection}
  924. style={{
  925. cursor: 'pointer',
  926. }}
  927. pagination={this.state.pagination}
  928. onRowClick={this.tableRowClick} />
  929. </Spin>
  930. </div>
  931. <div className="patent-desc">
  932. <Modal maskClosable={false} visible={this.state.visible}
  933. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  934. width='600px'
  935. title='新增组织'
  936. footer=''
  937. className="admin-desc-content">
  938. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  939. <Spin spinning={this.state.loading}>
  940. <div className="clearfix">
  941. <FormItem
  942. labelCol={{ span: 7 }}
  943. wrapperCol={{ span: 12 }}
  944. label="组织名称" >
  945. <Input placeholder="组织名称" value={this.state.nameOrganization} style={{ width: '95%' }}
  946. onChange={(e) => { this.setState({ nameOrganization: e.target.value }) }} required="required" />
  947. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  948. </FormItem>
  949. </div>
  950. <div className="clearfix">
  951. <FormItem
  952. labelCol={{ span: 7 }}
  953. wrapperCol={{ span: 12 }}
  954. label="负责人"
  955. >
  956. <AutoComplete
  957. className="certain-category-search"
  958. dropdownClassName="certain-category-search-dropdown"
  959. dropdownMatchSelectWidth={false}
  960. dataSource={options}
  961. placeholder="输入名称"
  962. value={this.state.managerIdOrganization}
  963. onChange={this.httpChange}
  964. filterOption={true}
  965. // onBlur={this.blurChange}
  966. onSelect={this.selectAuto}
  967. // style={{ width: '95%' }}
  968. >
  969. <Input />
  970. </AutoComplete>
  971. {/*<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>*/}
  972. </FormItem>
  973. </div>
  974. <div className="clearfix">
  975. <FormItem
  976. labelCol={{ span: 7 }}
  977. wrapperCol={{ span: 12 }}
  978. label="组织类型"
  979. >
  980. <Select placeholder="组织类型" value={this.state.typeOrganization}
  981. onChange={(e) => { this.setState({ typeOrganization: e }) }} style={{ width: '95%' }} required="required">
  982. {
  983. patternOrganization.map(function (item) {
  984. return <Select.Option key={item.value} >{item.key}</Select.Option>
  985. })
  986. }
  987. </Select>
  988. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  989. </FormItem>
  990. </div>
  991. <div className="clearfix">
  992. <FormItem
  993. labelCol={{ span: 7 }}
  994. wrapperCol={{ span: 12 }}
  995. label="上级组织"
  996. >
  997. <Select placeholder="请选择上级组织"
  998. value={this.state.upOrganization}
  999. onChange={(e) => { this.setState({ upOrganization: e }) }}
  1000. notFoundContent="未获取到上级组织列表"
  1001. style={{ width: '95%' }} required="required">
  1002. {this.state.contactsOption}
  1003. </Select>
  1004. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  1005. </FormItem>
  1006. </div>
  1007. <div className="clearfix">
  1008. <FormItem
  1009. labelCol={{ span: 7 }}
  1010. wrapperCol={{ span: 12 }}
  1011. label="选择作息时间类型"
  1012. >
  1013. <Select placeholder="请选择作息时间类型"
  1014. style={{ width: '95%' }}
  1015. value={this.state.workingHoursType}
  1016. onChange={(e) => { this.setState({ workingHoursType: e }) }}
  1017. notFoundContent="未获取到作息时间类型">
  1018. {this.state.workTimeList.map((v, k) => (
  1019. <Select.Option value={v.type} key={k}>{v.name}</Select.Option>
  1020. ))}
  1021. </Select>
  1022. </FormItem>
  1023. </div>
  1024. <div className="clearfix">
  1025. <FormItem
  1026. labelCol={{ span: 7 }}
  1027. wrapperCol={{ span: 12 }}
  1028. label="组织编号"
  1029. >
  1030. <Input
  1031. placeholder='组织编号'
  1032. value={this.state.depNo}
  1033. onChange={(e) => {
  1034. this.setState({
  1035. depNo: e.target.value
  1036. })
  1037. }}
  1038. />
  1039. </FormItem>
  1040. </div>
  1041. <div className="clearfix">
  1042. <FormItem
  1043. labelCol={{ span: 7 }}
  1044. wrapperCol={{ span: 12 }}
  1045. label="组织职能说明" >
  1046. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.remarksOrganization}
  1047. onChange={(e) => { this.setState({ remarksOrganization: e.target.value }) }} style={{ width: '95%' }} />
  1048. </FormItem>
  1049. </div>
  1050. <div className="clearfix">
  1051. <FormItem
  1052. labelCol={{ span: 7 }}
  1053. wrapperCol={{ span: 12 }}
  1054. label="显示标识"
  1055. >
  1056. <Select placeholder="显示标识"
  1057. value={this.state.hideSign}
  1058. onChange={(e) => { this.setState({ hideSign: e }) }}
  1059. style={{ width: '95%' }}
  1060. required="required"
  1061. >
  1062. <Option value={0}>不显示</Option>
  1063. <Option value={1}>显示</Option>
  1064. </Select>
  1065. <span className="mandatory" style={{ color: 'red', marginLeft: '5px' }}>*</span>
  1066. </FormItem>
  1067. </div>
  1068. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1069. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1070. <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{ marginLeft: '100px' }}>取消</Button>
  1071. </FormItem>
  1072. </Spin>
  1073. </Form >
  1074. </Modal>
  1075. </div>
  1076. <div className="patent-desc">
  1077. <Modal maskClosable={false} visible={this.state.editvisible}
  1078. onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
  1079. width='600px'
  1080. title='编辑组织'
  1081. footer=''
  1082. className="admin-desc-content">
  1083. <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">
  1084. <Spin spinning={this.state.loading}>
  1085. <div className="clearfix">
  1086. <FormItem
  1087. labelCol={{ span: 7 }}
  1088. wrapperCol={{ span: 12 }}
  1089. label="组织名称" >
  1090. <Input placeholder="组织名称" value={this.state.editName}
  1091. onChange={(e) => { this.setState({ editName: e.target.value }) }} />
  1092. </FormItem>
  1093. </div>
  1094. <div className="clearfix">
  1095. <FormItem
  1096. labelCol={{ span: 7 }}
  1097. wrapperCol={{ span: 12 }}
  1098. label="负责人"
  1099. >
  1100. <AutoComplete
  1101. className="certain-category-search"
  1102. dropdownClassName="certain-category-search-dropdown"
  1103. dropdownMatchSelectWidth={false}
  1104. dataSource={options}
  1105. placeholder="输入名称"
  1106. value={this.state.managerIdOrganization}
  1107. onChange={this.httpChange}
  1108. filterOption={true}
  1109. // onBlur={this.blurChange}
  1110. onSelect={this.selectAuto}
  1111. // style={{ width: '95%' }}
  1112. >
  1113. <Input />
  1114. </AutoComplete>
  1115. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1116. </FormItem>
  1117. </div>
  1118. <div className="clearfix">
  1119. <FormItem
  1120. labelCol={{ span: 7 }}
  1121. wrapperCol={{ span: 12 }}
  1122. label="特批审核"
  1123. >
  1124. <Select placeholder="特批审核"
  1125. value={this.state.approval}
  1126. onChange={(e) => { this.setState({ approval: e }) }}
  1127. required="required"
  1128. >
  1129. <Option value={0}>不需要</Option>
  1130. <Option value={1}>需要</Option>
  1131. </Select>
  1132. </FormItem>
  1133. </div>
  1134. <div className="clearfix">
  1135. <FormItem
  1136. labelCol={{ span: 7 }}
  1137. wrapperCol={{ span: 12 }}
  1138. label="审核人"
  1139. >
  1140. <AutoComplete
  1141. disabled={this.state.approval != 1}
  1142. className="certain-category-search"
  1143. dropdownClassName="certain-category-search-dropdown"
  1144. dropdownMatchSelectWidth={false}
  1145. dataSource={options}
  1146. placeholder="输入名称"
  1147. value={this.state.approvalName}
  1148. onChange={this.httpChange1}
  1149. filterOption={true}
  1150. // onBlur={this.blurChange}
  1151. onSelect={this.selectAuto1}
  1152. >
  1153. <Input />
  1154. </AutoComplete>
  1155. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>特批/变更审核</span> */}
  1156. </FormItem>
  1157. </div>
  1158. <div className="clearfix">
  1159. <FormItem
  1160. labelCol={{ span: 7 }}
  1161. wrapperCol={{ span: 12 }}
  1162. label="组织类型"
  1163. >
  1164. <Select placeholder="组织类型" value={this.state.editType}
  1165. onChange={(e) => { this.setState({ editType: e }) }}>
  1166. {
  1167. patternOrganization.map(function (item) {
  1168. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1169. })
  1170. }
  1171. </Select>
  1172. </FormItem>
  1173. </div>
  1174. <div className="clearfix">
  1175. <FormItem
  1176. labelCol={{ span: 7 }}
  1177. wrapperCol={{ span: 12 }}
  1178. label="组织状态"
  1179. >
  1180. <Select placeholder="组织状态" value={this.state.editStatus}
  1181. onChange={(e) => { this.setState({ editStatus: e }) }}>
  1182. {
  1183. conditionOrganization.map(function (item) {
  1184. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1185. })
  1186. }
  1187. </Select>
  1188. </FormItem>
  1189. </div>
  1190. <div className="clearfix">
  1191. <FormItem
  1192. labelCol={{ span: 7 }}
  1193. wrapperCol={{ span: 12 }}
  1194. label="省份"
  1195. >
  1196. <Select
  1197. placeholder="请选择省份"
  1198. value={getNewDiccityArr(this.state.province)}
  1199. onChange={e => {
  1200. this.setState({ province: e });
  1201. }}
  1202. >
  1203. {citySelect().map(function (item) {
  1204. return (
  1205. <Select.Option key={item.value} value={item.value}>{item.label}</Select.Option>
  1206. );
  1207. })}
  1208. </Select>
  1209. </FormItem>
  1210. </div>
  1211. <div className="clearfix">
  1212. <FormItem
  1213. labelCol={{ span: 7 }}
  1214. wrapperCol={{ span: 12 }}
  1215. label="上级组织"
  1216. >
  1217. <Select placeholder="请选择上级组织"
  1218. value={this.state.editSuperId}
  1219. onChange={(e) => { this.setState({ editSuperId: e }) }}
  1220. notFoundContent="未获取到上级组织列表">
  1221. {this.state.contactsOption}
  1222. </Select>
  1223. </FormItem>
  1224. </div>
  1225. <div className="clearfix">
  1226. <FormItem
  1227. labelCol={{ span: 7 }}
  1228. wrapperCol={{ span: 12 }}
  1229. label="缩写" >
  1230. <Input placeholder="缩写" value={this.state.abbreviation}
  1231. onChange={(e) => { this.setState({ abbreviation: e.target.value }) }} />
  1232. </FormItem>
  1233. </div>
  1234. <div className="clearfix">
  1235. <FormItem
  1236. labelCol={{ span: 7 }}
  1237. wrapperCol={{ span: 12 }}
  1238. label="财务负责人"
  1239. >
  1240. <AutoComplete
  1241. className="certain-category-search"
  1242. dropdownClassName="certain-category-search-dropdown"
  1243. dropdownMatchSelectWidth={false}
  1244. dataSource={options2}
  1245. placeholder="输入名称"
  1246. value={this.state.financeName}
  1247. onChange={this.httpChange2}
  1248. filterOption={true}
  1249. // onBlur={this.blurChange}
  1250. onSelect={this.selectAuto2}
  1251. // style={{ width: '95%' }}
  1252. >
  1253. <Input />
  1254. </AutoComplete>
  1255. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1256. </FormItem>
  1257. </div>
  1258. <div className="clearfix">
  1259. <FormItem
  1260. labelCol={{ span: 7 }}
  1261. wrapperCol={{ span: 12 }}
  1262. label="财务复审"
  1263. >
  1264. <AutoComplete
  1265. className="certain-category-search"
  1266. dropdownClassName="certain-category-search-dropdown"
  1267. dropdownMatchSelectWidth={false}
  1268. dataSource={options}
  1269. placeholder="输入名称"
  1270. value={this.state.reviewerName}
  1271. onChange={this.httpChange3}
  1272. filterOption={true}
  1273. onBlur={this.blurChange}
  1274. onSelect={this.selectAuto3}
  1275. // style={{ width: '95%' }}
  1276. >
  1277. <Input />
  1278. </AutoComplete>
  1279. {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
  1280. </FormItem>
  1281. </div>
  1282. <div className="clearfix">
  1283. <FormItem
  1284. labelCol={{ span: 7 }}
  1285. wrapperCol={{ span: 12 }}
  1286. label="选择作息时间类型"
  1287. >
  1288. <Select placeholder="请选择作息时间类型"
  1289. value={this.state.workingHoursType}
  1290. onChange={(e) => { this.setState({ workingHoursType: e }) }}
  1291. notFoundContent="未获取到作息时间类型">
  1292. {this.state.workTimeList.map((v, k) => (
  1293. <Select.Option value={v.type} key={k}>{v.name}</Select.Option>
  1294. ))}
  1295. </Select>
  1296. </FormItem>
  1297. </div>
  1298. <div className="clearfix">
  1299. <FormItem
  1300. labelCol={{ span: 7 }}
  1301. wrapperCol={{ span: 12 }}
  1302. label="组织编号"
  1303. >
  1304. <Input
  1305. placeholder='组织编号'
  1306. value={this.state.depNo}
  1307. onChange={(e) => {
  1308. this.setState({
  1309. depNo: e.target.value
  1310. })
  1311. }}
  1312. />
  1313. </FormItem>
  1314. </div>
  1315. <div className="clearfix" >
  1316. <FormItem
  1317. labelCol={{ span: 7 }}
  1318. wrapperCol={{ span: 12 }}
  1319. label="创建人"
  1320. >
  1321. <span>{this.state.editCreateId}</span>
  1322. </FormItem>
  1323. </div>
  1324. <div className="clearfix">
  1325. <FormItem
  1326. labelCol={{ span: 7 }}
  1327. wrapperCol={{ span: 12 }}
  1328. label="创建时间"
  1329. >
  1330. <span>{this.state.editTime}</span>
  1331. </FormItem>
  1332. </div>
  1333. <div className="clearfix">
  1334. <FormItem
  1335. labelCol={{ span: 7 }}
  1336. wrapperCol={{ span: 12 }}
  1337. label="组织职能说明" >
  1338. <Input type="textarea" rows={4} placeholder="组织职能说明" value={this.state.editRemarks}
  1339. onChange={(e) => { this.setState({ editRemarks: e.target.value }) }} />
  1340. </FormItem>
  1341. </div>
  1342. <div className="clearfix">
  1343. <FormItem
  1344. labelCol={{ span: 7 }}
  1345. wrapperCol={{ span: 12 }}
  1346. label="显示标识"
  1347. >
  1348. <Select placeholder="显示标识"
  1349. value={this.state.hideSign}
  1350. onChange={(e) => { this.setState({ hideSign: e }) }}
  1351. style={{ width: '95%' }}
  1352. required="required"
  1353. >
  1354. <Option value={0}>不显示</Option>
  1355. <Option value={1}>显示</Option>
  1356. </Select>
  1357. </FormItem>
  1358. </div>
  1359. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1360. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1361. <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{ marginLeft: '100px' }}>取消</Button>
  1362. </FormItem>
  1363. </Spin>
  1364. </Form >
  1365. </Modal>
  1366. </div>
  1367. </div>
  1368. </div>
  1369. );
  1370. }
  1371. }));
  1372. export default Organization;