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

授信管理(经租)

parent 8d943da9
......@@ -7,7 +7,8 @@
hls_bp_master_credit_pkg.check_create_record(
p_bp_credit_hd_id =>${@bp_credit_hd_id}
);
end;]]></bm:update-sql>
end;]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......@@ -22,11 +23,6 @@
hbm.bp_name bp_id_n,
rd.credit_total_amount,
rd.credit_type,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DS_CREDIT_TYPE'
and v.code_value = rd.credit_type) credit_type_n,
to_char(rd.credit_date_from,'yyyy-mm-dd')credit_date_from,
rd.credit_status,
(select code_value_name
......@@ -38,7 +34,11 @@
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc,
(select description from sys_user s where s.user_id= rd.temp_user)temp_user_desc,
(select v.unit_name from exp_emp_assign_e_v v where v.unit_id = hbm.unit_id and rownum = 1) agent_name
(select v.unit_name from exp_emp_assign_e_v v where v.unit_id = hbm.unit_id and rownum = 1) agent_name,
hd.amount_type,
(SELECT code_value_name FROM sys_code_values_v where code='AMOUNT_TYPE_S' and code_value =hd.amount_type ) amount_type_n,
hd.credit_type,
(select code_value_name from sys_code_values_v where code='CREDIT_TYPE_S' and code_value=hd.credit_type) credit_type_n
from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm,
......@@ -46,7 +46,8 @@
where hd.bp_id = hbm.bp_id
and hd.bp_credit_hd_id = rd.bp_credit_hd_id)v
#WHERE_CLAUSE#
]]></bm:query-sql>
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
......
......@@ -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
// window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
// Leaf.SideBar.show({
......
......@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(005,006,9070)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(005,006)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
......@@ -215,17 +215,6 @@ $Purpose: 商业伙伴授信维护
param['url_title'] = '商业伙伴授信详细';
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
}
// //--供应商的详细信息
// function on_business_agent_detail_window(id, name) {
// //获得该条record的所有数据
// var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
// var param = record.data;
// param['function_code'] = 'HLS36103';
// param['function_usage'] = 'MODIFY';
// param['maintain_type'] = 'UPDATE';
// param['url_title'] = '商业伙伴授信详细';
// hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
// }
// //变更履历按钮
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
......
......@@ -31,7 +31,10 @@
<a:columns>
<a:column name="bp_code" prompt="授信对象编码" align="center" width="120"/>
<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="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_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
......
......@@ -68,9 +68,17 @@ $Purpose: 商业伙伴授信维护
var saveData = [];
//角色判断
//002 营业本部长
for (var i = 0; i < datas.length; i++){
if(user_code==''||user_code==undefined){
$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){
$L.showInfoMessage("提示",'请选择数据',null,null)
......@@ -117,26 +125,23 @@ $Purpose: 商业伙伴授信维护
//驳回单据.
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_HD', 'hls_bp_master_credit_hd');
var op_credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_OP', 'hls_bp_master_credit_hd');
var credit_datas = $(credit_ds).selected;
var op_credit_datas = $(op_credit_ds).selected;
if(credit_datas == ''){
var datas=$(op_credit_ds).selected;
}else {
datas = $(credit_ds).selected;
}
if(credit_datas!='' && op_credit_datas!=''){
$L.showErrorMessage("提示",'请勾选同一业务类型的单据进行授信确认操作!');
return;
}
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected;
var param = {};
var saveData = [];
//角色判断
// 002 营业本部长
//002 营业本部长
for (var i = 0; i < datas.length; i++){
if(user_code==''||user_code==undefined){
$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){
$L.showInfoMessage("提示",'请选择一条数据',null,null)
......@@ -208,20 +213,8 @@ $Purpose: 商业伙伴授信维护
//变更履历按钮
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_HD', 'hls_bp_master_credit_hd');
var op_credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_OP', 'hls_bp_master_credit_hd');
var record_hd = $(credit_ds).getSelected();
var record_op = $(op_credit_ds).getSelected();
if(record_hd == ''){
var record=record_op;
}else {
record=record_hd;
}
if(record_hd !='' &&record_op !=''){
$L.showErrorMessage("提示",'请勾选同一业务类型的单据进行授信确认操作!');
return;
}
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record = $(credit_ds).getSelected();
if (record.length!=1){
$L.showInfoMessage("提示",'请选择一条数据!');
return;
......
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