Commit 30f474e3 by 杨树贤

筛选状态改成多选

parent 1c105661
...@@ -58,7 +58,7 @@ class SupplierFilter ...@@ -58,7 +58,7 @@ class SupplierFilter
$query->where('create_uid', $adminId); $query->where('create_uid', $adminId);
} }
if ((isset($map['status']) && $map['status'] === "0") || !empty($map['status'])) { if ((isset($map['status']) && $map['status'] === "0") || !empty($map['status'])) {
$query->where('status', $map['status']); $query->whereIn('status', explode(',',$map['status']));
} }
if (!empty($map['is_type'])) { if (!empty($map['is_type'])) {
......
...@@ -66,6 +66,14 @@ class SupplierController extends Controller ...@@ -66,6 +66,14 @@ class SupplierController extends Controller
$applyService = new SupplierShareApplyService(); $applyService = new SupplierShareApplyService();
$applyData = $applyService->getAuditSupplierShareApplyList($request->user->userId); $applyData = $applyService->getAuditSupplierShareApplyList($request->user->userId);
$this->data['shareApplyCount'] = $applyData['total']; $this->data['shareApplyCount'] = $applyData['total'];
$statusData = [];
foreach (config('fixed.SupplierStatus') as $key=>$value) {
$statusData[] = [
'name' => $value,
'value' => $key,
];
}
$this->data['statusData'] = $statusData;
return $this->view('供应商列表'); return $this->view('供应商列表');
} }
......
...@@ -17,18 +17,14 @@ class MultiSelectorPresenter ...@@ -17,18 +17,14 @@ class MultiSelectorPresenter
<label class="layui-form-label"> <label class="layui-form-label">
$requiredHtml $requiredHtml
$text</label> $text</label>
<div class="layui-input-inline"> <div class="layui-input-inline" style="margin-top: 0">
<div id="$elemId" class="layui-input-inline" value="$value" style="width: 300px;"> <div id="$elemId" class="layui-input-inline" value="$value" style="width: 155px;">
</div> </div>
<input type="hidden" name="$name" id="$name" value="$value"> <input type="hidden" name="$name" id="$name" value="$value">
</div> </div>
<script> <script>
window.onload = function(){ window.onload = function(){
layui.config({ layui.use(['xmSelect', 'element'], function () {
base: '/js/web/layui/exts/xmSelect/'
}).extend({
xmSelect: 'xm-select'
}).use(['xmSelect', 'element'], function () {
let xmSelect = layui.xmSelect; let xmSelect = layui.xmSelect;
//渲染多选 //渲染多选
let selector = xmSelect.render({ let selector = xmSelect.render({
...@@ -41,6 +37,7 @@ class MultiSelectorPresenter ...@@ -41,6 +37,7 @@ class MultiSelectorPresenter
name: 'name', name: 'name',
value: 'value' value: 'value'
}, },
size: 'mini',
direction: 'down', direction: 'down',
data : $data, data : $data,
height: "1300px", height: "1300px",
......
...@@ -152,8 +152,10 @@ ...@@ -152,8 +152,10 @@
{!! $transformableInputPresenter->render(['supplier_name'=>'供应商名称','supplier_code'=>'供应商编码','supplier_id'=>'供应商ID']) !!} {!! $transformableInputPresenter->render(['supplier_name'=>'供应商名称','supplier_code'=>'供应商编码','supplier_id'=>'供应商ID']) !!}
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter') {{-- @inject('statusPresenter','App\Presenters\StatusPresenter')--}}
{!! $statusPresenter->render('status','供应商状态','',config('fixed.SupplierStatus')) !!} {{-- {!! $statusPresenter->render('status','供应商状态','',config('fixed.SupplierStatus')) !!}--}}
@inject('multiSelectorPresenter','App\Presenters\MultiSelectorPresenter')
{!! $multiSelectorPresenter->render('status','供应商状态','',$statusData) !!}
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
......
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