import React from 'react';
import $ from 'jquery/src/ajax';
import { citySelect} from '@/NewDicProvinceListAll';
import { Form, Icon, Button, Input, Select, Spin, Table, message, DatePicker, Modal, Upload,Popconfirm,Cascader, InputNumber } from 'antd';
import {getGameState,splitUrl,getprovince} from '@/tools.js';

//图片组件
const PicturesWall = React.createClass({
    getInitialState() {
        return {
            previewVisible: false,
            previewImage: '',
            fileList: [],
        }
    },
    handleCancel() {
        this.setState({ previewVisible: false })
    },
    handlePreview(file) {
        this.setState({
            previewImage: file.url || file.thumbUrl,
            previewVisible: true,
        });
    },
    handleChange(info) {
        let fileList = info.fileList;
        this.setState({ fileList });
        this.props.fileList(fileList);
    },
    componentWillReceiveProps(nextProps) {
        this.state.fileList = nextProps.pictureUrl; 
    },
    render() {
        const { previewVisible, previewImage, fileList } = this.state;
        const uploadButton = (
            <div>
                <Icon type="plus" />
                <div className="ant-upload-text">点击上传</div>
            </div>
        );
        return (
            <div style={{display:"inline-block"}}>
                <Upload
                    action={globalConfig.context + "/api/user/jtBusiness/project/uploadPicture"}
                    data={{ 'sign': 'jt_project_picture' }}
                    listType="picture-card"
                    fileList={fileList}
                    onPreview={this.handlePreview}
                    onChange={this.handleChange} >
                    {fileList.length >= 1 ? null : uploadButton}
                </Upload>
                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
                </Modal>
            </div>
        );
    }
});
//主体
const BusinessProject=Form.create()(React.createClass({
	loadData(pageNo) {
        this.state.data = [];
        this.setState({
            loading: true,
            page:pageNo,
        });
        $.ajax({
            method: "get",
            dataType: "json",
            crossDomain: false,
            url: globalConfig.context + '/portal/service/jtProject/list',
            data: {
                pageNo: pageNo || 1,
                pageSize: this.state.pagination.pageSize,
                secondId:this.state.cid, 
                name:this.state.nameSearch, 
            },
            success: function (data) {
                let theArr = [];
                if (!data.data || !data.data.list) {
                    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],
							ProvinceCityArr = [],
							cname='',superName='',
							ProvinceS = thisdata.province, //getprovince
							citys = thisdata.city,
							Areas = thisdata.area;
							ProvinceCityArr.push(ProvinceS, citys, Areas);
							this.state.categoryList.map(item=>{
								if(thisdata.categoryId==item.id){
									cname=item.name;
									superName=item.superName
								}
							})
                        theArr.push({
                            key: i,
                            id:thisdata.id,//业务名称
                            name: thisdata.name,//业务名称
                            categoryId: thisdata.categoryId,//业务品类
                            number:thisdata.number,
							price: thisdata.price,//市场价
							superName:superName,
							cname:cname,
							city:thisdata.city,
                            activityPrice:thisdata.activityPrice?thisdata.activityPrice:'',//最低折扣
							memberPrice:thisdata.memberPrice?thisdata.memberPrice:'',//会员价
							offset:thisdata.offset?thisdata.offset:'',
                            activityPrice:thisdata.activityPrice?thisdata.activityPrice:'',//活动价
                            activityFlag:thisdata.activityFlag,//活动生效标识
                            status: thisdata.status,//项目状态
							province:thisdata.province,
							introduce:thisdata.introduce,
							createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
							value:thisdata.value,
							applyConditions:thisdata.applyConditions
						});
                    };
                    this.state.pagination.current = data.data.pageNo;
                    this.state.pagination.total = data.data.totalCount;
                };
                this.setState({
                    dataSource: theArr,
                    pagination: this.state.pagination
                });
            }.bind(this),
        }).always(function () {
            this.setState({
                loading: false
            });
        }.bind(this));
    },
    getInitialState() {
        return {
            searchMore: true,
            selectedRowKeys: [],
            selectedRows: [],
            loading: false,
            orgCodeUrl: [],
			companyLogoUrl: [],
            pagination: {
                defaultCurrent: 1,
                defaultPageSize: 10,
                showQuickJumper: true,
                pageSize: 10,
                onChange: function (page) {
					this.loadData(page);
					this.setState({
                        selectedRowKeys: [],
                    })
                }.bind(this),
                showTotal: function (total) {
                    return '共' + total + '条数据';
                }
            },
            formatPagination: {
                defaultCurrent: 1,
                defaultPageSize: 10,
                showQuickJumper: true,
                pageSize: 10,
                onChange: function (page) {
                    this.loadData(page);
                }.bind(this),
                showTotal: function (total) {
                    return '共' + total + '条数据';
                }
            },
			formatDataSource: [],
            columns: [
                {
                    title: '项目名称',
                    dataIndex: 'name',
                    key: 'bname',
                }, {
                    title: '品类名称',
                    dataIndex: 'cname',
					key: 'cname'
				},
				{
                    title: '上级品类',
                    dataIndex: 'superName',
					key: 'superName'
                },  {
                    title: '业务地区',
                    dataIndex: 'area',
                    key: 'area',
					render: (text,rocard) => { return <div>{rocard.province!=0?<span>{getprovince(rocard.province)+'-'+getprovince(rocard.city)}</span>:'全国'}</div> }
				},
				 {
                    title: '市场价',
                    dataIndex: 'price',
                    key: 'price',
                }, {
                    title: '最低折扣',
                    dataIndex: 'offset',
                    key: 'offset',
                }, {
                    title: '会员价',
                    dataIndex: 'memberPrice',
                    key: 'memberPrice',
                }, {
                    title: '活动价',
                    dataIndex: 'activityPrice',
                    key: 'activityPrice',
                }, {
                    title: '活动生效标识',
                    dataIndex: 'activityFlag',
                    key: 'activityFlag',
                    render: text => { return getGameState(text) }
                }
            ],
            dataSource: [],
        };
	},
	//业务品类列表获取
	topLevel(){
		$.ajax({
            method: "get",
            dataType: "json",
            crossDomain: false,
            url: globalConfig.context + '/api/user/jtBusiness/category/list',
            data: {
                pageNo:  1,
				pageSize: 999,
            },
            success: function (data) {
                let theArr = [],firstData=[];
                if (!data.data || !data.data.list) {
                    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];
                        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//上级品类
							})
						}
                    };
                };
                this.setState({
					categoryList: theArr,
					firstData:firstData
				});
				this.loadData();
            }.bind(this),
        }).always(function () {
            this.setState({
                loading: false
            });
        }.bind(this));
	},
    componentWillMount() {
	   this.topLevel()
    },
	//编辑部门，保存
    edithandleSubmit(e){
		e.preventDefault();
		if(!this.state.name){
			message.warning('请输入项目名称');
			return ;
		}
		if(!this.state.categoryId){
			message.warning('请选择项目业务品类');
			return ;
		}
		if(!(this.state.ProvinceCity.length)){
			message.warning('请选择省份');
			return ;
		}
		if(!(this.state.price)){
			message.warning('请输入正确的市场价');
			return ;
		}
        this.setState({
            loading:true
		})
		let minPictureUrl = [];
        if (this.state.orgCodeUrl.length) {
            let picArr = [];
            this.state.orgCodeUrl.map(function (item) {
                if ( item.response && item.response.data && item.response.data.length ){
                    picArr.push(item.response.data);
                }
            });
            minPictureUrl = picArr.join(",");
		};
		let maxPictureUrl = [];
        if (this.state.companyLogoUrl.length) {
            let picArr = [];
            this.state.companyLogoUrl.map(function (item) {
                if ( item.response && item.response.data && item.response.data.length ){
                    picArr.push(item.response.data);
                }
            });
            maxPictureUrl = picArr.join(",");
		};
        $.ajax({
            method: "post",
            dataType: "json",
            crossDomain: false,
            url: globalConfig.context + "/api/user/jtBusiness/project/update",
            data: {
				id:this.state.id,//业务名称
				name: this.state.name,//业务名称
				categoryId: this.state.categoryId,//业务品类
				price: this.state.price,//市场价
				activityPrice:this.state.activityPrice?this.state.activityPrice:'0',//最低折扣
				memberPrice:this.state.memberPrice?this.state.memberPrice:'0',//会员价
				offset:this.state.offset?this.state.offset:'0',
				activityFlag:this.state.activityFlag,//活动生效标识
				province:this.state.ProvinceCity?this.state.ProvinceCity[0]:'',//是否全国
				city:this.state.ProvinceCity?this.state.ProvinceCity[1]:'',
				introduce:this.state.introduce,
				value:this.state.value,
				minImgUrl:minPictureUrl.length?minPictureUrl:'',
				maxImgUrl:maxPictureUrl.length?maxPictureUrl:'',
				applyConditions:this.state.applyConditions,
            }
        }).done(function (data) {
            if (!data.error.length) {
                message.success('保存成功！');
                this.setState({
                    loading: false,
					editvisible:false
                });
            } else {
                message.warning(data.error[0].message);
            };
            this.loadData(this.state.page)
        }.bind(this));
    	
	},
	detailes(recard){
        $.ajax({
            method: "get",
            dataType: "json",
            crossDomain: false,
            url: globalConfig.context + '/api/user/jtBusiness/project/detail',
            data: {
               id:recard.id
            },
            success: function (data) {
                if (!data.data) {
                    if (data.error && data.error.length) {
                        message.warning(data.error[0].message);
                    };
                } else {
					let thisdata=data.data;
					let ProvinceCityArr=[];
					ProvinceCityArr.push(thisdata.province,thisdata.city)
                    this.setState({
						id:thisdata.id,//业务名称
						name: thisdata.name,//业务名称
						categoryId: thisdata.categoryId,//业务品类
						number:thisdata.number,
						price: thisdata.price,//市场价
						activityPrice:thisdata.activityPrice?thisdata.activityPrice:'',//最低折扣
						memberPrice:thisdata.memberPrice?thisdata.memberPrice:'',//会员价
						offset:thisdata.offset?thisdata.offset:'',
						activityFlag:thisdata.activityFlag?thisdata.activityFlag.toString():'',//活动生效标识
						ProvinceCity:ProvinceCityArr,
						introduce:thisdata.introduce,
						createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
						value:thisdata.value,
						applyConditions:thisdata.applyConditions,
						orgCodeUrl: thisdata.minImgUrl ? splitUrl(thisdata.minImgUrl, ',', globalConfig.avatarHost + '/upload') : [],
						companyLogoUrl:thisdata.maxImgUrl ? splitUrl(thisdata.maxImgUrl, ',', globalConfig.avatarHost + '/upload') : [],
					})
                };
            }.bind(this),
        }).always(function () {
            this.setState({
                loading: false
            });
        }.bind(this));
    },
    //项目列表整行点击
    tableRowClick(record, index) {
        this.state.RowData = record;
		this.setState({
			editvisible:true
		})
		this.detailes(record)
    },
    //左侧图片地址
    getOrgCodeUrl(e) {
		this.setState({ orgCodeUrl: e });
	},
	//右侧图片地址
	getCompanyLogoUrl(e) {
		this.setState({ companyLogoUrl: e });
	},
   
    //新增一个项目，保存
    addhandleSubmit(e){
    	e.preventDefault();	
    	if(!this.state.categoryName){
    		message.warning('请输入项目名称');
    		return false;
    	}
    	if(!this.state.addCid){
    		message.warning('请选择项目品类');
    		return false;
		}
		this.setState({
			loading: true
		}); 
		//上级组织字典
		$.ajax({
			method: "post",
			dataType: "json",
			crossDomain: false,
			url:globalConfig.context + '/api/user/jtBusiness/project/apply',
			data:{
					name:this.state.categoryName,//项目名称
					categoryId:this.state.addCid,
					province:this.state.ProvinceCity?this.state.ProvinceCity[0]:'',//是否全国
					city:this.state.ProvinceCity?this.state.ProvinceCity[1]:''
				}
		}).done(function (data) { 
			this.setState({
				loading: false
			});
			if (!data.error.length) {
				message.success('新增项目成功！'); 
				this.handleCancel();
				this.loadData(this.state.page);
			} else {
				message.warning(data.error[0].message);
			}
		}.bind(this));
	},
    //项目整行删除
    delectRow() {
        let deletedIds = '';
        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
            let rowItem = this.state.selectedRows[idx];
            if (rowItem.id) {
                deletedIds=rowItem.id;
            };
        };
        this.setState({
            selectedRowKeys: [],
            loading: deletedIds.length > 0
        });
        $.ajax({
            method: "get",
            dataType: "json",
            crossDomain: false,
            url: globalConfig.context + "/api/user/jtBusiness/project/delete",
            data: {
                id:deletedIds
            }
        }).done(function (data) {
            if (!data.error.length) {
                message.success('删除成功！');
                this.setState({
                    loading: false,
                });
            } else {
                message.warning(data.error[0].message);
            };
            this.loadData(this.state.page);
        }.bind(this));
    },
    addClick() {
        this.state.RowData = {};
        this.setState({
            visible: true
        });
        this.addReset();
    },
    editClick(e) {
        this.state.RowData = {};
        this.setState({
            editvisible: true
        });
    },
   	handleCancel() {
        this.setState({ visible: false })
    },
    edithandleCancel(e) {
        this.setState({ 
        	editvisible: false 
        });
    },
    search() {
        this.loadData();
    },
    //搜索部分的清零
    reset() {
        this.state.nameSearch = '';//项目名称清零
        this.state.cid = undefined;//品类名称清零
        this.state.ressSearch= undefined;//省市区清零
        this.state.activityFlag = undefined;//活动生效清零
        this.state.status = undefined;//项目状态清零
        this.loadData(); 
    },
    //新增部分的清零
    addReset(){
    	this.state.categoryName='';//项目名称清零
    	this.state.ProvinceCity=undefined;
    	this.state.addCid=undefined;
    	this.state.boutique='';
    },
    //更多搜索的显示与否
    searchSwitch() {
        this.setState({
            searchMore: !this.state.searchMore
        });
    },
    render() {
    	const FormItem = Form.Item
        const rowSelection = {
            selectedRowKeys: this.state.selectedRowKeys,
            onChange: (selectedRowKeys, selectedRows) => {
                this.setState({
                    selectedRows: selectedRows.slice(-1),
                    selectedRowKeys: selectedRowKeys.slice(-1)
                });
            }
        };
         const formItemLayout = {
            labelCol: { span: 8 },
            wrapperCol: { span: 14 },
       };
        const hasSelected = this.state.selectedRowKeys.length > 0;
		const { RangePicker } = DatePicker;
		const categoryList = this.state.categoryList ||[];
		const firstData = this.state.firstData || [];
        return (
            <div className="user-content" >
                <div className="content-title">
	                <div className="user-search">
	                    <Button type="primary" className="addButton" onClick={this.addClick} style={{float:'right',marginRight:'50px'}}>新增项目<Icon type="plus" /></Button>
	                    <Input placeholder="业务项目名称" style={{width:'150px',marginRight:'10px',marginBottom:'10px'}}
	                        value={this.state.nameSearch}
	                        onChange={(e) => { 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> 
	                    <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
	                    <Button onClick={this.reset} style={{marginRight:'10px'}}>重置</Button>
                        <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
	                   			 disabled={!hasSelected} 
	                    		 >删除<Icon type="minus" />
	           			     </Button>
						</Popconfirm>
	                </div>
	                <div className="patent-table">
	                    <Spin spinning={this.state.loading}>
	                        <Table columns={this.state.columns}
	                            dataSource={this.state.dataSource}
	                            rowSelection={rowSelection}
	                            pagination={this.state.pagination}
	                            onRowClick={this.tableRowClick} 
	                            current={this.state.aa}/>
	                    </Spin>
	                </div>
	                 <div className="patent-desc">
	                    <Modal maskClosable={false} visible={this.state.visible}
	                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
	                        width='400px'
	                        title='新增业务项目'                       
	                        footer=''
	                        className="admin-desc-content">
	                         <Form layout="horizontal" onSubmit={this.addhandleSubmit} id="demand-form">
				                <Spin spinning={this.state.loading}>
				                    <div className="clearfix">
				                    	<FormItem
					                            labelCol={{ span: 7 }}
					                        	wrapperCol={{ span: 12 }}
					                            label="业务项目名称" >
				                    	     <Input placeholder="业务项目名称" value={this.state.categoryName} style={{width:'94%'}}
				                                onChange={(e)=>{this.setState({categoryName:e.target.value})}} required="required"/>
				                           		<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
					                    </FormItem>
				                    </div>
				                    <div className="clearfix">
					                   <FormItem  
					                    	labelCol={{ span: 7 }}
					                        wrapperCol={{ span: 12 }}
				                           label="业务品类"
			                               > 
			                                <Select placeholder="请选择业务品类" value={this.state.addCid} onChange={(e)=>{this.setState({addCid:e})}}
				                                notFoundContent="未获取到业务品类列表" style={{width:'94%'}} required="required">
				                                {
													firstData.map(function (item) {
															return <Select.Option key={item.id} >{item.name}</Select.Option>
													})
												}
				                            </Select> 
				                            <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>
			                   		    </FormItem> 
		                   		    </div>
						            <div className="clearfix">
			                   		    <FormItem 
					                           labelCol={{ span: 7 }}
					                           wrapperCol={{ span: 12 }}
					                           label="省-市"
					                          > 
					                            <Cascader options={citySelect()}  value={this.state.ProvinceCity} placeholder="选择市" style={{width:'94%'}}
												onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
												<span style={{color:'red',marginLeft:'5px'}}>*</span>
							            </FormItem>
						             </div>
				                    <FormItem wrapperCol={{ span: 12, offset: 7 }}>
				                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>  
				                        <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'15px'}}>取消</Button>
				                    </FormItem> 
				                </Spin>
				            </Form >
	                    </Modal>
                	 </div>
                	
            		 <div className="patent-desc">
                 	  <Modal	
				      className="customeDetails"				      
			          title="业务项目"
			          width='1000px'
			          visible={this.state.editvisible}
			          onOk={this.edithandleCancel}
			          onCancel={this.edithandleCancel}
			          footer=''
			        >				    
				    
					<Form layout="horizontal" onSubmit={this.edithandleSubmit} id="demand-form">
						<Spin spinning={this.state.loading}>
							<div className="clearfix" style={{paddingLeft:'60px'}}>
								<FormItem className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
										label={<span><strong style={{color:'red'}}>*</strong>项目名称</span>} >
										<Input placeholder="项目名称" value={this.state.name} 
										onChange={(e)=>{this.setState({name:e.target.value})}}/>
								</FormItem>
								<FormItem  className="half-item"
									labelCol={{ span: 4 }}
									wrapperCol={{ span: 12 }}
									label={<span><strong style={{color:'red'}}>*</strong>业务品类</span>}
									> 
									<Select placeholder="请选择业务品类" value={this.state.categoryId} onChange={(e)=>{this.setState({categoryId:e})}}
										notFoundContent="未获取到业务品类列表">
										{
											firstData.map(function (item) {
													return <Select.Option key={item.id} >{item.name}</Select.Option>
											})
										}
									</Select> 
								</FormItem>
							</div>
							<div className="clearfix" style={{paddingLeft:'60px'}}>
								<FormItem className="half-item" 
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
										label={<span><strong style={{color:'red'}}>*</strong>省-市</span>}
										> 
										<Cascader options={citySelect()}  value={this.state.ProvinceCity} placeholder="选择市"
										onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
								</FormItem>
								</div>
								<div className="clearfix" style={{paddingLeft:'60px'}}>
									<FormItem className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
											label={<span><strong style={{color:'red'}}>*</strong>市场价</span>}
										>
										<InputNumber placeholder="市场价" value={this.state.price} style={{width:120}}
										onChange={(e)=>{this.setState({price:e})}} required="required"/>
										<span style={{marginLeft:10}}>万元</span>
									</FormItem>
									<FormItem className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
											label="活动价"
									>
									<InputNumber placeholder="活动价" value={this.state.activityPrice} style={{width:120}}
										onChange={(e)=>{this.setState({activityPrice:e})}} min={0} max={999999} step={0.01}/>
										<span style={{marginLeft:10}}>万元</span>
									</FormItem>
									<FormItem className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
											label="最低折扣"
									>
									<InputNumber placeholder="最低折扣(如:0.5)" value={this.state.offset} style={{width:'50%'}}
									onChange={(e)=>{this.setState({offset:e})}} min={0} max={1} step={0.01}/>
									</FormItem>
									<FormItem className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
											label="会员价"
									>
									<InputNumber placeholder="会员价" value={this.state.memberPrice} style={{width:'120px'}}
										onChange={(e)=>{this.setState({memberPrice:e})}} min={0} max={999999} step={0.01}/>
										<span style={{marginLeft:10}}>万元</span>
									</FormItem>
									<FormItem  className="half-item"
										labelCol={{ span: 4 }}
										wrapperCol={{ span: 12 }}
										label="活动生效"
										> 
										<Select placeholder="活动生效" value={this.state.activityFlag} style={{width:'94%'}}
										onChange={(e)=>{this.setState({activityFlag:e})}}> 
												<Select.Option key="0" >无效</Select.Option>
												<Select.Option key='1' >有效</Select.Option>
										</Select>
									</FormItem>
								<FormItem  className="half-item"
									labelCol={{ span: 4 }}
									wrapperCol={{ span: 12 }}
									label="创建时间"
									>
									<span style={{width:'94%'}}>{this.state.createTime}</span>
								</FormItem>
							</div>
							<div className="clearfix">
								<FormItem
									labelCol={{ span: 4 }}
									wrapperCol={{ span: 12 }}
									label="业务项目服务内容" >					                        
									<Input type="textarea" rows={4} placeholder="业务项目服务内容" value={this.state.introduce}
										onChange={(e) => { this.setState({ introduce: e.target.value }) }}/>					                           
								</FormItem>
							</div>   
							<div className="clearfix">
								<FormItem
									labelCol={{ span: 4 }}
									wrapperCol={{ span: 12 }}
									label="业务项目价值及作用" >					                        
									<Input type="textarea" rows={4} placeholder="业务项目价值及作用" value={this.state.value}
										onChange={(e) => { this.setState({ value: e.target.value }) }}/>					                           
								</FormItem>
							</div>   
							<div className="clearfix">
								<FormItem
									labelCol={{ span: 4 }}
									wrapperCol={{ span: 12 }}
									label="业务项目客户基本条件" >					                        
									<Input type="textarea" rows={4} placeholder="业务项目客户基本条件" value={this.state.applyConditions}
										onChange={(e) => { this.setState({ applyConditions: e.target.value }) }}/>					                           
								</FormItem>
							</div> 
							<div className="clearfix pictures">
								<FormItem className="half-item"
									labelCol={{ span: 8 }}
									wrapperCol={{ span: 10 }}
									label="业务项目图标(小)" >
									<PicturesWall
										pictureSign="business_project_min_picture"
										fileList={this.getOrgCodeUrl}
										pictureUrl={this.state.orgCodeUrl} />
										<p>图片建议：图片要清晰。(35*35)</p>
								</FormItem>
								<FormItem className="half-item"
									labelCol={{ span: 8 }}
									wrapperCol={{ span: 12 }}
									label="业务项目图标(大)" > 
									<PicturesWall
										pictureSign="business_project_max_picture"
										fileList={this.getCompanyLogoUrl}
										pictureUrl={this.state.companyLogoUrl} />
										<p>图片建议：图片要清晰。(200*200)</p>
								</FormItem>
							</div> 
							<Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'190px',marginBottom:'20px',marginTop:'20px'}}>保存</Button>  
							<Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>
						</Spin>
					</Form>		
                    </Modal>
            	 </div>	 
               </div>
            </div>
        );
    }
}));

export default BusinessProject;
