Просмотр исходного кода

客户管理 修改请求方式 工单类型页面

zhangshuangnan лет назад: 8
Родитель
Сommit
11ed509935

+ 292 - 0
CallCenterWeb.UI/ReportForm/addOrderType.html

@@ -0,0 +1,292 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+		<script src="../Script/Common/huayi.load.js"></script>
6
+	    <script src="../Script/Common/huayi.config.js"></script>
7
+	    <link href="../css/layer/need/layer.css" />
8
+	    <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
9
+	    <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
10
+	    <link rel="stylesheet" href="../css/init.css" />
11
+		<title>工单类型</title>
12
+		<style>
13
+			  .toolBar {
14
+            padding: 15px 0;
15
+            border-bottom: 1px solid #ccc;
16
+        }
17
+
18
+        .boxCon table th {
19
+            width: 20%;
20
+        }
21
+
22
+        .boxCon table td textarea {
23
+            width: 100%;
24
+        }
25
+
26
+        .inpBox {
27
+            border: 1px solid #a9a9a9;
28
+            height: 27px;
29
+            width: 55%;
30
+            ;
31
+            display: inline-block;
32
+            position: relative;
33
+            vertical-align: middle;
34
+        }
35
+
36
+        .inps1,
37
+        .inps4 {
38
+            width: 100%;
39
+            height: 24px;
40
+            outline: none;
41
+            border: 0;
42
+            border-image-width: 0;
43
+            padding: 0;
44
+            padding-left: 3px;
45
+        }
46
+
47
+        .changeTitle, .changeKey, .addTitle, .addKey {
48
+            width: 55%;
49
+        }
50
+
51
+        .xl {
52
+            display: inline-block;
53
+            background: url(../img/dropDown.png) no-repeat;
54
+            height: 100%;
55
+            background-position: center center;
56
+            width: 20px;
57
+            position: absolute;
58
+            right: 0;
59
+            top: 0px;
60
+            background-color: #f7bc8b;
61
+            cursor: pointer;
62
+        }
63
+            .xl:hover {
64
+                background-color: #e6d523;
65
+            }
66
+
67
+        .addTree {
68
+            background: #fff;
69
+            position: absolute;
70
+            width: 100%;
71
+            border: 1px solid darkgrey;
72
+            right: 0;
73
+            top: 26px;
74
+            display: none;
75
+            height: 220px;
76
+            overflow-y: auto;
77
+                z-index: 999;
78
+        }
79
+
80
+        .treeTable {
81
+            height: 400px;
82
+            /*overflow-y: auto;*/
83
+        }
84
+
85
+        .tree {
86
+            height: 100%;
87
+        }
88
+
89
+        .trTitle {
90
+            width: 100%;
91
+            height: 34px;
92
+            line-height: 34px;
93
+            border-bottom: 1px solid #ebebeb;
94
+            color: red;
95
+            font-weight: 700;
96
+            margin-bottom: 15px;
97
+        }
98
+
99
+        .treeCon {
100
+            height: 90%;
101
+            border: 1px solid #ebebeb;
102
+            overflow-y: auto;
103
+        }
104
+
105
+        .ztree li {
106
+            width: 100%;
107
+            overflow: hidden;
108
+            white-space: nowrap;
109
+            text-overflow: ellipsis;
110
+        }
111
+
112
+        .content {
113
+            width: 270px;
114
+            height: 25px;
115
+            overflow: hidden;
116
+            white-space: nowrap;
117
+            text-overflow: ellipsis;
118
+            text-align: left;
119
+        }
120
+
121
+        .radio-inline input[type=radio] {
122
+            margin-top: 7px;
123
+        }
124
+
125
+        .editTimeBoxs, .timeBoxs {
126
+            display: none;
127
+        }
128
+		</style>
129
+	
130
+	</head>
131
+	<body >
132
+		<div class="container-fluid">
133
+			 <div class="boxCon">
134
+                <table>
135
+                    <tbody>
136
+                        <tr>
137
+                            <th>所属分类:</th>
138
+                            <td colspan="3">
139
+                                <div class="inpBox">
140
+                                    <input type="text" class="inps inps1" />
141
+                                    <i class="xl xl_one"></i>
142
+                                    <div class="addTree xlAdd">
143
+                                        <ul id="addTreeDemo" class="ztree"></ul>
144
+                                    </div>
145
+                                </div>
146
+                            </td>
147
+                        </tr>
148
+                        <tr>
149
+                            <th>分类名称:</th>
150
+                            <td colspan="3"><input type="text" class="name" /></td>
151
+                        </tr>
152
+                        <tr>
153
+                            <th>排列序号:</th>
154
+                            <td colspan="3"><input type="text" class="sort" /></td>
155
+                        </tr>
156
+                        
157
+                    </tbody>
158
+                </table>
159
+                <div style="text-align: center;"><button class="btns addCun">保存</button></div>
160
+            </div>
161
+		</div>
162
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
163
+	    <script src="../css/laydate/laydate.js"></script>
164
+		<script>
165
+			var pid=helper.request.queryString("addPid"); //当前父节点ID
166
+			var names=unescape(decodeURI(helper.request.queryString("addName"))); //选择的name
167
+			var token=$.cookie("token");
168
+//			var id=helper.request.queryString("addId"); //当前节点id
169
+			if(pid=="undefined"){
170
+				pid="0"
171
+			}else{
172
+				pid=pid;
173
+			}
174
+//			if(id=="undefined"){
175
+//				id="0"
176
+//			}else{
177
+//				id=id;
178
+//			}
179
+			$(document).ready(function(){
180
+				var addPid, addName, addSort;
181
+				$('input:radio[name="canlastlong"]').change(function () {
182
+				    if ($(this).val() == '0') {
183
+				        $(".timeBoxs").show();
184
+				    }
185
+				    else {
186
+				        $(".timeBoxs").hide();
187
+				    }
188
+				})
189
+
190
+			var setting2 = {
191
+				    data: {
192
+				        key: {
193
+				            name: "text"
194
+				        },
195
+				        simpleData: {
196
+				            enable: true,
197
+				            idKey: "id",
198
+				            rootPId: 0
199
+				        }
200
+				    },
201
+				    callback: {
202
+				        onClick: addTreeClick
203
+				    }
204
+				};
205
+				
206
+			function addTreeClick(event, treeId, treeNode) {
207
+			    addPid = treeNode.id;
208
+			    //console.log(addPid);
209
+			    xlName = treeNode.text;
210
+			    $('.inps1').val(xlName);
211
+			};
212
+			function getTree() {
213
+			    $.get(huayi.config.callcenter_url + 'KnowledgeClass/GetList', {
214
+			        "token": $.cookie("token"),
215
+			        "pid": pid
216
+			    }, function (result) {
217
+			        result = $.parseJSON(result);
218
+			        $.fn.zTree.init($("#addTreeDemo"), setting2, result.data); //实例化树形图
219
+			    });
220
+			
221
+			}	
222
+				getTree();
223
+			
224
+		
225
+		   if (names) {
226
+		        $('.inps1').val(names);
227
+		        addPid = id;
228
+		    } else {
229
+		        $('.inps1').val("顶级分类");
230
+		        addPid = 0
231
+		        //console.log(addPid);
232
+		    }
233
+			//添加内容下拉
234
+			$('.inps1').focus(function () {
235
+			    $('.xlAdd').css('display', 'block');
236
+			})
237
+			$('.xl_one').click(function () {
238
+			    if ($('.xlAdd').css('display') == 'block') {
239
+			        $('.xlAdd').css('display', 'none')
240
+			    } else {
241
+			        $('.xlAdd').css('display', 'block')
242
+			    }
243
+			})
244
+			$('.addTree').mouseleave(function () {
245
+			    $(this).css('display', 'none')
246
+			})
247
+			//保存添加按钮
248
+			$('.addCun').click(function () {
249
+			    console.log(addPid);
250
+			    if ($('.inps1').val() == "" || $('.name').val() == "") {
251
+			        layer.confirm('所添加内容不允许为空!', {
252
+			            btn: ['确定']
253
+			        });
254
+			        return;
255
+			    } else {
256
+			        addName =$('.name').val()
257
+			        addSort = $('.sort').val();
258
+			        addCunTree(addPid, addName, addSort);
259
+			    }
260
+			})
261
+					function addCunTree(addPid, addName, addSort) {
262
+					    $.ajax({
263
+					        type: "post",
264
+					        url: huayi.config.callcenter_url + "WorkType/Save",
265
+					        dataType: 'json',
266
+					        async: true,
267
+					        data: {
268
+					            pid:addPid,
269
+					            name:addName,
270
+					            sort:addSort,
271
+					            token: token
272
+					        },
273
+					        success: function (data) {
274
+					            if (data.state == "success") {
275
+					                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
276
+												parent.layer.close(index); //再执行关闭
277
+					                            parent.layer.msg("添加成功!");
278
+								                parent.table.bootstrapTable('refresh'); 
279
+					            }
280
+					        }
281
+					
282
+					    });
283
+					
284
+					}
285
+				
286
+			})
287
+			
288
+			
289
+			
290
+		</script>
291
+	</body>
292
+</html>

+ 57 - 0
CallCenterWeb.UI/ReportForm/css/orderType.css

@@ -0,0 +1,57 @@
1
+			.toolBar {
2
+				padding: 15px 0;
3
+				border-bottom: 1px solid #ccc;
4
+			}
5
+			.tree {
6
+				height: 400px;
7
+				overflow-y: auto;
8
+			}
9
+			
10
+			.inpBox {
11
+				border: 1px solid #a9a9a9;
12
+				height: 27px;
13
+				width: 172px;
14
+				display: inline-block;
15
+				position: relative;
16
+				vertical-align: middle;
17
+			}
18
+			
19
+			.inps {
20
+				height: 24px;
21
+				width: 172px;
22
+			}
23
+			
24
+			.inps1,.inps4 {
25
+				width: 170px;
26
+				height: 24px;
27
+				outline: none;
28
+				border: 0;
29
+				border-image-width: 0;
30
+				padding: 0;
31
+				padding-left: 3px;
32
+			}
33
+			
34
+			.xl {
35
+				display: inline-block;
36
+				background: url("../../img/dropDown.png") no-repeat;
37
+				height: 100%;
38
+				background-position: center center;
39
+				width: 20px;
40
+				position: absolute;
41
+				right: 0;
42
+				top: 0px;
43
+				background-color: #f7bc8b;
44
+				cursor: pointer;
45
+			}
46
+			.xl:hover{
47
+					background-color: #e6d523;
48
+			}
49
+			.addTree{
50
+			    background: #fff;
51
+			    position: absolute;
52
+			    width: 100%;
53
+			       border: 1px solid darkgrey;
54
+			    right: 0;
55
+			    top: 26px;
56
+			    display: none;
57
+			}

+ 376 - 0
CallCenterWeb.UI/ReportForm/editOrderType.html

@@ -0,0 +1,376 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<meta charset="UTF-8">
7
+		<script src="../Script/Common/huayi.load.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<link href="../css/layer/need/layer.css" />
10
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
11
+		<link rel="stylesheet" href="../css/laydate/need/laydate.css" />
12
+		<link rel="stylesheet" href="../css/init.css" />
13
+		<title>知识库修改</title>
14
+		<style>
15
+			.toolBar {
16
+				padding: 15px 0;
17
+				border-bottom: 1px solid #ccc;
18
+			}
19
+			
20
+			.boxCon table th {
21
+				width: 20%;
22
+			}
23
+			
24
+			.boxCon table td textarea {
25
+				width: 100%;
26
+			}
27
+			
28
+			.inpBox {
29
+				border: 1px solid #a9a9a9;
30
+				height: 27px;
31
+				width: 55%;
32
+				;
33
+				display: inline-block;
34
+				position: relative;
35
+				vertical-align: middle;
36
+			}
37
+			
38
+			.inps1,
39
+			.inps4 {
40
+				width: 100%;
41
+				height: 24px;
42
+				outline: none;
43
+				border: 0;
44
+				border-image-width: 0;
45
+				padding: 0;
46
+				padding-left: 3px;
47
+			}
48
+			
49
+			.changeTitle,
50
+			.changeKey,
51
+			.addTitle,
52
+			.addKey {
53
+				width: 55%;
54
+			}
55
+			
56
+			.xl {
57
+				display: inline-block;
58
+				background: url(../img/dropDown.png) no-repeat;
59
+				height: 100%;
60
+				background-position: center center;
61
+				width: 20px;
62
+				position: absolute;
63
+				right: 0;
64
+				top: 0px;
65
+				background-color: #f7bc8b;
66
+				cursor: pointer;
67
+			}
68
+			
69
+			.xl:hover {
70
+				background-color: #e6d523;
71
+			}
72
+			
73
+			.addTree {
74
+				background: #fff;
75
+				position: absolute;
76
+				width: 100%;
77
+				border: 1px solid darkgrey;
78
+				right: 0;
79
+				top: 26px;
80
+				display: none;
81
+				height: 220px;
82
+				overflow-y: auto;
83
+				z-index: 999;
84
+			}
85
+			
86
+			.treeTable {
87
+				height: 400px;
88
+				/*overflow-y: auto;*/
89
+			}
90
+			
91
+			.tree {
92
+				height: 100%;
93
+			}
94
+			
95
+			.trTitle {
96
+				width: 100%;
97
+				height: 34px;
98
+				line-height: 34px;
99
+				border-bottom: 1px solid #ebebeb;
100
+				color: red;
101
+				font-weight: 700;
102
+				margin-bottom: 15px;
103
+			}
104
+			
105
+			.treeCon {
106
+				height: 90%;
107
+				border: 1px solid #ebebeb;
108
+				overflow-y: auto;
109
+			}
110
+			
111
+			.ztree li {
112
+				width: 100%;
113
+				overflow: hidden;
114
+				white-space: nowrap;
115
+				text-overflow: ellipsis;
116
+			}
117
+			
118
+			.content {
119
+				width: 270px;
120
+				height: 25px;
121
+				overflow: hidden;
122
+				white-space: nowrap;
123
+				text-overflow: ellipsis;
124
+				text-align: left;
125
+			}
126
+			
127
+			.radio-inline input[type=radio] {
128
+				margin-top: 7px;
129
+			}
130
+			
131
+			.editTimeBoxs,
132
+			.timeBoxs {
133
+				display: none;
134
+			}
135
+		</style>
136
+
137
+	</head>
138
+
139
+	<body>
140
+		<div class="container-fluid">
141
+
142
+			<div class="boxCon">
143
+					<table>
144
+						<tbody>
145
+							<tr>
146
+								<th>所属分类:</th>
147
+								<td colspan="3">
148
+									<div class="inpBox">
149
+										<input type="text" class="inps inps4" />
150
+										<i class="xl xl_two"></i>
151
+										<div class="addTree xlChange">
152
+											<ul id="changeTreeDemo" class="ztree"></ul>
153
+										</div>
154
+									</div>
155
+								</td>
156
+							</tr>
157
+							<tr>
158
+								<th>标题:</th>
159
+								<td colspan="3"><input type="text" class="changeTitle" /></td>
160
+							</tr>
161
+							<tr>
162
+								<th>关键字:</th>
163
+								<td colspan="3"><input type="text" class="changeKey" /></td>
164
+							</tr>
165
+							<tr>
166
+								<th>是否永久生效:</th>
167
+								<td>
168
+									<label class="radio-inline">
169
+                                    <input type="radio" checked="checked" name="editCanlastlong" value="1" style="vertical-align: middle;display: inline-block;">是
170
+                                </label>
171
+									<label class="radio-inline">
172
+                                    <input type="radio" name="editCanlastlong" value="0" style="vertical-align: middle;display: inline-block;">否
173
+                                </label>
174
+								</td>
175
+							</tr>
176
+							<tr class="editTimeBoxs">
177
+								<th>开始时间:</th>
178
+								<td>
179
+									<input type="text" id="editStartTime" class="laydate-icon" placeholder="开始时间" style="width: 160px; padding-left: 10px;" />
180
+									<input type="text" id="editEndTime" class="laydate-icon" placeholder="结束时间" style="width: 160px; padding-left: 10px; margin-left: 5px;" />
181
+								</td>
182
+							</tr>
183
+							<tr>
184
+								<th>内容:</th>
185
+								<td colspan="3"><textarea id="changeEditor" name="content" style="width: 100%;height: 100px;"></textarea></td>
186
+							</tr>
187
+						</tbody>
188
+					</table>
189
+					<div style="text-align: center;"><button class="btns changeCun">保存</button></div>
190
+				</div>
191
+
192
+		</div>
193
+
194
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
195
+		<script src="../js/kindeditor/kindeditor.js"></script>
196
+		<script src="../js/kindeditor/lang/zh_CN.js"></script>
197
+		<script src="../css/laydate/laydate.js"></script>
198
+		<script>
199
+			var pid = helper.request.queryString("editPid"); //当前父节点ID
200
+			var names = unescape(decodeURI(helper.request.queryString("editName"))); //选择的name
201
+			var token = $.cookie("token");
202
+			//			var id = helper.request.queryString("editId"); //当前节点id
203
+			var changeGetid = helper.request.queryString("editId"); //当前节点id
204
+			if(pid=="undefined"){
205
+				pid="0"
206
+			}else{
207
+				pid=pid;
208
+			}
209
+			//编辑器配置
210
+				KindEditor.ready(function(K) {
211
+					window.changeEditor = K.create('#changeEditor'); //修改弹出框编辑器
212
+				});
213
+
214
+			$(document).ready(function() {
215
+				console.log(pid)
216
+				var chanId, //修改弹出框内 下拉框当前节点ID
217
+					changeName, //修改弹出框内 下拉框当前节点name
218
+					//			    changeGetid,
219
+					chanCunId;
220
+				getChangeTree();
221
+				getChangeBox(changeGetid);
222
+
223
+				$('input:radio[name="editCanlastlong"]').change(function() {
224
+					if($(this).val() == '0') {
225
+						$(".editTimeBoxs").show();
226
+					} else {
227
+						$(".editTimeBoxs").hide();
228
+					}
229
+				})
230
+				laydate.skin('molv');
231
+				laydate({
232
+					elem: '#editStartTime',
233
+					event: 'focus',
234
+					istime: true,
235
+					format: 'YYYY-MM-DD hh:mm:ss' // 分隔符可以任意定义,该例子表示只显示年月
236
+				});
237
+				laydate({
238
+					elem: '#editEndTime',
239
+					event: 'focus',
240
+					istime: true,
241
+					format: 'YYYY-MM-DD hh:mm:ss', // 分隔符可以任意定义,该例子表示只显示年月
242
+				});
243
+
244
+				$('.inps4').focus(function() {
245
+					$('.xlChange').css('display', 'block')
246
+				})
247
+				//下拉按钮功能
248
+				$('.xl_two').click(function() {
249
+					if($('.xlChange').css('display') == 'block') {
250
+						$('.xlChange').css('display', 'none')
251
+					} else {
252
+						$('.xlChange').css('display', 'block')
253
+					}
254
+
255
+				})
256
+				$('.addTree').mouseleave(function () {
257
+						    $(this).css('display', 'none')
258
+						})
259
+				//修改弹出框内 下拉树形图参数配置项
260
+				var setting3 = {
261
+					data: {
262
+						key: {
263
+							name: "text"
264
+						},
265
+						simpleData: {
266
+							enable: true,
267
+							idKey: "id",
268
+							rootPId: 0
269
+						}
270
+					},
271
+					callback: {
272
+						onClick: changeTreeClick
273
+					}
274
+				}
275
+
276
+				function changeTreeClick(event, treeId, treeNode) {
277
+					chanId = treeNode.id;
278
+					changeName = treeNode.text;
279
+					$('.inps4').val(changeName);
280
+					chanCunId = chanId;
281
+				};
282
+
283
+				function getChangeTree() {
284
+					$.get(huayi.config.callcenter_url + 'KnowledgeClass/GetList', {
285
+						"token": $.cookie("token"),
286
+						"pid": pid
287
+					}, function(result) {
288
+						result = $.parseJSON(result);
289
+						$.fn.zTree.init($("#changeTreeDemo"), setting3, result.data); //实例化树形图
290
+					});
291
+
292
+				}
293
+
294
+				var cunId;
295
+
296
+				function getChangeBox(changeGetid) {
297
+					$.ajax({
298
+						type: "post",
299
+						url: huayi.config.callcenter_url + "Knowledge/GetInfo",
300
+						async: true,
301
+						dataType: 'json',
302
+						data: {
303
+							infoid: changeGetid,
304
+							token: token
305
+						},
306
+						success: function(data) {
307
+							var con = data.data;
308
+							$('.inps4').val(con.F_Expand1);
309
+							$('.changeTitle').val(con.F_Title);
310
+							$('.changeKey').val(con.F_KeyWords);
311
+							$('input:radio[name="editCanlastlong"][value="' + con.F_CanLastLong + '"]').prop("checked", "checked");
312
+							if(con.F_CanLastLong == '0') {
313
+								$(".editTimeBoxs").show();
314
+							} else {
315
+								$(".editTimeBoxs").hide();
316
+							}
317
+							$('#editStartTime').val(con.F_StartTime);
318
+							$('#editEndTime').val(con.F_EndTime);
319
+							changeEditor.html(con.F_Content);
320
+							cunId = con.F_CategoryId;
321
+							chanCunId = cunId;
322
+						}
323
+					});
324
+
325
+				}
326
+
327
+				function changeBaoCunAjax(changeGetid, chanCunId) {
328
+					if($('input:radio[name="editCanlastlong"]').val() == '0') {
329
+						if($('#editStartTime').val() == '') {
330
+							layer.msg("请选择开始时间!");
331
+
332
+						}
333
+						if($('#editEndTime').val() == '') {
334
+							layer.msg("请选择结束时间!");
335
+						}
336
+					}
337
+					$.ajax({
338
+						type: "post",
339
+						url: huayi.config.callcenter_url + "Knowledge/EditInfo",
340
+						async: true,
341
+						dataType: 'json',
342
+						data: {
343
+							infoid: changeGetid,
344
+							title: $('.changeTitle').val(),
345
+							key: $('.changeKey').val(),
346
+							con: encodeURIComponent(changeEditor.html()),
347
+							pid: chanCunId,
348
+							start: $('#editStartTime').val(),
349
+							end: $('#editEndTime').val(),
350
+							canlastlong: $('input:radio:checked[name="editCanlastlong"]').val(),
351
+							token: token
352
+						},
353
+						success: function(data) {
354
+							if(data.state == "success") {
355
+
356
+								var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
357
+								parent.layer.close(index); //再执行关闭
358
+								parent.layer.msg("修改成功!");
359
+								parent.table.bootstrapTable('refresh');
360
+							}
361
+						}
362
+					});
363
+
364
+				}
365
+				$('.changeCun').click(function() {
366
+					console.log(chanCunId)
367
+					changeBaoCunAjax(changeGetid, chanCunId);
368
+
369
+				})
370
+
371
+			})
372
+		</script>
373
+
374
+	</body>
375
+
376
+</html>

+ 344 - 0
CallCenterWeb.UI/ReportForm/js/orderType.js

@@ -0,0 +1,344 @@
1
+	var tps = $('.tps');
2
+	var id = ''; //当前节点id
3
+	var name=''; //当前节点name
4
+	var pid; //当前节点父ID
5
+	var pidName;//
6
+	var xlName; //添加弹出框内下拉框内节点name
7
+	var token = $.cookie("token");
8
+	tree();
9
+
10
+	function tree() {
11
+		$.get(huayi.config.callcenter_url + 'WorkType/GetTreeList', {
12
+			"token": $.cookie("token"),
13
+//			"pid": pid
14
+		}, function(result) {
15
+			result = $.parseJSON(result);
16
+			$.fn.zTree.init($("#treeDemo"), setting1, result.data); //实例化树形图
17
+		});
18
+	}
19
+	var setting1 = {
20
+		data: {
21
+			key: {
22
+				name: "text"
23
+			},
24
+			simpleData: {
25
+				enable: true,
26
+				idKey: "id",
27
+				rootPId: 0
28
+			}
29
+		},
30
+		callback: {
31
+			onClick: zTreeOnClick
32
+		}
33
+	};
34
+
35
+	function zTreeOnClick(event, treeId, treeNode) {
36
+		id = treeNode.id;
37
+		name = treeNode.text;
38
+		var pidnode = treeNode.getParentNode();
39
+		if(pidnode) {
40
+			pidName = pidnode.text;
41
+			pid = pidnode.id;
42
+		} else {
43
+			pidName = "顶级分类";
44
+			pid =0;
45
+		}
46
+	};
47
+	var setting2 = {
48
+		data: {
49
+			key: {
50
+				name: "text"
51
+			},
52
+			simpleData: {
53
+				enable: true,
54
+				idKey: "id",
55
+				rootPId: 0
56
+			}
57
+		},
58
+		callback: {
59
+			onClick: addTreeClick
60
+		}
61
+	}
62
+
63
+	function addTreeClick(event, treeId, treeNode) {
64
+		addPid = treeNode.id;
65
+		console.log(addPid);
66
+		xlName = treeNode.text;
67
+		$('.inps1').val(xlName);
68
+
69
+	};
70
+	//删除按钮
71
+	$('.del').click(function() {
72
+		if(id == 'null' || id == '') {
73
+			layer.confirm('没有要删除的分类!', {
74
+				btn: ['确定']
75
+			});
76
+			return
77
+		} else {
78
+			$('.delModel').css('display', 'block');
79
+			$('.delName').html(name);
80
+		}
81
+	})
82
+	//关闭按钮
83
+	$('.delBtr').click(function() {
84
+		$('.delModel').css('display', 'none');
85
+	})
86
+	//确定删除按钮
87
+	$('.sure').click(function() {
88
+//		id=id.toString();
89
+		$.ajax({
90
+			type: "get",
91
+			url: huayi.config.callcenter_url + "WorkType/DeleteWoType",
92
+			async: true,
93
+			dataType: 'json',
94
+			data: {
95
+				f_catagoryid:id,
96
+				token: token
97
+			},
98
+			success: function(data) {
99
+				if(data.state == "success") {
100
+					layer.msg("删除成功!");
101
+					tree();
102
+				}
103
+			}
104
+		});
105
+		$('.delModel').css('display', 'none');
106
+
107
+	})
108
+	//取消删除按钮
109
+	$('.return').click(function() {
110
+		$('.delModel').css('display', 'none');
111
+	})
112
+
113
+	//添加按钮
114
+	$('.add').click(function() {
115
+		$('.addModel').css('display', 'block');
116
+		if(name) {
117
+			tps.html(name);
118
+			$('.inps1').val(name);
119
+			addPid = id;
120
+		} else {
121
+			tps.html('顶级分类');
122
+			$('.inps1').val('顶级分类');
123
+			addPid = 0;
124
+		}
125
+		treeCont();
126
+
127
+	})
128
+	//添加关闭按钮
129
+	$('.addBtr').click(function() {
130
+		$('.addModel').css('display', 'none');
131
+	})
132
+	//添加内容下拉
133
+	$('.inps1').focus(function() {
134
+		$('.xlAdd').css('display', 'block')
135
+	})
136
+	$('.xl_one').click(function() {
137
+		if($('.xlAdd').css('display') == 'block') {
138
+			$('.xlAdd').css('display', 'none')
139
+		} else {
140
+			$('.xlAdd').css('display', 'block')
141
+		}
142
+	})
143
+	$('.addTree').mouseleave(function() {
144
+		$(this).css('display', 'none')
145
+	})
146
+	//保存添加按钮
147
+	var addPid, addDeptname, addSort;
148
+	//添加弹出框内 所属部门下拉框内数据
149
+	function treeCont() {
150
+		$.get(huayi.config.callcenter_url + 'WorkType/GetTreeList', {
151
+			"token": $.cookie("token"),
152
+//			"pid": pid
153
+		}, function(result) {
154
+			result = $.parseJSON(result);
155
+			$.fn.zTree.init($("#addTreeDemo"), setting2, result.data); //实例化树形图
156
+		});
157
+
158
+	}
159
+	$('.addCun').click(function() {
160
+		//				console.log(addPid);
161
+		if($('.inps2').val() == "") {
162
+		    if (addPid.length <= 0) {
163
+				layer.confirm('所添加内容不能为空!', {
164
+					btn: ['确定']
165
+				});
166
+				return;
167
+			}
168
+		} else {
169
+			addDeptname = $('.inps2').val();
170
+			addSort = $('.inps3').val();
171
+			if (addSort == "")
172
+			    addSort = 0;
173
+			$('.addModel').css('display', 'none');
174
+			$.ajax({
175
+				type: "post",
176
+				url: huayi.config.callcenter_url + "WorkType/Save",
177
+				dataType: 'json',
178
+				async: true,
179
+				data: {
180
+					pid: addPid, //当前选择节点ID
181
+					name: addDeptname, //部门名称
182
+					sort: addSort, //排列序号
183
+					token: token
184
+				},
185
+				success: function(data) {
186
+					//					console.log(data)
187
+					//					console.log(data.state);
188
+					if(data.state == "success") {
189
+						layer.msg("添加成功!");
190
+						tree();
191
+						$('.inps1').val('');
192
+						$('.inps2').val('');
193
+						$('.inps3').val('');
194
+
195
+					}
196
+				}
197
+
198
+			});
199
+
200
+		}
201
+	})
202
+
203
+	//修改按钮
204
+	var chanPid, //修改弹出框内 下拉框父节点ID
205
+		chanId, //修改弹出框内 下拉框当前节点ID
206
+		changeName, //修改弹出框内 下拉框当前节点name
207
+		chbcName, //保存的部门名称
208
+		chbcSort, //保存的排序号
209
+		chbcPid; //保存的所属部门ID
210
+	$('.change').click(function() {
211
+		if(id == 'null' || id == '') {
212
+			layer.confirm('没有选择要修改的部门!', {
213
+				btn: ['确定']
214
+			})
215
+			return
216
+		} else {
217
+			changeAjax(id);
218
+			$('.changeModel').css('display', 'block');
219
+			$('.chtps').html(name);
220
+			changeTreeCont();
221
+		}
222
+
223
+	});
224
+	//关闭按钮
225
+	$('.changeBtr').click(function() {
226
+		$('.changeModel').css('display', 'none');
227
+	}) ;
228
+	$('.inps4').focus(function() {
229
+		$('.xlChange').css('display', 'block')
230
+	})
231
+	//下拉按钮功能
232
+	$('.xl_two').click(function() {
233
+		if($('.xlChange').css('display') == 'block') {
234
+			$('.xlChange').css('display', 'none')
235
+		} else {
236
+			$('.xlChange').css('display', 'block')
237
+		}
238
+	})
239
+	//修改弹出框内 下拉树形图参数配置项
240
+	var setting3 = {
241
+		data: {
242
+			key: {
243
+				name: "text"
244
+			},
245
+			simpleData: {
246
+				enable: true,
247
+				idKey: "id",
248
+				rootPId: 0
249
+			}
250
+		},
251
+		callback: {
252
+			onClick: changeTreeClick
253
+		}
254
+	}
255
+
256
+	function changeTreeClick(event, treeId, treeNode) {
257
+//		chanPid = treeNode.pId;
258
+		chanId = treeNode.id;
259
+		changeName = treeNode.text;
260
+		$('.inps4').val(changeName);
261
+		var pidnode = treeNode.getParentNode();
262
+		if(pidnode) {
263
+			chanPid = pidnode.id;
264
+		} else {
265
+			chanPid =0;
266
+		}
267
+		chbcPid=chanId;
268
+	};
269
+
270
+	//修改弹出框内 所属部门下拉框内数据
271
+	function changeTreeCont() {
272
+		$.get(huayi.config.callcenter_url + 'WorkType/GetTreeList', {
273
+			"token": $.cookie("token"),
274
+//			"pid": pid
275
+		}, function(result) {
276
+			result = $.parseJSON(result);
277
+			$.fn.zTree.init($("#changeTreeDemo"), setting3, result.data); //实例化树形图
278
+		});
279
+	}
280
+
281
+	function changeAjax(id) {
282
+		$.ajax({
283
+			type: "get",
284
+			url: huayi.config.callcenter_url + "WorkType/Add",
285
+			dataType: 'json',
286
+			async: true,
287
+			data: {
288
+				id: id,
289
+				token: token
290
+			},
291
+			success: function(data) {
292
+				var chanCon = data.data;
293
+				if(pid == 0) {
294
+					$('.inps4').val('顶级分类');
295
+					chbcPid =pid;
296
+				} else {
297
+					$('.inps4').val(chanCon.parentname);
298
+					chbcPid = chanCon.parentid;
299
+				}
300
+				$('.inps5').val(chanCon.catagoryname);
301
+				$('.inps6').val(chanCon.sort);
302
+				chbcSort = chanCon.sort;
303
+				chbcName = chanCon.depname;
304
+			}
305
+		});
306
+	}
307
+	//修改的保存按钮功能
308
+	function changeBaoCunAjax(id, chbcPid, chbcName, chbcSort) {
309
+		$.ajax({
310
+			type: "post",
311
+			url: huayi.config.callcenter_url + "WorkType/Save",
312
+			async: true,
313
+			dataType: 'json',
314
+			data: {
315
+				id:id,
316
+				pid: chbcPid,
317
+				name: chbcName,
318
+				sort: chbcSort,
319
+				token: token
320
+			},
321
+			success: function(data) {
322
+				if(data.state == "success") {
323
+					layer.msg("修改成功!");
324
+					tree();
325
+				}
326
+			}
327
+		});
328
+	}
329
+	$('.changeCun').click(function() {
330
+		if($('.inps4').val() == "" || $('.inps5').val() == "" || $('.inps6').val() == "") {
331
+			layer.confirm('所修改内容不允许为空!', {
332
+				btn: ['确定']
333
+			});
334
+			return;
335
+		} else {
336
+			$('.changeModel').css('display', 'none');
337
+			console.log('部门id'+id +'所属部门id' + chbcPid +'部门名称'+chbcName+'排序'+chbcSort);
338
+			chbcPid;
339
+			chbcName = $('.inps5').val();
340
+			chbcSort = $('.inps6').val();
341
+			changeBaoCunAjax(id, chbcPid, chbcName, chbcSort);
342
+		}
343
+
344
+	})

+ 97 - 204
CallCenterWeb.UI/ReportForm/orderType.html

@@ -1,218 +1,111 @@
1 1
 <!DOCTYPE html>
2 2
 <html>
3
-<head>
4
-    <meta charset="UTF-8">
5
-    <script src="../Script/Common/huayi.load.js"></script>
6
-    <script src="../Script/Common/huayi.config.js"></script>
7
-    <link href="../css/layer/need/layer.css" />
8
-    <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
9
-    <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
10
-    <link rel="stylesheet" href="../css/init.css" />
11
-    <title>工单类型</title>
12
-    <style>
13
-        .toolBar {
14
-            padding: 15px 0;
15
-            border-bottom: 1px solid #ccc;
16
-        }
17 3
 
18
-        .boxCon table th {
19
-            width: 20%;
20
-        }
21
-
22
-        .boxCon table td textarea {
23
-            width: 100%;
24
-        }
25
-
26
-        .inpBox {
27
-            border: 1px solid #a9a9a9;
28
-            height: 27px;
29
-            width: 55%;
30
-            display: inline-block;
31
-            position: relative;
32
-            vertical-align: middle;
33
-        }
34
-
35
-        .inps1,
36
-        .inps4 {
37
-            width: 100%;
38
-            height: 24px;
39
-            outline: none;
40
-            border: 0;
41
-            border-image-width: 0;
42
-            padding: 0;
43
-            padding-left: 3px;
44
-        }
45
-
46
-        .changeTitle, .changeKey, .addTitle, .addKey {
47
-            width: 55%;
48
-        }
49
-
50
-        .xl {
51
-            display: inline-block;
52
-            background: url(../img/dropDown.png) no-repeat;
53
-            height: 100%;
54
-            background-position: center center;
55
-            width: 20px;
56
-            position: absolute;
57
-            right: 0;
58
-            top: 0px;
59
-            background-color: #f7bc8b;
60
-            cursor: pointer;
61
-        }
62
-
63
-            .xl:hover {
64
-                background-color: #e6d523;
65
-            }
66
-
67
-        .addTree {
68
-            background: #fff;
69
-            position: absolute;
70
-            width: 100%;
71
-            border: 1px solid darkgrey;
72
-            right: 0;
73
-            top: 26px;
74
-            display: none;
75
-            height: 220px;
76
-            overflow-y: auto;
77
-        }
78
-
79
-        .treeTable {
80
-            height: 400px;
81
-            /*overflow-y: auto;*/
82
-        }
83
-
84
-        .tree {
85
-            height: 100%;
86
-        }
87
-
88
-        .trTitle {
89
-            width: 100%;
90
-            height: 34px;
91
-            line-height: 34px;
92
-            border-bottom: 1px solid #ebebeb;
93
-            color: red;
94
-            font-weight: 700;
95
-            margin-bottom: 15px;
96
-        }
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<script src="../Script/Common/huayi.load.js"></script>
7
+   		<script src="../Script/Common/huayi.config.js"></script>
8
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
9
+		<link rel="stylesheet" href="../css/init.css" />
10
+		<link rel="stylesheet" href="css/orderType.css" />
11
+		<title>工单类型</title>
12
+	</head>
13
+	<body>
14
+		<div class="container-fluid">
15
+				<div class="daoHang clearfix">
16
+				<div class="dhLeft">
17
+					<sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">系统管理</a>&gt;<a href="javaScript:;">权限管理</a>&gt;<a href="" class="nowPosition">工单类型</a></sapn>
18
+				</div>
19
+				<div class="dhRight">
20
+            		<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
21
+            	</div>
22
+			</div>
23
+			<div class="toolBar">
24
+				<button class="btns add">添加</button>
25
+				<button class="btns change">修改</button>
26
+				<button class="btns del">删除</button>
27
+			</div>
28
+			<div class="tree">
29
+				<ul id="treeDemo" class="ztree">
30
+					<!--类名为ztree是必须的-->
31
+				</ul>
32
+			</div>
97 33
 
98
-        .treeCon {
99
-            height: 90%;
100
-            border: 1px solid #ebebeb;
101
-            overflow-y: auto;
102
-        }
34
+		</div>
35
+		<!--添加弹出内容-->
36
+		<div class="model addModel">
37
+			<div class="box">
38
+				<div class="btop clearfix">
39
+					<p class="btl"><span>添加</span>&nbsp;&lfloor;&nbsp;&nbsp;<span class="tps" style="color: red;"></span>&nbsp;&nbsp;&rceil;&nbsp;部门</p>
40
+					<p class="btr addBtr" title="关闭">X</p>
41
+				</div>
42
+				<div class="boxCon">
43
+					<div>所属部门:
44
+						<div class="inpBox">
45
+							<input type="text" class="inps inps1" />
46
+							<i class="xl xl_one"></i>
47
+							<div class="addTree xlAdd">
48
+								<ul id="addTreeDemo" class="ztree">
49
+									
50
+								</ul>
51
+							</div>
52
+						</div>
53
+					</div>
54
+					<div>部门名称:<input class="inps inps2" type="text" /></div>
55
+					<div>排列序号:<input class="inps inps3" type="text" /></div>
56
+					<div><button class="btns addCun">保存</button></div>
57
+				</div>
58
+			</div>
103 59
 
104
-        .ztree li {
105
-            width: 100%;
106
-            overflow: hidden;
107
-            white-space: nowrap;
108
-            text-overflow: ellipsis;
109
-        }
60
+		</div>
61
+		<!--删除弹出内容-->
62
+		<div class="model delModel">
63
+			<div class="box">
64
+				<div class="btop clearfix">
65
+					<p class="btl"><span>删除提示</span></p>
66
+					<p class="btr delBtr" title="关闭">X</p>
67
+				</div>
68
+				<div class="boxCon" style="height: 150px;">
69
+					您确定删除&nbsp;&lfloor;&nbsp;&nbsp;<span class="delName" style="color: red;"></span>&nbsp;&nbsp;&rceil;&nbsp;?
110 70
 
111
-        .content {
112
-            width: 270px;
113
-            height: 25px;
114
-            overflow: hidden;
115
-            white-space: nowrap;
116
-            text-overflow: ellipsis;
117
-            text-align: left;
118
-        }
71
+					<p style="margin-top: 30px;"><button class="btns sure">确定</button>
72
+						<button class="btns return">取消</button></p>
73
+					<!--<p style="color: red;">注:若该分类下包含知识库内容会一并删除</p>-->
74
+				</div>
119 75
 
120
-        .radio-inline input[type=radio] {
121
-            margin-top: 7px;
122
-        }
76
+			</div>
123 77
 
124
-        .editTimeBoxs, .timeBoxs {
125
-            display: none;
126
-        }
127
-        .laydate-icon{
128
-			height: initial!important;
129
-		}
130
-    </style>
131
-</head>
132
-<body class="gray-bg">
133
-	 <div class="daoHang clearfix">
134
-				<div class="dhLeft" >
135
-					<sapn><i class="syIcon"></i>位置:<a href="javaScript:;"  id="ReIndex">首页</a>&gt;<a href="javaScript:;">报表管理</a>&gt;<a href="" style="color: #000;">工单类型</a></sapn>
136
-				</div>
137
-				<div class="dhRight">
138
-            	<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
139
-            </div>
140 78
 		</div>
141
-       
142
-    <div class="wrapper wrapper-content animated fadeInRight">
143
-       
144
-       <div class="toolBox">
145
-				<div class="th-bar clearfix">
146
-					<div class="pull-left">
147
-						<div class="form-inline">
148
-							<div class="form-group">
149
-							 	<input type="text" class="form-control laydate-icon" id="startTime" placeholder="开始时间"/>
150
-							</div>
151
-							<div class="form-group">
152
-							 	<input type="text" class="form-control laydate-icon" id="endTime" placeholder="结束时间"/>
79
+		<!--修改弹出内容-->
80
+		<div class="model changeModel">
81
+			<div class="box">
82
+				<div class="btop clearfix">
83
+					<p class="btl"><span>修改</span>&nbsp;&lfloor;&nbsp;&nbsp;<span class="tps chtps" style="color: red;"></span>&nbsp;&nbsp;&rceil;&nbsp;部门</p>
84
+					<p class="btr changeBtr" title="关闭">X</p>
85
+				</div>
86
+				<div class="boxCon">
87
+					<div>所属部门:
88
+						<div class="inpBox">
89
+							<input type="text" class="inps inps4" />
90
+							<i class="xl xl_two"></i>
91
+							<div class="addTree xlChange">
92
+								<ul id="changeTreeDemo" class="ztree">
93
+									
94
+								</ul>
153 95
 							</div>
154 96
 						</div>
155
-				</div>
156
-				<div class="pull-right">
157
-					   <button class="btns add">添加</button>
158
-                		<button class="btns change">修改</button>
159
-              		  <button class="btns del">删除</button>
160
-					<button class="btns searchGo">搜索</button>
161
-					<!--<a href="" class="btns export">导出</a>-->
162
-				</div>
97
+					</div>
98
+					<div>部门名称:<input class="inps inps5" type="text" /></div>
99
+					<div>排列序号:<input class="inps inps6" type="text" /></div>
100
+					<div><button class="btns changeCun">保存</button></div>
163 101
 				</div>
164 102
 			</div>
165
-       
166
-       <div class="treeTable clearfix">
167
-            <div class="tree col-md-3">
168
-                <div class="trTitle">知识库分类</div>
169
-                <div class="treeCon">
170
-                    <ul id="treeDemo" class="ztree">
171
-                        <!--类名为ztree是必须的-->
172
-                    </ul>
173
-                </div>
174
-            </div>
175
-            <div class="tableCon col-md-9">
176
-                <div class="trTitle"> 知识库列表</div>
177
-                <table id="table1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
178
-                    <thead>
179
-                        <tr>
180
-                            <th data-field="state" data-checkbox="true" data-align="center"></th>
181
-                            <th data-align="center" data-formatter="setCode">编号</th>
182
-                            <th data-field="F_Title" data-align="left">标题</th>
183
-                            <th data-field="F_Time" data-align="left" data-formatter="oper">有效时间</th>
184
-                            <th data-field="F_KeyWords" data-align="center">关键字</th>
185
-                            <th data-field="F_CreateOn" data-align="center">创建时间</th>
186
-                        </tr>
187
-                    </thead>
188
-                    <tbody id="tbody"></tbody>
189
-                </table>
190
-            </div>
191
-        </div>
192
-    
193
-   <!--删除弹出内容-->
194
-    <div class="model delModel">
195
-        <div class="box">
196
-            <div class="btop clearfix">
197
-                <p class="btl"><span>删除提示</span></p>
198
-                <p class="btr delBtr" title="关闭">X</p>
199
-            </div>
200
-            <div class="boxCon" style="height: 150px;">
201
-                <p style="text-align: center;font-size: 16px;margin-top: 30px;">您确定要删除吗?</p>
202
-                <p style="margin-top: 30px;text-align: center;">
203
-                    <button class="btns sure">确定</button>
204
-                    <button class="btns return">取消</button>
205
-                </p>
206
-                <!--<p style="color: red;">注:若该分类下包含知识库内容会一并删除</p>-->
207
-            </div>
208
-        </div>
209
-    </div>
210
-   </div>
211
-   <script src="../js/zTree/jquery.ztree.core.js"></script>
212
-    <script src="../js/kindeditor/kindeditor.js"></script>
213
-    <script src="../js/kindeditor/lang/zh_CN.js"></script>
214
-    <script src="./../css/laydate/laydate.js"></script>
215
-    <script src="../css/layer/layer.js"></script>
216
-    <script src="./js/zhiShiKuManger.js"></script>
217
-</body>
103
+
104
+		</div>
105
+	
106
+	<script src="../js/zTree/jquery.ztree.core.js"></script>
107
+	<script src="../css/layer/layer.js"></script>
108
+	<script src="js/orderType.js"></script>
109
+	</body>
110
+	
218 111
 </html>

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

@@ -138,7 +138,7 @@ initTable(token);
138 138
 		table.bootstrapTable('destroy');
139 139
 		//初始化表格,动态从服务器加载数据
140 140
 		table.bootstrapTable({
141
-			method: "post", //使用get请求到服务器获取数据
141
+			method: "get", //使用get请求到服务器获取数据
142 142
 		    url: huayi.config.callcenter_url+"Customer/GetList", //获取数据的Servlet地址
143 143
 //			url: "kehu.json", //获取数据的Servlet地址
144 144
 			striped: true, //表格显示条纹

+ 199 - 388
CallCenterWeb.UI/login.html

@@ -1,395 +1,206 @@
1
-<!DOCTYPE html>
1
+<!DOCTYPE html>
2 2
 <html lang="en">
3
-
4
-	<head>
5
-		<meta charset="utf-8">
6
-		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
7
-		<title>登录</title>
8
-		<meta name="keywords">
9
-		<meta name="description">
10
-		<meta name="renderer" content="webkit|ie-comp|ie-stand" />
11
-		<script src="Script/Common/huayi.load.js"></script>
12
-		<script src="Script/Common/huayi.config.js"></script>
13
-		<link rel="shortcut icon" href="img/32.ico" />
14
-		<link href="./css/bootstrap.min.css" rel="stylesheet">
15
-		<link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
16
-		<link href="./css/animate.min.css" rel="stylesheet">
17
-		<link href="./css/style.min.css" rel="stylesheet">
18
-		<!--<link href="./css/login.min.css" rel="stylesheet">-->
19
-		<link rel="stylesheet" href="css/initialize.css" />
20
-		<script src="./js/jquery.md5.js"></script>
21
-		 <style>
22
-		 	body{
23
-		 		height: 100%;
24
-		 	}
25
-		 	.head,.foot{
26
-		 		background: #fff;
27
-		 		width: 100%;
28
-		 		height: 10%;
29
-		 		box-sizing: border-box;
30
-		 	}
31
-		 	.foot{
32
-		 		text-align: center;
33
-		 	}
34
-		 	.headCon,.mainCon,.footCon{
35
-		 		width: 1200px;
36
-		 		margin: 0 auto;
37
-		 	}
38
-		 	.headCon{
39
-		 		/*padding: 20px 0 15px 0;*/
40
-   				box-sizing: border-box;
41
-   				    /*padding-top: 25px;*/
42
-   				   height: 100%;
43
-		 	}
44
-		 	.wrap{
45
-		 		height: 500px;
46
-		 		background: #030819;
47
-		 		width: 100%;
48
-		 		height: 80%;
49
-		 	}
50
-		 	.footCon{
51
-		 		/*padding: 54px 0 32px 0;*/
52
-		 	}
53
-		 	.footCon ul li{
54
-		 		float: left;
55
-		 		text-align: center;	
56
-		 		color: #243747;	
57
-		 		padding: 0 5px;
58
-		 	}
59
-		 	.footCon ul li a{
60
-		 	    display: block;
61
-		 	    color: #243747;	
62
-		 	}
63
-		 	.Copy{
64
-		 		color: #243747;	
65
-		 		text-align: center;
66
-		 	}
67
-		 	.center{
68
-		 		display: inline-block;
69
-		 		height: 100%; 
70
-		 		vertical-align: middle;
71
-		 	}
72
-		 	.mainCon,.mainCon_left,.mainCon_right,.img_box{
73
-		 		height: 100%;
74
-		 	}
75
-		 	.mainCon_right{
76
-		 		text-align: center;
77
-		 	}
78
-		 	.tab_box{
79
-		 		    background: #fff;
80
-		 		    height: 346px;
81
-		 		    display: inline-block;
82
-				    width: 375px;
83
-				    vertical-align: middle;
84
-		 	}
85
-		 	.tab_box ul li {
86
-				width: 50%;
87
-				float: left;
88
-				width: 50%;
89
-			    float: left;
90
-			    padding: 20px 0;
91
-			    text-align: center;
92
-			    color: #243747;
93
-			    font-size: 16px;
94
-			}
95
-			.tab_box ul{
96
-				border-bottom: 1px solid #cdcdcd;
97
-			}
98
-			.tab_content div p {
99
-			    width: 300px;
100
-			    margin: 0 auto;
101
-			    height: 36px;
102
-			    border: 1px solid #ebebed;
103
-			    border-radius: 5px;
104
-			    margin-bottom: 25px;
105
-			    line-height: 36px;
106
-			    padding-left: 10px;
107
-			        text-align: initial;
108
-			    }
109
-			.tab_content div p input {
110
-			    width: 200px;
111
-			    border: 0;
112
-			    font-size: 14px;
113
-			    outline: none;
114
-			    color: #323232;
115
-				}
116
-				.login_icon {
117
-			    display: inline-block;
118
-			    width: 25px;
119
-			    height: 19px;
120
-			    vertical-align: sub;
121
-			    margin-right: 15px;
122
-			    border-right: 1px solid #cdcdcd;
123
-			}
124
-			.tab_content .login_go {
125
-			   text-align: center;
126
-			    padding: 0!important;
127
-			    font-size: 16px!important;
128
-			    letter-spacing: 16px;
129
-			    color: #fff;
130
-			    background: #1ab394;
131
-			    height: 49px!important;
132
-			    line-height: 49px!important;
133
-			        cursor: pointer;
134
-			}
135
-			.login_icon_user {
136
-				    background: url(img/user-icon.png) no-repeat;
137
-				}
138
-			.login_icon_hua {
139
-				    background: url(img/fj-icon.png) no-repeat;
140
-				}
141
-			.login_icon_lock {
142
-			    background: url(img/psw-icon.png) no-repeat;
143
-			}
144
-			.error {
145
-				width: 16px;
146
-				height: 16px;
147
-				background: url(img/xx-error.png) no-repeat;
148
-				display: none;
149
-				border: 0;
150
-			}
151
-			.errorShow {
152
-				display: inline-block;
153
-			}
154
-			.active{
155
-				position: relative;
156
-			}
157
-			.active:after{
158
-			   display: block;
159
-			    content: "";
160
-			    position: absolute;
161
-			    height: 2px;
162
-			    width: 45%;
163
-			    background: #00b194;
164
-			    margin: 0 auto;
165
-			    bottom: -1px;
3
+<head>
4
+    <meta charset="utf-8">
5
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
6
+    <title>登录</title>
7
+    <meta name="keywords">
8
+    <meta name="description">
9
+    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
10
+    <link rel="shortcut icon" href="img/32.ico" />
11
+    <script src="Script/Common/huayi.load.js"></script>
12
+    <script src="Script/Common/huayi.config.js"></script>
13
+    <link href="./css/login.css" rel="stylesheet">
14
+    <!--[if lt IE 9]>
15
+    <meta http-equiv="refresh" content="0;ie.html" />
16
+    <![endif]-->
17
+    <style>
18
+    	.signin_left{
19
+    		position: relative;
20
+    	}
21
+    	.left_word{
22
+    		position: absolute;
23
+    		height: 100%;
24
+    		width: 50%;
25
+    	}
26
+    	.left_word>div{
27
+    		    position: absolute;
166 28
 			    right: 0;
167
-			    left: 0;
168
-			    top: auto;
169
-			}
170
-			.tab_content>div{
171
-				padding-top: 24px;
172
-				
173
-			}
174
-			.tab_content{
175
-				    border: 1px solid transparent
176
-			}
177
-		</style>
178
-	</head>
179
-	<body class="signin">
180
-		<div class="head">
181
-			<div class="headCon">
182
-				<img src="img/logo.png" alt="" style="vertical-align: middle;" />
183
-				<span  class="center"></span>
184
-			</div>
185
-			
186
-		</div>
187
-		<div class="wrap">
188
-			<div class="mainCon row">
189
-				<div class="mainCon_left col-sm-7">
190
-					<div class="img_box">
191
-						<img src="img/xx_bg_03.png" alt="" style="vertical-align: middle;display: inline-block; width: 95%;" />
192
-						<span class="center"></span>
193
-					</div>
194
-				</div>
195
-				
196
-				<div class="mainCon_right col-sm-5">
197
-					<div class="tab_box">
198
-						<ul class="clearfix tab_ul">
199
-							<li class="active">坐席登录</li>
200
-							<li>用户登录</li>
201
-						</ul>
202
-						<div class="tab_content">
203
-							<div class="tab_one">
204
-								<p>
205
-									<i class="login_icon login_icon_user "></i>
206
-									<input class="zx_user" type="text" placeholder="请输入您的管理账号" />
207
-									<i class="login_icon error error_zx error_zx_user"></i>
208
-								</p>
209
-								<p>
210
-									<i class="login_icon login_icon_hua "></i>
211
-									<input class="zx_fj" type="text" placeholder="请输入分机号" />
212
-									<i class="login_icon error error_zx error_zx_fj"></i>
213
-								</p>
214
-								<p>
215
-									<i class="login_icon login_icon_lock "></i>
216
-									<input class="zx_psw" type="password" placeholder="请输入您的密码" />
217
-									<i class="login_icon error error_zx error_zx_psw"></i>
218
-								</p>
219
-								<p class="login_go login_zx">登录</p>
220
-							</div>
221
-							<div class="tab_two" style="display: none;">
222
-								<p>
223
-									<i class="login_icon login_icon_user "></i>
224
-									<input class="gl_user" type="text" placeholder="请输入您的管理账号" />
225
-									<i class="login_icon error error_gl error_gl_user"></i>
226
-								</p>
227
-								<p>
228
-									<i class="login_icon login_icon_lock"></i>
229
-									<input class="gl_psw" type="password" placeholder="请输入您的密码" />
230
-									<i class="login_icon error error_gl error_gl_psw"></i>
231
-								</p>
232
-								<p class="login_go login_gl">登录</p>
29
+			    bottom: 23%
30
+    		
31
+    	}
32
+    	
33
+    	.left_word>div h2 + p{
34
+			margin-top: 22.163%;
35
+			margin-bottom: 22.163%;
36
+			font-size: 18px;
37
+		}
38
+		.signin_left h3{
39
+			font-size: 24px;
40
+			color: #006967;
41
+			margin-bottom: 2.5%;
42
+		}
43
+		.signin_left h3 + p{
44
+			line-height: 30px;
45
+			font-size: 18px;
46
+		}
47
+    	
48
+    </style>
49
+    
50
+    
51
+</head>
52
+
53
+<body class="signin">
54
+    <div class="signin_bg row">
55
+        <div class="signin_bg_left col-md-5"></div>
56
+        <div class="signin_bg_mask"></div>
57
+           <div class="left_word">
58
+           	<div>
59
+           		  	 <h3>用心做,更出色</h3>
60
+                <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
61
+           	</div>
62
+              
63
+                </div>
64
+    </div>
65
+    <div class="container">
66
+        <div class="row clearfix">
67
+            <div class="signin_left col-md-5">
68
+               <!--<h2>
69
+                   <i></i>
70
+                    <span>全客服平台</span>
71
+                </h2>-->
72
+                <!--<p>欢迎您进入全客服平台,开启智慧客服新篇章!</p>-->
73
+                <!--<div class="left_word">
74
+                	 <h3>用心做,更出色</h3>
75
+                <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
76
+                </div>-->
77
+               
78
+            </div>
79
+            <div class="signin_right col-md-5">
80
+                <div class="signin_panel">
81
+                    <h1>安图生物登录平台</h1>
82
+                    <div class="signin_user">
83
+                        <i class="signin_icons"></i>
84
+                        <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
85
+                        <i class="ts user_ts"></i>
86
+                    </div>
87
+                    <div class="signin_seat">
88
+                        <i class="signin_icons"></i>
89
+                        <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
90
+                    </div>
91
+                    <div class="signin_password">
92
+                        <i class="signin_icons"></i>
93
+                        <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
94
+                        <i class="ts password_ts"></i>
95
+                    </div>
96
+
97
+                    <div class="clearfix singin_rpassword">
98
+                        <div class="rpassword">
99
+                            <label for="rpassword">
100
+                                <input type="checkbox" id="rpassword">
101
+                                <span class="checkbox_icon"></span>
102
+                                记住密码
103
+                            </label>
104
+                        </div>
105
+                        <!--<div class="fpassword">
106
+                            <a href="#" title="忘记密码">忘记秘密?</a>
107
+                        </div>-->
108
+                    </div>
109
+                    <div class="btns" type="button">登录</div>
110
+                    <!--<div class="fregister">
111
+                        <span>还没有账号?</span>
112
+                        <a href="#" title="立即注册">立即注册&gt;&gt;</a>
113
+                    </div>-->
114
+                    <div class="signfooter">
115
+                        <p>COPYRIGHT 2011-2025 AMT</p>
116
+                    </div>
117
+                </div>
118
+
119
+            </div>
120
+        </div>
121
+    </div>
122
+    <script>
123
+        $(function () {
124
+            /*输入框样式改变*/
125
+            $("#user").focus(function () {
126
+                $(this).parent().addClass("_success");
127
+            });
128
+            $("#user").blur(function () {
129
+                $(this).parent().removeClass("_success");
130
+            });
131
+            $("#password").focus(function () {
132
+                $(this).parent().addClass("_success");
133
+            });
134
+            $("#password").blur(function () {
135
+                $(this).parent().removeClass("_success");
136
+            });
137
+
138
+            /*cook存储数据*/
139
+            if ($.cookie("username")) {
140
+                //取值如果存在则赋值
141
+                $("#user").val($.cookie("user"));//用户名
142
+            }
233 143
 
234
-							</div>
144
+            $(".btns").click(function () {
145
+                login();
146
+            });
235 147
 
236
-						</div>
237
-					
238
-					
239
-							
240
-					</div>
241
-					<span class="center"></span>
242
-				</div>
243
-			</div>
244
-		</div>
245
-		<div class="foot">
246
-			<div class="footCon" style="display: inline-block; vertical-align: middle;">
247
-					<!--<ul class="clearFix" style=" text-align:center; margin: 0 auto;">
248
-					<li><a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a></li>
249
-					<li>|</li>
250
-					<li><a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a></li>
251
-					<li>|</li>
252
-					<li><a href="ExeWork/vcredist_x86.exe">安装异常补充包</a></li>
253
-					<li>|</li>
254
-					<li>技术服务热线:400-637-1311</li>
255
-				</ul>-->				
256
-			    <div style="vertical-align: middle;">
257
-                <a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a> | 
258
-                <a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a> | 
259
-                <a href="ExeWork/vcredist_x86.exe">安装异常补充包</a> | 
260
-                技术服务热线:400-637-1311</div>
261
-			    <p class="Copy" style="margin-top: 13px;">Copyright©2010-2020  华谊科技 版权所有</p>
262
-			</div>
263
-			<span class="center"></span>
264
-		</div>
265
-		<script>
266
-			$(function() {
267
-				var a=0;
268
-				$('.tab_ul li').click(function() {
269
-					$(this).addClass("active").siblings().removeClass("active");
270
-					var index = $(this).index();
271
-					 a=index;
272
-					$('.tab_content').children('div').eq(index).show().siblings().hide();
273
-					
274
-				})
275
-					/*cook存储数据*/
276
-				if($.cookie("username")) {
277
-					//取值如果存在则赋值
278
-					console.log($.cookie("username"))
279
-					$(".gl_user").val($.cookie("user")); //用户名
280
-					$("zx_fj").val($.cookie("fj"));
281
-					$(".zx_user").val($.cookie("user"));
282
-				}
283
-				//键盘登录事件
284
-				$('input').bind('keypress', function(event) {
285
-					if(event.keyCode == "13") {
286
-						console.log(a);
287
-						if(a == 0) {
288
-							$('.login_zx').trigger("click");
289
-						} else {
290
-							$(".login_gl").trigger("click");
291
-						}
292
-					}
293
-				});
294
-				//坐席登录
295
-				$('.login_zx').click(function(){
296
-					console.log("坐席")
297
-					var zx_user = $(".zx_user").val();
298
-					var zx_fj = $(".zx_fj").val();
299
-					var zx_psw = $(".zx_psw").val();
300
-					if(zx_user == ""  || zx_fj == "" || zx_psw == "") {
301
-						$(".error_zx").addClass('errorShow');
302
-						if($(".zx_user").val() == "") {
303
-							$(".zx_user").focus(function() {
304
-								$(".error_zx").removeClass('errorShow');
305
-							});
306
-						} else {
307
-							$(".error_zx_user").removeClass('errorShow');
308
-						}
309
-					}else {
310
-						/*请求后台*/
311
-						$.cookie("extno",zx_fj);
312
-						$.cookie("zx_user",zx_user);
313
-					 
314
-						$.ajax({
315
-							type: "post",
316
-							url: huayi.config.callcenter_url + "/Login/login",
317
-							dataType: 'json',
318
-							async: true,
319
-							data: {
320
-								username: zx_user,
321
-								extensionphone: zx_fj,
322
-								password: zx_psw    //$.md5
323
-							},
324
-							success: function(data) {
325
-								/*验证请求*/
326
-								if(data.state == "success") {
327
-									$.cookie("token", data.data.token, {
328
-										expires: 7
329
-									});
330
-									$.cookie("extno", zx_fj, {
331
-										expires: 7
332
-									});
333
-									$.cookie("zx_user", zx_user, {
334
-										expires: 7
335
-									});
336
-									window.location.href = "index.html";
337
-                              
338
-								}else{
339
-									$(".zx_user").val('');
340
-									$(".zx_fj").val('');
341
-									$(".zx_psw").val('');
342
-									console.log(data);
343
-								}
344
-							}
345
-						});
346
-					}
148
+            $('input').bind('keypress', function (event) {
149
+                if (event.keyCode == "13") {
150
+                    $('.btns').trigger("click");
151
+                }
152
+            });
347 153
 
348
-				})
349
-				//用户登录
350
-				$('.login_gl').click(function() {
351
-					console.log("用户")
352
-					var gl_user = $(".gl_user").val();
353
-					var gl_psw = $(".gl_psw").val();
354
-					if(gl_user == "" || gl_psw == "") {
355
-						$(".error_gl").addClass('errorShow');
356
-						if($(".gl_user").val() == "") {
357
-							$(".gl_user").focus(function() {
358
-								$(".error_gl").removeClass('errorShow');
359
-							});
360
-						} else {
361
-							$(".error_gl_user").removeClass('errorShow');
362
-						}
363
-					} else {
364
-						/*请求后台*/
365
-						$.ajax({
366
-							type: "post",
367
-							url: huayi.config.callcenter_url + "/Login/login",
368
-							dataType: 'json',
369
-							async: true,
370
-							data: {
371
-								username: gl_user,
372
-								password: gl_psw    //$.md5
373
-							},
374
-							success: function(data) {
375
-								/*验证请求*/
376
-								if(data.state == "success") {
377
-									$.cookie("token", data.data.token, {
378
-										expires: 7
379
-									});
380
-									window.location.href = "index.html";
381
-								}else{
382
-									$(".gl_user").val('');
383
-									$(".gl_psw").val('');
384
-									console.log(data.state);
385
-								}
386
-							}
387
-						});
388
-					}
154
+        });
155
+        /*点击提交*/
156
+        function login() {
157
+            var User = $("#user").val();
158
+            var Password = $("#password").val();
159
+            var userSeat = $("#userSeat").val();
160
+            /*保存COOK*/
161
+            //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
162
+            /*表单验证*/
163
+            if (User == "" || Password == "") {
164
+                $(".ts").addClass("Yz_error");
165
+                if ($("#user").val() == "") {
166
+                    $("#user").focus(function () {
167
+                        $(".user_ts").removeClass("Yz_error");
168
+                        $(".password_ts").removeClass("Yz_error");
169
+                        $(this).parent().addClass("_success");
170
+                    });
171
+                } else {
172
+                    $(".user_ts").addClass("Yz_success");
173
+                }
174
+            } else {
175
+                /*请求后台*/
176
+                $.ajax({
177
+                    type: "post",
178
+                    url: huayi.config.callcenter_url + "/Login/login",
179
+                    dataType: 'json',
180
+                    async: true,
181
+                    data: {
182
+                        username: User,
183
+                        extensionphone: userSeat,
184
+                        password: Password
185
+                    },
186
+                    success: function (data) {
187
+                        /*验证请求*/
188
+                        if (data.state == "success") {
189
+                            $.cookie("token", data.data.token, { expires: 7 });
190
+                            $.cookie("extno", userSeat, { expires: 7 });
191
+                            window.location.href = "index.html";
192
+                        } else {
193
+                            layer.msg("登录失败");
194
+                            $("#user").val('');
195
+                            $("#userSeat").val('');
196
+                            $("#password").val('');
197
+                        }
198
+                    }
199
+                });
200
+            }
201
+        }
389 202
 
390
-				})
391 203
 
392
-			})
393
-		</script>
394
-	</body>
395
-</html>
204
+    </script>
205
+</body>
206
+</html>

+ 0 - 206
CallCenterWeb.UI/login_new.html

@@ -1,206 +0,0 @@
1
-<!DOCTYPE html>
2
-<html lang="en">
3
-<head>
4
-    <meta charset="utf-8">
5
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
6
-    <title>登录</title>
7
-    <meta name="keywords">
8
-    <meta name="description">
9
-    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
10
-    <link rel="shortcut icon" href="img/32.ico" />
11
-    <script src="Script/Common/huayi.load.js"></script>
12
-    <script src="Script/Common/huayi.config.js"></script>
13
-    <link href="./css/login.css" rel="stylesheet">
14
-    <!--[if lt IE 9]>
15
-    <meta http-equiv="refresh" content="0;ie.html" />
16
-    <![endif]-->
17
-    <style>
18
-    	.signin_left{
19
-    		position: relative;
20
-    	}
21
-    	.left_word{
22
-    		position: absolute;
23
-    		height: 100%;
24
-    		width: 50%;
25
-    	}
26
-    	.left_word>div{
27
-    		    position: absolute;
28
-			    right: 0;
29
-			    bottom: 23%
30
-    		
31
-    	}
32
-    	
33
-    	.left_word>div h2 + p{
34
-			margin-top: 22.163%;
35
-			margin-bottom: 22.163%;
36
-			font-size: 18px;
37
-		}
38
-		.signin_left h3{
39
-			font-size: 24px;
40
-			color: #006967;
41
-			margin-bottom: 2.5%;
42
-		}
43
-		.signin_left h3 + p{
44
-			line-height: 30px;
45
-			font-size: 18px;
46
-		}
47
-    	
48
-    </style>
49
-    
50
-    
51
-</head>
52
-
53
-<body class="signin">
54
-    <div class="signin_bg row">
55
-        <div class="signin_bg_left col-md-5"></div>
56
-        <div class="signin_bg_mask"></div>
57
-           <div class="left_word">
58
-           	<div>
59
-           		  	 <h3>用心做,更出色</h3>
60
-                <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
61
-           	</div>
62
-              
63
-                </div>
64
-    </div>
65
-    <div class="container">
66
-        <div class="row clearfix">
67
-            <div class="signin_left col-md-5">
68
-               <!--<h2>
69
-                   <i></i>
70
-                    <span>全客服平台</span>
71
-                </h2>-->
72
-                <!--<p>欢迎您进入全客服平台,开启智慧客服新篇章!</p>-->
73
-                <!--<div class="left_word">
74
-                	 <h3>用心做,更出色</h3>
75
-                <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
76
-                </div>-->
77
-               
78
-            </div>
79
-            <div class="signin_right col-md-5">
80
-                <div class="signin_panel">
81
-                    <h1>安图生物登录平台</h1>
82
-                    <div class="signin_user">
83
-                        <i class="signin_icons"></i>
84
-                        <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">
85
-                        <i class="ts user_ts"></i>
86
-                    </div>
87
-                    <div class="signin_seat">
88
-                        <i class="signin_icons"></i>
89
-                        <input class="form-control" type="text" placeholder="请输入分机号" id="userSeat" autocomplete="off">
90
-                    </div>
91
-                    <div class="signin_password">
92
-                        <i class="signin_icons"></i>
93
-                        <input class="form-control" type="password" placeholder="请输入您的密码" id="password" autocomplete="off">
94
-                        <i class="ts password_ts"></i>
95
-                    </div>
96
-
97
-                    <div class="clearfix singin_rpassword">
98
-                        <div class="rpassword">
99
-                            <label for="rpassword">
100
-                                <input type="checkbox" id="rpassword">
101
-                                <span class="checkbox_icon"></span>
102
-                                记住密码
103
-                            </label>
104
-                        </div>
105
-                        <!--<div class="fpassword">
106
-                            <a href="#" title="忘记密码">忘记秘密?</a>
107
-                        </div>-->
108
-                    </div>
109
-                    <div class="btns" type="button">登录</div>
110
-                    <!--<div class="fregister">
111
-                        <span>还没有账号?</span>
112
-                        <a href="#" title="立即注册">立即注册&gt;&gt;</a>
113
-                    </div>-->
114
-                    <div class="signfooter">
115
-                        <p>COPYRIGHT 2011-2025 AMT</p>
116
-                    </div>
117
-                </div>
118
-
119
-            </div>
120
-        </div>
121
-    </div>
122
-    <script>
123
-        $(function () {
124
-            /*输入框样式改变*/
125
-            $("#user").focus(function () {
126
-                $(this).parent().addClass("_success");
127
-            });
128
-            $("#user").blur(function () {
129
-                $(this).parent().removeClass("_success");
130
-            });
131
-            $("#password").focus(function () {
132
-                $(this).parent().addClass("_success");
133
-            });
134
-            $("#password").blur(function () {
135
-                $(this).parent().removeClass("_success");
136
-            });
137
-
138
-            /*cook存储数据*/
139
-            if ($.cookie("username")) {
140
-                //取值如果存在则赋值
141
-                $("#user").val($.cookie("user"));//用户名
142
-            }
143
-
144
-            $(".btns").click(function () {
145
-                login();
146
-            });
147
-
148
-            $('input').bind('keypress', function (event) {
149
-                if (event.keyCode == "13") {
150
-                    $('.btns').trigger("click");
151
-                }
152
-            });
153
-
154
-        });
155
-        /*点击提交*/
156
-        function login() {
157
-            var User = $("#user").val();
158
-            var Password = $("#password").val();
159
-            var userSeat = $("#userSeat").val();
160
-            /*保存COOK*/
161
-            //$.cookie("user", $("#user").val(),{expires: 7,secure:true});
162
-            /*表单验证*/
163
-            if (User == "" || Password == "") {
164
-                $(".ts").addClass("Yz_error");
165
-                if ($("#user").val() == "") {
166
-                    $("#user").focus(function () {
167
-                        $(".user_ts").removeClass("Yz_error");
168
-                        $(".password_ts").removeClass("Yz_error");
169
-                        $(this).parent().addClass("_success");
170
-                    });
171
-                } else {
172
-                    $(".user_ts").addClass("Yz_success");
173
-                }
174
-            } else {
175
-                /*请求后台*/
176
-                $.ajax({
177
-                    type: "post",
178
-                    url: huayi.config.callcenter_url + "/Login/login",
179
-                    dataType: 'json',
180
-                    async: true,
181
-                    data: {
182
-                        username: User,
183
-                        extensionphone: userSeat,
184
-                        password: Password
185
-                    },
186
-                    success: function (data) {
187
-                        /*验证请求*/
188
-                        if (data.state == "success") {
189
-                            $.cookie("token", data.data.token, { expires: 7 });
190
-                            $.cookie("extno", userSeat, { expires: 7 });
191
-                            window.location.href = "index.html";
192
-                        } else {
193
-                            layer.msg("登录失败");
194
-                            $("#user").val('');
195
-                            $("#userSeat").val('');
196
-                            $("#password").val('');
197
-                        }
198
-                    }
199
-                });
200
-            }
201
-        }
202
-
203
-
204
-    </script>
205
-</body>
206
-</html>

+ 395 - 0
CallCenterWeb.UI/login_old2.html

@@ -0,0 +1,395 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
7
+		<title>登录</title>
8
+		<meta name="keywords">
9
+		<meta name="description">
10
+		<meta name="renderer" content="webkit|ie-comp|ie-stand" />
11
+		<script src="Script/Common/huayi.load.js"></script>
12
+		<script src="Script/Common/huayi.config.js"></script>
13
+		<link rel="shortcut icon" href="img/32.ico" />
14
+		<link href="./css/bootstrap.min.css" rel="stylesheet">
15
+		<link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
16
+		<link href="./css/animate.min.css" rel="stylesheet">
17
+		<link href="./css/style.min.css" rel="stylesheet">
18
+		<!--<link href="./css/login.min.css" rel="stylesheet">-->
19
+		<link rel="stylesheet" href="css/initialize.css" />
20
+		<script src="./js/jquery.md5.js"></script>
21
+		 <style>
22
+		 	body{
23
+		 		height: 100%;
24
+		 	}
25
+		 	.head,.foot{
26
+		 		background: #fff;
27
+		 		width: 100%;
28
+		 		height: 10%;
29
+		 		box-sizing: border-box;
30
+		 	}
31
+		 	.foot{
32
+		 		text-align: center;
33
+		 	}
34
+		 	.headCon,.mainCon,.footCon{
35
+		 		width: 1200px;
36
+		 		margin: 0 auto;
37
+		 	}
38
+		 	.headCon{
39
+		 		/*padding: 20px 0 15px 0;*/
40
+   				box-sizing: border-box;
41
+   				    /*padding-top: 25px;*/
42
+   				   height: 100%;
43
+		 	}
44
+		 	.wrap{
45
+		 		height: 500px;
46
+		 		background: #030819;
47
+		 		width: 100%;
48
+		 		height: 80%;
49
+		 	}
50
+		 	.footCon{
51
+		 		/*padding: 54px 0 32px 0;*/
52
+		 	}
53
+		 	.footCon ul li{
54
+		 		float: left;
55
+		 		text-align: center;	
56
+		 		color: #243747;	
57
+		 		padding: 0 5px;
58
+		 	}
59
+		 	.footCon ul li a{
60
+		 	    display: block;
61
+		 	    color: #243747;	
62
+		 	}
63
+		 	.Copy{
64
+		 		color: #243747;	
65
+		 		text-align: center;
66
+		 	}
67
+		 	.center{
68
+		 		display: inline-block;
69
+		 		height: 100%; 
70
+		 		vertical-align: middle;
71
+		 	}
72
+		 	.mainCon,.mainCon_left,.mainCon_right,.img_box{
73
+		 		height: 100%;
74
+		 	}
75
+		 	.mainCon_right{
76
+		 		text-align: center;
77
+		 	}
78
+		 	.tab_box{
79
+		 		    background: #fff;
80
+		 		    height: 346px;
81
+		 		    display: inline-block;
82
+				    width: 375px;
83
+				    vertical-align: middle;
84
+		 	}
85
+		 	.tab_box ul li {
86
+				width: 50%;
87
+				float: left;
88
+				width: 50%;
89
+			    float: left;
90
+			    padding: 20px 0;
91
+			    text-align: center;
92
+			    color: #243747;
93
+			    font-size: 16px;
94
+			}
95
+			.tab_box ul{
96
+				border-bottom: 1px solid #cdcdcd;
97
+			}
98
+			.tab_content div p {
99
+			    width: 300px;
100
+			    margin: 0 auto;
101
+			    height: 36px;
102
+			    border: 1px solid #ebebed;
103
+			    border-radius: 5px;
104
+			    margin-bottom: 25px;
105
+			    line-height: 36px;
106
+			    padding-left: 10px;
107
+			        text-align: initial;
108
+			    }
109
+			.tab_content div p input {
110
+			    width: 200px;
111
+			    border: 0;
112
+			    font-size: 14px;
113
+			    outline: none;
114
+			    color: #323232;
115
+				}
116
+				.login_icon {
117
+			    display: inline-block;
118
+			    width: 25px;
119
+			    height: 19px;
120
+			    vertical-align: sub;
121
+			    margin-right: 15px;
122
+			    border-right: 1px solid #cdcdcd;
123
+			}
124
+			.tab_content .login_go {
125
+			   text-align: center;
126
+			    padding: 0!important;
127
+			    font-size: 16px!important;
128
+			    letter-spacing: 16px;
129
+			    color: #fff;
130
+			    background: #1ab394;
131
+			    height: 49px!important;
132
+			    line-height: 49px!important;
133
+			        cursor: pointer;
134
+			}
135
+			.login_icon_user {
136
+				    background: url(img/user-icon.png) no-repeat;
137
+				}
138
+			.login_icon_hua {
139
+				    background: url(img/fj-icon.png) no-repeat;
140
+				}
141
+			.login_icon_lock {
142
+			    background: url(img/psw-icon.png) no-repeat;
143
+			}
144
+			.error {
145
+				width: 16px;
146
+				height: 16px;
147
+				background: url(img/xx-error.png) no-repeat;
148
+				display: none;
149
+				border: 0;
150
+			}
151
+			.errorShow {
152
+				display: inline-block;
153
+			}
154
+			.active{
155
+				position: relative;
156
+			}
157
+			.active:after{
158
+			   display: block;
159
+			    content: "";
160
+			    position: absolute;
161
+			    height: 2px;
162
+			    width: 45%;
163
+			    background: #00b194;
164
+			    margin: 0 auto;
165
+			    bottom: -1px;
166
+			    right: 0;
167
+			    left: 0;
168
+			    top: auto;
169
+			}
170
+			.tab_content>div{
171
+				padding-top: 24px;
172
+				
173
+			}
174
+			.tab_content{
175
+				    border: 1px solid transparent
176
+			}
177
+		</style>
178
+	</head>
179
+	<body class="signin">
180
+		<div class="head">
181
+			<div class="headCon">
182
+				<img src="img/logo.png" alt="" style="vertical-align: middle;" />
183
+				<span  class="center"></span>
184
+			</div>
185
+			
186
+		</div>
187
+		<div class="wrap">
188
+			<div class="mainCon row">
189
+				<div class="mainCon_left col-sm-7">
190
+					<div class="img_box">
191
+						<img src="img/xx_bg_03.png" alt="" style="vertical-align: middle;display: inline-block; width: 95%;" />
192
+						<span class="center"></span>
193
+					</div>
194
+				</div>
195
+				
196
+				<div class="mainCon_right col-sm-5">
197
+					<div class="tab_box">
198
+						<ul class="clearfix tab_ul">
199
+							<li class="active">坐席登录</li>
200
+							<li>用户登录</li>
201
+						</ul>
202
+						<div class="tab_content">
203
+							<div class="tab_one">
204
+								<p>
205
+									<i class="login_icon login_icon_user "></i>
206
+									<input class="zx_user" type="text" placeholder="请输入您的管理账号" />
207
+									<i class="login_icon error error_zx error_zx_user"></i>
208
+								</p>
209
+								<p>
210
+									<i class="login_icon login_icon_hua "></i>
211
+									<input class="zx_fj" type="text" placeholder="请输入分机号" />
212
+									<i class="login_icon error error_zx error_zx_fj"></i>
213
+								</p>
214
+								<p>
215
+									<i class="login_icon login_icon_lock "></i>
216
+									<input class="zx_psw" type="password" placeholder="请输入您的密码" />
217
+									<i class="login_icon error error_zx error_zx_psw"></i>
218
+								</p>
219
+								<p class="login_go login_zx">登录</p>
220
+							</div>
221
+							<div class="tab_two" style="display: none;">
222
+								<p>
223
+									<i class="login_icon login_icon_user "></i>
224
+									<input class="gl_user" type="text" placeholder="请输入您的管理账号" />
225
+									<i class="login_icon error error_gl error_gl_user"></i>
226
+								</p>
227
+								<p>
228
+									<i class="login_icon login_icon_lock"></i>
229
+									<input class="gl_psw" type="password" placeholder="请输入您的密码" />
230
+									<i class="login_icon error error_gl error_gl_psw"></i>
231
+								</p>
232
+								<p class="login_go login_gl">登录</p>
233
+
234
+							</div>
235
+
236
+						</div>
237
+					
238
+					
239
+							
240
+					</div>
241
+					<span class="center"></span>
242
+				</div>
243
+			</div>
244
+		</div>
245
+		<div class="foot">
246
+			<div class="footCon" style="display: inline-block; vertical-align: middle;">
247
+					<!--<ul class="clearFix" style=" text-align:center; margin: 0 auto;">
248
+					<li><a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a></li>
249
+					<li>|</li>
250
+					<li><a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a></li>
251
+					<li>|</li>
252
+					<li><a href="ExeWork/vcredist_x86.exe">安装异常补充包</a></li>
253
+					<li>|</li>
254
+					<li>技术服务热线:400-637-1311</li>
255
+				</ul>-->				
256
+			    <div style="vertical-align: middle;">
257
+                <a href="ExeWork/LeCallCenterSetup.exe">下载客户端</a> | 
258
+                <a href="ExeWork/Microsoft.NET4.0.exe">下载安装环境</a> | 
259
+                <a href="ExeWork/vcredist_x86.exe">安装异常补充包</a> | 
260
+                技术服务热线:400-637-1311</div>
261
+			    <p class="Copy" style="margin-top: 13px;">Copyright©2010-2020  华谊科技 版权所有</p>
262
+			</div>
263
+			<span class="center"></span>
264
+		</div>
265
+		<script>
266
+			$(function() {
267
+				var a=0;
268
+				$('.tab_ul li').click(function() {
269
+					$(this).addClass("active").siblings().removeClass("active");
270
+					var index = $(this).index();
271
+					 a=index;
272
+					$('.tab_content').children('div').eq(index).show().siblings().hide();
273
+					
274
+				})
275
+					/*cook存储数据*/
276
+				if($.cookie("username")) {
277
+					//取值如果存在则赋值
278
+					console.log($.cookie("username"))
279
+					$(".gl_user").val($.cookie("user")); //用户名
280
+					$("zx_fj").val($.cookie("fj"));
281
+					$(".zx_user").val($.cookie("user"));
282
+				}
283
+				//键盘登录事件
284
+				$('input').bind('keypress', function(event) {
285
+					if(event.keyCode == "13") {
286
+						console.log(a);
287
+						if(a == 0) {
288
+							$('.login_zx').trigger("click");
289
+						} else {
290
+							$(".login_gl").trigger("click");
291
+						}
292
+					}
293
+				});
294
+				//坐席登录
295
+				$('.login_zx').click(function(){
296
+					console.log("坐席")
297
+					var zx_user = $(".zx_user").val();
298
+					var zx_fj = $(".zx_fj").val();
299
+					var zx_psw = $(".zx_psw").val();
300
+					if(zx_user == ""  || zx_fj == "" || zx_psw == "") {
301
+						$(".error_zx").addClass('errorShow');
302
+						if($(".zx_user").val() == "") {
303
+							$(".zx_user").focus(function() {
304
+								$(".error_zx").removeClass('errorShow');
305
+							});
306
+						} else {
307
+							$(".error_zx_user").removeClass('errorShow');
308
+						}
309
+					}else {
310
+						/*请求后台*/
311
+						$.cookie("extno",zx_fj);
312
+						$.cookie("zx_user",zx_user);
313
+					 
314
+						$.ajax({
315
+							type: "post",
316
+							url: huayi.config.callcenter_url + "/Login/login",
317
+							dataType: 'json',
318
+							async: true,
319
+							data: {
320
+								username: zx_user,
321
+								extensionphone: zx_fj,
322
+								password: zx_psw    //$.md5
323
+							},
324
+							success: function(data) {
325
+								/*验证请求*/
326
+								if(data.state == "success") {
327
+									$.cookie("token", data.data.token, {
328
+										expires: 7
329
+									});
330
+									$.cookie("extno", zx_fj, {
331
+										expires: 7
332
+									});
333
+									$.cookie("zx_user", zx_user, {
334
+										expires: 7
335
+									});
336
+									window.location.href = "index.html";
337
+                              
338
+								}else{
339
+									$(".zx_user").val('');
340
+									$(".zx_fj").val('');
341
+									$(".zx_psw").val('');
342
+									console.log(data);
343
+								}
344
+							}
345
+						});
346
+					}
347
+
348
+				})
349
+				//用户登录
350
+				$('.login_gl').click(function() {
351
+					console.log("用户")
352
+					var gl_user = $(".gl_user").val();
353
+					var gl_psw = $(".gl_psw").val();
354
+					if(gl_user == "" || gl_psw == "") {
355
+						$(".error_gl").addClass('errorShow');
356
+						if($(".gl_user").val() == "") {
357
+							$(".gl_user").focus(function() {
358
+								$(".error_gl").removeClass('errorShow');
359
+							});
360
+						} else {
361
+							$(".error_gl_user").removeClass('errorShow');
362
+						}
363
+					} else {
364
+						/*请求后台*/
365
+						$.ajax({
366
+							type: "post",
367
+							url: huayi.config.callcenter_url + "/Login/login",
368
+							dataType: 'json',
369
+							async: true,
370
+							data: {
371
+								username: gl_user,
372
+								password: gl_psw    //$.md5
373
+							},
374
+							success: function(data) {
375
+								/*验证请求*/
376
+								if(data.state == "success") {
377
+									$.cookie("token", data.data.token, {
378
+										expires: 7
379
+									});
380
+									window.location.href = "index.html";
381
+								}else{
382
+									$(".gl_user").val('');
383
+									$(".gl_psw").val('');
384
+									console.log(data.state);
385
+								}
386
+							}
387
+						});
388
+					}
389
+
390
+				})
391
+
392
+			})
393
+		</script>
394
+	</body>
395
+</html>