134 lines
5.3 KiB
Plaintext
134 lines
5.3 KiB
Plaintext
<%@page import="com.sun.org.apache.xalan.internal.xsltc.compiler.sym"%>
|
|
<%@page import="com.tenwa.reckon.product.ASObjectWindowCalc"%>
|
|
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
/*
|
|
Author: undefined 2017-07-10
|
|
Content: 示例详情页面
|
|
History Log:
|
|
*/
|
|
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
|
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
|
|
String FlowNo=CurPage.getParameter("FlowNo");//流程名称
|
|
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
|
String operationType = CurPage.getParameter("operationType");//获取产品类型
|
|
if(sPrevUrl == null) sPrevUrl = "";
|
|
String compClientID = CurPage.getParameter("CompClientID");
|
|
String rightType = CurPage.getParameter("RightType");
|
|
String sTempletNo = "BusinessProjectTempInfo";//--模板号--
|
|
BizObject bo=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT", "flow_unid=:flowunid").setParameter("flowunid",sFlowUnid).getSingleResult(false);
|
|
String custype = CurPage.getParameter("CustomerType");
|
|
String customertype = CurPage.getParameter("customertype");
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
doTemp.setHtmlEvent("inputTel","onChange","checkTel");
|
|
//租赁形式set只读
|
|
if((null!=sPhaseNo&&sPhaseNo.equals("0010")) && ("BusinessApplyFlow".equals(FlowNo) ||"BusinessChangeFlow".equals(FlowNo))){
|
|
doTemp.setReadOnly("LEAS_FORM", true);
|
|
doTemp.setReadOnly("PROJECT_SOURCE", false);
|
|
|
|
}
|
|
if("ReadOnly".equals(rightType)){
|
|
doTemp.setReadOnly("INPUTNAME", true);
|
|
doTemp.setReadOnly("INPUTTEL", true);
|
|
}
|
|
//如果是北汽的产品,业务申请号可编辑
|
|
if(!"ReadOnly".equals(rightType)&&sPhaseNo.equals("0010")&&"BAIC_MOTOR".equals(operationType)&&"BusinessApplyFlow".equals(FlowNo)){
|
|
doTemp.setReadOnly("PROJECT_NO", false);
|
|
}else{
|
|
doTemp.setReadOnly("PROJECT_NO", true);
|
|
}
|
|
String userll=null;
|
|
userll="/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp?CompClientID=";
|
|
if("01".equals(custype)||"01".equals(customertype)){
|
|
userll="/Tenwa/Customer/Lessee/Person/CustomerCompanyTempInfo.jsp?CompClientID=";
|
|
}
|
|
|
|
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
dwTemp.setGroupHidden("0020");
|
|
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
|
|
dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
|
String sButtons[][] = {
|
|
{"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""}
|
|
};
|
|
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
//去除项目审批信息难看样式
|
|
$("#PROJECT_NO").parent().find(".info_span").remove();
|
|
$("#PRODUCT_NAME").parent().find(".info_span").remove();
|
|
$("#LEAS_FORM").parent().find(".info_span").remove();
|
|
$(".info_td_left").css("width","150px");
|
|
$(".info_mid_line").css("width","50%");
|
|
})
|
|
function save(){
|
|
|
|
if(!checkinputName()){
|
|
return;
|
|
}
|
|
if(!checkTel()){
|
|
return ;
|
|
}
|
|
var leasfrom = getItemValue(0,getRow(),"LEAS_FORM");
|
|
var projectSource = getItemValue(0,getRow(),"PROJECT_SOURCE");
|
|
var inputName = getItemValue(0,getRow(),"inputName");
|
|
var inputTel = getItemValue(0,getRow(),"inputTel");
|
|
var customerType = "<%=custype%>";
|
|
var customerT = "<%=customertype%>";
|
|
var projectNo=getItemValue(0,getRow(),"PROJECT_NO");
|
|
if(projectNo.length<=0){
|
|
alert("请填写业务申请编号!!!");
|
|
return;
|
|
}
|
|
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkProjectNo","projectNo="+projectNo+",id="+getItemValue(0,getRow(),"ID"));
|
|
if("error"==sReturnInfo&&"BusinessApplyFlow"=="<%=FlowNo%>"){
|
|
alert("业务申请编号已被占用,请重新填写!!!");
|
|
return;
|
|
}
|
|
var operationType="<%=operationType%>";
|
|
|
|
if(customerType=="01"||customerT=="01"){//法人
|
|
//as_save("myiframe0","frame_list.window.saveCompany();");
|
|
// if("BAIC_MOTOR"==operationType){
|
|
var sReturn = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","changFlowKey","projectNo="+projectNo+",flowunid=<%=sFlowUnid%>");
|
|
if("false"==sReturn){
|
|
return "申请编号保存错误!!!";
|
|
}
|
|
// }
|
|
frame_list.window.saveCompany(inputName,inputTel,projectNo);
|
|
//as_save(0);
|
|
}
|
|
if(customerType=="03"||customerT=="03"){//自然人
|
|
frame_list.window.saveRecord(leasfrom,projectSource,inputName,inputTel,projectNo,operationType);
|
|
//as_save("myiframe0","frame_list.window.as_save(0);");
|
|
}
|
|
}
|
|
|
|
function checkTel(){//校验手机号格式和不为空校验
|
|
var mobile = getItemValue(0,getRow(0),"inputTel");
|
|
if(mobile==""){
|
|
setErrorTips("inputTel","手机号不能为空!");
|
|
return false;
|
|
}
|
|
if(CheckPhoneCode(mobile)){
|
|
setErrorTips("inputTel","");
|
|
return true;
|
|
}else{
|
|
setErrorTips("inputTel","报单人电话格式不正确!");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function checkinputName(){
|
|
var inputName = getItemValue(0,getRow(0),"inputName");
|
|
if(inputName==""){
|
|
setErrorTips("inputName","报单人不能为空!");
|
|
return false;
|
|
}else{
|
|
setErrorTips("inputName","");
|
|
return true;
|
|
}
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |