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
1245482f
Commit
1245482f
authored
Aug 13, 2020
by
v_vjyjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
8c98b68a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+20
-11
No files found.
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
1245482f
...
...
@@ -4,11 +4,20 @@ class DeliverybillDao extends Dao {
constructor
()
{
super
(
Dao
.
getModelName
(
DeliverybillDao
));
}
extraModelFilter
(
pobj
)
{
convertAggResult
(
aggresult
)
{
if
(
aggresult
)
{
Object
.
keys
(
aggresult
).
forEach
((
k
)
=>
{
if
(
k
.
indexOf
(
"sum"
)
>=
0
)
{
aggresult
[
k
]
=
aggresult
[
k
]
/
100
}
})
}
return
aggresult
}
extraModelFilter
(
pobj
)
{
return
{
"key"
:
"include"
,
"value"
:
{
model
:
this
.
db
.
models
.
settlebill
,
raw
:
true
,
attributes
:
[
'memo'
]
}
};
}
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
extraWhere
(
qobj
,
qw
,
qc
)
{
//根据业务员id获取交付单信息的组装条件
//qc.raw = true;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qw
[
"delivery_status"
]
==
"handling"
)
{
//解决首页多状态查询
...
...
@@ -53,13 +62,13 @@ class DeliverybillDao extends Dao {
}
/*根据交付单编号获取订单详情*/
async
findInfoByDeliverCode
(
qobj
)
{
async
findInfoByDeliverCode
(
qobj
)
{
var
qcwhere
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
return
await
this
.
findOne
(
qcwhere
);
}
/*根据交付单编号更新状态信息*/
async
updateStatusByDeliverCode
(
qobj
,
t
)
{
async
updateStatusByDeliverCode
(
qobj
,
t
)
{
var
setobj
=
{
"delivery_status"
:
qobj
.
deliverStatus
};
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
setobj
.
close_reason
=
qobj
.
statusReason
;
...
...
@@ -85,9 +94,9 @@ class DeliverybillDao extends Dao {
}
/*更新业务员/交付员信息*/
async
updateSalesmanInfoByDeliverCode
(
qobj
,
t
)
{
async
updateSalesmanInfoByDeliverCode
(
qobj
,
t
)
{
var
setobj
=
{};
if
(
qobj
.
type
==
"salesman"
)
{
if
(
qobj
.
type
==
"salesman"
)
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
setobj
.
salesman_id
=
qobj
.
salesmanId
;
};
...
...
@@ -98,7 +107,7 @@ class DeliverybillDao extends Dao {
setobj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
};
}
if
(
qobj
.
type
==
"deliverman"
)
{
if
(
qobj
.
type
==
"deliverman"
)
{
if
(
qobj
.
deliverymanId
&&
qobj
.
deliverymanId
!=
'undefined'
)
{
setobj
.
delivery_man_id
=
qobj
.
deliverymanId
;
};
...
...
@@ -123,7 +132,7 @@ class DeliverybillDao extends Dao {
}
/*根据交付单更新交付材料信息*/
async
updateInfoByDeliverCode
(
qobj
,
t
)
{
//公司注册、云上园区注册时填写交付材料
async
updateInfoByDeliverCode
(
qobj
,
t
)
{
//公司注册、云上园区注册时填写交付材料
var
whereobj
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
var
setobj
=
{
"delivery_info"
:
qobj
.
baseInfo
};
if
(
qobj
.
deliverStatus
&&
qobj
.
deliverStatus
!=
'undefined'
)
{
...
...
@@ -139,7 +148,7 @@ class DeliverybillDao extends Dao {
}
/*插入交付单信息*/
async
insertInfo
(
qobj
,
t
)
{
//到时候看交付单信息后再确定
async
insertInfo
(
qobj
,
t
)
{
//到时候看交付单信息后再确定
var
obj
=
{
"delivery_code"
:
qobj
.
deliverNumber
,
"delivery_status"
:
qobj
.
deliverStatus
,
...
...
@@ -182,7 +191,7 @@ class DeliverybillDao extends Dao {
if
(
qobj
.
clerkName
&&
qobj
.
clerkName
!=
'undefined'
)
{
obj
.
delivery_man_name
=
qobj
.
clerkName
;
}
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
){
if
(
qobj
.
salesmanName
&&
qobj
.
salesmanName
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
salesmanName
;
}
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesmanPhone
!=
'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