Pārlūkot izejas kodu

关键字添加修改

liuzhen 5 gadi atpakaļ
vecāks
revīzija
5ebc5d31b4

+ 274 - 229
WebUI/CallCenterWeb.UI/SystemManager/buMenEdit.html

@@ -1,257 +1,302 @@
1 1
 <!DOCTYPE html>
2 2
 <html>
3 3
 
4
-<head>
5
-    <meta charset="UTF-8">
6
-    <title>单位编辑</title>
7
-    <script src="../Script/Common/huayi.load.js"></script>
8
-    <script src="../Script/Common/huayi.config.js"></script>
9
-    <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
10
-    <link rel="stylesheet" href="../css/init.css" />
11
-    <style>
12
-        th {
13
-            padding: 5px 8px 5px 0;
14
-            text-align: right;
15
-        }
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>单位编辑</title>
7
+		<script src="../Script/Common/huayi.load.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
10
+		<link rel="stylesheet" href="../css/init.css" />
11
+		<style>
12
+			th {
13
+				padding: 5px 8px 5px 0;
14
+				text-align: right;
15
+			}
16
+			
17
+			input {
18
+				background-color: #FFF;
19
+				background-image: none;
20
+				border: 1px solid #ccc;
21
+				border-radius: 1px;
22
+				color: inherit;
23
+				padding: 6px 12px;
24
+			}
25
+			
26
+			td {
27
+				padding: 6px 0 5px 10px;
28
+			}
29
+			
30
+			.addts {
31
+				background: #1ab394;
32
+				color: #fff;
33
+				padding: 6px 10px;
34
+				outline: none;
35
+				font-size: 12px;
36
+				margin-left: 15px;
37
+				border: 0;
38
+				border-radius: 3px;
39
+				box-sizing: border-box;
40
+			}
41
+			
42
+			.seldept {
43
+				position: absolute;
44
+				z-index: 100;
45
+				display: none;
46
+			}
47
+			
48
+			ul.ztree {
49
+				border: 1px solid #617775;
50
+				background: #f0f6e4;
51
+				overflow-y: scroll;
52
+				overflow-x: auto;
53
+				height: 150px;
54
+			}
55
+			
56
+			.select {
57
+				width: 190px;
58
+				background-color: #FFF;
59
+				background-image: none;
60
+				border: 1px solid #ccc;
61
+				border-radius: 1px;
62
+				color: inherit;
63
+				padding: 6px 12px;
64
+			}
65
+		</style>
66
+	</head>
16 67
 
17
-        input {
18
-            background-color: #FFF;
19
-            background-image: none;
20
-            border: 1px solid #ccc;
21
-            border-radius: 1px;
22
-            color: inherit;
23
-            padding: 6px 12px;
24
-        }
25
-
26
-        td {
27
-            padding: 6px 0 5px 10px;
28
-        }
29
-
30
-        .addts {
31
-            background: #1ab394;
32
-            color: #fff;
33
-            padding: 6px 10px;
34
-            outline: none;
35
-            font-size: 12px;
36
-            margin-left: 15px;
37
-            border: 0;
38
-            border-radius: 3px;
39
-            box-sizing: border-box;
40
-        }
41
-
42
-        .seldept {
43
-            position: absolute;
44
-            z-index: 100;
45
-            display: none;
46
-        }
47
-
48
-        ul.ztree {
49
-            border: 1px solid #617775;
50
-            background: #f0f6e4;
51
-            overflow-y: scroll;
52
-            overflow-x: auto;
53
-            height: 150px;
54
-        }
55
-    </style>
56
-</head>
57
-
58
-<body class="gray-bg">
59
-    <div style="padding: 10px;">
60
-        <div style="padding: 10px;" class="clearFix">
61
-            <div>
62
-                <span>【单位信息】</span>
63
-                <div class="box_content">
64
-                    <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
65
-                        <tr>
66
-                            <th>父级单位:</th>
67
-                            <td>
68
-                                <input type="text" class="pname" readonly="readonly" /><input type="hidden" class="pid" />
69
-                                <div class="seldept">
70
-                                    <ul id="treeDemo" class="ztree">
71
-                                        <!--类名为ztree是必须的-->
72
-                                    </ul>
73
-                                </div>
74
-                            </td>
75
-                        </tr>
76
-                        <tr>
77
-                            <th>单位名称:</th>
78
-                            <td>
79
-                                <input type="text" class="name" /><input type="hidden" class="id" />
80
-                            </td>
81
-                        </tr>
82
-                        <tr>
83
-                            <th>单位电话:</th>
84
-                            <td>
85
-                                <input type="text" class="tel" />
86
-                            </td>
87
-                        </tr>
88
-                        <tr>
89
-                            <th>单位类型:</th>
90
-                            <td style="line-height: 0.5;">
91
-                                <label class="radio-inline">
68
+	<body class="gray-bg">
69
+		<div style="padding: 10px;">
70
+			<div style="padding: 10px;" class="clearFix">
71
+				<div>
72
+					<span>【单位信息】</span>
73
+					<div class="box_content">
74
+						<table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
75
+							<tr>
76
+								<th>父级单位:</th>
77
+								<td>
78
+									<input type="text" class="pname" readonly="readonly" /><input type="hidden" class="pid" />
79
+									<div class="seldept">
80
+										<ul id="treeDemo" class="ztree">
81
+											<!--类名为ztree是必须的-->
82
+										</ul>
83
+									</div>
84
+								</td>
85
+							</tr>
86
+							<tr>
87
+								<th>单位名称:</th>
88
+								<td>
89
+									<input type="text" class="name" /><input type="hidden" class="id" />
90
+								</td>
91
+							</tr>
92
+							<tr>
93
+								<th>单位电话:</th>
94
+								<td>
95
+									<input type="text" class="tel" />
96
+								</td>
97
+							</tr>
98
+							<tr>
99
+								<th>关键字:</th>
100
+								<td>
101
+									<select id="keyid" name="" class="select"></select>
102
+								</td>
103
+							</tr>
104
+							<tr>
105
+								<th>单位类型:</th>
106
+								<td style="line-height: 0.5;">
107
+									<label class="radio-inline">
92 108
                                     <input type="radio" name="isdept" value="0" />
93 109
                                     分类
94 110
                                 </label>
95
-                                <label class="radio-inline">
111
+									<label class="radio-inline">
96 112
                                     <input type="radio" name="isdept" value="1" />
97 113
                                     二级单位
98 114
                                 </label>
99
-                                <label class="radio-inline">
115
+									<label class="radio-inline">
100 116
                                     <input type="radio" name="isdept" value="2" />
101 117
                                     三级单位
102 118
                                 </label>
103
-                            </td>
104
-                        </tr>
105
-                        <tr>
106
-                            <th>承办单位:</th>
107
-                            <td style="line-height: 0.5;">
108
-                                <label class="radio-inline">
119
+								</td>
120
+							</tr>
121
+							<tr>
122
+								<th>承办单位:</th>
123
+								<td style="line-height: 0.5;">
124
+									<label class="radio-inline">
109 125
                                     <input type="radio" name="isdealdept" value="1" checked="checked" />
110 126
111 127
                                 </label>
112
-                                <label class="radio-inline">
128
+									<label class="radio-inline">
113 129
                                     <input type="radio" name="isdealdept" value="0"   />
114 130
115 131
                                 </label>
116
-                            </td>
117
-                        </tr>
118
-                        <tr>
119
-                            <th>排列序号:</th>
120
-                            <td>
121
-                                <input type="text" class="sort" />
122
-                            </td>
123
-                        </tr>
124
-                    </table>
125
-                </div>
126
-            </div>
127
-            <div class="bton" style="text-align: center;">
128
-                <input class="addts" type="button" value="保存" />
129
-            </div>
130
-        </div>
131
-    </div>
132
-    <script src="../js/zTree/jquery.ztree.core.js"></script>
133
-    <script>
134
-        var id = helper.request.queryString("id");
135
-        $(document).ready(function () {
136
-            bind();
137
-
138
-            $(".pname").click(function () {
139
-                if ($(".seldept").is(":hidden")) {
140
-                    $(".seldept").show();
141
-                } else {
142
-                    $(".seldept").hide();
143
-                }
144
-            })
145
-            $(".seldept").mouseleave(function () {
146
-                $(".seldept").hide();
147
-            })
148
-
149
-            if (id) {
150
-                $.getJSON(huayi.config.callcenter_url + 'Department/GetDept', {
151
-                    id: id,
152
-                    "token": $.cookie("token")
153
-                }, function (result) {
154
-                    if (result.state.toLowerCase() == "success") {
155
-                        var content = result.data;
156
-                        if (content.F_PartentId && content.F_PartentId != '0') {
157
-                            getpname(content.F_PartentId);
158
-                        }
159
-                        else {
160
-                            $(".pid").val(0);
161
-                            $(".pname").val("无父级单位");
162
-                        }
163
-                        $(".id").val(content.F_DeptId);
164
-                        $(".name").val(content.F_DeptName);
165
-                        $(".tel").val(content.F_DeptPhone);
166
-                        $(".sort").val(content.F_Sort);
167
-                        $("input[name='isdept'][value='" + content.F_IsDept + "']").prop("checked", true);
168
-                        $("input[name='isdealdept'][value='" + content.F_IsDealDept + "']").prop("checked", true);
169
-                    }
170
-                })
171
-            }
172
-        });
132
+								</td>
133
+							</tr>
134
+							<tr>
135
+								<th>排列序号:</th>
136
+								<td>
137
+									<input type="text" class="sort" />
138
+								</td>
139
+							</tr>
140
+						</table>
141
+					</div>
142
+				</div>
143
+				<div class="bton" style="text-align: center;">
144
+					<input class="addts" type="button" value="保存" />
145
+				</div>
146
+			</div>
147
+		</div>
148
+		<script src="../js/zTree/jquery.ztree.core.js"></script>
149
+		<script>
150
+			var id = helper.request.queryString("id");
151
+			$(document).ready(function() {
152
+				bind();
153
+				ZT($("#keyid"));
154
+				$(".pname").click(function() {
155
+					if($(".seldept").is(":hidden")) {
156
+						$(".seldept").show();
157
+					} else {
158
+						$(".seldept").hide();
159
+					}
160
+				})
161
+				$(".seldept").mouseleave(function() {
162
+					$(".seldept").hide();
163
+				})
173 164
 
174
-        function getpname(strpid) {
175
-            $.getJSON(huayi.config.callcenter_url + 'Department/GetDept', {
176
-                id: strpid,
177
-                "token": $.cookie("token")
178
-            }, function (result) {
179
-                if (result.state.toLowerCase() == "success") {
180
-                    var content = result.data;
181
-                    $(".pid").val(content.F_DeptId);
182
-                    $(".pname").val(content.F_DeptName);
183
-                }
184
-            })
185
-        }
165
+				if(id) {
166
+					$.getJSON(huayi.config.callcenter_url + 'Department/GetDept', {
167
+						id: id,
168
+						"token": $.cookie("token")
169
+					}, function(result) {
170
+						if(result.state.toLowerCase() == "success") {
171
+							var content = result.data;
172
+							if(content.F_PartentId && content.F_PartentId != '0') {
173
+								getpname(content.F_PartentId);
174
+							} else {
175
+								$(".pid").val(0);
176
+								$(".pname").val("无父级单位");
177
+							}
178
+							$(".id").val(content.F_DeptId);
179
+							$(".name").val(content.F_DeptName);
180
+							$(".tel").val(content.F_DeptPhone);
181
+							$(".sort").val(content.F_Sort);
182
+							$('#keyid').val(content.F_Valueid)
183
+							$("input[name='isdept'][value='" + content.F_IsDept + "']").prop("checked", true);
184
+							$("input[name='isdealdept'][value='" + content.F_IsDealDept + "']").prop("checked", true);
185
+						}
186
+					})
187
+				}
188
+			});
186 189
 
187
-        var setting = {
188
-            data: {
189
-                key: {
190
-                    name: "F_DeptName"
191
-                },
192
-                simpleData: {
193
-                    enable: true,
194
-                    idKey: "F_DeptId",
195
-                    pIdKey: "F_PartentId",
196
-                    rootPId: -1
197
-                }
198
-            },
199
-            callback: {
200
-                onClick: zTreeOnClick
201
-            }
202
-        };
203
-        function zTreeOnClick(event, treeId, treeNode) {
204
-            $(".pid").val(treeNode.F_DeptId);
205
-            $(".pname").val(treeNode.F_DeptName);
206
-            $(".seldept").hide();
207
-        };
190
+			function getpname(strpid) {
191
+				$.getJSON(huayi.config.callcenter_url + 'Department/GetDept', {
192
+					id: strpid,
193
+					"token": $.cookie("token")
194
+				}, function(result) {
195
+					if(result.state.toLowerCase() == "success") {
196
+						var content = result.data;
197
+						$(".pid").val(content.F_DeptId);
198
+						$(".pname").val(content.F_DeptName);
199
+					}
200
+				})
201
+			}
208 202
 
209
-        function bind() {
210
-            $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", { "token": $.cookie("token") }, function (result) {
211
-                if (result.state.toLowerCase() == "success") {
212
-                    tree = $.fn.zTree.init($("#treeDemo"), setting, result.data);
213
-                    tree.addNodes(null, 0, { "F_DeptId": 0, "F_DeptName": "无父级单位" });
214
-                }
215
-            })
216
-        }
203
+			var setting = {
204
+				data: {
205
+					key: {
206
+						name: "F_DeptName"
207
+					},
208
+					simpleData: {
209
+						enable: true,
210
+						idKey: "F_DeptId",
211
+						pIdKey: "F_PartentId",
212
+						rootPId: -1
213
+					}
214
+				},
215
+				callback: {
216
+					onClick: zTreeOnClick
217
+				}
218
+			};
217 219
 
218
-        //修改工单
219
-        $(".addts").click(function () {
220
-            var pid = $(".pid").val();
221
-            var id = $(".id").val();
222
-            var name = $(".name").val();
223
-            var tel = $(".tel").val();
224
-            var sort = $(".sort").val();
225
-            var isdept = $('input[name="isdept"]:checked ').val();
226
-            var isdealdept = $('input[name="isdealdept"]:checked ').val();
220
+			function zTreeOnClick(event, treeId, treeNode) {
221
+				$(".pid").val(treeNode.F_DeptId);
222
+				$(".pname").val(treeNode.F_DeptName);
223
+				$(".seldept").hide();
224
+			};
227 225
 
228
-            if (!name) {
229
-                layer.confirm('请输入单位名称!', {
230
-                    btn: ['确定']
231
-                });
232
-                return;
233
-            }
234
-            if (!isdept) {
235
-                layer.confirm('请选择单位类型!', {
236
-                    btn: ['确定']
237
-                });
238
-                return;
239
-            }
226
+			function bind() {
227
+				$.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
228
+					"token": $.cookie("token")
229
+				}, function(result) {
230
+					if(result.state.toLowerCase() == "success") {
231
+						tree = $.fn.zTree.init($("#treeDemo"), setting, result.data);
232
+						tree.addNodes(null, 0, {
233
+							"F_DeptId": 0,
234
+							"F_DeptName": "无父级单位"
235
+						});
236
+					}
237
+				})
238
+			}
239
+			//关键字
240
+			function ZT(obj) {
241
+				obj.empty();
242
+				obj.append('<option selected="selected" value="">请选择</option>');
243
+				$.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
244
+					"token": $.cookie("token"),
245
+					id: 3
246
+				}, function(data) {
247
+					if(data.state.toLowerCase() == "success") {
248
+						var content = data.data;
249
+						$(content).each(function(i, n) {
250
+							$("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
251
+						})
252
+					}
253
+				})
254
+			}
255
+			//修改工单
256
+			$(".addts").click(function() {
257
+				var pid = $(".pid").val();
258
+				var id = $(".id").val();
259
+				var name = $(".name").val();
260
+				var tel = $(".tel").val();
261
+				var sort = $(".sort").val();
262
+				var isdept = $('input[name="isdept"]:checked ').val();
263
+				var isdealdept = $('input[name="isdealdept"]:checked ').val();
264
+				console.log($('#keyid').val())
265
+				if(!name) {
266
+					layer.confirm('请输入单位名称!', {
267
+						btn: ['确定']
268
+					});
269
+					return;
270
+				}
271
+				if(!isdept) {
272
+					layer.confirm('请选择单位类型!', {
273
+						btn: ['确定']
274
+					});
275
+					return;
276
+				}
240 277
 
241
-            $.post(huayi.config.callcenter_url + 'Department/AddDept', {
242
-                id: id, did: pid, name: name, phone: tel, sort: sort, isdept: isdept, isdealdept: isdealdept, "token": $.cookie("token")
243
-            }, function (result) {
244
-                result = $.parseJSON(result);
245
-                if (result.state.toLowerCase() == "success") {
246
-                    layer.msg("操作成功");
247
-                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
248
-                    parent.layer.close(index); //再执行关闭
249
-                    parent.bind();
250
-                }
251
-            })
278
+				$.post(huayi.config.callcenter_url + 'Department/AddDept', {
279
+					id: id,
280
+					did: pid,
281
+					name: name,
282
+					phone: tel,
283
+					sort: sort,
284
+					isdept: isdept,
285
+					isdealdept: isdealdept,
286
+					valueid:$('#keyid').val(),
287
+					"token": $.cookie("token")
288
+				}, function(result) {
289
+					result = $.parseJSON(result);
290
+					if(result.state.toLowerCase() == "success") {
291
+						layer.msg("操作成功");
292
+						var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
293
+						parent.layer.close(index); //再执行关闭
294
+						parent.bind();
295
+					}
296
+				})
252 297
 
253
-        });
254
-    </script>
255
-</body>
298
+			});
299
+		</script>
300
+	</body>
256 301
 
257 302
 </html>

+ 143 - 119
WebUI/CallCenterWeb.UI/SystemManager/css/shuJuZiDian.css

@@ -1,119 +1,143 @@
1
-			.box {
2
-				width: 30%;
3
-			}
4
-			.delModel .box,.zdlist_delModel .box{
5
-				    width: 23%;
6
-			}
7
-			/*.boxCon {
8
-				width: 100%;
9
-				background: #fff;
10
-				/*text-align: center;*/
11
-				/*padding: 10px 15px;
12
-				height: 340px;
13
-				overflow-y: auto;*/
14
-			/*}*/
15
-			
16
-			.boxCon table {
17
-				width: 100%;
18
-			}
19
-			
20
-			
21
-			.inpBox {
22
-				border: 1px solid #a9a9a9;
23
-				height: 27px;
24
-				width: 37%;;
25
-				display: inline-block;
26
-				position: relative;
27
-				vertical-align: middle;
28
-			}
29
-			
30
-			.inps1,
31
-			.inps4{
32
-				width: 100%;
33
-				height: 24px;
34
-				outline: none;
35
-				border: 0;
36
-				border-image-width: 0;
37
-				padding: 0;
38
-				padding-left: 3px;
39
-			}
40
-			.changeCode,.addzdz,.addSort{
41
-				width: 55%;
42
-			}
43
-			
44
-			.xl {
45
-				display: inline-block;
46
-				background: url(../../img/dropDown.png) no-repeat;
47
-				height: 100%;
48
-				background-position: center center;
49
-				width: 20px;
50
-				position: absolute;
51
-				right: 0;
52
-				top: 0px;
53
-				/*background-color: #f7bc8b;*/
54
-				cursor: pointer;
55
-			}
56
-			
57
-			/*.xl:hover {
58
-				background-color: #e6d523;
59
-			}*/
60
-			
61
-			.addTree {
62
-				background: #fff;
63
-				position: absolute;
64
-				width: 100%;
65
-				border: 1px solid darkgrey;
66
-				right: 0;
67
-				top: 26px;
68
-				display: none;
69
-				height: 220px;
70
-				overflow-y: auto;
71
-			}
72
-			
73
-			.treeTable {
74
-				height: 400px;
75
-				/*overflow-y: auto;*/
76
-			}
77
-			
78
-			.tree {
79
-				height: 100%;
80
-			}
81
-			
82
-			.trTitle {
83
-				width: 100%;
84
-				height: 34px;
85
-				line-height: 34px;
86
-				border-bottom: 1px solid #ebebeb;
87
-				color: red;
88
-				font-weight: 700;
89
-				margin-bottom: 15px;
90
-			}
91
-			
92
-			.treeCon {
93
-				height: 90%;
94
-				border: 1px solid #ebebeb;
95
-				overflow-y: auto
96
-			}
97
-			
98
-			.rowsss{
99
-				background: darkred;
100
-				color: #fff;
101
-			}
102
-			.shanChu,.xiuGai,.addZiDian{
103
-				display: inline-block;
104
-				height: 16px;
105
-				width: 16px;
106
-				vertical-align: middle;
107
-			}
108
-			.shanChu{
109
-			background: url(../../img/shanChu.png) no-repeat;	
110
-			}
111
-			.xiuGai{
112
-			background: url(../../img/xiuGai1.png) no-repeat;	
113
-			}
114
-			.addZiDian{
115
-				background: url(../../img/upUp.png) no-repeat;	
116
-			}
117
-			.tjzd{
118
-				    float: right;
119
-			}
1
+.box {
2
+	width: 30%;
3
+}
4
+
5
+.delModel .box,
6
+.zdlist_delModel .box {
7
+	width: 23%;
8
+}
9
+/*.boxCon {
10
+	width: 100%;
11
+	background: #fff;
12
+	/*text-align: center;*/
13
+/*padding: 10px 15px;
14
+	height: 340px;
15
+	overflow-y: auto;*/
16
+/*}*/
17
+
18
+.boxCon table {
19
+	width: 100%;
20
+}
21
+
22
+.inpBox {
23
+	border: 1px solid #a9a9a9;
24
+	height: 27px;
25
+	/*width: 37%;*/
26
+	;
27
+	display: inline-block;
28
+	position: relative;
29
+	vertical-align: middle;
30
+}
31
+.inps3,
32
+.inps1,
33
+.inps4 {
34
+	width: 100%;
35
+	height: 24px;
36
+	outline: none;
37
+	border: 0;
38
+	border-image-width: 0;
39
+	padding: 0;
40
+	padding-left: 3px;
41
+}
42
+
43
+.changeCode,
44
+.addzdz,
45
+.addSort {
46
+	width: 55%;
47
+}
48
+.xl3,
49
+.xl {
50
+	display: inline-block;
51
+	background: url(../../img/dropDown.png) no-repeat;
52
+	height: 100%;
53
+	background-position: center center;
54
+	width: 20px;
55
+	position: absolute;
56
+	right: 0;
57
+	top: 0px;
58
+	/*background-color: #f7bc8b;*/
59
+	cursor: pointer;
60
+}
61
+/*.xl:hover {
62
+	background-color: #e6d523;
63
+}*/
64
+.addTree3,
65
+.addTree {
66
+	background: #fff;
67
+	position: absolute;
68
+	width: 100%;
69
+	border: 1px solid darkgrey;
70
+	right: 0;
71
+	top: 26px;
72
+	display: none;
73
+	height: 220px;
74
+	overflow-y: auto;
75
+	z-index: 10000;
76
+}
77
+.treeTable3,
78
+.treeTable {
79
+	height: 400px;
80
+	/*overflow-y: auto;*/
81
+}
82
+
83
+.tree {
84
+	height: 100%;
85
+}
86
+
87
+.trTitle {
88
+	width: 100%;
89
+	height: 34px;
90
+	line-height: 34px;
91
+	border-bottom: 1px solid #ebebeb;
92
+	color: red;
93
+	font-weight: 700;
94
+	margin-bottom: 15px;
95
+}
96
+
97
+.treeCon {
98
+	height: 90%;
99
+	border: 1px solid #ebebeb;
100
+	overflow-y: auto
101
+}
102
+
103
+.rowsss {
104
+	background: darkred;
105
+	color: #fff;
106
+}
107
+
108
+.shanChu,
109
+.xiuGai,
110
+.addZiDian {
111
+	display: inline-block;
112
+	height: 16px;
113
+	width: 16px;
114
+	vertical-align: middle;
115
+}
116
+
117
+.shanChu {
118
+	background: url(../../img/shanChu.png) no-repeat;
119
+}
120
+
121
+.xiuGai {
122
+	background: url(../../img/xiuGai1.png) no-repeat;
123
+}
124
+
125
+.addZiDian {
126
+	background: url(../../img/upUp.png) no-repeat;
127
+}
128
+
129
+.tjzd {
130
+	float: right;
131
+}
132
+.Cleans {
133
+    display: inline-block;
134
+    width: 20px;
135
+    position: absolute;
136
+    right: 21px;
137
+    top: 8px;
138
+    display: none;
139
+}
140
+.addkey,
141
+.editkey{
142
+	display: none;
143
+}

+ 76 - 1
WebUI/CallCenterWeb.UI/SystemManager/js/shuJuZiDian.js

@@ -6,6 +6,7 @@
6 6
 	var xlName; //添加弹出框内下拉框内节点name
7 7
 	var token = $.cookie("token");
8 8
 	tree();
9
+	departmentTree();//部门名称数据
9 10
 
10 11
 	function tree() {
11 12
 		$.get(huayi.config.callcenter_url + 'Dictionary/GetZTreeList', {
@@ -64,6 +65,11 @@
64 65
 	function addTreeClick(event, treeId, treeNode) {
65 66
 		addPid = treeNode.id;
66 67
 		console.log(addPid);
68
+		if(addPid==38){
69
+			$('.addkey').show();
70
+		}else{
71
+			$('.editkey').hide();
72
+		}
67 73
 		xlName = treeNode.text;
68 74
 		$('.inps1').val(xlName);
69 75
 
@@ -114,6 +120,11 @@
114 120
 	$('.add').click(function() {
115 121
 		$('.addModel').css('display', 'block');
116 122
 		if(name) {
123
+			if(name=='关键字'){
124
+				$('.addkey').show()
125
+			}else{
126
+				$('.addkey').hide()
127
+			}
117 128
 			tps.html(name);
118 129
 			$('.inps1').val(name);
119 130
 			addPid = id;
@@ -128,6 +139,7 @@
128 139
 	//添加关闭按钮
129 140
 	$('.addBtr').click(function() {
130 141
 		$('.addModel').css('display', 'none');
142
+		$('.addTree3').css('display','none')
131 143
 	})
132 144
 	//添加内容下拉
133 145
 	$('.inps1').click(function() {
@@ -176,6 +188,7 @@
176 188
 				data: {
177 189
 					pid: addPid, //当前选择节点ID
178 190
 					name: addDeptname, //部门名称
191
+					deptid:$("#Dpment").val(),//部门名称id
179 192
 					token: token
180 193
 				},
181 194
 				success: function(data) {
@@ -210,6 +223,11 @@
210 223
 			})
211 224
 			return
212 225
 		} else {
226
+			if(pid=='38'){
227
+				$('.editkey').show()
228
+			}else{
229
+				$('.editkey').hide()
230
+			}
213 231
 			changeAjax(id);
214 232
 			$('.changeModel').css('display', 'block');
215 233
 			$('.chtps').html(name);
@@ -224,6 +242,7 @@
224 242
 	//关闭按钮
225 243
 	$('.changeBtr').click(function() {
226 244
 		$('.changeModel').css('display', 'none');
245
+		$('.addTree3').css('display','none')
227 246
 	}) ;
228 247
 	$('.inps4').click(function() {
229 248
 		$('.xlChange').css('display', 'block')
@@ -298,6 +317,8 @@
298 317
 					chbcPid=pid;
299 318
 				}
300 319
 				$('.inps5').val(chanCon.F_Value);
320
+				$('.inps3').val(chanCon.F_DeptName);
321
+				$('#Dpment').val(chanCon.F_Deptid);
301 322
 //				$('.inps6').val(chanCon.sort);
302 323
 //				chbcSort = chanCon.sort;
303 324
 				chbcName = chanCon.F_Value;
@@ -315,6 +336,7 @@
315 336
 				id: id,
316 337
 				pid: chbcPid,
317 338
 				name: chbcName,
339
+				deptid:$("#Dpment").val(),//部门名称id
318 340
 				token: token
319 341
 			},
320 342
 			success: function(data) {
@@ -342,4 +364,57 @@
342 364
 		}
343 365
 
344 366
 	})
345
-
367
+//部门名称数据
368
+function departmentTree() {
369
+    $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
370
+        "token": $.cookie("token"),
371
+        //		"pid": pid
372
+    }, function (result) {
373
+        result = $.parseJSON(result);
374
+        $.fn.zTree.init($("#addTreeDemo3"), setting4, result.data); //实例化树形图
375
+        $.fn.zTree.init($("#addTreeDemo6"), setting4, result.data); //实例化树形图
376
+    });
377
+}
378
+var setting4 = {
379
+    data: {
380
+        key: {
381
+            name: "F_DeptName"
382
+        },
383
+        simpleData: {
384
+            enable: true,
385
+            idKey: "F_DeptId",
386
+            pIdKey: "F_PartentId",
387
+            rootPId: 0
388
+        }
389
+    },
390
+    callback: {
391
+        onClick: zTreeOnClick3
392
+    }
393
+};
394
+function zTreeOnClick3(event, treeId, treeNode) {
395
+    if (treeNode.level >= 2) {
396
+        $('.inps3').val(treeNode.F_DeptName);
397
+        $("#PID").val(treeNode.F_DeptId);
398
+        $("#Dpment").val(treeNode.F_DeptId);
399
+        $(".Cleans").show();
400
+    }
401
+};
402
+$('.inps3').focus(function () {
403
+    $('.xlAdd3').css('display', 'block')
404
+})
405
+$('.xl3').click(function () {
406
+    if ($('.xlAdd3').css('display') == 'block') {
407
+        $('.xlAdd3').css('display', 'none')
408
+    } else {
409
+        $('.xlAdd3').css('display', 'block')
410
+    }
411
+})
412
+$('.addTree3').mouseleave(function () {
413
+    $(this).css('display', 'none')
414
+})
415
+//清除
416
+$(".Cleans ").click(function () {
417
+    $('.inps3').val("");
418
+    $("#PID").val("");
419
+    $("#Dpment").val("");
420
+})

+ 22 - 1
WebUI/CallCenterWeb.UI/SystemManager/shuJuZiDian.html

@@ -51,6 +51,16 @@
51 51
 						</div>
52 52
 					</div>
53 53
 					<div>分类名称:<input class="inps inps2" type="text" /></div>
54
+					<div class="addkey">部门名称:
55
+						 <div class="inpBox">
56
+                            <input type="text" class="inps3" />
57
+                            <i class="Cleans  fa fa-close"></i>
58
+                            <i class="xl3 xl_one3"></i>
59
+                            <div class="addTree3 xlAdd3">
60
+                                <ul id="addTreeDemo3" class="ztree"></ul>
61
+                            </div>
62
+                       </div>
63
+					</div>
54 64
 					<!--<div>排列序号:<input class="inps inps3" type="text" /></div>-->
55 65
 					<div><button class="btns addCun">保存</button></div>
56 66
 				</div>
@@ -95,12 +105,23 @@
95 105
 						</div>
96 106
 					</div>
97 107
 					<div>分类名称:<input class="inps inps5" type="text" /></div>
108
+					<div class="editkey">部门名称:
109
+						 <div class="inpBox">
110
+                            <input type="text" class="inps3" />
111
+                            <i class="Cleans  fa fa-close"></i>
112
+                            <i class="xl3 xl_one3"></i>
113
+                            <div class="addTree3 xlAdd3">
114
+                                <ul id="addTreeDemo6" class="ztree"></ul>
115
+                            </div>
116
+                       </div>
117
+					</div>
98 118
 					<div><button class="btns changeCun">保存</button></div>
99 119
 				</div>
100 120
 			</div>
101 121
 
102 122
 		</div>
103
-	
123
+	<input type="hidden" id="PID" />
124
+    <input type="hidden" id="Dpment" />
104 125
 
105 126
     <script src="../js/zTree/jquery.ztree.core.js"></script>
106 127
     <script src="../css/layer/layer.js"></script>