Commit 7bcf26be authored by 38823's avatar 38823

经租授信功能代码同步和工作流改造

parent 1d48eff2
var add_datafilters = [ var add_datafilters = [
{
name: '',
expression: "((t1.credit_status in ('REJECT','APPROVING_OP','APPROVED') and ${/session/@user_id}=11319) or (t1.credit_status in ('REJECT','APPROVING_OP','APPROVED','APPROVING') and ${/session/@user_id}!=11319))"
},
{ {
name : "unit_code", name : "unit_code",
expression: "(t1.unit_code != '1011' or t1.unit_code is null)" expression: "(t1.unit_code != '1011' or t1.unit_code is null)"
......
var add_datafilters = [ var add_datafilters = [
{
name: '',
expression: "((t1.credit_status in ('REJECT','APPROVING_OP','APPROVED') and ${/session/@user_id}=11319) or (t1.credit_status in ('REJECT','APPROVING_OP','APPROVED','APPROVING') and ${/session/@user_id}!=11319))"
},
{ {
name : "unit_code", name : "unit_code",
expression: "t1.unit_code = '1011'" expression: "t1.unit_code = '1011'"
......
...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -8,7 +8,7 @@ $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:init-procedure>
<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:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(9062,006,005,9070)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
...@@ -74,10 +74,25 @@ $Purpose: 商业伙伴授信维护 ...@@ -74,10 +74,25 @@ $Purpose: 商业伙伴授信维护
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//授信额度变更 //授信额度变更
var param={}; var param={};
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd'); var credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_HD', 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected; var op_credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_OP', 'hls_bp_master_credit_hd');
if(datas.length!=1){ var credit_datas = $(credit_ds).selected;
$L.showInfoMessage("提示",'请选择要变更的数据',null,null) 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;
}
if(datas.length==0){
$L.showInfoMessage("提示",'请选择要维护的数据',null,null)
return;
}
if(datas.length>1){
$L.showErrorMessage("提示",'只能选择一条数据进行维护!');
return; return;
} }
//启用和审批冻结判断 //启用和审批冻结判断
...@@ -93,7 +108,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -93,7 +108,7 @@ $Purpose: 商业伙伴授信维护
$L.showInfoMessage("提示",'只有营业副部长和营业担当才能操作数据!'); $L.showInfoMessage("提示",'只有营业副部长和营业担当才能操作数据!');
return; return;
} }
if(datas[0].get('credit_status')=='APPROVING'){ if(datas[0].get('credit_status')=='APPROVING' || datas[0].get('credit_status')=='APPROVING_OP'){
$L.showInfoMessage("提示",'该授信记录审批中,无法维护!'); $L.showInfoMessage("提示",'该授信记录审批中,无法维护!');
return; return;
} }
......
...@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -8,7 +8,7 @@ $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:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(003,9065)" 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(003,9070)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
...@@ -25,7 +25,16 @@ $Purpose: 商业伙伴授信维护 ...@@ -25,7 +25,16 @@ $Purpose: 商业伙伴授信维护
var user_code=''; var user_code='';
Leaf.onReady(function(){ Leaf.onReady(function(){
user_code='${/model/position_code/record/@position_code}'; user_code='${/model/position_code/record/@position_code}';
}) if(user_code == 9070){
var ds_id=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_CREDIT_HD', 'hls_bp_master_credit_hd');
var op_ds_id=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_CREDIT_OP', 'hls_bp_master_credit_hd');
var record = 'JCREDIT_ENTRANCE_CONFIRM_F_QUERY__ds';
$(record).getCurrentRecord().set('credit_status','APPROVING_OP');
$(record).getCurrentRecord().set('credit_status_n','审批中(营业副部长-经租)');
$(ds_id).query();
$(op_ds_id).query();
}
});
//超链接渲染 //超链接渲染
...@@ -52,21 +61,26 @@ $Purpose: 商业伙伴授信维护 ...@@ -52,21 +61,26 @@ $Purpose: 商业伙伴授信维护
//变更确认 //变更确认
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
//授信额度变更 //授信额度变更
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd'); var credit_ds=get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_CREDIT_HD', 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected; 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 param = {}; var param = {};
var saveData = []; var saveData = [];
//判断角色是否可以操作 //判断角色是否可以操作
//002 营业本部长 //002 营业本部长
for (var i = 0; i < datas.length; i++){ for (var i = 0; i < datas.length; i++){
if(user_code==''||user_code==undefined){ if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!'); $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; return;
} }
} }
...@@ -77,7 +91,7 @@ $Purpose: 商业伙伴授信维护 ...@@ -77,7 +91,7 @@ $Purpose: 商业伙伴授信维护
for (var i = 0; i < datas.length; i++) { for (var i = 0; i < datas.length; i++) {
//审批冻结判断 //审批冻结判断
var credit_status=datas[i].data.credit_status; var credit_status=datas[i].data.credit_status;
if(credit_status!='APPROVING'){ if(credit_status!='APPROVING' && credit_status!='APPROVING_OP'){
$L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null) $L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null)
return; return;
} }
...@@ -85,7 +99,11 @@ $Purpose: 商业伙伴授信维护 ...@@ -85,7 +99,11 @@ $Purpose: 商业伙伴授信维护
data_record = datas[i]; data_record = datas[i];
data_record.set('_status', 'update'); data_record.set('_status', 'update');
data_record.set('bp_credit_hd_id', datas[i].data.bp_credit_hd_id); data_record.set('bp_credit_hd_id', datas[i].data.bp_credit_hd_id);
data_record.set('wanted_status', 'APPROVED'); if(user_code == 9070){
data_record.set('wanted_status', 'APPROVING');
}else {
data_record.set('wanted_status', 'APPROVED');
}
saveData.push(data_record.data); saveData.push(data_record.data);
} }
param['details'] = saveData; param['details'] = saveData;
......
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