| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519 | 
							- import React from 'react';
 
- import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, Upload, Input, InputNumber, Select, Button, Radio, Form, Cascader, Tag } from 'antd';
 
- import './techAchievement.less';
 
- import ajax from 'jquery/src/ajax/xhr.js';
 
- import $ from 'jquery/src/ajax';
 
- import { maturityList, innovationList, transferModeList } from '../../dataDic';
 
- import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
 
- import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation } from '../../tools.js';
 
- import throttle from '../../throttle.js';
 
- const KeyWordTagGroup = React.createClass({
 
-     getInitialState() {
 
-         return {
 
-             tags: [],
 
-             inputVisible: false,
 
-             inputValue: ''
 
-         };
 
-     },
 
-     handleClose(removedTag) {
 
-         const tags = this.state.tags.filter(tag => tag !== removedTag);
 
-         this.props.tagsArr(tags);
 
-         this.setState({ tags });
 
-     },
 
-     showInput() {
 
-         this.setState({ inputVisible: true }, () => this.input.focus());
 
-     },
 
-     handleInputChange(e) {
 
-         this.setState({ inputValue: e.target.value });
 
-     },
 
-     handleInputConfirm() {
 
-         const state = this.state;
 
-         const inputValue = state.inputValue;
 
-         let tags = state.tags;
 
-         if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
 
-             tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
 
-         };
 
-         this.props.tagsArr(tags);
 
-         this.setState({
 
-             tags,
 
-             inputVisible: false,
 
-             inputValue: '',
 
-         });
 
-     },
 
-     componentWillMount() {
 
-         this.state.tags = this.props.keyWordArr;
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-         if (this.props.keyWordArr != nextProps.keyWordArr) {
 
-             this.state.tags = nextProps.keyWordArr;
 
-         };
 
-     },
 
-     render() {
 
-         const { tags, inputVisible, inputValue } = this.state;
 
-         return (
 
-             <div className="keyWord-tips">
 
-                 {tags.map((tag, index) => {
 
-                     const isLongTag = tag.length > 10;
 
-                     const tagElem = (
 
-                         <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
 
-                             {isLongTag ? `${tag.slice(0, 10)}...` : tag}
 
-                         </Tag>
 
-                     );
 
-                     return isLongTag ? <Tooltip key={tag} title={tag}>{tagElem}</Tooltip> : tagElem;
 
-                 })}
 
-                 {inputVisible && (
 
-                     <Input
 
-                         ref={input => this.input = input}
 
-                         type="text"
 
-                         style={{ width: 78 }}
 
-                         value={inputValue}
 
-                         onChange={this.handleInputChange}
 
-                         onBlur={this.handleInputConfirm}
 
-                         onPressEnter={this.handleInputConfirm}
 
-                     />
 
-                 )}
 
-                 {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
 
-             </div>
 
-         );
 
-     }
 
- });
 
- const PicturesWall = React.createClass({
 
-     getInitialState() {
 
-         return {
 
-             previewVisible: false,
 
-             previewImage: '',
 
-             fileList: [],
 
-         }
 
-     },
 
-     handleCancel() {
 
-         this.setState({ previewVisible: false })
 
-     },
 
-     handlePreview(file) {
 
-         this.setState({
 
-             previewImage: file.url || file.thumbUrl,
 
-             previewVisible: true,
 
-         });
 
-     },
 
-     handleChange(info) {
 
-         let fileList = info.fileList;
 
-         this.setState({ fileList });
 
-         this.props.fileList(fileList);
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-         this.state.fileList = nextProps.pictureUrl;
 
-     },
 
-     render() {
 
-         const { previewVisible, previewImage, fileList } = this.state;
 
-         const uploadButton = (
 
-             <div>
 
-                 <Icon type="plus" />
 
-                 <div className="ant-upload-text">点击上传</div>
 
-             </div>
 
-         );
 
-         return (
 
-             <div className="clearfix">
 
-                 <Upload
 
-                     action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
 
-                     data={{ 'sign': this.props.pictureSign }}
 
-                     listType="picture-card"
 
-                     fileList={fileList}
 
-                     onPreview={this.handlePreview}
 
-                     onChange={this.handleChange} >
 
-                     {fileList.length > 5 ? null : uploadButton}
 
-                 </Upload>
 
-                 <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
 
-                     <img alt="example" style={{ width: '100%' }} src={previewImage} />
 
-                 </Modal>
 
-             </div>
 
-         );
 
-     }
 
- });
 
- const AchievementDetailShow = Form.create()(React.createClass({
 
-     getInitialState() {
 
-         return {
 
-             loading: false,
 
-             buttonLoading: false,
 
-             data: {},
 
-             tags: [],
 
-             technicalPictureUrl: [],
 
-             maturityPictureUrl: [],
 
-             textFileList: [],
 
-             techPlanFileList: [],
 
-             businessPlanFileList: []
 
-         };
 
-     },
 
-     loadData(id, detailApiUrl) {
 
-         this.setState({
 
-             loading: true
 
-         });
 
-         $.ajax({
 
-             method: "get",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + detailApiUrl,
 
-             data: {
 
-                 id: id
 
-             },
 
-             success: function (data) {
 
-                 let thisData = data.data;
 
-                 if (!thisData) {
 
-                     if (data.error && data.error.length) {
 
-                         message.warning(data.error[0].message);
 
-                     };
 
-                     thisData = {};
 
-                 };
 
-                 this.setState({
 
-                     data: thisData,
 
-                     orgDisplay: thisData.ownerType,
 
-                     tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
 
-                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
 
-                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
 
-                 });
 
-                 console.log(this.state.tags);
 
-             }.bind(this),
 
-         }).always(function () {
 
-             this.setState({
 
-                 loading: false
 
-             });
 
-         }.bind(this));
 
-     },
 
-     offShelf() {
 
-         this.setState({
 
-             loading: true
 
-         });
 
-         $.ajax({
 
-             method: "post",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + "/api/admin/achievement/offShelf",
 
-             data: { "id": this.props.data.id }
 
-         }).done(function (data) {
 
-             if (!data.error.length) {
 
-                 message.success('撤销成功!');
 
-                 this.setState({
 
-                     visible: false,
 
-                     releaseSubmitVisible: false
 
-                 });
 
-                 this.props.handleOk();
 
-             } else {
 
-                 message.warning(data.error[0].message);
 
-             }
 
-         }.bind(this));
 
-     },
 
-     formSubmit() {
 
-         this.props.form.validateFields((err, values) => {
 
-             if (values.auditStatus == 3 && !values.techBroderId) {
 
-                 message.warning('必须选择一个技术经纪人!');
 
-                 return
 
-             };
 
-             if (!err) {
 
-                 this.setState({
 
-                     loading: true
 
-                 });
 
-                 $.ajax({
 
-                     method: "POST",
 
-                     dataType: "json",
 
-                     crossDomain: false,
 
-                     url: globalConfig.context + '/api/admin/audit/achievement',
 
-                     data: {
 
-                         id: this.props.data.id,
 
-                         techBroderId: values.techBroderId,
 
-                         auditStatus: values.auditStatus
 
-                     }
 
-                 }).done(function (data) {
 
-                     this.state.auditStatus = 0;
 
-                     this.setState({
 
-                         loading: false
 
-                     });
 
-                     if (!data.error.length) {
 
-                         message.success('保存成功!');
 
-                         this.setState({
 
-                             formSubmitVisible: false
 
-                         });
 
-                         this.props.handleOk();
 
-                     } else {
 
-                         message.warning(data.error[0].message);
 
-                     };
 
-                 }.bind(this));
 
-             }
 
-         });
 
-     },
 
-     handleSubmit(e) {
 
-         e.preventDefault();
 
-         this.props.form.validateFields((err, values) => {
 
-             if (values.auditStatus == 4) {
 
-                 this.setState({
 
-                     formSubmitVisible: true
 
-                 });
 
-             } else {
 
-                 this.formSubmit();
 
-             };
 
-         });
 
-     },
 
-     buildMatchList() {
 
-         this.setState({
 
-             buttonLoading: true
 
-         });
 
-         $.ajax({
 
-             method: "POST",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + '/api/admin/achievement/matchDemand',
 
-             data: {
 
-                 id: this.props.data.id,
 
-             }
 
-         }).done(function (data) {
 
-             this.setState({
 
-                 buttonLoading: false
 
-             });
 
-             if (!data.error.length) {
 
-                 message.success('匹配完成!匹配到' + data.data + '条记录');
 
-             } else {
 
-                 message.warning(data.error[0].message);
 
-             };
 
-         }.bind(this));
 
-     },
 
-     componentWillMount() {
 
-         this.loadData(this.props.data.id, this.props.detailApiUrl);
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-         if (!this.props.visible && nextProps.visible) {
 
-             this.loadData(nextProps.data.id, nextProps.detailApiUrl);
 
-             this.state.textFileList = [];
 
-             this.state.techPlanFileList = [];
 
-             this.state.businessPlanFileList = [];
 
-             this.props.form.resetFields();
 
-         };
 
-     },
 
-     render() {
 
-         const theData = this.state.data || {};
 
-         const { getFieldDecorator } = this.props.form;
 
-         const FormItem = Form.Item
 
-         const formItemLayout = {
 
-             labelCol: { span: 8 },
 
-             wrapperCol: { span: 14 },
 
-         };
 
-         return (
 
-             <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
 
-                 <Spin spinning={this.state.loading}>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="编号" >
 
-                             <span>{theData.serialNumber}</span>
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="名称" >
 
-                             <span>{theData.name}</span>
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="数据类别" >
 
-                             {(() => {
 
-                                 switch (theData.dataCategory) {
 
-                                     case "0":
 
-                                         return <span>成果</span>;
 
-                                     case "1":
 
-                                         return <span>技术</span>;
 
-                                     case "2":
 
-                                         return <span>项目</span>;
 
-                                 }
 
-                             })()}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="类型" >
 
-                             <span>{getAchievementCategory(theData.category)}</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="是否发布" >
 
-                             {(() => {
 
-                                 switch (theData.releaseStatus) {
 
-                                     case "0":
 
-                                         return <span>未发布</span>;
 
-                                     case "1":
 
-                                         return <div>
 
-                                             <span>已发布</span>
 
-                                             <Button style={{ marginLeft: '10px' }} onClick={() => { this.setState({ releaseSubmitVisible: true }); }}>撤消发布</Button>
 
-                                             <Modal maskClosable={false} title="确认"
 
-                                                 visible={this.state.releaseSubmitVisible}
 
-                                                 width='300px'
 
-                                                 footer={null}
 
-                                                 onCancel={() => { this.setState({ releaseSubmitVisible: false }) }} >
 
-                                                 <span>确认要撤销发布吗?</span>
 
-                                                 <Button className="modal-submit" type="primary" onClick={this.offShelf} >确认</Button>
 
-                                                 <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ releaseSubmitVisible: false }) }}>取消</Button>
 
-                                             </Modal>
 
-                                         </div>;
 
-                                 }
 
-                             })()}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="发布时间" >
 
-                             <span>{theData.releaseDateFormattedDate}</span>
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="审核状态" >
 
-                             <span>{getTechAuditStatus(theData.auditStatus)}</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="关键词" >
 
-                         {this.state.tags.map((tag) => {
 
-                             return <Tooltip key={tag} title={tag}>
 
-                                 <Tag key={tag}>{tag}</Tag>
 
-                             </Tooltip>;
 
-                         })}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="摘要" >
 
-                         <span>{theData.summary}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成果简介" >
 
-                         <span>{theData.introduction}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术图片" >
 
-                         <div className="clearfix">
 
-                             <Upload className="demandDetailShow-upload"
 
-                                 listType="picture-card"
 
-                                 fileList={this.state.technicalPictureUrl}
 
-                                 onPreview={(file) => {
 
-                                     this.setState({
 
-                                         previewImage: file.url || file.thumbUrl,
 
-                                         previewVisible: true,
 
-                                     });
 
-                                 }} >
 
-                             </Upload>
 
-                             <Modal maskClosable={false} footer={null}
 
-                                 visible={this.state.previewVisible}
 
-                                 onCancel={() => { this.setState({ previewVisible: false }) }}>
 
-                                 <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
 
-                             </Modal>
 
-                         </div>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="应用领域" >
 
-                         <span>{getIndustryCategory(theData.fieldA, theData.fieldB)}</span>
 
-                     </FormItem>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="成熟度" >
 
-                             <span>{getMaturity(theData.maturity)}</span>
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="创新度" >
 
-                             <span>{getInnovation(theData.innovation)}</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成熟度证明材料(图片)" >
 
-                         <Upload className="demandDetailShow-upload"
 
-                             listType="picture-card"
 
-                             fileList={this.state.maturityPictureUrl}
 
-                             onPreview={(file) => {
 
-                                 this.setState({
 
-                                     previewImage: file.url || file.thumbUrl,
 
-                                     previewVisible: true,
 
-                                 });
 
-                             }} >
 
-                         </Upload>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="成熟度证明材料(文本)" >
 
-                         <p>{theData.maturityTextFileUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成熟度证明材料(视频地址)" >
 
-                         <span>{theData.maturityVideoUrl}</span>
 
-                     </FormItem>
 
-                     <div className="clearfix" >
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="成果所有人名称" >
 
-                             <span>{theData.ownerName}</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="合作方式" >
 
-                             {(() => {
 
-                                 switch (theData.cooperationMode) {
 
-                                     case "0":
 
-                                         return <span>技术转让</span>;
 
-                                     case "1":
 
-                                         return <span>授权生产</span>;
 
-                                 }
 
-                             })()}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="转让方式" >
 
-                             <span>{getTransferMode(theData.transferMode)}</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="议价方式" >
 
-                             {(() => {
 
-                                 switch (theData.bargainingMode) {
 
-                                     case "0":
 
-                                         return <span>面议</span>;
 
-                                     case "1":
 
-                                         return <span>定价</span>;
 
-                                 }
 
-                             })()}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="转让价格" >
 
-                             <span>{theData.transferPrice} 万元</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术场景" >
 
-                         <span>{theData.technicalScene}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术突破" >
 
-                         <span>{theData.breakthrough}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="专利情况" >
 
-                         <span>{theData.patentCase}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="获奖情况" >
 
-                         <span>{theData.awards}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术团队情况" >
 
-                         <span>{theData.teamDes}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术参数" >
 
-                         <span>{theData.parameter}</span>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="技术方案" >
 
-                         <p>{theData.techPlanUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="商业计划书" >
 
-                         <p>{theData.businessPlanUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     {window.showAuditStatus && theData.auditStatus == 2 ? <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="审核状态" >
 
-                             {getFieldDecorator('auditStatus')(
 
-                                 <Radio.Group>
 
-                                     <Radio value={3}>审核通过</Radio>
 
-                                     <Radio value={4}>审核未通过</Radio>
 
-                                 </Radio.Group>
 
-                             )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="技术经纪人" >
 
-                             {getFieldDecorator('techBroderId', {
 
-                                 initialValue: theData.techBroderId
 
-                             })(
 
-                                 <Select style={{ width: 260 }}>
 
-                                     {this.props.techBrodersOption}
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                     </div> : <div></div>}
 
-                     <FormItem wrapperCol={{ span: 12, offset: 4 }}>
 
-                         {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
 
-                         <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
 
-                         {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
 
-                     </FormItem>
 
-                     <Modal maskClosable={false} title="确认"
 
-                         visible={this.state.formSubmitVisible}
 
-                         width='360px'
 
-                         footer={null}
 
-                         onCancel={() => { this.setState({ formSubmitVisible: false }) }} >
 
-                         <span>确认该需求审核未通过?</span>
 
-                         <Button className="modal-submit" type="primary" onClick={this.formSubmit}>确认</Button>
 
-                         <Button className="modal-submit" type="ghost" onClick={() => { this.setState({ formSubmitVisible: false }) }}>取消</Button>
 
-                     </Modal>
 
-                 </Spin>
 
-             </Form >
 
-         )
 
-     }
 
- }));
 
- const AchievementDetailForm = Form.create()(React.createClass({
 
-     getInitialState() {
 
-         return {
 
-             loading: false,
 
-             auditStatus: 0,
 
-             textFileList: [],
 
-             techPlanFileList: [],
 
-             data: {},
 
-             tags: [],
 
-             technicalPictureUrl: [],
 
-             maturityPictureUrl: [],
 
-             businessPlanFileList: [],
 
-             dataSource: [],
 
-         };
 
-     },
 
-     loadData(id, detailApiUrl) {
 
-         this.setState({
 
-             loading: true
 
-         });
 
-         $.ajax({
 
-             method: "get",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + detailApiUrl,
 
-             data: {
 
-                 id: id
 
-             },
 
-             success: function (data) {
 
-                 let thisData = data.data;
 
-                 if (!thisData) {
 
-                     if (data.error && data.error.length) {
 
-                         message.warning(data.error[0].message);
 
-                     };
 
-                     thisData = {};
 
-                 };
 
-                 this.setState({
 
-                     data: thisData,
 
-                     orgDisplay: thisData.ownerType,
 
-                     tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
 
-                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
 
-                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
 
-                 });
 
-                 if (thisData.ownerType == "1" && thisData.ownerId) {
 
-                     this.getContactsList(thisData.ownerId);
 
-                 };
 
-             }.bind(this),
 
-         }).always(function () {
 
-             this.setState({
 
-                 loading: false
 
-             });
 
-         }.bind(this));
 
-     },
 
-     getContactsList(theUid) {
 
-         $.ajax({
 
-             method: "get",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + "/api/admin/getContacts",
 
-             data: {
 
-                 uid: theUid
 
-             },
 
-             success: function (data) {
 
-                 let theOption = [];
 
-                 if (!data.data) {
 
-                     if (data.error && data.error.length) {
 
-                         message.warning(data.error[0].message);
 
-                         return;
 
-                     };
 
-                 };
 
-                 for (let item in data.data) {
 
-                     let theData = data.data[item];
 
-                     theOption.push(
 
-                         <Select.Option value={item} key={theData}>{theData}</Select.Option>
 
-                     );
 
-                 };
 
-                 this.setState({
 
-                     contactsOption: theOption
 
-                 });
 
-             }.bind(this),
 
-         });
 
-     },
 
-     getTagsArr(e) {
 
-         this.setState({ tags: e });
 
-     },
 
-     getMaturityPictureUrl(e) {
 
-         this.setState({ maturityPictureUrl: e });
 
-     },
 
-     getTechnicalPictureUrl(e) {
 
-         this.setState({ technicalPictureUrl: e });
 
-     },
 
-     handleSearch(e) {
 
-         if (this.props.detailApiUrl.indexOf('org') != -1) {
 
-             $.ajax({
 
-                 method: "get",
 
-                 dataType: "json",
 
-                 crossDomain: false,
 
-                 url: globalConfig.context + "/api/admin/achievement/orgOwner",
 
-                 data: { name: e },
 
-                 success: function (data) {
 
-                     let theArr = [];
 
-                     let theObj = {};
 
-                     if (!data.data) {
 
-                         if (data.error && data.error.length) {
 
-                             message.warning(data.error[0].message);
 
-                         };
 
-                     } else if (!$.isEmptyObject(data.data)) {
 
-                         data.data.map(function (item) {
 
-                             theArr.push(item.unitName);
 
-                             theObj[item.unitName] = item.uid;
 
-                         });
 
-                     };
 
-                     this.setState({
 
-                         dataSource: theArr,
 
-                         dataSourceObj: theObj
 
-                     });
 
-                 }.bind(this),
 
-             });
 
-         } else {
 
-             $.ajax({
 
-                 method: "get",
 
-                 dataType: "json",
 
-                 crossDomain: false,
 
-                 url: globalConfig.context + "/api/admin/achievement/userOwner",
 
-                 data: { name: e },
 
-                 success: function (data) {
 
-                     let theArr = [];
 
-                     let theObj = {};
 
-                     if (!data.data) {
 
-                         if (data.error && data.error.length) {
 
-                             message.warning(data.error[0].message);
 
-                         };
 
-                     } else if (!$.isEmptyObject(data.data)) {
 
-                         for (let item in data.data) {
 
-                             theArr.push(data.data[item]);
 
-                             theObj[data.data[item]] = item;
 
-                         };
 
-                     };
 
-                     this.setState({
 
-                         dataSource: theArr,
 
-                         dataSourceObj: theObj
 
-                     });
 
-                 }.bind(this),
 
-             });
 
-         };
 
-     },
 
-     handleSubmit(e) {
 
-         e.preventDefault();
 
-         this.props.form.validateFields((err, values) => {
 
-             //keyword长度判断
 
-             if ((this.state.tags ? this.state.tags.length : this.props.tags.length) < 3) {
 
-                 message.warning('关键词数量不能小于3个!');
 
-                 return;
 
-             };
 
-             if (values.iOwnerName && this.state.dataSourceObj && !this.state.dataSourceObj[values.iOwnerName]) {
 
-                 message.warning('请选择一个有效的公司!');
 
-                 return;
 
-             };
 
-             if (values.bargainingMode == 1 && !values.transferPrice) {
 
-                 message.warning('议价方式为[ 定价 ]时, [ 转让价格 ]不能为空!');
 
-                 return;
 
-             }
 
-             //url转化
 
-             let theTechnicalPictureUrl = [];
 
-             if (this.state.technicalPictureUrl.length) {
 
-                 let picArr = [];
 
-                 this.state.technicalPictureUrl.map(function (item) {
 
-                     picArr.push(item.response.data);
 
-                 });
 
-                 theTechnicalPictureUrl = picArr.join(",");
 
-             };
 
-             let theMaturityPictureUrl = [];
 
-             if (this.state.maturityPictureUrl.length) {
 
-                 let picArr = [];
 
-                 this.state.maturityPictureUrl.map(function (item) {
 
-                     picArr.push(item.response.data);
 
-                 });
 
-                 theMaturityPictureUrl = picArr.join(",");
 
-             };
 
-             if (!err) {
 
-                 this.setState({
 
-                     loading: true
 
-                 });
 
-                 $.ajax({
 
-                     method: "POST",
 
-                     dataType: "json",
 
-                     crossDomain: false,
 
-                     url: this.props.data.id ? globalConfig.context + '/api/admin/achievement/update' : globalConfig.context + '/api/admin/achievement/apply',
 
-                     data: {
 
-                         id: this.props.data.id,
 
-                         dataCategory: values.dataCategory,
 
-                         serialNumber: this.props.data.serialNumber,
 
-                         name: values.name,
 
-                         keyword: this.state.tags ? this.state.tags.join(",") : this.props.tags.join(","),
 
-                         keywords: this.state.tags ? this.state.tags : this.props.tags,
 
-                         category: values.category,
 
-                         summary: values.summary,
 
-                         introduction: values.introduction,
 
-                         technicalPictureUrl: theTechnicalPictureUrl,
 
-                         fieldA: values.field ? values.field[0] : undefined,
 
-                         fieldB: values.field ? values.field[1] : undefined,
 
-                         contacts: values.contacts,
 
-                         maturity: values.maturity,
 
-                         maturityPictureUrl: theMaturityPictureUrl,
 
-                         maturityTextFileUrl: this.state.maturityTextFileUrl,
 
-                         maturityVideoUrl: values.maturityVideoUrl,
 
-                         innovation: values.innovation,
 
-                         ownerId: this.state.dataSourceObj ? this.state.dataSourceObj[values.iOwnerName] : this.props.data.ownerId,
 
-                         ownerType: this.props.detailApiUrl.indexOf('org') != -1 ? 1 : 0,
 
-                         cooperationMode: values.cooperationMode,
 
-                         transferMode: values.transferMode,
 
-                         bargainingMode: values.bargainingMode,
 
-                         transferPrice: values.transferPrice,
 
-                         technicalScene: values.technicalScene,
 
-                         breakthrough: values.breakthrough,
 
-                         patentCase: values.patentCase,
 
-                         awards: values.awards,
 
-                         teamDes: values.teamDes,
 
-                         parameter: values.parameter,
 
-                         releaseStatus: values.releaseStatus,
 
-                         techPlanUrl: this.state.techPlanUrl,
 
-                         businessPlanUrl: this.state.businessPlanUrl,
 
-                         auditStatus: this.state.auditStatus
 
-                     }
 
-                 }).done(function (data) {
 
-                     this.state.auditStatus = 0;
 
-                     this.setState({
 
-                         loading: false
 
-                     });
 
-                     if (!data.error.length) {
 
-                         message.success('保存成功!');
 
-                         this.props.handleOk();
 
-                     } else {
 
-                         message.warning(data.error[0].message);
 
-                     }
 
-                 }.bind(this));
 
-             }
 
-         });
 
-     },
 
-     componentWillMount() {
 
-         this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
 
-         if (this.props.data && this.props.data.id) {
 
-             this.loadData(this.props.data.id, this.props.detailApiUrl);
 
-         };
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-         if (!this.props.visible && nextProps.visible) {
 
-             if (nextProps.data && nextProps.data.id) {
 
-                 this.loadData(nextProps.data.id, nextProps.detailApiUrl);
 
-             };
 
-             this.state.textFileList = [];
 
-             this.state.techPlanFileList = [];
 
-             this.state.businessPlanFileList = [];
 
-             this.props.form.resetFields();
 
-         };
 
-     },
 
-     render() {
 
-         const theData = this.state.data || {};
 
-         const { getFieldDecorator } = this.props.form;
 
-         const FormItem = Form.Item
 
-         const formItemLayout = {
 
-             labelCol: { span: 8 },
 
-             wrapperCol: { span: 14 },
 
-         };
 
-         return (
 
-             <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
 
-                 <Spin spinning={this.state.loading}>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="编号" >
 
-                             <span>{theData.serialNumber}</span>
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="名称" >
 
-                             {getFieldDecorator('name', {
 
-                                 rules: [{ required: true, message: '此项为必填项!' }],
 
-                                 initialValue: theData.name
 
-                             })(
 
-                                 <Input />
 
-                                 )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="数据类别" >
 
-                             {getFieldDecorator('dataCategory', {
 
-                                 rules: [{ required: true, message: '此项为必填项!' }],
 
-                                 initialValue: theData.dataCategory
 
-                             })(
 
-                                 <Select placeholder="选择数据类型" style={{ width: 160 }} >
 
-                                     <Select.Option value="0" >成果</Select.Option>
 
-                                     <Select.Option value="1" >技术</Select.Option>
 
-                                     <Select.Option value="2" >项目</Select.Option>
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="类型" >
 
-                             {getFieldDecorator('category', {
 
-                                 rules: [{ required: true, message: '此项为必填项!' }],
 
-                                 initialValue: theData.category
 
-                             })(
 
-                                 <Select style={{ width: 160 }} placeholder="请选择成果类型">
 
-                                     {this.props.achievementCategoryOption}
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                         <div className="clearfix">
 
-                             <FormItem className="half-item"
 
-                                 {...formItemLayout}
 
-                                 label="是否发布" >
 
-                                 {(() => {
 
-                                     switch (theData.releaseStatus) {
 
-                                         case "0":
 
-                                             return <span>未发布</span>;
 
-                                         case "1":
 
-                                             return <span>已发布</span>;
 
-                                     }
 
-                                 })()}
 
-                             </FormItem>
 
-                             <FormItem className="half-item"
 
-                                 {...formItemLayout}
 
-                                 label="发布时间" >
 
-                                 <span>{theData.releaseDateFormattedDate}</span>
 
-                             </FormItem>
 
-                             <FormItem className="half-item"
 
-                                 {...formItemLayout}
 
-                                 label="审核状态" >
 
-                                 <span>{getTechAuditStatus(theData.auditStatus)}</span>
 
-                             </FormItem>
 
-                         </div>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="关键词" >
 
-                         <KeyWordTagGroup
 
-                             keyWordArr={this.state.tags}
 
-                             tagsArr={this.getTagsArr} />
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="摘要" >
 
-                         {getFieldDecorator('summary', {
 
-                             initialValue: theData.summary
 
-                         })(
 
-                             <Input type="textarea" rows={4} />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成果简介" >
 
-                         {getFieldDecorator('introduction', {
 
-                             initialValue: theData.introduction
 
-                         })(
 
-                             <Input type="textarea" rows={4} placeholder="项目成果简介;项目核心创新点;项目详细用途;预期效益说明;主要技术(性能)指标;市场前景;应用范围;发展历程。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术图片" >
 
-                         <PicturesWall
 
-                             pictureSign="achievement_technical_picture"
 
-                             fileList={this.getTechnicalPictureUrl}
 
-                             pictureUrl={this.state.technicalPictureUrl} />
 
-                         <p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="应用领域" >
 
-                         {getFieldDecorator('field', {
 
-                             rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
 
-                             initialValue: [theData.fieldA, theData.fieldB]
 
-                         })(
 
-                             <Cascader style={{ width: 300 }} options={IndustryObject} placeholder="应用领域" />
 
-                             )}
 
-                     </FormItem>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="成熟度" >
 
-                             {getFieldDecorator('maturity', {
 
-                                 initialValue: theData.maturity
 
-                             })(
 
-                                 <Select placeholder="选择成熟度" style={{ width: 160 }} >
 
-                                     {
 
-                                         maturityList.map(function (item) {
 
-                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
 
-                                         })
 
-                                     }
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="创新度" >
 
-                             {getFieldDecorator('innovation', {
 
-                                 initialValue: theData.innovation
 
-                             })(
 
-                                 <Select placeholder="选择创新度" style={{ width: 160 }} >
 
-                                     {
 
-                                         innovationList.map(function (item) {
 
-                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
 
-                                         })
 
-                                     }
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成熟度证明材料(图片)" >
 
-                         <PicturesWall
 
-                             pictureSign="achievement_maturity_picture"
 
-                             fileList={this.getMaturityPictureUrl}
 
-                             pictureUrl={this.state.maturityPictureUrl} />
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="成熟度证明材料(文本)" >
 
-                         <Upload
 
-                             name="ratepay"
 
-                             action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
 
-                             data={{ 'sign': 'achievement_maturity_text_file' }}
 
-                             beforeUpload={beforeUploadFile}
 
-                             fileList={this.state.textFileList}
 
-                             onChange={(info) => {
 
-                                 if (info.file.status !== 'uploading') {
 
-                                     console.log(info.file, info.fileList);
 
-                                 }
 
-                                 if (info.file.status === 'done') {
 
-                                     if (!info.file.response.error.length) {
 
-                                         message.success(`${info.file.name} 文件上传成功!`);
 
-                                     } else {
 
-                                         message.warning(info.file.response.error[0].message);
 
-                                         return;
 
-                                     };
 
-                                     this.state.maturityTextFileUrl = info.file.response.data;
 
-                                 } else if (info.file.status === 'error') {
 
-                                     message.error(`${info.file.name} 文件上传失败。`);
 
-                                 };
 
-                                 this.setState({ textFileList: info.fileList.slice(-1) });
 
-                             }} >
 
-                             <Button><Icon type="upload" /> 上传需求文本文件 </Button>
 
-                         </Upload>
 
-                         <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_maturity_text_file') }}>成熟度证明材料(文本文件)</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="成熟度证明材料(视频地址)" >
 
-                         {getFieldDecorator('maturityVideoUrl', {
 
-                             initialValue: theData.maturityVideoUrl
 
-                         })(
 
-                             <Input />
 
-                             )}
 
-                     </FormItem>
 
-                     <div className="clearfix" >
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="成果所有人" >
 
-                             {getFieldDecorator('iOwnerName', {
 
-                                 rules: [{ required: true, message: '此项为必填项!' }],
 
-                                 initialValue: theData.iOwnerName || ''
 
-                             })(
 
-                                 <AutoComplete
 
-                                     dataSource={this.state.dataSource}
 
-                                     style={{ width: 200 }}
 
-                                     onSearch={this.state.therottleSearch}
 
-                                     placeholder="输入成果所有人"
 
-                                     onSelect={(e) => {
 
-                                         this.getContactsList(this.state.dataSourceObj[e]);
 
-                                     }} />
 
-                                 )}
 
-                         </FormItem>
 
-                         {this.props.detailApiUrl.indexOf('org') >= 0 ? <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="联系人" >
 
-                             {getFieldDecorator('contacts', {
 
-                                 initialValue: theData.contacts
 
-                             })(
 
-                                 <Select style={{ width: 260 }}
 
-                                     placeholder="请选择联系人"
 
-                                     notFoundContent="未获取到联系人列表"
 
-                                     showSearch
 
-                                     filterOption={companySearch}>
 
-                                     {this.state.contactsOption}
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem> : <div></div>}
 
-                     </div>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="合作方式" >
 
-                             {getFieldDecorator('cooperationMode', {
 
-                                 rules: [{ required: true, message: '此项为必填项!' }],
 
-                                 initialValue: theData.cooperationMode
 
-                             })(
 
-                                 <Radio.Group>
 
-                                     <Radio value="0">技术转让</Radio>
 
-                                     <Radio value="1">授权生产</Radio>
 
-                                 </Radio.Group>
 
-                                 )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="转让方式" >
 
-                             {getFieldDecorator('transferMode', {
 
-                                 initialValue: theData.transferMode
 
-                             })(
 
-                                 <Select placeholder="选择转让方式" style={{ width: 160 }} >
 
-                                     {
 
-                                         transferModeList.map(function (item) {
 
-                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
 
-                                         })
 
-                                     }
 
-                                 </Select>
 
-                                 )}
 
-                         </FormItem>
 
-                     </div>
 
-                     <div className="clearfix">
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="议价方式" >
 
-                             {getFieldDecorator('bargainingMode', {
 
-                                 initialValue: theData.bargainingMode
 
-                             })(
 
-                                 <Radio.Group>
 
-                                     <Radio value="0">面议</Radio>
 
-                                     <Radio value="1">定价</Radio>
 
-                                 </Radio.Group>
 
-                                 )}
 
-                         </FormItem>
 
-                         <FormItem className="half-item"
 
-                             {...formItemLayout}
 
-                             label="转让价格" >
 
-                             {getFieldDecorator('transferPrice', {
 
-                                 initialValue: theData.transferPrice
 
-                             })(
 
-                                 <InputNumber min={0} max={9999} step={0.01} />
 
-                                 )}
 
-                             <span style={{ marginLeft: '20px' }}>万元</span>
 
-                         </FormItem>
 
-                     </div>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术场景" >
 
-                         {getFieldDecorator('technicalScene', {
 
-                             initialValue: theData.technicalScene
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="说明解决了什么问题。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术突破" >
 
-                         {getFieldDecorator('breakthrough', {
 
-                             initialValue: theData.breakthrough
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="说明该技术成果突破性的研究。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="专利情况" >
 
-                         {getFieldDecorator('patentCase', {
 
-                             initialValue: theData.patentCase
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="一个“技术”可能由多个专利构成,需要说明技术-专利的关系。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="获奖情况" >
 
-                         {getFieldDecorator('awards', {
 
-                             initialValue: theData.awards
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="一个“技术”可能存在社会奖励情况,需要说明社会奖励情况。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术团队情况" >
 
-                         {getFieldDecorator('teamDes', {
 
-                             initialValue: theData.teamDes
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="一个“技术”、“项目”可能存在团队,需要说明团队情况。" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 18 }}
 
-                         label="技术参数" >
 
-                         {getFieldDecorator('parameter', {
 
-                             initialValue: theData.parameter
 
-                         })(
 
-                             <Input type="textarea" rows={2} placeholder="描述技术参数信息" />
 
-                             )}
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="技术方案" >
 
-                         <Upload
 
-                             name="ratepay"
 
-                             action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
 
-                             data={{ 'sign': 'achievement_tech_plan' }}
 
-                             beforeUpload={beforeUploadFile}
 
-                             fileList={this.state.techPlanFileList}
 
-                             onChange={(info) => {
 
-                                 if (info.file.status !== 'uploading') {
 
-                                     console.log(info.file, info.fileList);
 
-                                 }
 
-                                 if (info.file.status === 'done') {
 
-                                     if (!info.file.response.error.length) {
 
-                                         message.success(`${info.file.name} 文件上传成功!`);
 
-                                     } else {
 
-                                         message.warning(info.file.response.error[0].message);
 
-                                         return;
 
-                                     };
 
-                                     this.state.techPlanUrl = info.file.response.data;
 
-                                 } else if (info.file.status === 'error') {
 
-                                     message.error(`${info.file.name} 文件上传失败。`);
 
-                                 };
 
-                                 this.setState({ techPlanFileList: info.fileList.slice(-1) });
 
-                             }} >
 
-                             <Button><Icon type="upload" /> 上传技术方案文件 </Button>
 
-                         </Upload>
 
-                         <p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_tech_plan') }}>技术方案</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     <FormItem
 
-                         labelCol={{ span: 4 }}
 
-                         wrapperCol={{ span: 6 }}
 
-                         label="商业计划书" >
 
-                         <Upload
 
-                             name="ratepay"
 
-                             action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
 
-                             data={{ 'sign': 'achievement_business_plan' }}
 
-                             beforeUpload={beforeUploadFile}
 
-                             fileList={this.state.businessPlanFileList}
 
-                             onChange={(info) => {
 
-                                 if (info.file.status !== 'uploading') {
 
-                                     console.log(info.file, info.fileList);
 
-                                 }
 
-                                 if (info.file.status === 'done') {
 
-                                     if (!info.file.response.error.length) {
 
-                                         message.success(`${info.file.name} 文件上传成功!`);
 
-                                     } else {
 
-                                         message.warning(info.file.response.error[0].message);
 
-                                         return;
 
-                                     };
 
-                                     this.state.businessPlanUrl = info.file.response.data;
 
-                                 } else if (info.file.status === 'error') {
 
-                                     message.error(`${info.file.name} 文件上传失败。`);
 
-                                 };
 
-                                 this.setState({ businessPlanFileList: info.fileList.slice(-1) });
 
-                             }} >
 
-                             <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
 
-                         </Upload>
 
-                         <p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
 
-                             <span className="download-file">
 
-                                 <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id + '&sign=achievement_business_plan') }}>商业计划书</a>
 
-                             </span>
 
-                             : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
 
-                     </FormItem>
 
-                     <FormItem wrapperCol={{ span: 12, offset: 4 }}>
 
-                         <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
 
-                         <Button className="set-submit" type="ghost" onClick={(e) => { this.state.auditStatus = 1; }} htmlType="submit">发布</Button>
 
-                         <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
 
-                     </FormItem>
 
-                 </Spin>
 
-             </Form >
 
-         )
 
-     }
 
- }));
 
- const AchievementDetail = React.createClass({
 
-     getInitialState() {
 
-         return {
 
-             visible: false,
 
-             tabsKey: 1,
 
-             loading: false,
 
-             columns: [
 
-                 {
 
-                     title: '编号',
 
-                     dataIndex: 'serialNumber',
 
-                     key: 'serialNumber',
 
-                 }, {
 
-                     title: '数据类型',
 
-                     dataIndex: 'dataCategory',
 
-                     key: 'dataCategory',
 
-                     render: text => {
 
-                         switch (text) {
 
-                             case "0":
 
-                                 return <span>成果</span>;
 
-                             case "1":
 
-                                 return <span>技术</span>;
 
-                             case "2":
 
-                                 return <span>项目</span>;
 
-                         }
 
-                     }
 
-                 }, {
 
-                     title: '名称',
 
-                     dataIndex: 'name',
 
-                     key: 'name',
 
-                 }, {
 
-                     title: '关键字',
 
-                     dataIndex: 'keyword',
 
-                     key: 'keyword',
 
-                 }, {
 
-                     title: '类型',
 
-                     dataIndex: 'demandType',
 
-                     key: 'demandType',
 
-                     render: text => { return getDemandType(text); }
 
-                 }, {
 
-                     title: '所有人名称',
 
-                     dataIndex: 'theName',
 
-                     key: 'theName',
 
-                 }, {
 
-                     title: '发布时间',
 
-                     dataIndex: 'releaseDateFormattedDate',
 
-                     key: 'releaseDateFormattedDate',
 
-                 }, {
 
-                     title: '有效期限',
 
-                     dataIndex: 'validityPeriodFormattedDate',
 
-                     key: 'validityPeriodFormattedDate',
 
-                 },
 
-             ],
 
-             dataSource: [],
 
-         };
 
-     },
 
-     getTechBrodersList() {
 
-         this.setState({
 
-             loading: true
 
-         });
 
-         $.ajax({
 
-             method: "get",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + "/api/admin/audit/techBroders",
 
-             success: function (data) {
 
-                 if (!data.data) {
 
-                     if (data.error && data.error.length) {
 
-                         message.warning(data.error[0].message);
 
-                     }
 
-                     return;
 
-                 };
 
-                 let _me = this, theArr = [];
 
-                 for (var item in data.data) {
 
-                     theArr.push(
 
-                         <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
 
-                     )
 
-                 };
 
-                 this.setState({
 
-                     techBrodersOption: theArr,
 
-                     techBrodersObj: data.data
 
-                 });
 
-             }.bind(this),
 
-         }).always(function () {
 
-             this.setState({
 
-                 loading: false
 
-             });
 
-         }.bind(this));
 
-     },
 
-     getTableList() {
 
-         this.setState({
 
-             loading: true
 
-         });
 
-         $.ajax({
 
-             method: "get",
 
-             dataType: "json",
 
-             crossDomain: false,
 
-             url: globalConfig.context + "/api/admin/achievement/achievementDemand",
 
-             data: { id: this.state.data.id },
 
-             success: function (data) {
 
-                 let theArr = [];
 
-                 if (!data.data) {
 
-                     if (data.error && data.error.length) {
 
-                         message.warning(data.error[0].message);
 
-                     };
 
-                 } else if (data.data.length) {
 
-                     for (let i = 0; i < data.data.length; i++) {
 
-                         let thisdata = data.data[i];
 
-                         theArr.push({
 
-                             key: i,
 
-                             id: thisdata.id,
 
-                             serialNumber: thisdata.serialNumber,
 
-                             dataCategory: thisdata.dataCategory,
 
-                             name: thisdata.name,
 
-                             keyword: thisdata.keyword,
 
-                             demandType: thisdata.demandType,
 
-                             theName: thisdata.username || thisdata.unitName,
 
-                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
 
-                             validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate
 
-                         });
 
-                     };
 
-                 };
 
-                 this.setState({
 
-                     dataSource: theArr,
 
-                 });
 
-             }.bind(this),
 
-         }).always(function () {
 
-             this.setState({
 
-                 loading: false
 
-             });
 
-         }.bind(this));
 
-     },
 
-     tableRowClick(record, index) {
 
-         if (record.dataCategory == "1") {
 
-             window.open(globalConfig.context + '/admin/demand.html?rid=' + record.id + '#orgTechDemand');
 
-         } else if (record.dataCategory == "0") {
 
-             window.open(globalConfig.context + '/admin/demand.html?rid=' + record.id + '#userTechDemand')
 
-         };
 
-     },
 
-     handleCancel(e) {
 
-         this.setState({
 
-             visible: false,
 
-         });
 
-         this.props.closeDesc(false);
 
-     },
 
-     handleOk(e) {
 
-         this.setState({
 
-             visible: false,
 
-         });
 
-         this.props.closeDesc(false, true);
 
-     },
 
-     componentWillMount() {
 
-         this.getTechBrodersList();
 
-     },
 
-     componentWillReceiveProps(nextProps) {
 
-         if (!this.state.visible && nextProps.showDesc) {
 
-             this.state.tabsKey = "1";
 
-         };
 
-         this.state.visible = nextProps.showDesc;
 
-     },
 
-     render() {
 
-         if (this.props.data) {
 
-             return (
 
-                 <div className="patent-desc">
 
-                     <Modal maskClosable={false} visible={this.state.visible}
 
-                         onOk={this.checkPatentProcess} onCancel={this.handleCancel}
 
-                         width='1000px'
 
-                         footer=''
 
-                         className="admin-desc-content">
 
-                         <Spin spinning={this.state.loading}>
 
-                             <Tabs activeKey={this.state.tabsKey}
 
-                                 onChange={(e) => {
 
-                                     this.setState({ tabsKey: e });
 
-                                     if (e == "2") {
 
-                                         this.getTableList();
 
-                                     };
 
-                                 }} >
 
-                                 <Tabs.TabPane tab="成果详情" key="1">
 
-                                     {(() => {
 
-                                         if (this.props.data.auditStatus && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
 
-                                             return <AchievementDetailShow
 
-                                                 data={this.props.data}
 
-                                                 detailApiUrl={this.props.detailApiUrl}
 
-                                                 techBrodersOption={this.state.techBrodersOption}
 
-                                                 techBrodersObj={this.state.techBrodersObj}
 
-                                                 closeDesc={this.handleCancel}
 
-                                                 visible={this.state.visible}
 
-                                                 handleOk={this.handleOk} />
 
-                                         } else {
 
-                                             return <AchievementDetailForm
 
-                                                 data={this.props.data}
 
-                                                 detailApiUrl={this.props.detailApiUrl}
 
-                                                 achievementCategoryOption={this.props.achievementCategoryOption}
 
-                                                 techBrodersObj={this.state.techBrodersObj}
 
-                                                 closeDesc={this.handleCancel}
 
-                                                 visible={this.state.visible}
 
-                                                 handleOk={this.handleOk} />
 
-                                         };
 
-                                     })()}
 
-                                 </Tabs.TabPane>
 
-                                 <Tabs.TabPane tab="匹配列表" key="2" disabled={!this.props.data.id}>
 
-                                     <Table columns={this.state.columns}
 
-                                         dataSource={this.state.dataSource}
 
-                                         pagination={false}
 
-                                         onRowClick={this.tableRowClick} />
 
-                                 </Tabs.TabPane>
 
-                             </Tabs>
 
-                         </Spin>
 
-                     </Modal>
 
-                 </div>
 
-             );
 
-         } else {
 
-             return <div></div>
 
-         }
 
-     },
 
- });
 
- export default AchievementDetail;
 
 
  |