7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
228 lines
7.0 KiB
HTML
228 lines
7.0 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>
|
|
</head>
|
|
<body>
|
|
|
|
<div >
|
|
<blockquote class="layui-elem-quote" style="line-height:44px;padding:8px;">
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-normal btn_import">导入</a></div>
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-normal btn_add">新增</a></div>
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-danger btn_del">删除</a></div>
|
|
<div class="layui-inline"><a class="layui-btn layui-btn-warm btn_check">检查</a></div>
|
|
<form class="layui-form" id="form1_search" action="gz_byxdk.htm" method="get">
|
|
<span id="search_dz_select"></span>
|
|
<div class="layui-input-inline" style="width:100px;" id="search_kh"></div>
|
|
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 搜 索 </button>
|
|
</form>
|
|
</blockquote>
|
|
<form class="layui-form">
|
|
<table id="layui_table" lay-filter="layui_table" style="">
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
var tableIns={};
|
|
//重新加载表格数据
|
|
function reload_table(){
|
|
tableIns.reload();
|
|
}
|
|
layui.use(['form','layer','table','element'],function(){
|
|
var form = layui.form,
|
|
layer = layui.layer,
|
|
$=layui.jquery,
|
|
laydate = layui.laydate,
|
|
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=gz_byxdk'+query_str;
|
|
//alert(url);
|
|
var arr_tab=[];
|
|
tableIns = table.render({
|
|
even:false,
|
|
elem: '#layui_table',
|
|
url : url,
|
|
page :true,
|
|
limit : 10,
|
|
limits : [10,20,30,50,100],
|
|
cellMinWidth:80,
|
|
height : "full-140",
|
|
id : "ListTable",
|
|
cols : [[
|
|
{type: "checkbox", fixed:"left", width:50},
|
|
{field: 'dj', title: '店铺等级', align:"center"},
|
|
//{field: 'ks', title: '款式', align:"center"},
|
|
//{field: 'num', title: '数量', align:"center"}
|
|
{field: 'ks', title: '款式', align:"left",templet:'#tpl_title',}
|
|
]],
|
|
done: function(res, curr, count){
|
|
var curr = curr;
|
|
//根据url取得搜索条件的默认值
|
|
var s_xh=s_no=s_is_sp=s_in_ph=s_ka=s_ka_color="";
|
|
for(var i=0;i<res.select_dz.length;i++){
|
|
eval("var s_"+res.select_dz[i].no+"='';");
|
|
}
|
|
var pairs=query_str.split("&");//在逗号处断开
|
|
for(var i=0;i<pairs.length;i++){
|
|
var pos=pairs[i].indexOf('=');//查找name=value
|
|
if(pos>=0){
|
|
var argname=pairs[i].substring(0,pos);
|
|
var value=pairs[i].substring(pos+1);
|
|
//alert(argname+"|"+unescape(value));
|
|
if(argname && value)
|
|
eval("var "+argname+"=\""+unescape(value)+"\";");
|
|
}
|
|
}
|
|
|
|
html1='<input id="s_no" name="s_no" type="text" class="layui-input searchVal" placeholder="款号" value="'+s_no+'" />';
|
|
$("#search_kh").html(html1);
|
|
|
|
//自定义选项
|
|
var html1="";
|
|
for(var i=0;i<res.select_dz.length;i++){
|
|
html1+='<div class="layui-inline" style="width:120px;"><select name="s_'+res.select_dz[i].no+'"><option value="">-'+res.select_dz[i].title+'-</option>';
|
|
var op=res.select_dz[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html1+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_dz[i].value)
|
|
html1+='selected';
|
|
html1+='>'+op[j].title+'</option>';
|
|
}
|
|
html1+='</select></div>';
|
|
}
|
|
//alert(html1);
|
|
$("#search_dz_select").html(html1);
|
|
|
|
/*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');*/
|
|
form.render();
|
|
}
|
|
});
|
|
//导入
|
|
function import_excel(){
|
|
var index = layui.layer.open({
|
|
title : "导入不予下单款资料",
|
|
type : 2,
|
|
content : "import_excel.htm?m=gz_byxdk",
|
|
success : function(layero, index){
|
|
var body = layui.layer.getChildFrame('body', index);
|
|
body.find("#m").val("gz_byxdk");
|
|
form.render();
|
|
}
|
|
})
|
|
layui.layer.full(index);
|
|
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
|
$(window).on("resize",function(){
|
|
layui.layer.full(index);
|
|
})
|
|
}
|
|
$(".btn_import").click(function(){
|
|
import_excel();
|
|
})
|
|
//新增、编辑
|
|
function add(id){
|
|
var t1=(id>0)?"编辑":"新增";
|
|
var index = layui.layer.open({
|
|
title : t1,
|
|
type : 2,
|
|
area: ['600px', '600px'],
|
|
content : "gz_byxdk_add.htm?id="+id,
|
|
success : function(layero, index){
|
|
}
|
|
})
|
|
}
|
|
$(".btn_add").click(function(){
|
|
add(0);
|
|
})
|
|
//批量删除
|
|
$(".btn_del").click(function(){
|
|
var checkStatus = table.checkStatus('ListTable'),
|
|
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=gz_byxdk&_a=del",{id:check_id},function(data){
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
})
|
|
})
|
|
}else{
|
|
layer.msg("请选择需要删除的记录");
|
|
}
|
|
})
|
|
//列表操作
|
|
table.on('tool(layui_table)', function(obj){
|
|
var layEvent = obj.event,
|
|
data = obj.data;
|
|
if(layEvent === 'edit'){
|
|
//编辑
|
|
add(data.id);
|
|
} else if(layEvent === 'del'){
|
|
//删除
|
|
layer.confirm('确定删除吗?',{icon:3, title:'提示信息'},function(index){
|
|
$.get("./?_m=gz_byxdk&_a=del",{id:data.id},function(data){
|
|
tableIns.reload();
|
|
layer.close(index);
|
|
})
|
|
});
|
|
}
|
|
});
|
|
//搜索
|
|
form.on("submit(form1_submit)",function(data){
|
|
//弹出loading
|
|
return true;
|
|
})
|
|
//纠错检查
|
|
$(".btn_check").click(function(){
|
|
var index = layui.layer.open({
|
|
title : "纠错检查",
|
|
type : 2,
|
|
area: ['400px', '600px'],
|
|
content : "gz_byxdk_check.htm",
|
|
success : function(layero, index){
|
|
//
|
|
}
|
|
})
|
|
})
|
|
})
|
|
</script>
|
|
<!--title-->
|
|
<script type="text/html" id="tpl_title">
|
|
<a href="javascript:;" lay-event="edit">{{d.ks}}</a>
|
|
</script>
|
|
</body>
|
|
</html> |