| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671 | import React from 'react';import ReactDom from 'react-dom';import ajax from 'jquery/src/ajax/xhr.js';import $ from 'jquery/src/ajax';import moment from 'moment';import '../content.less';import { citySelect,provinceList,areaSelect,provinceSelect} from '../../../NewDicProvinceListAll';import { Form,Radio, Icon, Button, Input,Tabs, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm,TimePicker,Cascader } from 'antd';import {categoryState,industry,conditionOrganization,gameState} from '../../../dataDic.js';import {getCategoryState,getGameState,splitUrl,getprovince} from '../../../tools.js';const TabPane = Tabs.TabPane;//图片组件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/admin/ProjectSize/uploadPicture"}                    data={{ 'sign': this.props.pictureSign }}                    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, apiUrl) {        this.state.data = [];        this.setState({            loading: true,            ispage:pageNo,        });        let nameText=this.state.SuperArr;		let superText=(this.state.cid)?nameText[parseInt(this.state.cid)].id:"";        let isCountry='';        let pro='';        let city='';        let dis='';       	if(this.state.ressSearch==undefined){       	}else{       		switch(parseInt(this.state.ressSearch.length)){       		case 1:pro=this.state.ressSearch[0];break;       		case 2:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];break;       		case 3:pro=this.state.ressSearch[0];city=this.state.ressSearch[1];dis=this.state.ressSearch[2];break;       		}       	}        if(pro===0){       		isCountry=1;       		pro='';       	}        $.ajax({            method: "post",            dataType: "json",            crossDomain: false,            url: globalConfig.context + '/api/admin/ProjectSize/listProject',            data: {                pageNo: pageNo || 1,                pageSize: this.state.pagination.pageSize,                bname:this.state.bname, //项目名称                cid:superText, //品类名称                country:isCountry, //是否全国                province:pro, //省                city:city, //市                district:dis, //区                activityFlag:this.state.activityFlag, //活动生效标识                status:this.state.status, //项目状态            },            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];                    	let ProvinceCity=[];                    	let isCountry='';                    	if(thisdata.country==1){                    		isCountry="全国";                    	}else{                    		if(thisdata.city==null||thisdata.city==''){                    			isCountry+=getprovince(parseInt(thisdata.province));                    		}else if(thisdata.district==null||thisdata.district==''){                    			isCountry+=getprovince(parseInt(thisdata.province))+'-';		                		isCountry+=getprovince(parseInt(thisdata.city));                    		}else{                    			isCountry+=getprovince(parseInt(thisdata.province))+'-';			                	isCountry+=getprovince(parseInt(thisdata.city))+'-';			                	isCountry+=getprovince(parseInt(thisdata.district));                    		}                    	}                        theArr.push({                            key: i,                            id:thisdata.id,//业务名称                            bname: thisdata.bname,//业务名称                            cname: thisdata.cname,//业务品类                            area:isCountry?isCountry:ProvinceCity,                            price: thisdata.price,//市场价                            offset:thisdata.offset,//最低折扣                            memberPrice:thisdata.memberPrice,//会员价                            activityPrice:thisdata.activityPrice,//活动价                            activityFlag:thisdata.activityFlag,//活动生效标识                            status: thisdata.status,//项目状态                            arrProvinceCity:ProvinceCity,                        });                    };                                 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));    },    //项目规格列表    formatLoadData(pageNo, apiUrl){    	this.state.data = [];        this.setState({            loading: true,        });        $.ajax({            method: "get",            dataType: "json",            crossDomain: false,            url: globalConfig.context + '/api/admin/ProjectSize/listProjectSize',            data: {            	pageNo: pageNo || 1,                pageSize: this.state.formatPagination.pageSize,                pid:this.state.editId,            },            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];                        theArr.push({                            key: i,                            formatId:thisdata.id,//规格ID                            formatPname: thisdata.pname,//规格名称                            formatBname: thisdata.bname,//项目品类                            formatPrice: thisdata.price,//市场价                            formatOffset: thisdata.offset,//最低折扣                            formatActivityPrice: thisdata.activityPrice,//活动价                            formatActivityFlag:thisdata.activityFlag,//活动生效标识                            formatMemberPrice:thisdata.memberPrice,//会员价                            formatStatus:thisdata.status,//会员价                        });                    };                    this.state.formatPagination.current = data.data.pageNo;                    this.state.formatPagination.total = data.data.totalCount;                };                this.setState({                    formatDataSource: theArr,                    formatPagination: this.state.formatPagination                });            }.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);                }.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 + '条数据';                }            },            ContactsLists: [{					title: '业务项目名称',					dataIndex: 'formatBname',					key: 'formatBname',				}, {					title: '规格名称',					dataIndex: 'formatPname',					key: 'formatPname',				}, {					title: '市场价',					dataIndex: 'formatPrice',					key: 'formatPrice',				}, {					title: '最低折扣',					dataIndex: 'formatOffset',					key: 'formatOffset',				}, {					title: '会员价',					dataIndex: 'formatMemberPrice',					key: 'formatMemberPrice',				}, {					title: '活动价',					dataIndex: 'formatActivityPrice',					key: 'formatActivityPrice',				}, {					title: '活动生效标识',					dataIndex: 'formatActivityFlag',					key: 'formatActivityFlag',					render: text => { return getGameState(text) }				},{					title: '状态',					dataIndex: 'formatStatus',					key: 'formatStatus',					render: text => { return getCategoryState(text.toString()) }				}			],			formatDataSource: [],            columns: [                {                    title: '项目名称',                    dataIndex: 'bname',                    key: 'bname',                }, {                    title: '业务品类',                    dataIndex: 'cname',                    key: 'cname',                },  {                    title: '业务地区',                    dataIndex: 'area',                    key: 'area',//                  render: text => { return getprovince(text); }                }, {                    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) }                },{                    title: '业务状态',                    dataIndex: 'status',                    key: 'status',                    render: text => { return getCategoryState(text) }                }            ],            dataSource: [],        };    },    componentWillMount() {       this.selectSuperId();    },    //获取上级品类    selectSuperId() {      	this.state.data = []         $.ajax({                method: "get",                dataType: "json",                crossDomain: false,                url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",                data:{                  flag:0,                },                success: function (data) {                 		let theArr = [];					    let thedata=data.data;					    if (!thedata) {		                    if (data.error && data.error.length) {		                        message.warning(data.error[0].message);		                    };			                    thedata = {}; 		              };   					    var contactIds=[];				        	for(var i=0;i<data.data.length;i++){		                    let theData = data.data[i];		                    theArr.push(		                        <Select.Option value={i.toString()} key={theData.cname}>{theData.cname}</Select.Option>		                    );		                };						this.setState({								SuperArr:thedata,		                    contactsOption: theArr, 		                    orderStatusOptions:data.data,	                    });	                    					}.bind(this),				}).always(function () {				this.loadData(this.state.ispage);	            this.setState({	                loading: false	            });	        }.bind(this));	},	//编辑部门,保存    edithandleSubmit(e){    	e.preventDefault();	    	let offsetText;    	if(this.state.editOffset){    		if(this.state.editOffset>10||this.state.editOffset<0){    		message.warning('最低折扣请输入0到10之间的数字');    		return false;    		}else{    			offsetText=this.state.editOffset;    		}    	}    	this.props.form.validateFields((err, values) => {			let theorgCodeUrl = [];			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);					}				});				theorgCodeUrl = picArr.join(",");			};			let thecompanyLogoUrl = [];			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);					}				});				thecompanyLogoUrl = picArr.join(",");			};						if(!err) {				this.setState({					loading: true				});				let nameText=this.state.SuperArr				let superText=(this.state.editCname.length==1)?nameText[parseInt(this.state.editCname)].id:this.state.editCid;				let isCountry=0;		    	let pro='';		        let city='';		        let dis='';		        if(this.state.ProvinceCity==undefined||this.state.ProvinceCity.length==0){		       		message.warning('请选择项目有效范围');		       		this.setState({		                loading: false		            });		    		return false;		       	}else{		       		switch(parseInt(this.state.ProvinceCity.length)){		       		case 1:pro=this.state.ProvinceCity[0];break;		       		case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;		       		case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;		       		}		       	}		    	if(pro==0){		    		isCountry=1;		    		pro='';		    	}		        $.ajax({		            method: "post",		            dataType: "json",		            crossDomain: false,		            url:globalConfig.context + '/api/admin/ProjectSize/updateProject',		            data:{		            	id:this.state.editId,//项目ID		            	cid:superText,//项目业务品类		            	bname:this.state.editName,//业务项目名称		            	price:this.state.editPrice,//市场价		            	firstPayment:this.state.firstPayment,//首付金额		            	offset:offsetText,//最低折扣		            	activityPrice:this.state.editActivityPrice,//活动价		            	activityFlag:this.state.editActivityFlag,//活动生效标识		            	memberPrice:this.state.editMemberPrice,//项目ID						status:this.state.editStatus,//项目状态 						type: this.state.typeStatus,//项目分类		            	country:isCountry,//是否全国		            	province:pro?pro:'',//省		            	city:city?city:'',//市		            	district:dis?dis:'',//区		            	minLogo:theorgCodeUrl,		            	maxLogo:thecompanyLogoUrl,		            	introduce:this.state.editIntroduce,//项目介绍 		            	projectUrl:this.state.editProjectUrl,//项目地址		            	valueEffect:this.state.editValueEffect,//项目价值及作用		            	clientSize:this.state.editClientSize,//项目基本条件 		            	boutique:this.state.editBoutique,		            }		        }).done(function (data) { 		            this.setState({		                loading: false		            });		            if (!data.error.length) {		                message.success('保存成功!'); 		                this.edithandleCancel();		                this.selectSuperId();		            } else {		                message.warning(data.error[0].message);		            }		        }.bind(this));			}		})     },    //规格列表整行点击    formatTableRowClick(record, index){    	this.editformatClick();    	this.state.RowData = record;        this.setState({            selectedRowKeys:[],            formatId:record.formatId,//规格名称        	formatPname:record.formatPname,//规格名称        	formatPrice:record.formatPrice,//市场价        	formatOffset:record.formatOffset,//最低折扣        	formatActivityPrice:record.formatActivityPrice,//活动价        	formatActivityFlag:record.formatActivityFlag,//活动生效标识        	formatMemberPrice:record.formatMemberPrice,//会员价        	formatStatus:record.formatStatus.toString(),//项目状态         });    },    //项目列表整行点击    tableRowClick(record, index) {    	this.selectSuperId();        this.state.RowData = record;        this.setState({        	callnub:'1',            editvisible: true,            selectedRowKeys:[],        	rowId:record.businessId,        });         $.ajax({            method: "get",            dataType: "json",            crossDomain: false,            url: globalConfig.context +"/api/admin/ProjectSize/orgProject" ,            data: {               id: record.id            },            success: function (data) {                let theArr = [];                let ProvinceCity=[];                let thisdata = data.data;                if (!data) {                    if (data.error && data.error.length) {                        message.warning(data.error[0].message);                    };                } else {                	if(thisdata.country==1){                		ProvinceCity.push(0);                	}else{                		ProvinceCity.push(parseInt(thisdata.province));	                	ProvinceCity.push(parseInt(thisdata.city));	                	ProvinceCity.push(parseInt(thisdata.district));                	}					let str = ""					if(thisdata.type == 0) {						str = "通用"					}else if(thisdata.type == 1) {						str = "专利"					}else if(thisdata.type == 2) {						str = "软著"					}                    theArr.push({                         editId: thisdata.id,//每一条记录的ID                         editName:thisdata.bname,//项目名称                         editCname: thisdata.cname,//项目分类                         editCid: thisdata.cid,//项目分类                         editCountry: thisdata.country,//是否全国                         editProvince: thisdata.province,//省                         editCity: thisdata.city,//市                         editDistrict: thisdata.district,//区                         editPrice: thisdata.price,//市场价                         firstPayment:thisdata.firstPayment,//首付金额                         editActivityPrice: thisdata.activityPrice,//活动价                         editOffset: thisdata.offset,//最低折扣                         editMemberPrice: thisdata.memberPrice,//会员价                         editActivityFlag:thisdata.activityFlag,//活动生效标识						 editStatus:thisdata.status,//品类状态 						 typeStr: str,						 typeStatus: thisdata.type,                         editCreateId:thisdata.createName,//创建人                         editTime:thisdata.createTimeFormattedDate,//创建时间                         editIntroduce:thisdata.introduce,//服务内容                         editProjectUrl:thisdata.projectUrl,//项目地址                         editValueEffect:thisdata.valueEffect,//价值及作用                         editClientSize:thisdata.clientSize,//基本条件                         editBoutique:thisdata.boutique,//是否精品                         orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],						 cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],                    }); 				};				let str = ""					if(thisdata.type == 0) {						str = "通用"					}else if(thisdata.type == 1) {						str = "专利"					}else if(thisdata.type == 2) {						str = "软著"					}                this.setState({                  editId: thisdata.id, //每一条记录的ID                  editName: thisdata.bname, //项目名称                  editCname: thisdata.cname, //项目分类                  editCid: thisdata.cid, //项目分类                  editCountry: thisdata.country, //是否全国                  editProvince: thisdata.province, //省                  editCity: thisdata.city, //市                  editDistrict: thisdata.district, //区                  editPrice: thisdata.price, //市场价                  firstPayment: thisdata.firstPayment,                  editActivityPrice: thisdata.activityPrice, //活动价                  editOffset: thisdata.offset, //最低折扣                  editMemberPrice: thisdata.memberPrice, //会员价                  editActivityFlag: thisdata.activityFlag, //活动生效标识                  editStatus: thisdata.status, //品类状态                  typeStr: str,                  typeStatus: thisdata.type,                  editCreateId: thisdata.createName, //创建人                  editTime: thisdata.createTimeFormattedDate, //创建时间                  editIntroduce: thisdata.introduce, //服务内容                  editProjectUrl: thisdata.projectUrl, //项目地址                  editValueEffect: thisdata.valueEffect, //价值及作用                  editClientSize: thisdata.clientSize, //基本条件                  editBoutique: thisdata.boutique, //是否精品                  orgCodeUrl: thisdata.minLogo                    ? splitUrl(                        thisdata.minLogo,                        ",",                        globalConfig.avatarHost + "/upload"                      )                    : [],                  companyLogoUrl: thisdata.maxLogo                    ? splitUrl(                        thisdata.maxLogo,                        ",",                        globalConfig.avatarHost + "/upload"                      )                    : [],                  editDataSource: theArr,                  ProvinceCity: ProvinceCity                });            }.bind(this),        }).always(function () {            this.setState({                loading: false            });        }.bind(this));    },    //左侧图片地址    getOrgCodeUrl(e) {		this.setState({ orgCodeUrl: e });	},	//右侧图片地址	getCompanyLogoUrl(e) {		this.setState({ companyLogoUrl: e });	},    //编辑一个规格,保存    editformathandleSubmit(e){    	e.preventDefault();    	let offsetText;    	if(this.state.formatOffset){    		if(this.state.formatOffset>10||this.state.formatOffset<0){    		message.warning('最低折扣请输入0到10之间的数字');    		return false;    		}else{    			offsetText=this.state.formatOffset;    		}    	}    	this.props.form.validateFields((err, values) => {                                             if (!err) {                this.setState({                    loading: true                });                 $.ajax({                    method: "post",                    dataType: "json",                    crossDomain: false,                    url:globalConfig.context + '/api/admin/ProjectSize/orgProjectSize',                    data:{                    	id:this.state.formatId,//项目ID                    	pname:this.state.formatPname,//规格名称                    	price:this.state.formatPrice,//市场价                    	offset:offsetText,//最低折扣                    	activityPrice:this.state.formatActivityPrice,//活动价                    	activityFlag:this.state.formatActivityFlag,//活动生效标识                    	memberPrice:this.state.formatMemberPrice,//会员价                    	status:this.state.formatStatus,//项目状态                     	}                }).done(function (data) {                     this.setState({                        loading: false                    });                    if (!data.error.length) {                        message.success('修改规格成功!');                         this.formatLoadData();                        this.editformathandleCancel();                    } else {                        message.warning(data.error[0].message);                    }                }.bind(this));            }        });    },    //新增一个规格,保存    formathandleSubmit(e){    	e.preventDefault();    	let offsetText;    	if(this.state.formatOffset){    		if(this.state.formatOffset>10||this.state.formatOffset<0){    		message.warning('最低折扣请输入0到10之间的数字');    		return false;    		}else{    			offsetText=this.state.formatOffset;    		}    	}    	this.props.form.validateFields((err, values) => {                                             if (!err) {                this.setState({                    loading: true                });                 $.ajax({                    method: "post",                    dataType: "json",                    crossDomain: false,                    url:globalConfig.context + '/api/admin/ProjectSize/addProjectSize',                    data:{                    	pid:this.state.editId,//项目ID                    	pname:this.state.formatPname,//规格名称                    	price:this.state.formatPrice,//市场价                    	offset:offsetText,//最低折扣                    	activityPrice:this.state.formatActivityPrice,//活动价                    	activityFlag:this.state.formatActivityFlag,//活动生效标识                    	memberPrice:this.state.formatMemberPrice,//会员价                    	status:this.state.formatStatus,//项目状态                     	}                }).done(function (data) {                     this.setState({                        loading: false                    });                    if (!data.error.length) {                        message.success('新增规格成功!');                         this.formathandleCancel();                        this.formatLoadData();                    } else {                        message.warning(data.error[0].message);                    }                }.bind(this));            }        });    },    //新增一个项目,保存    addhandleSubmit(e){    	e.preventDefault();	    	if(!this.state.categoryName){    		message.warning('请输入项目名称');    		return false;    	}    	if(!this.state.addCid){    		message.warning('请选择项目品类');    		return false;    	}    	let isCountry=0;    	let pro='';        let city='';        let dis='';       	if(this.state.ProvinceCity==undefined){       		message.warning('请选择项目有效范围');    		return false;       	}else{       		switch(parseInt(this.state.ProvinceCity.length)){       		case 1:pro=this.state.ProvinceCity[0];break;       		case 2:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];break;       		case 3:pro=this.state.ProvinceCity[0];city=this.state.ProvinceCity[1];dis=this.state.ProvinceCity[2];break;       		}       	}       	if(pro==0){       		isCountry=1;       		pro='';       	}		this.props.form.validateFields((err, values) => {                                             if (!err) {                this.setState({                    loading: true                });                 //上级组织字典                let nameText=this.state.SuperArr;                let superText=nameText[parseInt(this.state.addCid)].id;                $.ajax({                    method: "post",                    dataType: "json",                    crossDomain: false,                    url:globalConfig.context + '/api/admin/ProjectSize/addProject',                    data:{                    	bname:this.state.categoryName,//项目名称                    	cid:superText,//品类类ID                    	boutique:this.state.boutique?this.state.boutique:'0',                    	country:isCountry,//是否全国                    	province:pro,//省                    	city:city,//市                    	district:dis,//区                    	}                }).done(function (data) {                     this.setState({                        loading: false                    });                    if (!data.error.length) {                        message.success('新增项目成功!');                         this.handleCancel();                        this.selectSuperId();                    } 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/admin/ProjectSize/deleteProject",            data: {                id:deletedIds            }        }).done(function (data) {            if (!data.error.length) {                message.success('删除成功!');                this.setState({                    loading: false,                });            } else {                message.warning(data.error[0].message);            };            this.selectSuperId();        }.bind(this));    },    //项目整行停用    blockRow() {        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/admin/ProjectSize/stopProject",            data: {                id:deletedIds            }        }).done(function (data) {            if (!data.error.length) {                message.success('该项目已成功停用!');                this.setState({                    loading: false,                });            } else {                message.warning(data.error[0].message);            };            this.selectSuperId();        }.bind(this));    },    //规格整行删除    delectRowSize() {        let deletedIds = '';        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {            let rowItem = this.state.selectedRows[idx];            if (rowItem.formatId) {                deletedIds=rowItem.formatId;            };        };        this.setState({            selectedRowKeys: [],            loading: deletedIds.length > 0        });        $.ajax({            method: "get",            dataType: "json",            crossDomain: false,            url: globalConfig.context + "/api/admin/ProjectSize/deleteProjectSize",            data: {                id: deletedIds            }        }).done(function (data) {            if (!data.error.length) {                message.success('删除成功!');                this.setState({                    loading: false,                });            } else {                message.warning(data.error[0].message);            };            this.formatLoadData();        }.bind(this));    },    //规格整行停用    blockRowSize() {        let deletedIds = '';        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {            let rowItem = this.state.selectedRows[idx];            if (rowItem.formatId) {                deletedIds=rowItem.formatId;            };        };        this.setState({            selectedRowKeys: [],            loading: deletedIds.length > 0        });        $.ajax({            method: "get",            dataType: "json",            crossDomain: false,            url: globalConfig.context + "/api/admin/ProjectSize/stopProjectSize",            data: {                id: deletedIds            }        }).done(function (data) {            if (!data.error.length) {                message.success('该项目已成功停用!');                this.setState({                    loading: false,                });            } else {                message.warning(data.error[0].message);            };            this.formatLoadData();        }.bind(this));    },    addClick() {        this.state.RowData = {};        this.setState({            visible: true        });        this.addReset();    },    editClick(e) {        this.state.RowData = {};        this.setState({            editvisible: true        });    },    formatClick(e) {    	this.formatReset();        this.state.RowData = {};        this.setState({            formatvisible: true        });    },    editformatClick(e) {        this.state.RowData = {};        this.setState({            editformatvisible: true        });    },   	handleCancel() {        this.setState({ visible: false })    },    edithandleCancel(e) {        this.setState({         	editvisible: false         });    },    formathandleCancel(e) {        this.setState({         	formatvisible: false         });    },    editformathandleCancel(e) {        this.setState({         	editformatvisible: false         });    },    search() {        this.loadData();    },    //搜索部分的清零    reset() {        this.state.bname = '';//项目名称清零        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='';    },    //规格新增清零    formatReset() {        this.state.formatPname = '';//规格名称清零        this.state.formatPrice = '';//市场价清零        this.state.formatOffset = '';//最低折扣清零        this.state.formatActivityPrice = '';//活动价清零        this.state.formatMemberPrice = '';//会员价清零        this.state.formatActivityFlag = undefined;//活动生效标识清零        this.state.formatStatus= undefined;//项目状态清零        this.formatLoadData();     },    //详情tab切换数据处理	callback(e) {		this.setState({			callnub: e,		})		if(e == 1) {					}		if(e == 2) {			this.formatLoadData();		}	},    //更多搜索的显示与否    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 { getFieldDecorator } = this.props.form;        const hasSelected = this.state.selectedRowKeys.length > 0;        const { RangePicker } = DatePicker;                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.bname}	                        onChange={(e) => { this.setState({ bname: e.target.value }); }} />	                    <Select placeholder="业务品类"                            style={{ width:'200px',marginRight:'10px' }}                            value={this.state.cid}                            onChange={(e) => { this.setState({ cid: e }) }} notFoundContent="未获取到上级品类列表">                            {this.state.contactsOption}		                </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>						<Popconfirm title="是否停用?" onConfirm={this.blockRow} okText="是" cancelText="否">						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:'none'}}	                   			 disabled={!hasSelected} 	                    		 >停用<Icon type="minus" />	           			     </Button>						</Popconfirm>						<span style={{marginRight:'20px'}}>更多搜索    <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>	                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {display: 'block'}}>	                    	<span style={{marginRight:'10px',marginBottom:'10px'}}>		                     	<Cascader options={provinceSelect()}  value={this.state.ressSearch} placeholder="选择省份"	    						onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />	                                     		</span>                    		<span style={{marginRight:'10px',marginBottom:'10px'}}>                   		                     	<Cascader options={citySelect()}  value={this.state.ressSearch} placeholder="选择城市"	    						onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />	                                     		</span>	                    	<span style={{marginRight:'10px'}}>		                     	<Cascader options={areaSelect()}  value={this.state.ressSearch} placeholder="选择地区"	    						onChange={(e,pre) => { this.setState({ ressSearch: e }) }} />	                                     		</span>		                    <Select placeholder="活动生效标识"		                            style={{width:'150px',marginRight:'10px',marginBottom:'10px'}}		                            value={this.state.activityFlag}		                            onChange={(e) => { this.setState({ activityFlag: e }) }}>		                            <Select.Option value="0" >有效</Select.Option>		                            <Select.Option value="1" >无效</Select.Option>		                    </Select>		                    <Select placeholder="项目状态"		                            style={{width:'150px',marginRight:'10px'}}		                            value={this.state.status}		                            onChange={(e) => { this.setState({ status: e }) }}>		                            <Select.Option value="0" >正常</Select.Option>		                            <Select.Option value="1" >停用</Select.Option>		                    </Select>	                    </div>		                </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 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">				                                {this.state.contactsOption}				                            </Select> 				                            <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>			                   		    </FormItem>		                   		    </div>		                   		    <div className="clearfix">					                    <FormItem  					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}				                           label="是否精品"			                               > 			                               <Radio.Group value={this.state.boutique} onChange={(e) => {						                    this.setState({ boutique: e.target.value })						                    }}>						                        <Radio value={1}>精品</Radio>						                        <Radio value={0}>非精品</Radio>						                	</Radio.Group>			                   		    </FormItem>		                   		    </div>	                    			<div className="clearfix">			                   		    <FormItem 					                           labelCol={{ span: 7 }}					                           wrapperCol={{ span: 12 }}					                           label="省"					                          > 					                            <Cascader options={provinceSelect()}  value={this.state.ProvinceCity} placeholder="选择省" style={{width:'94%'}}												onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />												<span 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>						             <div className="clearfix">			                   		    <FormItem 					                           labelCol={{ span: 7 }}					                           wrapperCol={{ span: 12 }}					                           label="省-市-区"					                          > 					                            <Cascader options={areaSelect()}  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 maskClosable={false} visible={this.state.formatvisible}	                        onOk={this.checkPatentProcess} onCancel={this.formathandleCancel}	                        width='400px'	                        title='新增项目规格'                       	                        footer=''	                        className="admin-desc-content">	                         <Form horizontal onSubmit={this.formathandleSubmit} id="demand-form">				                <Spin spinning={this.state.loading}>				                    <div className="clearfix">				                    	 <FormItem  						                    labelCol={{ span: 7 }}						                    wrapperCol={{ span: 12 }}						                    label="项目名称"					                        >					                        <span style={{width:'94%'}}>{this.state.editName}</span>					                     </FormItem>				                    	 <FormItem					                            labelCol={{ span: 7 }}					                        	wrapperCol={{ span: 12 }}					                            label="规格名称" >				                    	     <Input placeholder="规格名称" value={this.state.formatPname} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatPname:e.target.value})}} required="required"/>				                           		<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>					                     </FormItem>							             <FormItem					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="市场价"				                            >			                                <Input placeholder="市场价" value={this.state.formatPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="活动价"				                            >			                                <Input placeholder="活动价" value={this.state.formatActivityPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatActivityPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="最低折扣"				                            >			                                <Input placeholder="最低折扣" value={this.state.formatOffset} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatOffset:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="会员价"				                            >			                                <Input placeholder="会员价" value={this.state.formatMemberPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatMemberPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem  					                         	labelCol={{ span: 7 }}						                        wrapperCol={{ span: 12 }}					                           	label="活动生效"					                         > 					                          <Select placeholder="活动生效" value={this.state.formatActivityFlag} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatActivityFlag:e})}}> 				                                {				                                    gameState.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </FormItem>				                   		  <FormItem 					                         	labelCol={{ span: 7 }}						                        wrapperCol={{ span: 12 }}					                           	label="项目状态"					                         > 					                          <Select placeholder="项目状态" value={this.state.formatStatus} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatStatus:e})}}> 				                                {				                                    conditionOrganization.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </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.formathandleCancel} style={{marginLeft:'15px'}}>取消</Button>				                    </FormItem> 				                </Spin>				            </Form >	                    </Modal>                	 </div>                	 <div className="patent-desc">	                    <Modal maskClosable={false} visible={this.state.editformatvisible}	                        onOk={this.checkPatentProcess} onCancel={this.editformathandleCancel}	                        width='400px'	                        title='编辑项目规格'                       	                        footer=''	                        className="admin-desc-content">	                         <Form horizontal onSubmit={this.editformathandleSubmit} id="demand-form">				                <Spin spinning={this.state.loading}>				                    <div className="clearfix">				                    	<FormItem					                            labelCol={{ span: 7 }}					                        	wrapperCol={{ span: 12 }}					                            label="规格名称" >				                    	     <Input placeholder="规格名称" value={this.state.formatPname} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatPname: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="创建人"					                        >					                        <span style={{width:'94%'}}>{this.state.editCreateId}</span>					                      </FormItem>							             <FormItem					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="市场价"				                            >			                                <Input placeholder="市场价" value={this.state.formatPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="活动价"				                            >			                                <Input placeholder="活动价" value={this.state.formatActivityPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatActivityPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="最低折扣"				                            >			                                <Input placeholder="最低折扣" value={this.state.formatOffset} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatOffset:e.target.value})}}/>						                 </FormItem>						                 <FormItem 					                    	labelCol={{ span: 7 }}					                        wrapperCol={{ span: 12 }}					                         label="会员价"				                            >			                                <Input placeholder="会员价" value={this.state.formatMemberPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({formatMemberPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem  					                         	labelCol={{ span: 7 }}						                        wrapperCol={{ span: 12 }}					                           	label="活动生效"					                         > 					                          <Select placeholder="活动生效" value={this.state.formatActivityFlag} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatActivityFlag:e})}}> 				                                {				                                    gameState.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </FormItem>				                   		  <FormItem 					                         	labelCol={{ span: 7 }}						                        wrapperCol={{ span: 12 }}					                           	label="项目状态"					                         > 					                          <Select placeholder="项目状态" value={this.state.formatStatus} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({formatStatus:e})}}> 				                                {				                                    conditionOrganization.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </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.editformathandleCancel} 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=''			        >				    				     <Tabs defaultActiveKey="1" onChange={this.callback} activeKey={this.state.callnub}>					    <TabPane tab="业务项目基本资料" key="1">					        <Form 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="项目名称" >				                    	     <Input placeholder="项目名称" value={this.state.editName} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({editName:e.target.value})}} required="required"/>				                           		<span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>					                    </FormItem>					                    <FormItem  className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}				                           label="业务品类"			                               > 			                                <Select placeholder="请选择业务品类" value={this.state.editCname} onChange={(e)=>{this.setState({editCname:e})}}				                                notFoundContent="未获取到业务品类列表" style={{width:'94%'}} required="required">				                                {this.state.contactsOption}				                            </Select> 				                            <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span>			                   		    </FormItem>		                   		    </div>	                    			<div className="clearfix" style={{paddingLeft:'60px'}}>			                   		     <FormItem className="half-item"						                           labelCol={{ span: 4 }}						                           wrapperCol={{ span: 12 }}						                           label="省"						                          > 						                            <Cascader options={provinceSelect()}  value={this.state.ProvinceCity} placeholder="选择省" style={{width:'94%'}}													onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />													<span style={{color:'red',marginLeft:'5px'}}>*</span>								         </FormItem>			                   		    <FormItem className="half-item" 					                           labelCol={{ span: 4 }}					                           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>			                   		    <FormItem className="half-item" 					                           labelCol={{ span: 4 }}					                           wrapperCol={{ span: 12 }}					                           label="省-市-区"					                          > 					                            <Cascader options={areaSelect()}  value={this.state.ProvinceCity} placeholder="选择区" style={{width:'94%'}}												onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />												<span style={{color:'red',marginLeft:'5px'}}>*</span>							            </FormItem>							            <FormItem  className="half-item" 					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}				                           label="是否精品"			                               > 			                               <Radio.Group value={this.state.editBoutique} onChange={(e) => {						                    this.setState({ editBoutique: e.target.value })						                    }}>						                        <Radio value={1}>精品</Radio>						                        <Radio value={0}>非精品</Radio>						                	</Radio.Group>			                   		    </FormItem>		                   		     </div>						             <div className="clearfix" style={{paddingLeft:'60px'}}>							             <FormItem className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                         label="市场价"				                            >			                                <Input placeholder="市场价" value={this.state.editPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({editPrice:e.target.value})}} required="required"/>						    				<span style={{color:'red',marginLeft:'5px'}}>*</span>						                 </FormItem>						                 <FormItem className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                         label="首付金额"				                            >			                                <Input placeholder="市场价" value={this.state.firstPayment} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({firstPayment:e.target.value})}} required="required"/>						    				<span style={{color:'red',marginLeft:'5px'}}>*</span>						                 </FormItem>						                 <FormItem className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                         label="活动价"				                            >			                                <Input placeholder="活动价" value={this.state.editActivityPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({editActivityPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                         label="最低折扣"				                            >			                                <Input placeholder="最低折扣" value={this.state.editOffset} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({editOffset:e.target.value})}}/>						                 </FormItem>						                 <FormItem className="half-item"					                    	labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                         label="会员价"				                            >			                                <Input placeholder="会员价" value={this.state.editMemberPrice} style={{width:'94%'}}						    				onChange={(e)=>{this.setState({editMemberPrice:e.target.value})}}/>						                 </FormItem>						                 <FormItem  className="half-item"					                         	labelCol={{ span: 4 }}						                        wrapperCol={{ span: 12 }}					                           	label="活动生效"					                         > 					                          <Select placeholder="活动生效" value={this.state.editActivityFlag} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({editActivityFlag:e})}}> 				                                {				                                    gameState.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </FormItem>				                   		  <FormItem  className="half-item"					                         	labelCol={{ span: 4 }}						                        wrapperCol={{ span: 12 }}					                           	label="项目状态"					                         > 					                          <Select placeholder="项目状态" value={this.state.editStatus} style={{width:'94%'}}				                                onChange={(e)=>{this.setState({editStatus:e})}}> 				                                {				                                    conditionOrganization.map(function (item) {				                                        return <Select.Option key={item.value} >{item.key}</Select.Option>				                                    })				                                }				                              </Select>				                   		 </FormItem>				                   		  <FormItem  className="half-item"					                         	labelCol={{ span: 4 }}						                        wrapperCol={{ span: 12 }}					                           	label="项目分类"					                         > 					                          <Select placeholder="项目分类" value={this.state.typeStr} style={{width:'94%'}}				                                onChange={(e)=>{													let str = ""													if(e == 0) {														str = "通用"													}else if(e == 1) {														str = "专利"													}else if(e == 2) {														str = "软著"													}													this.setState({														  typeStatus: e,														  typeStr: str                                                        });}}> 													<Select.Option key={0} >通用</Select.Option>													<Select.Option key={1} >专利</Select.Option>													<Select.Option key={2} >软著</Select.Option>				                              </Select>				                   		 </FormItem>				                   		 <FormItem  className="half-item"						                    labelCol={{ span: 4 }}						                    wrapperCol={{ span: 12 }}						                    label="创建人"					                        >					                        <span style={{width:'94%'}}>{this.state.editCreateId}</span>					                    </FormItem>					                    <FormItem  className="half-item"						                    labelCol={{ span: 4 }}						                    wrapperCol={{ span: 12 }}						                    label="创建时间"					                        >					                        <span style={{width:'94%'}}>{this.state.editTime}</span>					                    </FormItem>				                   	</div>				                   	<div className="clearfix">			                   		    <FormItem					                        labelCol={{ span: 4 }}					                        wrapperCol={{ span: 12 }}					                        label="项目地址" >					                        					                        <Input type="textarea" rows={1} placeholder="业务项目服务内容" value={this.state.editProjectUrl}	                           				 	onChange={(e) => { this.setState({ editProjectUrl: 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.editIntroduce}	                           				 	onChange={(e) => { this.setState({ editIntroduce: 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.editValueEffect}	                           				 	onChange={(e) => { this.setState({ editValueEffect: 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.editClientSize}	                           				 	onChange={(e) => { this.setState({ editClientSize: 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: 4 }}					                        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:'110px'}}>保存</Button>  			                        <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'100px',marginBottom:'20px'}}>取消</Button>				                                   								    </Spin>							</Form>								</TabPane>					    <TabPane tab="业务项目规格" key="2">					        <div className="clearfix" >						        <Popconfirm title="是否删除?" onConfirm={this.delectRowSize} okText="是" cancelText="否">								     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}			                   			 disabled={!hasSelected} 			                    		 >删除<Icon type="minus" />			           			     </Button>								</Popconfirm>								<Popconfirm title="是否停用?" onConfirm={this.blockRowSize} okText="是" cancelText="否" >								     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:'none'}}			                   			 disabled={!hasSelected} 			                    		 >停用<Icon type="minus" />			           			     </Button>								</Popconfirm> 						        <Button className="ContactsList" type="primary" onClick={this.formatClick} style={{float:'right',marginBottom:'10px'}}>新增</Button> 					        </div>					       <div className="clearfix">                			  <Spin spinning={this.state.loading}>                			     <Form horizontal id="demand-form" onSubmit={this.contactSave} >							      <Table 					            	 pagination={this.state.formatPagination}					            	 columns={this.state.ContactsLists} 					            	 dataSource={this.state.formatDataSource}					            	 rowSelection={rowSelection}					            	 onRowClick={this.formatTableRowClick}					            	 />					            </Form> 							   </Spin> 							</div>					    </TabPane>					    </Tabs>                    </Modal>            	 </div>	                </div>            </div>        );    }}));export default BusinessProject;
 |