|
@@ -229,13 +229,21 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
message.warning('关键词数量不能小于3个!');
|
|
|
};
|
|
|
//url转化
|
|
|
- let thePictureUrl = [];
|
|
|
- if (this.state.pictureUrl.length) {
|
|
|
+ let theTechnicalPictureUrl = [];
|
|
|
+ if (this.state.technicalPictureUrl.length) {
|
|
|
let picArr = [];
|
|
|
- this.state.pictureUrl.map(function (item) {
|
|
|
+ this.state.technicalPictureUrl.map(function (item) {
|
|
|
picArr.push(item.response.data);
|
|
|
});
|
|
|
- thePictureUrl = picArr.join(",");
|
|
|
+ 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({
|
|
@@ -245,35 +253,49 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: this.props.data.id ? globalConfig.context + '/api/admin/demand/update' : globalConfig.context + '/api/admin/demand/apply',
|
|
|
+ url: this.props.data.id ? globalConfig.context + '/api/admin/achievement/update' : globalConfig.context + '/api/admin/achievement/apply',
|
|
|
data: {
|
|
|
id: this.props.data.id,
|
|
|
- dataCategory: this.props.detailApiUrl.indexOf('org') >= 0 ? 1 : 0,
|
|
|
+ dataCategory: values.dataCategory,
|
|
|
serialNumber: this.props.data.serialNumber,
|
|
|
name: values.name,
|
|
|
keyword: this.state.tags ? this.state.tags.join(",") : [],
|
|
|
- infoSources: values.infoSources,
|
|
|
- industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
|
|
|
- industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
|
|
|
- demandType: values.demandType,
|
|
|
- problemDes: values.problemDes,
|
|
|
- technicalRequirements: values.technicalRequirements,
|
|
|
- pictureUrl: thePictureUrl,
|
|
|
- textFileUrl: this.state.textFileUrl,
|
|
|
- videoUrl: values.videoUrl,
|
|
|
- fixedBudget: values.fixedBudget,
|
|
|
- fixedCycle: values.fixedCycle,
|
|
|
- peopleNumber: values.peopleNumber,
|
|
|
- fixedScheme: values.fixedScheme,
|
|
|
- costEscrow: values.costEscrow,
|
|
|
- budgetCost: values.budgetCost,
|
|
|
- employerId: values.employerId || this.state.data.employerId,
|
|
|
+ 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,
|
|
|
+ maturity: values.maturity,
|
|
|
+ maturityPictureUrl: theMaturityPictureUrl,
|
|
|
+ maturityTextFileUrl: this.state.maturityTextFileUrl,
|
|
|
+ maturityVideoUrl: values.maturityVideoUrl,
|
|
|
+ innovation: values.innovation,
|
|
|
+ ownerName: values.ownerName,
|
|
|
+ ownerType: values.ownerType,
|
|
|
+ ownerIdNumber: values.ownerIdNumber,
|
|
|
+ ownerMobile: values.ownerMobile,
|
|
|
+ ownerEmail: values.ownerEmail,
|
|
|
+ ownerPostalAddress: values.ownerPostalAddress,
|
|
|
+ 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,
|
|
|
+ orgId: values.orgId,
|
|
|
+ orgName: values.orgName,
|
|
|
+ orgAddress: values.orgAddress,
|
|
|
+ orgEmail: values.orgEmail,
|
|
|
+ orgContacts: values.orgContacts,
|
|
|
+ orgContactsMobile: values.orgContactsMobile,
|
|
|
releaseStatus: values.releaseStatus,
|
|
|
- principalId: values.principalId,
|
|
|
- validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
|
|
|
- //
|
|
|
- contacts: values.contacts,
|
|
|
- status: this.state.status
|
|
|
+ techPlanUrl: this.state.techPlanUrl,
|
|
|
+ businessPlanUrl: this.state.businessPlanUrl
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -499,7 +521,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
message.warning(info.file.response.error[0].message);
|
|
|
return;
|
|
|
};
|
|
|
- this.state.maturityTextFileUrl = info.file.response.data;
|
|
|
+ this.state.maturityTextFileUrl,
|
|
|
+ maturity_video_url = info.file.response.data;
|
|
|
} else if (info.file.status === 'error') {
|
|
|
message.error(`${info.file.name} 文件上传失败。`);
|
|
|
};
|
|
@@ -594,8 +617,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="所属组织名称" >
|
|
|
- {getFieldDecorator('releaseStatus', {
|
|
|
- initialValue: theData.releaseStatus
|
|
|
+ {getFieldDecorator('orgName', {
|
|
|
+ initialValue: theData.orgName
|
|
|
})(
|
|
|
<Input />
|
|
|
)}
|