orgDesc.jsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. import React from 'react';
  2. import { Icon, Modal, message, Spin, Button, Tabs, Input, Select, Form, DatePicker, Cascader, Upload } from 'antd';
  3. import './userList.less';
  4. import ajax from 'jquery/src/ajax/xhr.js';
  5. import $ from 'jquery/src/ajax';
  6. import moment from 'moment';
  7. import { eduLevelList, auditStatusList, certifyStepList } from '../../dataDic.js'
  8. import { provinceSelect, beforeUploadFile } from '../../tools.js';
  9. const OrgCertify = Form.create()(React.createClass({
  10. getInitialState() {
  11. return {
  12. visible: false,
  13. loading: false,
  14. tabKey: "1",
  15. saveSign: "save",
  16. eduLvlOption: [],
  17. auditStatusOption: []
  18. };
  19. },
  20. loadData(uid) {
  21. this.state.data = [];
  22. this.setState({
  23. loading: true
  24. });
  25. $.ajax({
  26. method: window.showAuditStatus ? "get" : "post",
  27. dataType: "json",
  28. crossDomain: false,
  29. url: window.showAuditStatus ? globalConfig.context + "/api/admin/userCertify/orgDetail" : globalConfig.context + "/api/admin/orgDetail",
  30. data: {
  31. uid: uid
  32. },
  33. success: function (data) {
  34. let thisData = data.data;
  35. if (!thisData) {
  36. if (data.error && data.error.length) {
  37. message.warning(data.error[0].message);
  38. };
  39. thisData = {};
  40. };
  41. this.setState({
  42. id: thisData.id,
  43. licenceAddress: [thisData.licenceProvince, thisData.licenceCity, thisData.licenceArea],
  44. locationAddress: [thisData.locationProvince, thisData.locationCity, thisData.locationArea],
  45. contacts: thisData.contacts,
  46. contactMobile: thisData.contactMobile,
  47. fixedTel: thisData.fixedTel,
  48. qq: thisData.qq,
  49. postalAddress: thisData.postalAddress,
  50. postcode: thisData.postcode,
  51. aftUsername: thisData.aftUsername,
  52. unitName: thisData.unitName,
  53. identityType: thisData.identityType, //组织性质
  54. registeredCapital: thisData.registeredCapital, //注册资金
  55. firstContacts: thisData.firstContacts,
  56. firstMobile: thisData.firstMobile,
  57. secondContacts: thisData.secondContacts,
  58. secondMobile: thisData.secondMobile,
  59. thirdContacts: thisData.thirdContacts,
  60. thirdMobile: thisData.thirdMobile,
  61. legalPerson: thisData.legalPerson,
  62. legalPersonIdCard: thisData.legalPersonIdCard,
  63. licenceNumber: thisData.licenceNumber,
  64. licenceScanningUrl: thisData.licenceScanningUrl,
  65. orgCode: thisData.orgCode,
  66. orgCodeUrl: thisData.orgCodeUrl,
  67. bankAccount: thisData.bankAccount,
  68. banks: thisData.banks,
  69. bankBranch: thisData.bankBranch,
  70. bankCardNumber: thisData.bankCardNumber,
  71. validationAmount: thisData.validationAmount, //打款金额
  72. paymentDate: thisData.paymentDate,
  73. paymentDateFormattedDate: thisData.paymentDateFormattedDate,
  74. lastYearTaxReportUrl: thisData.lastYearTaxReportUrl,
  75. auditStatus: thisData.auditStatus,
  76. aid: thisData.aid, //业务员ID
  77. mid: thisData.mid //客户经理ID
  78. });
  79. this.props.form.resetFields();
  80. }.bind(this),
  81. }).always(function () {
  82. this.setState({
  83. loading: false
  84. });
  85. }.bind(this));
  86. },
  87. getAccountManagerList() {
  88. this.setState({
  89. loading: true
  90. });
  91. $.ajax({
  92. method: "get",
  93. dataType: "json",
  94. crossDomain: false,
  95. url: globalConfig.context + "/api/admin/userCertify/accountManager",
  96. success: function (data) {
  97. let theArr = [];
  98. if (!data.data) {
  99. if (data.error && data.error.length) {
  100. message.warning(data.error[0].message);
  101. };
  102. return;
  103. };
  104. for (var item in data.data) {
  105. theArr.push(
  106. <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
  107. )
  108. };
  109. this.setState({
  110. accountManagerOption: theArr,
  111. accountManagerList: data.data
  112. });
  113. }.bind(this),
  114. }).always(function () {
  115. this.setState({
  116. loading: false
  117. });
  118. }.bind(this));
  119. },
  120. getTechnicianList() {
  121. this.setState({
  122. loading: true
  123. });
  124. $.ajax({
  125. method: "get",
  126. dataType: "json",
  127. crossDomain: false,
  128. url: globalConfig.context + "/api/admin/userCertify/technician",
  129. success: function (data) {
  130. let theArr = [];
  131. if (!data.data) {
  132. if (data.error && data.error.length) {
  133. message.warning(data.error[0].message);
  134. };
  135. return;
  136. };
  137. for (var item in data.data) {
  138. theArr.push(
  139. <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
  140. )
  141. };
  142. this.setState({
  143. technicianOption: theArr,
  144. technicianList: data.data
  145. });
  146. }.bind(this),
  147. }).always(function () {
  148. this.setState({
  149. loading: false
  150. });
  151. }.bind(this));
  152. },
  153. handleSubmit(e) {
  154. if (e) {
  155. e.preventDefault();
  156. };
  157. this.props.form.validateFields((err, values) => {
  158. if (!err) {
  159. this.setState({
  160. loading: true
  161. });
  162. //金额判断
  163. if (values.amountMoney && values.amountMoney < 0 && values.amountMoney > 100 && /^\d+(\.\d{2})?$/.test(values.amountMoney)) {
  164. message.warning('请输入0-100以内的金额');
  165. return;
  166. };
  167. $.ajax({
  168. method: "POST",
  169. dataType: "json",
  170. crossDomain: false,
  171. url: window.showAuditStatus ? globalConfig.context + "/api/admin/userCertify/updateOrgDetail" : globalConfig.context + "/api/admin/updateOrgDetail",
  172. data: {
  173. uid: this.props.uid,
  174. id: this.state.id,
  175. contacts: values.contacts,
  176. contactMobile: values.contactMobile,
  177. postalAddress: values.postalAddress,
  178. postcode: values.postcode,
  179. aftUsername: values.aftUsername,
  180. unitName: values.unitName,
  181. identityType: values.identityType, //组织性质
  182. registeredCapital: values.registeredCapital, //注册资金
  183. legalPerson: values.legalPerson,
  184. legalPersonIdCard: values.legalPersonIdCard,
  185. licenceNumber: values.licenceNumber,
  186. orgCode: values.orgCode,
  187. firstContacts: values.firstContacts,
  188. firstMobile: values.firstMobile,
  189. secondContacts: values.secondContacts,
  190. secondMobile: values.secondMobile,
  191. thirdContacts: values.thirdContacts,
  192. thirdMobile: values.thirdMobile,
  193. bankAccount: values.bankAccount,
  194. banks: values.banks,
  195. bankBranch: values.bankBranch,
  196. bankCardNumber: values.bankCardNumber,
  197. validationAmount: values.validationAmount, //打款金额
  198. paymentDateFormattedDate: values.paymentDateFormattedDate ? values.paymentDateFormattedDate.format("YYYY-MM-DD") : undefined,
  199. auditStatus: values.auditStatus,
  200. licenceScanningUrl: this.state.licenceScanningUrl,
  201. orgCodeUrl: this.state.orgCodeUrl,
  202. lastYearTaxReportUrl: this.state.lastYearTaxReportUrl,
  203. //process: this.state.process,
  204. licenceArea: values.licenceAddress[2],
  205. licenceCity: values.licenceAddress[1],
  206. licenceProvince: values.licenceAddress[0],
  207. locationArea: values.locationAddress[2],
  208. locationCity: values.locationAddress[1],
  209. locationProvince: values.locationAddress[0],
  210. aid: values.aid, //指派业务员ID
  211. mid: values.mid, //指派客户经理ID
  212. saveSign: this.state.saveSign
  213. }
  214. }).done(function (data) {
  215. if (!data.error.length) {
  216. message.success('保存成功!');
  217. } else {
  218. message.warning(data.error[0].message);
  219. }
  220. }.bind(this)).always(function () {
  221. this.setState({
  222. visible: false,
  223. saveSign: "save"
  224. });
  225. this.props.handleOk();
  226. }.bind(this));
  227. }
  228. });
  229. },
  230. handleCancel() {
  231. this.props.closeDesc(false);
  232. },
  233. componentWillMount() {
  234. let _me = this;
  235. eduLevelList.map(function (item, i) {
  236. _me.state.eduLvlOption.push(
  237. <Select.Option key={item.key} value={item.value} >{item.key}</Select.Option>
  238. );
  239. });
  240. auditStatusList.map(function (item, i) {
  241. _me.state.auditStatusOption.push(
  242. <Select.Option key={item.key} value={item.value} >{item.key}</Select.Option>
  243. );
  244. });
  245. this.loadData(this.props.uid);
  246. if (window.showAuditStatus) {
  247. this.getAccountManagerList();
  248. this.getTechnicianList();
  249. };
  250. },
  251. componentWillReceiveProps(nextProps) {
  252. if (!this.props.visible && nextProps.visible) {
  253. this.loadData(nextProps.uid);
  254. this.state.tabKey = "1";
  255. };
  256. },
  257. render() {
  258. const { getFieldDecorator } = this.props.form;
  259. const FormItem = Form.Item
  260. const formItemLayout = {
  261. labelCol: { span: 6 },
  262. wrapperCol: { span: 12 },
  263. };
  264. return (
  265. <Form horizontal onSubmit={this.handleSubmit} className="person-form">
  266. <Tabs defaultActiveKey="1" activeKey={this.state.tabKey} onChange={(e) => { this.setState({ tabKey: e }); }}>
  267. <Tabs.TabPane tab="基本资料" key="1">
  268. <FormItem
  269. {...formItemLayout}
  270. label="公司名称"
  271. >
  272. {getFieldDecorator('unitName', {
  273. initialValue: this.state.unitName
  274. })(
  275. <Input />
  276. )}
  277. </FormItem>
  278. <FormItem
  279. {...formItemLayout}
  280. label="认证名称"
  281. >
  282. {getFieldDecorator('aftUsername', {
  283. initialValue: this.state.aftUsername
  284. })(
  285. <Input />
  286. )}
  287. </FormItem>
  288. <FormItem
  289. {...formItemLayout}
  290. label="身份类型"
  291. >
  292. {getFieldDecorator('identityType', {
  293. initialValue: this.state.identityType
  294. })(
  295. <Select placeholder="身份类型" style={{ width: 200 }}
  296. onChange={(e) => { this.state.identityType = e }}>
  297. {this.state.eduLvlOption}
  298. </Select>
  299. )}
  300. </FormItem>
  301. <FormItem
  302. {...formItemLayout}
  303. label="第一联系人"
  304. >
  305. {getFieldDecorator('firstContacts', {
  306. initialValue: this.state.firstContacts
  307. })(
  308. <Input />
  309. )}
  310. </FormItem>
  311. <FormItem
  312. {...formItemLayout}
  313. label="第一联系人电话"
  314. >
  315. {getFieldDecorator('firstMobile', {
  316. initialValue: this.state.firstMobile
  317. })(
  318. <Input />
  319. )}
  320. </FormItem>
  321. <FormItem
  322. {...formItemLayout}
  323. label="第二联系人"
  324. >
  325. {getFieldDecorator('secondContacts', {
  326. initialValue: this.state.secondContacts
  327. })(
  328. <Input />
  329. )}
  330. </FormItem>
  331. <FormItem
  332. {...formItemLayout}
  333. label="第二联系人电话"
  334. >
  335. {getFieldDecorator('secondMobile', {
  336. initialValue: this.state.secondMobile
  337. })(
  338. <Input />
  339. )}
  340. </FormItem>
  341. <FormItem
  342. {...formItemLayout}
  343. label="第三联系人"
  344. >
  345. {getFieldDecorator('thirdContacts', {
  346. initialValue: this.state.thirdContacts
  347. })(
  348. <Input />
  349. )}
  350. </FormItem>
  351. <FormItem
  352. {...formItemLayout}
  353. label="第三联系人电话"
  354. >
  355. {getFieldDecorator('thirdMobile', {
  356. initialValue: this.state.thirdMobile
  357. })(
  358. <Input />
  359. )}
  360. </FormItem>
  361. </Tabs.TabPane>
  362. <Tabs.TabPane tab="认证信息" key="2">
  363. <FormItem
  364. {...formItemLayout}
  365. label="法人"
  366. >
  367. {getFieldDecorator('legalPerson', {
  368. initialValue: this.state.legalPerson
  369. })(
  370. <Input />
  371. )}
  372. </FormItem>
  373. <FormItem
  374. {...formItemLayout}
  375. label="法人身份证号"
  376. >
  377. {getFieldDecorator('legalPersonIdCard', {
  378. initialValue: this.state.legalPersonIdCard
  379. })(
  380. <Input />
  381. )}
  382. </FormItem>
  383. <FormItem
  384. {...formItemLayout}
  385. label="注册资金"
  386. >
  387. {getFieldDecorator('registeredCapital', {
  388. initialValue: this.state.registeredCapital
  389. })(
  390. <Input />
  391. )}
  392. </FormItem>
  393. <FormItem
  394. {...formItemLayout}
  395. label="营业执照编号"
  396. >
  397. {getFieldDecorator('licenceNumber', {
  398. initialValue: this.state.licenceNumber
  399. })(
  400. <Input />
  401. )}
  402. </FormItem>
  403. <FormItem
  404. {...formItemLayout}
  405. label="营业执照所在地"
  406. >
  407. {getFieldDecorator('licenceAddress', {
  408. initialValue: this.state.licenceAddress
  409. })(
  410. <Cascader options={provinceSelect()} placeholder="请选择地址" />
  411. )}
  412. </FormItem>
  413. <FormItem
  414. labelCol={{ span: 6 }}
  415. wrapperCol={{ span: 18 }}
  416. label="营业执照图片"
  417. >
  418. <div className="idcard-img clearfix">
  419. {this.state.licenceScanningUrl ? <div>
  420. <div className="idcard-imgbox">
  421. <img src={globalConfig.context + '/open/writeImage?path=' + this.state.licenceScanningUrl} alt="点击查看大图"
  422. onClick={(e) => { window.open(e.target.src) }} />
  423. </div>
  424. </div> : <div>
  425. <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
  426. </div>}
  427. <Upload
  428. name="licence"
  429. action={globalConfig.context + "/api/admin/userCertify/upload"}
  430. data={{
  431. 'uid': this.props.uid,
  432. 'sign': 'licence'
  433. }}
  434. beforeUpload={beforeUploadFile}
  435. showUploadList={false}
  436. onChange={(info) => {
  437. if (info.file.status !== 'uploading') {
  438. console.log(info.file, info.fileList);
  439. }
  440. if (info.file.status === 'done') {
  441. if (!info.file.response.error.length) {
  442. message.success(`${info.file.name} 文件上传成功!`);
  443. } else {
  444. message.warning(info.file.response.error[0].message);
  445. return;
  446. };
  447. this.state.licenceScanningUrl = info.file.response.data;
  448. } else if (info.file.status === 'error') {
  449. message.error(`${info.file.name} 文件上传失败。`);
  450. }
  451. }}
  452. >
  453. <Button><Icon type="upload" /> 上传营业执照 </Button>
  454. </Upload>
  455. </div>
  456. </FormItem>
  457. <FormItem
  458. {...formItemLayout}
  459. label="组织机构代码"
  460. >
  461. {getFieldDecorator('orgCode', {
  462. initialValue: this.state.orgCode
  463. })(
  464. <Input />
  465. )}
  466. </FormItem>
  467. <FormItem
  468. labelCol={{ span: 6 }}
  469. wrapperCol={{ span: 18 }}
  470. label="组织机构代码证图片"
  471. >
  472. <div className="idcard-img clearfix">
  473. {this.state.orgCodeUrl ? <div>
  474. <div className="idcard-imgbox">
  475. <img src={globalConfig.context + '/open/writeImage?path=' + this.state.orgCodeUrl} alt="点击查看大图"
  476. onClick={(e) => { window.open(e.target.src) }} />
  477. </div>
  478. </div> : <div>
  479. <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
  480. </div>}
  481. <Upload
  482. name="orgCode"
  483. action={globalConfig.context + "/api/admin/userCertify/upload"}
  484. data={{ 'uid': this.props.uid, 'sign': 'orgcode' }}
  485. beforeUpload={beforeUploadFile}
  486. showUploadList={false}
  487. onChange={(info) => {
  488. if (info.file.status !== 'uploading') {
  489. console.log(info.file, info.fileList);
  490. }
  491. if (info.file.status === 'done') {
  492. if (!info.file.response.error.length) {
  493. message.success(`${info.file.name} 文件上传成功!`);
  494. } else {
  495. message.warning(info.file.response.error[0].message);
  496. return;
  497. };
  498. this.state.orgCodeUrl = info.file.response.data;
  499. } else if (info.file.status === 'error') {
  500. message.error(`${info.file.name} 文件上传失败。`);
  501. }
  502. }}
  503. >
  504. <Button><Icon type="upload" /> 上传组织机构代码证 </Button>
  505. </Upload>
  506. </div>
  507. </FormItem>
  508. <FormItem
  509. labelCol={{ span: 6 }}
  510. wrapperCol={{ span: 18 }}
  511. label="上年度纳税报表"
  512. >
  513. <div className="idcard-img clearfix">
  514. {this.state.lastYearTaxReportUrl ? <div>
  515. <div className="idcard-imgbox">
  516. <img src={globalConfig.context + '/open/writeImage?path=' + this.state.lastYearTaxReportUrl} alt="点击查看大图"
  517. onClick={(e) => { window.open(e.target.src) }} />
  518. </div>
  519. </div> : <div>
  520. <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
  521. </div>}
  522. <Upload
  523. name="ratepay"
  524. action={globalConfig.context + "/api/admin/userCertify/upload"}
  525. data={{ 'uid': this.props.uid, 'sign': 'ratepay' }}
  526. beforeUpload={beforeUploadFile}
  527. showUploadList={false}
  528. onChange={(info) => {
  529. if (info.file.status !== 'uploading') {
  530. console.log(info.file, info.fileList);
  531. }
  532. if (info.file.status === 'done') {
  533. if (!info.file.response.error.length) {
  534. message.success(`${info.file.name} 文件上传成功!`);
  535. } else {
  536. message.warning(info.file.response.error[0].message);
  537. return;
  538. };
  539. this.state.lastYearTaxReportUrl = info.file.response.data;
  540. } else if (info.file.status === 'error') {
  541. message.error(`${info.file.name} 文件上传失败。`);
  542. }
  543. }}
  544. >
  545. <Button><Icon type="upload" /> 上传上年度纳税表 </Button>
  546. </Upload>
  547. </div>
  548. </FormItem>
  549. <FormItem
  550. {...formItemLayout}
  551. label="开户银行"
  552. >
  553. {getFieldDecorator('banks', {
  554. initialValue: this.state.banks
  555. })(
  556. <Input />
  557. )}
  558. </FormItem>
  559. <FormItem
  560. {...formItemLayout}
  561. label="开户银行支行"
  562. >
  563. {getFieldDecorator('bankBranch', {
  564. initialValue: this.state.bankBranch
  565. })(
  566. <Input />
  567. )}
  568. </FormItem>
  569. <FormItem
  570. {...formItemLayout}
  571. label="银行卡号"
  572. >
  573. {getFieldDecorator('bankCardNumber', {
  574. initialValue: this.state.bankCardNumber
  575. })(
  576. <Input />
  577. )}
  578. </FormItem>
  579. <FormItem
  580. {...formItemLayout}
  581. label="开户行所在地"
  582. >
  583. {getFieldDecorator('locationAddress', {
  584. initialValue: this.state.locationAddress
  585. })(
  586. <Cascader options={provinceSelect()} placeholder="请选择地址" />
  587. )}
  588. </FormItem>
  589. <div style={{ display: window.showAuditStatus ? 'none' : 'none' }}>
  590. <FormItem
  591. {...formItemLayout}
  592. label="认证状态"
  593. >
  594. <span>
  595. {(() => {
  596. let _me = this, theStatus;
  597. auditStatusList.map(function (item) {
  598. if (_me.state.auditStatus == item.value) {
  599. theStatus = item.key;
  600. };
  601. });
  602. return theStatus;
  603. })()}
  604. </span>
  605. </FormItem>
  606. <FormItem
  607. {...formItemLayout}
  608. label="业务员"
  609. >
  610. <span>{this.state.technicianList ? this.state.technicianList[this.state.aid] : ''}</span>
  611. </FormItem>
  612. <FormItem
  613. {...formItemLayout}
  614. label="客户经理"
  615. >
  616. <span>{this.state.accountManagerList ? this.state.accountManagerList[this.state.mid] : ''}</span>
  617. </FormItem>
  618. </div>
  619. <div style={{ display: window.showAuditStatus ? 'block' : 'none' }}>
  620. <FormItem
  621. {...formItemLayout}
  622. label="认证状态"
  623. >
  624. {getFieldDecorator('auditStatus', {
  625. initialValue: this.state.auditStatus
  626. })(
  627. <Select placeholder="选择要修改的认证状态" style={{ width: 200 }}
  628. onChange={(e) => { this.state.auditStatus = e }}>
  629. {
  630. auditStatusList.map(function (item, i) {
  631. return <Select.Option key={i} value={item.value} >{item.key}</Select.Option>
  632. })
  633. }
  634. </Select>
  635. )}
  636. </FormItem>
  637. <FormItem
  638. {...formItemLayout}
  639. label="业务员"
  640. >
  641. {getFieldDecorator('aid', {
  642. initialValue: this.state.aid
  643. })(
  644. <Select placeholder="选择一个业务员" style={{ width: 200 }}>
  645. {this.state.technicianOption}
  646. </Select>
  647. )}
  648. </FormItem>
  649. <FormItem
  650. {...formItemLayout}
  651. label="客户经理"
  652. >
  653. {getFieldDecorator('mid', {
  654. initialValue: this.state.mid
  655. })(
  656. <Select placeholder="选择一个客户经理" style={{ width: 200 }}>
  657. {this.state.accountManagerOption}
  658. </Select>
  659. )}
  660. </FormItem>
  661. </div>
  662. </Tabs.TabPane>
  663. </Tabs>
  664. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  665. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  666. <Button className="set-submit" type="ghost"
  667. onClick={() => {
  668. this.state.saveSign = "submit";
  669. this.handleSubmit();
  670. }}>提交审核</Button>
  671. </FormItem>
  672. </Form >
  673. );
  674. }
  675. }));
  676. const OrgDesc = React.createClass({
  677. getInitialState() {
  678. return {
  679. visible: false,
  680. loading: false
  681. };
  682. },
  683. showModal() {
  684. this.setState({
  685. visible: true,
  686. });
  687. },
  688. handleCancel(e) {
  689. this.setState({
  690. visible: false,
  691. });
  692. this.props.closeDesc(false);
  693. },
  694. handleOk(e) {
  695. this.setState({
  696. visible: false,
  697. });
  698. this.props.closeDesc(false, true);
  699. },
  700. componentWillReceiveProps(nextProps) {
  701. this.state.visible = nextProps.showDesc;
  702. },
  703. render() {
  704. if (this.props.data) {
  705. return (
  706. <div className="patent-desc">
  707. <Spin spinning={this.state.loading} className='spin-box'>
  708. <Modal maskClosable={false} title="用户详情" visible={this.state.visible}
  709. onCancel={this.handleCancel}
  710. width='600px'
  711. footer=''
  712. className="admin-desc-content">
  713. <OrgCertify
  714. visible={this.state.visible}
  715. uid={this.props.data.id}
  716. closeDesc={this.handleCancel}
  717. handleOk={this.handleOk} />
  718. </Modal>
  719. </Spin>
  720. </div>
  721. );
  722. } else {
  723. return <div></div>
  724. }
  725. },
  726. });
  727. export default OrgDesc;
  728. // <FormItem
  729. // {...formItemLayout}
  730. // label="打款金额"
  731. // >
  732. // {getFieldDecorator('validationAmount', {
  733. // initialValue: this.state.validationAmount
  734. // })(
  735. // <Input />
  736. // )}
  737. // </FormItem>
  738. // <FormItem
  739. // {...formItemLayout}
  740. // label="打款日期"
  741. // >
  742. // {getFieldDecorator('paymentDateFormattedDate', {
  743. // initialValue: this.state.paymentDate ? moment(this.state.paymentDate) : null
  744. // })(
  745. // <DatePicker />
  746. // )}
  747. // </FormItem>