orgDesc.jsx 35 KB

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