caipin 5 éve
szülő
commit
3a7fbb2fc8

+ 7 - 4
app/cloudAjaxRouter.js

@@ -5,9 +5,7 @@ var express = require('express');
 var router = express.Router();
 var cloudAjaxController=require('./controller/cloudEditionAjaxController');
 
-router.get('/cloud/curing/ajax/curingInfo/:mobile', function(req, res, next) {
-    cloudAjaxController.getCuringInfo(req, res);
-});
+
 
 //------------用户列表界面相关----------------
 /**
@@ -20,7 +18,12 @@ router.get('/cloud/curing/ajax/refreshCuringPage', function(req, res, next) {
 router.get('/cloud/curing/ajax/getCuringPage/:currentPage', function(req, res, next) {
 	cloudAjaxController.refreshCuringPage(req, res);
 });
-
+/**
+ * 用户检索
+ */
+router.get('/cloud/curing/ajax/curingInfo/:mobile', function(req, res, next) {
+    cloudAjaxController.getCuringInfo(req, res);
+});
 
 
 

+ 2 - 2
app/controller/cloudEditionAjaxController.js

@@ -15,7 +15,7 @@ var cloudEditionAjaxController={
 		/**
 		 * 养护用户分页---废弃
 		 */
-		getCuringPage: async function(req, res){
+/*		getCuringPage: async function(req, res){
 		    var currentPage=req.params.currentPage;
 		    if(!hash.isNotANumber(currentPage)){
 		        res.json({ 'status': 2,'msg':'currentPage error' });return ;
@@ -26,7 +26,7 @@ var cloudEditionAjaxController={
 		    var curingList= await cloudService.getCuringList(req, res);
 
 		    res.json({ 'status': 1,'curingList':curingList.curingList,'pageData':curingList.pageData });
-		},	
+		},	*/
 		
 		/**
 		 * 用户列表刷新

+ 20 - 40
global/js/cloud/curing.js

@@ -8,36 +8,7 @@ var mobile='';
 var getClentListTimeout = null;
 var clientname='';
 
-//列表 手机号码检索功能
-function fnMobile2Info(){
-    mobile2InfoTimeout = null;
-    if((/^1[34578]\d{9}$/.test(mobile))) {
-        $.ajax({
-            cache :false,
-            type: 'GET',
-            url: '/cloud/curing/ajax/curingInfo/' + mobile,
-            //data: { mobile: mobile },
-            dataType: 'json',
 
-            context: $('body'),
-            success: function (data) {
-                if (data.status == 1) {
-                    fnStructureCuringUser([data.detail]);
-                    $('div[page]').hide();
-                } else if (data.status == 2) {
-                    $('div[curingListBox]').hide();
-                    $('p[upClientBox]').show();
-                    $('b[curingMobile]').html(mobile);
-                } else if (data.status == 3) {
-                    alert(data.msg);
-                }
-            },
-            error: function (xhr, type) {
-                console.log('Ajax error!')
-            }
-        })
-    }
-}
 
 function fnSearchCuring(){
     searchCuringTimeout = null;
@@ -263,9 +234,24 @@ $(function() {
     	refreshCuringPage(compilation,latestCompilation,'',sort);
     });
     
+    /**
+     * 通行证账号检索养护用户--缓冲300
+     */
+    $('input[mobile2Info]').on('keyup', function(e){
+        if(mobile2InfoTimeout != null){
+            clearTimeout(mobile2InfoTimeout);
+        }
+        mobile = $(this).val();
+        if((/^1[34578]\d{9}$/.test(mobile))) {
+            mobile2InfoTimeout = setTimeout(fnMobile2Info, 300);
+        }
+    });
     
     
-    //动态绑定 移除CLD客户事件
+//--------------用户详情界面相关---------
+    /**
+     * 动态绑定 移除CLD客户事件
+     */
     $('button[relieveClientDo]').on('click', function(e){
     //$('div[curinginfo]').delegate( 'a[relieveClientDo]','click', function(){
         // 只获取第一个选中的值
@@ -333,6 +319,9 @@ $(function() {
 
     });
 
+    
+    
+    
     //检索cld用户
     $('input[getClentList]').on('keyup', function(e){
         if(getClentListTimeout != null){
@@ -379,16 +368,7 @@ $(function() {
         }
     });
 
-    //列表 缓存激活号码检索
-    $('input[mobile2Info]').on('keyup', function(e){
-        if(mobile2InfoTimeout != null){
-            clearTimeout(mobile2InfoTimeout);
-        }
-        mobile = $(this).val();
-        if((/^1[34578]\d{9}$/.test(mobile))) {
-            mobile2InfoTimeout = setTimeout(fnMobile2Info, 300);
-        }
-    });
+    
     //列表 号码检索事件绑定
     $('div[mobile2Info]').on('click', function(e){
         mobile=$('input[mobile2Info]').val();

+ 39 - 1
global/js/cloud/curingFN.js

@@ -18,4 +18,42 @@ function refreshCuringPage(compilation,latestCompilation,sortField,sort){
         }
     })
     
-}
+}
+
+//列表 手机号码检索功能
+/**
+ * 通行证账号检索用户--刷新列表和分页
+ * @returns
+ */
+function fnMobile2Info(){
+    mobile2InfoTimeout = null;
+    if((/^1[34578]\d{9}$/.test(mobile))) {
+        $.ajax({
+            cache :false,
+            type: 'GET',
+            url: '/cloud/curing/ajax/curingInfo/' + mobile,
+            //data: { mobile: mobile },
+            dataType: 'json',
+
+            context: $('body'),
+            success: function (data) {
+                if (data.status == 1) {
+                    fnStructureCuringUser([data.detail]);
+                    $('div[pageDetail]').hide();
+                } 
+//                else if (data.status == 2) {
+//                    $('div[curingListBox]').hide();
+//                    $('p[upClientBox]').show();
+//                    $('b[curingMobile]').html(mobile);
+//                } 
+                else if (data.status == 3) {
+                    alert(data.msg);
+                }
+            },
+            error: function (xhr, type) {
+                console.log('Ajax error!')
+            }
+        })
+    }
+}
+