Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.1.222:3000/lihai/PingAnYeXianSZCG_Web

zhengbingbing 8 anni fa
parent
commit
3f3e356ee0

+ 147 - 201
CallCenterWeb.UI/Questionnaire/Table.html

@@ -19,33 +19,31 @@
19 19
 				color: #fff!important;
20 20
 			}
21 21
 			
22
-			#Task thead td {
23
-				color: #fff;
24
-				background-color: #1ab394;
25
-				text-align: center;
26
-			}
27
-			
28
-			.table-head table thead {
29
-				width: calc( 100% - 5px);
30
-			}
31
-			/*table thead,
32
-			tbody tr {
33
-				display: table;
34
-				width: 100%;
35
-				table-layout: fixed;
36
-				text-align: center;
37
-			}*/
38
-			
39 22
 			.table {
40 23
 				margin-bottom: 0;
41 24
 			}
42 25
 			
43 26
 			.table-body {
44 27
 				width: 100%;
45
-				height: 515px;
46
-				overflow-y: scroll;
28
+				/*height: 300px;
29
+				overflow-y: scroll;*/
47 30
 				overflow-x: scroll;
48 31
 			}
32
+			.tds{
33
+				background-color: #1ab394!important;
34
+				color: #fff;
35
+				padding: ;
36
+			}
37
+			.hwbb tbody td {
38
+				min-width: 100px;
39
+				overflow: hidden;
40
+				text-overflow: ellipsis;
41
+				white-space: nowrap;
42
+			}
43
+			
44
+			.hwbb td {
45
+				text-align: center;
46
+			}
49 47
 		</style>
50 48
 	</head>
51 49
 
@@ -74,111 +72,26 @@
74 72
 
75 73
 								</select>
76 74
 							</li>
77
-							<li>留言时间:<input class="photo x-color laydate-icon" type="text" id="lysj" /></li>
78
-							<li>处理时间:<input class="laydate-icon photo x-color " type="text" id="clsj" /></li>
79
-
80 75
 							<li>
81 76
 								<a class="sc_btn seach">搜索</a>
82 77
 							</li>
78
+							<li>
79
+								<a class=" sc_btn  export ">导出</a>
80
+							</li>
83 81
 						</ul>
84 82
 					</div>
85 83
 				</div>
86 84
 			</div>
87 85
 			<div style="width: 100%;padding: 10px;">
88
-				<div class="table-head">
89
-					<table id="Task" class="table table-hover table-striped table-bordered table-condensed">
90
-						<colgroup>
91
-							<col style="width: 80px;" />
92
-							<col/>
93
-						</colgroup>
94
-						<thead>
95
-							<tr>
96
-								<td>测试测试</td>
97
-								<td colspan="4">测试测试</td>
98
-								<td>测试测试</td>
99
-								<td>测试测试</td>
100
-								<td>测试测试</td>
101
-								<td>测试测试</td>
102
-								<td>测试测试</td>
103
-								<td>测试测试</td>
104
-								<td>测试测试</td>
105
-							</tr>
106
-						</thead>
107
-					</table>
108
-				</div>
86
+
109 87
 				<div class="table-body">
110 88
 					<table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
111
-						<colgroup>
112
-							<col style="width: 80px;" />
113
-							<col/>
114
-						</colgroup>
115
-						<tbody>
89
+						<thead>
116 90
 							<tr>
117
-								<td>测试测试</td>
118
-								<td colspan="4" style="text-align: center;">测试测试</td>
119
-								<td colspan="4" style="text-align: center;">测试测试</td>
120
-								<td colspan="4" style="text-align: center;">测试测试</td>
121
-								<td colspan="2" style="text-align: center;">测试测试</td>
122
-								<td colspan="3" style="text-align: center;">测试测试</td>
123
-
124
-							</tr>
125
-							<tr style="border:1px solid #E0EEFE" align="center">
126
-								<td ></td>
127
-								<td>A</td>
128
-								<td>B</td>
129
-								<td>B</td>
130
-								<td>D</td>
131
-								<td>A</td>
132
-								<td>B</td>
133
-								<td>B</td>
134
-								<td>D</td>
135
-								<td>测试测试</td>
136
-								<td>测试测试</td>
137
-								<td>测试测试</td>
138
-								
139
-								
140
-							</tr>
141 91
 
142
-							<tr style="border:1px solid #E0EEFE" align="center">
143
-								<td>测试测试</td>
144
-								<td>测试测试</td>
145
-								<td>测试测试</td>
146
-								<td>测试测试</td>
147
-								<td>测试测试</td>
148
-								<td>测试测试</td>
149
-								<td>测试测试</td>
150
-								<td>测试测试</td>
151
-								<td>测试测试</td>
152
-								<td>测试测试</td>
153
-								<td>测试测试</td>
154
-							</tr>
155
-
156
-							<tr style="border:1px solid #E0EEFE" align="center">
157
-								<td>测试测试</td>
158
-								<td>测试测试</td>
159
-								<td>测试测试</td>
160
-								<td>测试测试</td>
161
-								<td>测试测试</td>
162
-								<td>测试测试</td>
163
-								<td>测试测试</td>
164
-								<td>测试测试</td>
165
-								<td>测试测试</td>
166
-								<td>测试测试</td>
167
-								<td>测试测试</td>
168
-							</tr>
169
-							<tr style="border:1px solid #E0EEFE" align="center">
170
-								<td>测试测试</td>
171
-								<td>测试测试</td>
172
-								<td>测试测试</td>
173
-								<td>测试测试</td>
174
-								<td>测试测试</td>
175
-								<td>测试测试</td>
176
-								<td>测试测试</td>
177
-								<td>测试测试</td>
178
-								<td>测试测试</td>
179
-								<td>测试测试</td>
180
-								<td>测试测试</td>
181 92
 							</tr>
93
+						</thead>
94
+						<tbody>
182 95
 
183 96
 						</tbody>
184 97
 					</table>
@@ -188,101 +101,134 @@
188 101
 		>
189 102
 		<script>
190 103
 			$(document).ready(function() {
191
-				Task();
192
-				Questionnaire();
193
-				$(".sc_btn").click(function() {
194
-					GetColumnList();
195
-					Number()
196
-				})
197
-				///查询条件中获取任务列表
198
-				function Task() {
199
-					$.ajax({
200
-						type: "get",
201
-						url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
202
-						dataType: 'json',
203
-						data: {
204
-							token: $.cookie("token")
205
-						},
206
-						async: true,
207
-						success: function(data) {
208
-							var Count = data.data;
209
-							$("<option value=''>--全部--</option>").appendTo($("#cljg"));
210
-							for(var i = 0; i < Count.length; i++) {
211
-								console.log(Count[i].F_UserName);
212
-								$("<option value='" + Count[i].F_TaskName + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
213
-
104
+					Task();
105
+					Questionnaire();
106
+					$(".sc_btn").click(function() {
107
+						GetColumnList();
108
+						Number()
109
+					}) ///查询条件中获取任务列表
110
+					function Task() {
111
+						$.ajax({
112
+							type: "get",
113
+							url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
114
+							dataType: 'json',
115
+							data: {
116
+								token: $.cookie("token")
117
+							},
118
+							async: true,
119
+							success: function(data) {
120
+								var Count = data.data;
121
+								$("<option value=''>--全部--</option>").appendTo($("#cljg"));
122
+								for(var i = 0; i < Count.length; i++) {
123
+									console.log(Count[i].F_UserName);
124
+									$("<option value='" + Count[i].F_TaskName + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
125
+								}
214 126
 							}
215
-							console.log(Count)
216
-						}
217
-					});
218
-				}
219
-				///查询条件问题任务列表
220
-				function Questionnaire() {
221
-					$.ajax({
222
-						type: "get",
223
-						url: huayi.config.callcenter_url + "Questionnaire/GetQList",
224
-						dataType: 'json',
225
-						data: {
226
-							token: $.cookie("token")
227
-						},
228
-						async: true,
229
-						success: function(data) {
230
-							var Count = data.data;
231
-							$("<option value=''>--全部--</option>").appendTo($("#Wt"));
232
-							for(var i = 0; i < Count.length; i++) {
233
-								console.log(Count[i].F_UserName);
234
-								$("<option value='" + Count[i].F_Title + "'>" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
235
-
127
+						});
128
+					}
129
+					///查询条件问题任务列表
130
+					function Questionnaire() {
131
+						$.ajax({
132
+							type: "get",
133
+							url: huayi.config.callcenter_url + "Questionnaire/GetQList",
134
+							dataType: 'json',
135
+							data: {
136
+								token: $.cookie("token")
137
+							},
138
+							async: true,
139
+							success: function(data) {
140
+								var Count = data.data;
141
+								$("<option value=''>--全部--</option>").appendTo($("#Wt"));
142
+								for(var i = 0; i < Count.length; i++) {
143
+									console.log(Count[i].F_UserName);
144
+									$("<option value='" + Count[i].F_Title + "'>" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
145
+								}
236 146
 							}
237
-							console.log(Count)
238
-						}
239
-					});
240
-				}
241
-				//任务查询获取表头
242
-				function GetColumnList() {
243
-					$("#Task thead tr").empty();
244
-					$.ajax({
245
-						type: "get",
246
-						url: huayi.config.callcenter_url + "Questionnaire/GetColumnList",
247
-						dataType: 'json',
248
-						data: {
249
-							taskname: $("#cljg").val(),
250
-							question: $("#Wt").val(),
251
-							token: $.cookie("token")
252
-						},
253
-						async: true,
254
-						success: function(data) {
255
-							var Count = data.data;
256
-							for(var i = 0; i < Count.length; i++) {
257
-								$('<td>' + Count[i].wenti + ' </td>').appendTo("#Task thead tr");
258
-
147
+						});
148
+					}
149
+					//任务查询获取表头
150
+					function GetColumnList() {
151
+						$(".hwbb thead tr").empty();
152
+						$.ajax({
153
+							type: "get",
154
+							url: huayi.config.callcenter_url + "Questionnaire/GetColumnList",
155
+							dataType: 'json',
156
+							data: {
157
+								taskname: $("#cljg").val(),
158
+								question: $("#Wt").val(),
159
+								token: $.cookie("token")
160
+							},
161
+							async: true,
162
+							success: function(data) {							
163
+								var Count = data.data;
164
+								if( Count.length>0){
165
+
166
+								$('<td class="tds"> </td>').appendTo(".hwbb thead tr");
167
+								for(var i = 0; i < Count.length; i++) {
168
+									$('<td class="tds" colspan="' + Count[i].fenxiangshu + '">' + Count[i].wenti + ' </td>').appendTo(".hwbb thead tr");
169
+								}
170
+								}
171
+								console.log(Count)
259 172
 							}
260
-							console.log(Count)
261
-						}
262
-					});
263
-				}
264
-
265
-				function Number() {
266
-					$.ajax({
267
-						type: "get",
268
-						url: huayi.config.callcenter_url + "Questionnaire/GetDataList",
269
-						dataType: 'json',
270
-						data: {
271
-							taskname: $("#cljg").val(),
272
-							question: $("#Wt").val(),
273
-							token: $.cookie("token")
274
-						},
275
-						async: true,
276
-						success: function(data) {
277
-							var Count = data.data;
278
-
279
-							console.log(Count)
280
-						}
281
-					});
173
+						});
174
+					}
175
+
176
+					function Number() {
177
+						$(".hwbb tbody ").empty()
178
+						$.ajax({
179
+							type: "get",
180
+							url: huayi.config.callcenter_url + "Questionnaire/GetDataList",
181
+
182
+							dataType: 'json',
183
+							data: {
184
+								taskname: $("#cljg").val(),
185
+								question: $("#Wt").val(),
186
+								token: $.cookie("token")
187
+							},
188
+							async: true,
189
+							success: function(data) {
190
+								var Count = data.data;
191
+								if(Count.length > 1) {
192
+
193
+									var html = "";
194
+									$(Count).each(function(i, n) {
195
+										html += '<tr>';
196
+										$(n).each(function(j, k) {
197
+
198
+											html += '<td colspan="" class="td">' + k + ' </td>';
199
+
200
+										})
201
+										html += '</tr>';
202
+
203
+									})
204
+									$(html).appendTo(".hwbb tbody");
205
+
206
+								}
207
+								console.log(Count)
208
+							}
209
+						});
210
+					}
211
+
212
+					function LimitNumber(txt, idName) {
213
+						var str = txt;
214
+						console.log(str);
215
+						str = str.substr(0, 20) + '...';
216
+						var id = document.getElementsByClassName('td');
217
+						id.innerText = str;
218
+					}
219
+					//导出功能
220
+              	$('.export').click(function() {
221
+					dcexcel(this);
222
+				})
223
+		   function dcexcel(obj) {
224
+            var url = huayi.config.callcenter_url + "Questionnaire/GetDataListExpt?token=" + $.cookie("token");
225
+                url += "&taskname=" + $("#cljg").val() + "&question=" + $("#Wt").val();
226
+                obj.href = url;
227
+       		 }
228
+		
282 229
 				}
283
-			})
284 230
 
285
-			//音频
231
+			)
286 232
 		</script>
287 233
 
288 234
 	</body>

+ 16 - 19
CallCenterWeb.UI/Questionnaire/Tasks.html

@@ -73,6 +73,9 @@
73 73
 							<li>
74 74
 								<a class="sc_btn seach">搜索</a>
75 75
 							</li>
76
+							<li>
77
+								<a class="sc_btn export">导出</a>
78
+							</li>
76 79
 						</ul>
77 80
 					</div>
78 81
 				</div>
@@ -115,7 +118,7 @@
115 118
 
116 119
 				$(".sc_btn").click(function() {
117 120
 					GetColumnList();
118
-					Number()
121
+
119 122
 				})
120 123
 				///查询条件中获取任务列表
121 124
 				function Task() {
@@ -146,6 +149,7 @@
146 149
 					$.ajax({
147 150
 						type: "get",
148 151
 						url: huayi.config.callcenter_url + "/Questionnaire/GetReport?",
152
+
149 153
 						dataType: 'json',
150 154
 						data: {
151 155
 							taskname: $("#cljg").val(),
@@ -167,24 +171,17 @@
167 171
 						}
168 172
 					});
169 173
 				}
170
-				//获取数据
171
-				function Number(){
172
-					$.ajax({
173
-						type: "get",
174
-						url: huayi.config.callcenter_url + "Questionnaire/GetDataList",
175
-						dataType: 'json',
176
-						data: {
177
-							taskname: $("#cljg").val(),
178
-							token: $.cookie("token")
179
-						},
180
-						async: true,
181
-						success: function(data) {
182
-							var Count = data.data;
183
-
184
-							console.log(Count)
185
-						}
186
-					});
187
-				}
174
+				
175
+				       //导出功能
176
+	              	$('.export').click(function() {
177
+						dcexcel(this);
178
+					})
179
+			   function dcexcel(obj) {
180
+	            var url = huayi.config.callcenter_url + "/Questionnaire/GetReportExpt?token=" + $.cookie("token");
181
+	                url += "&taskname=" + $("#cljg").val();
182
+	                obj.href = url;
183
+	                console.log(url);
184
+	       		 }
188 185
 			})
189 186
 
190 187
 			//音频

+ 1 - 7
CallCenterWeb.UI/keHuManager/js/keHuManger.js

@@ -44,13 +44,7 @@
44 44
 		var khmc = $(".add_name").val();
45 45
 		var khbh = $(".add_code").val();
46 46
 		var tel1 = $(".add_ph1").val();
47
-		if(!khmc) {
48
-			layer.confirm('请输入客户名称!', {
49
-				btn: ['确定']
50
-			});
51
-			return;
52
-		}
53
-		alert($(' input[name="autoflag"]:checked ').val())
47
+
54 48
 		$.post(huayi.config.callcenter_url + 'Customer/AddCustomer', {
55 49
 			name: khmc,
56 50
 			code: khbh,