|
...
|
...
|
@@ -14,12 +14,21 @@ |
|
|
|
<i class="fa fa-file-image-o"></i> 菜品库管理
|
|
|
|
</a>
|
|
|
|
</blockquote>
|
|
|
|
|
|
|
|
<div class="demoTable">
|
|
|
|
搜索商家:<div class="layui-inline">
|
|
|
|
<input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<button class="layui-btn" id="search" data-type="reload">搜索</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="layui-table" id="list" lay-filter="list"></table>
|
|
|
|
</div>
|
|
|
|
{include file="common/foot"/}
|
|
|
|
<script type="text/html" id="action">
|
|
|
|
<a class="layui-btn {{ 0==d.status?'':'layui-btn-danger'}} layui-btn-xs" lay-event="stop">{{ 0==d.status?'启用':'停用'}}</a>
|
|
|
|
<a href="{:url('Template/configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
|
|
|
<a href="{:url('Basicinfo/smsRecharge')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">线下短信充值</a>
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
layui.use(['table','form'], function() {
|
|
...
|
...
|
@@ -35,11 +44,47 @@ |
|
|
|
{field: 'sellername', title: '商家名称', width: 150},
|
|
|
|
{field: 'phone', title: '商家电话', width: 150},
|
|
|
|
{field: 'map_address', title: '商家地址', width: 300},
|
|
|
|
{field: 'last_num', align: 'center',title: '短信余量', width: 120},
|
|
|
|
{field: 'statusVal', align: 'center',title: '状态', width: 120},
|
|
|
|
{field: 'user_name', align: 'center',title: '创建人', width: 120},
|
|
|
|
{field: 'cdate', align: 'center',title: '创建日期', width: 180},
|
|
|
|
{width: 200, align: 'center',title: '操作', toolbar: '#action'}
|
|
|
|
{width: 230, align: 'center',title: '操作', toolbar: '#action'}
|
|
|
|
]]
|
|
|
|
,id: 'testReload'
|
|
|
|
,page: true
|
|
|
|
,height: 471
|
|
|
|
});
|
|
|
|
|
|
|
|
//搜索
|
|
|
|
$('#search').on('click', function() {
|
|
|
|
var key = $('#key').val();
|
|
|
|
if($.trim(key)==='') {
|
|
|
|
layer.msg('{:lang("pleaseEnter")}店铺名称!',{icon:0});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
tableIn.reload({ page: {page: 1},where: {key: key}});
|
|
|
|
});
|
|
|
|
|
|
|
|
var $ = layui.$, active = {
|
|
|
|
reload: function(){
|
|
|
|
var key = $('#key');
|
|
|
|
//执行重载
|
|
|
|
table.reload('testReload', {
|
|
|
|
page: {
|
|
|
|
curr: 1 //重新从第 1 页开始
|
|
|
|
}
|
|
|
|
,where: {
|
|
|
|
key: {
|
|
|
|
id: key.val()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$('.demoTable .layui-btn').on('click', function(){
|
|
|
|
var type = $(this).data('type');
|
|
|
|
active[type] ? active[type].call(this) : '';
|
|
|
|
});
|
|
|
|
|
|
|
|
//启用、停用
|
...
|
...
|
|