Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
郝肖肖
8 years ago
Commit
ea9ff11df3ad3eeecd69a6d5901ef993f4ddce4b
2 parents
d79c6e3d
e4a8d3e7
Merge branch 'feature/balancePage' into release/2.0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
apps/shopping/views/action/order.hbs
public/js/shopping/order/invoice.js
apps/shopping/views/action/order.hbs
View file @
ea9ff11
...
...
@@ -264,7 +264,7 @@
<input value="
{{
invoice_mobile
}}
" class='input invoice-mobile' type="
text
" maxlength="
11
" placeholder="
请填写收票人手机
">
<span class="
input
-
tip
invoice
-
mobile
-
tip
blue
hide
">
<span class="
iconfont
"
>&
#
xe60c
;
<
/span
>
请输入正确的手机号
<
em
>
手机号码不正确
<
/em
>
<
/span
>
<
/div
>
<
/div
>
...
...
public/js/shopping/order/invoice.js
View file @
ea9ff11
...
...
@@ -22,16 +22,23 @@ function validateInvoice($el) {
var
name
=
$
.
trim
(
$el
.
find
(
'.invoice-title-input'
).
val
());
var
mobile
=
$
.
trim
(
$invoiceMobile
.
val
());
//隐藏所有错误提示
$el
.
find
(
'.input-tip'
).
addClass
(
'hide'
);
// 发票抬头为单位
if
(
$el
.
invoiceTitleType
===
2
&&
name
===
''
)
{
pass
=
false
;
$el
.
find
(
'.invoice-title-tip'
).
removeClass
(
'hide'
);
}
if
(
$el
.
invoiceType
===
2
&&
$
(
'#address-list li.address.focus'
).
data
(
'mobile'
)
!==
mobile
)
{
if
(
!
/
[
1
][
34578
][
0-9
]{9}
/
.
test
(
mobile
))
{
if
(
$el
.
invoiceType
===
2
&&
(
mobile
===
''
||
$
(
'#address-list li.address.focus'
).
data
(
'mobile'
)
!==
mobile
))
{
if
(
mobile
===
''
)
{
pass
=
false
;
$el
.
find
(
'.invoice-mobile-tip'
).
removeClass
(
'hide'
).
find
(
'em'
).
html
(
'请填写手机号码'
);
}
else
if
(
!
/
[
1
][
34578
][
0-9
]{9}
/
.
test
(
mobile
))
{
pass
=
false
;
$el
.
find
(
'.invoice-mobile-tip'
).
removeClass
(
'hide'
);
$el
.
find
(
'.invoice-mobile-tip'
).
removeClass
(
'hide'
)
.
find
(
'em'
).
html
(
'手机号码不正确'
)
;
}
}
...
...
@@ -152,7 +159,9 @@ function showInvoiceDialog() {
}
// 设置默认收货地址手机号
$invoiceMobile
.
val
(
mobile
.
toString
().
substr
(
0
,
3
)
+
'****'
+
mobile
.
toString
().
substr
(
7
));
if
(
mobile
)
{
$invoiceMobile
.
val
(
mobile
.
toString
().
substr
(
0
,
3
)
+
'****'
+
mobile
.
toString
().
substr
(
7
));
}
// 设置radio选中
$
(
'[data-value='
+
invoiceTitleType
+
'].invoice-title-radio'
).
find
(
'.radio'
).
addClass
(
'checked'
);
...
...
Please
register
or
login
to post a comment