Procházet zdrojové kódy

工单渠道来源统计增加时间选择-20190613文档需求

zhengbingbing %!s(int64=6) %!d(string=před) roky
rodič
revize
b7a3dfe167
2 změnil soubory, kde provedl 19 přidání a 4 odebrání
  1. 4 0
      WebChart/index.html
  2. 15 4
      WebChart/js/index.js

+ 4 - 0
WebChart/index.html

@@ -267,6 +267,10 @@
267 267
 					<div class="swiper-slide">
268 268
 						<div class="orderSource slideCon_bg clearfix">
269 269
 							<div class="timeWrap lasttimeWrap timeWrapPosi">
270
+							<div class="time_box pull-right form-inline time_box_leftTh">
271
+								时间选择:
272
+								<input type="text" id="time3" class="times" />
273
+							</div>
270 274
 								<div class="time_box pull-right form-inline time_box_four">
271 275
 									地区选择:
272 276
 									<select class="areaTwo selects" style="height: 30px;"></select>

+ 15 - 4
WebChart/js/index.js

@@ -10,6 +10,15 @@ $(function() {
10 10
 			dayTime=value.split('-')[2];
11 11
 		}
12 12
 	});
13
+	laydate.render({
14
+		elem: '#time3',
15
+		range: '~',
16
+		theme: '#114a97',
17
+		done: function(value, date) {
18
+			var areaOneVal=$(".areaOne").val();
19
+			twoScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],areaOneVal)
20
+		}
21
+	});
13 22
 	var mySwiper = new Swiper('.swiper-container', {
14 23
 		loop: true,
15 24
 		autoplay: {
@@ -122,7 +131,8 @@ function turn(aa) {
122 131
 			success: function(data) {
123 132
 				if(data.state.toLowerCase() == 'success') {
124 133
 					// 	   			layer.close(index);
125
-					var con = data.data;
134
+                    var con = data.data;
135
+                    console.log(con);
126 136
 					$(con).each(function(i, n) {
127 137
 						if(n.AreaName.indexOf('商丘') != -1) {
128 138
 							vars.sqs_count.update(n.Count);
@@ -168,7 +178,7 @@ function turn(aa) {
168 178
 
169 179
 	//第二屏
170 180
 
171
-	function twoScreen(areaTwoVal) {
181
+	function twoScreen(start, end,areaTwoVal) {
172 182
 		if(!areaTwoVal){
173 183
 			areaTwoVal="sqs12345"
174 184
 		}
@@ -178,7 +188,8 @@ function turn(aa) {
178 188
 			async: true,
179 189
 			dataType: 'json',
180 190
 			data: {
181
-				
191
+				start: start,
192
+				end: end,
182 193
 				branchcode:areaTwoVal
183 194
 			},
184 195
 			success: function(data) {
@@ -460,7 +471,7 @@ function turn(aa) {
460 471
 	//	第二屏
461 472
 	$(".areaTwo").change(function() {
462 473
       	var areaTwoVal=$(this).val();
463
-    	twoScreen(areaTwoVal);
474
+    	twoScreen($('#time3').val() && $('#time3').val().split(' ~ ')[0], $('#time3').val() && $('#time3').val().split(' ~ ')[1],areaTwoVal);
464 475
 	});
465 476
 	//区县筛选
466 477
 	deprtment ();