Quellcode durchsuchen

增加消息提醒

miaofuhao vor 9 Monaten
Ursprung
Commit
b13267e35c

+ 1 - 1
WebUI/CallCenterWeb.UI/equipmentOperationManage/js/equipmentRepair.js

@@ -74,7 +74,7 @@ $(document).ready(function() {
74 74
 
75 75
 	var t, n, count = 0;
76 76
 
77
-	t = setInterval("showAuto()", 1000 * 60);
77
+//	t = setInterval("showAuto()", 1000 * 60);
78 78
 
79 79
 	refreshOrderDatas(huayi.config.repairPlatformTime); //刷新 工单数据
80 80
 

+ 1 - 0
WebUI/CallCenterWeb.UI/equipmentOperationManage/template/addEquipmentRepair.html

@@ -709,6 +709,7 @@
709 709
 				 console.log(repairplaceStr)
710 710
 				 console.log($("#build").val(),$("#build option:selected").text())
711 711
 				  console.log($("#floor").val(),$("#floor option:selected").text())
712
+				  
712 713
 				if(!regexs.phone.test($.trim($("#contactway").val())) || $("#contactway").val() == '') {
713 714
 					layer.confirm('请输入有效的联系方式!', {
714 715
 						icon: 2,

+ 1 - 0
WebUI/CallCenterWeb.UI/index.html

@@ -484,6 +484,7 @@
484 484
 		<script src="./js/hplus.min.js?v=4.1.0"></script>
485 485
 		<script src="./js/contabs.min.js"></script>
486 486
 		<script src="./js/chat.js"></script>
487
+		<script src="./js/index/orderMsgRemind.js"></script>
487 488
 	</body>
488 489
 
489 490
 </html>

+ 52 - 0
WebUI/CallCenterWeb.UI/js/index/orderMsgRemind.js

@@ -0,0 +1,52 @@
1
+//刷新弹出框
2
+//t = setInterval("showAuto()", 1000 * 60);
3
+showAuto()
4
+function sendmsg() {
5
+	$.ajax({
6
+		type: "get",
7
+		url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/getbxmessagelist", //获取数据的Servlet地址
8
+		async: true,
9
+		dataType: 'json',
10
+		data: {isread:0},
11
+		success: function(data) {
12
+			if(data.data.rows.length) {
13
+				$('audio').remove();
14
+				audioElementHovertree = document.createElement('audio');
15
+				audioElementHovertree.setAttribute('src', './js/video/Sound.mp3');
16
+				audioElementHovertree.setAttribute('autoplay', 'autoplay');  // 打开自动播放
17
+				var orderId = data.data.rows[0].id
18
+				layer.confirm('来新工单了', {
19
+					icon: 7,
20
+					btn: ['确定'], // 按钮
21
+					shade: 0,
22
+					offset: "rb"
23
+				}, function (index) {
24
+	                // 当用户点击“确定”按钮时执行的代码
25
+	                console.log('用户点击了确定');
26
+	                updataOrderMsg(orderId)
27
+	                layer.close(index); // 关闭确认框
28
+	            });
29
+			}
30
+		}
31
+	});
32
+}
33
+function updataOrderMsg(orderId){
34
+		
35
+	$.ajax({
36
+		type: "get",
37
+		url: huayi.config.callcenter_url + "equipmentapi/api/worepairbase/getyd?id="+orderId, //获取数据的Servlet地址
38
+		async: true,
39
+		dataType: 'json',
40
+//		data: {isread:1},
41
+		success: function(data) {
42
+			if (data.state === "success") {
43
+				layer.msg("已读成功!");
44
+			} else {
45
+				layer.msg("消息提醒操作失败!");
46
+			}
47
+		}
48
+	});
49
+}
50
+function showAuto() {
51
+	sendmsg()
52
+}