修改文件
parent
e3a1a7060e
commit
3ed657ebec
|
@ -9,7 +9,7 @@ bin-release/
|
|||
|
||||
|
||||
# Executables
|
||||
#.gitignore
|
||||
#.gitigno re
|
||||
log
|
||||
*.swf
|
||||
*.air
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.api.nonstandardext.zenner.utils;
|
||||
|
||||
import com.api.nonstandardext.allist.utils.DefaultTmForAllist;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
|
@ -178,48 +177,48 @@ public class ZennerUtil {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static String httpsGet(String baseUrl,String encoderNum) {
|
||||
BufferedReader in = null;
|
||||
BaseBean baseBean = new BaseBean();
|
||||
try {
|
||||
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
|
||||
javax.net.ssl.TrustManager[] truset = new javax.net.ssl.TrustManager[1];
|
||||
javax.net.ssl.TrustManager tm = new DefaultTmForAllist();
|
||||
truset[0] = tm;
|
||||
sslContext.init(null, truset, null);
|
||||
SSLSocketFactory factory = sslContext.getSocketFactory();
|
||||
URL u = new URL(baseUrl);
|
||||
HttpsURLConnection huconn = (HttpsURLConnection) u.openConnection();
|
||||
huconn.setSSLSocketFactory(factory);
|
||||
huconn.setRequestProperty("Authorization","Basic " + encoderNum);
|
||||
StringBuilder result = new StringBuilder();
|
||||
huconn.connect();
|
||||
// baseBean.writeLog("httpsGet execute baseUrl..1." + baseUrl);
|
||||
in = new BufferedReader(new InputStreamReader(huconn.getInputStream(), "UTF-8"));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result.append(line);
|
||||
}
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
// baseBean.writeLog("httpsGet execute result..1." + result.toString());
|
||||
// 打印返回结果
|
||||
return result.toString();
|
||||
} catch (Exception e) {
|
||||
baseBean.writeLog("httpsGet execute exception...message:" + e.getMessage());
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ioException) {
|
||||
ioException.printStackTrace();
|
||||
baseBean.writeLog("关闭报错");
|
||||
baseBean.writeLog(ioException.getMessage());
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
// public static String httpsGet(String baseUrl,String encoderNum) {
|
||||
// BufferedReader in = null;
|
||||
// BaseBean baseBean = new BaseBean();
|
||||
// try {
|
||||
// SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
|
||||
// javax.net.ssl.TrustManager[] truset = new javax.net.ssl.TrustManager[1];
|
||||
// javax.net.ssl.TrustManager tm = new DefaultTmForAllist();
|
||||
// truset[0] = tm;
|
||||
// sslContext.init(null, truset, null);
|
||||
// SSLSocketFactory factory = sslContext.getSocketFactory();
|
||||
// URL u = new URL(baseUrl);
|
||||
// HttpsURLConnection huconn = (HttpsURLConnection) u.openConnection();
|
||||
// huconn.setSSLSocketFactory(factory);
|
||||
// huconn.setRequestProperty("Authorization","Basic " + encoderNum);
|
||||
// StringBuilder result = new StringBuilder();
|
||||
// huconn.connect();
|
||||
//// baseBean.writeLog("httpsGet execute baseUrl..1." + baseUrl);
|
||||
// in = new BufferedReader(new InputStreamReader(huconn.getInputStream(), "UTF-8"));
|
||||
// String line;
|
||||
// while ((line = in.readLine()) != null) {
|
||||
// result.append(line);
|
||||
// }
|
||||
// if (in != null) {
|
||||
// in.close();
|
||||
// }
|
||||
//// baseBean.writeLog("httpsGet execute result..1." + result.toString());
|
||||
// // 打印返回结果
|
||||
// return result.toString();
|
||||
// } catch (Exception e) {
|
||||
// baseBean.writeLog("httpsGet execute exception...message:" + e.getMessage());
|
||||
// if (in != null) {
|
||||
// try {
|
||||
// in.close();
|
||||
// } catch (IOException ioException) {
|
||||
// ioException.printStackTrace();
|
||||
// baseBean.writeLog("关闭报错");
|
||||
// baseBean.writeLog(ioException.getMessage());
|
||||
// }
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
public static String httpGet(String baseUrl){
|
||||
|
@ -244,38 +243,38 @@ public class ZennerUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static String httpsPost(String httpUrl, String content) throws Exception {
|
||||
BufferedReader in = null;
|
||||
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
|
||||
javax.net.ssl.TrustManager [] truset = new javax.net.ssl.TrustManager[1];
|
||||
javax.net.ssl.TrustManager tm = new DefaultTmForAllist();
|
||||
truset[0] = tm;
|
||||
sslContext.init(null,truset,null);
|
||||
SSLSocketFactory factory = sslContext.getSocketFactory();
|
||||
//https://blog.csdn.net/pk5454754/article/details/80092974?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase
|
||||
URL u = new URL(httpUrl);
|
||||
HttpsURLConnection conn = (HttpsURLConnection) u.openConnection();
|
||||
conn.setDoOutput(true);
|
||||
conn.addRequestProperty("connection", "Keep-Alive");
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setSSLSocketFactory(factory);
|
||||
StringBuilder result = new StringBuilder();
|
||||
conn.connect();
|
||||
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
|
||||
out.write(content.getBytes("utf-8"));
|
||||
// 刷新、关闭
|
||||
out.flush();
|
||||
out.close();
|
||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result.append(line);
|
||||
}
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
// public static String httpsPost(String httpUrl, String content) throws Exception {
|
||||
// BufferedReader in = null;
|
||||
// SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
|
||||
// javax.net.ssl.TrustManager [] truset = new javax.net.ssl.TrustManager[1];
|
||||
// javax.net.ssl.TrustManager tm = new DefaultTmForAllist();
|
||||
// truset[0] = tm;
|
||||
// sslContext.init(null,truset,null);
|
||||
// SSLSocketFactory factory = sslContext.getSocketFactory();
|
||||
////https://blog.csdn.net/pk5454754/article/details/80092974?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase
|
||||
// URL u = new URL(httpUrl);
|
||||
// HttpsURLConnection conn = (HttpsURLConnection) u.openConnection();
|
||||
// conn.setDoOutput(true);
|
||||
// conn.addRequestProperty("connection", "Keep-Alive");
|
||||
// conn.setRequestMethod("POST");
|
||||
// conn.setSSLSocketFactory(factory);
|
||||
// StringBuilder result = new StringBuilder();
|
||||
// conn.connect();
|
||||
// DataOutputStream out = new DataOutputStream(conn.getOutputStream());
|
||||
// out.write(content.getBytes("utf-8"));
|
||||
// // 刷新、关闭
|
||||
// out.flush();
|
||||
// out.close();
|
||||
// in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
// String line;
|
||||
// while ((line = in.readLine()) != null) {
|
||||
// result.append(line);
|
||||
// }
|
||||
// if (in != null) {
|
||||
// in.close();
|
||||
// }
|
||||
// return result.toString();
|
||||
// }
|
||||
|
||||
public static String httpPostForXwwwForm(String httpUrl, Map<String, String> headParams, Map<String, String> paramsMap){
|
||||
String result = "";
|
||||
|
|
|
@ -1,499 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||
<%@ include file="/systeminfo/init_wev8.jsp"%>
|
||||
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
|
||||
<%@ taglib uri="/WEB-INF/tld/browser.tld" prefix="brow"%>
|
||||
|
||||
<%@ page import="weaver.file.Prop" %>
|
||||
<%@ page import="weaver.hrm.HrmUserVarify" %>
|
||||
<%@ page import="weaver.systeminfo.SystemEnv" %>
|
||||
|
||||
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
|
||||
<jsp:useBean id="RecordSet_count" class="weaver.conn.RecordSet" scope="page" />
|
||||
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
|
||||
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
|
||||
<jsp:useBean id="CrmSupplierComInfo" class="weaver.crm.supplierinfo.CrmSupplierComInfo" scope="page" />
|
||||
<jsp:useBean id="RecordSet_Dep" class="weaver.conn.RecordSet" scope="page" />
|
||||
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" /><!--zl-->
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
|
||||
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
|
||||
<style>
|
||||
|
||||
td * {font-size:9px !important;}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<%
|
||||
|
||||
String sqlwhere = " where 1=1 ";
|
||||
|
||||
String subcompanyid1 = ResourceComInfo.getSubCompanyID(String.valueOf(user.getUID()));
|
||||
|
||||
//是否采购部
|
||||
boolean isDep = false;
|
||||
//是否是流程接收人
|
||||
boolean isShow = false;
|
||||
//采购部的同事可以选择所有合同卡片;而本部门的人员(非采购部)只能选择本部门的合同卡片
|
||||
RecordSet_Dep.executeSql("select * from HrmDepartment where departmentname like '%采购%' and id="+user.getUserDepartment());
|
||||
if(RecordSet_Dep.next()) isDep = true;
|
||||
|
||||
//是否合同流程接收人
|
||||
String sqlwhere_workflow = "";
|
||||
RecordSet_Dep.executeSql("select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID());
|
||||
if(RecordSet_Dep.next()) isShow = true;
|
||||
|
||||
if(!HrmUserVarify.checkUserRight("ContactInfo:Manager", user) && !HrmUserVarify.checkUserRight("ContactInfo:User", user) && !isShow && !isDep){
|
||||
response.sendRedirect("/notice/noright.jsp");
|
||||
}
|
||||
|
||||
//如果是合同管理权限,则直接1=1
|
||||
if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user)){
|
||||
sqlwhere += " and 1=1";
|
||||
}else if(isShow && HrmUserVarify.checkUserRight("ContactInfo:User", user)){
|
||||
//如果是流程接收人,并且有合同查看权限
|
||||
sqlwhere += " and (requestid in (select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID()+") or reqDeptId = '"+user.getUserDepartment()+"')";
|
||||
|
||||
}else if(HrmUserVarify.checkUserRight("ContactInfo:User", user)){
|
||||
//如果只有合同查看权限
|
||||
sqlwhere += " and reqDeptId = '"+user.getUserDepartment()+"'";
|
||||
|
||||
}else if(isShow){
|
||||
//如果只是流程接收人
|
||||
sqlwhere += " and requestid in (select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID()+")";
|
||||
}
|
||||
|
||||
//如果没有查看全部的权限,加分部条件
|
||||
if(!HrmUserVarify.checkUserRight("ContactInfoList:ALL", user)){
|
||||
if (!subcompanyid1.equals("0")) {sqlwhere += " and CrmContractInfo.subcompanyid1 = '"+subcompanyid1+"' ";}
|
||||
}
|
||||
String imagefilename = "/images/hdReport.gif";
|
||||
String titlename = SystemEnv.getHtmlLabelName(614, user.getLanguage()) + SystemEnv.getHtmlLabelName(527, user.getLanguage());
|
||||
String needfav = "1";
|
||||
String needhelp = "";
|
||||
%>
|
||||
<BODY>
|
||||
<%@ include file="/systeminfo/TopTitle_wev8.jsp"%>
|
||||
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp"%>
|
||||
<%
|
||||
RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ",javascript:OnSearch(),_top} ";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
RCMenu += "{" + "Excel,javascript:ContractExport(),_top} ";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
RCMenu += "{" + SystemEnv.getHtmlLabelName(18363, user.getLanguage()) + ",javascript:_table.firstPage(),_self}";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
RCMenu += "{" + SystemEnv.getHtmlLabelName(1258, user.getLanguage()) + ",javascript:_table.prePage(),_self}";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
RCMenu += "{" + SystemEnv.getHtmlLabelName(1259, user.getLanguage()) + ",javascript:_table.nextPage(),_self}";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
RCMenu += "{" + SystemEnv.getHtmlLabelName(18362, user.getLanguage()) + ",javascript:_table.lastPage(),_self}";
|
||||
RCMenuHeight += RCMenuHeightStep;
|
||||
%>
|
||||
<%
|
||||
int pagenum = Util.getIntValue(request.getParameter("pagenum"), 1);
|
||||
int perpage = Util.getPerpageLog();
|
||||
if (perpage <= 1) perpage = 10;
|
||||
|
||||
String creator = Util.fromScreen(request.getParameter("creator"), user.getLanguage());
|
||||
String fromdate = Util.fromScreen(request.getParameter("fromdate"), user.getLanguage());
|
||||
String fromdate2 = Util.fromScreen(request.getParameter("fromdate2"), user.getLanguage());
|
||||
String enddate = Util.fromScreen(request.getParameter("enddate"), user.getLanguage());
|
||||
String enddate2 = Util.fromScreen(request.getParameter("enddate2"), user.getLanguage());
|
||||
String status_temp = Util.null2String(request.getParameter("status_temp"));
|
||||
|
||||
String conNo = Util.fromScreen(request.getParameter("conNo"), user.getLanguage());
|
||||
String prNo = Util.fromScreen(request.getParameter("prNo"), user.getLanguage());
|
||||
String jpcNo = Util.fromScreen(request.getParameter("jpcNo"), user.getLanguage());
|
||||
String suppliersId = Util.fromScreen(request.getParameter("suppliersId"), user.getLanguage());
|
||||
String isOneSuppliers = Util.fromScreen(request.getParameter("isOneSuppliers"), user.getLanguage());
|
||||
// String reqDeptId = String.valueOf(user.getUserDepartment());
|
||||
String reqDeptId = Util.fromScreen(request.getParameter("reqDeptId"), user.getLanguage());;
|
||||
//管理员组或采购部才能查询所有部门下合同,合同接收人查看接收的合同
|
||||
// if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user) || isShow) reqDeptId = Util.fromScreen(request.getParameter("reqDeptId"), user.getLanguage());
|
||||
String isOverdue = Util.fromScreen(request.getParameter("isOverdue"), user.getLanguage());
|
||||
String status = Util.fromScreen(request.getParameter("status"), user.getLanguage());
|
||||
String isOverdueNext = Util.fromScreen(request.getParameter("isOverdueNext"), user.getLanguage());
|
||||
String conType = Util.fromScreen(request.getParameter("conType"), user.getLanguage());
|
||||
|
||||
String name = Util.fromScreen(request.getParameter("name"), user.getLanguage());
|
||||
String subCompanyId = Util.fromScreen(request.getParameter("subCompanyId"), user.getLanguage());
|
||||
String reNewStatus = Util.fromScreen(request.getParameter("reNewStatus"), user.getLanguage());
|
||||
String conStatus = Util.fromScreen(request.getParameter("conStatus"), user.getLanguage());
|
||||
String contractName = Util.fromScreen(request.getParameter("contractName"), user.getLanguage());
|
||||
String csstatus = Util.fromScreen(request.getParameter("csstatus"), user.getLanguage());
|
||||
|
||||
int opentype = Util.getIntValue(request.getParameter("opentype"),-1);
|
||||
|
||||
//String sqlwhere = " where status = '' ";
|
||||
//if(!"".equals(status_temp)) sqlwhere += " and status in ("+status_temp+") ";
|
||||
|
||||
if (!fromdate.equals("")) sqlwhere += " and startDate>='" + fromdate + "'";
|
||||
if (!fromdate2.equals("")) sqlwhere += " and startDate<='" + fromdate2 + "'";
|
||||
if (!enddate.equals("")) sqlwhere += " and enddate>='" + enddate + "'";
|
||||
if (!enddate2.equals("")) sqlwhere += " and enddate<='" + enddate2 + "'";
|
||||
if (!conNo.equals("")) sqlwhere += " and conNo like '%" + conNo + "%'";
|
||||
if (!prNo.equals("")) sqlwhere += " and prNo='" + prNo + "'";
|
||||
if (!jpcNo.equals("")) sqlwhere += " and jpcNo='" + jpcNo + "'";
|
||||
if(!"".equals(suppliersId)) sqlwhere += " and suppliersId=" + suppliersId;
|
||||
if (!isOneSuppliers.equals("")) sqlwhere += " and isOneSuppliers='" + isOneSuppliers + "'";
|
||||
if (!"".equals(creator) && !"0".equals(creator)) sqlwhere += " and CrmContractInfo.creator=" + creator;
|
||||
if (!reqDeptId.equals("")) sqlwhere += " and reqDeptId=" + reqDeptId;
|
||||
if (!isOverdue.equals("")) sqlwhere += " and isOverdue='" + isOverdue + "'";
|
||||
if (!status.equals("")) sqlwhere += " and CrmContractInfo.status='" + status + "'";
|
||||
if (!isOverdueNext.equals("")) sqlwhere += " and isOverdueNext='" + isOverdueNext + "'";
|
||||
if (!conType.equals("")) sqlwhere += " and conType='" + conType + "'";
|
||||
if (!csstatus.equals("")) sqlwhere += " and CrmSalesContractInfo.status='" + csstatus + "'";
|
||||
|
||||
if (!name.equals("")) sqlwhere += " and name like '%" + name + "%'";
|
||||
if (!subCompanyId.equals("")) sqlwhere += " and CrmContractInfo.subcompanyid1 = '" + subCompanyId + "'";
|
||||
if (!reNewStatus.equals("")) sqlwhere += " and conStatus = '" + reNewStatus + "'";
|
||||
|
||||
if (!contractName.equals("")) sqlwhere += " and contractName like '%" + contractName + "%'";
|
||||
|
||||
//if (reNewStatus2.equals("待续签")) sqlwhere += " and dbo.getReNewStatus2(2,CrmContractInfo.saleContract) > 0";
|
||||
//else if (reNewStatus2.equals("已续签")) sqlwhere += " and dbo.getReNewStatus2(1,CrmContractInfo.saleContract) > 0";
|
||||
//else if (reNewStatus2.equals("无需续签")) sqlwhere += " and dbo.getReNewStatus2(3,CrmContractInfo.saleContract) > 0";
|
||||
//System.out.println("sqlwhere:"+sqlwhere);
|
||||
|
||||
|
||||
if(opentype > -1){
|
||||
sqlwhere += " and isnull(CrmContractInfo.opentype,0) = " + opentype;
|
||||
}
|
||||
|
||||
String orderStr = " order by startDate desc, CrmContractInfo.id desc ";
|
||||
|
||||
// out.println("sqlwhere:" + sqlwhere);
|
||||
// out.println("orderStr:" + orderStr);
|
||||
|
||||
// session.setAttribute("sqlwhere", sqlwhere);
|
||||
// session.setAttribute("orderStr", orderStr);
|
||||
%>
|
||||
<form id=frmmain name=frmmain method=post action="ContractList.jsp">
|
||||
<input type=hidden id=pagenum name=pagenum value="<%=pagenum%>">
|
||||
<input type=hidden id=status_temp name=status_temp value="">
|
||||
<table class=ViewForm>
|
||||
<tbody>
|
||||
<COLGROUP>
|
||||
<COL width="13%">
|
||||
<COL width="20%">
|
||||
<COL width="14%">
|
||||
<COL width="20%">
|
||||
<COL width="13%">
|
||||
<COL width="20%">
|
||||
<TR class=Title>
|
||||
<TH colSpan=6><%=SystemEnv.getHtmlLabelName(15774, user.getLanguage())%></TH>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line1 colspan=6></td>
|
||||
</tr>
|
||||
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<TD>合同状态</TD>
|
||||
<TD class=Field>
|
||||
<select id="reNewStatus" name="reNewStatus">
|
||||
<option value="" <%="".equals(reNewStatus)?"selected":""%>></option>
|
||||
<option value="0" <%="0".equals(reNewStatus)?"selected":""%>>执行</option>
|
||||
<option value="1" <%="1".equals(reNewStatus)?"selected":""%>>待续签</option>
|
||||
<option value="2" <%="2".equals(reNewStatus)?"selected":""%>>已续签</option>
|
||||
<option value="3" <%="3".equals(reNewStatus)?"selected":""%>>关闭</option>
|
||||
</select>
|
||||
</TD>
|
||||
<td><%=SystemEnv.getHtmlLabelName(1970, user.getLanguage())%></td>
|
||||
<td class=field>
|
||||
<BUTTON type="button" class=calendar id=SelectDate onclick=getDate('fromdatespan','fromdate')></BUTTON>
|
||||
<SPAN id=fromdatespan><%=Util.toScreen(fromdate, user.getLanguage())%></SPAN> -
|
||||
<BUTTON type="button" class=calendar id=SelectDate onclick=getDate('fromdate2span','fromdate2')></BUTTON>
|
||||
<SPAN id=fromdate2span><%=Util.toScreen(fromdate2, user.getLanguage())%></SPAN>
|
||||
<input type="hidden" name="fromdate" value=<%=fromdate%>>
|
||||
<input type="hidden" name="fromdate2" value=<%=fromdate2%>>
|
||||
</td>
|
||||
<td><%=SystemEnv.getHtmlLabelName(15236, user.getLanguage())%></td>
|
||||
<td class=field>
|
||||
<BUTTON type="button" class=calendar id=SelectDate onclick=getDate('enddatespan','enddate')></BUTTON>
|
||||
<SPAN id=enddatespan><%=Util.toScreen(enddate, user.getLanguage())%></SPAN> -
|
||||
<BUTTON type="button" class=calendar id=SelectDate onclick=getDate('enddate2span','enddate2')></BUTTON>
|
||||
<SPAN id=enddate2span><%=Util.toScreen(enddate2, user.getLanguage())%></SPAN>
|
||||
<input type="hidden" name="enddate" value=<%=enddate%>>
|
||||
<input type="hidden" name="enddate2" value=<%=enddate2%>>
|
||||
</td>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<TR>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(21282, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<INPUT class=InputStyle maxLength=100 id="conNo" name="conNo" STYLE="width:150" value="<%=conNo%>">
|
||||
</TD>
|
||||
<TD>PR<%=SystemEnv.getHtmlLabelName(403,user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<INPUT class=InputStyle maxLength=100 id="prNo" name="prNo" STYLE="width:150" value="<%=prNo%>">
|
||||
</TD>
|
||||
<TD>JPC<%=SystemEnv.getHtmlLabelName(2171,user.getLanguage())%><%=SystemEnv.getHtmlLabelName(16992,user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<INPUT class=InputStyle maxLength=100 id="jpcNo" name="jpcNo" STYLE="width:150" value="<%=jpcNo%>">
|
||||
</TD>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<TR>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(613002, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<brow:browser viewType="0"
|
||||
id="suppliersId"
|
||||
name="suppliersId"
|
||||
browserValue="<%=suppliersId %>"
|
||||
browserUrl="/systeminfo/BrowserMain.jsp?url=/interface/CommonBrowser.jsp?type=browser.gys"
|
||||
hasInput="true"
|
||||
isSingle="true"
|
||||
hasBrowser = "true"
|
||||
isMustInput='1'
|
||||
width="165px"
|
||||
browserSpanValue="<%=CrmSupplierComInfo.getSuppliername(suppliersId) %>">
|
||||
</brow:browser>
|
||||
</TD>
|
||||
<TD></TD>
|
||||
<TD class=Field>
|
||||
|
||||
</TD>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(913, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<brow:browser viewType="0"
|
||||
id="creator"
|
||||
name="creator"
|
||||
browserValue="<%=creator %>"
|
||||
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp"
|
||||
hasInput="true"
|
||||
isSingle="true"
|
||||
hasBrowser = "true"
|
||||
isMustInput='1'
|
||||
width="165px"
|
||||
browserSpanValue="<%=ResourceComInfo.getResourcename(creator) %>">
|
||||
</brow:browser>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<TR>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(620002, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
|
||||
<brow:browser viewType="0"
|
||||
id="reqDeptId"
|
||||
name="reqDeptId"
|
||||
browserValue="<%=reqDeptId %>"
|
||||
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp"
|
||||
hasInput="true"
|
||||
isSingle="true"
|
||||
hasBrowser = "true"
|
||||
isMustInput='1'
|
||||
width="165px"
|
||||
browserSpanValue="<%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage())%>">
|
||||
</brow:browser>
|
||||
|
||||
<%-- <%--%>
|
||||
<%-- //管理员组才能查询所有部门下合同--%>
|
||||
<%-- if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user)){--%>
|
||||
<%-- %>--%>
|
||||
<%-- <brow:browser viewType="0"--%>
|
||||
<%-- id="reqDeptId"--%>
|
||||
<%-- name="reqDeptId"--%>
|
||||
<%-- browserValue="<%=reqDeptId %>"--%>
|
||||
<%-- browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp"--%>
|
||||
<%-- hasInput="true"--%>
|
||||
<%-- isSingle="true"--%>
|
||||
<%-- hasBrowser = "true"--%>
|
||||
<%-- isMustInput='1'--%>
|
||||
<%-- width="165px"--%>
|
||||
<%-- browserSpanValue="<%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage())%>">--%>
|
||||
<%-- </brow:browser>--%>
|
||||
|
||||
<%-- <%–<INPUT type=hidden class="wuiBrowser" _required="no" _displayTemplate="#b{name}" _displayText="<%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage()) %>" _url="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp" name="reqDeptId" value="<%=reqDeptId%>">–%>--%>
|
||||
<%-- <%}else{ %>--%>
|
||||
<%-- <%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage()) %>--%>
|
||||
<%-- <%} %>--%>
|
||||
</TD>
|
||||
<TD>付款状态</TD>
|
||||
<TD class=Field>
|
||||
<select id="status" name="status">
|
||||
<option value="" <%="".equals(status)?"selected":""%>></option>
|
||||
<option value="0" <%="0".equals(status)?"selected":""%>>执行中</option>
|
||||
<option value="1" <%="1".equals(status)?"selected":""%>>已结清</option>
|
||||
</select>
|
||||
</TD>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(620017, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<select id="isOverdueNext" name="isOverdueNext">
|
||||
<option value="" <%="".equals(isOverdueNext)?"selected":""%>></option>
|
||||
<option value="Y" <%="Y".equals(isOverdueNext)?"selected":""%>><%=SystemEnv.getHtmlLabelName(163,user.getLanguage())%></option>
|
||||
<option value="N" <%="N".equals(isOverdueNext)?"selected":""%>><%=SystemEnv.getHtmlLabelName(161,user.getLanguage())%></option>
|
||||
</select>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<TR>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(15775, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<select id="conType" name="conType">
|
||||
<option value="" <%="".equals(conType)?"selected":""%>></option>
|
||||
<option value="0" <%="0".equals(conType)?"selected":""%>>业务型</option>
|
||||
<option value="1" <%="1".equals(conType)?"selected":""%>>资本型</option>
|
||||
<option value="2" <%="2".equals(conType)?"selected":""%>>费用型</option>
|
||||
</select>
|
||||
</TD>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(15142, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<INPUT class=InputStyle maxLength=200 id="name" name="name" STYLE="width:150" value="<%=name%>">
|
||||
</TD>
|
||||
<%if(HrmUserVarify.checkUserRight("ContactInfoList:ALL", user)){%>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(141,user.getLanguage())%>:</TD>
|
||||
<TD class=Field>
|
||||
|
||||
|
||||
<brow:browser viewType="0"
|
||||
id="subCompanyId"
|
||||
name="subCompanyId"
|
||||
browserValue="<%=subCompanyId %>"
|
||||
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/SubcompanyBrowser.jsp"
|
||||
hasInput="true"
|
||||
isSingle="true"
|
||||
hasBrowser = "true"
|
||||
isMustInput='1'
|
||||
width="165px"
|
||||
browserSpanValue="<%=SubCompanyComInfo.getSubCompanyname(subCompanyId+"")%>">
|
||||
</brow:browser>
|
||||
|
||||
|
||||
<%--<input class=wuiBrowser class=inputStyle id=subCompanyId type=hidden name=subCompanyId value="<%=subCompanyId%>"--%>
|
||||
<%--_url="/systeminfo/BrowserMain.jsp?url=/hrm/company/SubcompanyBrowser.jsp"--%>
|
||||
<%--_displayText="<%=SubCompanyComInfo.getSubCompanyname(subCompanyId+"")%>"--%>
|
||||
<%-->--%>
|
||||
</TD>
|
||||
<%}%>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
<TR>
|
||||
<TD><%=SystemEnv.getHtmlLabelName(16404, user.getLanguage())%><%=SystemEnv.getHtmlLabelName(195, user.getLanguage())%></TD>
|
||||
<TD class=Field>
|
||||
<INPUT class=InputStyle maxLength=200 id="contractName" name="contractName" STYLE="width:150" value="<%=contractName%>">
|
||||
</TD>
|
||||
<TD>销售合同状态</TD>
|
||||
<TD class=Field>
|
||||
<select id="csstatus" name="csstatus">
|
||||
<option value="" <%="".equals(csstatus)?"selected":""%>></option>
|
||||
<option value="0" <%="0".equals(csstatus)?"selected":""%>>已签署</option>
|
||||
<option value="1" <%="1".equals(csstatus)?"selected":""%>>未签署</option>
|
||||
<option value="2" <%="2".equals(csstatus)?"selected":""%>>已续签</option>
|
||||
<option value="3" <%="3".equals(csstatus)?"selected":""%>>关闭</option>
|
||||
</select>
|
||||
</TD>
|
||||
<td>开闭口类型</td>
|
||||
<td class="Field">
|
||||
<select name="opentype">
|
||||
<option value="-1" <%=(opentype == -1) ?"selected":"" %>>--请选择--</option>
|
||||
<option value="0" <%=(opentype == 0) ?"selected":"" %>>闭口</option>
|
||||
<option value="1" <%=(opentype == 1) ?"selected":"" %>>开口</option>
|
||||
<option value="2" <%=(opentype == 2) ?"selected":"" %>>周期性</option>
|
||||
</select>
|
||||
</td>
|
||||
</TR>
|
||||
<tr style="height: 1px">
|
||||
<td class=Line colspan=6></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="" style="overflow-x:scroll;width:100%;">
|
||||
<table width="2500px" style="table-Layout:fixed">
|
||||
<tr>
|
||||
<td>
|
||||
<%
|
||||
|
||||
String tableString = "";
|
||||
String backfields = " CrmContractInfo.id,case CrmContractInfo.opentype when '0' then '闭口' when '1' then '开口' when '2' then '周期性' end opentype, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '是' else '否' end as isOverdue, conAmount, content, ',' as str_temp, case isOverdueNext when 'Y' then '是' else '否' end as isOverdueNext, case CrmContractInfo.status when '0' then '执行中' when '1' then '已结清' end as status, CrmContractInfo.creator, CrmContractInfo.subcompanyid1, case conStatus when '0' then '执行' when '1' then '待续签' when '2' then '已续签' when '3' then '关闭' end as reNewStatus, contractName, saleContract, case when dbo.getReNewStatus2(1,CrmContractInfo.saleContract) > 0 then '已续签' when dbo.getReNewStatus2(2,CrmContractInfo.saleContract) > 0 then '待续签' when dbo.getReNewStatus2(3,CrmContractInfo.saleContract) > 0 then '无需续签' end as reNewStatus2,case CrmSalesContractInfo.status when '0' then '已签署' when '1' then '未签署' when '2' then '已续签' when '3' then '关闭' end as csstatus ";
|
||||
String fromSql = " CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract ";
|
||||
//out.print("select"+backfields+"from"+fromSql +sqlwhere);
|
||||
String str_content = "content"+"str_temp";
|
||||
tableString = " <table instanceid=\"crmContractInfoTable\" tabletype=\"none\" pageId=\"perpage\" pagesize=\"" +PageIdConst.getPageSize("perpage",user.getUID())+"\" >" + "<sql backfields=\"" + backfields + "\" sqlform=\"" + fromSql + "\" sqlwhere=\"" + Util.toHtmlForSplitPage(sqlwhere) + "\" sqlprimarykey=\"CrmContractInfo.id\" sqlsortway=\"Desc\" sqlisdistinct=\"false\" />" + "<head>";
|
||||
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(15142, user.getLanguage()) + "\" column=\"name\" orderkey=\"name\" linkkey=\"id\" linkvaluecolumn=\"id\" href=\"/CRM/contractinfo/ContractEdit.jsp\" target=\"_fullwindow\" />";
|
||||
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(21282, user.getLanguage()) + "\" column=\"conNo\" orderkey=\"conNo\" />";
|
||||
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(620002, user.getLanguage()) + "\" column=\"reqDeptId\" orderkey=\"reqDeptId\" transmethod=\"weaver.hrm.company.DepartmentComInfo.getDepartmentname\" linkkey=\"id\" href=\"/hrm/company/HrmDepartmentDsp.jsp\" target=\"_fullwindow\" />";
|
||||
tableString += "<col width=\"10%\" text=\""+ SystemEnv.getHtmlLabelName(613002, user.getLanguage()) + "\" column=\"suppliersId\" orderkey=\"suppliersId\" linkkey=\"id\" transmethod=\"weaver.crm.supplierinfo.CrmSupplierComInfo.getSuppliername\" href=\"/CRM/supplierinfo/SuppliersEdit.jsp?1=1\" target=\"_fullwindow\" />";
|
||||
tableString += "<col width=\"6%\" text=\"" + SystemEnv.getHtmlLabelName(1970, user.getLanguage()) + "\" column=\"startDate\" orderkey=\"startDate\" />";
|
||||
tableString += "<col width=\"6%\" text=\"" + SystemEnv.getHtmlLabelName(15236, user.getLanguage()) + "\" column=\"endDate\" orderkey=\"endDate\" />";
|
||||
//tableString += "<col width=\"3%\" text=\"" + SystemEnv.getHtmlLabelName(620016, user.getLanguage()) + "\" column=\"isOverdue\" orderkey=\"isOverdue\" />";
|
||||
tableString += "<col width=\"6%\" text=\"" + SystemEnv.getHtmlLabelName(6146, user.getLanguage()) + "\" column=\"conAmount\" orderkey=\"conAmount\" />";
|
||||
tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(620015, user.getLanguage()) + "\" column=\"content\" orderkey=\""+str_content+"\" transmethod=\"weaver.splitepage.transform.SptmForDoc.getDocNames\" />";
|
||||
tableString += "<col width=\"4%\" text=\"" + SystemEnv.getHtmlLabelName(620017, user.getLanguage()) + "\" column=\"isOverdueNext\" orderkey=\"isOverdueNext\" />";
|
||||
tableString += "<col width=\"4%\" text=\"付款状态\" column=\"status\" orderkey=\"status\" />";
|
||||
tableString += "<col width=\"4%\" text=\"" + SystemEnv.getHtmlLabelName(913, user.getLanguage()) + "\" column=\"creator\" orderkey=\"creator\" linkkey=\"id\" transmethod=\"weaver.hrm.resource.ResourceComInfo.getResourcename\" href=\"/hrm/resource/HrmResource.jsp?1=1\" target=\"_fullwindow\" />";
|
||||
//tableString += "<col width=\"10%\" text=\"" + SystemEnv.getHtmlLabelName(104, user.getLanguage()) + "\" column=\"id\" orderkey=\"id\" transmethod=\"weaver.crm.contractinfo.CrmContractTool.getLinkButtons\" />";
|
||||
tableString += "<col width=\"4%\" text=\"合同状态\" column=\"reNewStatus\" orderkey=\"reNewStatus\" />";
|
||||
tableString += "<col width=\"4%\" text=\"销售合同\" column=\"contractName\" orderkey=\"contractName\" linkkey=\"id\" linkvaluecolumn=\"saleContract\" href=\"/CRM/salecontractinfo/SaleContractEdits.jsp?metherid=search\" target=\"_fullwindow\" />";
|
||||
tableString += "<col width=\"4%\" text=\"销售合同状态\" column=\"csstatus\" orderkey=\"csstatus\" />";
|
||||
tableString += "<col width=\"4%\" text=\"开闭口类型\" column=\"opentype\" orderkey=\"opentype\" />";
|
||||
tableString += "<col width=\"4%\" text=\"" + SystemEnv.getHtmlLabelName(141,user.getLanguage()) + "\" column=\"subcompanyid1\" orderkey=\"subcompanyid1\" transmethod=\"weaver.hrm.company.SubCompanyComInfo.getSubCompanyname\" />";
|
||||
tableString += "</head>";
|
||||
tableString += "</table>";
|
||||
%>
|
||||
<input type="hidden" name="pageId" id="pageId" value="crmContractInfoTable" />
|
||||
<wea:SplitPageTag tableString="<%=tableString%>" mode="run" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp"%>
|
||||
</body>
|
||||
|
||||
<iframe id="searchexport" style="display: none"></iframe>
|
||||
<script language=javascript>
|
||||
function ContractExport() {
|
||||
var sqlwhere = encodeURI("<%=sqlwhere%>");
|
||||
var orderStr = encodeURI("<%=orderStr%>");
|
||||
|
||||
jQuery("#searchexport").attr("src", "ContractReportExport.jsp?sqlwhere="+sqlwhere+"&orderStr=" + orderStr);
|
||||
}
|
||||
|
||||
function OnSubmit(pagenum) {
|
||||
document.frmmain.pagenum.value = pagenum;
|
||||
document.frmmain.submit();
|
||||
}
|
||||
|
||||
function OnSearch(){
|
||||
var chkInTableTags = document.getElementsByName("status");
|
||||
var status_temp = "";
|
||||
for(var i=0;i<chkInTableTags.length;i++){
|
||||
if(chkInTableTags[i].checked && chkInTableTags[i].value != ''){
|
||||
if(status_temp == "") status_temp = "'" + chkInTableTags[i].value + "'";
|
||||
else status_temp = status_temp + ",'" + chkInTableTags[i].value + "'";
|
||||
}
|
||||
}
|
||||
jQuery("#status_temp").val(status_temp);
|
||||
document.frmmain.submit();
|
||||
}
|
||||
|
||||
//续签
|
||||
function newWorkflowByContract4(key){
|
||||
location.href = "ContractNewWorkflow.jsp?status=4&id="+key;
|
||||
}
|
||||
|
||||
//试运作
|
||||
function newWorkflowByContract3(key){
|
||||
location.href = "ContractNewWorkflow.jsp?status=3&id="+key;
|
||||
}
|
||||
</script>
|
||||
<SCRIPT language="javascript" src="/js/datetime_wev8.js"></script>
|
||||
<SCRIPT language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
|
||||
</html>
|
|
@ -1,127 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GBK" %>
|
||||
<%@ include file="/systeminfo/init.jsp" %>
|
||||
<%@ page import="weaver.general.Util, weaver.file.ExcelSheet, weaver.file.ExcelRow" %>
|
||||
|
||||
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
|
||||
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
|
||||
<jsp:useBean id="SptmForDoc" class="weaver.splitepage.transform.SptmForDoc" scope="page"/>
|
||||
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page"/>
|
||||
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page"/>
|
||||
<jsp:useBean id="CrmSupplierComInfo" class="weaver.crm.supplierinfo.CrmSupplierComInfo" scope="page"/>
|
||||
<jsp:useBean id="RequestComInfo" class="weaver.workflow.request.RequestComInfo" scope="page"/>
|
||||
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page"/>
|
||||
<jsp:useBean id="ExcelFile" class="weaver.file.ExcelFile" scope="session"/>
|
||||
<%!
|
||||
public static String ToDBC(String input) {
|
||||
char[] c = input.toCharArray();
|
||||
for (int i = 0; i < c.length; i++) {
|
||||
if (c[i] == 12288) {
|
||||
//全角空格为12288,半角空格为32
|
||||
c[i] = (char) 32;
|
||||
continue;
|
||||
}
|
||||
if (c[i] > 65280 && c[i] < 65375)
|
||||
//其他字符半角(33-126)与全角(65281-65374)的对应关系是:均相差65248
|
||||
c[i] = (char) (c[i] - 65248);
|
||||
}
|
||||
return new String(c);
|
||||
}
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<%
|
||||
// String sqlwhere=(String)session.getAttribute("sqlwhere");
|
||||
// String orderStr=(String)session.getAttribute("orderStr");
|
||||
|
||||
String sqlwhere = request.getParameter("sqlwhere");
|
||||
sqlwhere = ToDBC(sqlwhere);
|
||||
String orderStr = request.getParameter("orderStr");
|
||||
orderStr = ToDBC(orderStr);
|
||||
|
||||
String sqlstr = "";
|
||||
|
||||
if (RecordSet.getDBType().equals("oracle")) {
|
||||
sqlstr = "select CrmContractInfo.id, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '是' else '否' end as isOverdue, conAmount, content, case isOverdueNext when 'Y' then '是' else '否' end as isOverdueNext, case CrmContractInfo.status when '0' then '执行中' when '1' then '已结清' end as status, case isOneSuppliers when 'Y' then '是' when 'N' then '否' else '' end as isOneSuppliers, prRequestId,jpcNo,jpcFile,prNo,prAmount,prAmountSum,conAmount,managerId,subject,giveDate,giveRemark,payRemark,content,CrmContractInfo.createDate,CrmContractInfo.creator,CrmContractInfo.subcompanyid1, case conStatus when '0' then '执行' when '1' then '待续签' when '2' then '已续签' when '3' then '关闭' end as reNewStatus,contractName, saleContract, case CrmSalesContractInfo.status when '0' then '已签署' when '1' then '未签署' when '2' then '已续签' when '3' then '关闭' end as reNewStatus2 from CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract" + sqlwhere + orderStr;
|
||||
} else {
|
||||
sqlstr = "select CrmContractInfo.id, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '是' else '否' end as isOverdue, conAmount, content, case isOverdueNext when 'Y' then '是' else '否' end as isOverdueNext, case CrmContractInfo.status when '0' then '执行中' when '1' then '已结清' end as status, case isOneSuppliers when 'Y' then '是' when 'N' then '否' else '' end as isOneSuppliers, prRequestId,jpcNo,jpcFile,prNo,prAmount,prAmountSum,conAmount,managerId,subject,giveDate,giveRemark,payRemark,content,CrmContractInfo.createDate,CrmContractInfo.creator,CrmContractInfo.subcompanyid1, case conStatus when '0' then '执行' when '1' then '待续签' when '2' then '已续签' when '3' then '关闭' end as reNewStatus,contractName, saleContract, case CrmSalesContractInfo.status when '0' then '已签署' when '1' then '未签署' when '2' then '已续签' when '3' then '关闭' end as reNewStatus2 from CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract" + sqlwhere + orderStr;
|
||||
}
|
||||
new BaseBean().writeLog(">>>>>>>>"+sqlstr);
|
||||
RecordSet.executeQuery(sqlstr);
|
||||
|
||||
ExcelSheet es = new ExcelSheet();
|
||||
|
||||
ExcelRow er = es.newExcelRow();
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(141,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620002,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(613002,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(21282,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(15142,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(1970,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(15236,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620016,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(6146,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620015,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620017,user.getLanguage()));
|
||||
er.addStringValue("付款状态");
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(913,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620009,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620003,user.getLanguage()));
|
||||
er.addStringValue("JPC"+SystemEnv.getHtmlLabelName(16992,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620004,user.getLanguage()));
|
||||
er.addStringValue("PR"+SystemEnv.getHtmlLabelName(403,user.getLanguage()));
|
||||
er.addStringValue("PR"+SystemEnv.getHtmlLabelName(856,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620010,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620011,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620006,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620012,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620013,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620014,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(620015,user.getLanguage()));
|
||||
er.addStringValue(SystemEnv.getHtmlLabelName(614,user.getLanguage())+SystemEnv.getHtmlLabelName(722,user.getLanguage()));
|
||||
er.addStringValue("合同状态");
|
||||
er.addStringValue("销售合同");
|
||||
er.addStringValue("销售合同状态");
|
||||
|
||||
while (RecordSet.next()) {
|
||||
ExcelRow erdetail = es.newExcelRow();
|
||||
erdetail.addStringValue(SubCompanyComInfo.getSubCompanyname(RecordSet.getString("subcompanyid1")));
|
||||
erdetail.addStringValue(DepartmentComInfo.getDepartmentname(RecordSet.getString("reqDeptId")));
|
||||
erdetail.addStringValue(CrmSupplierComInfo.getSuppliername(RecordSet.getString("suppliersId")));
|
||||
erdetail.addStringValue(RecordSet.getString("conNo"));
|
||||
erdetail.addStringValue(RecordSet.getString("name"));
|
||||
erdetail.addStringValue(RecordSet.getString("startDate"));
|
||||
erdetail.addStringValue(RecordSet.getString("endDate"));
|
||||
erdetail.addStringValue(RecordSet.getString("isOverdue"));
|
||||
erdetail.addStringValue(RecordSet.getString("conAmount"));
|
||||
erdetail.addStringValue(Util.toScreen(SptmForDoc.getDocName(RecordSet.getString("content")), user.getLanguage()));
|
||||
erdetail.addStringValue(RecordSet.getString("isOverdueNext"));
|
||||
erdetail.addStringValue(RecordSet.getString("status"));
|
||||
erdetail.addStringValue(Util.toScreen(ResourceComInfo.getResourcename(RecordSet.getString("creator")), user.getLanguage()));
|
||||
erdetail.addStringValue(RecordSet.getString("isOneSuppliers"));
|
||||
erdetail.addStringValue(RequestComInfo.getRequestname(RecordSet.getString("prRequestId")));
|
||||
erdetail.addStringValue(RecordSet.getString("jpcNo"));
|
||||
erdetail.addStringValue(DocComInfo.getDocname(RecordSet.getString("jpcFile")));
|
||||
erdetail.addStringValue(RecordSet.getString("prNo"));
|
||||
erdetail.addStringValue(RecordSet.getString("prAmount"));
|
||||
erdetail.addStringValue(RecordSet.getString("prAmountSum"));
|
||||
erdetail.addStringValue(ResourceComInfo.getResourcename(RecordSet.getString("managerId")));
|
||||
erdetail.addStringValue(RecordSet.getString("subject"));
|
||||
erdetail.addStringValue(RecordSet.getString("giveDate"));
|
||||
erdetail.addStringValue(RecordSet.getString("giveRemark"));
|
||||
erdetail.addStringValue(RecordSet.getString("payRemark"));
|
||||
erdetail.addStringValue(DocComInfo.getDocname(RecordSet.getString("content")));
|
||||
erdetail.addStringValue(RecordSet.getString("createDate"));
|
||||
erdetail.addStringValue(RecordSet.getString("reNewStatus"));
|
||||
erdetail.addStringValue(RecordSet.getString("contractName"));
|
||||
erdetail.addStringValue(RecordSet.getString("reNewStatus2"));
|
||||
}
|
||||
|
||||
ExcelFile.init();
|
||||
ExcelFile.setFilename("合同报表");
|
||||
ExcelFile.addSheet("合同", es);
|
||||
%>
|
||||
<iframe name="ExcelOut" id="ExcelOut" src="/weaver/weaver.file.ExcelOut" style="display:none" ></iframe>
|
||||
<%--<script language="javascript">--%>
|
||||
<%-- window.location = "/weaver/weaver.file.ExcelOut";--%>
|
||||
<%--</script>--%>
|
Loading…
Reference in New Issue