This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

333 lines
10 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="shortcut icon" type="image/x-icon" href="../favicon.ico" />
<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 type="text/javascript" language="javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="js/DataTables/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="js/DataTables/dataTables.fixedColumns.min.js"></script>
<link rel="stylesheet" href="js/DataTables/jquery.dataTables.css">
<style>
/* div {margin-left: 0; margin-right: 0;} */
.bb_title{padding:6px;text-align:center;width:100%;font-weight:bold;font-size:16px;}
.search{padding:6px;text-align:left; float:left;}
</style>
</head>
<body style="background-color:#fff;width:100%;">
<div id="bb_title" class="bb_title"></div>
<!--搜索-->
<form class="layui-form" name="form1_search" id="form1_search" method="get" action="plugin.htm">
<input type="hidden" id="id" name="id" value=0>
<input type="hidden" id="file_name" name="file_name" value="">
<input type="hidden" name="cate" value="client_bb" value="">
<span id="search"></span>
</form>
<div class="layui-tab-content" style="overflow-x: auto; -webkit-overflow-scrolling: touch;">
<div id="showtb">
</div>
<div id="show_table">
<table lay-filter="table_plugin" id="table_plugin" style="-webkit-overflow-scrolling:touch;">
<thead id="thead">
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
</div>
<script>
var is_mobile="n";
var index_dk_single="";
var face=4;
//跳转到单款订货页面
function go_dk(url){
parent.go_dk(url);
}
//单款详情
function dk_single(id){
layui.use('layer', function(){
if(face=='2')
var url1="dk_single_qj.htm";
else
var url1="dk_single.htm";
var layer = parent.layer;
index_dk_single = layer.open({
type: 2,
title: '',
content: url1+'?khid='+id,
offset: 'b',
closeBtn:0,
anim: 2
});
layer.full(index_dk_single);
});
}
// 跳转至dk.htm
function go_dkhtml(param){
var url = "dk.htm?"
for (var key in param) {
url += "&" + key + "=" + param[key]
}
url += "&frombb=y"
layui.use('layer', function(){
parent.layer.full(parent.layer.open({
type: 2,
title: '',
content: url,
offset: 'b',
closeBtn:0,
anim: 2,
}))
})
}
//更新已订数据
function update_yd(khid){
window.location.reload();
}
layui.config({
base: './layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['form','index','user','table','form'], function(){
var $ = layui.$
,setter = layui.setter
,admin = layui.admin
,form = layui.form;
var 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=plugin'+query_str;
console.log(url);
layer.load();
var table_heaight=(document.documentElement.clientHeight>300)?document.documentElement.clientHeight-$('#form1_search').outerHeight(true)-120:"500";
var table_width=document.documentElement.clientWidth-5;
$.ajax(
{
url:url,
contentType: "application/json",
method: 'POST',
success: function (res) {
layer.closeAll('loading');
var res=$.parseJSON(res);
var code=res.code;
if(res.code==0){
//------------------本页返回的错误信息
layer.msg(res.msg);
return false;
}else if(res.code==1){
//------------------系统错误
var msg=res.msg;
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
window.parent.location.href=url2;
}else if(res.code==2){
//------------------重新登录
var url2="login.htm?error_msg="+res.msg;
window.parent.location.href=url2;
}else{
face=res.face;
$('#id').val(res.id);
$('#file_name').val(res.file_name);
$('#bb_title').html(res.file_title);
// 固定bb_title和layui-lab-content宽度,防止datatable无限增长(但实际上只要固定bb_title的宽度即可,而如果只固定layui-lab-content却不固定bb_title则不可,并且必须为数值
var _width = $("#LAY_app_body", top.document).width()
$("#bb_title").width(_width - 12)
$(".layui-tab-content").width(_width - 20)
var html1="";
//查询条件
var data1=res.select;
if(data1){
var html2='';
for(var i=0;i<data1.length;i++){
html2+='<div class="layui-input-inline"><select name="'+data1[i].name+'" lay-filter="plugin_select"><option value="">-'+data1[i].title+'-</option>';
var op=data1[i].op;
for(var j=0;j<op.length;j++){
html2+='<option value="'+op[j].no+'"';
if(op[j].no==data1[i].value)
html2+=' selected';
html2+='>'+op[j].title+'</option>';
}
html2+='</select></div> ';
}
if(i>0)
html1+='<div class="search">'+html2+'</div>';
}
$("#search").html(html1);
//查询条件2
var html1="";
var data2=res.select_report;
if(data2){
var html2='';
for(var i=0;i<data2.length;i++){
html2+='<div class="layui-input-inline"><select name="'+data2[i].name+'" lay-filter="plugin_select"><option value="">-'+data2[i].title+'-</option>';
var op=data2[i].op;
for(var j=0;j<op.length;j++){
html2+='<option value="'+op[j].no+'"';
if(op[j].no==data2[i].value)
html2+=' selected';
html2+='>'+op[j].title+'</option>';
}
html2+='</select></div> ';
}
if(i>0)
html1+='<div class="search">'+html2+'</div>';
}
$("#search").append(html1);
form.render();
//表格
if(res.use_layui=="y"){
//-------------------------layui table
//表头
var obj=res.thead;
var html1='';
if(obj){
for(var i=0;i<obj.length;i++){
var obj1=obj[i].content;
html1+='<tr>';
for(var j=0;j<obj1.length;j++){
var str_lay_data=deel_layui_thead(obj1[j]);
html1+=str_lay_data;
}
html1+='</tr>';
}
}
$("#thead").html(html1);
//内容
var obj=res.tbody;
html1="";
if(obj){
for(var i=0;i<obj.length;i++){
html1+='<tr>';
var obj1=obj[i];
for(var item in obj1){
var arr1=obj1[item].split("|");
var str="";
if(arr1[1])
str='<a href="javascript:" onclick="go_dk('+arr1[1]+')">'+arr1[0]+'</a>';
else
str=arr1[0];
html1+='<td>'+obj1[item]+'</td>';
}
html1+='</tr>';
}
}
$("#tbody").html(html1);
var page=res.page?res.page:false;
var hjh=res.hjh?res.hjh:false;
var toolbar=res.toolbar?res.toolbar:false;
table.init('table_plugin', {
width:table_width
,height: table_heaight
,toolbar:toolbar
,totalRow:hjh
,page:page
,limit:i
});
}else{
//-------------------------自定义 table
var html1=res.table_html;
$("#show_table").html(html1);
if(res.sys_bb_type=="report_1w"){
$("#showtb").html('<iframe id="frame_chart" src="" width="100%" style="height:300px;position:static;"></iframe>');
//加载图表
var urlchar="chart.php?t="+res.chart_type+"&data_x="+res.chart_data_x+"&data_y="+res.chart_data_y+"&title="+res.chart_title;
$("#frame_chart").attr('src',urlchar);
}
if(res.sp){
var spgd=res.sp;
$('#tabledetail').DataTable({
fixedHeader: true, //固定表头
bFilter: false, //关闭搜索框
bLengthChange: false, //去掉每页显示多少条数据下拉框
paging: false, //禁止分页
info:false, //去掉底部的文字
bSort:false, //禁止排序
"scrollY": "500px",
"scrollX": "500px",
"scrollCollapse": true, //开启滚动条
// "bAutoWidth": false, //禁止自动列宽的计算,并且可以防止Safari下的列宽自动增长
});
}else{
$('#tabledetail').DataTable({
fixedHeader: true, //固定表头
bFilter: false, //关闭搜索框
bLengthChange: false, //去掉每页显示多少条数据下拉框
paging: false, //禁止分页
info:false, //去掉底部的文字
bSort:false, //禁止排序
"scrollY": "500px",
"scrollX": true,
"scrollCollapse": true, //开启滚动条
// "bAutoWidth": false, //禁止自动列宽的计算,并且可以防止Safari下的列宽自动增长
});
}
}
}
},
error: function () {
layui.layer.msg("与服务器通信失败!");
layer.closeAll('loading');
}
}
);
//监听筛选
form.on('select(plugin_select)', function(data){
$('#form1_search').submit();
});
//监听屏幕旋转
$(window).on("orientationchange",function(){
var main_frame=$(window.parent.frames["layadmin-iframe"]);
if(index_dk_single)
parent.layer.full(index_dk_single);
$("#edt_kh_content").css("height",main_frame.height()-60);
// table.reload('table_plugin', {
// width:document.documentElement.clientWidth-5
// });
})
// 这段会报错(但不影响运行),并且它的意义不明所以,暂时先注释
$('#ccmenu',parent.document).resize(function(){
// if($('#ccmenu',parent.document).width()>0){
// table.reload('table_plugin', {
// width:document.documentElement.clientWidth-100
// });
// }else{
// table.reload('table_plugin', {
// width:document.documentElement.clientWidth-5
// });
// }
});
$("#LAY_app_body", top.document).resize(function() {
// 固定bb_title和layui-lab-content宽度,防止datatable无限增长(但实际上只要固定bb_title的宽度即可,而如果只固定layui-lab-content却不固定bb_title则不可,并且必须为数值
var _width = $("#LAY_app_body", top.document).width()
$("#bb_title").width(_width - 12)
$(".layui-tab-content").width(_width - 20)
})
});
</script>
</body>
</html>