applyFee.jsx 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. import React from 'react';
  2. import { Icon, Button, Select, Spin, Table, message, DatePicker } from 'antd';
  3. import { provinceArr } from '../../../dataDic.js';
  4. import { getTime, getPatentType, getPatentState } from '../../../tools.js';
  5. import ajax from 'jquery/src/ajax/xhr.js';
  6. import $ from 'jquery/src/ajax';
  7. import './comprehensive.less';
  8. import ApplyFeeDesc from './applyFeeDesc.jsx';
  9. const applyFee = React.createClass({
  10. loadData(pageNo) {
  11. this.state.data = [];
  12. this.setState({
  13. loading: true
  14. });
  15. $.ajax({
  16. method: "post",
  17. dataType: "json",
  18. crossDomain: false,
  19. url: globalConfig.context + "/techservice/patent/getApplicationFeeList",
  20. data: {
  21. pageNo: pageNo || 1,
  22. pageSize: this.state.pagination.pageSize,
  23. locationProvince: this.state.province,
  24. patentApplicationDate: this.state.searchData
  25. },
  26. success: function (data) {
  27. if (data.error.length || !data.data || !data.data.list) {
  28. message.warning(data.error[0].message);
  29. return;
  30. }
  31. for (let i = 0; i < data.data.list.length; i++) {
  32. let thisdata = data.data.list[i];
  33. this.state.data.push({
  34. key: i,
  35. cid: thisdata.cid,
  36. number: thisdata.serialNumber,
  37. province: thisdata.locationProvince,
  38. patentNumber: thisdata.patentNumber,
  39. unitName: thisdata.unitName,
  40. patentName: thisdata.patentName,
  41. authorizedDate: thisdata.authorizedDate,
  42. endTime: thisdata.authorizedDate,
  43. paymentState: thisdata.paymentState,
  44. applicationFee: thisdata.applicationFee,
  45. trialFee: thisdata.trialFee,
  46. printingFee: thisdata.printingFee,
  47. funds: thisdata.funds,
  48. reimbursement: thisdata.reimbursement,
  49. });
  50. };
  51. this.state.pagination.current = data.data.pageNo;
  52. this.state.pagination.total = data.data.totalCount;
  53. this.setState({
  54. dataSource: this.state.data,
  55. pagination: this.state.pagination
  56. });
  57. }.bind(this),
  58. }).always(function () {
  59. this.setState({
  60. loading: false
  61. });
  62. }.bind(this));
  63. },
  64. getInitialState() {
  65. return {
  66. number: '',
  67. patentNumber: '',
  68. //office: 事务所,
  69. province: '',
  70. unitName: '',
  71. patentType: '',
  72. patentName: '',
  73. provinceOption: [],
  74. data: [],
  75. download: globalConfig.context + '/api/warningreports/download',
  76. loading: false,
  77. pagination: {
  78. defaultCurrent: 1,
  79. defaultPageSize: 10,
  80. showQuickJumper: true,
  81. pageSize: 10,
  82. onChange: function (page) {
  83. this.loadData(page);
  84. }.bind(this),
  85. showTotal: function (total) {
  86. return '共' + total + '条数据';
  87. }
  88. },
  89. columns: [
  90. {
  91. title: '编号',
  92. dataIndex: 'number',
  93. key: 'number',
  94. }, {
  95. title: '申请号/专利号',
  96. dataIndex: 'patentNumber',
  97. key: 'patentNumber',
  98. }, {
  99. title: '省份',
  100. dataIndex: 'province',
  101. key: 'province',
  102. }, {
  103. title: '公司名称',
  104. dataIndex: 'companyName',
  105. key: 'companyName',
  106. }, {
  107. title: '专利名称',
  108. dataIndex: 'patentName',
  109. key: 'patentName',
  110. }, {
  111. title: '缴费状态',
  112. dataIndex: 'paymentState',
  113. key: 'paymentState',
  114. render: text => {
  115. if (text == '0') {
  116. return '待缴费'
  117. } else if (text == '1') {
  118. return '已缴费'
  119. };
  120. }
  121. }, {
  122. title: '申请费',
  123. dataIndex: 'applicationFee',
  124. key: 'applicationFee',
  125. }, {
  126. title: '实审费',
  127. dataIndex: 'trialFee',
  128. key: 'trialFee',
  129. }, {
  130. title: '文印费',
  131. dataIndex: 'printingFee',
  132. key: 'printingFee',
  133. }, {
  134. title: '是否请款',
  135. dataIndex: 'funds',
  136. key: 'funds',
  137. render: text => {
  138. if (text == '0') {
  139. return '未请款'
  140. } else if (text == '1') {
  141. return '已请款'
  142. };
  143. }
  144. }, {
  145. title: '是否报销',
  146. dataIndex: 'reimbursement',
  147. key: 'reimbursement',
  148. render: text => {
  149. if (text == '0') {
  150. return '未报销'
  151. } else if (text == '1') {
  152. return '已报销'
  153. };
  154. }
  155. }, {
  156. title: '申请日',
  157. dataIndex: 'authorizedDate',
  158. key: 'authorizedDate',
  159. render: text => { return getTime(text) }
  160. }, {
  161. title: '缴费截止时间',
  162. dataIndex: 'endTime',
  163. key: 'endTime',
  164. render: text => { return getTime(text, 2) }
  165. }
  166. ],
  167. dataSource: []
  168. };
  169. },
  170. componentWillMount() {
  171. let _me = this;
  172. provinceArr.map(function (item) {
  173. _me.state.provinceOption.push(
  174. <Select.Option value={item} key={item}>{item}</Select.Option>
  175. )
  176. });
  177. this.loadData();
  178. },
  179. tableRowClick(record, index) {
  180. this.state.RowData = record;
  181. if (record.annualFeeState !== '1') {
  182. this.setState({
  183. showDesc: true
  184. });
  185. };
  186. },
  187. closeDesc(e) {
  188. this.state.showDesc = e;
  189. this.loadData();
  190. },
  191. searchAuthorizedDate(data, dataString) {
  192. this.state.searchData = dataString;
  193. },
  194. search() {
  195. this.loadData();
  196. },
  197. reset() {
  198. this.state.province = '';
  199. this.state.searchData = '';
  200. this.loadData();
  201. },
  202. render() {
  203. const { MonthPicker, RangePicker } = DatePicker;
  204. return (
  205. <div className="patent-content" >
  206. <div className="content-title">
  207. <span>代缴年登印费专利管理</span>
  208. </div>
  209. <div className="patent-query">
  210. <Select placeholder="选择省份" style={{ width: 200 }} onChange={(e) => { this.state.province = e }}>{this.state.provinceOption}</Select>
  211. <span>申请日:<RangePicker onChange={this.searchAuthorizedDate} /></span>
  212. <span>
  213. <Button type="primary" onClick={this.search}>搜索</Button>
  214. <Button onClick={this.reset}>重置</Button>
  215. <Button type="ghost">导出</Button>
  216. </span>
  217. </div>
  218. <div className="patent-table">
  219. <Spin spinning={this.state.loading}>
  220. <Table columns={this.state.columns}
  221. dataSource={this.state.dataSource}
  222. pagination={this.state.pagination}
  223. onRowClick={this.tableRowClick} />
  224. </Spin>
  225. </div>
  226. <ApplyFeeDesc data={this.state.RowData} showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
  227. </div >
  228. );
  229. }
  230. });
  231. export default applyFee;