Commit e82c9182 authored by lizhe's avatar lizhe

征信页面调整

parent 006d0cec
......@@ -12,6 +12,8 @@
<ns1:field name="ref_v03" databaseType="VARCHAR" datatype="java.lang.String" prompt="附加值2"/>
<ns1:field name="ref_v04" databaseType="VARCHAR" datatype="java.lang.String" prompt="附加值2描述"/>
<ns1:field name="enabled_flag" databaseType="VARCHAR" datatype="java.lang.String" prompt="SYS_CODE.ENABLED_FLAG"/>
<ns1:field name="credit_code" databaseType="VARCHAR" datatype="java.lang.String" prompt="征信代码"/>
<ns1:field name="credit_name" databaseType="VARCHAR" datatype="java.lang.String" prompt="征信描述"/>
</ns1:fields>
<ns1:primary-key>
<ns1:pk-field name="code_value_id"/>
......
......@@ -23,6 +23,7 @@
<a:link id="gh_nc_post_addcustomerinfo_link" model="hls.HLS213.hls_bp_master_nc_post" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}_signer_create_link_id" model="hls.HLS213.hls_bp_master_signer_create_check"
modelaction="update"/>
<a:link id="rsc303_fin_statement_link" url="${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_all_query.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function () {
var unit_id = '${/model/user_agent_description/record/@unit_id}';
......@@ -60,6 +61,10 @@
bp_record.getField('agent_type_n').setReadOnly(true);
// bp_record.getField('agent_type_n').setRequired(false);
}
//自然人不展示财报按钮
if('${/parameter/@bp_class}' == 'NP' && document.getElementById('${/parameter/@layout_code}_user_button2')){
document.getElementById('${/parameter/@layout_code}_user_button2').style.display = 'none';
}
if (ds_id && '${/parameter/@default_value_dsid}') {
var head_record = $('${/parameter/@default_value_dsid}').getCurrentRecord();
......@@ -122,6 +127,26 @@
address_record.getField('address_type_n').setReadOnly(true);
address_record.getField('country_id_n').setReadOnly(true);
}
//征信 企业默认添加 法定代表人 企业关联信息记录 add start
var company_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
var company_ds_id_ds = $(company_ds_id);
if(bp_record.get('bp_type')!='VENDER') {
var init_company_record = new Leaf.Record({
'other_relationships': '1',
'other_relationships_n': '主要组成人员',
'identity_type': '11',
'identity_type_n': '法定代表人',
'ref_v01': '1',
'ref_v01_n': '自然人'
});
company_ds_id_ds.add(init_company_record);
var company_record = company_ds_id_ds.getAt(0);
company_record.getField('other_relationships_n').setReadOnly(true);
company_record.getField('identity_type_n').setReadOnly(true);
company_record.getField('ref_v01_n').setReadOnly(true);
}
//征信 企业默认添加 法定代表人 企业关联信息记录 add end
}
var current_record = bp_master_role_ds.getAt(0);
current_record.getField('bp_type_n').setReadOnly(true);
......@@ -171,19 +196,19 @@
}
};
//法人供应商经办人身份证号非必填 18083 2022/11/28
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');
//法人供应商经办人身份证号非必填 18083 2022/11/28
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');
var bp_record=$(bp_ds_id).getCurrentRecord();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
records[i].getField('id_card').setRequired(false);
}
}
}
}
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
......@@ -200,11 +225,43 @@
if ((ds.id).indexOf('hls_bp_master') != -1) {
//征信add start
if(record.get('bp_class') && record.get('bp_class') == 'ORG'){
if(record.get('bp_type') == 'TENANT'){
record.getField('etp_sts').setRequired(true);
//record.getField('credit_code').setRequired(true);
record.getField('etp_sts_n').setRequired(true);
record.getField('org_type').setRequired(true);
record.getField('org_type_n').setRequired(true);
record.getField('org_type_sub').setRequired(true);
record.getField('org_type_sub_n').setRequired(true);
record.getField('enterprise_scale').setRequired(true);
record.getField('enterprise_scale_n').setRequired(true);
record.getField('due_date').setRequired(true);
record.getField('org_unit_property').setRequired(true);
record.getField('org_unit_property_n').setRequired(true);
//record.getField('industry').setRequired(true);
//record.getField('industry_n').setRequired(true);
record.getField('industry_a').setRequired(true);
record.getField('industry_a_n').setRequired(true);
record.getField('industry_b').setRequired(true);
record.getField('industry_b_n').setRequired(true);
record.getField('industry_c').setRequired(true);
record.getField('industry_c_n').setRequired(true);
record.getField('industry_d').setRequired(true);
record.getField('industry_d_n').setRequired(true);
record.getField('nationalities').setRequired(true);
record.getField('nationalities_n').setRequired(true);
}
}
//征信add end
// record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true);
//法人供应商非必填 18083 2022/11/25
//法人供应商非必填 18083 2022/11/25
if(record.get('bp_class') == 'ORG' && record.get("bp_type") == 'VENDER'){
record.getField('id_card_no_leg').setRequired(false);
record.getField('id_card_no_leg').setRequired(false);
}
//身份证验证
if (ds.fields.id_card_no) {
......@@ -218,14 +275,14 @@
if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('invoice_method') == 'BILLING') {
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
}
if (record.get('invoice_method') == 'NO_BILLING') {
record.getField('taxpayer_type').setRequired(true);
......@@ -468,13 +525,13 @@
}
}
}
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30
if (head_record.get('invoice_type')=='PAPER'){
if(head_record.get('full_elec_invoice_flag')=='Y'){
Leaf.showErrorMessage('${l:PROMPT}', '开票类型为纸质发票,不能选择【是否全电发票】为是');
return false;
}
}
//若选择开票类型为“纸质发票”,则系统校验无法选择“是否全电发票”为“是” 18083 2022/11/30
if (head_record.get('invoice_type')=='PAPER'){
if(head_record.get('full_elec_invoice_flag')=='Y'){
Leaf.showErrorMessage('${l:PROMPT}', '开票类型为纸质发票,不能选择【是否全电发票】为是');
return false;
}
}
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var role_records = $(role_ds_id).getAll();
var role_flag=true;
......@@ -490,7 +547,7 @@
return false;
}
if(head_record.get('bp_type')=='THIRD_PARTY'){
if(head_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
......@@ -506,19 +563,19 @@
else{
flag = true;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false;
}
}
}
}
//验证是否有户籍地址,或者通讯地址
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var records_addr = $(address_ds_id).getAll();``
var records_addr = $(address_ds_id).getAll();
if (head_record.get('bp_class') =='NP'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址
var flag = true;
......@@ -569,6 +626,25 @@
return false;
}
}
//征信校验 企业关联方至少一条法定代表人数据 start
var company_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
var records_company = $(company_ds_id).getAll();
var flag_company = 0;
for(var i=0;i<records_company.length;i++){
if (records_company[i].get('identity_type') == '11'){
flag_company ++;
}
}
if (flag_company == 0 &&head_record.get('bp_type')!='VENDER'){
Leaf.showErrorMessage('${l:PROMPT}', '法人必填[法定代表人],请在企业关联信息新增!');
return false;
}
if (flag_company > 1){
Leaf.showErrorMessage('${l:PROMPT}', '法人只能填写一条[法定代表人],请在企业关联信息修改!');
return false;
}
//征信校验 企业关联方至少一条法定代表人数据 end
}
//=================
......@@ -647,6 +723,138 @@
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 start 中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else {
return true;
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
}
if (name == 'org_type') {
record.set('org_type_sub', '');
record.set('org_type_sub_n', '');
//企业规模,当组织机构类型为机关、事业单位时,为空且只读,其他情况必填
if(value =='3'||value =='5'){
record.set('enterprise_scale', '');
record.set('enterprise_scale_n', '');
record.getField('enterprise_scale_n').setReadOnly(true);
record.getField('enterprise_scale').setRequired(false);
record.getField('enterprise_scale_n').setRequired(false);
}else{
record.getField('enterprise_scale_n').setReadOnly(false);
record.getField('enterprise_scale').setRequired(true);
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');
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++){
if (records_company[i].get('identity_type') == '11'){//法定代表人
if(name == 'legal_person'){
records_company[i].set('person_name',value);
} else if (name == 'id_card_no_leg'){
records_company[i].set('associate_id_no',value);
records_company[i].set('ref_v01','1');
records_company[i].set('ref_v01_n','自然人');
records_company[i].set('id_type','110');
records_company[i].set('id_type_n','身份证');
}
}
}
}
//出资人 出资比例必填
if(name == 'other_relationships'){
if(value == '2'){
record.getField('capital_key').setRequired(true);
}else{
record.getField('capital_key').setRequired(false);
}
}
if(name == 'work_status'){
//当“就业状况”为“11 国家公务员”、“ 13 专业技术人员”、“ 17 职员”、“ 21 企业管理人员”、“ 24 工人”或“ 91 在职”时,
// “单位名称”、“单位性质”、“单位所属行业”、“职业类型 、“职务”、“职称”、“入职年份”、单位地址、“单位所在地邮编”、“单位所在地行政区划”、“单位电话”必填。
// 其余情况,这些字段为空只读
if(value == '11'||value == '13'||value == '17'||value == '21'||value == '24'||value == '91'){
record.getField('work_unit').setReadOnly(false);
record.getField('work_unit').setRequired(true);
record.getField('unit_properties_n').setReadOnly(false);
record.getField('unit_properties_n').setRequired(true);
record.getField('occuption_n').setReadOnly(false);
record.getField('occuption_n').setRequired(true);
record.getField('position_n').setReadOnly(false);
record.getField('position_n').setRequired(true);
record.getField('positional_titles').setReadOnly(false);
record.getField('positional_titles').setRequired(true);
record.getField('entry_date').setReadOnly(false);
record.getField('entry_date').setRequired(true);
record.getField('work_unit_address').setReadOnly(false);
record.getField('work_unit_address').setRequired(true);
record.getField('work_unit_zip').setReadOnly(false);
record.getField('work_unit_zip').setRequired(true);
record.getField('work_province_n').setReadOnly(false);
record.getField('work_province_n').setRequired(true);
record.getField('work_city_n').setReadOnly(false);
record.getField('work_city_n').setRequired(true);
record.getField('work_district_n').setReadOnly(false);
record.getField('work_district_n').setRequired(true);
record.getField('work_unit_phone').setReadOnly(false);
record.getField('work_unit_phone').setRequired(true);
record.getField('industry_a_n').setReadOnly(false);
record.getField('industry_a_n').setRequired(true);
}else{
record.getField('work_unit').setReadOnly(true);
record.getField('work_unit').setRequired(false);
record.getField('unit_properties_n').setReadOnly(true);
record.getField('unit_properties_n').setRequired(false);
record.getField('occuption_n').setReadOnly(true);
record.getField('occuption_n').setRequired(false);
record.getField('position_n').setReadOnly(true);
record.getField('position_n').setRequired(false);
record.getField('positional_titles').setReadOnly(true);
record.getField('positional_titles').setRequired(false);
record.getField('entry_date').setReadOnly(true);
record.getField('entry_date').setRequired(false);
record.getField('work_unit_address').setReadOnly(true);
record.getField('work_unit_address').setRequired(false);
record.getField('work_unit_zip').setReadOnly(true);
record.getField('work_unit_zip').setRequired(false);
record.getField('work_province_n').setReadOnly(true);
record.getField('work_province_n').setRequired(false);
record.getField('work_city_n').setReadOnly(true);
record.getField('work_city_n').setRequired(false);
record.getField('work_district_n').setReadOnly(true);
record.getField('work_district_n').setRequired(false);
record.getField('work_unit_phone').setReadOnly(true);
record.getField('work_unit_phone').setRequired(false);
record.getField('industry_a_n').setReadOnly(true);
record.getField('industry_a_n').setRequired(false);
}
}
//征信add end
if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) {
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
......@@ -989,7 +1197,7 @@
if (query_only == 'Y') {
url = $('hls214N_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else {
url = $('hls214N_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
url = $('hls214N_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
......@@ -1079,6 +1287,28 @@
}
};
//征信 add start 财报查询按钮
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(bp_ds_id).getAt(0)
if (Ext.isEmpty(record.get('bp_code'))) {
Leaf.showMessage('${l:PROMPT}', '请先保存商业伙伴数据!');
return;
}
new Leaf.Window({
id: 'rsc303_fin_statement_query',
url: $('rsc303_fin_statement_link').getUrl(),
title: '查看财报',
fullScreen: true,
params: {
bp_id: record.get('bp_id') ,
bp_code:record.get('bp_code')
}
});
}
//征信 add end
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -25,6 +25,7 @@
<a:link id="hls214_bp_master_save_link_id" model="hls.HLS214.hls_bp_change_agent" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_signer_create_link_id" model="hls.HLS213.hls_bp_master_signer_create_check"
modelaction="update"/>
<a:link id="rsc303_fin_statement_link" url="${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_all_query.lview"/>
<!-- <a:link id="hls214_sap_eai_create_customer_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrCustomer.lsc"/>-->
<!-- <a:link id="hls214_sap_eai_create_vender_link" url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrVender.lsc"/>-->
<!-- <script src="${/request/@context_path}/javascripts/identity_card_info_query.js"-->
......@@ -383,10 +384,39 @@
// }
// }
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
//法人供应商非必填 18083 2022/11/25
if(record.get('bp_class') == 'ORG' && record.get("bp_type") == 'VENDER'){
record.getField('id_card_no_leg').setRequired(false);
}
if(record.get('bp_class') && record.get('bp_class') == 'ORG'){
if(record.get('bp_type') == 'TENANT'){
record.getField('etp_sts').setRequired(true);
//record.getField('credit_code').setRequired(true);
record.getField('etp_sts_n').setRequired(true);
record.getField('org_type').setRequired(true);
record.getField('org_type_n').setRequired(true);
record.getField('org_type_sub').setRequired(true);
record.getField('org_type_sub_n').setRequired(true);
record.getField('enterprise_scale').setRequired(true);
record.getField('enterprise_scale_n').setRequired(true);
record.getField('due_date').setRequired(true);
record.getField('org_unit_property').setRequired(true);
record.getField('org_unit_property_n').setRequired(true);
//record.getField('industry').setRequired(true);
//record.getField('industry_n').setRequired(true);
record.getField('industry_a').setRequired(true);
record.getField('industry_a_n').setRequired(true);
record.getField('industry_b').setRequired(true);
record.getField('industry_b_n').setRequired(true);
record.getField('industry_c').setRequired(true);
record.getField('industry_c_n').setRequired(true);
record.getField('industry_d').setRequired(true);
record.getField('industry_d_n').setRequired(true);
record.getField('nationalities').setRequired(true);
record.getField('nationalities_n').setRequired(true);
}
}
//法人供应商非必填 18083 2022/11/25
if(record.get('bp_class') == 'ORG' && record.get("bp_type") == 'VENDER'){
record.getField('id_card_no_leg').setRequired(false);
}
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
old_bp_name = record.get('bp_name');
......@@ -410,16 +440,16 @@
}
}
if(record.get('bp_class')&&record.get('bp_class')=='NP'){
if (record.get('marital_status') && (record.get('marital_status') == '30' || record.get('marital_status') == '40')) {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
if (record.get('marital_status') && (record.get('marital_status') == '30' || record.get('marital_status') == '40')) {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
}
}
}
}
......@@ -451,16 +481,16 @@
}
//法人供应商非必填 18083 2022/11/25
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();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
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();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
......@@ -476,16 +506,16 @@
}
//法人供应商非必填 18083 2022/11/25
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();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
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();
if(bp_record.get('bp_class') == 'ORG' && bp_record.get("bp_type") == 'VENDER'){
if(sign_ds_id == ds.id &&sign_ds_id){
var records = $(sign_ds_id).getAll();
for (i = 0; i < records.length; i++) {
records[i].getField('id_card').setRequired(false);
}
}
}
}
//更新时调用 add by liukang
......@@ -496,6 +526,29 @@
var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
//中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT' && name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else {
return true;
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
}
if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) {
if (name == 'relationship_with_bp') {
......@@ -675,6 +728,69 @@
}
}
//征信添加限制
if(name == 'work_status'){
//当“就业状况”为“11 国家公务员”、“ 13 专业技术人员”、“ 17 职员”、“ 21 企业管理人员”、“ 24 工人”或“ 91 在职”时,
// “单位名称”、“单位性质”、“单位所属行业”、“职业类型 、“职务”、“职称”、“入职年份”、单位地址、“单位所在地邮编”、“单位所在地行政区划”、“单位电话”必填。
// 其余情况,这些字段为空只读
if(value == '11'||value == '13'||value == '17'||value == '21'||value == '24'||value == '91'){
record.getField('work_unit').setReadOnly(false);
record.getField('work_unit').setRequired(true);
record.getField('unit_properties_n').setReadOnly(false);
record.getField('unit_properties_n').setRequired(true);
record.getField('occuption_n').setReadOnly(false);
record.getField('occuption_n').setRequired(true);
record.getField('position_n').setReadOnly(false);
record.getField('position_n').setRequired(true);
record.getField('positional_titles').setReadOnly(false);
record.getField('positional_titles').setRequired(true);
record.getField('entry_date').setReadOnly(false);
record.getField('entry_date').setRequired(true);
record.getField('work_unit_address').setReadOnly(false);
record.getField('work_unit_address').setRequired(true);
record.getField('work_unit_zip').setReadOnly(false);
record.getField('work_unit_zip').setRequired(true);
record.getField('work_province_n').setReadOnly(false);
record.getField('work_province_n').setRequired(true);
record.getField('work_city_n').setReadOnly(false);
record.getField('work_city_n').setRequired(true);
record.getField('work_district_n').setReadOnly(false);
record.getField('work_district_n').setRequired(true);
record.getField('work_unit_phone').setReadOnly(false);
record.getField('work_unit_phone').setRequired(true);
record.getField('industry_a_n').setReadOnly(false);
record.getField('industry_a_n').setRequired(true);
}else{
record.getField('work_unit').setReadOnly(true);
record.getField('work_unit').setRequired(false);
record.getField('unit_properties_n').setReadOnly(true);
record.getField('unit_properties_n').setRequired(false);
record.getField('occuption_n').setReadOnly(true);
record.getField('occuption_n').setRequired(false);
record.getField('position_n').setReadOnly(true);
record.getField('position_n').setRequired(false);
record.getField('positional_titles').setReadOnly(true);
record.getField('positional_titles').setRequired(false);
record.getField('entry_date').setReadOnly(true);
record.getField('entry_date').setRequired(false);
record.getField('work_unit_address').setReadOnly(true);
record.getField('work_unit_address').setRequired(false);
record.getField('work_unit_zip').setReadOnly(true);
record.getField('work_unit_zip').setRequired(false);
record.getField('work_province_n').setReadOnly(true);
record.getField('work_province_n').setRequired(false);
record.getField('work_city_n').setReadOnly(true);
record.getField('work_city_n').setRequired(false);
record.getField('work_district_n').setReadOnly(true);
record.getField('work_district_n').setRequired(false);
record.getField('work_unit_phone').setReadOnly(true);
record.getField('work_unit_phone').setRequired(false);
record.getField('industry_a_n').setReadOnly(true);
record.getField('industry_a_n').setRequired(false);
}
}
//征信add end
}
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
......@@ -686,37 +802,37 @@
var hd_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
record = $(hd_ds).getCurrentRecord();
if(record.get('bp_class')=='NP'){
if (name == 'marital_status' && value) {
if (name == 'marital_status' && value) {
if (value == '30' || value == '40') {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
if (!record.get('card_type_sp')) {
record.set('card_type_sp', 'ID_CARD');
record.set('card_type_sp_n', '身份证');
}
if (value == '30' || value == '40') {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'block';
record.getField('bp_name_sp').setRequired(true);
record.getField('card_type_sp').setRequired(true);
record.getField('card_type_sp_n').setRequired(true);
record.getField('id_no_sp').setRequired(true);
if (!record.get('card_type_sp')) {
record.set('card_type_sp', 'ID_CARD');
record.set('card_type_sp_n', '身份证');
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
// record.set('bp_name_sp', null);
// record.set('card_type_sp', null);
// record.set('card_type_sp_n', null);
// record.set('id_no_sp', null);
// record.set('date_of_birth_sp', null);
// record.set('cell_phone_sp', null);
// record.set('work_unit_phone_sp', null);
// record.set('work_unit_name_sp', null);
// record.set('work_unit_address_sp', null);
}
} else {
document.getElementById('${/parameter/@layout_code}_F_SPOUSE_1_component_id').style.display = 'none';
record.getField('bp_name_sp').setRequired(false);
record.getField('card_type_sp').setRequired(false);
record.getField('card_type_sp_n').setRequired(false);
record.getField('id_no_sp').setRequired(false);
// record.set('bp_name_sp', null);
// record.set('card_type_sp', null);
// record.set('card_type_sp_n', null);
// record.set('id_no_sp', null);
// record.set('date_of_birth_sp', null);
// record.set('cell_phone_sp', null);
// record.set('work_unit_phone_sp', null);
// record.set('work_unit_name_sp', null);
// record.set('work_unit_address_sp', null);
}
}
}
if (name == 'bp_name'){
// alert(record.get('bp_name')+'2222');
record.set('invoice_title',record.get('bp_name'));
......@@ -936,6 +1052,37 @@
user_button4.style.display = 'none';
}
}*/
//征信 add start 财报查询按钮
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(bp_ds_id).getAt(0)
if (Ext.isEmpty(record.get('bp_code'))) {
Leaf.showMessage('${l:PROMPT}', '请先保存商业伙伴数据!');
return;
}
new Leaf.Window({
id: 'rsc303_fin_statement_query',
url: $('rsc303_fin_statement_link').getUrl(),
title: '查看财报',
fullScreen: true,
params: {
bp_id: record.get('bp_id') ,
bp_code:record.get('bp_code')
}
});
}
Leaf.onReady(function () {
//自然人不展示财报按钮
if('${/parameter/@bp_class}' == 'NP' && document.getElementById('${/parameter/@layout_code}_user_button2') ){
document.getElementById('${/parameter/@layout_code}_user_button2').style.display = 'none';
}
});
//征信 add end
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -407,6 +407,35 @@
if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
if(record.get('bp_class') && record.get('bp_class') == 'ORG'){
if(record.get('bp_type') == 'TENANT'){
record.getField('etp_sts').setRequired(true);
//record.getField('credit_code').setRequired(true);
record.getField('etp_sts_n').setRequired(true);
record.getField('org_type').setRequired(true);
record.getField('org_type_n').setRequired(true);
record.getField('org_type_sub').setRequired(true);
record.getField('org_type_sub_n').setRequired(true);
record.getField('enterprise_scale').setRequired(true);
record.getField('enterprise_scale_n').setRequired(true);
record.getField('due_date').setRequired(true);
record.getField('org_unit_property').setRequired(true);
record.getField('org_unit_property_n').setRequired(true);
//record.getField('industry').setRequired(true);
//record.getField('industry_n').setRequired(true);
record.getField('industry_a').setRequired(true);
record.getField('industry_a_n').setRequired(true);
record.getField('industry_b').setRequired(true);
record.getField('industry_b_n').setRequired(true);
record.getField('industry_c').setRequired(true);
record.getField('industry_c_n').setRequired(true);
record.getField('industry_d').setRequired(true);
record.getField('industry_d_n').setRequired(true);
record.getField('nationalities').setRequired(true);
record.getField('nationalities_n').setRequired(true);
}
}
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
old_bp_name = record.get('bp_name');
new_bp_name = record.get('bp_name');
......@@ -545,6 +574,30 @@
var gird_ds_id = 'BP_NP_MODIFY_N_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_MODIFY_N_BP_ASSETS04_hls_bp_assets_ds';
var gird_ds_id3 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_bank_flow');
//中征码校验
if (record.get('bp_class') == 'ORG') {
if(record.get('bp_type') == 'TENANT' && name =='credit_code'){
var credit_code = record.get('credit_code');
if (!Leaf.isEmpty(credit_code)) {
if (credit_code.length == '16'){
if(!(/^[A-Z][A-z0-9]*$/).test(credit_code)){
Leaf.showMessage('提示', '中征码首字母需要大写');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}else {
return true;
}
}else {
Leaf.showMessage('提示', '请输入16位中征码');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
}
if (gird_ds_id == ds.id || gird_ds_id2 == ds.id) {
if (name == 'relationship_with_bp') {
if (value == 'A7501') {
......@@ -792,6 +845,70 @@
}
//征信添加限制
if(name == 'work_status'){
//当“就业状况”为“11 国家公务员”、“ 13 专业技术人员”、“ 17 职员”、“ 21 企业管理人员”、“ 24 工人”或“ 91 在职”时,
// “单位名称”、“单位性质”、“单位所属行业”、“职业类型 、“职务”、“职称”、“入职年份”、单位地址、“单位所在地邮编”、“单位所在地行政区划”、“单位电话”必填。
// 其余情况,这些字段为空只读
if(value == '11'||value == '13'||value == '17'||value == '21'||value == '24'||value == '91'){
record.getField('work_unit').setReadOnly(false);
record.getField('work_unit').setRequired(true);
record.getField('unit_properties_n').setReadOnly(false);
record.getField('unit_properties_n').setRequired(true);
record.getField('occuption_n').setReadOnly(false);
record.getField('occuption_n').setRequired(true);
record.getField('position_n').setReadOnly(false);
record.getField('position_n').setRequired(true);
record.getField('positional_titles').setReadOnly(false);
record.getField('positional_titles').setRequired(true);
record.getField('entry_date').setReadOnly(false);
record.getField('entry_date').setRequired(true);
record.getField('work_unit_address').setReadOnly(false);
record.getField('work_unit_address').setRequired(true);
record.getField('work_unit_zip').setReadOnly(false);
record.getField('work_unit_zip').setRequired(true);
record.getField('work_province_n').setReadOnly(false);
record.getField('work_province_n').setRequired(true);
record.getField('work_city_n').setReadOnly(false);
record.getField('work_city_n').setRequired(true);
record.getField('work_district_n').setReadOnly(false);
record.getField('work_district_n').setRequired(true);
record.getField('work_unit_phone').setReadOnly(false);
record.getField('work_unit_phone').setRequired(true);
record.getField('industry_a_n').setReadOnly(false);
record.getField('industry_a_n').setRequired(true);
}else{
record.getField('work_unit').setReadOnly(true);
record.getField('work_unit').setRequired(false);
record.getField('unit_properties_n').setReadOnly(true);
record.getField('unit_properties_n').setRequired(false);
record.getField('occuption_n').setReadOnly(true);
record.getField('occuption_n').setRequired(false);
record.getField('position_n').setReadOnly(true);
record.getField('position_n').setRequired(false);
record.getField('positional_titles').setReadOnly(true);
record.getField('positional_titles').setRequired(false);
record.getField('entry_date').setReadOnly(true);
record.getField('entry_date').setRequired(false);
record.getField('work_unit_address').setReadOnly(true);
record.getField('work_unit_address').setRequired(false);
record.getField('work_unit_zip').setReadOnly(true);
record.getField('work_unit_zip').setRequired(false);
record.getField('work_province_n').setReadOnly(true);
record.getField('work_province_n').setRequired(false);
record.getField('work_city_n').setReadOnly(true);
record.getField('work_city_n').setRequired(false);
record.getField('work_district_n').setReadOnly(true);
record.getField('work_district_n').setRequired(false);
record.getField('work_unit_phone').setReadOnly(true);
record.getField('work_unit_phone').setRequired(false);
record.getField('industry_a_n').setReadOnly(true);
record.getField('industry_a_n').setRequired(false);
}
}
//征信add end
};
function upload_file(id, name, query_only) {
......
......@@ -200,6 +200,8 @@
<a:column name="ref_v02" editorFunction="codeValueNameEditer" width="100"/>
<a:column name="ref_v03" editorFunction="codeValueNameEditer" width="100"/>
<a:column name="ref_v04" editorFunction="codeValueNameEditer" width="100"/>
<a:column name="credit_code" editorFunction="codeValueNameEditer" width="100"/>
<a:column name="credit_name" editorFunction="codeValueNameEditer" width="100"/>
</a:columns>
<a:editors>
<a:checkBox id="sys_code_ref_grid_ckb"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment