|
@@ -1,15 +1,20 @@
|
|
|
import React from 'react';
|
|
|
-import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form ,Modal,Tabs,Card } from 'antd';
|
|
|
+import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card } from 'antd';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import moment from 'moment';
|
|
|
+import {Document,Page}from 'react-pdf';
|
|
|
+import PDF from 'react-pdf';
|
|
|
+import 'viewer/dist/crocodoc.viewer.css';
|
|
|
import TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
|
|
|
import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
|
|
|
-import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade} from '@/dataDic.js';
|
|
|
-import { getSocialAttribute, beforeUploadFile,splitUrl ,getSlcRedit,getDataGrade,getAchievementCategory,getTechAuditStatus,getboutique,getPreviews,getPreview} from '@/tools.js';
|
|
|
+import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade,year,xiangmoState} from '@/dataDic.js';
|
|
|
+import { getSocialAttribute, beforeUploadFile,splitUrl ,getSlcRedit,getDataGrade,getAchievementCategory,getTechAuditStatus,getboutique,getPreviews,getPreview,getXiangmoState} from '@/tools.js';
|
|
|
import './customer.less';
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
const Dragger = Upload.Dragger;
|
|
|
+console.log(Document);
|
|
|
+//onDocumentLoad
|
|
|
//图片组件
|
|
|
const PicturesWall = React.createClass({
|
|
|
getInitialState() {
|
|
@@ -198,8 +203,113 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ loadDatac(pageNo, apiUrl) {
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/customers/selectListOrgAnnual",
|
|
|
+ data: {
|
|
|
+// pageNo: pageNo || 1,
|
|
|
+// pageSize: this.state.pagination.pageSize,
|
|
|
+ uid:this.state.uid,
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for(let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ id: thisdata.id,//年报ID
|
|
|
+ year:thisdata.year,//年份
|
|
|
+ salesAmount: thisdata.salesAmount,//营销额
|
|
|
+ researchAmount: thisdata.researchAmount,//研发费用
|
|
|
+ assets: thisdata.assets,//总资产
|
|
|
+ aid: thisdata.aid,//录入人
|
|
|
+ });
|
|
|
+ };
|
|
|
+// this.state.pagination.current = data.data.pageNo;
|
|
|
+// this.state.pagination.total = data.data.totalCount;
|
|
|
+ };
|
|
|
+ if(data.data&&data.data.list&&!data.data.list.length){
|
|
|
+ this.state.pagination.current=0
|
|
|
+ this.state.pagination.total=0
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ dataSourcec: theArr,
|
|
|
+// pageNo: pageNo,
|
|
|
+// pagination: this.state.pagination,
|
|
|
+// selectedRowKeys:[]
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ loadDatax(pageNo, apiUrl) {
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/customers/selectListOrgYearProject",
|
|
|
+ data: {
|
|
|
+ uid:this.state.uid,
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for(let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ id: thisdata.id,//用户ID
|
|
|
+ projectName:thisdata.projectName,//项目名称
|
|
|
+ year: thisdata.year,//年份
|
|
|
+ status: thisdata.status.toString(),//项目状态
|
|
|
+ remark: thisdata.remark,//备注
|
|
|
+ aid: thisdata.aid,//录入人
|
|
|
+ });
|
|
|
+ };
|
|
|
+// this.state.pagination.current = data.data.pageNo;
|
|
|
+// this.state.pagination.total = data.data.totalCount;
|
|
|
+ };
|
|
|
+ if(data.data&&data.data.list&&!data.data.list.length){
|
|
|
+ this.state.pagination.current=0
|
|
|
+ this.state.pagination.total=0
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ dataSourcex: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ pages:1,
|
|
|
+ pdfUrl:'',
|
|
|
addressSearch: [],
|
|
|
orgCodeUrl: [],
|
|
|
companyLogoUrl: [],
|
|
@@ -215,6 +325,11 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
pojectApplicationUrl:"",
|
|
|
isXian:0,
|
|
|
modalVisible:false,
|
|
|
+ numPages: null,
|
|
|
+ pageNumber: 1,
|
|
|
+ pagec:1,
|
|
|
+ pages:2,
|
|
|
+ isXin:1,
|
|
|
pagination: {
|
|
|
defaultCurrent: 1,
|
|
|
defaultPageSize: 10,
|
|
@@ -269,9 +384,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
}
|
|
|
],
|
|
|
data: [],
|
|
|
- dataman: [],
|
|
|
dataSource: [],
|
|
|
- visitArrList: [],
|
|
|
columnsDate: [
|
|
|
{
|
|
|
title: '编号',
|
|
@@ -313,6 +426,73 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
],
|
|
|
dataSourceDate: [],
|
|
|
+ columnsc: [{
|
|
|
+ title: '年份',
|
|
|
+ dataIndex: 'year',
|
|
|
+ key: 'year',
|
|
|
+ }, {
|
|
|
+ title: '营销额(万)',
|
|
|
+ dataIndex: 'salesAmount',
|
|
|
+ key: 'salesAmount',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总资产(万)',
|
|
|
+ dataIndex: 'assets',
|
|
|
+ key: 'assets'
|
|
|
+ }, {
|
|
|
+ title: '研发费用(万)',
|
|
|
+ dataIndex: 'researchAmount',
|
|
|
+ key: 'researchAmount',
|
|
|
+ },{
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'rrtk',
|
|
|
+ key: 'rrtk',
|
|
|
+ render:(text,record,index)=>{
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Popconfirm title={'您将删除该条财务信息,请确认!'} onConfirm={(e)=>{this.deltalc(record)}} okText="确认" cancelText="取消">
|
|
|
+ <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
|
|
|
+ </Popconfirm>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ dataSourcec: [],
|
|
|
+ columnsx: [{
|
|
|
+ title: '项目名称',
|
|
|
+ dataIndex: 'projectName',
|
|
|
+ key: 'projectName',
|
|
|
+ },{
|
|
|
+ title: '年份',
|
|
|
+ dataIndex: 'year',
|
|
|
+ key: 'year',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '项目状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ key: 'status',
|
|
|
+ render: text => { return getXiangmoState(text); }
|
|
|
+ }, {
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'remark',
|
|
|
+ key: 'remark',
|
|
|
+ },{
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'rrtk',
|
|
|
+ key: 'rrtk',
|
|
|
+ render:(text,record,index)=>{
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Popconfirm title={'您将删除该项目,请确认!'} onConfirm={(e)=>{this.deltalx(record)}} okText="确认" cancelText="取消">
|
|
|
+ <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
|
|
|
+ </Popconfirm>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ dataSourcex: [],
|
|
|
};
|
|
|
},
|
|
|
componentWillMount() {
|
|
@@ -365,6 +545,22 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
this.state.releaseDate[1] = undefined;
|
|
|
this.loadData();
|
|
|
},
|
|
|
+ resetc() {
|
|
|
+ this.state.id=undefined;//年报ID
|
|
|
+ this.state.assets=undefined;//总资产
|
|
|
+ this.state.researchAmount=undefined;//研发费用
|
|
|
+ this.state.salesAmount = undefined;//销售额
|
|
|
+ this.state.year = undefined;//年份清零
|
|
|
+
|
|
|
+ },
|
|
|
+ resetx() {
|
|
|
+ this.state.id=undefined;//年报ID
|
|
|
+ this.state.projectName=undefined;//项目名称
|
|
|
+ this.state.status=undefined;//项目状态
|
|
|
+ this.state.remark = undefined;//备注
|
|
|
+ this.state.year = undefined;//年份清零
|
|
|
+
|
|
|
+ },
|
|
|
//列表详情
|
|
|
details(id) {
|
|
|
$.ajax({
|
|
@@ -569,6 +765,80 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
}.bind(this));
|
|
|
|
|
|
},
|
|
|
+ //财务信息提交
|
|
|
+ newSubmitc(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ if(!this.state.year) {
|
|
|
+ message.warning('请选择年份');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ console.log(this.state.isXin);
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + this.state.isXin==1?'/api/admin/customers/addOrgAnnual':'/api/admin/customers/updateOrgAnnual',
|
|
|
+ data: {
|
|
|
+ id:this.state.id?this.state.id:undefined,//年报ID
|
|
|
+ uid:this.state.uid,//客户ID
|
|
|
+ year:this.state.year,//年份
|
|
|
+ researchAmount:this.state.researchAmount,//研发费用
|
|
|
+ assets:this.state.assets,//总资产
|
|
|
+ salesAmount:this.state.salesAmount,//销售额
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.visitCancelc();
|
|
|
+ this.loadDatac();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+
|
|
|
+ },
|
|
|
+ //财务信息提交
|
|
|
+ newSubmitx(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ if(!this.state.year) {
|
|
|
+ message.warning('请选择年份');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ console.log(this.state.isXin);
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + this.state.isXinx==1?'/api/admin/customers/addOrgYearProject':'/api/admin/customers/updateOrgYearProject',
|
|
|
+ data: {
|
|
|
+ id:this.state.id?this.state.id:undefined,//年报ID
|
|
|
+ uid:this.state.uid,//客户ID
|
|
|
+ year:this.state.year,//年份
|
|
|
+ projectName:this.state.projectName,//研发费用
|
|
|
+ status:this.state.status,//总资产
|
|
|
+ remark:this.state.remark,//销售额
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.visitCancelc();
|
|
|
+ this.loadDatax();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+
|
|
|
+ },
|
|
|
//获取ID
|
|
|
getStateData(id) {
|
|
|
this.setState({
|
|
@@ -616,6 +886,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
this.state.isXian=0;
|
|
|
this.details(record.id);
|
|
|
},
|
|
|
+
|
|
|
//指定转交人自动补全
|
|
|
supervisor(e){
|
|
|
$.ajax({
|
|
@@ -727,6 +998,118 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
callnub:"0"
|
|
|
});
|
|
|
},
|
|
|
+ //新增年报打开
|
|
|
+ visitOkc(e) {
|
|
|
+ this.setState({
|
|
|
+ visitModulc: true,
|
|
|
+ visitModulx: true
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //新增年报关闭
|
|
|
+ visitCancelc(e) {
|
|
|
+ this.resetc();
|
|
|
+ this.resetx();
|
|
|
+ this.setState({
|
|
|
+ visitModulc: false,
|
|
|
+ visitModulx: false,
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ //PDF打开
|
|
|
+ visitOk1(e) {
|
|
|
+ alert(1)
|
|
|
+ this.getPrevie(this.state.uid, 'techProject', 'organization_application');
|
|
|
+// this.showPdf(this.state.pdfUrl);
|
|
|
+ this.setState({
|
|
|
+ visitModul1: true
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ //PDF关闭
|
|
|
+ visitCancel1(e) {
|
|
|
+ this.setState({
|
|
|
+ visitModul1: false,
|
|
|
+ });
|
|
|
+ },
|
|
|
+// showPdf(url) {
|
|
|
+// PDFJS.workerSrc = 'pdf.worker.js';
|
|
|
+// PDFJS.getDocument(url).then(function getPdfHelloWorld(pdf) {
|
|
|
+// pdf.getPage(1).then(function getPageHelloWorld(page) {
|
|
|
+// var scale = 1;
|
|
|
+// var viewport = page.getViewport(scale);
|
|
|
+// var canvas = document.getElementById('the-canvas');
|
|
|
+// var context = canvas.getContext('2d');
|
|
|
+// canvas.height = viewport.height;
|
|
|
+// canvas.width = viewport.width;
|
|
|
+// var renderContext = {
|
|
|
+// canvasContext: context,
|
|
|
+// viewport: viewport
|
|
|
+// };
|
|
|
+// page.render(renderContext);
|
|
|
+// });
|
|
|
+// });
|
|
|
+// },
|
|
|
+ //获取PDF地址
|
|
|
+ getPrevie(id,url,sign){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/" + url,
|
|
|
+ data:{
|
|
|
+ "id": id,
|
|
|
+ "sign": sign
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (!data.data) {
|
|
|
+ if ( data.error && data.error.length ) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ };
|
|
|
+ alert(2)
|
|
|
+ this.setState({
|
|
|
+ pdfUrl: location.origin + globalConfig.context + "/open/preview?" + data.data,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //PDF分页
|
|
|
+ onDocumentComplete (pages) {
|
|
|
+ alert(222)
|
|
|
+ this.setState({ page: 1, pages:8 });
|
|
|
+ },
|
|
|
+
|
|
|
+ handlePrevious (){
|
|
|
+ alert(this.state.page)
|
|
|
+ this.setState({ page: this.state.page - 1 });
|
|
|
+ },
|
|
|
+
|
|
|
+ handleNext (){
|
|
|
+ alert(this.state.page)
|
|
|
+ this.setState({ page: this.state.page + 1 });
|
|
|
+ },
|
|
|
+ renderPagination (page,pages) {
|
|
|
+ let previousButton = <li className="previous" onClick={this.handlePrevious}><a href="#"><i className="fa fa-arrow-left">上一页</i> </a></li>;
|
|
|
+ if (page === 1) {
|
|
|
+ previousButton = <li className="previous disabled"><a href="#"><i className="fa fa-arrow-left">上一页1</i> </a></li>;
|
|
|
+ }
|
|
|
+ let nextButton = <li className="next" onClick={this.handleNext}><a href="#"> <i className="fa fa-arrow-right">下一页</i></a></li>;
|
|
|
+ if (page === pages) {
|
|
|
+ nextButton = <li className="next disabled"><a href="#"> <i className="fa fa-arrow-right">下一页1</i></a></li>;
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <nav>
|
|
|
+ <ul className="pager">
|
|
|
+ {previousButton}
|
|
|
+ {nextButton}
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ //上面是做PDF分页的
|
|
|
+
|
|
|
+
|
|
|
getOrgCodeUrl(e) {
|
|
|
this.setState({ orgCodeUrl: e });
|
|
|
},
|
|
@@ -756,6 +1139,18 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
})
|
|
|
this.loadDatas();
|
|
|
}
|
|
|
+ if(e == '2') {
|
|
|
+ this.setState({
|
|
|
+ callnub: e,
|
|
|
+ })
|
|
|
+ this.loadDatac();
|
|
|
+ }
|
|
|
+ if(e == '3') {
|
|
|
+ this.setState({
|
|
|
+ callnub: e,
|
|
|
+ })
|
|
|
+ this.loadDatax();
|
|
|
+ }
|
|
|
},
|
|
|
//发布成果
|
|
|
addClick() {
|
|
@@ -764,6 +1159,24 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
showDesc: true,
|
|
|
});
|
|
|
},
|
|
|
+ //新增财务信息
|
|
|
+ addClickc() {
|
|
|
+ this.state.RowData = {};
|
|
|
+ this.resetc();
|
|
|
+ this.setState({
|
|
|
+ visitModulc: true,
|
|
|
+ isXin:1,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //新增项目信息
|
|
|
+ addClickx() {
|
|
|
+ this.state.RowData = {};
|
|
|
+ this.resetx();
|
|
|
+ this.setState({
|
|
|
+ visitModulx: true,
|
|
|
+ isXinx:1,
|
|
|
+ });
|
|
|
+ },
|
|
|
//关闭发布成果
|
|
|
closeDesc(e, s) {
|
|
|
this.state.showDesc = e;
|
|
@@ -771,6 +1184,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
this.loadDatas();
|
|
|
};
|
|
|
},
|
|
|
+ //客户资料每行点击
|
|
|
tableRowClickDate(record, index) {
|
|
|
this.state.RowData = record;
|
|
|
if(index!=undefined){
|
|
@@ -779,7 +1193,94 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ //年度每行点击
|
|
|
+ tableRowClickDatec(record, index) {
|
|
|
+ this.state.RowData = record;
|
|
|
+ if(index!=undefined){
|
|
|
+ this.setState({
|
|
|
+ isXin:2,
|
|
|
+ visitModulc: true,
|
|
|
+ year:record.year.toString(),//年份
|
|
|
+ id:record.id,//年报详情ID
|
|
|
+ assets:record.assets,//总资产
|
|
|
+ researchAmount:record.researchAmount,//研发费用
|
|
|
+ salesAmount:record.salesAmount,//销售额
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //项目每行点击
|
|
|
+ tableRowClickDatex(record, index) {
|
|
|
+ this.state.RowData = record;
|
|
|
+ if(index!=undefined){
|
|
|
+ this.setState({
|
|
|
+ isXinx:2,
|
|
|
+ visitModulx: true,
|
|
|
+ year:record.year.toString(),//年份
|
|
|
+ id:record.id,//年报详情ID
|
|
|
+ projectName:record.projectName,//项目名称
|
|
|
+ status:record.status.toString(),//项目状态
|
|
|
+ remark:record.remark,//销售额
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onDocumentLoad () {
|
|
|
+ this.setState({ numPages });
|
|
|
+ },
|
|
|
+ //删除财务信息
|
|
|
+ deltalc(record){
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/customers/delectOrgAnnual',
|
|
|
+ data: {
|
|
|
+ id:record.id
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('操作成功');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ this.loadDatac();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //删除财务信息
|
|
|
+ deltalx(record){
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/customers/delectOrgYearProject',
|
|
|
+ data: {
|
|
|
+ id:record.id
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('操作成功');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ this.loadDatax();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
render() {
|
|
|
+ let paginationss = null;
|
|
|
+ if (this.state.pages) {
|
|
|
+ paginationss = this.renderPagination(this.state.page, this.state.pages);
|
|
|
+ }
|
|
|
const {
|
|
|
RangePicker,
|
|
|
MonthPicker
|
|
@@ -788,6 +1289,10 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
labelCol: { span: 8 },
|
|
|
wrapperCol: { span: 14 },
|
|
|
};
|
|
|
+ const formItemLayoutc = {
|
|
|
+ labelCol: { span: 6 },
|
|
|
+ wrapperCol: { span: 14 },
|
|
|
+ };
|
|
|
const FormItem = Form.Item;
|
|
|
const rowSelection = {
|
|
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
@@ -828,6 +1333,8 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
|
|
|
};
|
|
|
+ let pdfUrl =this.state.pdfUrl||'';
|
|
|
+ console.log(pdfUrl)
|
|
|
return(
|
|
|
<div className="user-content" >
|
|
|
<div className="content-title">
|
|
@@ -1205,14 +1712,15 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
<Button><Icon type="upload" /> 项目材料上传 </Button>
|
|
|
<span style={{ marginTop: '10px' ,marginLeft:"20px"}}>{this.state.pojectApplicationUrl ?
|
|
|
<span className="download-file">
|
|
|
- <a onClick={() => {
|
|
|
+ <a onClick={() => {
|
|
|
var newTab = window.open('about:blank'); getPreviews(this.state.uid, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
|
|
|
}}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
|
|
|
</span>
|
|
|
: <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}
|
|
|
</span>
|
|
|
</Upload>
|
|
|
-
|
|
|
+ <Button onClick={this.visitOk1}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </Button>
|
|
|
+
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1234,8 +1742,167 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
onRowClick={this.tableRowClickDate} />
|
|
|
</Spin>
|
|
|
</TabPane>
|
|
|
+ <TabPane tab="财务信息" key="2">
|
|
|
+ <Button type="primary" className="addButton" onClick={this.addClickc}>添加年度财务信息<Icon type="plus" /></Button>
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table columns={this.state.columnsc}
|
|
|
+ dataSource={this.state.dataSourcec}
|
|
|
+ rowSelection={rowSelection}
|
|
|
+ onRowClick={this.tableRowClickDatec} />
|
|
|
+ </Spin>
|
|
|
+ </TabPane>
|
|
|
+ <TabPane tab="项目信息" key="3">
|
|
|
+ <Button type="primary" className="addButton" onClick={this.addClickx}>添加项目信息<Icon type="plus" /></Button>
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table columns={this.state.columnsx}
|
|
|
+ dataSource={this.state.dataSourcex}
|
|
|
+ rowSelection={rowSelection}
|
|
|
+ onRowClick={this.tableRowClickDatex} />
|
|
|
+ </Spin>
|
|
|
+ </TabPane>
|
|
|
</Tabs>
|
|
|
</Modal>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=''
|
|
|
+ title="客户资料"
|
|
|
+ width='100%'
|
|
|
+ visible={this.state.visitModul1}
|
|
|
+ onOk={this.visitOk1}
|
|
|
+ onCancel={this.visitCancel1}
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <a href={pdfUrl} target="_blank">点击看预览</a>
|
|
|
+ <PDF
|
|
|
+ file={pdfUrl}
|
|
|
+ onDocumentComplete={this.onDocumentComplete}
|
|
|
+ onDocumentLoad={this.onDocumentComplete}
|
|
|
+ Page={this.state.page}
|
|
|
+ />
|
|
|
+ {paginationss}
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=''
|
|
|
+ title="财务资料"
|
|
|
+ width='500px'
|
|
|
+ visible={this.state.visitModulc}
|
|
|
+ onOk={this.visitOkc}
|
|
|
+ onCancel={this.visitCancelc}
|
|
|
+ > <Form layout="horizontal" onSubmit={this.newSubmitc} id="demand-form">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="年份"
|
|
|
+ >
|
|
|
+ <Select placeholder="年份" value={this.state.year} style={{width:'90%'}}
|
|
|
+ onChange={(e)=>{this.setState({year:e})}}>
|
|
|
+ {
|
|
|
+ year.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="销售额"
|
|
|
+ >
|
|
|
+ <Input placeholder="销售额" style={{width:'90%'}} value={this.state.salesAmount} onChange={(e) => {
|
|
|
+ this.setState({ salesAmount: e.target.value }) }} />万
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="总资产"
|
|
|
+ >
|
|
|
+ <Input placeholder="总资产" style={{width:'90%'}} value={this.state.assets} onChange={(e) => {
|
|
|
+ this.setState({ assets: e.target.value }) }} />万
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="研发费用"
|
|
|
+ >
|
|
|
+ <Input placeholder="研发费用" style={{width:'90%'}} value={this.state.researchAmount} onChange={(e) => {
|
|
|
+ this.setState({ researchAmount: e.target.value }) }} />万
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Button className="setSubmit" type="primary" htmlType="submit" style={{marginLeft:"100px"}}>保存</Button>
|
|
|
+ <Button type="ghost" onClick={this.visitCancelc}>取消</Button>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=''
|
|
|
+ title="项目资料"
|
|
|
+ width='500px'
|
|
|
+ visible={this.state.visitModulx}
|
|
|
+ onOk={this.visitOkc}
|
|
|
+ onCancel={this.visitCancelc}
|
|
|
+ > <Form layout="horizontal" onSubmit={this.newSubmitx} id="demand-form">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="年份"
|
|
|
+ >
|
|
|
+ <Select placeholder="年份" value={this.state.year} style={{width:'90%'}}
|
|
|
+ onChange={(e)=>{this.setState({year:e})}}>
|
|
|
+ {
|
|
|
+ year.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="项目名称"
|
|
|
+ >
|
|
|
+ <Input placeholder="项目名称" style={{width:'90%'}} value={this.state.projectName} onChange={(e) => {
|
|
|
+ this.setState({ projectName: e.target.value }) }} />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="项目状态"
|
|
|
+ >
|
|
|
+ <Select placeholder="项目状态" value={this.state.status} style={{width:'90%'}}
|
|
|
+ onChange={(e)=>{this.setState({status:e})}}>
|
|
|
+ {
|
|
|
+ xiangmoState.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayoutc}
|
|
|
+ label="备注"
|
|
|
+ >
|
|
|
+ <Input type="textarea" rows={3} placeholder="备注" style={{width:'90%'}} value={this.state.remark} onChange={(e) => {
|
|
|
+ this.setState({ remark: e.target.value }) }} />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <Button className="setSubmit" type="primary" htmlType="submit" style={{marginLeft:"100px"}}>保存</Button>
|
|
|
+ <Button type="ghost" onClick={this.visitCancelc}>取消</Button>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
<TechAchievementDesc
|
|
|
data={this.state.RowData}
|
|
|
detailApiUrl={this.props['data-detailApiUrl']}
|
|
@@ -1245,7 +1912,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
closeDesc={this.closeDesc}
|
|
|
loadDatas={this.loadDatas}
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
</div >
|
|
|
|
|
|
);
|