techAchievementDesc.jsx 89 KB

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