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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
22 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,22 +47,27 @@ class IndexController extends Controller
public
function
Index
(
$request
)
{
$service
=
new
IndexService
();
$statistics
=
$service
->
getDailySupplierAddStatistics
();
$this
->
data
[
'dates'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'date'
));
$this
->
data
[
'all_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'count'
));
$this
->
data
[
'user_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'user'
],
'count'
));
$intraCodeModel
=
new
IntracodeModel
();
$userCodes
=
$intraCodeModel
->
getSampleEncode
();
$this
->
data
[
'user'
]
=
$userCodes
;
$this
->
data
[
'purchase_users'
]
=
[];
foreach
(
$userCodes
as
$userId
=>
$code
)
{
$this
->
data
[
'purchase_users'
][]
=
[
'name'
=>
$code
,
'value'
=>
$userId
,
];
try
{
$statistics
=
$service
->
getDailySupplierAddStatistics
();
$this
->
data
[
'dates'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'date'
));
$this
->
data
[
'all_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'all'
],
'count'
));
$this
->
data
[
'user_increase_statistics'
]
=
array_values
(
array_column
(
$statistics
[
'user'
],
'count'
));
$intraCodeModel
=
new
IntracodeModel
();
$userCodes
=
$intraCodeModel
->
getSampleEncode
();
$this
->
data
[
'user'
]
=
$userCodes
;
$this
->
data
[
'purchase_users'
]
=
[];
foreach
(
$userCodes
as
$userId
=>
$code
)
{
$this
->
data
[
'purchase_users'
][]
=
[
'name'
=>
$code
,
'value'
=>
$userId
,
];
}
}
catch
(
\Exception
$exception
)
{
}
return
$this
->
view
(
'首页'
);
}
}
\ No newline at end of file
}
app/Http/Controllers/SkuController.php
View file @
14aeb988
...
...
@@ -44,7 +44,9 @@ class SkuController extends Controller
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
);
$this
->
data
[
'skuTags'
]
=
$skuTags
;
//获取筛选框的品牌数据
...
...
@@ -125,6 +127,9 @@ class SkuController extends Controller
//批量设置sku显示类型
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显示类型'
;
$suppliers
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'status'
,
2
)
->
select
([
'supplier_name'
,
'supplier_code'
])
->
get
();
...
...
app/Http/Services/BaseService.php
View file @
14aeb988
...
...
@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB;
class
BaseService
{
public
$
lo
gId
=
1
;
public
$
or
gId
=
1
;
public
function
__construct
()
{
...
...
app/Providers/AppServiceProvider.php
View file @
14aeb988
...
...
@@ -15,9 +15,7 @@ class AppServiceProvider extends ServiceProvider
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
...
...
@@ -98,4 +98,4 @@
let
admin
=
layui
.
admin
;
});
</script>
\ No newline at end of file
</script>
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