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
376bca69
Commit
376bca69
authored
Sep 10, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 交付单 切换 业务员
parent
f05629a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+5
-5
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 @
376bca69
...
...
@@ -16,7 +16,7 @@ class DeliverybillCtl extends CtlBase {
this
.
logService
=
system
.
getObject
(
"service.bizchance.statuslogSve"
);
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
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 {
const
rs
=
await
this
.
service
.
findAndCountAll
(
pobj
);
let
result
=
[];
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
({
deliveryId
:
id
,
// id
deliveryNumber
:
delivery_code
,
// 交付单编号
...
...
@@ -40,7 +40,7 @@ class DeliverybillCtl extends CtlBase {
companyBizType
:
delivery_info
.
companyBizType
,
// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他
contactsName
:
delivery_info
.
contactsName
,
// 联系人
contactsPhone
:
delivery_info
.
contactsPhone
,
// 联系电话
owner
:
sales
man_name
,
//所属人
owner
:
delivery_
man_name
,
//所属人
deliveryStatus
:
delivery_status
,
// 交付单状态
setupStatus
:
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
createdAt
:
created_at
,
...
...
@@ -198,7 +198,7 @@ class DeliverybillCtl extends CtlBase {
obj
.
demand_code
=
scheme
.
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_id
=
bizopt
.
salesman_id
;
obj
.
salesman_name
=
bizopt
.
salesman_name
;
...
...
@@ -206,7 +206,7 @@ class DeliverybillCtl extends CtlBase {
obj
.
delivery_man_opcode
=
bizopt
.
salesman_opcode
;
obj
.
delivery_man_id
=
bizopt
.
salesman_id
;
obj
.
delivery_man_name
=
bizopt
.
salesman_name
;
}
}
...
...
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
376bca69
...
...
@@ -20,17 +20,17 @@ class DeliverybillDao extends Dao {
filters
.
push
({
$or
:
[
{
sales
man_opcode
:
{
delivery_
man_opcode
:
{
$eq
:
null
}
},
{
sales
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
delivery_
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
]
});
}
else
{
// 销售 查询自己的
filters
.
push
({
sales
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
delivery_
man_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
});
}
...
...
@@ -99,7 +99,7 @@ class DeliverybillDao extends Dao {
if
(
qc
.
where
.
owner
)
{
filters
.
push
({
sales
man_name
:
qc
.
where
.
owner
delivery_
man_name
:
qc
.
where
.
owner
});
delete
qc
.
where
.
owner
;
}
...
...
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
View file @
376bca69
...
...
@@ -113,7 +113,7 @@ class DeliverybillService extends ServiceBase {
area
:
deliverData
.
service_address
,
// 服务 地区 编码
contactsName
:
deliverData
.
delivery_info
.
contactsName
,
// 联系人
contactsPhone
:
deliverData
.
delivery_info
.
contactsPhone
,
// 联系电话
owner
:
deliverData
.
sales
man_name
,
//所属人
owner
:
deliverData
.
delivery_
man_name
,
//所属人
deliveryStatus
:
deliverData
.
delivery_status
,
// 交付单状态
setupStatus
:
deliverData
.
delivery_info
.
setupStatus
||
System
.
SERVERSESTATUS
.
NOTSETUP
,
//建账状态 notsetup | setup
createdAt
:
deliverData
.
created_at
,
...
...
@@ -154,10 +154,9 @@ class DeliverybillService extends ServiceBase {
throw
new
Error
(
"请检查单号是否正确"
);
}
await
this
.
dao
.
updateByWhere
({
salesman_id
:
userId
,
salesman_opcode
:
opCode
,
salesman_phone
:
phone
,
salesman_name
:
nickName
delivery_man_id
:
userId
,
delivery_man_opcode
:
opCode
,
delivery_man_name
:
nickName
},
{
delivery_code
:
{
$in
:
numbers
...
...
@@ -174,9 +173,9 @@ class DeliverybillService extends ServiceBase {
},
operation_type
:
"distribution"
,
operation_details
:
{
isFirst
:
val
.
sales
man_id
?
true
:
false
,
fromUserId
:
val
.
sales
man_id
,
fromUserName
:
val
.
sales
man_name
,
isFirst
:
val
.
delivery_
man_id
?
true
:
false
,
fromUserId
:
val
.
delivery_
man_id
,
fromUserName
:
val
.
delivery_
man_name
,
toUserId
:
userId
,
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