techAchievementDesc.jsx 88 KB

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