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
5d69dfcc
authored
Mar 27, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
f6b88b57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
app/Model/InquiryItemsReportModel.php
resources/views/pdf/sale.blade.php
app/Model/InquiryItemsReportModel.php
View file @
5d69dfcc
...
...
@@ -2,6 +2,7 @@
namespace
App\Model
;
use
App\map\InquiryMap
;
use
Dompdf\Exception
;
use
Illuminate\Database\Eloquent\Model
;
use
App\Model\InquiryItemsAssignModel
;
use
App\Model\OplogModel
;
...
...
@@ -32,7 +33,17 @@ class InquiryItemsReportModel extends Model
$con
=
DB
::
connection
(
'rfq'
);
$con
->
beginTransaction
();
#最后批量添加
#更新客户资料
$user
=
[
"user_name"
=>
$input
[
"user_name"
],
"contact"
=>
$input
[
"contact"
],
"fax"
=>
$input
[
"fax"
],
"tel"
=>
$input
[
"tel"
],
];
(
new
InquiryUsersModel
())
->
where
(
"id"
,
$input
[
"com_id"
])
->
update
(
$user
);
#更新报价明细
foreach
(
$input
[
"items"
]
as
$k
=>
$inquiry_items_id
){
$temp
=
[
"inquiry_id"
=>
$inquiry_id
,
...
...
@@ -79,7 +90,7 @@ class InquiryItemsReportModel extends Model
$data
[
"company"
]
=
$company_info_origin
[
$mainArr
[
"delivery_place"
]];
#公司信息
#客户信息
$data
[
"user"
]
=
[
"name"
=>
$mainArr
[
"user_name"
]]
;
$data
[
"user"
]
=
(
new
InquiryUsersModel
())
->
where
(
"id"
,
$mainArr
[
"user_id"
])
->
first
()
->
toArray
()
;
#询价明细
$itemsArr
=
$this
->
whereIn
(
"inquiry_items_id"
,
explode
(
","
,
$inquiry_items_ids
))
->
get
()
->
toArray
();
...
...
resources/views/pdf/sale.blade.php
View file @
5d69dfcc
...
...
@@ -45,8 +45,8 @@
</tr>
<tr>
<td><b>
Attn
</b>
:{{ @$user["name"] }}
</td>
<td><b>
C.C
</b>
:{{ @$user["c
c
"] }}
</td>
<td><b>
Attn
</b>
:{{ @$user["
user_
name"] }}
</td>
<td><b>
C.C
</b>
:{{ @$user["c
ontact
"] }}
</td>
<td><b>
Fax
</b>
:{{ @$user["fax"] }}
</td>
<td><b>
Tel
</b>
: {{ @$user["tel"] }}
</td>
</tr>
...
...
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