techDemandDesc.jsx 58 KB

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