Selaa lähdekoodia

营销账户修改
图片组件修改

mentoswzq 4 vuotta sitten
vanhempi
commit
1e869f44a5

+ 10 - 19
js/component/common/imgList/index.js

@@ -153,9 +153,8 @@ class ImgList extends Component{
                                         message.error('图片上传失败,请重新上传!');
                                         message.error('图片上传失败,请重新上传!');
                                     }
                                     }
                                     //用于控制进度条
                                     //用于控制进度条
-                                    if(infor.file && infor.file.status !== 'removed' && Object.keys(infor.event).length > 0){
+                                    if(infor.file && infor.file.status !== 'removed' && infor.event){
                                         let percent = 0;
                                         let percent = 0;
-                                        console.log(infor.event,'infor.event')
                                         this.state.newUploadInforArr[infor.file.uid] = infor.event.percent;
                                         this.state.newUploadInforArr[infor.file.uid] = infor.event.percent;
                                         this.setState({
                                         this.setState({
                                             newUploadInforArr:this.state.newUploadInforArr
                                             newUploadInforArr:this.state.newUploadInforArr
@@ -188,14 +187,13 @@ class ImgList extends Component{
                                                 },1500)
                                                 },1500)
                                             })
                                             })
                                         }
                                         }
-                                    }else{
+                                    }else if(infor.file && infor.file.status === 'removed'){
                                         this.setState({
                                         this.setState({
                                             percent: 0,
                                             percent: 0,
                                             newUploadArr: [],
                                             newUploadArr: [],
                                             newUploadInforArr: {}
                                             newUploadInforArr: {}
                                         })
                                         })
                                     }
                                     }
-                                    //-----------------------------------
                                 }
                                 }
                             }}
                             }}
                         >
                         >
@@ -217,21 +215,14 @@ class ImgList extends Component{
                         ))
                         ))
                     }
                     }
                 </ul>
                 </ul>
-                {this.state.uploadLoading ? <div style={{
-                    position:"fixed",
-                    top: 0,
-                    bottom: 0,
-                    left: 0,
-                    right: 0,
-                    zIndex: 9999999999,
-                    background: 'rgba(0,0,0,.8)',
-                    display:"flex",
-                    flexFlow:'column',
-                    alignItems:'center',
-                    justifyContent:'center',
-                }}>
-                    <Progress style={{color:'#FFF'}} type="circle" status="active" percent={parseFloat(this.state.percent * 100).toFixed(0)} />
-                    <div style={{color:'#FFF',paddingTop:'15px'}}>图片上传中...</div>
+                {this.state.uploadLoading ? <div className='mask'>
+                    <Progress
+                        className='progress'
+                        type="circle"
+                        status="active"
+                        percent={parseFloat(this.state.percent * 100).toFixed(0)}
+                    />
+                    <div className='promptText'>图片上传中...</div>
                 </div> : <div/>}
                 </div> : <div/>}
             </div>
             </div>
         )
         )

+ 20 - 0
js/component/common/imgList/index.less

@@ -42,6 +42,26 @@
     color: #0e77ca;
     color: #0e77ca;
     cursor: pointer;
     cursor: pointer;
   }
   }
+  .mask{
+    position:fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 9999999999;
+    background: rgba(0,0,0,.8);
+    display:flex;
+    flex-flow:column;
+    align-items:center;
+    justify-content:center;
+    .progress{
+      color: #FFF;
+    }
+    .promptText{
+      color: #FFF;
+      padding-top: 15px;
+    }
+  }
 }
 }
 .actionBar{
 .actionBar{
   position: relative;
   position: relative;

+ 28 - 5
js/component/manageCenter/customer/NEW/crm/patentPayment.jsx

@@ -303,7 +303,6 @@ const PatentPayment = Form.create()(React.createClass({
 		    });
 		    });
 		    theorgCodeUrl = picArr.join(",");
 		    theorgCodeUrl = picArr.join(",");
 		};
 		};
-		console.log(typeof theorgCodeUrl)
 		if (!this.state.patentNo) {
 		if (!this.state.patentNo) {
 			message.warning('专利号不能为空')
 			message.warning('专利号不能为空')
 			return
 			return
@@ -316,9 +315,19 @@ const PatentPayment = Form.create()(React.createClass({
 		    message.warning('专利类型不能为空');
 		    message.warning('专利类型不能为空');
 		    return
 		    return
 		}
 		}
+		let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
+		if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
+			message.warning('电话格式不正确');
+			return
+		}
+		let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
 		if(this.state.email === ''){
 		if(this.state.email === ''){
-		    message.warning('电子邮箱不能为空');
-		    return
+			message.warning('电子邮箱不能为空');
+			return
+		}
+		if(!emailReg.test(this.state.email)){
+			message.warning('电子邮箱格式不正确');
+			return
 		}
 		}
 		$.ajax({
 		$.ajax({
 			method: "POST",
 			method: "POST",
@@ -393,6 +402,20 @@ const PatentPayment = Form.create()(React.createClass({
 		    message.warning('专利类型不能为空');
 		    message.warning('专利类型不能为空');
 		    return
 		    return
 		}
 		}
+		let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
+		if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
+			message.warning('电话格式不正确');
+			return
+		}
+		let emailReg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
+		if(this.state.email === ''){
+			message.warning('电子邮箱不能为空');
+			return
+		}
+		if(!emailReg.test(this.state.email)){
+			message.warning('电子邮箱格式不正确');
+			return
+		}
 		$.ajax({
 		$.ajax({
 			method: "POST",
 			method: "POST",
 			dataType: "json",
 			dataType: "json",
@@ -856,7 +879,7 @@ const PatentPayment = Form.create()(React.createClass({
             </div> : <div/>}
             </div> : <div/>}
           </Modal> : <div/>}
           </Modal> : <div/>}
 
 
-          <Modal
+			{this.state.visible ?<Modal
             maskClosable={false}
             maskClosable={false}
             visible={this.state.visible}
             visible={this.state.visible}
             onOk={this.visitOk}
             onOk={this.visitOk}
@@ -1069,7 +1092,7 @@ const PatentPayment = Form.create()(React.createClass({
                 保存
                 保存
               </Button>
               </Button>
             </div>
             </div>
-          </Modal>
+          </Modal> : <div/>}
         </div>
         </div>
       </div>
       </div>
     );
     );

+ 9 - 8
js/component/manageCenter/customer/NEW/publicCustomer/publicCustomer.jsx

@@ -105,15 +105,16 @@ const QueryCustomer = React.createClass({
 					title: '地区',
 					title: '地区',
 					dataIndex: 'locationProvince',
 					dataIndex: 'locationProvince',
 					key: 'locationProvince',
 					key: 'locationProvince',
-				},{
-					title: '联系人',
-					dataIndex: 'contacts',
-					key: 'contacts',
-				},{
-					title: '联系电话',
-					dataIndex: 'contactMobile',
-					key: 'contactss',
 				},
 				},
+				// {
+				// 	title: '联系人',
+				// 	dataIndex: 'contacts',
+				// 	key: 'contacts',
+				// },{
+				// 	title: '联系电话',
+				// 	dataIndex: 'contactMobile',
+				// 	key: 'contactss',
+				// },
 				{
 				{
 					title: '创建时间',
 					title: '创建时间',
 					dataIndex: 'createTime',
 					dataIndex: 'createTime',

+ 7 - 11
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -44,16 +44,11 @@ const QueryCustomer = React.createClass({
               (thisdata.province == null ? "" : thisdata.province) +
               (thisdata.province == null ? "" : thisdata.province) +
               (thisdata.city == null ? "" : "-" + thisdata.city) +
               (thisdata.city == null ? "" : "-" + thisdata.city) +
               (thisdata.area == null ? "" : "-" + thisdata.area);
               (thisdata.area == null ? "" : "-" + thisdata.area);
-            theArr.push({
-              key: i,
-              id: thisdata.uid,
-              name: thisdata.name,
-              adminName: thisdata.adminName,
-              informationMaintainer: thisdata.informationMaintainer,
-              createTime:
-                thisdata.createTime && thisdata.createTime.split(" ")[0],
-              locationProvince: diqu,
-            });
+            thisdata.key = i;
+            thisdata.id = thisdata.uid;
+            thisdata.createTime = thisdata.createTime && thisdata.createTime.split(" ")[0];
+            thisdata.locationProvince = diqu;
+            theArr.push(thisdata);
           }
           }
           this.state.pagination.current = data.data.pageNo;
           this.state.pagination.current = data.data.pageNo;
           this.state.pagination.total = data.data.totalCount;
           this.state.pagination.total = data.data.totalCount;
@@ -173,13 +168,14 @@ const QueryCustomer = React.createClass({
             return (
             return (
               <div>
               <div>
                 <Button
                 <Button
+                  disabled={record.signBills === 0}
                   onClick={(e) => {
                   onClick={(e) => {
                     e.stopPropagation(), this.seeDetail(record);
                     e.stopPropagation(), this.seeDetail(record);
                   }}
                   }}
 				  type="primary"
 				  type="primary"
 				  style={{ marginRight: 10 }}
 				  style={{ marginRight: 10 }}
                 >
                 >
-                  查看详情
+                  {record.signBills === 0 ? '暂未签单' : '查看详情'}
                 </Button>
                 </Button>
                 <Button
                 <Button
                   onClick={(e) => {
                   onClick={(e) => {

+ 28 - 28
js/component/manageCenter/customer/NEW/signCustomer/signCustomer.jsx

@@ -130,34 +130,34 @@ const IntentionCustomer = Form.create()(React.createClass({
         },
         },
         {
         {
           title: "最新签单日期",
           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",
+          dataIndex: "transferTime",
+          key: "transferTime",
         },
         },
+        // {
+        //   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: "社会属性",
           title: "社会属性",
           dataIndex: "societyTag",
           dataIndex: "societyTag",
@@ -392,7 +392,7 @@ const IntentionCustomer = Form.create()(React.createClass({
           ""
           ""
         )}
         )}
         <div className="content-title">
         <div className="content-title">
-          <span>{!intentionState ? "项目签单客户" : "项目签单客户"}</span>
+          <span>{!intentionState ? "签单客户" : "签单客户"}</span>
         </div>
         </div>
         <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
         <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
           <TabPane tab="搜索" key="1">
           <TabPane tab="搜索" key="1">

+ 15 - 1
js/component/manageCenter/index/content.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
 import React from 'react';
-import { Spin, Button, Tabs, Table, message, Modal } from 'antd';
+import { Spin, Button, Tabs, Table, message, Modal,Tooltip } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import $ from 'jquery/src/ajax';
 
 
@@ -64,6 +64,20 @@ const MessageModal = React.createClass({
                     title: '内容',
                     title: '内容',
                     dataIndex: 'content',
                     dataIndex: 'content',
                     key: 'content',
                     key: 'content',
+                    render: (text, record) => {
+                        return(
+                            <Tooltip placement="topLeft" title={text}>
+                                <div style={{
+                                    maxWidth: '687px',
+                                    textOverflow: "ellipsis",
+                                    whiteSpace: "nowrap",
+                                    overflow: 'hidden',
+                                }}>
+                                    {text}
+                                </div>
+                            </Tooltip>
+                        )
+                    }
                 },
                 },
                 //  {
                 //  {
                 //     title: '公司',
                 //     title: '公司',