Commit 9a27c1a0 authored by gzj34291's avatar gzj34291

第三方相关

parent ace21748
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t.*
from exp_org_position_vl t
WHERE t.POSITION_ID in
(SELECT t.POSITION_ID
FROM exp_employee_assigns t
where t.employee_id =
(SELECT t.employee_id FROM sys_user t where t.user_id = ${/session/@user_id}))
and t.position_code='012'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WW
$Date: 2014-11-13 下午5:36:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t1.user_id,t1.user_name FROM sys_user t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/> <a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/>
<a:model-query model="csh.CSH515.get_sys_post" rootPath="post_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/> <a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
...@@ -37,16 +38,30 @@ ...@@ -37,16 +38,30 @@
// // window.open(url, '_self'); // // window.open(url, '_self');
// } // }
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) {
/* var transaction_amount = ${/parameter/@transaction_amount}||0; /* var transaction_amount = ${/parameter/@transaction_amount}||0;
var return_amount = ${/parameter/@returned_amount}||0; var return_amount = ${/parameter/@returned_amount}||0;
var write_off_amount = ${/parameter/@write_off_amount}||0; var write_off_amount = ${/parameter/@write_off_amount}||0;
var remain_total_amount = ${/parameter/@remain_total_amount}||0; var remain_total_amount = ${/parameter/@remain_total_amount}||0;
var bank_slip_num = '${/parameter/@bank_slip_num}';*/ var bank_slip_num = '${/parameter/@bank_slip_num}';*/
record.set('remain_total_amount',remain_total_amount); // record.set('remain_total_amount',remain_total_amount);
record.set('bank_slip_num',bank_slip_num); // record.set('bank_slip_num',bank_slip_num);
if("${/model/post_info/record/@position_code}"!="012") {
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG_prompt").style.display = "none";
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG").style.display = "none";
}
}; };
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var band_na = $(ds_id).getAt(0).get('opposite_band_na');
var bank_branch_name = $(ds_id).getAt(0).get('bp_bank_branch_name');
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
}
//提交按钮 //提交按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
...@@ -58,11 +73,17 @@ ...@@ -58,11 +73,17 @@
var return_amount = $(ds_id).getAt(0).get('return_amount'); var return_amount = $(ds_id).getAt(0).get('return_amount');
var write_off_amount = $(ds_id).getAt(0).get('write_off_amount'); var write_off_amount = $(ds_id).getAt(0).get('write_off_amount');
var remain_total_amount = $(ds_id).getAt(0).get('remain_total_amount'); var remain_total_amount = $(ds_id).getAt(0).get('remain_total_amount');
var band_na = $(ds_id).getAt(0).get('opposite_band_na');
var bank_branch_name = $(ds_id).getAt(0).get('bp_bank_branch_name');
// var check_amount = parseFloat(transaction_amount) - parseFloat(this_return_amount) - parseFloat(return_amount) - parseFloat(write_off_amount); // var check_amount = parseFloat(transaction_amount) - parseFloat(this_return_amount) - parseFloat(return_amount) - parseFloat(write_off_amount);
if (!return_id) { if (!return_id) {
Leaf.showMessage('提示', '请先保存再提交'); Leaf.showMessage('提示', '请先保存再提交');
return; return;
} }
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return;
}
if(this_return_amount > parseFloat(remain_total_amount)){ if(this_return_amount > parseFloat(remain_total_amount)){
Leaf.showMessage('提示', '退款金额不能大于可退款金额!'); Leaf.showMessage('提示', '退款金额不能大于可退款金额!');
return; return;
...@@ -128,14 +149,18 @@ ...@@ -128,14 +149,18 @@
//更新时调用 //更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return'); var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) { if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') { if (name == 'return_bp_type' && value == 'THIRD_PARTY') {
record.getField('return_bp_code').setRequired(true); record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(false); record.getField('bp_bank_account_name').setReadOnly(true);
}else if(name == 'return_bp_type' && value != 'OTHER'){ record.getField('opposite_band_na').setReadOnly(true);
record.getField('return_bp_code').setRequired(false); record.getField('bp_bank_branch_name').setReadOnly(true);
}
if (name == 'return_bp_type' && (value == 'AGENT'||value == 'TENANT')){
record.getField('bp_bank_account_num').setReadOnly(false);
record.getField('bp_bank_account_name').setReadOnly(true); record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(false);
record.getField('bp_bank_branch_name').setReadOnly(false);
} }
} }
}; };
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/> <a:model-query fetchAll="true" model="csh.CSH560.get_fin_amount" rootPath="fin_amount_check"/>
<a:model-query model="csh.CSH515.get_sys_post" rootPath="post_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/> <a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
...@@ -18,13 +19,57 @@ ...@@ -18,13 +19,57 @@
<a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
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) {
var transaction_amount = record.get('transaction_amount') || 0; var transaction_amount = record.get('transaction_amount') || 0;
var return_amount = record.get('return_amount') || 0; var return_amount = record.get('return_amount') || 0;
var write_off_amount = record.get('write_off_amount') || 0; var write_off_amount = record.get('write_off_amount') || 0;
var deposit_total_amount = parseFloat(transaction_amount - write_off_amount - return_amount).toFixed(2); var deposit_total_amount = parseFloat(transaction_amount - write_off_amount - return_amount).toFixed(2);
record.set('deposit_total_amount', deposit_total_amount); record.set('deposit_total_amount', deposit_total_amount);
}; //调整后不为默认值高亮显示
if (record.get('bp_bank_branch_name') != record.get('bp_bank_branch_name_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_BP_BANK_BRANCH_NAME');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if (record.get('bp_bank_account_num') != record.get('bp_bank_account_num_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_BP_BANK_ACCOUNT_NUM');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if (record.get('opposite_band_na') != record.get('opposite_band_na_n')){
// 获取对应字段div的id
var req_change_id_1 = document.getElementById('${/parameter/@layout_code}_F_FORM_CSH_TRANSACTION_RETURN_OPPOSITE_BAND_NA');
// 获取当前div下所有input组件
var req_change_input_1 = req_change_id_1.getElementsByTagName('input');
// 设定第一个input组件background的color
req_change_input_1[0].style.setProperty('background-color','#ff8465','important');
};
if("${/model/post_info/record/@position_code}"!="012") {
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG_prompt").style.display = "none";
document.getElementById("CSH_TRANCTION_RETURN_F_FORM_CSH_TRANSACTION_RETURN_FINANCE_FLAG").style.display = "none";
}
if("${/model/post_info/record/@position_code}"=="012") {
record.getField('this_return_amount').setReadOnly(true);
record.getField('return_date').setReadOnly(true);
record.getField('bp_bank_branch_name').setReadOnly(true);
record.getField('notes').setReadOnly(true);
record.getField('return_bp_type').setReadOnly(true);
record.getField('return_bp_type_n').setReadOnly(true);
}
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) {
record.getField('bp_bank_account_num').setReadOnly(true);
record.getField('bp_bank_account_name').setReadOnly(true);
record.getField('opposite_band_na').setReadOnly(true);
record.getField('bp_bank_branch_name').setReadOnly(true);
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var return_id = $(ds_id).getAt(0).get('return_id'); var return_id = $(ds_id).getAt(0).get('return_id');
...@@ -130,6 +175,8 @@ ...@@ -130,6 +175,8 @@
//add by zhuxianfei 20181108 拒绝需要输入意见 //add by zhuxianfei 20181108 拒绝需要输入意见
function zjwfl5110_beforeapproveCheck(type) { function zjwfl5110_beforeapproveCheck(type) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var return_recode = $(ds_id).getCurrentRecord();
if (type == 'refuse') { if (type == 'refuse') {
if ('${/parameter/@instance_id}') { if ('${/parameter/@instance_id}') {
var root_ds = $('${/parameter/@layout_code}_virtual_ds'); var root_ds = $('${/parameter/@layout_code}_virtual_ds');
...@@ -143,10 +190,25 @@ ...@@ -143,10 +190,25 @@
} }
}else { }else {
return true; return true;
} }
} }
if("${/model/post_info/record/@position_code}"=="012") {
zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
var return_recode = $(ds_id).getCurrentRecord();
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
if (type == 'agree') {
if (Leaf.isEmpty(return_recode.get('finance_flag'))||return_recode.get('finance_flag')!='Y') {
Leaf.showMessage('提示', '请先审核第三方银行信息,并进行勾选通过。');
return false;
} else {
return true;
}
}else return true;
});
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query fetchAll="true" model="hls.HLS213N.hls_bp_master_unit" rootPath="user_agent_description"/> <a:model-query fetchAll="true" model="hls.HLS213N.hls_bp_master_unit" rootPath="user_agent_description"/>
<a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/> <a:model-query fetchAll="true" model="hls.HLS214N.hls_bp_master_modify_user" rootPath="modify_user"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="get_special_fields_link_id" model="hls.HLS213N.social_code_exist" modelaction="update"/> <a:link id="get_special_fields_link_id" model="hls.HLS213N.social_code_exist" modelaction="update"/>
...@@ -29,27 +30,32 @@ ...@@ -29,27 +30,32 @@
var employee_type_id = '${/model/modify_user/record/@employee_type_id}'; 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 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 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'); var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var bp_record = $(bp_ds_id).getCurrentRecord(); var bp_record = $(bp_ds_id).getCurrentRecord();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getCurrentRecord();
bp_record.set('bp_category', '${/parameter/@bp_category}'); bp_record.set('bp_category', '${/parameter/@bp_category}');
bp_record.set('owner_user_id', '${/session/@user_id}'); bp_record.set('owner_user_id', '${/session/@user_id}');
bp_record.set('unit_id', unit_id); bp_record.set('unit_id', unit_id);
bp_record.set('unit_id_n', unit_id_n); bp_record.set('unit_id_n', unit_id_n);
if (employee_type_id == '64') { if(bp_record.get('bp_type')!='THIRD_PARTY'){
bp_record.getField('unit_id_n').setReadOnly(true); if (employee_type_id == '64') {
bp_record.getField('unit_id_n').setRequired(false); bp_record.getField('unit_id_n').setReadOnly(true);
} else { bp_record.getField('unit_id_n').setRequired(false);
bp_record.getField('unit_id_n').setReadOnly(false); } else {
bp_record.getField('unit_id_n').setRequired(true); bp_record.getField('unit_id_n').setReadOnly(false);
bp_record.getField('unit_id_n').setRequired(true);
}
} }
if ('${/parameter/@bp_type}' == 'AGENT') { if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false); bp_record.getField('agent_type_n').setReadOnly(false);
// bp_record.getField('agent_type_n').setRequired(true); // bp_record.getField('agent_type_n').setRequired(true);
} else { } else {
bp_record.getField('agent_type_n').setReadOnly(true); bp_record.getField('agent_type_n').setReadOnly(true);
// bp_record.getField('agent_type_n').setRequired(false); // bp_record.getField('agent_type_n').setRequired(false);
...@@ -75,7 +81,7 @@ ...@@ -75,7 +81,7 @@
bp_master_role_ds.add(record); bp_master_role_ds.add(record);
var address_ds_id_ds = $(address_ds_id); var address_ds_id_ds = $(address_ds_id);
var address_bp_record = $('${/parameter/@default_value_dsid}').getCurrentRecord(); var address_bp_record = $('${/parameter/@default_value_dsid}').getCurrentRecord();
if (address_bp_record.get('bp_class') == 'NP'){ if (address_bp_record.get('bp_class') == 'NP'&&record.get('bp_type') != 'THIRD_PARTY'){
//POSTAL_ADDRESS 通讯地址 //POSTAL_ADDRESS 通讯地址
var record1 = new Leaf.Record({ var record1 = new Leaf.Record({
'address_type': 'HOUSEHOLD_ADDRESS', 'address_type': 'HOUSEHOLD_ADDRESS',
...@@ -100,20 +106,22 @@ ...@@ -100,20 +106,22 @@
address_record1.getField('address_type_n').setReadOnly(true); address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true); address_record1.getField('country_id_n').setReadOnly(true);
}else if (address_bp_record.get('bp_class') == 'ORG'){ }else if (address_bp_record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY'){
//法人 //法人
//POSTAL_ADDRESS 通讯地址 //POSTAL_ADDRESS 通讯地址
var record2 = new Leaf.Record({ if(bp_record.get('bp_type')!='THIRD_PARTY') {
'address_type': 'POSTAL_ADDRESS', var record2 = new Leaf.Record({
'address_type_n': '通讯地址', 'address_type': 'POSTAL_ADDRESS',
'country_id': 32, 'address_type_n': '通讯地址',
'country_id_n': '中华人民共和国' 'country_id': 32,
}); 'country_id_n': '中华人民共和国'
address_ds_id_ds.add(record2); });
address_ds_id_ds.add(record2);
var address_record = address_ds_id_ds.getAt(0);
address_record.getField('address_type_n').setReadOnly(true); var address_record = address_ds_id_ds.getAt(0);
address_record.getField('country_id_n').setReadOnly(true); address_record.getField('address_type_n').setReadOnly(true);
address_record.getField('country_id_n').setReadOnly(true);
}
} }
var current_record = bp_master_role_ds.getAt(0); var current_record = bp_master_role_ds.getAt(0);
current_record.getField('bp_type_n').setReadOnly(true); current_record.getField('bp_type_n').setReadOnly(true);
...@@ -163,6 +171,17 @@ ...@@ -163,6 +171,17 @@
}; };
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( record.get('bp_type')== 'THIRD_PARTY'){
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_USER_BUTTON1_layout_dynamic_button_id').style.display = "none";
}
}
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);
...@@ -176,6 +195,7 @@ ...@@ -176,6 +195,7 @@
if (ds.fields.parent_id) { if (ds.fields.parent_id) {
record.getField('parent_id_n').setReadOnly(true); record.getField('parent_id_n').setReadOnly(true);
} }
if (record.get('bp_class') && record.get('bp_class') == 'ORG') { if (record.get('bp_class') && record.get('bp_class') == 'ORG') {
if (record.get('invoice_method') == 'BILLING') { if (record.get('invoice_method') == 'BILLING') {
record.getField('taxpayer_type').setRequired(true); record.getField('taxpayer_type').setRequired(true);
...@@ -216,7 +236,7 @@ ...@@ -216,7 +236,7 @@
} }
record.set('invoice_title', record.get('bp_name')); record.set('invoice_title', record.get('bp_name'));
if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){ if(record.get('taxpayer_type') == 'GENERAL_TAXPAYER'&&record.get('bp_type') != 'THIRD_PARTY'){
//设置开票类型为纸质只读 //设置开票类型为纸质只读
record.set('invoice_type','PAPER'); record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票'); record.set('invoice_type_n','纸质发票');
...@@ -225,7 +245,7 @@ ...@@ -225,7 +245,7 @@
record.getField('invoice_type').setRequired(false); record.getField('invoice_type').setRequired(false);
record.getField('invoice_type_n').setRequired(false); record.getField('invoice_type_n').setRequired(false);
record.getField('reception_maile').setRequired(false); record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){ }else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'&&record.get('bp_type') != 'THIRD_PARTY'){
record.set('invoice_type','ECT'); record.set('invoice_type','ECT');
record.set('invoice_type_n','电子发票'); record.set('invoice_type_n','电子发票');
record.getField('invoice_type').setRequired(true); record.getField('invoice_type').setRequired(true);
...@@ -407,11 +427,72 @@ ...@@ -407,11 +427,72 @@
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
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 head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
var file_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var file_record = $(file_ds_id).getAll();
if(bank_record.length>0){
var flag = true;
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
if(flag == false){
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;
if(role_records.length>1){
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('bp_type')=='THIRD_PARTY'){
role_flag=false;
}
}
}
if(role_flag==false){
Leaf.showErrorMessage('${l:PROMPT}', '第三方不能含有其他角色类型');
return false;
}
if(head_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
return false;
} else{
for(var i=0;i<bank_record.length;i++){
if (Leaf.isEmpty(bank_record[i].get('bank_account_name'))||
Leaf.isEmpty(bank_record[i].get('bank_account_num'))||
Leaf.isEmpty(bank_record[i].get('bank_full_name'))){
flag = false;
break;
}
else{
flag = true;
}
}
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 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'){ if (head_record.get('bp_class') =='NP'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址 //判断户籍地址
var flag = true; var flag = true;
if (records_addr.length <=0){ if (records_addr.length <=0){
...@@ -441,7 +522,7 @@ ...@@ -441,7 +522,7 @@
return false; return false;
} }
} }
}else if (head_record.get('bp_class') == 'ORG'){ }else if (head_record.get('bp_class') == 'ORG'&&head_record.get('bp_type')!='THIRD_PARTY'){
//判断通讯地址 //判断通讯地址
var flag1 = true; var flag1 = true;
if (records_addr.length <= 0){ if (records_addr.length <= 0){
...@@ -767,7 +848,7 @@ ...@@ -767,7 +848,7 @@
} }
} }
if (name == 'taxpayer_type' && value) { if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') { if (record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY') {
if (value == 'SMALL_SCALE_TAXPAYER') { if (value == 'SMALL_SCALE_TAXPAYER') {
record.getField('taxpayer_type').setRequired(true); record.getField('taxpayer_type').setRequired(true);
...@@ -832,6 +913,7 @@ ...@@ -832,6 +913,7 @@
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role'); var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) { if (role_ds == ds.id) {
var flag=true;
var bp_type_flag='N'; var bp_type_flag='N';
var records = $(ds.id).getAll(); var records = $(ds.id).getAll();
if(name=='bp_type'){ if(name=='bp_type'){
...@@ -849,8 +931,10 @@ ...@@ -849,8 +931,10 @@
} }
} }
} }
} }
var primary_flag = record.get('primary_flag'); var primary_flag = record.get('primary_flag');
if (primary_flag == 'Y') { if (primary_flag == 'Y') {
var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var bm_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
...@@ -865,13 +949,14 @@ ...@@ -865,13 +949,14 @@
}; };
function upload_file(id, name, query_only) { function upload_file(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) { if (record.get('check_id')) {
var url; var url;
if (query_only == 'Y') { if (query_only == 'Y') {
url = $('hls214N_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); url = $('hls214N_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
} else { } 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({ var win = new Leaf.Window({
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
$Purpose: 商业伙伴创建 入口界面 $Purpose: 商业伙伴创建 入口界面
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="hls.HLS214N.sys_user_lv" rootPath="user_name_path"/>
</a:init-procedure>
<a:view> <a:view>
<a:link id="hls_bp_master_link" url="${/request/@context_path}/modules/hls/HLS213N/hls_bp_master_create.lview"/> <a:link id="hls_bp_master_link" url="${/request/@context_path}/modules/hls/HLS213N/hls_bp_master_create.lview"/>
<a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -14,12 +18,22 @@ ...@@ -14,12 +18,22 @@
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 record = $(ds_id).getCurrentRecord(); var record = $(ds_id).getCurrentRecord();
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
if(record.get('bp_type')=='THIRD_PARTY'){
record.set('function_code', 'HLS213D_N');
record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
record.data['url_title'] = '商业伙伴创建';
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}else{
record.set('function_code', 'HLS213D'); record.set('function_code', 'HLS213D');
record.set('function_usage', 'CREATE'); record.set('function_usage', 'CREATE');
record.set('default_value_dsid', ds_id); record.set('default_value_dsid', ds_id);
record.data['url_title'] = '商业伙伴创建'; record.data['url_title'] = '商业伙伴创建';
var param = record.data; var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}'); hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}
} }
}; };
//更新时调用 //更新时调用
...@@ -50,14 +64,22 @@ ...@@ -50,14 +64,22 @@
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master'); var bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if(ds.id == bp_create_ds_id){ debugger;
var r= $(bp_create_ds_id).getCurrentRecord(); if(ds.id == bp_create_ds_id) {
if(!r.get('bp_category')){ var r = $(bp_create_ds_id).getCurrentRecord();
r.set('bp_category','TENANT'); if (!r.get('bp_category')) {
r.set('bp_category_n','承租人'); r.set('bp_category', 'TENANT');
r.set('bp_category_n', '承租人');
} }
}
if("${/model/user_name_path/record/@user_name}"=="DSF001"||"${/model/user_name_path/record/@user_name}"=="DSF002"){
r.set('bp_type','THIRD_PARTY');
r.set('bp_type_n', '第三方');
}else{
r.set('bp_type','TENANT') ;
r.set('bp_type_n', '承租人');
}
}
}; };
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
...@@ -47,6 +47,26 @@ ...@@ -47,6 +47,26 @@
// return; // return;
// } // }
// } // }
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
}
}
if(flag == false){
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_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var v_primary_flag_count=0; var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll(); var role_records = $(role_ds_id).getAll();
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true"> trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/> <a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="default_value"/> <a:model-query fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="default_value"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="hls.HLS214N.sys_user_lv" rootPath="user_name_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
...@@ -41,15 +42,19 @@ ...@@ -41,15 +42,19 @@
var record=$(ds_id).selected[0]; var record=$(ds_id).selected[0];
var param = record.data; var param = record.data;
var bp_class = record.get('bp_class'); var bp_class = record.get('bp_class');
if(record.get('bp_type')=='THIRD_PARTY'){
Leaf.showMessage('提示', '第三方不能开票申请');
return;
}
if(record.get('invoice_wfl_status') == 'APPROVING' || record.get('bp_wfl_status') == 'APPROVING'){ if(record.get('invoice_wfl_status') == 'APPROVING' || record.get('bp_wfl_status') == 'APPROVING'){
//审批中调用 //审批中调用
param['function_code'] = 'HLS214BR_Q'; param['function_code'] = 'HLS214BR_Q';
param['bp_class'] = bp_class; param['bp_class'] = bp_class;
param['url_title'] = '开票申请信息'; param['url_title'] = '开票申请信息';
// param['change_req_id'] = res.result.change_req_id; // param['change_req_id'] = res.result.change_req_id;
param['document_id'] = record.get('bp_id'); param['document_id'] = record.get('bp_id');
param['function_usage'] = 'QUERY'; param['function_usage'] = 'QUERY';
param['query_only'] = 'Y'; param['query_only'] = 'Y';
// window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_billing_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_billing_link', ds_id);
// var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/update'; // var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/update';
...@@ -96,7 +101,6 @@ ...@@ -96,7 +101,6 @@
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.change_req_id) { if (res.result.change_req_id) {
param['winid'] = 'bp_master_invoice_detail_win'; param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214B'; param['function_code'] = 'HLS214B';
param['bp_class'] = bp_class; param['bp_class'] = bp_class;
...@@ -140,6 +144,16 @@ ...@@ -140,6 +144,16 @@
param['query_only'] = 'Y'; param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){ }else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
if (record.get('bp_type')=='THIRD_PARTY'&&"${/model/role_info/record/@role_code}"!="HAND"&&"${/model/user_name_path/record/@user_name}"!="DSF001"&&"${/model/user_name_path/record/@user_name}"!="DSF002") {
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
param['bp_class'] = bp_class;
param['cond_para1'] = user_category;
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
return;
}
if(submit_flag == 'Y'){ if(submit_flag == 'Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...@@ -151,19 +165,34 @@ ...@@ -151,19 +165,34 @@
success: function (res) { success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){ if(res.result.change_req_id){
if(record.get('bp_type')=='THIRD_PARTY'){
param['function_code'] = 'HLS214F_N';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}else{
param['function_code'] = 'HLS214F';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}
param['function_code'] = 'HLS214F';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
} }
}, },
failure: function () { failure: function () {
...@@ -175,13 +204,50 @@ ...@@ -175,13 +204,50 @@
scope: this scope: this
}); });
}else{ }else{
param['function_code'] = 'HLS214D'; if(record.get('bp_type')=='THIRD_PARTY'){
param['function_usage'] = 'MODIFY'; window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
param['bp_class'] = bp_class; var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/execute';
param['cond_para1'] = user_category; Leaf.request({
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}'; url: url,
param['query_only'] = 'N'; para: {
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id); bp_id: record.get('bp_id')
},
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if(res.result.change_req_id){
param['function_code'] = 'HLS214F_N';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['change_req_id'] = res.result.change_req_id;
param['document_id'] = res.result.change_req_id;
param['cond_para1'] = user_category;
param['bp_name_updated_flag'] = record.get('bp_name_updated_flag');
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
param['delete_flag'] = 'Y';
// param['layout_debugger_flag']='Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_req_modify_link', ds_id);
}
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}else{
param['function_code'] = 'HLS214D';
param['function_usage'] = 'MODIFY';
param['bp_class'] = bp_class;
param['cond_para1'] = user_category;
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
param['query_only'] = 'N';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}
} }
} }
} }
......
...@@ -49,26 +49,82 @@ ...@@ -49,26 +49,82 @@
// } // }
// } // }
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req'); var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role_req');
var v_primary_flag_count=0; var v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll(); var role_flag=true;
for (var i = 0;i < role_records.length;i++) { var role_records = $(role_ds_id).getAll();
if(role_records[i].get('primary_flag') == 'Y'){ for (var i = 0;i < role_records.length;i++) {
v_primary_flag_count=v_primary_flag_count+1; if(role_records[i].get('primary_flag') == 'Y'){
v_primary_flag_count=v_primary_flag_count+1;
}
}
if(v_primary_flag_count!=1){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!');
return false;
}
if(role_records.length>1){
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('bp_type')=='THIRD_PARTY'){
role_flag=false;
}
}
}
if(role_flag==false){
Leaf.showErrorMessage('${l:PROMPT}', '第三方不能含有其他角色类型');
return false;
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req');
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
var records_addr = $(address_ds_id).getAll();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
} }
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if(bp_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
return false;
} else{
for(var i=0;i<bank_record.length;i++){
if (Leaf.isEmpty(bank_record[i].get('bank_account_name'))||
Leaf.isEmpty(bank_record[i].get('bank_account_num'))||
Leaf.isEmpty(bank_record[i].get('bank_full_name'))){
flag = false;
break;
}
else{
flag = true;
}
} }
if(v_primary_flag_count!=1){ if(flag == false){
Leaf.showErrorMessage('错误', '一个商业伙伴有且仅有一个主角色!'); Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false; return false;
} }
}
}
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_req'); if (bp_record.get('bp_class') == 'NP'&&bp_record.get('bp_type')!='THIRD_PARTY'){
var bp_record = $(ds_id).getCurrentRecord();
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address_req');
var records_addr = $(address_ds_id).getAll();
if (bp_record.get('bp_class') == 'NP'){
//判断户籍地址 //判断户籍地址
var flag = true; var flag = true;
if (records_addr.length <=0){ if (records_addr.length <=0){
...@@ -99,7 +155,7 @@ ...@@ -99,7 +155,7 @@
} }
} }
}else if (bp_record.get('bp_class') == 'ORG'){ }else if (bp_record.get('bp_class') == 'ORG'&&bp_record.get('bp_type')!='THIRD_PARTY'){
//判断通讯地址 //判断通讯地址
var flag1 = true; var flag1 = true;
if (records_addr.length <= 0){ if (records_addr.length <= 0){
...@@ -325,7 +381,9 @@ ...@@ -325,7 +381,9 @@
var new_id_card; var new_id_card;
var old_bp_name; var old_bp_name;
var new_bp_name; var new_bp_name;
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add_and_load'] = function (ds, record, config_records, bp_seq) {
//
// }
//新增和加载时调用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) {
...@@ -337,6 +395,16 @@ ...@@ -337,6 +395,16 @@
// } // }
// } // }
// } // }
if( record.get('bp_type')== 'THIRD_PARTY'){
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_ADD_layout_dynamic_button_id').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_G_ROLE_DELETE_layout_dynamic_button_id')){
document.getElementById('${/parameter/@layout_code}_G_ROLE_DELETE_layout_dynamic_button_id').style.display = "none";
}
}
if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) { if ((ds.id).indexOf('hls_bp_master_req') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
var employee_type_id = '${/model/modify_user/record/@employee_type_id}'; var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
...@@ -403,9 +471,10 @@ ...@@ -403,9 +471,10 @@
} }
} }
var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req'); var role_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_ROLE', 'hls_bp_master_role_req');
if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){ if("${/model/role_info/record/@role_code}"!="0017"&&"${/model/role_info/record/@role_code}"!="HAND"){
if(role_ds_id == ds.id){ if(role_ds_id == ds.id){
var records = $(ds.id).getAll(); var records = $(ds.id).getAll();
for (var i = 0;i < records.length;i++) { for (var i = 0;i < records.length;i++) {
records[i].getField('primary_flag').setReadOnly(true); records[i].getField('primary_flag').setReadOnly(true);
...@@ -890,6 +959,26 @@ ...@@ -890,6 +959,26 @@
Leaf.showMessage('提示', '请先保存!'); Leaf.showMessage('提示', '请先保存!');
return; return;
} }
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
var record = $(ds_id).getAt(0); var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () { Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () {
......
...@@ -150,6 +150,26 @@ ...@@ -150,6 +150,26 @@
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division'); var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division');
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 record_agent =$(agent_id).getAll(); var record_agent =$(agent_id).getAll();
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_account');
var bank_record = $(bank_ds_id).getAll();
if(bank_record.length>0){
var flag = true;
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
var branch_name=bank_record[i].get('bank_branch_name');
if (!Leaf.isEmpty(bank_record[i].get('bank_full_name'))&&
!Leaf.isEmpty(bank_record[i].get('bank_branch_name'))){
if(branch_name.indexOf(full_name)==-1){
flag = false;
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
}
}
//增加三位字母大写的校验 //增加三位字母大写的校验
var head_record = $(ds_id).getCurrentRecord(); var head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name'); var english_name= head_record.get('english_name');
...@@ -178,11 +198,12 @@ ...@@ -178,11 +198,12 @@
return false; return false;
}} }}
if(social_code){ if(social_code){
if(!CheckSocialCreditCode(social_code)){ // if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null); // $L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; // return false;
}} // }
}
}; };
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...@@ -308,6 +329,9 @@ ...@@ -308,6 +329,9 @@
record.getField('agent_bs_area_level').setPropertity('validator', 'hls303_record_field_validator'); record.getField('agent_bs_area_level').setPropertity('validator', 'hls303_record_field_validator');
record.getField('validity_period_from').setPropertity('validator', 'hls303_record_field_validator'); record.getField('validity_period_from').setPropertity('validator', 'hls303_record_field_validator');
record.getField('validity_period_to').setPropertity('validator', 'hls303_record_field_validator'); record.getField('validity_period_to').setPropertity('validator', 'hls303_record_field_validator');
if(record.get('extra_nam')=='茂甲'||record.get('extra_nam')=='铁甲'){
record.getField('agent_phone').setRequired(true);
}
} }
if (ds_renew_id == ds.id) { if (ds_renew_id == ds.id) {
ds.getField('valid_date_to').setPropertity('validator', 'hls303d_record_field_validator'); ds.getField('valid_date_to').setPropertity('validator', 'hls303d_record_field_validator');
......
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