orgDesc.jsx 34 KB

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