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
e61836c3
authored
Jun 04, 2021
by
duwenjun
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev/ver/cloud_1.0.0' into 'master'
我的报价展示供应商信息 See merge request
!6
parents
c39fe132
4aa46722
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
app/Model/QuoteModel.php
app/Model/SupplierChannelComModel.php
app/Model/QuoteModel.php
View file @
e61836c3
...
...
@@ -190,7 +190,15 @@ class QuoteModel extends Model
$map
[
'create_uid'
]
=
isset
(
$input
[
'create_uid'
])
?
$input
[
'create_uid'
]
:
''
;
// 报价制单人
if
(
$type
==
1
)
{
$list
=
$list
->
where
(
'q.create_uid'
,
$input
[
'user_id'
])
->
whereNotIn
(
'q.status'
,
[
0
,
-
1
]);
// 过滤报价草稿
// 如果有绑定供应商,那么展示供应商数据
$user_id
=
$input
[
'user_id'
]
?
$input
[
'user_id'
]
:
0
;
$bind_supplier_info
=
SupplierChannelComModel
::
getSupplierInfoByUid
(
$user_id
);
if
(
$bind_supplier_info
){
$list
=
$list
->
where
(
'q.supplier_id'
,
$bind_supplier_info
[
'supplier_id'
])
->
whereNotIn
(
'q.status'
,
[
0
,
-
1
]);
// 过滤报价草稿
}
else
{
$list
=
$list
->
where
(
'q.create_uid'
,
$input
[
'user_id'
])
->
whereNotIn
(
'q.status'
,
[
0
,
-
1
]);
// 过滤报价草稿
}
// 如果是云芯的,过滤已删除状态
if
(
RequestHelper
::
getClientType
()
==
AppType
::
APPTYPE_YUNXIN
){
$list
=
$list
->
where
(
'q.status'
,
'<>'
,
QuoteModel
::
STATUS_DEL
);
...
...
app/Model/SupplierChannelComModel.php
View file @
e61836c3
...
...
@@ -23,4 +23,10 @@ class SupplierChannelComModel extends Model
echo
json_encode
(
$brandInfo
,
JSON_UNESCAPED_UNICODE
)
;
exit
();
}
public
static
function
getSupplierInfoByUid
(
$uid
)
{
$res
=
self
::
where
(
'yunxin_channel_uid'
,
$uid
)
->
first
();
return
(
$res
)
?
$res
->
toArray
()
:
[];
}
}
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