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
14aeb988
authored
Nov 27, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
ab7bac05
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
app/Http/Controllers/IndexController.php
app/Http/Controllers/SkuController.php
app/Http/Services/BaseService.php
app/Providers/AppServiceProvider.php
resources/views/web/Index.blade.php
app/Http/Controllers/IndexController.php
View file @
14aeb988
...
@@ -47,6 +47,7 @@ class IndexController extends Controller
...
@@ -47,6 +47,7 @@ class IndexController extends Controller
public
function
Index
(
$request
)
public
function
Index
(
$request
)
{
{
$service
=
new
IndexService
();
$service
=
new
IndexService
();
try
{
$statistics
=
$service
->
getDailySupplierAddStatistics
();
$statistics
=
$service
->
getDailySupplierAddStatistics
();
$this
->
data
[
'dates'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'date'
));
$this
->
data
[
'dates'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'date'
));
$this
->
data
[
'all_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'count'
));
$this
->
data
[
'all_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'count'
));
...
@@ -61,6 +62,10 @@ class IndexController extends Controller
...
@@ -61,6 +62,10 @@ class IndexController extends Controller
'value'
=>
$userId
,
'value'
=>
$userId
,
];
];
}
}
}
catch
(
\Exception
$exception
)
{
}
return
$this
->
view
(
'首页'
);
return
$this
->
view
(
'首页'
);
}
}
...
...
app/Http/Controllers/SkuController.php
View file @
14aeb988
...
@@ -44,7 +44,9 @@ class SkuController extends Controller
...
@@ -44,7 +44,9 @@ class SkuController extends Controller
public
function
SkuList
(
$request
)
public
function
SkuList
(
$request
)
{
{
$orgId
=
!
empty
(
request
()
->
user
->
org_id
)
?
request
()
->
user
->
org_id
:
1
;
$this
->
data
[
'isIedge'
]
=
$orgId
==
1
?
false
:
true
;
$this
->
data
[
'orgId'
]
=
$orgId
;
$skuTags
=
TagsModel
::
getTagNamesByTagUse
(
16
,
2
);
$skuTags
=
TagsModel
::
getTagNamesByTagUse
(
16
,
2
);
$this
->
data
[
'skuTags'
]
=
$skuTags
;
$this
->
data
[
'skuTags'
]
=
$skuTags
;
//获取筛选框的品牌数据
//获取筛选框的品牌数据
...
@@ -125,6 +127,9 @@ class SkuController extends Controller
...
@@ -125,6 +127,9 @@ class SkuController extends Controller
//批量设置sku显示类型
//批量设置sku显示类型
public
function
BatchUpdateGoodsLabel
(
$request
)
public
function
BatchUpdateGoodsLabel
(
$request
)
{
{
$orgId
=
!
empty
(
request
()
->
user
->
org_id
)
?
request
()
->
user
->
org_id
:
1
;
$this
->
data
[
'isIedge'
]
=
$orgId
==
1
?
false
:
true
;
$this
->
data
[
'orgId'
]
=
$orgId
;
$this
->
data
[
'title'
]
=
'批量设置sku显示类型'
;
$this
->
data
[
'title'
]
=
'批量设置sku显示类型'
;
$suppliers
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'status'
,
2
)
$suppliers
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'status'
,
2
)
->
select
([
'supplier_name'
,
'supplier_code'
])
->
get
();
->
select
([
'supplier_name'
,
'supplier_code'
])
->
get
();
...
...
app/Http/Services/BaseService.php
View file @
14aeb988
...
@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB;
...
@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB;
class
BaseService
class
BaseService
{
{
public
$
lo
gId
=
1
;
public
$
or
gId
=
1
;
public
function
__construct
()
public
function
__construct
()
{
{
...
...
app/Providers/AppServiceProvider.php
View file @
14aeb988
...
@@ -15,9 +15,7 @@ class AppServiceProvider extends ServiceProvider
...
@@ -15,9 +15,7 @@ class AppServiceProvider extends ServiceProvider
public
function
boot
()
public
function
boot
()
{
{
//共享全局模板变量
//共享全局模板变量
$orgId
=
!
empty
(
request
()
->
user
->
org_id
)
?
request
()
->
user
->
org_id
:
1
;
View
::
share
(
'orgId'
,
$orgId
);
View
::
share
(
'isIedge'
,
$orgId
==
1
?
false
:
true
);
}
}
/**
/**
...
...
resources/views/web/Index.blade.php
View file @
14aeb988
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