隐藏按钮
</TABLE>
<std:selector Test="/model/record/@STATUS" >
<case Value="1">
<jsp:button_ext Text="节点跳转" Handler="node_jump" Id="jumpbtn" Container="jump" Hidden="true"/>
<jsp:button_ext Text="结束工作流" Handler="workflow_end" Id="endbtn" Container="end" Hidden="true"/>
</case>
<case Value="-100">
<jsp:button_ext Text="节点跳转" Handler="node_jump" Id="jumpbtn" Container="jump"/>
<jsp:button_ext Text="继续执行" Handler="workflow_continue" Id="continuebtn" Container="continue"/>
</case>
</std:selector>
<jsp:button_ext Text="删除工作流" Handler="workflow_delete" Id="delbtn" Container="delete"/>
<script>
<![CDATA[
function devlierUserCommit(id,code,des){
Ext.get('APPROVE_EDIT_LOV').dom.value=des.EMPLOYEE_NAME;
}
function closeWindow(){
window.close();
opener.gridReload();
}
Ext.getElementById('jumpbtn').style.display="none";
function node_jump(){
if(!Ext.getCmp('NODE_EDIT_COMBO').getValue()||!Ext.getCmp('APPROVE_EDIT_LOV').getValue()){
Ext.MessageBox.alert('警告','请选择跳转的节点和该节点的审批者!')
}
else{
Ext.MessageBox.confirm('提示信息', '您确定跳转这个工作流吗?',function(ret){
if(ret == 'yes'){
var instanceId=${/parameter/@instance_id};
var formdom = Ext.getCmp('WFL_EDIT_FORM').getForm().getEl().dom;
var para = Ext.urlDecode(Ext.lib.Ajax.serializeForm(formdom));
para['_oper'] = 'jump';
para['INSTANCE_ID'] = instanceId;
AjaxRequest({
url: 'wfl_instance_save_control.service',
method: 'POST',
params: {
_request_data: Ext.util.JSON.encode({
parameter: para
})
},
success: function(response){
var res = Ext.decode(response.responseText);
if (res && !res.success) {
if (res.error) {
Util.showMsgWindow({
title: '错误信息',
msg: res.error.code + ":" + res.error.message,
debug: res.error.stackTrace
});
}
}
else {
Ext.MessageBox.alert('提示信息', '工作流已跳转!', function(){closeWindow();}, this);
}
},
scope: this
});
}
});
}
}
function workflow_end()
{
if(!Ext.getCmp('REASON').getValue()){
Ext.MessageBox.alert('警告','请填写原因!');
}
else{
Ext.MessageBox.confirm('提示信息', '您确定结束这个工作流吗?',function(ret){
if(ret == 'yes'){
var instanceId=${/parameter/@instance_id};
var formdom = Ext.getCmp('WFL_DEL_FORM').getForm().getEl().dom;
var para = Ext.urlDecode(Ext.lib.Ajax.serializeForm(formdom));
para['_oper'] = 'end';
para['INSTANCE_ID'] = instanceId;
//add by zx 2011-01-19 begin
var DOCUMENT_ID = ${/model/record/@INSTANCE_PARAM};
var DOCUMENT_TYPE = '${/model/record/@DOCUMENT_TYPE}';
para['DOCUMENT_ID'] = DOCUMENT_ID;
para['DOCUMENT_TYPE'] = DOCUMENT_TYPE;
//add by zx 2011-01-19 end
AjaxRequest({
url: 'wfl_instance_save_control.service',
method: 'POST',
params: {