diff --git a/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_hd_queryfields.js b/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_hd_queryfields.js index 21c90cae5aec54113c4e94a4b2b76b2f2bf3d385..6f6d4caf2e44745e11f09eaf94cfa8ca49cf3e1d 100644 --- a/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_hd_queryfields.js +++ b/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_hd_queryfields.js @@ -1,4 +1,8 @@ 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", expression: "(t1.unit_code != '1011' or t1.unit_code is null)" diff --git a/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_op_queryfields.js b/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_op_queryfields.js index e324001552157290bb13b715d5979fcffc62726f..18945266bc6a6cf5d9aa6d40f11f081160fb9013 100644 --- a/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_op_queryfields.js +++ b/src/main/webapp/WEB-INF/server-script/layoutconfig/jcredit_entrance_confirm_f_credit_op_queryfields.js @@ -1,4 +1,8 @@ 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", expression: "t1.unit_code = '1011'" diff --git a/src/main/webapp/modules/hls/HLS361N/hls_bp_master_credit.lview b/src/main/webapp/modules/hls/HLS361N/hls_bp_master_credit.lview index 8ed631ada9c97495353f3491b25775089adbd48e..0ada4af4e8be3ddd0795c352f120a4b9cde8fe18 100644 --- a/src/main/webapp/modules/hls/HLS361N/hls_bp_master_credit.lview +++ b/src/main/webapp/modules/hls/HLS361N/hls_bp_master_credit.lview @@ -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)" 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:view> @@ -74,10 +74,25 @@ $Purpose: 商业伙伴授信维护 window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { //授信额度变更 var param={}; - var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd'); - var datas=$(credit_ds).selected; - if(datas.length!=1){ - $L.showInfoMessage("提示",'请选择要变更的数据',null,null) + 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; + } + if(datas.length==0){ + $L.showInfoMessage("提示",'请选择要维护的数据',null,null) + return; + } + if(datas.length>1){ + $L.showErrorMessage("提示",'只能选择一条数据进行维护!'); return; } //启用和审批冻结判断 @@ -93,7 +108,7 @@ $Purpose: 商业伙伴授信维护 $L.showInfoMessage("提示",'只有营业副部长和营业担当才能操作数据!'); return; } - if(datas[0].get('credit_status')=='APPROVING'){ + if(datas[0].get('credit_status')=='APPROVING' || datas[0].get('credit_status')=='APPROVING_OP'){ $L.showInfoMessage("提示",'该授信记录审批中,无法维护!'); return; } diff --git a/src/main/webapp/modules/hls/HLS362N/hls_bp_master_credit_confirm.lview b/src/main/webapp/modules/hls/HLS362N/hls_bp_master_credit_confirm.lview index ead57b20fbe54bc3bf15c0c164f47a04979bab59..9ac6bca6d05ddec1aaab931af7f8327296297597 100644 --- a/src/main/webapp/modules/hls/HLS362N/hls_bp_master_credit_confirm.lview +++ b/src/main/webapp/modules/hls/HLS362N/hls_bp_master_credit_confirm.lview @@ -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(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:view> @@ -25,7 +25,16 @@ $Purpose: 商业伙伴授信维护 var user_code=''; Leaf.onReady(function(){ 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: 商业伙伴授信维护 //变更确认 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 datas=$(credit_ds).selected; + 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 param = {}; 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>类型进行授信操作'); + $L.showInfoMessage("提示",'只有营业本部长/营业副部长(经租)才能操作数据!'); return; } } @@ -77,7 +91,7 @@ $Purpose: 商业伙伴授信维护 for (var i = 0; i < datas.length; i++) { //审批冻结判断 var credit_status=datas[i].data.credit_status; - if(credit_status!='APPROVING'){ + if(credit_status!='APPROVING' && credit_status!='APPROVING_OP'){ $L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null) return; } @@ -85,7 +99,11 @@ $Purpose: 商业伙伴授信维护 data_record = datas[i]; data_record.set('_status', 'update'); 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); } param['details'] = saveData;