Ver Código Fonte

部门短信提醒功能

liuzhen 5 anos atrás
pai
commit
3a3a111b5c

+ 61 - 45
WebUI/CallCenterWeb.UI/CommonHtml/Supervision_.html

8
 		<link href="../css/layer/need/layer.css" />
8
 		<link href="../css/layer/need/layer.css" />
9
 		<link rel="stylesheet" href="../css/init.css" />
9
 		<link rel="stylesheet" href="../css/init.css" />
10
 		<title>监察</title>
10
 		<title>监察</title>
11
-			<style>
11
+		<style>
12
 			.input {
12
 			.input {
13
 				background-color: #FFF;
13
 				background-color: #FFF;
14
 				background-image: none;
14
 				background-image: none;
22
 				padding: 0!important;
22
 				padding: 0!important;
23
 				border: none!important;
23
 				border: none!important;
24
 			}
24
 			}
25
-			#message{
25
+			
26
+			#message {
26
 				display: none;
27
 				display: none;
27
 			}
28
 			}
28
 		</style>
29
 		</style>
40
 					<td colspan="7">
41
 					<td colspan="7">
41
 						<!--<span class="fjnr"></span>-->
42
 						<!--<span class="fjnr"></span>-->
42
 						<div class="fileBox">
43
 						<div class="fileBox">
43
-									<!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
44
+							<!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
44
 						</div>
45
 						</div>
45
 						<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
46
 						<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
46
 						<input class="input" type="button" value="上传" id="scwj" />
47
 						<input class="input" type="button" value="上传" id="scwj" />
53
 				</tr>
54
 				</tr>
54
 			</table>
55
 			</table>
55
 			<div id="message" style="margin: 20px 0 0 130px;text-align: left;">
56
 			<div id="message" style="margin: 20px 0 0 130px;text-align: left;">
56
-	        	是否发送短信
57
-	        	<input type="radio" name="message" id="" value="0" checked/>否
58
-	        	<input type="radio" name="message" id="" value="1" />是
59
-	        </div>
57
+				是否发送短信
58
+				<input type="radio" name="message" id="" value="0" />否
59
+				<input type="radio" name="message" id="" value="1" />是
60
+			</div>
60
 			<div class="btn_box">
61
 			<div class="btn_box">
61
 				<button class="btns DB">保存</button>
62
 				<button class="btns DB">保存</button>
62
 				<button class="btns JC">保存</button>
63
 				<button class="btns JC">保存</button>
69
 			var state = helper.request.queryString("state");
70
 			var state = helper.request.queryString("state");
70
 			var depId = helper.request.queryString("depId");
71
 			var depId = helper.request.queryString("depId");
71
 			$(document).ready(function() {
72
 			$(document).ready(function() {
73
+				if(wid) {
74
+					$.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
75
+						workorderid: wid,
76
+						"token": $.cookie("token")
77
+					}, function(result) {
78
+						if(result.state.toLowerCase() == "success") {
79
+							var content = result.data;
80
+							if(content.data[0].F_DeptIdIsSms == 1) {
81
+								$('#message input[value="1"]').attr('checked', true)
82
+							} else {
83
+								$('#message input[value="0"]').attr('checked', true)
84
+							}
85
+						}
86
+					})
87
+				}
72
 				if(type == 1) {
88
 				if(type == 1) {
73
-					if (state==1) {
89
+					if(state == 1) {
74
 						$(".title").text("督办意见");
90
 						$(".title").text("督办意见");
75
 						$(".JC").hide();
91
 						$(".JC").hide();
76
 						$('#message').show();
92
 						$('#message').show();
77
-					}else{
93
+					} else {
78
 						$(".title").text("不督办意见");
94
 						$(".title").text("不督办意见");
79
 						$(".JC").hide();
95
 						$(".JC").hide();
80
 						$('#message').hide()
96
 						$('#message').hide()
81
 					}
97
 					}
82
-					
98
+
83
 				} else {
99
 				} else {
84
 					$(".title").text("监察意见")
100
 					$(".title").text("监察意见")
85
 					$(".DB").hide();
101
 					$(".DB").hide();
90
 					} else {
106
 					} else {
91
 						type = 1;
107
 						type = 1;
92
 						JA();
108
 						JA();
93
-						if($('#message input[type="radio"]:checked').val()==1){
109
+						if($('#message input[type="radio"]:checked').val() == 1) {
94
 							sendMessage();
110
 							sendMessage();
95
 						}
111
 						}
96
 					}
112
 					}
110
 				$("#upFile").change(function() {
126
 				$("#upFile").change(function() {
111
 					upload();
127
 					upload();
112
 				})
128
 				})
113
-//				$("#scfj").click(function() {
114
-//					$(".fjnr").text("");
115
-//					$("#scfj").hide();
116
-//				})
129
+				//				$("#scfj").click(function() {
130
+				//					$(".fjnr").text("");
131
+				//					$("#scfj").hide();
132
+				//				})
117
 			})
133
 			})
118
 			//发送短信
134
 			//发送短信
119
-			function sendMessage(){
120
-				$.post(huayi.config.callcenter_url + 'WorkOrder/SendSms',{
121
-					workordercode:wid,
122
-					deptid:depId, //主办单位
123
-					type:1,
135
+			function sendMessage() {
136
+				$.post(huayi.config.callcenter_url + 'WorkOrder/SendSms', {
137
+					workordercode: wid,
138
+					deptid: depId, //主办单位
139
+					type: 1,
124
 					token: $.cookie("token")
140
 					token: $.cookie("token")
125
-				},function(result){
126
-					result=JSON.parse(result);
127
-					if(result.state.toLowerCase()=='success'){
141
+				}, function(result) {
142
+					result = JSON.parse(result);
143
+					if(result.state.toLowerCase() == 'success') {
128
 						layer.msg('发送短信成功')
144
 						layer.msg('发送短信成功')
129
 					}
145
 					}
130
 				})
146
 				})
135
 					workorderid: wid,
151
 					workorderid: wid,
136
 					overseeopinion: $("#overseeopinion").val(),
152
 					overseeopinion: $("#overseeopinion").val(),
137
 					type: type,
153
 					type: type,
138
-					state:state,
139
-					files:$("#file").val(),
154
+					state: state,
155
+					files: $("#file").val(),
140
 					"token": $.cookie("token")
156
 					"token": $.cookie("token")
141
 				}, function(result) {
157
 				}, function(result) {
142
 					result = JSON.parse(result);
158
 					result = JSON.parse(result);
146
 						parent.layer.close(index); //再执行关闭
162
 						parent.layer.close(index); //再执行关闭
147
 						parent.$('#orderlist').bootstrapTable('refresh');
163
 						parent.$('#orderlist').bootstrapTable('refresh');
148
 						parent.layer.msg("操作成功");
164
 						parent.layer.msg("操作成功");
149
-							$('.fileBox').html('');
165
+						$('.fileBox').html('');
150
 					}
166
 					}
151
 				})
167
 				})
152
 			}
168
 			}
159
 						formData.append('file' + i, Files[i]);
175
 						formData.append('file' + i, Files[i]);
160
 					}
176
 					}
161
 					formData.append("token", $.cookie("token"));
177
 					formData.append("token", $.cookie("token"));
162
-					var typeName=Files[0].name.split('.')[1];
163
-                	if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
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') {
164
 						$.ajax({
180
 						$.ajax({
165
 							url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
181
 							url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
166
 							type: "POST",
182
 							type: "POST",
183
 								if(r.state.toLowerCase() == "success") {
199
 								if(r.state.toLowerCase() == "success") {
184
 									$(".fjnr").text(r.data[0].F_FileName);
200
 									$(".fjnr").text(r.data[0].F_FileName);
185
 									var a = r.data;
201
 									var a = r.data;
186
-	//								var str = '';
187
-	//								var Str;
188
-	
202
+									//								var str = '';
203
+									//								var Str;
204
+
189
 									$(a).each(function(i, n) {
205
 									$(a).each(function(i, n) {
190
-										var strs='<span class="files" fiel-num="'+ n.F_FileId +'">'+ n.F_FileName.substring(19) +'<i class="fa fa-remove del_file"></i></span>'
191
-									$(strs).appendTo($('.fileBox')).find('.del_file').click(function(event){
192
-										event.stopPropagation();
193
-										$(this).parent().remove();
206
+										var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
207
+										$(strs).appendTo($('.fileBox')).find('.del_file').click(function(event) {
208
+											event.stopPropagation();
209
+											$(this).parent().remove();
194
 											file_num();
210
 											file_num();
195
-									})
211
+										})
196
 									})
212
 									})
197
 									file_num();
213
 									file_num();
198
 								}
214
 								}
199
 							}
215
 							}
200
 						});
216
 						});
201
-					}else{
202
-			    		layer.msg("格式不正确");
203
-			    	}
217
+					} else {
218
+						layer.msg("格式不正确");
219
+					}
204
 				} else {
220
 				} else {
205
 					layer.confirm('请上传文件!', {
221
 					layer.confirm('请上传文件!', {
206
 						btn: ['确定']
222
 						btn: ['确定']
207
 					});
223
 					});
208
 				}
224
 				}
209
 			}
225
 			}
210
-			
211
-				//上传文件隐藏域值
212
-			function file_num(){
226
+
227
+			//上传文件隐藏域值
228
+			function file_num() {
213
 				var str = '';
229
 				var str = '';
214
 				var Str;
230
 				var Str;
215
-				$('.fileBox .files').each(function(j,m){
216
-					var aa=$(m).attr("fiel-num")
231
+				$('.fileBox .files').each(function(j, m) {
232
+					var aa = $(m).attr("fiel-num")
217
 					console.log(aa);
233
 					console.log(aa);
218
 					str += aa + ",";
234
 					str += aa + ",";
219
 					Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
235
 					Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
220
 				})
236
 				})
221
-				$("#file").val(Str);	
237
+				$("#file").val(Str);
222
 			}
238
 			}
223
 		</script>
239
 		</script>
224
 	</body>
240
 	</body>

+ 6 - 2
WebUI/CallCenterWeb.UI/CommonHtml/jiaoban.html

292
         <div id="message" style="margin: 20px 0 0 30px;">
292
         <div id="message" style="margin: 20px 0 0 30px;">
293
         	是否发送短信
293
         	是否发送短信
294
         	<input type="radio" name="message" id="" value="0" />否
294
         	<input type="radio" name="message" id="" value="0" />否
295
-        	<input type="radio" name="message" id="" value="1" checked/>是
295
+        	<input type="radio" name="message" id="" value="1" />是
296
         </div>
296
         </div>
297
 	    <div class="btn_box" style="text-align: center;">
297
 	    <div class="btn_box" style="text-align: center;">
298
 			<button class="btns BC">保存</button>
298
 			<button class="btns BC">保存</button>
339
 	                    $(".mmdj").text(content.data[0].F_SourceAddress);//地址
339
 	                    $(".mmdj").text(content.data[0].F_SourceAddress);//地址
340
 	                    $(".tslx").text(content.data[0].TypeName1);//偶投诉类型
340
 	                    $(".tslx").text(content.data[0].TypeName1);//偶投诉类型
341
 	                    $(".bljg").text(content.data[0].F_Result);
341
 	                    $(".bljg").text(content.data[0].F_Result);
342
-	 
342
+	 					if(content.data[0].F_DeptIdIsSms==1){
343
+	 						$('#message input[value="1"]').attr('checked',true)
344
+	 					}else{
345
+	 						$('#message input[value="0"]').attr('checked',true)
346
+	 					}
343
 	                    //密级程度
347
 	                    //密级程度
344
 						if(content.data[0].F_IsProtect == 0) {
348
 						if(content.data[0].F_IsProtect == 0) {
345
 							$('.MJ').text("普通");
349
 							$('.MJ').text("普通");

+ 16 - 1
WebUI/CallCenterWeb.UI/CommonHtml/reminder.html

31
 			</table>
31
 			</table>
32
 			<div id="message" style="text-align: left;padding: 2% 0 0 19%;">
32
 			<div id="message" style="text-align: left;padding: 2% 0 0 19%;">
33
 	        	是否发送短信
33
 	        	是否发送短信
34
-	        	<input type="radio" name="message" id="" value="0" checked/>否
34
+	        	<input type="radio" name="message" id="" value="0" />否
35
 	        	<input type="radio" name="message" id="" value="1" />是
35
 	        	<input type="radio" name="message" id="" value="1" />是
36
 	        </div>
36
 	        </div>
37
 			<div class="btn_box">
37
 			<div class="btn_box">
45
 			var callid = helper.request.queryString("callid");
45
 			var callid = helper.request.queryString("callid");
46
 			var depId = helper.request.queryString("depId");
46
 			var depId = helper.request.queryString("depId");
47
 			$(document).ready(function() {
47
 			$(document).ready(function() {
48
+				if(wid) {
49
+					$.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
50
+						workorderid: wid,
51
+						"token": $.cookie("token")
52
+					}, function(result) {
53
+						if(result.state.toLowerCase() == "success") {
54
+							var content = result.data;
55
+							if(content.data[0].F_DeptIdIsSms == 1) {
56
+								$('#message input[value="1"]').attr('checked', true)
57
+							} else {
58
+								$('#message input[value="0"]').attr('checked', true)
59
+							}
60
+						}
61
+					})
62
+				}
48
 				$(".reminderBtn").click(function(){
63
 				$(".reminderBtn").click(function(){
49
 					reminderhande();
64
 					reminderhande();
50
 					if($('#message input[type="radio"]:checked').val()==1){
65
 					if($('#message input[type="radio"]:checked').val()==1){

+ 16 - 1
WebUI/CallCenterWeb.UI/CommonHtml/superTrunl.html

20
 			</table>
20
 			</table>
21
 			<div id="message" style="text-align: left;padding: 2% 0 0 19%;">
21
 			<div id="message" style="text-align: left;padding: 2% 0 0 19%;">
22
 	        	是否发送短信
22
 	        	是否发送短信
23
-	        	<input type="radio" name="message" id="" value="0" checked/>否
23
+	        	<input type="radio" name="message" id="" value="0" />否
24
 	        	<input type="radio" name="message" id="" value="1" />是
24
 	        	<input type="radio" name="message" id="" value="1" />是
25
 	        </div>
25
 	        </div>
26
 			<div class="btn_box">
26
 			<div class="btn_box">
33
 			var depId = helper.request.queryString("depId");
33
 			var depId = helper.request.queryString("depId");
34
 			//alert(wid)
34
 			//alert(wid)
35
 			$(document).ready(function() {
35
 			$(document).ready(function() {
36
+				if(wid) {
37
+					$.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
38
+						workorderid: wid,
39
+						"token": $.cookie("token")
40
+					}, function(result) {
41
+						if(result.state.toLowerCase() == "success") {
42
+							var content = result.data;
43
+							if(content.data[0].F_DeptIdIsSms == 1) {
44
+								$('#message input[value="1"]').attr('checked', true)
45
+							} else {
46
+								$('#message input[value="0"]').attr('checked', true)
47
+							}
48
+						}
49
+					})
50
+				}
36
 				$('.BC').click(function() {
51
 				$('.BC').click(function() {
37
 					if(!$("#result").val()) {
52
 					if(!$("#result").val()) {
38
 						layer.msg("内容不能为空");
53
 						layer.msg("内容不能为空");

+ 99 - 0
WebUI/CallCenterWeb.UI/SystemManager/SMSReminder.html

1
+<!DOCTYPE html>
2
+<html>
3
+
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
+		<title>部门短信提醒</title>
11
+		<style>
12
+			.box {
13
+				width: 35%;
14
+			}
15
+			.delModel .box,.proModel .box{
16
+				width: 20%;
17
+			}
18
+			
19
+			.boxCon {
20
+				height: 285px;
21
+			}
22
+		
23
+			.boxCon table th {
24
+			    width: 20%;
25
+			}
26
+			.boxCon table td textarea{
27
+				width: 80%;
28
+			}
29
+			.treeTable {
30
+				height: 500px;
31
+			}
32
+			
33
+			.tree {
34
+				height: 100%;
35
+			}
36
+			
37
+			.treeCon {
38
+				height: 90%;
39
+				border: 1px solid #ebebeb;
40
+				overflow-y: auto;
41
+			}
42
+			
43
+			.trTitle {
44
+				width: 100%;
45
+				height: 34px;
46
+				line-height: 34px;
47
+				border-bottom: 1px solid #ebebeb;
48
+				color: red;
49
+				font-weight: 700;
50
+				margin-bottom: 15px;
51
+			}
52
+		</style>
53
+	</head>
54
+
55
+    <body class="gray-bg">
56
+        <div class="container-fluid wrapper-content animated fadeInRight">
57
+            <div class="daoHang clearfix">
58
+                <div class="dhLeft">
59
+                    <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">系统管理</a>&gt;<a href="" class="nowPosition">短信设置</a></sapn>
60
+                </div>
61
+                <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
62
+            </div>
63
+            <div class="toolBar clearfix">
64
+                <div class="toolLeft">
65
+                    <button class="btns protect">保存</button>
66
+                </div>
67
+            </div>
68
+            <div class="treeTable clearfix">
69
+                <div class="tableCon col-md-9">
70
+                    <div class="trTitle"> 权限设置</div>
71
+                    <div class="treeCon">
72
+                        <ul id="treeDemo" class="ztree">
73
+                            <!--类名为ztree是必须的-->
74
+                        </ul>
75
+                    </div>
76
+                </div>
77
+            </div>
78
+
79
+        </div>
80
+        <div class="model proModel">
81
+            <div class="box">
82
+                <div class="btop clearfix">
83
+                    <p class="btl"><span>提示</span></p>
84
+                    <p class="btr proBtr" title="关闭">X</p>
85
+                </div>
86
+                <div class="boxCon" style="height: 150px;text-align: center;">
87
+                    <p style="font-size: 16px;">保存成功!</p>
88
+                    <p style="margin-top: 30px;">
89
+                        <button class="btns proSure">确定</button>
90
+                    </p>
91
+                </div>
92
+            </div>
93
+        </div>
94
+        <script src="../css/layer/layer.js"></script>
95
+        <script src="../js/zTree/jquery.ztree.core.js"></script>
96
+        <script src="../js/zTree/jquery.ztree.excheck.min.js"></script>
97
+        <script src="./js/SMSReminder.js"></script>
98
+    </body>
99
+</html>

+ 78 - 0
WebUI/CallCenterWeb.UI/SystemManager/js/SMSReminder.js

1
+var token = $.cookie("token");
2
+var code;
3
+var jsname = $('.searJsz').val();
4
+//右边树形结构
5
+tree();
6
+function tree() {
7
+    $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
8
+		"token": $.cookie("token"),
9
+	}, function(result) {
10
+		$(result.data).each(function(i, n) {
11
+			if(n.F_IsSms == 1) {
12
+				n.checked = "true";
13
+			}
14
+		})
15
+		$.fn.zTree.init($("#treeDemo"), setting1, result.data); //实例化树形图
16
+	});
17
+}
18
+var setting1 = {
19
+	check: {
20
+		enable: true,
21
+		//				chkboxType: {"Y":"", "N":""},
22
+	},
23
+	data: {
24
+		key: {
25
+            name: "F_DeptName"
26
+        },
27
+		simpleData: {
28
+			enable: true,
29
+			idKey: "F_DeptId",
30
+			pIdKey: "F_PartentId",
31
+			rootPId: 0
32
+		}
33
+	},
34
+	callback: {
35
+		onCheck: zTreeOnClick
36
+	}
37
+};
38
+
39
+function zTreeOnClick(event, treeId, treeNode) {
40
+	var name = treeNode.name;
41
+};
42
+
43
+//保存
44
+function pro(app) {
45
+    $.post(huayi.config.callcenter_url + "Department/UpdateSMSList", {
46
+        token: token,
47
+        state: 1, 
48
+        ids: app.toString()
49
+    }, function (data) {
50
+        data = JSON.parse(data);
51
+        if (data.state.toLowerCase() == 'success') {
52
+            layer.confirm('保存成功!', {
53
+                btn: ['确定']
54
+            });
55
+            return;
56
+        }
57
+    });
58
+}
59
+
60
+$('.protect').click(function() {
61
+	var app = [];
62
+	var ztree = $.fn.zTree.getZTreeObj("treeDemo").getCheckedNodes(true);
63
+	if (ztree.length > 0) {
64
+	    $.each(ztree, function (i, n) {
65
+	        app.push(n.F_DeptId);
66
+	    });
67
+	    pro(app);
68
+	}
69
+	else {
70
+	    layer.confirm('请选择部门!', {
71
+	        btn: ['确定']
72
+	    });
73
+	}
74
+})
75
+
76
+
77
+
78
+