techAchievementQueryDesc.jsx 88 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877
  1. import React from 'react';
  2. import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, Upload, Input, InputNumber, Select, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
  3. import './techAchievement.less';
  4. import ajax from 'jquery/src/ajax/xhr.js';
  5. import $ from 'jquery/src/ajax';
  6. import { maturityList, innovationList, transferModeList } from '../../dataDic';
  7. import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
  8. import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getboutique } from '../../tools.js';
  9. import throttle from '../../throttle.js';
  10. const KeyWordTagGroup = React.createClass({
  11. getInitialState() {
  12. return {
  13. tags: [],
  14. inputVisible: false,
  15. inputValue: ''
  16. };
  17. },
  18. handleClose(removedTag) {
  19. const tags = this.state.tags.filter(tag => tag !== removedTag);
  20. this.props.tagsArr(tags);
  21. this.setState({ tags });
  22. },
  23. showInput() {
  24. this.setState({ inputVisible: true }, () => this.input.focus());
  25. },
  26. handleInputChange(e) {
  27. this.setState({ inputValue: e.target.value });
  28. },
  29. handleInputConfirm() {
  30. const state = this.state;
  31. const inputValue = state.inputValue;
  32. let tags = state.tags;
  33. if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
  34. tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
  35. };
  36. this.props.tagsArr(tags);
  37. this.setState({
  38. tags,
  39. inputVisible: false,
  40. inputValue: '',
  41. });
  42. },
  43. componentWillMount() {
  44. this.state.tags = this.props.keyWordArr;
  45. },
  46. componentWillReceiveProps(nextProps) {
  47. if (this.props.keyWordArr != nextProps.keyWordArr) {
  48. this.state.tags = nextProps.keyWordArr;
  49. };
  50. },
  51. render() {
  52. const { tags, inputVisible, inputValue } = this.state;
  53. return (
  54. <div className="keyWord-tips">
  55. {tags.map((tag, index) => {
  56. const isLongTag = tag.length > 10;
  57. const tagElem = (
  58. <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
  59. {isLongTag ? `${tag.slice(0, 10)}...` : tag}
  60. </Tag>
  61. );
  62. return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
  63. })}
  64. {inputVisible && (
  65. <Input
  66. ref={input => this.input = input}
  67. type="text"
  68. style={{ width: 78 }}
  69. value={inputValue}
  70. onChange={this.handleInputChange}
  71. onBlur={this.handleInputConfirm}
  72. onPressEnter={this.handleInputConfirm}
  73. />
  74. )}
  75. {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
  76. </div>
  77. );
  78. }
  79. });
  80. const PicturesWall = React.createClass({
  81. getInitialState() {
  82. return {
  83. previewVisible: false,
  84. previewImage: '',
  85. fileList: [],
  86. }
  87. },
  88. handleCancel() {
  89. this.setState({ previewVisible: false })
  90. },
  91. handlePreview(file) {
  92. this.setState({
  93. previewImage: file.url || file.thumbUrl,
  94. previewVisible: true,
  95. });
  96. },
  97. handleChange(info) {
  98. let fileList = info.fileList;
  99. this.setState({ fileList });
  100. this.props.fileList(fileList);
  101. },
  102. componentWillReceiveProps(nextProps) {
  103. this.state.fileList = nextProps.pictureUrl;
  104. },
  105. render() {
  106. const { previewVisible, previewImage, fileList } = this.state;
  107. const uploadButton = (
  108. <div>
  109. <Icon type="plus" />
  110. <div className="ant-upload-text">点击上传</div>
  111. </div>
  112. );
  113. return (
  114. <div className="clearfix">
  115. <Upload
  116. action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
  117. data={{ 'sign': this.props.pictureSign }}
  118. listType="picture-card"
  119. fileList={fileList}
  120. onPreview={this.handlePreview}
  121. onChange={this.handleChange} >
  122. {fileList.length >= 5 ? null : uploadButton}
  123. </Upload>
  124. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  125. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  126. </Modal>
  127. </div>
  128. );
  129. }
  130. });
  131. const AchievementDetailShow = Form.create()(React.createClass({
  132. getInitialState() {
  133. return {
  134. loading: false,
  135. buttonLoading: false,
  136. contactsObj: {},
  137. data: {},
  138. tags: [],
  139. technicalPictureUrl: [],
  140. coverImg: [],
  141. maturityPictureUrl: [],
  142. textFileList: [],
  143. techPlanFileList: [],
  144. businessPlanFileList: []
  145. };
  146. },
  147. loadData(id, detailApiUrl) {
  148. this.setState({
  149. loading: true
  150. });
  151. $.ajax({
  152. method: "get",
  153. dataType: "json",
  154. crossDomain: false,
  155. url: globalConfig.context + detailApiUrl,
  156. data: {
  157. id: id,
  158. ownerType:this.props.data.ownerType
  159. },
  160. success: function (data) {
  161. let thisData = data.data;
  162. if (!thisData) {
  163. if (data.error && data.error.length) {
  164. message.warning(data.error[0].message);
  165. };
  166. thisData = {};
  167. };
  168. this.setState({
  169. data: thisData,
  170. orgDisplay: thisData.ownerType,
  171. switchValue: Boolean(!thisData.ownerId),
  172. radios:thisData.hot==='1'?true:false,
  173. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  174. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  175. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  176. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  177. });
  178. if (thisData.ownerId) {
  179. this.getContactsList(thisData.ownerId);
  180. };
  181. }.bind(this),
  182. }).always(function () {
  183. this.setState({
  184. loading: false
  185. });
  186. }.bind(this));
  187. },
  188. offShelf() {
  189. this.setState({
  190. loading: true
  191. });
  192. $.ajax({
  193. method: "post",
  194. dataType: "json",
  195. crossDomain: false,
  196. url: globalConfig.context + "/api/admin/achievement/offShelf",
  197. data: { "id": this.props.data.id }
  198. }).done(function (data) {
  199. if (!data.error.length) {
  200. message.success('撤销成功!');
  201. this.setState({
  202. visible: false,
  203. releaseSubmitVisible: false
  204. });
  205. this.props.handleOk();
  206. } else {
  207. message.warning(data.error[0].message);
  208. }
  209. }.bind(this));
  210. },
  211. modifyBroker() {
  212. this.props.form.validateFields((err, values) => {
  213. if (!err) {
  214. this.setState({
  215. loading: true
  216. });
  217. $.ajax({
  218. method: "POST",
  219. dataType: "json",
  220. crossDomain: false,
  221. url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
  222. data: {
  223. id: this.props.data.id,
  224. techBrokerId: values.modifyTechBrokerId
  225. }
  226. }).done(function (data) {
  227. this.state.auditStatus = 0;
  228. this.setState({
  229. loading: false
  230. });
  231. if (data.error && data.error.length) {
  232. message.warning(data.error[0].message);
  233. } else {
  234. message.success('保存成功!');
  235. this.props.handleOk();
  236. this.componentWillMount();
  237. };
  238. }.bind(this));
  239. }
  240. });
  241. },
  242. formSubmit() {
  243. this.props.form.validateFields((err, values) => {
  244. if (values.auditStatus == 3 && !values.techBrokerId) {
  245. message.warning('必须选择一个技术经纪人!');
  246. return
  247. };
  248. if (!err) {
  249. this.setState({
  250. loading: true
  251. });
  252. $.ajax({
  253. method: "POST",
  254. dataType: "json",
  255. crossDomain: false,
  256. url: globalConfig.context + '/api/admin/audit/achievement',
  257. data: {
  258. id: this.props.data.id,
  259. techBroderId: values.techBrokerId,
  260. auditStatus: values.auditStatus
  261. }
  262. }).done(function (data) {
  263. this.state.auditStatus = 0;
  264. this.setState({
  265. loading: false
  266. });
  267. if (!data.error.length) {
  268. message.success('保存成功!');
  269. this.setState({
  270. formSubmitVisible: false
  271. });
  272. this.props.handleOk();
  273. } else {
  274. message.warning(data.error[0].message);
  275. };
  276. }.bind(this));
  277. }
  278. });
  279. },
  280. handleSubmit(e) {
  281. e.preventDefault();
  282. this.props.form.validateFields((err, values) => {
  283. if (values.auditStatus == 4) {
  284. this.setState({
  285. formSubmitVisible: true
  286. });
  287. } else {
  288. this.formSubmit();
  289. };
  290. });
  291. },
  292. buildMatchList() {
  293. this.setState({
  294. buttonLoading: true
  295. });
  296. $.ajax({
  297. method: "POST",
  298. dataType: "json",
  299. crossDomain: false,
  300. url: globalConfig.context + '/api/admin/achievement/matchDemand',
  301. data: {
  302. id: this.props.data.id,
  303. }
  304. }).done(function (data) {
  305. this.setState({
  306. buttonLoading: false
  307. });
  308. if (!data.error.length) {
  309. message.success('匹配完成!匹配到' + data.data + '条记录');
  310. } else {
  311. message.warning(data.error[0].message);
  312. };
  313. }.bind(this));
  314. },
  315. getContactsList(theUid) {
  316. $.ajax({
  317. method: "get",
  318. dataType: "json",
  319. crossDomain: false,
  320. url: globalConfig.context + "/api/admin/getContacts",
  321. data: {
  322. uid: theUid
  323. },
  324. success: function (data) {
  325. if (!data.data) {
  326. if (data.error && data.error.length) {
  327. message.warning(data.error[0].message);
  328. return;
  329. };
  330. } else {
  331. this.setState({
  332. contactsObj: data.data || {}
  333. });
  334. };
  335. }.bind(this),
  336. });
  337. },
  338. componentWillMount() {
  339. this.loadData(this.props.data.id, this.props.detailApiUrl);
  340. },
  341. componentWillReceiveProps(nextProps) {
  342. if (!this.props.visible && nextProps.visible) {
  343. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  344. this.state.textFileList = [];
  345. this.state.techPlanFileList = [];
  346. this.state.businessPlanFileList = [];
  347. this.props.form.resetFields();
  348. };
  349. },
  350. render() {
  351. const theData = this.state.data || {};
  352. const { getFieldDecorator } = this.props.form;
  353. const FormItem = Form.Item
  354. const formItemLayout = {
  355. labelCol: { span: 8 },
  356. wrapperCol: { span: 14 },
  357. };
  358. return (
  359. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  360. <Spin spinning={this.state.loading}>
  361. <div className="clearfix">
  362. <FormItem className="half-item"
  363. {...formItemLayout}
  364. label="编号" >
  365. <span>{theData.serialNumber}</span>
  366. </FormItem>
  367. <FormItem className="half-item"
  368. {...formItemLayout}
  369. label="名称" >
  370. <span>{theData.name}</span>
  371. </FormItem>
  372. <FormItem className="half-item"
  373. {...formItemLayout}
  374. label="数据类别" >
  375. {(() => {
  376. switch (theData.dataCategory) {
  377. case "0":
  378. return <span>成果</span>;
  379. case "1":
  380. return <span>技术</span>;
  381. case "2":
  382. return <span>项目</span>;
  383. }
  384. })()}
  385. </FormItem>
  386. <FormItem className="half-item"
  387. {...formItemLayout}
  388. label="类型" >
  389. <span>{getAchievementCategory(theData.category)}</span>
  390. </FormItem>
  391. <FormItem className="half-item"
  392. {...formItemLayout}
  393. label="精品成果" >
  394. {(() => {
  395. switch (theData.boutique) {
  396. case "0":
  397. return <span>否</span>;
  398. case "1":
  399. return <span>是</span>;
  400. }
  401. })()}
  402. </FormItem>
  403. <FormItem className="half-item"
  404. {...formItemLayout}
  405. label="首页展示" >
  406. {(() => {
  407. switch (theData.hot) {
  408. case "0":
  409. return <span>否</span>;
  410. case "1":
  411. return <span>是</span>;
  412. }
  413. })()}
  414. </FormItem>
  415. </div>
  416. {this.state.radios==true ?<FormItem
  417. labelCol={{ span: 4 }}
  418. wrapperCol={{ span: 18 }}
  419. label="首页展示图片:" >
  420. <div className="clearfix">
  421. <Upload className="demandDetailShow-upload"
  422. listType="picture-card"
  423. fileList={this.state.coverImg}
  424. onPreview={(file) => {
  425. this.setState({
  426. previewImage: file.url || file.thumbUrl,
  427. previewVisible: true,
  428. });
  429. }} >
  430. </Upload>
  431. <Modal maskClosable={false} footer={null}
  432. visible={this.state.previewVisible}
  433. onCancel={() => { this.setState({ previewVisible: false }) }}>
  434. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  435. </Modal>
  436. </div>
  437. </FormItem>:<div></div>}
  438. <div className="clearfix">
  439. <FormItem className="half-item"
  440. {...formItemLayout}
  441. label="是否发布" >
  442. {(() => {
  443. switch (theData.releaseStatus) {
  444. case "0":
  445. return <span>未发布</span>;
  446. case "1":
  447. return <div>
  448. <span>已发布</span>
  449. <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
  450. <Modal maskClosable={false} title="确认"
  451. visible={this.state.releaseSubmitVisible}
  452. width='300px'
  453. footer={null}
  454. onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
  455. <span>确认要撤销发布吗?</span>
  456. <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
  457. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
  458. </Modal>
  459. </div>;
  460. }
  461. })()}
  462. </FormItem>
  463. <FormItem className="half-item"
  464. {...formItemLayout}
  465. label="发布时间" >
  466. <span>{theData.releaseDateFormattedDate}</span>
  467. </FormItem>
  468. <FormItem className="half-item"
  469. {...formItemLayout}
  470. label="审核状态" >
  471. <span>{getTechAuditStatus(theData.auditStatus)}</span>
  472. </FormItem>
  473. <FormItem className="half-item"
  474. {...formItemLayout}
  475. label="是否国际" >
  476. <span>{getboutique(theData.internationalFlag)}</span>
  477. </FormItem>
  478. </div>
  479. <FormItem
  480. labelCol={{ span: 4 }}
  481. wrapperCol={{ span: 18 }}
  482. label="关键词" >
  483. {this.state.tags.map((tag) => {
  484. return <Tooltip key={tag} title={tag}>
  485. <Tag key={tag}>{tag}</Tag>
  486. </Tooltip>;
  487. })}
  488. </FormItem>
  489. <FormItem
  490. labelCol={{ span: 4 }}
  491. wrapperCol={{ span: 18 }}
  492. label="摘要" >
  493. <span>{theData.summary}</span>
  494. </FormItem>
  495. <FormItem
  496. labelCol={{ span: 4 }}
  497. wrapperCol={{ span: 18 }}
  498. label="成果简介" >
  499. <span>{theData.introduction}</span>
  500. </FormItem>
  501. <FormItem
  502. labelCol={{ span: 4 }}
  503. wrapperCol={{ span: 18 }}
  504. label="备注" >
  505. <span>{theData.remark}</span>
  506. </FormItem>
  507. <FormItem
  508. labelCol={{ span: 4 }}
  509. wrapperCol={{ span: 18 }}
  510. label="技术图片" >
  511. <div className="clearfix">
  512. <Upload className="demandDetailShow-upload"
  513. listType="picture-card"
  514. fileList={this.state.technicalPictureUrl}
  515. onPreview={(file) => {
  516. this.setState({
  517. previewImage: file.url || file.thumbUrl,
  518. previewVisible: true,
  519. });
  520. }} >
  521. </Upload>
  522. <Modal maskClosable={false} footer={null}
  523. visible={this.state.previewVisible}
  524. onCancel={() => { this.setState({ previewVisible: false }) }}>
  525. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  526. </Modal>
  527. </div>
  528. </FormItem>
  529. <FormItem
  530. labelCol={{ span: 4 }}
  531. wrapperCol={{ span: 18 }}
  532. label="应用领域" >
  533. <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
  534. </FormItem>
  535. <div className="clearfix">
  536. <FormItem className="half-item"
  537. {...formItemLayout}
  538. label="成熟度" >
  539. <span>{getMaturity(theData.maturity)}</span>
  540. </FormItem>
  541. <FormItem className="half-item"
  542. {...formItemLayout}
  543. label="创新度" >
  544. <span>{getInnovation(theData.innovation)}</span>
  545. </FormItem>
  546. </div>
  547. <FormItem
  548. labelCol={{ span: 4 }}
  549. wrapperCol={{ span: 18 }}
  550. label="成熟度证明材料(图片)" >
  551. <Upload className="demandDetailShow-upload"
  552. listType="picture-card"
  553. fileList={this.state.maturityPictureUrl}
  554. onPreview={(file) => {
  555. this.setState({
  556. previewImage: file.url || file.thumbUrl,
  557. previewVisible: true,
  558. });
  559. }} >
  560. </Upload>
  561. </FormItem>
  562. <FormItem
  563. labelCol={{ span: 4 }}
  564. wrapperCol={{ span: 6 }}
  565. label="成熟度证明材料(文本)" >
  566. <p>{theData.maturityTextFileUrl ?
  567. <span className="download-file">
  568. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  569. </span>
  570. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  571. </FormItem>
  572. <FormItem
  573. labelCol={{ span: 4 }}
  574. wrapperCol={{ span: 18 }}
  575. label="成熟度证明材料(视频地址)" >
  576. <span>{theData.maturityVideoUrl}</span>
  577. </FormItem>
  578. {this.state.switchValue ?
  579. <div className="clearfix" >
  580. <FormItem className="half-item"
  581. {...formItemLayout}
  582. label="成果所有人名称" >
  583. <span>{theData.ownerName}</span>
  584. </FormItem>
  585. <FormItem className="half-item"
  586. {...formItemLayout}
  587. label="联系电话" >
  588. <span>{theData.ownerMobile}</span>
  589. </FormItem>
  590. <FormItem className="half-item"
  591. {...formItemLayout}
  592. label="证件号" >
  593. <span>{theData.ownerIdNumber}</span>
  594. </FormItem>
  595. <FormItem className="half-item"
  596. {...formItemLayout}
  597. label="电子邮箱" >
  598. <span>{theData.ownerEmail}</span>
  599. </FormItem>
  600. <FormItem className="half-item"
  601. {...formItemLayout}
  602. label="通讯地址" >
  603. <span>{theData.ownerPostalAddress}</span>
  604. </FormItem>
  605. </div> : <div className="clearfix" >
  606. <FormItem className="half-item"
  607. {...formItemLayout}
  608. label="成果所有人名称" >
  609. <span>{theData.iOwnerName}</span>
  610. </FormItem>
  611. <FormItem className="half-item"
  612. {...formItemLayout}
  613. label="联系电话" >
  614. {theData.ownerType == "1" ? <span>{this.state.contactsObj[theData.contacts]}</span> : <span>{theData.iOwnerMobile}</span>}
  615. </FormItem>
  616. <FormItem className="half-item"
  617. {...formItemLayout}
  618. label="证件号" >
  619. <span>{theData.iOwnerIdNumber}</span>
  620. </FormItem>
  621. <FormItem className="half-item"
  622. {...formItemLayout}
  623. label="电子邮箱" >
  624. <span>{theData.iOwnerEmail}</span>
  625. </FormItem>
  626. <FormItem className="half-item"
  627. {...formItemLayout}
  628. label="通讯地址" >
  629. <span>{theData.iOwnerPostalAddress}</span>
  630. </FormItem>
  631. </div>}
  632. <div className="clearfix">
  633. <FormItem className="half-item"
  634. {...formItemLayout}
  635. label="合作方式" >
  636. {(() => {
  637. switch (theData.cooperationMode) {
  638. case "0":
  639. return <span>技术转让</span>;
  640. case "1":
  641. return <span>授权生产</span>;
  642. }
  643. })()}
  644. </FormItem>
  645. <FormItem className="half-item"
  646. {...formItemLayout}
  647. label="转让方式" >
  648. <span>{getTransferMode(theData.transferMode)}</span>
  649. </FormItem>
  650. </div>
  651. <div className="clearfix">
  652. <FormItem className="half-item"
  653. {...formItemLayout}
  654. label="议价方式" >
  655. {(() => {
  656. switch (theData.bargainingMode) {
  657. case "0":
  658. return <span>面议</span>;
  659. case "1":
  660. return <span>定价</span>;
  661. }
  662. })()}
  663. </FormItem>
  664. {theData.bargainingMode == 0 ? <div></div> : <FormItem className="half-item"
  665. {...formItemLayout}
  666. label="转让价格" >
  667. <span>{theData.transferPrice} 万元</span>
  668. </FormItem>}
  669. </div>
  670. <FormItem
  671. labelCol={{ span: 4 }}
  672. wrapperCol={{ span: 18 }}
  673. label="技术场景" >
  674. <span>{theData.technicalScene}</span>
  675. </FormItem>
  676. <FormItem
  677. labelCol={{ span: 4 }}
  678. wrapperCol={{ span: 18 }}
  679. label="技术突破" >
  680. <span>{theData.breakthrough}</span>
  681. </FormItem>
  682. <FormItem
  683. labelCol={{ span: 4 }}
  684. wrapperCol={{ span: 18 }}
  685. label="专利情况" >
  686. <span>{theData.patentCase}</span>
  687. </FormItem>
  688. <FormItem
  689. labelCol={{ span: 4 }}
  690. wrapperCol={{ span: 18 }}
  691. label="获奖情况" >
  692. <span>{theData.awards}</span>
  693. </FormItem>
  694. <FormItem
  695. labelCol={{ span: 4 }}
  696. wrapperCol={{ span: 18 }}
  697. label="技术团队情况" >
  698. <span>{theData.teamDes}</span>
  699. </FormItem>
  700. <FormItem
  701. labelCol={{ span: 4 }}
  702. wrapperCol={{ span: 18 }}
  703. label="技术参数" >
  704. <span>{theData.parameter}</span>
  705. </FormItem>
  706. <FormItem
  707. labelCol={{ span: 4 }}
  708. wrapperCol={{ span: 6 }}
  709. label="技术方案" >
  710. <p>{theData.techPlanUrl ?
  711. <span className="download-file">
  712. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  713. </span>
  714. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  715. </FormItem>
  716. <FormItem
  717. labelCol={{ span: 4 }}
  718. wrapperCol={{ span: 6 }}
  719. label="商业计划书" >
  720. <p>{theData.businessPlanUrl ?
  721. <span className="download-file">
  722. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  723. </span>
  724. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  725. </FormItem>
  726. {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
  727. <FormItem className="half-item"
  728. {...formItemLayout}
  729. label="审核状态" >
  730. {getFieldDecorator('auditStatus')(
  731. <Radio.Group>
  732. <Radio value={3}>审核通过</Radio>
  733. <Radio value={4}>审核未通过</Radio>
  734. </Radio.Group>
  735. )}
  736. </FormItem>
  737. <FormItem className="half-item"
  738. {...formItemLayout}
  739. label="技术经纪人" >
  740. {getFieldDecorator('techBrokerId', {
  741. initialValue: theData.techBrokerId
  742. })(
  743. <Select style={{ width: 260 }}
  744. placeholder="请选择技术经纪人"
  745. notFoundContent="未获取到经纪人列表"
  746. showSearch
  747. filterOption={companySearch}>
  748. {this.props.techBrodersOption}
  749. </Select>
  750. )}
  751. </FormItem>
  752. </div> : <div></div>}
  753. {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
  754. <FormItem className="half-item"
  755. {...formItemLayout}
  756. label="指派新经纪人" >
  757. {getFieldDecorator('modifyTechBrokerId', {
  758. initialValue: theData.techBrokerId
  759. })(
  760. <Select style={{ width: 260 }}
  761. placeholder="请选择要指派的新经纪人"
  762. notFoundContent="未获取到经纪人列表"
  763. showSearch
  764. filterOption={companySearch}>
  765. {this.props.techBrodersOption}
  766. </Select>
  767. )}
  768. </FormItem>
  769. </div> : <div></div>}
  770. <Modal maskClosable={false} title="确认"
  771. visible={this.state.formSubmitVisible}
  772. width='360px'
  773. footer={null}
  774. onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
  775. <span>确认该需求审核未通过?</span>
  776. <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
  777. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
  778. </Modal>
  779. </Spin>
  780. </Form >
  781. )
  782. }
  783. }));
  784. const AchievementDetailForm = Form.create()(React.createClass({
  785. getInitialState() {
  786. return {
  787. loading: false,
  788. auditStatus: 0,
  789. textFileList: [],
  790. switchValue: false,
  791. radios: false,
  792. techPlanFileList: [],
  793. data: {},
  794. tags: [],
  795. technicalPictureUrl: [],
  796. coverImg: [],
  797. maturityPictureUrl: [],
  798. businessPlanFileList: [],
  799. dataSource: [],
  800. };
  801. },
  802. loadData(id, detailApiUrl) {
  803. this.setState({
  804. loading: true
  805. });
  806. $.ajax({
  807. method: "get",
  808. dataType: "json",
  809. crossDomain: false,
  810. url: globalConfig.context + detailApiUrl,
  811. data: {
  812. id: id,
  813. ownerType:this.props.data.ownerType
  814. },
  815. success: function (data) {
  816. let thisData = data.data;
  817. if (!thisData) {
  818. if (data.error && data.error.length) {
  819. message.warning(data.error[0].message);
  820. };
  821. thisData = {};
  822. };
  823. this.setState({
  824. data: thisData,
  825. orgDisplay: thisData.ownerType,
  826. switchValue: Boolean(!thisData.ownerId),
  827. radios: thisData.hot == '1' ? true : false,
  828. transferPriceDis: thisData.bargainingMode == 1 ? true : false,
  829. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  830. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  831. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  832. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  833. });
  834. if (thisData.ownerType == "1" && thisData.ownerId) {
  835. this.getContactsList(thisData.ownerId);
  836. };
  837. }.bind(this),
  838. }).always(function () {
  839. this.setState({
  840. loading: false
  841. });
  842. }.bind(this));
  843. },
  844. getContactsList(theUid) {
  845. $.ajax({
  846. method: "get",
  847. dataType: "json",
  848. crossDomain: false,
  849. url: globalConfig.context + "/api/admin/getContacts",
  850. data: {
  851. uid: theUid
  852. },
  853. success: function (data) {
  854. let theOption = [];
  855. if (!data.data) {
  856. if (data.error && data.error.length) {
  857. message.warning(data.error[0].message);
  858. return;
  859. };
  860. };
  861. for (let item in data.data) {
  862. let theData = data.data[item];
  863. theOption.push(
  864. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  865. );
  866. };
  867. this.setState({
  868. contactsOption: theOption
  869. });
  870. }.bind(this),
  871. });
  872. },
  873. getTagsArr(e) {
  874. this.setState({ tags: e });
  875. },
  876. getMaturityPictureUrl(e) {
  877. this.setState({ maturityPictureUrl: e });
  878. },
  879. getTechnicalPictureUrl(e) {
  880. this.setState({ technicalPictureUrl: e });
  881. },
  882. getcoverImg(e) {
  883. this.setState({coverImg: e });
  884. },
  885. handleSearch(e) {
  886. if (this.props.detailApiUrl.indexOf('org') != -1) {
  887. $.ajax({
  888. method: "get",
  889. dataType: "json",
  890. crossDomain: false,
  891. url: globalConfig.context + "/api/admin/achievement/orgOwner",
  892. data: { name: e },
  893. success: function (data) {
  894. let theArr = [];
  895. let theObj = {};
  896. if (!data.data) {
  897. if (data.error && data.error.length) {
  898. message.warning(data.error[0].message);
  899. };
  900. } else if (!$.isEmptyObject(data.data)) {
  901. data.data.map(function (item) {
  902. theArr.push(item.unitName);
  903. theObj[item.unitName] = item.uid;
  904. });
  905. };
  906. this.setState({
  907. dataSource: theArr,
  908. dataSourceObj: theObj
  909. });
  910. }.bind(this),
  911. });
  912. } else {
  913. $.ajax({
  914. method: "get",
  915. dataType: "json",
  916. crossDomain: false,
  917. url: globalConfig.context + "/api/admin/achievement/userOwner",
  918. data: { name: e },
  919. success: function (data) {
  920. let theArr = [];
  921. let theObj = {};
  922. if (!data.data) {
  923. if (data.error && data.error.length) {
  924. message.warning(data.error[0].message);
  925. };
  926. } else if (!$.isEmptyObject(data.data)) {
  927. for (let item in data.data) {
  928. theArr.push(data.data[item]);
  929. theObj[data.data[item]] = item;
  930. };
  931. };
  932. this.setState({
  933. dataSource: theArr,
  934. dataSourceObj: theObj
  935. });
  936. }.bind(this),
  937. });
  938. };
  939. },
  940. handleSubmit(e) {
  941. e.preventDefault();
  942. this.props.form.validateFields((err, values) => {
  943. //keyword长度判断
  944. if ((this.state.tags ? this.state.tags.length : this.props.tags.length) < 3) {
  945. message.warning('关键词数量不能小于3个!');
  946. return;
  947. };
  948. if (values.bargainingMode == 1 && !values.transferPrice) {
  949. message.warning('议价方式为[ 定价 ]时, [ 转让价格 ]不能为空!');
  950. return;
  951. }
  952. if(values.field[0]==undefined){
  953. message.warning('应用领域不能为空!')
  954. return false;
  955. }
  956. //url转化
  957. let theTechnicalPictureUrl = [];
  958. if (this.state.technicalPictureUrl.length) {
  959. let picArr = [];
  960. this.state.technicalPictureUrl.map(function (item) {
  961. if ( item.response && item.response.data && item.response.data.length ){
  962. picArr.push(item.response.data);
  963. }
  964. });
  965. theTechnicalPictureUrl = picArr.join(",");
  966. };
  967. let thecoverImg = [];
  968. if (this.state.coverImg.length) {
  969. let picArr = [];
  970. this.state.coverImg.map(function (item) {
  971. if ( item.response && item.response.data && item.response.data.length ){
  972. picArr.push(item.response.data);
  973. }
  974. });
  975. thecoverImg = picArr.join(",");
  976. };
  977. let theMaturityPictureUrl = [];
  978. if (this.state.maturityPictureUrl.length) {
  979. let picArr = [];
  980. this.state.maturityPictureUrl.map(function (item) {
  981. if ( item.response && item.response.data && item.response.data.length ){
  982. picArr.push(item.response.data);
  983. }
  984. });
  985. theMaturityPictureUrl = picArr.join(",");
  986. };
  987. if (!err) {
  988. this.setState({
  989. loading: true
  990. });
  991. $.ajax({
  992. method: "POST",
  993. dataType: "json",
  994. crossDomain: false,
  995. url: this.props.data.id ? globalConfig.context + '/api/admin/achievement/update' : globalConfig.context + '/api/admin/achievement/apply',
  996. data: {
  997. id: this.props.data.id,
  998. dataCategory: values.dataCategory,
  999. serialNumber: this.props.data.serialNumber,
  1000. name: values.name,
  1001. keyword: this.state.tags ? this.state.tags.join(",") : this.props.tags.join(","),
  1002. keywords: this.state.tags ? this.state.tags : this.props.tags,
  1003. category: values.category,
  1004. summary: values.summary,
  1005. introduction: values.introduction,
  1006. remark: values.remark,
  1007. technicalPictureUrl: theTechnicalPictureUrl,
  1008. coverImg: thecoverImg,
  1009. fieldA: values.field ? values.field[0] : undefined,
  1010. fieldB: values.field ? values.field[1] : undefined,
  1011. maturity: values.maturity,
  1012. maturityPictureUrl: theMaturityPictureUrl,
  1013. maturityTextFileUrl: this.state.maturityTextFileUrl,
  1014. maturityVideoUrl: values.maturityVideoUrl,
  1015. innovation: values.innovation,
  1016. //
  1017. switchSign: this.state.switchValue ? 1 : 0,
  1018. //
  1019. ownerId: !this.state.switchValue ? (this.state.dataSourceObj ? this.state.dataSourceObj[values.iOwnerName] : this.state.data.ownerId) : undefined,
  1020. contacts: !this.state.switchValue ? values.contacts : undefined,
  1021. ownerType: this.state.orgDisplay,//this.props.detailApiUrl.indexOf('org') != -1 ? 1 : 0,
  1022. //自定义
  1023. ownerName: this.state.switchValue ? values.ownerName : undefined,
  1024. ownerIdNumber: this.state.switchValue ? values.ownerIdNumber : undefined,
  1025. ownerMobile: this.state.switchValue ? values.ownerMobile : undefined,
  1026. ownerEmail: this.state.switchValue ? values.ownerEmail : undefined,
  1027. ownerPostalAddress: this.state.switchValue ? values.ownerPostalAddress : undefined,
  1028. //
  1029. cooperationMode: values.cooperationMode,
  1030. transferMode: values.transferMode,
  1031. bargainingMode: values.bargainingMode,
  1032. transferPrice: values.transferPrice,
  1033. technicalScene: values.technicalScene,
  1034. breakthrough: values.breakthrough,
  1035. patentCase: values.patentCase,
  1036. awards: values.awards,
  1037. teamDes: values.teamDes,
  1038. parameter: values.parameter,
  1039. releaseStatus: values.releaseStatus,
  1040. techPlanUrl: this.state.techPlanUrl,
  1041. businessPlanUrl: this.state.businessPlanUrl,
  1042. auditStatus: this.state.auditStatus,
  1043. boutique: values.boutique,
  1044. internationalFlag:values.internationalFlag,
  1045. hot: values.hot,
  1046. }
  1047. }).done(function (data) {
  1048. this.state.auditStatus = 0;
  1049. this.setState({
  1050. loading: false
  1051. });
  1052. if (!data.error.length) {
  1053. message.success('保存成功!');
  1054. this.props.handleOk();
  1055. this.componentWillMount();
  1056. } else {
  1057. message.warning(data.error[0].message);
  1058. }
  1059. }.bind(this));
  1060. }
  1061. });
  1062. },
  1063. componentWillMount() {
  1064. this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
  1065. if (this.props.data && this.props.data.id) {
  1066. this.loadData(this.props.data.id, this.props.detailApiUrl);
  1067. };
  1068. },
  1069. componentWillReceiveProps(nextProps) {
  1070. if (!this.props.visible && nextProps.visible) {
  1071. if (nextProps.data && nextProps.data.id) {
  1072. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1073. };
  1074. this.state.data = {};
  1075. this.state.tags = [];
  1076. this.state.switchValue = false;
  1077. this.state.radios = false;
  1078. this.state.technicalPictureUrl = [];
  1079. this.state.coverImg = [];
  1080. this.state.maturityPictureUrl = [];
  1081. this.state.textFileList = [];
  1082. this.state.techPlanFileList = [];
  1083. this.state.businessPlanFileList = [];
  1084. this.props.form.resetFields();
  1085. this.state.orgDisplay=undefined;
  1086. };
  1087. },
  1088. render() {
  1089. const theData = this.state.data || {};
  1090. const { getFieldDecorator } = this.props.form;
  1091. const FormItem = Form.Item
  1092. const formItemLayout = {
  1093. labelCol: { span: 8 },
  1094. wrapperCol: { span: 14 },
  1095. };
  1096. console.log(this.state.orgDisplay)
  1097. return (
  1098. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  1099. <Spin spinning={this.state.loading}>
  1100. <div className="clearfix">
  1101. <FormItem className="half-item"
  1102. {...formItemLayout}
  1103. label="编号" >
  1104. <span>{theData.serialNumber}</span>
  1105. </FormItem>
  1106. <FormItem className="half-item"
  1107. {...formItemLayout}
  1108. label="名称" >
  1109. {getFieldDecorator('name', {
  1110. rules: [{ required: true, message: '此项为必填项!' }],
  1111. initialValue: theData.name
  1112. })(
  1113. <Input />
  1114. )}
  1115. </FormItem>
  1116. <FormItem className="half-item"
  1117. {...formItemLayout}
  1118. label="数据类别" >
  1119. {getFieldDecorator('dataCategory', {
  1120. rules: [{ required: true, message: '此项为必填项!' }],
  1121. initialValue: theData.dataCategory
  1122. })(
  1123. <Select placeholder="选择数据类型" style={{ width: 160 }} >
  1124. <Select.Option value="0" >成果</Select.Option>
  1125. <Select.Option value="1" >技术</Select.Option>
  1126. <Select.Option value="2" >项目</Select.Option>
  1127. </Select>
  1128. )}
  1129. </FormItem>
  1130. <FormItem className="half-item"
  1131. {...formItemLayout}
  1132. label="类型" >
  1133. {getFieldDecorator('category', {
  1134. rules: [{ required: true, message: '此项为必填项!' }],
  1135. initialValue: theData.category
  1136. })(
  1137. <Select style={{ width: 160 }} placeholder="请选择成果类型">
  1138. {this.props.achievementCategoryOption}
  1139. </Select>
  1140. )}
  1141. </FormItem>
  1142. <FormItem className="half-item"
  1143. {...formItemLayout}
  1144. label="精品成果" >
  1145. {getFieldDecorator('boutique', {
  1146. initialValue: theData.boutique
  1147. })(
  1148. <Radio.Group>
  1149. <Radio value="0">否</Radio>
  1150. <Radio value="1">是</Radio>
  1151. </Radio.Group>
  1152. )}
  1153. </FormItem>
  1154. <FormItem className="half-item"
  1155. {...formItemLayout}
  1156. label="首页展示:" >
  1157. {getFieldDecorator('hot', {
  1158. initialValue: theData.hot
  1159. })(
  1160. <Radio.Group onChange={(e) => { this.setState({ radios: e.target.value }); }}>
  1161. <Radio value="0">否</Radio>
  1162. <Radio value="1">是</Radio>
  1163. </Radio.Group>
  1164. )}
  1165. </FormItem>
  1166. {this.state.radios==true ? <FormItem
  1167. labelCol={{ span: 4 }}
  1168. wrapperCol={{ span: 18 }}
  1169. label="首页展示图片:"
  1170. style={{display:'block'}}
  1171. >
  1172. <PicturesWall
  1173. pictureSign="achievement_cover_picture"
  1174. fileList={this.getcoverImg}
  1175. pictureUrl={this.state.coverImg} />
  1176. <p>图片尺寸建议:220X140(像素)</p>
  1177. </FormItem>:<div></div>}
  1178. <div className="clearfix">
  1179. <FormItem className="half-item"
  1180. {...formItemLayout}
  1181. label="是否发布" >
  1182. {(() => {
  1183. switch (theData.releaseStatus) {
  1184. case "0":
  1185. return <span>未发布</span>;
  1186. case "1":
  1187. return <span>已发布</span>;
  1188. }
  1189. })()}
  1190. </FormItem>
  1191. <FormItem className="half-item"
  1192. {...formItemLayout}
  1193. label="发布时间" >
  1194. <span>{theData.releaseDateFormattedDate}</span>
  1195. </FormItem>
  1196. <FormItem className="half-item"
  1197. {...formItemLayout}
  1198. label="审核状态" >
  1199. <span>{getTechAuditStatus(theData.auditStatus)}</span>
  1200. </FormItem>
  1201. <FormItem className="half-item"
  1202. {...formItemLayout}
  1203. label="是否国际" >
  1204. {getFieldDecorator('internationalFlag', {
  1205. initialValue: theData.internationalFlag
  1206. })(
  1207. <Radio.Group>
  1208. <Radio value="0">否</Radio>
  1209. <Radio value="1">是</Radio>
  1210. </Radio.Group>
  1211. )}
  1212. </FormItem>
  1213. </div>
  1214. </div>
  1215. <FormItem
  1216. labelCol={{ span: 4 }}
  1217. wrapperCol={{ span: 18 }}
  1218. label="关键词" >
  1219. <KeyWordTagGroup
  1220. keyWordArr={this.state.tags}
  1221. tagsArr={this.getTagsArr} />
  1222. </FormItem>
  1223. <FormItem
  1224. labelCol={{ span: 4 }}
  1225. wrapperCol={{ span: 18 }}
  1226. label="成果类别" >
  1227. <Select placeholder="选择成果类别" style={{ width: 120 }}
  1228. value={this.state.orgDisplay}
  1229. onChange={(e) => { this.setState({ orgDisplay: e }) }}>
  1230. <Select.Option value="0" >个人</Select.Option>
  1231. <Select.Option value="1" >组织</Select.Option>
  1232. </Select>
  1233. </FormItem>
  1234. <FormItem
  1235. labelCol={{ span: 4 }}
  1236. wrapperCol={{ span: 18 }}
  1237. label="摘要" >
  1238. {getFieldDecorator('summary', {
  1239. initialValue: theData.summary
  1240. })(
  1241. <Input type="textarea" rows={4} />
  1242. )}
  1243. </FormItem>
  1244. <FormItem
  1245. labelCol={{ span: 4 }}
  1246. wrapperCol={{ span: 18 }}
  1247. label="成果简介" >
  1248. {getFieldDecorator('introduction', {
  1249. initialValue: theData.introduction
  1250. })(
  1251. <Input type="textarea" rows={4} placeholder="项目成果简介;项目核心创新点;项目详细用途;预期效益说明;主要技术(性能)指标;市场前景;应用范围;发展历程。" />
  1252. )}
  1253. </FormItem>
  1254. <FormItem
  1255. labelCol={{ span: 4 }}
  1256. wrapperCol={{ span: 18 }}
  1257. label="备注" >
  1258. {getFieldDecorator('remark', {
  1259. initialValue: theData.remark
  1260. })(
  1261. <Input type="textarea" rows={4} placeholder="此处输入备注" />
  1262. )}
  1263. </FormItem>
  1264. <FormItem
  1265. labelCol={{ span: 4 }}
  1266. wrapperCol={{ span: 18 }}
  1267. label="技术图片" >
  1268. <PicturesWall
  1269. pictureSign="achievement_technical_picture"
  1270. fileList={this.getTechnicalPictureUrl}
  1271. pictureUrl={this.state.technicalPictureUrl} />
  1272. <p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
  1273. </FormItem>
  1274. <FormItem
  1275. labelCol={{ span: 4 }}
  1276. wrapperCol={{ span: 18 }}
  1277. label="应用领域" >
  1278. {getFieldDecorator('field', {
  1279. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  1280. initialValue: [theData.fieldA, theData.fieldB]
  1281. })(
  1282. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="应用领域" />
  1283. )}
  1284. </FormItem>
  1285. <div className="clearfix">
  1286. <FormItem className="half-item"
  1287. {...formItemLayout}
  1288. label="成熟度" >
  1289. {getFieldDecorator('maturity', {
  1290. initialValue: theData.maturity
  1291. })(
  1292. <Select placeholder="选择成熟度" style={{ width: 160 }} >
  1293. {
  1294. maturityList.map(function (item) {
  1295. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1296. })
  1297. }
  1298. </Select>
  1299. )}
  1300. </FormItem>
  1301. <FormItem className="half-item"
  1302. {...formItemLayout}
  1303. label="创新度" >
  1304. {getFieldDecorator('innovation', {
  1305. initialValue: theData.innovation
  1306. })(
  1307. <Select placeholder="选择创新度" style={{ width: 160 }} >
  1308. {
  1309. innovationList.map(function (item) {
  1310. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1311. })
  1312. }
  1313. </Select>
  1314. )}
  1315. </FormItem>
  1316. </div>
  1317. <FormItem
  1318. labelCol={{ span: 4 }}
  1319. wrapperCol={{ span: 18 }}
  1320. label="成熟度证明材料(图片)" >
  1321. <PicturesWall
  1322. pictureSign="achievement_maturity_picture"
  1323. fileList={this.getMaturityPictureUrl}
  1324. pictureUrl={this.state.maturityPictureUrl} />
  1325. </FormItem>
  1326. <FormItem
  1327. labelCol={{ span: 4 }}
  1328. wrapperCol={{ span: 6 }}
  1329. label="成熟度证明材料(文本)" >
  1330. <Upload
  1331. name="ratepay"
  1332. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1333. data={{ 'sign': 'achievement_maturity_text_file' }}
  1334. beforeUpload={beforeUploadFile}
  1335. fileList={this.state.textFileList}
  1336. onChange={(info) => {
  1337. if (info.file.status !== 'uploading') {
  1338. }
  1339. if (info.file.status === 'done') {
  1340. if (!info.file.response.error.length) {
  1341. message.success(`${info.file.name} 文件上传成功!`);
  1342. } else {
  1343. message.warning(info.file.response.error[0].message);
  1344. return;
  1345. };
  1346. this.state.maturityTextFileUrl = info.file.response.data;
  1347. } else if (info.file.status === 'error') {
  1348. message.error(`${info.file.name} 文件上传失败。`);
  1349. };
  1350. this.setState({ textFileList: info.fileList.slice(-1) });
  1351. }} >
  1352. <Button><Icon type="upload" /> 上传成熟度证明文本 </Button>
  1353. </Upload>
  1354. <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
  1355. <span className="download-file">
  1356. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  1357. </span>
  1358. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1359. </FormItem>
  1360. <FormItem
  1361. labelCol={{ span: 4 }}
  1362. wrapperCol={{ span: 18 }}
  1363. label="成熟度证明材料(视频地址)" >
  1364. {getFieldDecorator('maturityVideoUrl', {
  1365. initialValue: theData.maturityVideoUrl
  1366. })(
  1367. <Input />
  1368. )}
  1369. </FormItem>
  1370. <FormItem
  1371. labelCol={{ span: 4 }}
  1372. wrapperCol={{ span: 18 }}
  1373. label="自定义成果所有人" >
  1374. <Switch checked={this.state.switchValue} onChange={(e) => { this.setState({ switchValue: e }); }} />
  1375. </FormItem>
  1376. {this.state.switchValue ? <div className="clearfix" >
  1377. <FormItem className="half-item"
  1378. {...formItemLayout}
  1379. label="成果所有人" >
  1380. {getFieldDecorator('ownerName', {
  1381. initialValue: theData.ownerName
  1382. })(
  1383. <Input />
  1384. )}
  1385. </FormItem>
  1386. <FormItem className="half-item"
  1387. {...formItemLayout}
  1388. label="联系电话" >
  1389. {getFieldDecorator('ownerMobile', {
  1390. initialValue: theData.ownerMobile
  1391. })(
  1392. <Input />
  1393. )}
  1394. </FormItem>
  1395. <FormItem className="half-item"
  1396. {...formItemLayout}
  1397. label="证件号" >
  1398. {getFieldDecorator('ownerIdNumber', {
  1399. initialValue: theData.ownerIdNumber
  1400. })(
  1401. <Input />
  1402. )}
  1403. </FormItem>
  1404. <FormItem className="half-item"
  1405. {...formItemLayout}
  1406. label="电子邮箱" >
  1407. {getFieldDecorator('ownerEmail', {
  1408. initialValue: theData.ownerEmail
  1409. })(
  1410. <Input />
  1411. )}
  1412. </FormItem>
  1413. <FormItem className="half-item"
  1414. {...formItemLayout}
  1415. label="通讯地址" >
  1416. {getFieldDecorator('ownerPostalAddress', {
  1417. initialValue: theData.ownerPostalAddress
  1418. })(
  1419. <Input />
  1420. )}
  1421. </FormItem>
  1422. </div> : <div className="clearfix" >
  1423. <FormItem className="half-item"
  1424. {...formItemLayout}
  1425. label="成果所有人" >
  1426. {getFieldDecorator('iOwnerName', {
  1427. initialValue: theData.iOwnerName || ''
  1428. })(
  1429. <AutoComplete
  1430. dataSource={this.state.dataSource}
  1431. style={{ width: 200 }}
  1432. onSearch={this.state.therottleSearch}
  1433. placeholder="输入成果所有人"
  1434. onSelect={(e) => {
  1435. this.getContactsList(this.state.dataSourceObj[e]);
  1436. }} />
  1437. )}
  1438. </FormItem>
  1439. {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
  1440. {...formItemLayout}
  1441. label="联系人" >
  1442. {getFieldDecorator('contacts', {
  1443. initialValue: theData.contacts
  1444. })(
  1445. <Select style={{ width: 260 }}
  1446. placeholder="请选择联系人"
  1447. notFoundContent="未获取到联系人列表"
  1448. showSearch
  1449. filterOption={companySearch}>
  1450. {this.state.contactsOption}
  1451. </Select>
  1452. )}
  1453. </FormItem> : <div></div>}
  1454. </div>}
  1455. <div className="clearfix">
  1456. <FormItem className="half-item"
  1457. {...formItemLayout}
  1458. label="合作方式" >
  1459. {getFieldDecorator('cooperationMode', {
  1460. rules: [{ required: true, message: '此项为必填项!' }],
  1461. initialValue: theData.cooperationMode
  1462. })(
  1463. <Radio.Group>
  1464. <Radio value="0">技术转让</Radio>
  1465. <Radio value="1">授权生产</Radio>
  1466. </Radio.Group>
  1467. )}
  1468. </FormItem>
  1469. <FormItem className="half-item"
  1470. {...formItemLayout}
  1471. label="转让方式" >
  1472. {getFieldDecorator('transferMode', {
  1473. initialValue: theData.transferMode
  1474. })(
  1475. <Select placeholder="选择转让方式" style={{ width: 160 }} >
  1476. {
  1477. transferModeList.map(function (item) {
  1478. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1479. })
  1480. }
  1481. </Select>
  1482. )}
  1483. </FormItem>
  1484. </div>
  1485. <div className="clearfix">
  1486. <FormItem className="half-item"
  1487. {...formItemLayout}
  1488. label="议价方式" >
  1489. {getFieldDecorator('bargainingMode', {
  1490. initialValue: theData.bargainingMode
  1491. })(
  1492. <Radio.Group onChange={(e) => {
  1493. this.setState({
  1494. transferPriceDis: (e.target.value == 1 ? true : false)
  1495. })
  1496. }}>
  1497. <Radio value="0">面议</Radio>
  1498. <Radio value="1">定价</Radio>
  1499. </Radio.Group>
  1500. )}
  1501. </FormItem>
  1502. {this.state.transferPriceDis ? <FormItem className="half-item"
  1503. {...formItemLayout}
  1504. label="转让价格" >
  1505. {getFieldDecorator('transferPrice', {
  1506. initialValue: theData.transferPrice || 0
  1507. })(
  1508. <InputNumber min={0} max={999999} step={0.01} />
  1509. )}
  1510. <span style={{ marginLeft: '20px' }}>万元</span>
  1511. </FormItem> : <div></div>}
  1512. </div>
  1513. <FormItem
  1514. labelCol={{ span: 4 }}
  1515. wrapperCol={{ span: 18 }}
  1516. label="技术场景" >
  1517. {getFieldDecorator('technicalScene', {
  1518. initialValue: theData.technicalScene
  1519. })(
  1520. <Input type="textarea" rows={2} placeholder="说明解决了什么问题。" />
  1521. )}
  1522. </FormItem>
  1523. <FormItem
  1524. labelCol={{ span: 4 }}
  1525. wrapperCol={{ span: 18 }}
  1526. label="技术突破" >
  1527. {getFieldDecorator('breakthrough', {
  1528. initialValue: theData.breakthrough
  1529. })(
  1530. <Input type="textarea" rows={2} placeholder="说明该技术成果突破性的研究。" />
  1531. )}
  1532. </FormItem>
  1533. <FormItem
  1534. labelCol={{ span: 4 }}
  1535. wrapperCol={{ span: 18 }}
  1536. label="专利情况" >
  1537. {getFieldDecorator('patentCase', {
  1538. initialValue: theData.patentCase
  1539. })(
  1540. <Input type="textarea" rows={2} placeholder="一个“技术”可能由多个专利构成,需要说明技术-专利的关系。" />
  1541. )}
  1542. </FormItem>
  1543. <FormItem
  1544. labelCol={{ span: 4 }}
  1545. wrapperCol={{ span: 18 }}
  1546. label="获奖情况" >
  1547. {getFieldDecorator('awards', {
  1548. initialValue: theData.awards
  1549. })(
  1550. <Input type="textarea" rows={2} placeholder="一个“技术”可能存在社会奖励情况,需要说明社会奖励情况。" />
  1551. )}
  1552. </FormItem>
  1553. <FormItem
  1554. labelCol={{ span: 4 }}
  1555. wrapperCol={{ span: 18 }}
  1556. label="技术团队情况" >
  1557. {getFieldDecorator('teamDes', {
  1558. initialValue: theData.teamDes
  1559. })(
  1560. <Input type="textarea" rows={2} placeholder="一个“技术”、“项目”可能存在团队,需要说明团队情况。" />
  1561. )}
  1562. </FormItem>
  1563. <FormItem
  1564. labelCol={{ span: 4 }}
  1565. wrapperCol={{ span: 18 }}
  1566. label="技术参数" >
  1567. {getFieldDecorator('parameter', {
  1568. initialValue: theData.parameter
  1569. })(
  1570. <Input type="textarea" rows={2} placeholder="描述技术参数信息" />
  1571. )}
  1572. </FormItem>
  1573. <FormItem
  1574. labelCol={{ span: 4 }}
  1575. wrapperCol={{ span: 6 }}
  1576. label="技术方案" >
  1577. <Upload
  1578. name="ratepay"
  1579. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1580. data={{ 'sign': 'achievement_tech_plan' }}
  1581. beforeUpload={beforeUploadFile}
  1582. fileList={this.state.techPlanFileList}
  1583. onChange={(info) => {
  1584. if (info.file.status !== 'uploading') {
  1585. }
  1586. if (info.file.status === 'done') {
  1587. if (!info.file.response.error.length) {
  1588. message.success(`${info.file.name} 文件上传成功!`);
  1589. } else {
  1590. message.warning(info.file.response.error[0].message);
  1591. return;
  1592. };
  1593. this.state.techPlanUrl = info.file.response.data;
  1594. } else if (info.file.status === 'error') {
  1595. message.error(`${info.file.name} 文件上传失败。`);
  1596. };
  1597. this.setState({ techPlanFileList: info.fileList.slice(-1) });
  1598. }} >
  1599. <Button><Icon type="upload" /> 上传技术方案文件 </Button>
  1600. </Upload>
  1601. <p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
  1602. <span className="download-file">
  1603. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  1604. </span>
  1605. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1606. </FormItem>
  1607. <FormItem
  1608. labelCol={{ span: 4 }}
  1609. wrapperCol={{ span: 6 }}
  1610. label="商业计划书" >
  1611. <Upload
  1612. name="ratepay"
  1613. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1614. data={{ 'sign': 'achievement_business_plan' }}
  1615. beforeUpload={beforeUploadFile}
  1616. fileList={this.state.businessPlanFileList}
  1617. onChange={(info) => {
  1618. if (info.file.status !== 'uploading') {
  1619. }
  1620. if (info.file.status === 'done') {
  1621. if (!info.file.response.error.length) {
  1622. message.success(`${info.file.name} 文件上传成功!`);
  1623. } else {
  1624. message.warning(info.file.response.error[0].message);
  1625. return;
  1626. };
  1627. this.state.businessPlanUrl = info.file.response.data;
  1628. } else if (info.file.status === 'error') {
  1629. message.error(`${info.file.name} 文件上传失败。`);
  1630. };
  1631. this.setState({ businessPlanFileList: info.fileList.slice(-1) });
  1632. }} >
  1633. <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
  1634. </Upload>
  1635. <p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
  1636. <span className="download-file">
  1637. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  1638. </span>
  1639. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1640. </FormItem>
  1641. </Spin>
  1642. </Form >
  1643. )
  1644. }
  1645. }));
  1646. const AchievementDetail = React.createClass({
  1647. getInitialState() {
  1648. return {
  1649. visible: false,
  1650. tabsKey: 1,
  1651. loading: false,
  1652. columns: [
  1653. {
  1654. title: '编号',
  1655. dataIndex: 'serialNumber',
  1656. key: 'serialNumber',
  1657. }, {
  1658. title: '数据类型',
  1659. dataIndex: 'dataCategory',
  1660. key: 'dataCategory',
  1661. render: text => {
  1662. switch (text) {
  1663. case "0":
  1664. return <span>成果</span>;
  1665. case "1":
  1666. return <span>技术</span>;
  1667. case "2":
  1668. return <span>项目</span>;
  1669. }
  1670. }
  1671. }, {
  1672. title: '名称',
  1673. dataIndex: 'name',
  1674. key: 'name',
  1675. }, {
  1676. title: '关键字',
  1677. dataIndex: 'keyword',
  1678. key: 'keyword',
  1679. }, {
  1680. title: '类型',
  1681. dataIndex: 'demandType',
  1682. key: 'demandType',
  1683. render: text => { return getDemandType(text); }
  1684. }, {
  1685. title: '所有人名称',
  1686. dataIndex: 'theName',
  1687. key: 'theName',
  1688. }, {
  1689. title: '发布时间',
  1690. dataIndex: 'releaseDateFormattedDate',
  1691. key: 'releaseDateFormattedDate',
  1692. }, {
  1693. title: '有效期限',
  1694. dataIndex: 'validityPeriodFormattedDate',
  1695. key: 'validityPeriodFormattedDate',
  1696. },
  1697. ],
  1698. dataSource: [],
  1699. };
  1700. },
  1701. getTechBrodersList() {
  1702. this.setState({
  1703. loading: true
  1704. });
  1705. $.ajax({
  1706. method: "get",
  1707. dataType: "json",
  1708. crossDomain: false,
  1709. url: globalConfig.context + "/api/admin/audit/techBroders",
  1710. success: function (data) {
  1711. if (!data.data) {
  1712. if (data.error && data.error.length) {
  1713. message.warning(data.error[0].message);
  1714. }
  1715. return;
  1716. };
  1717. let _me = this, theArr = [];
  1718. for (var item in data.data) {
  1719. theArr.push(
  1720. <Select.Option key={item}>{data.data[item]}</Select.Option>
  1721. )
  1722. };
  1723. this.setState({
  1724. techBrodersOption: theArr,
  1725. techBrodersObj: data.data
  1726. });
  1727. }.bind(this),
  1728. }).always(function () {
  1729. this.setState({
  1730. loading: false
  1731. });
  1732. }.bind(this));
  1733. },
  1734. getTableList() {
  1735. this.setState({
  1736. loading: true
  1737. });
  1738. $.ajax({
  1739. method: "get",
  1740. dataType: "json",
  1741. crossDomain: false,
  1742. url: globalConfig.context + "/api/admin/achievement/achievementDemand",
  1743. data: { id: this.props.data.id },
  1744. success: function (data) {
  1745. let theArr = [];
  1746. if (!data.data) {
  1747. if (data.error && data.error.length) {
  1748. message.warning(data.error[0].message);
  1749. };
  1750. } else if (data.data.length) {
  1751. for (let i = 0; i < data.data.length; i++) {
  1752. let thisdata = data.data[i];
  1753. theArr.push({
  1754. key: i,
  1755. id: thisdata.id,
  1756. serialNumber: thisdata.serialNumber,
  1757. dataCategory: thisdata.dataCategory,
  1758. name: thisdata.name,
  1759. keyword: thisdata.keyword,
  1760. demandType: thisdata.demandType,
  1761. theName: thisdata.username || thisdata.unitName,
  1762. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  1763. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  1764. coverImg: thisdata.coverImg,
  1765. hot: thisdata.hot,
  1766. internationalFlag:thisdata.internationalFlag,
  1767. });
  1768. };
  1769. };
  1770. this.setState({
  1771. dataSource: theArr,
  1772. });
  1773. }.bind(this),
  1774. }).always(function () {
  1775. this.setState({
  1776. loading: false
  1777. });
  1778. }.bind(this));
  1779. },
  1780. tableRowClick(record, index) {
  1781. window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
  1782. },
  1783. handleCancel(e) {
  1784. this.setState({
  1785. visible: false,
  1786. });
  1787. this.props.closeDesc(false);
  1788. },
  1789. handleOk(e) {
  1790. this.setState({
  1791. visible: false,
  1792. });
  1793. this.props.closeDesc(false, true);
  1794. },
  1795. componentWillMount() {
  1796. this.getTechBrodersList();
  1797. },
  1798. componentWillReceiveProps(nextProps) {
  1799. if (!this.state.visible && nextProps.showDesc) {
  1800. this.state.tabsKey = "1";
  1801. };
  1802. this.state.visible = nextProps.showDesc;
  1803. },
  1804. render() {
  1805. if (this.props.data) {
  1806. return (
  1807. <div className="patent-desc">
  1808. <Modal maskClosable={false} visible={this.state.visible}
  1809. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1810. width='1000px'
  1811. footer=''
  1812. className="admin-desc-content">
  1813. <Spin spinning={this.state.loading}>
  1814. <Tabs activeKey={this.state.tabsKey}
  1815. onChange={(e) => {
  1816. this.setState({ tabsKey: e });
  1817. if (e == "2") {
  1818. this.getTableList();
  1819. };
  1820. }} >
  1821. <Tabs.TabPane tab="成果详情" key="1">
  1822. {(() => {
  1823. if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1824. return <AchievementDetailShow
  1825. data={this.props.data}
  1826. detailApiUrl={this.props.detailApiUrl}
  1827. techBrodersOption={this.state.techBrodersOption}
  1828. techBrodersObj={this.state.techBrodersObj}
  1829. closeDesc={this.handleCancel}
  1830. visible={this.state.visible}
  1831. handleOk={this.handleOk} />
  1832. } else {
  1833. return <AchievementDetailForm
  1834. data={this.props.data}
  1835. detailApiUrl={this.props.detailApiUrl}
  1836. achievementCategoryOption={this.props.achievementCategoryOption}
  1837. techBrodersObj={this.state.techBrodersObj}
  1838. closeDesc={this.handleCancel}
  1839. visible={this.state.visible}
  1840. handleOk={this.handleOk} />
  1841. };
  1842. })()}
  1843. </Tabs.TabPane>
  1844. <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
  1845. <Table columns={this.state.columns}
  1846. dataSource={this.state.dataSource}
  1847. pagination={false}
  1848. onRowClick={this.tableRowClick} />
  1849. </Tabs.TabPane>
  1850. </Tabs>
  1851. </Spin>
  1852. </Modal>
  1853. </div>
  1854. );
  1855. } else {
  1856. return <div></div>
  1857. }
  1858. },
  1859. });
  1860. export default AchievementDetail;