合同电子签约和盖章产品中读取
This commit is contained in:
parent
8f00a1ff77
commit
4dd98f714a
@ -1,353 +1,353 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2017-09-28
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String custtype = CurPage.getParameter("CustomerType");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String projectId = CurPage.getParameter("ProjectId");
|
||||
// String signStatus = CurPage.getParameter("SignStatus");
|
||||
String contractNumber = CurPage.getParameter("ContractNumber");
|
||||
String productId = CurPage.getParameter("ProductId");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String action = CurPage.getParameter("action");
|
||||
ASObjectModel doTemp = new ASObjectModel("LBContractPrintList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(20);
|
||||
String id=projectId;
|
||||
dwTemp.genHTMLObjectWindow(id+","+flowunid);
|
||||
String btnflag = "true";
|
||||
String btnflagcom = "false";
|
||||
String signs = "false";
|
||||
if("01".equals(custtype)){
|
||||
btnflagcom = "true";
|
||||
}
|
||||
if("queryContract".equals(action)){
|
||||
btnflag = "false";
|
||||
btnflagcom = "false";
|
||||
}
|
||||
//判断是不是流程的第二步
|
||||
if("0020".equals(PhaseNo)){
|
||||
btnflag = "false";
|
||||
signs = "true";
|
||||
}
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{btnflag,"","Button","发起电子签约","电子签章合同","signOnLine()","","","","btn_icon_sign",""},
|
||||
{btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""},
|
||||
{btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""},
|
||||
{signs,"","Button","公司盖章","公司盖章","sign()","","","","btn_icon_refresh",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<style>
|
||||
.test>td{
|
||||
color:red;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//测试电子签约
|
||||
function sign(){
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sign","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
if("success"==sReturn){
|
||||
var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
if("success"==sReturns){
|
||||
alert("盖章成功!!!");
|
||||
}else{
|
||||
alert("盖章失败!!!");
|
||||
}
|
||||
}else{
|
||||
alert("盖章失败!!!");
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#myiframe0_float_div table").css("width","100%");
|
||||
$("#myiframe0_cells table").css("width","100%");
|
||||
})
|
||||
//完成电子签约
|
||||
function signOnLine(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>,FlowUnid=<%=flowunid%>");
|
||||
var result = results.split("@");
|
||||
if("true"==result[3]){
|
||||
AsDebug.showMessage("提示","请先生成pdf版的合同!!!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0]) > 4 && eval(result[0]) < 7){
|
||||
AsDebug.showMessage("提示","合同状态为:"+result[1]+"不可以电子签章","","",true,'','','',function(){
|
||||
reloadSelf();
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(eval(result[0])==4){
|
||||
AsDebug.showMessage("提示","电子签约已完成,无需重复发起!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])==8){
|
||||
AsDebug.showMessage("提示","电子签约已发起,请签署电子合同!","","",true);
|
||||
return;
|
||||
};
|
||||
//查看合同word转换pdf进度
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if(eval(result)==1){
|
||||
wordToPdfFalse();
|
||||
alert("word转换PDF格式部分失败,");
|
||||
return;
|
||||
}else if(eval(result)==2){
|
||||
wordToPdfFalse();
|
||||
alert("word转换PDF格式失败");
|
||||
return;
|
||||
|
||||
}else if(eval(result)==3){
|
||||
alert("word转换PDF格式部分失败");
|
||||
wordToPdfFalse();
|
||||
return;
|
||||
|
||||
}else if(eval(result)==4){
|
||||
alert("word文件正在转换PDF文件格式");
|
||||
|
||||
}else if(eval(result)==5){
|
||||
wordToPdf();
|
||||
alert("word文件没有转换PDF文件格式");
|
||||
return;
|
||||
}
|
||||
|
||||
//自然人电子签约
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>");
|
||||
var sReturns = sReturn.split("@");
|
||||
if("success"==sReturns[0]){
|
||||
AsDebug.showMessage("提示","电子签约发起成功!","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else if(sReturns[1].indexOf("用户认证信息与合同签署方信息不匹配")!=-1){
|
||||
var message="";
|
||||
if("true"==sReturns[0]){
|
||||
message = "部分合同发送成功;注意发送失败合同:";
|
||||
}
|
||||
AsDebug.showMessage("提示",message+sReturns[1],"","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else{
|
||||
var message="";
|
||||
if("true"==sReturns[0]){
|
||||
message = "部分合同发送成功;注意发送失败合同";
|
||||
}else{
|
||||
message = "电子签约发送失败";
|
||||
}
|
||||
AsDebug.showMessage("提示",message,"","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//查询电子签约状态
|
||||
function getStatus(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
|
||||
var result=results.split("@");
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
|
||||
return;
|
||||
};
|
||||
<%-- if(eval(result[0])==4){
|
||||
var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
AsDebug.showMessage("提示","电子签约已完成!","","",true);
|
||||
return;
|
||||
} --%>
|
||||
if(eval(result[0])!=8 && result[2]=="false"){
|
||||
AsDebug.showMessage("提示","没有发起电子签约,无法获取签约状态!","","",true);
|
||||
return;
|
||||
}
|
||||
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
var sReturn=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams);
|
||||
AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){
|
||||
<%-- var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>"); --%>
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(function (){
|
||||
var html="";
|
||||
if("<%=custtype%>"=="03"){
|
||||
//(无法完成电子签约,请采用下载纸质合同)
|
||||
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.制作合同<br/>2.发起电子签约<br/>3.完成电子签约</td></tr>';
|
||||
}else{
|
||||
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.发起电子签约<br/>2.查询签约结果</td></tr>';
|
||||
}
|
||||
$("#ListTable").prepend(html);
|
||||
$("#myiframe0_static").height($("#myiframe0_static").height()-78);
|
||||
$("#myiframe0_cells").height($("#myiframe0_cells").height()-78);
|
||||
// setTimes1();
|
||||
})
|
||||
|
||||
//定时器
|
||||
function setTimes(){
|
||||
var a=setInterval(function(){
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if("success"==result){
|
||||
clearInterval(a);
|
||||
AsDebug.showMessage("提示","生成的合同文件转换PDF格式已完成","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else{
|
||||
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
// wordToPdf();
|
||||
}
|
||||
},5000);
|
||||
}
|
||||
//定时器
|
||||
function setTimes1(){
|
||||
var a=setInterval(function(){
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if("success"==result){
|
||||
clearInterval(a);
|
||||
}else{
|
||||
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
// wordToPdf();
|
||||
}
|
||||
},3000);
|
||||
}
|
||||
|
||||
//在加载完表格后调用
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
var fileinfo=getObj(0,i,"fileinfo").innerHTML;
|
||||
var obj=eval('('+fileinfo+')');
|
||||
var html="";
|
||||
for(var file in obj){
|
||||
if(obj[file]['pdf']=="true"){
|
||||
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||||
}
|
||||
html+='<a onclick="downloadFile(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> ';
|
||||
html+='<font color="blue">'+obj[file]['filename']+'</font></a>';
|
||||
html+='【操作时间:'+obj[file]['inputtime']+'】';
|
||||
html+='【操作人:'+obj[file]['inputuser']+'】';
|
||||
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】';
|
||||
html+='</br>';
|
||||
}
|
||||
getObj(0,i,"fileinfo").innerHTML=html;
|
||||
getObj(0,i,"fileinfo").style["white-space"]="pre-wrap";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
function downFile(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
|
||||
var result = results.split("@");
|
||||
if("<%=custtype%>"=="01"){
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在下载纸质合同","","",true);
|
||||
return;
|
||||
};
|
||||
//查看合同word转换pdf进度
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if(result=="error"){
|
||||
AsDebug.showMessage("提示","合同文件正在转换pdf......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
return;
|
||||
}else{
|
||||
downloadZipFile();
|
||||
}
|
||||
}else{
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,自然人没有权限下载纸质合同!","","",true);
|
||||
return;
|
||||
};
|
||||
AsDebug.showMessage("提示","自然人没有权限下载纸质合同,请电子签约!","","",true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function downloadZipFile(){
|
||||
var id="<%=projectId%>";
|
||||
//打包文件名
|
||||
var fileName="ContractSign<%=contractNumber%>";
|
||||
//打包类型为合同签约模块
|
||||
var packageType="contractSign";
|
||||
var filePath = "<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/ContractSigndocDownloadServlet?CompClientID=<%=sCompClientID%>&id="+id+"&filePath="+filePath+"&fileName="+fileName+"&packageType="+packageType, "downloadTemplate");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showPDF(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
|
||||
var param="attrid="+id;
|
||||
AsControl.OpenPage(sUrl,param,"","");
|
||||
}
|
||||
|
||||
|
||||
//重新发送短信
|
||||
function sendMessageAgain(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
|
||||
var result=results.split("@");
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请先制作合同!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])==4){
|
||||
AsDebug.showMessage("提示","电子签约已完成,无法发送短信!","","",true);
|
||||
return;
|
||||
}
|
||||
if(eval(result[0])!=8 && result[2]=="false"){
|
||||
AsDebug.showMessage("提示","没有发起电子签约,无法发送短信!","","",true);
|
||||
return;
|
||||
}
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>");
|
||||
if("success"==sReturn){
|
||||
AsDebug.showMessage("提示","短信发送成功!","","",true);
|
||||
}else{
|
||||
AsDebug.showMessage("提示","短信发送失败!["+sReturn+"]","","",true);
|
||||
}
|
||||
}
|
||||
|
||||
//当前日期
|
||||
function getNowFormatDate() {
|
||||
var date = new Date();
|
||||
var seperator1 = "-";
|
||||
var seperator2 = ":";
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
var strMinutes = date.getMinutes()
|
||||
var strSeconds = date.getSeconds();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
|
||||
if (strMinutes >= 0 && strMinutes <= 9) {
|
||||
strMinutes = "0" + strMinutes;
|
||||
}
|
||||
if (strSeconds >= 0 && strSeconds <= 9) {
|
||||
strSeconds = "0" + strSeconds;
|
||||
}
|
||||
|
||||
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||||
+ " " + date.getHours() + seperator2 + strMinutes
|
||||
+ seperator2 + strSeconds;
|
||||
return currentdate;
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2017-09-28
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String custtype = CurPage.getParameter("CustomerType");
|
||||
String PhaseNo = CurPage.getParameter("PhaseNo");
|
||||
String projectId = CurPage.getParameter("ProjectId");
|
||||
// String signStatus = CurPage.getParameter("SignStatus");
|
||||
String contractNumber = CurPage.getParameter("ContractNumber");
|
||||
String productId = CurPage.getParameter("ProductId");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String action = CurPage.getParameter("action");
|
||||
ASObjectModel doTemp = new ASObjectModel("LBContractPrintList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(20);
|
||||
String id=projectId;
|
||||
dwTemp.genHTMLObjectWindow(id+","+flowunid);
|
||||
String btnflag = "true";
|
||||
String btnflagcom = "false";
|
||||
String signs = "false";
|
||||
if("01".equals(custtype)){
|
||||
btnflagcom = "true";
|
||||
}
|
||||
if("queryContract".equals(action)){
|
||||
btnflag = "false";
|
||||
btnflagcom = "false";
|
||||
}
|
||||
//判断是不是流程的第二步
|
||||
if("0020".equals(PhaseNo)){
|
||||
btnflag = "false";
|
||||
signs = "true";
|
||||
}
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{btnflag,"","Button","发起电子签约","电子签章合同","signOnLine()","","","","btn_icon_sign",""},
|
||||
{btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""},
|
||||
{btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""},
|
||||
{signs,"","Button","公司盖章","公司盖章","sign()","","","","btn_icon_refresh",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<style>
|
||||
.test>td{
|
||||
color:red;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//测试电子签约
|
||||
function sign(){
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sign","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
if("success"==sReturn){
|
||||
var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
if("success"==sReturns){
|
||||
alert("盖章成功!!!");
|
||||
}else{
|
||||
alert("盖章失败!!!");
|
||||
}
|
||||
}else{
|
||||
alert("盖章失败!!!");
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#myiframe0_float_div table").css("width","100%");
|
||||
$("#myiframe0_cells table").css("width","100%");
|
||||
})
|
||||
//完成电子签约
|
||||
function signOnLine(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>,FlowUnid=<%=flowunid%>");
|
||||
var result = results.split("@");
|
||||
if("true"==result[3]){
|
||||
AsDebug.showMessage("提示","请先生成pdf版的合同!!!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0]) > 4 && eval(result[0]) < 7){
|
||||
AsDebug.showMessage("提示","合同状态为:"+result[1]+"不可以电子签章","","",true,'','','',function(){
|
||||
reloadSelf();
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(eval(result[0])==4){
|
||||
AsDebug.showMessage("提示","电子签约已完成,无需重复发起!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])==8){
|
||||
AsDebug.showMessage("提示","电子签约已发起,请签署电子合同!","","",true);
|
||||
return;
|
||||
};
|
||||
//查看合同word转换pdf进度
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if(eval(result)==1){
|
||||
wordToPdfFalse();
|
||||
alert("word转换PDF格式部分失败,");
|
||||
return;
|
||||
}else if(eval(result)==2){
|
||||
wordToPdfFalse();
|
||||
alert("word转换PDF格式失败");
|
||||
return;
|
||||
|
||||
}else if(eval(result)==3){
|
||||
alert("word转换PDF格式部分失败");
|
||||
wordToPdfFalse();
|
||||
return;
|
||||
|
||||
}else if(eval(result)==4){
|
||||
alert("word文件正在转换PDF文件格式");
|
||||
|
||||
}else if(eval(result)==5){
|
||||
wordToPdf();
|
||||
alert("word文件没有转换PDF文件格式");
|
||||
return;
|
||||
}
|
||||
|
||||
//自然人电子签约
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>,FlowUnid=<%=flowunid%>");
|
||||
var sReturns = sReturn.split("@");
|
||||
if("success"==sReturns[0]){
|
||||
AsDebug.showMessage("提示","电子签约发起成功!","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else if(sReturns[1].indexOf("用户认证信息与合同签署方信息不匹配")!=-1){
|
||||
var message="";
|
||||
if("true"==sReturns[0]){
|
||||
message = "部分合同发送成功;注意发送失败合同:";
|
||||
}
|
||||
AsDebug.showMessage("提示",message+sReturns[1],"","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else{
|
||||
var message="";
|
||||
if("true"==sReturns[0]){
|
||||
message = "部分合同发送成功;注意发送失败合同";
|
||||
}else{
|
||||
message = "电子签约发送失败";
|
||||
}
|
||||
AsDebug.showMessage("提示",message,"","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//查询电子签约状态
|
||||
function getStatus(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>,FlowUnid=<%=flowunid%>");
|
||||
var result=results.split("@");
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
|
||||
return;
|
||||
};
|
||||
<%-- if(eval(result[0])==4){
|
||||
var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
AsDebug.showMessage("提示","电子签约已完成!","","",true);
|
||||
return;
|
||||
} --%>
|
||||
if(eval(result[0])!=8 && result[2]=="false"){
|
||||
AsDebug.showMessage("提示","没有发起电子签约,无法获取签约状态!","","",true);
|
||||
return;
|
||||
}
|
||||
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
var sReturn=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams);
|
||||
AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){
|
||||
<%-- var sReturns = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","downloadDoc","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>"); --%>
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(function (){
|
||||
var html="";
|
||||
if("<%=custtype%>"=="03"){
|
||||
//(无法完成电子签约,请采用下载纸质合同)
|
||||
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.制作合同<br/>2.发起电子签约<br/>3.完成电子签约</td></tr>';
|
||||
}else{
|
||||
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.发起电子签约<br/>2.查询签约结果</td></tr>';
|
||||
}
|
||||
$("#ListTable").prepend(html);
|
||||
$("#myiframe0_static").height($("#myiframe0_static").height()-78);
|
||||
$("#myiframe0_cells").height($("#myiframe0_cells").height()-78);
|
||||
// setTimes1();
|
||||
})
|
||||
|
||||
//定时器
|
||||
function setTimes(){
|
||||
var a=setInterval(function(){
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if("success"==result){
|
||||
clearInterval(a);
|
||||
AsDebug.showMessage("提示","生成的合同文件转换PDF格式已完成","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}else{
|
||||
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
// wordToPdf();
|
||||
}
|
||||
},5000);
|
||||
}
|
||||
//定时器
|
||||
function setTimes1(){
|
||||
var a=setInterval(function(){
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if("success"==result){
|
||||
clearInterval(a);
|
||||
}else{
|
||||
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
// wordToPdf();
|
||||
}
|
||||
},3000);
|
||||
}
|
||||
|
||||
//在加载完表格后调用
|
||||
function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
var fileinfo=getObj(0,i,"fileinfo").innerHTML;
|
||||
var obj=eval('('+fileinfo+')');
|
||||
var html="";
|
||||
for(var file in obj){
|
||||
if(obj[file]['pdf']=="true"){
|
||||
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> </a>';
|
||||
}
|
||||
html+='<a onclick="downloadFile(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');"> ';
|
||||
html+='<font color="blue">'+obj[file]['filename']+'</font></a>';
|
||||
html+='【操作时间:'+obj[file]['inputtime']+'】';
|
||||
html+='【操作人:'+obj[file]['inputuser']+'】';
|
||||
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】';
|
||||
html+='</br>';
|
||||
}
|
||||
getObj(0,i,"fileinfo").innerHTML=html;
|
||||
getObj(0,i,"fileinfo").style["white-space"]="pre-wrap";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
function downFile(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
|
||||
var result = results.split("@");
|
||||
if("<%=custtype%>"=="01"){
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,在下载纸质合同","","",true);
|
||||
return;
|
||||
};
|
||||
//查看合同word转换pdf进度
|
||||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
|
||||
if(result=="error"){
|
||||
AsDebug.showMessage("提示","合同文件正在转换pdf......","","",true,"","","",function(){
|
||||
window.location.reload();
|
||||
});
|
||||
return;
|
||||
}else{
|
||||
downloadZipFile();
|
||||
}
|
||||
}else{
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请生成合同,自然人没有权限下载纸质合同!","","",true);
|
||||
return;
|
||||
};
|
||||
AsDebug.showMessage("提示","自然人没有权限下载纸质合同,请电子签约!","","",true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function downloadZipFile(){
|
||||
var id="<%=projectId%>";
|
||||
//打包文件名
|
||||
var fileName="ContractSign<%=contractNumber%>";
|
||||
//打包类型为合同签约模块
|
||||
var packageType="contractSign";
|
||||
var filePath = "<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/ContractSigndocDownloadServlet?CompClientID=<%=sCompClientID%>&id="+id+"&filePath="+filePath+"&fileName="+fileName+"&packageType="+packageType, "downloadTemplate");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showPDF(id,name){
|
||||
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
|
||||
var param="attrid="+id;
|
||||
AsControl.OpenPage(sUrl,param,"","");
|
||||
}
|
||||
|
||||
|
||||
//重新发送短信
|
||||
function sendMessageAgain(){
|
||||
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
|
||||
var result=results.split("@");
|
||||
if(eval(result[0])<3){
|
||||
AsDebug.showMessage("提示","请先制作合同!","","",true);
|
||||
return;
|
||||
};
|
||||
if(eval(result[0])==4){
|
||||
AsDebug.showMessage("提示","电子签约已完成,无法发送短信!","","",true);
|
||||
return;
|
||||
}
|
||||
if(eval(result[0])!=8 && result[2]=="false"){
|
||||
AsDebug.showMessage("提示","没有发起电子签约,无法发送短信!","","",true);
|
||||
return;
|
||||
}
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>");
|
||||
if("success"==sReturn){
|
||||
AsDebug.showMessage("提示","短信发送成功!","","",true);
|
||||
}else{
|
||||
AsDebug.showMessage("提示","短信发送失败!["+sReturn+"]","","",true);
|
||||
}
|
||||
}
|
||||
|
||||
//当前日期
|
||||
function getNowFormatDate() {
|
||||
var date = new Date();
|
||||
var seperator1 = "-";
|
||||
var seperator2 = ":";
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
var strMinutes = date.getMinutes()
|
||||
var strSeconds = date.getSeconds();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
|
||||
if (strMinutes >= 0 && strMinutes <= 9) {
|
||||
strMinutes = "0" + strMinutes;
|
||||
}
|
||||
if (strSeconds >= 0 && strSeconds <= 9) {
|
||||
strSeconds = "0" + strSeconds;
|
||||
}
|
||||
|
||||
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||||
+ " " + date.getHours() + seperator2 + strMinutes
|
||||
+ seperator2 + strSeconds;
|
||||
return currentdate;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -13,6 +13,9 @@
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String customertype = CurPage.getParameter("customertype");//获取客户类型,用于判断生成合同的方法
|
||||
String sealType = CurPage.getParameter("sealType");//»ñÈ¡¸ÇÕÂģʽ
|
||||
String signType = CurPage.getParameter("signType");//»ñȡǩԼģʽ
|
||||
|
||||
String flowunid=CurPage.getParameter("FlowUnid");
|
||||
String ishistory=CurPage.getParameter("IsHistory");
|
||||
String proj_id=CurPage.getParameter("proj_id");
|
||||
@ -334,7 +337,8 @@
|
||||
alert(sReturn0);
|
||||
}else{
|
||||
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")%>"){
|
||||
<%-- if("01"=="<%=customertype%>"||"1"=="<%=CurPage.getParameter("isNetCar")%>"||"BAIC_MOTOR"=="<%=CurPage.getParameter("operationType")%>"||"ZYC"=="<%=CurPage.getParameter("operationType")%>"||"KHSQ"=="<%=CurPage.getParameter("operationType")%>"||"KJZL"=="<%=CurPage.getParameter("operationType")%>"){ --%>
|
||||
if("01"=="<%=customertype%>"||("Auto" == "<%=sealType%>" && "Hand" == "<%=signType%>" )){
|
||||
var falg = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","compnySignIng","FlowUnid=<%=flowunid%>,flagType=word,ProjectId=<%=projectId%>");
|
||||
if("success"!= falg ){
|
||||
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","companyUpdateDocContractStatus","FlowUnid=<%=flowunid%>"+",ProjectId=<%=projectId%>");
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
function newApply()
|
||||
{
|
||||
|
||||
var userid="<%=CurUser.getUserID()%>";
|
||||
var flowno="<%=CurPage.getParameter("ApplyType")%>";
|
||||
var selname="";
|
||||
@ -58,9 +59,22 @@
|
||||
var leasform = sReturn[5];
|
||||
var carAttributes = sReturn[6];
|
||||
var isNetCar = sReturn[7];
|
||||
var signType = sReturn[9];
|
||||
var sealType = sReturn[10];
|
||||
if("03" == customertype){
|
||||
if(""== signType||null == signType||"undefined" == signType){
|
||||
alert("请在产品中配置签约方式!!!");
|
||||
return ;
|
||||
|
||||
}else if (""== sealType||null == sealType||"undefined" == sealType){
|
||||
alert("请在产品中配置盖章模式!!!");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
|
||||
sParams =sParams+",isNetCar="+isNetCar+",carAttributes="+carAttributes+",leasform="+leasform+",ProductId="+product_id+",ProjectId="+id+",ProjectNo="+project_id+",customertype="+customertype+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
|
||||
sParams =sParams+",signType="+signType+",sealType="+sealType+",isNetCar="+isNetCar+",carAttributes="+carAttributes+",leasform="+leasform+",ProductId="+product_id+",ProjectId="+id+",ProjectNo="+project_id+",customertype="+customertype+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>";
|
||||
|
||||
if(flowno=="BContractApproveApply"){
|
||||
sParams =sParams+",operationType="+sReturn[8];
|
||||
|
||||
@ -383,7 +383,7 @@ public class ContractSignAction{
|
||||
//BizObject pbo = pbm.createQuery("id=:id").setParameter("id", ProjectId).getSingleResult(true);
|
||||
BizObject pbo = pbm.createQuery("FLOWUNID=:flowunid").setParameter("flowunid", FlowUnid).getSingleResult(true);
|
||||
// ²éѯlb_doc_contract_list±í
|
||||
bo = contBom.createQuery("project_id=:projectId and file_flag='yes' and (sendprocess='0' or sendprocess='2' ) ").setParameter("projectId", ProjectId).getResultList(true);
|
||||
bo = contBom.createQuery("project_id=:projectId and flow_unid=:flowunid and file_flag='yes' and (sendprocess='0' or sendprocess='2' ) ").setParameter("projectId", ProjectId).setParameter("flowunid", FlowUnid).getResultList(true);
|
||||
for (BizObject keys : bo) {
|
||||
String info = keys.getAttribute("id").toString();
|
||||
con = new ContractSignInfo();
|
||||
|
||||
@ -96,8 +96,6 @@ public class vehicleAssessmentController {
|
||||
String itemno = zoneResult == null ? "" : zoneResult.getAttribute("itemno").toString();
|
||||
if(null == itemno || "".equals(itemno) || itemno.length() == 0 ){
|
||||
return "没有查询到对应的上牌地区信息!!!";
|
||||
} else if("00".equals(itemno.subSequence(4, 6))){
|
||||
return "没有查询到对应的上牌地区信息!!!";
|
||||
}else{
|
||||
BizObject usedCarCode = codeSNT.createQuery("select itemname,itemno FROM O WHERE codeno='UsedCarCode' AND itemno=:AREA")
|
||||
.setParameter("AREA",itemno).getSingleResult(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user