Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
7f32c86d5a6410e5a9bdb4780ccf294d1d6d8046
1 parent
1de4e066
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
apps/home/controllers/invoice.js
apps/home/models/invoice.js
apps/home/controllers/invoice.js
View file @
7f32c86
...
...
@@ -22,7 +22,16 @@ const detail = (req, res, next) => {
};
const
supply
=
(
req
,
res
,
next
)
=>
{
return
req
.
ctx
(
invoiceModel
).
submitInvoiceSupply
(
req
.
body
,
req
.
user
.
uid
).
then
(
result
=>
{
let
params
=
req
.
body
;
// 5.8.1 发票优化需求
// 只接受电子发票(1 纸质 2 电子),发票内容为明细(id 12:明细)
Object
.
assign
(
params
,
{
invoicesType
:
2
,
contentId
:
12
});
return
req
.
ctx
(
invoiceModel
).
submitInvoiceSupply
(
params
,
req
.
user
.
uid
).
then
(
result
=>
{
res
.
send
(
result
);
}).
catch
(
next
);
};
...
...
apps/home/models/invoice.js
View file @
7f32c86
...
...
@@ -31,8 +31,8 @@ module.exports = class extends global.yoho.BaseModel {
let
param
=
{
order_code
:
info
.
orderCode
,
invoices_type
:
info
.
invoicesType
,
invoices_title
:
info
.
invoicesTitle
,
invoice_content
:
info
.
invoicesContent
,
invoices_title
:
info
.
titleName
,
invoice_content
:
info
.
contentId
,
receiverMobile
:
info
.
receiver
,
buyerTaxNumber
:
info
.
taxNumber
,
invoice_payable_type
:
info
.
taxNumber
?
2
:
1
...
...
Please
register
or
login
to post a comment