techAchievementDesc.jsx 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883
  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(); }} style={{"display":"none"}}>保存</Button> : <span></span>}
  772. {theData.auditStatus == 2 ?<Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button> : <span></span>}
  773. {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList} style={{"display":"none"}}>生成匹配列表</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. ownerType:this.props.data.ownerType
  819. },
  820. success: function (data) {
  821. let thisData = data.data;
  822. if (!thisData) {
  823. if (data.error && data.error.length) {
  824. message.warning(data.error[0].message);
  825. };
  826. thisData = {};
  827. };
  828. this.setState({
  829. data: thisData,
  830. orgDisplay: thisData.ownerType,
  831. switchValue: Boolean(!thisData.ownerId),
  832. radios: thisData.hot == '1' ? true : false,
  833. transferPriceDis: thisData.bargainingMode == 1 ? true : false,
  834. tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
  835. technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  836. coverImg: thisData.coverImg ? splitUrl(thisData.coverImg, ',', globalConfig.avatarHost + '/upload') : [],
  837. maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
  838. });
  839. if (thisData.ownerType == "1" && thisData.ownerId) {
  840. this.getContactsList(thisData.ownerId);
  841. };
  842. }.bind(this),
  843. }).always(function () {
  844. this.setState({
  845. loading: false
  846. });
  847. }.bind(this));
  848. },
  849. getContactsList(theUid) {
  850. $.ajax({
  851. method: "get",
  852. dataType: "json",
  853. crossDomain: false,
  854. url: globalConfig.context + "/api/admin/getContacts",
  855. data: {
  856. uid: theUid
  857. },
  858. success: function (data) {
  859. let theOption = [];
  860. if (!data.data) {
  861. if (data.error && data.error.length) {
  862. message.warning(data.error[0].message);
  863. return;
  864. };
  865. };
  866. for (let item in data.data) {
  867. let theData = data.data[item];
  868. theOption.push(
  869. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  870. );
  871. };
  872. this.setState({
  873. contactsOption: theOption
  874. });
  875. }.bind(this),
  876. });
  877. },
  878. getTagsArr(e) {
  879. this.setState({ tags: e });
  880. },
  881. getMaturityPictureUrl(e) {
  882. this.setState({ maturityPictureUrl: e });
  883. },
  884. getTechnicalPictureUrl(e) {
  885. this.setState({ technicalPictureUrl: e });
  886. },
  887. getcoverImg(e) {
  888. this.setState({coverImg: e });
  889. },
  890. handleSearch(e) {
  891. if (this.props.detailApiUrl.indexOf('org') != -1) {
  892. $.ajax({
  893. method: "get",
  894. dataType: "json",
  895. crossDomain: false,
  896. url: globalConfig.context + "/api/admin/achievement/orgOwner",
  897. data: { name: e },
  898. success: function (data) {
  899. let theArr = [];
  900. let theObj = {};
  901. if (!data.data) {
  902. if (data.error && data.error.length) {
  903. message.warning(data.error[0].message);
  904. };
  905. } else if (!$.isEmptyObject(data.data)) {
  906. data.data.map(function (item) {
  907. theArr.push(item.unitName);
  908. theObj[item.unitName] = item.uid;
  909. });
  910. };
  911. this.setState({
  912. dataSource: theArr,
  913. dataSourceObj: theObj
  914. });
  915. }.bind(this),
  916. });
  917. } else {
  918. $.ajax({
  919. method: "get",
  920. dataType: "json",
  921. crossDomain: false,
  922. url: globalConfig.context + "/api/admin/achievement/userOwner",
  923. data: { name: e },
  924. success: function (data) {
  925. let theArr = [];
  926. let theObj = {};
  927. if (!data.data) {
  928. if (data.error && data.error.length) {
  929. message.warning(data.error[0].message);
  930. };
  931. } else if (!$.isEmptyObject(data.data)) {
  932. for (let item in data.data) {
  933. theArr.push(data.data[item]);
  934. theObj[data.data[item]] = item;
  935. };
  936. };
  937. this.setState({
  938. dataSource: theArr,
  939. dataSourceObj: theObj
  940. });
  941. }.bind(this),
  942. });
  943. };
  944. },
  945. handleSubmit(e) {
  946. e.preventDefault();
  947. this.props.form.validateFields((err, values) => {
  948. //keyword长度判断
  949. if ((this.state.tags ? this.state.tags.length : this.props.tags.length) < 3) {
  950. message.warning('关键词数量不能小于3个!');
  951. return;
  952. };
  953. if (values.bargainingMode == 1 && !values.transferPrice) {
  954. message.warning('议价方式为[ 定价 ]时, [ 转让价格 ]不能为空!');
  955. return;
  956. }
  957. if(values.field[0]==undefined){
  958. message.warning('应用领域不能为空!')
  959. return false;
  960. }
  961. //url转化
  962. let theTechnicalPictureUrl = [];
  963. if (this.state.technicalPictureUrl.length) {
  964. let picArr = [];
  965. this.state.technicalPictureUrl.map(function (item) {
  966. if ( item.response && item.response.data && item.response.data.length ){
  967. picArr.push(item.response.data);
  968. }
  969. });
  970. theTechnicalPictureUrl = picArr.join(",");
  971. };
  972. let thecoverImg = [];
  973. if (this.state.coverImg.length) {
  974. let picArr = [];
  975. this.state.coverImg.map(function (item) {
  976. if ( item.response && item.response.data && item.response.data.length ){
  977. picArr.push(item.response.data);
  978. }
  979. });
  980. thecoverImg = picArr.join(",");
  981. };
  982. let theMaturityPictureUrl = [];
  983. if (this.state.maturityPictureUrl.length) {
  984. let picArr = [];
  985. this.state.maturityPictureUrl.map(function (item) {
  986. if ( item.response && item.response.data && item.response.data.length ){
  987. picArr.push(item.response.data);
  988. }
  989. });
  990. theMaturityPictureUrl = picArr.join(",");
  991. };
  992. if (!err) {
  993. this.setState({
  994. loading: true
  995. });
  996. $.ajax({
  997. method: "POST",
  998. dataType: "json",
  999. crossDomain: false,
  1000. url: this.props.data.id ? globalConfig.context + '/api/admin/achievement/update' : globalConfig.context + '/api/admin/achievement/apply',
  1001. data: {
  1002. id: this.props.data.id,
  1003. dataCategory: values.dataCategory,
  1004. serialNumber: this.props.data.serialNumber,
  1005. name: values.name,
  1006. keyword: this.state.tags ? this.state.tags.join(",") : this.props.tags.join(","),
  1007. keywords: this.state.tags ? this.state.tags : this.props.tags,
  1008. category: values.category,
  1009. summary: values.summary,
  1010. introduction: values.introduction,
  1011. remark: values.remark,
  1012. technicalPictureUrl: theTechnicalPictureUrl,
  1013. coverImg: thecoverImg,
  1014. fieldA: values.field ? values.field[0] : undefined,
  1015. fieldB: values.field ? values.field[1] : undefined,
  1016. maturity: values.maturity,
  1017. maturityPictureUrl: theMaturityPictureUrl,
  1018. maturityTextFileUrl: this.state.maturityTextFileUrl,
  1019. maturityVideoUrl: values.maturityVideoUrl,
  1020. innovation: values.innovation,
  1021. //
  1022. switchSign: this.state.switchValue ? 1 : 0,
  1023. //
  1024. ownerId: !this.state.switchValue ? (this.state.dataSourceObj ? this.state.dataSourceObj[values.iOwnerName] : this.state.data.ownerId) : undefined,
  1025. contacts: !this.state.switchValue ? values.contacts : undefined,
  1026. ownerType: this.state.orgDisplay,//this.props.detailApiUrl.indexOf('org') != -1 ? 1 : 0,
  1027. //自定义
  1028. ownerName: this.state.switchValue ? values.ownerName : undefined,
  1029. ownerIdNumber: this.state.switchValue ? values.ownerIdNumber : undefined,
  1030. ownerMobile: this.state.switchValue ? values.ownerMobile : undefined,
  1031. ownerEmail: this.state.switchValue ? values.ownerEmail : undefined,
  1032. ownerPostalAddress: this.state.switchValue ? values.ownerPostalAddress : undefined,
  1033. //
  1034. cooperationMode: values.cooperationMode,
  1035. transferMode: values.transferMode,
  1036. bargainingMode: values.bargainingMode,
  1037. transferPrice: values.transferPrice,
  1038. technicalScene: values.technicalScene,
  1039. breakthrough: values.breakthrough,
  1040. patentCase: values.patentCase,
  1041. awards: values.awards,
  1042. teamDes: values.teamDes,
  1043. parameter: values.parameter,
  1044. releaseStatus: values.releaseStatus,
  1045. techPlanUrl: this.state.techPlanUrl,
  1046. businessPlanUrl: this.state.businessPlanUrl,
  1047. auditStatus: this.state.auditStatus,
  1048. boutique: values.boutique,
  1049. internationalFlag:values.internationalFlag,
  1050. hot: values.hot,
  1051. }
  1052. }).done(function (data) {
  1053. this.state.auditStatus = 0;
  1054. this.setState({
  1055. loading: false
  1056. });
  1057. if (!data.error.length) {
  1058. message.success('保存成功!');
  1059. this.props.handleOk();
  1060. } else {
  1061. message.warning(data.error[0].message);
  1062. }
  1063. }.bind(this));
  1064. }
  1065. });
  1066. },
  1067. componentWillMount() {
  1068. this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
  1069. if (this.props.data && this.props.data.id) {
  1070. this.loadData(this.props.data.id, this.props.detailApiUrl);
  1071. };
  1072. },
  1073. componentWillReceiveProps(nextProps) {
  1074. if (!this.props.visible && nextProps.visible) {
  1075. if (nextProps.data && nextProps.data.id) {
  1076. this.loadData(nextProps.data.id, nextProps.detailApiUrl);
  1077. };
  1078. this.state.data = {};
  1079. this.state.tags = [];
  1080. this.state.switchValue = false;
  1081. this.state.radios = false;
  1082. this.state.technicalPictureUrl = [];
  1083. this.state.coverImg = [];
  1084. this.state.maturityPictureUrl = [];
  1085. this.state.textFileList = [];
  1086. this.state.techPlanFileList = [];
  1087. this.state.businessPlanFileList = [];
  1088. this.props.form.resetFields();
  1089. this.state.orgDisplay=undefined;
  1090. };
  1091. },
  1092. render() {
  1093. const theData = this.state.data || {};
  1094. const { getFieldDecorator } = this.props.form;
  1095. const FormItem = Form.Item
  1096. const formItemLayout = {
  1097. labelCol: { span: 8 },
  1098. wrapperCol: { span: 14 },
  1099. };
  1100. console.log(this.state.orgDisplay)
  1101. return (
  1102. <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
  1103. <Spin spinning={this.state.loading}>
  1104. <div className="clearfix">
  1105. <FormItem className="half-item"
  1106. {...formItemLayout}
  1107. label="编号" >
  1108. <span>{theData.serialNumber}</span>
  1109. </FormItem>
  1110. <FormItem className="half-item"
  1111. {...formItemLayout}
  1112. label="名称" >
  1113. {getFieldDecorator('name', {
  1114. rules: [{ required: true, message: '此项为必填项!' }],
  1115. initialValue: theData.name
  1116. })(
  1117. <Input />
  1118. )}
  1119. </FormItem>
  1120. <FormItem className="half-item"
  1121. {...formItemLayout}
  1122. label="数据类别" >
  1123. {getFieldDecorator('dataCategory', {
  1124. rules: [{ required: true, message: '此项为必填项!' }],
  1125. initialValue: theData.dataCategory
  1126. })(
  1127. <Select placeholder="选择数据类型" style={{ width: 160 }} >
  1128. <Select.Option value="0" >成果</Select.Option>
  1129. <Select.Option value="1" >技术</Select.Option>
  1130. <Select.Option value="2" >项目</Select.Option>
  1131. </Select>
  1132. )}
  1133. </FormItem>
  1134. <FormItem className="half-item"
  1135. {...formItemLayout}
  1136. label="类型" >
  1137. {getFieldDecorator('category', {
  1138. rules: [{ required: true, message: '此项为必填项!' }],
  1139. initialValue: theData.category
  1140. })(
  1141. <Select style={{ width: 160 }} placeholder="请选择成果类型">
  1142. {this.props.achievementCategoryOption}
  1143. </Select>
  1144. )}
  1145. </FormItem>
  1146. <FormItem className="half-item"
  1147. {...formItemLayout}
  1148. label="精品成果" >
  1149. {getFieldDecorator('boutique', {
  1150. initialValue: theData.boutique
  1151. })(
  1152. <Radio.Group>
  1153. <Radio value="0">否</Radio>
  1154. <Radio value="1">是</Radio>
  1155. </Radio.Group>
  1156. )}
  1157. </FormItem>
  1158. <FormItem className="half-item"
  1159. {...formItemLayout}
  1160. label="首页展示:" >
  1161. {getFieldDecorator('hot', {
  1162. initialValue: theData.hot
  1163. })(
  1164. <Radio.Group onChange={(e) => { this.setState({ radios: e.target.value }); }}>
  1165. <Radio value="0">否</Radio>
  1166. <Radio value="1">是</Radio>
  1167. </Radio.Group>
  1168. )}
  1169. </FormItem>
  1170. {this.state.radios==true ? <FormItem
  1171. labelCol={{ span: 4 }}
  1172. wrapperCol={{ span: 18 }}
  1173. label="首页展示图片:"
  1174. style={{display:'block'}}
  1175. >
  1176. <PicturesWall
  1177. pictureSign="achievement_cover_picture"
  1178. fileList={this.getcoverImg}
  1179. pictureUrl={this.state.coverImg} />
  1180. <p>图片尺寸建议:220X140(像素)</p>
  1181. </FormItem>:<div></div>}
  1182. <div className="clearfix">
  1183. <FormItem className="half-item"
  1184. {...formItemLayout}
  1185. label="是否发布" >
  1186. {(() => {
  1187. switch (theData.releaseStatus) {
  1188. case "0":
  1189. return <span>未发布</span>;
  1190. case "1":
  1191. return <span>已发布</span>;
  1192. }
  1193. })()}
  1194. </FormItem>
  1195. <FormItem className="half-item"
  1196. {...formItemLayout}
  1197. label="发布时间" >
  1198. <span>{theData.releaseDateFormattedDate}</span>
  1199. </FormItem>
  1200. <FormItem className="half-item"
  1201. {...formItemLayout}
  1202. label="审核状态" >
  1203. <span>{getTechAuditStatus(theData.auditStatus)}</span>
  1204. </FormItem>
  1205. <FormItem className="half-item"
  1206. {...formItemLayout}
  1207. label="是否国际" >
  1208. {getFieldDecorator('internationalFlag', {
  1209. initialValue: theData.internationalFlag
  1210. })(
  1211. <Radio.Group>
  1212. <Radio value="0">否</Radio>
  1213. <Radio value="1">是</Radio>
  1214. </Radio.Group>
  1215. )}
  1216. </FormItem>
  1217. </div>
  1218. </div>
  1219. <FormItem
  1220. labelCol={{ span: 4 }}
  1221. wrapperCol={{ span: 18 }}
  1222. label="关键词" >
  1223. <KeyWordTagGroup
  1224. keyWordArr={this.state.tags}
  1225. tagsArr={this.getTagsArr} />
  1226. </FormItem>
  1227. <FormItem
  1228. labelCol={{ span: 4 }}
  1229. wrapperCol={{ span: 18 }}
  1230. label="成果类别" >
  1231. <Select placeholder="选择成果类别" style={{ width: 120 }}
  1232. value={this.state.orgDisplay}
  1233. onChange={(e) => { this.setState({ orgDisplay: e }) }}>
  1234. <Select.Option value="0" >个人</Select.Option>
  1235. <Select.Option value="1" >组织</Select.Option>
  1236. </Select>
  1237. </FormItem>
  1238. <FormItem
  1239. labelCol={{ span: 4 }}
  1240. wrapperCol={{ span: 18 }}
  1241. label="摘要" >
  1242. {getFieldDecorator('summary', {
  1243. initialValue: theData.summary
  1244. })(
  1245. <Input type="textarea" rows={4} />
  1246. )}
  1247. </FormItem>
  1248. <FormItem
  1249. labelCol={{ span: 4 }}
  1250. wrapperCol={{ span: 18 }}
  1251. label="成果简介" >
  1252. {getFieldDecorator('introduction', {
  1253. initialValue: theData.introduction
  1254. })(
  1255. <Input type="textarea" rows={4} placeholder="项目成果简介;项目核心创新点;项目详细用途;预期效益说明;主要技术(性能)指标;市场前景;应用范围;发展历程。" />
  1256. )}
  1257. </FormItem>
  1258. <FormItem
  1259. labelCol={{ span: 4 }}
  1260. wrapperCol={{ span: 18 }}
  1261. label="备注" >
  1262. {getFieldDecorator('remark', {
  1263. initialValue: theData.remark
  1264. })(
  1265. <Input type="textarea" rows={4} placeholder="此处输入备注" />
  1266. )}
  1267. </FormItem>
  1268. <FormItem
  1269. labelCol={{ span: 4 }}
  1270. wrapperCol={{ span: 18 }}
  1271. label="技术图片" >
  1272. <PicturesWall
  1273. pictureSign="achievement_technical_picture"
  1274. fileList={this.getTechnicalPictureUrl}
  1275. pictureUrl={this.state.technicalPictureUrl} />
  1276. <p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
  1277. </FormItem>
  1278. <FormItem
  1279. labelCol={{ span: 4 }}
  1280. wrapperCol={{ span: 18 }}
  1281. label="应用领域" >
  1282. {getFieldDecorator('field', {
  1283. rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
  1284. initialValue: [theData.fieldA, theData.fieldB]
  1285. })(
  1286. <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="应用领域" />
  1287. )}
  1288. </FormItem>
  1289. <div className="clearfix">
  1290. <FormItem className="half-item"
  1291. {...formItemLayout}
  1292. label="成熟度" >
  1293. {getFieldDecorator('maturity', {
  1294. initialValue: theData.maturity
  1295. })(
  1296. <Select placeholder="选择成熟度" style={{ width: 160 }} >
  1297. {
  1298. maturityList.map(function (item) {
  1299. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1300. })
  1301. }
  1302. </Select>
  1303. )}
  1304. </FormItem>
  1305. <FormItem className="half-item"
  1306. {...formItemLayout}
  1307. label="创新度" >
  1308. {getFieldDecorator('innovation', {
  1309. initialValue: theData.innovation
  1310. })(
  1311. <Select placeholder="选择创新度" style={{ width: 160 }} >
  1312. {
  1313. innovationList.map(function (item) {
  1314. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1315. })
  1316. }
  1317. </Select>
  1318. )}
  1319. </FormItem>
  1320. </div>
  1321. <FormItem
  1322. labelCol={{ span: 4 }}
  1323. wrapperCol={{ span: 18 }}
  1324. label="成熟度证明材料(图片)" >
  1325. <PicturesWall
  1326. pictureSign="achievement_maturity_picture"
  1327. fileList={this.getMaturityPictureUrl}
  1328. pictureUrl={this.state.maturityPictureUrl} />
  1329. </FormItem>
  1330. <FormItem
  1331. labelCol={{ span: 4 }}
  1332. wrapperCol={{ span: 6 }}
  1333. label="成熟度证明材料(文本)" >
  1334. <Upload
  1335. name="ratepay"
  1336. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1337. data={{ 'sign': 'achievement_maturity_text_file' }}
  1338. beforeUpload={beforeUploadFile}
  1339. fileList={this.state.textFileList}
  1340. onChange={(info) => {
  1341. if (info.file.status !== 'uploading') {
  1342. }
  1343. if (info.file.status === 'done') {
  1344. if (!info.file.response.error.length) {
  1345. message.success(`${info.file.name} 文件上传成功!`);
  1346. } else {
  1347. message.warning(info.file.response.error[0].message);
  1348. return;
  1349. };
  1350. this.state.maturityTextFileUrl = info.file.response.data;
  1351. } else if (info.file.status === 'error') {
  1352. message.error(`${info.file.name} 文件上传失败。`);
  1353. };
  1354. this.setState({ textFileList: info.fileList.slice(-1) });
  1355. }} >
  1356. <Button><Icon type="upload" /> 上传成熟度证明文本 </Button>
  1357. </Upload>
  1358. <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
  1359. <span className="download-file">
  1360. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
  1361. </span>
  1362. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1363. </FormItem>
  1364. <FormItem
  1365. labelCol={{ span: 4 }}
  1366. wrapperCol={{ span: 18 }}
  1367. label="成熟度证明材料(视频地址)" >
  1368. {getFieldDecorator('maturityVideoUrl', {
  1369. initialValue: theData.maturityVideoUrl
  1370. })(
  1371. <Input />
  1372. )}
  1373. </FormItem>
  1374. <FormItem
  1375. labelCol={{ span: 4 }}
  1376. wrapperCol={{ span: 18 }}
  1377. label="自定义成果所有人" >
  1378. <Switch checked={this.state.switchValue} onChange={(e) => { this.setState({ switchValue: e }); }} />
  1379. </FormItem>
  1380. {this.state.switchValue ? <div className="clearfix" >
  1381. <FormItem className="half-item"
  1382. {...formItemLayout}
  1383. label="成果所有人" >
  1384. {getFieldDecorator('ownerName', {
  1385. initialValue: theData.ownerName
  1386. })(
  1387. <Input />
  1388. )}
  1389. </FormItem>
  1390. <FormItem className="half-item"
  1391. {...formItemLayout}
  1392. label="联系电话" >
  1393. {getFieldDecorator('ownerMobile', {
  1394. initialValue: theData.ownerMobile
  1395. })(
  1396. <Input />
  1397. )}
  1398. </FormItem>
  1399. <FormItem className="half-item"
  1400. {...formItemLayout}
  1401. label="证件号" >
  1402. {getFieldDecorator('ownerIdNumber', {
  1403. initialValue: theData.ownerIdNumber
  1404. })(
  1405. <Input />
  1406. )}
  1407. </FormItem>
  1408. <FormItem className="half-item"
  1409. {...formItemLayout}
  1410. label="电子邮箱" >
  1411. {getFieldDecorator('ownerEmail', {
  1412. initialValue: theData.ownerEmail
  1413. })(
  1414. <Input />
  1415. )}
  1416. </FormItem>
  1417. <FormItem className="half-item"
  1418. {...formItemLayout}
  1419. label="通讯地址" >
  1420. {getFieldDecorator('ownerPostalAddress', {
  1421. initialValue: theData.ownerPostalAddress
  1422. })(
  1423. <Input />
  1424. )}
  1425. </FormItem>
  1426. </div> : <div className="clearfix" >
  1427. <FormItem className="half-item"
  1428. {...formItemLayout}
  1429. label="成果所有人" >
  1430. {getFieldDecorator('iOwnerName', {
  1431. initialValue: theData.iOwnerName || ''
  1432. })(
  1433. <AutoComplete
  1434. dataSource={this.state.dataSource}
  1435. style={{ width: 200 }}
  1436. onSearch={this.state.therottleSearch}
  1437. placeholder="输入成果所有人"
  1438. onSelect={(e) => {
  1439. this.getContactsList(this.state.dataSourceObj[e]);
  1440. }} />
  1441. )}
  1442. </FormItem>
  1443. {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
  1444. {...formItemLayout}
  1445. label="联系人" >
  1446. {getFieldDecorator('contacts', {
  1447. initialValue: theData.contacts
  1448. })(
  1449. <Select style={{ width: 260 }}
  1450. placeholder="请选择联系人"
  1451. notFoundContent="未获取到联系人列表"
  1452. showSearch
  1453. filterOption={companySearch}>
  1454. {this.state.contactsOption}
  1455. </Select>
  1456. )}
  1457. </FormItem> : <div></div>}
  1458. </div>}
  1459. <div className="clearfix">
  1460. <FormItem className="half-item"
  1461. {...formItemLayout}
  1462. label="合作方式" >
  1463. {getFieldDecorator('cooperationMode', {
  1464. rules: [{ required: true, message: '此项为必填项!' }],
  1465. initialValue: theData.cooperationMode
  1466. })(
  1467. <Radio.Group>
  1468. <Radio value="0">技术转让</Radio>
  1469. <Radio value="1">授权生产</Radio>
  1470. </Radio.Group>
  1471. )}
  1472. </FormItem>
  1473. <FormItem className="half-item"
  1474. {...formItemLayout}
  1475. label="转让方式" >
  1476. {getFieldDecorator('transferMode', {
  1477. initialValue: theData.transferMode
  1478. })(
  1479. <Select placeholder="选择转让方式" style={{ width: 160 }} >
  1480. {
  1481. transferModeList.map(function (item) {
  1482. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1483. })
  1484. }
  1485. </Select>
  1486. )}
  1487. </FormItem>
  1488. </div>
  1489. <div className="clearfix">
  1490. <FormItem className="half-item"
  1491. {...formItemLayout}
  1492. label="议价方式" >
  1493. {getFieldDecorator('bargainingMode', {
  1494. initialValue: theData.bargainingMode
  1495. })(
  1496. <Radio.Group onChange={(e) => {
  1497. this.setState({
  1498. transferPriceDis: (e.target.value == 1 ? true : false)
  1499. })
  1500. }}>
  1501. <Radio value="0">面议</Radio>
  1502. <Radio value="1">定价</Radio>
  1503. </Radio.Group>
  1504. )}
  1505. </FormItem>
  1506. {this.state.transferPriceDis ? <FormItem className="half-item"
  1507. {...formItemLayout}
  1508. label="转让价格" >
  1509. {getFieldDecorator('transferPrice', {
  1510. initialValue: theData.transferPrice || 0
  1511. })(
  1512. <InputNumber min={0} max={999999} step={0.01} />
  1513. )}
  1514. <span style={{ marginLeft: '20px' }}>万元</span>
  1515. </FormItem> : <div></div>}
  1516. </div>
  1517. <FormItem
  1518. labelCol={{ span: 4 }}
  1519. wrapperCol={{ span: 18 }}
  1520. label="技术场景" >
  1521. {getFieldDecorator('technicalScene', {
  1522. initialValue: theData.technicalScene
  1523. })(
  1524. <Input type="textarea" rows={2} placeholder="说明解决了什么问题。" />
  1525. )}
  1526. </FormItem>
  1527. <FormItem
  1528. labelCol={{ span: 4 }}
  1529. wrapperCol={{ span: 18 }}
  1530. label="技术突破" >
  1531. {getFieldDecorator('breakthrough', {
  1532. initialValue: theData.breakthrough
  1533. })(
  1534. <Input type="textarea" rows={2} placeholder="说明该技术成果突破性的研究。" />
  1535. )}
  1536. </FormItem>
  1537. <FormItem
  1538. labelCol={{ span: 4 }}
  1539. wrapperCol={{ span: 18 }}
  1540. label="专利情况" >
  1541. {getFieldDecorator('patentCase', {
  1542. initialValue: theData.patentCase
  1543. })(
  1544. <Input type="textarea" rows={2} placeholder="一个“技术”可能由多个专利构成,需要说明技术-专利的关系。" />
  1545. )}
  1546. </FormItem>
  1547. <FormItem
  1548. labelCol={{ span: 4 }}
  1549. wrapperCol={{ span: 18 }}
  1550. label="获奖情况" >
  1551. {getFieldDecorator('awards', {
  1552. initialValue: theData.awards
  1553. })(
  1554. <Input type="textarea" rows={2} placeholder="一个“技术”可能存在社会奖励情况,需要说明社会奖励情况。" />
  1555. )}
  1556. </FormItem>
  1557. <FormItem
  1558. labelCol={{ span: 4 }}
  1559. wrapperCol={{ span: 18 }}
  1560. label="技术团队情况" >
  1561. {getFieldDecorator('teamDes', {
  1562. initialValue: theData.teamDes
  1563. })(
  1564. <Input type="textarea" rows={2} placeholder="一个“技术”、“项目”可能存在团队,需要说明团队情况。" />
  1565. )}
  1566. </FormItem>
  1567. <FormItem
  1568. labelCol={{ span: 4 }}
  1569. wrapperCol={{ span: 18 }}
  1570. label="技术参数" >
  1571. {getFieldDecorator('parameter', {
  1572. initialValue: theData.parameter
  1573. })(
  1574. <Input type="textarea" rows={2} placeholder="描述技术参数信息" />
  1575. )}
  1576. </FormItem>
  1577. <FormItem
  1578. labelCol={{ span: 4 }}
  1579. wrapperCol={{ span: 6 }}
  1580. label="技术方案" >
  1581. <Upload
  1582. name="ratepay"
  1583. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1584. data={{ 'sign': 'achievement_tech_plan' }}
  1585. beforeUpload={beforeUploadFile}
  1586. fileList={this.state.techPlanFileList}
  1587. onChange={(info) => {
  1588. if (info.file.status !== 'uploading') {
  1589. }
  1590. if (info.file.status === 'done') {
  1591. if (!info.file.response.error.length) {
  1592. message.success(`${info.file.name} 文件上传成功!`);
  1593. } else {
  1594. message.warning(info.file.response.error[0].message);
  1595. return;
  1596. };
  1597. this.state.techPlanUrl = info.file.response.data;
  1598. } else if (info.file.status === 'error') {
  1599. message.error(`${info.file.name} 文件上传失败。`);
  1600. };
  1601. this.setState({ techPlanFileList: info.fileList.slice(-1) });
  1602. }} >
  1603. <Button><Icon type="upload" /> 上传技术方案文件 </Button>
  1604. </Upload>
  1605. <p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
  1606. <span className="download-file">
  1607. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
  1608. </span>
  1609. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1610. </FormItem>
  1611. <FormItem
  1612. labelCol={{ span: 4 }}
  1613. wrapperCol={{ span: 6 }}
  1614. label="商业计划书" >
  1615. <Upload
  1616. name="ratepay"
  1617. action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
  1618. data={{ 'sign': 'achievement_business_plan' }}
  1619. beforeUpload={beforeUploadFile}
  1620. fileList={this.state.businessPlanFileList}
  1621. onChange={(info) => {
  1622. if (info.file.status !== 'uploading') {
  1623. }
  1624. if (info.file.status === 'done') {
  1625. if (!info.file.response.error.length) {
  1626. message.success(`${info.file.name} 文件上传成功!`);
  1627. } else {
  1628. message.warning(info.file.response.error[0].message);
  1629. return;
  1630. };
  1631. this.state.businessPlanUrl = info.file.response.data;
  1632. } else if (info.file.status === 'error') {
  1633. message.error(`${info.file.name} 文件上传失败。`);
  1634. };
  1635. this.setState({ businessPlanFileList: info.fileList.slice(-1) });
  1636. }} >
  1637. <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
  1638. </Upload>
  1639. <p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
  1640. <span className="download-file">
  1641. <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
  1642. </span>
  1643. : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
  1644. </FormItem>
  1645. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  1646. {theData.auditStatus != 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存草稿</Button>: <span></span>}
  1647. <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">提交审核</Button>
  1648. <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
  1649. </FormItem>
  1650. </Spin>
  1651. </Form >
  1652. )
  1653. }
  1654. }));
  1655. const AchievementDetail = React.createClass({
  1656. getInitialState() {
  1657. return {
  1658. visible: false,
  1659. tabsKey: 1,
  1660. loading: false,
  1661. columns: [
  1662. {
  1663. title: '编号',
  1664. dataIndex: 'serialNumber',
  1665. key: 'serialNumber',
  1666. }, {
  1667. title: '数据类型',
  1668. dataIndex: 'dataCategory',
  1669. key: 'dataCategory',
  1670. render: text => {
  1671. switch (text) {
  1672. case "0":
  1673. return <span>成果</span>;
  1674. case "1":
  1675. return <span>技术</span>;
  1676. case "2":
  1677. return <span>项目</span>;
  1678. }
  1679. }
  1680. }, {
  1681. title: '名称',
  1682. dataIndex: 'name',
  1683. key: 'name',
  1684. }, {
  1685. title: '关键字',
  1686. dataIndex: 'keyword',
  1687. key: 'keyword',
  1688. }, {
  1689. title: '类型',
  1690. dataIndex: 'demandType',
  1691. key: 'demandType',
  1692. render: text => { return getDemandType(text); }
  1693. }, {
  1694. title: '所有人名称',
  1695. dataIndex: 'theName',
  1696. key: 'theName',
  1697. }, {
  1698. title: '发布时间',
  1699. dataIndex: 'releaseDateFormattedDate',
  1700. key: 'releaseDateFormattedDate',
  1701. }, {
  1702. title: '有效期限',
  1703. dataIndex: 'validityPeriodFormattedDate',
  1704. key: 'validityPeriodFormattedDate',
  1705. },
  1706. ],
  1707. dataSource: [],
  1708. };
  1709. },
  1710. getTechBrodersList() {
  1711. this.setState({
  1712. loading: true
  1713. });
  1714. $.ajax({
  1715. method: "get",
  1716. dataType: "json",
  1717. crossDomain: false,
  1718. url: globalConfig.context + "/api/admin/audit/techBroders",
  1719. success: function (data) {
  1720. if (!data.data) {
  1721. if (data.error && data.error.length) {
  1722. message.warning(data.error[0].message);
  1723. }
  1724. return;
  1725. };
  1726. let _me = this, theArr = [];
  1727. for (var item in data.data) {
  1728. theArr.push(
  1729. <Select.Option key={item}>{data.data[item]}</Select.Option>
  1730. )
  1731. };
  1732. this.setState({
  1733. techBrodersOption: theArr,
  1734. techBrodersObj: data.data
  1735. });
  1736. }.bind(this),
  1737. }).always(function () {
  1738. this.setState({
  1739. loading: false
  1740. });
  1741. }.bind(this));
  1742. },
  1743. getTableList() {
  1744. this.setState({
  1745. loading: true
  1746. });
  1747. $.ajax({
  1748. method: "get",
  1749. dataType: "json",
  1750. crossDomain: false,
  1751. url: globalConfig.context + "/api/admin/achievement/achievementDemand",
  1752. data: { id: this.props.data.id },
  1753. success: function (data) {
  1754. let theArr = [];
  1755. if (!data.data) {
  1756. if (data.error && data.error.length) {
  1757. message.warning(data.error[0].message);
  1758. };
  1759. } else if (data.data.length) {
  1760. for (let i = 0; i < data.data.length; i++) {
  1761. let thisdata = data.data[i];
  1762. theArr.push({
  1763. key: i,
  1764. id: thisdata.id,
  1765. serialNumber: thisdata.serialNumber,
  1766. dataCategory: thisdata.dataCategory,
  1767. name: thisdata.name,
  1768. keyword: thisdata.keyword,
  1769. demandType: thisdata.demandType,
  1770. theName: thisdata.username || thisdata.unitName,
  1771. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  1772. validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
  1773. coverImg: thisdata.coverImg,
  1774. hot: thisdata.hot,
  1775. internationalFlag:thisdata.internationalFlag,
  1776. });
  1777. };
  1778. };
  1779. this.setState({
  1780. dataSource: theArr,
  1781. });
  1782. }.bind(this),
  1783. }).always(function () {
  1784. this.setState({
  1785. loading: false
  1786. });
  1787. }.bind(this));
  1788. },
  1789. tableRowClick(record, index) {
  1790. window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
  1791. },
  1792. handleCancel(e) {
  1793. this.setState({
  1794. visible: false,
  1795. });
  1796. this.props.closeDesc(false);
  1797. },
  1798. handleOk(e) {
  1799. this.setState({
  1800. visible: false,
  1801. });
  1802. this.props.closeDesc(false, true);
  1803. },
  1804. componentWillMount() {
  1805. this.getTechBrodersList();
  1806. },
  1807. componentWillReceiveProps(nextProps) {
  1808. if (!this.state.visible && nextProps.showDesc) {
  1809. this.state.tabsKey = "1";
  1810. };
  1811. this.state.visible = nextProps.showDesc;
  1812. },
  1813. render() {
  1814. if (this.props.data) {
  1815. return (
  1816. <div className="patent-desc">
  1817. <Modal maskClosable={false} visible={this.state.visible}
  1818. onOk={this.checkPatentProcess} onCancel={this.handleCancel}
  1819. width='1000px'
  1820. footer=''
  1821. className="admin-desc-content">
  1822. <Spin spinning={this.state.loading}>
  1823. <Tabs activeKey={this.state.tabsKey}
  1824. onChange={(e) => {
  1825. this.setState({ tabsKey: e });
  1826. if (e == "2") {
  1827. this.getTableList();
  1828. };
  1829. }} >
  1830. <Tabs.TabPane tab="成果详情" key="1">
  1831. {(() => {
  1832. if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4"&& this.props.data.auditStatus != "2") {
  1833. return <AchievementDetailShow
  1834. data={this.props.data}
  1835. detailApiUrl={this.props.detailApiUrl}
  1836. techBrodersOption={this.state.techBrodersOption}
  1837. techBrodersObj={this.state.techBrodersObj}
  1838. closeDesc={this.handleCancel}
  1839. visible={this.state.visible}
  1840. handleOk={this.handleOk} />
  1841. } else {
  1842. return <AchievementDetailForm
  1843. data={this.props.data}
  1844. detailApiUrl={this.props.detailApiUrl}
  1845. achievementCategoryOption={this.props.achievementCategoryOption}
  1846. techBrodersObj={this.state.techBrodersObj}
  1847. closeDesc={this.handleCancel}
  1848. visible={this.state.visible}
  1849. handleOk={this.handleOk} />
  1850. };
  1851. })()}
  1852. </Tabs.TabPane>
  1853. <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
  1854. <Table columns={this.state.columns}
  1855. dataSource={this.state.dataSource}
  1856. pagination={false}
  1857. onRowClick={this.tableRowClick} />
  1858. </Tabs.TabPane>
  1859. </Tabs>
  1860. </Spin>
  1861. </Modal>
  1862. </div>
  1863. );
  1864. } else {
  1865. return <div></div>
  1866. }
  1867. },
  1868. });
  1869. export default AchievementDetail;