|
|
@@ -1,10 +1,11 @@
|
|
|
import React from 'react';
|
|
|
-import { Icon, Modal, message, Spin, Steps, Input, Select, Upload, DatePicker, Button } from 'antd';
|
|
|
+import { Icon, Modal, message, Spin, Steps, Input, Select, Upload, DatePicker, Button, Table } from 'antd';
|
|
|
import './comprehensive.less';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
+import moment from 'moment';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import { patentTypeList, patentFieldList, patentStateList } from '../../../dataDic.js';
|
|
|
-import { getBase64, beforeUpload, getPatentState, getTime, downloadFile } from '../../../tools.js';
|
|
|
+import { getBase64, beforeUpload, getPatentState, getTime, newDownloadFile } from '../../../tools.js';
|
|
|
|
|
|
class Avatar extends React.Component {
|
|
|
constructor(props) {
|
|
|
@@ -34,8 +35,8 @@ class Avatar extends React.Component {
|
|
|
<Upload className="upload-file"
|
|
|
name="avatar"
|
|
|
showUploadList={false}
|
|
|
- action={globalConfig.context + "/techservice/patent/patentFile"}
|
|
|
- data={{ 'sign': this.props.name, 'oid': this.props.oid }}
|
|
|
+ action={globalConfig.context + "/api/admin/patent/upload"}
|
|
|
+ data={{ 'sign': this.props.name, 'uid': this.props.uid }}
|
|
|
beforeUpload={beforeUpload}
|
|
|
onChange={this.handleChange.bind(this)}
|
|
|
>
|
|
|
@@ -54,7 +55,29 @@ const PatentDesc = React.createClass({
|
|
|
patentFieldOption: [],
|
|
|
patentStateOption: [],
|
|
|
adminOption: [],
|
|
|
- patentProcessList: []
|
|
|
+ stateTable: [],
|
|
|
+ stateColumns: [{
|
|
|
+ title: '申请状态',
|
|
|
+ dataIndex: 'state',
|
|
|
+ key: 'state',
|
|
|
+ render: (text) => { return getPatentState(text) }
|
|
|
+ }, {
|
|
|
+ title: '处理时间',
|
|
|
+ dataIndex: 'recordTimeFormattedDate',
|
|
|
+ key: 'recordTimeFormattedDate',
|
|
|
+ }, {
|
|
|
+ title: '负责人',
|
|
|
+ dataIndex: 'principal',
|
|
|
+ key: 'principal',
|
|
|
+ }, {
|
|
|
+ title: '操作人',
|
|
|
+ dataIndex: 'operator',
|
|
|
+ key: 'operator',
|
|
|
+ }, {
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'comment',
|
|
|
+ key: 'comment',
|
|
|
+ }]
|
|
|
};
|
|
|
},
|
|
|
loadData() {
|
|
|
@@ -62,41 +85,69 @@ const PatentDesc = React.createClass({
|
|
|
loading: true
|
|
|
});
|
|
|
$.when($.ajax({
|
|
|
- method: "post",
|
|
|
+ method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/techservice/patent/patentProcess",
|
|
|
- data: {
|
|
|
- pid: this.state.xid
|
|
|
- }
|
|
|
+ url: globalConfig.context + "/api/admin/patent/detail?pid=" + this.state.xid,
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/patent/logs?pid=" + this.state.xid,
|
|
|
}), $.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/techservice/patent/getAdmin"
|
|
|
- })).done((data1, data2) => {
|
|
|
- if (data1[0].error.length) {
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/patent/patentStatus"
|
|
|
+ })).done((data1, data2, data3, data4) => {
|
|
|
+ let _me = this;
|
|
|
+ if (data1[0].error.length || !data1[0].data) {
|
|
|
message.warning(data1[0].error[0].message);
|
|
|
return;
|
|
|
};
|
|
|
- let _me = this;
|
|
|
- data1[0].data.map(function (item) {
|
|
|
- _me.state.patentProcessList.push(
|
|
|
- <p className="patent-process-list" key={item.id}>
|
|
|
- <span>专利状态: {getPatentState(item.state)}</span>
|
|
|
- <span>处理时间: {getTime(item.recordTime)}</span>
|
|
|
- <span>负责人:{item.principal}</span>
|
|
|
- <span>操作人:{item.operator}</span>
|
|
|
- </p>
|
|
|
- )
|
|
|
- });
|
|
|
+ this.state.data = data1[0].data;
|
|
|
+ this.state.contacts = data1[0].data.contacts;
|
|
|
if (data2[0].error.length) {
|
|
|
message.warning(data2[0].error[0].message);
|
|
|
return;
|
|
|
};
|
|
|
- for (var item in data2[0].data) {
|
|
|
+ _me.state.stateTable = [];
|
|
|
+ data2[0].data.map(function (item) {
|
|
|
+ _me.state.stateTable.push({
|
|
|
+ comment: item.comment,
|
|
|
+ id: item.id,
|
|
|
+ operator: item.operator,
|
|
|
+ pid: item.pid,
|
|
|
+ principal: item.principal,
|
|
|
+ recordTime: item.recordTime,
|
|
|
+ recordTimeFormattedDate: item.recordTimeFormattedDate,
|
|
|
+ state: item.state,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ if (data3[0].error.length) {
|
|
|
+ message.warning(data3[0].error[0].message);
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ for (var item in data3[0].data) {
|
|
|
_me.state.adminOption.push(
|
|
|
- <Select.Option value={item} key={item}>{data2[0].data[item]}</Select.Option>
|
|
|
+ <Select.Option value={item} key={item}>{data3[0].data[item]}</Select.Option>
|
|
|
+ )
|
|
|
+ };
|
|
|
+ if (!data4[0].data) {
|
|
|
+ if (data4[0].error && data4[0].error.length) {
|
|
|
+ message.warning(data4[0].error[0].message);
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ _me.state.patentStateOption = [];
|
|
|
+ for (var item in data4[0].data) {
|
|
|
+ _me.state.patentStateOption.push(
|
|
|
+ <Select.Option value={item} key={item}>{data4[0].data[item]}</Select.Option>
|
|
|
)
|
|
|
};
|
|
|
}).always(function () {
|
|
|
@@ -105,11 +156,36 @@ const PatentDesc = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ getContactsList(theUid) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/getContacts",
|
|
|
+ data: {
|
|
|
+ uid: theUid || this.state.uid
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theOption = [];
|
|
|
+ if (data.error.length || !data.data) {
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ for (let item in data.data) {
|
|
|
+ let theData = data.data[item];
|
|
|
+ theOption.push(
|
|
|
+ <Select.Option value={item} key={theData}>{theData}</Select.Option>
|
|
|
+ );
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ contactsOption: theOption
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ });
|
|
|
+ },
|
|
|
getOption() {
|
|
|
let _me = this;
|
|
|
_me.state.patentTypeOption = [];
|
|
|
_me.state.patentFieldOption = [];
|
|
|
- _me.state.patentStateOption = [];
|
|
|
patentTypeList.map(function (item) {
|
|
|
_me.state.patentTypeOption.push(
|
|
|
<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
@@ -120,11 +196,6 @@ const PatentDesc = React.createClass({
|
|
|
<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
)
|
|
|
});
|
|
|
- patentStateList.map(function (item) {
|
|
|
- _me.state.patentStateOption.push(
|
|
|
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
- )
|
|
|
- });
|
|
|
},
|
|
|
showModal() {
|
|
|
this.setState({
|
|
|
@@ -139,21 +210,23 @@ const PatentDesc = React.createClass({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/techservice/patent/managePatentInfo",
|
|
|
+ url: globalConfig.context + "/api/admin/patent/update",
|
|
|
data: {
|
|
|
- "xid": this.state.xid,
|
|
|
+ "id": this.state.xid,
|
|
|
"patentNumber": this.state.patentNumber,
|
|
|
"patentName": this.state.patentName,
|
|
|
- "patentCatagory": this.state.patentType,
|
|
|
+ "patentCatagory": this.state.data.patentCatagory,
|
|
|
"patentField": this.state.patentField,
|
|
|
"patentDes": this.state.patentDes,
|
|
|
+ "contacts": this.state.contacts,
|
|
|
"patentWritingUrl": this.state.patentWritingUrl,
|
|
|
"authorizationNoticeUrl": this.state.authorizationNoticeUrl,
|
|
|
"patentCertificateUrl": this.state.patentCertificateUrl,
|
|
|
"pState": this.props.data.patentState,
|
|
|
"state": this.state.patentStateAdd,
|
|
|
"recordTimeFormattedDate": this.state.recordTime,
|
|
|
- "principal": this.state.adminName
|
|
|
+ "principal": this.state.adminName,
|
|
|
+ "comment": this.state.comment
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
|
@@ -183,20 +256,21 @@ const PatentDesc = React.createClass({
|
|
|
this.getOption();
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
- this.state.patentStateAdd = '';
|
|
|
- this.state.adminName = '';
|
|
|
- this.state.recordTime = '';
|
|
|
+ this.state.patentStateAdd = undefined;
|
|
|
+ this.state.adminName = undefined;
|
|
|
+ this.state.recordTime = undefined;
|
|
|
+ this.state.comment = undefined;
|
|
|
this.state.adminOption = [];
|
|
|
- this.state.patentProcessList = [];
|
|
|
if (nextProps.data && !this.state.visible && nextProps.showDesc) {
|
|
|
this.state.xid = nextProps.data.pid;
|
|
|
this.state.patentDes = nextProps.data.patentDes;
|
|
|
this.state.patentName = nextProps.data.patentName;
|
|
|
this.state.patentNumber = nextProps.data.patentNumber;
|
|
|
- this.state.patentType = String(nextProps.data.patentType);
|
|
|
+ this.state.patentCatagory = String(nextProps.data.patentCatagory);
|
|
|
this.state.patentState = String(nextProps.data.patentState);
|
|
|
this.state.patentField = String(nextProps.data.patentField);
|
|
|
this.loadData();
|
|
|
+ this.getContactsList(nextProps.data.uid);
|
|
|
};
|
|
|
this.state.visible = nextProps.showDesc;
|
|
|
},
|
|
|
@@ -217,8 +291,10 @@ const PatentDesc = React.createClass({
|
|
|
},
|
|
|
render() {
|
|
|
const Step = Steps.Step;
|
|
|
- const theData = this.props.data;
|
|
|
- if (this.props.data) {
|
|
|
+ const theData = this.state.data;
|
|
|
+
|
|
|
+ if (this.state.data) {
|
|
|
+ let companyAddress = theData.locationProvince || theData.locationCity || theData.locationArea ? theData.locationProvince + '/' + theData.locationCity + '/' + theData.locationArea : '';
|
|
|
return (
|
|
|
<div className="patent-desc">
|
|
|
<Spin spinning={this.state.loading} className='spin-box'>
|
|
|
@@ -232,20 +308,28 @@ const PatentDesc = React.createClass({
|
|
|
className="patent-desc-content">
|
|
|
<div>
|
|
|
<p className="widthHalf"><span>公司名称:</span>{theData.unitName}</p>
|
|
|
- <p className="widthHalf"><span>公司组织机构代码:</span>{theData.companyNum}</p>
|
|
|
+ <p className="widthHalf"><span>公司组织机构代码:</span>{theData.orgCode}</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p className="widthHalf"><span>公司地址:</span>{theData.companyAddress}</p>
|
|
|
- <p className="widthHalf"><span className="three2eight">联系人</span>:{theData.companyContacts}</p>
|
|
|
+ <p className="widthHalf"><span>公司地址:</span>{companyAddress}</p>
|
|
|
+ <div className="widthHalf">
|
|
|
+ <span className="three2eight">联系人:</span>
|
|
|
+ <Select placeholder="选择联系人"
|
|
|
+ style={{ width: 200 }}
|
|
|
+ value={this.state.contacts}
|
|
|
+ onChange={(e) => { this.setState({ contacts: e }); }} >
|
|
|
+ {this.state.contactsOption}
|
|
|
+ </Select>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <p className="widthHalf"><span className="two2four">编号</span>:{theData.number}</p>
|
|
|
+ <p className="widthHalf"><span className="two2four">编号</span>:{theData.serialNumber}</p>
|
|
|
<p className="widthHalf"><span className="seven2eight">申请号/专利号</span>:<Input value={this.state.patentNumber} onChange={(e) => { this.setState({ patentNumber: e.target.value }); }} /></p>
|
|
|
</div>
|
|
|
<div>
|
|
|
<p className="widthHalf"><span>专利名称:</span><Input value={this.state.patentName} onChange={(e) => { this.setState({ patentName: e.target.value }); }} /></p>
|
|
|
<div className="widthHalf"><span className="four2eight">专利类型</span>:
|
|
|
- <Select value={this.state.patentType} style={{ width: 200 }} onChange={(e) => { this.setState({ patentType: e }); } }>{this.state.patentTypeOption}</Select>
|
|
|
+ <Select value={this.state.data.patentCatagory} style={{ width: 200 }} onChange={(e) => { this.setState({ patentCatagory: e }); } }>{this.state.patentTypeOption}</Select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
@@ -282,7 +366,7 @@ const PatentDesc = React.createClass({
|
|
|
<div>材料管理:
|
|
|
{theData.patentWritingUrl !== null && theData.patentWritingUrl !== undefined && theData.patentWritingUrl !== '' ?
|
|
|
<p className="download-file">
|
|
|
- <a onClick={downloadFile.bind(null, theData.patentWritingUrl, theData.patentWritingDownloadFileName)}>{theData.patentWritingDownloadFileName}</a>
|
|
|
+ <a onClick={newDownloadFile.bind(null, this.state.xid, "patent_writing", "/api/admin/patent/download")}>授权通知书</a>
|
|
|
{theData.confirmState == '0' ?
|
|
|
<Button onClick={this.confirmButton}>确认稿件</Button> : <span></span>
|
|
|
}
|
|
|
@@ -291,50 +375,60 @@ const PatentDesc = React.createClass({
|
|
|
}
|
|
|
{theData.authorizationNoticeUrl !== null && theData.authorizationNoticeUrl !== undefined && theData.authorizationNoticeUrl !== '' ?
|
|
|
<p className="download-file">
|
|
|
- <a onClick={downloadFile.bind(null, theData.authorizationNoticeUrl, theData.authorizationNoticeDownloadFileName)}>{theData.authorizationNoticeDownloadFileName}</a>
|
|
|
+ <a onClick={newDownloadFile.bind(null, this.state.xid, "authorization_notice", "/api/admin/patent/download")}>授权通知书</a>
|
|
|
</p> :
|
|
|
<p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />授权通知书未上传</p>
|
|
|
}
|
|
|
{theData.patentCertificateUrl !== null && theData.patentCertificateUrl !== undefined && theData.patentCertificateUrl !== '' ?
|
|
|
<p className="download-file">
|
|
|
- <a onClick={downloadFile.bind(null, theData.patentCertificateUrl, theData.patentCertificateDownloadFileName)}>{theData.patentCertificateDownloadFileName}</a>
|
|
|
+ <a onClick={newDownloadFile.bind(null, this.state.xid, "patent_certificate", "/api/admin/patent/download")}>专利证书</a>
|
|
|
</p> :
|
|
|
<p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利证书未上传</p>
|
|
|
}
|
|
|
{theData.patentProryStatementUrl !== null && theData.patentProryStatementUrl !== undefined && theData.patentProryStatementUrl !== '' ?
|
|
|
<p className="download-file">
|
|
|
- <a onClick={downloadFile.bind(null, theData.patentProryStatementUrl, theData.patentProryStatementDownloadFileName)}>{theData.patentProryStatementDownloadFileName}</a>
|
|
|
+ <a onClick={newDownloadFile.bind(null, this.state.xid, "patent_prory_statement", "/api/admin/patent/download")}>{theData.patentProryStatementDownloadFileName}</a>
|
|
|
</p> :
|
|
|
<p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />专利代理委托书未上传</p>
|
|
|
}
|
|
|
{theData.lastYearTaxReportUrl !== null && theData.lastYearTaxReportUrl !== undefined && theData.lastYearTaxReportUrl !== '' ?
|
|
|
<p className="download-file">
|
|
|
- <a onClick={downloadFile.bind(null, theData.lastYearTaxReportUrl, theData.lastYearTaxReportDownloadFileName)}>{theData.lastYearTaxReportDownloadFileName}</a>
|
|
|
+ <a onClick={newDownloadFile.bind(null, this.state.xid, "last_year_ratepay", "/api/admin/patent/downloadHonor")}>{theData.lastYearTaxReportDownloadFileName}</a>
|
|
|
</p> :
|
|
|
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />上年度纳税报表未上传</p>
|
|
|
+ <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />上年度纳税报表</p>
|
|
|
}
|
|
|
</div>
|
|
|
- <Avatar urlData={this.getPatentWritingUrl} name='patent_writing' oid={theData.oid}/>
|
|
|
- <Avatar urlData={this.getAuthorizationNoticeUrl} name='authorization_notice' oid={theData.oid}/>
|
|
|
- <Avatar urlData={this.getPatentCertificateUrl} name='patent_certificate' oid={theData.oid}/>
|
|
|
+ <Avatar urlData={this.getPatentWritingUrl} name='patent_writing' uid={theData.uid}/>
|
|
|
+ <Avatar urlData={this.getAuthorizationNoticeUrl} name='authorization_notice' uid={theData.uid}/>
|
|
|
+ <Avatar urlData={this.getPatentCertificateUrl} name='patent_certificate' uid={theData.uid}/>
|
|
|
</div>
|
|
|
<div className="avatar-text"><span>专利稿件上传</span><span>授权通知书上传</span><span>专利证书上传</span></div>
|
|
|
- <div>
|
|
|
+ <div className="clearfix">
|
|
|
<p>专利状态流转记录:</p>
|
|
|
- {this.state.patentProcessList}
|
|
|
+ <Table
|
|
|
+ style={{ margin: '10px 0' }}
|
|
|
+ pagination={false}
|
|
|
+ dataSource={this.state.stateTable}
|
|
|
+ columns={this.state.stateColumns} />
|
|
|
<div className="widthThird">
|
|
|
<span>状态流转:</span>
|
|
|
- <Select value={this.state.patentStateAdd} style={{ width: 150 }} onChange={(e) => { this.setState({ patentStateAdd: e }); } }>{this.state.patentStateOption}</Select>
|
|
|
+ <Select placeholder='请选择状态' value={this.state.patentStateAdd} style={{ width: 150 }} onChange={(e) => { this.setState({ patentStateAdd: e }); } }>{this.state.patentStateOption}</Select>
|
|
|
</div>
|
|
|
<p className="widthThird">
|
|
|
<span>处理时间:</span>
|
|
|
- <DatePicker defaultValue={null} onChange={(data,dataString)=>{this.state.recordTime = dataString}}/>
|
|
|
+ <DatePicker
|
|
|
+ value={this.state.recordTime ? moment(this.state.recordTime) : undefined}
|
|
|
+ onChange={(data,dataString)=>{this.setState({recordTime : dataString});}}/>
|
|
|
</p>
|
|
|
<div className="widthThird">
|
|
|
<span>负责人:</span>
|
|
|
- <Select value={this.state.adminName} style={{ width: 150 }} onChange={(e) => { this.setState({ adminName: e }); } }>{this.state.adminOption}</Select>
|
|
|
+ <Select placeholder='请填写负责人' value={this.state.adminName} style={{ width: 150 }} onChange={(e) => { this.setState({ adminName: e }); } }>{this.state.adminOption}</Select>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <span>备注:</span>
|
|
|
+ <Input value={this.state.comment} placeholder='请填写备注' style={{ width: 400 }} onChange={(e)=>{this.setState({comment : e.target.value});}}/>
|
|
|
+ </div>
|
|
|
</Modal>
|
|
|
</Spin>
|
|
|
</div>
|