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
8b6d97e4
authored
Jul 21, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修正打印
parent
e8785642
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
7 deletions
app/Http/Services/SupplierContactService.php
app/Http/Services/SupplierService.php
resources/views/iframe.blade.php
resources/views/web/PrintSupplier.blade.php
app/Http/Services/SupplierContactService.php
View file @
8b6d97e4
...
...
@@ -142,4 +142,24 @@ class SupplierContactService
}
return
false
;
}
//如果申请人属于联营采购部/自营采购部,业务负责人取绑定的采购员为申请人的联系人(如果有多条,随机取一条);
//如果申请人属于渠道部,渠道开发员没有设置采购,则显示为空;如果渠道开发员显示自己为采购,显示自己对应的联系人;如果创建其他采购,显示创建采购对应的联系人(如果有多条,随机取一条)
//获取用于打印的联系方式
public
function
getContactForPrint
(
$supplierId
)
{
$userId
=
request
()
->
user
->
userId
;
$codeId
=
request
()
->
user
->
codeId
;
$contactModel
=
new
SupplierContactModel
();
$contact
=
$contactModel
->
where
(
'can_check_uids'
,
$codeId
)
->
where
(
'supplier_id'
,
$supplierId
)
->
first
();
$contact
=
!
empty
(
$contact
)
?
$contact
->
toArray
()
:
[];
if
(
empty
(
$contact
))
{
$contact
=
$contactModel
->
where
(
'admin_id'
,
$userId
)
->
where
(
'supplier_id'
,
$supplierId
)
->
first
();
$contact
=
!
empty
(
$contact
)
?
$contact
->
toArray
()
:
[];
}
return
$contact
;
}
}
\ No newline at end of file
app/Http/Services/SupplierService.php
View file @
8b6d97e4
...
...
@@ -129,7 +129,8 @@ class SupplierService
}
return
$value
;
},
$channel
);
$channel
[
'status'
]
=
SupplierChannelModel
::
STATUS_IN_REVIEW
;
//默认是待审核
$channel
[
'status'
]
=
SupplierChannelModel
::
STATUS_PENDING
;
//第一次新增的供应商,都需要进行复审
$channel
[
'need_review'
]
=
1
;
$contactField
=
[
...
...
@@ -426,9 +427,8 @@ class SupplierService
$printData
=
$supplier
;
$printData
[
'apply_name'
]
=
request
()
->
user
->
name
;
$printData
[
'apply_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
$contactModel
=
new
SupplierContactModel
();
$contact
=
$contactModel
->
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'supplier_consignee'
,
'!='
,
''
)
->
first
();
$contact
=
!
empty
(
$contact
)
?
$contact
->
toArray
()
:
[];
$contactService
=
new
SupplierContactService
();
$contact
=
$contactService
->
getContactForPrint
(
$supplierId
);
$printData
[
'contact'
]
=
$contact
;
$attachmentModel
=
new
SupplierAttachmentModel
();
$hasAgreement
=
$attachmentModel
->
where
(
'supplier_id'
,
...
...
resources/views/iframe.blade.php
View file @
8b6d97e4
...
...
@@ -17,7 +17,7 @@
</head>
<style>
html
*
{
font-size
:
12px
;
font-size
:
12px
!important
;
}
input
:focus
,
textarea
:focus
{
...
...
resources/views/web/PrintSupplier.blade.php
View file @
8b6d97e4
...
...
@@ -7,7 +7,7 @@
</head>
<style>
td
{
height
:
35px
;
height
:
35px
!important
;
}
/*.title-td {*/
...
...
@@ -19,7 +19,7 @@
<div
class=
"layui-col-md3"
>
</div>
<div
class=
"layui-col-md6"
style=
"text-align: center"
>
<div
class=
"layui-row"
style=
"margin-bottom: 5px"
>
<div
class=
"layui-col-md12"
><span
style=
"font-size: 20px;font-weight: bold;"
>
新供应商引入申请单
</span></div>
<div
class=
"layui-col-md12"
><span
style=
"font-size: 20px
!important
;font-weight: bold;"
>
新供应商引入申请单
</span></div>
<div
style=
"text-align: right"
>
申请部门 : {{$printData['department_name']}}
</div>
</div>
<table
border=
"1"
style=
"width: 100%;"
>
...
...
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