Przeglądaj źródła

部门短信提醒功能

liuzhen 5 lat temu
rodzic
commit
3a3a111b5c

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

@@ -8,7 +8,7 @@
8 8
 		<link href="../css/layer/need/layer.css" />
9 9
 		<link rel="stylesheet" href="../css/init.css" />
10 10
 		<title>监察</title>
11
-			<style>
11
+		<style>
12 12
 			.input {
13 13
 				background-color: #FFF;
14 14
 				background-image: none;
@@ -22,7 +22,8 @@
22 22
 				padding: 0!important;
23 23
 				border: none!important;
24 24
 			}
25
-			#message{
25
+			
26
+			#message {
26 27
 				display: none;
27 28
 			}
28 29
 		</style>
@@ -40,7 +41,7 @@
40 41
 					<td colspan="7">
41 42
 						<!--<span class="fjnr"></span>-->
42 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 45
 						</div>
45 46
 						<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
46 47
 						<input class="input" type="button" value="上传" id="scwj" />
@@ -53,10 +54,10 @@
53 54
 				</tr>
54 55
 			</table>
55 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 61
 			<div class="btn_box">
61 62
 				<button class="btns DB">保存</button>
62 63
 				<button class="btns JC">保存</button>
@@ -69,17 +70,32 @@
69 70
 			var state = helper.request.queryString("state");
70 71
 			var depId = helper.request.queryString("depId");
71 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 88
 				if(type == 1) {
73
-					if (state==1) {
89
+					if(state == 1) {
74 90
 						$(".title").text("督办意见");
75 91
 						$(".JC").hide();
76 92
 						$('#message').show();
77
-					}else{
93
+					} else {
78 94
 						$(".title").text("不督办意见");
79 95
 						$(".JC").hide();
80 96
 						$('#message').hide()
81 97
 					}
82
-					
98
+
83 99
 				} else {
84 100
 					$(".title").text("监察意见")
85 101
 					$(".DB").hide();
@@ -90,7 +106,7 @@
90 106
 					} else {
91 107
 						type = 1;
92 108
 						JA();
93
-						if($('#message input[type="radio"]:checked').val()==1){
109
+						if($('#message input[type="radio"]:checked').val() == 1) {
94 110
 							sendMessage();
95 111
 						}
96 112
 					}
@@ -110,21 +126,21 @@
110 126
 				$("#upFile").change(function() {
111 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 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 144
 						layer.msg('发送短信成功')
129 145
 					}
130 146
 				})
@@ -135,8 +151,8 @@
135 151
 					workorderid: wid,
136 152
 					overseeopinion: $("#overseeopinion").val(),
137 153
 					type: type,
138
-					state:state,
139
-					files:$("#file").val(),
154
+					state: state,
155
+					files: $("#file").val(),
140 156
 					"token": $.cookie("token")
141 157
 				}, function(result) {
142 158
 					result = JSON.parse(result);
@@ -146,7 +162,7 @@
146 162
 						parent.layer.close(index); //再执行关闭
147 163
 						parent.$('#orderlist').bootstrapTable('refresh');
148 164
 						parent.layer.msg("操作成功");
149
-							$('.fileBox').html('');
165
+						$('.fileBox').html('');
150 166
 					}
151 167
 				})
152 168
 			}
@@ -159,8 +175,8 @@
159 175
 						formData.append('file' + i, Files[i]);
160 176
 					}
161 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 180
 						$.ajax({
165 181
 							url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
166 182
 							type: "POST",
@@ -183,42 +199,42 @@
183 199
 								if(r.state.toLowerCase() == "success") {
184 200
 									$(".fjnr").text(r.data[0].F_FileName);
185 201
 									var a = r.data;
186
-	//								var str = '';
187
-	//								var Str;
188
-	
202
+									//								var str = '';
203
+									//								var Str;
204
+
189 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 210
 											file_num();
195
-									})
211
+										})
196 212
 									})
197 213
 									file_num();
198 214
 								}
199 215
 							}
200 216
 						});
201
-					}else{
202
-			    		layer.msg("格式不正确");
203
-			    	}
217
+					} else {
218
+						layer.msg("格式不正确");
219
+					}
204 220
 				} else {
205 221
 					layer.confirm('请上传文件!', {
206 222
 						btn: ['确定']
207 223
 					});
208 224
 				}
209 225
 			}
210
-			
211
-				//上传文件隐藏域值
212
-			function file_num(){
226
+
227
+			//上传文件隐藏域值
228
+			function file_num() {
213 229
 				var str = '';
214 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 233
 					console.log(aa);
218 234
 					str += aa + ",";
219 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 239
 		</script>
224 240
 	</body>

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

@@ -292,7 +292,7 @@
292 292
         <div id="message" style="margin: 20px 0 0 30px;">
293 293
         	是否发送短信
294 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 296
         </div>
297 297
 	    <div class="btn_box" style="text-align: center;">
298 298
 			<button class="btns BC">保存</button>
@@ -339,7 +339,11 @@
339 339
 	                    $(".mmdj").text(content.data[0].F_SourceAddress);//地址
340 340
 	                    $(".tslx").text(content.data[0].TypeName1);//偶投诉类型
341 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 348
 						if(content.data[0].F_IsProtect == 0) {
345 349
 							$('.MJ').text("普通");

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

@@ -31,7 +31,7 @@
31 31
 			</table>
32 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 35
 	        	<input type="radio" name="message" id="" value="1" />是
36 36
 	        </div>
37 37
 			<div class="btn_box">
@@ -45,6 +45,21 @@
45 45
 			var callid = helper.request.queryString("callid");
46 46
 			var depId = helper.request.queryString("depId");
47 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 63
 				$(".reminderBtn").click(function(){
49 64
 					reminderhande();
50 65
 					if($('#message input[type="radio"]:checked').val()==1){

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

@@ -20,7 +20,7 @@
20 20
 			</table>
21 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 24
 	        	<input type="radio" name="message" id="" value="1" />是
25 25
 	        </div>
26 26
 			<div class="btn_box">
@@ -33,6 +33,21 @@
33 33
 			var depId = helper.request.queryString("depId");
34 34
 			//alert(wid)
35 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 51
 				$('.BC').click(function() {
37 52
 					if(!$("#result").val()) {
38 53
 						layer.msg("内容不能为空");

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

@@ -0,0 +1,99 @@
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

@@ -0,0 +1,78 @@
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
+