|
@@ -90,7 +90,8 @@ const BusinessProject = Form.create()(
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
- secondId: this.state.cid,
|
|
|
+ topId: this.state.typeSearch? this.state.typeSearch[0]:'',
|
|
|
+ secondId:this.state.typeSearch?this.state.typeSearch[1]:'',
|
|
|
name: this.state.nameSearch,
|
|
|
privateProject: 1,
|
|
|
auditStatus:1
|
|
@@ -163,6 +164,7 @@ const BusinessProject = Form.create()(
|
|
|
selectedRows: [],
|
|
|
loading: false,
|
|
|
orgCodeUrl: [],
|
|
|
+ typeSearch:[],
|
|
|
companyLogoUrl: [],
|
|
|
pagination: {
|
|
|
defaultCurrent: 1,
|
|
@@ -269,40 +271,35 @@ const BusinessProject = Form.create()(
|
|
|
method: 'get',
|
|
|
dataType: 'json',
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + '/api/admin/jtBusiness/category/list',
|
|
|
+ url: globalConfig.context + '/portal/service/jtBusiness/getCategoryList',
|
|
|
data: {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 999
|
|
|
+
|
|
|
},
|
|
|
success: function(data) {
|
|
|
- let theArr = [],
|
|
|
- firstData = [];
|
|
|
- if (!data.data || !data.data.list) {
|
|
|
+ let theArr = [],thisdata=data.data;
|
|
|
+ if (!data.data) {
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
|
} else {
|
|
|
- for (let i = 0; i < data.data.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
+ thisdata.map((item,index) => {
|
|
|
theArr.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
- name: thisdata.name,
|
|
|
- superName: thisdata.superName //上级品类
|
|
|
- });
|
|
|
- if (thisdata.layer == '2') {
|
|
|
- firstData.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
- name: thisdata.name,
|
|
|
- superName: thisdata.superName //上级品类
|
|
|
- });
|
|
|
+ 'value':item.topLevelId,
|
|
|
+ 'label':item.topLevel,
|
|
|
+ 'children':[]
|
|
|
+ })
|
|
|
+ if (item.children) {
|
|
|
+ item.children.map(atem => {
|
|
|
+ (theArr[index].children).push({
|
|
|
+ 'value':atem.id,
|
|
|
+ 'label':atem.name
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
this.setState({
|
|
|
categoryList: theArr,
|
|
|
- firstData: firstData
|
|
|
});
|
|
|
this.loadData();
|
|
|
}.bind(this)
|
|
@@ -337,12 +334,17 @@ const BusinessProject = Form.create()(
|
|
|
}
|
|
|
thisData = {};
|
|
|
}
|
|
|
- let name = '';
|
|
|
- (this.state.firstData).map((item) => {
|
|
|
- if (item.id == thisData.categoryId) {
|
|
|
- name = item.name;
|
|
|
+ let categoryList = this.state.categoryList,name='';
|
|
|
+ categoryList.map(item=>{
|
|
|
+ if((item.children).length){
|
|
|
+ (item.children).map(atem=>{
|
|
|
+ if(atem.value==thisData.categoryId){
|
|
|
+ name=item.label+'/'+atem.label;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
this.setState({
|
|
|
id: thisData.id,
|
|
|
data: thisData,
|
|
@@ -439,7 +441,7 @@ const BusinessProject = Form.create()(
|
|
|
//搜索部分的清零
|
|
|
reset() {
|
|
|
this.state.nameSearch = ''; //项目名称清零
|
|
|
- this.state.cid = undefined; //品类名称清零
|
|
|
+ this.state.typeSearch = undefined; //品类名称清零
|
|
|
this.state.ressSearch = undefined; //省市区清零
|
|
|
this.state.activityFlag = undefined; //活动生效清零
|
|
|
this.state.status = undefined; //项目状态清零
|
|
@@ -463,7 +465,6 @@ const BusinessProject = Form.create()(
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
- const firstData = this.state.firstData || [];
|
|
|
const theData = this.state.data || {};
|
|
|
return (
|
|
|
<div className="user-content">
|
|
@@ -477,19 +478,10 @@ const BusinessProject = Form.create()(
|
|
|
this.setState({ nameSearch: e.target.value });
|
|
|
}}
|
|
|
/>
|
|
|
- <Select
|
|
|
- placeholder="业务品类"
|
|
|
- style={{ width: '200px', marginRight: '10px' }}
|
|
|
- value={this.state.cid}
|
|
|
- onChange={(e) => {
|
|
|
- this.setState({ cid: e });
|
|
|
- }}
|
|
|
- notFoundContent="未获取到上级品类列表"
|
|
|
- >
|
|
|
- {firstData.map(function(item) {
|
|
|
- return <Select.Option key={item.id}>{item.name}</Select.Option>;
|
|
|
- })}
|
|
|
- </Select>
|
|
|
+ <Cascader placeholder='业务项目品类'
|
|
|
+ options={this.state.categoryList}
|
|
|
+ style={{width:200,marginRight:10}}
|
|
|
+ value={this.state.typeSearch} onChange={(e)=>{this.setState({typeSearch:e})}}/>
|
|
|
<Button type="primary" onClick={this.search} style={{ marginRight: '10px' }}>
|
|
|
搜索
|
|
|
</Button>
|
|
@@ -554,7 +546,7 @@ const BusinessProject = Form.create()(
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
label="热点"
|
|
|
>
|
|
|
- <span>{theData.isHot ? '是' : '否'}</span>
|
|
|
+ <span>{theData.isHot=='1' ? '是' :theData.isHot=='0'?'否':''}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
@@ -564,7 +556,7 @@ const BusinessProject = Form.create()(
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
label="市场价"
|
|
|
>
|
|
|
- <span>{theData.price}万元</span>
|
|
|
+ <span>{theData.price} 万元</span>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
@@ -572,7 +564,7 @@ const BusinessProject = Form.create()(
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
label="活动价"
|
|
|
>
|
|
|
- <span>{theData.activityPrice}万元</span>
|
|
|
+ <span>{theData.activityPrice} 万元</span>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
@@ -596,7 +588,7 @@ const BusinessProject = Form.create()(
|
|
|
wrapperCol={{ span: 12 }}
|
|
|
label="活动生效"
|
|
|
>
|
|
|
- <span>{theData.activityFlag ? '有效' : '无效'}</span>
|
|
|
+ <span>{theData.activityFlag =='1'? '有效' : theData.activityFlag =='0'?'无效':''}</span>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
@@ -612,6 +604,16 @@ const BusinessProject = Form.create()(
|
|
|
<span>{theData.introduce}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ {/* <div className="clearfix">
|
|
|
+ <FormItem labelCol={{ span: 4 }} wrapperCol={{ span: 12 }} label="标签">
|
|
|
+ <span>{this.state.tags}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div> */}
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem labelCol={{ span: 4 }} wrapperCol={{ span: 12 }} label="项目营销说明">
|
|
|
+ <span>{theData.advertisement}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
|
labelCol={{ span: 4 }}
|