|
@@ -176,7 +176,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + '/api/user/demand/demandDetail' ,
|
|
|
+ url: globalConfig.context + '/api/user/achievement/achievementDetail' ,
|
|
|
data: {
|
|
|
id: id
|
|
|
},
|
|
@@ -188,21 +188,13 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
};
|
|
|
thisData = {};
|
|
|
};
|
|
|
- let publishPagesArr = [];
|
|
|
- thisData.publishPages.map(item=>{
|
|
|
- publishPagesArr.push(item.publishPage)
|
|
|
- })
|
|
|
this.setState({
|
|
|
id:thisData.id,
|
|
|
- tags: thisData.keyword ? thisData.keyword.split(",") : [],
|
|
|
+ tags: thisData.keywords,
|
|
|
data: thisData,
|
|
|
+ publishPages:thisData.publishPages,
|
|
|
auditStatus:thisData.auditStatus,
|
|
|
- publishPagesArr:publishPagesArr,
|
|
|
- isHot:thisData.isHot,
|
|
|
- isUrgent:thisData.isUrgent,
|
|
|
- status:thisData.status,
|
|
|
- isHot:thisData.isHot,
|
|
|
- pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
+ pictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -243,32 +235,34 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
|
async:true,
|
|
|
- url: this.props.data.id ? globalConfig.context + '/api/user/demand/updateDemand' : globalConfig.context + '/api/user/demand/apply',
|
|
|
+ url: this.props.data.id ? globalConfig.context + '/api/user/achievement/update' : globalConfig.context + '/api/user/achievement/apply',
|
|
|
data: {
|
|
|
id: this.props.data.id,
|
|
|
name: values.name,
|
|
|
- industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
|
|
|
- industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
|
|
|
- demandType: values.demandType,
|
|
|
- problemDes: values.problemDes,
|
|
|
- pictureUrl: thePictureUrl,
|
|
|
- crowdCost:values.crowdCost,
|
|
|
+ fieldA: values.industryCategory ? values.industryCategory[0] : undefined,
|
|
|
+ fieldB: values.industryCategory ? values.industryCategory[1] : undefined,
|
|
|
+ dataCategory: values.dataCategory,
|
|
|
+ category: values.category,
|
|
|
+ technicalPictureUrl: thePictureUrl,
|
|
|
+ introduction:values.introduction,
|
|
|
keyword: this.state.tags ? this.state.tags.join(",") : [],
|
|
|
keywords: this.state.tags,
|
|
|
- budgetCost:values.budgetCost,
|
|
|
- urgentDays:values.urgentDays,
|
|
|
- urgentMoney:values.urgentMoney,
|
|
|
+ maturity:values.maturity,
|
|
|
+ innovation:values.innovation,
|
|
|
+ transferMode:values.transferMode,
|
|
|
auditStatus:index,
|
|
|
- status: this.state.status,
|
|
|
- isUrgent: this.state.isUrgent,
|
|
|
- isHot:this.state.isHot,
|
|
|
+ patentCase: values.patentCase,
|
|
|
+ teamDes: values.teamDes,
|
|
|
+ parameter: values.parameter,
|
|
|
+ boutique: values.boutique,
|
|
|
+ isHot:values.isHot,
|
|
|
publishPages:values.publishPages,
|
|
|
- researchType:values.researchType
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
- });
|
|
|
+ });
|
|
|
+
|
|
|
if (!data.error.length) {
|
|
|
message.success('操作成功!');
|
|
|
this.setState({
|
|
@@ -289,10 +283,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
async:true,
|
|
|
- url: globalConfig.context + "/api/user/demand/publishDemand",
|
|
|
+ url: globalConfig.context + "/api/user/achievement/commit",
|
|
|
data: {
|
|
|
id: this.state.id,
|
|
|
- auditStatus:this.state.auditStatus
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -314,7 +307,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
this.state.data = {};
|
|
|
this.state.tags = [];
|
|
|
this.setState({
|
|
|
- publishPagesArr:['app_achievement_list','web_achievement_list']
|
|
|
+ publishPages:['app_achievement_list','web_achievement_list']
|
|
|
})
|
|
|
};
|
|
|
},
|
|
@@ -326,13 +319,10 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
this.loadData(nextProps.data.id);
|
|
|
} else {
|
|
|
this.state.data = {};
|
|
|
- this.state.isUrgent=undefined;//加急需求
|
|
|
- this.state.isHot=undefined;//是否悬赏
|
|
|
- this.state.status=undefined;
|
|
|
this.state.pictureUrl = [];
|
|
|
this.state.tags = [];
|
|
|
this.setState({
|
|
|
- publishPagesArr:['app_achievement_list','web_achievement_list']
|
|
|
+ publishPages:['app_achievement_list','web_achievement_list']
|
|
|
})
|
|
|
};
|
|
|
this.props.form.resetFields();
|
|
@@ -360,24 +350,24 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个成果吧">
|
|
|
- {getFieldDecorator('problemDes', {
|
|
|
+ {getFieldDecorator('introduction', {
|
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
|
- initialValue: theData.problemDes
|
|
|
+ initialValue: theData.introduction
|
|
|
})(<Input type="textarea" rows={4} placeholder="请详细介绍您的技术成果情况,包括但不限于:能解决什么问题、重大技术性突破、取得的奖励情况." />)}
|
|
|
</FormItem>
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="知识产权情况">
|
|
|
- {getFieldDecorator('problemDes2', {
|
|
|
- initialValue: theData.problemDes2
|
|
|
+ {getFieldDecorator('patentCase', {
|
|
|
+ initialValue: theData.patentCase
|
|
|
})(<Input type="textarea" rows={4} placeholder="请输入您的知识产权情况." />)}
|
|
|
</FormItem>
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="技术参数">
|
|
|
- {getFieldDecorator('problemDes4', {
|
|
|
- initialValue: theData.problemDes4
|
|
|
+ {getFieldDecorator('parameter', {
|
|
|
+ initialValue: theData.parameter
|
|
|
})(<Input type="textarea" rows={4} placeholder="请输入您的技术成果参数." />)}
|
|
|
</FormItem>
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="团队情况">
|
|
|
- {getFieldDecorator('problemDes3', {
|
|
|
- initialValue: theData.problemDes3
|
|
|
+ {getFieldDecorator('teamDes', {
|
|
|
+ initialValue: theData.teamDes
|
|
|
})(<Input type="textarea" rows={4} placeholder="请输入您的团队情况." />)}
|
|
|
</FormItem>
|
|
|
</div>
|
|
@@ -395,14 +385,14 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="行业领域">
|
|
|
{getFieldDecorator('industryCategory', {
|
|
|
rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
|
|
|
- initialValue: [ theData.industryCategoryA, theData.industryCategoryB ]
|
|
|
+ initialValue: [ theData.fieldA, theData.fieldB ]
|
|
|
})(<Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />)}
|
|
|
</FormItem>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item" {...formItemLayout} label="成果类型">
|
|
|
- {getFieldDecorator('demandType', {
|
|
|
+ {getFieldDecorator('dataCategory', {
|
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
|
- initialValue:(theData.demandType||theData.demandType=='0'?theData.demandType.toString():undefined)
|
|
|
+ initialValue:(theData.dataCategory||theData.dataCategory=='0'?theData.dataCategory.toString():undefined)
|
|
|
})(
|
|
|
<Select style={{ width: 160 }} placeholder="请选择成果类型"
|
|
|
>
|
|
@@ -415,8 +405,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
)}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="知识产权类型">
|
|
|
- {getFieldDecorator('demandType1', {
|
|
|
- initialValue:(theData.demandType2||theData.demandType2=='0'?theData.demandType2.toString():undefined)
|
|
|
+ {getFieldDecorator('category', {
|
|
|
+ rules: [ { required: true, message: '此项为必填项!' } ],
|
|
|
+ initialValue:(theData.category||theData.category=='0'?theData.category.toString():undefined)
|
|
|
})(
|
|
|
<Select style={{ width: 160 }} placeholder="请选择知识产权类型"
|
|
|
>
|
|
@@ -429,8 +420,8 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
)}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="创新度">
|
|
|
- {getFieldDecorator('demandType1', {
|
|
|
- initialValue:(theData.demandType4||theData.demandType4=='0'?theData.demandType4.toString():undefined)
|
|
|
+ {getFieldDecorator('innovation', {
|
|
|
+ initialValue:(theData.innovation||theData.innovation=='0'?theData.innovation.toString():undefined)
|
|
|
})(
|
|
|
<Select style={{ width: 160 }} placeholder="请选择创新度"
|
|
|
>
|
|
@@ -443,8 +434,8 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
)}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="成熟度">
|
|
|
- {getFieldDecorator('demandType1', {
|
|
|
- initialValue:(theData.demandType5||theData.demandType5=='0'?theData.demandType5.toString():undefined)
|
|
|
+ {getFieldDecorator('maturity', {
|
|
|
+ initialValue:(theData.maturity||theData.maturity=='0'?theData.maturity.toString():undefined)
|
|
|
})(
|
|
|
<Select style={{ width: 160 }} placeholder="请选择成熟度"
|
|
|
>
|
|
@@ -457,8 +448,8 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
)}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item" {...formItemLayout} label="交易形式">
|
|
|
- {getFieldDecorator('demandType1', {
|
|
|
- initialValue:(theData.demandType6||theData.demandType6=='0'?theData.demandType6.toString():undefined)
|
|
|
+ {getFieldDecorator('transferMode', {
|
|
|
+ initialValue:(theData.transferMode||theData.transferMode=='0'?theData.transferMode.toString():undefined)
|
|
|
})(
|
|
|
<Select style={{ width: 160 }} placeholder="请选择交易形式"
|
|
|
>
|
|
@@ -474,7 +465,6 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
<div className="clearfix">
|
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="成果文件(图片)">
|
|
|
<PicturesWall
|
|
|
- uid={theData.employerId}
|
|
|
fileList={this.getPictureUrl}
|
|
|
pictureUrl={this.state.pictureUrl}
|
|
|
visible={this.props.visible}
|
|
@@ -483,8 +473,8 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item" {...formItemLayout} label="精品成果">
|
|
|
- {getFieldDecorator('urgentDays', {
|
|
|
- initialValue: theData.fineQuality
|
|
|
+ {getFieldDecorator('boutique', {
|
|
|
+ initialValue: theData.boutique
|
|
|
})(
|
|
|
<Radio.Group>
|
|
|
<Radio value={0}>非精品</Radio>
|
|
@@ -511,7 +501,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }} label="发布位置">
|
|
|
{getFieldDecorator('publishPages', {
|
|
|
rules: [ { required: false } ],
|
|
|
- initialValue: this.state.publishPagesArr
|
|
|
+ initialValue: this.state.publishPages
|
|
|
})(
|
|
|
<Checkbox.Group>
|
|
|
<Row>
|
|
@@ -541,7 +531,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
|
type="ghost"
|
|
|
onClick={(e) => {
|
|
|
if(this.props.data.id){
|
|
|
- this.submission(e,this.state.auditStatus)
|
|
|
+ this.submission(e,1)
|
|
|
}else{
|
|
|
this.handleSubmit(e,1)
|
|
|
}
|