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
a13d2dae
Commit
a13d2dae
authored
Apr 12, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
ae5e8fff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
9 deletions
+28
-9
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
+12
-8
xgg-saas-platform/app/base/service/impl/invoice/invoiceSve.js
+10
-0
xgg-saas-platform/app/base/service/impl/trade/tradeSve.js
+5
-0
xgg-saas-platform/app/base/system.js
+1
-1
No files found.
xgg-saas-platform/app/base/controller/impl/saas/invoiceCtl.js
View file @
a13d2dae
...
...
@@ -6,21 +6,25 @@ class InvoiceCtl extends CtlBase {
constructor
()
{
super
();
this
.
invoiceSve
=
system
.
getObject
(
"service.invoice.invoiceSve"
);
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
}
// 审核
async
audit
(
params
,
pobj2
,
req
)
{
try
{
let
id
=
this
.
trim
(
params
.
id
);
if
(
!
id
)
{
params
.
id
=
this
.
trim
(
params
.
id
);
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
"发票申请不存在"
);
}
let
status
=
params
.
status
||
0
;
let
remark
=
this
.
trim
(
params
.
remark
);
if
(
!
remark
)
{
params
.
remark
=
this
.
trim
(
params
.
remark
);
if
(
!
params
.
remark
)
{
return
system
.
getResult
(
null
,
"请填写审核备注"
);
}
return
system
.
getResultSuccess
();
let
rs
=
await
this
.
invoiceSve
.
audit
(
params
)
if
(
rs
.
status
===
0
&&
!
params
.
status
)
{
await
this
.
tradeSve
.
cancelInvoice
({
saas_invoice_id
:
params
.
id
});
}
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
...
...
@@ -35,8 +39,8 @@ class InvoiceCtl extends CtlBase {
validation
.
check
(
params
,
'invoice_time'
,
{
name
:
"开票时间"
,
is_require
:
true
});
validation
.
check
(
params
,
'mail_no'
,
{
name
:
"快递单号"
,
is_require
:
true
});
validation
.
check
(
params
,
'invoice_img'
,
{
name
:
"发票图片"
,
is_require
:
true
});
return
system
.
getResultSuccess
(
params
)
;
let
rs
=
await
this
.
invoiceSve
.
makeout
(
params
);
return
rs
;
}
catch
(
error
)
{
let
msg
=
error
.
message
;
if
(
msg
.
startsWith
(
"bpo-validation-error:"
))
{
...
...
xgg-saas-platform/app/base/service/impl/invoice/invoiceSve.js
View file @
a13d2dae
...
...
@@ -54,6 +54,16 @@ class InvoiceService extends ServiceBase {
return
rs
;
}
async
audit
(
params
)
{
var
rs
=
await
this
.
callms
(
"invoice"
,
"invoiceapplyAudit"
,
params
);
return
rs
;
}
async
makeout
(
params
)
{
var
rs
=
await
this
.
callms
(
"invoice"
,
"invoiceapplyMakeOut"
,
params
);
return
rs
;
}
transOrderField
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
...
...
xgg-saas-platform/app/base/service/impl/trade/tradeSve.js
View file @
a13d2dae
...
...
@@ -87,6 +87,11 @@ class TradeService extends ServiceBase {
return
rs
;
}
async
cancelInvoice
(
params
)
{
let
rs
=
await
this
.
callms
(
"trade"
,
"cancelItemInvoice"
,
params
);
return
rs
;
}
transFields
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
...
...
xgg-saas-platform/app/base/system.js
View file @
a13d2dae
...
...
@@ -194,7 +194,7 @@ class System {
common
:
dev
+
":3102"
+
path
,
// 商户服务
merchant
:
local
+
":3101"
+
path
,
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
order
:
dev
+
":3103"
+
path
,
...
...
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