| | |
| | | </style> |
| | | <title>Title</title> |
| | | <style> |
| | | |
| | | .panbox{ |
| | | .layui-layout-admin .layui-body { |
| | | position: absolute; |
| | | padding-bottom: -44px; |
| | | } |
| | | .layui-btn-disabled { |
| | | pointer-events: none; /* 使按钮不可点击 */ |
| | | opacity: 0.6; /* 降低不透明度以显示禁用状态 */ |
| | | } |
| | | .panbox { |
| | | width: 540px; |
| | | height: 130px; |
| | | float: left; |
| | |
| | | </head> |
| | | <body> |
| | | |
| | | <form class="layui-form layui-row layui-col-space16" style="width: 1672px;margin-left: 12px;padding-bottom: 10px"> |
| | | <div class="layui-col-md4" style="position: relative;top: 30px;z-index: 999;width: 150px;left: 500px"> |
| | | <form class="layui-form layui-row layui-col-space16" style="width: 1672px;margin-left: 12px;padding-bottom: -60px"> |
| | | <div class="layui-col-md4" style="position: relative;top: 18px;z-index: 999;width: 150px;left: 500px" id="cardnum"> |
| | | <div class="layui-input-wrap"> |
| | | <input type="text" name="cardnumber" style="width: 220px" value="" placeholder="请输入卡号" class="layui-input" lay-affix="clear"> |
| | | <input type="text" name="cardnumber" style="width: 220px" value="" placeholder="请输入卡号" |
| | | class="layui-input" lay-affix="clear"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md4" style="margin-left: 20px"> |
| | | <div class="layui-input-wrap" style="position: relative;top: 30px;z-index: 999;width: 150px;left: 560px"> |
| | | <input type="text" name="company" style="width: 150px" placeholder="请输入所属公司" lay-affix="clear" class="layui-input"> |
| | | <div class="layui-col-md4" style="margin-left: 20px" id="hide"> |
| | | <div class="layui-input-wrap" style="position: relative;top: 18px;z-index: 999;width: 150px;left: 560px"> |
| | | <input type="text" name="company" style="width: 150px" placeholder="请输入所属公司" lay-affix="clear" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <%-- <div class="layui-col-md4" style="float: left;width: 551px;margin-left: 4px">--%> |
| | | <%-- <div class="layui-input-wrap" style="position: relative;top: 89px;z-index: 99999;width: 150px;left: 92px">--%> |
| | | <%-- <input type="text" name="bindid" style="width: 150px" placeholder="请输入绑定设备" lay-affix="clear" class="layui-input">--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <button style="position: relative;top: 36.5px;z-index: 999;width: 70px;left: -400px" id="relo" class="layui-btn layui-btn-normal" lay-filter="demo-table-search1">刷新</button> |
| | | <button style="position: relative;top: 36.5px;z-index: 999;width: 80px;left: 90px" class="layui-btn layui-btn-normal" lay-submit lay-filter="demo-table-search" lay-event="getselect">查询</button> |
| | | <button style="position: relative;top: 25px;z-index: 999;width: 70px;left: -400px" id="relo" |
| | | class="layui-btn layui-btn-normal" lay-filter="demo-table-search1">刷新 |
| | | </button> |
| | | <button style="position: relative;top: 25px;z-index: 999;width: 80px;left: 90px" class="layui-btn layui-btn-normal" |
| | | lay-submit lay-filter="demo-table-search" lay-event="getselect" id="select">查询 |
| | | </button> |
| | | </form> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container" style="margin-left: 0px;margin-top: 20px;display: inline-block"> |
| | | <button class="layui-btn" lay-event="getadd">新增</button> |
| | | <button class="layui-btn layui-btn-warm" onclick="update()" lay-event="getUpdate">修改</button> |
| | | <button class="layui-btn layui-btn-danger" lay-event="getDelete">删除</button> |
| | | <button class="layui-btn" lay-event="getchongzhi">充值</button> |
| | | <%--<script type="text/html" >--%> |
| | | <div style="margin-left: 0px;display: inline-block" id="toolbarDemo"> |
| | | <button class="layui-btn " id="btn-add" lay-event="getadd">新增</button> |
| | | <button class="layui-btn layui-btn-warm" id="btn-update" lay-event="getUpdate">修改</button> |
| | | <button class="layui-btn layui-btn-danger" id="btndelete" lay-event="getDelete">删除</button> |
| | | <button class="layui-btn" lay-event="getchongzhi">充值</button> |
| | | </div> |
| | | <%--</script>--%> |
| | | |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="toolbarDemo1" > |
| | | <div class="layui-btn-container" style="margin-left: 0px;display: inline-block" > |
| | | <button class="layui-btn" lay-event="getchongzhi">充值</button> |
| | | </div> |
| | | <div class="layui-btn-container" style="margin-left: 0px;margin-top: 20px;display: inline-block" id="toolbarDemo2"> |
| | | |
| | | <script type="text/html" id="toolbarDemo1"> |
| | | <div class="layui-btn-container" style="margin-left: 0px;margin-top: 20px;display: inline-block"> |
| | | <button class="layui-btn" lay-event="getchongzhi">充值</button> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | <div style="display: inline-block;width: 100%;margin-top: -60px"> |
| | | <div style="display: inline-block;width: 100%;margin-top: -80px"> |
| | | <table id="demo" lay-filter="demo"></table> |
| | | </div> |
| | | <%--<div class="heimu" style="display: none;width: 100%;height: 100%;position: fixed;top: 0px;left: 0px;z-index: 9999;background-color: black;opacity: 0.8"></div>--%> |
| | | <div class="add" 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"> |
| | | <div class="add1" |
| | | 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" lay-filter="example" onsubmit="return checkadd()"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属公司:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="company" id="companyadd1" lay-verify="title" autocomplete="off" placeholder="" onkeyup="xzGongSi()" onfocus="xz()" class="layui-input"> |
| | | <input type="text" name="company" id="companyadd1" lay-verify="title" autocomplete="off" placeholder="" |
| | | onkeyup="xzGongSi()" onfocus="xz()" class="layui-input"> |
| | | </div> |
| | | <div style="width:488px;height: 400px;overflow-y: scroll;border: 1px solid #EEEEEE;border-top: none;position: absolute;left: 160px;z-index: 999;background-color: white;display: none" id="ZsGs"> |
| | | <div style="width:488px;height: 400px;overflow-y: scroll;border: 1px solid #EEEEEE;border-top: none;position: absolute;left: 160px;z-index: 999;background-color: white;display: none" |
| | | id="ZsGs"> |
| | | <c:forEach items="${suoshu}" var="k"> |
| | | <p onclick="xzGong('${k.companyname}')" style="cursor: pointer;height: 40px;line-height: 40px;padding-left: 10px;border-bottom: 1px solid #f6f6f6">${k.companyname}</p> |
| | | <p onclick="xzGong('${k.companyname}')" |
| | | style="cursor: pointer;height: 40px;line-height: 40px;padding-left: 10px;border-bottom: 1px solid #f6f6f6">${k.companyname}</p> |
| | | </c:forEach> |
| | | |
| | | </div> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">卡号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="cardnumber" id="cardnumberadd1" lay-verify="title" autocomplete="off" placeholder="请输入卡号,N个卡号需要 ; 分隔" class="layui-input"> |
| | | <input type="text" name="cardnumber" id="cardnumberadd1" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入卡号,N个卡号需要 ; 分隔" 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="carddate" id="carddateadd1" placeholder="请输入密码" autocomplete="off" class="layui-input"> |
| | | <input type="date" name="carddate" id="carddateadd1" placeholder="请输入密码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">选择流量:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="flow" lay-filter="ddtt" id="flowadd1"> |
| | | <select name="flow" lay-filter="ddtt" id="flowadd1"> |
| | | <option value=""></option> |
| | | <option value="12G/年">12G/年</option> |
| | | <option value="24G/年">24G/年</option> |
| | | <option value="36G/年">36G/年</option> |
| | | <option value="100G/年">100G/年</option> |
| | | <option value="100G/年">100G/年</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">运营商:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="operator" id="operatoradd1" lay-filter="aihao" > |
| | | <select name="operator" id="operatoradd1" lay-filter="aihao"> |
| | | <option value=""></option> |
| | | <option value="移动" >移动</option> |
| | | <option value="联通" >联通</option> |
| | | <option value="移动">移动</option> |
| | | <option value="联通">联通</option> |
| | | <option value="电信">电信</option> |
| | | </select> |
| | | </div> |
| | |
| | | <%-- <input type="text" lay-verify="number" name="nTopAmount" value="0.000" onblur="value=zhzs(this.value)" class="layui-input"/>--%> |
| | | |
| | | <%-- <span id="feiyong" style="margin-top: 10px;display: inline-block;margin-left: 10px"></span>--%> |
| | | <input type="text" id="feiyongadd" name="unitprice" lay-verify="number" value="0" onblur="value=zhzs(this.value)" autocomplete="off" placeholder="" class="layui-input"> |
| | | <input type="text" id="feiyongadd" name="unitprice" lay-verify="number" value="0" |
| | | onblur="value=zhzs(this.value)" autocomplete="off" placeholder="" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item" > |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 20% ;margin-left: -40px">绑定设备ID:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="bindid" id="bindidadd1" lay-verify="title" autocomplete="off" placeholder="请输入绑定设备ID,N个格式同于卡号" class="layui-input"> |
| | | <input type="text" name="bindid" id="bindidadd1" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入绑定设备ID,N个格式同于卡号" 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="location" id="locationadd1" 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="location" id="locationadd1" 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="notes" id="notesadd1" lay-verify="title" autocomplete="off" placeholder="选填" class="layui-input"> |
| | | <input type="text" name="notes" id="notesadd1" 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"> |
| | | <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-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> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canseladd()" |
| | | style="margin-left: 200px">取消 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <div class="chongzhi" style="display: none;width: 500px;background-color: white;border-radius: 20px;border: 1px solid #ccc;padding: 50px;position: fixed;top: 150px;left: 500px;z-index: 99999"> |
| | | <div class="chongzhi" |
| | | style="display: none;width: 500px;background-color: white;border-radius: 20px;border: 1px solid #ccc;padding: 50px;position: fixed;top: 150px;left: 500px;z-index: 99999"> |
| | | <form class="layui-form" action="" lay-filter="example"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">卡号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="username" disabled id="cardnumber" lay-verify="title" autocomplete="off" placeholder="请选择卡号" class="layui-input"> |
| | | <input type="text" name="username" disabled id="cardnumber" lay-verify="title" autocomplete="off" |
| | | placeholder="请选择卡号" class="layui-input"> |
| | | <span class="hao" style="color: red;margin-top: 9px;display: inline-block"></span> |
| | | </div> |
| | | </div> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">选择流量</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <select name="interest" lay-filter="ddtt" id="flow">--%> |
| | | <%-- <option value=""></option>--%> |
| | | <%-- <option value="12">12G/年</option>--%> |
| | | <%-- <option value="24">24G/年</option>--%> |
| | | <%-- <option value="36">36G/年</option>--%> |
| | | <%-- </select>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">选择流量:</label> |
| | | <div class="layui-input-block"> |
| | | <select name="flow" lay-filter="ddtt" id="flowc"> |
| | | <option value=""></option> |
| | | <option value="12G/年">12G/年</option> |
| | | <option value="24G/年">24G/年</option> |
| | | <option value="36G/年">36G/年</option> |
| | | <option value="100G/年">100G/年</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="chongzhi"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单价/元:</label> |
| | | <div class="layui-input-block"> |
| | | <span id="feiyong" name = "unitprice" style="margin-top: 10px;display: inline-block;margin-left: 10px"></span> |
| | | <%-- <input type="text" id="feiyong" name="username" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">--%> |
| | | <%-- <span id="feiyong" name="unitprice"--%> |
| | | <%-- style="margin-top: 10px;display: inline-block;margin-left: 10px"></span>--%> |
| | | <input type="text" id="feiyong" name="unitprice" lay-verify="title" disabled placeholder="" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="chongzhi"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">总价:</label> |
| | | <label class="layui-form-label">总价/元:</label> |
| | | <div class="layui-input-block"> |
| | | <span id="zongjia" name = "zongjia" style="margin: 10px;display: inline-block"></span> |
| | | <%-- <input type="text" id="zongjia" name="zongjia" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">--%> |
| | | <span id="zongjia" name="zongjia" style="margin: 10px;display: inline-block"></span> |
| | | <%-- <input type="text" id="zongjia" name="zongjia" lay-verify="title" autocomplete="off" placeholder="" class="layui-input">--%> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <input type="button" class="layui-btn" value="立即提交" onclick="chongzhitj()"></input> |
| | | <button type="reset" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canselchongzhi()" style="margin-left: 200px">取消</button> |
| | | <button type="reset" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canselchongzhi()" |
| | | style="margin-left: 200px">取消 |
| | | </button> |
| | | </div> |
| | | </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"> |
| | | <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/Update" 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">绑定设备ID:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="bindid" lay-verify="title" autocomplete="off" placeholder="请输入设备ID" class="layui-input"> |
| | | <input type="text" name="bindid" lay-verify="title" autocomplete="off" placeholder="请输入设备ID" |
| | | 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="location" 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="location" 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="notes" lay-verify="title" autocomplete="off" placeholder="请输入备注" class="layui-input"> |
| | | <input type="text" name="notes" lay-verify="title" autocomplete="off" placeholder="请输入备注" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="chongzhi"> |
| | |
| | | <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> |
| | | <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()"> |
| | | <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" name="num" style="display: none" class="upnum"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">卡号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="cardnumber" id="xgkh" lay-verify="title" autocomplete="off" placeholder="请输入设备ID" class="layui-input"> |
| | | <input type="text" name="cardnumber" id="xgkh" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入设备ID" 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="company" id="xggs" disabled lay-verify="title" autocomplete="off" placeholder="请输入所属公司" class="layui-input"> |
| | | <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="date" id="carddateu" name="carddate" lay-verify="title" autocomplete="off" placeholder="请输入开始日期" class="layui-input"> |
| | | <input type="date" id="carddateu" name="carddate" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入开始日期" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <%-- <input type="text" lay-verify="number" name="nTopAmount" value="0.000" onblur="value=zhzs(this.value)" class="layui-input"/>--%> |
| | | |
| | | <%-- <span id="feiyong" style="margin-top: 10px;display: inline-block;margin-left: 10px"></span>--%> |
| | | <input type="text" id="unitpriceu" name="unitprice" lay-verify="number" value="0" onblur="value=zhzs(this.value)" autocomplete="off" placeholder="" class="layui-input"> |
| | | <input type="text" id="unitpriceu" name="unitprice" lay-verify="number" value="0" |
| | | onblur="value=zhzs(this.value)" autocomplete="off" placeholder="" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">结束日期:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" name="enddate" id="enddateu" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input"> |
| | | <input type="date" name="enddate" id="enddateu" 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"> |
| | | <select name="operator" id="operatoru" lay-filter="operatoru" > |
| | | <option value="移动" >移动</option> |
| | | <option value="联通" >联通</option> |
| | | <option value="电信" >电信</option> |
| | | <select name="operator" id="operatoru" lay-filter="operatoru"> |
| | | <option value="移动">移动</option> |
| | | <option value="联通">联通</option> |
| | | <option value="电信">电信</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">运营商信息:</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <input type="text" name="operator" id="operatoru"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="operator" id="operatoru"lay-verify="title" autocomplete="off" placeholder="请输入备注" class="layui-input" disabled>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <div class="chongzhi"> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <button type="submit" class="layui-btn" lay-filter="demoupdate">立即提交</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canselupdate()" style="margin-left: 200px">取消</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="update2" |
| | | 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/Update" 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">绑定设备ID:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="bindid" lay-verify="title" autocomplete="off" placeholder="请输入设备ID" |
| | | 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="location" 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="notes" lay-verify="title" autocomplete="off" placeholder="请输入备注" |
| | | class="layui-input"> |
| | | </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="updateZong2" |
| | | 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 checkupdate2()"> |
| | | <input type="text" name="num" style="display: none" class="upnum2"/> |
| | | <div class="layui-form-item" style="display: none"> |
| | | <label class="layui-form-label">卡号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" disabled name="cardnumber" id="cardnumber2" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入设备ID" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">序号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" disabled name="num" id="cardid" lay-verify="title" autocomplete="off" |
| | | placeholder="请输入序号设备ID" 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="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="date" id="carddateu2" name="carddate" 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"> |
| | | <%-- <input type="text" lay-verify="number" name="nTopAmount" value="0.000" onblur="value=zhzs(this.value)" class="layui-input"/>--%> |
| | | |
| | | <%-- <span id="feiyong" style="margin-top: 10px;display: inline-block;margin-left: 10px"></span>--%> |
| | | <input type="text" id="unitpriceu2" name="unitprice" lay-verify="number" value="0" |
| | | onblur="value=zhzs(this.value)" autocomplete="off" placeholder="" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">结束日期:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" name="enddate" id="enddateu2" 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">--%> |
| | | <%-- <select name="flow" id="flowu" lay-filter="ddtt">--%> |
| | | <%-- <option value="12G/年">12G/年</option>--%> |
| | | <%-- <option value="24G/年">24G/年</option>--%> |
| | | <%-- <option value="36G/年">36G/年</option>--%> |
| | | <%-- <option value="100G/年">100G/年</option>--%> |
| | | <%-- </select>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">运营商:</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <select name="operator" id="operatoru" lay-filter="operatoru" >--%> |
| | | <%-- <option value="移动" >移动</option>--%> |
| | | <%-- <option value="联通" >联通</option>--%> |
| | | <%-- <option value="电信" >电信</option>--%> |
| | | <%-- </select>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="layui-form-item">--%> |
| | | <%-- <label class="layui-form-label">运营商信息:</label>--%> |
| | | <%-- <div class="layui-input-block">--%> |
| | | <%-- <input type="text" name="operator" id="operatoru"lay-verify="title" autocomplete="off" placeholder="请输入备注" class="layui-input" disabled>--%> |
| | | <%-- </div>--%> |
| | | <%-- </div>--%> |
| | | <%-- <div class="chongzhi">--%> |
| | | <%-- </div>--%> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <button type="submit" class="layui-btn" lay-filter="demoupdate">立即提交</button> |
| | | <button type="button" class="layui-btn layui-btn-normal" lay-filter="demo1" onclick="canselupdate2()" |
| | | style="margin-left: 200px">取消 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | |
| | | {{# } else if(d.status === '已到期') { }} |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger">已到期</button> |
| | | {{# } else if(d.status === '预销户') { }} |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-primary layui-btn-primary layui-bg-blue">预销户</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-primary layui-btn-primary layui-bg-blue">预销户 |
| | | </button> |
| | | {{# } else if(d.status === '已销户') { }} |
| | | <button class="layui-btn layui-btn-sm layui-btn layui-bg-cyan" >已销户</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn layui-bg-cyan">已销户</button> |
| | | {{# } else { }} |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-primary layui-btn-primary layui-btn-primary">未知</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary layui-btn-primary layui-btn-primary layui-btn-primary"> |
| | | 未知 |
| | | </button> |
| | | {{# } }} |
| | | </script> |
| | | </body> |
| | |
| | | <script src="../js/jquery-3.5.1.js"></script> |
| | | <script> |
| | | var qb = localStorage.getItem("gsjc") |
| | | var data = "qb="+qb |
| | | |
| | | var data = "qb=" + qb |
| | | var getUserName = localStorage.getItem("getUserName") |
| | | var chongzhiCompany = ""; |
| | | |
| | | var accessKey = "448c2cedcdce41428a290d144e81ab6e" |
| | |
| | | for (var i = 30; i > 0; --i) |
| | | nonce += str[Math.floor(Math.random() * str.length)]; |
| | | |
| | | var stringSignTemp = accessKey+nonce+formattedTime |
| | | var stringSignTemp = accessKey + nonce + formattedTime |
| | | |
| | | function zhzs(value) { |
| | | value = value.replace(/[^\d]/g, '').replace(/^0{1,}/g, ''); |
| | | if (value != '') |
| | |
| | | value = parseFloat(0).toFixed(0); |
| | | return value; |
| | | } |
| | | |
| | | // layui.use('form', function(){ |
| | | // var form = layui.form; |
| | | // form.render('select'); // 重新渲染select框 |
| | | // }); |
| | | function xzGongSi(){ |
| | | function xzGongSi() { |
| | | var company = $("#companyadd1").val(); |
| | | var data = "companyname="+company |
| | | $.post("/HxzkFlow/hxzk/MoHuGongSi",data,function (data){ |
| | | var data = "companyname=" + company |
| | | $.post("/HxzkFlow/hxzk/MoHuGongSi", data, function (data) { |
| | | var str = []; |
| | | if(data.length !=0){ |
| | | for(var i = 0; i < data.length;i++){ |
| | | if (data.length != 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | $("#ZsGs").empty(); |
| | | data[i].company = "'"+data[i].companyname+"'" |
| | | str += '<p onclick="xzGong('+data[i].company+')" style="cursor: pointer;height: 40px;line-height: 40px;padding-left: 10px;border-bottom: 1px solid #f6f6f6">'+data[i].companyname+'</p>' |
| | | data[i].company = "'" + data[i].companyname + "'" |
| | | str += '<p onclick="xzGong(' + data[i].company + ')" style="cursor: pointer;height: 40px;line-height: 40px;padding-left: 10px;border-bottom: 1px solid #f6f6f6">' + data[i].companyname + '</p>' |
| | | } |
| | | } |
| | | $("#ZsGs").append(str) |
| | | }) |
| | | $("#ZsGs").show() |
| | | } |
| | | function xz(){ |
| | | |
| | | function xz() { |
| | | $("#ZsGs").show() |
| | | } |
| | | function xzGong(id){ |
| | | |
| | | function xzGong(id) { |
| | | $("#companyadd1").val(id) |
| | | $("#ZsGs").hide() |
| | | } |
| | | |
| | | function clasp(){ |
| | | function clasp() { |
| | | var items = new Array(); |
| | | items = $("#operatoradd1 option:selected"); |
| | | //此处取到了每个item,items[i].text则取到的是option中的文字,下面取到的是value属性 |
| | | for(var i = 0;i<items.length;i++){ |
| | | for (var i = 0; i < items.length; i++) { |
| | | itemTitle = items[i].value; |
| | | } |
| | | console.log(itemTitle) |
| | | console.log(items) |
| | | } |
| | | if(qb === "华星智控"){ |
| | | // url: 'https://api.spruceiot.cn/api/v1/sim/detail/query', |
| | | //查找所有卡号 |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/proxyfindCard', |
| | | // method: 'POST', |
| | | // data: { |
| | | // }, |
| | | // success: function (data) { |
| | | // var str = ""; |
| | | // var num = 0; |
| | | // for (var i =2880; i<2894; i++){ |
| | | // num++ |
| | | // if (num == 90){ |
| | | // str += data[i].cardnumber |
| | | // }else{ |
| | | // str += data[i].cardnumber+"," |
| | | // } |
| | | // } |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/wlk', |
| | | // data: { |
| | | // Nonce: nonce, |
| | | // Timestamp: formattedTime, |
| | | // targetUrl: "https://api.spruceiot.cn/api/v1/sim/detail/batch/query", |
| | | // targetUrl1: "?cNo="+str |
| | | // }, |
| | | // success: function (data) { |
| | | // var zflow ="" //套餐总量 |
| | | // var syflow = ""//套餐已用 |
| | | // var operator = "" //运营商 |
| | | // var carddate = "" // 开始日期 录入日期 |
| | | // var enddate = "" //结束日期 |
| | | // for (var i = 0; i <data.result.length;i++){ |
| | | // var sy = parseInt(data.result[i].dataLimit-data.result[i].dataUsage) |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/proxyupXinXi', |
| | | // method:'POST', |
| | | // data:{ |
| | | // cardnumber:data.result[i].msisdn, |
| | | // zflow:data.result[i].dataLimit, |
| | | // syflow:sy, |
| | | // operator:data.result[i].operators, |
| | | // carddate:data.result[i].serviceStartDate, |
| | | // enddate:data.result[i].serviceEndDate, |
| | | // enterdate:data.result[i].serviceStartDate |
| | | // }, |
| | | // success:function (data){ |
| | | // console.log(data) |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | if (qb === "华星智控") { |
| | | var add = localStorage.getItem("getadd") |
| | | var up = localStorage.getItem("getup") |
| | | var getde = localStorage.getItem("getde") |
| | | console.log(getde) |
| | | if (add == 1) { |
| | | var button = document.getElementById('btn-add'); |
| | | // 设置样式属性来隐藏按钮 |
| | | button.classList.add('layui-btn-disabled'); |
| | | } |
| | | if (up == 1) { |
| | | var button = document.getElementById('btn-update'); |
| | | |
| | | //查找流量池名称 |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/wlk', |
| | | // data: { |
| | | // Nonce: nonce, |
| | | // Timestamp: formattedTime, |
| | | // targetUrl: "https://api.spruceiot.cn/api/v1/pool/list/query", |
| | | // targetUrl1: "?queryType=0&pageIndex=1&pageSize=100" |
| | | // }, |
| | | // success: function (data) { |
| | | // |
| | | // for (var i = 0; i<data.result.list.length;i++){ |
| | | // console.log(data.result.list[i].name) |
| | | // } |
| | | // } |
| | | // }) |
| | | // 设置式属性来隐藏按钮 |
| | | button.classList.add('layui-btn-disabled'); |
| | | } |
| | | if (getde == 1) { |
| | | var button = document.getElementById('btndelete'); |
| | | |
| | | //更改卡号公司名称 |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/wlk', |
| | | // data: { |
| | | // Nonce: nonce, |
| | | // Timestamp: formattedTime, |
| | | // targetUrl: "https://api.spruceiot.cn/api/v1/pool/member/query", |
| | | // targetUrl1: "?poolID=80&pageIndex=1&pageSize=100" |
| | | // }, |
| | | // success: function (data) { |
| | | // |
| | | // for(var i =0; i<data.result.list.length;i++){ |
| | | // console.log(data.result.list[i].msisdn) |
| | | // $.ajax({ |
| | | // url: '/HxzkFlow/hxzk/proxyCardcompanyUp', |
| | | // method: 'POST', |
| | | // data:{ |
| | | // card:data.result.list[i].msisdn, |
| | | // name:"华星北斗移动1G共享池" |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | |
| | | // $.ajax({ |
| | | // url:'/HxzkFlow/hxzk/proxyCardList', |
| | | // method:"post", |
| | | // data:{ |
| | | // Nonce:nonce, |
| | | // Timestamp:formattedTime, |
| | | // targetUrl:"https://api.spruceiot.cn/api/v1/sim/list/query", |
| | | // targetUrl1:"?pageIndex=1&pageSize=100" |
| | | // }, |
| | | // success:function (data) { |
| | | // //把所有卡号存入数据库: |
| | | // console.log(data.result.total) |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | |
| | | |
| | | $.get("/HxzkFlow/hxzk/chawu",function (data){ |
| | | // 使按钮不可点击 |
| | | button.classList.add('layui-btn-disabled'); |
| | | } |
| | | $.get("/HxzkFlow/hxzk/chawu", function (data) { |
| | | $(".zk").text(data[0]) |
| | | $(".by").text(data[1]) |
| | | $(".cy").text(data[2]) |
| | | $(".dw").text(data[3]) |
| | | $(".jjdl").text(data[4]) |
| | | }) |
| | | setInterval(function() { |
| | | $.get("/HxzkFlow/hxzk/chawu",function (data){ |
| | | setInterval(function () { |
| | | $.get("/HxzkFlow/hxzk/chawu", function (data) { |
| | | $(".zk").text(data[0]) |
| | | $(".by").text(data[1]) |
| | | $(".cy").text(data[2]) |
| | |
| | | $(".jjdl").text(data[4]) |
| | | }) |
| | | }, 60000); |
| | | } else if (qb === "访客"){ |
| | | // document.getElementById('btn-add').style.display = 'none'; |
| | | // document.getElementById('btn-update').style.display = 'none'; |
| | | // document.getElementById('btndelete').style.display = 'none'; |
| | | |
| | | }else{ |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 判断用户在规定的时间内没有操作系统,则刷新浏览器 |
| | | * 参数:时间(单位分钟) |
| | | * */ |
| | | function timeUserFun(time){ |
| | | function timeUserFun(time) { |
| | | var time = time || 2; |
| | | var userTime = 3600; |
| | | var objTime = { |
| | | init:0, |
| | | time:function(){ |
| | | init: 0, |
| | | time: function () { |
| | | objTime.init += 1; |
| | | if(objTime.init === userTime){// 达到限制时间时,用户未操作事件,则刷新整个页面 |
| | | if (objTime.init === userTime) {// 达到限制时间时,用户未操作事件,则刷新整个页面 |
| | | localStorage.removeItem("gsjc") |
| | | sessionStorage.removeItem("admin") |
| | | alert("您长时间未操作当前页面,请重新登录") |
| | | var data = "Zong="+sessionStorage.getItem("admin"); |
| | | var data = "Zong=" + sessionStorage.getItem("admin"); |
| | | //获取该用户最新时间 |
| | | $.post("/HxzkFlow/hxzk/userdate",data,function (data){ |
| | | $.post("/HxzkFlow/hxzk/userdate", data, function (data) { |
| | | |
| | | }) |
| | | parent.location.reload() |
| | | //达到限制时间没操作,所要执行的动作 |
| | | } |
| | | }, |
| | | eventFun:function(){ |
| | | eventFun: function () { |
| | | //清除上次监听,重新开始新的监听 |
| | | clearInterval(testUser); |
| | | objTime.init = 0; |
| | | testUser = setInterval(objTime.time,1000); |
| | | testUser = setInterval(objTime.time, 1000); |
| | | } |
| | | }; |
| | | //监听当前时间流动 |
| | | var testUser = setInterval(objTime.time,1000); |
| | | var testUser = setInterval(objTime.time, 1000); |
| | | |
| | | //监听相应事件 |
| | | var body = document.querySelector('html'); |
| | | body.addEventListener("click",objTime.eventFun); |
| | | body.addEventListener("keydown",objTime.eventFun); |
| | | body.addEventListener("mousemove",objTime.eventFun); |
| | | body.addEventListener("mousewheel",objTime.eventFun); |
| | | body.addEventListener("click", objTime.eventFun); |
| | | body.addEventListener("keydown", objTime.eventFun); |
| | | body.addEventListener("mousemove", objTime.eventFun); |
| | | body.addEventListener("mousewheel", objTime.eventFun); |
| | | } |
| | | |
| | | (function () { |
| | | timeUserFun(1); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | layui.use(['layer', 'form'], function(){ |
| | | layui.use(['layer', 'form'], function () { |
| | | var layer = layui.layer |
| | | ,form = layui.form; |
| | | , form = layui.form; |
| | | |
| | | |
| | | //从本地存储获取用户登录信息,如果是子账号,只显示else 如果是总账号显示if |
| | | layui.use('table', function(){ |
| | | layui.use('table', function () { |
| | | var table = layui.table; |
| | | |
| | | var Zong = localStorage.getItem("gsjc") |
| | | var data ="Zong="+Zong |
| | | if(Zong == null){ |
| | | }else{ |
| | | $.post("/HxzkFlow/hxzk/jiemi",data,function (data){ |
| | | if(data == "1"){ |
| | | var data = "Zong=" + Zong |
| | | |
| | | if (Zong == null) { |
| | | } else { |
| | | |
| | | |
| | | $.post("/HxzkFlow/hxzk/jiemi", data, function (data) { |
| | | if (data == "1") { |
| | | |
| | | // form.render(); |
| | | // $("#hide").hide(); |
| | | // $("#relo").css("left","-60px") |
| | | // $("#select").css("left","620px") |
| | | // $("#cardnum").css("left","620px") |
| | | table.render({ |
| | | elem: '#demo' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,height: 780 |
| | | ,url: '/HxzkFlow/hxzk/FindCard' //数据接口 |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | , url: '/HxzkFlow/hxzk/FindCard' //数据接口 |
| | | // ,cellMinWidth: 80 |
| | | ,width: 1680 |
| | | ,autoWidth: true |
| | | ,page: true //开启分页 |
| | | ,toolbar:'#toolbarDemo' |
| | | ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | , width: 1680 |
| | | , autoWidth: true |
| | | , page: true //开启分页 |
| | | , toolbar: '#toolbarDemo' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,icon: 'layui-icon-tips' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , icon: 'layui-icon-tips' |
| | | }] |
| | | ,cols: [[ //表头 |
| | | {type:'checkbox',sort: true,fixed: "left"} |
| | | ,{field: 'num', title: '序号', sort: true,width:'75'} |
| | | ,{field: 'company', title: '所属公司', width:'250'} |
| | | ,{field: 'cardnumber', title: '卡号', sort: true,width:'200'} |
| | | ,{field:'status', title: '状态',templet: '#titleTpl',width:'90'} |
| | | ,{field: 'flow', title: '流量', sort: true,width:'80'} |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left"} |
| | | , {field: 'num', title: '序号', sort: true, width: '75'} |
| | | , {field: 'company', title: '所属公司', width: '250'} |
| | | , {field: 'cardnumber', title: '卡号', sort: true, width: '200'} |
| | | , {field: 'status', title: '状态', templet: '#titleTpl', width: '90'} |
| | | , {field: 'flow', title: '流量', sort: true, width: '80'} |
| | | // ,{field: 'zflow', title: '总流量(MB)', } |
| | | // ,{field: 'syflow', title: '已用流量(MB)', } |
| | | ,{field: 'remainingdays', title: '剩余天数', width:'85'} |
| | | , {field: 'remainingdays', title: '剩余天数', width: '85'} |
| | | // ,{field: 'syll', title: '剩余流量(MB)', } |
| | | ,{field: 'carddate', title: '开始日期', sort: true,width:'110'} |
| | | ,{field: 'operator', title: '运营商', sort: true,width:'110'} |
| | | , {field: 'carddate', title: '开始日期', sort: true, width: '110'} |
| | | , {field: 'operator', title: '运营商', sort: true, width: '110'} |
| | | |
| | | ,{field: 'unitprice', title: '单价', sort: true,width:'75'} |
| | | ,{field: 'bindid', title: '绑定设备',width:'90'} |
| | | , {field: 'unitprice', title: '单价', sort: true, width: '75'} |
| | | , {field: 'bindid', title: '绑定设备', width: '90'} |
| | | // ,{field: 'location', title: '所在地', sort: true} |
| | | // ,{field: 'notes', title: '备注', sort: true} |
| | | ,{field: 'enddate', title: '结束日期', sort: true,width:'110'} |
| | | ,{field: 'enterdate', title: '录入日期', sort: true,width:'110'} |
| | | ,{field: 'rechargedate', title: '最近充值日期', sort: true,width:'110'} |
| | | ,{field: 'rechargemoney', title: '充值金额', sort: true,width:'100'} |
| | | , {field: 'enddate', title: '结束日期', sort: true, width: '110'} |
| | | , {field: 'enterdate', title: '录入日期', sort: true, width: '110'} |
| | | , {field: 'rechargedate', title: '最近充值日期', sort: true, width: '110'} |
| | | , {field: 'rechargemoney', title: '充值金额', sort: true, width: '100'} |
| | | |
| | | |
| | | ]], |
| | | limit:100, |
| | | limits:[10,20,30,40,50,60,70,80,90,100], |
| | | limit: 100, |
| | | limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], |
| | | }); |
| | | }else{ |
| | | $("#relo").css("left","-620px") |
| | | var Zi = localStorage.getItem("gsmc") |
| | | var dt ="Zong="+Zi |
| | | $.post("/HxzkFlow/hxzk/chaZi",dt,function (data){ |
| | | var jc = Zi; |
| | | } else { |
| | | if (Zong=="访客"){ |
| | | // $("#relo").hide(); |
| | | $("#select").css("left", "160px") |
| | | // $("#relo").css("left", "-60px") |
| | | table.render({ |
| | | elem: '#demo' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,height: 780 |
| | | ,url: '/HxzkFlow/hxzk/FindCardZi?Zong='+jc //数据接口 |
| | | ,cellMinWidth: 80 |
| | | ,page: true //开启分页 |
| | | ,limit: 100 |
| | | ,toolbar:'#toolbarDemo1' |
| | | ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | , url: '/HxzkFlow/hxzk/FindCard' //数据接口 |
| | | // ,cellMinWidth: 80 |
| | | , width: 1680 |
| | | , autoWidth: true |
| | | , page: true //开启分页 |
| | | , toolbar: '#toolbarDemo2' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | ,layEvent: 'LAYTABLE_TIPS' |
| | | ,icon: 'layui-icon-tips' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , icon: 'layui-icon-tips' |
| | | }] |
| | | ,cols: [[ //表头 |
| | | {type:'checkbox',sort: true,fixed: "left",top:10} |
| | | ,{field: 'num', title: '序号', sort: true,width:'5%'} |
| | | ,{field: 'cardnumber', title: '卡号', sort: true,width: 210} |
| | | ,{field: 'company', title: '公司', sort: true,width: 220} |
| | | ,{field:'status', title: '状态',templet: '#titleTpl',width: 100} |
| | | ,{field: 'flow', title: '流量', sort: true} |
| | | // ,{field: 'zflow', title: '总流量(MB)',width: 120 } |
| | | // ,{field: 'syflow', title: '已用流量(MB)',sort: true,width: 130 } |
| | | // ,{field: 'syll', title: '剩余流量(MB)', width: 120} |
| | | ,{field: 'remainingdays', title: '剩余天数', } |
| | | ,{field: 'carddate', title: '开始日期', sort: true} |
| | | ,{field: 'operator', title: '运营商', sort: true} |
| | | ,{field: 'enddate', title: '结束日期', sort: true} |
| | | ,{field: 'unitprice', title: '单价', sort: true} |
| | | ,{field: 'rechargedate', title: '最近充值日期', sort: true} |
| | | ,{field: 'rechargemoney', title: '充值金额', sort: true} |
| | | |
| | | |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left"} |
| | | , {field: 'num', title: '序号', sort: true, width: '75'} |
| | | , {field: 'company', title: '所属公司', width: '250'} |
| | | , {field: 'cardnumber', title: '卡号', sort: true, width: '200'} |
| | | , {field: 'status', title: '状态', templet: '#titleTpl', width: '90'} |
| | | , {field: 'flow', title: '流量', sort: true, width: '80'} |
| | | , {field: 'remainingdays', title: '剩余天数', width: '85'} |
| | | , {field: 'carddate', title: '开始日期', sort: true, width: '110'} |
| | | , {field: 'enddate', title: '结束日期', sort: true, width: '110'} |
| | | , {field: 'enterdate', title: '录入日期', sort: true, width: '180'} |
| | | ]], |
| | | limit:100, |
| | | limits:[10,20,30,40,50,60,70,80,90,100], |
| | | limit: 100, |
| | | limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], |
| | | }); |
| | | }) |
| | | }else{ |
| | | $("#hide").hide(); |
| | | $("#relo").css("left", "-60px") |
| | | $("#select").css("left", "620px") |
| | | $("#cardnum").css("left", "620px") |
| | | |
| | | var Zi = localStorage.getItem("gsmc") |
| | | console.log(Zi) |
| | | var dt = "Zong=" + Zi |
| | | var field = data.field; |
| | | $.post("/HxzkFlow/hxzk/chaZi", dt, function (data) { |
| | | var jc = Zi; |
| | | table.render({ |
| | | elem: '#demo' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , height: 850 |
| | | , url: '/HxzkFlow/hxzk/FindCardZi' //数据接口 |
| | | , method: 'post' |
| | | , cellMinWidth: 80 |
| | | , page: true //开启分页 |
| | | , limit: 100 |
| | | , where: {company: Zi} // 搜索的字段 |
| | | , toolbar: '#toolbarDemo1' |
| | | , defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 |
| | | title: '提示' |
| | | , layEvent: 'LAYTABLE_TIPS' |
| | | , icon: 'layui-icon-tips' |
| | | }] |
| | | , cols: [[ //表头 |
| | | {type: 'checkbox', sort: true, fixed: "left", top: 10} |
| | | , {field: 'num', title: '序号', sort: true, width: '5%'} |
| | | , {field: 'cardnumber', title: '卡号', sort: true, width: 210} |
| | | , {field: 'company', title: '公司', sort: true, width: 220} |
| | | , {field: 'status', title: '状态', templet: '#titleTpl', width: 100} |
| | | , {field: 'flow', title: '流量', sort: true} |
| | | // ,{field: 'zflow', title: '总流量(MB)',width: 120 } |
| | | // ,{field: 'syflow', title: '已用流量(MB)',sort: true,width: 130 } |
| | | // ,{field: 'syll', title: '剩余流量(MB)', width: 120} |
| | | , {field: 'remainingdays', title: '剩余天数',} |
| | | , {field: 'carddate', title: '开始日期', sort: true} |
| | | , {field: 'operator', title: '运营商', sort: true} |
| | | , {field: 'enddate', title: '结束日期', sort: true} |
| | | , {field: 'unitprice', title: '单价', sort: true} |
| | | , {field: 'rechargedate', title: '最近充值日期', sort: true} |
| | | , {field: 'rechargemoney', title: '充值金额', sort: true} |
| | | |
| | | |
| | | ]], |
| | | limit: 100, |
| | | limits: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // }, 500); |
| | | |
| | | //头工具栏事件 |
| | | table.on('toolbar(demo)', function(obj){ |
| | | table.on('toolbar(demo)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | var add = localStorage.getItem("getadd") |
| | | var up = localStorage.getItem("getup") |
| | | var getde = localStorage.getItem("getde") |
| | | switch (obj.event) { |
| | | case 'getDelete': |
| | | var data = checkStatus.data; |
| | | if(data.length == 0){ |
| | | layer.alert("请选中一条数据") |
| | | }else{ |
| | | var nums = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | nums.push(JSON.stringify(data[i].num)) |
| | | var datas = "num="+JSON.stringify(data[i].num) |
| | | $.post("/HxzkFlow/hxzk/DeleteCard",datas,function (data){ |
| | | // if (getde==1){ |
| | | // // 获取按钮元素 |
| | | // var button = document.getElementById('myButton'); |
| | | // |
| | | // // 改变按钮颜色 |
| | | // // button.classList.add('layui-btn-custom'); |
| | | // |
| | | // // 使按钮不可点击 |
| | | // button.classList.add('layui-btn-disabled'); |
| | | // layer.alert("您无权限操作") |
| | | // }else{ |
| | | if (data.length == 0) { |
| | | layer.alert("请选中一条数据") |
| | | } else { |
| | | var nums = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | nums.push(JSON.stringify(data[i].num)) |
| | | var datas = "num=" + JSON.stringify(data[i].num)+"&caozuoname="+getUserName |
| | | $.post("/HxzkFlow/hxzk/DeleteCard", datas, function (data) { |
| | | |
| | | }); |
| | | }); |
| | | } |
| | | layer.alert("删除成功") |
| | | } |
| | | layer.alert("删除成功") |
| | | } |
| | | // } |
| | | |
| | | layui.table.reload('demo') |
| | | break; |
| | | case 'getUpdate': |
| | | var data = checkStatus.data; |
| | | if(data.length>1){ |
| | | layer.alert("一次只能选中一个进行修改") |
| | | }else if(data.length == 0){ |
| | | layer.alert("请选中一条数据") |
| | | }else{ |
| | | showUpdate(); |
| | | console.log(data[0]) |
| | | var o = data[0].operator |
| | | console.log("tijiao11111111111") |
| | | $("#card").val(data[0]) |
| | | $("#cardnumber").val(data[0].cardnumber) |
| | | $(".upnum").val(data[0].num); |
| | | $("#xgkh").val(data[0].cardnumber); |
| | | $("#xggs").val(data[0].company); |
| | | $("#carddateu").val(data[0].carddate); |
| | | $("#enddateu").val(data[0].enddate); |
| | | $("#unitpriceu").val(data[0].unitprice); |
| | | $("#operatoru").val(data[0].operator); |
| | | $("#flowu").val(data[0].flow); |
| | | form.render(); |
| | | } |
| | | |
| | | if (data.length > 1) { |
| | | // layer.alert("一次只能选中一个进行修改") |
| | | showUpdate2(); |
| | | var cnum = [] |
| | | var id = [] |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | | console.log(data[i].cardnumber) |
| | | cnum.push(data[i].cardnumber) |
| | | id.push(data[i].num) |
| | | } |
| | | console.log(cnum) |
| | | // $("#card").val(data[0]) |
| | | $("#cardnumber2").val(cnum) |
| | | $("#cardid").val(id) |
| | | // $(".upnum").val(data[0].num); |
| | | // $("#xgkh").val(data[0].cardnumber); |
| | | // $("#xggs").val(data[0].company); |
| | | // $("#carddateu2").val(data[0].carddate); |
| | | // $("#enddateu2").val(data[0].enddate); |
| | | // $("#unitpriceu2").val(data[0].unitprice); |
| | | // $("#operatoru").val(data[0].operator); |
| | | // $("#flowu").val(data[0].flow); |
| | | form.render(); |
| | | } else if (data.length == 0) { |
| | | layer.alert("请选中一条数据") |
| | | } else { |
| | | showUpdate(); |
| | | console.log(data[0]) |
| | | var o = data[0].operator |
| | | console.log("tijiao11111111111") |
| | | $("#card").val(data[0]) |
| | | |
| | | |
| | | $("#cardnumber").val(data[0].cardnumber) |
| | | $(".upnum").val(data[0].num); |
| | | $("#xgkh").val(data[0].cardnumber); |
| | | $("#xggs").val(data[0].company); |
| | | $("#carddateu").val(data[0].carddate); |
| | | $("#enddateu").val(data[0].enddate); |
| | | $("#unitpriceu").val(data[0].unitprice); |
| | | $("#operatoru").val(data[0].operator); |
| | | $("#flowu").val(data[0].flow); |
| | | form.render(); |
| | | } |
| | | // } |
| | | break; |
| | | case 'getadd': |
| | | var data = checkStatus.data; |
| | | add(); |
| | | form.on('select(ddtt)', function(data){ |
| | | // if (add==1){ |
| | | // layer.alert("您无权限操作") |
| | | // }else { |
| | | add1(); |
| | | form.on('select(ddtt)', function (data) { |
| | | |
| | | // console.log(data,11111111) |
| | | // if(data.value == "12G/年"){ |
| | | // money = 80; |
| | | // // Zmoney = 80*num |
| | | // // $("#feiyong").text(money) |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == ("24G/年")){ |
| | | // money = 150; |
| | | // // Zmoney = 150*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == "36G/年"){ |
| | | // money = 200; |
| | | // // Zmoney = 200*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == "100G/年"){ |
| | | // money = 300; |
| | | // // Zmoney = 200*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else{ |
| | | // $("#feiyongadd").text("") |
| | | // $("#zongjia").text("") |
| | | // } |
| | | }); |
| | | // console.log(data,11111111) |
| | | // if(data.value == "12G/年"){ |
| | | // money = 80; |
| | | // // Zmoney = 80*num |
| | | // // $("#feiyong").text(money) |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == ("24G/年")){ |
| | | // money = 150; |
| | | // // Zmoney = 150*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == "36G/年"){ |
| | | // money = 200; |
| | | // // Zmoney = 200*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else if(data.value == "100G/年"){ |
| | | // money = 300; |
| | | // // Zmoney = 200*num |
| | | // $("#feiyongadd").text(money) |
| | | // // $("#zongjia").text(Zmoney) |
| | | // }else{ |
| | | // $("#feiyongadd").text("") |
| | | // $("#zongjia").text("") |
| | | // } |
| | | }); |
| | | // } |
| | | break; |
| | | case 'getchongzhi': |
| | | var data = checkStatus.data; |
| | | $("#feiyong").text("") |
| | | $("#feiyong").val("") |
| | | $("#zongjia").text("") |
| | | |
| | | //选择卡的数量 |
| | | var num = data.length; |
| | | var cardNum = []; |
| | | var card = []; |
| | | var zong = 0; |
| | | var feiyong = []; |
| | | var cardid = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | if(i == data.length-1){ |
| | | if (i == data.length - 1) { |
| | | chongzhiCompany += data[i].company; |
| | | } |
| | | card.push(data[i].cardnumber) |
| | | zong = zong+data[i].unitprice |
| | | feiyong.push(data[i].unitprice.toString()) |
| | | zong = zong + data[i].unitprice |
| | | feiyong.push(data[i].unitprice) |
| | | cardNum.push(JSON.stringify(data[i].cardnumber)) |
| | | var datas = "num="+JSON.stringify(data[i].cardnumber) |
| | | cardid.push(data[i].num) |
| | | var datas = "num=" + JSON.stringify(data[i].cardnumber) |
| | | } |
| | | $("#cardid").val(cardid); |
| | | $("#cardnumber").val(card) |
| | | $(".hao").text("当前已选择"+num+"个卡号") |
| | | $(".hao").text("当前已选择" + num + "个卡号") |
| | | $("#flowc").val(data[0].flow); |
| | | chongzhi() |
| | | var money=0; |
| | | // Zmoney = 80*num |
| | | $("#feiyong").text(feiyong) |
| | | $("#zongjia").text(zong) |
| | | console.log($("#zongjia").text()) |
| | | var money = 0; |
| | | // Zmoney = 80*num |
| | | $("#feiyong").val(feiyong) |
| | | $("#zongjia").text(zong) |
| | | form.render(); |
| | | break; |
| | | }; |
| | | } |
| | | ; |
| | | }); |
| | | // 搜索提交 |
| | | form.on('submit(demo-table-search)', function(data){ |
| | | form.on('submit(demo-table-search)', function (data) { |
| | | var field = data.field; // 获得表单字段 |
| | | if(field.company != ""){ |
| | | if(localStorage.getItem("gsjc") == "华星智控"){ |
| | | if (field.company != "") { |
| | | if (localStorage.getItem("gsjc") == "华星智控") { |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | ,done: function(res, curr, count) { |
| | | , where: field // 搜索的字段 |
| | | , done: function (res, curr, count) { |
| | | // res为接口返回的数据 |
| | | if (res.data.length > 0) { |
| | | |
| | |
| | | } |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else if(field.company == localStorage.getItem("gsmc")){ |
| | | } else if (field.company == localStorage.getItem("gsjc") || field.company == localStorage.getItem("gsmc")) { |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | ,done: function(res, curr, count) { |
| | | , where: field // 搜索的字段 |
| | | , done: function (res, curr, count) { |
| | | // res为接口返回的数据 |
| | | if (res.data.length > 0) { |
| | | |
| | |
| | | } |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else{ |
| | | } else if (localStorage.getItem("gsjc") == "访客"){ |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | , where: field // 搜索的字段 |
| | | , done: function (res, curr, count) { |
| | | // res为接口返回的数据 |
| | | if (res.data.length > 0) { |
| | | |
| | | } else { |
| | | alert("搜索的内容不存在") |
| | | } |
| | | } |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | } else { |
| | | alert("没有权限查询其他公司") |
| | | } |
| | | }else{ |
| | | if (localStorage.getItem("gsjc") == "华星智控"){ |
| | | } else { |
| | | if (localStorage.getItem("gsjc") == "华星智控") { |
| | | field.company = localStorage.getItem("gsjc"); |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else{ |
| | | } else if(localStorage.getItem("gsjc") == "访客"){ |
| | | field.company = localStorage.getItem("gsjc"); |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else { |
| | | field.company = localStorage.getItem("gsmc") |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | } |
| | |
| | | return false; // 阻止默认 form 跳转 |
| | | }); |
| | | // |
| | | form.on('submit(demo-table-search1)', function(data){ |
| | | form.on('submit(demo-table-search1)', function (data) { |
| | | var field = data.field; // 获得表单字段 |
| | | if(field.company != ""){ |
| | | if(localStorage.getItem("gsjc") == "华星智控"){ |
| | | if (field.company != "") { |
| | | if (localStorage.getItem("gsjc") == "华星智控") { |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else if(field.company == localStorage.getItem("gsmc")){ |
| | | } else if (field.company == localStorage.getItem("gsmc")) { |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else{ |
| | | } else { |
| | | alert("没有权限查询其他公司") |
| | | } |
| | | }else{ |
| | | if (localStorage.getItem("gsjc") == "华星智控"){ |
| | | } else { |
| | | if (localStorage.getItem("gsjc") == "华星智控") { |
| | | field.company = ""; |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | }else{ |
| | | } else { |
| | | field.company = localStorage.getItem("gsmc") |
| | | table.reload('demo', { |
| | | url: "/HxzkFlow/hxzk/tableSearch", |
| | | method:'post', |
| | | method: 'post', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | ,where: field // 搜索的字段 |
| | | , where: field // 搜索的字段 |
| | | }); |
| | | layer.msg('搜索成功'); |
| | | } |
| | |
| | | |
| | | |
| | | //新增 |
| | | function add(){ |
| | | $(".add").show(); |
| | | function add1() { |
| | | $(".add1").show(); |
| | | $(".heimu").show(); |
| | | } |
| | | function canseladd(){ |
| | | $(".add").hide(); |
| | | |
| | | function canseladd() { |
| | | $(".add1").hide(); |
| | | $(".heimu").hide(); |
| | | } |
| | | |
| | | //充值 |
| | | function chongzhi(){ |
| | | function chongzhi() { |
| | | $(".chongzhi").show(); |
| | | $(".heimu").show(); |
| | | } |
| | | function canselchongzhi(){ |
| | | |
| | | function canselchongzhi() { |
| | | $(".chongzhi").hide(); |
| | | $(".heimu").hide(); |
| | | } |
| | | |
| | | //修改 |
| | | function canselupdate(){ |
| | | function canselupdate() { |
| | | $(".update").hide(); |
| | | $(".heimu").hide(); |
| | | $(".updateZong").hide(); |
| | | } |
| | | function showUpdate(){ |
| | | |
| | | function showUpdate() { |
| | | console.log("tijiao2222222222222") |
| | | var gsjc = localStorage.getItem("gsjc"); |
| | | if(gsjc == "华星智控"){ |
| | | if (gsjc == "华星智控") { |
| | | $(".updateZong").show(); |
| | | $(".heimu").show(); |
| | | }else{ |
| | | } else { |
| | | $(".update").show(); |
| | | $(".heimu").show(); |
| | | } |
| | | |
| | | } |
| | | |
| | | function checkupdate() { |
| | | console.log("11111111111111111") |
| | | console.log($("#card").val()) |
| | | console.log($("#cardnumber").val()) |
| | | var add1 = $("#xggs").val(); |
| | | var add2 = $("#cardnumber").val(); |
| | | var add3 = $("#carddateu").val(); |
| | | var add4 = $("#operatoru").val(); |
| | | // var add4 = $("#flowadd1").val(); |
| | | var add12 = $("#unitpriceu").val(); |
| | | // var add5 = $("#bindidadd1").val(); |
| | | // var add6 = $("#locationadd1").val(); |
| | | // var add7 = $("#notesadd1").val(); |
| | | var add8 = $("#enddateu").val(); |
| | | var add9 = "0"; |
| | | var add10 = $("#flowu").val(); |
| | | // var add11 = $("#feiyongadd").val(); |
| | | if(add1 == "" || add1 == null){ |
| | | layer.alert("请选择所属公司") |
| | | return false; |
| | | }else if(add2 == "" || add2 == null){ |
| | | layer.alert("请输入卡号") |
| | | return false; |
| | | }else if(add3 == "" || add3 == null){ |
| | | function canselupdate2() { |
| | | $(".update2").hide(); |
| | | $(".heimu").hide(); |
| | | $(".updateZong2").hide(); |
| | | } |
| | | |
| | | function showUpdate2() { |
| | | console.log("tijiao2222222222222") |
| | | var gsjc = localStorage.getItem("gsjc"); |
| | | if (gsjc == "华星智控") { |
| | | $(".updateZong2").show(); |
| | | $(".heimu").show(); |
| | | } else { |
| | | $(".update2").show(); |
| | | $(".heimu").show(); |
| | | } |
| | | |
| | | } |
| | | |
| | | function checkupdate2() { |
| | | var add2 = $("#cardnumber2").val(); |
| | | var add3 = $("#carddateu2").val(); |
| | | var add12 = $("#unitpriceu2").val(); |
| | | var add8 = $("#enddateu2").val(); |
| | | if (add3 == "" || add3 == null) { |
| | | layer.alert("请选择开始日期") |
| | | return false; |
| | | }else if(add8 == "" || add8 == null){ |
| | | } else if (add8 == "" || add8 == null) { |
| | | layer.alert("请选择结束日期") |
| | | return false; |
| | | }else if(add4 == "" || add4 == null){ |
| | | layer.alert("请选择运营商") |
| | | return false; |
| | | }else if(add10 == "" || add10 == null){ |
| | | layer.alert("请选择流量") |
| | | return false; |
| | | }else if(add12 == "" || add12 == null){ |
| | | } else if (add12 == "" || add12 == null) { |
| | | layer.alert("请选择单价") |
| | | return false; |
| | | }else{ |
| | | // if(parts.length>1){ |
| | | // for (var i = 0 ; i<parts.length;i++){ |
| | | } else { |
| | | var parts = add2.replace(/\s*/g, "").split(","); |
| | | var upp = "cardnumber=" + parts + "&carddate=" + add3 + "&enddate=" + add8 + "&unitprice=" + add12+"&caozuoname="+getUserName |
| | | $.ajax({ |
| | | url: "/HxzkFlow/hxzk/updateBatchById", |
| | | type: "POST", |
| | | data: upp, |
| | | async: false, |
| | | success: function (data) { |
| | | return true; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | var upp = "company="+add1+"&cardnumber="+add2+"&carddate="+add3+"&operator="+add4+"&enddate="+add8+"&flow="+add10+"&unitprice="+add12 |
| | | function checkupdate() { |
| | | var add1 = $("#xggs").val(); |
| | | var add2 = $("#cardnumber").val(); |
| | | var add3 = $("#carddateu").val(); |
| | | var add4 = $("#operatoru").val(); |
| | | var add12 = $("#unitpriceu").val(); |
| | | var add8 = $("#enddateu").val(); |
| | | var add9 = "0"; |
| | | var add10 = $("#flowu").val(); |
| | | // var add11 = $("#feiyongadd").val(); |
| | | if (add1 == "" || add1 == null) { |
| | | layer.alert("请选择所属公司") |
| | | return false; |
| | | } else if (add2 == "" || add2 == null) { |
| | | layer.alert("请输入卡号") |
| | | return false; |
| | | } else if (add3 == "" || add3 == null) { |
| | | layer.alert("请选择开始日期") |
| | | return false; |
| | | } else if (add8 == "" || add8 == null) { |
| | | layer.alert("请选择结束日期") |
| | | return false; |
| | | } else if (add4 == "" || add4 == null) { |
| | | layer.alert("请选择运营商") |
| | | return false; |
| | | } else if (add10 == "" || add10 == null) { |
| | | layer.alert("请选择流量") |
| | | return false; |
| | | } else if (add12 == "" || add12 == null) { |
| | | layer.alert("请选择单价") |
| | | return false; |
| | | } else { |
| | | var upp = "company=" + add1 + "&cardnumber=" + add2 + "&carddate=" + add3 + "&operator=" + add4 + "&enddate=" + add8 + "&flow=" + add10 + "&unitprice=" + add12+"&caozuoname="+getUserName |
| | | console.log(upp) |
| | | $.post("/HxzkFlow/hxzk/UpdateChong",upp,function (data){ |
| | | $.post("/HxzkFlow/hxzk/UpdateChong", upp, function (data) { |
| | | |
| | | }) |
| | | console.log(66666666) |
| | | |
| | | return true; |
| | | } |
| | | // var parts = add2.replace(/\s*/g,"").split(";"); |
| | | // var parts; |
| | | // var parts1 = add5.split(";"); |
| | | |
| | | |
| | | } |
| | | |
| | | //新增成功 |
| | | function checkadd() { |
| | | console.log("11111111111111111") |
| | | console.log( $("#cardnumberadd1").val()) |
| | | console.log($("#cardnumberadd1").val()) |
| | | var add1 = $("#companyadd1").val(); |
| | | var add2 = $("#cardnumberadd1").val(); |
| | | var add3 = $("#carddateadd1").val(); |
| | | var add4 = $("#operatoradd1").val(); |
| | | var add2 = $("#cardnumberadd1").val(); |
| | | var add3 = $("#carddateadd1").val(); |
| | | var add4 = $("#operatoradd1").val(); |
| | | // var add4 = $("#flowadd1").val(); |
| | | var add12 = $("#unitprice").val(); |
| | | var add5 = $("#bindidadd1").val(); |
| | | var add6 = $("#locationadd1").val(); |
| | | var add7 = $("#notesadd1").val(); |
| | | var add12 = $("#unitprice").val(); |
| | | var add5 = $("#bindidadd1").val(); |
| | | var add6 = $("#locationadd1").val(); |
| | | var add7 = $("#notesadd1").val(); |
| | | var add8 = $("#enddateadd1").val(); |
| | | var add9 = "0"; |
| | | var add10 = $("#flowadd1").val(); |
| | | var add11 = $("#feiyongadd").val(); |
| | | if(add1 == "" || add1 == null){ |
| | | var add10 = $("#flowadd1").val(); |
| | | var add11 = $("#feiyongadd").val(); |
| | | if (add1 == "" || add1 == null) { |
| | | layer.alert("请选择所属公司") |
| | | return false; |
| | | }else if(add2 == "" || add2 == null){ |
| | | } else if (add2 == "" || add2 == null) { |
| | | layer.alert("请输入卡号") |
| | | return false; |
| | | }else if(add3 == "" || add3 == null){ |
| | | } else if (add3 == "" || add3 == null) { |
| | | layer.alert("请选择开始日期") |
| | | return false; |
| | | }else if(add4 == "" || add4 == null){ |
| | | } else if (add4 == "" || add4 == null) { |
| | | layer.alert("请选择运营商") |
| | | return false; |
| | | }else if(add10 == "" || add10 == null){ |
| | | } else if (add10 == "" || add10 == null) { |
| | | layer.alert("请选择流量") |
| | | return false; |
| | | }else if(add8 == "" || add8 == null){ |
| | | } else if (add8 == "" || add8 == null) { |
| | | layer.alert("请选择结束日期") |
| | | return false; |
| | | }else if(add11 == "" || add11 == 0){ |
| | | } else if (add11 == "" || add11 == 0) { |
| | | layer.alert("请选择单价") |
| | | return false; |
| | | }else if (add9 == "1"){ |
| | | } else if (add9 == "1") { |
| | | return false; |
| | | } |
| | | var parts = add2.replace(/\s*/g,"").split(";"); |
| | | var parts = add2.replace(/\s*/g, "").split(";"); |
| | | // var parts; |
| | | var parts1 = add5.split(";"); |
| | | console.log(parts) |
| | | console.log(parts.length) |
| | | if(parts.length>1){ |
| | | for (var i = 0 ; i<parts.length;i++){ |
| | | if (parts.length > 1) { |
| | | for (var i = 0; i < parts.length; i++) { |
| | | |
| | | console.log("=================") |
| | | var data = "cardnumber="+parts[i] |
| | | var data = "cardnumber=" + parts[i] |
| | | $.ajax({ |
| | | url: "/HxzkFlow/hxzk/ifCard", |
| | | type: "POST", |
| | | data: data, |
| | | async: false, |
| | | success: function(data) { |
| | | if(data != ""){ |
| | | success: function (data) { |
| | | if (data != "") { |
| | | //已经存在, 根据卡号修改信息 |
| | | var upp = "company="+add1+"&cardnumber="+parts[i]+"&carddate="+add3+"&operator="+add4+"&bindid="+add5+"&location="+add6+"¬es="+add7+"&enddate="+add8+"&flow="+add10+"&unitprice="+add11 |
| | | var upp = "company=" + add1 + "&cardnumber=" + parts[i] + "&carddate=" + add3 + "&operator=" + add4 + "&bindid=" + add5 + "&location=" + add6 + "¬es=" + add7 + "&enddate=" + add8 + "&flow=" + add10 + "&unitprice=" + add11+"&caozuoname="+getUserName |
| | | console.log(upp) |
| | | $.post("/HxzkFlow/hxzk/UpdateChong",upp,function (data){ |
| | | $.post("/HxzkFlow/hxzk/UpdateChong", upp, function (data) { |
| | | |
| | | }) |
| | | // parts.splice(i,2) |
| | | // $("#cardnumberadd1").val(parts) |
| | | }else{ |
| | | } else { |
| | | console.log("33333332") |
| | | var upp = "company="+add1+"&cardnumber="+parts[i]+"&carddate="+add3+"&operator="+add4+"&bindid="+add5+"&location="+add6+"¬es="+add7+"&enddate="+add8+"&flow="+add10+"&unitprice="+add11 |
| | | $.post("/HxzkFlow/hxzk/addCard",upp,function (data){ |
| | | var upp = "company=" + add1 + "&cardnumber=" + parts[i] + "&carddate=" + add3 + "&operator=" + add4 + "&bindid=" + add5 + "&location=" + add6 + "¬es=" + add7 + "&enddate=" + add8 + "&flow=" + add10 + "&unitprice=" + add11+"&caozuoname="+getUserName |
| | | $.post("/HxzkFlow/hxzk/addCard", upp, function (data) { |
| | | |
| | | }) |
| | | } |
| | |
| | | }); |
| | | |
| | | } |
| | | if(add9 == "1"){ |
| | | if (add9 == "1") { |
| | | alert("该卡号中可能有已经存在过的") |
| | | } |
| | | }else{ |
| | | var data = "cardnumber="+add2 |
| | | } else { |
| | | var data = "cardnumber=" + add2 |
| | | $.ajax({ |
| | | url: "/HxzkFlow/hxzk/ifCard", |
| | | type: "POST", |
| | | data: data, |
| | | async: false, |
| | | success: function(data) { |
| | | if(data != ""){ |
| | | success: function (data) { |
| | | if (data != "") { |
| | | alert("该卡号已存在!") |
| | | add9 = "1"; |
| | | }else{ |
| | | var upp = "company="+add1+"&cardnumber="+add2+"&carddate="+add3+"&operator="+add4+"&bindid="+add5+"&location="+add6+"¬es="+add7+"&enddate="+add8+"&flow="+add10+"&unitprice="+add11 |
| | | $.post("/HxzkFlow/hxzk/addCard",upp,function (data){ |
| | | } else { |
| | | var upp = "company=" + add1 + "&cardnumber=" + add2 + "&carddate=" + add3 + "&operator=" + add4 + "&bindid=" + add5 + "&location=" + add6 + "¬es=" + add7 + "&enddate=" + add8 + "&flow=" + add10 + "&unitprice=" + add11+"&caozuoname="+getUserName |
| | | $.post("/HxzkFlow/hxzk/addCard", upp, function (data) { |
| | | |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //选择流量 |
| | | //监听选中事件 |
| | | |
| | | // |
| | | |
| | | function chongzhitj(){ |
| | | var kh = $("#cardnumber").val(); |
| | | var unitprice ; |
| | | if ($("#unitpriceu").val()!=0){ |
| | | unitprice =$("#unitpriceu").val(); |
| | | }else if ($("#zongjia").text()!=0){ |
| | | unitprice =$("#zongjia").text(); |
| | | }else{ |
| | | unitprice =""; |
| | | } |
| | | if (kh == ""){ |
| | | function chongzhitj() { |
| | | console.log($("#zongjia").text()) |
| | | var kh = '' |
| | | kh = $("#cardnumber").val(); |
| | | num = $("#cardid").val(); |
| | | var unitprice = ''; |
| | | // if ($("#unitpriceu").val()!=0){ |
| | | // unitprice =$("#unitpriceu").val(); |
| | | // }else if ($("#zongjia").text()!=0){ |
| | | unitprice = $("#zongjia").text(); |
| | | console.log(unitprice) |
| | | // }else{ |
| | | // unitprice =""; |
| | | // } |
| | | if (kh == "") { |
| | | alert("请选择卡号") |
| | | return false; |
| | | } |
| | | if(unitprice == "" || unitprice == 0){ |
| | | if (unitprice == "" || unitprice == 0) { |
| | | alert("费用不正确") |
| | | return false;; |
| | | return false; |
| | | |
| | | } |
| | | var dt = "card="+kh+"&type=流量"+"&feiyong="+unitprice+"&chongzhiCompany="+chongzhiCompany |
| | | $.post("/HxzkFlow/hxzk/buy",dt,function (data){ |
| | | |
| | | var dt = "card=" + num + "&type=流量" + "&feiyong=" + unitprice + "&chongzhiCompany=" + chongzhiCompany |
| | | console.log(dt) |
| | | $.post("/HxzkFlow/hxzk/buy", dt, function (data) { |
| | | const div = document.createElement('divform'); |
| | | div.innerHTML = data; |
| | | document.body.appendChild(div); |
| | |
| | | }) |
| | | $(".chongzhi").hide(); |
| | | $(".heimu").hide(); |
| | | // setTimeout({ |
| | | // location.reload(); |
| | | // }500) |
| | | setTimeout(function () { |
| | | location.reload(); |
| | | }, 500); |
| | | // $("#zongjia").text("") |
| | | } |
| | | </script> |
| | | </html> |