dev01 пре 2 година
родитељ
комит
10d2dfdb0d

+ 61 - 37
js/component/common/enterpriseNameChange/index.jsx

@@ -1,17 +1,17 @@
-import React,{Component} from "react";
-import {Button, Input, message, Modal, Popconfirm, Spin, Table, Tooltip} from "antd";
+import React, { Component } from "react";
+import { Button, Input, message, Modal, Popconfirm, Spin, Table, Tooltip } from "antd";
 import InforChange from './inforChange';
 
 import './index.less';
 import $ from "jquery/src/ajax";
 
-class EnterpriseNameChange extends Component{
+class EnterpriseNameChange extends Component {
     constructor(props) {
         super(props);
-        this.state={
-            visible:false,
-            enterpriseName:'',
-            loading:false,
+        this.state = {
+            visible: false,
+            enterpriseName: '',
+            loading: false,
             colunmn: [
                 {
                     title: "操作人名称",
@@ -22,14 +22,14 @@ class EnterpriseNameChange extends Component{
                     title: "客户名称",
                     dataIndex: "name",
                     key: "name",
-                    render:(text)=>{
+                    render: (text) => {
                         return (
                             <Tooltip title={text}>
                                 <div style={{
-                                    maxWidth:'150px',
-                                    overflow:'hidden',
+                                    maxWidth: '150px',
+                                    overflow: 'hidden',
                                     textOverflow: "ellipsis",
-                                    whiteSpace:'nowrap',
+                                    whiteSpace: 'nowrap',
                                 }}>{text}</div>
                             </Tooltip>
                         )
@@ -41,24 +41,42 @@ class EnterpriseNameChange extends Component{
                     key: "createTimes",
                 },
             ],
-            dataSource:[]
+            dataSource: []
         }
         this.onCancel = this.onCancel.bind(this);
         this.onOk = this.onOk.bind(this);
     }
 
-    onCancel(){
+    onCancel() {
         this.setState({
-            visible:false,
-            loading:false,
+            visible: false,
+            loading: false,
         })
     }
 
-    onOk(){
-        if(!this.state.enterpriseName){
-            message.warning('请输入企业名称');
+    onOk() {
+        if (!this.state.enterpriseName) {
+            message.warning('请输入企业名称');
             return;
         }
+        let re = new RegExp("^[\u4e00-\u9fa5]");
+        if (!re.test(this.state.enterpriseName)) {
+            message.warning('公司名称必须以汉字开头!')
+            return
+        }
+        if (!re.test(this.state.enterpriseName.charAt(this.state.enterpriseName.length - 1))) {
+            message.warning('公司名称必须以汉字结尾!')
+            return
+        }
+        if (this.state.enterpriseName.length > 64) {
+            message.warning('公司名称字数不超过64个!')
+            return;
+        };
+        let regu = /[`~!#$%^&*'_[\]+=<>?:"{}|~!#¥%……&*=-@-!{}|/《》?:“”【】、;;‘’,,.。、\s+]/g;
+        if (regu.test(this.state.enterpriseName)) {
+            message.warning('公司名称不能存在特殊符号或空格!')
+            return false;
+        }
         this.setState({
             loading: true
         });
@@ -66,21 +84,21 @@ class EnterpriseNameChange extends Component{
             url: globalConfig.context + "/api/admin/customer/updateUserName",
             method: "post",
             data: {
-                uid:this.props.enterpriseId,
-                userName:this.state.enterpriseName
+                uid: this.props.enterpriseId,
+                userName: this.state.enterpriseName
             }
         }).done(
-            function(data) {
+            function (data) {
                 this.setState({
                     loading: false
                 });
                 if (data.error.length === 0) {
                     message.success("恭喜您,更名成功!");
                     this.setState({
-                        visible:false
+                        visible: false
                     })
                     this.props.onChangeSuccess(this.state.enterpriseName);
-                }else{
+                } else {
                     message.warning(data.error[0].message);
                 }
             }.bind(this)
@@ -106,9 +124,9 @@ class EnterpriseNameChange extends Component{
                     }
                 } else {
                     this.setState({
-                        initialName:data.data[0] ? data.data[0].name : ''
+                        initialName: data.data[0] ? data.data[0].name : ''
                     })
-                    data.data.splice(0,1);
+                    data.data.splice(0, 1);
                     this.setState({
                         dataSource: data.data,
                     });
@@ -132,15 +150,15 @@ class EnterpriseNameChange extends Component{
                     disabled={this.props.disabled}
                     loading={this.state.loading}
                     style={this.props.style}
-                    onClick={()=>{
-                        if(this.props.type === 'journal'){
+                    onClick={() => {
+                        if (this.props.type === 'journal') {
                             this.loadData();
                         }
                         this.setState({
-                            visible:true
+                            visible: true
                         })
-                }}>
-                    {this.props.type === 'journal' ? '更改日志': this.props.type === 'modify' ? '企业更名': ''}
+                    }}>
+                    {this.props.type === 'journal' ? '更改日志' : this.props.type === 'modify' ? '企业更名' : ''}
                 </Button>
                 {
                     this.props.changeOtherInfor ?
@@ -153,8 +171,8 @@ class EnterpriseNameChange extends Component{
                 <Modal
                     footer={null}
                     maskClosable={false}
-                    width={this.props.type === 'journal' ? '1200px': this.props.type === 'modify' ? '300px': ''}
-                    title={this.props.type === 'journal' ? '更名日志': this.props.type === 'modify' ? '企业更名': ''}
+                    width={this.props.type === 'journal' ? '1200px' : this.props.type === 'modify' ? '300px' : ''}
+                    title={this.props.type === 'journal' ? '更名日志' : this.props.type === 'modify' ? '企业更名' : ''}
                     visible={this.state.visible}
                     onCancel={this.onCancel}>
                     <div>
@@ -178,7 +196,7 @@ class EnterpriseNameChange extends Component{
                                 </div>
                             </div> : this.props.type === 'journal' ?
                                 <div>
-                                    {this.state.initialName ? <div style={{paddingBottom:'20px'}}>
+                                    {this.state.initialName ? <div style={{ paddingBottom: '20px' }}>
                                         初始客户名称:{this.state.initialName}
                                     </div> : null}
                                     <Spin spinning={this.state.loading} >
@@ -195,10 +213,16 @@ class EnterpriseNameChange extends Component{
                         }
                         {
                             this.props.type === 'modify' ?
-                                <Popconfirm placement="top" title="确定要修改吗?" onConfirm={(e)=>{
-                                    e.stopPropagation();
-                                    this.onOk();
-                                }} okText="确定" cancelText="取消">
+                                <Popconfirm
+                                    placement="top"
+                                    title="确定要修改吗?"
+                                    onConfirm={(e) => {
+                                        e.stopPropagation();
+                                        this.onOk();
+                                    }}
+                                    okText="确定"
+                                    cancelText="取消"
+                                >
                                     <Button type='primary' onClick={this.handleCancel}>
                                         确定修改
                                     </Button>

+ 1 - 1
js/component/dataDic.js

@@ -3669,7 +3669,7 @@ module.exports = {
         },
         {
           value: "2",
-          key: "项目验收",
+          key: "项目完成",
         },
       ],
     },

Разлика између датотеке није приказан због своје велике величине
+ 405 - 374
js/component/manageCenter/customer/NEW/intentionCustomer/addIntention.jsx


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

@@ -1,5 +1,5 @@
 import React from 'react';
-import {Modal,Tabs  } from 'antd';
+import { Modal, Tabs } from 'antd';
 const TabPane = Tabs.TabPane;
 import Basic from './detail/basic.jsx';
 import ajax from 'jquery/src/ajax/xhr.js';
@@ -11,46 +11,46 @@ import Business from './detail/business.jsx';
 import BasicPerson from './detail/basicPerson.jsx';
 
 const IntentionDetail = React.createClass({
-	getInitialState(){
-		return{
-			modalVisible:false,
-			switchState:false,
-			contactData:[],
-			contactState:true,
-			IntentionState:false,
-			businessState:false,
-			visitState:false,
-			accountState:false,
-			basicState:false
+	getInitialState() {
+		return {
+			modalVisible: false,
+			switchState: false,
+			contactData: [],
+			contactState: true,
+			IntentionState: false,
+			businessState: false,
+			visitState: false,
+			accountState: false,
+			basicState: false
 		}
 	},
-	detailsModal(){
+	detailsModal() {
 		this.setState({
-			basicState:false,
-			modalVisible:false
+			basicState: false,
+			modalVisible: false
 		})
-		this.props.closeDesc(false,true)
+		this.props.closeDesc(false, true)
 	},
 	//详情tab切换数据处理
 	callback(e) {
-		if(e == '1') {
+		if (e == '1') {
 			this.setState({
-				IntentionState:true,
-				contactState:false,
-				accountState:false,
-				visitState:false,
-				businessState:false,
-				basicState:true
+				IntentionState: true,
+				contactState: false,
+				accountState: false,
+				visitState: false,
+				businessState: false,
+				basicState: true
 			})
 		}
-		if(e == '2') {
+		if (e == '2') {
 			this.setState({
-				IntentionState:false,
-				contactState:true,
-				accountState:false,
-				visitState:false,
-				businessState:false,
-				basicState:false
+				IntentionState: false,
+				contactState: true,
+				accountState: false,
+				visitState: false,
+				businessState: false,
+				basicState: false
 			})
 		}
 		// if(e == '3') {
@@ -63,24 +63,24 @@ const IntentionDetail = React.createClass({
 		// 		basicState:false
 		// 	})
 		// }
-		if(e == '4') {
+		if (e == '4') {
 			this.setState({
-				IntentionState:false,
-				contactState:false,
-				accountState:false,
-				visitState:true,
-				businessState:false,
-				basicState:false
+				IntentionState: false,
+				contactState: false,
+				accountState: false,
+				visitState: true,
+				businessState: false,
+				basicState: false
 			})
 		}
-		if(e == '5') {
+		if (e == '5') {
 			this.setState({
-				IntentionState:false,
-				contactState:false,
-				accountState:false,
-				visitState:false,
-				businessState:true,
-				basicState:false
+				IntentionState: false,
+				contactState: false,
+				accountState: false,
+				visitState: false,
+				businessState: true,
+				basicState: false
 			})
 		}
 		this.setState({
@@ -88,87 +88,87 @@ const IntentionDetail = React.createClass({
 		})
 	},
 	//取消函数
-	closeDetail(e,s){
+	closeDetail(e, s) {
 		this.setState({
-			basicState:false,
-			modalVisible:e,
+			basicState: false,
+			modalVisible: e,
 		})
-		if(s){
-			this.props.closeDesc(false,true)
+		if (s) {
+			this.props.closeDesc(false, true)
 		}
 	},
 	componentWillReceiveProps(nextProps) {
-		if(nextProps.modalVisible && nextProps.IntentionData.id) {
+		if (nextProps.modalVisible && nextProps.IntentionData.id) {
 			this.setState({
-				modalVisible:true,
-				callnub:this.props.isCustomerAdmin ? '2' : (nextProps.isGuidanceLv ? (nextProps.tabsKey ? nextProps.tabsKey : "4") : (nextProps.tabsKey ? nextProps.tabsKey : (nextProps.detailApi.indexOf('Organization'))>0?"2":'1')),
+				modalVisible: true,
+				callnub: this.props.isCustomerAdmin ? '2' : (nextProps.isGuidanceLv ? (nextProps.tabsKey ? nextProps.tabsKey : "4") : (nextProps.tabsKey ? nextProps.tabsKey : (nextProps.detailApi.indexOf('Organization')) > 0 ? "2" : '1')),
 			})
 		};
 		this.setState({
-			basicState:nextProps.basicState,
-			contactState:nextProps.contactState,
+			basicState: nextProps.basicState,
+			contactState: nextProps.contactState,
 		})
 	},
-	render(){
-		return(
+	render() {
+		return (
 			<div>
 				{this.state.modalVisible ? <Modal
-				      className="customeDetails"
-			          title="意向客户详情"
-			          width='1800px'
-			          visible={this.state.modalVisible}
-			          onOk={this.detailsModal}
-			          onCancel={this.detailsModal}
-			          footer=''
-			        >
-					     <Tabs onChange={this.callback} activeKey={this.state.callnub}>
-						    {this.props.isGuidanceLv || 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}
-						        />
+					className="customeDetails"
+					title="意向客户详情"
+					width='1800px'
+					visible={this.state.modalVisible}
+					onOk={this.detailsModal}
+					onCancel={this.detailsModal}
+					footer=''
+				>
+					<Tabs onChange={this.callback} activeKey={this.state.callnub}>
+						{this.props.isGuidanceLv || 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>}
-							 {!this.props.isGuidanceLv || this.props.isCustomerAdmin ? <TabPane tab="联系人信息" key="2">
-						        <ContactPerson
-									isCustomerAdmin={this.props.isCustomerAdmin}
-									closeDetail={this.closeDetail}
-									name={this.props.name}
-							        data={this.props.IntentionData}
-							        contactState={this.state.contactState}
-							    />
-						    </TabPane> : ""}
-							{/* {!this.props.isGuidanceLv ? <TabPane tab="账户信息" key="3">*/}
-					    	{/*	<Account*/}
-							{/*		 isGuidanceLv={this.props.isGuidanceLv}  //用于判断是否为跟进管理页面*/}
-					    	{/*		 closeDetail={this.closeDetail}*/}
-							{/*         data={this.props.IntentionData}*/}
-							{/*         accountState={this.state.accountState}*/}
-					    	{/*	/>*/}
-						    {/*</TabPane>: ""}*/}
-							<TabPane tab="客户跟进" key="4">
-							    <Visit
-									isGuidanceLv={this.props.isGuidanceLv}
-									isEditGuidanceLv={this.props.isEditGuidanceLv}
-						     		categoryArr={this.props.categoryArr}
-						     		closeDetail={this.closeDetail}
-							        data={this.props.IntentionData}
-							        visitState={this.state.visitState}
-							     />
-							</TabPane>
-							<TabPane tab="业务意向" key="5">
-							    <Business
-							    	closeDetail={this.closeDetail}
-								    data={this.props.IntentionData}
-								    businessState={this.state.businessState}
-							    />
-							</TabPane>
-						</Tabs>
-    			</Modal> : <div/>}
+						{!this.props.isGuidanceLv || this.props.isCustomerAdmin ? <TabPane tab="联系人信息" key="2">
+							<ContactPerson
+								isCustomerAdmin={this.props.isCustomerAdmin}
+								closeDetail={this.closeDetail}
+								name={this.props.name}
+								data={this.props.IntentionData}
+								contactState={this.state.contactState}
+							/>
+						</TabPane> : ""}
+						{/* {!this.props.isGuidanceLv ? <TabPane tab="账户信息" key="3">*/}
+						{/*	<Account*/}
+						{/*		 isGuidanceLv={this.props.isGuidanceLv}  //用于判断是否为跟进管理页面*/}
+						{/*		 closeDetail={this.closeDetail}*/}
+						{/*         data={this.props.IntentionData}*/}
+						{/*         accountState={this.state.accountState}*/}
+						{/*	/>*/}
+						{/*</TabPane>: ""}*/}
+						<TabPane tab="客户跟进" key="4">
+							<Visit
+								isGuidanceLv={this.props.isGuidanceLv}
+								isEditGuidanceLv={this.props.isEditGuidanceLv}
+								categoryArr={this.props.categoryArr}
+								closeDetail={this.closeDetail}
+								data={this.props.IntentionData}
+								visitState={this.state.visitState}
+							/>
+						</TabPane>
+						<TabPane tab="业务意向" key="5">
+							<Business
+								closeDetail={this.closeDetail}
+								data={this.props.IntentionData}
+								businessState={this.state.businessState}
+							/>
+						</TabPane>
+					</Tabs>
+				</Modal> : <div />}
 			</div>
 		)
 	}

+ 26 - 14
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -13,7 +13,11 @@ const confirm = Modal.confirm;
 
 const { TabPane } = Tabs
 const QueryCustomer = React.createClass({
+  //
   loadData(pageNo, apiUrl) {
+    if (!this.state.nameSearch) {
+      return
+    }
     this.setState({
       visitModul: false,
       loading: true,
@@ -114,6 +118,7 @@ const QueryCustomer = React.createClass({
       }.bind(this)
     );
   },
+  //
   getInitialState() {
     return {
       addressSearch: [],
@@ -142,7 +147,6 @@ const QueryCustomer = React.createClass({
           title: "客户名称",
           dataIndex: "name",
           key: "name",
-          width: 300,
           render: (text, record) => {
             return (
               <span style={{ display: 'flex', alignItems: 'flex-start' }}>
@@ -169,7 +173,6 @@ const QueryCustomer = React.createClass({
           title: "共享类型",
           dataIndex: "shareType",
           key: "shareType",
-          width: 100,
           //0-私有 1-公共 2 签单
           render: (text) => {
             return (
@@ -183,25 +186,22 @@ const QueryCustomer = React.createClass({
           title: "地区",
           dataIndex: "locationProvince",
           key: "locationProvince",
-          width: 200,
         },
         {
           title: "创建时间",
           dataIndex: "createTime",
           key: "createTime",
-          width: 160,
+          width: 80,
         },
         {
           title: "客户所属人",
           dataIndex: "adminName",
           key: "adminName",
-          width: 160,
         },
         {
           title: "资料所属人",
           dataIndex: "informationMaintainer",
           key: "informationMaintainer",
-          width: 160,
         },
         {
           title: "操作",
@@ -253,6 +253,7 @@ const QueryCustomer = React.createClass({
       ],
     };
   },
+  //
   receive(e) {
     this.setState({
       loading: true,
@@ -277,38 +278,49 @@ const QueryCustomer = React.createClass({
       };
     }.bind(this));
   },
+  //
   zhuanjiaoDetailCancel() {
     this.setState({
       zhuanjiaoVisible: false,
     });
   },
+  //
   zhuanjiaoLog(record) {
     this.setState({
       zhuanjiaoVisible: true,
       zhuanjiaoId: record.id,
     });
   },
+  //
   seeDetail(record) {
     this.setState({
       data: record,
       visitModul: true,
     });
   },
+  //
   closeDesc(e) {
     this.state.visitModul = e;
   },
+  //
   search() {
     this.loadData();
   },
+  //
   reset() {
-    this.state.nameSearch = "";
-    this.state.departmenttSearch = undefined;
-    this.state.theTypes = "";
-    this.state.auto = "";
-    this.state.provinceSearch = undefined;
-    this.state.addressSearch = [];
-    this.loadData();
+    this.setState({
+      nameSearch: undefined,
+      departmenttSearch: undefined,
+      theTypes: undefined,
+      auto: undefined,
+      provinceSearch: undefined,
+      addressSearch: [],
+      dataSource: []
+    })
+    // this.loadData();
   },
+
+
   componentWillReceiveProps(nextProps) {
     if (nextProps.ApiUrl != this.props.ApiUrl) {
       this.state.nameSearch = "";
@@ -319,7 +331,7 @@ const QueryCustomer = React.createClass({
   },
 
   componentWillMount() {
-    this.departmentList();
+    // this.departmentList();
     //城市
     let Province = [];
     provinceList.map(function (item) {

+ 2 - 1
js/component/manageCenter/customer/managementFollow/followUpSummary/index.jsx

@@ -208,7 +208,8 @@ class FollowUpSummary extends Component {
             this.state.deps == undefined &&
             this.state.releaseDate.length == 0 &&
             this.state.releaseDate1.length == 0 &&
-            this.state.releaseDate2.length == 0
+            this.state.releaseDate2.length == 0 &&
+            this.props.shiroType == 2
         ) {
             message.warning("请先填写筛选条件!");
             return

+ 13 - 12
js/component/manageCenter/order/orderNew/addService.jsx

@@ -1172,6 +1172,7 @@ const NewService = Form.create()(
               }
               if (this.state.getLoad) {
                 let arr = record.arr || [];
+                console.log("record==", record)
                 return (
                   <div>
                     <Select
@@ -5120,12 +5121,12 @@ const NewService = Form.create()(
                   return (
                     <Tooltip title={text}>
                       <div
-                        // style={{
-                        //   width: 100,
-                        //   overflow: "hidden",
-                        //   whiteSpace: "nowrap",
-                        //   textOverflow: "ellipsis",
-                        // }}
+                      // style={{
+                      //   width: 100,
+                      //   overflow: "hidden",
+                      //   whiteSpace: "nowrap",
+                      //   textOverflow: "ellipsis",
+                      // }}
                       >{text}</div>
                     </Tooltip>
                   )
@@ -5244,12 +5245,12 @@ const NewService = Form.create()(
                   return (
                     <Tooltip title={text}>
                       <div
-                        // style={{
-                        //   width: 100,
-                        //   overflow: "hidden",
-                        //   whiteSpace: "nowrap",
-                        //   textOverflow: "ellipsis",
-                        // }}
+                      // style={{
+                      //   width: 100,
+                      //   overflow: "hidden",
+                      //   whiteSpace: "nowrap",
+                      //   textOverflow: "ellipsis",
+                      // }}
                       >{text}</div>
                     </Tooltip>
                   )

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.38",
+  "version": "1.2.40",
   "description": "",
   "main": "index.js",
   "scripts": {