288 lines
8.6 KiB
Plaintext
288 lines
8.6 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: 新增申请页面---业务品种和1
|
||
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 = "BusnessApprovalApplyCreationInfo";//--模板号--
|
||
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");
|
||
var customerType = getItemValue(0,getRow(),"Customer_type");
|
||
var carSystem = getItemValue(0,getRow(),"carSystem");
|
||
var certtype =getItemValue(0,getRow(),"certtype");
|
||
var certid =getItemValue(0,getRow(),"certid");
|
||
var carSeries = getItemValue(0,getRow(),"carSeries");
|
||
var productModel =getItemValue(0,getRow(),"productModel");
|
||
var brandid = getItemValue(0,getRow(),"brandid");
|
||
var seriesid = getItemValue(0,getRow(),"seriesid");
|
||
var modelid = getItemValue(0,getRow(),"modelid");
|
||
if(certtype==""){
|
||
alert("请选择证件类型");
|
||
|
||
return;
|
||
}
|
||
if(carSystem==""){
|
||
alert("请选择品牌车系");
|
||
|
||
return;
|
||
}
|
||
if(carSeries==""){
|
||
alert("请选择品牌车型");
|
||
return;
|
||
}
|
||
if(certid==""){
|
||
alert("请输入证件号码");
|
||
|
||
return;
|
||
}
|
||
if(productModel==""){
|
||
alert("请选择汽车品牌");
|
||
|
||
return;
|
||
}
|
||
if(productid==""){
|
||
alert("请选择业务品种");
|
||
|
||
return;
|
||
}
|
||
if(customerType==""){
|
||
alert("请选择客户类别");
|
||
|
||
return;
|
||
}
|
||
|
||
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||
sParams =sParams+",ProductId="+productid+",ProductName="+productname+",Customer_type="+customerType+",CustomerType="+customerType;
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction","initFLow",sParams);
|
||
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_" )
|
||
{
|
||
doCancel();
|
||
|
||
}
|
||
else
|
||
{
|
||
parent.AsDialog.ClosePage(sReturnInfo+"@"+customerType);
|
||
}
|
||
}
|
||
|
||
|
||
/*~[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">
|
||
var MyOjbect={};
|
||
<%/*~[Describe=选择客户;]~*/%>
|
||
function selectCustomerName()
|
||
{
|
||
AsDialog.OpenSelector("SelectCustomerForProjectApprove","","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("@");
|
||
alert(sReturn[1]);
|
||
setItemValue(0,0,"CUSTOMERID",sReturn[0]);
|
||
setItemValue(0,0,"customername",sReturn[1]);
|
||
},"请选择客户",'');
|
||
}
|
||
|
||
|
||
<%/*~[Describe=选择业务品种;]~*/%>
|
||
function selectBusinessType()
|
||
{
|
||
AsDialog.OpenSelector("SelectBusinessType","ProductType,1,TypeNo,0005","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("@");
|
||
alert(sReturn);
|
||
setItemValue(0,0,"productId",sReturn[0]);
|
||
setItemValue(0,0,"productName",sReturn[1]);
|
||
},"请选择业务品种",'');
|
||
}
|
||
|
||
|
||
<%/*~[Describe=选择车品牌;]~*/%>
|
||
function selectProductModel()
|
||
{
|
||
AsDialog.OpenSelector("SelectCardataBrand","","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("@");
|
||
MyOjbect.brandid=sReturn[0];
|
||
MyOjbect.brandname=sReturn[1];
|
||
setItemValue(0,getRow(),"productModel",sReturn[1]);
|
||
},"请选择车品牌",'');
|
||
}
|
||
<%/*~[Describe=请选择车系;]~*/%>
|
||
function selectCarSeries()
|
||
{
|
||
|
||
var brandid="";
|
||
if(MyOjbect.brandid){
|
||
brandid=MyOjbect.brandid;
|
||
debugger;
|
||
AsDialog.OpenSelector("SelectCardataSeries","brandid,"+brandid,"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("@");
|
||
MyOjbect.seriesid=sReturn[0];
|
||
MyOjbect.seriesname=sReturn[1];
|
||
setItemValue(0,getRow(),"carSeries",sReturn[1]);
|
||
},"请选择车系",'');
|
||
}else{
|
||
alert("请先选择车品牌")
|
||
}
|
||
|
||
}
|
||
<%/*~[Describe=选择车型;]~*/%>
|
||
function selectCarSystem()
|
||
{
|
||
var seriesid="";
|
||
if(MyOjbect.seriesid){
|
||
seriesid=MyOjbect.seriesid;
|
||
AsDialog.OpenSelector("SelectCardataModel","seriesid,"+seriesid,"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("@");
|
||
MyOjbect.modelid=sReturn[0];
|
||
MyOjbect.modelname=sReturn[1];
|
||
setItemValue(0,getRow(),"carSystem",sReturn[1]);
|
||
},"请选择车型",'');
|
||
}else{
|
||
alert("请先选择车系");
|
||
}
|
||
}
|
||
</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"%> |