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
d1b63cb4
authored
Jul 13, 2021
by
连敬荣
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into 'feature/lianjingrong/20210524'
# Conflicts: # config/website.php
parents
1693714e
e61836c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
app/Model/QuoteModel.php
app/Model/SupplierChannelComModel.php
config/website.php
app/Model/QuoteModel.php
View file @
d1b63cb4
...
...
@@ -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
);
...
...
@@ -515,11 +523,11 @@ class QuoteModel extends Model
if
(
$quote_info
[
'status'
]
==
self
::
STATUS_CLOSE
)
{
return
[
1
,
'关闭失败,该报价已关闭,请刷新页面查看'
];
}
if
(
$quote_info
[
'status'
]
!==
self
::
STATUS_OFFER
)
{
if
(
!
in_array
(
$quote_info
[
'status'
],
[
self
::
STATUS_OFFER
,
self
::
STATUS_SELECTED
,
self
::
STATUS_SURE
])
)
{
return
[
1
,
'关闭失败,该报价状态不能关闭'
];
}
$res
=
$this
->
where
(
'id'
,
$id
)
->
where
(
'status'
,
self
::
STATUS_OFFER
)
->
update
([
'status'
=>
self
::
STATUS_CLOSE
]);
$res
=
$this
->
where
(
'id'
,
$id
)
->
where
In
(
'status'
,
[
self
::
STATUS_OFFER
,
self
::
STATUS_SELECTED
,
self
::
STATUS_SURE
]
)
->
update
([
'status'
=>
self
::
STATUS_CLOSE
]);
// 查看当前询价明细的报价数量,若为0,则更新询价明细状态为待报价
$count
=
$this
->
where
(
'inquiry_items_id'
,
$quote_info
[
'inquiry_items_id'
])
->
whereNotIn
(
'status'
,
[
self
::
STATUS_CANCEL
,
self
::
STATUS_CLOSE
,
self
::
STATUS_DEL
])
->
count
();
$InquiryItemsModel
=
new
InquiryItemsModel
;
...
...
app/Model/SupplierChannelComModel.php
View file @
d1b63cb4
...
...
@@ -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
()
:
[];
}
}
config/website.php
View file @
d1b63cb4
...
...
@@ -13,8 +13,7 @@ return [
'search'
=>
$domain_config
[
'domain'
][
'login_domain'
]
.
'/api/search'
,
'dashboard'
=>
$domain_config
[
'domain'
][
'login_domain'
]
.
'/dashboard'
,
],
//////////////////////
// "search_url"=>"http://soso12.ichunt.com", //本地235数据库
"search_url"
=>
$domain_config
[
'domain'
][
'search_url'
],
////////////////本地配置////////////////////
'export_source_items_id'
=>
"30"
,
//导出来源明细id
'company_info_origin'
=>
[
#原始公司信息
...
...
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