Commit 69ce8ced by 杨树贤

优化罗盘状态点击

parent 03d412a7
......@@ -81,26 +81,6 @@
});
});
//多加了个区分根据状态去筛选
$('.status_filter').click(function () {
clearTypeFilter();
$(this).attr('class', 'status_filter layui-badge layui-bg-green');
type = $(this).attr('id');
whereCondition.source_type = type
//先清空状态
whereCondition.status = 0;
let status = $(this).attr('data-value');
whereCondition.status = status;
table.reload('list', {
page: {
curr: 1
}
, where: whereCondition
});
//同时还要去联动下面的状态筛选
$('#status').val(status);
form.render('select')
});
let cols = [
{type: 'checkbox', fixed: true},
......@@ -608,7 +588,7 @@
form.on('submit(load)', function (data) {
//罗盘选项会跳回全部
clearTypeFilter();
$('#total').attr('class', 'status_filter layui-badge layui-bg-green');
$('#total').attr('class', 'main_filter layui-badge layui-bg-green');
whereCondition.source_type = 'all';
initCondition.source_type = whereCondition.source_type;
whereCondition = $.extend(false, initCondition, data.field);
......@@ -659,6 +639,5 @@
function clearTypeFilter() {
$('.main_filter').attr('class', 'main_filter');
$('.status_filter').attr('class', 'status_filter');
}
</script>
\ No newline at end of file
......@@ -2,10 +2,6 @@
.main_filter {
cursor: pointer;
}
.status_filter {
cursor: pointer;
}
</style>
<div class="layui-fluid" id="type_filter">
<div class="layui-card">
......@@ -18,30 +14,30 @@
</div>
<div class="split-item" id="s2" style="text-align: center">
<div class="layui-row">
<a class="status_filter" id="need_review" data-value="-1">
<a class="main_filter" id="need_review" data-value="-1">
</a>
</div>
@if(checkPerm('SupplierPendingList'))
<div class="layui-row">
<a class="status_filter" id="pending" data-value="0">
<a class="main_filter" id="pending" data-value="0">
</a>
</div>
@endif
@if(checkPerm('SupplierInReviewList'))
<div class="layui-row">
<a class="status_filter" id="in_review" data-value="1">
<a class="main_filter" id="in_review" data-value="1">
</a>
</div>
@endif
@if(checkPerm('SupplierRejectList'))
<div class="layui-row">
<a class="status_filter" id="rejected" data-value="3">
<a class="main_filter" id="rejected" data-value="3">
</a>
</div>
@endif
@if(checkPerm('SupplierPassedList'))
<div class="layui-row">
<a class="status_filter" id="passed" data-value="2">
<a class="main_filter" id="passed" data-value="2">
</a>
</div>
@endif
......@@ -102,13 +98,13 @@
<div class="split-item" id="s5" style="text-align: center">
@if(checkPerm('SupplierBlockList'))
<div class="layui-row">
<a class="status_filter" id="block" data-value="-3">
<a class="main_filter" id="block" data-value="-3">
</a>
</div>
@endif
@if(checkPerm('SupplierDisableList'))
<div class="layui-row">
<a class="status_filter" id="disable" data-value="-2">
<a class="main_filter" id="disable" data-value="-2">
</a>
</div>
@endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment