|
@@ -114,8 +114,8 @@ const PicturesWall = React.createClass({
|
|
|
return (
|
|
|
<div className="clearfix">
|
|
|
<Upload
|
|
|
- action={globalConfig.context + "/api/admin/demand/uploadPicture"}
|
|
|
- data={{ 'sign': 'demand_picture', 'uid': this.props.uid }}
|
|
|
+ action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
|
|
|
+ data={{ 'sign': this.props.pictureSign }}
|
|
|
listType="picture-card"
|
|
|
fileList={fileList}
|
|
|
onPreview={this.handlePreview}
|
|
@@ -143,7 +143,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
tags: []
|
|
|
};
|
|
|
},
|
|
|
- loadData(id, detailApiUrl) {
|
|
|
+ loadData(id) {
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -151,7 +151,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + detailApiUrl,
|
|
|
+ url: globalConfig.context + "/api/admin/achievement/detail",
|
|
|
data: {
|
|
|
id: id
|
|
|
},
|
|
@@ -170,8 +170,10 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
};
|
|
|
this.setState({
|
|
|
data: thisData,
|
|
|
+ orgDisplay: thisData.ownerType,
|
|
|
tags: thisData.keyword ? thisData.keyword.split(",") : [],
|
|
|
- pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
+ technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
+ maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -227,6 +229,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
//keyword长度判断
|
|
|
if (this.state.tags.length < 3) {
|
|
|
message.warning('关键词数量不能小于3个!');
|
|
|
+ return;
|
|
|
};
|
|
|
//url转化
|
|
|
let theTechnicalPictureUrl = [];
|
|
@@ -325,17 +328,14 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
this.state.techPlanFileList = [];
|
|
|
this.state.businessPlanFileList = [];
|
|
|
if (nextProps.data.id) {
|
|
|
- this.loadData(nextProps.data.id, nextProps.detailApiUrl);
|
|
|
- if (nextProps.data.employerId && nextProps.detailApiUrl.indexOf('org') >= 0) {
|
|
|
- this.getContactsList(nextProps.data.employerId)
|
|
|
- };
|
|
|
+ this.loadData(nextProps.data.id);
|
|
|
} else {
|
|
|
this.state.data = {};
|
|
|
this.state.tags = [];
|
|
|
- this.state.pictureUrl = [];
|
|
|
+ this.state.maturityPictureUrl = [];
|
|
|
this.state.technicalPictureUrl = [];
|
|
|
- this.props.form.resetFields();
|
|
|
};
|
|
|
+ this.props.form.resetFields();
|
|
|
};
|
|
|
},
|
|
|
render() {
|
|
@@ -442,7 +442,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="技术图片" >
|
|
|
<PicturesWall
|
|
|
- uid={theData.uid}
|
|
|
+ pictureSign="achievement_technical_picture"
|
|
|
fileList={this.getTechnicalPictureUrl}
|
|
|
pictureUrl={this.state.technicalPictureUrl} />
|
|
|
<p>图片建议:专利证书或专利申请书图片、技术图纸、样品图片、技术相关网络图片;成熟度处于非研发阶段的项目,必须上传样品图片,如未上传,成熟度将视为处在研发阶段。</p>
|
|
@@ -496,7 +496,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="成熟度证明材料(图片)" >
|
|
|
<PicturesWall
|
|
|
- uid={theData.uid}
|
|
|
+ pictureSign="achievement_maturity_picture"
|
|
|
fileList={this.getMaturityPictureUrl}
|
|
|
pictureUrl={this.state.maturityPictureUrl} />
|
|
|
</FormItem>
|
|
@@ -506,8 +506,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
label="成熟度证明材料(文本)" >
|
|
|
<Upload
|
|
|
name="ratepay"
|
|
|
- action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
|
|
|
- data={{ 'sign': 'demand_text_file', 'uid': theData.uid }}
|
|
|
+ action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
|
|
|
+ data={{ 'sign': 'achievement_maturity_text_file' }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
fileList={this.state.textFileList}
|
|
|
onChange={(info) => {
|
|
@@ -521,8 +521,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
message.warning(info.file.response.error[0].message);
|
|
|
return;
|
|
|
};
|
|
|
- this.state.maturityTextFileUrl,
|
|
|
- maturity_video_url = info.file.response.data;
|
|
|
+ this.state.maturityTextFileUrl = info.file.response.data;
|
|
|
} else if (info.file.status === 'error') {
|
|
|
message.error(`${info.file.name} 文件上传失败。`);
|
|
|
};
|
|
@@ -532,7 +531,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
</Upload>
|
|
|
<p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
|
|
|
<span className="download-file">
|
|
|
- <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>成熟度证明材料(文本文件)</a>
|
|
|
+ <a onClick={() => { window.open(globalConfig.context + '/api/admin/achievement/download?id=' + this.props.data.id) }}>成熟度证明材料(文本文件)</a>
|
|
|
</span>
|
|
|
: <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
|
|
|
</FormItem>
|
|
@@ -778,8 +777,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
label="技术方案" >
|
|
|
<Upload
|
|
|
name="ratepay"
|
|
|
- action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
|
|
|
- data={{ 'sign': 'tech_plan', 'uid': theData.uid }}
|
|
|
+ action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
|
|
|
+ data={{ 'sign': 'achievement_tech_plan' }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
fileList={this.state.techPlanFileList}
|
|
|
onChange={(info) => {
|
|
@@ -803,7 +802,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
</Upload>
|
|
|
<p style={{ marginTop: '10px' }}>{theData.techPlanUrl ?
|
|
|
<span className="download-file">
|
|
|
- <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>技术方案</a>
|
|
|
+ <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>
|
|
@@ -813,8 +812,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
label="商业计划书" >
|
|
|
<Upload
|
|
|
name="ratepay"
|
|
|
- action={globalConfig.context + "/api/admin/demand/uploadTextFile"}
|
|
|
- data={{ 'sign': 'business_plan_url', 'uid': theData.uid }}
|
|
|
+ action={globalConfig.context + "/api/admin/achievement/uploadTextFile"}
|
|
|
+ data={{ 'sign': 'achievement_business_plan' }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
fileList={this.state.businessPlanFileList}
|
|
|
onChange={(info) => {
|
|
@@ -834,11 +833,11 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
};
|
|
|
this.setState({ businessPlanFileList: info.fileList.slice(-1) });
|
|
|
}} >
|
|
|
- <Button><Icon type="upload" /> 上传需求文本文件 </Button>
|
|
|
+ <Button><Icon type="upload" /> 上传商业计划书文件 </Button>
|
|
|
</Upload>
|
|
|
<p style={{ marginTop: '10px' }}>{theData.businessPlanUrl ?
|
|
|
<span className="download-file">
|
|
|
- <a onClick={() => { window.open(globalConfig.context + '/api/admin/demand/download?id=' + this.props.data.id) }}>商业计划书</a>
|
|
|
+ <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>
|