7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
262 lines
8.6 KiB
HTML
262 lines
8.6 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(){
|
|
$('#s_username').autocomplete("./?_m=ajax_autocomplete&_a=client", {
|
|
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;
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<div class="layui-tab" lay-filter="tab1">
|
|
<div class="layui-inline"><ul class="layui-tab-title"></ul></div>
|
|
<div class="layui-tab-content">
|
|
<div class="layui-tab-item layui-show">
|
|
<div class="layui-row">
|
|
<!-- 查询条件 -->
|
|
<blockquote class="layui-elem-quote" style="line-height:44px;padding:8px;" id="search_top">
|
|
<form class="layui-form" id="form1_search" action="log_hd_detail.htm">
|
|
<div class="layui-row">
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-danger btn_del">删除</a></div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-input-inline" style="width:120px;">
|
|
<input type="text" id="s_username" name="s_username" placeholder="用户名" class="layui-input">
|
|
</div>
|
|
<div class="layui-input-inline" style="width:120px;">
|
|
<input type="text" id="s_no" name="s_no" placeholder="款号" class="layui-input">
|
|
</div>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="s_ip" name="s_ip" placeholder="IP地址" class="layui-input">
|
|
</div>
|
|
<div class="layui-input-inline" id="search_change1" style="width:100px;"></div>
|
|
<div class="layui-input-inline" id="search_change2" style="width:100px;"></div>
|
|
<div class="layui-input-inline" id="search_change3" style="width:100px;"></div>
|
|
<div class="layui-input-inline" id="search_change4" style="width:100px;"></div>
|
|
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 开始分析 </button>
|
|
</div>
|
|
</form>
|
|
</blockquote>
|
|
<!-- /查询条件结束 -->
|
|
</div>
|
|
<div class="layui-row">
|
|
<!-- 表格 -->
|
|
<div style="width:99%;">
|
|
<table id="layui_table" lay-filter="layui_table" class="layui-table"></table>
|
|
</div>
|
|
<!-- /表格结束 -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
var this_tab_no="";
|
|
var this_tab_title="";
|
|
var tableIns={};
|
|
layui.use(['form','layer','table','element'],function(){
|
|
var form = layui.form,
|
|
layer = parent.layer === undefined ? layui.layer : top.layer,
|
|
$=layui.jquery,
|
|
laytpl = layui.laytpl,
|
|
table = layui.table;
|
|
var element = layui.element;
|
|
|
|
var arr_tab=[];
|
|
var index = layer.load();
|
|
|
|
|
|
//取得url传递参数
|
|
var query_str=location.search.substring(1);
|
|
if(query_str)
|
|
query_str="&"+query_str;
|
|
//---------------------------------------------数据表格
|
|
var url='./?_m=log_hd&_a=detail'+query_str;
|
|
|
|
var cols=[];
|
|
cols[0]={type: "checkbox",width:50};
|
|
cols[1]={field: 'list', title: '编号',align:"left"};
|
|
cols[2]={field: 'juese', title: '角色',align:'left'};
|
|
cols[3]={field: 'kh', title: '用户',align:'left'};
|
|
cols[4]={field: 'client', title: '客户端',align:'left'};
|
|
cols[5]={field: 'ipaddress', title: 'IP地址',align:'left'};
|
|
cols[6]={field: 'ms', title: '订货模式',align:'left'};
|
|
cols[7]={field: 'action1', title: '动作',align:'left'};
|
|
cols[8]={field: 'object1', title: '对象',align:'left'};
|
|
cols[9]={field: 'num', title: '数量',align:'left'};
|
|
cols[10]={field: 'cztime', title: '操作时间',align:'left'};
|
|
var table_heaight=(document.documentElement.clientHeight>300)?document.documentElement.clientHeight-$('#search_top').outerHeight(true)-80:"500";
|
|
|
|
tableIns = table.render({
|
|
even:false,
|
|
elem: '#layui_table',
|
|
url : url,
|
|
cellMinWidth:80,
|
|
page : true,
|
|
height : table_heaight,
|
|
limit : 20,
|
|
limits : [10,20,30,50,100],
|
|
id : "log_detailTable",
|
|
cols : [cols],
|
|
done: function(res, curr, count){
|
|
layer.close(index);
|
|
this_tab_no=res.s_cate;
|
|
//-----------------------加载tab
|
|
arr_tab=res.tab;
|
|
var html1="";
|
|
for(var i=0;i<arr_tab.length;i++){
|
|
html1+='<li';
|
|
if(arr_tab[i].no==res.s_cate){
|
|
html1+=' class="layui-this"';
|
|
this_tab_title=arr_tab[i].title;
|
|
}
|
|
html1+='>'+arr_tab[i].title+'</li>';
|
|
}
|
|
$(".layui-tab-title").html(html1);
|
|
element.render('tab1');
|
|
//
|
|
$("#s_username").val(res.s_username);
|
|
$("#s_no").val(res.s_no);
|
|
$("#s_ip").val(res.s_ip);
|
|
//角色
|
|
var html1='<select id="s_face" name="s_face"><option value="">-角色-</option>';
|
|
var arr_tmp=res.select_client_face;
|
|
for(var i=0;i<arr_tmp.length;i++){
|
|
html1+='<option value="'+arr_tmp[i].val+'"';
|
|
if(res.s_face==arr_tmp[i].val)
|
|
html1+=' selected';
|
|
html1+='>'+arr_tmp[i].title+'</option>';
|
|
}
|
|
html1+='</select>';
|
|
$("#search_change1").html(html1);
|
|
//客户端
|
|
var html1='<select id="s_khd" name="s_khd"><option value="">-客户端-</option>';
|
|
var arr_tmp=res.select_khd;
|
|
for(var i=0;i<arr_tmp.length;i++){
|
|
html1+='<option value="'+arr_tmp[i].val+'"';
|
|
if(res.s_khd==arr_tmp[i].val)
|
|
html1+=' selected';
|
|
html1+='>'+arr_tmp[i].title+'</option>';
|
|
}
|
|
html1+='</select>';
|
|
$("#search_change2").html(html1);
|
|
//订货模式
|
|
var html1='<select id="s_ms" name="s_ms"><option value="">-订货模式-</option>';
|
|
var arr_tmp=res.select_ms;
|
|
for(var i=0;i<arr_tmp.length;i++){
|
|
html1+='<option value="'+arr_tmp[i].val+'"';
|
|
if(res.s_ms==arr_tmp[i].val)
|
|
html1+=' selected';
|
|
html1+='>'+arr_tmp[i].title+'</option>';
|
|
}
|
|
html1+='</select>';
|
|
$("#search_change3").html(html1);
|
|
//动作
|
|
var html1='<select id="s_action" name="s_action"><option value="">-动作-</option>';
|
|
var arr_tmp=res.select_action;
|
|
for(var i=0;i<arr_tmp.length;i++){
|
|
html1+='<option value="'+arr_tmp[i].val+'"';
|
|
if(res.s_action==arr_tmp[i].val)
|
|
html1+=' selected';
|
|
html1+='>'+arr_tmp[i].title+'</option>';
|
|
}
|
|
html1+='</select>';
|
|
$("#search_change4").html(html1);
|
|
//
|
|
|
|
|
|
form.render();
|
|
//关闭loading
|
|
|
|
}
|
|
});
|
|
//批量删除
|
|
$(".btn_del").click(function(){
|
|
var checkStatus = table.checkStatus('log_detailTable'),
|
|
data = checkStatus.data,
|
|
check_id = [];
|
|
if(data.length>0) {
|
|
for (var i in data) {
|
|
check_id.push(data[i].id);
|
|
}
|
|
layer.confirm('确定删除吗?', {icon: 3, title: '提示信息'}, function (index) {
|
|
$.get("./?_m=log_hd&_a=delete",{id:check_id},function(data){
|
|
if(data.code=="1"){
|
|
layer.msg("删除成功!");
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
}else{
|
|
layer.msg(data.msg);
|
|
}
|
|
},"json")
|
|
})
|
|
}else{
|
|
layer.msg("请选择需要删除的记录");
|
|
}
|
|
})
|
|
|
|
//点击tab
|
|
element.on('tab(tab1)', function(data){
|
|
//alert(JSON.stringify(arr_tab));
|
|
//alert(this.innerHTML);
|
|
this_tab_title=this.innerHTML;
|
|
for(var i=0;i<arr_tab.length;i++){
|
|
if(arr_tab[i].title==this_tab_title){
|
|
this_tab_no=arr_tab[i].no;
|
|
}
|
|
}
|
|
var url_ext=(this_tab_no=="top")?"":"_"+this_tab_no;
|
|
var url='log_hd'+url_ext+'.htm';
|
|
location.href=url;
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|