apzl_leasing/WebContent/Tenwa/Lease/Flow/Project/ProjectApproval/ProjectApprovalCreationInfo.jsp

209 lines
6.4 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"%>
<%/*~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 sApplyType = CurPage.getParameter("ApplyType");
String sInputUserID = CurUser.getUserID();
if(StringX.isSpace(sApplyType)) sApplyType = "";
if(StringX.isSpace(sInputUserID)) sInputUserID = "";
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
String sTempletNo = "ProjectApprovalApplyCreationInfo";//--模板号--
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">
/*~[Describe=保存并初始化数据;InputParam=无;OutPutParam=无;]~*/
function saveRecord()
{
//从页面上获取客户编号,产品编号
var productid = getItemValue(0,getRow(),"productId");
var productname = getItemValue(0,getRow(),"productName");
var custid = getItemValue(0,getRow(),"CustomerID");
var custname = getItemValue(0,getRow(),"CustomerName");
if(productid==""||custid==""){
alert("请选择业务品种和客户");
return;
}
var businesstype = "";//业务类型1是汽车业务2是传统业务3是汽车传统业务
var orgid = "<%=CurUser.getOrgID()%>".substring(0,7);
if(orgid=="8009011"){
businesstype="3";
}else if(orgid=="8009010"){
businesstype="2";
}else{
alert("该用户无权限发起申请!");
return;
}
var messages = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","selectTitleName","SubjectId="+SubjectId);
message = messages.split("@");
if("error"==message[0]){
alert(message[1]);
return;
}
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",SubjectId="+SubjectId+",SubjectName="+message[1]+",CustId="+custid+",CustName=" + custname+",ProductId="+productid+",ProductName="+productname+",businesstype="+businesstype;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.ProjectApprovalStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_" )
{
doCancel();
}
else
{
parent.AsDialog.ClosePage(sReturnInfo);
}
}
/*~[Describe=确认新增申请;InputParam=无;OutPutParam=无;]~*/
function doCreation()
{
if(!iV_all(0)) return ;
saveRecord();
}
/*~[Describe=返回列表;InputParam=无;OutPutParam=无;]~*/
function doCancel()
{
parent.AsDialog.ClosePage();
// reloadSelf();
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
<%/*~[Describe=选择客户;]~*/%>
var SubjectId=''
function selectCustomerName()
{
var userid="<%=CurUser.getUserID()%>";
AsDialog.OpenSelector("SelectCustomerForProjectApprove","userid,"+userid,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"CUSTOMERID",sReturn[0]);
setItemValue(0,0,"customername",sReturn[1]);
},"请选择客户",'');
}
<%/*~[Describe=选择业务品种;]~*/%>
function selectBusinessType(){
var orgid = "<%=CurUser.getOrgID()%>";
orgid = orgid.substring(0,7);
var selectNo = "";
if("8009010" == orgid){//传统
selectNo = "SelectBusinessType2";
}else if("8009011" == orgid){//汽车类传统
selectNo = "SelectBusinessTypeCar";
}else{
alert("该用户不能发起流程,请联系管理员!");
return;
}
AsDialog.OpenSelector(selectNo,"ProductType,1@3,TypeNo,004","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"productId",sReturn[0]);
setItemValue(0,0,"productName",sReturn[1]);
SubjectId = sReturn[2]
},"请选择业务品种",'');
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
function initRow()
{
var num = RunJavaMethodSqlca("com.tenwa.lease.flow.project.projectapproval.BusinessTypeController","getNumber","");
if(num==1){
//字段隐藏,根据不同的客户类型,再显示字段
hideItem(0,'product_Name');
hideItem(0,'product_id');
var sReturn = RunJavaMethodSqlca("com.tenwa.lease.flow.project.projectapproval.BusinessTypeController","getBusinessType","");
sReturn = sReturn.split("@");
setItemValue(0,0,"productId",sReturn[0]);
setItemValue(0,0,"productName",sReturn[1]);
}else if(num>1){
showItem(0,"productName");//字段显示
showItem(0,"product_id");//字段显示
}
}
initRow();
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>