import React from 'react'; import { Icon, Button, Spin, message, Table } from 'antd'; import { getSearchUrl, getScaleState, getCompanyType, getIndustryType, getCatagory, getIntellectualObtainWay, getTechnicalSource } from '../../../tools.js'; import { getProvince } from '../../../NewDicProvinceList'; import { getTechField } from '../../../DicTechFieldList'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import moment from 'moment'; import './highTechFoster.less'; const mathRound = function(p){ if ( !isNaN(p) ) { return Math.round(p*100)/100 } else { return p } } const highTechInfo = React.createClass({ getIntellectualNumber(text) { let arr = [], _me = this; if (text && text.split(',').length) { text.split(',').map((item) => { arr.push(_me.state.intellectualObj[item]); }); }; return arr.join(','); }, getInitialState() { return { loading: false, year: new Date().getFullYear() - 1, field: [], intellectualObj: {}, registerType: [], netAssetRate: 0, salesRevenueRate: 0, humanColumns: [ { title: '公民类型', dataIndex: 'type', key: 'type', width: '130px', render: (text, record, index) => { if (text == '0') { return '中国公民'; } else if (text == '1') { return '外籍公民'; }; } }, { title: '姓名', dataIndex: 'name', key: 'name' }, { title: '身份证(护照)号', dataIndex: 'idNumber', key: 'idNumber' }, { title: '投资额(万元)', dataIndex: 'investment', key: 'investment' } ], legalColumns: [ { title: '法人类型', dataIndex: 'type', key: 'type', width: '130px', render: (text, record, index) => { if (text == '0') { return '中国企业法人'; } else if (text == '1') { return '外籍企业法人'; }; } }, { title: '名称', dataIndex: 'name', key: 'name' }, { title: '组织机构代码或统一社会信用代码', dataIndex: 'orgCode', key: 'orgCode' }, { title: '投资额(万元)', dataIndex: 'investment', key: 'investment' } ], moneyColumns: [ { title: '', dataIndex: 'year', key: 'year', }, { title: '净资产', dataIndex: 'netAsset', key: 'netAsset', }, { title: '销售收入', dataIndex: 'salesRevenue', key: 'salesRevenue', }, { title: '利润总额', dataIndex: 'grossProfit', key: 'grossProfit', } ], intellectualColumns: [ { title: '知识产权编号', dataIndex: 'intellectualPropertyNumber', key: 'intellectualPropertyNumber' }, { title: '知识产权名称', dataIndex: 'intellectualPropertyName', key: 'intellectualPropertyName', }, { title: '类型', dataIndex: 'catagory', key: 'catagory', render: (text) => { return getCatagory(text); } }, { title: '授权日期', dataIndex: 'authorizationDateFormattedDate', key: 'authorizationDateFormattedDate', }, { title: '授权号', dataIndex: 'authorizationNumber', key: 'authorizationNumber', }, { title: '获取方式', dataIndex: 'obtainWay', key: 'obtainWay', render: (text) => { return getIntellectualObtainWay(text); } } ], activityCostColumns: [ { title: '研发活动编号', dataIndex: 'activityNumber', key: 'activityNumber' }, { title: '内部研究开发费用', dataIndex: 'internalAllCost', key: 'internalAllCost' }, { title: '人员人工费用', dataIndex: 'internalLaborCost', key: 'internalLaborCost' }, { title: '直接投入费用', dataIndex: 'internalDirectCost', key: 'internalDirectCost' }, { title: '折旧费用与长期待摊费用', dataIndex: 'internalDepreciationCost', key: 'internalDepreciationCost' }, { title: '设计费用', dataIndex: 'internalDesignCost', key: 'internalDesignCost' }, { title: '装备调试费用与试验费用', dataIndex: 'internalEquipmentCost', key: 'internalEquipmentCost' }, { title: '其他费用', dataIndex: 'internalOtherCost', key: 'internalOtherCost' }, { title: '委托外部研究开发费用', dataIndex: 'externalTotalCost', key: 'externalTotalCost' }, { title: '境内外部研发费用', dataIndex: 'externalAbroadCost', key: 'externalAbroadCost' }, { title: '研发费用合计', dataIndex: 'allCost', key: 'allCost' } ], standardColumns: [ { title: '编号', dataIndex: 'key', key: 'key' }, { title: '标准名称', dataIndex: 'standardName', key: 'standardName' }, { title: '制定时间', dataIndex: 'year', key: 'year' }, { title: '标准级别', dataIndex: 'standardLevel', key: 'standardLevel', render: text => { switch (text) { case 0: return "国家"; case 1: return "行业"; }; } }, { title: '标准编号', dataIndex: 'standardNumber', key: 'standardNumber' }, { title: '参与方式', dataIndex: 'participateWay', key: 'participateWay', render: text => { switch (text) { case 0: return "主持"; case 1: return "参与"; }; } } ] }; }, //基础资料 loadInfoData(uid) { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/basic/info", data: { uid: uid } }).done(function (data) { let thisdata = data.data; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { this.setState({ id: thisdata.id, uid: thisdata.uid, hid: thisdata.hid, unitName: thisdata.unitName, postalAddress: thisdata.postalAddress, postcode: thisdata.postcode, contacts: thisdata.contacts, contactMobile: thisdata.contactMobile, contactsFixedTel: thisdata.contactsFixedTel, firstContacts: thisdata.firstContacts, firstMobile: thisdata.firstMobile, contactsFax: thisdata.contactsFax, legalPersonTel: thisdata.legalPersonTel, legalPersonFax: thisdata.legalPersonFax, legalPersonEmail: thisdata.legalPersonEmail, registeredCapital: thisdata.registeredCapital, registrationTime: thisdata.registrationTime, legalPerson: thisdata.legalPerson, legalPersonIdCard: thisdata.legalPersonIdCard, orgCode: thisdata.orgCode, ratepayCode: thisdata.ratepayCode, industry: thisdata.industry, enterpriseScale: thisdata.enterpriseScale, foreignInvestment: thisdata.foreignInvestment, taxAuthority: thisdata.taxAuthority, ratepayMethod: thisdata.ratepayMethod, listed: thisdata.listed, listedDate: thisdata.listedDate, listedType: thisdata.listedType, stockCode: thisdata.stockCode, highTechZone: thisdata.highTechZone, highTechName: thisdata.highTechName, riskInvestment: thisdata.riskInvestment, businessScope: thisdata.businessScope, firmTotal: thisdata.firmTotal, techTotal: thisdata.techTotal, listedDateFormattedDate: thisdata.listedDateFormattedDate, registrationTimeFormattedDate: thisdata.registrationTimeFormattedDate, address: getProvince(thisdata.licenceProvince, thisdata.licenceCity, thisdata.licenceArea), field: thisdata.field ? thisdata.field.split(',') : [], registerType: thisdata.registerType ? thisdata.registerType.split(',') : [] }); }; }.bind(this)).always(function () { this.setState({ loading: false }); this.loadHighTechList(this.state.uid); }.bind(this)); }, loadHumanData(uid) { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/basic/listNature", data: { uid: uid } }).done(function (data) { let theTableData = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; return; }; data.data.map(function (item) { theTableData.push({ id: item.id, uid: item.uid, type: item.type, name: item.name, idNumber: item.idNumber, investment: item.investment }); }); this.setState({ humanTableData: theTableData }); }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, loadLegalData(uid) { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/basic/listLegalPerson", data: { uid: uid } }).done(function (data) { let theTableData = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; return; }; data.data.map(function (item) { theTableData.push({ id: item.id, uid: item.uid, type: item.type, name: item.name, orgCode: item.orgCode, investment: item.investment }); }); this.setState({ legalTableData: theTableData }); }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, //申请书 //第一 loadHighTechList(uid) { $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/listCognizance", data: { uid: uid }, success: function (data) { if (!data.data || !data.data.list) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { let _me = this; for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; if (thisdata.year == this.state.year) { _me.loadHighTechApply(uid, thisdata.cid, this.state.year) } }; }; }.bind(this), }).always(function () { this.loadIntellectualData(uid); }.bind(this)); }, loadHighTechApply(uid, cid, year) { $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/cognizanceDetail", data: { uid: uid, cid: cid, year: year + 1 } }).done(function (data) { if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { this.state.moneyTable = [ { key: 1, year: '前一年', netAsset: data.data.netAsset1, salesRevenue: data.data.salesRevenue1, grossProfit: data.data.grossProfit1 }, { key: 2, year: '前二年', netAsset: data.data.netAsset2, salesRevenue: data.data.salesRevenue2, grossProfit: data.data.grossProfit2 }, { key: 3, year: '前三年', netAsset: data.data.netAsset3, salesRevenue: data.data.salesRevenue3, grossProfit: data.data.grossProfit3 } ]; if (data.data.netAsset2 == 0) { this.state.netAssetRate = 0; } else if (data.data.netAsset3 == 0) { this.state.netAssetRate = (data.data.netAsset1 / data.data.netAsset2) - 1; } else { this.state.netAssetRate = 1 / 2 * (data.data.netAsset2 / data.data.netAsset3 + data.data.netAsset1 / data.data.netAsset2) - 1; }; if (this.state.netAssetRate < 0 || isNaN(this.state.netAssetRate)) { this.state.netAssetRate = 0 }; if (data.data.salesRevenue2 == 0) { this.state.salesRevenueRate = 0; } else if (data.data.salesRevenue3 == 0) { this.state.salesRevenueRate = (data.data.salesRevenue1 / data.data.salesRevenue2) - 1; } else { this.state.salesRevenueRate = 1 / 2 * (data.data.salesRevenue2 / data.data.salesRevenue3 + data.data.salesRevenue1 / data.data.salesRevenue2) - 1; }; if (this.state.salesRevenueRate < 0 || isNaN(this.state.salesRevenueRate)) { this.state.salesRevenueRate = 0 }; this.setState({ firstCatagory: data.data.firstCatagory, secondCatagory: data.data.secondCatagory, firmTotal: data.data.firmTotal, techTotal: data.data.techTotal, researchCost: data.data.researchCost, territory: data.data.territory, basicResearchCost: data.data.basicResearchCost, totalRevenue: data.data.totalRevenue, lastYearRevenue: data.data.lastYearRevenue, accident: data.data.accident }); }; }.bind(this)); }, //第二 loadIntellectualData(uid) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/summary/intellectualProperty", data: { uid: uid } }).done(function (data) { let theTableData = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { this.setState({ inventionPatent: data.data.inventionPatent, //发明专利数 defensePatent: data.data.defensePatent, //国防专利数 nationalCrop: data.data.nationalCrop, //国家级农作物品种数 newPlantCariety: data.data.newPlantCariety, //植物新品种数 nationalDrug: data.data.nationalDrug, //国家新药数 chineseMedicine: data.data.chineseMedicine, //国家一级中药保护品种数 utilityPatent: data.data.utilityPatent, //实用新型专利数 circuitDesign: data.data.circuitDesign, //集成电路布图设计专有权数 exteriorPatent: data.data.exteriorPatent, //外观设计专利数 softwareWorks: data.data.softwareWorks //软件著作权数 }); }; }.bind(this)).always(function () { this.loadIntellectualListData(uid); this.loadIntellectualObjectData(uid); }.bind(this)); }, loadIntellectualListData(uid) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/summary/intellectualPropertyList", data: { uid: uid } }).done(function (data) { let theTableData = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { data.data.map(function (item) { theTableData.push({ id: item.id, uid: item.uid, pid: item.pid, intellectualPropertyNumber: item.intellectualPropertyNumber, intellectualPropertyName: item.intellectualPropertyName, sortNumber: item.sortNumber, catagory: item.catagory, obtainWay: item.obtainWay, authorizationNumber: item.authorizationNumber, authorizationDate: item.authorizationDate, propertyRightUrl: item.propertyRightUrl, type: item.type, authorizationDateFormattedDate: item.authorizationDateFormattedDate, propertyRightDownloadFileName: item.propertyRightDownloadFileName }); }); }; this.setState({ intellectualTableData: theTableData }); }.bind(this)).always(function () { this.loadHRData(uid); }.bind(this)); }, loadIntellectualObjectData(uid) { $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/intellectualList", data: { uid: uid } }).done(function (data) { let theObj = {}; if (data.error && data.error.length) { message.warning(data.error[0].message); } else { data.data.list.map(function (item) { theObj[item.id] = item.intellectualPropertyNumber; }); }; this.setState({ intellectualObj: theObj }); }.bind(this)).always(function () { this.loadHRData(uid); }.bind(this)); }, //第三 loadHRData(uid) { $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/orgHumanResource", data: { uid: uid, year: this.state.year } }).done(function (data) { if (!data.data || !data.data.list) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { let thisdata = data.data.list[0] || {}; this.setState({ aboveFifty: thisdata.aboveFifty, belowThirty: thisdata.belowThirty, college: thisdata.college, doctor: thisdata.doctor, firmAbroad: thisdata.firmAbroad, firmCore: thisdata.firmCore, firmForeign: thisdata.firmForeign, firmInService: thisdata.firmInService, firmPartTime: thisdata.firmPartTime, firmTemporary: thisdata.firmTemporary, firmTotal: thisdata.firmTotal, fortyoneToFifty: thisdata.fortyoneToFifty, intermediateTitle: thisdata.intermediateTitle, juniorTitle: thisdata.juniorTitle, master: thisdata.master, seniorMechanic: thisdata.seniorMechanic, seniorTitle: thisdata.seniorTitle, techAbroad: thisdata.techAbroad, techCore: thisdata.techCore, techForeign: thisdata.techForeign, techInService: thisdata.techInService, techPartTime: thisdata.techPartTime, techTemporary: thisdata.techTemporary, techTotal: thisdata.techTotal, thirtyoneToThirtyfour: thisdata.thirtyoneToThirtyfour, undergraduate: thisdata.undergraduate, }); }; }.bind(this)).always(function () { this.loadActivityData(uid); }.bind(this)); }, //第四 loadActivityData(uid) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/summary/activity", data: { uid: uid } }).done(function (data) { let theArr = [], _me = this; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { data.data.map(function (item) { theArr.push(
活动编号 {item.activityNumber}
编号 {item.serialNumber}
法定代表人
联系人
自然人股权
法人股权
获得知识产权数量(件)
人力资源情况(人)
近三年经营状况(万元)
获得知识产权数量(件)(Ⅰ 类)
获得知识产权数量(件)(Ⅱ 类)
总体情况
全体人员结构
学历
职称
年龄
{this.state.year - 2} 年度 单位:万元
{this.state.year - 1} 年度 单位:万元
{this.state.year} 年度 单位:万元