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
593e461f
Commit
593e461f
authored
Mar 10, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
ce817a76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
16 deletions
+80
-16
xggsve-invoice/app/base/service/impl/invoice/invoiceSve.js
+80
-16
No files found.
xggsve-invoice/app/base/service/impl/invoice/invoiceSve.js
View file @
593e461f
...
...
@@ -14,6 +14,70 @@ class InvoiceService extends ServiceBase {
this
.
delivererDao
=
system
.
getObject
(
"db.invoice.delivererDao"
);
}
/**
* 业务员完善订单信息
* @param {*} params
* @id String 订单ID
* @status String 下一个状态
* @other Object 其他参数
*/
async
perfectInformation
(
params
)
{
//验证参数
this
.
verificationPerfectInformation
(
params
);
let
_oorderinforeg
=
await
this
.
oorderinforegDao
.
findById
(
params
.
_order
.
id
);
if
(
!
_oorderinforeg
)
{
return
system
.
getResult
(
null
,
`订单异常 订单明细不存在,请联系管理员`
);
}
//更新订单子表
_oorderinforeg
.
legal_name
=
this
.
trim
(
params
.
legal_name
);
_oorderinforeg
.
id_card
=
this
.
trim
(
params
.
id_card
);
_oorderinforeg
.
legal_mobile
=
this
.
trim
(
params
.
legal_mobile
);
_oorderinforeg
.
names
=
this
.
trim
(
params
.
names
);
_oorderinforeg
.
capital
=
this
.
trim
(
params
.
capital
);
_oorderinforeg
.
domicile_id
=
this
.
trim
(
params
.
domicile_id
);
_oorderinforeg
.
domicile_name
=
this
.
trim
(
params
.
domicile_name
);
_oorderinforeg
.
business_scope_id
=
this
.
trim
(
params
.
business_scope_id
);
_oorderinforeg
.
business_type
=
this
.
trim
(
params
.
business_type
);
_oorderinforeg
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_oorderinforeg
.
idcard_front
=
this
.
trim
(
params
.
idcard_front
);
_oorderinforeg
.
idcard_back
=
this
.
trim
(
params
.
idcard_back
);
_oorderinforeg
.
other_file
=
this
.
trim
(
params
.
other_file
);
_oorderinforeg
.
guest_mail_addr
=
this
.
trim
(
params
.
guest_mail_addr
);
_oorderinforeg
.
guest_mail_to
=
this
.
trim
(
params
.
guest_mail_to
);
_oorderinforeg
.
guest_mail_mobile
=
this
.
trim
(
params
.
guest_mail_mobile
);
//更新主表
params
.
_order
.
service_items
=
this
.
trim
(
params
.
service_items
);
params
.
_order
.
service_remark
=
this
.
trim
(
params
.
service_remark
);
params
.
_order
.
status
=
this
.
trim
(
params
.
status
);
try
{
//开启事务
await
this
.
db
.
transaction
(
async
t
=>
{
await
_oorderinforeg
.
save
();
await
params
.
_order
.
save
();
});
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/************************************************旧版接口**************************************************************** */
/**
* 完税证明
* @param {*} params
...
...
@@ -51,9 +115,9 @@ class InvoiceService extends ServiceBase {
*/
async
apiQueryInvoices
(
params
)
{
try
{
if
(
params
.
applyNo
){
params
.
applyNo
=
this
.
trim
(
params
.
applyNo
)
}
if
(
params
.
type
){
params
.
type
=
this
.
trim
(
params
.
type
);
}
if
(
params
.
invoiceTime
){
params
.
invoiceTime
=
this
.
trim
(
params
.
invoiceTime
);
}
if
(
params
.
applyNo
)
{
params
.
applyNo
=
this
.
trim
(
params
.
applyNo
)
}
if
(
params
.
type
)
{
params
.
type
=
this
.
trim
(
params
.
type
);
}
if
(
params
.
invoiceTime
)
{
params
.
invoiceTime
=
this
.
trim
(
params
.
invoiceTime
);
}
return
await
this
.
queryInvoices
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
...
...
@@ -66,7 +130,7 @@ class InvoiceService extends ServiceBase {
*/
async
apiRedRushList
(
params
)
{
try
{
if
(
params
){
}
if
(
params
)
{
}
let
res
=
await
this
.
redRushList
(
params
);
return
res
;
}
catch
(
error
)
{
...
...
@@ -84,34 +148,34 @@ class InvoiceService extends ServiceBase {
* 红冲列表
* @param {*} params
*/
async
redRushList
(
params
){
async
redRushList
(
params
)
{
try
{
if
(
params
.
delivererId
)
{
params
.
delivererId
=
this
.
trim
(
params
.
delivererId
);
params
.
delivererId
=
this
.
trim
(
params
.
delivererId
);
}
if
(
this
.
trim
(
params
.
applyNo
))
{
params
.
applyNo
=
this
.
trim
(
params
.
applyNo
);
params
.
applyNo
=
this
.
trim
(
params
.
applyNo
);
}
if
(
this
.
trim
(
params
.
invoiceNo
))
{
params
.
invoiceNo
=
this
.
trim
(
params
.
invoiceNo
);
params
.
invoiceNo
=
this
.
trim
(
params
.
invoiceNo
);
}
if
(
this
.
trim
(
params
.
invoiceTime
))
{
params
.
invoiceTime
=
this
.
trim
(
params
.
invoiceTime
);
params
.
invoiceTime
=
this
.
trim
(
params
.
invoiceTime
);
}
if
(
this
.
trim
(
params
.
startTime
))
{
params
.
startTime
=
this
.
trim
(
params
.
startTime
);
params
.
startTime
=
this
.
trim
(
params
.
startTime
);
}
if
(
this
.
trim
(
params
.
endTime
))
{
params
.
endTime
=
this
.
trim
(
params
.
endTime
);
params
.
endTime
=
this
.
trim
(
params
.
endTime
);
}
if
(
this
.
trim
(
params
.
type
))
{
params
.
type
=
this
.
trim
(
params
.
type
);
params
.
type
=
this
.
trim
(
params
.
type
);
}
if
(
this
.
trim
(
params
.
status
))
{
params
.
status
=
this
.
trim
(
params
.
status
);
params
.
status
=
this
.
trim
(
params
.
status
);
}
if
(
this
.
trim
(
params
.
redStatus
))
{
params
.
redStatus
=
this
.
trim
(
params
.
redStatus
);
params
.
redStatus
=
this
.
trim
(
params
.
redStatus
);
}
params
.
statRow
=
(
Number
(
this
.
trim
(
params
.
pageIndex
))
-
1
)
*
Number
(
this
.
trim
(
params
.
pageSize
));
...
...
@@ -245,10 +309,10 @@ class InvoiceService extends ServiceBase {
}
else
{
item
.
red_status
=
''
;
}
this
.
dao
.
getRowCodeName
(
item
.
apply
,
"status"
);
this
.
dao
.
getRowCodeName
(
item
.
apply
,
"status"
);
item
.
complate_tax
=
item
.
complate_tax
==
1
?
'已完税'
:
'未完税'
;
item
.
month
=
moment
(
item
.
invoice_time
).
month
()
+
1
;
this
.
handleDate
(
item
,
[
'invoice_time'
],
null
,
-
8
);
this
.
handleDate
(
item
,
[
'invoice_time'
],
null
,
-
8
);
if
(
item
.
apply
[
'type'
]
==
'10'
)
{
item
.
apply
[
'type'
]
=
"普通发票"
;
}
else
if
(
item
.
apply
[
'type'
]
==
'20'
)
{
...
...
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