店铺相关功能

This commit is contained in:
ly19960718 2021-03-20 15:30:40 +08:00
parent 88bbc3a116
commit 0b5011a0e6

View File

@ -31,23 +31,9 @@
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<!--&lt;!&ndash; 表头按钮组 &ndash;&gt;-->
<!--<script type="text/html" id="headerToolBar">-->
<!--<div class="layui-btn-group">-->
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!--<i class="fa fa-lg fa-plus"></i> 新增-->
<!--</button>-->
<!--<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">-->
<!--<i class="fa fa-lg fa-edit"></i> 编辑-->
<!--</button>-->
<!--<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!--<i class="fa fa-lg fa-trash"></i> 删除-->
<!--</button>-->
<!--</div>-->
<!--</script>-->
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="show">详情</a>
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="staff">人员</a>
</script>
</div>
@ -172,36 +158,6 @@
}
});
}
function showImg() {
var viewer = new Viewer(document.getElementById("imgShow"),{
inline: true,
url: 'data-original',
navbar: false,
zoomRatio: 0.4,
button: true,
title: false,
keyboard: false,
toolbar: {
zoomIn: 1,
zoomOut: 1,
oneToOne: 1,
reset: 1,
prev: 0,
play: 0,
next: 0,
rotateLeft: 1,
rotateRight: 1,
flipHorizontal: 1,
flipVertical: 1,
},
viewed: function () {
viewer.view(0);
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
@ -317,12 +273,12 @@
}
});
table.on('tool(dataTable)', function(obj){
table.on('tool(dataTable)', function(obj) {
//var checkStatus = table.checkStatus(obj.config.id);
var data = obj.data;
var event = obj.event;
if(event === 'show') {
if (event === 'show') {
layer.open({
type: 2,
title: false,
@ -330,27 +286,26 @@
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shop/show.html?shopId={shopId}', [data.showId]),
end: function() {
content: top.restAjax.path('route/shop/show.html?shopId={shopId}', [data.shopId]),
end: function () {
reloadTable();
}
});
// switch(obj.event){
// case 'add':
// layer.msg('添加');
// break;
// case 'delete':
// layer.msg('删除');
// break;
// case 'update':
// layer.msg('编辑');
// break;
// };
})
} else if (event === 'staff'){
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['90%', '90%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopstaff/list.html?shopId={shopId}', [data.shopId]),
end: function () {
reloadTable();
}
})
}
});
});
</script>
</body>