Commit fd49f28f authored by stone's avatar stone

【fix】修复商业伙伴bug

parent bac65db7
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<bm:field name="ref_invoice_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ref_invoice_number"/> <bm:field name="ref_invoice_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ref_invoice_number"/>
<bm:field name="created_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="created_by_name"/> <bm:field name="created_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="created_by_name"/>
<bm:field name="confirmed_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="confirmed_by_name"/> <bm:field name="confirmed_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="confirmed_by_name"/>
<bm:field name="received_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="received_by_name"/>
<bm:field name="invoice_kind_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_N"/> <bm:field name="invoice_kind_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_N"/>
<bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_title"/> <bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_title"/>
<bm:field name="invoice_bp_address_phone_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_bp_address_phone_num"/> <bm:field name="invoice_bp_address_phone_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_bp_address_phone_num"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-12-06 上午09:52:30
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_return_pkg.csh_return_print(
p_document_id =>${@document_id},
p_user_id =>${/session/@user_id},
p_document_table=>${@document_table}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="acr513_invoice_readonly_page" <a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="bmLink_vat_pause_or_submit" model="acr.ACR515.acr_invoice_vat" modelaction="batch_update"/> <a:link id="bmLink_vat_pause_or_submit" model="acr.ACR515.acr_invoice_vat" modelaction="batch_update"/>
<a:link id="bmLink_vat_receive" model="acr.ACR515.acr_invoice_vat" modelaction="execute"/> <a:link id="bmLink_vat_receive" model="acr.ACR515.acr_invoice_vat" modelaction="execute"/>
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
}; };
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
debugger;
if ((ds.id).indexOf('hls_bp_master') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1) {
// record.getField('cell_phone').setRequired(true); // record.getField('cell_phone').setRequired(true);
//record.getField('cell_phone').setRequired(true); //record.getField('cell_phone').setRequired(true);
...@@ -137,6 +138,7 @@ ...@@ -137,6 +138,7 @@
record.getField('parent_id_n').setReadOnly(true); record.getField('parent_id_n').setReadOnly(true);
} }
} }
}; };
var card_identity_flag; var card_identity_flag;
var sp_identity_flag; var sp_identity_flag;
...@@ -461,9 +463,11 @@ ...@@ -461,9 +463,11 @@
// record.set('resident_addres', get_native_place(value)) // record.set('resident_addres', get_native_place(value))
} }
if (name == 'id_no_sp') { if (name == 'id_no_sp') {
if (!value) { if (!value) {
record.set('ccx_resmsg1', ''); record.set('ccx_resmsg1', '');
} }
if (record.get('card_type_sp') == 'ID_CARD') { if (record.get('card_type_sp') == 'ID_CARD') {
if (!checkCard(value)) { if (!checkCard(value)) {
Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!'); Leaf.showMessage('${l:HLS.PROMPT}', '配偶身份证号错误!');
...@@ -479,7 +483,7 @@ ...@@ -479,7 +483,7 @@
} }
} }
var hls_bp_master_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var hls_bp_master_ds_id = f_bp_create_ds_id;
if (ds.id == hls_bp_master_ds_id && hls_bp_master_ds_id) { if (ds.id == hls_bp_master_ds_id && hls_bp_master_ds_id) {
if (name == 'id_card_no_leg') { if (name == 'id_card_no_leg') {
if (!value) { if (!value) {
...@@ -499,39 +503,46 @@ ...@@ -499,39 +503,46 @@
} }
} }
} }
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
var test_ds_id1 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master');
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
if (ds.id==test_ds_id1||ds.id==test_ds_id2) {
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('marital_status')=='40'){
var bp2_record = $(test_ds_id1).getCurrentRecord();
if(bp2_record){
record.set('bp_name_sp',bp2_record.get('bp_name_sp'));
record.set('card_type_sp',bp2_record.get('card_type_sp'));
record.set('id_no_sp',bp2_record.get('id_no_sp'));
record.set('date_of_birth_sp',bp2_record.get('date_of_birth_sp'));
record.set('cell_phone_sp',bp2_record.get('cell_phone_sp'));
record.set('work_unit_phone_sp',bp2_record.get('work_unit_phone_sp'));
record.set('work_unit_name_sp',bp2_record.get('work_unit_name_sp'));
record.set('work_unit_address_sp',bp2_record.get('work_unit_address_sp'));
record.set('zipcode',bp2_record.get('zipcode'));
bp2_record.set('marital_status', '40');
}
}else if(record.get('marital_status')=='30'){
debugger;
var bp2_record = $(test_ds_id2).getCurrentRecord();
if(bp2_record){
record.set('bp_name_sp',bp2_record.get('bp_name_sp'));
record.set('card_type_sp',bp2_record.get('card_type_sp'));
record.set('id_no_sp',bp2_record.get('id_no_sp'));
record.set('date_of_birth_sp',bp2_record.get('date_of_birth_sp'));
record.set('cell_phone_sp',bp2_record.get('cell_phone_sp'));
record.set('work_unit_phone_sp',bp2_record.get('work_unit_phone_sp'));
record.set('work_unit_name_sp',bp2_record.get('work_unit_name_sp'));
record.set('work_unit_address_sp',bp2_record.get('work_unit_address_sp'));
record.set('zipcode',bp2_record.get('zipcode'));
bp2_record.set('marital_status', '30');
}
}
// if (ds.id == gird_ds_id4 || ds.id == gird_ds_id5) { }
// if (name == 'id_no_sp') {
// if (!value) {
// record.set('ccx_resmsg1', '');
// }
// if(record.get('card_type_sp') == 'ID_CARD'){
// if (!checkCard(value)) {
// Leaf.showMessage('${l:HLS.PROMPT}','配偶身份证号错误!');
// return false;
// }
// }
// // ds.fields.id_no_sp.pro.validator = id_card_no_validate;
// record.set('resident_addres_sp', get_native_place(value))
// }
// }
// var bp_spouse_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
// if(ds.id==bp_spouse_ds&&bp_spouse_ds){
// if (name == 'marital_status') {
// console.log(value);
// debugger
// if (value == '30') {
// record.getField('bp_name_sp').setRequired(true);
// record.getField('card_type_sp_n').setRequired(true);
// record.getField('id_no_sp').setRequired(true);
//
// } else {
// record.getField('bp_name_sp').setRequired(false);
// record.getField('card_type_sp_n').setRequired(false);
// record.getField('id_no_sp').setRequired(false);
// }
// }
// }
......
...@@ -26,20 +26,21 @@ ...@@ -26,20 +26,21 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//保存前调用 //保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); // window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// debugger // var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
// var Pattern = /^[A-Za-z]+$/; // debugger
// var record=$(bp_ds_id).getCurrentRecord(); // var Pattern = /^[A-Za-z]+$/;
// var record_name=record.get('extra_nam'); // var record=$(bp_ds_id).getCurrentRecord();
// if(record_name=='extra_nam'){ // var record_name=record.get('extra_nam');
// // if(record_name=='extra_nam'){
// if((!Pattern.test(record_name)||(record_name.length!=3))){ //
// Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!'); // if((!Pattern.test(record_name)||(record_name.length!=3))){
// window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); // Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
// return; // window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// } // return;
// } // }
// }
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord(); var bp_record = $(ds_id).getCurrentRecord();
if(old_id_card != new_id_card){ if(old_id_card != new_id_card){
...@@ -54,6 +55,15 @@ ...@@ -54,6 +55,15 @@
}else{ }else{
record.set('bp_name_change_flag','N'); record.set('bp_name_change_flag','N');
} }
var test_ds_id1 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master');
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
//var records = $(test_ds_id1);
//var record=$(records).getCurrentRecord();
//var records = $(test_ds_id2);
//var record=$(records).getAll();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}; };
...@@ -236,13 +246,13 @@ ...@@ -236,13 +246,13 @@
//新增和加载时调用form //新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
// if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) { // if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
// if (ds.fields.fin_institution_code) { // if (ds.fields.fin_institution_code) {
// ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate; // ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate;
// } // }
// if (ds.fields.trade_type_code) { // if (ds.fields.trade_type_code) {
// ds.fields.trade_type_code.pro.validator = trade_type_code_validate; // ds.fields.trade_type_code.pro.validator = trade_type_code_validate;
// } // }
// } // }
// } // }
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) { if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
...@@ -459,25 +469,55 @@ ...@@ -459,25 +469,55 @@
if (name == 'id_no_sp') { if (name == 'id_no_sp') {
// //
if (!checkCard(value)) { if (record.get('card_type_sp') == 'ID_CARD') {
Leaf.showMessage('提示', '配偶信息中,请输入正确格式的身份证!'); if (!checkCard(value)) {
return '请输入正确格式的身份证'; Leaf.showMessage('提示', '配偶信息中,请输入正确格式的身份证!');
} else if (value.length == 18) { return '请输入正确格式的身份证';
} else if (value.length == 18) {
new_id_card = record.get('id_card_no_leg');
new_id_card = record.get('id_card_no_leg');
record.set('resident_addres_sp',get_native_place(value));
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2))); record.set('resident_addres_sp',get_native_place(value));
record.set('age', new Date().getFullYear() - value.substr(6, 4)); record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
if (value.substr(16, 1) % 2 == 1) { record.set('age', new Date().getFullYear() - value.substr(6, 4));
record.set('gender', 'MALE'); if (value.substr(16, 1) % 2 == 1) {
record.set('gender_n', '男'); record.set('gender', 'MALE');
} else if (value.substr(16, 1) % 2 == 0) { record.set('gender_n', '男');
record.set('gender', 'FEMALE'); } else if (value.substr(16, 1) % 2 == 0) {
record.set('gender_n', '女'); record.set('gender', 'FEMALE');
} record.set('gender_n', '女');
}
}
} }
}
}
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
var test_ds_id1 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master');
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
if (ds.id==test_ds_id1||ds.id==test_ds_id2) {
record = $(test_ds_id).getCurrentRecord();
if(record.get('marital_status')=='40'){
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE_1', 'hls_bp_master');
var bp2_record = $(test_ds_id).getCurrentRecord();
bp2_record.set('marital_status', '40');
}else if(record.get('marital_status')=='30'){
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
var bp2_record = $(test_ds_id).getCurrentRecord();
bp2_record.set('marital_status', '30');
}
}
if(name=='marital_status'&&ds.id==test_ds_id){
if ($L.CmpManager.get(test_ds_id1)||$L.CmpManager.get(test_ds_id2)) {
var bp2_record = $L.CmpManager.get(test_ds_id1).getCurrentRecord();
var bp3_record = $L.CmpManager.get(test_ds_id2).getCurrentRecord();
bp2_record.set('marital_status', value);
bp3_record.set('marital_status', value);
} }
} }
......
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