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
7fd54f02
authored
May 26, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
列设置查看
parent
e1030a14
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
147 additions
and
0 deletions
resources/views/script/SupplierListScript.blade.php
resources/views/web/SupplierList.blade.php
storage/framework/views/5238497145456f693cc29f1fe0a7ff8fb43fd269.php
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
resources/views/script/SupplierListScript.blade.php
View file @
7fd54f02
...
@@ -359,6 +359,24 @@
...
@@ -359,6 +359,24 @@
];
];
cols
.
push
(
cols
.
push
(
);
);
// 列显示设置缓存
let
colSettingsKey
=
'supplier_list_col_settings_{{request()->user->userId}}'
;
function
applyColSettings
()
{
let
settings
=
localStorage
.
getItem
(
colSettingsKey
);
if
(
settings
)
{
settings
=
JSON
.
parse
(
settings
);
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
let
field
=
cols
[
i
].
field
;
if
(
field
&&
settings
[
field
]
!==
undefined
)
{
cols
[
i
].
hide
=
!
settings
[
field
];
}
}
}
}
applyColSettings
();
table
.
render
({
table
.
render
({
elem
:
'#list'
elem
:
'#list'
,
url
:
'/api/supplier/GetSupplierList'
,
url
:
'/api/supplier/GetSupplierList'
...
@@ -447,6 +465,58 @@
...
@@ -447,6 +465,58 @@
admin
.
putTempData
(
"needFreshDetail_supplier_id="
+
supplierId
,
1
);
admin
.
putTempData
(
"needFreshDetail_supplier_id="
+
supplierId
,
1
);
}
}
//列设置
$
(
"#col_setting"
).
click
(
function
()
{
let
html
=
'
<
div
style
=
"padding: 15px; max-height: 700px; overflow-y: auto;"
>
';
html += '
<
form
class
=
"layui-form"
lay
-
filter
=
"colSettingForm"
>
'
;
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
if
(
cols
[
i
].
type
===
'checkbox'
)
continue
;
let
field
=
cols
[
i
].
field
;
let
title
=
cols
[
i
].
title
||
''
;
let
checked
=
cols
[
i
].
hide
?
''
:
'checked'
;
html
+=
'
<
div
class
=
"layui-form-item"
style
=
"display:inline-block;width:33%;margin-bottom:5px;"
>
';
html += '
<
input
type
=
"checkbox"
name
=
"' + field + '"
lay
-
skin
=
"primary"
title
=
"' + title + '"
' + checked + '
>
';
html += '
<
/div>'
;
}
html
+=
'
<
/form></
div
>
';
layer.open({
type: 1,
title: '
显示列设置
',
area: ['
800
px
', '
700
px
'],
content: html,
btn: ['
确定
', '
取消
'],
success: function (layero, index) {
form.render('
checkbox
', '
colSettingForm
');
},
yes: function (index, layero) {
let settings = {};
let checkboxes = layero.find('
input
[
type
=
"checkbox"
]
');
checkboxes.each(function () {
let name = $(this).attr('
name
');
let checked = $(this).is('
:
checked
'
);
settings
[
name
]
=
checked
;
});
localStorage
.
setItem
(
colSettingsKey
,
JSON
.
stringify
(
settings
));
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
let
field
=
cols
[
i
].
field
;
if
(
field
&&
settings
[
field
]
!==
undefined
)
{
cols
[
i
].
hide
=
!
settings
[
field
];
}
}
table
.
reload
(
'list'
,
{
cols
:
[
cols
],
page
:
{
curr
:
currentPage
},
where
:
whereCondition
});
layer
.
close
(
index
);
}
});
});
//新增供应商弹窗
//新增供应商弹窗
$
(
"#add_supplier"
).
click
(
function
()
{
$
(
"#add_supplier"
).
click
(
function
()
{
index
.
openTab
({
index
.
openTab
({
...
...
resources/views/web/SupplierList.blade.php
View file @
7fd54f02
...
@@ -79,6 +79,9 @@
...
@@ -79,6 +79,9 @@
@if(checkPerm('TransferSupplier'))
@if(checkPerm('TransferSupplier'))
<button type="
button
" class="
layui
-
btn
layui
-
btn
-
sm
" id="
transfer_supplier
">供应商交接</button>
<button type="
button
" class="
layui
-
btn
layui
-
btn
-
sm
" id="
transfer_supplier
">供应商交接</button>
@endif
@endif
@if(checkPerm('ConfirmCrmSupplier') && checkPerm('ViewConfirmSupplier'))
<button type="
button
" class="
layui
-
btn
layui
-
btn
-
sm
" id="
confirm_crm_supplier
">确认客户转化供应商</button>
@endif
</div>
</div>
<button type="
button
" id="
refreshWindow
" style="
display
:
none
">刷新页面</button>
<button type="
button
" id="
refreshWindow
" style="
display
:
none
">刷新页面</button>
<table class="
layui
-
table
" id="
list
" lay-filter="
list
"></table>
<table class="
layui
-
table
" id="
list
" lay-filter="
list
"></table>
...
...
storage/framework/views/5238497145456f693cc29f1fe0a7ff8fb43fd269.php
View file @
7fd54f02
...
@@ -79,6 +79,10 @@
...
@@ -79,6 +79,10 @@
<?php
if
(
checkPerm
(
'TransferSupplier'
))
:
?>
<?php
if
(
checkPerm
(
'TransferSupplier'
))
:
?>
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"transfer_supplier"
>
供应商交接
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"transfer_supplier"
>
供应商交接
</button>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
checkPerm
(
'ConfirmCrmSupplier'
)
&&
checkPerm
(
'ViewConfirmSupplier'
))
:
?>
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"confirm_crm_supplier"
>
确认客户转化供应商
</button>
<?php
endif
;
?>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-normal"
id=
"col_setting"
>
列设置
</button>
</div>
</div>
<button
type=
"button"
id=
"refreshWindow"
style=
"display: none"
>
刷新页面
</button>
<button
type=
"button"
id=
"refreshWindow"
style=
"display: none"
>
刷新页面
</button>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
...
...
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
View file @
7fd54f02
...
@@ -359,6 +359,24 @@
...
@@ -359,6 +359,24 @@
];
];
cols
.
push
(
cols
.
push
(
);
);
// 列显示设置缓存
let
colSettingsKey
=
'
supplier_list_col_settings_
<?php
echo
e
(
request
()
->
user
->
userId
);
?>
'
;
function
applyColSettings
()
{
let
settings
=
localStorage
.
getItem
(
colSettingsKey
);
if
(
settings
)
{
settings
=
JSON
.
parse
(
settings
);
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
let
field
=
cols
[
i
].
field
;
if
(
field
&&
settings
[
field
]
!==
undefined
)
{
cols
[
i
].
hide
=
!
settings
[
field
];
}
}
}
}
applyColSettings
();
table
.
render
({
table
.
render
({
elem
:
'#list'
elem
:
'#list'
,
url
:
'/api/supplier/GetSupplierList'
,
url
:
'/api/supplier/GetSupplierList'
...
@@ -447,6 +465,58 @@
...
@@ -447,6 +465,58 @@
admin
.
putTempData
(
"needFreshDetail_supplier_id="
+
supplierId
,
1
);
admin
.
putTempData
(
"needFreshDetail_supplier_id="
+
supplierId
,
1
);
}
}
//列设置
$
(
"#col_setting"
).
click
(
function
()
{
let
html
=
'
<
div
style
=
"padding: 15px; max-height: 700px; overflow-y: auto;"
>
';
html += '
<
form
class
=
"layui-form"
lay
-
filter
=
"colSettingForm"
>
'
;
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
if
(
cols
[
i
].
type
===
'checkbox'
)
continue
;
let
field
=
cols
[
i
].
field
;
let
title
=
cols
[
i
].
title
||
''
;
let
checked
=
cols
[
i
].
hide
?
''
:
'checked'
;
html
+=
'
<
div
class
=
"layui-form-item"
style
=
"display:inline-block;width:33%;margin-bottom:5px;"
>
';
html += '
<
input
type
=
"checkbox"
name
=
"' + field + '"
lay
-
skin
=
"primary"
title
=
"' + title + '"
' + checked + '
>
';
html += '
<
/div>'
;
}
html
+=
'
<
/form></
div
>
';
layer.open({
type: 1,
title: '
显示列设置
',
area: ['
800
px
', '
700
px
'],
content: html,
btn: ['
确定
', '
取消
'],
success: function (layero, index) {
form.render('
checkbox
', '
colSettingForm
');
},
yes: function (index, layero) {
let settings = {};
let checkboxes = layero.find('
input
[
type
=
"checkbox"
]
');
checkboxes.each(function () {
let name = $(this).attr('
name
');
let checked = $(this).is('
:
checked
'
);
settings
[
name
]
=
checked
;
});
localStorage
.
setItem
(
colSettingsKey
,
JSON
.
stringify
(
settings
));
for
(
let
i
=
0
;
i
<
cols
.
length
;
i
++
)
{
let
field
=
cols
[
i
].
field
;
if
(
field
&&
settings
[
field
]
!==
undefined
)
{
cols
[
i
].
hide
=
!
settings
[
field
];
}
}
table
.
reload
(
'list'
,
{
cols
:
[
cols
],
page
:
{
curr
:
currentPage
},
where
:
whereCondition
});
layer
.
close
(
index
);
}
});
});
//新增供应商弹窗
//新增供应商弹窗
$
(
"#add_supplier"
).
click
(
function
()
{
$
(
"#add_supplier"
).
click
(
function
()
{
index
.
openTab
({
index
.
openTab
({
...
...
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