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
a6b389f1
authored
Mar 24, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
3f9cf170
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
5 deletions
app/Model/InquiryItemsModel.php
app/Model/InquiryModel.php
resources/views/pdf/sale.blade.php
vendor/dompdf/dompdf/lib/fonts/Times-Bold.afm.php
app/Model/InquiryItemsModel.php
View file @
a6b389f1
...
@@ -207,7 +207,7 @@ class InquiryItemsModel extends Model
...
@@ -207,7 +207,7 @@ class InquiryItemsModel extends Model
"target_price"
=>@
$b
[
"target_price"
]
?
$b
[
"target_price"
]
:
0
,
"target_price"
=>@
$b
[
"target_price"
]
?
$b
[
"target_price"
]
:
0
,
"delivery_time"
=>@
$b
[
"delivery_time"
]
?
$b
[
"delivery_time"
]
:
""
,
"delivery_time"
=>@
$b
[
"delivery_time"
]
?
$b
[
"delivery_time"
]
:
""
,
"batch"
=>@
$b
[
"batch"
]
?
$b
[
"batch"
]
:
""
,
"batch"
=>@
$b
[
"batch"
]
?
$b
[
"batch"
]
:
""
,
"assign_type"
=>
@
$b
[
"assign_type"
]
?
$b
[
"assign_type"
]
:
0
,
"assign_type"
=>
$b
[
"pur_s"
]
!==
""
?
1
:
2
,
"remark"
=>@
$b
[
"remark"
]
?
$b
[
"remark"
]
:
""
,
"remark"
=>@
$b
[
"remark"
]
?
$b
[
"remark"
]
:
""
,
"create_time"
=>
time
()
,
"create_time"
=>
time
()
,
"update_time"
=>
time
()
,
"update_time"
=>
time
()
,
...
@@ -285,7 +285,7 @@ class InquiryItemsModel extends Model
...
@@ -285,7 +285,7 @@ class InquiryItemsModel extends Model
"target_price"
=>@
$b
[
"target_price"
]
?
$b
[
"target_price"
]
:
0
,
"target_price"
=>@
$b
[
"target_price"
]
?
$b
[
"target_price"
]
:
0
,
"delivery_time"
=>@
$b
[
"delivery_time"
]
?
$b
[
"delivery_time"
]
:
""
,
"delivery_time"
=>@
$b
[
"delivery_time"
]
?
$b
[
"delivery_time"
]
:
""
,
"batch"
=>@
$b
[
"batch"
]
?
$b
[
"batch"
]
:
""
,
"batch"
=>@
$b
[
"batch"
]
?
$b
[
"batch"
]
:
""
,
"assign_type"
=>@
$b
[
"
assign_type"
]
?
$b
[
"assign_type"
]
:
2
,
"assign_type"
=>@
$b
[
"
pur_s"
]
!=
""
?
1
:
2
,
"remark"
=>@
$b
[
"remark"
]
?
$b
[
"remark"
]
:
""
,
"remark"
=>@
$b
[
"remark"
]
?
$b
[
"remark"
]
:
""
,
"flag"
=>
0
,
#重新自动报价
"flag"
=>
0
,
#重新自动报价
"create_time"
=>
time
()
,
"create_time"
=>
time
()
,
...
...
app/Model/InquiryModel.php
View file @
a6b389f1
...
@@ -109,15 +109,16 @@ class InquiryModel extends Model
...
@@ -109,15 +109,16 @@ class InquiryModel extends Model
//getSql("rfq");
//getSql("rfq");
if
(
!
$list
)
return
[
20001
,
'没有数据'
];
if
(
!
$list
)
return
[
20001
,
'没有数据'
];
$QuoteModel
=
new
QuoteModel
();
$QuoteModel
=
new
QuoteModel
();
$InquiryItemsUrgeModel
=
new
InquiryItemsUrgeModel
;
$InquiryItemsAssignModel
=
new
InquiryItemsAssignModel
();
$Redis
=
\RedisDB
::
connection
();
$Redis
=
\RedisDB
::
connection
();
foreach
(
$list
[
'data'
]
as
$k
=>
&
$v
)
{
foreach
(
$list
[
'data'
]
as
$k
=>
&
$v
)
{
$inquiry_items_id
=
$v
[
"id"
];
#明细id
//报价
//报价
$v
[
'status_val'
]
=
InquiryMap
::
$status
[
$v
[
"status"
]];
$v
[
'status_val'
]
=
InquiryMap
::
$status
[
$v
[
"status"
]];
if
(
$v
[
"status_val"
]
==
"已报价"
)
{
if
(
$v
[
"status_val"
]
==
"已报价"
)
{
$count
=
$QuoteModel
->
where
(
"inquiry_items_id"
,
$
v
[
"id"
]
)
->
whereIn
(
"status"
,
QuoteMap
::
$status_used
)
->
count
();
$count
=
$QuoteModel
->
where
(
"inquiry_items_id"
,
$
inquiry_items_id
)
->
whereIn
(
"status"
,
QuoteMap
::
$status_used
)
->
count
();
$v
[
'status_val'
]
=
$v
[
'status_val'
]
.
"("
.
$count
.
")"
;
$v
[
'status_val'
]
=
$v
[
'status_val'
]
.
"("
.
$count
.
")"
;
}
}
...
@@ -152,6 +153,15 @@ class InquiryModel extends Model
...
@@ -152,6 +153,15 @@ class InquiryModel extends Model
$v
[
"quote_price"
]
=
$lowerPrice
;
$v
[
"quote_price"
]
=
$lowerPrice
;
}
}
#查询指定采购
$v
[
"assign_name"
]
=
""
;
if
(
$v
[
"assign_type"
]
==
1
){
$assign
=
$InquiryItemsAssignModel
->
select
(
DB
::
Raw
(
"GROUP_CONCAT(assign_name) assign_name"
))
->
where
(
"inquiry_items_id"
,
$inquiry_items_id
)
->
first
();
if
(
$assign
){
$v
[
"assign_name"
]
=
$assign
->
assign_name
;
}
}
// 在Redis集合中检查是否有新的报价
// 在Redis集合中检查是否有新的报价
if
(
$export
==
0
){
if
(
$export
==
0
){
$res
=
$Redis
->
SISMEMBER
(
'frq_quote_urge'
,
$v
[
'id'
]);
$res
=
$Redis
->
SISMEMBER
(
'frq_quote_urge'
,
$v
[
'id'
]);
...
...
resources/views/pdf/sale.blade.php
0 → 100644
View file @
a6b389f1
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
ichunt.com--{$data['order_sn']}
</title>
<style
type=
"text/css"
media=
"screen"
>
*
{
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
;
box-sizing
:
border-box
;}
.header
{
text-align
:
center
;
font-size
:
28px
;
color
:
#000
;
position
:
relative
;}
.header
img
{
width
:
120px
;
position
:
absolute
;
left
:
60px
;
top
:
10px
;}
.bjdx
{
background
:
#ccffff
;
font-size
:
28px
;
color
:
#0000DA
;
text-align
:
center
;}
table
{
width
:
100%
;
border-collapse
:
collapse
;}
table
,
th
,
td
{
border
:
1px
solid
#000
;}
table
td
{
padding
:
10px
;}
table
td
b
,
.table-tips
b
,
.footer
b
{
font-weight
:
bold
;}
.table-tips
{
font-weight
:
bold
;
padding
:
20px
0
;
font-weight
:
normal
;}
.footer
{
position
:
relative
;}
.footer
.pr30
{
position
:
relative
;
left
:
80px
;}
.footer
.pr60
{
position
:
relative
;
left
:
107px
;}
.footer
img
{
position
:
absolute
;
left
:
731px
;
top
:
40px
;}
</style>
</head>
<body>
<div
class=
"pdf-box"
>
<div
class=
"header"
>
<img
src=
"https://static.ichunt.com/dist/res/home/images/new_logo.png"
style=
"float:left;"
>
<p
class=
"company"
>
深圳市猎芯科技有限公司
<br/>
ICHUNT TECHNOLOGY CO.,LTD
</p>
</div>
<div
class=
"bjdx"
>
报 价 单/ QUOTATION
</div>
<div
class=
"table1"
>
<table>
<tr>
<td
colspan=
"2"
></td>
<td
colspan=
"2"
>
Date:
<?=
date
(
"Y-m-d"
);
?>
</td>
</tr>
<tr>
<td><b>
Attn
</b>
:{{ @$user["name"] }}
</td>
<td><b>
C.C
</b>
:{{ @$user["cc"] }}
</td>
<td><b>
Fax
</b>
:{{ @$user["fax"] }}
</td>
<td><b>
Tel
</b>
: {{ @$user["tel"] }}
</td>
</tr>
<tr>
<td><b>
From
</b>
:{{ @$company["name"] }}
</td>
<td><b>
C.C
</b>
:{{ @$company["cc"] }}
</td>
<td><b>
Fax
</b>
:{{ @$company["fax"] }}
</td>
<td><b>
Tel
</b>
: {{ @$company["tel"] }}
</td>
</tr>
</table>
</div>
<div
class=
"table-tips"
>
很高兴为您提供我们最优惠的价格和货期,请参看如下:
<br/>
<b>
We are pleased to quote our best price and delivery terms for your requirement as following:
</b>
</div>
<div
class=
"table2"
>
<table>
<tr>
<td>
客户型号 Cust PartNo
</td>
<td>
原厂型号 Mfr PartNo
</td>
<td>
品牌 Mfr Name
</td>
<td>
报价(RMB含税)Quoted Price (RMB with 13%VAT,freight fee to factory and import fee )
</td>
<td>
报价(美金)QuotedPrice In USD
</td>
<td>
数量 Quantity
</td>
<td>
金额
</td>
<td>
货期 Std LeadTime
</td>
<td>
产品类型 Prod Type
</td>
<td>
DATE CODE
</td>
</tr>
@if(!empty($itemsArr)
&&
is_array($itemsArr))
@foreach($itemsArr as $k=>$v)
<tr>
<td>
{{ @$v["goods_name"] }}
</td>
<td>
{{ @$v["goods_name_pro"] }}
</td>
<td>
{{ @$v["brand_name"] }}
</td>
<td>
{{ @$v["price_rmb"] }}
</td>
<td>
{{ @$v["price_origin"] }}
</td>
<td>
{{ @$v["inquiry_number"] }}
</td>
<td>
{{ @$v["quote_account"] }}
</td>
<td>
{{ @$v["delivery_time"] }}
</td>
<td>
{{ @$v["class_id2_name"] }}
</td>
<td>
{{ @$v["batch"] }}
</td>
</tr>
@endforeach
@endif
<tr>
<td></td>
<td></td>
<td
colspan=
"2"
></td>
<td></td>
<td></td>
<td><b>
TOTAL:
</b></td>
<td
colspan=
"2"
><b>
{{ $quote_price_count }}
</b></td>
<td></td>
</tr>
</table>
</div>
<div
class=
"footer"
style=
"padding-top: 20px;"
>
<img
src=
"http://api.ichunt.com/public/img/contract.png"
width=
'150'
height=
'150'
>
<b
style=
"font-size: 18px;font-weight: bold;color:#000;"
>
条款和说明:
<br>
Terms and conditions:
</b>
<br>
1.>
<span
class=
"pr30"
>
付款方式:月结30天
</span>
<br><span
class=
"pr60"
>
Payment Terms:
</span>
<br>
2.>
<span
class=
"pr30"
>
参考货期仅供参考,需下单后以原厂回复为准。
</span>
<br><b
class=
"pr60"
>
Leadtime is for reference only, order actual delivery date is subjected to Supplier’s final confirmation.
</b>
<br>
3.>
<span
class=
"pr30"
>
所有库存均以我司确认为准。
</span>
<br><b
class=
"pr60"
>
Available to sell stock is open to all customers based on our confirmation.
</b>
<br>
4.>
<b
class=
"pr30"
>
Subject to ICHUNT TECHNOLOGY' terms
</b>
</div>
</div>
</body>
</html>
vendor/dompdf/dompdf/lib/fonts/Times-Bold.afm.php
0 → 100644
View file @
a6b389f1
This diff is collapsed.
Click to expand it.
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