Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张丽霞
9 years ago
Commit
f08ceb4b498dc88bf44fffa96f0a9e16c5cfd3b9
1 parent
4c0dd840
电子发票bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
template/www.yohobuy.com/actions/cart/index/order-ensure.phtml
web-static/js/order/ensure.js
template/www.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
f08ceb4
...
...
@@ -288,7 +288,7 @@
<div class="invoice-type mes">电子发票</div>
<div class="invoice-partment mes">个人</div>
<div class="invoice-kind mes">服装</div>
<div class="revise mes">修改</div>
<div class="revise mes
curser-button
">修改</div>
</div>
<div class='invoice-upload hide'>
<div class="invoice-upload-type"></div>
...
...
web-static/js/order/ensure.js
View file @
f08ceb4
...
...
@@ -917,7 +917,7 @@ function saveReceiptInfo() {
if
(
finalReceiptMobile
===
receiptMobileStar
)
{
finalReceiptMobile
=
receiptMobile
;
}
else
{
verifymobile
=
/
[
0-9
]{11
}
/
;
verifymobile
=
/
[
1
][
34578
][
0-9
]{9
}
/
;
if
(
!
verifymobile
.
test
(
finalReceiptMobile
))
{
$
(
'.invoice-phone .enpty-input'
).
removeClass
(
'hide'
);
if
(
finalReceiptMobile
.
length
===
0
)
{
...
...
@@ -954,6 +954,44 @@ function saveReceiptInfo() {
$receiptInfo
.
addClass
(
'hide'
);
$
(
'.invoice-content-outter'
).
removeClass
(
'hide'
);
}
function
rejustReceiptInfo
()
{
var
inviceType
=
$
(
'.invoice-type'
).
html
(),
invoicePartment
=
$
(
'.invoice-partment'
).
html
(),
invoiceKind
=
$
(
'.invoice-kind'
).
html
(),
invoiceMobile
,
invoiceMobileStar
;
if
(
inviceType
===
"电子发票"
)
{
$eReceiptBtn
.
trigger
(
"click"
);
}
else
{
$paperReceiptBtn
.
trigger
(
"click"
);
}
if
(
invoicePartment
===
"个人"
)
{
$
(
"input[name='title']"
).
eq
(
0
).
attr
(
"checked"
,
"checked"
);
$
(
'.invoice-title'
).
addClass
(
'invoice-title-personal-hight'
);
$
(
'.invoice-title .input-line'
).
addClass
(
'hide'
);
}
else
{
$
(
"input[name='title']"
).
eq
(
1
).
attr
(
"checked"
,
"checked"
);
$
(
'.invoice-title'
).
removeClass
(
'invoice-title-personal-hight'
);
$
(
'.invoice-title .input-line'
).
removeClass
(
'hide'
);
$
(
'#input-organization-name'
).
val
(
invoicePartment
);
}
$
(
"input[name='content']"
).
each
(
function
(){
if
(
$
(
this
).
attr
(
'value'
)
===
invoiceKind
)
{
$
(
this
).
attr
(
"checked"
,
"checked"
);
};
})
invoiceMobile
=
$
(
'.invoice-upload-mobile'
).
html
()
invoiceMobileStar
=
invoiceMobile
.
substr
(
0
,
3
)
+
'****'
+
invoiceMobile
.
substr
(
7
);
if
(
$
(
'#input-mobile'
).
val
()
!==
invoiceMobileStar
)
{
$
(
'#input-mobile'
).
val
(
invoiceMobileStar
);
};
}
$receiptInfoSaveBtn
.
click
(
function
(){
saveReceiptInfo
();
});
...
...
@@ -971,6 +1009,7 @@ $receiptInfoCancelBtn.click(function(){
$
(
'.revise'
).
click
(
function
(){
$receiptInfo
.
removeClass
(
'hide'
);
rejustReceiptInfo
();
});
$eReceiptBtn
.
click
(
function
(){
...
...
Please
register
or
login
to post a comment