Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
30f474e3
authored
Jun 17, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
筛选状态改成多选
parent
1c105661
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Controllers/SupplierController.php
app/Presenters/MultiSelectorPresenter.php
resources/views/web/supplier/SupplierListCommon.blade.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
30f474e3
...
...
@@ -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
->
where
In
(
'status'
,
explode
(
','
,
$map
[
'status'
])
);
}
if
(
!
empty
(
$map
[
'is_type'
]))
{
...
...
app/Http/Controllers/SupplierController.php
View file @
30f474e3
...
...
@@ -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
(
'供应商列表'
);
}
...
...
app/Presenters/MultiSelectorPresenter.php
View file @
30f474e3
...
...
@@ -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:
300
px;">
<div class="layui-input-inline" style="margin-top: 0
">
<div id="$elemId" class="layui-input-inline" value="$value" style="width:
155
px;">
</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",
...
...
resources/views/web/supplier/SupplierListCommon.blade.php
View file @
30f474e3
...
...
@@ -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')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment