dengzhiguo 7 years ago
parent
commit
f38454771c

+ 39 - 7
js/component/manageCenter/customer/content.jsx

@@ -63,14 +63,46 @@ class Content extends Component {
 	                });
           	    });
           	    break;
+          	case 'personalManage':
+                require.ensure([], () => {
+	                const PersonalManage = require('./customerManagement/personalManages').default;
+	                this.setState({
+	                    component:<PersonalManage />,	                    	                  
+	                });
+          	    });
+          	    break;
+          	case 'publicManage':
+                require.ensure([], () => {
+	                const PublicManages = require('./customerManagement/publicManages').default;
+	                this.setState({
+	                    component:<PublicManages />,	                    	                  
+	                });
+          	    });
+          	    break;
+          	case 'organizationManage':
+                require.ensure([], () => {
+	                const OrganizationManage = require('./customerManagement/organizationManages').default;
+	                this.setState({
+	                    component:<OrganizationManage />,	                    	                  
+	                });
+          	    });
+          	    break;
       	    case 'myBusiness':
-            require.ensure([], () => {
-                const MyBusiness = require('./customerService/myBusiness').default;
-                this.setState({
-                    component:<MyBusiness />,	                                      
-                });
-      	    });
-      	    break;
+	            require.ensure([], () => {
+	                const MyBusiness = require('./customerService/myBusiness').default;
+	                this.setState({
+	                    component:<MyBusiness />,	                                      
+	                });
+	      	    });
+	      	    break;
+	      	case 'businessMange':
+	            require.ensure([], () => {
+	                const BusinessMange = require('./customerService/businessManges').default;
+	                this.setState({
+	                    component:<BusinessMange />,	                                      
+	                });
+	      	    });
+	      	    break;
       	    case 'businessQuery':
             require.ensure([], () => {
                 const ServiceQuery = require('./customerService/serviceQuery').default;

+ 0 - 12
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -2397,18 +2397,6 @@ const MyClient = Form.create()(React.createClass({
 									        </FormItem>
 									        <div className="clearfix">
 									        <FormItem className="half-item"
-				                   		   		labelCol={{ span: 4 }}
-					                            wrapperCol={{ span: 18 }}
-					                            label="投资机构"
-					                   		    >
-						                   		 <Radio.Group value={this.state.investment} onChange={(e) => {
-								                        this.setState({investment:e.target.value})
-								                    }}>
-								                        <Radio value={0}>否</Radio>
-								                        <Radio value={1}>是</Radio>
-								                  </Radio.Group>
-								            </FormItem>
-									        <FormItem className="half-item"
 						                   			 labelCol={{ span: 4 }}
 					                            wrapperCol={{ span: 18 }}
 							                           label="业务认证"

+ 141 - 0
js/component/manageCenter/customer/customerManagement/myClient.less

@@ -0,0 +1,141 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+        overflow: hidden;
+    }
+    .user-search {
+        margin-bottom: 10px;
+        >input {
+            width: 140px;
+        }
+        >input,
+        >button,
+        .ant-select {
+            margin-right: 10px;
+            margin-top: 10px;
+        }
+        .ant-switch {
+            margin-left: 10px;
+        }
+        .search-more {
+            margin: 10px 0;
+            >span {
+                margin-right: 10px
+            }
+        }
+    }
+}
+.tabcolor .ant-table-thead > tr > th{background: none!important;}
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+
+.modal-box-title{float: left;}
+.modal-box-detail{margin-left: 10px;vertical-align: top;float: left;margin-top: 0px;width: 160px!important;}
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    >* {
+        float: left;
+        margin-right: 20px;
+    }
+    .addButton {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 4px 10px;
+    }
+    .addButton:hover {
+        background: #ea0862;
+    }
+}
+.ant-modal-footer{text-align: left;}
+.ant-modal-footer button{width: 100px;margin-top: 15px;margin-bottom: 15px;}
+.ant-modal-footer button:first-child{margin-left: 80px;margin-right: 30px;}
+.ant-modal-title{font-size: 20px;}
+.ContactsList{float: right;}
+#demand-form {
+    .half-item {
+        float: left;
+        width: 50%;
+        margin-bottom: 10px;
+    }
+    .item-title {
+        line-height: 30px;
+        font-size: 14px;
+        color: #666;
+    }
+    .form-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .keyWord-tips {
+        >button {
+            vertical-align: middle;
+        }
+    }
+    .set-submit {
+        margin-right: 20px;
+    }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
+}
+
+.demand-order-content {
+    .ant-row {
+        margin-bottom: 20px;
+    }
+    .ant-input-number-handler-wrap {
+        display: none
+    }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
+}
+
+

+ 207 - 0
js/component/manageCenter/customer/customerManagement/myClientDesc.jsx

@@ -0,0 +1,207 @@
+import React from 'react';
+import { Icon,  Modal, message,  Spin, Input, Select, Button, Form } from 'antd';
+import './myClient.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import {socialAttribute} from '../../../dataDic.js';
+const AchievementDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            data: {},           
+        };
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => { 
+        	if(values.companyNamet.length>64){
+    		message.warning('联系人字数不超过64个')
+    		return false;
+	    	};
+	    	if(values.telnums.length>13){
+	    		message.warning('电话号码字数不超过13个')
+	    		return false;
+	    	};
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/customer/addCustomer',
+                    data: {
+                        contacts:values.companyNamet,
+                        societyTag:values.societyTagt,
+                        name: values.companyNamet, 
+                        contactMobile: values.telnums,
+                        type:'0'
+                    }
+                }).done(function (data) { 
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+    },
+
+	//去完善
+    addContent(){
+    	let telnum=this.state.telnum;
+    	let companyName=this.state.companyNamet;
+    	let content=this.state.content;
+    	if(!telnum||!companyName||!content){
+    		message.warning('此3项都要填');
+    	}else{
+    		this.props.newmodal(true);
+    		this.props.closeDesc(false);
+    	}	
+    },
+    componentWillMount() {
+        this.state.companyNamet='';
+    	this.state.telnum='';
+    	this.state.depatrments='';
+    	this.state.positions='';
+    	this.state.wechats='';
+    	this.state.qqs='';
+    	this.state.emails='';
+    	
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.companyNamet='';
+	    	this.state.telnum='';
+            this.props.form.resetFields(); 
+        };
+    },
+    
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 8 },
+            wrapperCol: { span: 14 },
+        };  
+
+        return (
+        <div>
+            <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
+                <Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                    	<FormItem className="half-item"
+	                            {...formItemLayout}
+	                            label="客户姓名" >   
+	                           {getFieldDecorator('companyNamet', {
+	                                rules: [{ required: true, message: '此项为必填项!' }],
+	                                initialValue: this.state.companyNamet
+                                })(
+                                    <Input placeholder="客户姓名" />
+                                )} 
+	                    </FormItem>
+	                    </div>
+	                    <div className="clearfix">
+                    	<FormItem className="half-item"
+	                            {...formItemLayout}
+	                            label="联系电话" >
+	                    		{getFieldDecorator('telnums', {
+	                                rules: [{ required: true, message: '此项为必填项!' }],
+	                                initialValue: this.state.telnums
+                                })(
+                                    <Input placeholder="联系电话" />
+                                )} 
+	                    </FormItem>
+                    </div>
+                    <div className="clearfix">
+                    	<FormItem className="half-item" 
+                          {...formItemLayout}
+                           label="社会属性"
+                         > 
+                         {getFieldDecorator('societyTagt', {
+	                                rules: [{ required: true, message: '此项为必填项!' }],
+	                                initialValue: this.state.societyTagt
+                                })(
+							  <Select placeholder="客户社会属性"> 
+                                {
+                                    socialAttribute.map(function (item) {
+                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                    })
+                                }
+                              </Select>
+                            )}
+                   		 </FormItem>
+                    </div>
+                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>  
+                        {/*<Button className="set-submit" type="primary"  onClick={(e)=>{this.addContent();this.props.closeDesc}}>去完善</Button>*/}
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                    </FormItem> 
+                </Spin>
+            </Form >
+    	</div>
+        )
+    }
+}));
+
+const CustomerDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            tabsKey: 1,
+            loading: false,           
+            dataSource: [],
+        };
+    },    
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc; 
+    },
+    render() {
+        
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='800px'
+                        title='新建客户'                       
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>               
+                            <AchievementDetailForm
+                                data={this.props.data} 
+                                newmodal={this.props.newmodal}
+                                closeDesc={this.handleCancel}
+                                visible={this.state.visible}
+                                handleOk={this.handleOk} />
+                        </Spin>
+                    </Modal>
+                </div>
+            );        
+    },
+});
+
+
+export default CustomerDetail;

File diff suppressed because it is too large
+ 3178 - 0
js/component/manageCenter/customer/customerManagement/organizationManages.jsx


File diff suppressed because it is too large
+ 3293 - 0
js/component/manageCenter/customer/customerManagement/personalManages.jsx


File diff suppressed because it is too large
+ 3342 - 0
js/component/manageCenter/customer/customerManagement/publicManages.jsx


File diff suppressed because it is too large
+ 1626 - 0
js/component/manageCenter/customer/customerService/businessManges.jsx


+ 3 - 48
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx

@@ -2089,7 +2089,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 		return(
 			<div className="user-content" >
                 <div className="content-title">                  
-                    <span>我的客户</span>
+                    <span>我的个人客户</span>
                 </div>
                 <div className="user-search">                    
                     <Input placeholder="公司名称"
@@ -2266,7 +2266,7 @@ const IndividualCustomer = Form.create()(React.createClass({
                     />
                 <Modal	
 				      className="customeDetails"				      
-			          title="单位客户详情"
+			          title="个人客户详情"
 			          width='1200px'
 			          visible={this.state.modal5Visible}
 			          onOk={this.detailsModal}
@@ -2445,17 +2445,6 @@ const IndividualCustomer = Form.create()(React.createClass({
 						                    </div>
 						                    <div className="clearfix">
 						                        <FormItem className="half-item"
-									                {...formItemLayout}
-							                        label="投资机构"
-									                > 
-							                   		 <Radio.Group value={this.state.investment} onChange={(e) => {
-									                        this.setState({ investment:  e.target.value })
-									                    }}>
-									                        <Radio value={0}>否</Radio>
-									                        <Radio value={1}>是</Radio>
-									                  </Radio.Group>
-									            </FormItem>
-							                    <FormItem className="half-item"
 							                   			 {...formItemLayout}
 								                           label="业务认证"
 							                   		>
@@ -2466,41 +2455,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 										                        <Radio value={1}>已认证</Radio>
 										                  </Radio.Group>
 										        </FormItem>
-										           
-						                        <FormItem className="half-item"
-									                {...formItemLayout}
-							                        label="专家"
-									                > 
-							                   		 <Radio.Group value={this.state.expert} onChange={(e) => {
-									                        this.setState({ expert:  e.target.value })
-									                    }}>
-									                        <Radio value={0}>否</Radio>
-									                        <Radio value={1}>是</Radio>
-									                  </Radio.Group>
-									            </FormItem>
-									            <FormItem className="half-item"
-									                {...formItemLayout}
-							                        label="明星"
-									                > 
-							                   		 <Radio.Group value={this.state.celebrity} onChange={(e) => {
-									                        this.setState({ celebrity:  e.target.value })
-									                    }}>
-									                        <Radio value={0}>否</Radio>
-									                        <Radio value={1}>是</Radio>
-									                  </Radio.Group>
-									            </FormItem>
-									            <FormItem className="half-item"
-									                {...formItemLayout}
-							                        label="咨询师"
-									                > 
-							                   		 <Radio.Group value={this.state.consultant} onChange={(e) => {
-									                        this.setState({ consultant:  e.target.value })
-									                    }}>
-									                        <Radio value={0}>否</Radio>
-									                        <Radio value={1}>是</Radio>
-									                  </Radio.Group>
-									            </FormItem>
-									             <FormItem className="half-item"
+										        <FormItem className="half-item"
 									                {...formItemLayout}
 							                        label="国际化"
 									            > 

+ 4 - 6
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -146,8 +146,7 @@ const DemandDetailShow = Form.create()(React.createClass({
         };
     },
     loadData(id, detailApiUrl,dataCategory) {
-    	console.log(dataCategory);
-        this.setState({
+    	this.setState({
             loading: true
         });
         $.ajax({
@@ -788,8 +787,7 @@ const DemandDetailForm = Form.create()(React.createClass({
         });
     },
     loadData(id, detailApiUrl,dataCategory) {
-    	console.log(this.props.data);
-        this.setState({
+    	this.setState({
             loading: true
         });
         $.ajax({
@@ -799,7 +797,7 @@ const DemandDetailForm = Form.create()(React.createClass({
             url: globalConfig.context + detailApiUrl,
             data: {
                 id: id,
-                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
+                dataCategory:(dataCategory>=0)?dataCategory:this.props.data.dataCategory
             },
             success: function (data) {
                 let thisData = data.data;
@@ -1331,7 +1329,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                             fileList={this.state.textFileList}
                             onChange={(info) => {
                                 if (info.file.status !== 'uploading') {
-                                    console.log(info.file, info.fileList);
+                                    
                                 }
                                 if (info.file.status === 'done') {
                                     if (!info.file.response.error.length) {

+ 6 - 6
js/component/manageCenter/demand/techDemandQueryDesc.jsx

@@ -145,7 +145,7 @@ const DemandDetailShow = Form.create()(React.createClass({
             coverImg: []           
         };
     },
-    loadData(id, detailApiUrl) {
+    loadData(id, detailApiUrl,dataCategory) {
         this.setState({
             loading: true
         });
@@ -156,7 +156,7 @@ const DemandDetailShow = Form.create()(React.createClass({
             url: globalConfig.context + detailApiUrl,
             data: {
                 id: id,
-                dataCategory:this.state.dataCategory
+                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
             },
             success: function (data) {
             	
@@ -330,7 +330,7 @@ const DemandDetailShow = Form.create()(React.createClass({
         }.bind(this));
     },
     componentWillMount() {
-        this.loadData(this.props.data.id, this.props.detailApiUrl);
+        this.loadData(this.props.data.id, this.props.detailApiUrl,nextProps.data.dataCategory);
         if (this.props.data.employerId && this.props.data.dataCategory) {
             this.getContactsList(this.props.data.employerId);
         };
@@ -767,7 +767,7 @@ const DemandDetailForm = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    loadData(id, detailApiUrl) {
+    loadData(id, detailApiUrl,dataCategory) {
         this.setState({
             loading: true
         });
@@ -778,7 +778,7 @@ const DemandDetailForm = Form.create()(React.createClass({
             url: globalConfig.context + detailApiUrl,
             data: {
                 id: id,
-                dataCategory:this.state.dataCategory
+                dataCategory:dataCategory?dataCategory:this.props.data.dataCategory
             },
             success: function (data) {
                 let thisData = data.data;
@@ -979,7 +979,7 @@ const DemandDetailForm = Form.create()(React.createClass({
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             if (nextProps.data && nextProps.data.id) {
-                this.loadData(nextProps.data.id, nextProps.detailApiUrl);
+                this.loadData(nextProps.data.id, nextProps.detailApiUrl,nextProps.data.dataCategory);
             };
             this.state.contactsOption = [];
             this.state.data = {};

+ 0 - 1
js/component/manageCenter/leftTab.jsx

@@ -28,7 +28,6 @@ const LeftTab = React.createClass({
         if(rid.length>1){
         	for(var h=0;h<menu.length;h++){
         		if(menu[h].subMenus.length){
-        			console.log(menu[h].subMenus)
         			menu[h].subMenus.map(function(atem){
         				let urls=atem.url.split('#')
         				if(rid[1]==urls[1]){