<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<%@page import="java.text.SimpleDateFormat"%>
|
<%@page import="com.yc.service.impl.EnvHelper"%>
|
<%@page import="com.yc.service.impl.DBHelper"%>
|
<%@page import="com.yc.service.build.BuildFuncIfc"%>
|
<%@page import="org.springframework.jdbc.support.rowset.SqlRowSet"%>
|
<%@page import="com.yc.factory.FactoryBean"%>
|
<%@page import="com.yc.service.panel.TypeControlDao"%>
|
<%@page import="com.yc.service.panel.time.PanelTimeDao"%>
|
<%@page import="com.yc.service.panel.PanelManageDao"%>
|
<%@page import="com.yc.service.panel.GfieldApprovedButtonIfc"%>
|
<%@page import="com.yc.service.panel.SqlDBHelperIfc"%>
|
<%@page import="com.yc.service.upload.AttachmentIfc"%>
|
<%@page import="com.yc.entity.attachment.AttachmentEntity"%>
|
<%@page import="com.yc.utils.DefaultSet" %>
|
<%@page import="net.sf.json.JSONObject"%>
|
<%@page import="com.yc.multiData.SpObserver"%>
|
<%@page import="com.yc.utils.SessionKey"%>
|
<%@page import="com.google.gson.JsonArray"%>
|
<%@page import="com.google.gson.JsonObject"%>
|
<%@ include file="dataHead.jsp" %>
|
<%
|
//
|
SqlDBHelperIfc sqlDBHelperIfc=(SqlDBHelperIfc)FactoryBean.getBean("SqlDBHelper");
|
//
|
GfieldApprovedButtonIfc gButtonIfc=(GfieldApprovedButtonIfc)FactoryBean.getBean("GfieldApprovedButton");
|
//
|
PanelTimeDao PanelTimeBo=(PanelTimeDao)FactoryBean.getBean("PanelTime");
|
//
|
PanelManageDao PanelManageBo=(PanelManageDao)FactoryBean.getBean("PanelManage");
|
//
|
TypeControlDao TypeControlBo=(TypeControlDao)FactoryBean.getBean("TypeControl");
|
//pengbei
|
request.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
String sql = "";
|
String path = request.getContextPath();
|
String basePath = SettingKey.getHostUrl(request)
|
+ path + "/";
|
Date now=new Date();
|
SimpleDateFormat formatDate=new SimpleDateFormat("yyyy-MM-dd");
|
String date=String.valueOf(now.getDate());
|
int isNewOpen=1;
|
int docstatePan=0;
|
String tableIs="@zhu@";
|
String tableIs2="@minxi@";
|
Map<String,Object> docMap=new HashMap<String,Object>();
|
List<Map<String, Object>> listInfo=new ArrayList<Map<String, Object>>();
|
String addUrl="";//添加传给grid的条件,需要分离
|
if((wherePan!=null&&!wherePan.equals(""))||grid!=null){
|
//wherePan=java.net.URLDecoder.decode(wherePan,"utf-8");
|
if(wherePan.indexOf("@G@")!=-1){
|
int inds=wherePan.indexOf("@G@");
|
String temp1=wherePan;
|
wherePan=temp1.substring(0,inds);
|
addUrl = " and "+temp1.substring(inds+3);
|
}
|
try{
|
sql="select top 1 @selectColAll@ from ";//只能查一条
|
if(sql.contains("&doccode&")){//by danaus 2011-1-25
|
if(doccode!=null)
|
sql=sql.replaceAll("&doccode&",doccode.replaceAll("'",""));
|
}
|
SpObserver.setDBtoInstance("_"+request.getSession().getAttribute(SessionKey.DATA_BASE_ID));
|
listInfo=PanelManageBo.getFromEnd(sql,tableIs,(wherePan==null?wherePan:wherePan.replaceAll("_ycid_","id")),@formType@,request);
|
}catch(Exception e){
|
throw e;
|
// sql="select top 1 @selectColAll@ from "+tableIs2+" where "+wherePan;
|
// try{
|
// if(sql.contains("&doccode&")){//by danaus 2011-1-25
|
// if(doccode!=null)
|
// sql=sql.replaceAll("&doccode&",doccode.replaceAll("'",""));
|
// }
|
// listInfo=sqlDBHelperIfc.getHashMapObj(sql.replaceAll("_ycid_","id"));
|
// }catch(Exception ex){
|
// listInfo=new ArrayList<Map<String, Object>>();
|
// //数据库乱设置时不显示页面,直接清空信息,或者不是乱设置,却不能用来查询,也清空信息
|
// }
|
}finally{
|
SpObserver.setDBtoInstance();
|
}
|
if(listInfo.size()>0){docMap=listInfo.get(0);}
|
if((doccode==null||"".equals(doccode))&&listInfo.size()>0){doccode=DBHelper.getValue(docMap,"doccode");}
|
}
|
if((isNew!=null&&isNew.equals("0"))||listInfo.size()>0){
|
isNewOpen=0;//不为新开单
|
docstatePan=DBHelper.getValueInt(docMap,"docstatus");
|
}
|
JSONObject jsonOldPanel = JSONObject.fromObject(docMap);
|
|
SqlRowSet SRS =null;
|
String outStr="";
|
BuildFuncIfc build=(BuildFuncIfc)FactoryBean.getBean("Build");
|
try{
|
String openDoc="@openDoc@";
|
SpObserver.setDBtoInstance("_"+request.getSession().getAttribute(SessionKey.DATA_BASE_ID));
|
sqlDBHelperIfc.execSql(DBHelper.getProcessAll(openDoc,session,docMap,true));
|
}catch(Exception e){
|
throw e;
|
}finally{
|
SpObserver.setDBtoInstance();
|
}
|
%>
|
@linkscript@
|
<style type="text/css">
|
.posPan {
|
border: 0px solid #000000;
|
position: absolute;
|
height: @rowHei@px;
|
width: @kongJian@px;
|
font-size: 13px;
|
z-index:0;
|
}
|
.miaoshu_pan {
|
height: auto;
|
@maoshuF@
|
padding-top:5px;
|
width: @miaoShuo@px;
|
white-space:nowrap;
|
overflow:hidden;
|
text-overflow:ellipsis;
|
padding-right:6px;
|
margin-top: -3px;
|
}
|
.control_div{
|
float: left;
|
}
|
.mustThree_show {
|
border:1px solid #ffcf5a;
|
background: #fff url(/images/ppp.gif) no-repeat right;
|
}
|
.Three_show {
|
border:1px solid #a5a6ad;
|
}
|
.input35{
|
height:14px;
|
}
|
.main_talbe {
|
font-family: Verdana, Arial, Vrinda, Tahoma;
|
line-height: 24px;
|
font-size: 12px;
|
color: #666;
|
}
|
.text {
|
border:1px solid #a5a6ad;
|
}
|
</style>
|
<span onclick="panIndex='@index@'" id="panIndex@index@">
|
<script type="text/javascript">
|
var docstatuPan=<%=docstatePan%>;
|
panIndex="@index@";//需要替换
|
maxCols[panIndex]="@maxCols@";//面板跨列数
|
panMain[panIndex]=clone(panPar);
|
@uploadEditStatusMap@
|
@panInfo@
|
@panelScript@
|
panMain[panIndex].controlUrl="panelControl@formId@.jsp";
|
panMain[panIndex].isNew=<%=isNew%>;//是否是新单
|
</script>
|
<%@ include file="/public/template/0/showPan.txt" %>
|
<div class="panelControlDiv">
|
@panelHtml@
|
</div>
|
<div id="tplt-grid">
|
<%@ include file="@formId@_grid.jsp" %>
|
</div>
|
<div class="panelControlDiv">
|
@panelDownHtml@
|
</div>
|
<script type="text/javascript">
|
@pansetInv@
|
panMain[panIndex].loadSet(<%=docstatePan%>);
|
panMain[panIndex].keyDown('123','null');
|
</script>
|
</span>
|