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
fde91e50
Commit
fde91e50
authored
Dec 09, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:订单自动分配业务员
parent
decf2668
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
center-manage/app/base/service/impl/auth/userSve.js
+3
-3
center-manage/app/base/service/impl/common/channelhandlers/tx.js
+2
-2
No files found.
center-manage/app/base/service/impl/auth/userSve.js
View file @
fde91e50
...
@@ -556,7 +556,7 @@ class UserService extends ServiceBase {
...
@@ -556,7 +556,7 @@ class UserService extends ServiceBase {
const
users
=
companyFind
.
us
;
const
users
=
companyFind
.
us
;
const
cansels
=
users
.
filter
((
u
)
=>
{
const
cansels
=
users
.
filter
((
u
)
=>
{
if
(
regionName
&&
regionName
!=
''
&&
u
.
regiontags
)
{
if
(
regionName
&&
regionName
!=
''
&&
u
.
regiontags
)
{
if
(
u
.
isAllocated
&&
u
.
is
Delivery
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
if
(
u
.
isAllocated
&&
u
.
is
Salesman
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
if
(
u
.
regiontags
.
indexOf
(
regionName
)
>=
0
||
u
.
isAllArea
)
{
if
(
u
.
regiontags
.
indexOf
(
regionName
)
>=
0
||
u
.
isAllArea
)
{
return
true
;
return
true
;
}
}
...
@@ -564,12 +564,12 @@ class UserService extends ServiceBase {
...
@@ -564,12 +564,12 @@ class UserService extends ServiceBase {
}
}
return
false
;
return
false
;
}
}
if
(
u
.
isAllocated
&&
u
.
is
Delivery
&&
u
.
isAllArea
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
if
(
u
.
isAllocated
&&
u
.
is
Salesman
&&
u
.
isAllArea
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
});
});
console
.
log
(
`getBizUserForDelivery可以接单的
交付
员:
${
JSON
.
stringify
(
cansels
)}
服务商id:
${
companyFind
.
id
}
`
);
console
.
log
(
`getBizUserForDelivery可以接单的
业务
员:
${
JSON
.
stringify
(
cansels
)}
服务商id:
${
companyFind
.
id
}
`
);
const
lngth
=
cansels
.
length
;
const
lngth
=
cansels
.
length
;
if
(
lngth
>
0
)
{
if
(
lngth
>
0
)
{
const
randindex
=
Math
.
floor
(
Math
.
random
()
*
lngth
);
const
randindex
=
Math
.
floor
(
Math
.
random
()
*
lngth
);
...
...
center-manage/app/base/service/impl/common/channelhandlers/tx.js
View file @
fde91e50
...
@@ -70,7 +70,7 @@ class TxHandler {
...
@@ -70,7 +70,7 @@ class TxHandler {
if
(
salesmanInfo
.
userInfo
&&
salesmanInfo
.
userInfo
!=
'undefined'
)
{
if
(
salesmanInfo
.
userInfo
&&
salesmanInfo
.
userInfo
!=
'undefined'
)
{
params
.
salesmanOpcode
=
salesmanInfo
.
userInfo
.
opath
;
params
.
salesmanOpcode
=
salesmanInfo
.
userInfo
.
opath
;
params
.
salesmanId
=
salesmanInfo
.
userInfo
.
userId
;
params
.
salesmanId
=
salesmanInfo
.
userInfo
.
userId
;
params
.
clerkName
=
salesmanInfo
.
userInfo
.
userName
;
params
.
clerkName
=
salesmanInfo
.
userInfo
.
nickName
||
salesmanInfo
.
userInfo
.
userName
;
params
.
clerkPhone
=
system
.
encryptStr
(
salesmanInfo
.
userInfo
.
mobile
);
params
.
clerkPhone
=
system
.
encryptStr
(
salesmanInfo
.
userInfo
.
mobile
);
}
}
const
rtn
=
await
rc
.
execPost3
({
d
:
params
},
requrl
);
const
rtn
=
await
rc
.
execPost3
({
d
:
params
},
requrl
);
...
@@ -259,7 +259,7 @@ class TxHandler {
...
@@ -259,7 +259,7 @@ class TxHandler {
if
(
salesmanInfo
.
userInfo
&&
salesmanInfo
.
userInfo
!=
'undefined'
)
{
if
(
salesmanInfo
.
userInfo
&&
salesmanInfo
.
userInfo
!=
'undefined'
)
{
params
.
clerkOpcode
=
salesmanInfo
.
userInfo
.
opath
;
params
.
clerkOpcode
=
salesmanInfo
.
userInfo
.
opath
;
params
.
clerkId
=
salesmanInfo
.
userInfo
.
userId
;
params
.
clerkId
=
salesmanInfo
.
userInfo
.
userId
;
params
.
clerkName
=
salesmanInfo
.
userInfo
.
userName
;
params
.
clerkName
=
salesmanInfo
.
userInfo
.
nickName
||
salesmanInfo
.
userInfo
.
userName
;
// params.clerkPhone = salesmanInfo.userInfo.mobile;
// params.clerkPhone = salesmanInfo.userInfo.mobile;
params
.
baseInfo
.
clerkName
=
salesmanInfo
.
userInfo
.
userName
;
params
.
baseInfo
.
clerkName
=
salesmanInfo
.
userInfo
.
userName
;
// params.baseInfo.clerkPhone = salesmanInfo.userInfo.mobile
// params.baseInfo.clerkPhone = salesmanInfo.userInfo.mobile
...
...
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