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
205c6c79
authored
May 25, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-过期时间需求-20260521' into Dev
parents
0ab3c241
aefb76fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
80 additions
and
41 deletions
app/Http/Controllers/BaseController.php
app/Http/Controllers/Controller.php
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Services/SupplierStatisticsService.php
app/Providers/AppServiceProvider.php
resources/views/layouts/menu.blade.php
resources/views/layouts/navigation.blade.php
resources/views/script/SupplierListScript.blade.php
resources/views/web/sku/SkuListFilter.blade.php
resources/views/web/supplier/SupplierListFilter.blade.php
storage/framework/views/587faa134dc1f8953abf61cb2995b8264ba36a12.php
storage/framework/views/63397d1ebe145992083a1105367395dcd7ab2c7d.php
storage/framework/views/946347aaed783d5b9340dc21b99527c1d0f3bda0.php
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
app/Http/Controllers/BaseController.php
View file @
205c6c79
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\Http\Services\SupplierStatisticsService
;
class
BaseController
extends
Controller
class
BaseController
extends
Controller
{
{
...
@@ -16,4 +17,6 @@ class BaseController extends Controller
...
@@ -16,4 +17,6 @@ class BaseController extends Controller
return
$this
->
apiReturn
(
0
,
'切换成功'
);
return
$this
->
apiReturn
(
0
,
'切换成功'
);
}
}
}
}
app/Http/Controllers/Controller.php
View file @
205c6c79
...
@@ -27,7 +27,7 @@ class Controller extends BaseController
...
@@ -27,7 +27,7 @@ class Controller extends BaseController
protected
function
view
(
$title
=
''
)
protected
function
view
(
$title
=
''
)
{
{
$this
->
data
[
'title'
]
=
$title
;
$this
->
data
[
'title'
]
=
$title
;
$view
=
request
(
'view'
,
'web'
);
$view
=
request
(
'view'
,
'web'
);
return
view
(
$view
,
$this
->
data
);
return
view
(
$view
,
$this
->
data
);
}
}
...
...
app/Http/Controllers/Filter/SupplierFilter.php
View file @
205c6c79
...
@@ -159,6 +159,18 @@ class SupplierFilter
...
@@ -159,6 +159,18 @@ class SupplierFilter
$query
->
where
(
'is_entity'
,
$map
[
'is_entity'
]);
$query
->
where
(
'is_entity'
,
$map
[
'is_entity'
]);
}
}
if
((
isset
(
$map
[
'is_sku_expire'
])
&&
$map
[
'is_sku_expire'
]
===
"0"
)
||
!
empty
(
$map
[
'is_sku_expire'
]))
{
if
(
$map
[
'is_sku_expire'
]
==
1
)
{
$query
->
where
(
'sku_expired_in_days'
,
'>'
,
0
)
->
where
(
'uploaded_sku'
,
1
);
}
else
{
$query
->
where
(
'sku_expired_in_days'
,
0
);
}
}
if
(
!
empty
(
$map
[
'sku_expired_in_days'
])
&&
is_numeric
(
$map
[
'sku_expired_in_days'
]))
{
$query
->
where
(
'sku_expired_in_days'
,
'>='
,
$map
[
'sku_expired_in_days'
]);
}
if
(
!
empty
(
$map
[
'create_time'
]))
{
if
(
!
empty
(
$map
[
'create_time'
]))
{
$times
=
explode
(
'~'
,
$map
[
'create_time'
]);
$times
=
explode
(
'~'
,
$map
[
'create_time'
]);
$startTime
=
strtotime
(
$times
[
0
]);
$startTime
=
strtotime
(
$times
[
0
]);
...
@@ -548,6 +560,9 @@ class SupplierFilter
...
@@ -548,6 +560,9 @@ class SupplierFilter
$query
->
select
(
'supplier_id'
)
->
from
(
with
(
new
SupplierAttachmentsModel
())
->
getTable
())
->
where
(
'field_name'
,
'cooperation_agreement'
);
$query
->
select
(
'supplier_id'
)
->
from
(
with
(
new
SupplierAttachmentsModel
())
->
getTable
())
->
where
(
'field_name'
,
'cooperation_agreement'
);
})
->
where
(
'uploaded_sku'
,
1
);
})
->
where
(
'uploaded_sku'
,
1
);
break
;
break
;
case
"sku_expired"
:
$query
->
where
(
'sku_expired_in_days'
,
'>'
,
0
);
break
;
}
}
return
$query
;
return
$query
;
}
}
...
...
app/Http/Services/SupplierStatisticsService.php
View file @
205c6c79
...
@@ -63,50 +63,24 @@ class SupplierStatisticsService
...
@@ -63,50 +63,24 @@ class SupplierStatisticsService
$result
=
[
$result
=
[
'total'
=>
$total
,
'total'
=>
$total
,
'need_review'
=>
$needReview
,
'need_review'
=>
$needReview
,
// 'pending' => $pending,
// 'in_review' => $inReview,
// 'passed' => $passed,
// 'rejected' => $rejected,
// 'disable' => $disable,
'block'
=>
$block
,
'block'
=>
$block
,
// 'no_purchase_uid' => $noPurchaseUid,
// 'no_channel_uid' => $noChannelUid,
// 'invalid_channel_uid' => $invalidChannelUid,
// 'invalid_purchase_uid' => $invalidPurchaseUid,
// 'to_follow_up' => $toFollowUp,
// 'no_sku' => $noSku,
// 'no_quality_assurance_agreement' => $noQualityAssuranceAgreement,
// 'has_supplier_tag' => $hasTagSupplier,
// 'contact_no_complete' => $concatNoComplete,
// 'history_abnormal' => $historyAbnormal,
'pay_type_term'
=>
$payTypeTerm
,
'pay_type_term'
=>
$payTypeTerm
,
'level_a'
=>
$levelA
,
'level_a'
=>
$levelA
,
//所有采购员离职
'all_channel_user_resigned'
=>
null
,
'all_channel_user_resigned'
=>
null
,
//历史平台合作供应商
'uploaded_sku'
=>
null
,
'uploaded_sku'
=>
null
,
// 非芯链供应商
'not_yunxin'
=>
null
,
'not_yunxin'
=>
null
,
//已上架(非芯链)供应商
'not_yunxin_and_has_sku'
=>
null
,
'not_yunxin_and_has_sku'
=>
null
,
//已下架(非芯链)供应商
'not_yunxin_and_has_no_sku'
=>
null
,
'not_yunxin_and_has_no_sku'
=>
null
,
//芯链供应商
'yunxin'
=>
null
,
'yunxin'
=>
null
,
//已上架(芯链)供应商
'yunxin_and_has_sku'
=>
null
,
'yunxin_and_has_sku'
=>
null
,
//已下架(芯链)供应商
'yunxin_and_has_no_sku'
=>
null
,
'yunxin_and_has_no_sku'
=>
null
,
//3天内到期(芯链)供应商
'yunxin_expired_at_days'
=>
null
,
'yunxin_expired_at_days'
=>
null
,
//3天内到期(非芯链)供应商
'not_yunxin_expired_at_days'
=>
null
,
'not_yunxin_expired_at_days'
=>
null
,
//已过期(芯链)供应商
'yunxin_expired'
=>
null
,
'yunxin_expired'
=>
null
,
//已过期(非芯链)供应商
'not_yunxin_expired'
=>
null
,
'not_yunxin_expired'
=>
null
,
//缺少平台合作协议(线上)
'no_cooperation_agreement'
=>
null
,
'no_cooperation_agreement'
=>
null
,
'no_quality_assurance_agreement_all'
=>
null
,
'sku_expired'
=>
null
,
];
];
$result
=
array_map
(
function
(
$value
)
{
$result
=
array_map
(
function
(
$value
)
{
if
(
$value
>
999
)
{
if
(
$value
>
999
)
{
...
...
app/Providers/AppServiceProvider.php
View file @
205c6c79
...
@@ -16,6 +16,25 @@ class AppServiceProvider extends ServiceProvider
...
@@ -16,6 +16,25 @@ class AppServiceProvider extends ServiceProvider
*/
*/
public
function
boot
()
public
function
boot
()
{
{
// 共享全局模板变量:SKU过期数量
View
::
composer
(
'*'
,
function
(
$view
)
{
$skuExpiredCount
=
0
;
if
(
request
()
->
user
)
{
$cacheKey
=
'sku_expired_count_'
.
request
()
->
user
->
userId
;
$redis
=
new
\App\Model\RedisModel
();
$count
=
$redis
->
get
(
$cacheKey
);
if
(
$count
!==
false
&&
$count
!==
null
)
{
$skuExpiredCount
=
(
int
)
$count
;
}
else
{
$count
=
(
new
\App\Http\Services\SupplierStatisticsService
())
->
getStatisticsCount
(
'sku_expired'
);
$redis
->
set
(
$cacheKey
,
$count
);
$redis
->
expire
(
$cacheKey
,
60
);
$skuExpiredCount
=
$count
;
}
}
$view
->
with
(
'skuExpiredCount'
,
$skuExpiredCount
);
});
// // 只在本地环境生效
// // 只在本地环境生效
// if ($this->app->environment('local')) {
// if ($this->app->environment('local')) {
// // 自定义一个新的 Handler
// // 自定义一个新的 Handler
...
...
resources/views/layouts/menu.blade.php
View file @
205c6c79
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<
dl
class
="
layui
-
nav
-
child
">
<
dl
class
="
layui
-
nav
-
child
">
@foreach(
$v['childs']
as
$k
=>
$v
)
@foreach(
$v['childs']
as
$k
=>
$v
)
<dd>
<dd>
<a class="
layui
-
icon
{{
$v
[
'class'
]
or
''
}}
"
@if(!empty(
$v['href']
)) lay-href="
{{
iframeUrl
(
$v
[
'href'
])}}
" @endif>
{
{$v['title']}
}
</a>
<a class="
layui
-
icon
{{
$v
[
'class'
]
or
''
}}
"
ew-title="
{{
$v
[
'title'
]}}
" @if(!empty(
$v['href']
)) lay-href="
{{
iframeUrl
(
$v
[
'href'
])}}
" @endif>
{
{$v['title']}
}
@if(
$v['title']
== '供应商列表' && !empty(
$skuExpiredCount
) &&
$skuExpiredCount
> 0) <span class="
layui
-
badge
layui
-
bg
-
red
" style="
margin
-
left
:
5
px
;
">{{
$skuExpiredCount
> 99 ? '99+' :
$skuExpiredCount
}}</span> @endif
</a>
@include("
layouts
.
menu
")
{{-- @include("
layouts
.
menu
") --}}
</dd>
</dd>
@endforeach
@endforeach
</dl>
</dl>
@endif
@endif
\ No newline at end of file
resources/views/layouts/navigation.blade.php
View file @
205c6c79
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<i
class=
"layui-icon {{$v['class'] or ''}}"
></i>
 
<cite>
{{$v['title'] or ''}}
</cite>
<i
class=
"layui-icon {{$v['class'] or ''}}"
></i>
 
<cite>
{{$v['title'] or ''}}
</cite>
</a>
</a>
@else
@else
<a
@
if
(!
empty
($
v
['
href
']))
lay-href=
"{{iframeUrl($v['href'])}}"
@
endif
>
<a
@
if
(!
empty
($
v
['
href
']))
lay-href=
"{{iframeUrl($v['href'])}}"
@
endif
>
<i
class=
"layui-icon {{$v['class'] or ''}}"
></i>
 
<cite>
{{$v['title'] or ''}}
</cite>
<i
class=
"layui-icon {{$v['class'] or ''}}"
></i>
 
<cite>
{{$v['title'] or ''}}
</cite>
</a>
</a>
...
@@ -22,4 +23,4 @@
...
@@ -22,4 +23,4 @@
@endif
@endif
</ul>
</ul>
</div>
</div>
</div>
</div>
\ No newline at end of file
resources/views/script/SupplierListScript.blade.php
View file @
205c6c79
...
@@ -345,6 +345,19 @@
...
@@ -345,6 +345,19 @@
},
},
{
field
:
'average_sku_num'
,
title
:
'日均上架数'
,
align
:
'center'
,
width
:
100
},
{
field
:
'average_sku_num'
,
title
:
'日均上架数'
,
align
:
'center'
,
width
:
100
},
{
{
field
:
'is_sku_expire'
,
title
:
'商品是否过期'
,
align
:
'center'
,
width
:
130
,
templet
:
function
(
data
)
{
return
data
.
is_sku_expire
==
1
?
'
<
span
style
=
"color: red;"
>
是
<
/span>' : '否'
;
}
},
{
field
:
'sku_expired_in_days'
,
title
:
'商品过期天数'
,
align
:
'center'
,
width
:
130
,
templet
:
function
(
data
)
{
if
(
data
.
sku_expired_in_days
>
0
)
{
return
'
<
span
style
=
"color: red;"
>
' + data.sku_expired_in_days + '
<
/span>'
;
}
return
data
.
sku_expired_in_days
||
0
;
}
},
{
field
:
'cp_time_day'
,
title
:
'有效期最高天数'
,
align
:
'center'
,
width
:
180
,
templet
:
function
(
data
)
{
field
:
'cp_time_day'
,
title
:
'有效期最高天数'
,
align
:
'center'
,
width
:
180
,
templet
:
function
(
data
)
{
let
cpTime
=
data
.
cp_time_day
==
-
1
?
'无限制'
:
data
.
cp_time_day
+
'天'
;
let
cpTime
=
data
.
cp_time_day
==
-
1
?
'无限制'
:
data
.
cp_time_day
+
'天'
;
let
futuresCpTime
=
data
.
futures_cp_time_day
==
-
1
?
'无限制'
:
data
.
futures_cp_time_day
+
'天'
;
let
futuresCpTime
=
data
.
futures_cp_time_day
==
-
1
?
'无限制'
:
data
.
futures_cp_time_day
+
'天'
;
...
...
resources/views/web/sku/SkuListFilter.blade.php
View file @
205c6c79
...
@@ -141,6 +141,10 @@
...
@@ -141,6 +141,10 @@
</div>
</div>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('is_expire','是否过期',request()->get('is_expire'),[-1=>'否',1=>'是']) !!}
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('source/eq','接入方式',request()->get('source/eq'),config('field.SkuSource')) !!}
{!! $statusPresenter->render('source/eq','接入方式',request()->get('source/eq'),config('field.SkuSource')) !!}
</div>
</div>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
...
...
resources/views/web/supplier/SupplierListFilter.blade.php
View file @
205c6c79
This diff is collapsed.
Click to expand it.
storage/framework/views/587faa134dc1f8953abf61cb2995b8264ba36a12.php
View file @
205c6c79
This diff is collapsed.
Click to expand it.
storage/framework/views/63397d1ebe145992083a1105367395dcd7ab2c7d.php
View file @
205c6c79
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<i
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
></i>
 
<cite>
<?php
echo
e
(
isset
(
$v
[
'title'
])
?
$v
[
'title'
]
:
''
);
?>
</cite>
<i
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
></i>
 
<cite>
<?php
echo
e
(
isset
(
$v
[
'title'
])
?
$v
[
'title'
]
:
''
);
?>
</cite>
</a>
</a>
<?php
else
:
?>
<?php
else
:
?>
<a
<?php
if
(
!
empty
(
$v
[
'href'
]))
:
?>
lay-href=
"
<?php
echo
e
(
iframeUrl
(
$v
[
'href'
]));
?>
"
<?php
endif
;
?>
>
<a
<?php
if
(
!
empty
(
$v
[
'href'
]))
:
?>
lay-href=
"
<?php
echo
e
(
iframeUrl
(
$v
[
'href'
]));
?>
"
<?php
endif
;
?>
>
<i
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
></i>
 
<cite>
<?php
echo
e
(
isset
(
$v
[
'title'
])
?
$v
[
'title'
]
:
''
);
?>
</cite>
<i
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
></i>
 
<cite>
<?php
echo
e
(
isset
(
$v
[
'title'
])
?
$v
[
'title'
]
:
''
);
?>
</cite>
</a>
</a>
...
@@ -22,4 +23,4 @@
...
@@ -22,4 +23,4 @@
<?php
endif
;
?>
<?php
endif
;
?>
</ul>
</ul>
</div>
</div>
</div>
</div>
\ No newline at end of file
storage/framework/views/946347aaed783d5b9340dc21b99527c1d0f3bda0.php
View file @
205c6c79
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<dl
class=
"layui-nav-child"
>
<dl
class=
"layui-nav-child"
>
<?php
foreach
(
$v
[
'childs'
]
as
$k
=>
$v
)
:
?>
<?php
foreach
(
$v
[
'childs'
]
as
$k
=>
$v
)
:
?>
<dd>
<dd>
<a
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
<?php
if
(
!
empty
(
$v
[
'href'
]))
:
?>
lay-href=
"
<?php
echo
e
(
iframeUrl
(
$v
[
'href'
]));
?>
"
<?php
endif
;
?>
>
<?php
echo
e
(
$v
[
'title'
])
;
?>
</a>
<a
class=
"layui-icon
<?php
echo
e
(
isset
(
$v
[
'class'
])
?
$v
[
'class'
]
:
''
);
?>
"
ew-title=
"
<?php
echo
e
(
$v
[
'title'
]);
?>
"
<?php
if
(
!
empty
(
$v
[
'href'
]))
:
?>
lay-href=
"
<?php
echo
e
(
iframeUrl
(
$v
[
'href'
]));
?>
"
<?php
endif
;
?>
>
<?php
echo
e
(
$v
[
'title'
]);
?>
<?php
if
(
$v
[
'title'
]
==
'供应商列表'
&&
!
empty
(
$skuExpiredCount
)
&&
$skuExpiredCount
>
0
)
:
?>
<span
class=
"layui-badge layui-bg-red"
style=
"margin-left: 5px;"
>
<?php
echo
e
(
$skuExpiredCount
>
99
?
'99+'
:
$skuExpiredCount
);
?>
</span>
<?php
endif
;
?>
</a>
<?php
echo
$__env
->
make
(
"layouts.menu"
,
array_except
(
get_defined_vars
(),
array
(
'__data'
,
'__path'
)))
->
render
();
?>
<?php
/* <?php echo $__env->make("layouts.menu", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> */
?>
</dd>
</dd>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</dl>
</dl>
<?php
endif
;
?>
<?php
endif
;
?>
\ No newline at end of file
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
View file @
205c6c79
...
@@ -345,6 +345,19 @@
...
@@ -345,6 +345,19 @@
},
},
{
field
:
'average_sku_num'
,
title
:
'日均上架数'
,
align
:
'center'
,
width
:
100
},
{
field
:
'average_sku_num'
,
title
:
'日均上架数'
,
align
:
'center'
,
width
:
100
},
{
{
field
:
'is_sku_expire'
,
title
:
'商品是否过期'
,
align
:
'center'
,
width
:
130
,
templet
:
function
(
data
)
{
return
data
.
is_sku_expire
==
1
?
'
<
span
style
=
"color: red;"
>
是
<
/span>' : '否'
;
}
},
{
field
:
'sku_expired_in_days'
,
title
:
'商品过期天数'
,
align
:
'center'
,
width
:
130
,
templet
:
function
(
data
)
{
if
(
data
.
sku_expired_in_days
>
0
)
{
return
'
<
span
style
=
"color: red;"
>
' + data.sku_expired_in_days + '
<
/span>'
;
}
return
data
.
sku_expired_in_days
||
0
;
}
},
{
field
:
'cp_time_day'
,
title
:
'有效期最高天数'
,
align
:
'center'
,
width
:
180
,
templet
:
function
(
data
)
{
field
:
'cp_time_day'
,
title
:
'有效期最高天数'
,
align
:
'center'
,
width
:
180
,
templet
:
function
(
data
)
{
let
cpTime
=
data
.
cp_time_day
==
-
1
?
'无限制'
:
data
.
cp_time_day
+
'天'
;
let
cpTime
=
data
.
cp_time_day
==
-
1
?
'无限制'
:
data
.
cp_time_day
+
'天'
;
let
futuresCpTime
=
data
.
futures_cp_time_day
==
-
1
?
'无限制'
:
data
.
futures_cp_time_day
+
'天'
;
let
futuresCpTime
=
data
.
futures_cp_time_day
==
-
1
?
'无限制'
:
data
.
futures_cp_time_day
+
'天'
;
...
...
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