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
3ec5d95a
authored
Aug 26, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复筛选
parent
f994790e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
app/Http/Services/SupplierContractService.php
app/Http/Transformers/SupplierTransformer.php
resources/views/script/SupplierListScript.blade.php
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
app/Http/Services/SupplierContractService.php
View file @
3ec5d95a
...
...
@@ -10,6 +10,8 @@ use App\Model\SupplierExtendModel;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierReceiptModel
;
use
App\Model\SupplierContractModel
;
use
App\Model\Purchase\PurchaseContract
;
use
App\Model\Purchase\PurchaseOrderModel
;
use
TijsVerkoyen\CssToInlineStyles\Exception
;
use
App\Http\Transformers\SupplierContractTransformer
;
use
App\Http\Controllers\Filter\SupplierContractFilter
;
...
...
@@ -235,4 +237,32 @@ class SupplierContractService
(
new
LogService
())
->
addLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'合同日志'
,
'删除签署合同文件'
);
return
$result
;
}
//判断是否有采购合同
public
static
function
hasOrderContractMap
(
$supplierIds
)
{
$purchaseIds
=
PurchaseContract
::
query
()
->
where
(
function
(
$query
)
{
// 1、类型为电子签,且签署状态为:已签署
$query
->
where
(
'contract_type'
,
2
)
->
where
(
'sign_status'
,
3
);
})
->
orWhere
(
function
(
$query
)
{
// 2、类型为人工上传,有合同附件,且上传人是:云芯系统供应商
$query
->
where
(
'contract_type'
,
1
)
->
where
(
'create_name'
,
'云芯系统供应商'
)
->
where
(
'contract_file_url'
,
'!='
,
''
);
})
->
pluck
(
'purchase_id'
);
$existSupplierIds
=
PurchaseOrderModel
::
query
()
->
whereIn
(
'purchase_id'
,
$purchaseIds
)
->
distinct
()
->
pluck
(
'supplier_id'
)
->
toArray
();
$result
=
[];
foreach
(
$supplierIds
as
$supplierId
)
{
$result
[
$supplierId
]
=
in_array
(
$supplierId
,
$existSupplierIds
)
?
1
:
-
1
;
}
return
$result
;
}
}
app/Http/Transformers/SupplierTransformer.php
View file @
3ec5d95a
...
...
@@ -16,6 +16,7 @@ use App\Http\Services\SupplierService;
use
App\Http\Services\AdminUserService
;
use
App\Http\Services\ViewCheckService
;
use
App\Http\Services\DepartmentService
;
use
App\Http\Services\SupplierContractService
;
use
App\Http\Services\SupplierPayTypeService
;
use
App\Http\Services\SupplierSkuAuditRulerService
;
use
App\Http\Services\SupplierSkuUploadRulerService
;
...
...
@@ -49,8 +50,10 @@ class SupplierTransformer
return
$item
;
},
$value
);
}
$hasOrderContractMap
=
SupplierContractService
::
hasOrderContractMap
(
$supplierIds
);
foreach
(
$list
as
&
$supplier
)
{
$supplier
[
'has_order_contract'
]
=
array_get
(
$hasOrderContractMap
,
$supplier
[
'supplier_id'
],
-
1
);
$supplier
[
'viewed'
]
=
array_get
(
$viewData
,
$supplier
[
'supplier_id'
],
false
);
$supplier
[
'jd_channel_user'
]
=
trim
(
implode
(
','
,
array_column
(
array_get
(
$contacts
,
$supplier
[
'supplier_id'
],
[]),
'name'
)),
','
);
$supplier
[
'jd_channel_user_id'
]
=
trim
(
implode
(
','
,
array_column
(
array_get
(
$contacts
,
$supplier
[
'supplier_id'
],
[]),
'can_check_uids'
)),
','
);
...
...
resources/views/script/SupplierListScript.blade.php
View file @
3ec5d95a
...
...
@@ -198,7 +198,7 @@
align
:
'center'
,
width
:
120
,
templet
:
function
(
data
)
{
return
data
.
has_order_contract
?
'是'
:
'否'
;
return
data
.
has_order_contract
==
1
?
'是'
:
'否'
;
}
},
{
...
...
storage/framework/views/d4d13e9bcdea7366e4952031431aae4b22f055c1.php
View file @
3ec5d95a
...
...
@@ -198,7 +198,7 @@
align
:
'center'
,
width
:
120
,
templet
:
function
(
data
)
{
return
data
.
has_order_contract
?
'是'
:
'否'
;
return
data
.
has_order_contract
==
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