|
@@ -0,0 +1,686 @@
|
|
|
+import React from 'react';
|
|
|
+import { Icon, Modal, message, Spin, Input, Select, DatePicker, Button, Table, Form, Upload } from 'antd';
|
|
|
+import './contract.less';
|
|
|
+import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
+import $ from 'jquery/src/ajax';
|
|
|
+import moment from 'moment';
|
|
|
+import { copyrightStateList } from '../../../dataDic.js';
|
|
|
+import { companySearch, getCopyrightState, getPatentType, getPatentState, gethighTechState, getTechnologyState } from '../../../tools.js';
|
|
|
+
|
|
|
+const ContractDetailForm = Form.create()(React.createClass({
|
|
|
+ getInitialState() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ loading: false,
|
|
|
+ stateOption: [],
|
|
|
+ stateTable: [],
|
|
|
+ contactsOption: [],
|
|
|
+ stateColumns: [
|
|
|
+ {
|
|
|
+ title: '申请状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ key: 'status',
|
|
|
+ render: (text) => { return getCopyrightState(text) }
|
|
|
+ }, {
|
|
|
+ title: '处理时间',
|
|
|
+ dataIndex: 'recordTimeFormattedDate',
|
|
|
+ key: 'recordTimeFormattedDate',
|
|
|
+ }, {
|
|
|
+ title: '负责人',
|
|
|
+ dataIndex: 'principal',
|
|
|
+ key: 'principal',
|
|
|
+ }, {
|
|
|
+ title: '操作人',
|
|
|
+ dataIndex: 'operator',
|
|
|
+ key: 'operator',
|
|
|
+ }, {
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'comment',
|
|
|
+ key: 'comment',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ patentColumns: [
|
|
|
+ {
|
|
|
+ title: '专利名称',
|
|
|
+ dataIndex: 'patentName',
|
|
|
+ key: 'patentName',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '专利编号',
|
|
|
+ dataIndex: 'patentNumber',
|
|
|
+ key: 'patentNumber',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '专利状态',
|
|
|
+ dataIndex: 'patentState',
|
|
|
+ key: 'patentState',
|
|
|
+ render: text => { return getPatentState(text) },
|
|
|
+ width: 120
|
|
|
+ }, {
|
|
|
+ title: '专利类型',
|
|
|
+ dataIndex: 'patentCatagory',
|
|
|
+ key: 'patentCatagory',
|
|
|
+ render: text => { return getPatentType(text) },
|
|
|
+ width: 160
|
|
|
+ }, {
|
|
|
+ title: '当前操作人',
|
|
|
+ dataIndex: 'principal',
|
|
|
+ key: 'principal',
|
|
|
+ width: 200
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ copyrightColumns: [
|
|
|
+ {
|
|
|
+ title: '软著名称',
|
|
|
+ dataIndex: 'copyrightName',
|
|
|
+ key: 'copyrightName',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '软著编号',
|
|
|
+ dataIndex: 'serialNumber',
|
|
|
+ key: 'serialNumber',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '软著状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ key: 'status',
|
|
|
+ render: (text) => { return getCopyrightState(text) },
|
|
|
+ width: 120
|
|
|
+ }, {
|
|
|
+ title: '加急天数',
|
|
|
+ dataIndex: 'inUrgent',
|
|
|
+ key: 'inUrgent',
|
|
|
+ render: (text) => {
|
|
|
+ switch (text) {
|
|
|
+ case 0:
|
|
|
+ return '不加急(45个工作日)';
|
|
|
+ case 3:
|
|
|
+ return '3个工作日';
|
|
|
+ case 5:
|
|
|
+ return '5个工作日';
|
|
|
+ case 10:
|
|
|
+ return '6-10个工作日';
|
|
|
+ case 15:
|
|
|
+ return '11-15个工作日';
|
|
|
+ case 20:
|
|
|
+ return '16-20个工作日';
|
|
|
+ case 25:
|
|
|
+ return '21-25个工作日';
|
|
|
+ case 30:
|
|
|
+ return '26-30个工作日';
|
|
|
+ case 35:
|
|
|
+ return '31-35个工作日';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ width: 220
|
|
|
+ }, {
|
|
|
+ title: '当前操作人',
|
|
|
+ dataIndex: 'principal',
|
|
|
+ key: 'principal'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ highTechColumns: [
|
|
|
+ {
|
|
|
+ title: '申请年份',
|
|
|
+ dataIndex: 'year',
|
|
|
+ key: 'year',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '申请状态',
|
|
|
+ dataIndex: 'state',
|
|
|
+ key: 'state',
|
|
|
+ render: (text) => { return gethighTechState(text) },
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '证书编号',
|
|
|
+ dataIndex: 'certificateNumber',
|
|
|
+ key: 'certificateNumber',
|
|
|
+ width: 260
|
|
|
+ }, {
|
|
|
+ title: '当前操作人',
|
|
|
+ dataIndex: 'techPrincipal',
|
|
|
+ key: 'techPrincipal',
|
|
|
+ width: 200
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ techProjectColumns: [
|
|
|
+ {
|
|
|
+ title: '项目名称',
|
|
|
+ dataIndex: 'projectName',
|
|
|
+ key: 'projectName',
|
|
|
+ width: 260
|
|
|
+ }, {
|
|
|
+ title: '项目类型',
|
|
|
+ dataIndex: 'projectCatagory',
|
|
|
+ key: 'projectCatagory',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '项目状态',
|
|
|
+ dataIndex: 'state',
|
|
|
+ key: 'state',
|
|
|
+ render: text => { return getTechnologyState(text) },
|
|
|
+ width: 120
|
|
|
+ }, {
|
|
|
+ title: '技术领域',
|
|
|
+ dataIndex: 'techField',
|
|
|
+ key: 'techField',
|
|
|
+ width: 200
|
|
|
+ }, {
|
|
|
+ title: '当前操作人',
|
|
|
+ dataIndex: 'principle',
|
|
|
+ key: 'principle',
|
|
|
+ width: 200
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ componentWillMount() {
|
|
|
+ this.loadData();
|
|
|
+ this.getContactsList();
|
|
|
+ this.loadColumnsData();
|
|
|
+ },
|
|
|
+ getContactsList(uid) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/getContacts",
|
|
|
+ data: {
|
|
|
+ uid: uid || this.props.data.uid
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (!data.data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ contactsList: data.data
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ });
|
|
|
+ },
|
|
|
+ loadData(id) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.when($.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/log",
|
|
|
+ data: {
|
|
|
+ cid: id || this.props.data.id
|
|
|
+ }
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/detail",
|
|
|
+ data: {
|
|
|
+ id: id || this.props.data.id
|
|
|
+ }
|
|
|
+ })).done((data1, data2) => {
|
|
|
+ let _me = this;
|
|
|
+ //状态流转table
|
|
|
+ this.state.stateTable = [];
|
|
|
+ if (data1[0].error && data1[0].error.length) {
|
|
|
+ message.warning(data1[0].error[0].message);
|
|
|
+ } else {
|
|
|
+ data1[0].data.map(function (item, i) {
|
|
|
+ _me.state.stateTable.push({
|
|
|
+ key: i,
|
|
|
+ recordTimeFormattedDate: item.recordTimeFormattedDate,
|
|
|
+ status: item.status,
|
|
|
+ principal: item.principal,
|
|
|
+ operator: item.operator,
|
|
|
+ comment: item.comment
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+ //获取详细数据
|
|
|
+ if (!data2[0].data) {
|
|
|
+ if (data2[0].error && data2[0].error.length) {
|
|
|
+ message.warning(data2[0].error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ let detailData = data2[0].data;
|
|
|
+ this.setState({
|
|
|
+ data: detailData
|
|
|
+ });
|
|
|
+ };
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ loadColumnsData(id) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.when($.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/techProject",
|
|
|
+ data: {
|
|
|
+ contractId: id || this.props.data.id
|
|
|
+ }
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/cognizance",
|
|
|
+ data: {
|
|
|
+ contractId: id || this.props.data.id
|
|
|
+ }
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/copyright",
|
|
|
+ data: {
|
|
|
+ contractId: id || this.props.data.id
|
|
|
+ }
|
|
|
+ }), $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ cache: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/patent",
|
|
|
+ data: {
|
|
|
+ contractId: id || this.props.data.id
|
|
|
+ }
|
|
|
+ })).done((data1, data2, data3, data4) => {
|
|
|
+ let patentArr = [], techProjectArr = [], cognizanceArr = [], copyrightArr = [];
|
|
|
+ if (!data1[0].data) {
|
|
|
+ if (data1[0].error && data1[0].error.length) {
|
|
|
+ message.warning(data1[0].error[0].message)
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data1[0].data.map(function (item, i) {
|
|
|
+ techProjectArr.push({
|
|
|
+ "key": i,
|
|
|
+ "id": item.id, //科技项目ID
|
|
|
+ "uid": item.uid, //用户ID
|
|
|
+ "contractId": item.contractId, //合同ID
|
|
|
+ "projectName": item.projectName, //项目名称
|
|
|
+ "projectCatagory": item.projectCatagory, //项目类型
|
|
|
+ "state": item.state, //状态
|
|
|
+ "techField": item.techField, //领域
|
|
|
+ "principle": item.principle, //当前负责人(技术员)
|
|
|
+ "tableType": "techProject"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+ if (!data2[0].data) {
|
|
|
+ if (data2[0].error && data2[0].error.length) {
|
|
|
+ message.warning(data2[0].error[0].message)
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data2[0].data.map(function (item, i) {
|
|
|
+ cognizanceArr.push({
|
|
|
+ "key": i,
|
|
|
+ "id": item.id, //科技项目ID
|
|
|
+ "uid": item.uid, //用户ID
|
|
|
+ "contractId": item.contractId, //合同ID
|
|
|
+ "year": item.year,
|
|
|
+ "serialNumber": item.serialNumber,
|
|
|
+ "state": item.state, //状态
|
|
|
+ "certificateNumber": item.certificateNumber,
|
|
|
+ "techPrincipal": item.techPrincipal, //当前负责人(技术员)
|
|
|
+ "tableType": "cognizance"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+ if (!data3[0].data) {
|
|
|
+ if (data3[0].error && data3[0].error.length) {
|
|
|
+ message.warning(data3[0].error[0].message)
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data3[0].data.map(function (item, i) {
|
|
|
+ copyrightArr.push({
|
|
|
+ "key": i,
|
|
|
+ "id": item.id, //科技项目ID
|
|
|
+ "uid": item.uid, //用户ID
|
|
|
+ "contractId": item.contractId, //合同ID
|
|
|
+ "copyrightName": item.copyrightName, //项目名称
|
|
|
+ "serialNumber": item.serialNumber,
|
|
|
+ "state": item.state, //状态
|
|
|
+ "inUrgent": item.inUrgent, //加急天数
|
|
|
+ "principal": item.principal, //当前负责人(技术员)
|
|
|
+ "tableType": "copyright"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+ if (!data4[0].data) {
|
|
|
+ if (data4[0].error && data4[0].error.length) {
|
|
|
+ message.warning(data4[0].error[0].message)
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ data4[0].data.map(function (item, i) {
|
|
|
+ patentArr.push({
|
|
|
+ "key": i,
|
|
|
+ "id": item.id, //科技项目ID
|
|
|
+ "uid": item.uid, //用户ID
|
|
|
+ "contractId": item.contractId, //合同ID
|
|
|
+ "patentName": item.patentName, //项目名称
|
|
|
+ "patentNumber": item.patentNumber, //专利号
|
|
|
+ "serialNumber": item.serialNumber, //编号
|
|
|
+ "patentState": item.patentState, //状态
|
|
|
+ "patentCatagory": item.patentCatagory, //专利类别
|
|
|
+ "principal": item.principal, //当前负责人(技术员)
|
|
|
+ "tableType": "patent"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ patentTableData: patentArr,
|
|
|
+ copyrightTableData: copyrightArr,
|
|
|
+ highTechTableData: cognizanceArr,
|
|
|
+ techProjectTableData: techProjectArr
|
|
|
+ });
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ foundHighTech() {
|
|
|
+
|
|
|
+ },
|
|
|
+ foundPatent() {
|
|
|
+
|
|
|
+ },
|
|
|
+ foundCopyright() {
|
|
|
+
|
|
|
+ },
|
|
|
+ foundTechProject() {
|
|
|
+
|
|
|
+ },
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
+ if (!this.props.visible && nextProps.visible) {
|
|
|
+ this.loadData(nextProps.data.id);
|
|
|
+ this.loadColumnsData(nextProps.data.id);
|
|
|
+ this.getContactsList(nextProps.data.uid);
|
|
|
+ };
|
|
|
+ },
|
|
|
+ handleSubmit(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ this.props.form.validateFields((err, values) => {
|
|
|
+ if (values.status || values.principal || values.recordTime || values.comment) {
|
|
|
+ if (!values.status || !values.principal || !values.recordTime) {
|
|
|
+ message.warning("请填写完整的状态流转信息!");
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ if (!err) {
|
|
|
+ this.props.spinState(true);
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/contract/circulation",
|
|
|
+ data: {
|
|
|
+ "cid": this.props.data.id,
|
|
|
+ "comment": values.comment,
|
|
|
+ "status": values.status,
|
|
|
+ "principals": values.principals //流转分发人
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.props.clickOk();
|
|
|
+ this.props.form.resetFields();
|
|
|
+ this.props.spinState(false);
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ this.props.spinState(false);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ tableRowClick(record, index) {
|
|
|
+ switch (record.tableType) {
|
|
|
+ case 'patent':
|
|
|
+ window.open(globalConfig.context + "/admin/servicesManage/patent.html?contractId=" + record.contractId + "#comprehensive");
|
|
|
+ break;
|
|
|
+ case 'copyright':
|
|
|
+ window.open(globalConfig.context + "/admin/servicesManage/copyright.html?contractId=" + record.contractId + "#copyright");
|
|
|
+ break;
|
|
|
+ case 'cognizance':
|
|
|
+ window.open(globalConfig.context + "/admin/servicesManage/highTech.html?contractId=" + record.contractId + "#highTechApply");
|
|
|
+ break;
|
|
|
+ case 'techProject':
|
|
|
+ window.open(globalConfig.context + "/admin/servicesManage/technology.html?contractId=" + record.contractId + "#applyManage");
|
|
|
+ break;
|
|
|
+ };
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ const FormItem = Form.Item;
|
|
|
+ const { getFieldDecorator } = this.props.form;
|
|
|
+ const theData = this.state.data || {};
|
|
|
+ const formItemLayout = {
|
|
|
+ labelCol: { span: 6 },
|
|
|
+ wrapperCol: { span: 18 },
|
|
|
+ };
|
|
|
+ const _me = this;
|
|
|
+ return (
|
|
|
+ <Form onSubmit={this.handleSubmit} id="CopyrightDesc-form">
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="公司名称" >
|
|
|
+ {getFieldDecorator('unitName')(
|
|
|
+ <span>{theData.unitName}</span>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="组织机构代码" >
|
|
|
+ {getFieldDecorator('orgCode')(
|
|
|
+ <span>{theData.orgCode}</span>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="公司地址" >
|
|
|
+ {getFieldDecorator('address')(
|
|
|
+ <span>{theData.address}</span>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="联系人" >
|
|
|
+ <span>{this.state.contactsList ? this.state.contactsList[theData.contacts] : ''}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <p style={{ fontSize: '14px', color: '#333' }}>状态流转记录: </p>
|
|
|
+ <Table style={{ margin: '10px 0', background: "#eee" }}
|
|
|
+ pagination={false}
|
|
|
+ dataSource={this.state.stateTable}
|
|
|
+ columns={this.state.stateColumns} />
|
|
|
+ <div className="clearfix" style={{ padding: '0 4px', paddingTop: '20px', marginBottom: '10px', background: '#eee' }}>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="状态流转"
|
|
|
+ >
|
|
|
+ {getFieldDecorator('status')(
|
|
|
+ <Select
|
|
|
+ style={{ width: 200 }}
|
|
|
+ placeholder="选择一个状态">
|
|
|
+ {this.props.statusOption}
|
|
|
+ </Select>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="处理时间"
|
|
|
+ >
|
|
|
+ {getFieldDecorator('recordTime')(
|
|
|
+ <DatePicker />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="负责人"
|
|
|
+ >
|
|
|
+ {getFieldDecorator('principals')(
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ style={{ width: 200 }}
|
|
|
+ filterOption={companySearch}
|
|
|
+ placeholder="选择负责人">
|
|
|
+ {this.props.authorOption}
|
|
|
+ </Select>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="备注">
|
|
|
+ {getFieldDecorator('comment')(
|
|
|
+ <Input />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="高企申请">
|
|
|
+ {getFieldDecorator('cognizanceYear', {
|
|
|
+ initialValue: theData.cognizanceYear
|
|
|
+ })(
|
|
|
+ <span>{theData.cognizanceYear} 年</span>
|
|
|
+ )}
|
|
|
+ {theData.cognizanceStatus == 1 ? <Button onClick={this.foundHighTech}>创建申请</Button> : <span></span>}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Table size="small" scroll={{ y: 500 }}
|
|
|
+ columns={this.state.highTechColumns}
|
|
|
+ dataSource={this.state.highTechTableData}
|
|
|
+ pagination={false}
|
|
|
+ onRowClick={this.tableRowClick} />
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="专利申请">
|
|
|
+ {getFieldDecorator('patentNum', {
|
|
|
+ initialValue: theData.patentNum
|
|
|
+ })(
|
|
|
+ <span>{theData.patentNum} 条</span>
|
|
|
+ )}
|
|
|
+ {theData.patentStatus == 1 ? <Button onClick={this.foundPatent}>创建申请</Button> : <span></span>}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Table size="small" scroll={{ y: 500 }}
|
|
|
+ columns={this.state.patentColumns}
|
|
|
+ dataSource={this.state.patentTableData}
|
|
|
+ pagination={false}
|
|
|
+ onRowClick={this.tableRowClick} />
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="软著申请">
|
|
|
+ {getFieldDecorator('copyrightNum', {
|
|
|
+ initialValue: theData.copyrightNum
|
|
|
+ })(
|
|
|
+ <span>{theData.copyrightNum} 条</span>
|
|
|
+ )}
|
|
|
+ {theData.copyrightStatus == 1 ? <Button onClick={this.foundCopyright}>创建申请</Button> : <span></span>}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Table size="small" scroll={{ y: 500 }}
|
|
|
+ columns={this.state.copyrightColumns}
|
|
|
+ dataSource={this.state.copyrightTableData}
|
|
|
+ pagination={false}
|
|
|
+ onRowClick={this.tableRowClick} />
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label=" 科技项目申请">
|
|
|
+ {getFieldDecorator('techProjectNum', {
|
|
|
+ initialValue: theData.techProjectNum
|
|
|
+ })(
|
|
|
+ <span>{theData.techProjectNum} 条</span>
|
|
|
+ )}
|
|
|
+ {theData.techProjectStatus == 1 ? <Button onClick={this.foundTechProject}>创建申请</Button> : <span></span>}
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Table size="small" scroll={{ y: 500 }}
|
|
|
+ columns={this.state.techProjectColumns}
|
|
|
+ dataSource={this.state.techProjectTableData}
|
|
|
+ pagination={false}
|
|
|
+ onRowClick={this.tableRowClick} />
|
|
|
+ <FormItem style={{ marginTop: '20px' }}>
|
|
|
+ <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
|
|
|
+ <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ );
|
|
|
+ }
|
|
|
+}));
|
|
|
+
|
|
|
+const ContractDetail = React.createClass({
|
|
|
+ getInitialState() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ loading: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
+ this.state.visible = nextProps.showDesc
|
|
|
+ },
|
|
|
+ showModal() {
|
|
|
+ this.setState({
|
|
|
+ visible: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleOk() {
|
|
|
+ this.setState({
|
|
|
+ visible: false,
|
|
|
+ });
|
|
|
+ this.props.closeDesc(false, true);
|
|
|
+ },
|
|
|
+ handleCancel(e) {
|
|
|
+ this.setState({
|
|
|
+ visible: false,
|
|
|
+ });
|
|
|
+ this.props.closeDesc(false);
|
|
|
+ },
|
|
|
+ spinChange(e) {
|
|
|
+ this.setState({
|
|
|
+ loading: e
|
|
|
+ });
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
+ <div className="patent-addNew">
|
|
|
+ <Spin spinning={this.state.loading} className='spin-box'>
|
|
|
+ <Modal title="软著详情" visible={this.state.visible}
|
|
|
+ onOk={this.handleOk} onCancel={this.handleCancel}
|
|
|
+ width='1000px'
|
|
|
+ footer=''
|
|
|
+ >
|
|
|
+ <ContractDetailForm
|
|
|
+ visible={this.state.visible}
|
|
|
+ authorOption={this.props.authorOption}
|
|
|
+ statusOption={this.props.statusOption}
|
|
|
+ data={this.props.data}
|
|
|
+ spinState={this.spinChange}
|
|
|
+ closeModal={this.handleCancel}
|
|
|
+ clickOk={this.handleOk} />
|
|
|
+ </Modal>
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+});
|
|
|
+export default ContractDetail;
|