156 lines
5.3 KiB
Plaintext
156 lines
5.3 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
||
|
||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info00;Describe=注释区;]~*/%>
|
||
<%
|
||
/*
|
||
Author:jyshen 2017-05-09
|
||
Tester:
|
||
Content: 新增申请页面---业务品种和客户
|
||
Input Param:
|
||
Output param:
|
||
History Log:
|
||
|
||
*/
|
||
%>
|
||
<%/*~END~*/%>
|
||
|
||
|
||
|
||
|
||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
|
||
<%
|
||
String PG_TITLE = "项目立项申请"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
||
%>
|
||
<%/*~END~*/%>
|
||
|
||
|
||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
|
||
<%
|
||
String sObjectType = CurPage.getParameter("ObjectType");
|
||
if(StringX.isSpace(sObjectType)) sObjectType = "";
|
||
String sApplyType = CurPage.getParameter("ApplyType");
|
||
if(StringX.isSpace(sApplyType)) sApplyType = "";
|
||
String sFlowNo = CurPage.getParameter("FlowNo");
|
||
if(StringX.isSpace(sFlowNo)) sFlowNo = "";
|
||
String sPhaseType = CurPage.getParameter("PhaseType");
|
||
if(StringX.isSpace(sPhaseType)) sPhaseType = "";
|
||
String sPhaseNo = CurPage.getParameter("PhaseNo");
|
||
if(StringX.isSpace(sPhaseNo)) sPhaseNo = "";
|
||
String sInputOrgID = CurUser.getOrgID();
|
||
if(StringX.isSpace(sInputOrgID)) sInputOrgID = "";
|
||
String sInputUserID = CurUser.getUserID();
|
||
if(StringX.isSpace(sInputUserID)) sInputUserID = "";
|
||
%>
|
||
<%/*~END~*/%>
|
||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
|
||
<%
|
||
String sTempletNo = "ProjectEstInfo";//--模板号--
|
||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||
dwTemp.Style = "2";//freeform
|
||
dwTemp.genHTMLObjectWindow("");
|
||
%>
|
||
<%/*~END~*/%>
|
||
|
||
|
||
|
||
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
|
||
<%
|
||
String sButtons[][] = {
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
{"true","","Button","确认","确认新增申请","doCreation()",""},
|
||
{"true","","Button","取消","取消新增申请","doCancel()",""}
|
||
};
|
||
sButtonPosition = "south";
|
||
%>
|
||
<%/*~END~*/%>
|
||
|
||
|
||
|
||
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
|
||
<%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||
<%/*~END~*/%>
|
||
|
||
|
||
|
||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
|
||
<script type="text/javascript">
|
||
var bIsInsert = false;
|
||
//------------------------------定义按钮事件------------------------------------
|
||
/*~[Describe=确认新增申请;InputParam=无;OutPutParam=无;]~*/
|
||
function saveRecord(){
|
||
var sProductId = getItemValue(0,getRow(),"ProductID");
|
||
var sProductName = getItemValue(0,getRow(),"ProductName");
|
||
var sCustomerId = getItemValue(0,getRow(),"CustomerID");
|
||
var sCustomerName = getItemValue(0,getRow(),"CustomerName");
|
||
var sTableName = "LB_PROJECT_INFO_TEMP";//表名
|
||
var sColumnName = "ID";//字段名
|
||
var sPrefix = "";//前缀
|
||
//获取流水号
|
||
var sSerialNo = getSerialNo(sTableName,sColumnName,sPrefix);
|
||
setItemValue(0,0,"FlowUnid",sSerialNo);
|
||
setItemValue(0,0,"ID",sSerialNo);
|
||
|
||
RunMethod("WorkFlowEngine","InitializeFlow","<%=sObjectType%>"+","+sSerialNo+","+"<%=sApplyType%>"+","+"<%=sFlowNo%>"+","+"<%=sPhaseNo%>"+","+"<%=sInputUserID%>"+","+"<%=sInputOrgID%>");
|
||
var sParams ="productId="+sProductId+",productName="+sProductName+",customerId="+sCustomerId+",customerName="+sCustomerName+",objectType=<%=sObjectType%>,applyType=<%=sApplyType%>,flowNo=<%=sFlowNo%>,phaseNo=<%=sPhaseNo%>,userID=<%=sInputUserID%>,orgID=<%=sInputOrgID%>";
|
||
var sReturn = RunJavaMethodTrans("com.tenwa.flow.project.action.projectApply.ProjectApprovalFlowStartAction","run",sParams);
|
||
if(typeof(sReturn)=="undefined" || sReturn=="" || sReturn=="_CANCEL_" )
|
||
{
|
||
doCancel();
|
||
}
|
||
else
|
||
{
|
||
alert("初始化数据成功!");
|
||
parent.AsDialog.ClosePage(sReturn);
|
||
}
|
||
as_save("myiframe0","doCancel()");
|
||
}
|
||
|
||
function doCreation(){
|
||
if(!iV_all(0)) return ;
|
||
saveRecord();
|
||
}
|
||
|
||
function doCancel(){
|
||
|
||
parent.AsDialog.ClosePage();
|
||
reloadSelf();
|
||
}
|
||
|
||
|
||
function selectCustomerName(){
|
||
AsDialog.OpenSelector("selectCustomerName","","dialogWidth=" + parseInt(window.screen.width * 0.7) + "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,"CUSTOMERID",sReturn[0]);
|
||
setItemValue(0,0,"customername",sReturn[1]);
|
||
},"请选择客户",'');
|
||
}
|
||
|
||
/* function selectBusinessType(){
|
||
var sReturn = AsDialog.setObjectValue("SelectBusinessType","","@PRODUCTID@1",0,0,"");
|
||
} */
|
||
|
||
function selectBusinessType()
|
||
{
|
||
AsDialog.OpenSelector("SelectBusinessType","","dialogWidth=" + parseInt(window.screen.width * 0.7) + "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,"PRODUCTID",sReturn[0]);
|
||
setItemValue(0,0,"PRODUCTNAME",sReturn[1]);
|
||
},"请选择业务品种",'');
|
||
// var sReturn = AsDialog.setObjectValue("SelectBusinessType","","@PRODUCTID@1@PRODUCTNAME@2",0,0,"");
|
||
}
|
||
|
||
|
||
|
||
</script>
|
||
<%/*~END~*/%>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |