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 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure>
<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:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
......@@ -37,16 +38,30 @@
// // 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) {
/* var transaction_amount = ${/parameter/@transaction_amount}||0;
var return_amount = ${/parameter/@returned_amount}||0;
var write_off_amount = ${/parameter/@write_off_amount}||0;
var remain_total_amount = ${/parameter/@remain_total_amount}||0;
var bank_slip_num = '${/parameter/@bank_slip_num}';*/
record.set('remain_total_amount',remain_total_amount);
record.set('bank_slip_num',bank_slip_num);
// record.set('remain_total_amount',remain_total_amount);
// 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() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
......@@ -58,11 +73,17 @@
var return_amount = $(ds_id).getAt(0).get('return_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 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);
if (!return_id) {
Leaf.showMessage('提示', '请先保存再提交');
return;
}
if(bank_branch_name.indexOf(band_na)==-1){
Leaf.showMessage('提示', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return;
}
if(this_return_amount > parseFloat(remain_total_amount)){
Leaf.showMessage('提示', '退款金额不能大于可退款金额!');
return;
......@@ -128,14 +149,18 @@
//更新时调用
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');
if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') {
record.getField('return_bp_code').setRequired(true);
record.getField('bp_bank_account_name').setReadOnly(false);
}else if(name == 'return_bp_type' && value != 'OTHER'){
record.getField('return_bp_code').setRequired(false);
if (name == 'return_bp_type' && value == 'THIRD_PARTY') {
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);
}
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('opposite_band_na').setReadOnly(false);
record.getField('bp_bank_branch_name').setReadOnly(false);
}
}
};
......
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
<a:init-procedure>
<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:view>
<a:link id="csh560_start_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="execute"/>
......@@ -18,12 +19,56 @@
<a:link id="transaction_return_downloadFile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
<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) {
var transaction_amount = record.get('transaction_amount') || 0;
var return_amount = record.get('return_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);
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 () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
......@@ -130,6 +175,8 @@
//add by zhuxianfei 20181108 拒绝需要输入意见
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 ('${/parameter/@instance_id}') {
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
......@@ -145,8 +192,23 @@
}else {
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>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -6,6 +6,10 @@
$Purpose: 商业伙伴创建 入口界面
-->
<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: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"/>
......@@ -14,6 +18,15 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record = $(ds_id).getCurrentRecord();
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_usage', 'CREATE');
record.set('default_value_dsid', ds_id);
......@@ -21,6 +34,7 @@
var param = record.data;
hls_doc_get_layout_code('get_layout_code_link_id', param, 'hls_bp_master_link', null, '${/parameter/@layout_code}');
}
}
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq){
......@@ -50,14 +64,22 @@
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');
if(ds.id == bp_create_ds_id){
var r= $(bp_create_ds_id).getCurrentRecord();
if(!r.get('bp_category')){
r.set('bp_category','TENANT');
r.set('bp_category_n','承租人');
}
debugger;
if(ds.id == bp_create_ds_id) {
var r = $(bp_create_ds_id).getCurrentRecord();
if (!r.get('bp_category')) {
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>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -47,6 +47,26 @@
// 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 v_primary_flag_count=0;
var role_records = $(role_ds_id).getAll();
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<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 defaultWhereClause="t1.user_id=${/session/@user_id}" model="hls.HLS214N.sys_user_lv" rootPath="user_name_path"/>
</a:init-procedure>
<a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
......@@ -41,6 +42,10 @@
var record=$(ds_id).selected[0];
var param = record.data;
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'){
//审批中调用
param['function_code'] = 'HLS214BR_Q';
......@@ -96,7 +101,6 @@
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
if (res.result.change_req_id) {
param['winid'] = 'bp_master_invoice_detail_win';
param['function_code'] = 'HLS214B';
param['bp_class'] = bp_class;
......@@ -140,6 +144,16 @@
param['query_only'] = 'Y';
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'){
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'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -151,7 +165,20 @@
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
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;
......@@ -165,6 +192,43 @@
// 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{
if(record.get('bp_type')=='THIRD_PARTY'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var url = '${/request/@context_path}/autocrud/hls.HLS214N.hls_bp_master_req_create/execute';
Leaf.request({
url: url,
para: {
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']();
......@@ -183,6 +247,8 @@
param['query_only'] = 'N';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);
}
}
}
}
......
......@@ -50,6 +50,7 @@
// }
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 role_flag=true;
var role_records = $(role_ds_id).getAll();
for (var i = 0;i < role_records.length;i++) {
if(role_records[i].get('primary_flag') == 'Y'){
......@@ -61,14 +62,69 @@
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();
if (bp_record.get('bp_class') == 'NP'){
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(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请将银行账户信息填写完整');
return false;
}
}
}
if (bp_record.get('bp_class') == 'NP'&&bp_record.get('bp_type')!='THIRD_PARTY'){
//判断户籍地址
var flag = true;
if (records_addr.length <=0){
......@@ -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;
if (records_addr.length <= 0){
......@@ -325,7 +381,9 @@
var new_id_card;
var old_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
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) {
......@@ -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) {
var employee_type_id = '${/model/modify_user/record/@employee_type_id}';
......@@ -403,6 +471,7 @@
}
}
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(role_ds_id == ds.id){
var records = $(ds.id).getAll();
......@@ -890,6 +959,26 @@
Leaf.showMessage('提示', '请先保存!');
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()) {
var record = $(ds_id).getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '确定提交审批吗?', function () {
......
......@@ -150,6 +150,26 @@
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 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 english_name= head_record.get('english_name');
......@@ -178,11 +198,12 @@
return false;
}}
if(social_code){
if(!CheckSocialCreditCode(social_code)){
$L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}}
// if(!CheckSocialCreditCode(social_code)){
// $L.showErrorMessage("错误",'请输入正确的社会信用代码!',null,null);
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// return false;
// }
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -308,6 +329,9 @@
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_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) {
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