|
...
|
...
|
@@ -15,6 +15,7 @@ |
|
|
|
</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('configMer')}?id={{d.id}}&name={{d.sellername}}" class="layui-btn layui-btn-xs">配置菜品</a>
|
|
|
|
</script>
|
|
|
|
<script>
|
|
...
|
...
|
@@ -27,12 +28,33 @@ |
|
|
|
page:true,
|
|
|
|
cols: [[
|
|
|
|
{field: 'id', title: '{:lang("id")}', width:60, fixed: true},
|
|
|
|
{field: 'name', title: '版本', width: 150},
|
|
|
|
{field: 'sellername', title: '商家名称', width: 150},
|
|
|
|
{field: 'phone', title: '商家电话', width: 150},
|
|
|
|
{field: 'map_address', title: '商家地址', width: 300},
|
|
|
|
{field: 'cdate', align: 'center',title: '创建日期', width: 120},
|
|
|
|
{field: 'statusVal', align: 'center',title: '状态', width: 120},
|
|
|
|
{field: 'cdate', align: 'center',title: '创建日期', width: 180},
|
|
|
|
{width: 200, align: 'center',title: '操作', toolbar: '#action'}
|
|
|
|
]]
|
|
|
|
});
|
|
|
|
|
|
|
|
//启用、停用
|
|
|
|
table.on('tool(list)', function(obj){
|
|
|
|
var data = obj.data;
|
|
|
|
if(obj.event === 'stop'){
|
|
|
|
var statusVal = data.status==1 ? '停用' : '启用';
|
|
|
|
layer.confirm('请确定要 '+statusVal+" 该商家!", function(index){
|
|
|
|
$.post("{:url('configStop')}",{sellerid:data.id,status:data.status},function(res){
|
|
|
|
if(res.code==1){
|
|
|
|
layer.msg(res.msg,{time:1000,icon:1});
|
|
|
|
location.reload();
|
|
|
|
}else{
|
|
|
|
layer.msg(res.msg,{time:1000,icon:2});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
layer.close(index);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|