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
40804c91
Commit
40804c91
authored
Aug 21, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pp
parent
521961bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
40 deletions
+48
-40
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+48
-40
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
40804c91
...
...
@@ -82,21 +82,29 @@ class BizOptCtl extends CtlBase {
* @param {*} req
* {
demand_code_list: ["1", "2", "3"],//至少一个需求编号
salesman_opcode: "",//唯一标识
salesman_id: "",//销售员id
salesman_name: "",//销售员姓名
salesman_id: "",//销售员id
salesman_opcode: "",//唯一标识
salesman_phone: "",//销售员手机号
}
*/
async
distribution
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
pobj
.
type
=
"BIZ"
;
let
obj
=
{
numbers
:
pobj
.
demand_code_list
,
nickName
:
pobj
.
salesman_name
,
userId
:
pobj
.
salesman_id
,
opCode
:
pobj
.
salesman_opcode
,
phone
:
pobj
.
salesman_phone
,
type
:
"BIZ"
,
}
try
{
let
res
=
await
this
.
deliverbillSve
.
distributionPerson
(
obj
);
return
system
.
getResult
(
"分配需求成功:"
+
res
);
}
catch
(
error
)
{
console
.
log
(
"bizoptCtl/"
)
console
.
log
(
"bizoptCtl/distribution分配需求失败:"
,
error
);
return
system
.
getResultError
(
error
);
}
}
/**
...
...
@@ -233,45 +241,45 @@ class BizOptCtl extends CtlBase {
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
try
{
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
)
{
var
sInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"flowCode"
:
pobj
.
businessMode
,
"salesmanInfo"
:
{
"oldOpcode"
:
res
.
salesman_opcode
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkId"
:
res
.
salesman_id
,
"oldClerkPhone"
:
res
.
salesman_phone
,
"oldFacilitatorId"
:
res
.
facilitator_id
,
"oldFacilitatorName"
:
res
.
facilitator_name
,
"newOpcode"
:
pobj
.
salesmanOpcode
,
"newClerkName"
:
pobj
.
salesmanName
,
"newClerkId"
:
pobj
.
salesmanId
,
"newClerkPhone"
:
pobj
.
salesmanPhone
,
"newFacilitatorId"
:
pobj
.
facilitatorId
,
"newFacilitatorName"
:
pobj
.
facilitatorName
}
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
try
{
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
)
{
var
sInfo
=
{
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"flowCode"
:
pobj
.
businessMode
,
"salesmanInfo"
:
{
"oldOpcode"
:
res
.
salesman_opcode
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkId"
:
res
.
salesman_id
,
"oldClerkPhone"
:
res
.
salesman_phone
,
"oldFacilitatorId"
:
res
.
facilitator_id
,
"oldFacilitatorName"
:
res
.
facilitator_name
,
"newOpcode"
:
pobj
.
salesmanOpcode
,
"newClerkName"
:
pobj
.
salesmanName
,
"newClerkId"
:
pobj
.
salesmanId
,
"newClerkPhone"
:
pobj
.
salesmanPhone
,
"newFacilitatorId"
:
pobj
.
facilitatorId
,
"newFacilitatorName"
:
pobj
.
facilitatorName
}
await
this
.
shisService
.
insertInfo
(
sInfo
);
//之前业务员转历史
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
await
this
.
shisService
.
insertInfo
(
sInfo
);
//之前业务员转历史
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
}
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
catch
(
error
)
{
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
/*根据商机编号更新商机状态*/
}
/*根据商机编号更新商机状态*/
async
updateStatusByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
currentStatus
&&
pobj
.
currentStatus
!=
'undefined'
)
{
...
...
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