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
9ee85bb8
Commit
9ee85bb8
authored
Jun 11, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
bf74e640
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
2 deletions
+77
-2
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+15
-0
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
+45
-1
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+4
-1
ic-deliver/app/base/db/models/delivery/delivery_bill.js
+4
-0
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
+9
-0
No files found.
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
9ee85bb8
...
...
@@ -117,7 +117,22 @@ class BizOptCtl extends CtlBase {
}
}
/*插入数据信息 */
async
insertInfo
(
pobj
,
qobj
,
req
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
businessType
&&
pobj
.
businessType
!=
'undefined'
){
try
{
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
"插入成功!"
);
}
catch
(
error
){
return
system
.
getResultError
(
error
);
}
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
timeFormat
(
date
)
{
let
localTime
=
moment
.
utc
(
date
).
toDate
();
...
...
ic-deliver/app/base/db/impl/bizchance/bizoptDao.js
View file @
9ee85bb8
...
...
@@ -37,7 +37,51 @@ class BizoptDao extends Dao {
/*插入商机信息*/
async
insertInfo
(
qobj
,
t
){
var
obj
=
{
"demand_code"
:
qobj
.
businessMode
,
"business_type"
:
qobj
.
businessType
,
"business_status"
:
"beforeSubmission"
};
if
(
qobj
.
channelSource
&&
qobj
.
channelSource
!=
'undefined'
){
obj
.
source_name
=
qobj
.
channelSource
;
}
if
(
qobj
.
sourceNumber
&&
qobj
.
sourceNumber
!=
'undefined'
){
obj
.
source_number
=
qobj
.
sourceNumber
;
}
if
(
qobj
.
serviceCode
&&
qobj
.
serviceCode
!=
'undefined'
){
obj
.
service_address
=
qobj
.
serviceCode
;
}
if
(
qobj
.
memoInfo
&&
qobj
.
memoInfo
!=
'undefined'
){
obj
.
business_info
.
memoInfo
=
qobj
.
memoInfo
;
}
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
){
obj
.
close_reason
=
qobj
.
statusReason
;
}
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
){
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
}
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
){
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
}
if
(
qobj
.
servicerCode
&&
qobj
.
servicerCode
!=
'undefined'
){
obj
.
facilitator_id
=
qobj
.
servicerCode
;
}
if
(
qobj
.
servicerName
&&
qobj
.
servicerName
!=
'undefined'
){
obj
.
facilitator_name
=
qobj
.
servicerName
;
}
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
){
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
}
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
){
obj
.
salesman_id
=
qobj
.
salesmanId
;
}
if
(
qobj
.
clerkName
&&
qobj
.
clerkName
!=
'undefined'
){
obj
.
salesman_name
=
qobj
.
clerkName
;
}
if
(
qobj
.
clerkPhone
&&
qobj
.
clerkPhone
!=
'undefined'
){
obj
.
salesman_phone
=
qobj
.
salesman_phone
;
}
return
await
this
.
create
(
obj
,
t
);
}
...
...
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
9ee85bb8
...
...
@@ -11,7 +11,7 @@ class DeliverybillDao extends Dao {
[
this
.
db
.
Op
.
notIn
]:
[
"ICP"
,
"EDI"
]
}
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
){
if
(
qobj
.
bizpath
.
indexOf
(
"my
Chance
"
)
>
0
){
//说明是从商机列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"my
Deliver
"
)
>
0
){
//说明是从商机列表过来的
qw
[
"salesman_id"
]
=
qobj
.
userid
;
}
}
...
...
@@ -56,6 +56,9 @@ class DeliverybillDao extends Dao {
if
(
qobj
.
channelNumber
&&
qobj
.
channelNumber
!=
'undefined'
){
obj
.
source_number
=
qobj
.
channelNumber
;
}
if
(
qobj
.
skuCode
&&
qobj
.
skuCode
!=
'undefined'
){
obj
.
sku_code
=
qobj
.
skuCode
;
}
if
(
qobj
.
serviceCode
&&
qobj
.
serviceCode
!=
'undefined'
){
obj
.
service_address
=
qobj
.
serviceCode
;
}
...
...
ic-deliver/app/base/db/models/delivery/delivery_bill.js
View file @
9ee85bb8
...
...
@@ -22,6 +22,10 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
sku_code
:
{
// sku编码
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
scheme_number
:
{
// 方案编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
...
...
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
9ee85bb8
...
...
@@ -25,5 +25,13 @@ class BizOptService extends ServiceBase {
});
}
/*插入商机信息*/
async
insertInfo
(
qobj
){
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
}
}
module
.
exports
=
BizOptService
;
\ No newline at end of file
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