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
3ea6c33d
Commit
3ea6c33d
authored
Sep 10, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 加 权限 校验
parent
bba5ece6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+25
-18
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
+0
-0
No files found.
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
3ea6c33d
...
@@ -37,19 +37,19 @@ class BizOptCtl extends CtlBase {
...
@@ -37,19 +37,19 @@ class BizOptCtl extends CtlBase {
robj
.
id
=
element
.
id
;
//数据的id
robj
.
id
=
element
.
id
;
//数据的id
robj
.
demand_code
=
element
.
demand_code
;
//商机编号
robj
.
demand_code
=
element
.
demand_code
;
//商机编号
robj
.
source
=
element
.
source_name
;
//商机来源
robj
.
source
=
element
.
source_name
;
//商机来源
// robj.source_name = element.source_name;//商机来源-jiansuo
// robj.source_name = element.source_name;//商机来源-jiansuo
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
business_type
=
element
.
business_type
;
//商机类型
robj
.
business_info_person
=
element
.
business_info
.
contactsName
;
//联系人
robj
.
business_info_person
=
element
.
business_info
.
contactsName
;
//联系人
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
v_coname
=
element
.
v_coname
;
//联系人-shousuo
robj
.
business_info_phone
=
system
.
decryptStr
(
element
.
business_info
.
contactsPhone
);
//联系电话
robj
.
business_info_phone
=
system
.
decryptStr
(
element
.
business_info
.
contactsPhone
);
//联系电话
robj
.
v_cophone
=
system
.
decryptStr
(
element
.
v_cophone
);
//联系电话-shousuo
robj
.
v_cophone
=
system
.
decryptStr
(
element
.
v_cophone
);
//联系电话-shousuo
robj
.
business_status
=
element
.
business_status
;
//商机当前状态
robj
.
business_status
=
element
.
business_status
;
//商机当前状态
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
){
if
(
element
.
business_info
.
serviceName
&&
element
.
business_info
.
serviceName
!=
'undefined'
)
{
robj
.
serviceName
=
element
.
business_info
.
serviceName
;
//服务地区
robj
.
serviceName
=
element
.
business_info
.
serviceName
;
//服务地区
}
}
else
{
else
{
robj
.
serviceName
=
""
;
robj
.
serviceName
=
""
;
}
}
robj
.
updated_at
=
this
.
timeFormat
(
element
.
updated_at
);
//商机当前状态日期
robj
.
updated_at
=
this
.
timeFormat
(
element
.
updated_at
);
//商机当前状态日期
robj
.
servicerName
=
element
.
facilitator_name
;
robj
.
servicerName
=
element
.
facilitator_name
;
...
@@ -57,8 +57,8 @@ class BizOptCtl extends CtlBase {
...
@@ -57,8 +57,8 @@ class BizOptCtl extends CtlBase {
robj
.
sourceName
=
element
.
source_name
;
//渠道来源
robj
.
sourceName
=
element
.
source_name
;
//渠道来源
robj
.
source_name
=
element
.
source_name
;
//渠道来源--前端服务
robj
.
source_name
=
element
.
source_name
;
//渠道来源--前端服务
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_name
=
element
.
salesman_name
;
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
robj
.
salesman_phone
=
system
.
decryptStr
(
element
.
salesman_phone
);
rarr
.
push
(
robj
);
rarr
.
push
(
robj
);
});
});
...
@@ -128,18 +128,25 @@ class BizOptCtl extends CtlBase {
...
@@ -128,18 +128,25 @@ class BizOptCtl extends CtlBase {
}
}
}
}
/*更新业务员信息*/
/*更新业务员信息*/
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
){
async
updateSalesmanInfoByDemandCode
(
mobj
,
qobj
,
req
)
{
var
pobj
=
mobj
.
d
;
var
pobj
=
mobj
.
d
;
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
)
{
try
{
const
data
=
await
this
.
service
.
findOne
({
demand_code
:
pobj
.
businessMode
,
facilitator_id
:
mobj
.
company_id
});
if
(
!
data
)
{
return
system
.
getResultError
(
"没有权限"
);
}
try
{
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
var
res
=
await
this
.
service
.
findInfoByDemandCode
(
pobj
);
if
(
res
){
if
(
res
)
{
var
sInfo
=
{
var
sInfo
=
{
"flowType"
:
"BIZ"
,
"flowType"
:
"BIZ"
,
"flowId"
:
res
.
id
,
"flowId"
:
res
.
id
,
"flowCode"
:
pobj
.
businessMode
,
"flowCode"
:
pobj
.
businessMode
,
"salesmanInfo"
:{
"salesmanInfo"
:
{
"oldOpcode"
:
res
.
salesman_opcode
,
"oldOpcode"
:
res
.
salesman_opcode
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkName"
:
res
.
salesman_name
,
"oldClerkId"
:
res
.
salesman_id
,
"oldClerkId"
:
res
.
salesman_id
,
...
@@ -158,16 +165,16 @@ class BizOptCtl extends CtlBase {
...
@@ -158,16 +165,16 @@ class BizOptCtl extends CtlBase {
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
await
this
.
service
.
updateSalesmanInfoByDemandCode
(
pobj
);
//更新业务员信息
return
system
.
getResult
(
"操作成功!"
);
return
system
.
getResult
(
"操作成功!"
);
}
}
else
{
else
{
return
system
.
getResultError
(
"未找到相关数据"
);
return
system
.
getResultError
(
"未找到相关数据"
);
}
}
}
}
catch
(
error
)
{
catch
(
error
)
{
return
system
.
getResultError
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
}
else
{
else
{
return
system
.
getResultError
(
"参数错误!"
);
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
}
...
...
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
3ea6c33d
This diff is collapsed.
Click to expand it.
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