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
f994790e
authored
Aug 26, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
30b9eb1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
f994790e
...
...
@@ -223,7 +223,8 @@ class SupplierFilter
//搜索是否有供应商账号
if
(
!
empty
(
$map
[
'has_supplier_account'
]))
{
$query
->
has
(
'yunxin_account'
);
$supplierIds
=
SupplierAccountModel
::
query
()
->
pluck
(
'supplier_id'
)
->
toArray
();
$query
->
whereIn
(
'supplier_id'
,
$supplierIds
);
}
//搜索是否有合同
...
...
@@ -236,7 +237,7 @@ class SupplierFilter
// 1、类型为电子签,且签署状态为:已签署
// 2、类型为人工上传,有合同附件,且上传人是:云芯系统供应商
if
(
!
empty
(
$map
[
'has_order_contract'
]))
{
$purchaseIds
=
PurchaseContract
::
query
()
$purchaseIds
=
PurchaseContract
::
query
()
->
where
(
'sign_status'
,
3
)
->
where
(
function
(
$query
)
{
// 1、类型为电子签,且签署状态为:已签署
...
...
@@ -252,19 +253,17 @@ class SupplierFilter
})
->
pluck
(
'purchase_id'
);
if
(
$purchaseIds
->
isEmpty
())
{
}
else
{
$supplierIds
=
PurchaseOrderModel
::
query
()
->
whereIn
(
'purchase_id'
,
$purchaseIds
)
->
distinct
()
->
pluck
(
'supplier_id'
)
->
unique
();
if
(
$supplierIds
->
isEmpty
())
{
}
else
{
$query
->
whereIn
(
'supplier_id'
,
$supplierIds
);
}
}
if
(
$map
[
'has_order_contract'
]
==
1
)
{
$query
->
whereIn
(
'supplier_id'
,
$supplierIds
);
}
else
{
$query
->
whereNotIn
(
'supplier_id'
,
$supplierIds
);
}
}
//默认过滤带有-1字符串的供应商名称的数据
...
...
@@ -331,7 +330,7 @@ class SupplierFilter
}
});
$query
->
with
([
'contact'
,
'attachment'
,
'yunxin_account'
]);
$query
->
with
([
'contact'
,
'attachment'
,
'yunxin_account'
]);
$query
->
whereRaw
(
'supplier_name NOT LIKE "%-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