612 lines
21 KiB
Plaintext
612 lines
21 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ page import="com.tenwa.util.ProjectConstant"%>
|
||
<%@ 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 distributorNo = "";
|
||
String distributorType = "";
|
||
String orgId = CurUser.getOrgID();
|
||
//如果是直营店,则显示子经销。
|
||
String sSql = "select DISTRIBUTOR_NO,TYPE from O where ORGID = :orgId";
|
||
// TYPE=type03 直营店 包含 中车
|
||
BizObject bo = JBOFactory.createBizObjectQuery("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", sSql).setParameter("orgId", orgId).getSingleResult(false);
|
||
if(bo != null){
|
||
distributorNo = bo.getAttribute("DISTRIBUTOR_NO").getString();
|
||
distributorType = bo.getAttribute("TYPE").getString();
|
||
}
|
||
System.out.println(distributorNo);
|
||
System.out.println(distributorType);
|
||
String sApplyType = CurPage.getParameter("ApplyType");
|
||
String sInputUserID = CurUser.getUserID();
|
||
|
||
String distributorNoConfig = ProjectConstant.DISTIRBUTOR_NO;//获取需要配置经销商
|
||
|
||
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);
|
||
doTemp.setHtmlEvent("Customer_type", "onchange", "setCertType");
|
||
doTemp.setHtmlEvent("carAttributes", "onchange", "changeProductName");
|
||
doTemp.setHtmlEvent("leasehold", "onchange", "changeProductName");
|
||
//doTemp.setHtmlEvent("CustomerName", "onchange", "checkNameAndCertId");
|
||
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">
|
||
$(function(){
|
||
$("#A_div_0150").attr("style","display:none;");
|
||
var beforeId = "<%=CurPage.getParameter("beforeId")%>";
|
||
if(typeof(beforeId) !="undefined" && beforeId!="null" && beforeId.length > 0){
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BeforeAppLicationCheck","getBusinessapplyData","id="+beforeId);
|
||
if("error"!= sReturnInfo){
|
||
var data = sReturnInfo.split("@");
|
||
setItemValue(0,0,"CustomerName",data[0]);
|
||
setItemValue(0,0,"certid",data[1]);
|
||
MyOjbect.brandid=data[3];
|
||
MyOjbect.brandname=data[2];
|
||
setItemValue(0,getRow(),"productModel",data[2]);
|
||
MyOjbect.seriesid=data[5];
|
||
MyOjbect.seriesname=data[4];
|
||
setItemValue(0,getRow(),"carSeries",data[4]);
|
||
|
||
MyOjbect.modelid=data[7];
|
||
MyOjbect.modelname=data[6];
|
||
MyOjbect.price=data[8];
|
||
MyOjbect.liter=data[9];
|
||
MyOjbect.geartype=data[10];
|
||
setItemValue(0,getRow(),"modelid",data[7]);
|
||
setItemValue(0,getRow(),"carSystem",data[6]);
|
||
setItemValue(0,getRow(),"price",data[8]);
|
||
setItemValue(0,getRow(),"liter",data[9]);
|
||
setItemValue(0,getRow(),"geartype",data[10]);
|
||
|
||
setItemValue(0,getRow(),"newtype","ysp");
|
||
|
||
setItemValue(0,0,"CUSTOMER_TYPE","03");
|
||
setItemValue(0,0,"certtype","Ind01");
|
||
}
|
||
}
|
||
})
|
||
var operationType='';
|
||
var SubjectId='';
|
||
function changeProductName(){//清空产品名称
|
||
setItemValue(0,getRow(0),"productName","");
|
||
}
|
||
|
||
//判断经销商是否显示: 如果为自营则显示
|
||
function checkDispalyDistributor() {
|
||
var distributorType22 = "<%=distributorType%>";
|
||
if(distributorType22 == "types03"){
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function checkNameAndCertId(){//校验姓名和证件号
|
||
//var customerName = getItemValue(0,getRow(),"CustomerName");
|
||
var certId = getItemValue(0,getRow(),"certid");
|
||
var customerType = getItemValue(0,getRow(),"Customer_type");
|
||
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
|
||
var sParams = "certId="+certId+",customerType="+customerType;
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkNameAndCertId",sParams);
|
||
return sReturnInfo;
|
||
}
|
||
|
||
/*~[Describe=保存并初始化数据;InputParam=无;OutPutParam=无;]~*/
|
||
function saveRecord()
|
||
{
|
||
|
||
//从页面上获取客户编号,产品编号
|
||
var carAttributes = getItemValue(0,getRow(),"carAttributes");//车辆属性
|
||
var leasehold = getItemValue(0,getRow(),"leasehold");//租赁方式
|
||
var productModel =getItemValue(0,getRow(),"productModel");//品牌
|
||
var carSeries = getItemValue(0,getRow(),"carSeries");//车系
|
||
var carSystem = getItemValue(0,getRow(),"carSystem");//车型
|
||
var productId = getItemValue(0,getRow(),"productId");//产品ID
|
||
var productname = getItemValue(0,getRow(),"productName");//产品名称
|
||
var custid = getItemValue(0,getRow(),"CustomerID");//客户ID
|
||
var custname = getItemValue(0,getRow(),"CustomerName");//客户名称
|
||
var customerType = getItemValue(0,getRow(),"Customer_type");//客户类型
|
||
var certtype = getItemValue(0,getRow(),"certtype");//证件类型
|
||
var certid = getItemValue(0,getRow(),"certid");//证件号
|
||
var versionid = getItemValue(0,getRow(),"versionid");//版本ID
|
||
var modelid = getItemValue(0,getRow(),"modelid");//车型ID
|
||
var businessType = "1";//业务类型,1是汽车业务,2是传统业务,3是汽车传统业务
|
||
var price = getItemValue(0,getRow(),"price");//车辆指导价
|
||
var liter = getItemValue(0,getRow(),"liter");//排量
|
||
var geartype = getItemValue(0,getRow(),"geartype");//档位
|
||
var newtype = getItemValue(0,getRow(),"newtype");//档位
|
||
var cartype = getItemValue(0,getRow(),"cartype");//车辆类型(乘用车/商用车)
|
||
var vehicletype = getItemValue(0,getRow(),"vehicletype");//商用车设备类型
|
||
var vehiclelevel = getItemValue(0,getRow(),"vehiclelevel");//商用车设备级别
|
||
var CustomerId="";
|
||
var ceckRes = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkNameAndCertId","certid="+certid+",certtype="+certtype);
|
||
CustomerId=ceckRes;
|
||
|
||
if(carAttributes==""){
|
||
alert("该产品未配置车辆属性,请完善或选择别的产品!");
|
||
return;
|
||
}
|
||
if(leasehold==""){
|
||
alert("该产品未配置租赁方式,请完善或选择别的产品!");
|
||
return;
|
||
}
|
||
if(productModel==""){
|
||
alert("请选择汽车品牌");
|
||
return;
|
||
}
|
||
if(carSystem==""){
|
||
alert("请选择品牌车系");
|
||
|
||
return;
|
||
}
|
||
if(carSeries==""){
|
||
alert("请选择品牌车型");
|
||
return;
|
||
}
|
||
if(custname==""){
|
||
alert("请输入客户名称");
|
||
return;
|
||
}
|
||
if(customerType==""){
|
||
alert("请选择客户类别");
|
||
return;
|
||
}
|
||
if(certtype==""){
|
||
alert("请选择证件类型");
|
||
return;
|
||
}
|
||
if(certid==""){
|
||
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 distributorType = "<%=distributorType%>";
|
||
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||
sParams =sParams+",SubjectId="+SubjectId+",SubjectName="+message[1]+",ProductId="+productId+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",CustomerId="+CustomerId+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid+",modelid="+modelid+",businessType="+businessType+",price="+price+",liter="+liter+",geartype="+geartype+",sourcetype=web,operationType="+operationType+",newtype="+newtype;
|
||
sParams =sParams+",cartype="+cartype+",vehicletype="+vehicletype+",vehiclelevel="+vehiclelevel;//赋值新增的三个车型信息
|
||
sParams =sParams+",distributorType="+distributorType;//新增自营店信息作为显示经销商变更页签显示条件
|
||
//
|
||
// if("BAIC_MOTOR"==operationType){
|
||
if(checkDispalyDistributor()){
|
||
sParams = sParams+",distributorNo="+getItemValue(0,getRow(),"distributorNo")+",distributorName="+getItemValue(0,getRow(),"distributorName");
|
||
}
|
||
//如果是个人,将对应的性别参数参数到流程中
|
||
if("03"==customerType){
|
||
var sex = certid.substring(16,17);
|
||
sex = parseInt(sex);
|
||
if(sex%2==0){//奇男偶女
|
||
sParams = sParams+",sex=2";
|
||
}else{
|
||
sParams = sParams+",sex=1";
|
||
}
|
||
}
|
||
//判断是否是中车经销商。如果是中车的渠道类型是为ZC,其它的则不存
|
||
if("<%=distributorNoConfig%>" == "<%=distributorNo%>" ){
|
||
sParams = sParams+",channel=ZC";
|
||
}
|
||
//添加车型标识
|
||
sParams = sParams+",cartypea="+MyOjbect.cartypea;
|
||
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+"@"+carAttributes+"@"+leasehold+"@"+carSystem+"@"+custname+"@"+certtype+"@"+certid+"@"+productModel+"@"+carSeries+"@"+versionid+"@"+modelid+"@"+businessType+"@"+price+"@"+geartype);
|
||
}
|
||
}
|
||
|
||
/*~[Describe=确认新增申请;InputParam=无;OutPutParam=无;]~*/
|
||
function doCreation()
|
||
{
|
||
// var result = checkNameAndCertId();
|
||
// if(result=="2"){
|
||
// alert("证件号已存在!请重新输入!");
|
||
// return;
|
||
// }
|
||
if(!checkCertInfo(true)) return ;
|
||
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 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];
|
||
MyOjbect.cartypea = sReturn[3];
|
||
setItemValue(0,getRow(),"productModel",sReturn[1]);
|
||
|
||
MyOjbect.seriesid=null;
|
||
MyOjbect.seriesname=null;
|
||
setItemValue(0,getRow(),"carSeries",null);
|
||
|
||
MyOjbect.modelid=null;
|
||
MyOjbect.modelname=null;
|
||
|
||
setItemValue(0,getRow(),"modelid",null);
|
||
setItemValue(0,getRow(),"carSystem",null);
|
||
|
||
setItemValue(0,getRow(),"cartype",sReturn[2]);
|
||
carReadonly(MyOjbect.cartypea);
|
||
|
||
},"请选择车品牌",'');
|
||
}
|
||
|
||
function carReadonly(cartypea){
|
||
if("SYC"==cartypea){
|
||
setItemReadOnly(0,0,"carSeries",false);
|
||
setItemReadOnly(0,0,"carSystem",false);
|
||
}
|
||
}
|
||
|
||
|
||
<%/*~[Describe=请选择车系;]~*/%>
|
||
function selectCarSeries()
|
||
{
|
||
|
||
var brandid="";
|
||
if(MyOjbect.brandid){
|
||
brandid=MyOjbect.brandid;
|
||
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]);
|
||
|
||
MyOjbect.modelid=null;
|
||
MyOjbect.modelname=null;
|
||
|
||
setItemValue(0,getRow(),"modelid",null);
|
||
setItemValue(0,getRow(),"carSystem",null);
|
||
|
||
|
||
},"请选择车系",'');
|
||
}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];
|
||
MyOjbect.price=Math.round(sReturn[2]*10000);
|
||
MyOjbect.liter=sReturn[3];
|
||
MyOjbect.geartype=sReturn[4];
|
||
setItemValue(0,getRow(),"modelid",sReturn[0]);
|
||
setItemValue(0,getRow(),"carSystem",sReturn[1]);
|
||
setItemValue(0,getRow(),"price",MyOjbect.price);
|
||
setItemValue(0,getRow(),"liter",sReturn[3]);
|
||
setItemValue(0,getRow(),"geartype",sReturn[4]);
|
||
|
||
setItemValue(0,getRow(),"cartype",sReturn[5]);
|
||
setItemValue(0,getRow(),"vehicletype",sReturn[6]);
|
||
setItemValue(0,getRow(),"vehiclelevel",sReturn[7]);
|
||
},"请选择车型",'');
|
||
}else{
|
||
alert("请先选择车系");
|
||
}
|
||
}
|
||
|
||
<%/*~[Describe=选择产品;]~*/%>
|
||
function selectBusinessType()
|
||
{
|
||
/* var carAttr = false;
|
||
var carAttributes = getItemValue(0,getRow(),"carAttributes");
|
||
if(carAttributes){
|
||
carAttr = true;
|
||
}else{
|
||
carAttr = false;
|
||
}
|
||
var lease = false;
|
||
var leasehold = getItemValue(0,getRow(),"leasehold");
|
||
if(leasehold){
|
||
lease = true;
|
||
}else{
|
||
lease = false;
|
||
} */
|
||
var modelid = false;
|
||
var model = getItemValue(0,getRow(),"modelid");
|
||
if(model){
|
||
modelid = true;
|
||
}else{
|
||
modelid = false;
|
||
}
|
||
var CurOrgID=<%=CurOrg.getOrgID()%>;
|
||
var YesNo="Y";
|
||
if( MyOjbect.cartypea=="SYC" || modelid==true ){
|
||
modelid=getItemValue(0,getRow(),"modelid");
|
||
if(""== modelid && MyOjbect.cartypea=="SYC"){
|
||
modelid = null;
|
||
}
|
||
AsDialog.OpenSelector("selectProductVersionInfo","attribute2,car_product,modelid,"+modelid+",CurOrgID,"+CurOrgID+",YesNo,"+YesNo,"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);
|
||
MyOjbect.typeno = sReturn[0];//产品编号
|
||
MyOjbect.sortno = sReturn[1];//产品排序号
|
||
MyOjbect.typename = sReturn[2];//产品名称
|
||
MyOjbect.PRODUCTID = sReturn[3];//产品ID
|
||
MyOjbect.VERSIONID = sReturn[4];//版本ID
|
||
MyOjbect.id = sReturn[5];//经销商ID
|
||
MyOjbect.distributor_name = sReturn[6];//经销商名称
|
||
MyOjbect.modelid = sReturn[7];//车型ID
|
||
MyOjbect.modelname = sReturn[8];//车型名称
|
||
operationType = sReturn[11];
|
||
SubjectId = sReturn[12];
|
||
|
||
setItemValue(0,0,"productName",sReturn[2]);
|
||
setItemValue(0,0,"productId",sReturn[3]);
|
||
setItemValue(0,0,"versionid",sReturn[4]);
|
||
setItemValue(0,0,"carAttributes",sReturn[9]);
|
||
setItemValue(0,0,"leasehold",sReturn[10]);
|
||
setItemValue(0,0,"distributorName","");
|
||
setItemValue(0,0,"distributorNo","");
|
||
dispalyDistributor(operationType);//根据产品判断是否选择经销商
|
||
},"请选择产品",'');
|
||
}else{
|
||
alert("请先选择车型");
|
||
/*if(modelid){
|
||
alert("请先选择车型");
|
||
}
|
||
if(carAttr==false){
|
||
alert("请先选择车辆属性");
|
||
}
|
||
if(lease==false){
|
||
alert("请先选择租赁方式");
|
||
} */
|
||
}
|
||
|
||
// if(carAttributes=='01'){
|
||
// 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]);
|
||
// },"请选择产品",'');
|
||
// }else if(carAttributes=='02'){
|
||
// 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]);
|
||
// },"请选择产品",'');
|
||
// }
|
||
|
||
}
|
||
//根据产品是否选择经销商
|
||
function dispalyDistributor(operationType){
|
||
if(checkDispalyDistributor()){
|
||
$("#A_div_0150").attr("style","display:block;");
|
||
setItemRequired(0,"DISTRIBUTORNAME",true);
|
||
}else{
|
||
$("#A_div_0150").attr("style","display:none;");
|
||
setItemRequired(0,"DISTRIBUTORNAME",false);
|
||
}
|
||
}
|
||
function selectDistributor(){
|
||
var productId = getItemValue(0,0,"productId");
|
||
AsDialog.OpenSelector("selectDistributorNew","distributorNum,<%=distributorNo%>,productId,"+productId,"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,"distributorName",sReturn[0]);
|
||
setItemValue(0,0,"distributorNo",sReturn[1]);
|
||
setCertType();
|
||
},"请选择经销商",'');
|
||
}
|
||
<%/*~[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]);
|
||
setCertType();
|
||
},"请选择客户",'');
|
||
}
|
||
|
||
function setCertType(){
|
||
var customerType = getItemValue(0,0,"Customer_type");
|
||
if("01" == customerType){
|
||
// if(carType == "stock_car"){
|
||
// AsDebug.showMessage("提示","法人不允许做存量车业务","","",true);
|
||
// setItemValue(0,0,"CUSTOMERTYPE","");
|
||
// setItemValue(0,0,"CERTTYPE","");
|
||
// return;
|
||
// }
|
||
setItemValue(0,0,"certtype","Ent02");
|
||
}else if("03" == customerType){
|
||
setItemValue(0,0,"certtype","Ind01");
|
||
}
|
||
}
|
||
|
||
function checkCertInfo(flag){
|
||
if(typeof(flag)=="undefined") flag=false;
|
||
var certType = getItemValue(0,getRow(),"certtype");
|
||
var certid = getItemValue(0,getRow(),"certid");
|
||
//判断组织机构代码合法性
|
||
if(certType =='Ind01'){
|
||
if(certid.length!=18){
|
||
setErrorTips("certid","身份证必须是18位!");
|
||
return false;
|
||
}
|
||
if(CheckLicense(certid) ){
|
||
return true;
|
||
}else{
|
||
setErrorTips("certid","身份证格式错误!");
|
||
return false;
|
||
}
|
||
}
|
||
if(certType =='Ent02'){
|
||
if(!checkORGRight(certid) ){
|
||
setErrorTips("certid","统一社会信用代码格式错误!");
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
|
||
</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"%> |