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
96983883
authored
May 27, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复
parent
1ba20ec2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
app/Http/Controllers/Filter/SupplierContractFilter.php
app/Http/Services/SupplierContractService.php
app/Http/Controllers/Filter/SupplierContractFilter.php
View file @
96983883
...
...
@@ -12,7 +12,12 @@ class SupplierContractFilter
{
$map
=
$request
->
all
();
$model
=
new
SupplierContractModel
();
$query
=
$model
->
with
(
'supplier'
)
->
where
(
'create_uid'
,
$request
->
user
->
userId
)
->
orderBy
(
'id'
,
'desc'
);
$query
=
$model
->
with
(
'supplier'
);
$userId
=
$request
->
user
->
userId
;
if
(
$userId
!=
1000
)
{
$query
=
$query
->
where
(
'create_uid'
,
$userId
);
}
$query
=
$query
->
orderBy
(
'id'
,
'desc'
);
if
(
!
empty
(
$map
[
'supplier_code'
]))
{
$supplierId
=
SupplierChannelModel
::
where
(
'supplier_code'
,
$map
[
'supplier_code'
])
->
value
(
'supplier_id'
);
$query
->
where
(
'supplier_id'
,
$supplierId
);
...
...
app/Http/Services/SupplierContractService.php
View file @
96983883
...
...
@@ -98,9 +98,15 @@ class SupplierContractService
if
(
$fileData
[
'code'
]
==
0
)
{
$data
[
'contract_file'
]
=
$fileData
[
'data'
][
'oss_file_url'
];
if
(
!
empty
(
$data
[
'id'
]))
{
SupplierContractModel
::
where
(
'id'
,
$data
[
'id'
])
->
update
(
[
$udpateData
=
[
'contract_file'
=>
$fileData
[
'data'
][
'oss_file_url'
],
]);
];
$contractNo
=
SupplierContractModel
::
where
(
'id'
,
$data
[
'id'
])
->
value
(
'contract_no'
);
if
(
empty
(
$contractNo
))
{
$contractNo
=
$this
->
generateContractNo
(
$data
[
'id'
]);
$udpateData
[
'contract_no'
]
=
$contractNo
;
}
SupplierContractModel
::
where
(
'id'
,
$data
[
'id'
])
->
update
(
$udpateData
);
}
else
{
SupplierContractModel
::
insert
([
'contract_file'
=>
$fileData
[
'data'
][
'oss_file_url'
],
...
...
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