|
@@ -14,12 +14,21 @@ |
|
@@ -14,12 +14,21 @@ |
|
14
|
<i class="fa fa-file-image-o"></i> 菜品库管理
|
14
|
<i class="fa fa-file-image-o"></i> 菜品库管理
|
|
15
|
</a>
|
15
|
</a>
|
|
16
|
</blockquote>
|
16
|
</blockquote>
|
|
|
|
17
|
+
|
|
|
|
18
|
+ <div class="demoTable">
|
|
|
|
19
|
+ 搜索商家:<div class="layui-inline">
|
|
|
|
20
|
+ <input class="layui-input" name="key" id="key" placeholder="{:lang('pleaseEnter')}店铺名称" autocomplete="off">
|
|
|
|
21
|
+ </div>
|
|
|
|
22
|
+ <button class="layui-btn" id="search" data-type="reload">搜索</button>
|
|
|
|
23
|
+ </div>
|
|
|
|
24
|
+
|
|
17
|
<table class="layui-table" id="list" lay-filter="list"></table>
|
25
|
<table class="layui-table" id="list" lay-filter="list"></table>
|
|
18
|
</div>
|
26
|
</div>
|
|
19
|
{include file="common/foot"/}
|
27
|
{include file="common/foot"/}
|
|
20
|
<script type="text/html" id="action">
|
28
|
<script type="text/html" id="action">
|
|
21
|
<a class="layui-btn {{ 0==d.status?'':'layui-btn-danger'}} layui-btn-xs" lay-event="stop">{{ 0==d.status?'启用':'停用'}}</a>
|
29
|
<a class="layui-btn {{ 0==d.status?'':'layui-btn-danger'}} layui-btn-xs" lay-event="stop">{{ 0==d.status?'启用':'停用'}}</a>
|
|
22
|
<a href="{:url('Template/configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
30
|
<a href="{:url('Template/configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
|
|
|
31
|
+ <a href="{:url('Basicinfo/smsRecharge')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">线下短信充值</a>
|
|
23
|
</script>
|
32
|
</script>
|
|
24
|
<script>
|
33
|
<script>
|
|
25
|
layui.use(['table','form'], function() {
|
34
|
layui.use(['table','form'], function() {
|
|
@@ -35,11 +44,47 @@ |
|
@@ -35,11 +44,47 @@ |
|
35
|
{field: 'sellername', title: '商家名称', width: 150},
|
44
|
{field: 'sellername', title: '商家名称', width: 150},
|
|
36
|
{field: 'phone', title: '商家电话', width: 150},
|
45
|
{field: 'phone', title: '商家电话', width: 150},
|
|
37
|
{field: 'map_address', title: '商家地址', width: 300},
|
46
|
{field: 'map_address', title: '商家地址', width: 300},
|
|
|
|
47
|
+ {field: 'last_num', align: 'center',title: '短信余量', width: 120},
|
|
38
|
{field: 'statusVal', align: 'center',title: '状态', width: 120},
|
48
|
{field: 'statusVal', align: 'center',title: '状态', width: 120},
|
|
39
|
{field: 'user_name', align: 'center',title: '创建人', width: 120},
|
49
|
{field: 'user_name', align: 'center',title: '创建人', width: 120},
|
|
40
|
{field: 'cdate', align: 'center',title: '创建日期', width: 180},
|
50
|
{field: 'cdate', align: 'center',title: '创建日期', width: 180},
|
|
41
|
- {width: 200, align: 'center',title: '操作', toolbar: '#action'}
|
51
|
+ {width: 230, align: 'center',title: '操作', toolbar: '#action'}
|
|
42
|
]]
|
52
|
]]
|
|
|
|
53
|
+ ,id: 'testReload'
|
|
|
|
54
|
+ ,page: true
|
|
|
|
55
|
+ ,height: 471
|
|
|
|
56
|
+ });
|
|
|
|
57
|
+
|
|
|
|
58
|
+ //搜索
|
|
|
|
59
|
+ $('#search').on('click', function() {
|
|
|
|
60
|
+ var key = $('#key').val();
|
|
|
|
61
|
+ if($.trim(key)==='') {
|
|
|
|
62
|
+ layer.msg('{:lang("pleaseEnter")}店铺名称!',{icon:0});
|
|
|
|
63
|
+ return;
|
|
|
|
64
|
+ }
|
|
|
|
65
|
+ tableIn.reload({ page: {page: 1},where: {key: key}});
|
|
|
|
66
|
+ });
|
|
|
|
67
|
+
|
|
|
|
68
|
+ var $ = layui.$, active = {
|
|
|
|
69
|
+ reload: function(){
|
|
|
|
70
|
+ var key = $('#key');
|
|
|
|
71
|
+ //执行重载
|
|
|
|
72
|
+ table.reload('testReload', {
|
|
|
|
73
|
+ page: {
|
|
|
|
74
|
+ curr: 1 //重新从第 1 页开始
|
|
|
|
75
|
+ }
|
|
|
|
76
|
+ ,where: {
|
|
|
|
77
|
+ key: {
|
|
|
|
78
|
+ id: key.val()
|
|
|
|
79
|
+ }
|
|
|
|
80
|
+ }
|
|
|
|
81
|
+ });
|
|
|
|
82
|
+ }
|
|
|
|
83
|
+ };
|
|
|
|
84
|
+
|
|
|
|
85
|
+ $('.demoTable .layui-btn').on('click', function(){
|
|
|
|
86
|
+ var type = $(this).data('type');
|
|
|
|
87
|
+ active[type] ? active[type].call(this) : '';
|
|
43
|
});
|
88
|
});
|
|
44
|
|
89
|
|
|
45
|
//启用、停用
|
90
|
//启用、停用
|