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
0999b034
Commit
0999b034
authored
May 06, 2024
by
陆正友
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
88a7238f
b4359d7d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1509 additions
and
100 deletions
+1509
-100
get_vender_bank_info.lwm
...ebapp/WEB-INF/classes/csh/CSH501/get_vender_bank_info.lwm
+30
-0
con_ccr_repo_modify_entrance.lview
...dules/cont/CON_REPO003/con_ccr_repo_modify_entrance.lview
+1
-1
csh_atm_batch_dl.lsc
src/main/webapp/modules/csh/CSH501/csh_atm_batch_dl.lsc
+102
-0
csh_payment_req_bo_pdf_print.lsc
...ebapp/modules/csh/CSH501/csh_payment_req_bo_pdf_print.lsc
+89
-0
hls_bp_master_create.lview
...ain/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
+478
-35
hls_bp_master_modify.lview
...ain/webapp/modules/hls/HLS214N/hls_bp_master_modify.lview
+402
-35
hls_bp_master_req_modify.lview
...webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
+380
-21
prj_project_modify_entrance.lview
...app/modules/prj/PRJ502N/prj_project_modify_entrance.lview
+27
-8
No files found.
src/main/webapp/WEB-INF/classes/csh/CSH501/get_vender_bank_info.lwm
0 → 100644
View file @
0999b034
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 18083
$Date:
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select
t.bank_account_num vender_bank_account_number,
t.bank_account_name vender_bank_account_name,
bank_account_id vender_bank_account_id,
t.bank_full_name vender_bank_full_name,
(select bp_name from hls_bp_master hbm where hbm.bp_id=t.bp_id) vender_name
from hls_bp_master_bank_account_v t
where t.bp_id = (
select hli.vender_id
from hls_lease_item hli,con_contract_lease_item ccli
where hli.lease_item_id=ccli.lease_item_id
and ccli.contract_id=${/parameter/@contract_id}
)
and t.enabled_flag = 'Y'
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/modules/cont/CON_REPO003/con_ccr_repo_modify_entrance.lview
View file @
0999b034
...
...
@@ -62,7 +62,7 @@
param['req_status'] = req_status;
param['url_title'] = '合同回购';
if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL') {
if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL'
|| req_status == 'REJECT'
) {
param['maintain_type'] = 'READONLY';
param['function_code'] = 'CON_REPO001D_Q';
} else {
...
...
src/main/webapp/modules/csh/CSH501/csh_atm_batch_dl.lsc
0 → 100644
View file @
0999b034
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<s:server-script>
<![CDATA[
importPackage(java.util.zip);
importPackage(java.io); /*可以传入参数*/
function writeFile(zos, fn, fp) {
var ze = new ZipEntry(fn);
zos.putNextEntry(ze);
var fis = new FileInputStream(fp);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
zos.write(b, 0, len);
}
fis.close();
}
function transfer(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
var date_str = getdate();
var doc_code = '付款请求书'
var zip_filename = doc_code + '-' + date_str + ".zip";
var file_path;
var fnd_atm_flag = $ctx.parameter.fnd_atm_flag;
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
try {
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var arr = result.getChildren();
if (arr.length == 1) {
//单个下载
file_name = arr[0].download_file_name;
if (fnd_atm_flag == 'Y') {
file_path = arr[0].download_file_path;
} else {
file_path = arr[0].download_file_path + file_name;
}
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'utf-8'));
var os = resp.getOutputStream();
transfer(file_path, os);
os.flush();
} else if (arr.length >
1) {
//打包下载
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(zip_filename));
var zos = new ZipOutputStream(resp.getOutputStream());
var file_exist_list = {};
for (var i = 0;i
< arr.length
;i++)
{
var
f =
arr[i];
if
(f.download_file_path
&&
!file_exist_list[f.download_file_name])
{
writeFile(zos,
f.download_file_name,
f.download_file_path);
file_exist_list[f.download_file_name]
=
1;
}
else
{
file_exist_list[f.download_file_name]
=
file_exist_list[f.download_file_name]
*
1
+
1;
var
last_index =
f.download_file_name.lastIndexOf(".");
var
temp_exists_file_name =
f.download_file_name.substr(0,
last_index);
var
temp_exists_file_type =
f.download_file_name.substr(last_index,
f.download_file_name.length);
temp_exists_file_name =
temp_exists_file_name
+
'-'
+
file_exist_list[f.download_file_name]
+
temp_exists_file_type;
writeFile(zos,
temp_exists_file_name,
f.download_file_name);
}
}
zos.close();
}
}
catch
(e)
{
println(e);
var
logger =
$logger("server-script");
logger.severe(e.message);
}
]]
></s:server-script>
</a:init-procedure>
</a:service>
src/main/webapp/modules/csh/CSH501/csh_payment_req_bo_pdf_print.lsc
0 → 100644
View file @
0999b034
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<a:model-update
model=
"hls.HLS811.hls_doc_file_templet_get_atm"
/>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
importPackage(Packages.hls.plugin.docx4j);
importPackage(java.io);
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
transfer(file_path, os);
os.flush();
}
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = to_file_path + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString(),
source_type: $ctx.parameter.source_type
});
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
//download_file(to_file_name, to_file_path);
} catch (e) {
raise_app_error(e);
}
}
]]>
</s:server-script>
</a:init-procedure>
</a:service>
src/main/webapp/modules/hls/HLS213N/hls_bp_master_create.lview
View file @
0999b034
...
...
@@ -31,6 +31,7 @@
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
...
...
@@ -52,11 +53,9 @@
bp_record.getField('unit_id_n').setRequired(true);
}
}
if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false);
// bp_record.getField('agent_type_n').setRequired(true);
} else {
bp_record.getField('agent_type_n').setReadOnly(true);
// bp_record.getField('agent_type_n').setRequired(false);
...
...
@@ -196,7 +195,8 @@
}
};
//法人供应商经办人身份证号非必填 18083 2022/11/28
//法人供应商经办人身份证号非必填 18083 2022/12/1
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
var sign_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_SIGNER', 'hls_bp_master_signer');
...
...
@@ -211,6 +211,7 @@
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
//第三方创建页面隐藏角色新增按钮
debugger;
...
...
@@ -272,7 +273,6 @@
if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true);
}
if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('invoice_method') == 'BILLING') {
record.getField('taxpayer_type').setRequired(true);
...
...
@@ -317,6 +317,7 @@
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
//取消开票类型为纸质只读 18083
//record.getField('invoice_type').setReadOnly(true);
//record.getField('invoice_type_n').setReadOnly(true);
record.getField('invoice_type').setRequired(false);
...
...
@@ -794,20 +795,128 @@
var gird_ds_id = 'BP_NP_CREATE_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_CREATE_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
//学历学位校验 add 20230710
if(name=='academic_background'||name=='degrees') {
var academic_background = record.get('academic_background');
var degrees = record.get('degrees');
if(!Ext.isEmpty(academic_background)
&&
!Ext.isEmpty(degrees)){
if ((academic_background == '1'
&&
degrees != '1'
&&
degrees != '2'
&&
degrees != '3') ||
(academic_background == '2'
&&
degrees != '4')||
((academic_background == '3'||academic_background == '4'||academic_background == '5'||academic_background == '6'||academic_background == '7'||academic_background == '8')
&&
(degrees != '5'))){
Leaf.showMessage('提示', '请正确填写学位和学历');
setTimeout(function () {
if(name=='academic_background'){
record.set('degrees', '');
record.set('degrees_n', '');
}else if(name=='degrees'){
record.set('academic_background', '');
record.set('academic_background_n', '');
}
}, 20);
return false;
}
if(bank_flag1 == false){
Leaf.showErrorMessage('${l:PROMPT}', '银行账户户名必须与商业伙伴名称一致');
return false;
}
}
}
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(head_record.get('bp_class')=='ORG'){
if(head_record.get('bp_type')=='TENANT' || head_record.get('bp_type')=='GUTA_ORG'){
var bank_flag=true;
if(bank_record.length==0){
bank_flag=false;
if(bank_flag==false){
Leaf.showErrorMessage('${l:PROMPT}','请在银行账户信息中维护[银行账号信息]!');
return false;
}
}
}
}
//许可证有效期校验
if (name == 'due_date') {
var lastday = new Date('2099-12-31');
if (value >lastday) {
Leaf.showMessage('${l:PROMPT}', '营业许可证到期日最大不得超过2099-12-31');
setTimeout(function () {
record.set('due_date', '');
}, 20);
}
}
if (name == 'due_box') {
if (value == 'Y') {
record.set('due_date', '2099-12-31');
}else if(value == 'N'){
record.set('due_date', '');
}
}
//邮编校验 add by 20230619
if(name=='zipcode'|| name=='work_unit_zip') {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
if (!(/^[0-9]{6}$/.test(value))
&&
value) {
Leaf.showMessage('提示', '请正确填写邮编', function () {
record.set(name, '');
});
}
}
//单位性质和职业校验 20230420
if (name == 'unit_properties' || name == 'occuption') {
debugger
var unit_properties = record.get('unit_properties');
var occuption = record.get('occuption');
if (unit_properties == '30' || unit_properties == '40' || unit_properties == '50') {
if (occuption == '0' || occuption == 'X') {
//当单位性质为“30-外资企业”、“40-个体、私营企业”、“50-其他“时,职业不能为“0-国家机关、党群组织、企业、事业单位负责人”、“X-军人”
Leaf.showMessage('提示', '当单位性质为“外资企业”、“个体、私营企业”、“其他“时,职业不能为“国家机关、党群组织、企业、事业单位负责人”、“军人”。', null, 500, 100);
if(name == 'unit_properties' ){
record.set('occuption','');
record.set('occuption_n','');
}
if(name == 'occuption' ){
record.set('unit_properties','');
record.set('unit_properties_n','');
}
}
}
}
//征信add start 中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT'){
//
if(record.get('bp_type') == 'TENANT'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
//去除空格
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
// if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
// Leaf.showMessage('提示', '中征码首字母需要大写');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// setTimeout(function () {
// record.set('credit_code', '');
// }, 20);
// return false;
//
// }else {
// return true;
// }
let financeCode = new Array(16);
for (let i = 0; i
< credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}else
{
...
...
@@ -816,10 +925,13 @@
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}
}
}
//
}
}
if
(
name =
=
'org_type')
{
...
...
@@ -838,8 +950,8 @@
record.getField('enterprise_scale_n').setRequired(true);
}
}
//法人承租人添加 法人姓名和法人身份证号 时,更新企业关联信息的法人数据
var
company_ds_id
= get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
//法人承租人
company_ds_id
添加
法人姓名和法人身份证号
时,更新企业关联信息的法人数据
var
company_ds_id
=
get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'hls_bp_master_company_info');
if((
name =
=
'legal_person'||
name =
=
'id_card_no_leg')){
var
records_company =
$(company_ds_id).getAll();
for(var
i=
0;i<records_company.length;i++){
...
...
@@ -857,6 +969,193 @@
}
}
}
if(
company_ds_id=
ds.id){
if
(
name =
=
'id_type'
&&
value)
{
if
(
value =
=
'110'&&record.get('associate_id_no'))
{
var
associate_id_no =
record.get('associate_id_no');
if
(!checkCard(associate_id_no))
{
Leaf.showMessage('提示',
'个人身份证号错误!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
else
if
(
associate_id_no.length =
=
18)
{
new_id_card =
record.get('associate_id_no');
//自动带出籍贯
//record.set('resident_addres',
get_native_place(value));
record.set('date_of_birth',
new
Date(associate_id_no.substr(6,
4)
+
'/'
+
associate_id_no.substr(10,
2)
+
'/'
+
associate_id_no.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
associate_id_no.substr(6,
4));
if
(associate_id_no.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(associate_id_no.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}else
if(
value =
=
'140'&&record.get('associate_id_no')){
//护照
var
associate_id_no =
record.get('associate_id_no');
if
(!Leaf.isEmpty(associate_id_no))
{
associate_id_no =
associate_id_no.trim();
associate_id_no =
associate_id_no.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
associate_id_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(associate_id_no)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}else
if(
value =
=
'210'&&record.get('associate_id_no')){
//护照
var
credit_code =
record.get('associate_id_no');
if
(!Leaf.isEmpty(credit_code))
{
credit_code =
credit_code.trim();
credit_code =
credit_code.replace(/[\t\r\f\n\s]*/g,"");
if
(
credit_code.length =
=
'16'){
let
financeCode =
new
Array(16);
for
(let
i =
0;
i
<
credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(
value =
=
'220'&&record.get('associate_id_no')){
//护照
var
soc_code =
record.get('associate_id_no');
if
(soc_code)
{
if
(!CheckSocialCreditCode(soc_code))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
if
(
name =
=
'associate_id_no'&&value)
{
if
(record.get('id_type')
==
'110')
{
if
(!checkCard(value))
{
Leaf.showMessage('${l:HLS.PROMPT}',
'个人身份证号错误!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
else
{
if
(
value.length =
=
18)
{
record.set('date_of_birth',
new
Date(value.substr(6,
4)
+
'/'
+
value.substr(10,
2)
+
'/'
+
value.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
value.substr(6,
4));
if
(value.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(value.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}
}else
if(record.get('id_type')
==
'140'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}else
if(record.get('id_type')
==
'210'&&value){
//护照
var
credit_code =
record.get('associate_id_no');
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
if
(
value.length =
=
'16'){
let
financeCode =
new
Array(16);
for
(let
i =
0;
i
<
value.length
&&
i
<
16;
i++)
{
financeCode[i]
=
value.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(record.get('id_type')
==
'220'&&value){
//护照
var
soc_code =
record.get('associate_id_no');
if
(value)
{
if
(!CheckSocialCreditCode(value))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
}
//出资人
出资比例必填
if(
name =
=
'other_relationships'){
if(
value =
=
'2'){
...
...
@@ -959,6 +1258,56 @@
record.getField('parent_id_n').setReadOnly(true);
}
}
if
(
name =
=
'id_type'
&&
value)
{
if
(
value =
=
'ID_CARD'&&record.get('id_card_no'))
{
var
id_card_no =
record.get('id_card_no');
if
(!checkCard(id_card_no))
{
Leaf.showMessage('提示',
'个人身份证号错误!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
else
if
(
id_card_no.length =
=
18)
{
new_id_card =
record.get('id_card_no');
//自动带出籍贯
//record.set('resident_addres',
get_native_place(value));
record.set('date_of_birth',
new
Date(id_card_no.substr(6,
4)
+
'/'
+
id_card_no.substr(10,
2)
+
'/'
+
id_card_no.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
id_card_no.substr(6,
4));
if
(id_card_no.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(id_card_no.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}else
if(
value =
=
'PASSPORT'&&record.get('id_card_no')){
//护照
var
id_card_no =
record.get('id_card_no');
if
(!Leaf.isEmpty(id_card_no))
{
id_card_no =
id_card_no.trim();
id_card_no =
id_card_no.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
id_card_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_card_no)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
}
}
}
if
(
name =
=
'id_card_no')
{
//
record =
$(hls_bp_master_ds_id).getCurrentRecord();
//
var
id_num =
record.get('id_card_no');
...
...
@@ -988,11 +1337,84 @@
}
}
}else
if(record.get('id_type')
==
'PASSPORT'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
}
}
//
ds.fields.id_card_no.pro.validator =
id_card_no_validate;
//自动带出籍贯
//
record.set('resident_addres',
get_native_place(value))
}
if
(
name =
=
'card_type_sp'
&&
value)
{
if
(
value =
=
'ID_CARD'&&record.get('id_no_sp'))
{
var
id_no_sp =
record.get('id_no_sp');
if
(!checkCard(id_no_sp))
{
Leaf.showMessage('提示',
'配偶信息中,请输入正确格式的身份证!');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
else
if
(
id_no_sp.length =
=
18)
{
new_id_card =
record.get('id_no_sp');
//自动带出籍贯
//record.set('resident_addres',
get_native_place(value));
record.set('date_of_birth',
new
Date(id_no_sp.substr(6,
4)
+
'/'
+
id_no_sp.substr(10,
2)
+
'/'
+
id_no_sp.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
id_no_sp.substr(6,
4));
if
(id_no_sp.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(id_no_sp.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}else
if(
value =
=
'PASSPORT'&&record.get('id_no_sp')){
//护照
var
id_no_sp =
record.get('id_no_sp');
if
(!Leaf.isEmpty(id_no_sp))
{
id_no_sp =
id_no_sp.trim();
id_no_sp =
id_no_sp.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
id_no_sp.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_no_sp)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
}
}
}
if
(
name =
=
'id_no_sp'
&&
value)
{
if
(!value)
{
...
...
@@ -1011,6 +1433,27 @@
record.set('date_of_birth_sp',
new
Date(value.substr(6,
4)
+
'/'
+
value.substr(10,
2)
+
'/'
+
value.substr(12,
2)));
}
}
}else
if(record.get('card_type_sp')
==
'PASSPORT'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'配偶护照格式错误');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
}
}
//
ds.fields.id_no_sp.pro.validator =
id_card_no_validate;
//
record.set('resident_addres_sp',
get_native_place(value))
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_modify.lview
View file @
0999b034
...
...
@@ -510,7 +510,8 @@
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load']
=
function
(ds,line_record)
{
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load']
=
function
(ds,
line_record)
{
var
dsId =
ds.id;
var
base_table_temp =
'hls_bp_master_role_ds'
;
if
(dsId.substring(dsId.length
-
base_table_temp.length,
dsId.length)
==
base_table_temp)
{
...
...
@@ -533,7 +534,7 @@
}
}
}
//法人供应商非必填
18083
2022/11/25
//法人供应商非必填
18083
2022/12/01
var
bp_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC',
'hls_bp_master');
var
sign_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC_SIGNER',
'hls_bp_master_signer');
var
bp_record=
$(bp_ds_id).getCurrentRecord();
...
...
@@ -558,7 +559,7 @@
}
}
}
//法人供应商非必填
18083
2022/11/25
//法人供应商非必填
2022/12/1
18083
var
bp_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC',
'hls_bp_master');
var
sign_ds_id =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC_SIGNER',
'hls_bp_master_signer');
var
bp_record=
$(bp_ds_id).getCurrentRecord();
...
...
@@ -648,20 +649,49 @@
}
}
}
debugger;
if('${/parameter/@function_usage}'=='QUERY'){
if(record.get('bp_type') == 'RENTER' || record.get('bp_type') == 'MAN_FACTURER' || record.get('bp_type')=='ASSET_REGULATOR'){
record.getField('phone').setRequired(false);
record.getField('cell_phone').setRequired(false);
record.getField('due_date').setRequired(false);
record.getField('registered_place').setRequired(false);
record.getField('org_unit_property').setRequired(false);
record.getField('org_unit_property_n').setRequired(false);
}
}
}
//中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT'
&&
name =='credit_code'){
//
if(record.get('bp_type') == 'TENANT'
&&
name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
// if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
// Leaf.showMessage('提示', '中征码首字母需要大写');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// setTimeout(function () {
// record.set('credit_code', '');
// }, 20);
// return false;
//
// }else {
// return true;
// }
let financeCode = new Array(16);
for (let i = 0; i
< credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}else
{
...
...
@@ -670,10 +700,13 @@
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}
}
}
//
}
}
if
(
gird_ds_id =
=
ds.id
||
gird_ds_id2 =
=
ds.id)
{
...
...
@@ -799,6 +832,255 @@
}
}
var company_ds_id= get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
if(company_ds_id=ds.id){
if (name == 'id_type'
&&
value) {
if (value == '110'
&&
record.get('associate_id_no')) {
var associate_id_no =record.get('associate_id_no');
if (!checkCard(associate_id_no)) {
Leaf.showMessage('提示', '个人身份证号错误!');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
} else if (associate_id_no.length == 18) {
new_id_card = record.get('associate_id_no');
//自动带出籍贯
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(associate_id_no.substr(6, 4) + '/' + associate_id_no.substr(10, 2) + '/' + associate_id_no.substr(12, 2)));
record.set('age', new Date().getFullYear() - associate_id_no.substr(6, 4));
if (associate_id_no.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (associate_id_no.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}else if(value == '140'
&&
record.get('associate_id_no')){
//护照
var associate_id_no =record.get('associate_id_no');
if (!Leaf.isEmpty(associate_id_no)) {
associate_id_no = associate_id_no.trim();
associate_id_no = associate_id_no.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=associate_id_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(associate_id_no)){
Leaf.showMessage('提示', '护照格式错误');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
}
}
}else if(value == '210'
&&
record.get('associate_id_no')){
//护照
var credit_code =record.get('associate_id_no');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
let financeCode = new Array(16);
for (let i = 0; i
< credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(
value =
=
'220'&&record.get('associate_id_no')){
//护照
var
soc_code =
record.get('associate_id_no');
if
(soc_code)
{
if
(!CheckSocialCreditCode(soc_code))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
if
(
name =
=
'associate_id_no'&&value)
{
if
(record.get('id_type')
==
'110')
{
if
(!checkCard(value))
{
Leaf.showMessage('${l:HLS.PROMPT}',
'个人身份证号错误!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
else
{
if
(
value.length =
=
18)
{
record.set('date_of_birth',
new
Date(value.substr(6,
4)
+
'/'
+
value.substr(10,
2)
+
'/'
+
value.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
value.substr(6,
4));
if
(value.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(value.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}
}else
if(record.get('id_type')
==
'140'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}else
if(record.get('id_type')
==
'210'&&value){
//护照
var
credit_code =
record.get('associate_id_no');
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
if
(
value.length =
=
'16'){
let
financeCode =
new
Array(16);
for
(let
i =
0;
i
<
value.length
&&
i
<
16;
i++)
{
financeCode[i]
=
value.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(record.get('id_type')
==
'220'&&value){
//护照
var
soc_code =
record.get('associate_id_no');
if
(value)
{
if
(!CheckSocialCreditCode(value))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
}
//法人身份证号校验
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_type'
&&
value)
{
if
(
value =
=
'ID_CARD'&&record.get('id_card_no'))
{
var
id_card_no =
record.get('id_card_no');
if
(!checkCard(id_card_no))
{
Leaf.showMessage('提示',
'基本信息中,请输入正确格式的身份证!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
else
if
(
id_card_no.length =
=
18)
{
new_id_card =
record.get('id_card_no');
//自动带出籍贯
//record.set('resident_addres',
get_native_place(value));
record.set('date_of_birth',
new
Date(id_card_no.substr(6,
4)
+
'/'
+
id_card_no.substr(10,
2)
+
'/'
+
id_card_no.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
id_card_no.substr(6,
4));
if
(id_card_no.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(id_card_no.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}else
if(
value =
=
'PASSPORT'&&record.get('id_card_no')){
//护照
var
id_card_no =
record.get('id_card_no');
if
(!Leaf.isEmpty(id_card_no))
{
id_card_no =
id_card_no.trim();
id_card_no =
id_card_no.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
id_card_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_card_no)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
}
}
}
if
(
name =
=
'id_card_no'
&&
value)
{
if
(record.get('id_type')
==
'ID_CARD')
{
if
(!checkCard(value))
{
...
...
@@ -822,6 +1104,77 @@
}
}
}else
if(record.get('id_type')
==
'PASSPORT'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
}
}
}
if
(
name =
=
'card_type_sp'
&&
value)
{
if
(
value =
=
'ID_CARD'&&record.get('id_no_sp'))
{
var
id_no_sp =
record.get('id_no_sp');
if
(!checkCard(id_no_sp))
{
Leaf.showMessage('提示',
'配偶信息中,请输入正确格式的身份证!');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
else
if
(
id_no_sp.length =
=
18)
{
new_id_card =
record.get('id_no_sp');
//自动带出籍贯
//record.set('resident_addres',
get_native_place(value));
record.set('date_of_birth',
new
Date(id_no_sp.substr(6,
4)
+
'/'
+
id_no_sp.substr(10,
2)
+
'/'
+
id_no_sp.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
id_no_sp.substr(6,
4));
if
(id_no_sp.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(id_no_sp.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}else
if(
value =
=
'PASSPORT'&&record.get('id_no_sp')){
//护照
var
id_no_sp =
record.get('id_no_sp');
if
(!Leaf.isEmpty(id_no_sp))
{
id_no_sp =
id_no_sp.trim();
id_no_sp =
id_no_sp.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
id_no_sp.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_no_sp)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
}
}
}
...
...
@@ -851,6 +1204,27 @@
}*/
}
}else
if(record.get('card_type_sp')
==
'PASSPORT'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('id_card_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'配偶护照格式错误');
setTimeout(function
()
{
record.set('id_no_sp',
'');
},
20);
return
false;
}
}
}
}
...
...
@@ -924,13 +1298,6 @@
var
test_ds_id2 =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_SPOUSE',
'hls_bp_master');
if
(
ds.id =
=
f_bp_create_ds_id)
{
if (name == 'due_box') {
if (value == 'Y') {
record.set('due_date', '2099-12-31');
}else if(value == 'N'){
record.set('due_date', '');
}
}
var
hd_ds =
get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],
'F_BASIC',
'hls_bp_master');
record =
$(hd_ds).getCurrentRecord();
...
...
src/main/webapp/modules/hls/HLS214N/hls_bp_master_req_modify.lview
View file @
0999b034
...
...
@@ -688,15 +688,33 @@
//中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT'
&&
name =='credit_code'){
//
if(record.get('bp_type') == 'TENANT'
&&
name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
// if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
// Leaf.showMessage('提示', '中征码首字母需要大写');
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// setTimeout(function () {
// record.set('credit_code', '');
// }, 20);
// return false;
//
// }else {
// return true;
// }
let financeCode = new Array(16);
for (let i = 0; i
< credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}else
{
...
...
@@ -705,10 +723,13 @@
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('credit_code',
'');
},
20);
return
false;
}
}
}
//
}
}
if
(
gird_ds_id =
=
ds.id
||
gird_ds_id2 =
=
ds.id)
{
if
(
name =
=
'relationship_with_bp')
{
...
...
@@ -858,6 +879,67 @@
}
}
//法人身份证号校验
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_type'
&&
value) {
if (value == 'ID_CARD'
&&
record.get('id_card_no')) {
var id_card_no =record.get('id_card_no');
if (!checkCard(id_card_no)) {
Leaf.showMessage('提示', '基本信息中,请输入正确格式的身份证!');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
} else if (id_card_no.length == 18) {
new_id_card = record.get('id_card_no');
//自动带出籍贯
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(id_card_no.substr(6, 4) + '/' + id_card_no.substr(10, 2) + '/' + id_card_no.substr(12, 2)));
record.set('age', new Date().getFullYear() - id_card_no.substr(6, 4));
if (id_card_no.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (id_card_no.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}else if(value == 'PASSPORT'
&&
record.get('id_card_no')){
//护照
var id_card_no =record.get('id_card_no');
if (!Leaf.isEmpty(id_card_no)) {
id_card_no = id_card_no.trim();
id_card_no = id_card_no.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=id_card_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_card_no)){
Leaf.showMessage('提示', '护照格式错误');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
}
}
}
}
if (name == 'id_card_no'
&&
value) {
if (record.get('id_type') == 'ID_CARD') {
if (!checkCard(value)) {
...
...
@@ -881,6 +963,77 @@
}
}
}else if(record.get('id_type') == 'PASSPORT'){
//护照
if (!Leaf.isEmpty(value)) {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示', '护照格式错误');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
}
}
}
}
if (name == 'card_type_sp'
&&
value) {
if (value == 'ID_CARD'
&&
record.get('id_no_sp')) {
var id_no_sp =record.get('id_no_sp');
if (!checkCard(id_no_sp)) {
Leaf.showMessage('提示', '配偶信息中,请输入正确格式的身份证!');
setTimeout(function () {
record.set('id_no_sp', '');
}, 20);
return false;
} else if (id_no_sp.length == 18) {
new_id_card = record.get('id_no_sp');
//自动带出籍贯
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(id_no_sp.substr(6, 4) + '/' + id_no_sp.substr(10, 2) + '/' + id_no_sp.substr(12, 2)));
record.set('age', new Date().getFullYear() - id_no_sp.substr(6, 4));
if (id_no_sp.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (id_no_sp.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}else if(value == 'PASSPORT'
&&
record.get('id_no_sp')){
//护照
var id_no_sp =record.get('id_no_sp');
if (!Leaf.isEmpty(id_no_sp)) {
id_no_sp = id_no_sp.trim();
id_no_sp = id_no_sp.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=id_no_sp.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('id_no_sp', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(id_no_sp)){
Leaf.showMessage('提示', '护照格式错误');
setTimeout(function () {
record.set('id_no_sp', '');
}, 20);
return false;
}
}
}
}
...
...
@@ -910,8 +1063,214 @@
}*/
}
}else if(record.get('card_type_sp') == 'PASSPORT'){
//护照
if (!Leaf.isEmpty(value)) {
value = value.trim();
value = value.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('id_card_no', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示', '配偶护照格式错误');
setTimeout(function () {
record.set('id_no_sp', '');
}, 20);
return false;
}
}
}
}
}
var company_ds_id= get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_com_req');
if(company_ds_id=ds.id){
if (name == 'id_type'
&&
value) {
if (value == '110'
&&
record.get('associate_id_no')) {
var associate_id_no =record.get('associate_id_no');
if (!checkCard(associate_id_no)) {
Leaf.showMessage('提示', '个人身份证号错误!');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
} else if (associate_id_no.length == 18) {
new_id_card = record.get('associate_id_no');
//自动带出籍贯
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(associate_id_no.substr(6, 4) + '/' + associate_id_no.substr(10, 2) + '/' + associate_id_no.substr(12, 2)));
record.set('age', new Date().getFullYear() - associate_id_no.substr(6, 4));
if (associate_id_no.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
record.set('gender_n', '男');
} else if (associate_id_no.substr(16, 1) % 2 == 0) {
record.set('gender', 'FEMALE');
record.set('gender_n', '女');
}
}
}else if(value == '140'
&&
record.get('associate_id_no')){
//护照
var associate_id_no =record.get('associate_id_no');
if (!Leaf.isEmpty(associate_id_no)) {
associate_id_no = associate_id_no.trim();
associate_id_no = associate_id_no.replace(/[\t\r\f\n\s]*/g,"");
var sub_no=associate_id_no.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示', '护照证件号码格式前三位需为国籍代码!');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(associate_id_no)){
Leaf.showMessage('提示', '护照格式错误');
setTimeout(function () {
record.set('associate_id_no', '');
}, 20);
return false;
}
}
}else if(value == '210'
&&
record.get('associate_id_no')){
//护照
var credit_code =record.get('associate_id_no');
if (!Leaf.isEmpty(credit_code)) {
credit_code = credit_code.trim();
credit_code = credit_code.replace(/[\t\r\f\n\s]*/g,"");
if (credit_code.length == '16'){
let financeCode = new Array(16);
for (let i = 0; i
< credit_code.length
&&
i
<
16;
i++)
{
financeCode[i]
=
credit_code.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(
value =
=
'220'&&record.get('associate_id_no')){
//护照
var
soc_code =
record.get('associate_id_no');
if
(soc_code)
{
if
(!CheckSocialCreditCode(soc_code))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
if
(
name =
=
'associate_id_no'&&value)
{
if
(record.get('id_type')
==
'110')
{
if
(!checkCard(value))
{
Leaf.showMessage('${l:HLS.PROMPT}',
'个人身份证号错误!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
else
{
if
(
value.length =
=
18)
{
record.set('date_of_birth',
new
Date(value.substr(6,
4)
+
'/'
+
value.substr(10,
2)
+
'/'
+
value.substr(12,
2)));
record.set('age',
new
Date().getFullYear()
-
value.substr(6,
4));
if
(value.substr(16,
1)
%
2 =
=
1)
{
record.set('gender',
'MALE');
record.set('gender_n',
'男');
}
else
if
(value.substr(16,
1)
%
2 =
=
0)
{
record.set('gender',
'FEMALE');
record.set('gender_n',
'女');
}
}
}
}else
if(record.get('id_type')
==
'140'){
//护照
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
var
sub_no=
value.substring(0,3);
if(!(/^[A-Z]{3}/).test(sub_no)){
Leaf.showMessage('提示',
'护照证件号码格式前三位需为国籍代码!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
if(!(/^[A-Z]{3}.{0,9}$/).test(value)){
Leaf.showMessage('提示',
'护照格式错误');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}else
if(record.get('id_type')
==
'210'&&value){
//护照
var
credit_code =
record.get('associate_id_no');
if
(!Leaf.isEmpty(value))
{
value =
value.trim();
value =
value.replace(/[\t\r\f\n\s]*/g,"");
if
(
value.length =
=
'16'){
let
financeCode =
new
Array(16);
for
(let
i =
0;
i
<
value.length
&&
i
<
16;
i++)
{
financeCode[i]
=
value.charCodeAt(i);
}
if(!checkDKK(financeCode)){
Leaf.showMessage('提示',
'中征码错误');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}else
{
return
true;
}
}else
{
Leaf.showMessage('提示',
'请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
return
false;
}
}
}
else
if(record.get('id_type')
==
'220'&&value){
//护照
var
soc_code =
record.get('associate_id_no');
if
(value)
{
if
(!CheckSocialCreditCode(value))
{
Leaf.showMessage('提示',
'统一社会信用代码有误,请重新输入!');
setTimeout(function
()
{
record.set('associate_id_no',
'');
},
20);
//
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return
false;
}
}
}
}
}
...
...
src/main/webapp/modules/prj/PRJ502N/prj_project_modify_entrance.lview
View file @
0999b034
...
...
@@ -15,7 +15,7 @@
<a:link
id=
"prj_project_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"prj_project_modify_link"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"
/>
<a:link
id=
"prj_project_bp_parameter_link"
url=
"${/request/@context_path}/modules/prj/PRJ501/prj_project_bp_parameter.lview"
/>
<!-- <a:link id="car_modify_link
_readonly
" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>-->
<!-- <a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>-->
<a:link
id=
"car_modify_link_readonly"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"
/>
<a:link
id=
"car_modify_link_readonly_c"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"
/>
<a:link
id=
"car_modify_mananger_link"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"
/>
...
...
@@ -23,6 +23,7 @@
<a:link
id=
"car_modify_special_link"
url=
"${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"
/>
<a:link
id=
"document_history_query_link_id"
url=
"${/request/@context_path}/modules/prj/PRJ502N/prj_document_history_query.lview"
/>
<script
src=
"${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js"
type=
"text/javascript"
/>
<a:link
id=
"car_modify_operat_link"
url=
"${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"
/>
<script
type=
"text/javascript"
>
<![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_PROJECT_RESULT', 'prj_project');
function open_project_modify_win(record_id, ds_id) {
...
...
@@ -31,11 +32,11 @@
var url;
//项目类layout_code
maintain_type = '
QUER
Y';
maintain_type = '
READONL
Y';
param = record.data;
param['document_id'] = record.get('project_id');
param['function_usage'] = '
MODIF
Y';
param['function_usage'] = '
QUER
Y';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
...
...
@@ -52,10 +53,29 @@
}
function on_business_type_leaseoperat_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var url;
maintain_type = 'READONLY';
param = record.data;
param['document_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'car_modify_operat_link';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, url, ds_id);
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'project_number' && value) {
if(record.get('business_type')=='LEASE'||record.get('business_type')=='LEASEBACK'){
return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">
' + value + '
</a>
';
}else if(record.get('business_type')=='LEASEOPERAT'){
return '
<a
href=
"javascript:on_business_type_leaseoperat_win(\'' + record.id + '\',\'' + record.ds.id + '\')"
>
' + value + '
</a>
';
}
}
return value;
};
...
...
@@ -156,7 +176,6 @@
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID_prompt").style.display = "none";
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "none";
}
//深圳美鹏和hcs显示分公司,其他隐藏
var bp_code = '${/model/user_agent_description/record/@bp_code}';
if (!Ext.isEmpty(bp_code)
&&
bp_code !== 'D00010001'
&&
bp_code !== 'D00000009') {
...
...
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