|
@@ -29,12 +29,85 @@ import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
|
|
import { splitUrl, companySearch, getDemandType, getAchievementCategory } from '@/tools.js';
|
|
import { splitUrl, companySearch, getDemandType, getAchievementCategory } from '@/tools.js';
|
|
const FormItem =Form.Item
|
|
const FormItem =Form.Item
|
|
|
|
|
|
|
|
+const KeyWordTagGroup = React.createClass({
|
|
|
|
+ getInitialState() {
|
|
|
|
+ return {
|
|
|
|
+ tags: [],
|
|
|
|
+ inputVisible: false,
|
|
|
|
+ inputValue: ''
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ handleClose(removedTag) {
|
|
|
|
+ const tags = this.state.tags.filter(tag => tag !== removedTag);
|
|
|
|
+ this.props.tagsArr(tags);
|
|
|
|
+ this.setState({ tags });
|
|
|
|
+ },
|
|
|
|
+ showInput() {
|
|
|
|
+ this.setState({ inputVisible: true }, () => this.input.focus());
|
|
|
|
+ },
|
|
|
|
+ handleInputChange(e) {
|
|
|
|
+ this.setState({ inputValue: e.target.value });
|
|
|
|
+ },
|
|
|
|
+ handleInputConfirm() {
|
|
|
|
+ const state = this.state;
|
|
|
|
+ const inputValue = state.inputValue;
|
|
|
|
+ let tags = state.tags;
|
|
|
|
+ if (inputValue && tags.indexOf(inputValue) === -1 && inputValue.replace(/(^\s*)|(\s*$)/g, "").length != 0) {
|
|
|
|
+ tags = [...tags, inputValue.replace(/(^\s*)|(\s*$)/g, "")];
|
|
|
|
+ }
|
|
|
|
+ this.props.tagsArr(tags);
|
|
|
|
+ this.setState({
|
|
|
|
+ tags,
|
|
|
|
+ inputVisible: false,
|
|
|
|
+ inputValue: '',
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ componentWillMount() {
|
|
|
|
+ this.state.tags = this.props.keyWordArr;
|
|
|
|
+ },
|
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
|
+ if (this.props.keyWordArr != nextProps.keyWordArr) {
|
|
|
|
+ this.state.tags = nextProps.keyWordArr;
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ render() {
|
|
|
|
+ const { tags, inputVisible, inputValue } = this.state;
|
|
|
|
+ return (
|
|
|
|
+ <div className="keyWord-tips">
|
|
|
|
+ {tags.map((tag, index) => {
|
|
|
|
+ const isLongTag = tag.length > 10;
|
|
|
|
+ const tagElem = (
|
|
|
|
+ <Tag key={tag} closable={index !== -1} afterClose={() => this.handleClose(tag)}>
|
|
|
|
+ {isLongTag ? `${tag.slice(0, 10)}...` : tag}
|
|
|
|
+ </Tag>
|
|
|
|
+ );
|
|
|
|
+ return isLongTag ? <Tooltip title={tag}>{tagElem}</Tooltip> : tagElem;
|
|
|
|
+ })}
|
|
|
|
+ {inputVisible && (
|
|
|
|
+ <Input
|
|
|
|
+ ref={input => this.input = input}
|
|
|
|
+ type="text"
|
|
|
|
+ style={{ width: 78 }}
|
|
|
|
+ value={inputValue}
|
|
|
|
+ onChange={this.handleInputChange}
|
|
|
|
+ onBlur={this.handleInputConfirm}
|
|
|
|
+ onPressEnter={this.handleInputConfirm}
|
|
|
|
+ />
|
|
|
|
+ )}
|
|
|
|
+ {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 9 ? true : false} onClick={this.showInput}>+ 新关键词</Button>}
|
|
|
|
+ </div>
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+
|
|
const PicturesWall = React.createClass({
|
|
const PicturesWall = React.createClass({
|
|
getInitialState() {
|
|
getInitialState() {
|
|
return {
|
|
return {
|
|
previewVisible: false,
|
|
previewVisible: false,
|
|
previewImage: '',
|
|
previewImage: '',
|
|
- fileList: []
|
|
|
|
|
|
+ fileList: [],
|
|
|
|
+ tags: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
handleCancel() {
|
|
handleCancel() {
|
|
@@ -66,7 +139,7 @@ const PicturesWall = React.createClass({
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<Upload
|
|
<Upload
|
|
action={globalConfig.context + '/api/user/demand/uploadPicture'}
|
|
action={globalConfig.context + '/api/user/demand/uploadPicture'}
|
|
- data={{ sign: 'demand_picture', uid: this.props.uid }}
|
|
|
|
|
|
+ data={{ sign: 'demand_picture'}}
|
|
listType="picture-card"
|
|
listType="picture-card"
|
|
fileList={fileList}
|
|
fileList={fileList}
|
|
onPreview={this.handlePreview}
|
|
onPreview={this.handlePreview}
|
|
@@ -90,7 +163,8 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
auditStatus: 0,
|
|
auditStatus: 0,
|
|
textFileList: [],
|
|
textFileList: [],
|
|
videoFileList: [],
|
|
videoFileList: [],
|
|
- pictureUrl: [],
|
|
|
|
|
|
+ pictureUrl: [],
|
|
|
|
+ tags:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
loadData(id) {
|
|
loadData(id) {
|
|
@@ -117,15 +191,11 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
thisData.publishPages.map(item=>{
|
|
thisData.publishPages.map(item=>{
|
|
publishPagesArr.push(item.publishPage)
|
|
publishPagesArr.push(item.publishPage)
|
|
})
|
|
})
|
|
- // 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,
|
|
|
|
id:thisData.id,
|
|
id:thisData.id,
|
|
|
|
+ tags: thisData.keyword ? thisData.keyword.split(",") : [],
|
|
data: thisData,
|
|
data: thisData,
|
|
|
|
+ auditStatus:thisData.auditStatus,
|
|
publishPagesArr:publishPagesArr,
|
|
publishPagesArr:publishPagesArr,
|
|
isHot:thisData.isHot,
|
|
isHot:thisData.isHot,
|
|
isUrgent:thisData.isUrgent,
|
|
isUrgent:thisData.isUrgent,
|
|
@@ -146,10 +216,9 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
getPictureUrl(e) {
|
|
getPictureUrl(e) {
|
|
this.setState({ pictureUrl: e });
|
|
this.setState({ pictureUrl: e });
|
|
},
|
|
},
|
|
- handleSubmit(e) {
|
|
|
|
- e.preventDefault();
|
|
|
|
|
|
+ handleSubmit(e,index) {
|
|
|
|
+ e.preventDefault();
|
|
this.props.form.validateFields((err, values) => {
|
|
this.props.form.validateFields((err, values) => {
|
|
- console.log(values)
|
|
|
|
//url转化
|
|
//url转化
|
|
let thePictureUrl = [];
|
|
let thePictureUrl = [];
|
|
if (this.state.pictureUrl.length) {
|
|
if (this.state.pictureUrl.length) {
|
|
@@ -160,29 +229,35 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
thePictureUrl = picArr.join(",");
|
|
thePictureUrl = picArr.join(",");
|
|
- };
|
|
|
|
|
|
+ };
|
|
|
|
+ if(!this.state.tags.length){
|
|
|
|
+ message.warning('请填写关键词.')
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
if (!err) {
|
|
if (!err) {
|
|
this.setState({
|
|
this.setState({
|
|
loading: true
|
|
loading: true
|
|
});
|
|
});
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "post",
|
|
method: "post",
|
|
- dataType: "json",
|
|
|
|
- // crossDomain: false,
|
|
|
|
|
|
+ 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/demand/updateDemand' : globalConfig.context + '/api/user/demand/apply',
|
|
data: {
|
|
data: {
|
|
id: this.props.data.id,
|
|
id: this.props.data.id,
|
|
- name: values.name,
|
|
|
|
|
|
+ name: values.name,
|
|
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,
|
|
- // pictureUrl: thePictureUrl,
|
|
|
|
|
|
+ pictureUrl: thePictureUrl,
|
|
crowdCost:values.crowdCost,
|
|
crowdCost:values.crowdCost,
|
|
|
|
+ keyword: this.state.tags ? this.state.tags.join(",") : [],
|
|
|
|
+ keywords: this.state.tags,
|
|
budgetCost:values.budgetCost,
|
|
budgetCost:values.budgetCost,
|
|
- urgentDays:values.urgentDays?values.urgentDays.format('YYYY-MM-DD'):undefined,
|
|
|
|
|
|
+ urgentDays:values.urgentDays,
|
|
urgentMoney:values.urgentMoney,
|
|
urgentMoney:values.urgentMoney,
|
|
- auditStatus:values.auditStatus,
|
|
|
|
|
|
+ auditStatus:index,
|
|
status: this.state.status,
|
|
status: this.state.status,
|
|
isUrgent: this.state.isUrgent,
|
|
isUrgent: this.state.isUrgent,
|
|
isHot:this.state.isHot,
|
|
isHot:this.state.isHot,
|
|
@@ -194,11 +269,11 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
loading: false
|
|
loading: false
|
|
});
|
|
});
|
|
if (!data.error.length) {
|
|
if (!data.error.length) {
|
|
- message.success('保存成功!');
|
|
|
|
|
|
+ message.success('操作成功!');
|
|
this.setState({
|
|
this.setState({
|
|
visible: false
|
|
visible: false
|
|
});
|
|
});
|
|
- this.props.handleOk();
|
|
|
|
|
|
+ this.props.handOk();
|
|
} else {
|
|
} else {
|
|
message.warning(data.error[0].message);
|
|
message.warning(data.error[0].message);
|
|
}
|
|
}
|
|
@@ -206,26 +281,26 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- submission(record){
|
|
|
|
- this.handleSubmit();
|
|
|
|
- $.ajax({
|
|
|
|
|
|
+ submission(e,index){
|
|
|
|
+ this.handleSubmit(e,index);
|
|
|
|
+ $.ajax({
|
|
method: "POST",
|
|
method: "POST",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
- crossDomain: false,
|
|
|
|
- url: globalConfig.context + "/api/user/demand/deletet",
|
|
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ async:true,
|
|
|
|
+ url: globalConfig.context + "/api/user/demand/publishDemand",
|
|
data: {
|
|
data: {
|
|
- ids: deletedIds
|
|
|
|
|
|
+ id: this.state.id,
|
|
|
|
+ auditStatus:this.state.auditStatus
|
|
}
|
|
}
|
|
}).done(function (data) {
|
|
}).done(function (data) {
|
|
if (!data.error.length) {
|
|
if (!data.error.length) {
|
|
- message.success('成功提交审核.');
|
|
|
|
this.setState({
|
|
this.setState({
|
|
loading: false,
|
|
loading: false,
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
message.warning(data.error[0].message);
|
|
message.warning(data.error[0].message);
|
|
};
|
|
};
|
|
- this.loadData();
|
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
},
|
|
},
|
|
cancelFun(){
|
|
cancelFun(){
|
|
@@ -235,7 +310,11 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
if (this.props.data.id) {
|
|
if (this.props.data.id) {
|
|
this.loadData(this.props.data.id);
|
|
this.loadData(this.props.data.id);
|
|
} else {
|
|
} else {
|
|
- this.state.data = {};
|
|
|
|
|
|
+ this.state.data = {};
|
|
|
|
+ this.state.tags = [];
|
|
|
|
+ this.setState({
|
|
|
|
+ publishPagesArr:['app_demand_list','web_demand_list']
|
|
|
|
+ })
|
|
};
|
|
};
|
|
},
|
|
},
|
|
componentWillReceiveProps(nextProps) {
|
|
componentWillReceiveProps(nextProps) {
|
|
@@ -249,9 +328,13 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
this.state.isUrgent=undefined;//加急需求
|
|
this.state.isUrgent=undefined;//加急需求
|
|
this.state.isHot=undefined;//是否悬赏
|
|
this.state.isHot=undefined;//是否悬赏
|
|
this.state.status=undefined;
|
|
this.state.status=undefined;
|
|
- this.state.pictureUrl = [];
|
|
|
|
|
|
+ this.state.pictureUrl = [];
|
|
|
|
+ this.state.tags = [];
|
|
|
|
+ this.setState({
|
|
|
|
+ publishPagesArr:['app_demand_list','web_demand_list']
|
|
|
|
+ })
|
|
};
|
|
};
|
|
- this.props.form.resetFields();
|
|
|
|
|
|
+ this.props.form.resetFields();
|
|
};
|
|
};
|
|
},
|
|
},
|
|
render() {
|
|
render() {
|
|
@@ -265,7 +348,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
let demandType =(getFieldsValue(['demandType']).demandType);
|
|
let demandType =(getFieldsValue(['demandType']).demandType);
|
|
return (
|
|
return (
|
|
<div className='login'>
|
|
<div className='login'>
|
|
- <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form">
|
|
|
|
|
|
+ <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个需求吧">
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="发个需求吧">
|
|
@@ -281,6 +364,17 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
})(<Input placeholder="给您的需求配个标题吧." />)}
|
|
})(<Input placeholder="给您的需求配个标题吧." />)}
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div className="clearfix">
|
|
|
|
+ <FormItem
|
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
|
+ label="关键词" >
|
|
|
|
+ <KeyWordTagGroup
|
|
|
|
+ keyWordArr={this.state.tags}
|
|
|
|
+ tagsArr={(e)=>{this.setState({tags:e})}}
|
|
|
|
+ />
|
|
|
|
+ </FormItem>
|
|
|
|
+ </div>
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="行业领域">
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="行业领域">
|
|
{getFieldDecorator('industryCategory', {
|
|
{getFieldDecorator('industryCategory', {
|
|
rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
|
|
rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
|
|
@@ -291,7 +385,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
<FormItem className="half-item" {...formItemLayout} label="需求类型">
|
|
<FormItem className="half-item" {...formItemLayout} label="需求类型">
|
|
{getFieldDecorator('demandType', {
|
|
{getFieldDecorator('demandType', {
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
- initialValue:(theData.demandType?theData.demandType.toString():undefined)
|
|
|
|
|
|
+ initialValue:(theData.demandType||theData.demandType=='0'?theData.demandType.toString():undefined)
|
|
})(
|
|
})(
|
|
<Select style={{ width: 160 }} placeholder="请选择需求类型"
|
|
<Select style={{ width: 160 }} placeholder="请选择需求类型"
|
|
>
|
|
>
|
|
@@ -317,7 +411,7 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
<FormItem className="half-item" {...formItemLayout} label="资金用途">
|
|
<FormItem className="half-item" {...formItemLayout} label="资金用途">
|
|
{getFieldDecorator('researchType', {
|
|
{getFieldDecorator('researchType', {
|
|
rules: [ { required: false } ],
|
|
rules: [ { required: false } ],
|
|
- initialValue: theData.researchType
|
|
|
|
|
|
+ initialValue: theData.researchType||theData.researchType=='0'?theData.researchType.toString():undefined
|
|
})(
|
|
})(
|
|
<Select placeholder="选择资金用途" style={{ width: 160 }} >
|
|
<Select placeholder="选择资金用途" style={{ width: 160 }} >
|
|
<Select.Option value="0" >研发</Select.Option>
|
|
<Select.Option value="0" >研发</Select.Option>
|
|
@@ -332,15 +426,20 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="half-item" {...formItemLayout} label="加急">
|
|
<FormItem className="half-item" {...formItemLayout} label="加急">
|
|
<Radio.Group value={this.state.isUrgent} onChange={(e)=>{this.setState({isUrgent:e.target.value})}}>
|
|
<Radio.Group value={this.state.isUrgent} onChange={(e)=>{this.setState({isUrgent:e.target.value})}}>
|
|
- <Radio value={1}>加急</Radio>
|
|
|
|
<Radio value={0}>非加急</Radio>
|
|
<Radio value={0}>非加急</Radio>
|
|
|
|
+ <Radio value={1}>加急</Radio>
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</FormItem>
|
|
</FormItem>
|
|
{this.state.isUrgent?<div className="clearfix">
|
|
{this.state.isUrgent?<div className="clearfix">
|
|
<FormItem className="half-item" {...formItemLayout} label="日期">
|
|
<FormItem className="half-item" {...formItemLayout} label="日期">
|
|
{getFieldDecorator('urgentDays', {
|
|
{getFieldDecorator('urgentDays', {
|
|
- initialValue: theData.urgentDays ? moment(theData.urgentDays) : null
|
|
|
|
- })(<DatePicker />)}
|
|
|
|
|
|
+ initialValue: theData.urgentDays
|
|
|
|
+ })(
|
|
|
|
+ <div>
|
|
|
|
+ <Input style={{width:50}}/>
|
|
|
|
+ <span>天</span>
|
|
|
|
+ </div>)
|
|
|
|
+ }
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem className="half-item" {...formItemLayout} label="加急金额">
|
|
<FormItem className="half-item" {...formItemLayout} label="加急金额">
|
|
{getFieldDecorator('urgentMoney', {
|
|
{getFieldDecorator('urgentMoney', {
|
|
@@ -364,22 +463,6 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
- {/* <div className="clearfix">
|
|
|
|
- <FormItem
|
|
|
|
- className="half-item"
|
|
|
|
- {...formItemLayout}
|
|
|
|
- label="地区"
|
|
|
|
- >
|
|
|
|
- <Cascader
|
|
|
|
- options={areaSelect()}
|
|
|
|
- value={this.state.ProvinceCity}
|
|
|
|
- placeholder="选择地区"
|
|
|
|
- onChange={(e, pre) => {
|
|
|
|
- this.setState({ ProvinceCity: e });
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- </FormItem>
|
|
|
|
- </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}
|
|
@@ -388,27 +471,6 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
visible={this.props.visible}
|
|
visible={this.props.visible}
|
|
/>
|
|
/>
|
|
</FormItem>
|
|
</FormItem>
|
|
- <div>
|
|
|
|
- <FormItem className="half-item" {...formItemLayout} label="发布状态">
|
|
|
|
- {getFieldDecorator('auditStatus', {
|
|
|
|
- rules: [ { required: false } ],
|
|
|
|
- initialValue: (theData.auditStatus?theData.auditStatus.toString():undefined)
|
|
|
|
- })(
|
|
|
|
- <Select placeholder="选择发布状态" style={{ width: 160 }} >
|
|
|
|
- <Select.Option value="0" >草稿</Select.Option>
|
|
|
|
- <Select.Option value="1" >发布审核</Select.Option>
|
|
|
|
- <Select.Option value="2" >已发布</Select.Option>
|
|
|
|
- <Select.Option value="3" >发布失败</Select.Option>
|
|
|
|
- <Select.Option value="4" >已撤销</Select.Option>
|
|
|
|
- </Select>
|
|
|
|
- )}
|
|
|
|
- </FormItem>
|
|
|
|
- {/* <FormItem className="half-item" {...formItemLayout} label="发布时间">
|
|
|
|
- {getFieldDecorator('releaseTime', {
|
|
|
|
- initialValue: theData.releaseTime ? moment(theData.releaseTime) : null
|
|
|
|
- })(<DatePicker />)}
|
|
|
|
- </FormItem> */}
|
|
|
|
- </div>
|
|
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="full-item"
|
|
<FormItem className="full-item"
|
|
labelCol={{ span: 3 }}
|
|
labelCol={{ span: 3 }}
|
|
@@ -421,10 +483,10 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
<Row>
|
|
<Row>
|
|
<Col span={6}><Checkbox value="web_index">网站首页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="web_index">网站首页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="web_demand_main">网站需求主页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="web_demand_main">网站需求主页</Checkbox></Col>
|
|
- <Col span={6}><Checkbox value="web_demand_list">网站需求搜索页</Checkbox></Col>
|
|
|
|
|
|
+ <Col span={6}><Checkbox value="web_demand_list" disabled>网站需求搜索页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="app_index">APP首页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="app_index">APP首页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="app_demand_main">APP需求首页</Checkbox></Col>
|
|
<Col span={6}><Checkbox value="app_demand_main">APP需求首页</Checkbox></Col>
|
|
- <Col span={6}><Checkbox value="app_demand_list">APP需求搜索页</Checkbox></Col>
|
|
|
|
|
|
+ <Col span={6}><Checkbox value="app_demand_list" disabled>APP需求搜索页</Checkbox></Col>
|
|
</Row>
|
|
</Row>
|
|
</Checkbox.Group>
|
|
</Checkbox.Group>
|
|
)}
|
|
)}
|
|
@@ -437,19 +499,22 @@ const DemandDetailForm = Form.create()(React.createClass({
|
|
</div>}
|
|
</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>
|
|
|
|
- {this.props.data&&this.props.data.id&&<Button
|
|
|
|
|
|
+ {this.props.data&&!this.props.data.id&&<Button className="set-submit" type="primary" htmlType="submit">
|
|
|
|
+ 保存草稿
|
|
|
|
+ </Button>}
|
|
|
|
+ <Button
|
|
className="set-submit"
|
|
className="set-submit"
|
|
type="ghost"
|
|
type="ghost"
|
|
onClick={(e) => {
|
|
onClick={(e) => {
|
|
- this.submission()
|
|
|
|
|
|
+ if(this.props.data.id){
|
|
|
|
+ this.submission(e,this.state.auditStatus)
|
|
|
|
+ }else{
|
|
|
|
+ this.handleSubmit(e,1)
|
|
|
|
+ }
|
|
}}
|
|
}}
|
|
- htmlType="submit"
|
|
|
|
>
|
|
>
|
|
提交审核
|
|
提交审核
|
|
- </Button>}
|
|
|
|
|
|
+ </Button>
|
|
<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
|
|
<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
|
|
取消
|
|
取消
|
|
</Button>
|
|
</Button>
|