myTechDemand.jsx 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540
  1. import React from 'react';
  2. import {Form, Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import './techDemand.less';
  7. import TechDemandDesc from './techDemandDesc.jsx';
  8. import { demandTypeList } from '../../dataDic.js';
  9. import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique,gethot} from '../../tools.js';
  10. import BatchImport from './batchImport';
  11. const DemandList = React.createClass({
  12. loadData(pageNo, apiUrl) {
  13. this.state.data = [];
  14. if(this.state.serialNumber&&isNaN(this.state.serialNumber)){
  15. message.warning('请输入正确的编号格式');
  16. return false;
  17. }
  18. this.setState({
  19. loading: true
  20. });
  21. $.ajax({
  22. method: "get",
  23. dataType: "json",
  24. crossDomain: false,
  25. url: globalConfig.context + (apiUrl || this.props['data-listApiUrl']),
  26. data: {
  27. pageNo: pageNo || 1,
  28. pageSize: this.state.pagination.pageSize,
  29. serialNumber: this.state.serialNumber,
  30. name: this.state.name,
  31. keyword: this.state.keyword,
  32. employerName: this.state.employerName,
  33. infoSources: this.state.infoSources ? Number(this.state.infoSources) : undefined,
  34. demandType: this.state.demandType ? Number(this.state.demandType) : undefined,
  35. //username: this.state.username,
  36. status: this.state.status ? Number(this.state.status) : undefined,
  37. releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined,
  38. validityPeriodStartDate: this.state.validityPeriodDate[0],
  39. validityPeriodEndDate: this.state.validityPeriodDate[1],
  40. releaseDateStartDate: this.state.releaseDate[0],
  41. releaseDateEndDate: this.state.releaseDate[1],
  42. createDateStartDate: this.state.releaseDateS[0],
  43. createDateEndDate: this.state.releaseDateS[1],
  44. auditStatus: this.state.auditStatus,
  45. boutique:this.state.boutique,
  46. hot:this.state.hot,
  47. dataCategory:this.state.dataCategory,
  48. //employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
  49. username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
  50. unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
  51. },
  52. success: function (data) {
  53. let theArr = [];
  54. if (!data.data || !data.data.list) {
  55. if (data.error && data.error.length) {
  56. message.warning(data.error[0].message);
  57. };
  58. } else {
  59. for (let i = 0; i < data.data.list.length; i++) {
  60. let thisdata = data.data.list[i];
  61. theArr.push({
  62. key: i,
  63. id: thisdata.id,
  64. serialNumber: thisdata.serialNumber,
  65. dataCategory: thisdata.dataCategory,
  66. name: thisdata.name,
  67. keyword: thisdata.keyword,
  68. infoSources: thisdata.infoSources,
  69. username: thisdata.username,
  70. theName: thisdata.username || thisdata.employerName,
  71. demandType: thisdata.demandType,
  72. validityPeriod: thisdata.validityPeriod,
  73. employerName: thisdata.employerName,
  74. employerId: thisdata.employerId,
  75. province: thisdata.province,
  76. status: thisdata.status,
  77. releaseStatus: thisdata.releaseStatus,
  78. releaseDate: thisdata.releaseDate,
  79. principalId: thisdata.principalId,
  80. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  81. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  82. auditStatus: thisdata.auditStatus,
  83. boutique: thisdata.boutique,
  84. urgentMoney:thisdata.urgentMoney,
  85. urgentDays:thisdata.urgentDays,
  86. hot: thisdata.hot,
  87. techBrokerId:thisdata.techBrokerId,
  88. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  89. });
  90. };
  91. this.state.pagination.current = data.data.pageNo;
  92. this.state.pagination.total = data.data.totalCount;
  93. };
  94. this.setState({
  95. dataSource: theArr,
  96. pagination: this.state.pagination
  97. });
  98. }.bind(this),
  99. }).always(function () {
  100. this.setState({
  101. loading: false
  102. });
  103. }.bind(this));
  104. },
  105. mateLoadData(pageNo, apiUrl) {
  106. let demandId ='';
  107. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  108. let rowItem = this.state.selectedRows[idx];
  109. if (rowItem.id) {
  110. demandId=rowItem.id;
  111. };
  112. };
  113. this.setState({
  114. loading: true
  115. });
  116. $.ajax({
  117. method: "get",
  118. dataType: "json",
  119. crossDomain: false,
  120. url: globalConfig.context + '/api/admin/demand/listDemandFollow',
  121. data: {
  122. id:demandId,
  123. pNo: pageNo || 1,
  124. pSize: this.state.matepagination.pageSize,
  125. },
  126. success: function (data) {
  127. let theArr = [];
  128. if (!data.data || !data.data.list) {
  129. if (data.error && data.error.length) {
  130. message.warning(data.error[0].message);
  131. };
  132. } else {
  133. for (let i = 0; i < data.data.list.length; i++) {
  134. let thisdata = data.data.list[i];
  135. let thisdataDet=data.data.list[i].demandFollowDetail;
  136. let followUp='';
  137. let a=thisdataDet?thisdataDet.length:0;
  138. for(let j=0;j<a;j++){
  139. followUp+=(j+1)+'. '+thisdataDet[j].createTimeFormattedDate+' '+thisdataDet[j].remarks+' \n';
  140. }
  141. theArr.push({
  142. key: i,//序列号
  143. id: thisdata.id,//匹配跟进ID
  144. demandId: thisdata.demandId,//需求ID
  145. organization: thisdata.organization,//匹配机构
  146. contacts: thisdata.contacts,//联系人
  147. contactMobile: thisdata.contactMobile,//联系方式
  148. result: thisdata.result,//跟进结果
  149. lastFollowTime: thisdata.lastFollowTime,//最新跟进时间
  150. sources: thisdata.sources,//来源
  151. name: thisdata.name,//需求名称
  152. employerName: thisdata.employerName,//需求公司名称
  153. employerContactsMobile: thisdata.employerContactsMobile,//需求联系方式
  154. employerContactsMailbox: thisdata.employerContactsMailbox,//需求联系邮箱
  155. createTime: thisdata.createTime,//录入时间
  156. createTimeFormattedDate: thisdata.createTimeFormattedDate,//录入时间转格式
  157. lastFollowTimeFormattedDate: thisdata.lastFollowTimeFormattedDate,//跟进时间转格式
  158. adminName: thisdata.adminName,//录入人
  159. remark:thisdata.remark,//备注
  160. followUp:followUp,
  161. });
  162. };
  163. this.state.matepagination.current = data.data.pageNo;
  164. this.state.matepagination.total = data.data.totalCount;
  165. };
  166. this.setState({
  167. mateDataSource: theArr,
  168. matepagination: this.state.matepagination,
  169. });
  170. }.bind(this),
  171. }).always(function () {
  172. this.setState({
  173. loading: false
  174. });
  175. }.bind(this));
  176. },
  177. lookLoadData(pageNo, apiUrl) {
  178. let rowItem = '';
  179. for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
  180. rowItem = this.state.mateselectedRows[idx];
  181. };
  182. this.setState({
  183. loading: true,
  184. mateselectedRowKeys: [],
  185. });
  186. $.ajax({
  187. method: "get",
  188. dataType: "json",
  189. crossDomain: false,
  190. url: globalConfig.context + '/api/admin/demand/listDemandFollowDetail',
  191. data: {
  192. pNo: pageNo || 1,
  193. pSize: this.state.lookpagination.pageSize,
  194. id:rowItem.id
  195. },
  196. success: function (data) {
  197. let theArr = [];
  198. if (!data.data || !data.data.list) {
  199. if (data.error && data.error.length) {
  200. message.warning(data.error[0].message);
  201. };
  202. } else {
  203. for (let i = 0; i < data.data.list.length; i++) {
  204. let thisdata = data.data.list[i];
  205. theArr.push({
  206. key: i,
  207. id: thisdata.id,//跟进情况ID
  208. demandFollowId: thisdata.demandFollowId,//匹配跟进ID
  209. remarks: thisdata.remarks,//跟进情况
  210. result: thisdata.result,//跟进结果
  211. createTime: thisdata.createTime,//跟进时间
  212. createTimeFormattedDate: thisdata.createTimeFormattedDate,//录入时间转格式
  213. });
  214. };
  215. this.state.lookpagination.current = data.data.pageNo;
  216. this.state.lookpagination.total = data.data.totalCount;
  217. };
  218. this.setState({
  219. lookDataSource: theArr,
  220. lookpagination: this.state.lookpagination
  221. });
  222. }.bind(this),
  223. }).always(function () {
  224. this.setState({
  225. loading: false
  226. });
  227. }.bind(this));
  228. },
  229. getInitialState() {
  230. return {
  231. searchMore: true,
  232. searchType: 0,
  233. validityPeriodDate: [],
  234. releaseDate: [],
  235. releaseDateS: [],
  236. selectedRowKeys: [],
  237. mateselectedRowKeys: [],
  238. selectedRows: [],
  239. loading: false,
  240. pagination: {
  241. defaultCurrent: 1,
  242. defaultPageSize: 10,
  243. showQuickJumper: true,
  244. pageSize: 10,
  245. onChange: function (page) {
  246. this.loadData(page);
  247. }.bind(this),
  248. showTotal: function (total) {
  249. return '共' + total + '条数据';
  250. }
  251. },
  252. matepagination: {
  253. defaultCurrent: 1,
  254. defaultPageSize: 10,
  255. showQuickJumper: true,
  256. pageSize: 10,
  257. onChange: function (page) {
  258. this.mateLoadData(page);
  259. }.bind(this),
  260. showTotal: function (total) {
  261. return '共' + total + '条数据';
  262. }
  263. },
  264. lookpagination: {
  265. defaultCurrent: 1,
  266. defaultPageSize: 10,
  267. showQuickJumper: true,
  268. pageSize: 10,
  269. onChange: function (page) {
  270. this.lookLoadData(page);
  271. }.bind(this),
  272. showTotal: function (total) {
  273. return '共' + total + '条数据';
  274. }
  275. },
  276. columns: [
  277. {
  278. title: '编号',
  279. dataIndex: 'serialNumber',
  280. key: 'serialNumber',
  281. }, {
  282. title: '需求名称',
  283. dataIndex: 'name',
  284. key: 'name',
  285. },
  286. {
  287. title: '录入人',
  288. dataIndex: 'techBrokerId',
  289. key: 'techBrokerId',
  290. },
  291. {
  292. title: '是否精品',
  293. dataIndex: 'boutique',
  294. key: 'boutique',
  295. render: text => { return getboutique(text) }
  296. },
  297. {
  298. title: '关键字',
  299. dataIndex: 'keyword',
  300. key: 'keyword',
  301. }, {
  302. title: '需求类型',
  303. dataIndex: 'demandType',
  304. key: 'demandType',
  305. render: text => { return getDemandType(text); }
  306. }, {
  307. title: '信息来源',
  308. dataIndex: 'infoSources',
  309. key: 'infoSources',
  310. render: text => {
  311. switch (text) {
  312. case "0":
  313. return <span>平台采集</span>;
  314. case "1":
  315. return <span>客户发布</span>;
  316. case "2":
  317. return <span>批量导入</span>
  318. case "3":
  319. return <span>三方对接</span>
  320. }
  321. }
  322. }, {
  323. title: '审核状态',
  324. dataIndex: 'auditStatus',
  325. key: 'auditStatus',
  326. render: text => {
  327. switch (text) {
  328. case 0:
  329. return <span>未提交审核(草稿)</span>;
  330. case 1:
  331. return <span>提交审核</span>;
  332. case 2:
  333. return <span>审核中</span>;
  334. case 3:
  335. return <span>审核通过</span>;
  336. case 4:
  337. return <span>审核未通过</span>;
  338. }
  339. }
  340. }, {
  341. title: '需求状态',
  342. dataIndex: 'status',
  343. key: 'status',
  344. render: text => {
  345. switch (text) {
  346. case "0":
  347. return <span>进行中</span>;
  348. case "1":
  349. return <span>未解决</span>;
  350. case "2":
  351. return <span>已解决</span>;
  352. }
  353. }
  354. }, {
  355. title: '有效期限',
  356. dataIndex: 'validityPeriodFormattedDate',
  357. key: 'validityPeriodFormattedDate',
  358. }, {
  359. title: '发布时间',
  360. dataIndex: 'releaseDateFormattedDate',
  361. key: 'releaseDateFormattedDate',
  362. },{
  363. title: '录入时间',
  364. dataIndex: 'createTimeFormattedDate',
  365. key: 'createTimeFormattedDate',
  366. }
  367. ],
  368. dataSource: [],
  369. searchTime: [],
  370. mateColumns: [
  371. {
  372. title: '企业名称',
  373. dataIndex: 'employerName',
  374. key: 'employerName',
  375. }, {
  376. title: '需求名称',
  377. dataIndex: 'name',
  378. key: 'name',
  379. },
  380. {
  381. title: '联系人',
  382. dataIndex: 'employerContactsMobile',
  383. key: 'employerContactsMobile',
  384. },{
  385. title: '匹配机构',
  386. dataIndex: 'organization',
  387. key: 'organization',
  388. },{
  389. title: '成果联系人',
  390. dataIndex: 'contacts',
  391. key: 'contacts',
  392. },{
  393. title: '成果方联系方式',
  394. dataIndex: 'contactMobile',
  395. key: 'contactMobile',
  396. },{
  397. title: '跟进结果',
  398. dataIndex: 'result',
  399. key: 'result',
  400. render: text => {
  401. switch (text) {
  402. case 0:
  403. return <span>跟进中</span>;
  404. case 1:
  405. return <span>已匹配</span>;
  406. }
  407. }
  408. },{
  409. title: '最新跟进时间',
  410. dataIndex: 'lastFollowTimeFormattedDate',
  411. key: 'lastFollowTimeFormattedDate',
  412. }
  413. ],
  414. mateDataSource: [],
  415. searchTime: [],
  416. mateColumnsExport: [
  417. {
  418. title: '企业名称',
  419. dataIndex: 'employerName',
  420. key: 'employerName',
  421. }, {
  422. title: '需求名称',
  423. dataIndex: 'name',
  424. key: 'name',
  425. },{
  426. title: '联系人',
  427. dataIndex: 'employerContactsMobile',
  428. key: 'employerContactsMobile',
  429. },{
  430. title: '联系人邮箱',
  431. dataIndex: 'employerContactsMailbox',
  432. key: 'employerContactsMailbox',
  433. },{
  434. title: '匹配机构',
  435. dataIndex: 'organization',
  436. key: 'organization',
  437. },{
  438. title: '成果联系人',
  439. dataIndex: 'contacts',
  440. key: 'contacts',
  441. },{
  442. title: '成果方联系方式',
  443. dataIndex: 'contactMobile',
  444. key: 'contactMobile',
  445. },{
  446. title: '来源',
  447. dataIndex: 'sources',
  448. key: 'sources',
  449. },{
  450. title: '备注',
  451. dataIndex: 'remark',
  452. key: 'remark',
  453. },{
  454. title: '跟进汇总',
  455. dataIndex: 'followUp',
  456. key: 'followUp',
  457. }
  458. ],
  459. mateDataSource: [],
  460. searchTime: [],
  461. lookColumns: [
  462. {
  463. title: '跟进时间',
  464. dataIndex: 'createTimeFormattedDate',
  465. key: 'createTimeFormattedDate',
  466. },{
  467. title: '跟进结果',
  468. dataIndex: 'result',
  469. key: 'result',
  470. render: text => {
  471. switch (text) {
  472. case 0:
  473. return <span>跟进中</span>;
  474. case 1:
  475. return <span>已匹配</span>;
  476. }
  477. }
  478. },{
  479. title: '跟进情况',
  480. dataIndex: 'remarks',
  481. key: 'remarks',
  482. }
  483. ],
  484. lookDataSource: [],
  485. searchTime: []
  486. };
  487. },
  488. getCompanyList() {
  489. this.setState({
  490. loading: true
  491. });
  492. $.ajax({
  493. method: "get",
  494. dataType: "json",
  495. crossDomain: false,
  496. url: globalConfig.context + "/api/admin/demand/unitNames",
  497. success: function (data) {
  498. let theArr = [];
  499. if (!data.data) {
  500. if (data.error && data.error.length) {
  501. message.warning(data.error[0].message);
  502. };
  503. } else {
  504. data.data.map(function (item) {
  505. theArr.push(
  506. <Select.Option value={item.uid} key={item.uid}>{item.unitName}</Select.Option>
  507. )
  508. });
  509. };
  510. this.setState({
  511. companyOption: theArr
  512. });
  513. }.bind(this),
  514. }).always(function () {
  515. this.setState({
  516. loading: false
  517. });
  518. }.bind(this));
  519. },
  520. getUserList() {
  521. this.setState({
  522. loading: true
  523. });
  524. $.ajax({
  525. method: "get",
  526. dataType: "json",
  527. crossDomain: false,
  528. url: globalConfig.context + "/api/admin/demand/userNames",
  529. success: function (data) {
  530. let theArr = [];
  531. if (!data.data) {
  532. if (data.error && data.error.length) {
  533. message.warning(data.error[0].message);
  534. };
  535. } else {
  536. data.data.map(function (item) {
  537. theArr.push(
  538. <Select.Option value={item.uid} key={item.uid}>{item.username}</Select.Option>
  539. )
  540. });
  541. };
  542. this.setState({
  543. userOption: theArr
  544. });
  545. }.bind(this),
  546. }).always(function () {
  547. this.setState({
  548. loading: false
  549. });
  550. }.bind(this));
  551. },
  552. componentWillMount() {
  553. let theArr = [];
  554. demandTypeList.map(function (item) {
  555. theArr.push(
  556. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  557. )
  558. });
  559. this.state.demandTypeOption = theArr;
  560. if (window.location.search) {
  561. let theObj = getSearchUrl(window.location.search);
  562. if (theObj.rid) {
  563. theObj.id = theObj.rid;
  564. theObj.employerId = theObj.uid;
  565. if (theObj.rid != 'null') {
  566. this.tableRowClick(theObj);
  567. };
  568. };
  569. };
  570. this.loadData();
  571. this.getCompanyList();
  572. this.getUserList();
  573. },
  574. componentWillReceiveProps(nextProps) {
  575. if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
  576. this.state.selectedRowKeys = [];
  577. this.state.selectedRows = [];
  578. this.state.serialNumber = undefined;
  579. this.state.name = undefined;
  580. this.state.keyword = undefined;
  581. this.state.infoSources = undefined;
  582. this.state.demandType = undefined;
  583. this.state.searchName = undefined;
  584. this.state.searchType = 0;
  585. this.state.status = undefined;
  586. this.state.releaseStatus = undefined;
  587. this.state.auditStatus = undefined;
  588. this.state.validityPeriodDate = [];
  589. this.state.releaseDate = [];
  590. this.state.releaseDateS = [];
  591. this.loadData(null, nextProps['data-listApiUrl']);
  592. };
  593. },
  594. tableRowClick(record, index) {
  595. this.state.RowData = record;
  596. if(index!=undefined){
  597. this.setState({
  598. showDesc: true
  599. });
  600. }
  601. },
  602. //删除需求
  603. delectRow() {
  604. let deletedIds = [];
  605. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  606. let rowItem = this.state.selectedRows[idx];
  607. if (rowItem.id) {
  608. deletedIds.push(rowItem.id)
  609. };
  610. };
  611. this.setState({
  612. selectedRowKeys: [],
  613. loading: deletedIds.length > 0
  614. });
  615. $.ajax({
  616. method: "POST",
  617. dataType: "json",
  618. crossDomain: false,
  619. url: globalConfig.context + "/api/admin/demand/delete",
  620. data: {
  621. ids: deletedIds
  622. }
  623. }).done(function (data) {
  624. if (!data.error.length) {
  625. message.success('删除成功!');
  626. this.setState({
  627. loading: false,
  628. });
  629. } else {
  630. message.warning(data.error[0].message);
  631. };
  632. this.loadData();
  633. }.bind(this));
  634. },
  635. //删除匹配记录
  636. delect(e) {
  637. let rowItem = '';
  638. for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
  639. rowItem = this.state.mateselectedRows[idx];
  640. };
  641. this.setState({
  642. mateselectedRowKeys: [],
  643. });
  644. $.ajax({
  645. method: "get",
  646. dataType: "json",
  647. crossDomain: false,
  648. url: globalConfig.context + "/api/admin/demand/deleteDemandFollow",
  649. data: {
  650. id: rowItem.id
  651. }
  652. }).done(function (data) {
  653. if (!data.error.length) {
  654. message.success('删除成功!');
  655. this.setState({
  656. loading: false,
  657. });
  658. } else {
  659. message.warning(data.error[0].message);
  660. };
  661. this.mateLoadData();
  662. }.bind(this));
  663. },
  664. //判断浏览器类型
  665. getExplorer() {
  666. var explorer = window.navigator.userAgent;
  667. //ie
  668. if(explorer.indexOf("MSIE") >= 0) {
  669. return 'ie';
  670. }
  671. //firefox
  672. else if(explorer.indexOf("Firefox") >= 0) {
  673. return 'Firefox';
  674. }
  675. //Chrome
  676. else if(explorer.indexOf("Chrome") >= 0) {
  677. return 'Chrome';
  678. }
  679. //Opera
  680. else if(explorer.indexOf("Opera") >= 0) {
  681. return 'Opera';
  682. }
  683. //Safari
  684. else if(explorer.indexOf("Safari") >= 0) {
  685. return 'Safari';
  686. }
  687. },
  688. //导出为exel表格
  689. tabExel() {
  690. var table = document.querySelector('#daochu');
  691. var idTmr;
  692. //debugger;
  693. //整个表格拷贝到EXCEL中
  694. if(this.getExplorer() == 'ie') {
  695. var curTbl = document.getElementById(tableid);
  696. var oXL = new ActiveXObject("Excel.Application");
  697. //创建AX对象excel
  698. var oWB = oXL.Workbooks.Add();
  699. //获取workbook对象
  700. var xlsheet = oWB.Worksheets(1);
  701. //激活当前sheet
  702. var sel = document.body.createTextRange();
  703. sel.moveToElementText(curTbl);
  704. //把表格中的内容移到TextRange中
  705. sel.select();
  706. //全选TextRange中内容
  707. sel.execCommand("Copy");
  708. //复制TextRange中内容
  709. xlsheet.Paste();
  710. //粘贴到活动的EXCEL中
  711. oXL.Visible = true;
  712. //设置excel可见属性
  713. try {
  714. var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
  715. } catch(e) {
  716. print("Nested catch caught " + e);
  717. } finally {
  718. oWB.SaveAs(fname);
  719. oWB.Close(savechanges = false);
  720. //xls.visible = false;
  721. oXL.Quit();
  722. oXL = null;
  723. //结束excel进程,退出完成
  724. //window.setInterval("Cleanup();",1);
  725. idTmr = window.setInterval("Cleanup();", 1);
  726. }
  727. } else {
  728. console.log(table);
  729. this.tableToExcel(table,this.getExplorer());
  730. }
  731. function Cleanup() {
  732. window.clearInterval(idTmr);
  733. CollectGarbage();
  734. }
  735. },
  736. tableToExcel(table,name) {
  737. var uri = 'data:application/vnd.ms-excel;base64,',
  738. 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>',
  739. base64 = function(s) {
  740. return window.btoa(unescape(encodeURIComponent(s)))
  741. },
  742. format = function(s, c) {
  743. return s.replace(/{(\w+)}/g,
  744. function(m, p) {
  745. return c[p];
  746. })
  747. }
  748. console.log(table.nodeType);
  749. if(!table.nodeType) table = document.getElementById(table);
  750. console.log(table);
  751. var ctx = {
  752. worksheet: name || 'Worksheet',
  753. table: table.innerHTML
  754. };
  755. window.location.href = uri + base64(format(template, ctx))
  756. },
  757. //匹配跟进的显示和隐藏
  758. mate(){
  759. this.setState({
  760. matevisible: true
  761. });
  762. this.mateLoadData();
  763. },
  764. mateNo(){
  765. this.setState({
  766. matevisible: false
  767. });
  768. this.reset();
  769. },
  770. //点开新增或者匹配记录详情的时候发送请求获取上面的内容
  771. mateTop(e){
  772. let demandId ='';
  773. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  774. let rowItem = this.state.selectedRows[idx];
  775. if (rowItem.id) {
  776. demandId=rowItem.id;
  777. };
  778. };
  779. this.setState({
  780. loading: true
  781. });
  782. $.ajax({
  783. method: "get",
  784. dataType: "json",
  785. crossDomain: false,
  786. url: globalConfig.context + '/api/admin/demand/DemandFollowDetails',
  787. data: {
  788. id:demandId,
  789. },
  790. success: function (data) {
  791. this.setState({
  792. mademandId:data.data.id,//录入人
  793. adminName: data.data.techBrokerId,//录入人
  794. createTime: data.data.createTime,//录入时间
  795. employerName: data.data.employerName,//公司名称
  796. name: data.data.name,//需求名称
  797. employerContactsMobile:data.data.employerContactsMobile,//联系人电话
  798. employerContactsMailbox:data.data.employerContactsMailbox,//联系人邮箱
  799. createTimeFormattedDate:data.data.createTimeFormattedDate,//录入时间转格式
  800. });
  801. }.bind(this),
  802. }).always(function () {
  803. this.setState({
  804. loading: false
  805. });
  806. }.bind(this));
  807. },
  808. //点击新增
  809. addmate(e){
  810. this.setState({
  811. addmatevisible: true
  812. });
  813. this.matereset();
  814. this.mateTop();
  815. },
  816. //修改一条匹配记录
  817. addmateSubmits(e){
  818. e.preventDefault();
  819. this.setState({
  820. loading: true
  821. });
  822. $.ajax({
  823. method: "post",
  824. dataType: "json",
  825. crossDomain: false,
  826. url:globalConfig.context + '/api/admin/demand/updateDemandFollow',
  827. data:{
  828. id:this.state.mademandIds,//需求ID
  829. contactMobile:this.state.mateContactMobile,//成果方联系方式
  830. contacts:this.state.mateContacts,//成果联系人
  831. organization:this.state.mateOrganization,//匹配机构
  832. sources:this.state.mateSources,//来源
  833. remark:this.state.mateRemark,//备注
  834. }
  835. }).done(function (data) {
  836. this.setState({
  837. loading: false
  838. });
  839. if (!data.error.length) {
  840. message.success('修改匹配跟进成功!');
  841. this.mateLoadData();
  842. this.addmateNos();
  843. } else {
  844. message.warning(data.error[0].message);
  845. }
  846. }.bind(this));
  847. },
  848. //新增一条匹配记录
  849. addmateSubmit(e){
  850. e.preventDefault();
  851. this.setState({
  852. loading: true
  853. });
  854. $.ajax({
  855. method: "post",
  856. dataType: "json",
  857. crossDomain: false,
  858. url:globalConfig.context + '/api/admin/demand/addDemandFollow',
  859. data:{
  860. demandId:this.state.mademandId,//需求ID
  861. contactMobile:this.state.mateContactMobile,//成果方联系方式
  862. contacts:this.state.mateContacts,//成果联系人
  863. organization:this.state.mateOrganization,//匹配机构
  864. sources:this.state.mateSources,//来源
  865. remark:this.state.mateRemark,//备注
  866. }
  867. }).done(function (data) {
  868. this.setState({
  869. loading: false
  870. });
  871. if (!data.error.length) {
  872. message.success('新增匹配跟进成功!');
  873. this.mateLoadData();
  874. this.addmateNo();
  875. } else {
  876. message.warning(data.error[0].message);
  877. }
  878. }.bind(this));
  879. },
  880. //新增跟进记录
  881. addhandleSubmit(e){
  882. e.preventDefault();
  883. let rowItem = '';
  884. for (let idx = 0; idx < this.state.mateselectedRows.length; idx++) {
  885. rowItem = this.state.mateselectedRows[idx];
  886. };
  887. this.setState({
  888. mateselectedRowKeys: [],
  889. loading: true
  890. });
  891. $.ajax({
  892. method: "post",
  893. dataType: "json",
  894. crossDomain: false,
  895. url:globalConfig.context + '/api/admin/demand/addDemandFollowDetail',
  896. data:{
  897. demandFollowId:rowItem.id,//需求跟进ID
  898. createTimeFormattedDate:this.state.RowData.addcreateTime,//跟进时间
  899. result:this.state.addresult,//跟进结果
  900. remarks:this.state.addremarks,//跟进情况
  901. }
  902. }).done(function (data) {
  903. this.setState({
  904. loading: false
  905. });
  906. if (!data.error.length) {
  907. message.success('最新跟进添加成功成功!');
  908. this.addmateNo1();
  909. } else {
  910. message.warning(data.error[0].message);
  911. }
  912. }.bind(this));
  913. },
  914. //点开详情
  915. mateTableRowClick(record, index){
  916. console.log(record);
  917. this.mateTop();
  918. this.setState({
  919. addmatevisibles: true,
  920. mateOrganization:record.organization,//匹配机构
  921. mateSources:record.sources,//来源
  922. mateContacts:record.contacts,//成果联系人
  923. mateContactMobile:record.contactMobile,//联系人电话
  924. mateRemark:record.remark,//备注
  925. mademandIds:record.id,//该条匹配跟进的ID
  926. });
  927. },
  928. addmateNos(){
  929. this.setState({
  930. addmatevisibles: false
  931. })
  932. },
  933. addmateNo(){
  934. this.setState({
  935. addmatevisible: false
  936. })
  937. },
  938. addmate1(){
  939. this.setState({
  940. addmatevisible1: true
  941. });
  942. this.lookreset();
  943. },
  944. addmateNo1(){
  945. this.setState({
  946. addmatevisible1: false
  947. });
  948. this.mateLoadData();
  949. },
  950. lookmate(){
  951. this.setState({
  952. lookvisible: true
  953. });
  954. this.lookLoadData();
  955. },
  956. lookmateNo(){
  957. this.setState({
  958. lookvisible: false
  959. })
  960. },
  961. addClick() {
  962. this.state.RowData = {};
  963. this.setState({
  964. showDesc: true
  965. });
  966. },
  967. closeDesc(e, s) {
  968. this.state.showDesc = e;
  969. if (s) {
  970. this.loadData();
  971. };
  972. },
  973. search() {
  974. this.loadData();
  975. },
  976. reset() {
  977. this.state.serialNumber = undefined;
  978. this.state.name = undefined;
  979. this.state.keyword = undefined;
  980. this.state.employerName= undefined;
  981. this.state.infoSources = undefined;
  982. this.state.demandType = undefined;
  983. this.state.searchName = undefined;
  984. this.state.searchType = 0;
  985. this.state.boutique = '';
  986. this.state.hot='' ;
  987. this.state.status = undefined;
  988. this.state.releaseStatus = undefined;
  989. this.state.auditStatus = undefined;
  990. this.state.dataCategory = undefined;
  991. this.state.validityPeriodDate = [];
  992. this.state.releaseDate = [];
  993. this.state.releaseDateS = [];
  994. this.loadData();
  995. },
  996. matereset(){
  997. this.state.mateContactMobile = undefined;//成果方联系方式
  998. this.state.mateContacts = undefined;//成果联系人
  999. this.state.mateOrganization = undefined;//匹配机构
  1000. this.state.mateSources = undefined;//来源
  1001. this.state.mateRemark = undefined;//备注
  1002. },
  1003. //点击新增跟进记录是清空里面的内容
  1004. lookreset(){
  1005. this.state.RowData.addcreateTime = undefined;
  1006. this.state.addresult = '';
  1007. this.state.addremarks = undefined;
  1008. },
  1009. searchSwitch() {
  1010. this.setState({
  1011. searchMore: !this.state.searchMore
  1012. });
  1013. },
  1014. render() {
  1015. const rowSelection = {
  1016. selectedRowKeys: this.state.selectedRowKeys,
  1017. onChange: (selectedRowKeys, selectedRows) => {
  1018. this.setState({
  1019. selectedRows: selectedRows.slice(-1),
  1020. selectedRowKeys: selectedRowKeys.slice(-1)
  1021. });
  1022. }
  1023. };
  1024. const materowSelection = {
  1025. selectedRowKeys: this.state.mateselectedRowKeys,
  1026. onChange: (mateselectedRowKeys, mateselectedRows) => {
  1027. this.setState({
  1028. mateselectedRows: mateselectedRows.slice(-1),
  1029. mateselectedRowKeys: mateselectedRowKeys.slice(-1)
  1030. });
  1031. }
  1032. };
  1033. const hasSelected = this.state.selectedRowKeys.length > 0;
  1034. const matehasSelected= this.state.mateselectedRowKeys.length > 0;
  1035. const { RangePicker } = DatePicker;
  1036. const FormItem = Form.Item
  1037. return (
  1038. <div className="user-content" >
  1039. <div className="content-title">
  1040. <span>我的科技需求</span>
  1041. <div className="patent-addNew clearfix">
  1042. <Upload
  1043. action={globalConfig.context + "/api/admin/demand/uploadTemplate"}
  1044. data={{ 'sign': 'demand_template' }}
  1045. beforeUpload={beforeUploadFile}
  1046. showUploadList={false}
  1047. onChange={(info) => {
  1048. if (info.file.status !== 'uploading') {
  1049. console.log(info.file, info.fileList);
  1050. }
  1051. if (info.file.status === 'done') {
  1052. if (!info.file.response.error.length) {
  1053. message.success(`${info.file.name} 文件上传成功!`);
  1054. } else {
  1055. message.warning(info.file.response.error[0].message);
  1056. return;
  1057. };
  1058. } else if (info.file.status === 'error') {
  1059. message.error(`${info.file.name} 文件上传失败。`);
  1060. };
  1061. }} >
  1062. <Button>上传批量导入模板</Button>
  1063. </Upload>
  1064. <Button onClick={() => { window.open(globalConfig.context + '/api/admin/demand/downloadTemplate?sign=demand_template') }}>下载批量导入模板</Button>
  1065. <Button type="primary" className="addButton" onClick={this.addClick}>新增需求<Icon type="plus" /></Button>
  1066. <BatchImport closeDesc={this.closeDesc} />
  1067. </div>
  1068. </div>
  1069. <div className="user-search">
  1070. <Input placeholder="需求编号"
  1071. value={this.state.serialNumber}
  1072. onChange={(e) => { this.setState({ serialNumber: e.target.value }); }} />
  1073. <Input placeholder="需求名称"
  1074. value={this.state.name}
  1075. onChange={(e) => { this.setState({ name: e.target.value }); }} />
  1076. <Input placeholder="关键字"
  1077. value={this.state.keyword}
  1078. onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
  1079. <Input placeholder="需求雇主名称"
  1080. value={this.state.employerName}
  1081. onChange={(e) => { this.setState({ employerName: e.target.value }); }} />
  1082. <Radio.Group value={this.state.searchType} onChange={(e) => {
  1083. this.setState({ searchType: e.target.value })
  1084. }}>
  1085. <Radio value={0}>认证用户</Radio>
  1086. <Radio value={1}>非认证用户</Radio>
  1087. </Radio.Group>
  1088. <Button type="primary" onClick={this.search}>搜索</Button>
  1089. <Button onClick={this.reset}>重置</Button>
  1090. <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
  1091. disabled={!hasSelected}
  1092. onClick={this.delectRow}>删除<Icon type="minus" /></Button>
  1093. <Button type="primary"
  1094. disabled={!hasSelected}
  1095. onClick={this.mate}>匹配跟进<Icon type="minus" /></Button>
  1096. <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
  1097. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1098. <Radio.Group value={this.state.boutique} onChange={(e) => {
  1099. this.setState({ boutique: e.target.value })
  1100. }}>
  1101. <Radio value={1}>精品</Radio>
  1102. <Radio value={0}>非精品</Radio>
  1103. </Radio.Group>
  1104. <Select placeholder="选择信息来源" style={{ width: 120 }}
  1105. value={this.state.infoSources}
  1106. onChange={(e) => { this.setState({ infoSources: e }) }}>
  1107. <Select.Option value="0" >平台采集</Select.Option>
  1108. <Select.Option value="1" >客户发布</Select.Option>
  1109. <Select.Option value="2" >批量导入</Select.Option>
  1110. <Select.Option value="3" >三方对接</Select.Option>
  1111. </Select>
  1112. <Select placeholder="选择需求类型"
  1113. style={{ width: 120 }}
  1114. value={this.state.demandType}
  1115. onChange={(e) => { this.setState({ demandType: e }) }}>
  1116. {this.state.demandTypeOption}
  1117. </Select>
  1118. <Select placeholder="选择需求状态" style={{ width: 120 }}
  1119. value={this.state.status}
  1120. onChange={(e) => { this.setState({ status: e }) }}>
  1121. <Select.Option value="0" >进行中</Select.Option>
  1122. <Select.Option value="1" >未解决</Select.Option>
  1123. <Select.Option value="2" >已解决</Select.Option>
  1124. </Select>
  1125. <Select placeholder="选择审核状态" style={{ width: 160 }}
  1126. value={this.state.auditStatus}
  1127. onChange={(e) => { this.setState({ auditStatus: e }) }}>
  1128. <Select.Option value="0" >未提交审核(草稿)</Select.Option>
  1129. <Select.Option value="1" >提交审核</Select.Option>
  1130. <Select.Option value="2" >审核中</Select.Option>
  1131. <Select.Option value="3" >审核通过</Select.Option>
  1132. <Select.Option value="4" >审核未通过</Select.Option>
  1133. </Select>
  1134. <Select placeholder="选择是否发布" style={{ width: 120 }}
  1135. value={this.state.releaseStatus}
  1136. onChange={(e) => { this.setState({ releaseStatus: e }) }}>
  1137. <Select.Option value="0" >未发布</Select.Option>
  1138. <Select.Option value="1" >已发布</Select.Option>
  1139. </Select>
  1140. <Select placeholder="选择需求类别" style={{ width: 120 }}
  1141. value={this.state.dataCategory}
  1142. onChange={(e) => { this.setState({ dataCategory: e }) }}>
  1143. <Select.Option value="0" >个人</Select.Option>
  1144. <Select.Option value="1" >组织</Select.Option>
  1145. </Select>
  1146. <div style={{ marginTop: '10px' }}>
  1147. <span style={{ marginLeft: '10px' }}>有效期限 : </span>
  1148. <RangePicker
  1149. value={[this.state.validityPeriodDate[0] ? moment(this.state.validityPeriodDate[0]) : null,
  1150. this.state.validityPeriodDate[1] ? moment(this.state.validityPeriodDate[1]) : null]}
  1151. onChange={(data, dataString) => { this.setState({ validityPeriodDate: dataString }); }} />
  1152. <span style={{ marginLeft: '10px' }}>发布时间 : </span>
  1153. <RangePicker
  1154. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1155. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1156. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1157. <span style={{ marginLeft: '10px' }}>录入时间 : </span>
  1158. <RangePicker
  1159. value={[this.state.releaseDateS[0] ? moment(this.state.releaseDateS[0]) : null,
  1160. this.state.releaseDateS[1] ? moment(this.state.releaseDateS[1]) : null]}
  1161. onChange={(data, dataString) => { this.setState({ releaseDateS: dataString }); }} />
  1162. </div>
  1163. </div>
  1164. </div>
  1165. <div className="patent-table">
  1166. <Spin spinning={this.state.loading}>
  1167. <Table columns={this.state.columns}
  1168. dataSource={this.state.dataSource}
  1169. rowSelection={rowSelection}
  1170. pagination={this.state.pagination}
  1171. onRowClick={this.tableRowClick} />
  1172. </Spin>
  1173. </div>
  1174. <div className="patent-desc">
  1175. <Modal maskClosable={false} visible={this.state.matevisible}
  1176. onOk={this.checkPatentProcess} onCancel={this.mateNo}
  1177. width='1000px'
  1178. title='匹配跟进'
  1179. footer=''
  1180. className="admin-desc-content">
  1181. <Form horizontal id="add-form">
  1182. <Spin spinning={this.state.loading}>
  1183. <div className="clearfix" >
  1184. <Button className="ContactsList" type="primary" onClick={this.addmate} style={{float:'left',marginBottom:'10px',marginRight:'20px'}}>新增</Button>
  1185. <Button className="ContactsList" type="primary" onClick={this.addmate1} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>添加跟进情况</Button>
  1186. <Button className="ContactsList" type="primary" onClick={this.lookmate} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>查看跟进情况</Button>
  1187. <Button className="ContactsList" onClick={this.delect} style={{float:'left',marginBottom:'10px',marginRight:'20px'}} disabled={!matehasSelected}>删除</Button>
  1188. <Button type="primary" onClick={this.tabExel} style={{'display':'none'}}>导出到表格</Button>
  1189. </div>
  1190. <div className="clearfix" >
  1191. <Spin spinning={this.state.loading}>
  1192. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  1193. <Table
  1194. pagination={this.state.matepagination}
  1195. columns={this.state.mateColumns}
  1196. dataSource={this.state.mateDataSource}
  1197. rowSelection={materowSelection}
  1198. onRowClick={this.mateTableRowClick}
  1199. />
  1200. </Form>
  1201. </Spin>
  1202. </div>
  1203. <div className="clearfix" id='daochu' style={{'display':'none'}}>
  1204. <Spin spinning={this.state.loading}>
  1205. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  1206. <Table
  1207. pagination={this.state.matepagination}
  1208. columns={this.state.mateColumnsExport}
  1209. dataSource={this.state.mateDataSource}
  1210. rowSelection={materowSelection}
  1211. onRowClick={this.mateTableRowClick}
  1212. />
  1213. </Form>
  1214. </Spin>
  1215. </div>
  1216. </Spin>
  1217. </Form >
  1218. </Modal>
  1219. </div>
  1220. <div className="patent-desc">
  1221. <Modal maskClosable={false} visible={this.state.addmatevisible}
  1222. onOk={this.checkPatentProcess} onCancel={this.addmateNo}
  1223. width='1000px'
  1224. title='新增匹配跟进'
  1225. footer=''
  1226. className="admin-desc-content">
  1227. <Form horizontal onSubmit={this.addmateSubmit} id="add-form">
  1228. <Spin spinning={this.state.loading}>
  1229. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1230. <FormItem className="half-item"
  1231. labelCol={{ span: 6 }}
  1232. wrapperCol={{ span: 12 }}
  1233. label="录入人:" >
  1234. <span>{this.state.adminName}</span>
  1235. </FormItem>
  1236. <FormItem className="half-item"
  1237. labelCol={{ span: 6 }}
  1238. wrapperCol={{ span: 12 }}
  1239. label="录入时间:" >
  1240. <span>{this.state.createTimeFormattedDate}</span>
  1241. </FormItem>
  1242. </div>
  1243. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1244. <FormItem className="half-item"
  1245. labelCol={{ span: 6 }}
  1246. wrapperCol={{ span: 12 }}
  1247. label="企业名称:" >
  1248. <span>{this.state.employerName}</span>
  1249. </FormItem>
  1250. <FormItem className="half-item"
  1251. labelCol={{ span: 6 }}
  1252. wrapperCol={{ span: 12 }}
  1253. label="需求名称:" >
  1254. <span>{this.state.name}</span>
  1255. </FormItem>
  1256. </div>
  1257. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1258. <FormItem className="half-item"
  1259. labelCol={{ span: 6 }}
  1260. wrapperCol={{ span: 12 }}
  1261. label="联系人联络方式:" >
  1262. <span>{this.state.employerContactsMobile}</span>
  1263. </FormItem>
  1264. <FormItem className="half-item"
  1265. labelCol={{ span: 6 }}
  1266. wrapperCol={{ span: 12 }}
  1267. label="联系人邮箱:" >
  1268. <span>{this.state.employerContactsMailbox}</span>
  1269. </FormItem>
  1270. </div>
  1271. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1272. <FormItem className="half-item"
  1273. labelCol={{ span: 6 }}
  1274. wrapperCol={{ span: 12 }}
  1275. label="匹配机构:" >
  1276. <Input placeholder="机构名称" value={this.state.mateOrganization} style={{width:'94%'}}
  1277. onChange={(e)=>{this.setState({mateOrganization:e.target.value})}} required="required"/>
  1278. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1279. </FormItem>
  1280. <FormItem className="half-item"
  1281. labelCol={{ span: 6 }}
  1282. wrapperCol={{ span: 12 }}
  1283. label="匹配来源:"
  1284. >
  1285. <Input placeholder="匹配来源" value={this.state.mateSources} style={{width:'94%'}}
  1286. onChange={(e)=>{this.setState({mateSources:e.target.value})}} />
  1287. </FormItem>
  1288. </div>
  1289. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1290. <FormItem className="half-item"
  1291. labelCol={{ span: 6 }}
  1292. wrapperCol={{ span: 12 }}
  1293. label="成果联系人:" >
  1294. <Input placeholder="联系人名称" value={this.state.mateContacts} style={{width:'94%'}}
  1295. onChange={(e)=>{this.setState({mateContacts:e.target.value})}} required="required"/>
  1296. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1297. </FormItem>
  1298. <FormItem className="half-item"
  1299. labelCol={{ span: 6 }}
  1300. wrapperCol={{ span: 12 }}
  1301. label="成果方联系方式:"
  1302. >
  1303. <Input placeholder="联系方式" value={this.state.mateContactMobile} style={{width:'94%'}}
  1304. onChange={(e)=>{this.setState({mateContactMobile:e.target.value})}} required="required"/>
  1305. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1306. </FormItem>
  1307. </div>
  1308. <div className="clearfix">
  1309. <FormItem
  1310. labelCol={{ span: 4 }}
  1311. wrapperCol={{ span: 18 }}
  1312. label="备注:" >
  1313. <Input type="textarea" rows={4} placeholder="匹配情况备注" value={this.state.mateRemark}
  1314. onChange={(e) => { this.setState({ mateRemark: e.target.value }) }} style={{width:'95%'}}/>
  1315. </FormItem>
  1316. </div>
  1317. <div className="clearfix">
  1318. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'190px',marginBottom:'20px'}}>保存</Button>
  1319. <Button className="set-submit" type="ghost" onClick={this.addmateNo} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>
  1320. </div>
  1321. </Spin>
  1322. </Form >
  1323. </Modal>
  1324. </div>
  1325. <div className="patent-desc">
  1326. <Modal maskClosable={false} visible={this.state.addmatevisibles}
  1327. onOk={this.checkPatentProcess} onCancel={this.addmateNos}
  1328. width='1000px'
  1329. title='匹配跟进详情'
  1330. footer=''
  1331. className="admin-desc-content">
  1332. <Form horizontal onSubmit={this.addmateSubmits} id="add-form">
  1333. <Spin spinning={this.state.loading}>
  1334. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1335. <FormItem className="half-item"
  1336. labelCol={{ span: 6 }}
  1337. wrapperCol={{ span: 12 }}
  1338. label="录入人:" >
  1339. <span>{this.state.adminName}</span>
  1340. </FormItem>
  1341. <FormItem className="half-item"
  1342. labelCol={{ span: 6 }}
  1343. wrapperCol={{ span: 12 }}
  1344. label="录入时间:" >
  1345. <span>{this.state.createTimeFormattedDate}</span>
  1346. </FormItem>
  1347. </div>
  1348. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1349. <FormItem className="half-item"
  1350. labelCol={{ span: 6 }}
  1351. wrapperCol={{ span: 12 }}
  1352. label="企业名称:" >
  1353. <span>{this.state.employerName}</span>
  1354. </FormItem>
  1355. <FormItem className="half-item"
  1356. labelCol={{ span: 6 }}
  1357. wrapperCol={{ span: 12 }}
  1358. label="需求名称:" >
  1359. <span>{this.state.name}</span>
  1360. </FormItem>
  1361. </div>
  1362. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1363. <FormItem className="half-item"
  1364. labelCol={{ span: 6 }}
  1365. wrapperCol={{ span: 12 }}
  1366. label="联系人联络方式:" >
  1367. <span>{this.state.employerContactsMobile}</span>
  1368. </FormItem>
  1369. <FormItem className="half-item"
  1370. labelCol={{ span: 6 }}
  1371. wrapperCol={{ span: 12 }}
  1372. label="联系人邮箱:" >
  1373. <span>{this.state.employerContactsMailbox}</span>
  1374. </FormItem>
  1375. </div>
  1376. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1377. <FormItem className="half-item"
  1378. labelCol={{ span: 6 }}
  1379. wrapperCol={{ span: 12 }}
  1380. label="匹配机构:" >
  1381. <Input placeholder="机构名称" value={this.state.mateOrganization} style={{width:'94%'}}
  1382. onChange={(e)=>{this.setState({mateOrganization:e.target.value})}} required="required"/>
  1383. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1384. </FormItem>
  1385. <FormItem className="half-item"
  1386. labelCol={{ span: 6 }}
  1387. wrapperCol={{ span: 12 }}
  1388. label="匹配来源:"
  1389. >
  1390. <Input placeholder="匹配来源" value={this.state.mateSources} style={{width:'94%'}}
  1391. onChange={(e)=>{this.setState({mateSources:e.target.value})}} />
  1392. </FormItem>
  1393. </div>
  1394. <div className="clearfix" style={{paddingLeft:'60px'}}>
  1395. <FormItem className="half-item"
  1396. labelCol={{ span: 6 }}
  1397. wrapperCol={{ span: 12 }}
  1398. label="成果联系人:" >
  1399. <Input placeholder="联系人名称" value={this.state.mateContacts} style={{width:'94%'}}
  1400. onChange={(e)=>{this.setState({mateContacts:e.target.value})}} required="required"/>
  1401. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1402. </FormItem>
  1403. <FormItem className="half-item"
  1404. labelCol={{ span: 6 }}
  1405. wrapperCol={{ span: 12 }}
  1406. label="成果方联系方式:"
  1407. >
  1408. <Input placeholder="联系方式" value={this.state.mateContactMobile} style={{width:'94%'}}
  1409. onChange={(e)=>{this.setState({mateContactMobile:e.target.value})}} required="required"/>
  1410. <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
  1411. </FormItem>
  1412. </div>
  1413. <div className="clearfix">
  1414. <FormItem
  1415. labelCol={{ span: 4 }}
  1416. wrapperCol={{ span: 18 }}
  1417. label="备注:" >
  1418. <Input type="textarea" rows={4} placeholder="匹配情况备注" value={this.state.mateRemark}
  1419. onChange={(e) => { this.setState({ mateRemark: e.target.value }) }} style={{width:'95%'}}/>
  1420. </FormItem>
  1421. </div>
  1422. <div className="clearfix">
  1423. <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'190px',marginBottom:'20px'}}>保存</Button>
  1424. <Button className="set-submit" type="ghost" onClick={this.addmateNos} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>
  1425. </div>
  1426. </Spin>
  1427. </Form >
  1428. </Modal>
  1429. </div>
  1430. <div className="patent-desc">
  1431. <Modal maskClosable={false} visible={this.state.addmatevisible1}
  1432. onOk={this.checkPatentProcess} onCancel={this.addmateNo1}
  1433. width='600px'
  1434. title='跟进情况添加'
  1435. footer=''
  1436. className="admin-desc-content">
  1437. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1438. <Spin spinning={this.state.loading}>
  1439. <div className="clearfix">
  1440. <FormItem
  1441. labelCol={{ span: 5 }}
  1442. wrapperCol={{ span: 16 }}
  1443. label="跟进时间" >
  1444. <DatePicker
  1445. style={{'width':'95%'}}
  1446. format="YYYY-MM-DD"
  1447. placeholder="选择跟进时间"
  1448. value={this.state.RowData.addcreateTime ? moment(this.state.RowData.addcreateTime, "YYYY-MM-DD") : undefined}
  1449. onChange={(t, str) => {
  1450. this.state.RowData.addcreateTime = str;
  1451. this.setState({ RowData: this.state.RowData});
  1452. }} />
  1453. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1454. </FormItem>
  1455. </div>
  1456. <div className="clearfix">
  1457. <FormItem
  1458. labelCol={{ span: 5 }}
  1459. wrapperCol={{ span: 16 }}
  1460. label="跟进结果"
  1461. >
  1462. <Select placeholder="请选择跟进结果"
  1463. value={this.state.addresult}
  1464. style={{'width':'95%'}}
  1465. onChange={(e) => { this.setState({ addresult: e }) }}>
  1466. <Select.Option value="0" >跟进中</Select.Option>
  1467. <Select.Option value="1" >已匹配</Select.Option>
  1468. </Select>
  1469. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1470. </FormItem>
  1471. </div>
  1472. <div className="clearfix">
  1473. <FormItem
  1474. labelCol={{ span: 5 }}
  1475. wrapperCol={{ span: 16 }}
  1476. label="跟进情况" >
  1477. <Input type="textarea" rows={4} placeholder="跟进情况记录" value={this.state.addremarks}
  1478. onChange={(e) => { this.setState({ addremarks: e.target.value }) }} style={{width:'95%'}}/>
  1479. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  1480. </FormItem>
  1481. </div>
  1482. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1483. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1484. <Button className="set-submit" type="ghost" onClick={this.addmateNo1} style={{marginLeft:'100px'}}>取消</Button>
  1485. </FormItem>
  1486. </Spin>
  1487. </Form >
  1488. </Modal>
  1489. </div>
  1490. <div className="patent-desc">
  1491. <Modal maskClosable={false} visible={this.state.lookvisible}
  1492. onOk={this.checkPatentProcess} onCancel={this.lookmateNo}
  1493. width='600px'
  1494. title='跟进情况列表'
  1495. footer=''
  1496. className="admin-desc-content">
  1497. <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
  1498. <Spin spinning={this.state.loading}>
  1499. <div className="clearfix">
  1500. <Form horizontal id="demand-form" onSubmit={this.contactSave} >
  1501. <Table
  1502. pagination={this.state.lookpagination}
  1503. columns={this.state.lookColumns}
  1504. dataSource={this.state.lookDataSource}
  1505. rowSelection={rowSelection}
  1506. onRowClick={this.lookTableRowClick}
  1507. />
  1508. </Form>
  1509. </div>
  1510. </Spin>
  1511. </Form >
  1512. </Modal>
  1513. </div>
  1514. <TechDemandDesc
  1515. data={this.state.RowData}
  1516. detailApiUrl={this.props['data-detailApiUrl']}
  1517. companyOption={this.state.companyOption}
  1518. userOption={this.state.userOption}
  1519. demandTypeOption={this.state.demandTypeOption}
  1520. showDesc={this.state.showDesc}
  1521. closeDesc={this.closeDesc} />
  1522. </div >
  1523. );
  1524. }
  1525. });
  1526. export default DemandList;