7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
180 lines
5.1 KiB
HTML
180 lines
5.1 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>
|
||
<style type="text/css">
|
||
.layui-table-cell {
|
||
height: auto;
|
||
}
|
||
</style>
|
||
<!-- 自动完成 -->
|
||
<script src="js/autocomplete/jquery-1.4.4.min.js"></script>
|
||
</head>
|
||
|
||
<body>
|
||
<div>
|
||
<div id="detail_show"></div>
|
||
<div style="width:100%;" id="show_table" ></div>
|
||
</div>
|
||
</body>
|
||
<script>
|
||
var this_tab_no="";
|
||
var this_tab_title="";
|
||
function dexport(){
|
||
url='./?_m=kh_ka&_a=export';
|
||
window.location.href=url;
|
||
}
|
||
layui.use(['form','layer','laydate','table','laytpl','element',],function(){
|
||
var form = layui.form,
|
||
layer = layui.layer,
|
||
$=layui.jquery,
|
||
laytpl = layui.laytpl,
|
||
table = layui.table;
|
||
var element = layui.element;
|
||
|
||
//取得url传递参数
|
||
var query_str=location.search.substring(1);
|
||
if(query_str)
|
||
query_str="&"+query_str;
|
||
|
||
//---------------------------------------------数据表格
|
||
var url='./?_m=kh_ka&_a=detail';
|
||
$.ajax({
|
||
url:url,
|
||
contentType: "application/json",
|
||
method: 'POST',
|
||
success: function (res) {
|
||
var res=$.parseJSON(res);
|
||
_ajax(url,"detail","y");
|
||
},
|
||
error: function () {
|
||
layui.layer.msg("与服务器通信失败!");
|
||
}
|
||
|
||
});
|
||
function _ajax(a_url,a_tab,moren){
|
||
layer.load();
|
||
$.ajax({
|
||
url:a_url,
|
||
contentType: "application/json",
|
||
method: 'POST',
|
||
success: function (res) {
|
||
layer.closeAll('loading');
|
||
var res=$.parseJSON(res);
|
||
if(res.mysqlerror!=undefined && res.mysqlerror!="" && res.mysqlerror!=null){
|
||
layer.alert("数据库执行查询语句出错!原因:"+res.errormsg);
|
||
return false;
|
||
}
|
||
if(a_tab=="detail"){
|
||
var this_but=res.issub;
|
||
if(!this_but) this_but="y";
|
||
var html1="";
|
||
html1+='<div style="margin-top:5px;"><form class="layui-form layui-form-pane" id="form1_search"><input type="hidden" name="is_sub" value="y">';
|
||
|
||
var arr_th_zd=res.th_zd;
|
||
for(var s=0;s<arr_th_zd.length;s++){
|
||
html1+='<input type="checkbox" name="s_zd" 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+='<a id="form1_submit" class="layui-btn layui-btn-normal">开始分析</a><a id="form111_submit" class="layui-btn layui-btn-normal" onclick="dexport()">导出明细</a>';
|
||
html1+='</form></div>';
|
||
$("#detail_show").html(html1);
|
||
|
||
var html1="";
|
||
html1+='<table lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||
html1+='<thead>';
|
||
for(var i=0;i<res.thead_str_group;i++){
|
||
if(i==0){
|
||
html1+='<tr>';
|
||
for(var j=0;j<res.thead_str[i].length;j++){
|
||
if(res.thead_str[i][j].is_size!='y'){
|
||
html1+='<td rowspan="'+res.thead_str_group+'">'+res.thead_str[i][j].title+'</td>';
|
||
}else{
|
||
html1+='<td>'+res.thead_str[i][j].title+'</td>';
|
||
}
|
||
}
|
||
html1+='</tr>';
|
||
}else{
|
||
html1+='<tr>';
|
||
for(var j=0;j<res.thead_str[i].length;j++){
|
||
html1+='<td>'+res.thead_str[i][j].title+'</td>';
|
||
}
|
||
html1+='</tr>';
|
||
}
|
||
}
|
||
html1+='</thead>';
|
||
html1+='<tbody>';
|
||
if(this_but=="y"){
|
||
if(res.ischild=="y"){
|
||
|
||
|
||
}else{
|
||
if(res.is_hbkh=="y"){
|
||
}else{
|
||
//不合并款号
|
||
//alert(res.tbody_str[0][no]);
|
||
for(var i=0;i<res.tbody_str.length;i++){
|
||
html1+="<tr>";
|
||
for(var j=0;j<res.thead_str[0].length;j++){
|
||
var getzd=res.thead_str[0][j].zd;
|
||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||
}
|
||
html1+="</tr>";
|
||
}
|
||
}
|
||
html1+='<tr style="background-color:#f2f2f2"><td colspan="'+res.tfoot_str.tdnum+'" align="center">合计</td>';
|
||
for(var j=0;j<res.thead_str[0].length;j++){
|
||
var getzd=res.thead_str[0][j].zd;
|
||
if(getzd=='js' || getzd=='je' || res.thead_str[0][j].is_size=='y'){
|
||
html1+="<td>"+res.tfoot_str[getzd]+"</td>";
|
||
}
|
||
}
|
||
html1+='</tr>';
|
||
}
|
||
|
||
}
|
||
|
||
html1+='</tbody>';
|
||
html1+='</table>';
|
||
$("#show_table").html(html1);
|
||
$("#form1_submit").click(function(){
|
||
var dd = "";
|
||
var tt = $('form').serializeArray();
|
||
$.each(tt, function() {
|
||
if(this.name!="s_zd"){
|
||
dd+="&"+this.name+"="+this.value;
|
||
}
|
||
});
|
||
|
||
var zd_array=new Array();
|
||
$('input[name="s_zd"]:checked').each(function(){
|
||
zd_array.push($(this).val());
|
||
});
|
||
var url1='./?_m=kh_ka&_a='+a_tab+'&s_zd='+zd_array+dd;
|
||
//console.log(JSON.stringify(url1));
|
||
_ajax(url1,a_tab);
|
||
});
|
||
form.render();
|
||
|
||
|
||
}
|
||
},
|
||
error: function () {
|
||
layui.layer.msg("与服务器通信失败!");
|
||
}
|
||
});
|
||
|
||
}
|
||
});
|
||
</script>
|
||
</html> |