| | |
| | | </style> |
| | | <title>Title</title> |
| | | <style> |
| | | #sendcontext { |
| | | |
| | | display: block; |
| | | |
| | | margin: 0 auto; |
| | | |
| | | /*overflow: hidden; */ |
| | | |
| | | width: 490px; |
| | | |
| | | font-size: 14px; |
| | | |
| | | height: 100px; |
| | | |
| | | line-height: 24px; |
| | | |
| | | padding: 2px; |
| | | |
| | | border-radius: 4px; |
| | | |
| | | min-height: 20px; |
| | | |
| | | /* max-height: 70px; */ |
| | | |
| | | } |
| | | |
| | | textarea { |
| | | |
| | | outline: 0 none; |
| | | |
| | | border-color: rgba(82, 168, 236, 0.8); |
| | | |
| | | box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); |
| | | |
| | | } |
| | | .layui-btn-disabled { |
| | | pointer-events: none; /* 使按钮不可点击 */ |
| | | opacity: 0.6; /* 降低不透明度以显示禁用状态 */ |
| | |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <%--<div class="update" style="width: 500px;border: 1px solid #ccc;padding: 50px;border-radius: 20px;position: fixed;top: 150px;left: 500px;z-index: 99999;background-color: white;display: none">--%> |
| | | <%-- <form class="layui-form" action="/HxzkFlow/hxzk/UpdateTbFuwuqi" method="post" lay-filter="example">--%> |
| | | |
| | | <%-- <input type="text" name="num" style="display: none" class="upnum"/>--%> |
| | | <%-- --%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">所属公司1</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <input type="text" name="company" id="xggs" disabled lay-verify="title" autocomplete="off" placeholder="请输入所属公司" class="layui-input">--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">开始日期</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <input type="text" name="startdate" lay-verify="title" autocomplete="off" placeholder="请输入所在地" class="layui-input">--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">结束日期</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <input type="date" name="enddate" id="enddateadd1" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">费用/元¥</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <%– <span id="feiyong" style="margin-top: 10px;display: inline-block;margin-left: 10px"></span>–%>--%> |
| | | <%-- <input type="text" id="expenseadd1" name="expense" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="chongzhi">--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <button type="submit" class="layui-btn" lay-submit="" lay-filter="demoupdate">立即提交</button>--%> |
| | | <%-- <button type="button" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canselupdate()" style="margin-left: 200px">取消</button>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- </form>--%> |
| | | <%--</div>--%> |
| | | <div class="updateZong" style="width: 500px;border: 1px solid #ccc;padding: 50px;border-radius: 20px;position: fixed;top: 150px;left: 500px;z-index: 99999;background-color: white;display: none"> |
| | | <form class="layui-form" method="post" lay-filter="example" onsubmit="return checkupdate()"> |
| | | <input type="text" id="id" name="id" style="display: none" class="upnum"/> |
| | |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="send" |
| | | style="display: none;width: 600px;background-color: white;border: 1px solid #cccccc;padding: 50px;border-radius: 20px;position: fixed;top: 50px;left: 450px;z-index: 99999"> |
| | | <form class="layui-form" method="post" action="/HxzkFlow/hxzk/sendfuwu" lay-filter="example" onsubmit="return checksend()"> |
| | | <input type="text" name="id" style="display: none" class="id"/> |
| | | <input type="text" name="vname" style="display: none" value="index"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属公司:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="company" id="company" lay-verify="title" autocomplete="off" placeholder="" |
| | | class="layui-input" disabled> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">发送电话:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="phone" id="phone" lay-verify="title" autocomplete="off" lay-verify="required|phone" |
| | | placeholder="请输入发送电话" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">发送内容:</label> |
| | | <div class="layui-input-block"> |
| | | <%-- <input type="text" name="sendcontext" id="sendcontext" lay-verify="title" autocomplete="off"--%> |
| | | <%-- placeholder="请输入卡号,N个卡号需要 ; 分隔" class="layui-input">--%> |
| | | <textarea id="sendcontext" autoHeight="true" placeholder="回复内容" disabled></textarea> |
| | | </textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <button type="submit" class="layui-btn" lay-submit="" lay-filter="demoadd">确定发送</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canseladd()" |
| | | style="margin-left: 200px">取消 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div id="fhfrom"></div> |
| | | |
| | | </body> |
| | | <script type="text/html" id="barDemo"> |
| | | <a class="layui-btn layui-btn-xs" lay-event="detail" >短信提示</a> |
| | | <%-- <a class="layui-btn layui-btn-xs" onclick="guanbi();" >关闭</a>--%> |
| | | </script> |
| | | |
| | | <script src="/HxzkFlow/js/layui.js" charset="utf-8"></script> |
| | | <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> |
| | | <script> |
| | | var qb = localStorage.getItem("gsjc") |
| | | var data = "qb="+qb |
| | | var getUserName = localStorage.getItem("getUserName") |
| | | var getjuese = localStorage.getItem("getjuese") |
| | | var chongzhiCompany = ""; |
| | | |
| | | var accessKey = "448c2cedcdce41428a290d144e81ab6e" |
| | |
| | | }else{ |
| | | $.post("/HxzkFlow/hxzk/jiemi",data,function (data){ |
| | | if(data == "1"){ |
| | | table.render({ |
| | | elem: '#demo' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,height: 850 |
| | | ,url: '/HxzkFlow/hxzk/findTbFuwuqi' //数据接口 |
| | | // ,cellMinWidth: 80 |
| | | ,width: 1680 |
| | | ,page: true //开启分页 |
| | | ,toolbar:'#toolbarDemo' |
| | | ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,icon: 'layui-icon-tips' |
| | | }] |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left"} |
| | | ,{field: 'id', title: '序号', sort: true,width:'5%'} |
| | | ,{field: 'servername', title: '服务器名称', width:'15%'} |
| | | ,{field: 'company', title: '公司', width:'15%'} |
| | | ,{field: 'startdate', title: '开始日期', sort: true} |
| | | ,{field: 'enddate', title: '结束日期', sort: true} |
| | | ,{field: 'remainingdays', title: '剩余天数', sort: true,} |
| | | ,{field: 'expense', title: '费用', sort: true} |
| | | ,{field: 'rechargedate', title: '最近充值日期', sort: true} |
| | | ,{field: 'rechargemoney', title: '充值金额', sort: true} |
| | | ,{field: 'notes', title: '备注', sort: true} |
| | | |
| | | ]], |
| | | limit:100, |
| | | limits:[10,20,30,40,50,60,70,80,90,100], |
| | | }); |
| | | if (getjuese == "超级管理员") { |
| | | table.render({ |
| | | elem: '#demo' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | , url: '/HxzkFlow/hxzk/findTbFuwuqi' //数据接口 |
| | | // , url: '/HxzkFlow/hxzk/findTbFuwuqi' //数据接口 |
| | | // ,cellMinWidth: 80 |
| | | , width: 1680 |
| | | ,method:'post' |
| | | // , where: {entry: null} // 搜索的字段 |
| | | , page: true //开启分页 |
| | | , toolbar: '#toolbarDemo' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , icon: 'layui-icon-tips' |
| | | }] |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left"} |
| | | , {field: 'id', title: '序号', sort: true, width: '5%'} |
| | | , {field: 'servername', title: '服务器名称', width: '15%'} |
| | | , {field: 'company', title: '公司', width: '15%'} |
| | | , {field: 'startdate', title: '开始日期', sort: true, width: '10%'} |
| | | , {field: 'enddate', title: '结束日期', sort: true, width: '10%'} |
| | | , {field: 'remainingdays', title: '剩余天数', sort: true, width: '5%'} |
| | | , {field: 'expense', title: '费用', sort: true, width: '5%'} |
| | | , {field: 'rechargedate', title: '最近充值日期', sort: true, width: '5%'} |
| | | , {field: 'rechargemoney', title: '充值金额', sort: true, width: '10%'} |
| | | , {field: 'notes', title: '备注', sort: true, width: '10%'} |
| | | , {title: '操作', width: 150, toolbar: '#barDemo', width: '120'} |
| | | ]], |
| | | limit: 100, |
| | | limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], |
| | | }); |
| | | }else { |
| | | var un = getUserName; |
| | | table.render({ |
| | | elem: '#demo' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | , url: '/HxzkFlow/hxzk/findTbFuwuqi' //数据接口 |
| | | // ,cellMinWidth: 80 |
| | | , width: 1680 |
| | | ,method:'post' |
| | | , where: {entry: getUserName} // 搜索的字段 |
| | | , page: true //开启分页 |
| | | , toolbar: '#toolbarDemo' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , icon: 'layui-icon-tips' |
| | | }] |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left"} |
| | | , {field: 'id', title: '序号', sort: true, width: '5%'} |
| | | , {field: 'servername', title: '服务器名称', width: '15%'} |
| | | , {field: 'company', title: '公司', width: '15%'} |
| | | , {field: 'startdate', title: '开始日期', sort: true, width: '10%'} |
| | | , {field: 'enddate', title: '结束日期', sort: true, width: '10%'} |
| | | , {field: 'remainingdays', title: '剩余天数', sort: true, width: '5%'} |
| | | , {field: 'expense', title: '费用', sort: true, width: '5%'} |
| | | , {field: 'rechargedate', title: '最近充值日期', sort: true, width: '5%'} |
| | | , {field: 'rechargemoney', title: '充值金额', sort: true, width: '10%'} |
| | | , {field: 'notes', title: '备注', sort: true, width: '10%'} |
| | | , {title: '操作', width: 150, toolbar: '#barDemo', width: '120'} |
| | | ]], |
| | | limit: 100, |
| | | limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], |
| | | }); |
| | | } |
| | | }else{ |
| | | $("#hide").hide(); |
| | | $("#relo").css("left","-60px") |
| | |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | ,cellMinWidth: 80 |
| | | , url: '/HxzkFlow/hxzk/findTbFuwuqiZi?Zong='+jc //数据接口 |
| | | , url: '/HxzkFlow/hxzk/findTbFuwuqiZi' //数据接口 |
| | | ,method:'post' |
| | | , where: {Zong: localStorage.getItem("gsmc")} // 搜索的字段 |
| | | , page: true //开启分页 |
| | | , toolbar: '#toolbarDemo1' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | |
| | | } |
| | | |
| | | |
| | | table.on('tool(demo)', function (obj) { //注:tool 是工具条事件名,test 是 table 容器的 id |
| | | var data = obj.data; //获得当前行数据 |
| | | console.log(data) |
| | | var layEvent = obj.event; //获得 lay-event 对应的值(也就是处理的事件) |
| | | if (layEvent === 'detail') { |
| | | |
| | | var dt = "company=" + data.company |
| | | console.log(dt) |
| | | $.post("/HxzkFlow/hxzk/findcomPnone", dt, function (data) { |
| | | console.log(data) |
| | | $("#phone").val(data) |
| | | }) |
| | | $(".send").show(); |
| | | $(".id").val(data.id) |
| | | $("#company").val(data.company) |
| | | $("#sendcontext").val("尊敬的用户,您好!您有服务器将于"+data.enddate+"到期,为避免影响您的正常使用请及时续费,您可登录华星智控公司物联网管理平台查询详情续费,如有疑问可咨询我公司客服人员,祝您生活愉快!") |
| | | } |
| | | }); |
| | | |
| | | //头工具栏事件 |
| | | table.on('toolbar(demo)', function(obj){ |
| | |
| | | if (data.length == 0) { |
| | | layer.alert("请选中一条数据") |
| | | } else { |
| | | layer.confirm("此操作将永久删除该数据, 是否继续?",{icon: 3, title:'提示'}, function () { |
| | | var nums = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | nums.push(JSON.stringify(data[i].id)) |
| | | var datas = "num=" + JSON.stringify(data[i].id)+"&caozuoname="+getUserName |
| | | $.post("/HxzkFlow/hxzk/DeleteTbFuwuqi", datas, function (data) { |
| | | |
| | | location.reload(); |
| | | }); |
| | | } |
| | | layer.alert("删除成功") |
| | | }) |
| | | } |
| | | |
| | | layui.table.reload('demo') |
| | | // layui.table.reload('demo') |
| | | break; |
| | | case 'getUpdate': |
| | | var data = checkStatus.data; |
| | |
| | | $(".heimu").show(); |
| | | } |
| | | function canseladd(){ |
| | | $(".send").hide(); |
| | | $(".add").hide(); |
| | | $(".heimu").hide(); |
| | | } |
| | |
| | | location.reload(); |
| | | }, 500); |
| | | } |
| | | |
| | | function checksend() { |
| | | console.log("11111111111111111") |
| | | console.log($("#phone").val()) |
| | | var add1 = $("#phone").val(); |
| | | if (add1 == "" || add1 == null) { |
| | | layer.alert("请输入发送电话") |
| | | return false; |
| | | } |
| | | if (add1.length!=11) { |
| | | layer.alert("手机号有误!") |
| | | return false; |
| | | } |
| | | } |
| | | </script> |
| | | </html> |