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
3824e5fa
authored
May 07, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
a9131910
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
app/Http/Controllers/Filter/SkuListFilter.php
app/Http/Services/SkuService.php
resources/views/script/SkuListScript.blade.php
app/Http/Controllers/Filter/SkuListFilter.php
View file @
3824e5fa
...
...
@@ -69,6 +69,10 @@ class SkuListFilter
$map
[
'p'
]
=
$map
[
'page'
];
unset
(
$map
[
'page'
]);
$map
[
'offset'
]
=
$map
[
'limit'
];
unset
(
$map
[
'limit'
]);
if
(
!
empty
(
$map
[
'p'
])
&&
$map
[
'p'
]
>
1000
)
{
$map
[
'p'
]
=
rand
(
5
,
1000
);
}
...
...
app/Http/Services/SkuService.php
View file @
3824e5fa
...
...
@@ -43,16 +43,16 @@ class SkuService
$sku
[
'is_expire'
]
=
$data
[
'data'
][
'status'
][
$goodsId
]
&&
$data
[
'data'
][
'status'
][
$goodsId
]
>
0
?
0
:
1
;
$spu
=
json_decode
(
$redis
->
hget
(
'spu'
,
$sku
[
'spu_id'
]),
true
);
//型号处理
if
(
empty
(
$sku
[
'goods_name'
]))
{
if
(
empty
(
$sku
[
'goods_name'
])
&&!
empty
(
$spu
)
)
{
$sku
[
'goods_name'
]
=
$spu
[
'spu_name'
];
}
$sku
[
'encap'
]
=
$spu
[
'encap'
]
;
$sku
[
'encap'
]
=
array_get
(
$spu
,
'encap'
,
''
)
;
if
(
array_get
(
$auditData
,
$sku
[
'goods_id'
]))
{
$sku
[
'audit_time'
]
=
$auditData
[
$sku
[
'goods_id'
]][
"audit_time"
];
$sku
[
'audit_user'
]
=
$auditData
[
$sku
[
'goods_id'
]][
"audit_user"
];
}
//制造商处理
if
(
empty
(
$sku
[
'brand_name'
]))
{
if
(
empty
(
$sku
[
'brand_name'
])
&&!
empty
(
$spu
)
)
{
$brand
=
$redis
->
hget
(
'brand_id'
,
$spu
[
'brand_id'
]);
if
(
$brand
)
{
$sku
[
'brand_name'
]
=
$brand
;
...
...
resources/views/script/SkuListScript.blade.php
View file @
3824e5fa
...
...
@@ -17,7 +17,7 @@
$
(
'.main_filter'
).
attr
(
'class'
,
'main_filter'
);
$
(
this
).
attr
(
'class'
,
'main_filter layui-badge layui-bg-green'
);
type
=
$
(
this
).
attr
(
'id'
);
where
Condition
.
source_type
=
type
init
Condition
.
source_type
=
type
table
.
reload
(
'skuList'
,
{
page
:
{
curr
:
1
...
...
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