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
836e0b7e
Commit
836e0b7e
authored
Apr 29, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
5074a427
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
7 deletions
+78
-7
xgg-deliver/app/base/controller/impl/invoice/invoiceCtl.js
+71
-1
xgg-deliver/app/base/service/impl/invoice/invoiceSve.js
+5
-4
xgg-deliver/app/base/system.js
+2
-2
No files found.
xgg-deliver/app/base/controller/impl/invoice/invoiceCtl.js
View file @
836e0b7e
...
@@ -79,13 +79,15 @@ class InvoiceCtl extends CtlBase {
...
@@ -79,13 +79,15 @@ class InvoiceCtl extends CtlBase {
* @param {*} pobj
* @param {*} pobj
*/
*/
async
invoiceApply
(
pobj
,
pobj2
,
req
)
{
async
invoiceApply
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
deliver_id
){
return
system
.
getResult
(
null
,
`请重新登录`
);
}
try
{
try
{
pobj
.
invoice_amount
=
system
.
y2f
(
pobj
.
invoice_amount
);
pobj
.
invoice_amount
=
system
.
y2f
(
pobj
.
invoice_amount
);
pobj
.
additional_tax
=
system
.
y2f
(
pobj
.
additional_tax
);
pobj
.
additional_tax
=
system
.
y2f
(
pobj
.
additional_tax
);
pobj
.
value_added_tax
=
system
.
y2f
(
pobj
.
value_added_tax
);
pobj
.
value_added_tax
=
system
.
y2f
(
pobj
.
value_added_tax
);
pobj
.
personal_invoice_tax
=
system
.
y2f
(
pobj
.
personal_invoice_tax
);
pobj
.
personal_invoice_tax
=
system
.
y2f
(
pobj
.
personal_invoice_tax
);
pobj
.
invoice_content
=
system
.
y2f
(
pobj
.
invoice_content
);
pobj
.
invoice_content
=
system
.
y2f
(
pobj
.
invoice_content
);
return
await
this
.
invoiceSve
.
invoiceApply
(
pobj
);
return
await
this
.
invoiceSve
.
invoiceApply
(
pobj
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
...
@@ -93,5 +95,72 @@ class InvoiceCtl extends CtlBase {
...
@@ -93,5 +95,72 @@ class InvoiceCtl extends CtlBase {
}
}
}
}
/************************一下是阿里接口*************************************/
/**
*发票开具
* @returns {Promise<void>}
*/
async
deliveryAcceptance
(
pobj
,
pobj2
,
req
){
try
{
return
await
this
.
invoiceSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResultFail
(
500
,
`接口错误 错误信息
${
error
}
`
);
}
}
/**
* 客户交付
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
deliveryCustomer
(
pobj
,
pobj2
,
req
){
if
(
!
pobj
.
invoice_id
){
return
system
.
getResult
(
null
,
`参数错误 发票ID 不能为空`
);
}
if
(
!
pobj
.
deliver_mail_no
){
return
system
.
getResult
(
null
,
`参数错误 快递单不能为空`
);
}
try
{
return
await
this
.
invoiceSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResultFail
(
500
,
`接口错误 错误信息
${
error
}
`
);
}
}
/**
* 分配业务员
* @param pobj
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
deliverAssignSalesman
(
pobj
,
pobj2
,
req
)
{
if
(
!
pobj
.
invoice_id
)
{
return
system
.
getResult
(
null
,
`参数错误 发票ID不能为空`
);
}
if
(
!
pobj
.
status
)
{
return
system
.
getResult
(
null
,
`参数错误 订单状态不能为空`
);
}
if
(
!
pobj
.
operator_id
)
{
return
system
.
getResult
(
null
,
`参数错误 业务员ID不能为空`
);
}
let
user
=
await
this
.
deliverSve
.
deliverUserById
({
id
:
pobj
.
operator_id
});
if
(
!
user
||
user
.
status
!=
0
||
!
user
.
data
)
{
return
system
.
getResult
(
null
,
`业务员【
${
pobj
.
operator_id
}
】不存在`
);
}
pobj
.
operator_path
=
user
.
data
.
org_path
;
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
module
.
exports
=
InvoiceCtl
;
module
.
exports
=
InvoiceCtl
;
\ No newline at end of file
xgg-deliver/app/base/service/impl/invoice/invoiceSve.js
View file @
836e0b7e
...
@@ -37,9 +37,9 @@ class InvoiceService extends ServiceBase {
...
@@ -37,9 +37,9 @@ class InvoiceService extends ServiceBase {
return
rs
;
return
rs
;
}
}
async
invoiceApply
(
params
)
{
//
async invoiceApply(params) {
var
rs
=
await
this
.
callms
(
"invoice"
,
"invoiceApply"
,
params
);
//
var rs = await this.callms("invoice", "invoiceApply", params);
return
rs
;
//
return rs;
}
//
}
}
}
module
.
exports
=
InvoiceService
;
module
.
exports
=
InvoiceService
;
\ No newline at end of file
xgg-deliver/app/base/system.js
View file @
836e0b7e
...
@@ -197,8 +197,8 @@ class System {
...
@@ -197,8 +197,8 @@ class System {
order
:
domain
+
":3103"
+
path
,
order
:
domain
+
":3103"
+
path
,
// 发票服务
// 发票服务
invoice
:
domain2
+
":3105"
+
path
,
//
invoice: domain2 + ":3105" + path,
//
invoice: "http://127.0.0.1:3105" + path,
invoice
:
"http://127.0.0.1:3105"
+
path
,
// 发票服务
// 发票服务
uc
:
domain2
+
":3106"
+
path
,
uc
:
domain2
+
":3106"
+
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