2018-06-03 22:26:41 +08:00

198 lines
8.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%><%@
include file="/Frame/resources/include/include_begin_info.jspf"%>
<%
/*
Content: 流程模型信息详情
Input Param:
FlowNo 流程编号
PhaseNo 阶段编号
*/
//获得组件参数
String sFlowNo = CurPage.getParameter("FlowNo");
String sPhaseNo = CurPage.getParameter("PhaseNo");
String sVersion = CurPage.getParameter("Version");
if(sFlowNo == null) sFlowNo = "";
if(sPhaseNo == null) sPhaseNo = "";
if (sVersion == null) sVersion = "";
ASObjectModel doTemp = new ASObjectModel("FlowModelInfo");
doTemp.setDefaultValue("Version", sVersion);
String sSql = "jbo.sys.CODE_LIBRARY,ItemNo,ItemName,IsInUse='1' and CodeNo "+
"in (select CI.ItemDescribe from jbo.sys.CODE_LIBRARY CI where CI.CodeNo='ApplyType' and CI.ItemNo in (select FC.FlowType from jbo.sys.FLOW_CATALOG FC where FC.FlowNo='"+sFlowNo+"'))";
doTemp.setDDDWJbo("PhaseType", sSql);
//设置共用格式
//doTemp.setEditStyle("PreScript,InitScript,ChoiceDescribe,ChoiceScript,ActionDescribe,ActionScript,PostScript,Attribute1,Attribute2,Attribute4,Attribute5,Attribute10","3");
//doTemp.setHTMLStyle("PreScript,InitScript,ChoiceDescribe,ChoiceScript,ActionDescribe,ActionScript,PostScript,Attribute1,Attribute2,Attribute4,Attribute5,Attribute10"," style={width:600px;height:100px;overflow:auto}");
doTemp.setHtmlEvent("PreScript,BACKSCRIPT,DELETESCRIPT", "ondblclick", "myDBLClick","this");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
//生成HTMLDataWindow
dwTemp.genHTMLObjectWindow(sFlowNo+","+sPhaseNo);
String sButtons[][] = {
{"true","","Button","保存并返回","保存修改并返回","saveRecordAndReturn()","","","","btn_icon_save"},
{"true","","Button","步骤配置说明","步骤配置说明","illustration()","","","","btn_icon_detail"}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function illustration(){
var sUrl = "/AppConfig/FlowManage/FlowConfigInstruction.jsp";
AsDialog.PopView(sUrl,"","dialogWidth=800px;dialogHeight=350px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;","","步骤配置说明");
}
function myDBLClick(myobj){
editObjectValueWithScriptEditorForASScript(myobj);
}
function saveRecordAndReturn(){
as_save("myiframe0","doReturn('Y');");
}
function saveRecordAndAdd(){
as_save("myiframe0","newRecord()");
}
function doReturn(sIsRefresh){
var sObjectNo = getItemValue(0,getRow(),"FlowNo");
parent.AsDialog.ClosePage(sObjectNo+"@"+sIsRefresh);
}
function newRecord(){
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
OpenComp("FlowModelInfo","/AppConfig/FlowManage/FlowModelInfo.jsp","FlowNo="+sFlowNo,"_self","");
}
/* 选择工作指派角色 attribute9 */
function selectTaskAssignRole(){
var sRoleID = getItemValue(0,getRow(),"attribute9");
AsDialog.SetGridValue("RoleList", "", "attribute9=roleID", sRoleID, false);
}
/* 选择传阅角色 attribute10 */
function selectPassRoundRole(){
var sUrl="/AppConfig/FlowManage/FlowUserConfig/FlowUserConfig.jsp";
var userInfo=getItemValue(0,getRow(),"attribute10");
var flowno=getItemValue(0,getRow(),"FLOWNO");
AsDialog.PopView(sUrl,"userinfo="+userInfo+"&flowno="+flowno,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturn){ if (typeof(sReturn)!='undefined' && sReturn.length!=0){
setItemValue(0,0,"attribute10", sReturn);
}},"选择传阅人员");
}
/**选择结束通知**/
function selectEndNoticeUser(){
var sUrl="/AppConfig/FlowManage/FlowUserConfig/FlowUserConfig.jsp";
var userInfo=getItemValue(0,getRow(),"OVERNOTICEUSER");
var flowno=getItemValue(0,getRow(),"FLOWNO");
AsDialog.PopView(sUrl,"userinfo="+userInfo+"&flowno="+flowno,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturn){ if (typeof(sReturn)!='undefined' && sReturn.length!=0){
setItemValue(0,0,"OVERNOTICEUSER", sReturn);
}},"选择通知人员");
}
/*流程处理人员ACTIONSCRIPT*/
function selectFlowOperatorUser(){
var sUrl="/AppConfig/FlowManage/FlowUserConfig/FlowUserConfig.jsp";
var userInfo=getItemValue(0,getRow(),"ACTIONSCRIPT");
var flowno=getItemValue(0,getRow(),"FLOWNO");
AsDialog.PopView(sUrl,"userinfo="+userInfo+"&flowno="+flowno,"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturn){ if (typeof(sReturn)!='undefined' && sReturn.length!=0){
setItemValue(0,0,"ACTIONSCRIPT", sReturn);
}},"选择流程处理人员");
}
function selectUnfinishedButtons(){
var sButton = getItemValue(0,getRow(),"ATTRIBUTE1");
AsDialog.SetConfigTreeValue("ButtonSetFlow", "ATTRIBUTE1=itemno",[sButton], true, true,"dialogWidth=500px;dialogHeight=500px;");
}
function selectFinishedButtons(){
var sButton = getItemValue(0,getRow(),"ATTRIBUTE2");
AsDialog.SetConfigTreeValue("ButtonSetFlow", "ATTRIBUTE2=itemno",[sButton], true, true,"dialogWidth=500px;dialogHeight=500px;");
}
function selectFlowPage(){
AsDialog.OpenSelector("SelectFlowPage","flowNo,<%=sFlowNo%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"FLOWPAGECONFIG", sReturn[0]);
},"请选择流程");
}
function initRow(){
if (getRowCount(0)==0){
if ("<%=sFlowNo%>" !=""){
setItemValue(0,0,"FlowNo","<%=sFlowNo%>");
}
}
}
initRow();
function selectNextRoute(){
//一般路由
if(getItemValue(0,0,"CHOICESCRIPT")=="commroute"){
AsDialog.OpenSelector("SelectFlowStepName","flowno,<%=sFlowNo%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"NEXTSTEPS",sReturn[1]+"("+sReturn[0]+")");
},"请选择下一步");
}
//条件路由,决策路由
if(getItemValue(0,0,"CHOICESCRIPT")=="selectroute"||getItemValue(0,0,"CHOICESCRIPT")=="conditionroute"){
var sUrl="/AppConfig/FlowManage/FlowStepConfig/FlowStepConfig.jsp";
var stepInfo=getItemValue(0,getRow(),"NEXTSTEPS");
var flowno=getItemValue(0,getRow(),"FLOWNO");
stepInfo=stepInfo.replace(/#/g,"@");
AsDialog.PopView(sUrl,"StepInfo="+stepInfo+"&FlowNo="+flowno+"&RouteType="+getItemValue(0,0,"CHOICESCRIPT"),"dialogWidth=800px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sReturn){ if (typeof(sReturn)!='undefined' && sReturn.length!=0){
setItemValue(0,0,"NEXTSTEPS", sReturn);
}},"请选择下一步");
}
//并行路由
if(getItemValue(0,0,"CHOICESCRIPT")=="parallelroute"){
//一般路由
AsDialog.OpenSelector("SelectMulitFlowStepName","flowno,<%=sFlowNo%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@~");
var temp="";
for(var i=0;i<sReturn.length;i++){
if(sReturn[i].length>0){
var vtemp=sReturn[i].split("@");
if(temp!=""){temp+=";"}
temp=temp+vtemp[1]+"("+vtemp[0]+")";
}
}
setItemValue(0,0,"NEXTSTEPS", ""+temp+"");
},"请选择下一步");
}
}
$(function(){
//初始化路由信息
if(getItemValue(0,0,"CHOICESCRIPT")==""){
setItemValue(0,0,"CHOICESCRIPT", "commroute");
}
//初始化处理方式信息
if(getItemValue(0,0,"ATTRIBUTE7")==""){
setItemValue(0,0,"ATTRIBUTE7", "01");
}
})
function selectFlowBackSteps(){
AsDialog.OpenSelector("SelectFlowStepBackNos","FlowNo,<%=sFlowNo%>,PhaseNo,<%=sPhaseNo%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@~");
var temp="";
for(var i=0;i<sReturn.length;i++){
if(sReturn[i].length>0){
var vtemp=sReturn[i].split("@");
if(temp!=""){temp+=","}
temp=temp+vtemp[1]+"("+vtemp[0]+")";
}
}
setItemValue(0,0,"BACKSTEPS", temp);
},"请选择流程");
}
</script>
<%@include file="/Frame/resources/include/include_end.jspf"%>