import React from 'react'; import { Icon, Modal, message, Spin, Timeline, Button, Popconfirm } from 'antd'; import { getPatentType, getPatentState, getTime, getIndustryType, newDownloadFile } 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); }, getPatentInfo(thepid) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/user/patent/clientPatentInfo", data: { pid: thepid }, success: function (data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); } thisData = {}; }; this.setState({ patentInfoData: thisData, stepList: this.state.stepList }); }.bind(this), }); }, getStepList(thepid) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/user/patent/patentProcess', data: { pid: thepid || this.props.pid }, success: function (data) { let theArr = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { for (var item in data.data) { theArr.push( {getPatentState(data.data[item].state)} {data.data[item].recordTimeFormattedDate} ) }; }; this.setState({ stepList: theArr }); }.bind(this), }); }, componentWillReceiveProps(nextProps) { if (!this.state.visible && nextProps.showDesc) { if (nextProps.data && nextProps.data.pid) { this.getStepList(nextProps.data.pid); this.getPatentInfo(nextProps.data.pid); }; }; this.state.visible = nextProps.showDesc; }, handleCancel(e) { this.setState({ visible: false, }); this.props.closeDesc(false); }, confirmButton() { this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/user/patent/clientConfirm", data: { pid: this.props.data.pid } }).done(function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } else { message.success('已确认完成!'); this.state.patentInfoData.confirmState = 1; }; }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, render() { let theData = this.state.patentInfoData; if (theData) { return (

编号:{theData.serialNumber}

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

专利名称:{theData.patentName}

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

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

所属行业:{getIndustryType(theData.patentField)}

简介:{theData.patentDes}
专利相关材料: {theData.patentWritingUrl ?

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

:

专利稿件未上传

} {theData.authorizationNoticeUrl ?

授权通知书下载

:

授权通知书未上传

} {theData.patentCertificateUrl ?

专利证书下载

:

专利证书未上传

} {theData.patentProryStatementUrl ?

专利代理委托书下载

:

专利代理委托书未上传

}
专利申请日:{theData.patentApplicationFormattedDate}
专利授权日:{theData.authorizedFormattedDate}
每年年费缴费截止日:{getTime(theData.patentApplicationDate, 12)}

第一发明人:

姓名:{theData.firstInventorName}

身份证:{theData.firstInventorIdNumber}

第二发明人:

姓名:{theData.secondInventorName}

第三发明人:

姓名:{theData.thirdInventorName}

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