myTechDemand.jsx 70 KB

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