Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
418b3029
Commit
418b3029
authored
Aug 20, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
findAndCountAll add admin filter
parent
6f728c15
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+21
-3
No files found.
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
418b3029
...
@@ -13,9 +13,27 @@ class BizoptDao extends Dao {
...
@@ -13,9 +13,27 @@ class BizoptDao extends Dao {
}
else
{
}
else
{
//需要添加公司查询条件
//需要添加公司查询条件
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
// 为空说明是管理员,不需设置组织结构过滤
/**
if
(
qobj
.
opath
&&
qobj
.
opath
!=
""
)
{
* 数据权限过滤
qw
[
"salesman_opcode"
]
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
}
* 1. 管理员 (opath 为空)、 销售主管(isPrincipal = true) 、 销售 (isPrincipal = false && opath不为空)
*/
if
(
!
qobj
.
opath
)
{
// 管理员 不做处理
}
else
if
(
qobj
.
isPrincipal
)
{
// 销售主管 查询为空和自己组织结构下的
filters
.
push
({
$or
:
[
{
salesman_opcode
:
{
$eq
:
null
}
},
{
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
]
});
}
else
{
// 销售 查询自己的
filters
.
push
({
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
});
}
}
//不是来自平台前端查询
//不是来自平台前端查询
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
...
...
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