Przeglądaj źródła

6/10日需求优化

mentoswzq 4 lat temu
rodzic
commit
7502f39681
20 zmienionych plików z 1541 dodań i 874 usunięć
  1. 13 4
      js/component/manageCenter/customer/NEW/intentionCustomer/addIntention.jsx
  2. 162 104
      js/component/manageCenter/customer/NEW/intentionCustomer/followDetail.jsx
  3. 4 0
      js/component/manageCenter/customer/NEW/intentionCustomer/followDetail/addContact.jsx
  4. 12 2
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx
  5. 1 1
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/businessDetail.jsx
  6. 234 135
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/contactPerson.jsx
  7. 44 13
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx
  8. 38 28
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visitDetail.jsx
  9. 2 1
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/intentionDetail.jsx
  10. 150 98
      js/component/manageCenter/customer/NEW/signCustomer/followDetail.jsx
  11. 4 0
      js/component/manageCenter/customer/NEW/signCustomer/followDetail/addContact.jsx
  12. 1 1
      js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/businessDetail.jsx
  13. 528 274
      js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/contactPerson.jsx
  14. 45 13
      js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visit.jsx
  15. 30 20
      js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visitDetail.jsx
  16. 63 57
      js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/intentionDetail.jsx
  17. 152 115
      js/component/manageCenter/customer/NEW/signCustomer/signCustomer.jsx
  18. 10 2
      js/component/manageCenter/set/business/businessProject.jsx
  19. 46 4
      package-lock.json
  20. 2 2
      package.json

+ 13 - 4
js/component/manageCenter/customer/NEW/intentionCustomer/addIntention.jsx

@@ -13,13 +13,22 @@ const AchievementDetailForm = Form.create()(React.createClass({
         };
     },
     handleSubmit(e) {
+        // if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.content)) {
+        // } else {
+        //   message.error("请填写正确的姓名,且至少包含一个汉字");
+        //   return;
+        // }
     	e.preventDefault();
         this.props.form.validateFields((err, values) => {   
-        	console.log(values.ProvinceCity)
         	if(values.name.length>64){
     		message.warning('客户名称字数不超过64个')
     		return false;
-	    	};
+            };
+            if (/.*[\u4e00-\u9fa5]+.*$/.test(values.content)) {
+            } else {
+              message.error("请填写正确的姓名,且至少包含一个汉字");
+              return false;
+            };
 	    	if(!values.ProvinceCity[1]) {
 			message.warning('请选择地区');
 			return false;
@@ -188,12 +197,12 @@ const AddPerson = Form.create()(React.createClass({
     },
 
     handleSubmit(e) {
-    	e.preventDefault();
+        e.preventDefault();
         this.props.form.validateFields((err, values) => { 
         	if(values.companyNamet.length>64){
     		message.warning('联系人字数不超过64个')
     		return false;
-	    	};
+            };
 	    	if(!values.ProvinceCity[1]) {
 			message.warning('请选择地区');
 			return false;

+ 162 - 104
js/component/manageCenter/customer/NEW/intentionCustomer/followDetail.jsx

@@ -400,110 +400,168 @@ const FollowDetail = React.createClass({
 			labelCol: { span: 8 },
 			wrapperCol: { span: 14 },
 		};
-		return(
-			<div>
-				<Modal	
-				      className="customeDetails"
-				      footer=''
-			          title="客户跟进详情"
-			          width='1000px'
-			          visible={this.state.visitModul}
-			          onOk={this.visitOk}
-					  onCancel={this.visitCancel}							          							          
-			        >				    
-					    <Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
-			    			<Spin spinning={this.state.loading}>
-			    			   	<div className="clearfix">
-			    			   		<FormItem 
-			                            labelCol={{ span: 4 }}
-										wrapperCol={{ span: 20 }}
-			                            label="跟进方式" >
-			    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
-										        this.setState({ contactType: e.target.value }) 
-						                    }}>
-						                        <Radio value={0}>外出</Radio>
-						                        <Radio value={1}>电话</Radio>
-						                        <Radio value={2}>QQ</Radio>
-						                        <Radio value={3}>微信</Radio>
-						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>
-						                <span className="mandatory">*</span>
-					                </FormItem>
-					                <div className="clearfix">
-						                {this.state.contacts?<span></span>:
-							                <FormItem className="half-item"
-					                            {...formItemLayout}
-					                             label="联系人"
-					                             >
-							                	<Select placeholder="选择联系人" style={{ width: 140 }}
-							                        value={this.state.lastName}
-							                        onChange={this.hundleName}>
-							                        {this.state.orderStatusOption}
-				                    			</Select>
-				                    			<span className="mandatory">*</span>
-							                </FormItem>
-						                }
-						                <FormItem className="half-item"
-			                          		 {...formItemLayout}
-			                             	>
-					                			<Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px'}}>添加新联系人</Button>
-					                	</FormItem>
-					                	<FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="联系电话"
-				                             >
-						                	<span>{this.state.nub}</span>
-						                </FormItem>
-						                <FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="跟进时间"
-				                             >
-						                	<span>{this.state.followTime}</span>
-						                </FormItem>
-					                </div>
-					                <div className="clearfix">
-					                	<FormItem
-					                        labelCol={{ span: 4 }}
-							                wrapperCol={{ span: 16 }}
-					                        label="跟进备注" >
-					                            <Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>
-					                    </FormItem>
-					                </div>
-					                <div className="clearfix">
-					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
-					                 	<div className="clearfix" >
-		                    			    <Spin spinning={this.state.loading}>
-										      <Table 
-										         rowKey={record => record.id}
-								            	 pagination={false}
-								            	 columns={this.state.intentionList} 
-								            	 dataSource={this.state.data}
-								            	 />
-										    </Spin> 
-										</div>	 
-					                </div>
-			    			   	</div>
-			    			   	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
-								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
-						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
-					   			</FormItem>
-					   		</Spin>
-					    </Form>
-				</Modal> 
-				<AddContact 
-					addcontactModul={this.state.addcontactModul}
-					uids={this.state.uids}
-					closeFollow={this.closeFollow}
-				/>
-				<BusName 
-					businessId={this.state.businessId}
-					mid={this.props.followData.id}
-					busModul={this.state.busModul}
-					closeBus={this.closeBus}
-				/>
-			</div>
-		)
+		return (
+      <div>
+        <Modal
+          className="customeDetails"
+          footer=""
+          title="新增客户跟进"
+          width="1000px"
+          visible={this.state.visitModul}
+          onOk={this.visitOk}
+          onCancel={this.visitCancel}
+        >
+          <Form
+            layout="horizontal"
+            id="demand-form"
+            onSubmit={this.visitSubmit}
+          >
+            <Spin spinning={this.state.loading}>
+              <div className="clearfix">
+                <FormItem
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 20 }}
+                  label="跟进方式"
+                >
+                  <Radio.Group
+                    value={this.state.contactType}
+                    onChange={(e) => {
+                      this.setState({ contactType: e.target.value });
+                    }}
+                  >
+                    <Radio value={0}>外出</Radio>
+                    <Radio value={1}>电话</Radio>
+                    <Radio value={2}>QQ</Radio>
+                    <Radio value={3}>微信</Radio>
+                    <Radio value={4}>邮箱</Radio>
+                  </Radio.Group>
+                  <span className="mandatory">*</span>
+                </FormItem>
+                <div className="clearfix">
+                  {this.state.contacts ? (
+                    <span></span>
+                  ) : (
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="联系人"
+                    >
+                      <Select
+                        placeholder="选择联系人"
+                        style={{ width: 140 }}
+                        value={this.state.lastName}
+                        onChange={this.hundleName}
+                      >
+                        {this.state.orderStatusOption}
+                      </Select>
+                      <span className="mandatory">*</span>
+                    </FormItem>
+                  )}
+                  <FormItem className="half-item" {...formItemLayout}>
+                    <Button
+                      type="primary"
+                      onClick={this.newContacts}
+                      style={{ marginLeft: "100px" }}
+                    >
+                      添加新联系人
+                    </Button>
+                  </FormItem>
+                  <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="联系电话"
+                  >
+                    <span>{this.state.nub}</span>
+                  </FormItem>
+                  <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="跟进时间"
+                  >
+                    <span>{this.state.followTime}</span>
+                  </FormItem>
+                </div>
+                <div className="clearfix">
+                  <FormItem
+                    labelCol={{ span: 4 }}
+                    wrapperCol={{ span: 16 }}
+                    label="跟进备注"
+                  >
+                    <span className="mandatory">*</span>
+                    <Input
+                      type="textarea"
+                      rows={4}
+                      value={this.state.result}
+                      placeholder="请输入客户沟通情况与跟进信息,不少于10字"
+                      required="required"
+                      onChange={(e) => {
+                        this.setState({ result: e.target.value });
+                      }}
+                    />
+                  </FormItem>
+                </div>
+                <div className="clearfix">
+                  <div
+                    style={{
+                      fontSize: "18px",
+                      marginLeft: "100px",
+                      marginTop: "15px",
+                      marginBottom: "10px",
+                    }}
+                  >
+                    业务意向
+                    <Button
+                      onClick={this.addNew}
+                      style={{
+                        marginLeft: "420px",
+                        background: "green",
+                        color: "#ffffff",
+                      }}
+                    >
+                      添加新业务
+                    </Button>
+                  </div>
+                  <div className="clearfix">
+                    <Spin spinning={this.state.loading}>
+                      <Table
+                        rowKey={(record) => record.id}
+                        pagination={false}
+                        columns={this.state.intentionList}
+                        dataSource={this.state.data}
+                      />
+                    </Spin>
+                  </div>
+                </div>
+              </div>
+              <FormItem wrapperCol={{ span: 12, offset: 6 }}>
+                <Button
+                  type="primary"
+                  size="large"
+                  htmlType="submit"
+                  style={{ marginRight: "150px", marginTop: "20px" }}
+                >
+                  保存
+                </Button>
+                <Button size="large" onClick={this.visitCancel}>
+                  取消
+                </Button>
+              </FormItem>
+            </Spin>
+          </Form>
+        </Modal>
+        <AddContact
+          addcontactModul={this.state.addcontactModul}
+          uids={this.state.uids}
+          closeFollow={this.closeFollow}
+        />
+        <BusName
+          businessId={this.state.businessId}
+          mid={this.props.followData ? this.props.followData.id : ""}
+          busModul={this.state.busModul}
+          closeBus={this.closeBus}
+        />
+      </div>
+    );
 	}
 })
 export default FollowDetail;

+ 4 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/followDetail/addContact.jsx

@@ -33,6 +33,10 @@ const AddContact = React.createClass({
 			message.warn('请输入手机号码');
 			return ;
 		};
+		if(this.state.newmobile.length!=11){
+			message.error('请填写正确的手机号码');
+		  return
+		}
 		this.setState({
 			loading: true
 		})

+ 12 - 2
js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form,Tabs,Modal } from 'antd';
+import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form,Tabs,Modal, Tag } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -222,7 +222,15 @@ const IntentionCustomer = Form.create()(
             dataIndex: "level",
             key: "level",
             render: (text) => {
-              return getLevel(text);
+              if(text == 0) {
+                return <Tag color="#87d068">一般客户</Tag>;
+              }else if(text == 1) {
+                return <Tag color="#D2691E">意向客户</Tag>;
+              }else if(text == 2) {
+                return <Tag color="#FF0000">重点客户</Tag>;
+              }else {
+                return "";
+              }
             },
           },
           {
@@ -419,6 +427,7 @@ const IntentionCustomer = Form.create()(
         modalVisible: true,
         basicState: true,
         contactState: true,
+        modalName: record.name
       });
     },
     //指定转交人自动补全
@@ -897,6 +906,7 @@ const IntentionCustomer = Form.create()(
             detailApi={this.props.detailApi}
             IntentionData={this.state.RowData}
             modalVisible={this.state.modalVisible}
+            name={this.state.modalName}
             closeDesc={this.closeDesc}
             basicState={this.state.basicState}
             contactState={this.state.contactState}

+ 1 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/businessDetail.jsx

@@ -79,7 +79,7 @@ const BusinessDetail =React.createClass({
 					title: '操作',
 					dataIndex: 'ooo',
 					key: 'ooo',
-					render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>) }
+					render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看历史</Button>) }
 				}
 			],
 		}

+ 234 - 135
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/contactPerson.jsx

@@ -6,8 +6,11 @@ import {
   Spin,
   message,
   Input,
+  Modal,
   Popconfirm,
-  Col
+  Col,
+  Row,
+  Alert
 } from "antd";
 import ajax from "jquery/src/ajax/xhr.js";
 import $ from "jquery/src/ajax";
@@ -15,46 +18,32 @@ import $ from "jquery/src/ajax";
 const ContactPerson = React.createClass({
   getInitialState() {
     return {
-      contactList: [],
+      newContacts:[],
+      nameModal: "",
+      mobileModal: "",
+      emailModal: "",
+      qqModal: "",
+      wechatModal: "",
+      departmentModal: "",
+      positionModal: "",
+      fixedTelModal:"",
       loading: false,
+      addcontactModul:false,
       ContactsLists: [
         {
           title: "姓名",
           dataIndex: "name",
           key: "name",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.name}
-                placeholder="姓名(必填项)"
-                key={record.id}
-                required="required"
-                onChange={e => {
-                  record.name = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
           title: "联系人部门",
-          dataIndex: "depatrment",
-          key: "depatrment",
+          dataIndex: "department",
+          key: "department",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.depatrment}
-                placeholder="联系人部门"
-                key={record.id}
-                onChange={e => {
-                  record.depatrment = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
@@ -62,18 +51,7 @@ const ContactPerson = React.createClass({
           dataIndex: "position",
           key: "position",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.position}
-                placeholder="联系人职务"
-                key={record.id}
-                onChange={e => {
-                  record.position = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div>
           }
         },
         {
@@ -86,23 +64,27 @@ const ContactPerson = React.createClass({
           }
         },
         {
+          title: "地区",
+          dataIndex: "cityName",
+          key: "cityName",
+          render: (text, record, index) => {
+          if(record.id) return <div>{text}</div>
+          }
+        },
+        {
           title: "手机号码",
           dataIndex: "mobile",
           key: "mobile",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.mobile}
-                placeholder="手机号码(必填项)"
-                key={record.id}
-                required="required"
-                onChange={e => {
-                  record.mobile = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "座机",
+          dataIndex: "fixedTel",
+          key: "fixedTel",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
@@ -110,18 +92,7 @@ const ContactPerson = React.createClass({
           dataIndex: "wechat",
           key: "wechat",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.wechat}
-                placeholder="微信"
-                key={record.id}
-                onChange={e => {
-                  record.wechat = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
@@ -129,18 +100,7 @@ const ContactPerson = React.createClass({
           dataIndex: "qq",
           key: "qq",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.qq}
-                placeholder="联系人QQ"
-                key={record.id}
-                onChange={e => {
-                  record.qq = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
@@ -148,18 +108,23 @@ const ContactPerson = React.createClass({
           dataIndex: "email",
           key: "email",
           render: (text, record, index) => {
-            return (
-              <Input
-                value={record.email}
-                placeholder="电子邮箱"
-                key={record.id}
-                onChange={e => {
-                  record.email = e.target.value;
-                  this.setState({ contactList: this.state.contactList });
-                }}
-                style={{ width: "120px" }}
-              />
-            );
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "更新时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "跟进人",
+          dataIndex: "aname",
+          key: "aname",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
           }
         },
         {
@@ -169,7 +134,7 @@ const ContactPerson = React.createClass({
           render: (text, record, index) => {
             return (
               <div>
-                {adminData.isSuperAdmin ? (
+                {adminData.isSuperAdmin || !record.id? (
                   <Popconfirm
                     title="是否删除?"
                     onConfirm={e => {
@@ -192,7 +157,7 @@ const ContactPerson = React.createClass({
                 ) : (
                   ""
                 )}
-                {record.name && record.mobile ? (
+                {record.major!=1 ? (
                   <Button
                     style={{
                       marginRight: "10px",
@@ -249,29 +214,29 @@ const ContactPerson = React.createClass({
   },
   //选择主要联系人
   mainContact(record) {
-    // this.setState({
-    // 	loading: true
-    // });
-    // $.ajax({
-    // 	method: "get",
-    // 	dataType: "json",
-    // 	crossDomain: false,
-    // 	url: globalConfig.context + "/api/admin/customer/updateMainContact",
-    // 	data: {
-    // 		uid:this.props.data.id,
-    // 		ocbId: record.id
-    // 	}
-    // }).done(function(data) {
-    // 	if(!data.error.length) {
-    // 		message.success('设为主要联系人成功!');
-    // 		this.setState({
-    // 			loading: false,
-    // 		});
-    // 	} else {
-    // 		message.warning(data.error[0].message);
-    // 	};
-    // 	this.contactLists();
-    // }.bind(this));
+    this.setState({
+    	loading: true
+    });
+    $.ajax({
+    	method: "get",
+    	dataType: "json",
+    	crossDomain: false,
+    	url: globalConfig.context + "/api/admin/customer/updateMainContact",
+    	data: {
+    		uid:this.props.data.id,
+    		ocbId: record.id
+    	}
+    }).done(function(data) {
+    	if(!data.error.length) {
+    		message.success('设为主要联系人成功!');
+    		this.setState({
+    			loading: false,
+    		});
+    	} else {
+    		message.warning(data.error[0].message);
+    	};
+    	this.contactLists();
+    }.bind(this));
     this.state.contactList.forEach(item => {
       item.major = 0;
     });
@@ -280,7 +245,6 @@ const ContactPerson = React.createClass({
     this.setState({
       contactList: this.state.contactList
     });
-    console.log("....", this.state.contactList);
   },
   //tab2获取联系人详情
   contactLists(ids) {
@@ -312,9 +276,13 @@ const ContactPerson = React.createClass({
               email: thisdata.email,
               qq: thisdata.qq,
               wechat: thisdata.wechat,
-              depatrment: thisdata.depatrment,
+              department: thisdata.department,
               position: thisdata.position,
-              major: thisdata.major
+              major: thisdata.major,
+              createTimes:thisdata.createTimes,
+              fixedTel:thisdata.fixedTel,
+              aname:thisdata.aname,
+              cityName:thisdata.provinceName+thisdata.cityName+thisdata.areaName
             });
           }
         }
@@ -333,33 +301,75 @@ const ContactPerson = React.createClass({
   //新增
   //tab2新增联系人
   addcontact() {
-    this.state.contactList.push({
-      id: null,
-      name: "",
-      mobile: "",
-      email: "",
-      qq: "",
-      wechat: "",
-      depatrment: "",
-      position: ""
+    this.setState({
+      addcontactModul: true
     });
-
+  },
+  // 取消新增
+  addcontactModulcancel(){
     this.setState({
-      contactList: this.state.contactList
+      addcontactModul: false,
+      nameModal: "",
+      mobileModal: "",
+      emailModal: "",
+      qqModal: "",
+      wechatModal: "",
+      departmentModal: "",
+      positionModal: "",
+      fixedTelModal:"",
     });
   },
   //tab2联系人保存
   contactSave(e) {
     e.preventDefault();
+    if (this.state.nameModal.length == 0 ) {
+      message.error("请填写姓名");
+      return;
+    }
+    if(/.*[\u4e00-\u9fa5]+.*$/.test(this.state.nameModal))   {  
+            
+    }else{
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
+    if(this.state.mobileModal.length!=11){
+        message.error('请填写正确的手机号码');
+      return
+    }
+    if(this.state.departmentModal.length==0){
+        message.error('请填写部门');
+      return
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.departmentModal)) {
+    } else {
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
+    if(this.state.positionModal.length==0){
+        message.error('请填写职位');
+      return
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.positionModal)) {
+    } else {
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
     this.setState({
       loading: true
     });
     $.ajax({
-      url: globalConfig.context + "/api/admin/customer/updateCustomerContacts",
+      url: globalConfig.context + "/api/admin/customer/addOneContact",
       method: "post",
       data: {
         uid: this.props.data.id,
-        contactList: JSON.stringify(this.state.contactList)
+        name: this.state.nameModal,
+        mobile: this.state.mobileModal,
+        email: this.state.emailModal,
+        qq:this.state.qqModal,
+        wechat: this.state.wechatModal,
+        department: this.state.departmentModal,
+        position: this.state.positionModal,
+        fixedTel:this.state.fixedTelModal,
       }
     }).done(
       function(data) {
@@ -368,7 +378,19 @@ const ContactPerson = React.createClass({
         });
         if (!data.error.length) {
           message.success("保存成功!");
-          this.props.closeDetail(false, true);
+          // this.props.closeDetail(false, true);
+          this.setState({
+            addcontactModul: false,
+            nameModal: "",
+            mobileModal: "",
+            emailModal: "",
+            qqModal: "",
+            wechatModal: "",
+            departmentModal: "",
+            positionModal: "",
+            fixedTelModal:"",
+          });
+          this.contactLists()
         } else {
           message.warning(data.error[0].message);
         }
@@ -390,12 +412,23 @@ const ContactPerson = React.createClass({
     return (
       <div>
         <div className="clearfix">
+          <Alert message="注:已保存信息不可修改,可新增正确的信息并设置为主要联系人" banner />
+          <span
+            style={{
+              fontSize: 14,
+              fontWeight: "bold",
+              marginTop: 20,
+              display: "inline-block",
+            }}
+          >
+            公司名称:{this.props.name}
+          </span>
           <Button
             className="ContactsList"
             type="primary"
             onClick={this.addcontact}
           >
-            新增
+            新增联系人
           </Button>
         </div>
         <div className="clearfix">
@@ -410,7 +443,7 @@ const ContactPerson = React.createClass({
                 columns={this.state.ContactsLists}
                 dataSource={this.state.contactList}
               />
-              <Col span={24} offset={9} style={{ marginTop: "15px" }}>
+              {/* <Col span={24} offset={9} style={{ marginTop: "15px" }}>
                 <Button type="primary" htmlType="submit">
                   保存
                 </Button>
@@ -421,10 +454,76 @@ const ContactPerson = React.createClass({
                 >
                   取消
                 </Button>
-              </Col>
+              </Col> */}
             </Form>
           </Spin>
         </div>
+        {/* 新增联系人 */}
+        <Modal
+              footer=''
+              width='800px'
+              title="新增联系人"
+              visible={this.state.addcontactModul}
+              onOk={this.contactSave}
+              onCancel={this.addcontactModulcancel}						          							          
+                  >
+              <Form layout="horizontal" onSubmit={this.submitcontactman} id="demand-form">
+              <Spin spinning={this.state.loading}> 											             						               
+                <Row style={{ paddingLeft:'50px' }}>
+                  <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => {this.setState({ nameModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => { this.setState({ mobileModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
+                  <Col span={2}><span style={{color:'red'}}>*</span>部门:</Col>
+                  <Col span={8}>
+                      <Input  required="required"
+                          onChange={(e) => { this.setState({ departmentModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>职位:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => { this.setState({ positionModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
+                      <Col span={2}>微信:</Col>
+                        <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ wechatModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
+                      <Col span={8}>
+                          <Input
+                              onChange={(e) => { this.setState({ qqModal: e.target.value }) }} />
+                      </Col>
+                  </Row>	
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>						                       
+                      <Col span={2}>邮箱:</Col>
+                      <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ emailModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}>座机:</Col>
+                      <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ fixedTelModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
+                    <Button className="set-submit" type="primary" htmlType="submit"  id="change_keep" style={{marginLeft:'60px'}} onClick={this.contactSave}>保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
+                  </Row>
+                </Spin>
+            </Form>   
+			    </Modal>
       </div>
     );
   }

+ 44 - 13
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visit.jsx

@@ -2,6 +2,7 @@ import React from 'react';
 import {Form,Button,Spin,message,Table,Popconfirm} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
+import FollowDetail from '../../followDetail.jsx'
 import {getContactType} from '@/tools.js';
 import VisitDetail from './visitDetail.jsx';
 
@@ -11,6 +12,7 @@ const Visit = React.createClass({
 			visitArrList:[],
 			loading:false,
 			visitModul:false,
+			visitModuls:false,
 			paginations: {
 				defaultCurrent: 1,
 				defaultPageSize: 10,
@@ -64,18 +66,19 @@ const Visit = React.createClass({
 				title: '跟进说明',
 				dataIndex: 'result',
 				key: 'result'
-			}, {
-				title: '操作',
-				dataIndex: 'ttt',
-				key: 'ttt',
-				render: (text, record, index) => {
-					return <div>
-                            {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
-							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
-							</Popconfirm>}
-                        </div>
-				}
-			}],
+			// }, {
+			// 	title: '操作',
+			// 	dataIndex: 'ttt',
+			// 	key: 'ttt',
+			// 	render: (text, record, index) => {
+			// 		return <div>
+            //                 {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
+			// 				    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
+			// 				</Popconfirm>}
+            //             </div>
+			// 	}
+			}
+		],
 		}
 	},
 	//拜访记录删除
@@ -173,8 +176,19 @@ const Visit = React.createClass({
 			visitModul:true,
 		})
 	},
+	//进入新增拜访记录
+    visit() {
+		let obj = {
+			id: this.props.data.id
+		}
+		this.setState({
+			followData:obj,
+			visitModuls:true,
+		})
+	},
 	closeDesc(e,s){
 		this.state.visitModul=e
+		this.state.visitModuls=e
 		if(s){
 			this.loadVisit()
 		}
@@ -190,8 +204,18 @@ const Visit = React.createClass({
 	render(){
 		return(
 			<div className="clearfix">
+				<Button
+                    onClick={(e) => {
+                      e.stopPropagation(), this.visit();
+                    }}
+					type="primary"
+					style={{marginTop:'10px',float: 'right'}}
+                  >
+                    客户跟进
+                  </Button>
 			    <Spin spinning={this.state.loading}>
-			      <Table 
+				  <Table 
+				     style={{marginTop:'60px'}}
 	            	 pagination={this.state.paginations}
 	            	 columns={this.state.visitsList} 
 	            	 dataSource={this.state.visitArrList}
@@ -205,6 +229,13 @@ const Visit = React.createClass({
 			    	closeDesc={this.closeDesc}
 			    	mid={this.props.data.id}
 			    />
+				<FollowDetail
+				    categoryArr={this.props.categoryArr}
+					followData={this.state.followData}
+					visitModul={this.state.visitModuls}
+					closeDesc={this.closeDesc}
+					loadData={this.loadVisit}
+				/>
 			</div>	
 		)
 	}

+ 38 - 28
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visitDetail.jsx

@@ -85,17 +85,17 @@ const VisitDetail = React.createClass({
 		                             
 	                            </div>
 					}
-				}, {
-					title: '操作',
-					dataIndex: 'rrr',
-					key: 'rrr',
-					render: (text, record, index) => {
-						return <div>
-                            {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
-							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
-							</Popconfirm>}
-                        </div>
-					}
+				// }, {
+				// 	title: '操作',
+				// 	dataIndex: 'rrr',
+				// 	key: 'rrr',
+				// 	render: (text, record, index) => {
+				// 		return <div>
+                //             {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
+				// 			    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
+				// 			</Popconfirm>}
+                //         </div>
+				// 	}
 				}
 			],
 		}
@@ -163,6 +163,27 @@ const VisitDetail = React.createClass({
 						});
 					}
 				};
+				if(parseInt(thedata.contactType)==0){
+					this.setState({
+						contactType:'外出'
+					})
+				}else if(parseInt(thedata.contactType)==1){
+					this.setState({
+						contactType:'电话'
+					})
+				}else if(parseInt(thedata.contactType)==2){
+					this.setState({
+						contactType:'QQ'
+					})
+				}else if(parseInt(thedata.contactType)==3){
+					this.setState({
+						contactType:'微信'
+					})
+				}else if(parseInt(thedata.contactType)==4){
+					this.setState({
+						contactType:'邮箱'
+					})
+				}
 				this.setState({
 					followIds: thedata.followId,
 					contacts: thedata.contacts,
@@ -170,7 +191,7 @@ const VisitDetail = React.createClass({
 					uid: thedata.uid,
 					data: theArr,
 					result: thedata.result,
-					contactType: parseInt(thedata.contactType),
+					// contactType: parseInt(thedata.contactType),
 					followTime:thedata.followTime
 				});
 			}.bind(this),
@@ -252,7 +273,6 @@ const VisitDetail = React.createClass({
 			loading: true
 		});
 		//新增
-		console.log(idsList)
 		$.ajax({
 			method: "post",
 			dataType: "json",
@@ -327,16 +347,7 @@ const VisitDetail = React.createClass({
 			                            labelCol={{ span:4 }}
 										wrapperCol={{ span: 20 }}
 			                            label="跟进方式" >
-			    			   			{!followData.readOnly?<Radio.Group value={this.state.contactType} onChange={(e) => {
-										        this.setState({ contactType: e.target.value }) 
-						                    }}>
-						                        <Radio value={0}>外出</Radio>
-						                        <Radio value={1}>电话</Radio>
-						                        <Radio value={2}>QQ</Radio>
-						                        <Radio value={3}>微信</Radio>
-						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>:
-						                <span>{getContactType(this.state.contactType)}</span>}
+						                <span>{this.state.contactType}</span>
 					                </FormItem>
 					                <div className="clearfix">
 						               	{!followData.readOnly&&<FormItem className="half-item"
@@ -363,14 +374,13 @@ const VisitDetail = React.createClass({
 					                        labelCol={{ span: 4 }}
 							                wrapperCol={{ span: 16 }}
 					                        label="跟进备注" >
-					                           	{!followData.readOnly?<Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>:
+					                           	{
 					                              <span>{this.state.result}</span>
 					                            }
 					                    </FormItem>
 					                </div>
 					                <div className="clearfix">
-					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向{!followData.readOnly&&<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button>}</div>
+					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
 					                 	<div className="clearfix" >
 		                    			    <Spin spinning={this.state.loading}>
 										      <Table 
@@ -384,8 +394,8 @@ const VisitDetail = React.createClass({
 					                </div>
 			    			   	</div>
 			    			   	{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
-								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
-						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
+								    {/* <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
+						           	<Button  size="large" onClick={this.visitCancel}>取消</Button> */}
 					   			</FormItem>}
 					   		</Spin>
 					    </Form>

+ 2 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/intentionDetail.jsx

@@ -135,7 +135,8 @@ const IntentionDetail = React.createClass({
 							</TabPane>}
 						    <TabPane tab="联系人信息" key="2">
 						        <ContactPerson 
-							        closeDetail={this.closeDetail}
+									closeDetail={this.closeDetail}
+									name={this.props.name}
 							        data={this.props.IntentionData}
 							        contactState={this.state.contactState}
 							    />

+ 150 - 98
js/component/manageCenter/customer/NEW/signCustomer/followDetail.jsx

@@ -79,7 +79,11 @@ const FollowDetail = React.createClass({
 			}).done(function(data) {
 				if(!data.error.length) {
 					message.success('签单成功');
-					this.props.loadData();
+					if(this.props.isFlag) {
+						this.deletelist(this.props.followData.id)
+					}else {
+						this.props.loadData();
+					}
 					this.setState({
 						loading: false,
 					});
@@ -317,103 +321,151 @@ const FollowDetail = React.createClass({
 			labelCol: { span: 8 },
 			wrapperCol: { span: 14 },
 		};
-		return(
-			<div>
-				<Modal	
-				      className="customeDetails"
-				      footer=''
-			          title="客户跟进详情"
-			          width='1000px'
-			          visible={this.state.visitModul}
-			          onOk={this.visitOk}
-					  onCancel={this.visitCancel}							          							          
-			        >				    
-					    <Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
-			    			<Spin spinning={this.state.loading}>
-			    			   	<div className="clearfix">
-			    			   		<FormItem 
-			                            labelCol={{ span: 4 }}
-										wrapperCol={{ span: 20 }}
-			                            label="跟进方式" >
-			    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
-										        this.setState({ contactType: e.target.value }) 
-						                    }}>
-						                        <Radio value={0}>外出</Radio>
-						                        <Radio value={1}>电话</Radio>
-						                        <Radio value={2}>QQ</Radio>
-						                        <Radio value={3}>微信</Radio>
-						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>
-						                <span className="mandatory">*</span>
-					                </FormItem>
-					                <div className="clearfix">
-						                {this.state.contacts?<span></span>:
-							                <FormItem className="half-item"
-					                            {...formItemLayout}
-					                             label="联系人"
-					                             >
-							                	<Select placeholder="选择联系人" style={{ width: 140 }}
-							                        value={this.state.lastName}
-							                        onChange={this.hundleName}>
-							                        {this.state.orderStatusOption}
-				                    			</Select>
-				                    			<span className="mandatory">*</span>
-							                </FormItem>
-						                }
-						                <FormItem className="half-item"
-			                          		 {...formItemLayout}
-			                             	>
-					                			<Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px'}}>添加新联系人</Button>
-					                	</FormItem>
-					                	<FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="联系电话"
-				                             >
-						                	<span>{this.state.nub}</span>
-						                </FormItem>
-						                <FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="跟进时间"
-				                             >
-						                	<span>{this.state.followTime}</span>
-						                </FormItem>
-					                </div>
-					                <div className="clearfix">
-					                	<FormItem
-					                        labelCol={{ span: 4 }}
-							                wrapperCol={{ span: 16 }}
-					                        label="跟进备注" >
-					                            <Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>
-					                    </FormItem>
-					                </div>
-					                <div className="clearfix">
-					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
-					                 	<div className="clearfix" >
-		                    			    <Spin spinning={this.state.loading}>
-										      <Table 
-								            	 pagination={false}
-								            	 columns={this.state.intentionList} 
-								            	 dataSource={this.state.data}
-								            	 />
-										    </Spin> 
-										</div>	 
-					                </div>
-			    			   	</div>
-			    			   	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
-								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
-						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
-					   			</FormItem>
-					   		</Spin>
-					    </Form>
-				</Modal> 
-				<AddContact 
-					addcontactModul={this.state.addcontactModul}
-					uids={this.state.uids}
-					closeFollow={this.closeFollow}
-				/>
-			</div>
-		)
+		return (
+      <div>
+        <Modal
+          className="customeDetails"
+          footer=""
+          title="客户跟进详情"
+          width="1000px"
+          visible={this.state.visitModul}
+          onOk={this.visitOk}
+          onCancel={this.visitCancel}
+        >
+          <Form
+            layout="horizontal"
+            id="demand-form"
+            onSubmit={this.visitSubmit}
+          >
+            <Spin spinning={this.state.loading}>
+              <div className="clearfix">
+                <FormItem
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 20 }}
+                  label="跟进方式"
+                >
+                  <Radio.Group
+                    value={this.state.contactType}
+                    onChange={(e) => {
+                      this.setState({ contactType: e.target.value });
+                    }}
+                  >
+                    <Radio value={0}>外出</Radio>
+                    <Radio value={1}>电话</Radio>
+                    <Radio value={2}>QQ</Radio>
+                    <Radio value={3}>微信</Radio>
+                    <Radio value={4}>邮箱</Radio>
+                  </Radio.Group>
+                  <span className="mandatory">*</span>
+                </FormItem>
+                <div className="clearfix">
+                  {this.state.contacts ? (
+                    <span></span>
+                  ) : (
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="联系人"
+                    >
+                      <Select
+                        placeholder="选择联系人"
+                        style={{ width: 140 }}
+                        value={this.state.lastName}
+                        onChange={this.hundleName}
+                      >
+                        {this.state.orderStatusOption}
+                      </Select>
+                      <span className="mandatory">*</span>
+                    </FormItem>
+                  )}
+                  <FormItem className="half-item" {...formItemLayout}>
+                    <Button
+                      type="primary"
+                      onClick={this.newContacts}
+                      style={{ marginLeft: "100px" }}
+                    >
+                      添加新联系人
+                    </Button>
+                  </FormItem>
+                  <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="联系电话"
+                  >
+                    <span>{this.state.nub}</span>
+                  </FormItem>
+                  <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="跟进时间"
+                  >
+                    <span>{this.state.followTime}</span>
+                  </FormItem>
+                </div>
+                <div className="clearfix">
+                  <FormItem
+                    labelCol={{ span: 4 }}
+                    wrapperCol={{ span: 16 }}
+                    label="跟进备注"
+                  >
+                    <span className="mandatory">*</span>
+                    <Input
+                      type="textarea"
+                      rows={4}
+                      value={this.state.result}
+                      placeholder="请输入客户沟通情况与跟进信息,不少于10字"
+                      required="required"
+                      onChange={(e) => {
+                        this.setState({ result: e.target.value });
+                      }}
+                    />
+                  </FormItem>
+                </div>
+                <div className="clearfix">
+                  <div
+                    style={{
+                      fontSize: "18px",
+                      marginLeft: "100px",
+                      marginTop: "15px",
+                      marginBottom: "10px",
+                    }}
+                  >
+                    业务意向
+                  </div>
+                  <div className="clearfix">
+                    <Spin spinning={this.state.loading}>
+                      <Table
+                        pagination={false}
+                        columns={this.state.intentionList}
+                        dataSource={this.state.data}
+                      />
+                    </Spin>
+                  </div>
+                </div>
+              </div>
+              <FormItem wrapperCol={{ span: 12, offset: 6 }}>
+                <Button
+                  type="primary"
+                  size="large"
+                  htmlType="submit"
+                  style={{ marginRight: "150px", marginTop: "20px" }}
+                >
+                  保存
+                </Button>
+                <Button size="large" onClick={this.visitCancel}>
+                  取消
+                </Button>
+              </FormItem>
+            </Spin>
+          </Form>
+        </Modal>
+        <AddContact
+          addcontactModul={this.state.addcontactModul}
+          uids={this.state.uids}
+          closeFollow={this.closeFollow}
+        />
+      </div>
+    );
 	}
 })
 export default FollowDetail;

+ 4 - 0
js/component/manageCenter/customer/NEW/signCustomer/followDetail/addContact.jsx

@@ -33,6 +33,10 @@ const AddContact = React.createClass({
 			message.warn('请输入手机号码');
 			return ;
 		};
+		if(this.state.newmobile.length!=11){
+			message.error('请填写正确的手机号码');
+		  return
+		}
 		this.setState({
 			loading: true
 		})

+ 1 - 1
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/businessDetail.jsx

@@ -79,7 +79,7 @@ const BusinessDetail =React.createClass({
 					title: '操作',
 					dataIndex: 'ooo',
 					key: 'ooo',
-					render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看</Button>) }
+					render: (text, record) => { return(<Button onClick={(e)=>{this.businessFollowDetails(record)}}>查看历史</Button>) }
 				}
 			],
 		}

+ 528 - 274
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/contactPerson.jsx

@@ -1,276 +1,530 @@
-import React from 'react';
-import {Form,Table,Button,Spin,message,Input,Popconfirm,Col} from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
-import $ from 'jquery/src/ajax';
-
+import React from "react";
+import {
+  Form,
+  Table,
+  Button,
+  Spin,
+  message,
+  Input,
+  Modal,
+  Popconfirm,
+  Col,
+  Row,
+  Alert
+} from "antd";
+import ajax from "jquery/src/ajax/xhr.js";
+import $ from "jquery/src/ajax";
 
 const ContactPerson = React.createClass({
-	getInitialState() {
-		return {
-			contactList:[],
-			loading:false,
-			ContactsLists: [{
-					title: '姓名',
-					dataIndex: 'name',
-					key: 'name',
-					render: (text, record, index) => {
-						return <Input value={record.name} placeholder="姓名(必填项)" key={record.id} required="required"
-	                           onChange={(e) => { record.name = e.target.value; 
-	                           	this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人部门',
-					dataIndex: 'depatrment',
-					key: 'depatrment',
-					render: (text, record, index) => {
-						return <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
-	                   onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人职务',
-					dataIndex: 'position',
-					key: 'position',
-					render: (text, record, index) => {
-						return <Input value={record.position} placeholder="联系人职务" key={record.id}
-	                  onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-                    title: '主要联系人',
-                    dataIndex: 'major',
-                    width:100,
-                    key: 'major',
-                    render:(text) => {
-                    	return text?'是':"否"
-                    }
-                },{
-					title: '手机号码',
-					dataIndex: 'mobile',
-					key: 'mobile',
-					render: (text, record, index) => {
-						return <Input value={record.mobile} placeholder="手机号码(必填项)" key={record.id} required="required"
-	                  onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '微信',
-					dataIndex: 'wechat',
-					key: 'wechat',
-					render: (text, record, index) => {
-						return <Input value={record.wechat} placeholder="微信" key={record.id}
-	                  onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人QQ',
-					dataIndex: 'qq',
-					key: 'qq',
-					render: (text, record, index) => {
-						return <Input value={record.qq} placeholder="联系人QQ" key={record.id}
-	                  onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '电子邮箱',
-					dataIndex: 'email',
-					key: 'email',
-					render: (text, record, index) => {
-						return <Input value={record.email} placeholder="电子邮箱" key={record.id}
-	                  onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				},
-				{
-					title: '操作',
-					dataIndex: 'dels',
-					key: 'dels',
-					render: (text, record, index) => {
-						return <div>{adminData.isSuperAdmin ? 
-		                            <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
-									    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
-									</Popconfirm>
-									:''}
-								{record.name?<Button style={{marginRight:'10px',color:'#ffffff',background:'green',border:'none'}} onClick={(e)=>{e.stopPropagation(),this.mainContact(record)}}>设为主要联系人</Button>:''}
-                            </div>
-					}
-				}
-			],
-		}
-	},
-	//tab2删除
-	confirmDelet(e) {
-		this.setState({
-			loading: true
-		});
-		if(e.id) {
-			$.ajax({
-				method: "get",
-				dataType: "json",
-				crossDomain: false,
-				url: globalConfig.context + "/api/admin/customer/deleteOneContact",
-				data: {
-					ocbId: e.id, //删除的ID    
-				}
-			}).done(function(data) {
-				if(!data.error.length) {
-					message.success('删除成功!');
-					this.setState({
-						loading: false,
-					});
-				} else {
-					message.warning(data.error[0].message);
-				};
-				this.contactLists();
-			}.bind(this));
-		} else {
-			this.contactLists();
-		}
-	},
-	//选择主要联系人
-	mainContact(record){
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + "/api/admin/customer/updateMainContact",
-			data: {
-				uid:this.props.data.id,
-				ocbId: record.id 
-			}
-		}).done(function(data) {
-			if(!data.error.length) {
-				message.success('设为主要联系人成功!');
-				this.setState({
-					loading: false,
-				});
-			} else {
-				message.warning(data.error[0].message);
-			};
-			this.contactLists();
-		}.bind(this));
-	},
-	//tab2获取联系人详情
-	contactLists(ids) {
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + '/api/admin/customer/findCustomerContacts',
-			data: {
-				uid: ids||this.props.data.id, //名称1
-			},
-			success: function(data) {
-				let theArr = [];
-				if(data.error.length || data.data.list == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					for(let i = 0; i < data.data.length; i++) {
-						let thisdata = data.data[i];
-						theArr.push({
-							key:i,
-							id: thisdata.id,
-							name: thisdata.name,
-							mobile: thisdata.mobile,
-							email: thisdata.email,
-							qq: thisdata.qq,
-							wechat: thisdata.wechat,
-							depatrment: thisdata.depatrment,
-							position: thisdata.position,
-							major:thisdata.major
-						});
-					};
-
-				};
-				this.setState({
-					contactList: theArr,
-				});
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
-	},
-	//新增
-	//tab2新增联系人
-	addcontact() {
-		this.state.contactList.push({
-			id: null,
-			name: '',
-			mobile: '',
-			email: '',
-			qq: '',
-			wechat: '',
-			depatrment: '',
-			position: '',
-		});
-
-		this.setState({
-			contactList: this.state.contactList
-		})
-	},	
-	//tab2联系人保存
-	contactSave(e) {
-		e.preventDefault();
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
-			method: 'post',
-			data: {
-				uid: this.props.data.id,
-				contactList: JSON.stringify(this.state.contactList)
-			}
-		}).done(function(data) {
-			this.setState({
-				loading: false
-			});
-			if(!data.error.length) {
-				message.success('保存成功!');
-				this.props.closeDetail(false,true)
-			} else {
-				message.warning(data.error[0].message);
-			}
-		}.bind(this));
-	},
-	componentWillMount(){
-		this.contactLists(this.props.data.id);
-	},
-	detailsModal(){
-		this.props.closeDetail(false, false)
-	},
-	componentWillReceiveProps(nextProps) {
-		if(nextProps.data.id&&nextProps.contactState){
-			this.contactLists(nextProps.data.id)
-		}
-	},
-	render() {
-		return(
-			<div>
-			    <div className="clearfix" >
-					 <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button> 
-				</div>
-		       <div className="clearfix">
-    			  <Spin spinning={this.state.loading}>
-    			     <Form layout="horizontal" id="demand-form" onSubmit={this.contactSave} >
-				      <Table 
-		            	 pagination={false}
-		            	 columns={this.state.ContactsLists} 
-		            	 dataSource={this.state.contactList}
-		            	 />
-	            	    	<Col span={24} offset={9} style={{marginTop:'15px'}}>
-				                <Button  type="primary" htmlType="submit">保存</Button>  
-                                <Button  type="ghost" onClick={this.detailsModal} style={{marginLeft:'100px'}}>取消</Button>
-				            </Col>
-		            	</Form> 
-				   </Spin> 
-				</div>
-			</div>
-		)
-	}
-})
-export default ContactPerson;
+  getInitialState() {
+    return {
+      newContacts:[],
+      nameModal: "",
+      mobileModal: "",
+      emailModal: "",
+      qqModal: "",
+      wechatModal: "",
+      departmentModal: "",
+      positionModal: "",
+      fixedTelModal:"",
+      loading: false,
+      addcontactModul:false,
+      ContactsLists: [
+        {
+          title: "姓名",
+          dataIndex: "name",
+          key: "name",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "联系人部门",
+          dataIndex: "department",
+          key: "department",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "联系人职务",
+          dataIndex: "position",
+          key: "position",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div>
+          }
+        },
+        {
+          title: "主要联系人",
+          dataIndex: "major",
+          width: 100,
+          key: "major",
+          render: text => {
+            return text == 1 ? "是" : "否";
+          }
+        },
+        {
+          title: "地区",
+          dataIndex: "cityName",
+          key: "cityName",
+          render: (text, record, index) => {
+          if(record.id) return <div>{text}</div>
+          }
+        },
+        {
+          title: "手机号码",
+          dataIndex: "mobile",
+          key: "mobile",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "座机",
+          dataIndex: "fixedTel",
+          key: "fixedTel",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "微信",
+          dataIndex: "wechat",
+          key: "wechat",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "联系人QQ",
+          dataIndex: "qq",
+          key: "qq",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "电子邮箱",
+          dataIndex: "email",
+          key: "email",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "更新时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "跟进人",
+          dataIndex: "aname",
+          key: "aname",
+          render: (text, record, index) => {
+            if(record.id) return <div>{text}</div> 
+          }
+        },
+        {
+          title: "操作",
+          dataIndex: "dels",
+          key: "dels",
+          render: (text, record, index) => {
+            return (
+              <div>
+                {adminData.isSuperAdmin || !record.id? (
+                  <Popconfirm
+                    title="是否删除?"
+                    onConfirm={e => {
+                      this.confirmDelet(record);
+                    }}
+                    okText="删除"
+                    cancelText="不删除"
+                  >
+                    <Button
+                      style={{
+                        marginRight: "10px",
+                        color: "#ffffff",
+                        background: "#f00",
+                        border: "none"
+                      }}
+                    >
+                      删除
+                    </Button>
+                  </Popconfirm>
+                ) : (
+                  ""
+                )}
+                {record.major!=1 ? (
+                  <Button
+                    style={{
+                      marginRight: "10px",
+                      color: "#ffffff",
+                      background: "green",
+                      border: "none"
+                    }}
+                    onClick={e => {
+                      e.stopPropagation(), this.mainContact(record);
+                    }}
+                  >
+                    设为主要联系人
+                  </Button>
+                ) : (
+                  ""
+                )}
+              </div>
+            );
+          }
+        }
+      ]
+    };
+  },
+  //tab2删除
+  confirmDelet(e) {
+    this.setState({
+      loading: true
+    });
+    if (e.id) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/customer/deleteOneContact",
+        data: {
+          ocbId: e.id //删除的ID
+        }
+      }).done(
+        function(data) {
+          if (!data.error.length) {
+            message.success("删除成功!");
+            this.setState({
+              loading: false
+            });
+          } else {
+            message.warning(data.error[0].message);
+          }
+          this.contactLists();
+        }.bind(this)
+      );
+    } else {
+      this.contactLists();
+    }
+  },
+  //选择主要联系人
+  mainContact(record) {
+    this.setState({
+    	loading: true
+    });
+    $.ajax({
+    	method: "get",
+    	dataType: "json",
+    	crossDomain: false,
+    	url: globalConfig.context + "/api/admin/customer/updateMainContact",
+    	data: {
+    		uid:this.props.data.id,
+    		ocbId: record.id
+    	}
+    }).done(function(data) {
+    	if(!data.error.length) {
+    		message.success('设为主要联系人成功!');
+    		this.setState({
+    			loading: false,
+    		});
+    	} else {
+    		message.warning(data.error[0].message);
+    	};
+    	this.contactLists();
+    }.bind(this));
+    this.state.contactList.forEach(item => {
+      item.major = 0;
+    });
+    record.major = 1;
+    // console.log(record);
+    this.setState({
+      contactList: this.state.contactList
+    });
+  },
+  //tab2获取联系人详情
+  contactLists(ids) {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
+      data: {
+        uid: ids || this.props.data.id //名称1
+      },
+      success: function(data) {
+        let theArr = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.length; i++) {
+            let thisdata = data.data[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,
+              name: thisdata.name,
+              mobile: thisdata.mobile,
+              email: thisdata.email,
+              qq: thisdata.qq,
+              wechat: thisdata.wechat,
+              department: thisdata.department,
+              position: thisdata.position,
+              major: thisdata.major,
+              createTimes:thisdata.createTimes,
+              fixedTel:thisdata.fixedTel,
+              aname:thisdata.aname,
+              cityName:thisdata.provinceName+thisdata.cityName+thisdata.areaName
+            });
+          }
+        }
+        this.setState({
+          contactList: theArr
+        });
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+  //新增
+  //tab2新增联系人
+  addcontact() {
+    this.setState({
+      addcontactModul: true
+    });
+  },
+  // 取消新增
+  addcontactModulcancel(){
+    this.setState({
+      addcontactModul: false,
+      nameModal: "",
+      mobileModal: "",
+      emailModal: "",
+      qqModal: "",
+      wechatModal: "",
+      departmentModal: "",
+      positionModal: "",
+      fixedTelModal:"",
+    });
+  },
+  //tab2联系人保存
+  contactSave(e) {
+    e.preventDefault();
+    if(this.state.nameModal.length==0){
+        message.error('请填写姓名');
+      return
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.nameModal)) {
+    } else {
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
+    if (this.state.mobileModal.length != 11) {
+      message.error("请填写正确的手机号码");
+      return;
+    }
+    if (this.state.departmentModal.length == 0) {
+      message.error("请填写部门");
+      return;
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.departmentModal)) {
+    } else {
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
+    if (this.state.positionModal.length == 0) {
+      message.error("请填写职位");
+      return;
+    }
+    if (/.*[\u4e00-\u9fa5]+.*$/.test(this.state.positionModal)) {
+    } else {
+      message.error("请填写正确的姓名,且至少包含一个汉字");
+      return;
+    }
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      url: globalConfig.context + "/api/admin/customer/addOneContact",
+      method: "post",
+      data: {
+        uid: this.props.data.id,
+        name: this.state.nameModal,
+        mobile: this.state.mobileModal,
+        email: this.state.emailModal,
+        qq:this.state.qqModal,
+        wechat: this.state.wechatModal,
+        department: this.state.departmentModal,
+        position: this.state.positionModal,
+        fixedTel:this.state.fixedTelModal,
+      }
+    }).done(
+      function(data) {
+        this.setState({
+          loading: false
+        });
+        if (!data.error.length) {
+          message.success("保存成功!");
+          // this.props.closeDetail(false, true);
+          this.setState({
+            addcontactModul: false,
+            nameModal: "",
+            mobileModal: "",
+            emailModal: "",
+            qqModal: "",
+            wechatModal: "",
+            departmentModal: "",
+            positionModal: "",
+            fixedTelModal:"",
+          });
+          this.contactLists()
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this)
+    );
+  },
+  componentWillMount() {
+    this.contactLists(this.props.data.id);
+  },
+  detailsModal() {
+    this.props.closeDetail(false, false);
+  },
+  componentWillReceiveProps(nextProps) {
+    if (nextProps.data.id && nextProps.contactState) {
+      this.contactLists(nextProps.data.id);
+    }
+  },
+  render() {
+    return (
+      <div>
+        <div className="clearfix">
+          <Alert message="注:已保存信息不可修改,可新增正确的信息并设置为主要联系人" banner />
+          <span
+            style={{
+              fontSize: 14,
+              fontWeight: "bold",
+              marginTop: 20,
+              display: "inline-block",
+            }}
+          >
+            公司名称:{this.props.name}
+          </span>
+          <Button
+            className="ContactsList"
+            type="primary"
+            onClick={this.addcontact}
+          >
+            新增联系人
+          </Button>
+        </div>
+        <div className="clearfix">
+          <Spin spinning={this.state.loading}>
+            <Form
+              layout="horizontal"
+              id="demand-form"
+              onSubmit={this.contactSave}
+            >
+              <Table
+                pagination={false}
+                columns={this.state.ContactsLists}
+                dataSource={this.state.contactList}
+              />
+              {/* <Col span={24} offset={9} style={{ marginTop: "15px" }}>
+                <Button type="primary" htmlType="submit">
+                  保存
+                </Button>
+                <Button
+                  type="ghost"
+                  onClick={this.detailsModal}
+                  style={{ marginLeft: "100px" }}
+                >
+                  取消
+                </Button>
+              </Col> */}
+            </Form>
+          </Spin>
+        </div>
+        {/* 新增联系人 */}
+        <Modal
+              footer=''
+              width='800px'
+              title="新增联系人"
+              visible={this.state.addcontactModul}
+              onOk={this.contactSave}
+              onCancel={this.addcontactModulcancel}						          							          
+                  >
+              <Form layout="horizontal" onSubmit={this.submitcontactman} id="demand-form">
+              <Spin spinning={this.state.loading}> 											             						               
+                <Row style={{ paddingLeft:'50px' }}>
+                  <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => {this.setState({ nameModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => { this.setState({ mobileModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
+                  <Col span={2}><span style={{color:'red'}}>*</span>部门:</Col>
+                  <Col span={8}>
+                      <Input  required="required"
+                          onChange={(e) => { this.setState({ departmentModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>职位:</Col>
+                      <Col span={8}>
+                          <Input required="required"
+                              onChange={(e) => { this.setState({ positionModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
+                      <Col span={2}>微信:</Col>
+                        <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ wechatModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
+                      <Col span={8}>
+                          <Input
+                              onChange={(e) => { this.setState({ qqModal: e.target.value }) }} />
+                      </Col>
+                  </Row>	
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>						                       
+                      <Col span={2}>邮箱:</Col>
+                      <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ emailModal: e.target.value }) }} />
+                      </Col>
+                      <Col span={2} style={{ marginLeft: '50px' }}>座机:</Col>
+                      <Col span={8}>
+                          <Input 
+                              onChange={(e) => { this.setState({ fixedTelModal: e.target.value }) }} />
+                      </Col>
+                  </Row>
+                  <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
+                    <Button className="set-submit" type="primary" htmlType="submit"  id="change_keep" style={{marginLeft:'60px'}} onClick={this.contactSave}>保存</Button>
+                    <Button className="set-submit" type="ghost" onClick={this.addcontactModulcancel} id='change_rem'>取消</Button>
+                  </Row>
+                </Spin>
+            </Form>   
+			    </Modal>
+      </div>
+    );
+  }
+});
+export default ContactPerson;

+ 45 - 13
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visit.jsx

@@ -2,6 +2,7 @@ import React from 'react';
 import {Form,Button,Spin,message,Table,Popconfirm} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
+import FollowDetail from '../../followDetail.jsx'
 import {getContactType} from '@/tools.js';
 import VisitDetail from './visitDetail.jsx';
 
@@ -11,6 +12,7 @@ const Visit = React.createClass({
 			visitArrList:[],
 			loading:false,
 			visitModul:false,
+			visitModuls:false,
 			paginations: {
 				defaultCurrent: 1,
 				defaultPageSize: 10,
@@ -64,18 +66,19 @@ const Visit = React.createClass({
 				title: '跟进说明',
 				dataIndex: 'result',
 				key: 'result'
-			}, {
-				title: '操作',
-				dataIndex: 'ttt',
-				key: 'ttt',
-				render: (text, record, index) => {
-					return <div>
-                            {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
-							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
-							</Popconfirm>}
-                        </div>
-				}
-			}],
+			// }, {
+			// 	title: '操作',
+			// 	dataIndex: 'ttt',
+			// 	key: 'ttt',
+			// 	render: (text, record, index) => {
+			// 		return <div>
+            //                 {!record.readOnly&&<Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
+			// 				    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
+			// 				</Popconfirm>}
+            //             </div>
+			// 	}
+			}
+		],
 		}
 	},
 	//拜访记录删除
@@ -173,8 +176,19 @@ const Visit = React.createClass({
 			visitModul:true,
 		})
 	},
+	//进入新增拜访记录
+    visit() {
+		let obj = {
+			id: this.props.data.id
+		}
+		this.setState({
+			followData:obj,
+			visitModuls:true,
+		})
+	},
 	closeDesc(e,s){
 		this.state.visitModul=e
+		this.state.visitModuls=e
 		if(s){
 			this.loadVisit()
 		}
@@ -190,8 +204,18 @@ const Visit = React.createClass({
 	render(){
 		return(
 			<div className="clearfix">
+				<Button
+                    onClick={(e) => {
+                      e.stopPropagation(), this.visit();
+                    }}
+					type="primary"
+					style={{marginTop:'10px',float: 'right'}}
+                  >
+                    客户跟进
+                  </Button>
 			    <Spin spinning={this.state.loading}>
-			      <Table 
+				  <Table 
+				     style={{marginTop:'60px'}}
 	            	 pagination={this.state.paginations}
 	            	 columns={this.state.visitsList} 
 	            	 dataSource={this.state.visitArrList}
@@ -205,6 +229,14 @@ const Visit = React.createClass({
 			    	closeDesc={this.closeDesc}
 			    	mid={this.props.data.id}
 			    />
+				<FollowDetail
+				    categoryArr={this.props.categoryArr}
+					followData={this.state.followData}
+					isFlag={true}
+					visitModul={this.state.visitModuls}
+					closeDesc={this.closeDesc}
+					loadData={this.props.loadData}
+				/>
 			</div>	
 		)
 	}

+ 30 - 20
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visitDetail.jsx

@@ -100,6 +100,27 @@ const VisitDetail = React.createClass({
 						remarks: thisdata.remarks,
 					});
 				};
+				if(parseInt(thedata.contactType)==0){
+					this.setState({
+						contactType:'外出'
+					})
+				}else if(parseInt(thedata.contactType)==1){
+					this.setState({
+						contactType:'电话'
+					})
+				}else if(parseInt(thedata.contactType)==2){
+					this.setState({
+						contactType:'QQ'
+					})
+				}else if(parseInt(thedata.contactType)==3){
+					this.setState({
+						contactType:'微信'
+					})
+				}else if(parseInt(thedata.contactType)==4){
+					this.setState({
+						contactType:'邮箱'
+					})
+				}
 				this.setState({
 					followIds: thedata.followId,
 					contacts: thedata.contacts,
@@ -107,7 +128,7 @@ const VisitDetail = React.createClass({
 					data: theArr,
 					result: thedata.result,
 					contactMobile:thedata.contactMobile,
-					contactType: parseInt(thedata.contactType),
+					// contactType: parseInt(thedata.contactType),
 					followTime: thedata.followTime,
 					followSituation: thedata.followSituation,
 					customerStatus: thedata.customerStatus,
@@ -254,22 +275,11 @@ const VisitDetail = React.createClass({
 			    			   		<FormItem 
 			                            labelCol={{ span:4 }}
 										wrapperCol={{ span: 20 }}
-										style={{marginBottom:12}}
 			                            label="跟进方式" >
-			    			   			{!followData.readOnly?<Radio.Group value={this.state.contactType} onChange={(e) => {
-										        this.setState({ contactType: e.target.value }) 
-						                    }}>
-						                        <Radio value={0}>外出</Radio>
-						                        <Radio value={1}>电话</Radio>
-						                        <Radio value={2}>QQ</Radio>
-						                        <Radio value={3}>微信</Radio>
-						                        <Radio value={4}>邮箱</Radio>
-						                </Radio.Group>:
-						                <span>{getContactType(this.state.contactType)}</span>
-						                }
+						                <span>{this.state.contactType}</span>
 					                </FormItem>
 					                <div className="clearfix">
-						                {!followData.readOnly&&<FormItem className="half-item"
+						               	{!followData.readOnly&&<FormItem className="half-item"
 				                            {...formItemLayout}
 				                             label="当前联系人"
 				                             >
@@ -293,17 +303,17 @@ const VisitDetail = React.createClass({
 					                        labelCol={{ span: 4 }}
 							                wrapperCol={{ span: 16 }}
 					                        label="跟进备注" >
-					                            {!followData.readOnly?<Input type="textarea" rows={4} value={this.state.result} 
-					                              onChange={(e)=>{this.setState({result:e.target.value})}}/>:
+					                           	{
 					                              <span>{this.state.result}</span>
 					                            }
 					                    </FormItem>
 					                </div>
 					                <div className="clearfix">
 					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
-					                 	<div className="clearfix">
+					                 	<div className="clearfix" >
 		                    			    <Spin spinning={this.state.loading}>
 										      <Table 
+										         rowKey={record => record.id}
 								            	 pagination={false}
 								            	 columns={this.state.intentionList} 
 								            	 dataSource={this.state.data}
@@ -312,9 +322,9 @@ const VisitDetail = React.createClass({
 										</div>	 
 					                </div>
 			    			   	</div>
-			    			   	{!followData.readOnly&&	<FormItem wrapperCol={{ span: 12, offset: 6 }}>
-								    <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
-						           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
+			    			   	{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
+								    {/* <Button  type="primary" size="large" htmlType="submit" style={{marginRight:'150px',marginTop:'20px'}}>保存</Button>
+						           	<Button  size="large" onClick={this.visitCancel}>取消</Button> */}
 					   			</FormItem>}
 					   		</Spin>
 					    </Form>

+ 63 - 57
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/intentionDetail.jsx

@@ -100,6 +100,8 @@ const IntentionDetail = React.createClass({
 //		}
 	},
 	componentWillReceiveProps(nextProps) {
+		console.log(nextProps);
+		
 		if(nextProps.modalVisible && nextProps.IntentionData.id) {
 			this.setState({
 				modalVisible:true,
@@ -112,59 +114,63 @@ const IntentionDetail = React.createClass({
 		})
 	},
 	render(){
-		return(
-			<div>
-				 <Modal	
-				      className="customeDetails"				      
-			          title="签单客户详情"
-			          width='1300px'
-			          visible={this.state.modalVisible}
-			          onOk={this.detailsModal}
-			          onCancel={this.detailsModal}
-			          footer=''
-			        >				    
-					     <Tabs onChange={this.callback} activeKey={this.state.callnub}>
-						    {this.props.detailApi.indexOf('Organization')>0?"":
-						    <TabPane tab="基本信息" key="1">
-						        <BasicPerson 
-						        	detailApi={this.props.detailApi}
-						        	closeDetail={this.closeDetail}
-						        	data={this.props.IntentionData}
-						        	IntentionState={this.state.IntentionState}
-						        	basicState={this.state.basicState}
-						        />
-						       
-							</TabPane>}
-						    <TabPane tab="联系人信息" key="2">
-						        <ContactPerson 
-							        closeDetail={this.closeDetail}
-							        data={this.props.IntentionData}
-							        contactState={this.state.contactState}
-							    />
-						    </TabPane>
-						    <TabPane tab="账户信息" key="3">
-						    		<Account 
-						    			 closeDetail={this.closeDetail}
-								         data={this.props.IntentionData}
-								         accountState={this.state.accountState}
-						    		/>
-						    </TabPane>
-							<TabPane tab="客户跟进" key="4">
-							     <Visit
-							     		closeDetail={this.closeDetail}
-								        data={this.props.IntentionData}
-								        visitState={this.state.visitState}
-							     />
-							</TabPane>						
-							<TabPane tab="业务意向" key="5">
-								<Business
-									closeDesc={this.props.closeDesc} 
-							    	closeDetail={this.closeDetail}
-								    data={this.props.IntentionData}
-								    businessState={this.state.businessState}
-							    />
-							</TabPane>
-							{/*
+		return (
+      <div>
+        <Modal
+          className="customeDetails"
+          title="签单客户详情"
+          width="1300px"
+          visible={this.state.modalVisible}
+          onOk={this.detailsModal}
+          onCancel={this.detailsModal}
+          footer=""
+        >
+          <Tabs onChange={this.callback} activeKey={this.state.callnub}>
+            {this.props.detailApi.indexOf("Organization") > 0 ? (
+              ""
+            ) : (
+              <TabPane tab="基本信息" key="1">
+                <BasicPerson
+                  detailApi={this.props.detailApi}
+                  closeDetail={this.closeDetail}
+                  data={this.props.IntentionData}
+                  IntentionState={this.state.IntentionState}
+                  basicState={this.state.basicState}
+                />
+              </TabPane>
+            )}
+            <TabPane tab="联系人信息" key="2">
+              <ContactPerson
+                closeDetail={this.closeDetail}
+                name={this.props.name}
+                data={this.props.IntentionData}
+                contactState={this.state.contactState}
+              />
+            </TabPane>
+            <TabPane tab="账户信息" key="3">
+              <Account
+                closeDetail={this.closeDetail}
+                data={this.props.IntentionData}
+                accountState={this.state.accountState}
+              />
+            </TabPane>
+            <TabPane tab="客户跟进" key="4">
+              <Visit
+			  	loadData={this.props.loadData}
+                closeDetail={this.closeDetail}
+                data={this.props.IntentionData}
+                visitState={this.state.visitState}
+              />
+            </TabPane>
+            <TabPane tab="业务意向" key="5">
+              <Business
+                closeDesc={this.props.closeDesc}
+                closeDetail={this.closeDetail}
+                data={this.props.IntentionData}
+                businessState={this.state.businessState}
+              />
+            </TabPane>
+            {/*
 							<TabPane tab="业务订单" key="6">
 							     								
 							</TabPane>
@@ -178,10 +184,10 @@ const IntentionDetail = React.createClass({
 							     								
 							</TabPane>
 							*/}
-						</Tabs>
-    			</Modal>
-			</div>
-		)
+          </Tabs>
+        </Modal>
+      </div>
+    );
 	}
 })
 export default IntentionDetail;

+ 152 - 115
js/component/manageCenter/customer/NEW/signCustomer/signCustomer.jsx

@@ -48,20 +48,25 @@ const IntentionCustomer = Form.create()(React.createClass({
 						let thisdata = data.data.list[i];
 						let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
 						theArr.push({
-							key: i,
-							id: thisdata.uid,
-							type: thisdata.type,
-							name: thisdata.name,
-							shareType:thisdata.shareType,
-							contacts:thisdata.contacts,
-							contactMobile:thisdata.contactMobile,
-							societyTag:thisdata.societyTag,
-							surplusSignTime:thisdata.surplusSignTime,
-							transferTime:thisdata.transferTime&&thisdata.transferTime.split(' ')[0],
-							lastSignTime:thisdata.lastSignTime&&thisdata.lastSignTime.split(' ')[0],
-							lastFollowTime:thisdata.lastFollowTime&&thisdata.lastFollowTime.split(' ')[0],
-							locationProvince: diqu,
-						});
+              key: i,
+              id: thisdata.uid,
+              type: thisdata.type,
+              name: thisdata.name,
+              shareType: thisdata.shareType,
+              contacts: thisdata.contacts,
+              contactMobile: thisdata.contactMobile,
+              societyTag: thisdata.societyTag,
+              surplusFollowTime: thisdata.surplusFollowTime,
+              surplusSignTime: thisdata.surplusSignTime,
+              transferTime:
+                thisdata.transferTime && thisdata.transferTime.split(" ")[0],
+              lastSignTime:
+                thisdata.lastSignTime && thisdata.lastSignTime.split(" ")[0],
+              lastFollowTime:
+                thisdata.lastFollowTime &&
+                thisdata.lastFollowTime.split(" ")[0],
+              locationProvince: diqu,
+            });
 					};
 					this.state.pagination.current = data.data.pageNo;
 				    this.state.pagination.total = data.data.totalCount;
@@ -85,87 +90,114 @@ const IntentionCustomer = Form.create()(React.createClass({
 
 	getInitialState() {
 		return {
-			addressSearch: [],
-			orgCodeUrl: [],
-			companyLogoUrl: [],
-			visible: false,
-			searchMore: true,
-			releaseDate: [],
-			visitModul:false,
-			keys:false,
-			detailApi:'',
-			followData:{},
-			selectedRowKeys: [],
-			selectedRowKey: [],
-			selectedRows: [],
-			loading: false,
-			modalVisible:false,
-			pagination: {
-				defaultCurrent: 1,
-				defaultPageSize: 10,
-				showQuickJumper: true,
-				pageSize: 10,
-				onChange: function(page) {
-					this.loadData(page);
-				}.bind(this),
-				showTotal: function(total) {
-					return '共' + total + '条数据';
-				}
-			},
-			columns: [{
-					title: '客户名称',
-					dataIndex: 'name',
-					key: 'name',
-				},{
-					title: '地区',
-					dataIndex: 'locationProvince',
-					key: 'locationProvince',
-				},
-				{
-					title: '最新签单日期',
-					dataIndex: 'lastSignTime',
-					key: 'lastSignTime',
-				},{
-					title: '最新跟进日期',
-					dataIndex: 'lastFollowTime',
-					key: 'lastFollowTime',
-				},
-				{
-					title: '剩余签单天数',
-					dataIndex: 'surplusSignTime',
-					key: 'surplusSignTime'
-				}, 
-				{
-					title: '联系人',
-					dataIndex: 'contacts',
-					key: 'contacts',
-				},
-				{
-					title: '联系电话',
-					dataIndex: 'contactMobile',
-					key: 'contactMobile',
-				},
-				{
-					title: '社会属性',
-					dataIndex: 'societyTag',
-					key: 'societyTag',
-					render:text=>{return getSocialAttribute(text) }
-				},
-				{
-					title: '操作',
-					dataIndex: 'abc',
-					key: 'abc',
-					render: (text, record, index) => {
-						return <div>
-                            <Button onClick={(e) =>{ e.stopPropagation(), this.visit(record)}} type="primary">客户跟进</Button>                            							    
-                            <Button style={{ marginLeft: 10 }} onClick={(e) =>{ e.stopPropagation(), this.zhuanjiaoDetail(record)}} type="primary">转交记录</Button>                            							    
-                        </div>
-					}
-				}
-			],
-			data: [],
-			dataSource: [],
-		};
+      addressSearch: [],
+      orgCodeUrl: [],
+      companyLogoUrl: [],
+      visible: false,
+      searchMore: true,
+      releaseDate: [],
+      visitModul: false,
+      keys: false,
+      detailApi: "",
+      followData: {},
+      selectedRowKeys: [],
+      selectedRowKey: [],
+      selectedRows: [],
+      loading: false,
+      modalVisible: false,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return "共" + total + "条数据";
+        },
+      },
+      columns: [
+        {
+          title: "客户名称",
+          dataIndex: "name",
+          key: "name",
+        },
+        {
+          title: "地区",
+          dataIndex: "locationProvince",
+          key: "locationProvince",
+        },
+        {
+          title: "最新签单日期",
+          dataIndex: "lastSignTime",
+          key: "lastSignTime",
+        },
+        {
+          title: "最新跟进日期",
+          dataIndex: "lastFollowTime",
+          key: "lastFollowTime",
+        },
+        {
+          title: "剩余私有天数",
+          dataIndex: "surplusFollowTime",
+          key: "surplusFollowTime",
+        },
+        {
+          title: "剩余签单天数",
+          dataIndex: "surplusSignTime",
+          key: "surplusSignTime",
+        },
+        {
+          title: "联系人",
+          dataIndex: "contacts",
+          key: "contacts",
+        },
+        {
+          title: "联系电话",
+          dataIndex: "contactMobile",
+          key: "contactMobile",
+        },
+        {
+          title: "社会属性",
+          dataIndex: "societyTag",
+          key: "societyTag",
+          render: (text) => {
+            return getSocialAttribute(text);
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "abc",
+          key: "abc",
+          render: (text, record, index) => {
+            return (
+              <div>
+                <Button
+                  onClick={(e) => {
+                    e.stopPropagation(), this.visit(record);
+                  }}
+                  type="primary"
+                >
+                  客户跟进
+                </Button>
+                <Button
+                  style={{ marginLeft: 10 }}
+                  onClick={(e) => {
+                    e.stopPropagation(), this.zhuanjiaoDetail(record);
+                  }}
+                  type="primary"
+                >
+                  转交记录
+                </Button>
+              </div>
+            );
+          },
+        },
+      ],
+      data: [],
+      dataSource: [],
+    };
 	},
 	zhuanjiaoDetail(record) {
 		this.setState({
@@ -275,7 +307,8 @@ const IntentionCustomer = Form.create()(React.createClass({
 			selectedRowKeys: [],
 			modalVisible:true,
 			basicState:true,
-			contactState:true,
+      contactState:true,
+      modalName: record.name
 		})
 	},
 	//指定转交人自动补全
@@ -359,9 +392,7 @@ const IntentionCustomer = Form.create()(React.createClass({
           ""
         )}
         <div className="content-title">
-          <span>
-            {!intentionState ? "我的单位签单客户" : "我的个人签单客户"}
-          </span>
+          <span>{!intentionState ? "项目签单客户" : "项目签单客户"}</span>
         </div>
         <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
           <TabPane tab="搜索" key="1">
@@ -398,23 +429,27 @@ const IntentionCustomer = Form.create()(React.createClass({
                   className="search-more"
                   style={this.state.searchMore ? { display: "none" } : {}}
                 > */}
-				<span>签单时间:</span>
-                  <RangePicker
-                    value={[
-                      this.state.releaseDate[0]
-                        ? moment(this.state.releaseDate[0])
-                        : null,
-                      this.state.releaseDate[1]
-                        ? moment(this.state.releaseDate[1])
-                        : null,
-                    ]}
-                    onChange={(data, dataString) => {
-                      this.setState({ releaseDate: dataString });
-                    }}
-                  />
-                {/* </div>
+              <span>签单时间:</span>
+              <RangePicker
+                value={[
+                  this.state.releaseDate[0]
+                    ? moment(this.state.releaseDate[0])
+                    : null,
+                  this.state.releaseDate[1]
+                    ? moment(this.state.releaseDate[1])
+                    : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ releaseDate: dataString });
+                }}
+              />
+              {/* </div>
               </div> */}
-              <Button type="primary" onClick={this.search} style={{ marginLeft: 10 }} >
+              <Button
+                type="primary"
+                onClick={this.search}
+                style={{ marginLeft: 10 }}
+              >
                 搜索
               </Button>
               <Button onClick={this.reset}>重置</Button>
@@ -455,7 +490,9 @@ const IntentionCustomer = Form.create()(React.createClass({
         <IntentionDetail
           detailApi={this.props.detailApi}
           IntentionData={this.state.RowData}
+          loadData={this.loadData}
           modalVisible={this.state.modalVisible}
+          name={this.state.modalName}
           closeDesc={this.closeDesc}
           basicState={this.state.basicState}
           contactState={this.state.contactState}

+ 10 - 2
js/component/manageCenter/set/business/businessProject.jsx

@@ -361,7 +361,8 @@ const BusinessProject=Form.create()(React.createClass({
 		                    contactsOption: theArr, 
 		                    orderStatusOptions:data.data,
 	                    });
-	                    
+	                    console.log(theArr);
+						
 					}.bind(this),
 				}).always(function () {
 				this.loadData(this.state.ispage);
@@ -409,8 +410,15 @@ const BusinessProject=Form.create()(React.createClass({
 					loading: true
 				});
 				let nameText=this.state.SuperArr
+				let num = 0 
+				nameText.forEach((item,index) => {
+					if(item.cname == this.state.editCname) {
+						num = index
+					}
+				})
 				// let superText=(this.state.editCname.length==1)?nameText[parseInt(this.state.editCname)].id:this.state.editCid;
-				let superText=nameText[parseInt(this.state.editCname)].id
+				// let superText=nameText[parseInt(this.state.editCname)].id
+				let superText=nameText[parseInt(num)].id
 				let isCountry=0;
 		    	let pro='';
 		        let city='';

+ 46 - 4
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.30",
+  "version": "1.1.46",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -1087,6 +1087,16 @@
       "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=",
       "dev": true
     },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
     "bluebird": {
       "version": "3.5.0",
       "resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.0.tgz",
@@ -1165,6 +1175,7 @@
       "resolved": "http://registry.npm.taobao.org/boom/download/boom-2.10.1.tgz",
       "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
       "dev": true,
+      "optional": true,
       "requires": {
         "hoek": "2.x.x"
       }
@@ -1481,6 +1492,7 @@
       "requires": {
         "anymatch": "^1.3.0",
         "async-each": "^1.0.0",
+        "fsevents": "^1.0.0",
         "glob-parent": "^2.0.0",
         "inherits": "^2.0.1",
         "is-binary-path": "^1.0.0",
@@ -1742,6 +1754,7 @@
       "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.5.tgz",
       "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
       "dev": true,
+      "optional": true,
       "requires": {
         "delayed-stream": "~1.0.0"
       }
@@ -2398,7 +2411,8 @@
       "version": "1.0.0",
       "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
-      "dev": true
+      "dev": true,
+      "optional": true
     },
     "depd": {
       "version": "1.1.2",
@@ -3014,7 +3028,8 @@
       "version": "1.3.0",
       "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
       "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
-      "dev": true
+      "dev": true,
+      "optional": true
     },
     "fast-deep-equal": {
       "version": "1.0.0",
@@ -3090,6 +3105,13 @@
         }
       }
     },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "dev": true,
+      "optional": true
+    },
     "filename-regex": {
       "version": "2.0.1",
       "resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz",
@@ -3330,6 +3352,17 @@
       "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
       "dev": true
     },
+    "fsevents": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "bindings": "^1.5.0",
+        "nan": "^2.12.1"
+      }
+    },
     "function-bind": {
       "version": "1.1.0",
       "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.0.tgz",
@@ -3630,7 +3663,8 @@
       "version": "2.16.3",
       "resolved": "http://registry.npm.taobao.org/hoek/download/hoek-2.16.3.tgz",
       "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
-      "dev": true
+      "dev": true,
+      "optional": true
     },
     "hoist-non-react-statics": {
       "version": "1.2.0",
@@ -5051,6 +5085,13 @@
       "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
       "dev": true
     },
+    "nan": {
+      "version": "2.14.1",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
+      "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
+      "dev": true,
+      "optional": true
+    },
     "nanomatch": {
       "version": "1.2.7",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.7.tgz",
@@ -9304,6 +9345,7 @@
             "anymatch": "^2.0.0",
             "async-each": "^1.0.0",
             "braces": "^2.3.0",
+            "fsevents": "^1.0.0",
             "glob-parent": "^3.1.0",
             "inherits": "^2.0.1",
             "is-binary-path": "^1.0.0",

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.44",
+  "version": "1.1.47",
   "description": "",
   "main": "index.js",
   "scripts": {
@@ -61,4 +61,4 @@
     "viewer": "^0.10.11",
     "xlsx-oc": "^1.0.2"
   }
-}
+}