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
e76bfcb3
Commit
e76bfcb3
authored
May 08, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
b4662757
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletions
+60
-1
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
+19
-0
xgg-saas-platform/app/base/service/impl/saas/saasinvoiceSve.js
+41
-1
No files found.
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
View file @
e76bfcb3
...
@@ -426,6 +426,25 @@ class InvoiceCtl extends CtlBase {
...
@@ -426,6 +426,25 @@ class InvoiceCtl extends CtlBase {
}
}
}
}
/**
* 发票账单列表
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async
invoiceOrder
(
params
,
pobj2
,
req
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`发票ID 不能为空`
);
}
try
{
return
await
this
.
saasinvoiceSve
.
invoiceOrder
(
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
module
.
exports
=
InvoiceCtl
;
module
.
exports
=
InvoiceCtl
;
xgg-saas-platform/app/base/service/impl/saas/saasinvoiceSve.js
View file @
e76bfcb3
...
@@ -6,7 +6,8 @@ class SaasinvoiceService extends ServiceBase {
...
@@ -6,7 +6,8 @@ class SaasinvoiceService extends ServiceBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
DEFAULT_BUSINESSMEN_TYPE
=
"10"
;
//默认的 销售方类型 个体工商户
this
.
DEFAULT_BUSINESSMEN_TYPE
=
"10"
;
//默认的 销售方类型 个体工商户
this
.
DEFAULT_CHANNEL_ID
=
"2"
;
//默认的 渠道类型
this
.
DEFAULT_CHANNEL_ID
=
"2"
;
//默认的 渠道类型
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
}
}
async
platforminvoicePage
(
params
)
{
async
platforminvoicePage
(
params
)
{
...
@@ -168,6 +169,7 @@ class SaasinvoiceService extends ServiceBase {
...
@@ -168,6 +169,7 @@ class SaasinvoiceService extends ServiceBase {
if
(
invoiceOrderRes
.
status
==
0
)
{
if
(
invoiceOrderRes
.
status
==
0
)
{
invoiceOrderRes
=
invoiceOrderRes
.
data
.
rows
||
[];
invoiceOrderRes
=
invoiceOrderRes
.
data
.
rows
||
[];
}
}
saasInvoice
.
service_tax
=
system
.
f2y
(
saasInvoice
.
service_tax
);
saasInvoice
.
invoiceOrder
=
invoiceOrderRes
;
saasInvoice
.
invoiceOrder
=
invoiceOrderRes
;
return
system
.
getResult
(
saasInvoice
);
return
system
.
getResult
(
saasInvoice
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -206,5 +208,42 @@ class SaasinvoiceService extends ServiceBase {
...
@@ -206,5 +208,42 @@ class SaasinvoiceService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
/**
* 发票详情
* @param {*} params
*/
async
invoiceOrder
(
params
)
{
try
{
let
saasInvoiceApply
=
await
this
.
callms
(
"invoice"
,
"saasInvoiceInfo"
,
params
);
if
(
saasInvoiceApply
.
status
!=
0
||
!
saasInvoiceApply
.
data
)
{
return
system
.
getResult
(
null
,
`系统错误`
);
}
saasInvoiceApply
=
saasInvoiceApply
.
data
;
let
tradOrder
=
[];
if
(
saasInvoiceApply
.
fee_type
==
"00"
)
{
//个体户注册订单
let
invoiceOrderRes
=
await
this
.
callms
(
"order"
,
"saasOrderPage"
,
{
saas_invoice_id
:
this
.
trim
(
params
.
id
)
,
currentPage
:
1
,
pageSize
:
99999
});
if
(
invoiceOrderRes
.
status
==
0
)
{
tradOrder
=
invoiceOrderRes
.
data
.
rows
||
[];
}
}
else
{
//查询流水
let
tradOrderRes
=
await
this
.
tradeSve
.
invoiceTrade
({
id
:
saasInvoiceApply
.
id
,
order_type
:
saasInvoiceApply
.
fee_type
});
if
(
tradOrderRes
.
status
==
0
)
{
tradOrder
=
tradOrderRes
.
data
;
};
saasInvoiceApply
.
service_tax
=
system
.
f2y
(
saasInvoiceApply
.
service_tax
);
}
saasInvoiceApply
.
tradOrder
=
tradOrder
;
return
system
.
getResult
(
saasInvoiceApply
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
module
.
exports
=
SaasinvoiceService
;
module
.
exports
=
SaasinvoiceService
;
\ 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