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
fc42f9c6
authored
Mar 30, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
fix
parents
c28a6e51
83f3d94f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
6 deletions
app/Model/InquiryItemsModel.php
app/Model/InquiryItemsReportModel.php
app/Model/InquiryModel.php
app/map/InquiryMap.php
config/quote.php
app/Model/InquiryItemsModel.php
View file @
fc42f9c6
...
@@ -342,8 +342,7 @@ class InquiryItemsModel extends Model
...
@@ -342,8 +342,7 @@ class InquiryItemsModel extends Model
$assignInfo
=
(
new
InquiryItemsAssignModel
())
->
select
(
"assign_uid"
)
->
where
(
"inquiry_items_id"
,
$inquiry_items_id
)
->
get
();
$assignInfo
=
(
new
InquiryItemsAssignModel
())
->
select
(
"assign_uid"
)
->
where
(
"inquiry_items_id"
,
$inquiry_items_id
)
->
get
();
if
(
$assignInfo
){
if
(
$assignInfo
){
$assignInfoArr
=
$assignInfo
->
toArray
();
$assignInfoArr
=
$assignInfo
->
toArray
();
$currency
=
$mainArr
[
"currency"
]
==
1
?
"¥"
:
"$"
;
$msg
=
$b
[
"user_name"
]
.
'已修改询价,询价单号:'
.
$mainArr
[
"inquiry_sn"
]
.
',型号:'
.
$updateArr
[
"goods_name"
]
.
' 修改内容:价格:'
.
InquiryMap
::
$currency_sign
[
$mainArr
[
"currency"
]]
.
$itemArr
[
"target_price"
]
.
',目标价:'
.
InquiryMap
::
$currency_sign
[
$mainArr
[
"currency"
]]
.
$updateArr
[
"target_price"
];
$msg
=
$b
[
"user_name"
]
.
'已修改询价,询价单号:'
.
$mainArr
[
"inquiry_sn"
]
.
',型号:'
.
$updateArr
[
"goods_name"
]
.
' 修改内容:价格:'
.
$currency
.
$itemArr
[
"target_price"
]
.
',目标价:'
.
$currency
.
$updateArr
[
"target_price"
];
foreach
(
$assignInfoArr
as
$k
=>
$v
){
foreach
(
$assignInfoArr
as
$k
=>
$v
){
$CommonModel
->
send_msg
(
$v
[
"assign_uid"
],
$msg
);
$CommonModel
->
send_msg
(
$v
[
"assign_uid"
],
$msg
);
}
}
...
...
app/Model/InquiryItemsReportModel.php
View file @
fc42f9c6
...
@@ -142,7 +142,7 @@ class InquiryItemsReportModel extends Model
...
@@ -142,7 +142,7 @@ class InquiryItemsReportModel extends Model
$inquiry
=
(
new
InquiryModel
())
->
select
(
"currency"
)
->
where
(
"id"
,
$quoteItem
[
"inquiry_id"
])
->
first
()
->
toArray
();
$inquiry
=
(
new
InquiryModel
())
->
select
(
"currency"
)
->
where
(
"id"
,
$quoteItem
[
"inquiry_id"
])
->
first
()
->
toArray
();
$mainCurrency
=
$inquiry
[
"currency"
];
#询价主单币种
$mainCurrency
=
$inquiry
[
"currency"
];
#询价主单币种
$rate
=
(
new
CommonModel
())
->
getRate
(
"美元"
);
#获取美元
汇率
$rate
=
(
new
CommonModel
())
->
getRate
(
$mainCurrency
);
#获取
汇率
$itemInfo
=
$InquiryItemsModel
->
select
(
"status"
)
->
where
(
"id"
,
$inquiry_items_id
)
->
first
()
->
toArray
();
#询价明细
$itemInfo
=
$InquiryItemsModel
->
select
(
"status"
)
->
where
(
"id"
,
$inquiry_items_id
)
->
first
()
->
toArray
();
#询价明细
...
...
app/Model/InquiryModel.php
View file @
fc42f9c6
...
@@ -135,8 +135,7 @@ class InquiryModel extends Model
...
@@ -135,8 +135,7 @@ class InquiryModel extends Model
#目标价
#目标价
if
(
@
$input
[
"types"
]
!=
5
){
if
(
@
$input
[
"types"
]
!=
5
){
$currency_sign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
$v
[
'target_price'
]
=
InquiryMap
::
$currency_sign
[
$v
[
"currency"
]]
.
$v
[
'target_price'
]
.
"
\t
"
;
// 客户目标报价
$v
[
'target_price'
]
=
$currency_sign
.
$v
[
'target_price'
]
.
"
\t
"
;
// 客户目标报价
}
}
#交货日期
#交货日期
...
@@ -325,7 +324,7 @@ class InquiryModel extends Model
...
@@ -325,7 +324,7 @@ class InquiryModel extends Model
$v
[
'create_time'
]
=
timeToDate
(
$v
[
'create_time'
]);
//创建时间
$v
[
'create_time'
]
=
timeToDate
(
$v
[
'create_time'
]);
//创建时间
$currency_sign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
$currency_sign
=
InquiryMap
::
$currency_sign
[
$v
[
"currency"
]]
;
$v
[
'target_price'
]
=
$currency_sign
.
$v
[
'target_price'
];
// 客户目标报价
$v
[
'target_price'
]
=
$currency_sign
.
$v
[
'target_price'
];
// 客户目标报价
...
...
app/map/InquiryMap.php
View file @
fc42f9c6
...
@@ -19,6 +19,25 @@ class InquiryMap{
...
@@ -19,6 +19,25 @@ class InquiryMap{
self
::
status_sure
=>
"已确认"
,
self
::
status_sure
=>
"已确认"
,
];
];
//币种 1:CNY 2:USD 3: 港币 4:欧元 5:英磅
static
$currency
=
[
1
=>
'人民币'
,
2
=>
'美元'
,
3
=>
'港币'
,
4
=>
'欧元'
,
5
=>
'英磅'
,
];
//前缀
static
$currency_sign
=
[
1
=>
'¥'
,
2
=>
'$'
,
3
=>
'HK$'
,
4
=>
'€'
,
5
=>
'£'
,
];
}
}
config/quote.php
View file @
fc42f9c6
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