techDemandDesc.jsx 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324
  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 } 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. componentWillMount() {
  280. if (this.props.data.id) {
  281. this.loadData(this.props.data.id, this.props.detailApiUrl);
  282. if (this.props.data.employerId && this.props.detailApiUrl.indexOf('org') >= 0) {
  283. this.getContactsList(this.props.data.employerId)
  284. };
  285. } else {
  286. this.state.data = {};
  287. };
  288. },
  289. componentWillReceiveProps(nextProps) {
  290. if (!this.props.visible && nextProps.visible) {
  291. if (nextProps.data.id) {
  292. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  293. if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
  294. this.getContactsList(nextProps.data.employerId)
  295. };
  296. } else {
  297. this.state.data = {};
  298. };
  299. this.props.form.resetFields();
  300. };
  301. },
  302. render() {
  303. const theData = this.state.data || {};
  304. const { getFieldDecorator } = this.props.form;
  305. const FormItem = Form.Item
  306. const formItemLayout = {
  307. labelCol: { span: 6 },
  308. wrapperCol: { span: 12 },
  309. };
  310. return (
  311. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  312. <Spin spinning={this.state.loading}>
  313. <div className="clearfix">
  314. <FormItem className="half-item"
  315. {...formItemLayout}
  316. label="编号" >
  317. <span>{theData.serialNumber}</span>
  318. </FormItem>
  319. <FormItem className="half-item"
  320. {...formItemLayout}
  321. label="需求名称" >
  322. <span>{theData.name}</span>
  323. </FormItem>
  324. <FormItem className="half-item"
  325. {...formItemLayout}
  326. label="雇主名称" >
  327. <span>{theData.username}</span>
  328. </FormItem>
  329. <FormItem className="half-item"
  330. {...formItemLayout}
  331. label="联系人" >
  332. <span>{this.state.contactsObj[theData.contacts]}</span>
  333. </FormItem>
  334. <FormItem className="half-item"
  335. {...formItemLayout}
  336. label="负责人" >
  337. <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
  338. </FormItem>
  339. </div>
  340. <div className="clearfix">
  341. <FormItem className="half-item"
  342. {...formItemLayout}
  343. label="是否发布" >
  344. {(() => {
  345. switch (theData.releaseStatus) {
  346. case "0":
  347. return <span>未发布</span>;
  348. case "1":
  349. return <div>
  350. <span>已发布</span>
  351. <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
  352. <Modal maskClosable={false} title="确认"
  353. visible={this.state.releaseSubmitVisible}
  354. width='300px'
  355. footer={null}
  356. onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
  357. <span>确认要撤销发布吗?</span>
  358. <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
  359. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
  360. </Modal>
  361. </div>;
  362. }
  363. })()}
  364. </FormItem>
  365. <FormItem className="half-item"
  366. {...formItemLayout}
  367. label="发布时间" >
  368. <span>{theData.releaseDateFormattedDate}</span>
  369. </FormItem>
  370. </div>
  371. <div className="clearfix">
  372. <FormItem className="half-item"
  373. {...formItemLayout}
  374. label="需求状态" >
  375. {(() => {
  376. switch (theData.status) {
  377. case "0":
  378. return <span>未解决</span>;
  379. case "1":
  380. return <span>已解决</span>;
  381. }
  382. })()}
  383. </FormItem>
  384. <FormItem className="half-item"
  385. {...formItemLayout}
  386. label="审核状态" >
  387. {(() => {
  388. switch (theData.auditStatus) {
  389. case "0":
  390. return <span>未提交审核(草稿)</span>;
  391. case "1":
  392. return <span>提交审核</span>;
  393. case "2":
  394. return <span>审核中</span>;
  395. case "3":
  396. return <span>审核通过</span>;
  397. case "4":
  398. return <span>审核未通过</span>;
  399. }
  400. })()}
  401. </FormItem>
  402. </div>
  403. <div className="clearfix">
  404. <FormItem className="half-item"
  405. {...formItemLayout}
  406. label="信息来源" >
  407. {(() => {
  408. switch (theData.infoSources) {
  409. case "0":
  410. return <span>平台采集</span>;
  411. case "1":
  412. return <span>客户发布</span>;
  413. }
  414. })()}
  415. </FormItem>
  416. </div>
  417. <FormItem
  418. labelCol={{ span: 3 }}
  419. wrapperCol={{ span: 20 }}
  420. label="关键词" >
  421. {this.state.tags.map((tag) => {
  422. return <Tooltip key={tag} title={tag}>
  423. <Tag key={tag}>{tag}</Tag>
  424. </Tooltip>;
  425. })}
  426. </FormItem>
  427. <FormItem
  428. labelCol={{ span: 3 }}
  429. wrapperCol={{ span: 18 }}
  430. label="行业类别" >
  431. <span>{getIndustryCategory(theData.industryCategoryA, theData.industryCategoryB)}</span>
  432. </FormItem>
  433. <div className="clearfix">
  434. <FormItem className="half-item"
  435. {...formItemLayout}
  436. label="需求类型" >
  437. <span>{getDemandType(theData.demandType)}</span>
  438. </FormItem>
  439. </div>
  440. <FormItem
  441. labelCol={{ span: 3 }}
  442. wrapperCol={{ span: 18 }}
  443. label="问题说明" >
  444. <span>{theData.problemDes}</span>
  445. </FormItem>
  446. <FormItem
  447. labelCol={{ span: 3 }}
  448. wrapperCol={{ span: 18 }}
  449. label="技术指标要求" >
  450. <span>{theData.technicalRequirements}</span>
  451. </FormItem>
  452. <FormItem
  453. labelCol={{ span: 3 }}
  454. wrapperCol={{ span: 18 }}
  455. label="需求文件(图片)" >
  456. <div className="clearfix">
  457. <Upload className="demandDetailShow-upload"
  458. listType="picture-card"
  459. fileList={this.state.pictureUrl}
  460. onPreview={(file) => {
  461. this.setState({
  462. previewImage: file.url || file.thumbUrl,
  463. previewVisible: true,
  464. });
  465. }} >
  466. </Upload>
  467. <Modal maskClosable={false} footer={null}
  468. visible={this.state.previewVisible}
  469. onCancel={() => { this.setState({ previewVisible: false }) }}>
  470. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  471. </Modal>
  472. </div>
  473. </FormItem>
  474. <FormItem
  475. labelCol={{ span: 3 }}
  476. wrapperCol={{ span: 6 }}
  477. label="需求文件(文本)" >
  478. <div>{theData.textFileUrl ?
  479. <span className="download-file">
  480. <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
  481. </span>
  482. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</div>
  483. </FormItem>
  484. <FormItem
  485. labelCol={{ span: 3 }}
  486. wrapperCol={{ span: 18 }}
  487. label="需求文件(视频地址)" >
  488. <span>{theData.videoUrl}</span>
  489. </FormItem>
  490. <div className="clearfix">
  491. <FormItem className="half-item"
  492. {...formItemLayout}
  493. label="固定周期" >
  494. <span>{theData.fixedCycle}</span>
  495. </FormItem>
  496. <FormItem className="half-item"
  497. {...formItemLayout}
  498. label="固定人数" >
  499. <span>{theData.peopleNumber} 人</span>
  500. </FormItem>
  501. </div>
  502. <FormItem
  503. labelCol={{ span: 3 }}
  504. wrapperCol={{ span: 18 }}
  505. label="固定方案" >
  506. <span>{theData.fixedScheme}</span>
  507. </FormItem>
  508. <div className="clearfix">
  509. <FormItem className="half-item"
  510. {...formItemLayout}
  511. label="预算费用" >
  512. <span>{theData.budgetCost} 万元</span>
  513. </FormItem>
  514. <FormItem className="half-item"
  515. {...formItemLayout}
  516. label="费用托管" >
  517. {(() => {
  518. switch (theData.costEscrow) {
  519. case 0:
  520. return <span>否</span>;
  521. case 1:
  522. return <span>是</span>;
  523. }
  524. })()}
  525. </FormItem>
  526. <FormItem className="half-item"
  527. {...formItemLayout}
  528. label="有效期限" >
  529. <span>{theData.validityPeriodFormattedDate}</span>
  530. </FormItem>
  531. </div>
  532. {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
  533. <FormItem className="half-item"
  534. {...formItemLayout}
  535. label="审核状态" >
  536. {getFieldDecorator('auditStatus')(
  537. <Radio.Group>
  538. <Radio value={3}>审核通过</Radio>
  539. <Radio value={4}>审核未通过</Radio>
  540. </Radio.Group>
  541. )}
  542. </FormItem>
  543. <FormItem className="half-item"
  544. {...formItemLayout}
  545. label="技术经纪人" >
  546. {getFieldDecorator('techBroderId', {
  547. initialValue: theData.techBroderId
  548. })(
  549. <Select style={{ width: 260 }}>
  550. {this.props.techBrodersOption}
  551. </Select>
  552. )}
  553. </FormItem>
  554. </div> : <div></div>}
  555. <FormItem wrapperCol={{ span: 12, offset: 3 }}>
  556. {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
  557. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  558. </FormItem>
  559. <Modal maskClosable={false} title="确认"
  560. visible={this.state.formSubmitVisible}
  561. width='360px'
  562. footer={null}
  563. onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
  564. <span>确认该需求审核未通过?</span>
  565. <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
  566. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
  567. </Modal>
  568. </Spin>
  569. </Form >
  570. )
  571. }
  572. }));
  573. const DemandDetailForm = Form.create()(React.createClass({
  574. getInitialState() {
  575. return {
  576. visible: false,
  577. loading: false,
  578. auditStatus: 0,
  579. textFileList: [],
  580. videoFileList: [],
  581. pictureUrl: [],
  582. tags: []
  583. };
  584. },
  585. loadData(id, detailApiUrl) {
  586. this.setState({
  587. loading: true
  588. });
  589. $.ajax({
  590. method: "get",
  591. dataType: "json",
  592. crossDomain: false,
  593. url: globalConfig.context + detailApiUrl,
  594. data: {
  595. id: id
  596. },
  597. success: function (data) {
  598. let thisData = data.data;
  599. if (!thisData) {
  600. if (data.error && data.error.length) {
  601. message.warning(data.error[0].message);
  602. };
  603. thisData = {};
  604. };
  605. let d = new Date()
  606. if (thisData && thisData.dateOfBirthMonth && thisData.dateOfBirthYear) {
  607. d.setMonth(thisData.dateOfBirthMonth - 1);
  608. d.setYear(parseInt(thisData.dateOfBirthYear));
  609. };
  610. this.setState({
  611. data: thisData,
  612. tags: thisData.keyword ? thisData.keyword.split(",") : [],
  613. pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
  614. });
  615. }.bind(this),
  616. }).always(function () {
  617. this.setState({
  618. loading: false
  619. });
  620. }.bind(this));
  621. },
  622. getContactsList(theUid) {
  623. $.ajax({
  624. method: "get",
  625. dataType: "json",
  626. crossDomain: false,
  627. url: globalConfig.context + "/api/admin/getContacts",
  628. data: {
  629. uid: theUid
  630. },
  631. success: function (data) {
  632. let theOption = [];
  633. if (!data.data) {
  634. if (data.error && data.error.length) {
  635. message.warning(data.error[0].message);
  636. return;
  637. };
  638. };
  639. for (let item in data.data) {
  640. let theData = data.data[item];
  641. theOption.push(
  642. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  643. );
  644. };
  645. this.setState({
  646. contactsOption: theOption
  647. });
  648. }.bind(this),
  649. });
  650. },
  651. getTagsArr(e) {
  652. this.setState({ tags: e });
  653. },
  654. getPictureUrl(e) {
  655. this.setState({ pictureUrl: e });
  656. },
  657. handleSubmit(e) {
  658. e.preventDefault();
  659. this.props.form.validateFields((err, values) => {
  660. //keyword长度判断
  661. if (this.state.tags.length < 3) {
  662. message.warning('关键词数量不能小于3个!');
  663. return;
  664. };
  665. //url转化
  666. let thePictureUrl = [];
  667. if (this.state.pictureUrl.length) {
  668. let picArr = [];
  669. this.state.pictureUrl.map(function (item) {
  670. picArr.push(item.response.data);
  671. });
  672. thePictureUrl = picArr.join(",");
  673. };
  674. if (!err) {
  675. this.setState({
  676. loading: true
  677. });
  678. $.ajax({
  679. method: "POST",
  680. dataType: "json",
  681. crossDomain: false,
  682. url: this.props.data.id ? globalConfig.context + '/api/admin/demand/update' : globalConfig.context + '/api/admin/demand/apply',
  683. data: {
  684. id: this.props.data.id,
  685. dataCategory: this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0,
  686. serialNumber: this.props.data.serialNumber,
  687. name: values.name,
  688. keyword: this.state.tags ? this.state.tags.join(",") : [],
  689. keywords: this.state.tags,
  690. infoSources: values.infoSources,
  691. industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
  692. industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
  693. demandType: values.demandType,
  694. problemDes: values.problemDes,
  695. technicalRequirements: values.technicalRequirements,
  696. pictureUrl: thePictureUrl,
  697. textFileUrl: this.state.textFileUrl,
  698. videoUrl: values.videoUrl,
  699. fixedBudget: values.fixedBudget,
  700. fixedCycle: values.fixedCycle,
  701. peopleNumber: values.peopleNumber,
  702. fixedScheme: values.fixedScheme,
  703. costEscrow: values.costEscrow,
  704. budgetCost: values.budgetCost,
  705. employerId: values.employerId || this.state.data.employerId,
  706. releaseStatus: values.releaseStatus,
  707. principalId: values.principalId,
  708. validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
  709. //
  710. contacts: values.contacts,
  711. status: this.state.status,
  712. auditStatus: this.state.auditStatus
  713. }
  714. }).done(function (data) {
  715. this.state.auditStatus = 0;
  716. if (!data.error.length) {
  717. message.success('保存成功!');
  718. this.setState({
  719. visible: false
  720. });
  721. this.props.handleOk();
  722. } else {
  723. message.warning(data.error[0].message);
  724. }
  725. }.bind(this));
  726. }
  727. });
  728. },
  729. componentWillMount() {
  730. if (this.props.data.id) {
  731. this.loadData(this.props.data.id, this.props.detailApiUrl);
  732. if (this.props.data.employerId && this.props.detailApiUrl.indexOf('org') >= 0) {
  733. this.getContactsList(this.props.data.employerId)
  734. };
  735. } else {
  736. this.state.data = {};
  737. };
  738. },
  739. componentWillReceiveProps(nextProps) {
  740. if (!this.props.visible && nextProps.visible) {
  741. this.state.textFileList = [];
  742. this.state.videoFileList = [];
  743. if (nextProps.data.id) {
  744. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  745. if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
  746. this.getContactsList(nextProps.data.employerId)
  747. };
  748. } else {
  749. this.state.data = {};
  750. this.state.tags = [];
  751. this.state.pictureUrl = [];
  752. };
  753. this.props.form.resetFields();
  754. };
  755. },
  756. render() {
  757. const theData = this.state.data || {};
  758. const { getFieldDecorator } = this.props.form;
  759. const FormItem = Form.Item
  760. const formItemLayout = {
  761. labelCol: { span: 6 },
  762. wrapperCol: { span: 12 },
  763. };
  764. return (
  765. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  766. <Spin spinning={this.state.loading}>
  767. <div className="clearfix">
  768. <FormItem className="half-item"
  769. {...formItemLayout}
  770. label="编号" >
  771. <span>{theData.serialNumber}</span>
  772. </FormItem>
  773. <FormItem className="half-item"
  774. {...formItemLayout}
  775. label="需求名称" >
  776. {getFieldDecorator('name', {
  777. rules: [{ required: true, message: '此项为必填项!' }],
  778. initialValue: theData.name
  779. })(
  780. <Input />
  781. )}
  782. </FormItem>
  783. <FormItem className="half-item" style={{ display: theData.username ? 'block' : 'none' }}
  784. {...formItemLayout}
  785. label="雇主名称" >
  786. <span>{theData.username}</span>
  787. </FormItem>
  788. <FormItem className="half-item" style={{ display: theData.username ? 'none' : 'block' }}
  789. {...formItemLayout}
  790. label="雇主名称" >
  791. {getFieldDecorator('employerId', {
  792. initialValue: theData.employerId
  793. })(
  794. <Select
  795. placeholder="请选择"
  796. notFoundContent="未找到"
  797. style={{ width: 260 }}
  798. showSearch
  799. filterOption={companySearch}
  800. onSelect={(e, n) => {
  801. theData.uid = e;
  802. if (this.props.detailApiUrl.indexOf('org') >= 0) {
  803. this.getContactsList(e);
  804. };
  805. }}>
  806. {this.props.detailApiUrl.indexOf('org') >= 0 ? this.props.companyOption : this.props.userOption}
  807. </Select>
  808. )}
  809. </FormItem>
  810. {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
  811. {...formItemLayout}
  812. label="联系人" >
  813. {getFieldDecorator('contacts', {
  814. initialValue: theData.contacts
  815. })(
  816. <Select style={{ width: 260 }}
  817. placeholder="请选择联系人"
  818. notFoundContent="未获取到联系人列表"
  819. showSearch
  820. filterOption={companySearch}>
  821. {this.state.contactsOption}
  822. </Select>
  823. )}
  824. </FormItem> : <div></div>}
  825. {theData.techBrokerId ? <FormItem className="half-item"
  826. {...formItemLayout}
  827. label="负责人" >
  828. <span>{this.props.techBrodersObj[theData.techBrokerId]}</span>
  829. </FormItem> : <div></div>}
  830. </div>
  831. {theData.releaseStatus ? <div className="clearfix">
  832. <FormItem className="half-item"
  833. {...formItemLayout}
  834. label="是否发布" >
  835. {(() => {
  836. switch (theData.releaseStatus) {
  837. case "0":
  838. return <span>未发布</span>;
  839. case "1":
  840. return <span>已发布</span>;
  841. }
  842. })()}
  843. </FormItem>
  844. <FormItem className="half-item"
  845. {...formItemLayout}
  846. label="发布时间" >
  847. <span>{theData.releaseDateFormattedDate}</span>
  848. </FormItem>
  849. </div> : <div></div>}
  850. <div className="clearfix">
  851. {theData.releaseStatus == "1" ? <FormItem className="half-item"
  852. {...formItemLayout}
  853. label="需求状态" >
  854. {getFieldDecorator('status', {
  855. initialValue: theData.status
  856. })(
  857. <Radio.Group>
  858. <Radio value="0">未解决</Radio>
  859. <Radio value="1">已解决</Radio>
  860. </Radio.Group>
  861. )}
  862. </FormItem> : <div></div>}
  863. <FormItem className="half-item"
  864. {...formItemLayout}
  865. label="审核状态" >
  866. {(() => {
  867. switch (theData.auditStatus) {
  868. case "0":
  869. return <span>未提交审核(草稿)</span>;
  870. case "1":
  871. return <span>提交审核</span>;
  872. case "2":
  873. return <span>审核中</span>;
  874. case "3":
  875. return <span>审核通过</span>;
  876. case "4":
  877. return <span>审核未通过</span>;
  878. }
  879. })()}
  880. </FormItem>
  881. </div>
  882. <div className="clearfix">
  883. <FormItem className="half-item"
  884. {...formItemLayout}
  885. label="信息来源" >
  886. {getFieldDecorator('infoSources', {
  887. rules: [{ required: true, message: '此项为必填项!' }],
  888. initialValue: theData.infoSources
  889. })(
  890. <Radio.Group>
  891. <Radio value="0">平台采集</Radio>
  892. <Radio value="1">客户发布</Radio>
  893. </Radio.Group>
  894. )}
  895. </FormItem>
  896. </div>
  897. <FormItem
  898. labelCol={{ span: 3 }}
  899. wrapperCol={{ span: 20 }}
  900. label="关键词" >
  901. <KeyWordTagGroup
  902. keyWordArr={this.state.tags}
  903. tagsArr={this.getTagsArr}
  904. visible={this.props.visible} />
  905. </FormItem>
  906. <FormItem
  907. labelCol={{ span: 3 }}
  908. wrapperCol={{ span: 18 }}
  909. label="行业类别" >
  910. {getFieldDecorator('industryCategory', {
  911. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  912. initialValue: [theData.industryCategoryA, theData.industryCategoryB]
  913. })(
  914. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />
  915. )}
  916. </FormItem>
  917. <div className="clearfix">
  918. <FormItem className="half-item"
  919. {...formItemLayout}
  920. label="需求类型" >
  921. {getFieldDecorator('demandType', {
  922. rules: [{ required: true, message: '此项为必填项!' }],
  923. initialValue: theData.demandType
  924. })(
  925. <Select style={{ width: 160 }} placeholder="请选择需求类型">
  926. {this.props.demandTypeOption}
  927. </Select>
  928. )}
  929. </FormItem>
  930. </div>
  931. <FormItem
  932. labelCol={{ span: 3 }}
  933. wrapperCol={{ span: 18 }}
  934. label="问题说明" >
  935. {getFieldDecorator('problemDes', {
  936. rules: [{ required: true, message: '此项为必填项!' }],
  937. initialValue: theData.problemDes
  938. })(
  939. <Input type="textarea" rows={4} />
  940. )}
  941. </FormItem>
  942. <FormItem
  943. labelCol={{ span: 3 }}
  944. wrapperCol={{ span: 18 }}
  945. label="技术指标要求" >
  946. {getFieldDecorator('technicalRequirements', {
  947. initialValue: theData.technicalRequirements
  948. })(
  949. <Input type="textarea" rows={2} />
  950. )}
  951. </FormItem>
  952. <FormItem
  953. labelCol={{ span: 3 }}
  954. wrapperCol={{ span: 18 }}
  955. label="需求文件(图片)" >
  956. <PicturesWall
  957. uid={theData.employerId}
  958. fileList={this.getPictureUrl}
  959. pictureUrl={this.state.pictureUrl}
  960. visible={this.props.visible} />
  961. </FormItem>
  962. <FormItem
  963. labelCol={{ span: 3 }}
  964. wrapperCol={{ span: 6 }}
  965. label="需求文件(文本)" >
  966. <Upload
  967. name="ratepay"
  968. action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
  969. data={{ 'sign': 'demand_text_file', 'uid': theData.employerId }}
  970. beforeUpload={beforeUploadFile}
  971. fileList={this.state.textFileList}
  972. onChange={(info) => {
  973. if (info.file.status !== 'uploading') {
  974. console.log(info.file, info.fileList);
  975. }
  976. if (info.file.status === 'done') {
  977. if (!info.file.response.error.length) {
  978. message.success(`${info.file.name} 文件上传成功!`);
  979. } else {
  980. message.warning(info.file.response.error[0].message);
  981. return;
  982. };
  983. this.state.textFileUrl = info.file.response.data;
  984. } else if (info.file.status === 'error') {
  985. message.error(`${info.file.name} 文件上传失败。`);
  986. };
  987. this.setState({ textFileList: info.fileList.slice(-1) });
  988. }} >
  989. <Button><Icon type="upload" /> 上传需求文本文件 </Button>
  990. </Upload>
  991. <p style={{ marginTop: '10px' }}>{theData.textFileUrl ?
  992. <span className="download-file">
  993. <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>需求文件(文本文件)</a>
  994. </span>
  995. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  996. </FormItem>
  997. <FormItem
  998. labelCol={{ span: 3 }}
  999. wrapperCol={{ span: 18 }}
  1000. label="需求文件(视频地址)" >
  1001. {getFieldDecorator('videoUrl', {
  1002. initialValue: theData.videoUrl
  1003. })(
  1004. <Input />
  1005. )}
  1006. </FormItem>
  1007. <div className="clearfix">
  1008. <FormItem className="half-item"
  1009. {...formItemLayout}
  1010. label="固定周期" >
  1011. {getFieldDecorator('fixedCycle', {
  1012. initialValue: theData.fixedCycle
  1013. })(
  1014. <Input />
  1015. )}
  1016. </FormItem>
  1017. <FormItem className="half-item"
  1018. {...formItemLayout}
  1019. label="固定人数" >
  1020. {getFieldDecorator('peopleNumber', {
  1021. initialValue: theData.peopleNumber
  1022. })(
  1023. <InputNumber />
  1024. )}
  1025. <span style={{ marginLeft: '20px' }}>人</span>
  1026. </FormItem>
  1027. </div>
  1028. <FormItem
  1029. labelCol={{ span: 3 }}
  1030. wrapperCol={{ span: 18 }}
  1031. label="固定方案" >
  1032. {getFieldDecorator('fixedScheme', {
  1033. initialValue: theData.fixedScheme
  1034. })(
  1035. <Input type="textarea" rows={2} />
  1036. )}
  1037. </FormItem>
  1038. <div className="clearfix">
  1039. <FormItem className="half-item"
  1040. {...formItemLayout}
  1041. label="预算费用" >
  1042. {getFieldDecorator('budgetCost', {
  1043. initialValue: theData.budgetCost
  1044. })(
  1045. <InputNumber />
  1046. )}
  1047. <span style={{ marginLeft: '20px' }}>万元</span>
  1048. </FormItem>
  1049. <FormItem className="half-item"
  1050. {...formItemLayout}
  1051. label="费用托管" >
  1052. {getFieldDecorator('costEscrow', {
  1053. initialValue: theData.costEscrow
  1054. })(
  1055. <Radio.Group>
  1056. <Radio value={0}>否</Radio>
  1057. <Radio value={1}>是</Radio>
  1058. </Radio.Group>
  1059. )}
  1060. </FormItem>
  1061. <FormItem className="half-item"
  1062. {...formItemLayout}
  1063. label="有效期限" >
  1064. {getFieldDecorator('validityPeriod', {
  1065. initialValue: theData.validityPeriod ? moment(theData.validityPeriod) : null
  1066. })(
  1067. <DatePicker />
  1068. )}
  1069. </FormItem>
  1070. </div>
  1071. <div className="clearfix" style={{ display: 'none' }}>
  1072. <FormItem className="half-item"
  1073. {...formItemLayout}
  1074. label="雇主地址" >
  1075. <span>{theData.employerAddress}</span>
  1076. </FormItem>
  1077. <FormItem className="half-item"
  1078. {...formItemLayout}
  1079. label="雇主联系人名称" >
  1080. <span>{theData.employerContacts}</span>
  1081. </FormItem>
  1082. <FormItem className="half-item"
  1083. {...formItemLayout}
  1084. label="雇主联系人电话" >
  1085. <span>{theData.employerContactsMobile}</span>
  1086. </FormItem>
  1087. <FormItem className="half-item"
  1088. {...formItemLayout}
  1089. label="雇主联系人邮箱" >
  1090. <span>{theData.employerContactsMailbox}</span>
  1091. </FormItem>
  1092. </div>
  1093. <FormItem wrapperCol={{ span: 12, offset: 3 }}>
  1094. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1095. <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
  1096. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1097. </FormItem>
  1098. </Spin>
  1099. </Form >
  1100. )
  1101. }
  1102. }));
  1103. const DemandDetail = React.createClass({
  1104. getInitialState() {
  1105. return {
  1106. visible: false,
  1107. techBrodersObj: {},
  1108. columns: [
  1109. {
  1110. title: '编号',
  1111. dataIndex: 'serialNumber',
  1112. key: 'serialNumber',
  1113. }, {
  1114. title: '名称',
  1115. dataIndex: 'name',
  1116. key: 'name',
  1117. }, {
  1118. title: '关键字',
  1119. dataIndex: 'keyword',
  1120. key: 'keyword',
  1121. }, {
  1122. title: '类型',
  1123. dataIndex: 'category',
  1124. key: 'category',
  1125. render: text => { return getAchievementCategory(text); }
  1126. }, {
  1127. title: '所有人名称',
  1128. dataIndex: 'ownerName',
  1129. key: 'ownerName',
  1130. }, {
  1131. title: '所有人类型',
  1132. dataIndex: 'ownerType',
  1133. key: 'ownerType',
  1134. render: text => {
  1135. switch (text) {
  1136. case "0":
  1137. return <span>个人</span>;
  1138. case "1":
  1139. return <span>组织</span>
  1140. }
  1141. }
  1142. }, {
  1143. title: '审核状态',
  1144. dataIndex: 'auditStatus',
  1145. key: 'auditStatus',
  1146. render: text => { return getTechAuditStatus(text) }
  1147. }, {
  1148. title: '发布时间',
  1149. dataIndex: 'releaseDateFormattedDate',
  1150. key: 'releaseDateFormattedDate',
  1151. }
  1152. ],
  1153. dataSource: [],
  1154. };
  1155. },
  1156. getTechBrodersList() {
  1157. this.setState({
  1158. loading: true
  1159. });
  1160. $.ajax({
  1161. method: "get",
  1162. dataType: "json",
  1163. crossDomain: false,
  1164. url: globalConfig.context + "/api/admin/audit/techBroders",
  1165. success: function (data) {
  1166. if (!data.data) {
  1167. if (data.error && data.error.length) {
  1168. message.warning(data.error[0].message);
  1169. }
  1170. return;
  1171. };
  1172. let _me = this, theArr = [];
  1173. for (var item in data.data) {
  1174. theArr.push(
  1175. <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
  1176. )
  1177. };
  1178. this.setState({
  1179. techBrodersOption: theArr,
  1180. techBrodersObj: data.data
  1181. });
  1182. }.bind(this),
  1183. }).always(function () {
  1184. this.setState({
  1185. loading: false
  1186. });
  1187. }.bind(this));
  1188. },
  1189. getTableList(id) {
  1190. this.setState({
  1191. loading: true
  1192. });
  1193. $.ajax({
  1194. method: "get",
  1195. dataType: "json",
  1196. crossDomain: false,
  1197. url: globalConfig.context + "/api/admin/audit/techBroders",
  1198. data: { id: id },
  1199. success: function (data) {
  1200. let theArr = [];
  1201. if (!data.data && !data.data.list) {
  1202. if (data.error && data.error.length) {
  1203. message.warning(data.error[0].message);
  1204. };
  1205. } else {
  1206. for (let i = 0; i < data.data.list.length; i++) {
  1207. let thisdata = data.data.list[i];
  1208. theArr.push({
  1209. key: i,
  1210. id: thisdata.id,
  1211. serialNumber: thisdata.serialNumber,
  1212. dataCategory: thisdata.dataCategory,
  1213. name: thisdata.name,
  1214. keyword: thisdata.keyword,
  1215. infoSources: thisdata.infoSources,
  1216. username: thisdata.username,
  1217. demandType: thisdata.demandType,
  1218. validityPeriod: thisdata.validityPeriod,
  1219. employerName: thisdata.employerName,
  1220. employerId: thisdata.employerId,
  1221. province: thisdata.province,
  1222. status: thisdata.status,
  1223. releaseStatus: thisdata.releaseStatus,
  1224. releaseDate: thisdata.releaseDate,
  1225. principalId: thisdata.principalId,
  1226. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  1227. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  1228. auditStatus: thisdata.auditStatus
  1229. });
  1230. };
  1231. };
  1232. this.setState({
  1233. dataSource: theArr,
  1234. });
  1235. }.bind(this),
  1236. }).always(function () {
  1237. this.setState({
  1238. loading: false
  1239. });
  1240. }.bind(this));
  1241. },
  1242. tableRowClick(record, index) {
  1243. this.state.RowData = record;
  1244. debugger
  1245. },
  1246. handleCancel(e) {
  1247. this.setState({
  1248. visible: false,
  1249. });
  1250. this.props.closeDesc(false);
  1251. },
  1252. handleOk(e) {
  1253. this.setState({
  1254. visible: false,
  1255. });
  1256. this.props.closeDesc(false, true);
  1257. },
  1258. componentWillMount() {
  1259. this.getTechBrodersList();
  1260. },
  1261. componentWillReceiveProps(nextProps) {
  1262. this.state.visible = nextProps.showDesc;
  1263. if (!this.props.showDesc && nextProps.showDesc) {
  1264. this.getTableList(nextProps.data.id);
  1265. };
  1266. },
  1267. render() {
  1268. if (this.props.data) {
  1269. return (
  1270. <div className="patent-desc">
  1271. <Modal maskClosable={false} visible={this.state.visible}
  1272. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1273. width='1000px'
  1274. footer=''
  1275. className="admin-desc-content">
  1276. <Tabs defaultActiveKey="1">
  1277. <Tabs.TabPane tab="需求详情" key="1">
  1278. {(() => {
  1279. if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1280. return <DemandDetailShow
  1281. data={this.props.data}
  1282. detailApiUrl={this.props.detailApiUrl}
  1283. techBrodersOption={this.state.techBrodersOption}
  1284. techBrodersObj={this.state.techBrodersObj}
  1285. demandTypeOption={this.props.demandTypeOption}
  1286. closeDesc={this.handleCancel}
  1287. visible={this.state.visible}
  1288. handleOk={this.handleOk} />
  1289. } else {
  1290. return <DemandDetailForm
  1291. data={this.props.data}
  1292. detailApiUrl={this.props.detailApiUrl}
  1293. companyOption={this.props.companyOption}
  1294. userOption={this.props.userOption}
  1295. techBrodersObj={this.state.techBrodersObj}
  1296. demandTypeOption={this.props.demandTypeOption}
  1297. closeDesc={this.handleCancel}
  1298. visible={this.state.visible}
  1299. handleOk={this.handleOk} />
  1300. }
  1301. })()}
  1302. </Tabs.TabPane>
  1303. <Tabs.TabPane tab="匹配列表" key="2">
  1304. <Table columns={this.state.columns}
  1305. dataSource={this.state.dataSource}
  1306. pagination={false}
  1307. onRowClick={this.tableRowClick} />
  1308. </Tabs.TabPane>
  1309. </Tabs>
  1310. </Modal>
  1311. </div>
  1312. );
  1313. } else {
  1314. return <div></div>
  1315. }
  1316. },
  1317. });
  1318. export default DemandDetail;