Commit ba4ffc10 authored by 陆正友's avatar 陆正友

授信管理(经租)

parent f05b2447
...@@ -3,50 +3,51 @@ ...@@ -3,50 +3,51 @@
<bm:operations> <bm:operations>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
hls_bp_master_credit_pkg.check_create_record( hls_bp_master_credit_pkg.check_create_record(
p_bp_credit_hd_id =>${@bp_credit_hd_id} p_bp_credit_hd_id =>${@bp_credit_hd_id}
); );
end;]]></bm:update-sql> end;]]>
</bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * from (select rd.bp_credit_hd_id, select * from (select rd.bp_credit_hd_id,
rd.bp_id, rd.bp_id,
hbm.bp_name, hbm.bp_name,
hbm.bp_code, hbm.bp_code,
hbm.bp_category, hbm.bp_category,
(select description (select description
from hls_bp_category hbc from hls_bp_category hbc
where hbc.bp_category = hbm.bp_category) bp_category_n, where hbc.bp_category = hbm.bp_category) bp_category_n,
hbm.bp_name bp_id_n, hbm.bp_name bp_id_n,
rd.credit_total_amount, rd.credit_total_amount,
rd.credit_type, to_char(rd.credit_date_from,'yyyy-mm-dd')credit_date_from,
(select v.code_value_name rd.credit_status,
from sys_code_values_v v (select code_value_name
where v.code = 'DS_CREDIT_TYPE' from sys_code_values_v
and v.code_value = rd.credit_type) credit_type_n, where code = 'CREDIT_STATUS'
to_char(rd.credit_date_from,'yyyy-mm-dd')credit_date_from, and code_value = rd.credit_status) credit_status_n,
rd.credit_status, to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to,
(select code_value_name rd.enable_flag,
from sys_code_values_v to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
where code = 'CREDIT_STATUS' (select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc,
and code_value = rd.credit_status) credit_status_n, (select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc,
to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to, (select v.unit_name from exp_emp_assign_e_v v where v.unit_id = hbm.unit_id and rownum = 1) agent_name,
rd.enable_flag, hd.amount_type,
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date, (SELECT code_value_name FROM sys_code_values_v where code='AMOUNT_TYPE_S' and code_value =hd.amount_type ) amount_type_n,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc, hd.credit_type,
(select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc, (select code_value_name from sys_code_values_v where code='CREDIT_TYPE_S' and code_value=hd.credit_type) credit_type_n
(select v.unit_name from exp_emp_assign_e_v v where v.unit_id = hbm.unit_id and rownum = 1) agent_name
from HLS_BP_MASTER_CREDIT_HD hd, from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm, hls_bp_master hbm,
hls_bp_mast_credit_hd_rd rd hls_bp_mast_credit_hd_rd rd
where hd.bp_id = hbm.bp_id where hd.bp_id = hbm.bp_id
and hd.bp_credit_hd_id = rd.bp_credit_hd_id)v and hd.bp_credit_hd_id = rd.bp_credit_hd_id)v
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]>
</bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters> <bm:data-filters>
......
...@@ -37,6 +37,20 @@ $Purpose: 商业伙伴授信创建 ...@@ -37,6 +37,20 @@ $Purpose: 商业伙伴授信创建
}; };
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq){
var f_bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
if(f_bp_create_ds_id==ds.id){
if(record.get('credit_type')=='CAPITAL_LOAN_CREDIT'){
record.set('amount_type','CIRCULATION');
record.set('amount_type_n','循环');
}else if(record.get('credit_type')=='ASSET_PROCUREMENT') {
record.set('amount_type','IMMOBILIZATION');
record.set('amount_type_n','固定');
}
}
};
//保存成功后刷新页面credit_ds //保存成功后刷新页面credit_ds
// window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) { // window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
// Leaf.SideBar.show({ // Leaf.SideBar.show({
......
...@@ -31,7 +31,10 @@ ...@@ -31,7 +31,10 @@
<a:columns> <a:columns>
<a:column name="bp_code" prompt="授信对象编码" align="center" width="120"/> <a:column name="bp_code" prompt="授信对象编码" align="center" width="120"/>
<a:column name="bp_name" prompt="授信对象名称" align="center" width="170"/> <a:column name="bp_name" prompt="授信对象名称" align="center" width="170"/>
<a:column name="bp_category_n" prompt="授信对象类型" align="center" width="170"/>
<a:column name="agent_name" prompt="代理店名称" align="center" width="170"/> <a:column name="agent_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="credit_type_n" prompt="授信类型" align="center" width="170"/>
<a:column name="amount_type_n" prompt="额度类型" align="center" width="170"/>
<a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200" renderer="Leaf.formatMoney"/> <a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200" renderer="Leaf.formatMoney"/>
<a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/> <a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/> <a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
......
...@@ -54,9 +54,17 @@ $Purpose: 商业伙伴授信维护 ...@@ -54,9 +54,17 @@ $Purpose: 商业伙伴授信维护
var saveData = []; var saveData = [];
//角色判断 //角色判断
//002 营业本部长 //002 营业本部长
if(user_code==''||user_code==undefined){ for (var i = 0; i < datas.length; i++){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!'); if(user_code==''||user_code==undefined){
return; $L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
}else if (user_code =='9065' && datas[i].get('bp_category')!='RENTER' ){
$L.showInfoMessage("提示",'当前用户只能选择<font color="red">'+'租赁商'+'</font>类型进行授信操作');
return;
}else if (user_code =='003' && datas[i].get('bp_category')=='RENTER'){
$L.showInfoMessage("提示",'当前用户只能选择<font color="red">'+'非租赁商'+'</font>类型进行授信操作');
return;
}
} }
if(datas.length<1){ if(datas.length<1){
$L.showInfoMessage("提示",'请选择数据',null,null) $L.showInfoMessage("提示",'请选择数据',null,null)
...@@ -78,25 +86,25 @@ $Purpose: 商业伙伴授信维护 ...@@ -78,25 +86,25 @@ $Purpose: 商业伙伴授信维护
} }
param['details'] = saveData; param['details'] = saveData;
$L.showConfirm("提示",'确认进行授信确认?',function(){ $L.showConfirm("提示",'确认进行授信确认?',function(){
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('hls362N_update_credit_confirmed_link_id').getUrl(), url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: param, para: param,
success: function () { success: function () {
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '操作成功', msg: '操作成功',
duration: 2000 duration: 2000
}); });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$(credit_ds).query(); $(credit_ds).query();
}, },
error: function() { error: function() {
}, },
failure: function() { failure: function() {
}, },
scope: this scope: this
}); });
}) })
}; };
...@@ -108,10 +116,18 @@ $Purpose: 商业伙伴授信维护 ...@@ -108,10 +116,18 @@ $Purpose: 商业伙伴授信维护
var param = {}; var param = {};
var saveData = []; var saveData = [];
//角色判断 //角色判断
// 002 营业本部长 //002 营业本部长
if(user_code==''||user_code==undefined){ for (var i = 0; i < datas.length; i++){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!'); if(user_code==''||user_code==undefined){
return; $L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
}else if (user_code =='9065' && datas[i].get('bp_category')!='RENTER' ){
$L.showInfoMessage("提示",'当前用户只能选择<font color="red">'+'租赁商'+'</font>类型进行授信操作');
return;
}else if (user_code =='003' && datas[i].get('bp_category')=='RENTER'){
$L.showInfoMessage("提示",'当前用户只能选择<font color="red">'+'非租赁商'+'</font>类型进行授信操作');
return;
}
} }
if(datas.length<1){ if(datas.length<1){
$L.showInfoMessage("提示",'请选择一条数据',null,null) $L.showInfoMessage("提示",'请选择一条数据',null,null)
......
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