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
88cd8ea8
Commit
88cd8ea8
authored
Aug 18, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax
parents
d7690ded
19871fb6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
18 deletions
+56
-18
tx-fi-tax/app/base/controller/ctl.base.js
+2
-0
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
+49
-17
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
+4
-0
tx-fi-tax/app/base/system.js
+1
-1
No files found.
tx-fi-tax/app/base/controller/ctl.base.js
View file @
88cd8ea8
...
...
@@ -59,8 +59,10 @@ class CtlBase {
//添加组织结构路径,如果是上级,取上级
if
(
req
.
xctx
.
ptags
&&
req
.
xctx
.
ptags
!=
""
)
{
pobj
.
opath
=
req
.
xctx
.
ptags
pob
.
isPrincipal
=
true
}
else
{
pobj
.
opath
=
req
.
xctx
.
opath
pob
.
isPrincipal
=
false
}
if
(
!
req
.
xctx
.
appkey
)
{
return
[
-
200
,
"请求头缺少应用x-app-key"
]
...
...
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
88cd8ea8
...
...
@@ -5,33 +5,65 @@ class DeliverybillDao extends Dao {
super
(
Dao
.
getModelName
(
DeliverybillDao
));
}
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
qc
.
raw
=
true
;
let
filters
=
[]
// 公司数据过滤
filters
.
push
({
facilitator_id
:
Number
(
qobj
.
company_id
||
-
1
)
});
/**
* 权限 过滤
* 数据权限过滤
* 1. 管理员 (opath 为空)、 销售主管(isPrincipal = true) 、 销售 (isPrincipal = false && opath不为空)
*/
//需要添加公司查询条件
qc
.
where
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
||
-
1
);
// 组织结构
if
(
qobj
.
opath
&&
qobj
.
opath
!=
""
)
{
qc
.
where
[
'$or'
]
=
[
{
delivery_man_opcode
:
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
},
},
if
(
!
qobj
.
opath
)
{
// 管理员 不做处理
}
else
if
(
qobj
.
isPrincipal
)
{
// 销售主管 查询为空和自己组织结构下的
filters
.
push
({
$or
:
[
{
salesman_opcode
:
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
},
salesman_opcode
:
{
$eq
:
null
}
},
{
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
]
});
}
else
{
// 销售 查询自己的
filters
.
push
({
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
});
}
qc
.
raw
=
true
;
/**
* 筛选 条件 TODO: 筛选功能字段(filter)、确定产品码是多少
*/
let
filters
=
[]
// 产品类型过滤
filters
.
push
({
product_code
:
system
.
SERVICECODE
.
FT
})
// 根据 页面 过滤 交付状态
switch
(
qobj
.
bizpath
)
{
case
"/configManageMent/deliveryRecord"
:
// 交付单记录
filters
.
push
({
delivery_status
:
{
$in
:
[
system
.
SERVERSESTATUS
.
INSERVICE
,
system
.
SERVERSESTATUS
.
CLOSED
]
}
});
break
case
"/configManageMent/deliveryManage"
:
//交付单处理
filters
.
push
({
delivery_status
:
{
$in
:
[
system
.
SERVERSESTATUS
.
RECEIVED
,
system
.
SERVERSESTATUS
.
WAITUSERCONFIRM
]
}
});
break
}
/**
* 筛选 条件 TODO: 筛选功能字段(filter)
*/
qc
.
where
[
"$and"
]
=
filters
;
return
qw
;
}
...
...
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
View file @
88cd8ea8
...
...
@@ -21,6 +21,10 @@ module.exports = (db, DataTypes) => {
operation_details
:
{
// 操作详细记录
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
order_type
:
{
// 操作的 那个 表的 ( BIZ | DELIVERY )
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
...
...
tx-fi-tax/app/base/system.js
View file @
88cd8ea8
...
...
@@ -363,7 +363,7 @@ System.FLOWCODE = {
}
// 服务名称
System
.
SERVICECODE
=
{
FT
:
'
ft
'
// 财税项目
FT
:
'
bookkeeping
'
// 财税项目
}
// 资质服务单状态
...
...
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