import React from 'react'; import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader } from 'antd'; import { techFieldList, provinceArr } from '../../../dataDic.js'; import { getTime, getPatentState } from '../../../tools.js'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import PatentAdd from './comPatentAdd.jsx'; import PatentChange from './comPatentChange.jsx'; //import PatentDesc from '../patent/comPatentDesc.jsx'; import './copyright.less'; const copyright = React.createClass({ loadData(pageNo) { this.state.data = []; this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/managePatentList", data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, locationProvince: this.state.province, unitName: this.state.unitName, }, success: function (data) { if (data.error.length || !data.data || !data.data.list) { message.warning(data.error[0].message); return; } this.state.pagination.defaultCurrent = data.data.pageNo; this.state.pagination.total = data.data.totalCount; this.setState({ dataSource: data.data.list, pagination: this.state.pagination }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, getAuthorList() { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/getAdmin", success: function (data) { if (data.error.length || !data.data) { return; }; let _me = this; for (var item in data.data) { _me.state.authorOption.push( {data.data[item]} ) }; }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, getCompanyList() { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/getUnitNames", success: function (data) { if (data.error.length || !data.data) { return; }; let _me = this; for (var item in data.data) { _me.state.companyOption.push( {data.data[item]} ) }; }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, getInitialState() { return { visible:false, provinceOption:[], companyOption:[], authorOption:[], province: '', unitName: '', data: [], 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: 'number', key: 'number', }, { title: '省份', dataIndex: 'province', key: 'province', }, { title: '公司名称', dataIndex: 'unitName', key: 'unitName', }, { title: '联系方式', dataIndex: 'contacts', key: 'contacts', }, { title: '派单信息', dataIndex: 'createInfo', key: 'createInfo', }, { title: '软著名称', dataIndex: 'copyrightName', key: 'copyrightName', }, { title: '加急', dataIndex: 'urgent', key: 'urgent', }, { title: '咨询师', dataIndex: 'consultant', key: 'consultant', }, { title: '派单日', dataIndex: 'createTime', key: 'createTime', }, { title: '受理日', dataIndex: 'acceptanceTime', key: 'acceptanceTime', }, { title: '(预计)下证时间', dataIndex: 'endTime', key: 'endTime', }, { title: '备注', dataIndex: 'explain', key: 'explain', } ], dataSource: [] }; }, componentWillMount() { let _me = this; provinceArr.map(function (item) { _me.state.provinceOption.push( {item} ) }); //console.log(this.state.pagination.total); this.loadData(); this.getAuthorList(); this.getCompanyList(); }, tableRowClick(record, index) { this.state.RowData = record; this.setState({ showDesc: true }); }, closeDesc(e) { this.state.showDesc = e; this.loadData(); }, search() { this.loadData(); }, reset() { this.state.province = undefined; this.state.unitName = undefined; this.loadData(); }, showChangePatent() { require.ensure([], () => { const changePatent = require('./changePatent').default; this.setState({ visible: true }); }); }, render() { return (
软著申请管理
); } }); export default copyright;