Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
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
bc1cd54d
authored
Mar 22, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
b24506a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
app/Http/Controllers/ApiController.php
app/Model/InquiryItemsReportModel.php
resources/views/pdf/sale.blade.php
app/Http/Controllers/ApiController.php
View file @
bc1cd54d
...
@@ -129,9 +129,9 @@ class ApiController extends Controller
...
@@ -129,9 +129,9 @@ class ApiController extends Controller
Export
(
$data
);
Export
(
$data
);
}
}
}
}
$
report_ids
=
@
$input
[
"report
_ids"
];
$
inquiry_items_ids
=
@
$input
[
"inquiry_items
_ids"
];
$inquiry_id
=
@
$input
[
"inquiry_id"
];
$inquiry_id
=
@
$input
[
"inquiry_id"
];
$InquiryItemsReportModel
->
createSalePdf
(
$inquiry_id
,
$
report
_ids
);
$InquiryItemsReportModel
->
createSalePdf
(
$inquiry_id
,
$
inquiry_items
_ids
);
}
}
//删除询价列表
//删除询价列表
...
...
app/Model/InquiryItemsReportModel.php
View file @
bc1cd54d
...
@@ -67,7 +67,7 @@ class InquiryItemsReportModel extends Model
...
@@ -67,7 +67,7 @@ class InquiryItemsReportModel extends Model
}
}
//生成报价pdf
//生成报价pdf
public
function
createSalePdf
(
$inquiry_id
=
""
,
$
report
_ids
=
""
){
public
function
createSalePdf
(
$inquiry_id
=
""
,
$
inquiry_items
_ids
=
""
){
if
(
$inquiry_id
==
""
){
if
(
$inquiry_id
==
""
){
return
[
1001
,
"询价单号不得为空!"
];
return
[
1001
,
"询价单号不得为空!"
];
}
}
...
@@ -82,7 +82,7 @@ class InquiryItemsReportModel extends Model
...
@@ -82,7 +82,7 @@ class InquiryItemsReportModel extends Model
$data
[
"user"
]
=
[
"name"
=>
$mainArr
[
"user_name"
]];
$data
[
"user"
]
=
[
"name"
=>
$mainArr
[
"user_name"
]];
#询价明细
#询价明细
$itemsArr
=
$this
->
whereIn
(
"i
d"
,
explode
(
","
,
$report
_ids
))
->
get
()
->
toArray
();
$itemsArr
=
$this
->
whereIn
(
"i
nquiry_items_id"
,
explode
(
","
,
$inquiry_items
_ids
))
->
get
()
->
toArray
();
$quote_price_count
=
0
;
$quote_price_count
=
0
;
foreach
(
$itemsArr
as
$k
=>&
$v
){
foreach
(
$itemsArr
as
$k
=>&
$v
){
$v
[
"quote_account"
]
=
$v
[
"price_rmb"
]
>
0
?
$v
[
"price_rmb"
]
*
$v
[
"inquiry_number"
]
:
$v
[
"price_origin"
]
*
$v
[
"inquiry_number"
];
$v
[
"quote_account"
]
=
$v
[
"price_rmb"
]
>
0
?
$v
[
"price_rmb"
]
*
$v
[
"inquiry_number"
]
:
$v
[
"price_origin"
]
*
$v
[
"inquiry_number"
];
...
...
resources/views/pdf/sale.blade.php
View file @
bc1cd54d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<style
type=
"text/css"
media=
"screen"
>
<style
type=
"text/css"
media=
"screen"
>
*
{
font-family
:
"simsun"
;
font-weight
:
normal
;
margin
:
0px
;
padding
:
0px
;
}
*
{
font-family
:
"simsun"
;
font-weight
:
normal
;
margin
:
0px
;
padding
:
0px
;
}
/*.pdf-box{margin:0 auto;font-size: 14px;color:#333;width:900px;padding:50px;}*/
/*.pdf-box{margin:0 auto;font-size: 14px;color:#333;width:900px;padding:50px;}*/
.pdf-box
{
margin
:
0
auto
;
font-size
:
14px
;
color
:
#333
;
width
:
100%
;
padding
:
50p
x
;}
.pdf-box
{
margin
:
0
auto
;
font-size
:
14px
;
color
:
#333
;
width
:
900px
;
padding
:
50px
;
box-sizing
:
border-bo
x
;}
.header
{
text-align
:
center
;
font-size
:
28px
;
color
:
#000
;
position
:
relative
;}
.header
{
text-align
:
center
;
font-size
:
28px
;
color
:
#000
;
position
:
relative
;}
.header
img
{
width
:
120px
;
position
:
absolute
;
left
:
60px
;
top
:
10px
;}
.header
img
{
width
:
120px
;
position
:
absolute
;
left
:
60px
;
top
:
10px
;}
.bjdx
{
background
:
#ccffff
;
font-size
:
28px
;
color
:
#0000DA
;
text-align
:
center
;}
.bjdx
{
background
:
#ccffff
;
font-size
:
28px
;
color
:
#0000DA
;
text-align
:
center
;}
...
...
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