|
@@ -15,6 +15,7 @@ |
|
@@ -15,6 +15,7 @@ |
|
15
|
</div>
|
15
|
</div>
|
|
16
|
{include file="common/foot"/}
|
16
|
{include file="common/foot"/}
|
|
17
|
<script type="text/html" id="action">
|
17
|
<script type="text/html" id="action">
|
|
|
|
18
|
+ <a class="layui-btn {{ 0==d.status?'':'layui-btn-danger'}} layui-btn-xs" lay-event="stop">{{ 0==d.status?'启用':'停用'}}</a>
|
|
18
|
<a href="{:url('configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
19
|
<a href="{:url('configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
|
19
|
</script>
|
20
|
</script>
|
|
20
|
<script>
|
21
|
<script>
|
|
@@ -27,12 +28,33 @@ |
|
@@ -27,12 +28,33 @@ |
|
27
|
page:true,
|
28
|
page:true,
|
|
28
|
cols: [[
|
29
|
cols: [[
|
|
29
|
{field: 'id', title: '{:lang("id")}', width:60, fixed: true},
|
30
|
{field: 'id', title: '{:lang("id")}', width:60, fixed: true},
|
|
|
|
31
|
+ {field: 'name', title: '版本', width: 150},
|
|
30
|
{field: 'sellername', title: '商家名称', width: 150},
|
32
|
{field: 'sellername', title: '商家名称', width: 150},
|
|
31
|
{field: 'phone', title: '商家电话', width: 150},
|
33
|
{field: 'phone', title: '商家电话', width: 150},
|
|
32
|
{field: 'map_address', title: '商家地址', width: 300},
|
34
|
{field: 'map_address', title: '商家地址', width: 300},
|
|
33
|
- {field: 'cdate', align: 'center',title: '创建日期', width: 120},
|
35
|
+ {field: 'statusVal', align: 'center',title: '状态', width: 120},
|
|
|
|
36
|
+ {field: 'cdate', align: 'center',title: '创建日期', width: 180},
|
|
34
|
{width: 200, align: 'center',title: '操作', toolbar: '#action'}
|
37
|
{width: 200, align: 'center',title: '操作', toolbar: '#action'}
|
|
35
|
]]
|
38
|
]]
|
|
36
|
});
|
39
|
});
|
|
|
|
40
|
+
|
|
|
|
41
|
+ //启用、停用
|
|
|
|
42
|
+ table.on('tool(list)', function(obj){
|
|
|
|
43
|
+ var data = obj.data;
|
|
|
|
44
|
+ if(obj.event === 'stop'){
|
|
|
|
45
|
+ var statusVal = data.status==1 ? '停用' : '启用';
|
|
|
|
46
|
+ layer.confirm('请确定要 '+statusVal+" 该商家!", function(index){
|
|
|
|
47
|
+ $.post("{:url('configStop')}",{sellerid:data.id,status:data.status},function(res){
|
|
|
|
48
|
+ if(res.code==1){
|
|
|
|
49
|
+ layer.msg(res.msg,{time:1000,icon:1});
|
|
|
|
50
|
+ location.reload();
|
|
|
|
51
|
+ }else{
|
|
|
|
52
|
+ layer.msg(res.msg,{time:1000,icon:2});
|
|
|
|
53
|
+ }
|
|
|
|
54
|
+ });
|
|
|
|
55
|
+ layer.close(index);
|
|
|
|
56
|
+ });
|
|
|
|
57
|
+ }
|
|
|
|
58
|
+ });
|
|
37
|
})
|
59
|
})
|
|
38
|
</script> |
60
|
</script> |