463 lines
23 KiB
Plaintext
463 lines
23 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%>
|
||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP"%>
|
||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP"%>
|
||
<%@page import="jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP"%>
|
||
<%@page import="jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP"%>
|
||
<%@page import="com.amarsoft.app.check.CheckFLowPhaseNo"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||
/*
|
||
Author: undefined 2016-05-27
|
||
Content: 示例详情页面
|
||
History Log:
|
||
*/
|
||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||
String customertype = CurPage.getParameter("customertype");//获取客户类型,用于判断生成合同的方法
|
||
|
||
|
||
String flowunid=CurPage.getParameter("FlowUnid");
|
||
String ishistory=CurPage.getParameter("IsHistory");
|
||
String proj_id=CurPage.getParameter("proj_id");
|
||
String projectId=CurPage.getParameter("ProjectId");//获取项目projectID
|
||
String taskno=CurPage.getParameter("TaskNo");
|
||
String nodeNo=CurPage.getParameter("NodeNo");
|
||
String contractNo=CurPage.getParameter("ContractNo");
|
||
String FlowKey=CurPage.getParameter("FlowKey");//获取合同编号
|
||
String flowName=CurPage.getParameter("FlowName");//获取合同名称
|
||
String contractid=CurPage.getParameter("ContractId");//获取合同id
|
||
String isnetcar=CurPage.getParameter("isNetCar");//获取是否是网约车
|
||
String SubjectId=CurPage.getParameter("SubjectId");//获取主体ID
|
||
|
||
if(null==contractNo ||"null".equals(contractNo) ){
|
||
contractNo=FlowKey;
|
||
}
|
||
String RightType= CurPage.getParameter("RightType");
|
||
String phaseno = CheckFLowPhaseNo.run(flowunid, taskno);
|
||
String sFileSaveMode = CurConfig.getConfigure("FileSaveMode");
|
||
String sFileSavePath = CurConfig.getConfigure("FileSavePath");
|
||
String sFileNameType = CurConfig.getConfigure("FileNameType");
|
||
//获取租赁方式,用于判断生成的合同类型
|
||
String leasform = CurPage.getParameter("leasform");
|
||
if(sPrevUrl == null) sPrevUrl = "";
|
||
String sTempletNo = "BaseFileTemplateSelect";//--模板号--
|
||
|
||
String product_id = Sqlca.getString("select PRODUCT_ID from lb_project_info where id='"+projectId+"'");
|
||
//获取盖章模式
|
||
String sealType = Sqlca.getString("select sealType from PRD_SPECIFIC_LIBRARY where productid='"+product_id+"'");
|
||
//获取签约模式
|
||
String signType = Sqlca.getString("select signType from PRD_SPECIFIC_LIBRARY where productid='"+product_id+"'");
|
||
|
||
//获取对应的承租信息
|
||
String certid="";
|
||
String mobile="";
|
||
String address="";
|
||
//网约车挂靠方信息
|
||
String NetMortgagor = "";
|
||
String NetCertid = "";
|
||
String NetMobile = "";
|
||
String Netaddress="";
|
||
/* BizObjectManager lultm = JBOFactory.getBizObjectManager(LB_UNION_LESSEE_temp.CLASS_NAME);
|
||
String sSql = "select o.CUSTOMER_ID FROM o where o.flowunid =:flowunid";
|
||
BizObject lult = lultm.createQuery(sSql).setParameter("flowunid", flowunid).getSingleResult(false); */
|
||
String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+flowunid+"'");
|
||
if("01".equals(customertype)){
|
||
BizObjectManager cctm = JBOFactory.getBizObjectManager(CUSTOMER_COMPANY_TEMP.CLASS_NAME);
|
||
String sSql = "select o.certid,o.tel,o.reg_address,o.company_name FROM o where o.customerid =:customerid";
|
||
BizObject cct = cctm.createQuery(sSql).setParameter("customerid", customerid).getSingleResult(false);
|
||
certid=cct.getAttribute("certid").getString();
|
||
mobile=cct.getAttribute("tel").getString();
|
||
address=cct.getAttribute("reg_address").getString();
|
||
NetMortgagor=cct.getAttribute("company_name").getString();
|
||
}else{
|
||
BizObjectManager cptm = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME);
|
||
BizObjectManager catm = JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS_TEMP.CLASS_NAME);
|
||
String sSql = "select o.certid,o.mobile,o.nativeplace,o.MAILING_ADDRESS,o.fullname,o.WORKADD FROM o where o.customerid =:customerid and o.flowunid=:flowunid";
|
||
String catSql = "select o.FULLADDRESS FROM o where o.customerid =:customerid and o.flowunid=:flowunid";
|
||
BizObject cpt = cptm.createQuery(sSql).setParameter("customerid", customerid).setParameter("flowunid", flowunid).getSingleResult(false);
|
||
BizObject cat = catm.createQuery(catSql).setParameter("customerid", customerid).setParameter("flowunid", flowunid).getSingleResult(false);
|
||
certid=cpt.getAttribute("certid").getString();
|
||
mobile=cpt.getAttribute("mobile").getString();
|
||
if("居住地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){
|
||
address=cat.getAttribute("FULLADDRESS").getString();
|
||
}else if("户籍地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){
|
||
address=cpt.getAttribute("nativeplace").getString();
|
||
}else if("单位地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){
|
||
address=cpt.getAttribute("WORKADD").getString();
|
||
}
|
||
NetMortgagor=cpt.getAttribute("fullname").getString();
|
||
}
|
||
//给网约车模板
|
||
if("1".equals(isnetcar)){
|
||
BizObjectManager cctm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO_TEMP.CLASS_NAME);
|
||
String sSql = "select o.IS_AFFILIATED,o.NETCERTID,o.AFFILIATEDNAME,o.AFFILIATEDACTUALADDRESS FROM o where o.flowunid =:flowunid";
|
||
BizObject cct = cctm.createQuery(sSql).setParameter("flowunid", flowunid).getSingleResult(false);
|
||
if("1".equals(cct.getAttribute("IS_AFFILIATED").getString())){
|
||
NetMortgagor = cct.getAttribute("AFFILIATEDNAME").getString();
|
||
NetCertid = cct.getAttribute("NETCERTID").getString();
|
||
Netaddress = cct.getAttribute("AFFILIATEDACTUALADDRESS").getString();
|
||
}else{
|
||
NetCertid = certid;
|
||
NetMobile = mobile;
|
||
Netaddress = address;
|
||
}
|
||
}
|
||
|
||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||
String a="false";//融资租赁
|
||
String b="false";//保理
|
||
String c="false";//直租
|
||
String d="false";//回租
|
||
//查询contract_id
|
||
String sContractId = "";//合同表的主键
|
||
String sProjId="";//项目表主键
|
||
String sProductId="";
|
||
String LeaseType="";
|
||
BizObjectManager bomcl = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||
String sSql = "select o.proj_id,o.contract_id,o.productId FROM o where o.flow_unid =:flow_unid";
|
||
BizObject bocl = bomcl.createQuery(sSql).setParameter("flow_unid", flowunid).getSingleResult(false);
|
||
if (bocl != null) {
|
||
sContractId= bocl.getAttribute("contract_id").getString();
|
||
sProjId=bocl.getAttribute("proj_id").getString();
|
||
sProductId=bocl.getAttribute("productId").getString();
|
||
}
|
||
/* if (sProductId.equals("0005")){
|
||
LeaseType="DoubleLease";
|
||
}else if(sProductId.equals("0001")){
|
||
LeaseType="NormalLease";
|
||
}else if(sProductId.equals("004")){
|
||
LeaseType="CarBusiness";
|
||
}else{
|
||
LeaseType="NoBusiness";
|
||
} */
|
||
|
||
doTemp.setHtmlEvent("ONECLASSIFY","onchange","initTwoClass");
|
||
doTemp.setHtmlEvent("TWOCLASSIFY","onchange","initThreeClass");
|
||
doTemp.setHtmlEvent("THREECLASSIFY","onchange","initFourClass");
|
||
doTemp.setHtmlEvent("FOURCLASSIFY","onchange","loadFileTemplateClasses");
|
||
CurPage.getCurComp().setAttribute("RightType", null);
|
||
//doTemp.setColTips("", "测试");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||
dwTemp.Style = "2";//freeform
|
||
//dwTemp.ReadOnly = "-2";//只读模式
|
||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
|
||
CurPage.getCurComp().setAttribute("RightType", RightType);
|
||
//isShowButton=false;
|
||
String compClientID = request.getParameter("CompClientID");
|
||
String sparm="";
|
||
dwTemp.replaceColumn("LBContractTemplateList", "<iframe id=\"LBContractTemplateList\" type='iframe' name=\"LBContractTemplateList\" width=\"100%\" height=\"260\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBContractTemplate/LBContractTemplateList.jsp?FlowUnid="+flowunid+"&TaskNo="+taskno+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&TempletNo=LBContractTemplateList"+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||
|
||
String sButtons[][] = null;
|
||
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||
dwTemp.ReadOnly = "-2";
|
||
sButtons=new String[][]{
|
||
{phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
|
||
};
|
||
}else{
|
||
sButtons=new String[][] {
|
||
{phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""}
|
||
};
|
||
}
|
||
dwTemp.replaceColumn("contracttemplate", "<div id=\"filetemplatemodel\" style=\"heigth:100%,width:100px\">请稍等。。。。。。</div>", CurPage.getObjectWindowOutput());
|
||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||
<script type="text/javascript">
|
||
var docno = "";
|
||
$(document).ready(function(){
|
||
var RightType="<%=RightType%>";
|
||
var phaseno="<%=phaseno%>";
|
||
var operationType = "<%=CurPage.getParameter("operationType")%>";
|
||
/* if(RightType=="ReadOnly"){
|
||
$('#A_Group_0010').css('display','none');
|
||
$('#A_Group_0020').css('display','none');
|
||
} */
|
||
if(phaseno=="0015"){
|
||
$('#ButtonTR').css('display','block');
|
||
$('#A_Group_0010').css('display','none');
|
||
$('#A_Group_0020').css('display','none');
|
||
}
|
||
var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"+",isNetCar="+"<%=CurPage.getParameter("isNetCar")%>"+",operationType="+operationType+",SubjectId=<%=SubjectId%>");
|
||
var jsonData=eval("("+sReturn+")");
|
||
initFileTemplate(eval("("+jsonData[0].fileTemplate+")"));
|
||
// initOneClass();
|
||
});
|
||
|
||
|
||
//加载一级分类选项
|
||
function initOneClass(status){
|
||
var oneClass=getItemValue(0,0,"ONECLASSIFY");
|
||
var sql="SELECT itemno,itemname FROM code_library WHERE codeno='DocList' AND itemno LIKE '005%' AND LENGTH(itemno)=6 ";
|
||
initSelectOption(sql,"itemname","itemno","ONECLASSIFY");
|
||
if(status=="edit"){
|
||
setItemValue(0,0,"ONECLASSIFY",oneClass);
|
||
}else{
|
||
setItemValue(0,0,"ONECLASSIFY","");
|
||
}
|
||
initTwoClass(status);
|
||
}
|
||
//加载二级分类选项
|
||
function initTwoClass(status){
|
||
var oneClass=getItemValue(0,0,"ONECLASSIFY");
|
||
if(oneClass==""){oneClass=" ";}
|
||
var twoClass=getItemValue(0,0,"TWOCLASSIFY");
|
||
var sql="SELECT itemno,itemname FROM code_library WHERE codeno='ProductContractTemplate' AND LENGTH(itemno)=3 and attribute1='"+oneClass+"'";
|
||
initSelectOption(sql,"itemname","itemno","TWOCLASSIFY");
|
||
if(status=="edit"){
|
||
setItemValue(0,0,"TWOCLASSIFY",twoClass);
|
||
}else{
|
||
setItemValue(0,0,"TWOCLASSIFY","");
|
||
}
|
||
initThreeClass(status);
|
||
}
|
||
//加载三级分类选项
|
||
function initThreeClass(status){
|
||
var twoClass=getItemValue(0,0,"TWOCLASSIFY");
|
||
if(twoClass==""){twoClass=" ";}
|
||
var threeClass=getItemValue(0,0,"THREECLASSIFY");
|
||
var sql="SELECT itemno,itemname FROM code_library WHERE codeno='ProductContractTemplate' AND itemno LIKE '"+twoClass+"%' AND LENGTH(itemno)=6";
|
||
initSelectOption(sql,"itemname","itemno","THREECLASSIFY");
|
||
if(status=="edit"){
|
||
setItemValue(0,0,"THREECLASSIFY",threeClass);
|
||
}else{
|
||
setItemValue(0,0,"THREECLASSIFY","");
|
||
}
|
||
initFourClass(status);
|
||
}
|
||
//加载四级分类选项
|
||
function initFourClass(status){
|
||
var threeClass=getItemValue(0,0,"THREECLASSIFY");
|
||
|
||
if(threeClass==""){threeClass=" ";}
|
||
var fourClass=getItemValue(0,0,"FOURCLASSIFY");
|
||
var sql="select itemno,itemname from code_library where codeno='ProductContractTemplate' and itemno like '"+threeClass+"%' AND LENGTH(itemno)=9";
|
||
initSelectOption(sql,"itemname","itemno","FOURCLASSIFY");
|
||
if(status=="edit"){
|
||
setItemValue(0,0,"FOURCLASSIFY",fourClass);
|
||
}else{
|
||
setItemValue(0,0,"FOURCLASSIFY","");
|
||
}
|
||
loadFileTemplateClasses(4);
|
||
}
|
||
|
||
function loadFileTemplateClasses(cindex){
|
||
cindex=4;
|
||
var templateType=['ONECLASSIFY','TWOCLASSIFY','THREECLASSIFY','FOURCLASSIFY'];
|
||
var searchCondtion=[];
|
||
searchCondtion.push("'DOCTYPE':'005'");
|
||
var tclass="";
|
||
for(var i=0;i<cindex;i++){
|
||
tclass=templateType[i];
|
||
var cvalue=jQuery("#"+tclass+" option:selected").val();
|
||
searchCondtion.push("'"+tclass.toLowerCase()+"':'"+cvalue+"'");
|
||
}
|
||
var param="{"+searchCondtion.join("@")+"}";
|
||
var sparam="templateCalss="+param;
|
||
var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getTemplateClass",sparam);
|
||
var jsonData=eval("("+sReturn+")");
|
||
initFileTemplate(eval("("+jsonData[0].fileTemplate+")"));
|
||
}
|
||
|
||
|
||
function initFileTemplate(fileTemplate){
|
||
var cnumber=4;
|
||
$("#filetemplatemodel").html("");
|
||
$("#filetemplatemodel").append("<table>");
|
||
for(var i=0;i<fileTemplate.length;i++){
|
||
if(i%cnumber==0)$("#filetemplatemodel").append("<tr>");
|
||
$("#filetemplatemodel").append("<td width='200px'><input type=\"checkbox\" name=\"fileTemplate\" value=\""+fileTemplate[i].value+"\">"+fileTemplate[i].text+"</input></td>");
|
||
if((i+1)%cnumber==0){$("#filetemplatemodel").append("</tr>");}
|
||
else{$("#filetemplatemodel").append("</tr>");}
|
||
}
|
||
$("#filetemplatemodel").append("</table>");
|
||
}
|
||
|
||
|
||
function popupShade() {
|
||
var d = top.dialog({
|
||
callbacks: {
|
||
cancel: function () {
|
||
return false
|
||
}
|
||
},
|
||
width: '200',
|
||
height: '40',
|
||
innerHTML: '<span id="dialogSpanId" style="font-size: 20px;color: #ccc">正在执行中......</span>'
|
||
});
|
||
d.showModal();
|
||
return d;
|
||
}
|
||
|
||
function createContractByTemplate() {
|
||
var d = popupShade();
|
||
setTimeout(function () {
|
||
var checkbox = $("#filetemplatemodel").html() || "";
|
||
if (checkbox == "") {
|
||
alert("请选择合同模板下面的分类,或分类下面没有模板");
|
||
return false;
|
||
}
|
||
var tempids = "";
|
||
$('input[name="fileTemplate"]:checked').each(function () {
|
||
if (tempids.length > 0) {
|
||
tempids += "&";
|
||
}
|
||
tempids += $(this).attr('value');
|
||
});
|
||
if (tempids.length <= 0) {
|
||
alert("请勾选合同模板!");
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
if ("BContractChangeApply" != "<%=CurPage.getParameter("ApplyType")%>") {
|
||
var contractNomessage = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil", "CheckContractNo", "contractId=" + "<%=sContractId%>" + ",contractNo=" + "<%=CurPage.getParameter("ContractNo")%>");
|
||
if ("error" == contractNomessage) {
|
||
alert("合同编号重复,请联系后台人员处理!");
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
}
|
||
var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil", "CheckCar", "contractId=" + "<%=sContractId%>" + ",templateIds=" + tempids + ",flowunid=" + "<%=flowunid%>" + ",operationType=" + "<%=CurPage.getParameter("operationType")%>");
|
||
if ("" != message) {
|
||
if ("01" == "<%=customertype%>") {
|
||
if (message.indexOf("请先删除后再生成") > 0) {
|
||
alert("合同已生成,无法再次生成!");
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
}
|
||
alert(message);
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
//检查扣款卡信息是否签约
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.check.ContractInfoCheck", "ProjectSignStatus", "projectid=<%=projectId%>");
|
||
if ("success" != sReturnInfo) {
|
||
alert(sReturnInfo);
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
var param = {};
|
||
var tempParam = {};
|
||
var sparam = "";
|
||
// param["templateNo"]="0010";
|
||
tempParam["CurUserId"] = "<%=CurUser.getUserID()%>";
|
||
tempParam["CurOrgId"] = "<%=CurUser.getOrgID()%>";
|
||
tempParam["OBJECTTYPE"] = "<%=CurPage.getParameter("FLOW_NO")%>";
|
||
tempParam["FLOW_UNID"] = "<%=flowunid%>";
|
||
tempParam["CONTRACT_ID"] = "<%=sContractId%>";
|
||
tempParam["PROJ_ID"] = "<%=sProjId%>";
|
||
tempParam["PROJECT_ID"] = "<%=projectId%>";
|
||
tempParam["contractNo"] = "<%=contractNo%>";
|
||
tempParam["certid"] = "<%=certid%>";
|
||
tempParam["mobile"] = "<%=mobile%>";
|
||
tempParam["address"] = "<%=address%>";
|
||
tempParam["NETMORTGAGOR"] = "<%=NetMortgagor%>";
|
||
tempParam["NETCERTID"] = "<%=NetCertid%>";
|
||
tempParam["NETMOBILE"] = "<%=NetMobile%>";
|
||
tempParam["NETADDRESS"] = "<%=Netaddress%>";
|
||
|
||
tempParam["fileSavePath"] = "<%=CurConfig.getConfigure("FileSavePath")%>";
|
||
|
||
//专用车产品、网约车、大通 使用手签的模板生成合同
|
||
var operationType2 = "<%=CurPage.getParameter("operationType")%>";
|
||
//alert(operationType2);
|
||
if ("ZYC" == operationType2 || "WYC" == operationType2 || "DT" == operationType2) {
|
||
param["templateIds"] = '5c494617683548a49cfc050f60067ea2';//选择的模板ID
|
||
} else {
|
||
param["templateIds"] = tempids;//选择的模板ID
|
||
}
|
||
|
||
//20210922 合同模板调整
|
||
|
||
// 客户手签(通用C端售后回租合同) 乘用车手签
|
||
// 乘用车售后回租电子签约 乘用车电子签约
|
||
// 专用车产品、商用车一车一挂 商用车手签
|
||
// 商用车一车一挂电子签约 商用车电子签约
|
||
|
||
if ("KHSQ" == operationType2) {
|
||
param["templateIds"] = 'f57aa80567853aa37fd6dd902021a';//选择的模板ID
|
||
tempids = 'f57aa80567853aa37fd6dd902021a';
|
||
} else if ("CYSHDZ" == operationType2) {
|
||
param["templateIds"] = 'f57aa80567853aa37fd6dd902021b';//选择的模板ID
|
||
tempids = 'f57aa80567853aa37fd6dd902021b';
|
||
} else if ("ZYC" == operationType2 || "SYCSHHZ" == operationType2) {
|
||
param["templateIds"] = 'f57aa80567853aa37fd6dd902021c';//选择的模板ID
|
||
tempids = 'f57aa80567853aa37fd6dd902021c';
|
||
} else if ("SYCSHHZDZQ" == operationType2) {
|
||
param["templateIds"] = 'f57aa80567853aa37fd6dd902021d';//选择的模板ID
|
||
tempids = 'f57aa80567853aa37fd6dd902021d';
|
||
}
|
||
|
||
param["templateParam"] = JSON.stringify(tempParam).replace(/,/g, "@");//生成模板的参数据
|
||
for (var key in param) {
|
||
if (sparam.length > 0) {
|
||
sparam += ",";
|
||
}
|
||
sparam += key + "=" + param[key];
|
||
}
|
||
|
||
var sReturn0 = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil", "createContractTemplate", sparam);
|
||
|
||
if (sReturn0.length > 2) {
|
||
alert(sReturn0);
|
||
d.close().remove();
|
||
} else {
|
||
var pdfPath = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "wordToPdf", "FlowUnid=<%=flowunid%>,flagType=word");
|
||
<%-- if("01"=="<%=customertype%>"||"1"=="<%=CurPage.getParameter("isNetCar")%>"||"BAIC_MOTOR"=="<%=CurPage.getParameter("operationType")%>"||"ZYC"=="<%=CurPage.getParameter("operationType")%>"||"KHSQ"=="<%=CurPage.getParameter("operationType")%>"||"KJZL"=="<%=CurPage.getParameter("operationType")%>"){ --%>
|
||
var operationType = "<%=CurPage.getParameter("operationType")%>";
|
||
|
||
if ("ZC" != operationType) {
|
||
var OwmMessage = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "SystemMakeOneDimensionalCode", "ProjectId=<%=projectId%>,contract_id=<%=sContractId%>,contractNo=<%=contractNo%>,leasform=<%=leasform%>");
|
||
if ("error" == OwmMessage) {
|
||
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "companyUpdateDocContractStatus", "FlowUnid=<%=flowunid%>" + ",ProjectId=<%=projectId%>");
|
||
alert("生成失败1!!!");
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
} else {
|
||
//中车pdf添加水印
|
||
var OwmMessage = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "SystemMakeOneDimensionalCode", "ProjectId=<%=projectId%>,contract_id=<%=sContractId%>,contractNo=<%=contractNo%>,leasform=<%=leasform%>");
|
||
}
|
||
|
||
if (("01" == "<%=customertype%>" && "Auto" == "<%=sealType%>") || ("Auto" == "<%=sealType%>" && "Hand" == "<%=signType%>")) {
|
||
var falg = "";
|
||
|
||
if ("LHZL" == operationType || "SQSYC" == operationType) {
|
||
falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignActionTwo", "compnySignIng", "FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>,operationType=" + operationType);
|
||
//商用车一车一挂、专用车产品、网约车、大通、C端直租、客户手签、商用车手签、乘用车手签
|
||
} else if ("SYCSHHZ" == operationType || "ZYC" == operationType || "WYC" == operationType || "DT" == operationType || "CDZZ" == operationType
|
||
|| "CYCSQ" == operationType || "KHSQ" == operationType || "SYCSQ" == operationType || "5c494617683548a49cfc050f60067ea2" == tempids) {
|
||
falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignActionTwoOwn", "compnySignIng", "FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>,tempid=" + tempids);
|
||
} else if ("ZC" == operationType) {
|
||
falg = "success";
|
||
} else if ("KJLHZL" == operationType || "KJLHZLCYC" == operationType || "KJLHZLSYC" == operationType || "KJCYYQR" == operationType
|
||
|| "KJSYYQR" == operationType || "CYCDZQ" == operationType || "SYCDZQ" == operationType) {//凯捷联合租赁商用车手签、乘用车手签
|
||
// alert("凯捷联合租赁,合同模板id=" + tempids);
|
||
falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignActionNewUtils", "compnySignIng", "FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>,operationType=" + operationType);
|
||
} else {
|
||
falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "compnySignIng", "FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>,SubjectId=<%=SubjectId%>");
|
||
}
|
||
if ("success" != falg) {
|
||
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction", "companyUpdateDocContractStatus", "FlowUnid=<%=flowunid%>" + ",ProjectId=<%=projectId%>");
|
||
alert("生成失败!!!");
|
||
d.close().remove();
|
||
return;
|
||
}
|
||
}
|
||
alert("生成成功");
|
||
d.close().remove();
|
||
}
|
||
reloadSelf();
|
||
}, '200');
|
||
}
|
||
function downloadFile(id){
|
||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||
}
|
||
|
||
Array.prototype.contains = function ( needle ) {
|
||
for (i in this) {
|
||
if (this[i] == needle) return true;
|
||
}
|
||
return false;
|
||
}
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|