Commit 8a5431df authored by 18083's avatar 18083

批量退回改造

parent 7a955fe6
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
declare
v_node_action_id number;
begin
select
t.node_action_id
into v_node_action_id
from ZJ_WFL_WORKFLOW_NODE_ACTION t where t.node_id = ${@node_id} and t.action_type = 3;
${@result_num} := zj_wfl_core_pkg.workflow_approve(p_rcpt_record_id => ${@record_id},
p_node_action_id => v_node_action_id,
p_comment => ${@comment_text_out},
p_comment_text_out => ${@comment_text_out},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="result_num" dataType="java.lang.Long" input="false" output="true" outputPath="@result_num"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -5,13 +5,21 @@
<a:model-query model="zjwfl.ZJWFL5110.zj_wfl_to_do_list_count" rootpath="to_do_list_count"/>
<a:model-query model="zjwfl.ZJWFL5110.zj_wfl_to_do_title_count" rootPath="to_do_list_count_rp"/>
<a:model-query model="zjwfl.ZJWFL5110.zj_wfl_to_do_list_others_count" rootpath="other_list_count"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="get_document_info_link" model="zjwfl.ZJWFL5110.zj_wfl_get_document_info" modelaction="query"/>
<a:link id="pageLink_zjwfl5110_wfl_approve" url="${/request/@context_path}/modules/zjwfl/ZJWFL5110/zj_wfl_approve.lview"/>
<a:link id="wfl5120_batch_approve_link" model="zjwfl.ZJWFL5110.zj_wfl_approve_agree_batch" modelaction="batch_update"/>
<a:link id="wfl5120_batch_refuse_link" model="zjwfl.ZJWFL5110.zj_wfl_approve_refuse_batch" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
//建设机械部部长可操作批量退回按钮
Leaf.onReady(function() {
if ('${/model/role_info/record/@role_code}'!='0003') {
$('batch_refused_id').hide();
}
});
function query_zjwfl5110_toDoDs() {
$("zjwfl5110_toDoDs").query();
......@@ -195,34 +203,45 @@
function batch_refused() {
var records = $('zjwfl5110_toDoDs').getAll();
var comment_test = $('comment_text_cmp').value;
var records = $('zjwfl5110_toDoDs').getAll();
var comment_test = $('comment_text_cmp').value;
var workflow_code;
var workflow_desc ;
if(!comment_test){
$L.showErrorMessage("提示",'请输入审批意见!');
return;
}
var params = [];
for(var i=0;i<records.length;i++){
if (records[i].get('checked') =='Y'&&records[i].get('record_id')){
if(records[i].get('workflow_code')!='PROJECT_WFL'){
Leaf.showMessage('提示','仅报单工作流可使用退回按钮!');
return ;
}
params.push({
'node_id':records[i].get('node_id'),
'comment_text_out':comment_test,
'record_id':records[i].get('record_id'),
'action_type':2,
'action_type':3,
'_status':'update'
});
}
}
}
if (params.length < 1) {
Leaf.showMessage('提示','请至少选择一条待办进行审批');
return false;
}
if(!comment_test){
$L.showErrorMessage("提示",'请输入审批意见!');
return;
if(params.length > 50){
Leaf.showMessage('提示','请选择小于50条数据');
return false;
}
var detail_mask = Ext.getBody();
Leaf.showConfirm('提示','是否确认审批拒绝',function(){
Leaf.showConfirm('提示','您确定退回以下单据的申请吗?',function(){
Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('wfl5120_batch_approve_link').getUrl(),
url: $('wfl5120_batch_refuse_link').getUrl(),
para: params,
success: function() {
Leaf.SideBar.show({
......@@ -230,8 +249,8 @@
duration: 2000
});
Leaf.Masker.unmask(detail_mask);
query_zjwfl5110_toDoDs();
},
query_zjwfl5110_toDoDs();
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
......@@ -328,7 +347,7 @@
</a:fieldSet>
<a:hBox>
<a:button click="batch_approved" text="同意"/>
<!-- <a:button click="batch_refused" text="拒绝"/> -->
<a:button id="batch_refused_id" click="batch_refused" text="退回"/>
</a:hBox>
</div>
<div style="margin-left:10px;">
......
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