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
6b790653
authored
Mar 31, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
待转正供应商类型的处理
parent
876aa1ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Services/DataService.php
app/Http/routes.php
config/field.php
resources/views/script/SupplierListScript.blade.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
6b790653
...
...
@@ -104,7 +104,7 @@ class SupplierFilter
}
//默认过滤带有-1字符串的供应商名称的数据
$query
->
whereRaw
(
'supplier_name NOT LIKE "%-1"'
);
if
(
config
(
'website.domain'
)
==
'liexin.net'
)
{
if
(
config
(
'website.domain'
)
==
'liexin.net'
&&
request
()
->
user
->
userId
!=
1000
)
{
$query
->
where
(
'supplier_id'
,
'>'
,
12211
);
}
return
$query
;
...
...
app/Http/Services/DataService.php
View file @
6b790653
...
...
@@ -499,6 +499,14 @@ class DataService
}
SupplierPayTypeModel
::
insert
(
$payTypeData
);
}
//将未转正的供应商的供应商类型改成未转正
public
function
changeSupplierTypeFromIsType
()
{
SupplierChannelModel
::
where
(
'is_type'
,
1
)
->
update
([
'supplier_type'
=>
3
,
]);
}
}
app/Http/routes.php
View file @
6b790653
...
...
@@ -50,5 +50,5 @@ Route::group(['middleware' => ['external'],'namespace' => 'Api'], function () {
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
$service
=
new
\App\Http\Services\DataService
();
$service
->
makeSupplierSystemTagAbnormal
();
$service
->
changeSupplierTypeFromIsType
();
});
config/field.php
View file @
6b790653
...
...
@@ -114,5 +114,6 @@ return [
'SupplierType'
=>
[
1
=>
'正式'
,
2
=>
'临时'
,
3
=>
'待转正'
,
]
];
\ No newline at end of file
resources/views/script/SupplierListScript.blade.php
View file @
6b790653
...
...
@@ -129,7 +129,7 @@
{
field
:
'supplier_type_name'
,
title
:
'供应商类别'
,
align
:
'center'
,
width
:
110
},
];
@
if
(
checkPerm
(
'ViewFakeSupplier'
))
@
if
(
checkPerm
(
'ViewFakeSupplier'
)
&&
request
()
->
user
->
userId
==
1000
)
cols
.
push
({
field
:
'is_type'
,
title
:
'正式供应商'
,
align
:
'center'
,
width
:
110
,
templet
:
function
(
data
)
{
return
data
.
is_type
===
0
?
'正式'
:
'
<
span
style
=
"color: red"
>
待转正
<
/span>'
;
...
...
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