Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
435cacb8
Commit
435cacb8
authored
Apr 19, 2024
by
邓乾隆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
证件号校验添加
parent
0bdf49ea
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
1 deletion
+73
-1
server_layout_common.lwm
...in/webapp/WEB-INF/classes/layout/server_layout_common.lwm
+2
-1
bp_agent_create.lview
src/main/webapp/modules/hls/HLS303/bp_agent_create.lview
+22
-0
bp_agent_modify.lview
src/main/webapp/modules/hls/HLS303/bp_agent_modify.lview
+22
-0
input_validator.js
...webapp/modules/prj/PRJ500N/javascripts/input_validator.js
+27
-0
No files found.
src/main/webapp/WEB-INF/classes/layout/server_layout_common.lwm
View file @
435cacb8
...
...
@@ -200,7 +200,8 @@
|| field_name.toUpperCase()=='INVOICE_TITLE' || field_name.toUpperCase()=='INVOICE_BP_ADDRESS'
|| field_name.toUpperCase()=='INVOICE_BP_PHONE_NUM' || field_name.toUpperCase()=='INVOICE_BP_BANK'
|| field_name.toUpperCase()=='INVOICE_BP_BANK_ACCOUNT' || field_name.toUpperCase()=='TAX_REGISTRY_NUM'
|| field_name.toUpperCase()=='REF_V07' || field_name.toUpperCase()=='RECEPTION_MAILE'){
|| field_name.toUpperCase()=='REF_V07' || field_name.toUpperCase()=='RECEPTION_MAILE'
|| field_name.toUpperCase()=='ID_CARD_NO_AG'){
f.setInsertExpression('hlc_remove_space(${@'+field_name+'})');
f.setUpdateExpression('hlc_remove_space(${@'+field_name+'})');
}
...
...
src/main/webapp/modules/hls/HLS303/bp_agent_create.lview
View file @
435cacb8
...
...
@@ -218,6 +218,28 @@
record.set('full_elec_invoice_flag','Y');
record.set('full_elec_invoice_flag_n','是');
}
}
//法人身份证号校验
if (name == 'id_card_no_leg' && value){
var id_card_no_leg = record.get('id_card_no_leg');
if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}', '法人代表身份证号格式错误!');
setTimeout(function () {
record.set('id_card_no_leg', '');
}, 20);
return false;
}
}
//经办人身份证校验
if (name == 'id_card_no_ag' && value){
var id_card_no_leg = record.get('id_card_no_ag');
if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}', '经办人身份证号格式错误!');
setTimeout(function () {
record.set('id_card_no_leg', '');
}, 20);
return false;
}
}
}
}
...
...
src/main/webapp/modules/hls/HLS303/bp_agent_modify.lview
View file @
435cacb8
...
...
@@ -155,6 +155,28 @@
record.set('full_elec_invoice_flag','Y');
record.set('full_elec_invoice_flag_n','是');
}
}
//法人身份证号校验
if (name == 'id_card_no_leg'
&&
value){
var id_card_no_leg = record.get('id_card_no_leg');
if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}', '法人代表身份证号格式错误!');
setTimeout(function () {
record.set('id_card_no_leg', '');
}, 20);
return false;
}
}
//经办人身份证校验
if (name == 'id_card_no_ag'
&&
value){
var id_card_no_leg = record.get('id_card_no_ag');
if (!checkCard(id_card_no_leg)) {
Leaf.showMessage('${l:HLS.PROMPT}', '经办人身份证号格式错误!');
setTimeout(function () {
record.set('id_card_no_leg', '');
}, 20);
return false;
}
}
}
...
...
src/main/webapp/modules/prj/PRJ500N/javascripts/input_validator.js
View file @
435cacb8
...
...
@@ -43,6 +43,11 @@ checkCard = function(card) {
//去除空格
card
=
card
.
trim
();
card
=
card
.
replace
(
/
[\t\r\f\n\s]
*/g
,
""
);
//长度必须满18位
if
(
card
.
length
!=
18
){
return
false
;
}
if
(
isCardNo
(
card
)
===
false
)
{
return
false
;
}
...
...
@@ -235,3 +240,25 @@ function checkPostCode(str) {
}
}
//中征码校验
function
checkDKK
(
financecode
)
{
let
weightValue
=
[
1
,
3
,
5
,
7
,
11
,
2
,
13
,
1
,
1
,
17
,
19
,
97
,
23
,
29
];
let
checkValue
=
new
Array
(
14
).
fill
(
0
);
let
totalValue
=
0
;
let
c
=
0
;
for
(
let
j
=
0
;
j
<
14
;
j
++
)
{
if
(
financecode
[
j
]
>=
65
&&
financecode
[
j
]
<=
90
)
{
// 大写字母
checkValue
[
j
]
=
(
financecode
[
j
]
-
65
)
+
10
;
// a-10 z-35
}
else
if
(
financecode
[
j
]
>=
48
&&
financecode
[
j
]
<=
57
)
{
// 数字0-9
checkValue
[
j
]
=
financecode
[
j
]
-
48
;
// 0-0 9-9
}
else
{
return
false
;
}
totalValue
+=
weightValue
[
j
]
*
checkValue
[
j
];
}
c
=
1
+
totalValue
%
97
;
// 1-97
let
val
=
(
financecode
[
14
]
-
48
)
*
10
+
(
financecode
[
15
]
-
48
);
// 14位码值不大于57,数值9
return
val
===
c
;
}
\ No newline at end of file
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