|
@@ -56,6 +56,9 @@
|
|
<ul class="layui-tab-title">
|
|
<ul class="layui-tab-title">
|
|
<li class="layui-this">通知规则</li>
|
|
<li class="layui-this">通知规则</li>
|
|
<li class="">微信通知</li>
|
|
<li class="">微信通知</li>
|
|
|
|
+ {{if eq 0 $.Admin_r.Admin_master}}
|
|
|
|
+ <li class="">微信通知(冷链)</li>
|
|
|
|
+ {{end}}
|
|
<li class="">短信通知</li>
|
|
<li class="">短信通知</li>
|
|
<li class="">电话通知</li>
|
|
<li class="">电话通知</li>
|
|
<li class="">邮箱通知</li>
|
|
<li class="">邮箱通知</li>
|
|
@@ -104,6 +107,46 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
+ {{if eq 0 $.Admin_r.Admin_master}}
|
|
|
|
+ <div class="layui-tab-item " >
|
|
|
|
+ <div class="layui-row" style="margin: 0px 10px">
|
|
|
|
+ <div class="layui-col-xs6" >
|
|
|
|
+ <div class="layui-row no_select" style="margin: 10px 0px;font-size: 15px;color: #1E9FFF">
|
|
|
|
+ 方式一:二维码
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-row no_select" style="margin: 0px 10px">
|
|
|
|
+ <div style="float: left;margin-bottom: 8px">
|
|
|
|
+ 让被通知者 通过微信扫描二维码,二维码有效期7天。
|
|
|
|
+ </div>
|
|
|
|
+ <img id="myimg2" style="width: 150px;height: 150px;float: left" src="https://osscold.baozhida.cn/images/二维码.png">
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+<!-- <div class="layui-row no_select" style="margin: 10px 0px;font-size: 15px;color: #1E9FFF;margin-top: 18px">-->
|
|
|
|
+<!-- 方式二:回复内容-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div id="Code" class="layui-row" style="height: 50px;margin: 0px 10px;border:1px solid #cbcbcb;box-shadow: 0px 0px 8px #316fe7;padding: 6px;border-radius:5px;">-->
|
|
|
|
+
|
|
|
|
+<!-- </div>-->
|
|
|
|
+ </div>
|
|
|
|
+ <div id="Notice_wx2_list" class="layui-col-xs6" style="padding-left: 6px;padding-right: 6px;height: 350px;border-left:1px solid #cbcbcb;overflow-y:auto;">
|
|
|
|
+<!-- <div class="layui-col" style="height: 32px;background-color: #fafafa;border-radius:5px;margin-bottom: 4px;">-->
|
|
|
|
+<!-- <img style="float: left;width: 30px;margin: 0px 10px;margin-top: 2px;" src="https://osscold.baozhida.cn/images/微信.png" height="30"-->
|
|
|
|
+<!-- width="30"/>-->
|
|
|
|
+<!-- <div style="float: left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">-->
|
|
|
|
+<!-- <div style="margin-top: 8px;font-size: 15px">SN:KF20210510143443</div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- <div class="layui-card-header" style="float: right; padding: 0px;height: 0px;">-->
|
|
|
|
+
|
|
|
|
+<!-- <span style="float: right;margin-top: 0px;color: rgba(255,73,91,0.95);height: 20px;margin-right: 6px;margin-top: -4px;"-->
|
|
|
|
+<!-- onclick=""><i class="iconfont" style="margin-right: 2px"></i>删除</span>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ {{end}}
|
|
<div class="layui-tab-item">
|
|
<div class="layui-tab-item">
|
|
<div class="layui-row" style="margin: 0px 10px">
|
|
<div class="layui-row" style="margin: 0px 10px">
|
|
<div class="layui-col-xs6" >
|
|
<div class="layui-col-xs6" >
|
|
@@ -289,6 +332,7 @@
|
|
}
|
|
}
|
|
var T_name = "{{.T.T_name}}"
|
|
var T_name = "{{.T.T_name}}"
|
|
var T_Notice_wx = "{{.T.T_Notice_wx}}"
|
|
var T_Notice_wx = "{{.T.T_Notice_wx}}"
|
|
|
|
+ var T_Notice_wx2 = "{{.T.T_Notice_wx2}}"
|
|
var T_Notice_phone = "{{.T.T_Notice_phone}}"
|
|
var T_Notice_phone = "{{.T.T_Notice_phone}}"
|
|
var T_Notice_message = "{{.T.T_Notice_message}}"
|
|
var T_Notice_message = "{{.T.T_Notice_message}}"
|
|
var T_Notice_mailbox = "{{.T.T_Notice_mailbox}}"
|
|
var T_Notice_mailbox = "{{.T.T_Notice_mailbox}}"
|
|
@@ -306,10 +350,10 @@
|
|
Show_Notice_mailbox_list();
|
|
Show_Notice_mailbox_list();
|
|
Get_DeviceClassId_QRCode();
|
|
Get_DeviceClassId_QRCode();
|
|
setTimeout("Automaticupdate_Notice_wx()", 1000)
|
|
setTimeout("Automaticupdate_Notice_wx()", 1000)
|
|
|
|
+ setTimeout("Automaticupdate_Notice_wx2()", 1000)
|
|
|
|
|
|
setInterval(function(){
|
|
setInterval(function(){
|
|
if(forNotice_wx){
|
|
if(forNotice_wx){
|
|
-
|
|
|
|
Automaticupdate_Notice_wx();
|
|
Automaticupdate_Notice_wx();
|
|
}
|
|
}
|
|
},2000);
|
|
},2000);
|
|
@@ -320,6 +364,7 @@
|
|
function Automaticupdate_Notice_wx() {
|
|
function Automaticupdate_Notice_wx() {
|
|
Get_DeviceClassId();
|
|
Get_DeviceClassId();
|
|
}
|
|
}
|
|
|
|
+
|
|
function Del_Notice_wx_plusXing(str, wid) {
|
|
function Del_Notice_wx_plusXing(str, wid) {
|
|
|
|
|
|
a_x = str.indexOf(wid+"/")
|
|
a_x = str.indexOf(wid+"/")
|
|
@@ -336,6 +381,16 @@
|
|
Show_Notice_wx_list()
|
|
Show_Notice_wx_list()
|
|
DeviceClass_Post(false)
|
|
DeviceClass_Post(false)
|
|
}
|
|
}
|
|
|
|
+ function Del_Notice_wx2(x) {
|
|
|
|
+ srt_r = Del_Notice_wx_plusXing(T_Notice_wx2,x)
|
|
|
|
+ if(T_Notice_wx2.indexOf(srt_r) == -1){
|
|
|
|
+ layer.msg('删除失败');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ T_Notice_wx2 = T_Notice_wx2.replace(srt_r + "|", "")
|
|
|
|
+ Show_Notice_wx_list2()
|
|
|
|
+ DeviceClass_Post(false)
|
|
|
|
+ }
|
|
function Show_Notice_wx_list() {
|
|
function Show_Notice_wx_list() {
|
|
var scores = T_Notice_wx.split("|");
|
|
var scores = T_Notice_wx.split("|");
|
|
$('#Notice_wx_list').html("");
|
|
$('#Notice_wx_list').html("");
|
|
@@ -363,6 +418,32 @@
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ function Show_Notice_wx_list2() {
|
|
|
|
+ var scores = T_Notice_wx2.split("|");
|
|
|
|
+ $('#Notice_wx2_list').html("");
|
|
|
|
+ for (let i = 0; i < scores.length; i++) {
|
|
|
|
+ if(scores[i].length == 0){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ scores_l = scores[i].split("/")
|
|
|
|
+
|
|
|
|
+ $('#Notice_wx2_list').append("" +
|
|
|
|
+ "<div class=\"layui-col\" style=\"height: 32px;background-color: #fafafa;border-radius:5px;margin-bottom: 4px;\">\n" +
|
|
|
|
+ " <img style=\"float: left;width: 30px;margin: 0px 10px;margin-top: 2px;\" src=\"https://osscold.baozhida.cn/images/微信.png\" height=\"30\"\n" +
|
|
|
|
+ " width=\"30\"/>\n" +
|
|
|
|
+ " <div style=\"float: left;width: 170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\">\n" +
|
|
|
|
+ " <div style=\"margin-top: 8px;font-size: 15px\" ondblclick=\"ShowElement(this,'"+scores_l[0]+"')\" >"+scores_l[1]+"</div>\n" +
|
|
|
|
+ " </div>\n" +
|
|
|
|
+ " <div class=\"layui-card-header\" style=\"float: right; padding: 0px;height: 0px;\">\n" +
|
|
|
|
+ " <span style=\"float: right;margin-top: 0px;color: rgba(255,73,91,0.95);height: 20px;margin-right: 6px;margin-top: -4px;\"\n" +
|
|
|
|
+ " onclick=\"Del_Notice_wx2('"+scores_l[0]+"')\"><i class=\"iconfont\" style=\"margin-right: 2px\"></i>删除</span>\n" +
|
|
|
|
+ " </div>\n" +
|
|
|
|
+ "</div>")
|
|
|
|
+ }
|
|
|
|
+ if(scores.length == 0){
|
|
|
|
+ $('#Notice_wx2_list').append("<div style=\"color: #1E9FFF;text-align: center;font-size: 15px;margin-top: 150px\" > 没有数据 < /div>" )
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// 手机
|
|
// 手机
|
|
function Add_Notice_phone() {
|
|
function Add_Notice_phone() {
|
|
x = $("#E_phone").val()
|
|
x = $("#E_phone").val()
|
|
@@ -518,6 +599,26 @@
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'POST',
|
|
|
|
+ url: 'Get_DeviceClassId_QRCode2',//发送请求
|
|
|
|
+ data: {
|
|
|
|
+ User_tokey: $.cookie("User_tokey"),
|
|
|
|
+ T_class_id: parseInt(getPar("id")),
|
|
|
|
+ },
|
|
|
|
+ success: function(result) {
|
|
|
|
+ console.log(result)
|
|
|
|
+ if (result.Code == 200 ){
|
|
|
|
+ $("#myimg2").attr('src',result.Data.QR);
|
|
|
|
+ // $('#Code').html(result.Data.Code);
|
|
|
|
+ }else {
|
|
|
|
+ layer.msg('二维码生成失败!', {
|
|
|
|
+ time: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
function Get_DeviceClassId(){
|
|
function Get_DeviceClassId(){
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -531,6 +632,8 @@
|
|
if (result.Code == 200 ){
|
|
if (result.Code == 200 ){
|
|
T_Notice_wx = result.Data.T_Notice_wx
|
|
T_Notice_wx = result.Data.T_Notice_wx
|
|
Show_Notice_wx_list()
|
|
Show_Notice_wx_list()
|
|
|
|
+ T_Notice_wx2 = result.Data.T_Notice_wx2
|
|
|
|
+ Show_Notice_wx_list2()
|
|
}else {
|
|
}else {
|
|
layer.msg('获取数据失败!', {
|
|
layer.msg('获取数据失败!', {
|
|
time: 2000
|
|
time: 2000
|
|
@@ -540,6 +643,7 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
function DeviceClass_Post(is){
|
|
function DeviceClass_Post(is){
|
|
var loading = layer.load(0, {
|
|
var loading = layer.load(0, {
|
|
shade: false,
|
|
shade: false,
|
|
@@ -552,6 +656,7 @@
|
|
Id:"{{.id}}",
|
|
Id:"{{.id}}",
|
|
T_name:$("#T_name").val(),
|
|
T_name:$("#T_name").val(),
|
|
T_Notice_wx:T_Notice_wx,
|
|
T_Notice_wx:T_Notice_wx,
|
|
|
|
+ T_Notice_wx2:T_Notice_wx2,
|
|
T_Notice_phone:T_Notice_phone,
|
|
T_Notice_phone:T_Notice_phone,
|
|
T_Notice_message:T_Notice_message,
|
|
T_Notice_message:T_Notice_message,
|
|
T_Notice_mailbox:T_Notice_mailbox,
|
|
T_Notice_mailbox:T_Notice_mailbox,
|