Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
郭成尧
8 years ago
Commit
b30cd8c47268df49441c48ad556265ef19d288a2
2 parents
e7997d42
f3895e2a
Merge branch 'featrue/invoice' into release/6.0.2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
apps/cart/controllers/seckill.js
public/js/cart/seckill/order-ensure.js
apps/cart/controllers/seckill.js
View file @
b30cd8c
...
...
@@ -210,14 +210,24 @@ exports.submit = (req, res, next) => {
};
if
(
req
.
body
.
invoice
===
'true'
)
{
let
invoicesTitlePersonal
=
req
.
body
.
invoices_title_personal
?
req
.
body
.
invoices_title_personal
:
'个人'
;
let
invoicePayableType
=
_
.
parseInt
(
req
.
body
.
invoice_payable_type
);
_
.
assign
(
options
,
{
invoices_title
:
req
.
body
.
invoices_title
||
'个人'
,
invoices_type
:
2
,
invoices_type_id
:
12
,
invoice_payable_type
:
req
.
body
.
invoice_payable_type
||
1
,
invoice_payable_type
:
invoicePayableType
,
receiverMobile
:
req
.
body
.
receiverMobile
||
''
,
buyerTaxNumber
:
req
.
body
.
buyerTaxNumber
||
''
});
if
(
invoicePayableType
===
1
)
{
// 开个人发票
options
.
invoices_title
=
invoicesTitlePersonal
;
}
else
{
// 开公司发票
options
.
invoices_title
=
req
.
body
.
invoices_title
;
options
.
buyerTaxNumber
=
req
.
body
.
buyerTaxNumber
;
}
}
return
seckillModel
.
submit
(
options
)
...
...
public/js/cart/seckill/order-ensure.js
View file @
b30cd8c
...
...
@@ -231,9 +231,16 @@ function submitOrder() {
invoice
:
orderInfo
(
'invoice'
),
invoices_title
:
orderInfo
(
'invoices_title'
),
// 发票抬头
invoices_type
:
orderInfo
(
'invoices_type'
),
// 发票类型 1 纸质 2 电子
invoice_payable_type
:
orderInfo
(
'invoice_payable_type'
),
// 发票抬头类型 1:个人,2:企业
receiverMobile
:
orderInfo
(
'receiverMobile'
),
// 接收人电话
buyerTaxNumber
:
orderInfo
(
'buyerTaxNumber'
)
// 购买方纳税人识别号,需要开具
});
if
(
orderInfo
(
'invoices_title_personal'
))
{
Object
.
assign
(
postData
,
{
invoices_title_personal
:
orderInfo
(
'invoices_title_personal'
)
});
}
}
$
.
ajax
({
...
...
Please
register
or
login
to post a comment