2023-09-26 14:41:08 +08:00

253 lines
9.6 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 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 userId= CurUser.getUserID();
String userName = CurUser.getUserName();
String orgId = CurUser.getOrgID();
String sFlowUnid = CurPage.getParameter("FlowUnid");//Á÷³Ì±àºÅ
String sPhaseNo=CurPage.getParameter("PhaseNo");//½×¶ÎºÅ
String FlowNo=CurPage.getParameter("FlowNo");//Á÷³ÌÃû³Æ
String projectNo=CurPage.getParameter("ProjectNo");//ÏîÄ¿±àºÅ
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";//--Ä£°åºÅ--
String custype = CurPage.getParameter("CustomerType");
String customertype = CurPage.getParameter("customertype");
String channel = CurPage.getParameter("channel");
String flowName = CurPage.getParameter("FlowName");
String isHistory = CurComp.getParameter("IsHistory");
String ishistoryNew = CurComp.getParameter("IsHistoryNew");
String falg = "false";
if("0010".equals(sPhaseNo) || "0020".equals(sPhaseNo) ){
falg = "true";
}
if("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowName)){
falg = "false";
}
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);
doTemp.setReadOnly("ZC_PROJECT_NUMBER", true);
doTemp.setReadOnly("ZC_CONTRACT_NUMBER", true);
};
//Èç¹ûÊDZ±ÆûµÄ²úÆ·£¬ÒµÎñÉêÇëºÅ¿É±à¼­
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=";
};
if("ZC".equals(channel)){
doTemp.setVisible("ZC_PROJECT_NUMBER",true);
doTemp.setRequired("ZC_PROJECT_NUMBER",true);
doTemp.setVisible("ZC_CONTRACT_NUMBER",true);
doTemp.setRequired("ZC_CONTRACT_NUMBER",true);
};
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=\"1200px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", CurPage.getObjectWindowOutput());
if ("true".equals(ishistoryNew)) falg = "false";
String auditFlag = "false";
//ÐÅÉó²¿ÃÅ8009011005
if("8009011005".equals(orgId)&&("BusinessApplyFlow".equals(FlowNo)||"BusinessChangeFlow".equals(FlowNo))&&(!"0010".equals(sPhaseNo)&&!"0020".equals(sPhaseNo))){
auditFlag = "true";
}
String sButtons[][] = {
{falg,"","Button","±£´æ","±£´æ","save()","","","","btn_icon_saveNew",""},
{"true","","Button","×ÊÁÏÇåµ¥","×ÊÁÏÇåµ¥","openFileList('1')","","","","btn_icon_saveNew",""},
{auditFlag,"","Button","ÐÅÉó×ÊÁÏ","ÐÅÉó×ÊÁÏ","openFileList('2')","","","","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 ;
}
if("ZC"=="<%=channel%>"){
if(!checkZcProjectNumber()){
return ;
}
if(!checkZcContractNumber()){
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 zcProjectNumber = getItemValue(0,getRow(),"ZC_PROJECT_NUMBER");
var zcContractNumber = getItemValue(0,getRow(),"ZC_CONTRACT_NUMBER");
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,zcProjectNumber,zcContractNumber);
//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;
}
}
function checkZcProjectNumber(){
var zcProjectNumber = getItemValue(0,getRow(0),"ZC_PROJECT_NUMBER");
if(zcProjectNumber==""){
setErrorTips("ZC_PROJECT_NUMBER","ÖгµÉêÇëºÅ²»ÄÜΪ¿Õ!");
return false;
}else{
setErrorTips("ZC_PROJECT_NUMBER","");
return true;
}
}
function checkZcContractNumber(){
var zcContractNumber = getItemValue(0,getRow(0),"ZC_CONTRACT_NUMBER");
if(zcContractNumber==""){
setErrorTips("ZC_CONTRACT_NUMBER","ÖгµºÏͬºÅ²»ÄÜΪ¿Õ!");
return false;
}else{
setErrorTips("ZC_CONTRACT_NUMBER","");
return true;
}
}
function openFileList(type){
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
let params = getRequestParam();
if(type==2){
params = getRequestParamOfCredit();
}
if(params!=null){
AsControl.postICMS(url,params);
}
}
function getRequestParam(){
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
let index = appInfo.indexOf("@");
if(index==-1){
alert(appInfo);
return;
}
let appCode = appInfo.substr(0,index);
let appName = appInfo.substr(index+1,appInfo.length);
if(appCode=='0000'){
alert(appName);
return;
}
let code = 'ECM0002';
if(("<%=FlowNo%>"=="BusinessApplyFlow"||"<%=FlowNo%>"=="BusinessChangeFlow")&&"<%=sPhaseNo%>"=="0010"&&"ReadOnly"!="<%=rightType%>"&&"true"!="<%=isHistory%>"&&"true"!="<%=ishistoryNew%>"){
code = 'ECM0001';
}
let busiNo="<%=projectNo%>";
if(busiNo==null||busiNo==""||busiNo=="null"){
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
}
let identity = $("#frame_list")[0].contentWindow.getIdentity();
let customerName = $("#frame_list")[0].contentWindow.getCustomerName();
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"+",identity="+identity+",customerName="+customerName);
return param;
}
function getRequestParamOfCredit(){
let code = 'ECM0002';
if(("<%=FlowNo%>"=="BusinessApplyFlow"||"<%=FlowNo%>"=="BusinessChangeFlow")&&("<%=sPhaseNo%>"!="0010"&&"<%=sPhaseNo%>"!="0020")&&"ReadOnly"!="<%=rightType%>"&&"true"!="<%=isHistory%>"&&"true"!="<%=ishistoryNew%>"){
code = 'ECM0001';
}
let busiNo="<%=projectNo%>";
if(busiNo==null||busiNo==""||busiNo=="null"){
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
}
let identity = $("#frame_list")[0].contentWindow.getIdentity();
let customerName = $("#frame_list")[0].contentWindow.getCustomerName();
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode=AZPLGPA,appName=ÐÅÉóרÊô×ÊÁÏ,code="+code+",busiNo="+busiNo+",userCode=<%=userId%>"+",userName=<%=userName%>"+",identity="+identity+",customerName="+customerName);
return param;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>