Commit 986801ad authored by 38823's avatar 38823

境野san归国,系统权限调整

parent ef3989b3
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))"
expression: "((t1.credit_status in ('REJECT','APPROVING_OP','APPROVED') and ${/session/@role_id}=2554) or (t1.credit_status in ('REJECT','APPROVING_OP','APPROVED','APPROVING') and ${/session/@role_id}!=2554))"
},
{
name : "unit_code",
......
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','APPROVED') and ${/session/@user_id}=10399) or (t1.credit_status in ('REJECT','APPROVING_OP','APPROVED','APPROVING') and ${/session/@user_id} not in (11319,10399)))"
expression: "((t1.credit_status in ('REJECT','APPROVING_OP','APPROVED') and ${/session/@role_id}=2554) or (t1.credit_status in ('REJECT','APPROVING_OP','APPROVED','APPROVING') and ${/session/@role_id} != 2554))"
},
{
name : "unit_code",
......
......@@ -9,6 +9,7 @@ $Purpose: 商业伙伴授信创建
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>-->
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(9070)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
<a:link id="credit_enhance_detail_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
......@@ -16,6 +17,7 @@ $Purpose: 商业伙伴授信创建
<script type="text/javascript"><![CDATA[
//保存前调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = true;
......@@ -30,6 +32,16 @@ $Purpose: 商业伙伴授信创建
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
var user_code='${/model/position_code/record/@position_code}';
if(user_code>0){
record.set('credit_status','APPROVING');
}else if(Ext.isEmpty(user_code) && record.get('bp_category_n')=='RENTER'){
record.set('credit_status','APPROVING_OP');
}else if(Ext.isEmpty(user_code) && record.get('bp_category_n')=='AGENT' && record.get('unit_code')=='1011'){
record.set('credit_status','APPROVING_OP');
}else {
record.set('credit_status','APPROVING');
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return check_flag;
......
......@@ -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,9070)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id}" fetchAll="true" model="cont.CON733.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
......@@ -24,8 +24,8 @@ $Purpose: 商业伙伴授信维护
<script type="text/javascript"><![CDATA[
var user_code='';
Leaf.onReady(function(){
user_code='${/model/position_code/record/@position_code}';
if(user_code == 9070){
user_code='${/model/position_code/record/@role_code}';
if(user_code == '0039'){
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';
......@@ -61,6 +61,7 @@ $Purpose: 商业伙伴授信维护
//变更确认
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
//授信额度变更
debugger;
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;
......@@ -79,7 +80,7 @@ $Purpose: 商业伙伴授信维护
//判断角色是否可以操作
//002 营业本部长
for (var i = 0; i < datas.length; i++){
if(user_code==''||user_code==undefined){
if(user_code!='0039' && user_code!='0003'){
$L.showInfoMessage("提示",'只有建设机械部部长/营业副部长(经租)才能操作数据!');
return;
}
......@@ -95,11 +96,15 @@ $Purpose: 商业伙伴授信维护
$L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null)
return;
}
if(user_code == '0003' && credit_status == 'APPROVING_OP'){
$L.showInfoMessage("提示",'当前单据未到达建机部部长审批节点,请确认!');
return;
}
var data_record;
data_record = datas[i];
data_record.set('_status', 'update');
data_record.set('bp_credit_hd_id', datas[i].data.bp_credit_hd_id);
if(user_code == 9070){
if(user_code == '0039'){
data_record.set('wanted_status', 'APPROVING');
}else {
data_record.set('wanted_status', 'APPROVED');
......@@ -153,7 +158,7 @@ $Purpose: 商业伙伴授信维护
//角色判断
//002 营业本部长
for (var i = 0; i < datas.length; i++){
if(user_code==''||user_code==undefined){
if(user_code!='0039' && user_code!='0003'){
$L.showInfoMessage("提示",'只有建设机械部部长/营业副部长(经租)才能操作数据!');
return;
}
......@@ -170,6 +175,10 @@ $Purpose: 商业伙伴授信维护
$L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null)
return;
}
if(user_code == '0003' && credit_status == 'APPROVING_OP'){
$L.showInfoMessage("提示",'当前单据未到达建机部部长审批节点,请确认!');
return;
}
var data_record;
data_record = datas[i];
data_record.set('_status', 'update');
......
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