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
a803dd71
authored
Jul 28, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into ysx-期货有效期-20230725
parents
50a32e03
8f9ce3ee
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
17 deletions
app/Http/Controllers/Filter/SkuListFilter.php
app/Http/Services/SkuService.php
app/Http/Services/SupplierStatisticsService.php
app/Http/Transformers/SupplierContactTransformer.php
config/fixed.php
resources/views/web/sku/SkuListFilter.blade.php
resources/views/web/supplier/SupplierListFilter.blade.php
app/Http/Controllers/Filter/SkuListFilter.php
View file @
a803dd71
...
...
@@ -53,6 +53,16 @@ class SkuListFilter
unset
(
$map
[
'source_type'
]);
}
if
(
!
empty
(
$map
[
'has_price'
]))
{
if
(
$map
[
'has_price'
]
==
1
)
{
$map
[
'single_price/sr'
]
=
'gt,0'
;
}
else
{
$map
[
'single_price/eq'
]
=
'0'
;
}
unset
(
$map
[
'source_type'
]);
}
if
(
!
empty
(
$map
[
'stock_compare_type'
])
&&
!
empty
(
$map
[
'stock_num'
]))
{
switch
(
$map
[
'stock_compare_type'
])
{
case
'eq'
:
...
...
@@ -84,4 +94,4 @@ class SkuListFilter
}
return
$map
;
}
}
\ No newline at end of file
}
app/Http/Services/SkuService.php
View file @
a803dd71
...
...
@@ -87,6 +87,9 @@ class SkuService
if
(
!
empty
(
$sku
[
'ladder_price'
]))
{
$priceService
=
new
PriceService
();
$moqPrice
=
$priceService
->
getMoqPrice
(
$sku
[
'ladder_price'
]);
if
(
!
is_array
(
$sku
[
'ladder_price'
]))
{
$sku
[
'ladder_price'
]
=
json_decode
(
$sku
[
'ladder_price'
],
true
);
}
foreach
(
$sku
[
'ladder_price'
]
as
&
$ladder
)
{
$ladder
[
'purchases'
]
=
$ladder
[
'purchases'
]
==
0
?
$sku
[
'moq'
]
:
$ladder
[
'purchases'
];
}
...
...
@@ -440,4 +443,4 @@ class SkuService
{
}
}
\ No newline at end of file
}
app/Http/Services/SupplierStatisticsService.php
View file @
a803dd71
...
...
@@ -20,8 +20,8 @@ class SupplierStatisticsService
return
$result
;
}
$total
=
$this
->
getStatisticsCount
(
'all'
);
//
//待复审
//
$needReview = $this->getStatisticsCount('need_review');
//待复审
$needReview
=
$this
->
getStatisticsCount
(
'need_review'
);
// //待提审
// $pending = $this->getStatisticsCount('pending');
// //审核中
...
...
@@ -62,7 +62,7 @@ class SupplierStatisticsService
//缺少品质协议(线上)
$result
=
[
'total'
=>
$total
,
//
'need_review' => $needReview,
'need_review'
=>
$needReview
,
// 'pending' => $pending,
// 'in_review' => $inReview,
// 'passed' => $passed,
...
...
@@ -131,4 +131,4 @@ class SupplierStatisticsService
}
return
$filter
->
defaultFilter
(
$model
,
$type
)
->
count
();
}
}
\ No newline at end of file
}
app/Http/Transformers/SupplierContactTransformer.php
View file @
a803dd71
...
...
@@ -25,7 +25,7 @@ class SupplierContactTransformer
$item
[
'supplier_email'
]
=
$emailTemp
;
}
}
if
(
!
empty
(
$item
[
'supplier_mobile'
]))
{
if
(
!
empty
(
$item
[
'supplier_mobile'
])
&&
!
preg_match
(
"/[\x
{
4e00}-\x{9fa5
}
]/u"
,
$item
[
'supplier_mobile'
])
)
{
$temp
=
substr
(
$item
[
'supplier_mobile'
],
3
,
4
);
$item
[
'supplier_mobile'
]
=
str_replace
(
$temp
,
'****'
,
$item
[
'supplier_mobile'
]);
}
...
...
@@ -52,4 +52,4 @@ class SupplierContactTransformer
return
$list
;
}
}
\ No newline at end of file
}
config/fixed.php
View file @
a803dd71
...
...
@@ -220,7 +220,7 @@ return [
'CompassMenuMap'
=>
[
'total'
=>
'全部'
,
// 'pending' => '待提审',
//
'need_review' => '待复审',
'need_review'
=>
'待复审'
,
// 'in_review' => '审核中',
// 'draft' => '草稿',
// 'passed' => '已通过',
...
...
resources/views/web/sku/SkuListFilter.blade.php
View file @
a803dd71
...
...
@@ -137,7 +137,7 @@
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('
single_price/sr','有无价格',request()->get('single_price/sr'),['gt,0'=> '有','eq,0
'=> '无']) !!}
{!! $statusPresenter->render('
has_price','有无价格',request()->get('has_price'),['1'=> '有','-1
'=> '无']) !!}
</div>
<div
class=
"layui-inline"
style=
"width: 600px"
>
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
...
...
resources/views/web/supplier/SupplierListFilter.blade.php
View file @
a803dd71
...
...
@@ -7,9 +7,14 @@
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
style=
"padding: 0;"
>
<div
class=
"split-group"
style=
"height: 170px;"
>
<div
class=
"split-item"
id=
"s1"
>
<div
class=
"split-item"
id=
"s1"
style=
"text-align: center"
>
<div
class=
"layui-row"
>
<a
class=
"main_filter layui-badge layui-bg-green"
id=
"total"
></a>
<div
class=
"layui-row"
>
<a
class=
"main_filter"
title=
"待复审"
id=
"need_review"
>
待复审
</a>
</div>
</div>
</div>
{{--
<div
class=
"split-item"
id=
"s2"
style=
"text-align: center"
>
--}}
...
...
@@ -284,4 +289,4 @@
</div>
</form>
@endif
</div>
\ No newline at end of file
</div>
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