myTechDemand.jsx 68 KB

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