techAchievementDesc.jsx 88 KB

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