|
|
|
@ -43,6 +43,12 @@ function disabledDateTime() {
|
|
|
|
|
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function disabledDate(current) {
|
|
|
|
|
return current && current < moment().endOf('day').subtract(1, 'days');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props)
|
|
|
|
@ -50,7 +56,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
this.state = {
|
|
|
|
|
modalCancel:false,
|
|
|
|
|
getverificationcodes:true,
|
|
|
|
|
seconds:35,
|
|
|
|
|
seconds:60,
|
|
|
|
|
springtype:false,
|
|
|
|
|
category:undefined,
|
|
|
|
|
title:undefined,
|
|
|
|
@ -83,7 +89,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
deadline_at:moment(data.deadline_at),
|
|
|
|
|
min_price:data.min_price,
|
|
|
|
|
max_price:data.max_price,
|
|
|
|
|
contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.username:data.contact_name,
|
|
|
|
|
contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.real_name:data.contact_name,
|
|
|
|
|
phones:data.contact_phone,
|
|
|
|
|
attachments:data.attachments,
|
|
|
|
|
|
|
|
|
@ -93,7 +99,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
console.log(this.props.current_user&&this.props.current_user.username)
|
|
|
|
|
console.log(this.props.current_user&&this.props.current_user.real_name)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let Url = `/project_package_categories.json`;
|
|
|
|
@ -112,7 +118,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_name:this.props.current_user&&this.props.current_user.username
|
|
|
|
|
contact_name:this.props.current_user&&this.props.current_user.real_name
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// this.contentMdRef.current.setValue("测试赋值")
|
|
|
|
@ -123,7 +129,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
if(prevProps.current_user!=this.props.current_user){
|
|
|
|
|
if(this.props.current_user!=undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
contact_name:this.props.current_user.username
|
|
|
|
|
contact_name:this.props.current_user.real_name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -151,7 +157,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
clearInterval(timer);
|
|
|
|
|
this.setState({
|
|
|
|
|
getverificationcodes: false,
|
|
|
|
|
seconds: 35,
|
|
|
|
|
seconds: 60,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -170,7 +176,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
clearInterval(timer);
|
|
|
|
|
this.setState({
|
|
|
|
|
getverificationcodes: false,
|
|
|
|
|
seconds: 35,
|
|
|
|
|
seconds: 60,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -187,7 +193,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
axios.get((url), {
|
|
|
|
|
params: {
|
|
|
|
|
value: contact_phone,
|
|
|
|
|
type: 9,
|
|
|
|
|
type: 5,
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
//验证有问题{"status":1,"message":"success"}
|
|
|
|
@ -452,7 +458,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
deadline_at:deadline_at._i,
|
|
|
|
|
min_price:parseInt(min_price),
|
|
|
|
|
max_price:parseInt(max_price),
|
|
|
|
|
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.username:contact_name,
|
|
|
|
|
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
|
|
|
|
|
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
|
|
|
|
|
code:code,
|
|
|
|
|
publish:types
|
|
|
|
@ -462,7 +468,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
if(type===true){
|
|
|
|
|
this.props.setPublicationfun(response.data.id)
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href="/crowdsourcings/"+response.data.id
|
|
|
|
|
window.location.href="/crowdsourcing/"+response.data.id
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
@ -500,7 +506,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
deadline_at:deadline_at._i,
|
|
|
|
|
min_price:parseInt(min_price),
|
|
|
|
|
max_price:parseInt(max_price),
|
|
|
|
|
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.username:contact_name,
|
|
|
|
|
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
|
|
|
|
|
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
|
|
|
|
|
code:code,
|
|
|
|
|
publish:types
|
|
|
|
@ -510,7 +516,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
if(type===true){
|
|
|
|
|
this.props.setPublicationfun(response.data.id)
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href="/crowdsourcings/"+response.data.id
|
|
|
|
|
window.location.href="/crowdsourcing/"+response.data.id
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
springtype:false
|
|
|
|
@ -714,9 +720,9 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
<Spin size="large" spinning={this.state.springtype} >
|
|
|
|
|
<p className="clearfix" id={"publishtimestart"}>
|
|
|
|
|
|
|
|
|
|
<div className={"stud-class-set pd30a0 coursenavbox edu-back-white pb20"}>
|
|
|
|
|
<div className={"stud-class-set pd30a0 edu-back-white pb20"}>
|
|
|
|
|
<div className={"ant-row contentbox mdInForm mb20"}>
|
|
|
|
|
<div className="ant-form-item-label mb10">
|
|
|
|
|
<div className="ant-form-item-label mb20">
|
|
|
|
|
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16">请选择需求类型</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -729,9 +735,10 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
{this.state.categorytypes===true?<div className={"color-red"}>请选择类型</div>:""}
|
|
|
|
|
|
|
|
|
|
<div className="ant-form-item-label mb10">
|
|
|
|
|
{this.state.categorytypes===true?<div className={"color-red mb10"}>请选择类型</div>:""}
|
|
|
|
|
|
|
|
|
|
<div className="ant-form-item-label mb15">
|
|
|
|
|
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16" >需求标题和详情</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -805,6 +812,8 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
placeholder="请选择任务的竞标截止日期"
|
|
|
|
|
className={"fafas"}
|
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
|
disabledDate={disabledDate}
|
|
|
|
|
dropdownClassName="hideDisable"
|
|
|
|
|
value={this.state.deadline_at}
|
|
|
|
|
onChange={this.onChangeTimePicker}
|
|
|
|
|
/>
|
|
|
|
@ -848,7 +857,7 @@ class PackageIndexNEIBannerConcent extends Component {
|
|
|
|
|
<Input
|
|
|
|
|
className={"fafafas"}
|
|
|
|
|
style={{"width": "260px"}}
|
|
|
|
|
value={this.state.contact_name===null||this.state.contact_name===undefined?this.props.current_user&&this.props.current_user.username:this.state.contact_name}
|
|
|
|
|
value={this.state.contact_name===null||this.state.contact_name===undefined?this.props.current_user&&this.props.current_user.real_name:this.state.contact_name}
|
|
|
|
|
placeholder="请输入姓名"
|
|
|
|
|
onInput={(e)=>this.onChangeContact_name(e)}
|
|
|
|
|
/>
|
|
|
|
|