import React from 'react'; import { Icon, Modal, message, Spin, Timeline, Button } from 'antd'; import { getPatentType, getPatentState, getTime, getPatentField } from '../../tools.js'; import './patent.less'; import ajax from 'jquery/src/ajax/xhr.js' import $ from 'jquery/src/ajax'; const PatentDesc = React.createClass({ getInitialState() { return { visible: false, loading: false, stepList: [] }; }, showModal() { this.setState({ visible: true, }); }, handleOk() { this.setState({ visible: false, }); this.props.closeDesc(false, true); }, getStepList(thepid) { this.state.stepList = []; $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/patentProcess", data: { pid: thepid }, success: function (data) { if (data.error && data.error.length && !data.data) { return; }; let _me = this; for (var item in data.data) { _me.state.stepList.push( {getPatentState(data.data[item].state)} {getTime(data.data[item].recordTime)} ) }; this.setState({ stepList: this.state.stepList }); }.bind(this), }); }, getPatentInfo(thepid) { $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/clientPatentInfo", data: { patentId: thepid }, success: function (data) { let thisData = data.data; if (data.error && data.error.length && !data.data) { return; }; this.setState({ serialNumber: thisData.serialNumber, patentNumber: thisData.patentNumber, patentName: thisData.patentName, patentCatagory: thisData.patentCatagory, patentState: thisData.patentState, patentField: thisData.patentField, patentDes: thisData.patentDes, patentProryStatementUrl: thisData.patentProryStatementUrl, patentWritingUrl: thisData.patentWritingUrl, authorizationNoticeUrl: thisData.authorizationNoticeUrl, patentCertificateUrl: thisData.patentCertificateUrl, patentApplicationDate: thisData.patentApplicationDate, firstInventorName: thisData.firstInventorName, firstInventorNationality: thisData.firstInventorNationality, firstInventorIdNumber: thisData.firstInventorIdNumber, firstInventorIsPublish: thisData.firstInventorIsPublish, secondInventorName: thisData.secondInventorName, secondInventorNationality: thisData.secondInventorNationality, secondInventorIsPublish: thisData.secondInventorIsPublish, thirdInventorName: thisData.thirdInventorName, thirdInventorNationality: thisData.thirdInventorNationality, thirdInventorIsPublish: thisData.thirdInventorIsPublish, createTime: thisData.createTime, author: thisData.author, office: thisData.office, principal: thisData.principal, }); }.bind(this), }); }, componentWillReceiveProps(nextProps) { this.state.visible = nextProps.showDesc if (nextProps.data && nextProps.data.pid !== null) { this.getStepList(nextProps.data.pid); this.getPatentInfo(nextProps.data.pid); } }, handleCancel(e) { this.setState({ visible: false, }); this.props.closeDesc(false); }, downloadFile(url, type) { window.open(globalConfig.context + "/techservice/patent/downloadFile?path=" + url + "&sign=" + type) }, confirmButton() { this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/techservice/patent/clientConfirm", data: { pid: this.props.data.pid } }).done(function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, render() { let theData = this.state; if (this.props.data) { return (

编号:{theData.serialNumber}

申请号/专利号:{theData.patentNumber}

专利名称:{theData.patentName}

专利类型:{getPatentType(theData.patentCatagory)}

专利状态:{getPatentState(theData.patentState)}

专利领域:{getPatentField(theData.patentField)}

简介:{theData.patentDes}
专利相关材料: {theData.patentWritingUrl !== null && theData.patentWritingUrl !== undefined && theData.patentWritingUrl !== '' ?

专利稿件 {theData.confirmState == '0' ? : }

: 专利稿件未上传 } {theData.authorizationNoticeUrl !== null && theData.authorizationNoticeUrl !== undefined && theData.authorizationNoticeUrl !== '' ?

授权通知书

: 授权通知书未上传 } {theData.patentCertificateUrl !== null && theData.patentCertificateUrl !== undefined && theData.patentCertificateUrl !== '' ?

专利证书

: 专利证书未上传 }
专利申请日:{theData.startTime}
专利授权日:{theData.authorizedTime}
每年年费缴费截止日:{theData.endTime}

第一发明人:

姓名:{theData.firstInventorName}

身份证:{theData.firstInventorIdNumber}

第二发明人:

姓名:{theData.secondInventorName}

第三发明人:

姓名:{theData.thirdInventorName}

{this.state.stepList}
); } else { return
} }, }); export default PatentDesc;