Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
registration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
13
Issues
13
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
丁伟
registration
Commits
7768c160
Commit
7768c160
authored
3 years ago
by
丁伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、增加纳税人识别号验证功能
parent
92986381
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
3 deletions
+57
-3
src/main/java/org/ccpit/base/utils/MailSender.java
+3
-3
src/main/java/org/ccpit/business/registerManage/IndexController.java
+0
-0
src/main/webapp/WEB-INF/jsp/front/info.jsp
+1
-0
src/main/webapp/WEB-INF/jsp/front/reg.jsp
+1
-0
src/main/webapp/resource/front/js/checkSocialCreditCode.js
+39
-0
src/main/webapp/resource/front/js/info.js
+7
-0
src/main/webapp/resource/front/js/reg.js
+6
-0
No files found.
src/main/java/org/ccpit/base/utils/MailSender.java
View file @
7768c160
...
...
@@ -21,9 +21,9 @@ import java.util.Properties;
* @version 1.0
*/
public
class
MailSender
{
p
rivate
static
String
USERNAME
;
p
rivate
static
String
PASSWORD
;
p
rivate
static
String
SMTP
;
p
ublic
static
String
USERNAME
;
p
ublic
static
String
PASSWORD
;
p
ublic
static
String
SMTP
;
private
static
final
Logger
logger
=
Logger
.
getLogger
(
MailSender
.
class
);
static
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/ccpit/business/registerManage/IndexController.java
View file @
7768c160
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/jsp/front/info.jsp
View file @
7768c160
...
...
@@ -527,5 +527,6 @@
<
%
--
<
script
src=
"/resource/front/js/jquery.min.js"
type=
"text/javascript"
></script>
--%>
<script
src=
"/resource/front/js/jquery.form.min.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/jquery-ui-datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/checkSocialCreditCode.js"
type=
"text/javascript"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/jsp/front/reg.jsp
View file @
7768c160
...
...
@@ -301,6 +301,7 @@
<script
src=
"/resource/front/js/jquery.form.min.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/jquery-ui-datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/reg.js"
type=
"text/javascript"
></script>
<script
src=
"/resource/front/js/checkSocialCreditCode.js"
type=
"text/javascript"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
src/main/webapp/resource/front/js/checkSocialCreditCode.js
0 → 100644
View file @
7768c160
//验证信用代码
function
checkSocialCreditCode
(
Code
)
{
var
patrn
=
/^
[^
_IOZSVa-z
\W]{2}\d{6}[^
_IOZSVa-z
\W]{10}
$/g
;
//18位校验及大写校验
if
((
Code
.
length
!=
18
)
||
(
patrn
.
test
(
Code
)
==
false
))
{
// return '不是有效的统一社会信用编码';
// /*console.info("不是有效的统一社会信用编码!");
return
false
;
}
else
{
var
Ancode
;
//统一社会信用代码的每一个值
var
Ancodevalue
;
//统一社会信用代码每一个值的权重
var
total
=
0
;
var
weightedfactors
=
[
1
,
3
,
9
,
27
,
19
,
26
,
16
,
17
,
20
,
29
,
25
,
13
,
8
,
24
,
10
,
30
,
28
];
//加权因子
var
str
=
'0123456789ABCDEFGHJKLMNPQRTUWXY'
;
//不用I、O、S、V、Z
for
(
var
i
=
0
;
i
<
Code
.
length
-
1
;
i
++
)
{
Ancode
=
Code
.
substring
(
i
,
i
+
1
);
Ancodevalue
=
str
.
indexOf
(
Ancode
);
total
=
total
+
Ancodevalue
*
weightedfactors
[
i
];
//权重与加权因子相乘之和
}
var
logiccheckcode
=
31
-
total
%
31
;
if
(
logiccheckcode
==
31
)
{
logiccheckcode
=
0
;
}
var
Str
=
"0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y"
;
var
Array_Str
=
Str
.
split
(
','
);
logiccheckcode
=
Array_Str
[
logiccheckcode
];
var
checkcode
=
Code
.
substring
(
17
,
18
);
if
(
logiccheckcode
!=
checkcode
)
{
return
false
;
}
else
{
return
true
;
}
return
true
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/webapp/resource/front/js/info.js
View file @
7768c160
...
...
@@ -202,6 +202,13 @@ function checkRequired() {
success
=
false
;
}
});
// $("[name=taxpayerNum]").on("blur",function (){
// var code = $(this).val();
// if(!checkSocialCreditCode(code)){
// showWarning($(this),"不是有效的纳税人识别号!");
// success = false;
// }
// });
return
success
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/resource/front/js/reg.js
View file @
7768c160
...
...
@@ -118,6 +118,12 @@ var REG = function(){
$
(
"[name=password]"
).
blur
();
}
});
$
(
"[name=taxpayerNum]"
).
on
(
"blur"
,
function
(){
var
code
=
$
(
this
).
val
();
if
(
!
checkSocialCreditCode
(
code
)){
showWarning
(
$
(
this
),
"不是有效的纳税人识别号!"
);
}
});
}
return
{
init
:
function
(){
...
...
This diff is collapsed.
Click to expand it.
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