Commit 30f474e3 by 杨树贤

筛选状态改成多选

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