dengzhiguo 7 年之前
父节点
当前提交
b3dced47b5

+ 3 - 0
js/component/dataDic.js

@@ -1417,6 +1417,9 @@ module.exports = {
         }, {
             value: "1",
             key: "部门"
+        }, {
+            value: "2",
+            key: "团队"
         }
     ],
     //组织状态

+ 7 - 2
js/component/manageCenter/set/business/businessCategory.jsx

@@ -441,6 +441,7 @@ const BusinessCategory=Form.create()(React.createClass({
     },
     addClick() {
         this.state.RowData = {};
+        this.addReset();
         this.setState({
             visible: true
         });
@@ -467,6 +468,10 @@ const BusinessCategory=Form.create()(React.createClass({
         this.state.superId = undefined;//上级品类清零
         this.loadData();       
     },
+    addReset() {
+        this.state.categoryName = '';//品类名称清零
+        this.state.upCategory = undefined;//上级品类清零      
+    },
     searchSwitch() {
         this.setState({
             searchMore: !this.state.searchMore
@@ -513,7 +518,7 @@ const BusinessCategory=Form.create()(React.createClass({
 	           			     </Button>
 						</Popconfirm>
 						<Popconfirm title="是否停用?" onConfirm={this.blockRow} okText="是" cancelText="否">
-						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:'none'}}
 	                   			 disabled={!hasSelected} 
 	                    		 >停用<Icon type="minus" />
 	           			     </Button>
@@ -586,7 +591,7 @@ const BusinessCategory=Form.create()(React.createClass({
 		                   		    </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:'50px'}}>取消</Button>
+				                        <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'15px'}}>取消</Button>
 				                    </FormItem> 
 				                </Spin>
 				            </Form >

+ 21 - 41
js/component/manageCenter/set/business/businessProject.jsx

@@ -648,7 +648,7 @@ const BusinessProject=Form.create()(React.createClass({
             }
         });
     },
-    //新增一个品类,保存
+    //新增一个项目,保存
     addhandleSubmit(e){
     	e.preventDefault();	
     	if(!this.state.categoryName){
@@ -703,7 +703,7 @@ const BusinessProject=Form.create()(React.createClass({
                         loading: false
                     });
                     if (!data.error.length) {
-                        message.success('新增品类成功!'); 
+                        message.success('新增项目成功!'); 
                         this.handleCancel();
                         this.selectSuperId();
                     } else {
@@ -732,7 +732,7 @@ const BusinessProject=Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/ProjectSize/deleteProject",
             data: {
-                id: deletedIds
+                id:deletedIds
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -765,7 +765,7 @@ const BusinessProject=Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/ProjectSize/stopProject",
             data: {
-                id: deletedIds
+                id:deletedIds
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -780,7 +780,7 @@ const BusinessProject=Form.create()(React.createClass({
         }.bind(this));
     },
     //规格整行删除
-    delectRow() {
+    delectRowSize() {
         let deletedIds = '';
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
@@ -813,7 +813,7 @@ const BusinessProject=Form.create()(React.createClass({
         }.bind(this));
     },
     //规格整行停用
-    blockRow() {
+    blockRowSize() {
         let deletedIds = '';
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
@@ -925,24 +925,6 @@ const BusinessProject=Form.create()(React.createClass({
             searchMore: !this.state.searchMore
         });
     },
-    //更多搜索是否全国(更多搜索后面的)
-//  isSearchChina() {
-//      this.setState({
-//          searchChina: !this.state.searchChina
-//      });
-//  },
-    //是否全国的显示与否(新增项目)
-//  chinaSwitch() {
-//      this.setState({
-//          chinaMore: !this.state.chinaMore
-//      });
-//  },
-    //是否全国的显示与否(编辑项目)
-//  tanSwitch() {
-//      this.setState({
-//          tanMore: !this.state.tanMore
-//      });
-//  },
     render() {
     	const FormItem = Form.Item
         const rowSelection = {
@@ -985,7 +967,7 @@ const BusinessProject=Form.create()(React.createClass({
 	           			     </Button>
 						</Popconfirm>
 						<Popconfirm title="是否停用?" onConfirm={this.blockRow} okText="是" cancelText="否">
-						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+						     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:'none'}}
 	                   			 disabled={!hasSelected} 
 	                    		 >停用<Icon type="minus" />
 	           			     </Button>
@@ -1099,7 +1081,7 @@ const BusinessProject=Form.create()(React.createClass({
 						           
 				                    <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:'50px'}}>取消</Button>
+				                        <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'15px'}}>取消</Button>
 				                    </FormItem> 
 				                </Spin>
 				            </Form >
@@ -1115,23 +1097,21 @@ const BusinessProject=Form.create()(React.createClass({
 	                         <Form horizontal onSubmit={this.formathandleSubmit} id="demand-form">
 				                <Spin spinning={this.state.loading}>
 				                    <div className="clearfix">
-				                    	<FormItem
+				                    	 <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>
-				                    </div>
-		                   		     <div className="clearfix" >
-							              <FormItem  
-						                    labelCol={{ span: 7 }}
-						                    wrapperCol={{ span: 12 }}
-						                    label="创建人"
-					                        >
-					                        <span style={{width:'94%'}}>{this.state.editCreateId}</span>
-					                      </FormItem>
+					                     </FormItem>
 							             <FormItem
 					                    	labelCol={{ span: 7 }}
 					                        wrapperCol={{ span: 12 }}
@@ -1487,7 +1467,7 @@ const BusinessProject=Form.create()(React.createClass({
 					                            <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="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>
@@ -1495,14 +1475,14 @@ const BusinessProject=Form.create()(React.createClass({
 						</TabPane>
 					    <TabPane tab="业务项目规格" key="2">
 					        <div className="clearfix" >
-						        <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
+						        <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.blockRow} okText="是" cancelText="否">
-								     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+								<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>