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
c395fb97
Commit
c395fb97
authored
Apr 21, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
35cdcea9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
20 deletions
+25
-20
xgg-saas-merchant/app/base/controller/impl/saas/invoice2Ctl.js
+0
-0
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
+25
-20
No files found.
xgg-saas-merchant/app/base/controller/impl/saas/invoice2Ctl.js
deleted
100644 → 0
View file @
35cdcea9
This diff is collapsed.
Click to expand it.
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
View file @
c395fb97
...
...
@@ -24,6 +24,7 @@ class InvoiceCtl extends CtlBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 交易信息列表页
async
tradePage
(
params
,
pobj2
,
req
)
{
try
{
...
...
@@ -36,13 +37,14 @@ class InvoiceCtl extends CtlBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 交易列表
async
platformPage
(
params
,
pobj2
,
req
)
{
try
{
if
([
"00"
,
"10"
,
"20"
].
indexOf
(
params
.
fee_type
)
==
-
1
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[],
fee_type
:
params
.
fee_type
});
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[],
fee_type
:
params
.
fee_type
});
}
if
(
params
.
fee_type
==
"00"
)
{
if
(
params
.
fee_type
==
"00"
)
{
return
this
.
orderPage
(
params
,
pobj2
,
req
);
}
else
{
return
this
.
tradePage
(
params
,
pobj2
,
req
);
...
...
@@ -67,14 +69,14 @@ class InvoiceCtl extends CtlBase {
try
{
let
fee_type
=
this
.
trim
(
params
.
fee_type
);
if
(
fee_type
==
"00"
)
{
return
await
this
.
apply00
(
params
,
pobj2
,
req
);
}
else
if
(
fee_type
==
"10"
)
{
return
await
this
.
apply10
(
params
,
pobj2
,
req
);
}
else
if
(
fee_type
==
"20"
)
{
return
await
this
.
apply20
(
params
,
pobj2
,
req
);
}
else
{
return
system
.
getResult
(
null
,
"费用类型错误"
);
}
return
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
let
msg
=
error
.
message
;
if
(
msg
.
startsWith
(
"bpo-validation-error:"
))
{
...
...
@@ -178,19 +180,19 @@ class InvoiceCtl extends CtlBase {
/**
* 发票账单列表
* @param {*} params
* @param {*} pobj2
* @param {*} req
* @param {*} params
* @param {*} pobj2
* @param {*} req
*/
async
invoiceOrder
(
params
,
pobj2
,
req
){
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`发票ID 不能为空`
);
async
invoiceOrder
(
params
,
pobj2
,
req
)
{
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`发票ID 不能为空`
);
}
try
{
return
await
this
.
invoiceSve
.
invoiceOrder
(
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
...
...
@@ -206,20 +208,23 @@ class InvoiceCtl extends CtlBase {
return
await
this
.
invoiceSve
.
invoiceOrder
(
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
async
buildTradeInvoice
(
params
)
{
let
invoiceId
=
params
.
id
;
validation
.
check
(
params
,
'data_ids'
,
{
name
:
"交易信息"
,
arr_require
:
true
})
;
let
invoice_type
=
params
.
invoice_type
;
// 查交易
let
items
=
await
this
.
tradeSve
.
itemByInvoiceId
({
saas_invoice_id
:
invoiceId
});
let
items
=
await
this
.
tradeSve
.
byIds
({
ids
:
params
.
data_ids
,
saas_merchant_id
:
params
.
saas_merchant_id
,
trade_statuses
:
[
'00'
],
unInvoice
:
true
,
})
||
[];
items
=
items
.
data
;
if
(
!
items
||
items
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"
该发票缺少交易信息,请联系平台查看原因
"
);
return
system
.
getResult
(
null
,
"
注册订单信息有误,请刷新重新选择
"
);
}
let
bmMap
=
{};
let
creditCodes
=
[];
...
...
@@ -282,8 +287,8 @@ class InvoiceCtl extends CtlBase {
url
:
url
,
data
:
calcParams
});
if
(
!
res
||
!
res
.
data
||
res
.
data
.
status
!=
0
||
res
.
data
.
data
.
length
==
0
)
{
return
system
.
getResult
(
null
,
`试算错误`
);
if
(
!
res
||
!
res
.
data
||
res
.
data
.
status
!=
0
||
res
.
data
.
data
.
length
==
0
)
{
return
system
.
getResult
(
null
,
`试算错误`
);
}
let
calcList
=
res
.
data
.
data
;
...
...
@@ -324,7 +329,7 @@ class InvoiceCtl extends CtlBase {
});
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
...
...
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