Przeglądaj źródła

双汇Android app 修改

miaofuhao 5 lat temu
rodzic
commit
a4da7a93d4

+ 16 - 2
双汇APP-andriod/js/huayi.http.js

@@ -1,5 +1,4 @@
1 1
 var helper = {};
2
-
3 2
 helper.http = {
4 3
     newXMLHttp: function () {
5 4
         var XMLHttp = null;
@@ -136,7 +135,6 @@ helper.cookies = {
136 135
         }
137 136
     }
138 137
 };
139
-
140 138
 /*
141 139
 获取URL中指定的参数
142 140
 例如:
@@ -568,6 +566,22 @@ helper.string = {
568 566
         };
569 567
     }
570 568
 };
569
+helper.dadalist = {
570
+	dataRemove: function () {
571
+        Array.prototype.indexOf = function (val) {
572
+			for(var i = 0; i < this.length; i++){
573
+			  if(this[i] == val){return i;}
574
+			}
575
+			return -1;
576
+		}
577
+		Array.prototype.remove = function (val) {
578
+		 	var index = this.indexOf(val);
579
+		 	if(index > -1){this.splice(index,1);}
580
+		}
581
+    }
582
+    
583
+};
584
+
571 585
 //helper.init = {
572 586
 //  setajax: function (isload) { /// 配置AJAX
573 587
 //      $(document).on("ajaxStart", function () {

+ 1 - 0
双汇APP-andriod/js/login.js

@@ -2,6 +2,7 @@ mui.init();
2 2
 mui.plusReady(function() {
3 3
 	var usercode = localStorage.getItem("user"); //获取本地存储
4 4
 	var psw = localStorage.getItem("psw"); //获取本地存储s
5
+	
5 6
 	if(usercode != null) //如果缓存中有数据,则加载出来 
6 7
 	{
7 8
 		document.getElementById("account").value = usercode;

+ 22 - 0
双汇APP-andriod/js/personal.js

@@ -216,5 +216,27 @@ mui.plusReady(function() {
216 216
 			console.log(data.message);
217 217
 		}
218 218
 	})
219
+	
220
+	setTimeout(function  clienGet() {
221
+		var pinf = plus.push.getClientInfo();
222
+		var cid = pinf.clientid;//客户端标识  
223
+		$.ajax({
224
+			type: "get",
225
+			url: huayi.config.callcenter_url + 'PushMessage/PutAppClientIdAsync',
226
+			async: false,
227
+			data: {
228
+				apptype:1,
229
+				clientid: cid,
230
+				token:localStorage.getItem("token")
231
+			},
232
+			dataType: 'json', 
233
+			success: function(res) {
234
+				if(res.state.toLowerCase() === "success") {
235
+				}
236
+			}
237
+		});	
238
+	},2000)
239
+	 
240
+	
219 241
 })
220 242
 

+ 0 - 8
双汇APP-andriod/personal.html

@@ -307,14 +307,6 @@
307 307
 					<div class="stateIcon CJSL">99</div>
308 308
 				</li>
309 309
 			</ul>
310
-			<!--<ul class="mui-table-view mui-grid-view mui-grid-12 Common-box addDisplay" style="display: none; margin-top: 0;">
311
-				<li class="mui-table-view-cell mui-media mui-col-xs-12 mui-col-sm-12">
312
-					<a href="javascript:;" id="Report" data-index="0" style="padding: 0px;">
313
-						<div class="Icon icon-1"><i class="mui-icon iconfont icon-bianji "></i></div>
314
-						<div class="addWord">提出诉求</div>
315
-					</a>
316
-				</li>
317
-			</ul>-->
318 310
 			
319 311
 			<div class='Content'>
320 312
 				<div class="Content-title">

+ 8 - 36
双汇APP-andriod/workOrder/Work-list.html

@@ -17,43 +17,13 @@
17 17
 	<body>
18 18
 		<!-- End screening -->
19 19
 		<div class="grade-eject">
20
-		    <ul class="grade-w" id="gradew">
21
-		        <li>哈尔滨   <img src="../img/check_true.png"/></li>
22
-		        <li>全国      <img src="../img/check_true.png"/></li>
23
-		        <li>北京      <img src="../img/check_true.png"/></li>
24
-		        <li>天津      <img src="../img/check_true.png"/></li>
25
-		        <li>河北      <img src="../img/check_true.png"/></li>
26
-		        <li>山西      <img src="../img/check_true.png"/></li>
27
-		        <li>内蒙古   <img src="../img/check_true.png"/></li>
28
-		        <li>辽宁      <img src="../img/check_true.png"/></li>
29
-		        <li>吉林      <img src="../img/check_true.png"/></li>
30
-		        <li>黑龙江   <img src="../img/check_true.png"/></li>
31
-		        <li>上海      <img src="../img/check_true.png"/></li>
32
-		        <li>江苏      <img src="../img/check_true.png"/></li>
33
-		        <li>山东      <img src="../img/check_true.png"/></li>
34
-		        <li>河南      <img src="../img/check_true.png"/></li>
35
-		        <li>湖北      <img src="../img/check_true.png"/></li>
36
-		        <li>湖南      <img src="../img/check_true.png"/></li>
37
-		        <li>广东      <img src="../img/check_true.png"/></li>
38
-		        <li>广西      <img src="../img/check_true.png"/></li>
39
-		        <li>海南      <img src="../img/check_true.png"/></li>
20
+		    <ul class="grade-w clickArea" id="gradew">
40 21
 		    </ul>
41
-		    <ul class="grade-t" id="gradet">
42
-		        <li>全河北  <img src="../img/check_true.png"/> </li>
43
-		        <li>石家庄  <img src="../img/check_true.png"/></li>
44
-		        <li>唐山     <img src="../img/check_true.png"/></li>
45
-		        <li>秦皇岛  <img src="../img/check_true.png"/></li>
46
-		        <li>邢台     <img src="../img/check_true.png"/></li>
47
-		        <li>保定     <img src="../img/check_true.png"/></li>
48
-		        <li>张家口  <img src="../img/check_true.png"/></li>
49
-		        <li>承德      <img src="../img/check_true.png"/></li>
50
-		        <li>沧州      <img src="../img/check_true.png"/></li>
51
-		        <li>廊坊      <img src="../img/check_true.png"/></li>
52
-		        <li>衡水      <img src="../img/check_true.png"/></li>
22
+		    <ul class="grade-t clickArea" id="gradet">
53 23
 		    </ul>
54
-		    <div class="recet_button">
55
-		    	<button class="btn_class">重置</button>
56
-		    	<button class="btn_class">确定</button>
24
+		    <div class="recet_button clickArea">
25
+		    	<button class="btn_class resBtn">重置</button>
26
+		    	<button class="btn_class tureBtn">确定</button>
57 27
 		    </div>
58 28
 		    <!--<div class="all_check"><img src="../img/all_check.png"/></div>-->
59 29
 		</div>
@@ -79,13 +49,15 @@
79 49
 			
80 50
 			<!--右上角弹出菜单-->
81 51
 		</div>
82
-		
52
+		<input id="AreaId" type="hidden" />
53
+		<input id="OfficeId" type="hidden" />
83 54
 		<input hidden="hidden" type="text" id='DWResult' class="ui-alert type_con" data-index="" readonly="readonly" />
84 55
 		<script src="../js/mui.min.js"></script>
85 56
 		<script src="../js/mui.poppicker.js"></script>
86 57
 		<script src="../js/mui.picker.min.js"></script>
87 58
 		<script src="../js/zepto.js"></script>
88 59
 		<script src="../js/huayi.config.js"></script>
60
+		<script src="../js/huayi.http.js"></script>
89 61
 		<script src="js/Work-list.js"></script>
90 62
 		<script src="../js/jquery-1.8.js"></script>
91 63
 		<script src="js/custom_select.js"></script>

+ 23 - 7
双汇APP-andriod/workOrder/Work-listClass.html

@@ -12,30 +12,43 @@
12 12
 		<link href="../css/mui.poppicker.css" rel="stylesheet" />
13 13
 		<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
14 14
 		<link rel="stylesheet" href="css/Work-list.css" />
15
+		<link rel="stylesheet" href="css/custom_select.css" />
15 16
 	</head>
16 17
 	<body>
18
+		<!-- End screening -->
19
+		<div class="grade-eject">
20
+		    <ul class="grade-w clickArea" id="gradew">
21
+		    </ul>
22
+		    <ul class="grade-t clickArea" id="gradet">
23
+		    </ul>
24
+		    <div class="recet_button clickArea">
25
+		    	<button class="btn_class resBtn">重置</button>
26
+		    	<button class="btn_class tureBtn">确定</button>
27
+		    </div>
28
+		    <!--<div class="all_check"><img src="../img/all_check.png"/></div>-->
29
+		</div>
17 30
 		<header class="mui-bar mui-bar-nav" style="padding-right: 15px;color: #fff;">
18 31
 			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
19 32
 			<h1 class="mui-center mui-title"><span class="Totle-box" style="color: #FFFFFF;"></span><span class="Totle"></span></h1>
20
-			<a class=" mui-icon-tiajia mui-pull-right tjyh" style="color: #fff;" id="DW">
33
+			<a class=" mui-icon-tiajia mui-pull-right Regional tjyh" style="color: #fff;">
21 34
 				办事处筛选
22 35
 			</a>
23 36
 		</header>
24 37
 		<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" style="margin-top: 43px; ">
25 38
 			<li class="mui-table-view-cell">
26
-				<div class="mui-input-row mui-search ">
39
+				<div class="mui-input-row">
27 40
 					<input type="search" class="mui-input-clear go_search search Width" placeholder="请输入关键字" style="margin-bottom: 0;">							
28 41
 				</div>
29 42
 			</li>
30 43
 		</ul>
31
-		<div id="slider" class="mui-slider" style="margin-top:0px; background: #FFFFFF;">
44
+		<div id="slider" style="margin-top:0px; background: #FFFFFF;">
32 45
 			<div id="mui_list" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
33
-				<a class="mui-control-item mui-active" data-index="1">
46
+				<div class="mui-control-item mui-active" data-index="1">
34 47
 					处理中<span class="clzTotle"></span>
35
-				</a>
36
-				<a class="mui-control-item" data-index="2">
48
+				</div>
49
+				<div class="mui-control-item" data-index="2">
37 50
 					已完成<span class="ywcTotle"></span>
38
-				</a>
51
+				</div>
39 52
 			</div>
40 53
 		</div>
41 54
 		<div class="mui-content mui-scroll-wrapper" id="pullrefresh" style="margin-top: -44px;">
@@ -52,12 +65,15 @@
52 65
 		<input hidden="hidden" type="text" id='DWResult' class="ui-alert type_con" data-index="" readonly="readonly" />
53 66
 			<!--右上角弹出菜单-->
54 67
 		</div>
68
+		<input id="AreaId" type="hidden" />
69
+		<input id="OfficeId" type="hidden" />
55 70
 		<script src="../js/mui.min.js"></script>
56 71
 		<script src="../js/mui.poppicker.js"></script>
57 72
 		<script src="../js/mui.picker.min.js"></script>
58 73
 		<script src="../js/zepto.js"></script>
59 74
 		<script src="../js/jquery-1.8.js"></script>
60 75
 		<script src="../js/huayi.config.js"></script>
76
+		<script src="js/custom_select.js"></script>
61 77
 		<script src="js/Work-listClass.js"></script>
62 78
 	</body>
63 79
 		

+ 2 - 2
双汇APP-andriod/workOrder/WorkDetails.html

@@ -70,7 +70,6 @@
70 70
 				</li>
71 71
 			</ul>
72 72
 			
73
-			
74 73
 			<div class="mui-table size-14 mui-padding orderTop" style="margin-top: 0;">
75 74
 				<div class=" mui-table mui-padding" style="border: none; padding-top: 0px;">
76 75
 					<div class="mui-table-cell mui-col-xs-6">
@@ -106,6 +105,7 @@
106 105
 				</div>
107 106
 				
108 107
 			</div>
108
+			
109 109
 			<div class="mui-table size-14 mui-padding orderTop" style="margin-top: 0;">
110 110
 				<div class=" mui-table mui-padding" style="border: none; padding-top: 0px;">
111 111
 					<div class="mui-table-cell mui-col-xs-6">
@@ -164,7 +164,7 @@
164 164
 				</div> 
165 165
 			</div>
166 166
 			<!--工单进程-->
167
-			<div class="mui-table-view work-content ">
167
+			<div class="mui-table-view work-content">
168 168
 				<div class="mui-table-cell mui-col-xs-10">
169 169
 					<h4 class="mui-ellipsis size-16" style="padding: 6px ;">工单跟踪信息</h4>
170 170
 				</div>

+ 1 - 0
双汇APP-andriod/workOrder/css/Work-list.css

@@ -3,6 +3,7 @@
3 3
 }
4 4
 .mui-bar-nav{
5 5
 	background: #cd0000 !important;
6
+	z-index: 33;
6 7
 }
7 8
 .mui-popover.mui-bar-popover .mui-table-view {
8 9
 	width: 100%;

+ 25 - 50
双汇APP-andriod/workOrder/js/Work-list.js

@@ -80,13 +80,15 @@ window.onload = function() {
80 80
 		function pullupRefresh() {
81 81
 
82 82
 			setTimeout(function() {
83
+				//alert(areaList+"--"+officeList)
83 84
 				mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
84 85
 				mui.ajax(huayi.config.callcenter_url + 'WorkorderApp/GetList', {
85 86
 					data: {
86 87
 						token: token,
87 88
 						state: index,
88 89
 						dealTimely: classImport,
89
-						offce:$("#DWResult").attr("data-index"),
90
+						area:areaId,
91
+						offce:officeId,
90 92
 						extensionphone: 1,
91 93
 						pageindex: page,
92 94
 						pagesize: pageSize
@@ -195,19 +197,22 @@ window.onload = function() {
195 197
 		}
196 198
 
197 199
 		function Ajax() {
200
+			areaD();
201
+			officeD();
198 202
 			$(".orderLi").remove();
199 203
 			page=1;
200 204
 			pageSize=10;
201 205
 			mui.ajax(huayi.config.callcenter_url + 'WorkorderApp/GetList', {
202 206
 				data: {
203
-					token: token,
207
+					token: token, 
204 208
 					state: index,
209
+					area:areaId,
210
+					offce:officeId,
205 211
 					dealTimely: classImport,
206 212
 					extensionphone: 1,
207
-					keywords:keyw,
208
-					offce:$("#DWResult").attr("data-index"),
209
-					pageindex: 1,
210
-					pagesize: 10
213
+					keywords:keyw, 
214
+					page:1,
215
+					pageSize:10
211 216
 				},
212 217
 				dataType: 'json', //服务器返回json格式数据
213 218
 				type: 'get', //HTTP请求类型
@@ -217,6 +222,7 @@ window.onload = function() {
217 222
 				},
218 223
 				success: function(data) {
219 224
 					var total = data.total;
225
+					//alert(total)
220 226
 					if(!total) {
221 227
 						total = 0;
222 228
 						$(".noWork").show();
@@ -300,7 +306,19 @@ window.onload = function() {
300 306
 				}
301 307
 			})
302 308
 		}
309
+		
310
+		$(".tureBtn").click(function(){
311
+	    	Ajax();
312
+	    	if ($('.grade-eject').hasClass('grade-w-roll')) {
313
+	            $('.grade-eject').removeClass('grade-w-roll');
314
+				$(this).removeClass('current');
315
+	        } else {
316
+	            $('.grade-eject').addClass('grade-w-roll');
317
+				$(this).addClass('current'); 
318
+	        }
319
+	    })
303 320
 
321
+		
304 322
 		$('#order_list').on('tap', '.order', function() {
305 323
 			var id = $(this).attr('data-index');
306 324
 			mui.openWindow({
@@ -386,52 +404,9 @@ window.onload = function() {
386 404
 				}
387 405
 			});
388 406
 		}
389
-		//	产品代码
390
-		var Product = [];
391
-		$.ajax({
392
-			type: "get",
393
-			url: huayi.config.callcenter_url + 'Department/GetAPPAreaList',
394
-			async: false,
395
-			data: {
396
-				flag: "CPDM",
397
-				token:localStorage.getItem("token")
398
-			},
399
-			dataType: 'json',
400
-			success: function(res) {
401
-				if(res.state.toLowerCase() === "success") {
402
-					res = res.data;
403
-					if(res && res.length > 0) {
404
-						res.forEach(function(v, i) {
405
-							var obj = {};
406
-							obj.id = v.id;
407
-							obj.text = v.text;
408
-							obj.children = v.children;
409
-							Product.push(obj);
410
-						});
411
-					}
412
-				}
413
-			}
414
-		});	
415 407
 		
416
-		(function($, doc) {
417
-			$.ready(function() {
418
-				//交办单位
419
-				var ZTiPickers = new $.PopPicker({
420
-					layer: 2
421
-				});
422
-				ZTiPickers.setData(Product);
423
-				var ZXs = doc.getElementById('DW');
424
-				var ZXResults = doc.getElementById('DWResult');
425
-				ZXs.addEventListener('tap', function(event) {
426
-					ZTiPickers.show(function(items) {
427
-						ZXResults.value = items[1].text;
428
-						ZXResults.setAttribute("data-index", items[1].id);
429
-						Ajax();
430
-					});
431
-				}, false);
432 408
 		
433
-			})
434
-		})(mui, document);
409
+
435 410
 
436 411
 	});
437 412
 }

+ 24 - 28
双汇APP-andriod/workOrder/js/Work-listClass.js

@@ -71,7 +71,8 @@ window.onload = function() {
71 71
 								CJ:choujian,
72 72
 								keywords:keyw,
73 73
 								extensionphone: 1,
74
-								offce:$("#DWResult").attr("data-index"),
74
+								area:areaId,
75
+								offce:officeId,
75 76
 								pageindex : page,
76 77
 								pagesize: pageSize
77 78
 							},
@@ -128,7 +129,8 @@ window.onload = function() {
128 129
 								dealTimely: classImport,
129 130
 								Processing:2,
130 131
 								keywords:keyw,
131
-								offce:$("#DWResult").attr("data-index"),
132
+								area:areaId,
133
+								offce:officeId,
132 134
 								CJ:choujian,
133 135
 								extensionphone: 1,
134 136
 								pageindex: page,
@@ -184,6 +186,8 @@ window.onload = function() {
184 186
 
185 187
 		
186 188
 		function Ajax() {
189
+			areaD();
190
+			officeD();
187 191
 			$(".orderli").remove();
188 192
 			$.ajax({
189 193
 				data: {
@@ -192,7 +196,8 @@ window.onload = function() {
192 196
 					Processing:1,
193 197
 					keywords:keyw,
194 198
 					extensionphone: 1,
195
-					offce:$("#DWResult").attr("data-index"),
199
+					area:areaId,
200
+					offce:officeId,
196 201
 					CJ:choujian,
197 202
 					pageindex: 1,
198 203
 					pagesize: pageSize
@@ -247,6 +252,8 @@ window.onload = function() {
247 252
 		}
248 253
 		
249 254
 		function AjaxYcl() {
255
+			areaD();
256
+			officeD();
250 257
 			$(".orderli").remove();
251 258
 			$.ajax({
252 259
 				data: {
@@ -255,7 +262,8 @@ window.onload = function() {
255 262
 					Processing:2,
256 263
 					keywords:keyw,
257 264
 					extensionphone: 1,
258
-					offce:$("#DWResult").attr("data-index"),
265
+					area:areaId,
266
+					offce:officeId,
259 267
 					CJ:choujian,
260 268
 					pageindex: 1,
261 269
 					pagesize: pageSize
@@ -304,15 +312,23 @@ window.onload = function() {
304 312
 					//异常处理;
305 313
 				}
306 314
 			})
307
-		
308 315
 		}
309
-		
310 316
 		$('#mui_list').on('tap', 'a', function() {
311 317
 			index=$(this).index();
312 318
 			$("#pullrefresh").find(".mui-scroll_1").hide();
313 319
 			$("#pullrefresh").find(".mui-scroll_1").eq(index).show();
314
-			
315 320
 		}) 
321
+		$(".tureBtn").click(function(){
322
+	    	Ajax();
323
+			AjaxYcl(); 
324
+	    	if ($('.grade-eject').hasClass('grade-w-roll')) {
325
+	            $('.grade-eject').removeClass('grade-w-roll');
326
+				$(this).removeClass('current');
327
+	        } else {
328
+	            $('.grade-eject').addClass('grade-w-roll');
329
+				$(this).addClass('current'); 
330
+	        }
331
+	    })
316 332
 		$('.order_list').on('tap', '.order', function() {
317 333
 			var id = $(this).attr('data-index');
318 334
 			mui.openWindow({
@@ -362,26 +378,6 @@ window.onload = function() {
362 378
 				}
363 379
 			}
364 380
 		});	
365
-		
366
-		(function($, doc) {
367
-			$.ready(function() {
368
-				//交办单位
369
-				var ZTiPickers = new $.PopPicker({
370
-					layer: 2
371
-				});
372
-				ZTiPickers.setData(Product);
373
-				var ZXs = doc.getElementById('DW');
374
-				var ZXResults = doc.getElementById('DWResult');
375
-				ZXs.addEventListener('tap', function(event) {
376
-					ZTiPickers.show(function(items) {
377
-						ZXResults.value = items[1].text;
378
-						ZXResults.setAttribute("data-index", items[1].id);
379
-						Ajax();
380
-						AjaxYcl() 
381
-					});
382
-				}, false);
383
-		
384
-			})
385
-		})(mui, document);
381
+
386 382
 	});
387 383
 }

+ 130 - 12
双汇APP-andriod/workOrder/js/custom_select.js

@@ -1,9 +1,9 @@
1
-
2
-//Regional开始
1
+var areaList=[];
2
+var officeList=[];
3
+var areaId="",officeId="";
3 4
 $(document).ready(function(){
4
-	$('.grade-eject').addClass('grade-w-roll');
5
-	$('.grade-eject').addClass('current');
6 5
     $(".Regional").click(function(){
6
+    	event.stopPropagation();
7 7
         if ($('.grade-eject').hasClass('grade-w-roll')) {
8 8
             $('.grade-eject').removeClass('grade-w-roll');
9 9
 			$(this).removeClass('current');
@@ -11,30 +11,148 @@ $(document).ready(function(){
11 11
             $('.grade-eject').addClass('grade-w-roll');
12 12
 			$(this).addClass('current');
13 13
         }
14
+        cleanList();
14 15
     });
15
-});
16
-
17
-$(document).ready(function(){
18
-    $(".grade-w>li").click(function(){
19
-        $(".grade-t").css("left","50%")
20
-    });
16
+    $(".resBtn").click(function(){
17
+		cleanList();
18
+	})
19
+	$(document).click(function(event) {
20
+		var _con = $('.clickArea'); // 设置目标区域
21
+		if(!_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
22
+			$('.grade-eject').removeClass('grade-w-roll');
23
+			$(this).removeClass('current');
24
+		}
25
+	});
26
+    function cleanList () {
27
+    	areaList=[],officeList=[],areaId="",officeId="";
28
+    	$(this).removeClass("check_active");
29
+    	$(this).children("img").hide();
30
+    	$(".grade-w li").removeClass("check_active");
31
+    	$(".grade-w li img").hide();
32
+    	$(".grade-t li").removeClass("check_active");
33
+    	$(".grade-t li img").hide();
34
+    	$('#gradet li').remove();
35
+    }
36
+    
21 37
     $(".grade-w").on('click', 'li', function() {
38
+    	$(".grade-t").css("left","50%");
22 39
     	if ($(this).hasClass("check_active")) {
23
-    		$(this).removeClass("check_active")
40
+    		$(this).removeClass("check_active");
24 41
     		$(this).children("img").hide();
42
+    		var areaDataRemove=$(this).attr("data-index");
43
+    		Array.prototype.indexOf = function (val) {
44
+				for(var i = 0; i < this.length; i++){
45
+				  if(this[i] == val){return i;}
46
+				}
47
+				return -1;
48
+			}
49
+			Array.prototype.remove = function (val) {
50
+			 	var index = this.indexOf(val);
51
+			 	if(index > -1){this.splice(index,1);}
52
+			}
53
+			areaList.remove(areaDataRemove);
54
+
25 55
     	} else{
26 56
     		$(this).addClass("check_active");
27 57
     		$(this).children("img").show();
58
+    		$('#gradet li').remove();
59
+    		var areaData=$(this).attr("data-index");
60
+    		areaList.push(areaData);
61
+	    	//	产品代码
62
+			$.ajax({
63
+				type: "get",
64
+				url: huayi.config.callcenter_url + 'Department/GetCusAreaList',
65
+				async: false,
66
+				data: {
67
+					pid:$(this).attr("data-index"),
68
+					F_Layer: 2,
69
+					token:localStorage.getItem("token")
70
+				},
71
+				dataType: 'json',
72
+				success: function(res) {
73
+					if(res.state.toLowerCase() === "success") {
74
+						res = res.data;
75
+						if(res && res.length > 0) {
76
+							res.forEach(function(v, i) {
77
+								$('<li data-index="'+v.F_DeptId+'">'+v.F_DeptName+
78
+								'<img src="../img/check_true.png"/></li>').appendTo('#gradet')
79
+							});
80
+						}
81
+					}
82
+				}
83
+			});	
28 84
     	}
85
+    	
29 86
 	})
87
+    
30 88
     $(".grade-t").on('click', 'li', function() {
31 89
     	if ($(this).hasClass("check_active")) {
32 90
     		$(this).removeClass("check_active")
33 91
     		$(this).children("img").hide();
92
+    		var officeDataRemove=$(this).attr("data-index");
93
+    		Array.prototype.indexOf = function (val) {
94
+				for(var i = 0; i < this.length; i++){
95
+				  if(this[i] == val){return i;}
96
+				}
97
+				return -1;
98
+			}
99
+			Array.prototype.remove = function (val) {
100
+			 	var index = this.indexOf(val);
101
+			 	if(index > -1){this.splice(index,1);}
102
+			}
103
+			officeList.remove(officeDataRemove);
34 104
     	} else{
35 105
     		$(this).addClass("check_active");
36 106
     		$(this).children("img").show();
107
+    		var officeData=$(this).attr("data-index");
108
+    		officeList.push(officeData);
37 109
     	}
110
+    	
38 111
     })
39
-    
112
+    //	产品代码
113
+	$.ajax({
114
+		type: "get",
115
+		url: huayi.config.callcenter_url + 'Department/GetCusAreaList',
116
+		async: false,
117
+		data: {
118
+			pid: 1,
119
+			F_Layer: 1,
120
+			token:localStorage.getItem("token")
121
+		},
122
+		dataType: 'json',
123
+		success: function(res) {
124
+			if(res.state.toLowerCase() === "success") {
125
+				res = res.data;
126
+				if(res && res.length > 0) {
127
+					res.forEach(function(v, i) {
128
+						$('<li data-index="'+v.F_DeptId+'">'+v.F_DeptName+
129
+						'<img src="../img/check_true.png"/></li>').appendTo('#gradew')
130
+					});
131
+				}
132
+			}
133
+		}
134
+	});	
40 135
 });
136
+
137
+
138
+function areaD() {
139
+	for (var i=0, l=areaList.length; i<l; i++) {
140
+		areaId += areaList[i]+ ","
141
+	}
142
+	if (areaList.length > 0 ) {
143
+		areaId = areaId.substring(0, areaId.length-1);
144
+		$('#AreaId').val(areaId);
145
+	}
146
+}
147
+
148
+function officeD() {
149
+	for (var i=0, l=officeList.length; i<l; i++) {
150
+		officeId += officeList[i]+ ","
151
+	}
152
+	if (officeList.length > 0 ) {
153
+		officeId = officeId.substring(0, officeId.length-1);
154
+		$('#OfficeId').val(officeId);
155
+	}
156
+}
157
+
158
+

+ 16 - 9
双汇APP-andriod/workOrder/js/detail.js

@@ -22,11 +22,8 @@ mui.plusReady(function() {
22 22
 			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
23 23
 		},
24 24
 		success: function(data) {
25
-			
26 25
 			var Data = data.rows;
27
-			
28 26
 			var States;
29
-			
30 27
 			if (Data[0].F_State==0) {
31 28
 				States="待提交"
32 29
 			} else if (Data[0].F_State==1) {
@@ -73,7 +70,9 @@ mui.plusReady(function() {
73 70
 			document.getElementById("F_CreateTime").innerHTML = Data[0].F_CreateTime; //所属大区
74 71
 			// href="tel:'+n.F_Mobile+'"
75 72
 			document.getElementById("F_CusPhone").innerHTML = Data[0].F_CusPhone; //备注
76
-			$("#F_CusPhone").attr("href","tel:"+Data[0].F_CusPhone)
73
+			if (Data[0].F_CusPhone!=""&&Data[0].F_CusPhone!="null") {
74
+				$("#F_CusPhone").attr("href","tel:"+Data[0].F_CusPhone)
75
+			}
77 76
 //			产品问题
78 77
 			document.getElementById("F_ProductType").innerHTML = Data[0].F_ProductType; //产品代码
79 78
 			document.getElementById("F_ProductName").innerHTML = Data[0].F_ProductName; //产品名称
@@ -86,9 +85,20 @@ mui.plusReady(function() {
86 85
 				var div = document.createElement('div');
87 86
 				div.innerHTML =
88 87
 					'<h5 class="mui-badge-success mui-badge-inverted">' + data.itemlasts[i].F_CreateTime + ' ' +
89
-					'<h5><span>备注信息:</span><span class="Font">' + data.itemlasts[i].F_OptContent + '</span></h5>';
88
+					'<h5><span>备注信息:</span><a class="Font telPhone" data-index="'+data.itemlasts[i].F_CusPhone+
89
+					'" >' + data.itemlasts[i].F_OptContent + '</a></h5>';
90 90
 				table.appendChild(div);
91 91
 			}
92
+			//href="tel:'+data.itemlasts[i].F_CusPhone+'"
93
+			$(".telPhone").on("tap",function () {
94
+				var telCall=$(this).attr("data-index")
95
+				//alert(telCall)
96
+				if (telCall!="null"&&telCall!="") {
97
+					$(this).attr("href","tel:"+telCall) 
98
+				}else{
99
+					mui.toast('联系人为空,请核对')
100
+				}
101
+			})
92 102
 			//图片展示
93 103
 			if(data.FileUrl) {
94 104
 				$(data.FileUrl).each(function(i, n) {
@@ -102,7 +112,6 @@ mui.plusReady(function() {
102 112
 				})
103 113
 			}
104 114
 			//按钮显示
105
-			
106 115
 			if(data.buttons.length > 0) {
107 116
 				$('.BTS').show();
108 117
 				for(var i = 0; i < data.buttons.length; i++) {
@@ -171,7 +180,7 @@ mui.plusReady(function() {
171 180
 			}
172 181
 		})
173 182
 	}
174
-	//退回
183
+	//提醒
175 184
 	function remind() {
176 185
 		mui.openWindow({
177 186
 			id: 'Work-remind',
@@ -215,7 +224,6 @@ mui.plusReady(function() {
215 224
 			}
216 225
 		});
217 226
 	}
218
-	
219 227
 	//提交
220 228
 	function submitFun() {
221 229
 		mui.openWindow({
@@ -260,7 +268,6 @@ mui.plusReady(function() {
260 268
 			}
261 269
 		});
262 270
 	}
263
-	
264 271
 //	处理
265 272
 	function disposeFun() {
266 273
 		mui.openWindow({

+ 16 - 9
双汇APP/workOrder/js/detail.js

@@ -22,11 +22,8 @@ mui.plusReady(function() {
22 22
 			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
23 23
 		},
24 24
 		success: function(data) {
25
-			
26 25
 			var Data = data.rows;
27
-			
28 26
 			var States;
29
-			
30 27
 			if (Data[0].F_State==0) {
31 28
 				States="待提交"
32 29
 			} else if (Data[0].F_State==1) {
@@ -73,7 +70,9 @@ mui.plusReady(function() {
73 70
 			document.getElementById("F_CreateTime").innerHTML = Data[0].F_CreateTime; //所属大区
74 71
 			// href="tel:'+n.F_Mobile+'"
75 72
 			document.getElementById("F_CusPhone").innerHTML = Data[0].F_CusPhone; //备注
76
-			$("#F_CusPhone").attr("href","tel:"+Data[0].F_CusPhone)
73
+			if (Data[0].F_CusPhone!=""&&Data[0].F_CusPhone!="null") {
74
+				$("#F_CusPhone").attr("href","tel:"+Data[0].F_CusPhone)
75
+			}
77 76
 //			产品问题
78 77
 			document.getElementById("F_ProductType").innerHTML = Data[0].F_ProductType; //产品代码
79 78
 			document.getElementById("F_ProductName").innerHTML = Data[0].F_ProductName; //产品名称
@@ -86,9 +85,20 @@ mui.plusReady(function() {
86 85
 				var div = document.createElement('div');
87 86
 				div.innerHTML =
88 87
 					'<h5 class="mui-badge-success mui-badge-inverted">' + data.itemlasts[i].F_CreateTime + ' ' +
89
-					'<h5><span>备注信息:</span><span class="Font">' + data.itemlasts[i].F_OptContent + '</span></h5>';
88
+					'<h5><span>备注信息:</span><a class="Font telPhone" data-index="'+data.itemlasts[i].F_CusPhone+
89
+					'" >' + data.itemlasts[i].F_OptContent + '</a></h5>';
90 90
 				table.appendChild(div);
91 91
 			}
92
+			//href="tel:'+data.itemlasts[i].F_CusPhone+'"
93
+			$(".telPhone").on("tap",function () {
94
+				var telCall=$(this).attr("data-index")
95
+				//alert(telCall)
96
+				if (telCall!="null"&&telCall!="") {
97
+					$(this).attr("href","tel:"+telCall) 
98
+				}else{
99
+					mui.toast('联系人为空,请核对')
100
+				}
101
+			})
92 102
 			//图片展示
93 103
 			if(data.FileUrl) {
94 104
 				$(data.FileUrl).each(function(i, n) {
@@ -102,7 +112,6 @@ mui.plusReady(function() {
102 112
 				})
103 113
 			}
104 114
 			//按钮显示
105
-			
106 115
 			if(data.buttons.length > 0) {
107 116
 				$('.BTS').show();
108 117
 				for(var i = 0; i < data.buttons.length; i++) {
@@ -171,7 +180,7 @@ mui.plusReady(function() {
171 180
 			}
172 181
 		})
173 182
 	}
174
-	//退回
183
+	//提醒
175 184
 	function remind() {
176 185
 		mui.openWindow({
177 186
 			id: 'Work-remind',
@@ -215,7 +224,6 @@ mui.plusReady(function() {
215 224
 			}
216 225
 		});
217 226
 	}
218
-	
219 227
 	//提交
220 228
 	function submitFun() {
221 229
 		mui.openWindow({
@@ -260,7 +268,6 @@ mui.plusReady(function() {
260 268
 			}
261 269
 		});
262 270
 	}
263
-	
264 271
 //	处理
265 272
 	function disposeFun() {
266 273
 		mui.openWindow({