Commit 69ce8ced by 杨树贤

优化罗盘状态点击

parent 03d412a7
...@@ -81,26 +81,6 @@ ...@@ -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 = [ let cols = [
{type: 'checkbox', fixed: true}, {type: 'checkbox', fixed: true},
...@@ -608,7 +588,7 @@ ...@@ -608,7 +588,7 @@
form.on('submit(load)', function (data) { form.on('submit(load)', function (data) {
//罗盘选项会跳回全部 //罗盘选项会跳回全部
clearTypeFilter(); 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'; whereCondition.source_type = 'all';
initCondition.source_type = whereCondition.source_type; initCondition.source_type = whereCondition.source_type;
whereCondition = $.extend(false, initCondition, data.field); whereCondition = $.extend(false, initCondition, data.field);
...@@ -659,6 +639,5 @@ ...@@ -659,6 +639,5 @@
function clearTypeFilter() { function clearTypeFilter() {
$('.main_filter').attr('class', 'main_filter'); $('.main_filter').attr('class', 'main_filter');
$('.status_filter').attr('class', 'status_filter');
} }
</script> </script>
\ No newline at end of file
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
.main_filter { .main_filter {
cursor: pointer; cursor: pointer;
} }
.status_filter {
cursor: pointer;
}
</style> </style>
<div class="layui-fluid" id="type_filter"> <div class="layui-fluid" id="type_filter">
<div class="layui-card"> <div class="layui-card">
...@@ -18,30 +14,30 @@ ...@@ -18,30 +14,30 @@
</div> </div>
<div class="split-item" id="s2" style="text-align: center"> <div class="split-item" id="s2" style="text-align: center">
<div class="layui-row"> <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> </a>
</div> </div>
@if(checkPerm('SupplierPendingList')) @if(checkPerm('SupplierPendingList'))
<div class="layui-row"> <div class="layui-row">
<a class="status_filter" id="pending" data-value="0"> <a class="main_filter" id="pending" data-value="0">
</a> </a>
</div> </div>
@endif @endif
@if(checkPerm('SupplierInReviewList')) @if(checkPerm('SupplierInReviewList'))
<div class="layui-row"> <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> </a>
</div> </div>
@endif @endif
@if(checkPerm('SupplierRejectList')) @if(checkPerm('SupplierRejectList'))
<div class="layui-row"> <div class="layui-row">
<a class="status_filter" id="rejected" data-value="3"> <a class="main_filter" id="rejected" data-value="3">
</a> </a>
</div> </div>
@endif @endif
@if(checkPerm('SupplierPassedList')) @if(checkPerm('SupplierPassedList'))
<div class="layui-row"> <div class="layui-row">
<a class="status_filter" id="passed" data-value="2"> <a class="main_filter" id="passed" data-value="2">
</a> </a>
</div> </div>
@endif @endif
...@@ -102,13 +98,13 @@ ...@@ -102,13 +98,13 @@
<div class="split-item" id="s5" style="text-align: center"> <div class="split-item" id="s5" style="text-align: center">
@if(checkPerm('SupplierBlockList')) @if(checkPerm('SupplierBlockList'))
<div class="layui-row"> <div class="layui-row">
<a class="status_filter" id="block" data-value="-3"> <a class="main_filter" id="block" data-value="-3">
</a> </a>
</div> </div>
@endif @endif
@if(checkPerm('SupplierDisableList')) @if(checkPerm('SupplierDisableList'))
<div class="layui-row"> <div class="layui-row">
<a class="status_filter" id="disable" data-value="-2"> <a class="main_filter" id="disable" data-value="-2">
</a> </a>
</div> </div>
@endif @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