myTechDemand.jsx 67 KB

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