123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596 |
- import React from 'react';
- import {
- Form,
- Radio,
- Icon,
- Button,
- Input,
- Select,
- Spin,
- Table,
- Switch,
- message,
- DatePicker,
- Modal,
- Upload,
- Tabs
- } from 'antd';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import moment from 'moment';
- import './techDemand.less';
- import TechDemandDesc from './techDemandDesc.jsx';
- import { demandTypeList } from '../../dataDic.js';
- import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique,gethot} from '../../tools.js';
- import BatchImport from './batchImport';
- import {ChooseList} from "../order/orderNew/chooseList";
- const TabPane = Tabs.TabPane;
- const DemandList = React.createClass({
- loadData(pageNo, apiUrl) {
- this.state.data = [];
- if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
- message.warning('请输入正确的编号格式');
- return false;
- }
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + (apiUrl || this.props['data-listApiUrl']),
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- serialNumber: this.state.serialNumber,
- name: this.state.name,
- keyword: this.state.keyword,
- employerName: this.state.employerName,
- infoSources: this.state.infoSources ? Number(this.state.infoSources) : undefined,
- demandType: this.state.demandType ? Number(this.state.demandType) : undefined,
- //username: this.state.username,
- status: this.state.status ? Number(this.state.status) : undefined,
- releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined,
- validityPeriodStartDate: this.state.validityPeriodDate[0],
- validityPeriodEndDate: this.state.validityPeriodDate[1],
- releaseDateStartDate: this.state.releaseDate[0],
- releaseDateEndDate: this.state.releaseDate[1],
- createDateStartDate: this.state.releaseDateS[0],
- createDateEndDate: this.state.releaseDateS[1],
- auditStatus: this.state.auditStatus,
- boutique:this.state.boutique,
- hot:this.state.hot,
- dataCategory:this.state.dataCategory,
- //employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
- username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
- unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !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];
- theArr.push({
- key: i,
- id: thisdata.id,
- serialNumber: thisdata.serialNumber,
- dataCategory: thisdata.dataCategory,
- name: thisdata.name,
- keyword: thisdata.keyword,
- infoSources: thisdata.infoSources,
- username: thisdata.username,
- theName: thisdata.username || thisdata.employerName,
- demandType: thisdata.demandType,
- validityPeriod: thisdata.validityPeriod,
- employerName: thisdata.employerName,
- employerId: thisdata.employerId,
- province: thisdata.province,
- status: thisdata.status,
- releaseStatus: thisdata.releaseStatus,
- releaseDate: thisdata.releaseDate,
- principalId: thisdata.principalId,
- validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
- releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
- auditStatus: thisdata.auditStatus,
- boutique: thisdata.boutique,
- urgentMoney:thisdata.urgentMoney,
- urgentDays:thisdata.urgentDays,
- hot: thisdata.hot,
- techBrokerId:thisdata.techBrokerId,
- createTimeFormattedDate: thisdata.createTimeFormattedDate,
- });
- };
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- };
- this.setState({
- dataSource: theArr,
- pagination: this.state.pagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- mateLoadData(pageNo, apiUrl) {
- let demandId ='';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- demandId=rowItem.id;
- };
- };
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/demand/listDemandFollow',
- data: {
- id:demandId,
- pNo: pageNo || 1,
- pSize: this.state.matepagination.pageSize,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !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 thisdataDet=data.data.list[i].demandFollowDetail;
- let followUp='';
- let a=thisdataDet?thisdataDet.length:0;
- for(let j=0;j<a;j++){
- followUp+=(j+1)+'. '+thisdataDet[j].createTimeFormattedDate+' '+thisdataDet[j].remarks+' \n';
- }
- theArr.push({
- key: i,//序列号
- id: thisdata.id,//匹配跟进ID
- demandId: thisdata.demandId,//需求ID
- organization: thisdata.organization,//匹配机构
- contacts: thisdata.contacts,//联系人
- contactMobile: thisdata.contactMobile,//联系方式
- result: thisdata.result,//跟进结果
- lastFollowTime: thisdata.lastFollowTime,//最新跟进时间
- sources: thisdata.sources,//来源
- name: thisdata.name,//需求名称
- employerName: thisdata.employerName,//需求公司名称
- employerContactsMobile: thisdata.employerContactsMobile,//需求联系方式
- employerContactsMailbox: thisdata.employerContactsMailbox,//需求联系邮箱
- createTime: thisdata.createTime,//录入时间
- createTimeFormattedDate: thisdata.createTimeFormattedDate,//录入时间转格式
- lastFollowTimeFormattedDate: thisdata.lastFollowTimeFormattedDate,//跟进时间转格式
- adminName: thisdata.adminName,//录入人
- remark:thisdata.remark,//备注
- followUp:followUp,
- });
- };
- this.state.matepagination.current = data.data.pageNo;
- this.state.matepagination.total = data.data.totalCount;
- };
- this.setState({
- mateDataSource: theArr,
- matepagination: this.state.matepagination,
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- lookLoadData(pageNo, apiUrl) {
- let rowItem = '';
- for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
- rowItem = this.state.mateselectedRows[idx];
- };
- this.setState({
- loading: true,
- mateselectedRowKeys: [],
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/demand/listDemandFollowDetail',
- data: {
- pNo: pageNo || 1,
- pSize: this.state.lookpagination.pageSize,
- id:rowItem.id
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !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];
- theArr.push({
- key: i,
- id: thisdata.id,//跟进情况ID
- demandFollowId: thisdata.demandFollowId,//匹配跟进ID
- remarks: thisdata.remarks,//跟进情况
- result: thisdata.result,//跟进结果
- createTime: thisdata.createTime,//跟进时间
- createTimeFormattedDate: thisdata.createTimeFormattedDate,//录入时间转格式
- });
- };
- this.state.lookpagination.current = data.data.pageNo;
- this.state.lookpagination.total = data.data.totalCount;
- };
- this.setState({
- lookDataSource: theArr,
- lookpagination: this.state.lookpagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- searchMore: true,
- searchType: 0,
- validityPeriodDate: [],
- releaseDate: [],
- releaseDateS: [],
- selectedRowKeys: [],
- mateselectedRowKeys: [],
- selectedRows: [],
- loading: false,
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- this.setState({
- page:page
- });
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- matepagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.mateLoadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- lookpagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.lookLoadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- columns: [
- {
- title: '编号',
- dataIndex: 'serialNumber',
- key: 'serialNumber',
- }, {
- title: '需求名称',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '录入人',
- dataIndex: 'techBrokerId',
- key: 'techBrokerId',
- },
- {
- title: '是否精品',
- dataIndex: 'boutique',
- key: 'boutique',
- render: text => { return getboutique(text) }
- },
- {
- title: '关键字',
- dataIndex: 'keyword',
- key: 'keyword',
- }, {
- title: '需求类型',
- dataIndex: 'demandType',
- key: 'demandType',
- render: text => { return getDemandType(text); }
- }, {
- title: '信息来源',
- dataIndex: 'infoSources',
- key: 'infoSources',
- render: text => {
- switch (text) {
- case "0":
- return <span>平台采集</span>;
- case "1":
- return <span>客户发布</span>;
- case "2":
- return <span>批量导入</span>
- case "3":
- return <span>三方对接</span>
- }
- }
- }, {
- title: '审核状态',
- dataIndex: 'auditStatus',
- key: 'auditStatus',
- render: text => {
- switch (text) {
- case 0:
- return <span>未提交审核(草稿)</span>;
- case 1:
- return <span>提交审核</span>;
- case 2:
- return <span>审核中</span>;
- case 3:
- return <span>审核通过</span>;
- case 4:
- return <span>审核未通过</span>;
- }
- }
- }, {
- title: '需求状态',
- dataIndex: 'status',
- key: 'status',
- render: text => {
- switch (text) {
- case "0":
- return <span>进行中</span>;
- case "1":
- return <span>未解决</span>;
- case "2":
- return <span>已解决</span>;
- }
- }
- }, {
- title: '有效期限',
- dataIndex: 'validityPeriodFormattedDate',
- key: 'validityPeriodFormattedDate',
- }, {
- title: '发布时间',
- dataIndex: 'releaseDateFormattedDate',
- key: 'releaseDateFormattedDate',
- },{
- title: '录入时间',
- dataIndex: 'createTimeFormattedDate',
- key: 'createTimeFormattedDate',
- }
- ],
- dataSource: [],
- searchTime: [],
- mateColumns: [
- {
- title: '企业名称',
- dataIndex: 'employerName',
- key: 'employerName',
- }, {
- title: '需求名称',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '联系人',
- dataIndex: 'employerContactsMobile',
- key: 'employerContactsMobile',
- },{
- title: '匹配机构',
- dataIndex: 'organization',
- key: 'organization',
- },{
- title: '成果联系人',
- dataIndex: 'contacts',
- key: 'contacts',
- },{
- title: '成果方联系方式',
- dataIndex: 'contactMobile',
- key: 'contactMobile',
- },{
- title: '跟进结果',
- dataIndex: 'result',
- key: 'result',
- render: text => {
- switch (text) {
- case 0:
- return <span>跟进中</span>;
- case 1:
- return <span>已匹配</span>;
-
- }
- }
- },{
- title: '最新跟进时间',
- dataIndex: 'lastFollowTimeFormattedDate',
- key: 'lastFollowTimeFormattedDate',
- }
- ],
- mateDataSource: [],
- searchTime: [],
- mateColumnsExport: [
- {
- title: '企业名称',
- dataIndex: 'employerName',
- key: 'employerName',
- }, {
- title: '需求名称',
- dataIndex: 'name',
- key: 'name',
- },{
- title: '联系人',
- dataIndex: 'employerContactsMobile',
- key: 'employerContactsMobile',
- },{
- title: '联系人邮箱',
- dataIndex: 'employerContactsMailbox',
- key: 'employerContactsMailbox',
- },{
- title: '匹配机构',
- dataIndex: 'organization',
- key: 'organization',
- },{
- title: '成果联系人',
- dataIndex: 'contacts',
- key: 'contacts',
- },{
- title: '成果方联系方式',
- dataIndex: 'contactMobile',
- key: 'contactMobile',
- },{
- title: '来源',
- dataIndex: 'sources',
- key: 'sources',
- },{
- title: '备注',
- dataIndex: 'remark',
- key: 'remark',
- },{
- title: '跟进汇总',
- dataIndex: 'followUp',
- key: 'followUp',
-
- }
- ],
- mateDataSource: [],
- searchTime: [],
- lookColumns: [
- {
- title: '跟进时间',
- dataIndex: 'createTimeFormattedDate',
- key: 'createTimeFormattedDate',
- },{
- title: '跟进结果',
- dataIndex: 'result',
- key: 'result',
- render: text => {
- switch (text) {
- case 0:
- return <span>跟进中</span>;
- case 1:
- return <span>已匹配</span>;
-
- }
- }
- },{
- title: '跟进情况',
- dataIndex: 'remarks',
- key: 'remarks',
- }
- ],
- lookDataSource: [],
- searchTime: []
- };
- },
- getCompanyList() {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/demand/unitNames",
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- data.data.map(function (item) {
- theArr.push(
- <Select.Option value={item.uid} key={item.uid}>{item.unitName}</Select.Option>
- )
- });
- };
- this.setState({
- companyOption: theArr
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getUserList() {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/demand/userNames",
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- data.data.map(function (item) {
- theArr.push(
- <Select.Option value={item.uid} key={item.uid}>{item.username}</Select.Option>
- )
- });
- };
- this.setState({
- userOption: theArr
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
-
- componentWillMount() {
- let theArr = [];
- demandTypeList.map(function (item) {
- theArr.push(
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
- )
- });
- this.state.demandTypeOption = theArr;
- if (window.location.search) {
- let theObj = getSearchUrl(window.location.search);
- if (theObj.rid) {
- theObj.id = theObj.rid;
- theObj.employerId = theObj.uid;
- if (theObj.rid != 'null') {
- this.tableRowClick(theObj);
- };
- };
- };
- this.loadData();
- this.getCompanyList();
- this.getUserList();
- },
- componentWillReceiveProps(nextProps) {
- if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
- this.state.selectedRowKeys = [];
- this.state.selectedRows = [];
- this.state.serialNumber = undefined;
- this.state.name = undefined;
- this.state.keyword = undefined;
- this.state.infoSources = undefined;
- this.state.demandType = undefined;
- this.state.searchName = undefined;
- this.state.searchType = 0;
- this.state.status = undefined;
- this.state.releaseStatus = undefined;
- this.state.auditStatus = undefined;
- this.state.validityPeriodDate = [];
- this.state.releaseDate = [];
- this.state.releaseDateS = [];
- this.loadData(null, nextProps['data-listApiUrl']);
- };
- },
- tableRowClick(record, index) {
- this.state.RowData = record;
- if(index!=undefined){
- this.setState({
- showDesc: true
- });
- }
- },
- //删除需求
- delectRow() {
- let deletedIds = [];
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- deletedIds.push(rowItem.id)
- };
- };
- this.setState({
- selectedRowKeys: [],
- loading: deletedIds.length > 0
- });
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/demand/delete",
- data: {
- ids: deletedIds
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
-
- this.loadData();
- }.bind(this));
- },
- //删除匹配记录
- delect(e) {
- let rowItem = '';
- for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
- rowItem = this.state.mateselectedRows[idx];
- };
- this.setState({
- mateselectedRowKeys: [],
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/demand/deleteDemandFollow",
- data: {
- id: rowItem.id
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('删除成功!');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.mateLoadData();
- }.bind(this));
- },
- //判断浏览器类型
- getExplorer() {
- var explorer = window.navigator.userAgent;
- //ie
- if(explorer.indexOf("MSIE") >= 0) {
- return 'ie';
- }
- //firefox
- else if(explorer.indexOf("Firefox") >= 0) {
- return 'Firefox';
- }
- //Chrome
- else if(explorer.indexOf("Chrome") >= 0) {
- return 'Chrome';
- }
- //Opera
- else if(explorer.indexOf("Opera") >= 0) {
- return 'Opera';
- }
- //Safari
- else if(explorer.indexOf("Safari") >= 0) {
- return 'Safari';
- }
- },
- //导出为exel表格
- tabExel() {
- var table = document.querySelector('#daochu');
- var idTmr;
- //debugger;
- //整个表格拷贝到EXCEL中
- if(this.getExplorer() == 'ie') {
- var curTbl = document.getElementById(tableid);
- var oXL = new ActiveXObject("Excel.Application");
- //创建AX对象excel
- var oWB = oXL.Workbooks.Add();
- //获取workbook对象
- var xlsheet = oWB.Worksheets(1);
- //激活当前sheet
- var sel = document.body.createTextRange();
- sel.moveToElementText(curTbl);
- //把表格中的内容移到TextRange中
- sel.select();
- //全选TextRange中内容
- sel.execCommand("Copy");
- //复制TextRange中内容
- xlsheet.Paste();
- //粘贴到活动的EXCEL中
- oXL.Visible = true;
- //设置excel可见属性
- try {
- var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
- } catch(e) {
- print("Nested catch caught " + e);
- } finally {
- oWB.SaveAs(fname);
- oWB.Close(savechanges = false);
- //xls.visible = false;
- oXL.Quit();
- oXL = null;
- //结束excel进程,退出完成
- //window.setInterval("Cleanup();",1);
- idTmr = window.setInterval("Cleanup();", 1);
- }
- } else {
- // console.log(table);
- this.tableToExcel(table,this.getExplorer());
- }
- function Cleanup() {
- window.clearInterval(idTmr);
- CollectGarbage();
- }
- },
- tableToExcel(table,name) {
- var uri = 'data:application/vnd.ms-excel;base64,',
- template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
- base64 = function(s) {
- return window.btoa(unescape(encodeURIComponent(s)))
- },
- format = function(s, c) {
- return s.replace(/{(\w+)}/g,
- function(m, p) {
- return c[p];
- })
- }
- // console.log(table.nodeType);
- if(!table.nodeType) table = document.getElementById(table);
- // console.log(table);
- var ctx = {
- worksheet: name || 'Worksheet',
- table: table.innerHTML
- };
- window.location.href = uri + base64(format(template, ctx))
- },
- //匹配跟进的显示和隐藏
- mate(){
- this.setState({
- matevisible: true
- });
- this.mateLoadData();
- },
- mateNo(){
- this.setState({
- matevisible: false
- });
- this.reset();
- },
- //点开新增或者匹配记录详情的时候发送请求获取上面的内容
- mateTop(e){
- let demandId ='';
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
- let rowItem = this.state.selectedRows[idx];
- if (rowItem.id) {
- demandId=rowItem.id;
- };
- };
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/demand/DemandFollowDetails',
- data: {
- id:demandId,
- },
- success: function (data) {
- this.setState({
- mademandId:data.data.id,//录入人
- adminName: data.data.techBrokerId,//录入人
- createTime: data.data.createTime,//录入时间
- employerName: data.data.employerName,//公司名称
- name: data.data.name,//需求名称
- employerContactsMobile:data.data.employerContactsMobile,//联系人电话
- employerContactsMailbox:data.data.employerContactsMailbox,//联系人邮箱
- createTimeFormattedDate:data.data.createTimeFormattedDate,//录入时间转格式
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //点击新增
- addmate(e){
-
- this.setState({
- addmatevisible: true
- });
- this.matereset();
- this.mateTop();
- },
- //修改一条匹配记录
- addmateSubmits(e){
- e.preventDefault();
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/demand/updateDemandFollow',
- data:{
- id:this.state.mademandIds,//需求ID
- contactMobile:this.state.mateContactMobile,//成果方联系方式
- contacts:this.state.mateContacts,//成果联系人
- organization:this.state.mateOrganization,//匹配机构
- sources:this.state.mateSources,//来源
- remark:this.state.mateRemark,//备注
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('修改匹配跟进成功!');
- this.mateLoadData();
- this.addmateNos();
-
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
-
- },
- //新增一条匹配记录
- addmateSubmit(e){
- e.preventDefault();
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/demand/addDemandFollow',
- data:{
- demandId:this.state.mademandId,//需求ID
- contactMobile:this.state.mateContactMobile,//成果方联系方式
- contacts:this.state.mateContacts,//成果联系人
- organization:this.state.mateOrganization,//匹配机构
- sources:this.state.mateSources,//来源
- remark:this.state.mateRemark,//备注
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('新增匹配跟进成功!');
- this.mateLoadData();
- this.addmateNo();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- },
- //新增跟进记录
- addhandleSubmit(e){
- e.preventDefault();
- let rowItem = '';
- for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
- rowItem = this.state.mateselectedRows[idx];
- };
- this.setState({
- mateselectedRowKeys: [],
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/demand/addDemandFollowDetail',
- data:{
- demandFollowId:rowItem.id,//需求跟进ID
- createTimeFormattedDate:this.state.RowData.addcreateTime,//跟进时间
- result:this.state.addresult,//跟进结果
- remarks:this.state.addremarks,//跟进情况
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('最新跟进添加成功成功!');
- this.addmateNo1();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- },
- //点开详情
- mateTableRowClick(record, index){
- // console.log(record);
- this.mateTop();
- this.setState({
- addmatevisibles: true,
- mateOrganization:record.organization,//匹配机构
- mateSources:record.sources,//来源
- mateContacts:record.contacts,//成果联系人
- mateContactMobile:record.contactMobile,//联系人电话
- mateRemark:record.remark,//备注
- mademandIds:record.id,//该条匹配跟进的ID
- });
- },
- addmateNos(){
- this.setState({
- addmatevisibles: false
- })
- },
- addmateNo(){
- this.setState({
- addmatevisible: false
- })
- },
- addmate1(){
-
- this.setState({
- addmatevisible1: true
- });
- this.lookreset();
- },
- addmateNo1(){
- this.setState({
- addmatevisible1: false
- });
- this.mateLoadData();
- },
- lookmate(){
- this.setState({
- lookvisible: true
- });
- this.lookLoadData();
- },
- lookmateNo(){
- this.setState({
- lookvisible: false
- })
- },
- addClick() {
- this.state.RowData = {};
- this.setState({
- showDesc: true
- });
- },
- closeDesc(e, s) {
- this.state.showDesc = e;
- if (s) {
- this.loadData(this.state.page);
- };
- },
- search() {
- this.loadData();
- },
- reset() {
- this.state.serialNumber = undefined;
- this.state.name = undefined;
- this.state.keyword = undefined;
- this.state.employerName= undefined;
- this.state.infoSources = undefined;
- this.state.demandType = undefined;
- this.state.searchName = undefined;
- this.state.searchType = 0;
- this.state.boutique = '';
- this.state.hot='' ;
- this.state.status = undefined;
- this.state.releaseStatus = undefined;
- this.state.auditStatus = undefined;
- this.state.dataCategory = undefined;
- this.state.validityPeriodDate = [];
- this.state.releaseDate = [];
- this.state.releaseDateS = [];
- this.loadData();
- },
- matereset(){
- this.state.mateContactMobile = undefined;//成果方联系方式
- this.state.mateContacts = undefined;//成果联系人
- this.state.mateOrganization = undefined;//匹配机构
- this.state.mateSources = undefined;//来源
- this.state.mateRemark = undefined;//备注
- },
- //点击新增跟进记录是清空里面的内容
- lookreset(){
- this.state.RowData.addcreateTime = undefined;
- this.state.addresult = '';
- this.state.addremarks = undefined;
- },
- searchSwitch() {
- this.setState({
- searchMore: !this.state.searchMore
- });
- },
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach(item => {
- arr.forEach(val => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr
- });
- },
- render() {
- const rowSelection = {
- selectedRowKeys: this.state.selectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows.slice(-1),
- selectedRowKeys: selectedRowKeys.slice(-1)
- });
- }
- };
- const materowSelection = {
- selectedRowKeys: this.state.mateselectedRowKeys,
- onChange: (mateselectedRowKeys, mateselectedRows) => {
- this.setState({
- mateselectedRows: mateselectedRows.slice(-1),
- mateselectedRowKeys: mateselectedRowKeys.slice(-1)
- });
- }
- };
- const hasSelected = this.state.selectedRowKeys.length > 0;
- const matehasSelected= this.state.mateselectedRowKeys.length > 0;
- const { RangePicker } = DatePicker;
- const FormItem = Form.Item
- return (
- <div className="user-content" >
- <div className="content-title">
- <span>我的科技需求</span>
- <div className="patent-addNew clearfix">
- <Upload
- action={globalConfig.context + "/api/admin/demand/uploadTemplate"}
- data={{ 'sign': 'demand_template' }}
- beforeUpload={beforeUploadFile}
- showUploadList={false}
- onChange={(info) => {
- if (info.file.status !== 'uploading') {
- // console.log(info.file, info.fileList);
- }
- if (info.file.status === 'done') {
- if (!info.file.response.error.length) {
- message.success(`${info.file.name} 文件上传成功!`);
- } else {
- message.warning(info.file.response.error[0].message);
- return;
- };
- } else if (info.file.status === 'error') {
- message.error(`${info.file.name} 文件上传失败。`);
- };
- }} >
- <Button>上传批量导入模板</Button>
- </Upload>
- <Button onClick={() => { window.open(globalConfig.context + '/api/admin/demand/downloadTemplate?sign=demand_template') }}>下载批量导入模板</Button>
- <Button type="primary" className="addButton" onClick={this.addClick}>新增需求<Icon type="plus" /></Button>
- <BatchImport closeDesc={this.closeDesc} />
- </div>
- </div>
- <Tabs defaultActiveKey="1" className="test">
- <TabPane tab="搜索" key="1">
- <div className="user-search">
- <Input placeholder="需求编号"
- value={this.state.serialNumber}
- onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
- <Input placeholder="需求名称"
- value={this.state.name}
- onChange={(e) => { this.setState({ name: e.target.value }); }} />
- <Input placeholder="关键字"
- value={this.state.keyword}
- onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
- <Input placeholder="需求雇主名称"
- value={this.state.employerName}
- onChange={(e) => { this.setState({ employerName: e.target.value }); }} />
- <Radio.Group value={this.state.searchType} onChange={(e) => {
- this.setState({ searchType: e.target.value })
- }}>
- <Radio value={0}>认证用户</Radio>
- <Radio value={1}>非认证用户</Radio>
- </Radio.Group>
- <Button type="primary" onClick={this.search}>搜索</Button>
- <Button onClick={this.reset}>重置</Button>
- <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
- disabled={!hasSelected}
- onClick={this.delectRow}>删除<Icon type="minus" /></Button>
- <Button type="primary"
- disabled={!hasSelected}
- onClick={this.mate}>匹配跟进<Icon type="minus" /></Button>
- <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
- <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
- <Radio.Group value={this.state.boutique} onChange={(e) => {
- this.setState({ boutique: e.target.value })
- }}>
- <Radio value={1}>精品</Radio>
- <Radio value={0}>非精品</Radio>
- </Radio.Group>
- <Select placeholder="选择信息来源" style={{ width: 120 }}
- value={this.state.infoSources}
- onChange={(e) => { this.setState({ infoSources: e }) }}>
- <Select.Option value="0" >平台采集</Select.Option>
- <Select.Option value="1" >客户发布</Select.Option>
- <Select.Option value="2" >批量导入</Select.Option>
- <Select.Option value="3" >三方对接</Select.Option>
- </Select>
- <Select placeholder="选择需求类型"
- style={{ width: 120 }}
- value={this.state.demandType}
- onChange={(e) => { this.setState({ demandType: e }) }}>
- {this.state.demandTypeOption}
- </Select>
- <Select placeholder="选择需求状态" style={{ width: 120 }}
- value={this.state.status}
- onChange={(e) => { this.setState({ status: e }) }}>
- <Select.Option value="0" >进行中</Select.Option>
- <Select.Option value="1" >未解决</Select.Option>
- <Select.Option value="2" >已解决</Select.Option>
- </Select>
- <Select placeholder="选择审核状态" style={{ width: 160 }}
- value={this.state.auditStatus}
- onChange={(e) => { this.setState({ auditStatus: e }) }}>
- <Select.Option value="0" >未提交审核(草稿)</Select.Option>
- <Select.Option value="1" >提交审核</Select.Option>
- <Select.Option value="2" >审核中</Select.Option>
- <Select.Option value="3" >审核通过</Select.Option>
- <Select.Option value="4" >审核未通过</Select.Option>
- </Select>
- <Select placeholder="选择是否发布" style={{ width: 120 }}
- value={this.state.releaseStatus}
- onChange={(e) => { this.setState({ releaseStatus: e }) }}>
- <Select.Option value="0" >未发布</Select.Option>
- <Select.Option value="1" >已发布</Select.Option>
- </Select>
- <Select placeholder="选择需求类别" style={{ width: 120 }}
- value={this.state.dataCategory}
- onChange={(e) => { this.setState({ dataCategory: e }) }}>
- <Select.Option value="0" >个人</Select.Option>
- <Select.Option value="1" >组织</Select.Option>
- </Select>
- <div style={{ marginTop: '10px' }}>
- <span style={{ marginLeft: '10px' }}>有效期限 : </span>
- <RangePicker
- value={[this.state.validityPeriodDate[0] ? moment(this.state.validityPeriodDate[0]) : null,
- this.state.validityPeriodDate[1] ? moment(this.state.validityPeriodDate[1]) : null]}
- onChange={(data, dataString) => { this.setState({ validityPeriodDate: dataString }); }} />
- <span style={{ marginLeft: '10px' }}>发布时间 : </span>
- <RangePicker
- value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
- this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
- onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
- <span style={{ marginLeft: '10px' }}>录入时间 : </span>
- <RangePicker
- value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
- this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
- onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
- </div>
- </div>
- </div>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="2">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- </Tabs>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table size="middle" columns={
- this.state.changeList
- ? this.state.changeList
- : this.state.columns
- }
- dataSource={this.state.dataSource}
- rowSelection={rowSelection}
- pagination={this.state.pagination}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.matevisible}
- onOk={this.checkPatentProcess} onCancel={this.mateNo}
- width='1200px'
- title='匹配跟进'
- footer=''
- className="admin-desc-content">
- <Form horizontal id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix" >
- <Button className="ContactsList" type="primary" onClick={this.addmate} style={{float:'left',marginBottom:'10px',marginRight:'20px'}}>新增</Button>
- <Button className="ContactsList" type="primary" onClick={this.addmate1} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>添加跟进情况</Button>
- <Button className="ContactsList" type="primary" onClick={this.lookmate} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>查看跟进情况</Button>
- <Button className="ContactsList" onClick={this.delect} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>删除</Button>
- <Button type="primary" onClick={this.tabExel} style={{'display':'none'}}>导出到表格</Button>
- </div>
- <div className="clearfix" >
- <Spin spinning={this.state.loading}>
- <Form horizontal id="demand-form" onSubmit={this.contactSave} >
- <Table
- size="middle"
- pagination={this.state.matepagination}
- columns={this.state.mateColumns}
- dataSource={this.state.mateDataSource}
- rowSelection={materowSelection}
- onRowClick={this.mateTableRowClick}
- />
- </Form>
- </Spin>
- </div>
- <div className="clearfix" id='daochu' style={{'display':'none'}}>
- <Spin spinning={this.state.loading}>
- <Form horizontal id="demand-form" onSubmit={this.contactSave} >
- <Table
- size="middle"
- pagination={this.state.matepagination}
- columns={this.state.mateColumnsExport}
- dataSource={this.state.mateDataSource}
- rowSelection={materowSelection}
- onRowClick={this.mateTableRowClick}
- />
- </Form>
- </Spin>
- </div>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.addmatevisible}
- onOk={this.checkPatentProcess} onCancel={this.addmateNo}
- width='1200px'
- title='新增匹配跟进'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.addmateSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="录入人:" >
- <span>{this.state.adminName}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="录入时间:" >
- <span>{this.state.createTimeFormattedDate}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="企业名称:" >
- <span>{this.state.employerName}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="需求名称:" >
- <span>{this.state.name}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="联系人联络方式:" >
- <span>{this.state.employerContactsMobile}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="联系人邮箱:" >
- <span>{this.state.employerContactsMailbox}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="匹配机构:" >
- <Input placeholder="机构名称" value={this.state.mateOrganization} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateOrganization:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="匹配来源:"
- >
- <Input placeholder="匹配来源" value={this.state.mateSources} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateSources:e.target.value})}} />
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="成果联系人:" >
- <Input placeholder="联系人名称" value={this.state.mateContacts} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateContacts:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="成果方联系方式:"
- >
- <Input placeholder="联系方式" value={this.state.mateContactMobile} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateContactMobile:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="备注:" >
- <Input type="textarea" rows={4} placeholder="匹配情况备注" value={this.state.mateRemark}
- onChange={(e) => { this.setState({ mateRemark: e.target.value }) }} style={{width:'95%'}}/>
- </FormItem>
- </div>
- <div className="clearfix">
- <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'190px',marginBottom:'20px'}}>保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.addmateNo} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>
- </div>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.addmatevisibles}
- onOk={this.checkPatentProcess} onCancel={this.addmateNos}
- width='1200px'
- title='匹配跟进详情'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.addmateSubmits} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="录入人:" >
- <span>{this.state.adminName}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="录入时间:" >
- <span>{this.state.createTimeFormattedDate}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="企业名称:" >
- <span>{this.state.employerName}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="需求名称:" >
- <span>{this.state.name}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="联系人联络方式:" >
- <span>{this.state.employerContactsMobile}</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="联系人邮箱:" >
- <span>{this.state.employerContactsMailbox}</span>
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="匹配机构:" >
- <Input placeholder="机构名称" value={this.state.mateOrganization} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateOrganization:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="匹配来源:"
- >
- <Input placeholder="匹配来源" value={this.state.mateSources} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateSources:e.target.value})}} />
- </FormItem>
- </div>
- <div className="clearfix" style={{paddingLeft:'60px'}}>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="成果联系人:" >
- <Input placeholder="联系人名称" value={this.state.mateContacts} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateContacts:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="成果方联系方式:"
- >
- <Input placeholder="联系方式" value={this.state.mateContactMobile} style={{width:'94%'}}
- onChange={(e)=>{this.setState({mateContactMobile:e.target.value})}} required="required"/>
- <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="备注:" >
- <Input type="textarea" rows={4} placeholder="匹配情况备注" value={this.state.mateRemark}
- onChange={(e) => { this.setState({ mateRemark: e.target.value }) }} style={{width:'95%'}}/>
- </FormItem>
- </div>
- <div className="clearfix">
- <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'190px',marginBottom:'20px'}}>保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.addmateNos} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>
- </div>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.addmatevisible1}
- onOk={this.checkPatentProcess} onCancel={this.addmateNo1}
- width='600px'
- title='跟进情况添加'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 16 }}
- label="跟进时间" >
- <DatePicker
- style={{'width':'95%'}}
- format="YYYY-MM-DD"
- placeholder="选择跟进时间"
- value={this.state.RowData.addcreateTime ? moment(this.state.RowData.addcreateTime, "YYYY-MM-DD") : undefined}
- onChange={(t, str) => {
- this.state.RowData.addcreateTime = str;
- this.setState({ RowData: this.state.RowData});
- }} />
- <span style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 16 }}
- label="跟进结果"
- >
- <Select placeholder="请选择跟进结果"
- value={this.state.addresult}
- style={{'width':'95%'}}
- onChange={(e) => { this.setState({ addresult: e }) }}>
- <Select.Option value="0" >跟进中</Select.Option>
- <Select.Option value="1" >已匹配</Select.Option>
- </Select>
- <span style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 16 }}
- label="跟进情况" >
- <Input type="textarea" rows={4} placeholder="跟进情况记录" value={this.state.addremarks}
- onChange={(e) => { this.setState({ addremarks: e.target.value }) }} style={{width:'95%'}}/>
- <span style={{color:'red',marginLeft:'5px'}}>*</span>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.addmateNo1} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.lookvisible}
- onOk={this.checkPatentProcess} onCancel={this.lookmateNo}
- width='600px'
- title='跟进情况列表'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <Form horizontal id="demand-form" onSubmit={this.contactSave} >
- <Table
- size="middle"
- pagination={this.state.lookpagination}
- columns={this.state.lookColumns}
- dataSource={this.state.lookDataSource}
- rowSelection={rowSelection}
- onRowClick={this.lookTableRowClick}
- />
- </Form>
- </div>
- </Spin>
- </Form >
- </Modal>
- </div>
- <TechDemandDesc
- data={this.state.RowData}
- detailApiUrl={this.props['data-detailApiUrl']}
- companyOption={this.state.companyOption}
- userOption={this.state.userOption}
- demandTypeOption={this.state.demandTypeOption}
- showDesc={this.state.showDesc}
- closeDesc={this.closeDesc} />
- </div >
-
- );
- }
- });
- export default DemandList;
|