7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
287 lines
9.3 KiB
HTML
287 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="renderer" content="webkit">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<title>活跃度弹窗-e订通后台</title>
|
||
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
||
<link rel="stylesheet" href="index.css">
|
||
<script src="layuiadmin/layui/layui.js"></script>
|
||
<script src="js/function.js"></script>
|
||
<!-- 自动完成 -->
|
||
<script src="js/autocomplete/jquery-1.4.4.min.js"></script>
|
||
<script src="js/autocomplete/jquery.autocomplete.js"></script>
|
||
<link rel="stylesheet" href="js/autocomplete/jquery.autocomplete.css">
|
||
<!-- /自动完成 -->
|
||
<script type="text/javascript">
|
||
function autocomp(){
|
||
$('#s_kh').autocomplete("./?_m=ajax_autocomplete&_a=kh", {
|
||
dataType: "json",//数据格式
|
||
max: 100, //列表里的条目数
|
||
minChars: 0, //自动完成激活之前填入的最小字符
|
||
width: 300, //提示的宽度,溢出隐藏
|
||
scrollHeight: 300, //提示的高度,溢出显示滚动条
|
||
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
|
||
autoFill: false, //自动填充
|
||
parse: function (data) {
|
||
if (!data || data == null || data == "") {
|
||
alert("无数据");
|
||
return {};
|
||
}else{
|
||
return $.map(data.data, function (row) {
|
||
return {
|
||
data:row,value:row.no,result:row.no
|
||
};
|
||
});
|
||
}
|
||
},
|
||
formatItem: function(row,i,max) {
|
||
//提示的显示内容及格式设置
|
||
return row.no;
|
||
},
|
||
formatMatch: function(row, i, max) {
|
||
return row.no;
|
||
},
|
||
formatResult: function(row) {
|
||
return row.no;
|
||
}
|
||
}).result(function(event,row,formatted){
|
||
$('#s_kh').value=row.no;
|
||
});
|
||
}
|
||
function autocomp2(){
|
||
$('#s_username').autocomplete("./?_m=ajax_autocomplete&_a=client&s_face=4", {
|
||
dataType: "json",//数据格式
|
||
max: 100, //列表里的条目数
|
||
minChars: 0, //自动完成激活之前填入的最小字符
|
||
width: 300, //提示的宽度,溢出隐藏
|
||
scrollHeight: 300, //提示的高度,溢出显示滚动条
|
||
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
|
||
autoFill: false, //自动填充
|
||
parse: function (data) {
|
||
if (!data || data == null || data == "") {
|
||
alert("无数据");
|
||
return {};
|
||
}else{
|
||
return $.map(data.data, function (row) {
|
||
return {
|
||
data:row,value:row.title+'('+row.username+')',result:row.username
|
||
};
|
||
});
|
||
}
|
||
},
|
||
formatItem: function(row,i,max) {
|
||
//提示的显示内容及格式设置
|
||
return row.title+'('+row.username+')';
|
||
},
|
||
formatMatch: function(row, i, max) {
|
||
return row.title + row.username;
|
||
},
|
||
formatResult: function(row) {
|
||
return row.username;
|
||
}
|
||
}).result(function(event,row,formatted){
|
||
$('#s_username').value=row.username;
|
||
});
|
||
}
|
||
document.onkeydown = function(e){
|
||
var ev =document.all ? window.event : e;
|
||
if(ev.keyCode==13) {
|
||
return false
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<div style="margin-top:10px;">
|
||
<div class="layui-row" id="search">
|
||
|
||
</div>
|
||
<div class="layui-row">
|
||
<!-- 表格 -->
|
||
<div style="width:100%;">
|
||
<table id="layui_table" lay-filter="layui_table" class="layui-table">
|
||
<thead id="layui_table_thead">
|
||
</thead>
|
||
<tbody id="layui_table_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!-- /表格结束 -->
|
||
</div>
|
||
</div>
|
||
<script>
|
||
layui.use(['form','layer','table'],function(){
|
||
var form = layui.form,
|
||
layer = parent.layer === undefined ? layui.layer : top.layer,
|
||
$=layui.jquery,
|
||
table = layui.table;
|
||
//取得url传递参数
|
||
var query_str=location.search.substring(1);
|
||
if(query_str)
|
||
query_str="&"+query_str;
|
||
//数据表格
|
||
var url='./?_m=log_hd'+query_str;
|
||
$.ajax(
|
||
{
|
||
url:url,
|
||
contentType: "application/json",
|
||
method: 'POST',
|
||
success: function (res) {
|
||
var res=$.parseJSON(res);
|
||
if(res.thiscase=="view_client"){
|
||
var html1="";
|
||
html1+='<form class="layui-form" id="form1_search"><input type="hidden" id="id" name="id" value="" class="layui-input">';
|
||
html1+='<div class="layui-input-inline" style="padding-left:5px;">';
|
||
|
||
var arr_th_zd=res.th_zd;
|
||
for(var s=0;s<arr_th_zd.length;s++){
|
||
html1+='<input type="checkbox" name="s_action" value="'+arr_th_zd[s]["no"]+'" lay-skin="primary" title="'+arr_th_zd[s]["title"]+'"';
|
||
if(arr_th_zd[s]["sign"]=="y"){
|
||
html1+=' checked="" ';
|
||
}
|
||
html1+='>';
|
||
}
|
||
html1+='</div>';
|
||
|
||
html1+='<div class="layui-input-inline" style="width:120px;"><input type="text" id="s_kh" name="s_kh" placeholder="款号" class="layui-input" value="'+res.s_kh+'"></div>'
|
||
html1+=' <a id="form1_submit" class="layui-btn layui-btn-normal"> 开始分析 </a>';
|
||
html1+='</form>';
|
||
$("#search").html(html1);
|
||
$("#s_kh").on("click",autocomp());
|
||
$("#id").val(res.id);
|
||
//
|
||
$("#form1_submit").click(function(){
|
||
var dd = "";
|
||
var tt = $('form').serializeArray();
|
||
$.each(tt, function() {
|
||
if(this.name!="s_action"){
|
||
dd+="&"+this.name+"="+this.value;
|
||
}
|
||
});
|
||
|
||
var zd_array=new Array();
|
||
$('input[name="s_action"]:checked').each(function(){
|
||
zd_array.push($(this).val());
|
||
});
|
||
var url1='log_hd_view.htm?_a=view_client&s_action='+zd_array+dd;
|
||
location.href=url1;
|
||
});
|
||
}else if(res.thiscase=="view_kh"){
|
||
var html1="";
|
||
html1+='<form class="layui-form" id="form1_search"><input type="hidden" id="id" name="id" value="" class="layui-input">';
|
||
html1+='<div class="layui-input-inline" style="width:100%;text-align:center;"><img src="'+res.picsrc+'" width="'+res.picw+'" height="'+res.pich+'"/></div>';
|
||
|
||
html1+='<div class="layui-input-inline" style="padding-left:5px;">';
|
||
|
||
var arr_th_zd=res.th_zd;
|
||
for(var s=0;s<arr_th_zd.length;s++){
|
||
html1+='<input type="checkbox" name="s_action" value="'+arr_th_zd[s]["no"]+'" lay-skin="primary" title="'+arr_th_zd[s]["title"]+'"';
|
||
if(arr_th_zd[s]["sign"]=="y"){
|
||
html1+=' checked="" ';
|
||
}
|
||
html1+='>';
|
||
}
|
||
html1+='</div>';
|
||
|
||
html1+='<div class="layui-input-inline" style="width:120px;"><input type="text" id="s_username" name="s_username" placeholder="店铺" class="layui-input" value="'+res.s_username+'"></div>'
|
||
html1+=' <a id="form1_submit" class="layui-btn layui-btn-normal"> 开始分析 </a>';
|
||
html1+='</form>';
|
||
$("#search").html(html1);
|
||
$("#s_username").on("click",autocomp2());
|
||
$("#id").val(res.id);
|
||
//
|
||
$("#form1_submit").click(function(){
|
||
var dd = "";
|
||
var tt = $('form').serializeArray();
|
||
$.each(tt, function() {
|
||
if(this.name!="s_action"){
|
||
dd+="&"+this.name+"="+this.value;
|
||
}
|
||
});
|
||
|
||
var zd_array=new Array();
|
||
$('input[name="s_action"]:checked').each(function(){
|
||
zd_array.push($(this).val());
|
||
});
|
||
var url1='log_hd_view.htm?_a=view_kh&s_action='+zd_array+dd;
|
||
location.href=url1;
|
||
});
|
||
}
|
||
form.render();
|
||
//表头
|
||
var html1="";
|
||
html1+='<tr>';
|
||
for(var i=0;i<res.thead_str.length;i++){
|
||
html1+="<td>"+res.thead_str[i].title+"</td>";
|
||
}
|
||
html1+='</tr>';
|
||
$("#layui_table_thead").html(html1);
|
||
//正体
|
||
var html1="";
|
||
for(var i=0;i<res.tbody_str.length;i++){
|
||
html1+="<tr>";
|
||
for(var j=0;j<res.thead_str.length;j++){
|
||
var getzd=res.thead_str[j].zd;
|
||
if(getzd=="hyd"){
|
||
html1+='<td onclick="show_active_table(\''+res.tbody_str[i]["ipaddress"]+'\',\''+res.tbody_str[i]["ipaddress"]+'\')"><span style="cursor:pointer;color:#1E9FFF;font-weight:bold;">'+res.tbody_str[i][getzd]+'</span></td>';
|
||
}else{
|
||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||
}
|
||
}
|
||
html1+="</tr>";
|
||
}
|
||
html1+="<tr><td align=center colspan=3>合计</td><td>"+res.total_num+"</td><td> </td></tr>";
|
||
$("#layui_table_tbody").html(html1);//表头
|
||
var html1="";
|
||
html1+='<tr>';
|
||
for(var i=0;i<res.thead_str.length;i++){
|
||
html1+="<td>"+res.thead_str[i].title+"</td>";
|
||
}
|
||
html1+='</tr>';
|
||
$("#layui_table_thead").html(html1);
|
||
//正体
|
||
var html1="";
|
||
for(var i=0;i<res.tbody_str.length;i++){
|
||
html1+="<tr>";
|
||
for(var j=0;j<res.thead_str.length;j++){
|
||
var getzd=res.thead_str[j].zd;
|
||
if(getzd=="hyd"){
|
||
html1+='<td onclick="show_active_table(\''+res.tbody_str[i]["ipaddress"]+'\',\''+res.tbody_str[i]["ipaddress"]+'\')"><span style="cursor:pointer;color:#1E9FFF;font-weight:bold;">'+res.tbody_str[i][getzd]+'</span></td>';
|
||
}else{
|
||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||
}
|
||
}
|
||
html1+="</tr>";
|
||
}
|
||
html1+="<tr><td align=center colspan=3>合计</td><td>"+res.total_num+"</td><td> </td></tr>";
|
||
$("#layui_table_tbody").html(html1);//表头
|
||
var html1="";
|
||
html1+='<tr>';
|
||
for(var i=0;i<res.thead_str.length;i++){
|
||
html1+="<td>"+res.thead_str[i].title+"</td>";
|
||
}
|
||
html1+='</tr>';
|
||
$("#layui_table_thead").html(html1);
|
||
//正体
|
||
var html1="";
|
||
for(var i=0;i<res.tbody_str.length;i++){
|
||
html1+="<tr>";
|
||
for(var j=0;j<res.thead_str.length;j++){
|
||
var getzd=res.thead_str[j].zd;
|
||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||
}
|
||
html1+="</tr>";
|
||
}
|
||
$("#layui_table_tbody").html(html1);
|
||
},
|
||
error: function () {
|
||
layui.layer.msg("与服务器通信失败!");
|
||
}
|
||
}
|
||
);
|
||
})
|
||
</script>
|
||
</body>
|
||
</html> |