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