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
...
@@ -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
->
where
In
(
'status'
,
explode
(
','
,
$map
[
'status'
])
);
}
}
if
(
!
empty
(
$map
[
'is_type'
]))
{
if
(
!
empty
(
$map
[
'is_type'
]))
{
...
...
app/Http/Controllers/SupplierController.php
View file @
30f474e3
...
@@ -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
(
'供应商列表'
);
}
}
...
...
app/Presenters/MultiSelectorPresenter.php
View file @
30f474e3
...
@@ -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:
300
px;">
<div id="$elemId" class="layui-input-inline" value="$value" style="width:
155
px;">
</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",
...
...
resources/views/web/supplier/SupplierListCommon.blade.php
View file @
30f474e3
...
@@ -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')
...
...
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