confirm.jsx 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. import React from 'react';
  2. import { Input, Button, Form, Icon, Spin, message, } from 'antd';
  3. import './certify.less';
  4. import { newDownloadFile } from '../tools';
  5. import ajax from 'jquery/src/ajax/xhr.js'
  6. import $ from 'jquery/src/ajax';
  7. const Content = Form.create()(React.createClass({
  8. getData() {
  9. this.setState({
  10. loading: true
  11. });
  12. $.ajax({
  13. method: "get",
  14. dataType: "json",
  15. url: globalConfig.context + "/api/user/orgProcess",
  16. success: function (data) {
  17. if (data.data) {
  18. this.setState({
  19. unitName: data.data.unitName,
  20. licenceNumber: data.data.licenceNumber,
  21. licenceScanningUrl: data.data.licenceScanningUrl,
  22. orgCode: data.data.orgCode,
  23. orgCodeUrl: data.data.orgCodeUrl,
  24. lastYearTaxReportUrl: data.data.lastYearTaxReportUrl,
  25. ratepayId: data.data.ratepayId,
  26. firstContacts: data.data.firstContacts,
  27. firstMobile: data.data.firstMobile,
  28. bankAccount: data.data.bankAccount,
  29. banks: data.data.banks,
  30. bankBranch: data.data.bankBranch,
  31. bankCardNumber: data.data.bankCardNumber,
  32. legalPerson: data.data.legalPerson,
  33. legalPersonIdCard: data.data.legalPersonIdCard,
  34. });
  35. };
  36. }.bind(this),
  37. }).done(function (data) {
  38. if (data.error.length) {
  39. message.warning(data.error[0].message);
  40. }
  41. }.bind(this)).always(function () {
  42. this.setState({
  43. loading: false
  44. });
  45. }.bind(this));
  46. },
  47. getInitialState() {
  48. return {
  49. loading: false
  50. };
  51. },
  52. handleSubmit() {
  53. this.setState({
  54. loading: true
  55. });
  56. $.ajax({
  57. method: "POST",
  58. dataType: "json",
  59. crossDomain: false,
  60. url: globalConfig.context + "/api/user/orgNextPro",
  61. data: {
  62. process: 3
  63. }
  64. }).done(function (data) {
  65. if (!data.error.length) {
  66. message.success('保存成功!');
  67. this.props.changeStep(4);
  68. } else {
  69. message.warning(data.error[0].message);
  70. this.setState({
  71. loading: false
  72. });
  73. }
  74. }.bind(this));
  75. },
  76. componentWillMount() {
  77. this.getData();
  78. },
  79. changeStep() {
  80. this.props.changeStep(1);
  81. },
  82. render() {
  83. const FormItem = Form.Item;
  84. const { getFieldDecorator } = this.props.form;
  85. const formItemLayout = {
  86. labelCol: { span: 6 },
  87. wrapperCol: { span: 12 },
  88. };
  89. const _me = this;
  90. return (
  91. <Spin spinning={this.state.loading} className="certify-spin">
  92. <Form horizontal className="certify-form">
  93. <FormItem wrapperCol={{ span: 12, offset: 6 }}>
  94. <p className="certify-title">请确认提交的企业信息</p>
  95. </FormItem>
  96. <FormItem
  97. {...formItemLayout}
  98. label="企业名称"
  99. >
  100. <span>{this.state.unitName}</span>
  101. </FormItem>
  102. <FormItem
  103. {...formItemLayout}
  104. label="营业执照注册号"
  105. >
  106. <span>{this.state.licenceNumber}</span>
  107. </FormItem>
  108. <FormItem
  109. labelCol={{ span: 6 }}
  110. wrapperCol={{ span: 18 }}
  111. label="营业执照副本扫描件"
  112. >
  113. <div className="idcard-img clearfix">
  114. <div className="idcard-imgbox">
  115. <img src={globalConfig.context + '/open/writeImage?path=' + this.state.licenceScanningUrl} alt="点击查看大图"
  116. onClick={(e) => { window.open(e.target.src) }} />
  117. </div>
  118. </div>
  119. </FormItem>
  120. <FormItem
  121. {...formItemLayout}
  122. label="组织机构代码"
  123. >
  124. <span>{this.state.orgCode}</span>
  125. </FormItem>
  126. <FormItem
  127. labelCol={{ span: 6 }}
  128. wrapperCol={{ span: 18 }}
  129. label="组织机构代码证"
  130. >
  131. <div className="idcard-img clearfix">
  132. <div className="idcard-imgbox">
  133. <img src={globalConfig.context + '/open/writeImage?path=' + this.state.orgCodeUrl} alt="点击查看大图"
  134. onClick={(e) => { window.open(e.target.src) }} />
  135. </div>
  136. </div>
  137. </FormItem>
  138. <FormItem
  139. labelCol={{ span: 6 }}
  140. wrapperCol={{ span: 18 }}
  141. label="上年度纳税报表"
  142. >
  143. <a onClick={newDownloadFile.bind(null, this.state.ratepayId, 'ratepay', '/api/user/cognizance/downloadRatepay', null)}>上年度纳税报表</a>
  144. </FormItem>
  145. <FormItem wrapperCol={{ span: 12, offset: 6 }}>
  146. <p className="certify-title">请确认银行卡信息</p>
  147. </FormItem>
  148. <FormItem
  149. {...formItemLayout}
  150. label="银行开户名"
  151. >
  152. <span>{this.state.bankAccount}</span>
  153. </FormItem>
  154. <FormItem
  155. {...formItemLayout}
  156. label="开户银行"
  157. >
  158. <span>{this.state.banks}</span>
  159. </FormItem>
  160. <FormItem
  161. {...formItemLayout}
  162. label="开户行支行名称"
  163. >
  164. <span>{this.state.bankBranch}</span>
  165. </FormItem>
  166. <FormItem
  167. {...formItemLayout}
  168. label="银行卡号"
  169. >
  170. <span>{this.state.bankCardNumber}</span>
  171. </FormItem>
  172. <FormItem
  173. {...formItemLayout}
  174. label="联系方式"
  175. >
  176. <span>{this.state.firstContacts + ' ' + this.state.firstMobile}</span>
  177. </FormItem>
  178. <FormItem wrapperCol={{ span: 12, offset: 6 }}>
  179. <p className="certify-title">请确认法人信息</p>
  180. </FormItem>
  181. <FormItem
  182. {...formItemLayout}
  183. label="法人真实姓名"
  184. >
  185. <span>{this.state.legalPerson}</span>
  186. </FormItem>
  187. <FormItem
  188. {...formItemLayout}
  189. label="法人身份证号"
  190. >
  191. <span>{this.state.legalPersonIdCard}</span>
  192. </FormItem>
  193. <FormItem wrapperCol={{ span: 18, offset: 6 }}>
  194. <span style={{ 'color': '#ea0862' }}>
  195. <Icon type="exclamation-circle" />
  196. 提醒:银行卡号、营业执照号码、组织机构代码证号码,认证成功之前,
  197. 最多只能申请认证3次;认证成功后,不能再申请认证。
  198. </span>
  199. </FormItem>
  200. <FormItem wrapperCol={{ span: 12, offset: 6 }}>
  201. <Button className="set-submit" type="primary" onClick={_me.handleSubmit}>下一步</Button>
  202. <Button className="exit" type="ghost" onClick={_me.changeStep}>返回修改</Button>
  203. </FormItem>
  204. </Form >
  205. </Spin >
  206. );
  207. },
  208. }));
  209. export default Content;