techDemandDesc.jsx 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347
  1. import React from 'react';
  2. import { Tabs, Table, Icon, Tooltip, Modal, Popover, message, Spin, Upload, Input, InputNumber, Select, DatePicker, Button, Radio, Form, Cascader, Tag } from 'antd';
  3. import moment from 'moment';
  4. import './techDemand.less';
  5. import ajax from 'jquery/src/ajax/xhr.js';
  6. import $ from 'jquery/src/ajax';
  7. import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
  8. import { beforeUploadFile, splitUrl, companySearch, getTechField, getDemandType, getAchievementCategory } from '../../tools.js';
  9. const KeyWordTagGroup = React.createClass({
  10. getInitialState() {
  11. return {
  12. tags: [],
  13. inputVisible: false,
  14. inputValue: ''
  15. };
  16. },
  17. handleClose(removedTag) {
  18. const tags = this.state.tags.filter(tag => tag !== removedTag);
  19. this.props.tagsArr(tags);
  20. this.setState({ tags });
  21. },
  22. showInput() {
  23. this.setState({ inputVisible: true }, () => this.input.focus());
  24. },
  25. handleInputChange(e) {
  26. this.setState({ inputValue: e.target.value });
  27. },
  28. handleInputConfirm() {
  29. const state = this.state;
  30. const inputValue = state.inputValue;
  31. let tags = state.tags;
  32. if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
  33. tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
  34. }
  35. this.props.tagsArr(tags);
  36. this.setState({
  37. tags,
  38. inputVisible: false,
  39. inputValue: '',
  40. });
  41. },
  42. componentWillMount() {
  43. this.state.tags = this.props.keyWordArr;
  44. },
  45. componentWillReceiveProps(nextProps) {
  46. if (this.props.keyWordArr != nextProps.keyWordArr) {
  47. this.state.tags = nextProps.keyWordArr;
  48. };
  49. },
  50. render() {
  51. const { tags, inputVisible, inputValue } = this.state;
  52. return (
  53. <div className="keyWord-tips">
  54. {tags.map((tag, index) => {
  55. const isLongTag = tag.length > 10;
  56. const tagElem = (
  57. <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
  58. {isLongTag ? `${tag.slice(0, 10)}...` : tag}
  59. </Tag>
  60. );
  61. return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
  62. })}
  63. {inputVisible && (
  64. <Input
  65. ref={input => this.input = input}
  66. type="text"
  67. style={{ width: 78 }}
  68. value={inputValue}
  69. onChange={this.handleInputChange}
  70. onBlur={this.handleInputConfirm}
  71. onPressEnter={this.handleInputConfirm}
  72. />
  73. )}
  74. {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
  75. </div>
  76. );
  77. }
  78. });
  79. const PicturesWall = React.createClass({
  80. getInitialState() {
  81. return {
  82. previewVisible: false,
  83. previewImage: '',
  84. fileList: [],
  85. }
  86. },
  87. handleCancel() {
  88. this.setState({ previewVisible: false })
  89. },
  90. handlePreview(file) {
  91. this.setState({
  92. previewImage: file.url || file.thumbUrl,
  93. previewVisible: true,
  94. });
  95. },
  96. handleChange(info) {
  97. let fileList = info.fileList;
  98. this.setState({ fileList });
  99. this.props.fileList(fileList);
  100. },
  101. componentWillReceiveProps(nextProps) {
  102. this.state.fileList = nextProps.pictureUrl;
  103. },
  104. render() {
  105. const { previewVisible, previewImage, fileList } = this.state;
  106. const uploadButton = (
  107. <div>
  108. <Icon type="plus" />
  109. <div className="ant-upload-text">点击上传</div>
  110. </div>
  111. );
  112. return (
  113. <div className="clearfix">
  114. <Upload
  115. action={globalConfig.context + "/api/admin/demand/uploadPicture"}
  116. data={{ 'sign': 'demand_picture', 'uid': this.props.uid }}
  117. listType="picture-card"
  118. fileList={fileList}
  119. onPreview={this.handlePreview}
  120. onChange={this.handleChange} >
  121. {fileList.length >= 5 ? null : uploadButton}
  122. </Upload>
  123. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  124. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  125. </Modal>
  126. </div>
  127. );
  128. }
  129. });
  130. const DemandDetailShow = Form.create()(React.createClass({
  131. getInitialState() {
  132. return {
  133. visible: false,
  134. loading: false,
  135. contactsObj: {},
  136. salesmanObj: {},
  137. pictureUrl: [],
  138. tags: []
  139. };
  140. },
  141. loadData(id, detailApiUrl) {
  142. this.setState({
  143. loading: true
  144. });
  145. $.ajax({
  146. method: "get",
  147. dataType: "json",
  148. crossDomain: false,
  149. url: globalConfig.context + detailApiUrl,
  150. data: {
  151. id: id
  152. },
  153. success: function (data) {
  154. let thisData = data.data;
  155. if (!thisData) {
  156. if (data.error && data.error.length) {
  157. message.warning(data.error[0].message);
  158. };
  159. thisData = {};
  160. };
  161. let d = new Date()
  162. if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
  163. d.setMonth(thisData.dateOfBirthMonth - 1);
  164. d.setYear(parseInt(thisData.dateOfBirthYear));
  165. };
  166. this.setState({
  167. data: thisData,
  168. tags: thisData.keyword ? thisData.keyword.split(",") : [],
  169. pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
  170. });
  171. }.bind(this),
  172. }).always(function () {
  173. this.setState({
  174. loading: false
  175. });
  176. }.bind(this));
  177. },
  178. getContactsList(theUid) {
  179. $.ajax({
  180. method: "get",
  181. dataType: "json",
  182. crossDomain: false,
  183. url: globalConfig.context + "/api/admin/getContacts",
  184. data: {
  185. uid: theUid
  186. },
  187. success: function (data) {
  188. let theOption = [];
  189. if (!data.data) {
  190. if (data.error && data.error.length) {
  191. message.warning(data.error[0].message);
  192. return;
  193. };
  194. };
  195. for (let item in data.data) {
  196. let theData = data.data[item];
  197. theOption.push(
  198. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  199. );
  200. };
  201. this.setState({
  202. contactsOption: theOption,
  203. contactsObj: data.data
  204. });
  205. }.bind(this),
  206. });
  207. },
  208. offShelf() {
  209. this.setState({
  210. loading: true
  211. });
  212. $.ajax({
  213. method: "post",
  214. dataType: "json",
  215. crossDomain: false,
  216. url: globalConfig.context + "/api/admin/demand/offShelf",
  217. data: { "id": this.props.data.id }
  218. }).done(function (data) {
  219. if (!data.error.length) {
  220. message.success('撤销成功!');
  221. this.setState({
  222. visible: false,
  223. releaseSubmitVisible: false
  224. });
  225. this.props.handleOk();
  226. } else {
  227. message.warning(data.error[0].message);
  228. }
  229. }.bind(this));
  230. },
  231. formSubmit() {
  232. this.props.form.validateFields((err, values) => {
  233. if (values.auditStatus == 3 && !values.techBroderId) {
  234. message.warning('必须选择一个技术经纪人!');
  235. return
  236. };
  237. if (!err) {
  238. this.setState({
  239. loading: true
  240. });
  241. $.ajax({
  242. method: "POST",
  243. dataType: "json",
  244. crossDomain: false,
  245. url: globalConfig.context + '/api/admin/audit/demand',
  246. data: {
  247. id: this.props.data.id,
  248. techBroderId: values.techBroderId,
  249. auditStatus: values.auditStatus
  250. }
  251. }).done(function (data) {
  252. this.state.auditStatus = 0;
  253. if (!data.error.length) {
  254. message.success('保存成功!');
  255. this.setState({
  256. visible: false,
  257. formSubmitVisible: false
  258. });
  259. this.props.handleOk();
  260. } else {
  261. message.warning(data.error[0].message);
  262. }
  263. }.bind(this));
  264. }
  265. });
  266. },
  267. handleSubmit(e) {
  268. e.preventDefault();
  269. this.props.form.validateFields((err, values) => {
  270. if (values.auditStatus == 4) {
  271. this.setState({
  272. formSubmitVisible: true
  273. });
  274. } else {
  275. this.formSubmit();
  276. };
  277. });
  278. },
  279. buildMatchList() {
  280. this.setState({
  281. buttonLoading: true
  282. });
  283. $.ajax({
  284. method: "POST",
  285. dataType: "json",
  286. crossDomain: false,
  287. url: globalConfig.context + '/api/admin/demand/matchAchievement',
  288. data: {
  289. id: this.props.data.id,
  290. }
  291. }).done(function (data) {
  292. this.setState({
  293. buttonLoading: false
  294. });
  295. if (!data.error.length) {
  296. message.success('匹配完成!匹配到' + data.data + '条记录');
  297. } else {
  298. message.warning(data.error[0].message);
  299. };
  300. }.bind(this));
  301. },
  302. componentWillMount() {
  303. if (this.props.data.id) {
  304. this.loadData(this.props.data.id, this.props.detailApiUrl);
  305. if (this.props.data.employerId && this.props.detailApiUrl.indexOf('org') >= 0) {
  306. this.getContactsList(this.props.data.employerId)
  307. };
  308. } else {
  309. this.state.data = {};
  310. };
  311. },
  312. componentWillReceiveProps(nextProps) {
  313. if (!this.props.visible && nextProps.visible) {
  314. if (nextProps.data.id) {
  315. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  316. if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
  317. this.getContactsList(nextProps.data.employerId)
  318. };
  319. } else {
  320. this.state.data = {};
  321. };
  322. this.props.form.resetFields();
  323. };
  324. },
  325. render() {
  326. const theData = this.state.data || {};
  327. const { getFieldDecorator } = this.props.form;
  328. const FormItem = Form.Item
  329. const formItemLayout = {
  330. labelCol: { span: 6 },
  331. wrapperCol: { span: 12 },
  332. };
  333. return (
  334. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  335. <Spin spinning={this.state.loading}>
  336. <div className="clearfix">
  337. <FormItem className="half-item"
  338. {...formItemLayout}
  339. label="编号" >
  340. <span>{theData.serialNumber}</span>
  341. </FormItem>
  342. <FormItem className="half-item"
  343. {...formItemLayout}
  344. label="需求名称" >
  345. <span>{theData.name}</span>
  346. </FormItem>
  347. <FormItem className="half-item"
  348. {...formItemLayout}
  349. label="雇主名称" >
  350. <span>{theData.username}</span>
  351. </FormItem>
  352. <FormItem className="half-item"
  353. {...formItemLayout}
  354. label="联系人" >
  355. <span>{this.state.contactsObj[theData.contacts]}</span>
  356. </FormItem>
  357. <FormItem className="half-item"
  358. {...formItemLayout}
  359. label="负责人" >
  360. <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
  361. </FormItem>
  362. </div>
  363. <div className="clearfix">
  364. <FormItem className="half-item"
  365. {...formItemLayout}
  366. label="是否发布" >
  367. {(() => {
  368. switch (theData.releaseStatus) {
  369. case "0":
  370. return <span>未发布</span>;
  371. case "1":
  372. return <div>
  373. <span>已发布</span>
  374. <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
  375. <Modal maskClosable={false} title="确认"
  376. visible={this.state.releaseSubmitVisible}
  377. width='300px'
  378. footer={null}
  379. onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
  380. <span>确认要撤销发布吗?</span>
  381. <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
  382. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
  383. </Modal>
  384. </div>;
  385. }
  386. })()}
  387. </FormItem>
  388. <FormItem className="half-item"
  389. {...formItemLayout}
  390. label="发布时间" >
  391. <span>{theData.releaseDateFormattedDate}</span>
  392. </FormItem>
  393. </div>
  394. <div className="clearfix">
  395. <FormItem className="half-item"
  396. {...formItemLayout}
  397. label="需求状态" >
  398. {(() => {
  399. switch (theData.status) {
  400. case "0":
  401. return <span>未解决</span>;
  402. case "1":
  403. return <span>已解决</span>;
  404. }
  405. })()}
  406. </FormItem>
  407. <FormItem className="half-item"
  408. {...formItemLayout}
  409. label="审核状态" >
  410. {(() => {
  411. switch (theData.auditStatus) {
  412. case "0":
  413. return <span>未提交审核(草稿)</span>;
  414. case "1":
  415. return <span>提交审核</span>;
  416. case "2":
  417. return <span>审核中</span>;
  418. case "3":
  419. return <span>审核通过</span>;
  420. case "4":
  421. return <span>审核未通过</span>;
  422. }
  423. })()}
  424. </FormItem>
  425. </div>
  426. <div className="clearfix">
  427. <FormItem className="half-item"
  428. {...formItemLayout}
  429. label="信息来源" >
  430. {(() => {
  431. switch (theData.infoSources) {
  432. case "0":
  433. return <span>平台采集</span>;
  434. case "1":
  435. return <span>客户发布</span>;
  436. case "2":
  437. return <span>批量导入</span>;
  438. case "3":
  439. return <span>三方对接</span>;
  440. }
  441. })()}
  442. </FormItem>
  443. </div>
  444. <FormItem
  445. labelCol={{ span: 3 }}
  446. wrapperCol={{ span: 20 }}
  447. label="关键词" >
  448. {this.state.tags.map((tag) => {
  449. return <Tooltip key={tag} title={tag}>
  450. <Tag key={tag}>{tag}</Tag>
  451. </Tooltip>;
  452. })}
  453. </FormItem>
  454. <FormItem
  455. labelCol={{ span: 3 }}
  456. wrapperCol={{ span: 18 }}
  457. label="行业类别" >
  458. <span>{getIndustryCategory(theData.industryCategoryA, theData.industryCategoryB)}</span>
  459. </FormItem>
  460. <div className="clearfix">
  461. <FormItem className="half-item"
  462. {...formItemLayout}
  463. label="需求类型" >
  464. <span>{getDemandType(theData.demandType)}</span>
  465. </FormItem>
  466. </div>
  467. <FormItem
  468. labelCol={{ span: 3 }}
  469. wrapperCol={{ span: 18 }}
  470. label="问题说明" >
  471. <span>{theData.problemDes}</span>
  472. </FormItem>
  473. <FormItem
  474. labelCol={{ span: 3 }}
  475. wrapperCol={{ span: 18 }}
  476. label="技术指标要求" >
  477. <span>{theData.technicalRequirements}</span>
  478. </FormItem>
  479. <FormItem
  480. labelCol={{ span: 3 }}
  481. wrapperCol={{ span: 18 }}
  482. label="需求文件(图片)" >
  483. <div className="clearfix">
  484. <Upload className="demandDetailShow-upload"
  485. listType="picture-card"
  486. fileList={this.state.pictureUrl}
  487. onPreview={(file) => {
  488. this.setState({
  489. previewImage: file.url || file.thumbUrl,
  490. previewVisible: true,
  491. });
  492. }} >
  493. </Upload>
  494. <Modal maskClosable={false} footer={null}
  495. visible={this.state.previewVisible}
  496. onCancel={() => { this.setState({ previewVisible: false }) }}>
  497. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  498. </Modal>
  499. </div>
  500. </FormItem>
  501. <FormItem
  502. labelCol={{ span: 3 }}
  503. wrapperCol={{ span: 6 }}
  504. label="需求文件(文本)" >
  505. <div>{theData.textFileUrl ?
  506. <span className="download-file">
  507. <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
  508. </span>
  509. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</div>
  510. </FormItem>
  511. <FormItem
  512. labelCol={{ span: 3 }}
  513. wrapperCol={{ span: 18 }}
  514. label="需求文件(视频地址)" >
  515. <span>{theData.videoUrl}</span>
  516. </FormItem>
  517. <div className="clearfix">
  518. <FormItem className="half-item"
  519. {...formItemLayout}
  520. label="固定周期" >
  521. <span>{theData.fixedCycle}</span>
  522. </FormItem>
  523. <FormItem className="half-item"
  524. {...formItemLayout}
  525. label="固定人数" >
  526. <span>{theData.peopleNumber} 人</span>
  527. </FormItem>
  528. </div>
  529. <FormItem
  530. labelCol={{ span: 3 }}
  531. wrapperCol={{ span: 18 }}
  532. label="固定方案" >
  533. <span>{theData.fixedScheme}</span>
  534. </FormItem>
  535. <div className="clearfix">
  536. <FormItem className="half-item"
  537. {...formItemLayout}
  538. label="预算费用" >
  539. <span>{theData.budgetCost} 万元</span>
  540. </FormItem>
  541. <FormItem className="half-item"
  542. {...formItemLayout}
  543. label="费用托管" >
  544. {(() => {
  545. switch (theData.costEscrow) {
  546. case 0:
  547. return <span>否</span>;
  548. case 1:
  549. return <span>是</span>;
  550. }
  551. })()}
  552. </FormItem>
  553. <FormItem className="half-item"
  554. {...formItemLayout}
  555. label="有效期限" >
  556. <span>{theData.validityPeriodFormattedDate}</span>
  557. </FormItem>
  558. </div>
  559. {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
  560. <FormItem className="half-item"
  561. {...formItemLayout}
  562. label="审核状态" >
  563. {getFieldDecorator('auditStatus')(
  564. <Radio.Group>
  565. <Radio value={3}>审核通过</Radio>
  566. <Radio value={4}>审核未通过</Radio>
  567. </Radio.Group>
  568. )}
  569. </FormItem>
  570. <FormItem className="half-item"
  571. {...formItemLayout}
  572. label="技术经纪人" >
  573. {getFieldDecorator('techBroderId', {
  574. initialValue: theData.techBroderId
  575. })(
  576. <Select style={{ width: 260 }}>
  577. {this.props.techBrodersOption}
  578. </Select>
  579. )}
  580. </FormItem>
  581. </div> : <div></div>}
  582. <FormItem wrapperCol={{ span: 12, offset: 3 }}>
  583. {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
  584. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  585. {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
  586. </FormItem>
  587. <Modal maskClosable={false} title="确认"
  588. visible={this.state.formSubmitVisible}
  589. width='360px'
  590. footer={null}
  591. onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
  592. <span>确认该需求审核未通过?</span>
  593. <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
  594. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
  595. </Modal>
  596. </Spin>
  597. </Form >
  598. )
  599. }
  600. }));
  601. const DemandDetailForm = Form.create()(React.createClass({
  602. getInitialState() {
  603. return {
  604. visible: false,
  605. loading: false,
  606. auditStatus: 0,
  607. textFileList: [],
  608. videoFileList: [],
  609. pictureUrl: [],
  610. tags: []
  611. };
  612. },
  613. loadData(id, detailApiUrl) {
  614. this.setState({
  615. loading: true
  616. });
  617. $.ajax({
  618. method: "get",
  619. dataType: "json",
  620. crossDomain: false,
  621. url: globalConfig.context + detailApiUrl,
  622. data: {
  623. id: id
  624. },
  625. success: function (data) {
  626. let thisData = data.data;
  627. if (!thisData) {
  628. if (data.error && data.error.length) {
  629. message.warning(data.error[0].message);
  630. };
  631. thisData = {};
  632. };
  633. let d = new Date()
  634. if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
  635. d.setMonth(thisData.dateOfBirthMonth - 1);
  636. d.setYear(parseInt(thisData.dateOfBirthYear));
  637. };
  638. this.setState({
  639. data: thisData,
  640. tags: thisData.keyword ? thisData.keyword.split(",") : [],
  641. pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
  642. });
  643. }.bind(this),
  644. }).always(function () {
  645. this.setState({
  646. loading: false
  647. });
  648. }.bind(this));
  649. },
  650. getContactsList(theUid) {
  651. $.ajax({
  652. method: "get",
  653. dataType: "json",
  654. crossDomain: false,
  655. url: globalConfig.context + "/api/admin/getContacts",
  656. data: {
  657. uid: theUid
  658. },
  659. success: function (data) {
  660. let theOption = [];
  661. if (!data.data) {
  662. if (data.error && data.error.length) {
  663. message.warning(data.error[0].message);
  664. return;
  665. };
  666. };
  667. for (let item in data.data) {
  668. let theData = data.data[item];
  669. theOption.push(
  670. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  671. );
  672. };
  673. this.setState({
  674. contactsOption: theOption
  675. });
  676. }.bind(this),
  677. });
  678. },
  679. getTagsArr(e) {
  680. this.setState({ tags: e });
  681. },
  682. getPictureUrl(e) {
  683. this.setState({ pictureUrl: e });
  684. },
  685. handleSubmit(e) {
  686. e.preventDefault();
  687. this.props.form.validateFields((err, values) => {
  688. //keyword长度判断
  689. if (this.state.tags.length < 3) {
  690. message.warning('关键词数量不能小于3个!');
  691. return;
  692. };
  693. //url转化
  694. let thePictureUrl = [];
  695. if (this.state.pictureUrl.length) {
  696. let picArr = [];
  697. this.state.pictureUrl.map(function (item) {
  698. picArr.push(item.response.data);
  699. });
  700. thePictureUrl = picArr.join(",");
  701. };
  702. if (!err) {
  703. this.setState({
  704. loading: true
  705. });
  706. $.ajax({
  707. method: "POST",
  708. dataType: "json",
  709. crossDomain: false,
  710. url: this.props.data.id ? globalConfig.context + '/api/admin/demand/update' : globalConfig.context + '/api/admin/demand/apply',
  711. data: {
  712. id: this.props.data.id,
  713. dataCategory: this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0,
  714. serialNumber: this.props.data.serialNumber,
  715. name: values.name,
  716. keyword: this.state.tags ? this.state.tags.join(",") : [],
  717. keywords: this.state.tags,
  718. infoSources: 0,
  719. industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
  720. industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
  721. demandType: values.demandType,
  722. problemDes: values.problemDes,
  723. technicalRequirements: values.technicalRequirements,
  724. pictureUrl: thePictureUrl,
  725. textFileUrl: this.state.textFileUrl,
  726. videoUrl: values.videoUrl,
  727. fixedBudget: values.fixedBudget,
  728. fixedCycle: values.fixedCycle,
  729. peopleNumber: values.peopleNumber,
  730. fixedScheme: values.fixedScheme,
  731. costEscrow: values.costEscrow,
  732. budgetCost: values.budgetCost,
  733. employerId: values.employerId || this.state.data.employerId,
  734. releaseStatus: values.releaseStatus,
  735. principalId: values.principalId,
  736. validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
  737. //
  738. contacts: values.contacts,
  739. status: this.state.status,
  740. auditStatus: this.state.auditStatus
  741. }
  742. }).done(function (data) {
  743. this.state.auditStatus = 0;
  744. if (!data.error.length) {
  745. message.success('保存成功!');
  746. this.props.handleOk();
  747. } else {
  748. message.warning(data.error[0].message);
  749. };
  750. this.setState({
  751. loading: false
  752. });
  753. }.bind(this));
  754. }
  755. });
  756. },
  757. componentWillMount() {
  758. if (this.props.data.id) {
  759. this.loadData(this.props.data.id, this.props.detailApiUrl);
  760. if (this.props.data.employerId && this.props.detailApiUrl.indexOf('org') >= 0) {
  761. this.getContactsList(this.props.data.employerId)
  762. };
  763. } else {
  764. this.state.data = {};
  765. };
  766. },
  767. componentWillReceiveProps(nextProps) {
  768. if (!this.props.visible && nextProps.visible) {
  769. this.state.textFileList = [];
  770. this.state.videoFileList = [];
  771. if (nextProps.data.id) {
  772. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  773. if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
  774. this.getContactsList(nextProps.data.employerId)
  775. };
  776. } else {
  777. this.state.data = {};
  778. this.state.tags = [];
  779. this.state.pictureUrl = [];
  780. };
  781. this.props.form.resetFields();
  782. };
  783. },
  784. render() {
  785. const theData = this.state.data || {};
  786. const { getFieldDecorator } = this.props.form;
  787. const FormItem = Form.Item
  788. const formItemLayout = {
  789. labelCol: { span: 6 },
  790. wrapperCol: { span: 12 },
  791. };
  792. return (
  793. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  794. <Spin spinning={this.state.loading}>
  795. <div className="clearfix">
  796. <FormItem className="half-item"
  797. {...formItemLayout}
  798. label="编号" >
  799. <span>{theData.serialNumber}</span>
  800. </FormItem>
  801. <FormItem className="half-item"
  802. {...formItemLayout}
  803. label="需求名称" >
  804. {getFieldDecorator('name', {
  805. rules: [{ required: true, message: '此项为必填项!' }],
  806. initialValue: theData.name
  807. })(
  808. <Input />
  809. )}
  810. </FormItem>
  811. <FormItem className="half-item" style={{ display: theData.username ? 'block' : 'none' }}
  812. {...formItemLayout}
  813. label="雇主名称" >
  814. <span>{theData.username}</span>
  815. </FormItem>
  816. <FormItem className="half-item" style={{ display: theData.username ? 'none' : 'block' }}
  817. {...formItemLayout}
  818. label="雇主名称" >
  819. {getFieldDecorator('employerId', {
  820. initialValue: theData.employerId
  821. })(
  822. <Select
  823. placeholder="请选择"
  824. notFoundContent="未找到"
  825. style={{ width: 260 }}
  826. showSearch
  827. filterOption={companySearch}
  828. onSelect={(e, n) => {
  829. theData.uid = e;
  830. if (this.props.detailApiUrl.indexOf('org') >= 0) {
  831. this.getContactsList(e);
  832. };
  833. }}>
  834. {this.props.detailApiUrl.indexOf('org') >= 0 ? this.props.companyOption : this.props.userOption}
  835. </Select>
  836. )}
  837. </FormItem>
  838. {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
  839. {...formItemLayout}
  840. label="联系人" >
  841. {getFieldDecorator('contacts', {
  842. initialValue: theData.contacts
  843. })(
  844. <Select style={{ width: 260 }}
  845. placeholder="请选择联系人"
  846. notFoundContent="未获取到联系人列表"
  847. showSearch
  848. filterOption={companySearch}>
  849. {this.state.contactsOption}
  850. </Select>
  851. )}
  852. </FormItem> : <div></div>}
  853. {theData.techBrokerId ? <FormItem className="half-item"
  854. {...formItemLayout}
  855. label="负责人" >
  856. <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
  857. </FormItem> : <div></div>}
  858. </div>
  859. {theData.releaseStatus ? <div className="clearfix">
  860. <FormItem className="half-item"
  861. {...formItemLayout}
  862. label="是否发布" >
  863. {(() => {
  864. switch (theData.releaseStatus) {
  865. case "0":
  866. return <span>未发布</span>;
  867. case "1":
  868. return <span>已发布</span>;
  869. }
  870. })()}
  871. </FormItem>
  872. <FormItem className="half-item"
  873. {...formItemLayout}
  874. label="发布时间" >
  875. <span>{theData.releaseDateFormattedDate}</span>
  876. </FormItem>
  877. </div> : <div></div>}
  878. <div className="clearfix">
  879. {theData.releaseStatus == "1" ? <FormItem className="half-item"
  880. {...formItemLayout}
  881. label="需求状态" >
  882. {getFieldDecorator('status', {
  883. initialValue: theData.status
  884. })(
  885. <Radio.Group>
  886. <Radio value="0">未解决</Radio>
  887. <Radio value="1">已解决</Radio>
  888. </Radio.Group>
  889. )}
  890. </FormItem> : <div></div>}
  891. <FormItem className="half-item"
  892. {...formItemLayout}
  893. label="审核状态" >
  894. {(() => {
  895. switch (theData.auditStatus) {
  896. case "0":
  897. return <span>未提交审核(草稿)</span>;
  898. case "1":
  899. return <span>提交审核</span>;
  900. case "2":
  901. return <span>审核中</span>;
  902. case "3":
  903. return <span>审核通过</span>;
  904. case "4":
  905. return <span>审核未通过</span>;
  906. }
  907. })()}
  908. </FormItem>
  909. </div>
  910. <FormItem
  911. labelCol={{ span: 3 }}
  912. wrapperCol={{ span: 20 }}
  913. label="关键词" >
  914. <KeyWordTagGroup
  915. keyWordArr={this.state.tags}
  916. tagsArr={this.getTagsArr}
  917. visible={this.props.visible} />
  918. </FormItem>
  919. <FormItem
  920. labelCol={{ span: 3 }}
  921. wrapperCol={{ span: 18 }}
  922. label="行业类别" >
  923. {getFieldDecorator('industryCategory', {
  924. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  925. initialValue: [theData.industryCategoryA, theData.industryCategoryB]
  926. })(
  927. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />
  928. )}
  929. </FormItem>
  930. <div className="clearfix">
  931. <FormItem className="half-item"
  932. {...formItemLayout}
  933. label="需求类型" >
  934. {getFieldDecorator('demandType', {
  935. rules: [{ required: true, message: '此项为必填项!' }],
  936. initialValue: theData.demandType
  937. })(
  938. <Select style={{ width: 160 }} placeholder="请选择需求类型">
  939. {this.props.demandTypeOption}
  940. </Select>
  941. )}
  942. </FormItem>
  943. </div>
  944. <FormItem
  945. labelCol={{ span: 3 }}
  946. wrapperCol={{ span: 18 }}
  947. label="问题说明" >
  948. {getFieldDecorator('problemDes', {
  949. rules: [{ required: true, message: '此项为必填项!' }],
  950. initialValue: theData.problemDes
  951. })(
  952. <Input type="textarea" rows={4} />
  953. )}
  954. </FormItem>
  955. <FormItem
  956. labelCol={{ span: 3 }}
  957. wrapperCol={{ span: 18 }}
  958. label="技术指标要求" >
  959. {getFieldDecorator('technicalRequirements', {
  960. initialValue: theData.technicalRequirements
  961. })(
  962. <Input type="textarea" rows={2} />
  963. )}
  964. </FormItem>
  965. <FormItem
  966. labelCol={{ span: 3 }}
  967. wrapperCol={{ span: 18 }}
  968. label="需求文件(图片)" >
  969. <PicturesWall
  970. uid={theData.employerId}
  971. fileList={this.getPictureUrl}
  972. pictureUrl={this.state.pictureUrl}
  973. visible={this.props.visible} />
  974. </FormItem>
  975. <FormItem
  976. labelCol={{ span: 3 }}
  977. wrapperCol={{ span: 6 }}
  978. label="需求文件(文本)" >
  979. <Upload
  980. name="ratepay"
  981. action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
  982. data={{ 'sign': 'demand_text_file', 'uid': theData.employerId }}
  983. beforeUpload={beforeUploadFile}
  984. fileList={this.state.textFileList}
  985. onChange={(info) => {
  986. if (info.file.status !== 'uploading') {
  987. console.log(info.file, info.fileList);
  988. }
  989. if (info.file.status === 'done') {
  990. if (!info.file.response.error.length) {
  991. message.success(`${info.file.name} 文件上传成功!`);
  992. } else {
  993. message.warning(info.file.response.error[0].message);
  994. return;
  995. };
  996. this.state.textFileUrl = info.file.response.data;
  997. } else if (info.file.status === 'error') {
  998. message.error(`${info.file.name} 文件上传失败。`);
  999. };
  1000. this.setState({ textFileList: info.fileList.slice(-1) });
  1001. }} >
  1002. <Button><Icon type="upload" /> 上传需求文本文件 </Button>
  1003. </Upload>
  1004. <p style={{ marginTop: '10px' }}>{theData.textFileUrl ?
  1005. <span className="download-file">
  1006. <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
  1007. </span>
  1008. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1009. </FormItem>
  1010. <FormItem
  1011. labelCol={{ span: 3 }}
  1012. wrapperCol={{ span: 18 }}
  1013. label="需求文件(视频地址)" >
  1014. {getFieldDecorator('videoUrl', {
  1015. initialValue: theData.videoUrl
  1016. })(
  1017. <Input />
  1018. )}
  1019. </FormItem>
  1020. <div className="clearfix">
  1021. <FormItem className="half-item"
  1022. {...formItemLayout}
  1023. label="固定周期" >
  1024. {getFieldDecorator('fixedCycle', {
  1025. initialValue: theData.fixedCycle
  1026. })(
  1027. <Input />
  1028. )}
  1029. </FormItem>
  1030. <FormItem className="half-item"
  1031. {...formItemLayout}
  1032. label="固定人数" >
  1033. {getFieldDecorator('peopleNumber', {
  1034. initialValue: theData.peopleNumber
  1035. })(
  1036. <InputNumber />
  1037. )}
  1038. <span style={{ marginLeft: '20px' }}>人</span>
  1039. </FormItem>
  1040. </div>
  1041. <FormItem
  1042. labelCol={{ span: 3 }}
  1043. wrapperCol={{ span: 18 }}
  1044. label="固定方案" >
  1045. {getFieldDecorator('fixedScheme', {
  1046. initialValue: theData.fixedScheme
  1047. })(
  1048. <Input type="textarea" rows={2} />
  1049. )}
  1050. </FormItem>
  1051. <div className="clearfix">
  1052. <FormItem className="half-item"
  1053. {...formItemLayout}
  1054. label="预算费用" >
  1055. {getFieldDecorator('budgetCost', {
  1056. initialValue: theData.budgetCost
  1057. })(
  1058. <InputNumber />
  1059. )}
  1060. <span style={{ marginLeft: '20px' }}>万元</span>
  1061. </FormItem>
  1062. <FormItem className="half-item"
  1063. {...formItemLayout}
  1064. label="费用托管" >
  1065. {getFieldDecorator('costEscrow', {
  1066. initialValue: theData.costEscrow
  1067. })(
  1068. <Radio.Group>
  1069. <Radio value={0}>否</Radio>
  1070. <Radio value={1}>是</Radio>
  1071. </Radio.Group>
  1072. )}
  1073. </FormItem>
  1074. <FormItem className="half-item"
  1075. {...formItemLayout}
  1076. label="有效期限" >
  1077. {getFieldDecorator('validityPeriod', {
  1078. initialValue: theData.validityPeriod ? moment(theData.validityPeriod) : null
  1079. })(
  1080. <DatePicker />
  1081. )}
  1082. </FormItem>
  1083. </div>
  1084. <div className="clearfix" style={{ display: 'none' }}>
  1085. <FormItem className="half-item"
  1086. {...formItemLayout}
  1087. label="雇主地址" >
  1088. <span>{theData.employerAddress}</span>
  1089. </FormItem>
  1090. <FormItem className="half-item"
  1091. {...formItemLayout}
  1092. label="雇主联系人名称" >
  1093. <span>{theData.employerContacts}</span>
  1094. </FormItem>
  1095. <FormItem className="half-item"
  1096. {...formItemLayout}
  1097. label="雇主联系人电话" >
  1098. <span>{theData.employerContactsMobile}</span>
  1099. </FormItem>
  1100. <FormItem className="half-item"
  1101. {...formItemLayout}
  1102. label="雇主联系人邮箱" >
  1103. <span>{theData.employerContactsMailbox}</span>
  1104. </FormItem>
  1105. </div>
  1106. <FormItem wrapperCol={{ span: 12, offset: 3 }}>
  1107. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1108. <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
  1109. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1110. </FormItem>
  1111. </Spin>
  1112. </Form >
  1113. )
  1114. }
  1115. }));
  1116. const DemandDetail = React.createClass({
  1117. getInitialState() {
  1118. return {
  1119. visible: false,
  1120. techBrodersObj: {},
  1121. tabsKey: "1",
  1122. columns: [
  1123. {
  1124. title: '编号',
  1125. dataIndex: 'serialNumber',
  1126. key: 'serialNumber',
  1127. }, {
  1128. title: '数据类型',
  1129. dataIndex: 'dataCategory',
  1130. key: 'dataCategory',
  1131. render: text => {
  1132. switch (text) {
  1133. case "0":
  1134. return <span>个人需求</span>;
  1135. case "1":
  1136. return <span>团体需求</span>;
  1137. }
  1138. }
  1139. }, {
  1140. title: '名称',
  1141. dataIndex: 'name',
  1142. key: 'name',
  1143. }, {
  1144. title: '关键字',
  1145. dataIndex: 'keyword',
  1146. key: 'keyword',
  1147. }, {
  1148. title: '类型',
  1149. dataIndex: 'category',
  1150. key: 'category',
  1151. render: text => { return getAchievementCategory(text); }
  1152. }, {
  1153. title: '所有人名称',
  1154. dataIndex: 'theName',
  1155. key: 'theName',
  1156. }, {
  1157. title: '所有人类型',
  1158. dataIndex: 'ownerType',
  1159. key: 'ownerType',
  1160. render: text => {
  1161. switch (text) {
  1162. case "0":
  1163. return <span>个人</span>;
  1164. case "1":
  1165. return <span>组织</span>
  1166. }
  1167. }
  1168. }, {
  1169. title: '发布时间',
  1170. dataIndex: 'releaseDateFormattedDate',
  1171. key: 'releaseDateFormattedDate',
  1172. }
  1173. ],
  1174. dataSource: [],
  1175. };
  1176. },
  1177. getTechBrodersList() {
  1178. this.setState({
  1179. loading: true
  1180. });
  1181. $.ajax({
  1182. method: "get",
  1183. dataType: "json",
  1184. crossDomain: false,
  1185. url: globalConfig.context + "/api/admin/audit/techBroders",
  1186. success: function (data) {
  1187. if (!data.data) {
  1188. if (data.error && data.error.length) {
  1189. message.warning(data.error[0].message);
  1190. }
  1191. return;
  1192. };
  1193. let _me = this, theArr = [];
  1194. for (var item in data.data) {
  1195. theArr.push(
  1196. <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
  1197. )
  1198. };
  1199. this.setState({
  1200. techBrodersOption: theArr,
  1201. techBrodersObj: data.data
  1202. });
  1203. }.bind(this),
  1204. }).always(function () {
  1205. this.setState({
  1206. loading: false
  1207. });
  1208. }.bind(this));
  1209. },
  1210. getTableList() {
  1211. this.setState({
  1212. loading: true
  1213. });
  1214. $.ajax({
  1215. method: "get",
  1216. dataType: "json",
  1217. crossDomain: false,
  1218. url: globalConfig.context + "/api/admin/demand/achievementDemand",
  1219. data: { id: this.props.data.id },
  1220. success: function (data) {
  1221. let theArr = [];
  1222. if (!data.data) {
  1223. if (data.error && data.error.length) {
  1224. message.warning(data.error[0].message);
  1225. };
  1226. } else if (data.data.length) {
  1227. for (let i = 0; i < data.data.length; i++) {
  1228. let thisdata = data.data[i];
  1229. theArr.push({
  1230. key: i,
  1231. id: thisdata.id,
  1232. serialNumber: thisdata.serialNumber,
  1233. dataCategory: thisdata.dataCategory,
  1234. name: thisdata.name,
  1235. keyword: thisdata.keyword,
  1236. category: thisdata.category,
  1237. ownerType: thisdata.ownerType,
  1238. theName: thisdata.username || thisdata.unitName,
  1239. releaseDate: thisdata.releaseDate,
  1240. releaseDateFormattedDate: thisdata.releaseDateFormattedDate
  1241. });
  1242. };
  1243. };
  1244. this.setState({
  1245. dataSource: theArr,
  1246. });
  1247. }.bind(this),
  1248. }).always(function () {
  1249. this.setState({
  1250. loading: false
  1251. });
  1252. }.bind(this));
  1253. },
  1254. tableRowClick(record, index) {
  1255. if (record.ownerType == "0") {
  1256. window.open(globalConfig.context + '/admin/achievement.html?rid=' + record.id + '#orgTechAchievement');
  1257. } else if (record.ownerType == "1") {
  1258. window.open(globalConfig.context + '/admin/achievement.html?rid=' + record.id + '#userTechAchievement')
  1259. };
  1260. },
  1261. handleCancel(e) {
  1262. this.setState({
  1263. visible: false,
  1264. });
  1265. this.props.closeDesc(false);
  1266. },
  1267. handleOk(e) {
  1268. this.setState({
  1269. visible: false,
  1270. });
  1271. this.props.closeDesc(false, true);
  1272. },
  1273. componentWillMount() {
  1274. this.getTechBrodersList();
  1275. },
  1276. componentWillReceiveProps(nextProps) {
  1277. if (nextProps.showDesc) {
  1278. this.state.tabsKey = "1";
  1279. this.state.tabBool = true;
  1280. };
  1281. this.state.visible = nextProps.showDesc;
  1282. },
  1283. render() {
  1284. if (this.props.data) {
  1285. return (
  1286. <div className="patent-desc">
  1287. <Modal maskClosable={false} visible={this.state.visible}
  1288. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1289. width='1000px'
  1290. footer=''
  1291. className="admin-desc-content">
  1292. <Tabs activeKey={this.state.tabsKey}
  1293. onChange={(e) => {
  1294. this.setState({ tabsKey: e });
  1295. if (e == "2" && this.state.tabBool) {
  1296. this.getTableList();
  1297. this.state.tabBool = false;
  1298. };
  1299. }} >
  1300. <Tabs.TabPane tab="需求详情" key="1">
  1301. {(() => {
  1302. if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1303. return <DemandDetailShow
  1304. data={this.props.data}
  1305. detailApiUrl={this.props.detailApiUrl}
  1306. techBrodersOption={this.state.techBrodersOption}
  1307. techBrodersObj={this.state.techBrodersObj}
  1308. demandTypeOption={this.props.demandTypeOption}
  1309. closeDesc={this.handleCancel}
  1310. visible={this.state.visible}
  1311. handleOk={this.handleOk} />
  1312. } else {
  1313. return <DemandDetailForm
  1314. data={this.props.data}
  1315. detailApiUrl={this.props.detailApiUrl}
  1316. companyOption={this.props.companyOption}
  1317. userOption={this.props.userOption}
  1318. techBrodersObj={this.state.techBrodersObj}
  1319. demandTypeOption={this.props.demandTypeOption}
  1320. closeDesc={this.handleCancel}
  1321. visible={this.state.visible}
  1322. handleOk={this.handleOk} />
  1323. }
  1324. })()}
  1325. </Tabs.TabPane>
  1326. <Tabs.TabPane tab="匹配列表" key="2">
  1327. <Table columns={this.state.columns}
  1328. dataSource={this.state.dataSource}
  1329. pagination={false}
  1330. onRowClick={this.tableRowClick} />
  1331. </Tabs.TabPane>
  1332. </Tabs>
  1333. </Modal>
  1334. </div>
  1335. );
  1336. } else {
  1337. return <div></div>
  1338. }
  1339. },
  1340. });
  1341. export default DemandDetail;