|
@@ -101,7 +101,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
method: "get",
|
|
method: "get",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
crossDomain: false,
|
|
crossDomain: false,
|
|
- url: globalConfig.context + '/api/user/demand/orgDemandDetail' ,
|
|
|
|
|
|
+ url: globalConfig.context + '/api/user/demand/demandDetail' ,
|
|
data: {
|
|
data: {
|
|
id: id
|
|
id: id
|
|
},
|
|
},
|
|
@@ -113,14 +113,19 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
};
|
|
};
|
|
thisData = {};
|
|
thisData = {};
|
|
};
|
|
};
|
|
- let ProvinceCityArr = [];
|
|
|
|
- let ProvinceS = thisData.locationProvince; //getprovince
|
|
|
|
- let citys = thisData.locationCity;
|
|
|
|
- let Areas = thisData.locationArea;
|
|
|
|
- ProvinceCityArr.push(ProvinceS, citys, Areas);
|
|
|
|
|
|
+ // let ProvinceCityArr = [];
|
|
|
|
+ // let ProvinceS = thisData.locationProvince; //getprovince
|
|
|
|
+ // let citys = thisData.locationCity;
|
|
|
|
+ // let Areas = thisData.locationArea;
|
|
|
|
+ // ProvinceCityArr.push(ProvinceS, citys, Areas);
|
|
this.setState({
|
|
this.setState({
|
|
- ProvinceCity:ProvinceCityArr,
|
|
|
|
- data: thisData,
|
|
|
|
|
|
+ //ProvinceCity:ProvinceCityArr,
|
|
|
|
+ id:thisData.id,
|
|
|
|
+ data: thisData,
|
|
|
|
+ isHot:thisData.isHot,
|
|
|
|
+ isUrgent:thisData.isUrgent,
|
|
|
|
+ status:thisData.status,
|
|
|
|
+ isHot:thisData.isHot,
|
|
pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
pictureUrl: thisData.pictureUrl ? splitUrl(thisData.pictureUrl, ',', globalConfig.avatarHost + '/upload') : []
|
|
});
|
|
});
|
|
}.bind(this),
|
|
}.bind(this),
|
|
@@ -156,41 +161,30 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
loading: true
|
|
loading: true
|
|
});
|
|
});
|
|
$.ajax({
|
|
$.ajax({
|
|
- method: "POST",
|
|
|
|
|
|
+ method: "post",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
- crossDomain: false,
|
|
|
|
|
|
+ // crossDomain: false,
|
|
url: this.props.data.id ? globalConfig.context + '/api/user/demand/update' : globalConfig.context + '/api/user/demand/apply',
|
|
url: this.props.data.id ? globalConfig.context + '/api/user/demand/update' : globalConfig.context + '/api/user/demand/apply',
|
|
data: {
|
|
data: {
|
|
id: this.props.data.id,
|
|
id: this.props.data.id,
|
|
- dataCategory: Number(window.userData.type),
|
|
|
|
- serialNumber: this.props.data.serialNumber,
|
|
|
|
name: values.name,
|
|
name: values.name,
|
|
- keywords: this.state.tags,
|
|
|
|
- infoSources: 1,
|
|
|
|
industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
|
|
industryCategoryA: values.industryCategory ? values.industryCategory[0] : undefined,
|
|
industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
|
|
industryCategoryB: values.industryCategory ? values.industryCategory[1] : undefined,
|
|
demandType: values.demandType,
|
|
demandType: values.demandType,
|
|
problemDes: values.problemDes,
|
|
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,
|
|
|
|
- releaseStatus: values.releaseStatus,
|
|
|
|
- principalId: values.principalId,
|
|
|
|
- validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
|
|
|
|
- //
|
|
|
|
- contacts: values.contacts,
|
|
|
|
|
|
+ // pictureUrl: thePictureUrl,
|
|
|
|
+ crowdCost:values.crowdCost,
|
|
|
|
+ budgetCost:values.budgetCost,
|
|
|
|
+ urgentDays:values.urgentDays?values.urgentDays.format('YYYY-MM-DD'):undefined,
|
|
|
|
+ urgentMoney:values.urgentMoney,
|
|
|
|
+ auditStatus:values.auditStatus,
|
|
status: this.state.status,
|
|
status: this.state.status,
|
|
- auditStatus: this.state.auditStatus
|
|
|
|
|
|
+ isUrgent: this.state.isUrgent,
|
|
|
|
+ isHot:this.state.isHot,
|
|
|
|
+ publishPages:JSON.stringify(values.publishPages),
|
|
|
|
+ researchType:values.researchType
|
|
}
|
|
}
|
|
}).done(function (data) {
|
|
}).done(function (data) {
|
|
- this.state.auditStatus = 0;
|
|
|
|
this.setState({
|
|
this.setState({
|
|
loading: false
|
|
loading: false
|
|
});
|
|
});
|
|
@@ -207,6 +201,28 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ submission(record){
|
|
|
|
+ this.handleSubmit();
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "POST",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + "/api/user/demand/deletet",
|
|
|
|
+ data: {
|
|
|
|
+ ids: deletedIds
|
|
|
|
+ }
|
|
|
|
+ }).done(function (data) {
|
|
|
|
+ if (!data.error.length) {
|
|
|
|
+ message.success('成功提交审核.');
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ };
|
|
|
|
+ this.loadData();
|
|
|
|
+ }.bind(this));
|
|
|
|
+ },
|
|
cancelFun(){
|
|
cancelFun(){
|
|
this.props.closeDesc();
|
|
this.props.closeDesc();
|
|
},
|
|
},
|
|
@@ -225,11 +241,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
this.loadData(nextProps.data.id);
|
|
this.loadData(nextProps.data.id);
|
|
} else {
|
|
} else {
|
|
this.state.data = {};
|
|
this.state.data = {};
|
|
- this.state.demandType=undefined; //需求类型
|
|
|
|
- this.state.urgent=undefined;//加急需求
|
|
|
|
- this.state.offer=undefined;//是否悬赏
|
|
|
|
- this.state.hotDemand=undefined;
|
|
|
|
- this.state.solve=undefined;
|
|
|
|
|
|
+ this.state.isUrgent=undefined;//加急需求
|
|
|
|
+ this.state.isHot=undefined;//是否悬赏
|
|
|
|
+ this.state.status=undefined;
|
|
this.state.pictureUrl = [];
|
|
this.state.pictureUrl = [];
|
|
};
|
|
};
|
|
this.props.form.resetFields();
|
|
this.props.form.resetFields();
|
|
@@ -282,23 +296,23 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
</FormItem>
|
|
</FormItem>
|
|
{demandType=='5'||theData.demandType=='5'?
|
|
{demandType=='5'||theData.demandType=='5'?
|
|
<FormItem className="half-item" {...formItemLayout} label="人才需求酬劳">
|
|
<FormItem className="half-item" {...formItemLayout} label="人才需求酬劳">
|
|
- {getFieldDecorator('name', {
|
|
|
|
|
|
+ {getFieldDecorator('crowdCost', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.namea
|
|
|
|
|
|
+ initialValue: theData.crowdCost
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入酬劳."/>)}
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入酬劳."/>)}
|
|
<span style={{ marginLeft: '20px' }}>元/月</span>
|
|
<span style={{ marginLeft: '20px' }}>元/月</span>
|
|
</FormItem>:''}
|
|
</FormItem>:''}
|
|
{demandType=='3'||theData.demandType=='3'?<div className="clearfix"><FormItem className="half-item" {...formItemLayout} label="资金需求额度">
|
|
{demandType=='3'||theData.demandType=='3'?<div className="clearfix"><FormItem className="half-item" {...formItemLayout} label="资金需求额度">
|
|
- {getFieldDecorator('name', {
|
|
|
|
|
|
+ {getFieldDecorator('budgetCost', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.namea
|
|
|
|
|
|
+ initialValue: theData.budgetCost
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入资金需求额度."/>)}
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入资金需求额度."/>)}
|
|
- <span style={{ marginLeft: '20px' }}>万元</span>
|
|
|
|
|
|
+ <span style={{ marginLeft: '10px' }}>万元</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem className="half-item" {...formItemLayout} label="资金用途">
|
|
<FormItem className="half-item" {...formItemLayout} label="资金用途">
|
|
- {getFieldDecorator('namea', {
|
|
|
|
|
|
+ {getFieldDecorator('researchType', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.namea
|
|
|
|
|
|
+ initialValue: theData.researchType
|
|
})(
|
|
})(
|
|
<Select placeholder="选择资金用途" style={{ width: 160 }} >
|
|
<Select placeholder="选择资金用途" style={{ width: 160 }} >
|
|
<Select.Option value="0" >研发</Select.Option>
|
|
<Select.Option value="0" >研发</Select.Option>
|
|
@@ -312,46 +326,40 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
<p style={{marginLeft:40,fontSize:18,marginBottom:15}}>您还可以说明</p>
|
|
<p style={{marginLeft:40,fontSize:18,marginBottom:15}}>您还可以说明</p>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="half-item" {...formItemLayout} label="加急">
|
|
<FormItem className="half-item" {...formItemLayout} label="加急">
|
|
- <Radio.Group value={this.state.urgent} onChange={(e)=>{this.setState({urgent:e.target.value})}}>
|
|
|
|
|
|
+ <Radio.Group value={this.state.isUrgent} onChange={(e)=>{this.setState({isUrgent:e.target.value})}}>
|
|
<Radio value={1}>加急</Radio>
|
|
<Radio value={1}>加急</Radio>
|
|
<Radio value={0}>非加急</Radio>
|
|
<Radio value={0}>非加急</Radio>
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</FormItem>
|
|
</FormItem>
|
|
- {this.state.urgent?<FormItem className="half-item" {...formItemLayout} label="日期">
|
|
|
|
- {getFieldDecorator('validitytime', {
|
|
|
|
- initialValue: theData.validitytime ? moment(theData.validitytime) : null
|
|
|
|
|
|
+ {this.state.isUrgent?<div className="clearfix">
|
|
|
|
+ <FormItem className="half-item" {...formItemLayout} label="日期">
|
|
|
|
+ {getFieldDecorator('urgentDays', {
|
|
|
|
+ initialValue: theData.urgentDays ? moment(theData.urgentDays) : null
|
|
})(<DatePicker />)}
|
|
})(<DatePicker />)}
|
|
- </FormItem>:''}
|
|
|
|
- </div>
|
|
|
|
- <div className="clearfix">
|
|
|
|
- <FormItem className="half-item" {...formItemLayout} label="悬赏需求">
|
|
|
|
- <Radio.Group value={this.state.offer} onChange={(e)=>{this.setState({offer:e.target.value})}}>
|
|
|
|
- <Radio value={0}>否</Radio>
|
|
|
|
- <Radio value={1}>是</Radio>
|
|
|
|
- </Radio.Group>
|
|
|
|
</FormItem>
|
|
</FormItem>
|
|
- {this.state.offer>=1&&<FormItem className="half-item" {...formItemLayout} label="悬赏金额">
|
|
|
|
- {getFieldDecorator('budgetCost', {
|
|
|
|
- initialValue: theData.budgetCost
|
|
|
|
|
|
+ <FormItem className="half-item" {...formItemLayout} label="加急金额">
|
|
|
|
+ {getFieldDecorator('urgentMoney', {
|
|
|
|
+ initialValue: theData.urgentMoney
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入金额."/>)}
|
|
})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入金额."/>)}
|
|
<span style={{ marginLeft: '20px' }}>万元</span>
|
|
<span style={{ marginLeft: '20px' }}>万元</span>
|
|
- </FormItem>}
|
|
|
|
|
|
+ </FormItem></div>:''}
|
|
</div>
|
|
</div>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="half-item" {...formItemLayout} label="热点需求">
|
|
<FormItem className="half-item" {...formItemLayout} label="热点需求">
|
|
- <Radio.Group value={this.state.hotDemand} onChange={(e)=>{this.setState({hotDemand:e.target.value})}}>
|
|
|
|
|
|
+ <Radio.Group value={this.state.isHot} onChange={(e)=>{this.setState({isHot:e.target.value})}}>
|
|
<Radio value={0}>否</Radio>
|
|
<Radio value={0}>否</Radio>
|
|
<Radio value={1}>是</Radio>
|
|
<Radio value={1}>是</Radio>
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem className="half-item" {...formItemLayout} label="解决">
|
|
<FormItem className="half-item" {...formItemLayout} label="解决">
|
|
- <Radio.Group value={this.state.solve} onChange={(e)=>{this.setState({solve:e.target.value})}}>
|
|
|
|
- <Radio value={0}>未解决</Radio>
|
|
|
|
- <Radio value={1}>已解决</Radio>
|
|
|
|
|
|
+ <Radio.Group value={this.state.status} onChange={(e)=>{this.setState({status:e.target.value})}}>
|
|
|
|
+ <Radio value={0}>进行中</Radio>
|
|
|
|
+ <Radio value={1}>未解决</Radio>
|
|
|
|
+ <Radio value={2}>已解决</Radio>
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
- <div className="clearfix">
|
|
|
|
|
|
+ {/* <div className="clearfix">
|
|
<FormItem
|
|
<FormItem
|
|
className="half-item"
|
|
className="half-item"
|
|
{...formItemLayout}
|
|
{...formItemLayout}
|
|
@@ -366,7 +374,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
- </div>
|
|
|
|
|
|
+ </div> */}
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="需求文件(图片)">
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="需求文件(图片)">
|
|
<PicturesWall
|
|
<PicturesWall
|
|
uid={theData.employerId}
|
|
uid={theData.employerId}
|
|
@@ -377,9 +385,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
</FormItem>
|
|
</FormItem>
|
|
<div>
|
|
<div>
|
|
<FormItem className="half-item" {...formItemLayout} label="发布状态">
|
|
<FormItem className="half-item" {...formItemLayout} label="发布状态">
|
|
- {getFieldDecorator('releaseState', {
|
|
|
|
|
|
+ {getFieldDecorator('auditStatus', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.releaseState
|
|
|
|
|
|
+ initialValue: theData.auditStatus
|
|
})(
|
|
})(
|
|
<Select placeholder="选择发布状态" style={{ width: 160 }} >
|
|
<Select placeholder="选择发布状态" style={{ width: 160 }} >
|
|
<Select.Option value="0" >草稿</Select.Option>
|
|
<Select.Option value="0" >草稿</Select.Option>
|
|
@@ -390,19 +398,19 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
</Select>
|
|
</Select>
|
|
)}
|
|
)}
|
|
</FormItem>
|
|
</FormItem>
|
|
- <FormItem className="half-item" {...formItemLayout} label="发布时间">
|
|
|
|
|
|
+ {/* <FormItem className="half-item" {...formItemLayout} label="发布时间">
|
|
{getFieldDecorator('releaseTime', {
|
|
{getFieldDecorator('releaseTime', {
|
|
initialValue: theData.releaseTime ? moment(theData.releaseTime) : null
|
|
initialValue: theData.releaseTime ? moment(theData.releaseTime) : null
|
|
})(<DatePicker />)}
|
|
})(<DatePicker />)}
|
|
- </FormItem>
|
|
|
|
|
|
+ </FormItem> */}
|
|
</div>
|
|
</div>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="full-item"
|
|
<FormItem className="full-item"
|
|
labelCol={{ span: 3 }}
|
|
labelCol={{ span: 3 }}
|
|
wrapperCol={{ span: 18 }} label="发布位置">
|
|
wrapperCol={{ span: 18 }} label="发布位置">
|
|
- {getFieldDecorator('releasePosition', {
|
|
|
|
|
|
+ {getFieldDecorator('publishPages', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.releasePosition
|
|
|
|
|
|
+ initialValue: theData.publishPages
|
|
})(
|
|
})(
|
|
<Checkbox.Group>
|
|
<Checkbox.Group>
|
|
<Row>
|
|
<Row>
|
|
@@ -417,6 +425,11 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
)}
|
|
)}
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
|
|
+ {theData.auditInfo&&<div className="clearfix">
|
|
|
|
+ <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="审核信息">
|
|
|
|
+ <span>{theData.auditInfo}</span>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </div>}
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem wrapperCol={{ span: 12, offset: 3 }}>
|
|
<FormItem wrapperCol={{ span: 12, offset: 3 }}>
|
|
<Button className="set-submit" type="primary" htmlType="submit">
|
|
<Button className="set-submit" type="primary" htmlType="submit">
|
|
@@ -426,7 +439,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
className="set-submit"
|
|
className="set-submit"
|
|
type="ghost"
|
|
type="ghost"
|
|
onClick={(e) => {
|
|
onClick={(e) => {
|
|
- this.state.auditStatus = 1;
|
|
|
|
|
|
+ this.submission()
|
|
}}
|
|
}}
|
|
htmlType="submit"
|
|
htmlType="submit"
|
|
>
|
|
>
|