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
87c2c41e
authored
Jul 30, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
57bfa062
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
app/Console/Commands/SupplierRecallMailRemind.php
app/Http/Controllers/SupplierContractController.php
app/Http/Services/SupplierContractService.php
resources/views/web/SaveSupplierContract.blade.php
app/Console/Commands/SupplierRecallMailRemind.php
View file @
87c2c41e
...
...
@@ -75,6 +75,7 @@ class SupplierRecallMailRemind extends Command
}
else
{
$searchResult
=
[];
}
if
(
empty
(
$searchResult
))
{
continue
;
}
...
...
@@ -99,8 +100,13 @@ class SupplierRecallMailRemind extends Command
// 采购经理
$manager
=
null
;
if
(
!
empty
(
$purchaseUser
->
department_id
))
{
$departmentIds
=
DB
::
table
(
'department'
)
->
where
(
'parent'
,
$purchaseUser
->
department_id
)
->
orWhere
(
'departmentId'
,
$purchaseUser
->
department_id
)
->
pluck
(
'departmentId'
)
->
toArray
();
$manager
=
DB
::
table
(
'user_info'
)
->
where
(
'department_id'
,
$purchaseUser
->
department_id
)
->
where
In
(
'department_id'
,
$departmentIds
)
->
where
(
'position_name'
,
'采购经理'
)
->
first
();
if
(
$manager
&&
!
empty
(
$manager
->
email
))
{
...
...
@@ -108,7 +114,7 @@ class SupplierRecallMailRemind extends Command
}
// 采购总监
$director
=
DB
::
table
(
'user_position'
)
->
where
(
'department_id'
,
$purchaseUser
->
department_id
)
->
where
In
(
'department_id'
,
$departmentIds
)
->
where
(
'position_name'
,
'采购总监'
)
->
first
();
if
(
$director
)
{
...
...
app/Http/Controllers/SupplierContractController.php
View file @
87c2c41e
...
...
@@ -59,6 +59,7 @@ class SupplierContractController extends Controller
$contract
=
$model
->
with
(
'supplier'
)
->
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$contract
[
'start_time'
]
=
date
(
'Y-m-d H:i:s'
,
$contract
[
'start_time'
]);
$contract
[
'end_time'
]
=
date
(
'Y-m-d H:i:s'
,
$contract
[
'end_time'
]);
$contract
[
'recall_time'
]
=
$contract
[
'recall_time'
]
?
date
(
'Y-m-d H:i:s'
,
$contract
[
'recall_time'
])
:
''
;
$this
->
data
[
'contract'
]
=
$contract
;
}
$this
->
data
[
'supplierList'
]
=
$supplierList
;
...
...
app/Http/Services/SupplierContractService.php
View file @
87c2c41e
...
...
@@ -33,6 +33,7 @@ class SupplierContractService
try
{
\DB
::
connection
(
'web'
)
->
beginTransaction
();
$data
[
'end_time'
]
=
strtotime
(
$data
[
'end_time'
]);
$data
[
'recall_time'
]
=
strtotime
(
$data
[
'recall_time'
]);
// 检查是否已存在相同供应商的合同
if
(
empty
(
$data
[
'id'
]))
{
...
...
@@ -61,6 +62,7 @@ class SupplierContractService
'end_time'
=>
'合同有效期'
,
'commission_rate'
=>
'抽佣比率'
,
'check_date'
=>
'对账日期'
,
'recall_time'
=>
'召回期'
,
];
$diffArr
=
[];
$oldData
=
$oldData
->
toArray
();
...
...
@@ -124,7 +126,7 @@ class SupplierContractService
}
catch
(
\Exception
$e
)
{
\DB
::
connection
(
'web'
)
->
rollBack
();
\Log
::
error
(
json_encode
(
$e
->
getMessage
())
.
' '
.
$e
->
getLine
());
return
$e
->
getMessage
();
return
$e
->
getMessage
()
.
' '
.
$e
->
getLine
()
;
}
}
...
...
resources/views/web/SaveSupplierContract.blade.php
View file @
87c2c41e
...
...
@@ -42,7 +42,7 @@
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
召回期
</label>
<div
class=
"layui-input-inline"
style=
"width: 150px;"
>
<input
type=
"text"
name=
"recall_time"
id=
"recall_time"
placeholder=
"召回期"
class=
"layui-input"
autocomplete=
"off"
value=
"{{ $contract['recall_time']
or ''
}}"
>
autocomplete=
"off"
value=
"{{ $contract['recall_time']
===0?'':$contract['recall_time']
}}"
>
</div>
</div>
...
...
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