ソースを参照

知识库索要列表添加

liuzhen 6 年 前
コミット
ab7b2cbf20

+ 281 - 0
WebUI/CallCenterWeb.UI/CommonHtml/addRecord.html

@@ -0,0 +1,281 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+		<title></title>
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="../js/comboSelect/combo.select.css" />
11
+	    <link rel="stylesheet" href="../SystemManager/css/yongHuManger.css" />
12
+	</head>
13
+	<style type="text/css">
14
+		.model {
15
+			display: block;
16
+			background: none;
17
+		}
18
+		#ygbirth{
19
+			width: 100%;
20
+		}
21
+		.select_{
22
+			width: 100%;
23
+		}
24
+	</style>
25
+	<body>
26
+<!--添加内容-->
27
+    <div class="model addModel">
28
+        <div class="box">
29
+            <div class="boxCon">
30
+                <table>
31
+                    <tbody>
32
+                        <tr>
33
+                            <th>承办单位:</th>
34
+                            <td>
35
+                                <div class="inpBox">
36
+                                    <input type="text" class="inps inps2" />
37
+                                    <input type="hidden" class="add_did" />
38
+                                    <i class="xl xl_two"></i>
39
+                                    <div class="addTree xlAdd_two">
40
+                                        <ul id="xlAdd_depTree" class="ztree"></ul>
41
+                                    </div>
42
+                                </div>
43
+                            </td>
44
+                        </tr>
45
+                        <tr>
46
+                            <th>时限:</th>
47
+                            <td><input type="text" class="add_birth laydate-icon" id="ygbirth" /></td>
48
+                        </tr>
49
+                        <tr>
50
+                        	<th>紧急程度:</th>
51
+	                        <td>
52
+	                            <select class="select_" id="dealtype">
53
+	                                <option value="">请选择</option>
54
+	                                <option value="0">普通</option>
55
+	                                <option value="1">紧急</option>
56
+	                            </select>
57
+	                        </td>
58
+                        </tr>
59
+                        <tr>
60
+                            <th>文本描述:</th>
61
+                            <td colspan="3">
62
+                                <textarea class="add_remark" style="width: 100%;height: 50px;"></textarea>
63
+                            </td>
64
+                        </tr>
65
+						<tr>
66
+                        <th>附件上传:</th>
67
+                        <td colspan="7">
68
+                            <div class="fileBox"></div>
69
+                            <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
70
+                            <input class="input" type="button" value="上传" id="scwj" />
71
+                            <input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />
72
+                            <input type="hidden" id="file" />
73
+                            <!--</br>-->
74
+                            <span style="color:#FF0000; border: none;">
75
+                            	(文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
76
+                            </span>
77
+                        </td>
78
+                    </tr>
79
+                    </tbody>
80
+                </table>
81
+                <div style="text-align: center;"><button class="btns addCun">保存</button></div>
82
+            </div>
83
+        </div>
84
+
85
+    </div>
86
+    <script type="text/javascript">
87
+    	$(function(){
88
+    		var token = $.cookie("token");
89
+			var keyWord ; //关键字
90
+			var tree; //部门树
91
+			 bindtree();
92
+			 //上传附件
93
+            $("#scwj").click(function () {
94
+                $("#upFile").trigger("click");
95
+            })
96
+            $("#upFile").change(function () {
97
+                upload();
98
+            })
99
+    		    //===============添加功能开始=============================
100
+			    laydate.skin('molv');
101
+			    //用户生日
102
+			    laydate({
103
+			        elem: '#ygbirth',
104
+			        event: 'focus',
105
+			        istoday: true,
106
+			        format: 'YYYY-MM-DD hh:mm:ss',
107
+			        // 分隔符可以任意定义,该例子表示只显示年月
108
+			    });
109
+			    //下拉
110
+			    $('.inps').focus(function () {
111
+			        $(this).siblings('.addTree').css('display', 'block');
112
+			    })
113
+			
114
+			    $('.xl').click(function () {
115
+			        var xl = $(this).siblings('.addTree');
116
+			        if (xl.css('display') == 'block') {
117
+			            xl.css('display', 'none')
118
+			        } else {
119
+			            xl.css('display', 'block')
120
+			        }
121
+			    })
122
+			    $('.addTree').mouseleave(function () {
123
+			        $(this).css('display', 'none')
124
+			    })
125
+			
126
+			    //添加按钮
127
+			    $('.add').click(function () {
128
+			        $('.addModel').css('display', 'block');
129
+			    })
130
+			    $('.addBtr').click(function () {
131
+			        $('.addModel').css('display', 'none');
132
+			    })
133
+			
134
+			    //保存添加按钮
135
+			    $('.addCun').click(function () {
136
+			    	addCun();
137
+			    })
138
+    	})
139
+    	function bindtree() {
140
+		    $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", { "token": $.cookie("token") }, function (result) {
141
+		        if (result.state.toLowerCase() == "success") {
142
+		            $.fn.zTree.init($("#xlAdd_depTree"), setting2, result.data);
143
+		        }
144
+		    })
145
+		}
146
+    	//获取所属部门
147
+		var setting2 = {
148
+		   data: {
149
+						key: {
150
+							name: "F_DeptName"
151
+						},
152
+						simpleData: {
153
+							enable: true,
154
+							idKey: "F_DeptId",
155
+							pIdKey: "F_PartentId",
156
+							rootPId: 0
157
+						}
158
+					},
159
+		    callback: {
160
+		        onClick: ztreeDep
161
+		    }
162
+		};
163
+		function ztreeDep(event, treeId, treeNode) {
164
+		    if (treeNode.level >= 2) {
165
+		        $('.inps2').val(treeNode.F_DeptName);
166
+		        $('.add_did').val(treeNode.F_DeptId);
167
+		    }
168
+		};
169
+		 //上传文件
170
+        function upload() {
171
+            var Files = document.getElementById("upFile").files;
172
+            if (Files.length > 0) {
173
+                var formData = new FormData();
174
+                for (var i = 0; i < Files.length; i++) {
175
+                    formData.append('file' + i, Files[i]);
176
+                }
177
+                formData.append("token", $.cookie("token"));
178
+                var typeName=Files[0].name.split('.')[1];
179
+                if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
180
+	                $.ajax({
181
+	                    url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
182
+	                    type: "POST",
183
+	                    data: formData,
184
+	                    /**
185
+	                     *必须false才会自动加上正确的Content-Type
186
+	                     */
187
+	                    contentType: false,
188
+	                    /**
189
+	                     * 必须false才会避开jQuery对 formdata 的默认处理
190
+	                     * XMLHttpRequest会对 formdata 进行正确的处理
191
+	                     */
192
+	                    processData: false,
193
+	                    success: function (result) {
194
+	                        document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
195
+	                        $("#upFile").change(function () {
196
+	                            upload();
197
+	                        });
198
+	                        var r = $.parseJSON(result);
199
+	                        if (r.state.toLowerCase() == "success") {
200
+	
201
+	                            var a = r.data;
202
+	                            $(a).each(function (i, n) {
203
+                            		var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
204
+	                                $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
205
+	                                    event.stopPropagation();
206
+	                                    $(this).parent().remove();
207
+	                                    file_num()
208
+	                                })
209
+	                            })
210
+	                            file_num();
211
+	                        }
212
+	                    }
213
+	                });
214
+	            }else{
215
+		    		layer.msg("格式不正确");
216
+		    	}
217
+            
218
+            } else {
219
+                layer.confirm('请上传文件!', {
220
+                    btn: ['确定']
221
+                });
222
+            }
223
+        }
224
+        //上传文件隐藏域值
225
+        function file_num() {
226
+            var str = '';
227
+            var Str;
228
+            $('.fileBox .files').each(function (j, m) {
229
+                var aa = $(m).attr("fiel-num")
230
+                console.log(aa);
231
+                str += aa + ",";
232
+                Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
233
+            })
234
+            $("#file").val(Str);
235
+        }
236
+        //保存所调方法
237
+		function addCun() {
238
+			if($(".add_did").val()==''){
239
+				layer.msg('请选择部门')
240
+				return;
241
+			}
242
+			if($('.add_remark').val()==''){
243
+				layer.msg('请填写文本描述');
244
+				return;
245
+			}
246
+			if($('#ygbirth').val()==''){
247
+				layer.msg('请选择时限');
248
+				return;
249
+			}
250
+			var level=$("#dealtype").val()
251
+			if(level==''){
252
+				level='0'
253
+			}
254
+		    $.post(huayi.config.callcenter_url + "Repository/AddDemands", {
255
+		        token: $.cookie("token"),
256
+		        deptid: $(".add_did").val(),//部门id
257
+		        des:$('.add_remark').val(),//文本描述
258
+		        limittime: $('#ygbirth').val(),//时限
259
+		        file:$("#file").val(), //(多个用英文逗号,隔开)附件id
260
+		        level:level,//紧急程度
261
+		        demandsid:0//记录id
262
+		    }, function (data) {
263
+		        data = JSON.parse(data);
264
+		        if (data.state.toLowerCase() == "success") {
265
+		            layer.msg("添加成功!");
266
+		            var index=parent.layer.getFrameIndex(window.name);
267
+		            window.parent.location.reload(); //刷新父页面
268
+		            parent.layer.close(index);
269
+		        }else{
270
+		        	layer.msg(data.msg);
271
+		        }
272
+		    });
273
+		}
274
+    </script>
275
+    <script src="../js/jquery.md5.js"></script>
276
+    <script src="../css/laydate/laydate.js"></script>
277
+    <script src="../css/layer/layer.js"></script>
278
+    <script src="../js/zTree/jquery.ztree.core.js"></script>
279
+    <script src="../js/comboSelect/jquery.combo.select.js"></script>
280
+	</body>
281
+</html>

+ 110 - 0
WebUI/CallCenterWeb.UI/CommonHtml/recordDatil.html

@@ -0,0 +1,110 @@
1
+<!DOCTYPE html>
2
+<html>
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
+    <link rel="stylesheet" href="../js/comboSelect/combo.select.css" />
12
+    <link rel="stylesheet" href="../SystemManager/css/yongHuManger.css" />
13
+    <style type="text/css">
14
+    	.model {
15
+			display: block;
16
+			background: none;
17
+		}
18
+    </style>
19
+</head>
20
+
21
+<body >
22
+    <div class="model addModel">
23
+        <div class="box">
24
+            <div class="boxCon">
25
+       <table>
26
+	        <tbody>
27
+	            <tr>
28
+	                <th>承办单位:</th>
29
+	                <td>
30
+	                  <input type="" name="department" id="department" value="" />
31
+	                </td>
32
+	            </tr>
33
+	            <tr>
34
+	                <th>时限:</th>
35
+	                <td><input type="text" class="add_birth " id="ygbirth" /></td>
36
+	            </tr>
37
+	            <tr>
38
+	                <th>提交时间:</th>
39
+	                <td><input type="text" class="add_birth " id="submitusertime" /></td>
40
+	            </tr>
41
+	            <tr>
42
+	                <th>添加人:</th>
43
+	                <td><input type="text" class="add_birth " id="createusername" /></td>
44
+	            </tr>
45
+	            <tr>
46
+	                <th>提交人:</th>
47
+	                <td><input type="text" class="add_birth " id="submitusername" /></td>
48
+	            </tr>
49
+	            <tr>
50
+	            	<th>紧急程度:</th>
51
+	                <td>
52
+	                    <input type="" name="leavel" id="leavel" value="" />
53
+	                </td>
54
+	            </tr>
55
+	            <tr>
56
+	                <th>文本描述:</th>
57
+	                <td colspan="3">
58
+	                    <textarea class="add_remark"></textarea>
59
+	                </td>
60
+	            </tr>
61
+	            
62
+	        </tbody>
63
+      </table>
64
+    </div>
65
+     </div>
66
+      </div>
67
+    <script type="text/javascript">
68
+    	$(function(){
69
+    		var wid = helper.request.queryString("wid");
70
+    		load(wid);
71
+    	})
72
+    	function load(wid) {
73
+           $.get(huayi.config.callcenter_url + "Repository/GetModel_Demands", {
74
+		        token: $.cookie("token"),
75
+		        demandsid:wid,
76
+		    }, function (data) {
77
+		        data = JSON.parse(data);
78
+		        if (data.state.toLowerCase() == "success") {
79
+		             $('#department').val(data.data.deptname);
80
+		             $('#ygbirth').val(data.data.model.F_LimitTime);
81
+		             $('#submitusername').val(data.data.submitusername);
82
+		             $('#submitusertime').val(data.data.model.F_CreateTime);
83
+		             $('#createusername').val(data.data.createusername);
84
+		             $('.add_remark').val(data.data.model.F_Descript);
85
+		             $('#leavel').val(States(data.data.model.F_Level));
86
+		        }
87
+		    });
88
+        }
89
+    	//状态
90
+        function States(val) {
91
+            var html = '';
92
+            switch (val + '') {
93
+                case '0':
94
+                    html = '普通';
95
+                    break;
96
+                case '1':
97
+                    html = '紧急';
98
+                    break;
99
+            }
100
+            return html;
101
+        }
102
+    </script>
103
+    <script src="../js/jquery.md5.js"></script>
104
+    <script src="../css/laydate/laydate.js"></script>
105
+    <script src="../css/layer/layer.js"></script>
106
+    <script src="../js/zTree/jquery.ztree.core.js"></script>
107
+    <script src="../js/comboSelect/jquery.combo.select.js"></script>
108
+</body>
109
+
110
+</html>

+ 378 - 0
WebUI/CallCenterWeb.UI/CommonHtml/recordEdit.html

@@ -0,0 +1,378 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+		<title></title>
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="../js/comboSelect/combo.select.css" />
11
+	    <link rel="stylesheet" href="../SystemManager/css/yongHuManger.css" />
12
+	    <link href="../css/WorkOrder/seeProjectDetail.css" rel="stylesheet" />
13
+	</head>
14
+	<style type="text/css">
15
+		.model {
16
+			display: block;
17
+			background: none;
18
+		}
19
+		#ygbirth{
20
+			width: 100%;
21
+		}
22
+		.select_{
23
+			width: 100%;
24
+			padding: 6px 0;
25
+		}
26
+	</style>
27
+	<body>
28
+<!--添加内容-->
29
+    <div class="model addModel">
30
+        <div class="box">
31
+            <div class="boxCon">
32
+                <table>
33
+                    <tbody>
34
+                        <tr>
35
+                            <th>承办单位:</th>
36
+                            <td>
37
+                                <div class="inpBox">
38
+                                    <input type="text" class="inps inps2" />
39
+                                    <input type="hidden" class="add_did" />
40
+                                    <i class="xl xl_two"></i>
41
+                                    <div class="addTree xlAdd_two">
42
+                                        <ul id="xlAdd_depTree" class="ztree"></ul>
43
+                                    </div>
44
+                                </div>
45
+                            </td>
46
+                        </tr>
47
+                        <tr>
48
+                            <th>时限:</th>
49
+                            <td><input type="text" class="add_birth laydate-icon" id="ygbirth" /></td>
50
+                        </tr>
51
+                        <!--<tr>
52
+			                <th>提交时间:</th>
53
+			                <td><input type="text" class="add_birth " id="submitusertime" /></td>
54
+			            </tr>
55
+			            <tr>
56
+			                <th>添加人:</th>
57
+			                <td><input type="text" class="add_birth " id="createusername" /></td>
58
+			            </tr>
59
+			            <tr>
60
+			                <th>提交人:</th>
61
+			                <td><input type="text" class="add_birth " id="submitusername" /></td>
62
+			            </tr>-->
63
+                        <tr>
64
+                        	<th>紧急程度:</th>
65
+	                        <td>
66
+	                            <select class="select_" id="dealtype">
67
+	                                <option value="">请选择</option>
68
+	                                <option value="0">普通</option>
69
+	                                <option value="1">紧急</option>
70
+	                            </select>
71
+	                        </td>
72
+                        </tr>
73
+                        <tr>
74
+                            <th>文本描述:</th>
75
+                            <td colspan="3">
76
+                                <textarea class="add_remark" style="width: 100%;height: 50px;"></textarea>
77
+                            </td>
78
+                        </tr>
79
+                        <tr>
80
+                        <th>附件:</th>
81
+                        <td>
82
+                        	<div class="FJ file_imgs">
83
+											
84
+							</div>
85
+                        </td>
86
+                    	</tr>
87
+						<tr>
88
+                        <th>附件上传:</th>
89
+                        <td colspan="7">
90
+                            <div class="fileBox"></div>
91
+                            <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
92
+                            <input class="input" type="button" value="上传" id="scwj" />
93
+                            <input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />
94
+                            <input type="hidden" id="file" />
95
+                            <span style="color:#FF0000; border: none;">
96
+                            	(文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
97
+                            </span>
98
+                        </td>
99
+                    	</tr>
100
+                    </tbody>
101
+                </table>
102
+                <div style="text-align: center;"><button class="btns addCun">保存</button></div>
103
+            </div>
104
+        </div>
105
+
106
+    </div>
107
+    <script type="text/javascript">
108
+    	$(function(){
109
+    		var wid = helper.request.queryString("wid");
110
+    		load(wid);
111
+    		var token = $.cookie("token");
112
+			var keyWord ; //关键字
113
+			var tree; //部门树
114
+			 bindtree();
115
+			 //上传附件
116
+            $("#scwj").click(function () {
117
+                $("#upFile").trigger("click");
118
+            })
119
+            $("#upFile").change(function () {
120
+                upload();
121
+            })
122
+    		    //===============修改功能开始=============================
123
+			    laydate.skin('molv');
124
+			    //用户生日
125
+			    laydate({
126
+			        elem: '#ygbirth',
127
+			        event: 'focus',
128
+			        istoday: true,
129
+			        format: 'YYYY-MM-DD hh:mm:ss',
130
+			        // 分隔符可以任意定义,该例子表示只显示年月
131
+			    });
132
+			    //下拉
133
+			    $('.inps').focus(function () {
134
+			        $(this).siblings('.addTree').css('display', 'block');
135
+			    })
136
+			
137
+			    $('.xl').click(function () {
138
+			        var xl = $(this).siblings('.addTree');
139
+			        if (xl.css('display') == 'block') {
140
+			            xl.css('display', 'none')
141
+			        } else {
142
+			            xl.css('display', 'block')
143
+			        }
144
+			    })
145
+			    $('.addTree').mouseleave(function () {
146
+			        $(this).css('display', 'none')
147
+			    })
148
+			    $('.addBtr').click(function () {
149
+			        $('.addModel').css('display', 'none');
150
+			    })
151
+			
152
+			    //保存添加按钮
153
+			    $('.addCun').click(function () {
154
+			    	addCun(wid);
155
+			    })
156
+    	})
157
+    	function bindtree() {
158
+		    $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", { "token": $.cookie("token") }, function (result) {
159
+		        if (result.state.toLowerCase() == "success") {
160
+		            $.fn.zTree.init($("#xlAdd_depTree"), setting2, result.data);
161
+		        }
162
+		    })
163
+		}
164
+    	//获取所属部门
165
+		var setting2 = {
166
+		   data: {
167
+						key: {
168
+							name: "F_DeptName"
169
+						},
170
+						simpleData: {
171
+							enable: true,
172
+							idKey: "F_DeptId",
173
+							pIdKey: "F_PartentId",
174
+							rootPId: 0
175
+						}
176
+					},
177
+		    callback: {
178
+		        onClick: ztreeDep
179
+		    }
180
+		};
181
+		function ztreeDep(event, treeId, treeNode) {
182
+		    if (treeNode.level >= 2) {
183
+		        $('.inps2').val(treeNode.F_DeptName);
184
+		        $('.add_did').val(treeNode.F_DeptId);
185
+		    }
186
+		};
187
+		 //上传文件
188
+        function upload() {
189
+            var Files = document.getElementById("upFile").files;
190
+            if (Files.length > 0) {
191
+                var formData = new FormData();
192
+                for (var i = 0; i < Files.length; i++) {
193
+                    formData.append('file' + i, Files[i]);
194
+                }
195
+                formData.append("token", $.cookie("token"));
196
+                var typeName=Files[0].name.split('.')[1];
197
+                if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
198
+	                $.ajax({
199
+	                    url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
200
+	                    type: "POST",
201
+	                    data: formData,
202
+	                    /**
203
+	                     *必须false才会自动加上正确的Content-Type
204
+	                     */
205
+	                    contentType: false,
206
+	                    /**
207
+	                     * 必须false才会避开jQuery对 formdata 的默认处理
208
+	                     * XMLHttpRequest会对 formdata 进行正确的处理
209
+	                     */
210
+	                    processData: false,
211
+	                    success: function (result) {
212
+	                        document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
213
+	                        $("#upFile").change(function () {
214
+	                            upload();
215
+	                        });
216
+	                        var r = $.parseJSON(result);
217
+	                        if (r.state.toLowerCase() == "success") {
218
+	
219
+	                            var a = r.data;
220
+	                            $(a).each(function (i, n) {
221
+                            		var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
222
+	                                $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
223
+	                                    event.stopPropagation();
224
+	                                    $(this).parent().remove();
225
+	                                    file_num()
226
+	                                })
227
+	                            })
228
+	                            file_num();
229
+	                        }
230
+	                    }
231
+	                });
232
+	            }else{
233
+		    		layer.msg("格式不正确");
234
+		    	}
235
+            
236
+            } else {
237
+                layer.confirm('请上传文件!', {
238
+                    btn: ['确定']
239
+                });
240
+            }
241
+        }
242
+        //上传文件隐藏域值
243
+        function file_num() {
244
+            var str = '';
245
+            var Str;
246
+            $('.fileBox .files').each(function (j, m) {
247
+                var aa = $(m).attr("fiel-num")
248
+                console.log(aa);
249
+                str += aa + ",";
250
+                Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
251
+            })
252
+            $("#file").val(Str);
253
+        }
254
+        //保存所调方法
255
+		function addCun(wid) {
256
+			if($(".add_did").val()==''){
257
+				layer.msg('请选择部门')
258
+				return;
259
+			}
260
+			if($('.add_remark').val()==''){
261
+				layer.msg('请填写文本描述');
262
+				return;
263
+			}
264
+			if($('#ygbirth').val()==''){
265
+				layer.msg('请选择时限');
266
+				return;
267
+			}
268
+			var level=$("#dealtype").val()
269
+			if(level==''){
270
+				level='0'
271
+			}
272
+		    $.post(huayi.config.callcenter_url + "Repository/AddDemands", {
273
+		        token: $.cookie("token"),
274
+		        deptid: $(".add_did").val(),//部门id
275
+		        des:$('.add_remark').val(),//文本描述
276
+		        limittime: $('#ygbirth').val(),//时限
277
+		        file:$("#file").val(), //(多个用英文逗号,隔开)附件id
278
+		        level:level,//紧急程度
279
+		        demandsid:wid//记录id
280
+		    }, function (data) {
281
+		        data = JSON.parse(data);
282
+		        if (data.state.toLowerCase() == "success") {
283
+		            layer.msg("添加成功!");
284
+		            var index=parent.layer.getFrameIndex(window.name);
285
+		            window.parent.location.reload(); //刷新父页面
286
+		            parent.layer.close(index);
287
+		        }else{
288
+		        	layer.msg(data.msg);
289
+		        }
290
+		    });
291
+		}
292
+		function load(wid) {
293
+           $.get(huayi.config.callcenter_url + "Repository/GetModel_Demands", {
294
+		        token: $.cookie("token"),
295
+		        demandsid:wid,
296
+		    }, function (data) {
297
+		        data = JSON.parse(data);
298
+		        if (data.state.toLowerCase() == "success") {
299
+		             $('.inps2').val(data.data.deptname);
300
+		             $('#ygbirth').val(data.data.model.F_LimitTime);
301
+		             $('#submitusername').val(data.data.submitusername);
302
+		             $('#submitusertime').val(data.data.model.F_CreateTime);
303
+		             $('#createusername').val(data.data.createusername);
304
+		             $('.add_remark').val(data.data.model.F_Descript);
305
+		             $('.add_did').val(data.data.model.F_Deptid);
306
+		             $('.file').val(data.data.model.F_File);
307
+		             $('#dealtype').find("option[value='"+data.data.model.F_Level+"']").attr('selected',true);
308
+		        }
309
+		        //附件
310
+				var HTML;
311
+				$(data.data.file).each(function(i, v) {
312
+//								HTML = '<a style="margin-right:5px;" href="' + n.F_FileUrl + '" download="' + n.F_FileName.substring(19)+ '">' + n.F_FileName.substring(19) + '</a>'
313
+//								$(HTML).appendTo($('.FJ'));
314
+					var $list = $(".FJ");
315
+					if(v.F_FileUrl) {
316
+						//原来的图片
317
+						var $li = $(
318
+							'<li><span class="img_mask" ><a href="' + v.F_FileUrl + '" download="filename" title="点击下载"><i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i></a></span>' +
319
+							'<img layer-src="' + v.F_FileUrl + '" alt="'+ v.F_FileName.split(')')[1] +'" src="' + v.F_FileUrl + '" title="图片"/>' +
320
+//										'<span class="file_name">' + v.F_FileName + '</span>' +
321
+							'</li>'
322
+						);
323
+						$list.append($li);
324
+					} else {
325
+						var $liFile = $(
326
+							'<li><span class="img_mask"><a href="' + v.F_FileUrl + '" download="filename" title="点击下载"><i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i></a></span>' +
327
+							'<div class="noThumb" title="文件"><i class="glyphicon glyphicon-paperclip"></i><p>无法预览</p></div>' +
328
+//										'<span class="file_name">' + v.F_FileName + '</span>' +
329
+							'</li>'
330
+						);
331
+						$list.append($liFile);
332
+					}
333
+				})
334
+				layer.photos({
335
+				  	photos: '.FJ',
336
+				  	anim: 5, //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
337
+					title: '查看图片',
338
+					move: '.layui-layer-title',
339
+					shadeClose: false,
340
+					closeBtn: 1,
341
+					area: ['80%', '90%'],
342
+					tab: function(pic, layero) {
343
+						$('.layui-layer-content').on("mousewheel", function(e, d) {
344
+							
345
+							helper.methods.zoomImg($('#layui-layer-photos').find('img[alt="' + pic.alt + '"]'), d);
346
+							$('#layui-layer-photos').find('img[alt="' + pic.alt + '"]').dragging({
347
+								move: "both", //拖动方向,x y both
348
+								randomPosition: false //初始位置是否随机
349
+							});
350
+							return false;
351
+							
352
+						});
353
+						helper.methods.initLayerPhotos('#layui-layer-photos', pic, layero);
354
+					},
355
+				});
356
+		    });
357
+        }
358
+    	//状态
359
+        function States(val) {
360
+            var html = '';
361
+            switch (val + '') {
362
+                case '0':
363
+                    html = '普通';
364
+                    break;
365
+                case '1':
366
+                    html = '紧急';
367
+                    break;
368
+            }
369
+            return html;
370
+        }
371
+    </script>
372
+    <script src="../js/jquery.md5.js"></script>
373
+    <script src="../css/laydate/laydate.js"></script>
374
+    <script src="../css/layer/layer.js"></script>
375
+    <script src="../js/zTree/jquery.ztree.core.js"></script>
376
+    <script src="../js/comboSelect/jquery.combo.select.js"></script>
377
+	</body>
378
+</html>

+ 666 - 0
WebUI/CallCenterWeb.UI/zhiShiKu/askRecords.html

@@ -0,0 +1,666 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+<head>
5
+    <meta charset="UTF-8">
6
+    <title>索要记录</title>
7
+    <script src="../Script/Common/huayi.load.js"></script>
8
+    <link rel="stylesheet" href="../css/bootstrap-select.css">
9
+    <script src="../Script/Common/huayi.config.js"></script>
10
+    <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
11
+    <link rel="stylesheet" href="../css/init.css" />
12
+    <style>
13
+        #sqzx th {
14
+            padding: 5px 8px 5px 0;
15
+            text-align: right;
16
+            width: 50px;
17
+        }
18
+        .select {
19
+            width: 150px;
20
+            background-color: #FFF;
21
+            background-image: none;
22
+            border: 1px solid #ccc;
23
+            border-radius: 1px;
24
+            color: inherit;
25
+            padding: 6px 12px;
26
+        }
27
+        #sex {
28
+            background-color: #FFF;
29
+            background-image: none;
30
+            border: 1px solid #ccc;
31
+            border-radius: 1px;
32
+            color: inherit;
33
+            padding: 6px 12px;
34
+        }
35
+
36
+        input {
37
+            background-color: #FFF;
38
+            background-image: none;
39
+            border: 1px solid #ccc;
40
+            border-radius: 1px;
41
+            color: inherit;
42
+            padding: 6px 12px;
43
+        }
44
+
45
+        #sqzx td {
46
+            padding: 6px 0 5px 10px;
47
+            width: 150px;
48
+        }
49
+
50
+        .lxr ul li {
51
+            float: left;
52
+            list-style: none;
53
+            width: 30%;
54
+            margin-bottom: 5px;
55
+            padding-top: 10px;
56
+        }
57
+
58
+        .clearFix:after {
59
+            content: "";
60
+            display: block;
61
+            clear: both;
62
+        }
63
+
64
+        .form-group {
65
+            padding-left: 40px;
66
+            margin-bottom: 0;
67
+        }
68
+
69
+        textarea {
70
+            height: 70px;
71
+            border: 1px solid #ccc;
72
+            border-radius: 1px;
73
+            width: 50%;
74
+            resize: none;
75
+        }
76
+
77
+        .textarea_box {
78
+            margin-top: 10px;
79
+        }
80
+
81
+        .box_content {
82
+            border-bottom: 1px solid #ccc;
83
+        }
84
+
85
+        .tj_content {
86
+            border: 1px solid #e6e6e6;
87
+            border-radius: 5px;
88
+        }
89
+
90
+        .t-shade {
91
+            position: fixed;
92
+            top: 0;
93
+            left: 0;
94
+            width: 100%;
95
+            background: rgba(0, 0, 0, 0.48);
96
+            z-index: 10004;
97
+            display: none;
98
+        }
99
+
100
+        .lyxz .shade_k {
101
+            z-index: 10005;
102
+            width: 40%;
103
+            left: 30%;
104
+            position: absolute;
105
+            background-color: rgb(255, 255, 255);
106
+            box-shadow: rgba(0, 0, 0, 0.298039) 1px 1px 50px;
107
+            margin: 20% auto;
108
+            border-radius: 5px;
109
+        }
110
+
111
+        .shade_title {
112
+            padding: 0 80px 0 20px;
113
+            height: 42px;
114
+            line-height: 42px;
115
+            border-bottom: 1px solid #eee;
116
+            font-size: 16px;
117
+            color: #FFFFFF;
118
+            overflow: hidden;
119
+            background-color: #00a1cb;
120
+            border-radius: 2px 2px 0 0;
121
+            position: relative;
122
+            border-top-left-radius: 5px;
123
+            border-top-right-radius: 5px;
124
+        }
125
+
126
+        .cx {
127
+            display: block;
128
+        }
129
+
130
+        .setwin {
131
+            position: absolute;
132
+            right: 15px;
133
+            top: 5px;
134
+            font-size: 0;
135
+            line-height: initial;
136
+        }
137
+        .setwin a {
138
+            position: relative;
139
+            width: 16px;
140
+            height: 16px;
141
+            font-size: 20px;
142
+            color: #fff;
143
+        }
144
+
145
+        .xg i {
146
+            font-size: 16px;
147
+        }
148
+
149
+        .hidens {
150
+            display: none;
151
+        }
152
+
153
+        .inpBox {
154
+           border: 1px solid #cccccc;
155
+    		height: 31px;
156
+            width: 220px;
157
+            display: inline-block;
158
+            position: relative;
159
+            vertical-align: middle;
160
+            position: absolute;
161
+            left: 0px;
162
+            top: 8px;
163
+            z-index: 111;
164
+        }
165
+		.selDpart1{
166
+			position: absolute;
167
+            left: 0px;
168
+            top: 30px;
169
+            z-index: 11111;
170
+            width: 220px;
171
+            line-height: 30px;
172
+            background: #FFFFFF;
173
+            display: none;
174
+		}
175
+		#sponsor{
176
+			width: 218px;
177
+			border: 1px solid #00a1cb;
178
+			margin: 0;
179
+			padding: 0;
180
+			list-style: none;
181
+			max-height: 212px;
182
+			overflow-x: hidden;
183
+			overflow-y: scroll;
184
+		}
185
+		#sponsor li{
186
+			margin: 0;
187
+			padding-left: 10px;
188
+			width: 220px;
189
+			height: 30px;
190
+			line-height: 30px;
191
+			list-style: none;
192
+		}
193
+		#sponsor li:hover{
194
+			background: #00a1cb;
195
+		}
196
+        .addTree {
197
+            background: #fff;
198
+            position: absolute;
199
+            width: 100%;
200
+            border: 1px solid darkgrey;
201
+            right: 0;
202
+            top: 29px;
203
+            display: none;
204
+            z-index: 222;
205
+        }
206
+
207
+        .xl {
208
+            display: inline-block;
209
+            background: url(../../img/dropDown.png) no-repeat;
210
+            height: 100%;
211
+            background-position: center center;
212
+            width: 20px;
213
+            position: absolute;
214
+            right: 0;
215
+            top: 0px;
216
+            /* background-color: #f7bc8b; */
217
+            cursor: pointer;
218
+        }
219
+
220
+        .ztree li span {
221
+            border: none;
222
+            padding: 0;
223
+        }
224
+
225
+        .inps {
226
+            width: 217px;
227
+            height: 29px;
228
+            outline: none;
229
+            border: 0;
230
+            border-image-width: 0;
231
+            padding: 0;
232
+            padding-left: 3px;
233
+        }
234
+
235
+        .xl {
236
+            display: inline-block;
237
+            background: url(../img/dropDown.png) no-repeat;
238
+            height: 100%;
239
+            background-position: center center;
240
+            width: 20px;
241
+            position: absolute;
242
+            right: 0;
243
+            top: 0px;
244
+            /* background-color: #f7bc8b; */
245
+            cursor: pointer;
246
+        }
247
+
248
+        .Cleans {
249
+            display: inline-block;
250
+            width: 20px;
251
+            position: absolute;
252
+            right: 21px;
253
+            top: 8px;
254
+            display: none;
255
+        }
256
+
257
+        .Min-width {
258
+            width: 150px;
259
+        }
260
+        .btn-default{
261
+        	background: #FFFFFF;
262
+        	color: #000000;
263
+        }
264
+        .tool_downs{
265
+        	display: flex;
266
+        	justify-content: space-around;
267
+        }
268
+        .tool_downs li{
269
+        	list-style: none;
270
+        	float: left;
271
+        }
272
+    </style>
273
+</head>
274
+
275
+<body class="gray-bg">
276
+    <div class="wrapper wrapper-content animated fadeInRight">
277
+        <div class="daoHang clearfix">
278
+            <div class="dhLeft">
279
+                <sapn>
280
+                    <i class="syIcon"></i>位置:
281
+                    <a href="javaScript:;" id="ReIndex">首页</a>&gt;
282
+                    <a href="javaScript:;">知识库</a>&gt;
283
+                    <a class="nowPosition">新版知识库索要记录</a>
284
+                </sapn>
285
+            </div>
286
+            <div class="dhRight">
287
+                <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
288
+            </div>
289
+        </div>
290
+        <div style="padding: 10px;" class="tj_content clearFix">
291
+            <div style="padding: 10px;" class="tj_content clearFix">
292
+                <div>
293
+                    <div class="box_content">
294
+                        <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
295
+                            <tr>
296
+                                <th>关键字:</th>
297
+                                <td>
298
+                                    <input type="text" placeholder="输入关键字" id="key" class="Min-width" />
299
+                                </td>
300
+                                <th>时间:</th>
301
+                                <td >
302
+                                    <input type="text" id="starttime" class="" placeholder="请选择时间" style="height: 32px;" />
303
+                                </td>
304
+                                <th>紧急程度:</th>
305
+                                <td>
306
+                                    <select class="select_" id="dealtype">
307
+                                        <option value="">请选择</option>
308
+                                        <option value="0">普通</option>
309
+                                        <option value="1">紧急</option>
310
+                                    </select>
311
+                                </td>
312
+                                <th>承办单位:</th>
313
+                                <td style="position: relative;">
314
+                                    <div class="inpBox">
315
+                                        <input type="text" class="inps" onkeyup="darptSearch()"/>
316
+                                        <i class="Cleans  fa fa-close"></i>
317
+                                        <i class="xl xl_one"></i>
318
+                                        <div class="addTree xlAdd">
319
+                                            <ul id="addTreeDemo" class="ztree"></ul>
320
+                                        </div>
321
+                                    </div>
322
+                                    <div class="selDpart1">
323
+                                    	<ul id="sponsor">
324
+										</ul>
325
+                                    </div>
326
+                                </td>
327
+                                <td style="padding-left: 30px;">
328
+                                    <botton class="btns Seach">搜索</botton>
329
+                                    <!--<botton class="btns Export">导出</botton>-->
330
+                                    <botton class="btns add_record">添加</botton>
331
+                                    <botton class="btns Remove">删除</botton>
332
+                                </td>
333
+                            </tr>
334
+                        </table>
335
+                    </div>
336
+                </div>
337
+                <div>
338
+                    <div style="width: 100%;padding: 10px;">
339
+                        <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
340
+                            <thead>
341
+                                <tr>
342
+                                	<th data-checkbox="true"></th>
343
+                                    <th data-field="F_Descript" data-formatter="GetCont" data-align="center">文本描述</th>
344
+                                    <th data-field="F_Level" data-align="center" data-formatter="States">级别</th>
345
+                                    <th data-field="F_DeptName" data-align="center">承办单位</th>
346
+                                    <th data-field="F_CreateUserName" data-align="center">添加人</th>
347
+                                    <th data-field="F_SubmitUserName" data-align="center">提交人</th>
348
+                                    <th data-field="F_SubmitTime" data-align="center">提交时间</th>
349
+                                    <th data-field="F_LimitTime"  data-align="center">时限</th>
350
+                                    <th data-field="F_CreateTime"  data-align="center">添加时间</th>
351
+                                    <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center">操作</th>
352
+                                </tr>
353
+                            </thead>
354
+                            <tbody class="list"></tbody>
355
+                        </table>
356
+                    </div>
357
+                </div>
358
+            </div>
359
+        </div>
360
+        <input type="hidden" id="PID" />
361
+        <input type="hidden" id="Dpment" />
362
+    </div>
363
+    <script src="../js/bootstrap-select.js"></script>
364
+    <script src="../js/laydate/laydate.js"></script>
365
+    <script src="../My97DatePicker/WdatePicker.js"></script>
366
+    <script src="../js/zTree/jquery.ztree.core.js"></script>
367
+    <script src="../js/search/screen.js"></script>
368
+    <script>
369
+        $(document).ready(function () {
370
+        	load();
371
+            var wid = helper.request.queryString("wid");
372
+            if (wid) {
373
+                $('#tel').val(wid);
374
+                load();
375
+            }
376
+            laydate.render({
377
+			    elem: '#starttime' //指定元素
378
+			    ,range:'~'
379
+			});
380
+            load();
381
+        });
382
+        $("#orderlist").on("click-row.bs.table", function (e, row, ele) {
383
+            $('.success').removeClass('success'); //去除之前选中的行的,选中样式
384
+            $(ele).addClass('success'); //添加当前选中的 success样式用于区别
385
+        });
386
+        //获取查询信息
387
+        function load() {
388
+            //先销毁表格
389
+            $('#orderlist').bootstrapTable('destroy');
390
+            //初始化表格,动态从服务器加载数据
391
+            $("#orderlist").bootstrapTable({
392
+                method: "get", //使用get请求到服务器获取数据
393
+                url: huayi.config.callcenter_url + "Repository/GetListDemands", //获取数据的Servlet地址
394
+                contentType: "application/x-www-form-urlencoded",
395
+                striped: true, //表格显示条纹
396
+                pagination: true, //启动分页
397
+                pageSize: 10, //每页显示的记录数
398
+                pageNumber: 1, //当前第几页
399
+                pageList: [10, 20, 50, 100], //记录数可选列表
400
+                search: false, //是否启用查询
401
+                showColumns: false, //显示下拉框勾选要显示的列
402
+                showRefresh: false, //显示刷新按钮
403
+                sidePagination: "server", //表示服务端请求
404
+                //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
405
+                //设置为limit可以获取limit, offset, search, sort, order
406
+                queryParamsType: "undefined",
407
+                queryParams: function queryParams(params) { //设置查询参数
408
+                	 //alert(params.pageNumber)
409
+                    var param = {
410
+                        page: params.pageNumber,
411
+                        pagesize: params.pageSize,
412
+                        stime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[0], //=开始时间
413
+                        etime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[1], //=结束时间
414
+                        deptid: $("#PID").val(),//承办单位id
415
+                        level: $("#dealtype").val(),//级别
416
+                        token: $.cookie("token")
417
+                    };
418
+                    return param;
419
+                },
420
+                onLoadSuccess: function (data) { //加载成功时执行
421
+                    //						layer.msg("加载成功");
422
+                    //console.log(data);
423
+                   
424
+                },
425
+                onLoadError: function () { //加载失败时执行
426
+                    //layer.msg("加载数据失败", { time: 1500, icon: 2 });
427
+                }
428
+            });
429
+        }
430
+        
431
+        //状态
432
+        function States(val, row) {
433
+            var html = '';
434
+            switch (val + '') {
435
+                case '0':
436
+                    html = '普通';
437
+                    break;
438
+                case '1':
439
+                    html = '紧急';
440
+                    break;
441
+            }
442
+            return html;
443
+        }
444
+        function GetCont(val) {
445
+            if (val) {
446
+                var str = '<div '
447
+                if (val.length > 10) {
448
+                    str = str + ' title="' + val + '" ';
449
+                    val = val.substr(0, 10) + "...";
450
+                }
451
+                return str + '>' + val + '</div>';
452
+            } else {
453
+                return '';
454
+            }
455
+        }
456
+        //格式化操作
457
+		function Dispose(val, row) {
458
+			return '<ul class="tool_downs">' +
459
+				'<li><a href="javascript:;" class="aBtn" authorize="yes"  id="HY_details_' + row.F_DemandsId + '" onclick="btn_details(\'' + row.F_DemandsId + '\')" title="详情">详情</a></li>' +
460
+				'<li><a href="javascript:;" class="aBtn" style="margin-left:20px;" authorize="yes"  id="HY_details_' + row.F_DemandsId + '" onclick="btn_edit(\'' + row.F_DemandsId + '\')" title="编辑">编辑</a></li>' +
461
+				'<li><a href="javascript:;" class="aBtn hide_btn" style="margin-left:20px;" authorize="yes" id="HY_delete_' + row.F_DemandsId + '" onclick="btn_delete(' + row.F_DemandsId + ')" title="删除">删除</a></li>' +
462
+				'</ul>';
463
+		}
464
+
465
+        //查看详情
466
+        function btn_details(str) {
467
+            layer.open({
468
+                type: 2,
469
+                content: "../CommonHtml/recordDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
470
+                title: '记录详情',
471
+                area: ['60%', '80%'], //宽高
472
+            });
473
+        }
474
+        //编辑
475
+        function btn_edit(str) {
476
+            layer.open({
477
+                type: 2,
478
+                content: ["../CommonHtml/recordEdit.html?wid=" + str,'no'], //iframe的url,no代表不显示滚动条
479
+                title: '编辑记录',
480
+                area: ['60%', '90%'], //宽高
481
+            });
482
+        }
483
+        //删除
484
+        function btn_delete(str) {
485
+            layer.confirm('确定删除记录?', {
486
+                btn: ['是', '否'] //按钮
487
+            }, function () {
488
+                $.post(huayi.config.callcenter_url + "Repository/DelDemands", {
489
+                    ids: str,
490
+                    token: $.cookie("token")
491
+                }, function (result) {
492
+                    result = JSON.parse(result);
493
+                    if (result.state.toLowerCase() == "success") {
494
+                        layer.msg("删除成功");
495
+                        $("#orderlist").bootstrapTable('refresh');
496
+                    }
497
+                })
498
+            });
499
+        }
500
+    	//添加记录
501
+    	$('.add_record').on('click',function(){
502
+    		layer.open({
503
+                type: 2,
504
+                content: "../CommonHtml/addRecord.html" , //iframe的url,no代表不显示滚动条
505
+                title: '添加记录',
506
+                area: ['60%', '80%'], //宽高
507
+            });
508
+    	})
509
+        //上传文件
510
+        function upload() {
511
+            if (document.getElementById("upFile").files.length > 0) {
512
+                var formData = new FormData();
513
+                formData.append("upFile", document.getElementById("upFile").files[0]);
514
+                formData.append("token", $.cookie("token"));
515
+                $.ajax({
516
+                    url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
517
+                    type: "POST",
518
+                    data: formData,
519
+                    /**
520
+                     *必须false才会自动加上正确的Content-Type
521
+                     */
522
+                    contentType: false,
523
+                    /**
524
+                     * 必须false才会避开jQuery对 formdata 的默认处理
525
+                     * XMLHttpRequest会对 formdata 进行正确的处理
526
+                     */
527
+                    processData: false,
528
+                    success: function (result) {
529
+                        document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
530
+                        $("#upFile").change(function () {
531
+                            upload();
532
+                        });
533
+                        var r = $.parseJSON(result);
534
+                        if (r.state.toLowerCase() == "success") {
535
+                            $(".fjnr").text(r.data);
536
+                            $("#scfj").show();
537
+                        }
538
+                    }
539
+                });
540
+            } else {
541
+                layer.confirm('请上传文件!', {
542
+                    btn: ['确定']
543
+                });
544
+            }
545
+        }
546
+        //批量删除Remove
547
+			$(".Remove").click(function() {
548
+				var ids = $.map($('#orderlist').bootstrapTable('getSelections'),
549
+					function(row) {
550
+						return row.F_DemandsId;
551
+					});
552
+				/*判断长度*/
553
+				if(ids.length <= 0) {
554
+					layer.confirm('没有可删除的选项!', {
555
+						btn: ['确定'] //按钮
556
+					});
557
+					return;
558
+				}
559
+				layer.confirm('确定要删除吗?',{
560
+					btn:['确定','取消']
561
+				},function(){
562
+					$.post(huayi.config.callcenter_url + "Repository/DelDemands", {
563
+						ids: ids,
564
+						token: $.cookie("token")
565
+					}, function(result) {
566
+						result = JSON.parse(result);
567
+						if(result.state.toLowerCase() == "success") {
568
+							layer.msg("删除成功");
569
+							$("#orderlist").bootstrapTable('refresh');
570
+						}
571
+					})
572
+				})
573
+				
574
+			});
575
+        //来源
576
+        function LY(obj) {
577
+            obj.empty();
578
+            obj.append('<option selected="selected" value="">请选择</option>');
579
+            $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
580
+                "token": $.cookie("token"),
581
+                id: 1
582
+            }, function (data) {
583
+                if (data.state.toLowerCase() == "success") {
584
+                    var content = data.data;
585
+                    $(content).each(function (i, n) {
586
+                        $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
587
+                    })
588
+                }
589
+            })
590
+        }
591
+        //类别
592
+        function LB(obj) {
593
+            obj.empty();
594
+            obj.append('<option selected="selected" value="">请选择</option>');
595
+            $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
596
+                "token": $.cookie("token"),
597
+                id: 2
598
+            }, function (data) {
599
+                if (data.state.toLowerCase() == "success") {
600
+                    var content = data.data;
601
+                    $(content).each(function (i, n) {
602
+                        $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
603
+                    })
604
+                }
605
+            })
606
+        }
607
+        //		主题
608
+        function ZT(obj) {
609
+            obj.empty();
610
+            obj.append('<option selected="selected" value="">请选择</option>');
611
+            $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
612
+                "token": $.cookie("token"),
613
+                id: 3
614
+            }, function (data) {
615
+                if (data.state.toLowerCase() == "success") {
616
+                    var content = data.data;
617
+                    $(content).each(function (i, n) {
618
+                        $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
619
+                    })
620
+                }
621
+            })
622
+        }
623
+        
624
+        function tree() {
625
+            $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
626
+                "token": $.cookie("token"),
627
+                //		"pid": pid
628
+            }, function (result) {
629
+                result = $.parseJSON(result);
630
+                $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
631
+            });
632
+        }
633
+        var setting1 = {
634
+            data: {
635
+                key: {
636
+                    name: "F_DeptName"
637
+                },
638
+                simpleData: {
639
+                    enable: true,
640
+                    idKey: "F_DeptId",
641
+                    pIdKey: "F_PartentId",
642
+                    rootPId: 0
643
+                }
644
+            },
645
+            callback: {
646
+                onClick: zTreeOnClick
647
+            }
648
+        };
649
+        function zTreeOnClick(event, treeId, treeNode) {
650
+            if (treeNode.level >= 2) {
651
+                $('.inps').val(treeNode.F_DeptName);
652
+                $("#PID").val(treeNode.F_DeptId);
653
+                $("#Dpment").val(treeNode.F_DeptId);
654
+                $(".Cleans").show();
655
+            }
656
+        };
657
+        function Close() {
658
+            $(".lyxz").removeClass("cx");
659
+            if ($('audio').length > 0) {
660
+                $('audio')[0].pause();
661
+            }
662
+        }
663
+    </script>
664
+</body>
665
+
666
+</html>

+ 2 - 2
WebUI/CallCenterWeb.UI/zhiShiKu/newRepositoryDetail.html

@@ -149,7 +149,7 @@
149 149
 					</tr>
150 150
 					<tr>
151 151
 						<td width="100"> 标准话术</td>
152
-						<td colspan="3"> <textarea name="" rows="" cols="" id="baseanswer" readonly="readonly"></textarea></td>
152
+						<td colspan="3" > <textarea name="" rows="" cols="" id="baseanswer"  readonly="readonly"></textarea></td>
153 153
 					</tr>
154 154
 					<tr>
155 155
 						<td width="100" height="100"> 结案参考</td>
@@ -334,7 +334,7 @@
334 334
 						},
335 335
 						success: function(data) {
336 336
 							if(data.state.toLowerCase() == 'success') {
337
-								debugger
337
+//								debugger
338 338
 								
339 339
 							}
340 340
 						}