123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- import React from 'react';
- import { Spin, Table, Switch, message } from 'antd';
- import { getTime, getPatentState, getPatentType } from '../../../tools.js';
- import { getProvince } from '../../../NewDicProvinceList';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import './comprehensive.less';
- import CorrectionDesc from './correctionDesc.jsx';
- const Correction = React.createClass({
- loadData(pageNo) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/patent/noticeOfCorrectionList",
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize
- },
- success: function (data) {
- if (data.error.length || !data.data || !data.data.list) {
- message.warning(data.error[0].message);
- return;
- }
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- this.state.data.push({
- key: i,
- pid: thisdata.pid,
- uid: thisdata.uid,
- number: thisdata.serialNumber,
- patentNumber: thisdata.patentNumber,
- office: thisdata.office,
- locationProvince: thisdata.locationProvince,
- unitName: thisdata.unitName,
- patentType: thisdata.patentCatagory,
- patentName: thisdata.patentName,
- patentState: thisdata.patentState,
- endData: [thisdata.patentCatagory, thisdata.recordTime],
- author: thisdata.author,
- authorizedDate: thisdata.authorizedDate
- });
- };
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- this.setState({
- dataSource: this.state.data,
- pagination: this.state.pagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- serialNumber: '',
- patentNumber: '',
- office: '',
- locationProvince: '',
- unitName: '',
- patentCatagory: '',
- patentName: '',
- patentState: '',
- author: '',
- authorizedDate: '',
- loading: false,
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- columns: [
- {
- title: '答复截止日',
- dataIndex: 'endData',
- key: 'endData',
- render: text => {
- if (text[0] == '0') {
- return getTime(text[1], 2)
- } else if (text[0] == '1' || text[0] == '2') {
- return getTime(text[1], 4)
- }
- },
- }, {
- title: '编号',
- dataIndex: 'number',
- key: 'number',
- }, {
- title: '申请号/专利号',
- dataIndex: 'patentNumber',
- key: 'patentNumber',
- }, {
- title: '事务所',
- dataIndex: 'office',
- key: 'office',
- }, {
- title: '省份',
- dataIndex: 'locationProvince',
- key: 'locationProvince',
- render: text => { return getProvince(text) }
- }, {
- title: '公司名称',
- dataIndex: 'unitName',
- key: 'unitName',
- }, {
- title: '专利类型',
- dataIndex: 'patentType',
- key: 'patentType',
- render: text => { return getPatentType(text) },
- }, {
- title: '专利名称',
- dataIndex: 'patentName',
- key: 'patentName',
- }, {
- title: '专利状态',
- dataIndex: 'patentState',
- key: 'patentState',
- render: text => { return getPatentState(text) },
- }, {
- title: '资料撰写人',
- dataIndex: 'author',
- key: 'author',
- }
- ],
- dataSource: []
- };
- },
- componentWillMount() {
- this.loadData();
- },
- tableRowClick(record, index) {
- this.state.RowData = record;
- this.setState({
- showDesc: true
- });
- },
- closeDesc(e, s) {
- this.state.showDesc = e;
- if (s) {
- this.loadData();
- };
- },
- render() {
- return (
- <div className="patent-content" >
- <div className="content-title">
- <span>补正审查通知管理</span>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.columns}
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- style={{
- cursor: 'pointer',
- }}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <CorrectionDesc data={this.state.RowData} showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
- </div >
- );
- }
- });
- export default Correction;
|