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
16700268
Commit
16700268
authored
Sep 10, 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
74748e88
376bca69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+6
-6
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
+4
-4
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
+7
-8
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
16700268
...
@@ -16,7 +16,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -16,7 +16,7 @@ class DeliverybillCtl extends CtlBase {
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
fitaxschemeService
=
system
.
getObject
(
"service.bizchance.fitaxschemeSve"
);
this
.
fitaxschemeService
=
system
.
getObject
(
"service.bizchance.fitaxschemeSve"
);
this
.
bizoptService
=
system
.
getObject
(
"service.bizchance.bizoptSve"
);
this
.
bizoptService
=
system
.
getObject
(
"service.bizchance.bizoptSve"
);
}
}
/**
/**
...
@@ -29,7 +29,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -29,7 +29,7 @@ class DeliverybillCtl extends CtlBase {
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
let
result
=
[];
let
result
=
[];
for
(
let
val
of
rs
.
results
.
rows
)
{
for
(
let
val
of
rs
.
results
.
rows
)
{
let
{
id
,
delivery_code
,
service_address
,
delivery_info
,
created_at
,
updated_at
,
delivery_status
,
sales
man_name
}
=
val
;
let
{
id
,
delivery_code
,
service_address
,
delivery_info
,
created_at
,
updated_at
,
delivery_status
,
delivery_
man_name
}
=
val
;
result
.
push
({
result
.
push
({
deliveryId
:
id
,
// id
deliveryId
:
id
,
// id
deliveryNumber
:
delivery_code
,
// 交付单编号
deliveryNumber
:
delivery_code
,
// 交付单编号
...
@@ -40,7 +40,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -40,7 +40,7 @@ class DeliverybillCtl extends CtlBase {
companyBizType
:
delivery_info
.
companyBizType
,
// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他
companyBizType
:
delivery_info
.
companyBizType
,
// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他
contactsName
:
delivery_info
.
contactsName
,
// 联系人
contactsName
:
delivery_info
.
contactsName
,
// 联系人
contactsPhone
:
delivery_info
.
contactsPhone
,
// 联系电话
contactsPhone
:
delivery_info
.
contactsPhone
,
// 联系电话
owner
:
sales
man_name
,
//所属人
owner
:
delivery_
man_name
,
//所属人
deliveryStatus
:
delivery_status
,
// 交付单状态
deliveryStatus
:
delivery_status
,
// 交付单状态
setupStatus
:
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
setupStatus
:
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
createdAt
:
created_at
,
createdAt
:
created_at
,
...
@@ -130,7 +130,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -130,7 +130,7 @@ class DeliverybillCtl extends CtlBase {
*/
*/
async
distributionPerson
(
pobj
,
qobj
,
req
)
{
async
distributionPerson
(
pobj
,
qobj
,
req
)
{
try
{
try
{
if
(
!
Array
.
isArray
(
pobj
.
numbers
)
&&
pobj
.
numbers
.
length
>
0
)
{
if
(
!
Array
.
isArray
(
pobj
.
numbers
)
||
pobj
.
numbers
.
length
<=
0
)
{
throw
new
Error
(
"numbers 为数组 且 不能为空"
);
throw
new
Error
(
"numbers 为数组 且 不能为空"
);
}
}
if
(
!
pobj
.
nickName
)
{
if
(
!
pobj
.
nickName
)
{
...
@@ -198,7 +198,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -198,7 +198,7 @@ class DeliverybillCtl extends CtlBase {
obj
.
demand_code
=
scheme
.
demand_code
;
obj
.
demand_code
=
scheme
.
demand_code
;
//根据需求编号获取业务员信息
//根据需求编号获取业务员信息
var
bizopt
=
await
this
.
bizoptService
.
findInfoByDemandCode
({
"demand_code"
:
obj
.
demand_code
});
var
bizopt
=
await
this
.
bizoptService
.
findInfoByDemandCode
({
"demand_code"
:
obj
.
demand_code
});
if
(
bizopt
){
if
(
bizopt
)
{
obj
.
salesman_opcode
=
bizopt
.
salesman_opcode
;
obj
.
salesman_opcode
=
bizopt
.
salesman_opcode
;
obj
.
salesman_id
=
bizopt
.
salesman_id
;
obj
.
salesman_id
=
bizopt
.
salesman_id
;
obj
.
salesman_name
=
bizopt
.
salesman_name
;
obj
.
salesman_name
=
bizopt
.
salesman_name
;
...
@@ -206,7 +206,7 @@ class DeliverybillCtl extends CtlBase {
...
@@ -206,7 +206,7 @@ class DeliverybillCtl extends CtlBase {
obj
.
delivery_man_opcode
=
bizopt
.
salesman_opcode
;
obj
.
delivery_man_opcode
=
bizopt
.
salesman_opcode
;
obj
.
delivery_man_id
=
bizopt
.
salesman_id
;
obj
.
delivery_man_id
=
bizopt
.
salesman_id
;
obj
.
delivery_man_name
=
bizopt
.
salesman_name
;
obj
.
delivery_man_name
=
bizopt
.
salesman_name
;
}
}
}
}
...
...
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
16700268
...
@@ -20,17 +20,17 @@ class DeliverybillDao extends Dao {
...
@@ -20,17 +20,17 @@ class DeliverybillDao extends Dao {
filters
.
push
({
filters
.
push
({
$or
:
[
$or
:
[
{
{
sales
man_opcode
:
{
delivery_
man_opcode
:
{
$eq
:
null
$eq
:
null
}
}
},
{
},
{
sales
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
delivery_
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
}
]
]
});
});
}
else
{
// 销售 查询自己的
}
else
{
// 销售 查询自己的
filters
.
push
({
filters
.
push
({
sales
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
delivery_
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
});
});
}
}
...
@@ -99,7 +99,7 @@ class DeliverybillDao extends Dao {
...
@@ -99,7 +99,7 @@ class DeliverybillDao extends Dao {
if
(
qc
.
where
.
owner
)
{
if
(
qc
.
where
.
owner
)
{
filters
.
push
({
filters
.
push
({
sales
man_name
:
qc
.
where
.
owner
delivery_
man_name
:
qc
.
where
.
owner
});
});
delete
qc
.
where
.
owner
;
delete
qc
.
where
.
owner
;
}
}
...
...
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
View file @
16700268
...
@@ -113,7 +113,7 @@ class DeliverybillService extends ServiceBase {
...
@@ -113,7 +113,7 @@ class DeliverybillService extends ServiceBase {
area
:
deliverData
.
service_address
,
// 服务 地区 编码
area
:
deliverData
.
service_address
,
// 服务 地区 编码
contactsName
:
deliverData
.
delivery_info
.
contactsName
,
// 联系人
contactsName
:
deliverData
.
delivery_info
.
contactsName
,
// 联系人
contactsPhone
:
deliverData
.
delivery_info
.
contactsPhone
,
// 联系电话
contactsPhone
:
deliverData
.
delivery_info
.
contactsPhone
,
// 联系电话
owner
:
deliverData
.
sales
man_name
,
//所属人
owner
:
deliverData
.
delivery_
man_name
,
//所属人
deliveryStatus
:
deliverData
.
delivery_status
,
// 交付单状态
deliveryStatus
:
deliverData
.
delivery_status
,
// 交付单状态
setupStatus
:
deliverData
.
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
setupStatus
:
deliverData
.
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
createdAt
:
deliverData
.
created_at
,
createdAt
:
deliverData
.
created_at
,
...
@@ -154,10 +154,9 @@ class DeliverybillService extends ServiceBase {
...
@@ -154,10 +154,9 @@ class DeliverybillService extends ServiceBase {
throw
new
Error
(
"请检查单号是否正确"
);
throw
new
Error
(
"请检查单号是否正确"
);
}
}
await
this
.
dao
.
updateByWhere
({
await
this
.
dao
.
updateByWhere
({
salesman_id
:
userId
,
delivery_man_id
:
userId
,
salesman_opcode
:
opCode
,
delivery_man_opcode
:
opCode
,
salesman_phone
:
phone
,
delivery_man_name
:
nickName
salesman_name
:
nickName
},
{
},
{
delivery_code
:
{
delivery_code
:
{
$in
:
numbers
$in
:
numbers
...
@@ -174,9 +173,9 @@ class DeliverybillService extends ServiceBase {
...
@@ -174,9 +173,9 @@ class DeliverybillService extends ServiceBase {
},
},
operation_type
:
"distribution"
,
operation_type
:
"distribution"
,
operation_details
:
{
operation_details
:
{
isFirst
:
val
.
sales
man_id
?
true
:
false
,
isFirst
:
val
.
delivery_
man_id
?
true
:
false
,
fromUserId
:
val
.
sales
man_id
,
fromUserId
:
val
.
delivery_
man_id
,
fromUserName
:
val
.
sales
man_name
,
fromUserName
:
val
.
delivery_
man_name
,
toUserId
:
userId
,
toUserId
:
userId
,
toUserName
:
nickName
toUserName
:
nickName
},
},
...
...
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