applyFee.jsx 9.0 KB

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