Commit e2bc87d2 authored by liyuan.chen's avatar liyuan.chen

[fix]工作流监控授权改造, 报单提交校验

parent 3e1afd04
Pipeline #6064 canceled with stages
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
AND a2.authorized_user_id = ${/session/@user_id} AND a2.authorized_user_id = ${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE)))) nvl(a2.end_date, trunc(SYSDATE))))
And (decode(${/session/@user_id}, 10620, 1, 2) = 1 And ( (decode(${/session/@user_id}, 10620, 1, 2) = 1
And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1 And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1
And hb.bp_code in ('C00010186', And hb.bp_code in ('C00010186',
'C00010185', 'C00010185',
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
'C00010193', 'C00010193',
'C00010189', 'C00010189',
'C00010194', 'C00010194',
'C00010171')) 'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2) ) t1 or decode(${/session/@user_id}, 10620, 1, 2) = 2) ) t1
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
and ee.unit_id=(SELECT h.unit_id FROM hls_bp_master h WHERE h.bp_id=t1.bp_id) and ee.unit_id=(SELECT h.unit_id FROM hls_bp_master h WHERE h.bp_id=t1.bp_id)
and ${/session/@role_id} in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ) ) and ${/session/@role_id} in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ) )
or (${/session/@role_id} not in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ))"/> or (${/session/@role_id} not in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ))"/>
<bm:data-filter name="query" expression="( decode(${/session/@user_id}, 10620, 1, 2) = 1 <bm:data-filter name="query" expression="( (decode(${/session/@user_id}, 10620, 1, 2) = 1
and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id
and hb.bp_code in ('C00010186', and hb.bp_code in ('C00010186',
'C00010185', 'C00010185',
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
'C00010193', 'C00010193',
'C00010189', 'C00010189',
'C00010194', 'C00010194',
'C00010171')) 'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/> or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/>
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
......
...@@ -54,4 +54,7 @@ ...@@ -54,4 +54,7 @@
<bm:query-field name="approve_user_name" queryExpression="t1.approve_user_name like ${@approve_user_name}"/> <bm:query-field name="approve_user_name" queryExpression="t1.approve_user_name like ${@approve_user_name}"/>
<bm:query-field name="approve_user_code" queryExpression="t1.approve_user_code like ${@approve_user_code}"/> <bm:query-field name="approve_user_code" queryExpression="t1.approve_user_code like ${@approve_user_code}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="( (${/session/@role_id} = 2306 and t1.workflow_code in (&apos;CONTRACT_INCEPT_WFL&apos;, &apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} in (2314, 2313, 2312) and t1.workflow_code in (&apos;DCFL_CSH_PAYMENT_REQ&apos;)) or (${/session/@role_id} not in (2306, 2314, 2313, 2312) and 1 = 1))"/>
</bm:data-filters>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:
$Date: 2020-05-11
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="sys_role_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYS_ROLE_FLAG"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select decode(count(1), 1, 'Y', 'N') as sys_role_flag
from sys_role v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -59,6 +59,8 @@ ...@@ -59,6 +59,8 @@
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>--> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="prj_check_prj_record_link_n" model="hls.HLS500N.check_prj_record" modelaction="execute"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function () {
...@@ -917,29 +919,64 @@ ...@@ -917,29 +919,64 @@
Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
return; return;
} }
if ($(ds_id).validate()) { Leaf.request({
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { url: $('prj_check_prj_record_link_n').getUrl(),
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); para: {
Leaf.request({ 'project_id': project_id
url: $('prj_approval_link_id').getUrl(), },
para: { success: function(res) {
project_id: project_id var secondary_lease = res.result.secondary_lease;
}, var payment_deduction = res.result.payment_deduction;
scope: this, var price_list = res.result.price_list;
success: function () { var down_payment_rate_new=res.result.down_payment_rate_new;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); var H16 = record.get('down_payment');
$('${/parameter/@winid}').close(); var H97 = record.get('third_party_deposit');
}, var H99 = record.get('other_fee');
failure: function () { var H102 = record.get('other_fee2');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, var show = down_payment_rate_new * 100;
error: function () { if((price_list=='HL_PRICR_E'||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN') && secondary_lease=='NO') {
if ((div((H16 + H97), (H99 + H102 - H16)).toFixed(2) * 1) < down_payment_rate_new) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('${l:PROMPT}', '首付款比例+首付款保证金比例之和不能低于' + down_payment_rate_new * 100 + '%');
return;
} }
}); }
}); if ($(ds_id).validate()) {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
project_id: project_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
});
} }
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}; };
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value = &apos;1&apos;" model="zjwfl.sys_code_default_value" rootPath="workflow_status_default_value"/> <a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value = &apos;1&apos;" model="zjwfl.sys_code_default_value" rootPath="workflow_status_default_value"/>
<a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;)" model="zjwfl.sys_code_default_value" rootPath="workflow_status_list"/> <a:model-query defaultWhereClause="v.code=&apos;ZJ_WFL_WORKFLOW_STATUS&apos; and v.code_value in (&apos;1&apos;,&apos;10&apos;,&apos;-1&apos;,&apos;-1000&apos;)" model="zjwfl.sys_code_default_value" rootPath="workflow_status_list"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0014&apos;,&apos;0013&apos;,&apos;0012&apos;,&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"/> <a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/zjwfl/ZJWFL1060/zj_wfl_monitoring_node_approve_history.lview"/>
...@@ -85,6 +86,12 @@ ...@@ -85,6 +86,12 @@
return '<a href=\"javascript:winOpen_do_operation(' + record.get('instance_id') + ',' + record.get('workflow_id') + ')\">操作</a>'; return '<a href=\"javascript:winOpen_do_operation(' + record.get('instance_id') + ',' + record.get('workflow_id') + ')\">操作</a>';
} }
} }
function onload(ds) {
var grid_id = $('monitorDs_grid');
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
grid_id.hideColumn('do_operation');
}
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="instanceStatusDs"> <a:dataSet id="instanceStatusDs">
...@@ -104,7 +111,11 @@ ...@@ -104,7 +111,11 @@
<a:field name="workflow_desc" readOnly="true"/> <a:field name="workflow_desc" readOnly="true"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="monitorDs" autoPageSize="true" autoQuery="true" model="zjwfl.ZJWFL1060.zj_wfl_monitoring_query" queryDataSet="para_monitorDs"/> <a:dataSet id="monitorDs" autoPageSize="true" autoQuery="true" model="zjwfl.ZJWFL1060.zj_wfl_monitoring_query" queryDataSet="para_monitorDs">
<a:events>
<a:event name="load" handler="onload"/>
</a:events>
</a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:form column="4" labelWidth="100" marginWidth="50" title="查询条件"> <a:form column="4" labelWidth="100" marginWidth="50" title="查询条件">
......
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