techAchievementDesc.jsx 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882
  1. import React from 'react';
  2. import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, Upload, Input, InputNumber, Select, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
  3. import './techAchievement.less';
  4. import ajax from 'jquery/src/ajax/xhr.js';
  5. import $ from 'jquery/src/ajax';
  6. import { maturityList, innovationList, transferModeList } from '../../dataDic';
  7. import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
  8. import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getboutique } from '../../tools.js';
  9. import throttle from '../../throttle.js';
  10. const KeyWordTagGroup = React.createClass({
  11. getInitialState() {
  12. return {
  13. tags: [],
  14. inputVisible: false,
  15. inputValue: ''
  16. };
  17. },
  18. handleClose(removedTag) {
  19. const tags = this.state.tags.filter(tag => tag !== removedTag);
  20. this.props.tagsArr(tags);
  21. this.setState({ tags });
  22. },
  23. showInput() {
  24. this.setState({ inputVisible: true }, () => this.input.focus());
  25. },
  26. handleInputChange(e) {
  27. this.setState({ inputValue: e.target.value });
  28. },
  29. handleInputConfirm() {
  30. const state = this.state;
  31. const inputValue = state.inputValue;
  32. let tags = state.tags;
  33. if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
  34. tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
  35. };
  36. this.props.tagsArr(tags);
  37. this.setState({
  38. tags,
  39. inputVisible: false,
  40. inputValue: '',
  41. });
  42. },
  43. componentWillMount() {
  44. this.state.tags = this.props.keyWordArr;
  45. },
  46. componentWillReceiveProps(nextProps) {
  47. if (this.props.keyWordArr != nextProps.keyWordArr) {
  48. this.state.tags = nextProps.keyWordArr;
  49. };
  50. },
  51. render() {
  52. const { tags, inputVisible, inputValue } = this.state;
  53. return (
  54. <div className="keyWord-tips">
  55. {tags.map((tag, index) => {
  56. const isLongTag = tag.length > 10;
  57. const tagElem = (
  58. <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
  59. {isLongTag ? `${tag.slice(0, 10)}...` : tag}
  60. </Tag>
  61. );
  62. return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
  63. })}
  64. {inputVisible && (
  65. <Input
  66. ref={input => this.input = input}
  67. type="text"
  68. style={{ width: 78 }}
  69. value={inputValue}
  70. onChange={this.handleInputChange}
  71. onBlur={this.handleInputConfirm}
  72. onPressEnter={this.handleInputConfirm}
  73. />
  74. )}
  75. {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
  76. </div>
  77. );
  78. }
  79. });
  80. const PicturesWall = React.createClass({
  81. getInitialState() {
  82. return {
  83. previewVisible: false,
  84. previewImage: '',
  85. fileList: [],
  86. }
  87. },
  88. handleCancel() {
  89. this.setState({ previewVisible: false })
  90. },
  91. handlePreview(file) {
  92. this.setState({
  93. previewImage: file.url || file.thumbUrl,
  94. previewVisible: true,
  95. });
  96. },
  97. handleChange(info) {
  98. let fileList = info.fileList;
  99. this.setState({ fileList });
  100. this.props.fileList(fileList);
  101. },
  102. componentWillReceiveProps(nextProps) {
  103. this.state.fileList = nextProps.pictureUrl;
  104. },
  105. render() {
  106. const { previewVisible, previewImage, fileList } = this.state;
  107. const uploadButton = (
  108. <div>
  109. <Icon type="plus" />
  110. <div className="ant-upload-text">点击上传</div>
  111. </div>
  112. );
  113. return (
  114. <div className="clearfix">
  115. <Upload
  116. action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
  117. data={{ 'sign': this.props.pictureSign }}
  118. listType="picture-card"
  119. fileList={fileList}
  120. onPreview={this.handlePreview}
  121. onChange={this.handleChange} >
  122. {fileList.length >= 5 ? null : uploadButton}
  123. </Upload>
  124. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  125. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  126. </Modal>
  127. </div>
  128. );
  129. }
  130. });
  131. const AchievementDetailShow = Form.create()(React.createClass({
  132. getInitialState() {
  133. return {
  134. loading: false,
  135. buttonLoading: false,
  136. contactsObj: {},
  137. data: {},
  138. tags: [],
  139. technicalPictureUrl: [],
  140. coverImg: [],
  141. maturityPictureUrl: [],
  142. textFileList: [],
  143. techPlanFileList: [],
  144. businessPlanFileList: []
  145. };
  146. },
  147. loadData(id, detailApiUrl) {
  148. this.setState({
  149. loading: true
  150. });
  151. $.ajax({
  152. method: "get",
  153. dataType: "json",
  154. crossDomain: false,
  155. url: globalConfig.context + detailApiUrl,
  156. data: {
  157. id: id,
  158. ownerType:this.props.data.ownerType
  159. },
  160. success: function (data) {
  161. let thisData = data.data;
  162. if (!thisData) {
  163. if (data.error && data.error.length) {
  164. message.warning(data.error[0].message);
  165. };
  166. thisData = {};
  167. };
  168. this.setState({
  169. data: thisData,
  170. orgDisplay: thisData.ownerType,
  171. switchValue: Boolean(!thisData.ownerId),
  172. radios:thisData.hot==='1'?true:false,
  173. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  174. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  175. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  176. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  177. });
  178. if (thisData.ownerId) {
  179. this.getContactsList(thisData.ownerId);
  180. };
  181. }.bind(this),
  182. }).always(function () {
  183. this.setState({
  184. loading: false
  185. });
  186. }.bind(this));
  187. },
  188. offShelf() {
  189. this.setState({
  190. loading: true
  191. });
  192. $.ajax({
  193. method: "post",
  194. dataType: "json",
  195. crossDomain: false,
  196. url: globalConfig.context + "/api/admin/achievement/offShelf",
  197. data: { "id": this.props.data.id }
  198. }).done(function (data) {
  199. if (!data.error.length) {
  200. message.success('撤销成功!');
  201. this.setState({
  202. visible: false,
  203. releaseSubmitVisible: false
  204. });
  205. this.props.handleOk();
  206. } else {
  207. message.warning(data.error[0].message);
  208. }
  209. }.bind(this));
  210. },
  211. modifyBroker() {
  212. this.props.form.validateFields((err, values) => {
  213. if (!err) {
  214. this.setState({
  215. loading: true
  216. });
  217. $.ajax({
  218. method: "POST",
  219. dataType: "json",
  220. crossDomain: false,
  221. url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
  222. data: {
  223. id: this.props.data.id,
  224. techBrokerId: values.modifyTechBrokerId
  225. }
  226. }).done(function (data) {
  227. this.state.auditStatus = 0;
  228. this.setState({
  229. loading: false
  230. });
  231. if (data.error && data.error.length) {
  232. message.warning(data.error[0].message);
  233. } else {
  234. message.success('保存成功!');
  235. this.props.handleOk();
  236. };
  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. {(() => {
  442. switch (theData.releaseStatus) {
  443. case "0":
  444. return <span>未发布</span>;
  445. case "1":
  446. return <div>
  447. <span>已发布</span>
  448. <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
  449. <Modal maskClosable={false} title="确认"
  450. visible={this.state.releaseSubmitVisible}
  451. width='300px'
  452. footer={null}
  453. onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
  454. <span>确认要撤销发布吗?</span>
  455. <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
  456. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
  457. </Modal>
  458. </div>;
  459. }
  460. })()}
  461. </FormItem>
  462. <FormItem className="half-item"
  463. {...formItemLayout}
  464. label="发布时间" >
  465. <span>{theData.releaseDateFormattedDate}</span>
  466. </FormItem>
  467. <FormItem className="half-item"
  468. {...formItemLayout}
  469. label="审核状态" >
  470. <span>{getTechAuditStatus(theData.auditStatus)}</span>
  471. </FormItem>
  472. <FormItem className="half-item"
  473. {...formItemLayout}
  474. label="是否国际" >
  475. <span>{getboutique(theData.internationalFlag)}</span>
  476. </FormItem>
  477. </div>
  478. <FormItem
  479. labelCol={{ span: 4 }}
  480. wrapperCol={{ span: 18 }}
  481. label="关键词" >
  482. {this.state.tags.map((tag) => {
  483. return <Tooltip key={tag} title={tag}>
  484. <Tag key={tag}>{tag}</Tag>
  485. </Tooltip>;
  486. })}
  487. </FormItem>
  488. <FormItem
  489. labelCol={{ span: 4 }}
  490. wrapperCol={{ span: 18 }}
  491. label="摘要" >
  492. <span>{theData.summary}</span>
  493. </FormItem>
  494. <FormItem
  495. labelCol={{ span: 4 }}
  496. wrapperCol={{ span: 18 }}
  497. label="成果简介" >
  498. <span>{theData.introduction}</span>
  499. </FormItem>
  500. <FormItem
  501. labelCol={{ span: 4 }}
  502. wrapperCol={{ span: 18 }}
  503. label="备注" >
  504. <span>{theData.remark}</span>
  505. </FormItem>
  506. <FormItem
  507. labelCol={{ span: 4 }}
  508. wrapperCol={{ span: 18 }}
  509. label="技术图片" >
  510. <div className="clearfix">
  511. <Upload className="demandDetailShow-upload"
  512. listType="picture-card"
  513. fileList={this.state.technicalPictureUrl}
  514. onPreview={(file) => {
  515. this.setState({
  516. previewImage: file.url || file.thumbUrl,
  517. previewVisible: true,
  518. });
  519. }} >
  520. </Upload>
  521. <Modal maskClosable={false} footer={null}
  522. visible={this.state.previewVisible}
  523. onCancel={() => { this.setState({ previewVisible: false }) }}>
  524. <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
  525. </Modal>
  526. </div>
  527. </FormItem>
  528. <FormItem
  529. labelCol={{ span: 4 }}
  530. wrapperCol={{ span: 18 }}
  531. label="应用领域" >
  532. <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
  533. </FormItem>
  534. <div className="clearfix">
  535. <FormItem className="half-item"
  536. {...formItemLayout}
  537. label="成熟度" >
  538. <span>{getMaturity(theData.maturity)}</span>
  539. </FormItem>
  540. <FormItem className="half-item"
  541. {...formItemLayout}
  542. label="创新度" >
  543. <span>{getInnovation(theData.innovation)}</span>
  544. </FormItem>
  545. </div>
  546. <FormItem
  547. labelCol={{ span: 4 }}
  548. wrapperCol={{ span: 18 }}
  549. label="成熟度证明材料(图片)" >
  550. <Upload className="demandDetailShow-upload"
  551. listType="picture-card"
  552. fileList={this.state.maturityPictureUrl}
  553. onPreview={(file) => {
  554. this.setState({
  555. previewImage: file.url || file.thumbUrl,
  556. previewVisible: true,
  557. });
  558. }} >
  559. </Upload>
  560. </FormItem>
  561. <FormItem
  562. labelCol={{ span: 4 }}
  563. wrapperCol={{ span: 6 }}
  564. label="成熟度证明材料(文本)" >
  565. <p>{theData.maturityTextFileUrl ?
  566. <span className="download-file">
  567. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  568. </span>
  569. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  570. </FormItem>
  571. <FormItem
  572. labelCol={{ span: 4 }}
  573. wrapperCol={{ span: 18 }}
  574. label="成熟度证明材料(视频地址)" >
  575. <span>{theData.maturityVideoUrl}</span>
  576. </FormItem>
  577. {this.state.switchValue ?
  578. <div className="clearfix" >
  579. <FormItem className="half-item"
  580. {...formItemLayout}
  581. label="成果所有人名称" >
  582. <span>{theData.ownerName}</span>
  583. </FormItem>
  584. <FormItem className="half-item"
  585. {...formItemLayout}
  586. label="联系电话" >
  587. <span>{theData.ownerMobile}</span>
  588. </FormItem>
  589. <FormItem className="half-item"
  590. {...formItemLayout}
  591. label="证件号" >
  592. <span>{theData.ownerIdNumber}</span>
  593. </FormItem>
  594. <FormItem className="half-item"
  595. {...formItemLayout}
  596. label="电子邮箱" >
  597. <span>{theData.ownerEmail}</span>
  598. </FormItem>
  599. <FormItem className="half-item"
  600. {...formItemLayout}
  601. label="通讯地址" >
  602. <span>{theData.ownerPostalAddress}</span>
  603. </FormItem>
  604. </div> : <div className="clearfix" >
  605. <FormItem className="half-item"
  606. {...formItemLayout}
  607. label="成果所有人名称" >
  608. <span>{theData.iOwnerName}</span>
  609. </FormItem>
  610. <FormItem className="half-item"
  611. {...formItemLayout}
  612. label="联系电话" >
  613. {theData.ownerType == "1" ? <span>{this.state.contactsObj[theData.contacts]}</span> : <span>{theData.iOwnerMobile}</span>}
  614. </FormItem>
  615. <FormItem className="half-item"
  616. {...formItemLayout}
  617. label="证件号" >
  618. <span>{theData.iOwnerIdNumber}</span>
  619. </FormItem>
  620. <FormItem className="half-item"
  621. {...formItemLayout}
  622. label="电子邮箱" >
  623. <span>{theData.iOwnerEmail}</span>
  624. </FormItem>
  625. <FormItem className="half-item"
  626. {...formItemLayout}
  627. label="通讯地址" >
  628. <span>{theData.iOwnerPostalAddress}</span>
  629. </FormItem>
  630. </div>}
  631. <div className="clearfix">
  632. <FormItem className="half-item"
  633. {...formItemLayout}
  634. label="合作方式" >
  635. {(() => {
  636. switch (theData.cooperationMode) {
  637. case "0":
  638. return <span>技术转让</span>;
  639. case "1":
  640. return <span>授权生产</span>;
  641. }
  642. })()}
  643. </FormItem>
  644. <FormItem className="half-item"
  645. {...formItemLayout}
  646. label="转让方式" >
  647. <span>{getTransferMode(theData.transferMode)}</span>
  648. </FormItem>
  649. </div>
  650. <div className="clearfix">
  651. <FormItem className="half-item"
  652. {...formItemLayout}
  653. label="议价方式" >
  654. {(() => {
  655. switch (theData.bargainingMode) {
  656. case "0":
  657. return <span>面议</span>;
  658. case "1":
  659. return <span>定价</span>;
  660. }
  661. })()}
  662. </FormItem>
  663. {theData.bargainingMode == 0 ? <div></div> : <FormItem className="half-item"
  664. {...formItemLayout}
  665. label="转让价格" >
  666. <span>{theData.transferPrice} 万元</span>
  667. </FormItem>}
  668. </div>
  669. <FormItem
  670. labelCol={{ span: 4 }}
  671. wrapperCol={{ span: 18 }}
  672. label="技术场景" >
  673. <span>{theData.technicalScene}</span>
  674. </FormItem>
  675. <FormItem
  676. labelCol={{ span: 4 }}
  677. wrapperCol={{ span: 18 }}
  678. label="技术突破" >
  679. <span>{theData.breakthrough}</span>
  680. </FormItem>
  681. <FormItem
  682. labelCol={{ span: 4 }}
  683. wrapperCol={{ span: 18 }}
  684. label="专利情况" >
  685. <span>{theData.patentCase}</span>
  686. </FormItem>
  687. <FormItem
  688. labelCol={{ span: 4 }}
  689. wrapperCol={{ span: 18 }}
  690. label="获奖情况" >
  691. <span>{theData.awards}</span>
  692. </FormItem>
  693. <FormItem
  694. labelCol={{ span: 4 }}
  695. wrapperCol={{ span: 18 }}
  696. label="技术团队情况" >
  697. <span>{theData.teamDes}</span>
  698. </FormItem>
  699. <FormItem
  700. labelCol={{ span: 4 }}
  701. wrapperCol={{ span: 18 }}
  702. label="技术参数" >
  703. <span>{theData.parameter}</span>
  704. </FormItem>
  705. <FormItem
  706. labelCol={{ span: 4 }}
  707. wrapperCol={{ span: 6 }}
  708. label="技术方案" >
  709. <p>{theData.techPlanUrl ?
  710. <span className="download-file">
  711. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  712. </span>
  713. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  714. </FormItem>
  715. <FormItem
  716. labelCol={{ span: 4 }}
  717. wrapperCol={{ span: 6 }}
  718. label="商业计划书" >
  719. <p>{theData.businessPlanUrl ?
  720. <span className="download-file">
  721. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  722. </span>
  723. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  724. </FormItem>
  725. {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
  726. <FormItem className="half-item"
  727. {...formItemLayout}
  728. label="审核状态" >
  729. {getFieldDecorator('auditStatus')(
  730. <Radio.Group>
  731. <Radio value={3}>审核通过</Radio>
  732. <Radio value={4}>审核未通过</Radio>
  733. </Radio.Group>
  734. )}
  735. </FormItem>
  736. <FormItem className="half-item"
  737. {...formItemLayout}
  738. label="技术经纪人" >
  739. {getFieldDecorator('techBrokerId', {
  740. initialValue: theData.techBrokerId
  741. })(
  742. <Select style={{ width: 260 }}
  743. placeholder="请选择技术经纪人"
  744. notFoundContent="未获取到经纪人列表"
  745. showSearch
  746. filterOption={companySearch}>
  747. {this.props.techBrodersOption}
  748. </Select>
  749. )}
  750. </FormItem>
  751. </div> : <div></div>}
  752. {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
  753. <FormItem className="half-item"
  754. {...formItemLayout}
  755. label="指派新经纪人" >
  756. {getFieldDecorator('modifyTechBrokerId', {
  757. initialValue: theData.techBrokerId
  758. })(
  759. <Select style={{ width: 260 }}
  760. placeholder="请选择要指派的新经纪人"
  761. notFoundContent="未获取到经纪人列表"
  762. showSearch
  763. filterOption={companySearch}>
  764. {this.props.techBrodersOption}
  765. </Select>
  766. )}
  767. </FormItem>
  768. </div> : <div></div>}
  769. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  770. {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
  771. {theData.auditStatus == 3 ? <Button className="set-submit" type="primary" onClick={() => { this.modifyBroker(); }}>保存</Button> : <span></span>}
  772. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  773. {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
  774. </FormItem>
  775. <Modal maskClosable={false} title="确认"
  776. visible={this.state.formSubmitVisible}
  777. width='360px'
  778. footer={null}
  779. onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
  780. <span>确认该需求审核未通过?</span>
  781. <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
  782. <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
  783. </Modal>
  784. </Spin>
  785. </Form >
  786. )
  787. }
  788. }));
  789. const AchievementDetailForm = Form.create()(React.createClass({
  790. getInitialState() {
  791. return {
  792. loading: false,
  793. auditStatus: 0,
  794. textFileList: [],
  795. switchValue: false,
  796. radios: false,
  797. techPlanFileList: [],
  798. data: {},
  799. tags: [],
  800. technicalPictureUrl: [],
  801. coverImg: [],
  802. maturityPictureUrl: [],
  803. businessPlanFileList: [],
  804. dataSource: [],
  805. };
  806. },
  807. loadData(id, detailApiUrl) {
  808. this.setState({
  809. loading: true
  810. });
  811. $.ajax({
  812. method: "get",
  813. dataType: "json",
  814. crossDomain: false,
  815. url: globalConfig.context + detailApiUrl,
  816. data: {
  817. id: id
  818. },
  819. success: function (data) {
  820. let thisData = data.data;
  821. if (!thisData) {
  822. if (data.error && data.error.length) {
  823. message.warning(data.error[0].message);
  824. };
  825. thisData = {};
  826. };
  827. this.setState({
  828. data: thisData,
  829. orgDisplay: thisData.ownerType,
  830. switchValue: Boolean(!thisData.ownerId),
  831. radios: thisData.hot == '1' ? true : false,
  832. transferPriceDis: thisData.bargainingMode == 1 ? true : false,
  833. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  834. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  835. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  836. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  837. });
  838. if (thisData.ownerType == "1" && thisData.ownerId) {
  839. this.getContactsList(thisData.ownerId);
  840. };
  841. }.bind(this),
  842. }).always(function () {
  843. this.setState({
  844. loading: false
  845. });
  846. }.bind(this));
  847. },
  848. getContactsList(theUid) {
  849. $.ajax({
  850. method: "get",
  851. dataType: "json",
  852. crossDomain: false,
  853. url: globalConfig.context + "/api/admin/getContacts",
  854. data: {
  855. uid: theUid
  856. },
  857. success: function (data) {
  858. let theOption = [];
  859. if (!data.data) {
  860. if (data.error && data.error.length) {
  861. message.warning(data.error[0].message);
  862. return;
  863. };
  864. };
  865. for (let item in data.data) {
  866. let theData = data.data[item];
  867. theOption.push(
  868. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  869. );
  870. };
  871. this.setState({
  872. contactsOption: theOption
  873. });
  874. }.bind(this),
  875. });
  876. },
  877. getTagsArr(e) {
  878. this.setState({ tags: e });
  879. },
  880. getMaturityPictureUrl(e) {
  881. this.setState({ maturityPictureUrl: e });
  882. },
  883. getTechnicalPictureUrl(e) {
  884. this.setState({ technicalPictureUrl: e });
  885. },
  886. getcoverImg(e) {
  887. this.setState({coverImg: e });
  888. },
  889. handleSearch(e) {
  890. if (this.props.detailApiUrl.indexOf('org') != -1) {
  891. $.ajax({
  892. method: "get",
  893. dataType: "json",
  894. crossDomain: false,
  895. url: globalConfig.context + "/api/admin/achievement/orgOwner",
  896. data: { name: e },
  897. success: function (data) {
  898. let theArr = [];
  899. let theObj = {};
  900. if (!data.data) {
  901. if (data.error && data.error.length) {
  902. message.warning(data.error[0].message);
  903. };
  904. } else if (!$.isEmptyObject(data.data)) {
  905. data.data.map(function (item) {
  906. theArr.push(item.unitName);
  907. theObj[item.unitName] = item.uid;
  908. });
  909. };
  910. this.setState({
  911. dataSource: theArr,
  912. dataSourceObj: theObj
  913. });
  914. }.bind(this),
  915. });
  916. } else {
  917. $.ajax({
  918. method: "get",
  919. dataType: "json",
  920. crossDomain: false,
  921. url: globalConfig.context + "/api/admin/achievement/userOwner",
  922. data: { name: e },
  923. success: function (data) {
  924. let theArr = [];
  925. let theObj = {};
  926. if (!data.data) {
  927. if (data.error && data.error.length) {
  928. message.warning(data.error[0].message);
  929. };
  930. } else if (!$.isEmptyObject(data.data)) {
  931. for (let item in data.data) {
  932. theArr.push(data.data[item]);
  933. theObj[data.data[item]] = item;
  934. };
  935. };
  936. this.setState({
  937. dataSource: theArr,
  938. dataSourceObj: theObj
  939. });
  940. }.bind(this),
  941. });
  942. };
  943. },
  944. handleSubmit(e) {
  945. e.preventDefault();
  946. this.props.form.validateFields((err, values) => {
  947. //keyword长度判断
  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.state.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. <Select placeholder="选择成果类别" style={{ width: 120 }}
  1229. value={this.state.ownerType}
  1230. onChange={(e) => { this.setState({ ownerType: e }) }}>
  1231. <Select.Option value="0" >个人</Select.Option>
  1232. <Select.Option value="1" >组织</Select.Option>
  1233. </Select>
  1234. </FormItem>
  1235. <FormItem
  1236. labelCol={{ span: 4 }}
  1237. wrapperCol={{ span: 18 }}
  1238. label="摘要" >
  1239. {getFieldDecorator('summary', {
  1240. initialValue: theData.summary
  1241. })(
  1242. <Input type="textarea" rows={4} />
  1243. )}
  1244. </FormItem>
  1245. <FormItem
  1246. labelCol={{ span: 4 }}
  1247. wrapperCol={{ span: 18 }}
  1248. label="成果简介" >
  1249. {getFieldDecorator('introduction', {
  1250. initialValue: theData.introduction
  1251. })(
  1252. <Input type="textarea" rows={4} placeholder="项目成果简介;项目核心创新点;项目详细用途;预期效益说明;主要技术(性能)指标;市场前景;应用范围;发展历程。" />
  1253. )}
  1254. </FormItem>
  1255. <FormItem
  1256. labelCol={{ span: 4 }}
  1257. wrapperCol={{ span: 18 }}
  1258. label="备注" >
  1259. {getFieldDecorator('remark', {
  1260. initialValue: theData.remark
  1261. })(
  1262. <Input type="textarea" rows={4} placeholder="此处输入备注" />
  1263. )}
  1264. </FormItem>
  1265. <FormItem
  1266. labelCol={{ span: 4 }}
  1267. wrapperCol={{ span: 18 }}
  1268. label="技术图片" >
  1269. <PicturesWall
  1270. pictureSign="achievement_technical_picture"
  1271. fileList={this.getTechnicalPictureUrl}
  1272. pictureUrl={this.state.technicalPictureUrl} />
  1273. <p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
  1274. </FormItem>
  1275. <FormItem
  1276. labelCol={{ span: 4 }}
  1277. wrapperCol={{ span: 18 }}
  1278. label="应用领域" >
  1279. {getFieldDecorator('field', {
  1280. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  1281. initialValue: [theData.fieldA, theData.fieldB]
  1282. })(
  1283. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="应用领域" />
  1284. )}
  1285. </FormItem>
  1286. <div className="clearfix">
  1287. <FormItem className="half-item"
  1288. {...formItemLayout}
  1289. label="成熟度" >
  1290. {getFieldDecorator('maturity', {
  1291. initialValue: theData.maturity
  1292. })(
  1293. <Select placeholder="选择成熟度" style={{ width: 160 }} >
  1294. {
  1295. maturityList.map(function (item) {
  1296. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1297. })
  1298. }
  1299. </Select>
  1300. )}
  1301. </FormItem>
  1302. <FormItem className="half-item"
  1303. {...formItemLayout}
  1304. label="创新度" >
  1305. {getFieldDecorator('innovation', {
  1306. initialValue: theData.innovation
  1307. })(
  1308. <Select placeholder="选择创新度" style={{ width: 160 }} >
  1309. {
  1310. innovationList.map(function (item) {
  1311. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1312. })
  1313. }
  1314. </Select>
  1315. )}
  1316. </FormItem>
  1317. </div>
  1318. <FormItem
  1319. labelCol={{ span: 4 }}
  1320. wrapperCol={{ span: 18 }}
  1321. label="成熟度证明材料(图片)" >
  1322. <PicturesWall
  1323. pictureSign="achievement_maturity_picture"
  1324. fileList={this.getMaturityPictureUrl}
  1325. pictureUrl={this.state.maturityPictureUrl} />
  1326. </FormItem>
  1327. <FormItem
  1328. labelCol={{ span: 4 }}
  1329. wrapperCol={{ span: 6 }}
  1330. label="成熟度证明材料(文本)" >
  1331. <Upload
  1332. name="ratepay"
  1333. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1334. data={{ 'sign': 'achievement_maturity_text_file' }}
  1335. beforeUpload={beforeUploadFile}
  1336. fileList={this.state.textFileList}
  1337. onChange={(info) => {
  1338. if (info.file.status !== 'uploading') {
  1339. }
  1340. if (info.file.status === 'done') {
  1341. if (!info.file.response.error.length) {
  1342. message.success(`${info.file.name} 文件上传成功!`);
  1343. } else {
  1344. message.warning(info.file.response.error[0].message);
  1345. return;
  1346. };
  1347. this.state.maturityTextFileUrl = info.file.response.data;
  1348. } else if (info.file.status === 'error') {
  1349. message.error(`${info.file.name} 文件上传失败。`);
  1350. };
  1351. this.setState({ textFileList: info.fileList.slice(-1) });
  1352. }} >
  1353. <Button><Icon type="upload" /> 上传成熟度证明文本 </Button>
  1354. </Upload>
  1355. <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
  1356. <span className="download-file">
  1357. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  1358. </span>
  1359. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1360. </FormItem>
  1361. <FormItem
  1362. labelCol={{ span: 4 }}
  1363. wrapperCol={{ span: 18 }}
  1364. label="成熟度证明材料(视频地址)" >
  1365. {getFieldDecorator('maturityVideoUrl', {
  1366. initialValue: theData.maturityVideoUrl
  1367. })(
  1368. <Input />
  1369. )}
  1370. </FormItem>
  1371. <FormItem
  1372. labelCol={{ span: 4 }}
  1373. wrapperCol={{ span: 18 }}
  1374. label="自定义成果所有人" >
  1375. <Switch checked={this.state.switchValue} onChange={(e) => { this.setState({ switchValue: e }); }} />
  1376. </FormItem>
  1377. {this.state.switchValue ? <div className="clearfix" >
  1378. <FormItem className="half-item"
  1379. {...formItemLayout}
  1380. label="成果所有人" >
  1381. {getFieldDecorator('ownerName', {
  1382. initialValue: theData.ownerName
  1383. })(
  1384. <Input />
  1385. )}
  1386. </FormItem>
  1387. <FormItem className="half-item"
  1388. {...formItemLayout}
  1389. label="联系电话" >
  1390. {getFieldDecorator('ownerMobile', {
  1391. initialValue: theData.ownerMobile
  1392. })(
  1393. <Input />
  1394. )}
  1395. </FormItem>
  1396. <FormItem className="half-item"
  1397. {...formItemLayout}
  1398. label="证件号" >
  1399. {getFieldDecorator('ownerIdNumber', {
  1400. initialValue: theData.ownerIdNumber
  1401. })(
  1402. <Input />
  1403. )}
  1404. </FormItem>
  1405. <FormItem className="half-item"
  1406. {...formItemLayout}
  1407. label="电子邮箱" >
  1408. {getFieldDecorator('ownerEmail', {
  1409. initialValue: theData.ownerEmail
  1410. })(
  1411. <Input />
  1412. )}
  1413. </FormItem>
  1414. <FormItem className="half-item"
  1415. {...formItemLayout}
  1416. label="通讯地址" >
  1417. {getFieldDecorator('ownerPostalAddress', {
  1418. initialValue: theData.ownerPostalAddress
  1419. })(
  1420. <Input />
  1421. )}
  1422. </FormItem>
  1423. </div> : <div className="clearfix" >
  1424. <FormItem className="half-item"
  1425. {...formItemLayout}
  1426. label="成果所有人" >
  1427. {getFieldDecorator('iOwnerName', {
  1428. initialValue: theData.iOwnerName || ''
  1429. })(
  1430. <AutoComplete
  1431. dataSource={this.state.dataSource}
  1432. style={{ width: 200 }}
  1433. onSearch={this.state.therottleSearch}
  1434. placeholder="输入成果所有人"
  1435. onSelect={(e) => {
  1436. this.getContactsList(this.state.dataSourceObj[e]);
  1437. }} />
  1438. )}
  1439. </FormItem>
  1440. {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
  1441. {...formItemLayout}
  1442. label="联系人" >
  1443. {getFieldDecorator('contacts', {
  1444. initialValue: theData.contacts
  1445. })(
  1446. <Select style={{ width: 260 }}
  1447. placeholder="请选择联系人"
  1448. notFoundContent="未获取到联系人列表"
  1449. showSearch
  1450. filterOption={companySearch}>
  1451. {this.state.contactsOption}
  1452. </Select>
  1453. )}
  1454. </FormItem> : <div></div>}
  1455. </div>}
  1456. <div className="clearfix">
  1457. <FormItem className="half-item"
  1458. {...formItemLayout}
  1459. label="合作方式" >
  1460. {getFieldDecorator('cooperationMode', {
  1461. rules: [{ required: true, message: '此项为必填项!' }],
  1462. initialValue: theData.cooperationMode
  1463. })(
  1464. <Radio.Group>
  1465. <Radio value="0">技术转让</Radio>
  1466. <Radio value="1">授权生产</Radio>
  1467. </Radio.Group>
  1468. )}
  1469. </FormItem>
  1470. <FormItem className="half-item"
  1471. {...formItemLayout}
  1472. label="转让方式" >
  1473. {getFieldDecorator('transferMode', {
  1474. initialValue: theData.transferMode
  1475. })(
  1476. <Select placeholder="选择转让方式" style={{ width: 160 }} >
  1477. {
  1478. transferModeList.map(function (item) {
  1479. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1480. })
  1481. }
  1482. </Select>
  1483. )}
  1484. </FormItem>
  1485. </div>
  1486. <div className="clearfix">
  1487. <FormItem className="half-item"
  1488. {...formItemLayout}
  1489. label="议价方式" >
  1490. {getFieldDecorator('bargainingMode', {
  1491. initialValue: theData.bargainingMode
  1492. })(
  1493. <Radio.Group onChange={(e) => {
  1494. this.setState({
  1495. transferPriceDis: (e.target.value == 1 ? true : false)
  1496. })
  1497. }}>
  1498. <Radio value="0">面议</Radio>
  1499. <Radio value="1">定价</Radio>
  1500. </Radio.Group>
  1501. )}
  1502. </FormItem>
  1503. {this.state.transferPriceDis ? <FormItem className="half-item"
  1504. {...formItemLayout}
  1505. label="转让价格" >
  1506. {getFieldDecorator('transferPrice', {
  1507. initialValue: theData.transferPrice || 0
  1508. })(
  1509. <InputNumber min={0} max={999999} step={0.01} />
  1510. )}
  1511. <span style={{ marginLeft: '20px' }}>万元</span>
  1512. </FormItem> : <div></div>}
  1513. </div>
  1514. <FormItem
  1515. labelCol={{ span: 4 }}
  1516. wrapperCol={{ span: 18 }}
  1517. label="技术场景" >
  1518. {getFieldDecorator('technicalScene', {
  1519. initialValue: theData.technicalScene
  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('breakthrough', {
  1529. initialValue: theData.breakthrough
  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('patentCase', {
  1539. initialValue: theData.patentCase
  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('awards', {
  1549. initialValue: theData.awards
  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('teamDes', {
  1559. initialValue: theData.teamDes
  1560. })(
  1561. <Input type="textarea" rows={2} placeholder="一个“技术”、“项目”可能存在团队,需要说明团队情况。" />
  1562. )}
  1563. </FormItem>
  1564. <FormItem
  1565. labelCol={{ span: 4 }}
  1566. wrapperCol={{ span: 18 }}
  1567. label="技术参数" >
  1568. {getFieldDecorator('parameter', {
  1569. initialValue: theData.parameter
  1570. })(
  1571. <Input type="textarea" rows={2} placeholder="描述技术参数信息" />
  1572. )}
  1573. </FormItem>
  1574. <FormItem
  1575. labelCol={{ span: 4 }}
  1576. wrapperCol={{ span: 6 }}
  1577. label="技术方案" >
  1578. <Upload
  1579. name="ratepay"
  1580. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1581. data={{ 'sign': 'achievement_tech_plan' }}
  1582. beforeUpload={beforeUploadFile}
  1583. fileList={this.state.techPlanFileList}
  1584. onChange={(info) => {
  1585. if (info.file.status !== 'uploading') {
  1586. }
  1587. if (info.file.status === 'done') {
  1588. if (!info.file.response.error.length) {
  1589. message.success(`${info.file.name} 文件上传成功!`);
  1590. } else {
  1591. message.warning(info.file.response.error[0].message);
  1592. return;
  1593. };
  1594. this.state.techPlanUrl = info.file.response.data;
  1595. } else if (info.file.status === 'error') {
  1596. message.error(`${info.file.name} 文件上传失败。`);
  1597. };
  1598. this.setState({ techPlanFileList: info.fileList.slice(-1) });
  1599. }} >
  1600. <Button><Icon type="upload" /> 上传技术方案文件 </Button>
  1601. </Upload>
  1602. <p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
  1603. <span className="download-file">
  1604. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  1605. </span>
  1606. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1607. </FormItem>
  1608. <FormItem
  1609. labelCol={{ span: 4 }}
  1610. wrapperCol={{ span: 6 }}
  1611. label="商业计划书" >
  1612. <Upload
  1613. name="ratepay"
  1614. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1615. data={{ 'sign': 'achievement_business_plan' }}
  1616. beforeUpload={beforeUploadFile}
  1617. fileList={this.state.businessPlanFileList}
  1618. onChange={(info) => {
  1619. if (info.file.status !== 'uploading') {
  1620. }
  1621. if (info.file.status === 'done') {
  1622. if (!info.file.response.error.length) {
  1623. message.success(`${info.file.name} 文件上传成功!`);
  1624. } else {
  1625. message.warning(info.file.response.error[0].message);
  1626. return;
  1627. };
  1628. this.state.businessPlanUrl = info.file.response.data;
  1629. } else if (info.file.status === 'error') {
  1630. message.error(`${info.file.name} 文件上传失败。`);
  1631. };
  1632. this.setState({ businessPlanFileList: info.fileList.slice(-1) });
  1633. }} >
  1634. <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
  1635. </Upload>
  1636. <p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
  1637. <span className="download-file">
  1638. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  1639. </span>
  1640. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1641. </FormItem>
  1642. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  1643. <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
  1644. <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
  1645. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1646. </FormItem>
  1647. </Spin>
  1648. </Form >
  1649. )
  1650. }
  1651. }));
  1652. const AchievementDetail = React.createClass({
  1653. getInitialState() {
  1654. return {
  1655. visible: false,
  1656. tabsKey: 1,
  1657. loading: false,
  1658. columns: [
  1659. {
  1660. title: '编号',
  1661. dataIndex: 'serialNumber',
  1662. key: 'serialNumber',
  1663. }, {
  1664. title: '数据类型',
  1665. dataIndex: 'dataCategory',
  1666. key: 'dataCategory',
  1667. render: text => {
  1668. switch (text) {
  1669. case "0":
  1670. return <span>成果</span>;
  1671. case "1":
  1672. return <span>技术</span>;
  1673. case "2":
  1674. return <span>项目</span>;
  1675. }
  1676. }
  1677. }, {
  1678. title: '名称',
  1679. dataIndex: 'name',
  1680. key: 'name',
  1681. }, {
  1682. title: '关键字',
  1683. dataIndex: 'keyword',
  1684. key: 'keyword',
  1685. }, {
  1686. title: '类型',
  1687. dataIndex: 'demandType',
  1688. key: 'demandType',
  1689. render: text => { return getDemandType(text); }
  1690. }, {
  1691. title: '所有人名称',
  1692. dataIndex: 'theName',
  1693. key: 'theName',
  1694. }, {
  1695. title: '发布时间',
  1696. dataIndex: 'releaseDateFormattedDate',
  1697. key: 'releaseDateFormattedDate',
  1698. }, {
  1699. title: '有效期限',
  1700. dataIndex: 'validityPeriodFormattedDate',
  1701. key: 'validityPeriodFormattedDate',
  1702. },
  1703. ],
  1704. dataSource: [],
  1705. };
  1706. },
  1707. getTechBrodersList() {
  1708. this.setState({
  1709. loading: true
  1710. });
  1711. $.ajax({
  1712. method: "get",
  1713. dataType: "json",
  1714. crossDomain: false,
  1715. url: globalConfig.context + "/api/admin/audit/techBroders",
  1716. success: function (data) {
  1717. if (!data.data) {
  1718. if (data.error && data.error.length) {
  1719. message.warning(data.error[0].message);
  1720. }
  1721. return;
  1722. };
  1723. let _me = this, theArr = [];
  1724. for (var item in data.data) {
  1725. theArr.push(
  1726. <Select.Option key={item}>{data.data[item]}</Select.Option>
  1727. )
  1728. };
  1729. this.setState({
  1730. techBrodersOption: theArr,
  1731. techBrodersObj: data.data
  1732. });
  1733. }.bind(this),
  1734. }).always(function () {
  1735. this.setState({
  1736. loading: false
  1737. });
  1738. }.bind(this));
  1739. },
  1740. getTableList() {
  1741. this.setState({
  1742. loading: true
  1743. });
  1744. $.ajax({
  1745. method: "get",
  1746. dataType: "json",
  1747. crossDomain: false,
  1748. url: globalConfig.context + "/api/admin/achievement/achievementDemand",
  1749. data: { id: this.props.data.id },
  1750. success: function (data) {
  1751. let theArr = [];
  1752. if (!data.data) {
  1753. if (data.error && data.error.length) {
  1754. message.warning(data.error[0].message);
  1755. };
  1756. } else if (data.data.length) {
  1757. for (let i = 0; i < data.data.length; i++) {
  1758. let thisdata = data.data[i];
  1759. theArr.push({
  1760. key: i,
  1761. id: thisdata.id,
  1762. serialNumber: thisdata.serialNumber,
  1763. dataCategory: thisdata.dataCategory,
  1764. name: thisdata.name,
  1765. keyword: thisdata.keyword,
  1766. demandType: thisdata.demandType,
  1767. theName: thisdata.username || thisdata.unitName,
  1768. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  1769. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  1770. coverImg: thisdata.coverImg,
  1771. hot: thisdata.hot,
  1772. internationalFlag:thisdata.internationalFlag,
  1773. });
  1774. };
  1775. };
  1776. this.setState({
  1777. dataSource: theArr,
  1778. });
  1779. }.bind(this),
  1780. }).always(function () {
  1781. this.setState({
  1782. loading: false
  1783. });
  1784. }.bind(this));
  1785. },
  1786. tableRowClick(record, index) {
  1787. window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
  1788. },
  1789. handleCancel(e) {
  1790. this.setState({
  1791. visible: false,
  1792. });
  1793. this.props.closeDesc(false);
  1794. },
  1795. handleOk(e) {
  1796. this.setState({
  1797. visible: false,
  1798. });
  1799. this.props.closeDesc(false, true);
  1800. },
  1801. componentWillMount() {
  1802. this.getTechBrodersList();
  1803. },
  1804. componentWillReceiveProps(nextProps) {
  1805. if (!this.state.visible && nextProps.showDesc) {
  1806. this.state.tabsKey = "1";
  1807. };
  1808. this.state.visible = nextProps.showDesc;
  1809. },
  1810. render() {
  1811. if (this.props.data) {
  1812. return (
  1813. <div className="patent-desc">
  1814. <Modal maskClosable={false} visible={this.state.visible}
  1815. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1816. width='1000px'
  1817. footer=''
  1818. className="admin-desc-content">
  1819. <Spin spinning={this.state.loading}>
  1820. <Tabs activeKey={this.state.tabsKey}
  1821. onChange={(e) => {
  1822. this.setState({ tabsKey: e });
  1823. if (e == "2") {
  1824. this.getTableList();
  1825. };
  1826. }} >
  1827. <Tabs.TabPane tab="成果详情" key="1">
  1828. {(() => {
  1829. if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
  1830. return <AchievementDetailShow
  1831. data={this.props.data}
  1832. detailApiUrl={this.props.detailApiUrl}
  1833. techBrodersOption={this.state.techBrodersOption}
  1834. techBrodersObj={this.state.techBrodersObj}
  1835. closeDesc={this.handleCancel}
  1836. visible={this.state.visible}
  1837. handleOk={this.handleOk} />
  1838. } else {
  1839. return <AchievementDetailForm
  1840. data={this.props.data}
  1841. detailApiUrl={this.props.detailApiUrl}
  1842. achievementCategoryOption={this.props.achievementCategoryOption}
  1843. techBrodersObj={this.state.techBrodersObj}
  1844. closeDesc={this.handleCancel}
  1845. visible={this.state.visible}
  1846. handleOk={this.handleOk} />
  1847. };
  1848. })()}
  1849. </Tabs.TabPane>
  1850. <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
  1851. <Table columns={this.state.columns}
  1852. dataSource={this.state.dataSource}
  1853. pagination={false}
  1854. onRowClick={this.tableRowClick} />
  1855. </Tabs.TabPane>
  1856. </Tabs>
  1857. </Spin>
  1858. </Modal>
  1859. </div>
  1860. );
  1861. } else {
  1862. return <div></div>
  1863. }
  1864. },
  1865. });
  1866. export default AchievementDetail;