码迷,mamicode.com
首页 > 其他好文 > 详细

关于页面EL表达式获取list集合、元素相关

时间:2017-12-13 14:27:33      阅读:2436      评论:0      收藏:0      [点我收藏+]

标签:package   dateutil   bow   sim   servlet   web   ict   默认   war   

之前做项目(裁判文书信息修改)的时候,遇到一些问题

1、数据树结构显示失败

  页面数据显示不出来树结构,原因是因为缺少调用接口方法

   ztreeNodes1 = getDeptREmp(oid); 

 

2、json拼接的问题

  //之前的拼接方法是:

  jsonstr = "{\"oid\":\""+oid+"\"}";

  //拼接json ,\"dyfs\":\""+dyfs+"\" 打印份数拼接到字符串上怎么都不对 Sstring、 double、 int类型都不对

  String dyfsstr=request.getParameter("formvo.dyfs");
  int dyfs=Integer.parseInt(dyfsstr);

  //由于调用方法的参数数据类型为int 在此进行数据类型转换 String--->int 所以正确的json拼接方式为:

   jsonstr = "{\"dyfs\":"+dyfs+"}";

 

3、接口调用失败

  这个是由于封装的接口写的不对

4、文件上传,用的是flash插件

  谷歌浏览器吧flash插件默认禁用了

5、获取jsonarray以及嵌套的array内容

//获取选中裁判文书
returnCpwsUpdate = oaboSvc.getTheCpws(jsonstr);
//转换成json对象
JSONObject jasonObject = JSONObject.fromObject(returnCpwsUpdate);
//获取jsonarray
JSONArray jsonArray = jasonObject.getJSONArray("dsrs");
//获取嵌套内容
String oid=JSONObject.fromObject(JSONArray.fromObject(jasonObject.getString("dsrs")).get(1)).getString("oid");

参考:JSON4:嵌套的JsonObject与JSONArray的取值

6、最后这个是EL表达式获取list集合相关的时候出现的问题 

  //jsp页面用EL表达式获取数组长度
  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
  <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

  <input type="hidden" name="listsize" id="listsize" value="${fn:length(list)}"/>
<!-- 动态添加li -->
<script type="text/javascript">
    var len = ${fn:length(list)};  
    function adddsrli(){
        for(i=0;i<len;i++){
            alert(i);//0、1
            alert (typeof i);//number
            var ulhtml = "<li>"+
            " <span>当事人</span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrname‘ size=‘25‘ value=‘${list["+这里拼接不对+"].dsrname}’/>" +                
            " <span>联系方式 </span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrphone‘size=‘20‘/>" +
            " <span>送达 </span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>是 &nbsp; " +
            " <input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
            " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrnote‘ size=‘80‘/>" +
            " </li>";
            $("ul.dsrbox").append(ulhtml);
        }
    }
</script>

参考:Java_EL表达式从数组 Map List集合取值

结尾附上部分代码

技术分享图片
  1 package com.zt.courtoa.gwgl;
  2 
  3 import java.rmi.RemoteException;
  4 import java.util.ArrayList;
  5 import java.util.Collections;
  6 import java.util.Date;
  7 import java.util.HashMap;
  8 import java.util.List;
  9 import java.util.Map;
 10 
 11 import javax.servlet.http.HttpServletRequest;
 12 
 13 import net.sf.json.JSONArray;
 14 import net.sf.json.JSONObject;
 15 
 16 import org.apache.log4j.Logger;
 17 import org.apache.struts2.ServletActionContext;
 18 
 19 import zt.oastub.base.BaEmpSvc;
 20 import zt.oastub.base.BaOrgSvc;
 21 import zt.oastub.oaintegrate.OaboSvc;
 22 
 23 import com.google.gson.reflect.TypeToken;
 24 import com.itextpdf.text.log.SysoLogger;
 25 import com.opensymphony.xwork2.ActionContext;
 26 import com.zt.courtoa.base.pojo.BaDept;
 27 import com.zt.courtoa.base.pojo.BaOrg;
 28 import com.zt.courtoa.base.pojo.BaUser;
 29 import com.zt.courtoa.base.vo.CommonCdt;
 30 import com.zt.courtoa.base.vo.DeptCdt;
 31 import com.zt.courtoa.common.BaseSysAction;
 32 import com.zt.courtoa.common.GsonUtil;
 33 import com.zt.courtoa.oaintegrate.pojo.BoWenshuCpws;
 34 import com.zt.courtoa.oaintegrate.pojo.BoWenshuCpwsdsr;
 35 import com.zt.courtoa.oaintegrate.pojo.SdSdPer;
 36 import com.ztsp.base.BaseAction;
 37 import com.ztsp.util.DateUtil;
 38 import com.ztsp.util.StringUtil;
 39 import com.zt.courtoa.common.OpenOffiectopdf;
 40 
 41 @SuppressWarnings({ "unchecked", "serial", "rawtypes" })
 42 public class CpwsAction extends BaseAction<BoWenshuCpws> {
 43 
 44     private Logger log = Logger.getLogger(this.getClass());
 45     private BaEmpSvc baEmpSvc;
 46     private BaOrgSvc baOrgSvc;
 47     private BaseSysAction baseSysAction;
 48     private String ztreeNodes1;
 49     
 50     private OaboSvc oaboSvc;
 51     private BoWenshuCpws formvo;
 52     private BoWenshuCpwsdsr cpwsdsr;
 53     private BaUser bauser;
 54     private String type;
 55     private List<BoWenshuCpws> rlist;
 56     private String oid;
 57     private boolean success;
 58     //新加
 59     private String jsonstr;
 60     private String creatCpws;
 61     private Map<String,Object> map1;
 62     private String dsrs;
 63     private String empname;
 64     private String filername;
 65     private String addr;
 66     private String dsrphone;
 67     private String dsrname;
 68     private String sendah;
 69     private String fileurl_pdf;
 70     private String sfileName;
 71     private String toFileName;
 72     private String toFileNames;
 73     private String ah;
 74     private String returnCpwsUpdate;
 75     private String updateCpwsInfo;
 76     private String wsoid;
 77     private String wsid;
 78     private String cpwsdsrInfo;
 79     private String updatecpwsdsrInfo;
 80     @Override
 81     public String execute() { pageInit(); return "list"; }
 82     @Override
 83     public int getResultSize() { return rlist==null?0:rlist.size(); }
 84     @Override
 85     public List<BoWenshuCpws> listResults(String sidx, String sord) {
 86         try {
 87             List<BoWenshuCpws> results = Collections.emptyList();  
 88             rlist = new ArrayList<BoWenshuCpws>(results);
 89             String rstr = oaboSvc.getCpwss(setCdtInit(sidx, sord));
 90             if(!StringUtil.isEmpty(rstr) && !rstr.equals("[]")){
 91                 rlist = GsonUtil.getObjects(rstr, new TypeToken<ArrayList<BoWenshuCpws>>() {}.getType()) ;
 92             }
 93             return rlist;
 94         } catch (Exception e) {
 95             log.error(e.getMessage());
 96             e.printStackTrace();
 97         }
 98         return null;
 99     }
100     private String setCdtInit(String sidx, String sord){
101         String rstr = "";
102         try{
103             getSessionInfo();
104             if("2".equals(type)){
105                 rstr = "{\"wszt\":\"待盖章\"";                    //没盖章,签的名的
106             }else if("3".equals(type)){
107                 rstr = "{\"hytcyid\":\""+bauser.getOid()+"\"";  //自己看自己签名的
108             }else if("8".equals(type)){
109                 rstr = "{\"wszt\":\"‘已盖章‘,‘已打印‘\"";          //查看盖了章的
110             }else{
111                 rstr = "{\"signid\":\""+bauser.getOid()+"\"";   //签名的
112             }
113             if(!StringUtil.isEmpty(ah)){
114                 rstr += ",\"ah\":\""+ah+"\"";
115             }
116             if(!StringUtil.isEmpty(sidx)){
117                 rstr += "\"orderby\":\""+sidx;
118                 if(!StringUtil.isEmpty(sord)){
119                     rstr += " "+sord+"\"";
120                 }
121             }
122             rstr += "}";
123         }
124         catch(Exception e){
125             log.error(e.getMessage());
126             e.printStackTrace();
127         }
128         return rstr;
129     }
130 
131     public String updateState(){
132         try {
133             String sss = oaboSvc.updateCpws(jsonstr);
134             return "success";
135         } catch (Exception e) {
136             log.error(".................................."+e.getMessage()+"......... ........................");
137             e.printStackTrace();
138         }
139         return null;
140     }
141     private void getSessionInfo(){
142         try {
143             ActionContext ac = ActionContext.getContext();
144             Object obj = ac.getSession().get("UINFO");
145             Map map = null;
146             if(obj==null){
147                 log.warn("UINFO Session 数据为空 ........................");
148                 map = new HashMap();
149                 ac.getSession().put("UINFO", map); 
150             }
151             map = (Map)ac.getSession().get("UINFO");
152             bauser = (BaUser) map.get("oauser");
153  
154         } catch (Exception e) {
155             log.error(".................................."+e.getMessage()+"......... ........................");
156             e.printStackTrace();
157         }
158     }
159     /**
160      * 查询页面
161      * @return
162      */
163     public String queryObjList(){
164         return this.refreshGridModel();
165     }
166     private void pageInit(){  }
167 
168     public String savePdf(){
169         try {
170             String webpath = ServletActionContext.getServletContext().getRealPath("");
171             String docfile= fileurl_pdf.substring(fileurl_pdf.lastIndexOf("/")+1);
172             sfileName=webpath+"/upfile/cpws/"+docfile;
173             toFileNames = "/courtoa/upfile/cpws/"+docfile;
174             if(sfileName.indexOf(".doc") != -1){
175                 toFileNames=toFileNames.replace(".docx", ".pdf");
176                 toFileNames=toFileNames.replace(".doc", ".pdf");
177                 toFileName=sfileName.replace(".docx", ".pdf");
178                 toFileName=toFileName.replace(".doc", ".pdf");
179                 System.out.println(sfileName+"==============="+toFileName);
180                 OpenOffiectopdf topdf = new OpenOffiectopdf();
181                 if(topdf.officetopdf(sfileName, toFileName)=="success"){
182                     success = true;
183                 }
184             }
185         } catch (Exception e) {
186             log.error(".................................."+e.getMessage()+"......... ........................");
187             e.printStackTrace();
188         }
189         return "savePDF";
190     }
191     
192     public String goToaddObj(){
193         try{
194             getSessionInfo();
195             if(formvo==null){ formvo = new BoWenshuCpws(); }
196             formvo.setNgrid(bauser.getOid());
197             formvo.setNgr(bauser.getEmpname());
198             formvo.setLarq(DateUtil.date2String(new Date(), "yyyy-MM-dd"));
199             
200             ztreeNodes1 = getDeptREmp(oid);
201         }
202         catch(Exception e){
203             log.error(".................................."+e.getMessage()+"......... ........................");
204             e.printStackTrace();
205         }
206         return "add";
207     }
208 
209     private String getDeptREmp(String ids){
210         ids = (ids==null?"":ids);
211         BaOrg org = baseSysAction.getLocalOrg();
212         StringBuffer sb = new StringBuffer("[{ id:\""+org.getOid()+"\", pId:0, name:\""+org.getOrgName()+" \", open:true, nocheck:true, type:\"root\"}");
213         try { 
214             List<BaDept> deptlist = baOrgSvc.getBaDepts(new DeptCdt());//trunk
215             if(deptlist!=null && deptlist.size()>0){
216                 for(BaDept dept : deptlist){
217                     sb.append(",{ id:\"" + dept.getOid() + "\", pId:\"" + dept.getDeptPid() + "\", name:\"" + dept.getDeptName() + "\", open:false, nocheck:true, checkType:0, type:\"" + dept.getTreetype() + "\"}");//nocheck:true, 
218                 }
219             }
220             List<BaUser> userlist = (List<BaUser>)baEmpSvc.getUsers(new CommonCdt());
221             if(userlist!=null && userlist.size()>0){
222                 for(BaUser u : userlist){
223                     sb.append(",{ id:\"" + u.getOid() + "\", " + ((ids.indexOf(u.getOid())!=-1)?"checked:true,":"") + " pId:\"" + u.getDeptid() + "\", name:\"" + u.getEmpname() + "\", open:false, checkType:1, type:\"leave\"}");
224                 }
225             }
226         } 
227         catch (Exception e) { log.error(e.getMessage()); e.printStackTrace(); }
228 
229         sb.append("]");
230         return sb.toString();
231     }
232 
233     public String sendPrint(){
234         try {
235             Map map = (HashMap) GsonUtil.getObject(jsonstr, HashMap.class);
236             addr = map.get("note").toString();
237             dsrphone = map.get("dsrphone").toString();
238             dsrname = map.get("dsrname").toString();
239             sendah = map.get("ah").toString();
240             
241         } catch (Exception e) {
242             log.error(".................................."+e.getMessage()+"......... ........................");
243             e.printStackTrace();
244         }
245         return "dsrinfo";
246     }
247     
248     /**
249      * 增加裁判文书
250      * @throws Exception 
251      * 新增加
252      */
253     public String addCpwss() throws Exception{
254         try{
255             if(formvo!=null){
256                 creatCpws = oaboSvc.creatCpws(GsonUtil.getJSONString(formvo));
257                 Map map = (HashMap)GsonUtil.getObject(creatCpws, HashMap.class);
258                 success = (Boolean)map.get("success");
259             }
260             promptInfo(success);
261         }
262         catch(Exception e){
263             log.error(".................................."+e.getMessage()+"......... ........................");
264             e.printStackTrace();
265         }
266 //        creatCpws = oaboSvc.creatCpws(jsonstr);
267         return null;
268     }
269 
270 
271 
272     /**
273      * 获取裁判文书内容信息  进行更改
274      * @return
275      */
276     public String updatecpws(){
277         System.out.println("------------------进入裁判文书修改页面-------------------");
278         jsonstr = "{\"oid\":"+oid+"}";
279         try {
280             //获取选中裁判文书
281             returnCpwsUpdate = oaboSvc.getTheCpws(jsonstr);
282 //            System.out.println("returnCpwsUpdate---->"+returnCpwsUpdate);
283             //转换成json对象
284             JSONObject  jasonObject = JSONObject.fromObject(returnCpwsUpdate);
285             //通过裁判文书的json对象获取相应值 oid  name   phone 
286             oid =jasonObject.getString("oid");                                  //主键oid
287             ztreeNodes1 = getDeptREmp(oid);                                        //这个是签名人员树结构数据    以及必填项的*显示
288             
289             String ah=jasonObject.getString("ah");                                //案号
290             String aymc=jasonObject.getString("aymc");                            //案由名称
291             String swh=jasonObject.getString("swh");                            //是否审委会签批
292             String hytcy=jasonObject.getString("hytcy");                        //合议庭成员
293             String hytcyid=jasonObject.getString("hytcyid");                    //合议庭成员ID
294             String sj=jasonObject.getString("sj");                                //审级
295             String ysfy=jasonObject.getString("ysfy");                            //一审法院
296             String esfy=jasonObject.getString("esfy");                            //二审法院
297             String zsfy=jasonObject.getString("zsfy");                            //再审法院
298             String larq=jasonObject.getString("larq");                            //立案日期
299             String ycsxrq=jasonObject.getString("ycsxrq");                        //延长审限日期
300             String ycpzr=jasonObject.getString("ycpzr");                        //批准人
301             Integer dyfs=jasonObject.getInt("dyfs");                            //打印份数
302             String ngrid=jasonObject.getString("ngrid");                        //拟稿人ID
303             String ngr=jasonObject.getString("ngr");                            //拟稿人
304             String wszt=jasonObject.getString("wszt");                            //文书状态 未签名、签名中、未打印、已打印
305             String note=jasonObject.getString("note");                            //备注
306             JSONArray dsrjsonArray = jasonObject.getJSONArray("dsrs");
307             System.out.println("dsrjsonArray---->"+dsrjsonArray);
308             //拼接json
309             jsonstr = "{\"oid\":\""+oid+"\",\"ah\":\""+ah+"\",\"aymc\":\""+aymc+"\",\"swh\":\""+swh+"\",\"hytcy\":\""+hytcy+"\","
310                     + "\"hytcyid\":\""+hytcyid+"\",\"sj\":\""+sj+"\",\"ysfy\":\""+ysfy+"\",\"esfy\":\""+esfy+"\",\"zsfy\":\""+zsfy+"\","
311                     + "\"larq\":\""+larq+"\",\"ycsxrq\":\""+ycsxrq+"\",\"ycpzr\":\""+ycpzr+"\",\"dyfs\":\""+dyfs+"\",\"ngrid\":\""+ngrid+"\","
312                     + "\"ngr\":\""+ngr+"\",\"wszt\":\""+wszt+"\",\"note\":\""+note+"\",\"dsrs\":\""+dsrjsonArray+"\"}";
313             
314             System.out.println("修改前信息:---->"+jsonstr);
315             //创建新的对象  把获取到的值给对象
316             formvo = new BoWenshuCpws();
317             formvo.setOid(oid);
318             formvo.setAh(ah);
319             formvo.setAymc(aymc);
320             formvo.setSwh(swh);
321             formvo.setHytcy(hytcy);
322             formvo.setHytcyid(hytcyid);
323             formvo.setSj(sj);
324             formvo.setYsfy(ysfy);
325             formvo.setEsfy(esfy);
326             formvo.setZsfy(zsfy);
327             formvo.setLarq(larq);
328             formvo.setYcsxrq(ycsxrq);
329             formvo.setYcpzr(ycpzr);
330             formvo.setDyfs(dyfs);
331             formvo.setNgrid(ngrid);
332             formvo.setNgr(ngr);
333             formvo.setWszt(wszt);
334             formvo.setNote(note);
335         
336             /**
337              * 获取当事人信息
338              */
339             jsonstr = "{\"wsid\":\""+oid+"\"}";
340             System.out.println(jsonstr);
341             cpwsdsrInfo=oaboSvc.getCpwsDsrs(jsonstr); 
342             System.out.println("cpwsdsrInfo----->"+cpwsdsrInfo);
343             List<BoWenshuCpwsdsr> dsrlist= GsonUtil.getObjects(cpwsdsrInfo, BoWenshuCpwsdsr.class);
344             HttpServletRequest request=ServletActionContext.getRequest();
345             request.setAttribute("list", dsrlist);
346             
347         } catch (Exception e) {
348             e.printStackTrace();
349         }
350         return "update";
351     }
352     /**
353      * 点击确定修改裁判文书信息
354      * @return
355      * @throws Exception
356      */
357     public String updateCpwsInfo(){
358         System.out.println("------------------确认修改裁判文书-------------------");
359             try{
360                 //通过servelet获取页面的值
361                 HttpServletRequest request=ServletActionContext.getRequest();
362                 String oid=request.getParameter("formvo.oid");                                //主键id
363                 String ah=request.getParameter("formvo.ah");                                //案号
364                 String aymc=request.getParameter("formvo.aymc");                            //案由名称
365                 String swh=request.getParameter("formvo.swh");                                //是否审委会签批
366                 String hytcy=request.getParameter("formvo.hytcy");                            //合议庭成员
367                 String hytcyid=request.getParameter("formvo.hytcyid");                        //合议庭成员ID
368                 String sj=request.getParameter("formvo.sj");                                //审级
369                 String ysfy=request.getParameter("formvo.ysfy");                            //一审法院
370                 String esfy=request.getParameter("formvo.esfy");                            //二审法院
371                 String zsfy=request.getParameter("formvo.zsfy");                            //再审法院
372                 String larq=request.getParameter("formvo.larq");                            //立案日期
373                 String ycsxrq=request.getParameter("formvo.ycsxrq");                        //延长审限日期
374                 String ycpzr=request.getParameter("formvo.ycpzr");                            //批准人
375                 String dyfsstr=request.getParameter("formvo.dyfs");
376                 int dyfs=Integer.parseInt(dyfsstr);                                            //打印份数    调用方法的参数数据类型为int  在此进行数据类型转换 String--->int
377                 String ngrid=request.getParameter("formvo.ngrid");                            //拟稿人ID
378                 String ngr=request.getParameter("formvo.ngr");                                //拟稿人
379                 String note=request.getParameter("formvo.note");                            //备注
380                 
381                 //拼接json    ,\"dyfs\":\""+dyfs+"\"  打印份数拼接到字符串上怎么都不对  Sstring、 double、 int类型都不对
382                 //由于调用方法的参数数据类型为int  在此进行数据类型转换 String--->int  所以正确的json拼接方式为: jsonstr = "{\"dyfs\":"+dyfs+"}";
383                 jsonstr = "{\"oid\":\""+oid+"\",\"ah\":\""+ah+"\",\"aymc\":\""+aymc+"\",\"swh\":\""+swh+"\",\"hytcy\":\""+hytcy+"\","
384                         + "\"hytcyid\":\""+hytcyid+"\",\"sj\":\""+sj+"\",\"ysfy\":\""+ysfy+"\",\"esfy\":\""+esfy+"\",\"zsfy\":\""+zsfy+"\","
385                         + "\"larq\":\""+larq+"\",\"ycsxrq\":\""+ycsxrq+"\",\"ycpzr\":\""+ycpzr+"\",\"ngrid\":\""+ngrid+"\","
386                         + "\"ngr\":\""+ngr+"\",\"note\":\""+note+"\",\"dyfs\":"+dyfs+"}";
387                 
388                 System.out.println("修改后信息:---->"+jsonstr);
389                 //此方法可以修改除了当事人信息之外的的所有信息
390                 updateCpwsInfo = oaboSvc.updateCpws(jsonstr);                                
391                 System.out.println("修改后信息:updateCpwsInfo---->"+updateCpwsInfo);
392                 Map map = (HashMap)GsonUtil.getObject(updateCpwsInfo, HashMap.class);
393                 //打印操作结果
394                 System.out.println(map);
395                 success = (Boolean)map.get("success");
396                 promptInfo(success);
397                 
398                 
399 //                修改当事人信息
400                 String listsize=request.getParameter("listsize");
401                 int size=Integer.parseInt(listsize);
402                 System.out.println("size---->"+size);
403                 for(int i=0;i<size;i++){
404                     oid=request.getParameter("formvo.dsrs["+i+"].oid");    
405                     System.out.println("oid---->"+oid);
406                     String dsrname=request.getParameter("formvo.dsrs["+i+"].dsrname");    
407                     System.out.println("dsrname----->"+dsrname);
408                     String dsrphone=request.getParameter("formvo.dsrs["+i+"].dsrphone");        
409                     String dsrnote=request.getParameter("formvo.dsrs["+i+"].dsrnote");        
410                     String dsrsend=request.getParameter("formvo.dsrs["+i+"].dsrsend");        
411                     //拼接json
412                     jsonstr = "{\"oid\":\""+oid+"\",\"dsrname\":\""+dsrname+"\",\"dsrphone\":\""+dsrphone+"\","
413                             + "\"dsrnote\":\""+dsrnote+"\",\"dsrsend\":\""+dsrsend+"\"}";
414                     //调用方法
415                     updatecpwsdsrInfo = oaboSvc.updateCpwsDsr(jsonstr);
416                     System.out.println("updatecpwsdsrInfo---->"+updatecpwsdsrInfo);
417                     Map dsrmap = (HashMap)GsonUtil.getObject(updateCpwsInfo, HashMap.class);
418                     //打印操作结果
419                     System.out.println(dsrmap);
420                     success = (Boolean)dsrmap.get("success");
421                     promptInfo(success);
422                 }
423                 
424             }
425             catch(Exception e){
426                 log.error(".................................."+e.getMessage()+"......... ........................");
427                 e.printStackTrace();
428             }
429             return null;
430         }
431 
432     
433     public String upcpws(){
434           try {
435             oaboSvc.updateCpws(GsonUtil.getJSONString(formvo));
436         } catch (Exception e) {
437             e.printStackTrace();
438         }
439           
440           return null;
441     }
442     public String addSendCode() throws Exception{
443         try{
444             String result = oaboSvc.updateCpwsDsr(jsonstr);
445             Map map = (HashMap) GsonUtil.getObject(result, HashMap.class);
446             success = (Boolean)map.get("success");
447             return "sendSuccess";
448         }
449         catch(Exception e){
450             log.error(".................................."+e.getMessage()+"......... ........................");
451             e.printStackTrace();
452         }
453         return null;
454     }
455     
456     public String deleteObj(){
457         try {
458             if(!StringUtil.isEmpty(oid)){
459                 creatCpws = oaboSvc.removeCpws("{\"oid\":\""+oid+"\"}");
460                 Map map = (HashMap)GsonUtil.getObject(creatCpws, HashMap.class);
461                 success = (Boolean)map.get("success");
462             }
463             
464             promptInfo(success);
465         } catch (Exception e) {
466             log.error(e.getMessage());
467             e.printStackTrace();
468         }
469         return null;
470     }
471     
472     public String signatureObj(){
473         try {
474             if(!StringUtil.isEmpty(oid)){
475                 formvo = (BoWenshuCpws)GsonUtil.getObject(oaboSvc.getTheCpws("{\"oid\":\""+oid+"\"}"), BoWenshuCpws.class);
476             }
477         } catch (Exception e) {
478             log.error(e.getMessage());
479             e.printStackTrace();
480         }
481         return "gaizhang";
482     }
483     
484     public String queryWs(){
485         String rstr = "";
486         try{
487             getSessionInfo();
488             rstr = "{\"oid\":\""+oid+"\"";
489             rstr += "}";
490             String theCpws = oaboSvc.getTheCpws(rstr);
491             formvo = new BoWenshuCpws();
492             formvo  = (BoWenshuCpws )GsonUtil.getObject(theCpws, BoWenshuCpws .class);
493 //            ActionContext context = ActionContext.getContext();
494 //            context.put("formvo", formvo);
495             System.out.println("裁判文书formvo"+formvo);
496         }catch (Exception e) {
497             log.error(".................................."+e.getMessage()+"......... ........................");
498             e.printStackTrace();
499             
500         } 
501         if(formvo.getSwh().equals("否")){
502             return "queryWs1";
503         }else if(formvo.getSwh().equals("是")){
504             return "queryWs";
505         }
506         return null;
507     }
508     
509     public String queryWsDyfs(){
510         System.out.println("==================================fangfa ");
511         String rstr = "";
512         try{
513             getSessionInfo();
514             rstr = "{\"oid\":\""+oid+"\"";
515             rstr += "}";
516             String theCpws = oaboSvc.getTheCpws(rstr);
517             formvo = new BoWenshuCpws();
518             formvo  = (BoWenshuCpws )GsonUtil.getObject(theCpws, BoWenshuCpws .class);
519 //            ActionContext context = ActionContext.getContext();
520 //            context.put("formvo", formvo);
521             System.out.println("裁判文书formvo"+formvo);
522         }catch (Exception e) {
523             log.error(".................................."+e.getMessage()+"......... ........................");
524             e.printStackTrace();
525             
526         } 
527         
528         return "gqdyfs";
529         
530     }
531     public BoWenshuCpws getFormvo() {
532         return formvo;
533     }
534 
535     public void setFormvo(BoWenshuCpws formvo) {
536         this.formvo = formvo;
537     }
538 
539     public List<BoWenshuCpws> getRlist() {
540         return rlist;
541     }
542 
543     public void setRlist(List<BoWenshuCpws> rlist) {
544         this.rlist = rlist;
545     }
546 
547     public OaboSvc getOaboSvc() {
548         return oaboSvc;
549     }
550 
551     public void setOaboSvc(OaboSvc oaboSvc) {
552         this.oaboSvc = oaboSvc;
553     }
554 
555     public BaUser getBauser() {
556         return bauser;
557     }
558     public void setBauser(BaUser bauser) {
559         this.bauser = bauser;
560     }
561     public String getOid() {
562         return oid;
563     }
564     public void setOid(String oid) {
565         this.oid = oid;
566     }
567     public boolean isSuccess() {
568         return success;
569     }
570     public void setSuccess(boolean success) {
571         this.success = success;
572     }
573 //新增
574     public String getJsonstr() {
575         return jsonstr;
576     }
577     public void setJsonstr(String jsonstr) {
578         this.jsonstr = jsonstr;
579     }
580     public String getCreatCpws() {
581         return creatCpws;
582     }
583     public void setCreatCpws(String creatCpws) {
584         this.creatCpws = creatCpws;
585     }
586     public Map<String, Object> getMap1() {
587         return map1;
588     }
589     public void setMap1(Map<String, Object> map1) {
590         this.map1 = map1;
591     }
592     public BaEmpSvc getBaEmpSvc() {
593         return baEmpSvc;
594     }
595     public void setBaEmpSvc(BaEmpSvc baEmpSvc) {
596         this.baEmpSvc = baEmpSvc;
597     }
598     public BaOrgSvc getBaOrgSvc() {
599         return baOrgSvc;
600     }
601     public void setBaOrgSvc(BaOrgSvc baOrgSvc) {
602         this.baOrgSvc = baOrgSvc;
603     }
604     public BaseSysAction getBaseSysAction() {
605         return baseSysAction;
606     }
607     public void setBaseSysAction(BaseSysAction baseSysAction) {
608         this.baseSysAction = baseSysAction;
609     }
610     public String getZtreeNodes1() {
611         return ztreeNodes1;
612     }
613     public void setZtreeNodes1(String ztreeNodes1) {
614         this.ztreeNodes1 = ztreeNodes1;
615     }
616     public String getDsrs() {
617         return dsrs;
618     }
619     public void setDsrs(String dsrs) {
620         this.dsrs = dsrs;
621     }
622     public String getFilername() {
623         return filername;
624     }
625     public void setFilername(String filername) {
626         this.filername = filername;
627     }
628     public String getEmpname() {
629         return empname;
630     }
631     public void setEmpname(String empname) {
632         this.empname = empname;
633     }
634     public String getAddr() {
635         return addr;
636     }
637     public void setAddr(String addr) {
638         this.addr = addr;
639     }
640     public String getDsrphone() {
641         return dsrphone;
642     }
643     public void setDsrphone(String dsrphone) {
644         this.dsrphone = dsrphone;
645     }
646     public String getDsrname() {
647         return dsrname;
648     }
649     public void setDsrname(String dsrname) {
650         this.dsrname = dsrname;
651     }
652     public String getSendah() {
653         return sendah;
654     }
655     public void setSendah(String sendah) {
656         this.sendah = sendah;
657     }
658     public String getFileurl_pdf() {
659         return fileurl_pdf;
660     }
661     public void setFileurl_pdf(String fileurl_pdf) {
662         this.fileurl_pdf = fileurl_pdf;
663     }
664     public String getToFileNames() {
665         return toFileNames;
666     }
667     public void setToFileNames(String toFileNames) {
668         this.toFileNames = toFileNames;
669     }
670     public String getType() {
671         return type;
672     }
673     public void setType(String type) {
674         this.type = type;
675     }
676     public Logger getLog() {
677         return log;
678     }
679     public void setLog(Logger log) {
680         this.log = log;
681     }
682     public BoWenshuCpwsdsr getCpwsdsr() {
683         return cpwsdsr;
684     }
685     public void setCpwsdsr(BoWenshuCpwsdsr cpwsdsr) {
686         this.cpwsdsr = cpwsdsr;
687     }
688     public String getSfileName() {
689         return sfileName;
690     }
691     public void setSfileName(String sfileName) {
692         this.sfileName = sfileName;
693     }
694     public String getToFileName() {
695         return toFileName;
696     }
697     public void setToFileName(String toFileName) {
698         this.toFileName = toFileName;
699     }
700     public String getAh() {
701         return ah;
702     }
703     public void setAh(String ah) {
704         this.ah = ah;
705     }
706     public String getUpdateCpwsInfo() {
707         return updateCpwsInfo;
708     }
709     public void setUpdateCpwsInfo(String updateCpwsInfo) {
710         this.updateCpwsInfo = updateCpwsInfo;
711     }
712     public String getReturnCpwsUpdate() {
713         return returnCpwsUpdate;
714     }
715     public void setReturnCpwsUpdate(String returnCpwsUpdate) {
716         this.returnCpwsUpdate = returnCpwsUpdate;
717     }
718     public String getWsoid() {
719         return wsoid;
720     }
721     public void setWsoid(String wsoid) {
722         this.wsoid = wsoid;
723     }
724     public String getWsid() {
725         return wsid;
726     }
727     public void setWsid(String wsid) {
728         this.wsid = wsid;
729     }
730     public String getCpwsdsrInfo() {
731         return cpwsdsrInfo;
732     }
733     public void setCpwsdsrInfo(String cpwsdsrInfo) {
734         this.cpwsdsrInfo = cpwsdsrInfo;
735     }
736     public String getUpdatecpwsdsrInfo() {
737         return updatecpwsdsrInfo;
738     }
739     public void setUpdatecpwsdsrInfo(String updatecpwsdsrInfo) {
740         this.updatecpwsdsrInfo = updatecpwsdsrInfo;
741     }
742     
743     
744     
745 }
CpwsAction.java

 

技术分享图片
  1 //新增裁判文书
  2 var openDialog4Adding = function() {
  3     $ztAeroWindow = new ztAeroWindow("addDialog","add",addUrl,($(window).height()-100),($(window).width()-100),"新增裁判文书","center","center");
  4     ztAeroWindowOpen($ztAeroWindow);
  5 };
  6 //更改裁判文书
  7 var openDialog4Updating = function(){
  8     var selectedRowId = loadSelectedRowData(‘gridTable‘);
  9     if(selectedRowId!=""){
 10         upoid = jQuery(‘#gridTable‘).jqGrid(‘getCell‘,selectedRowId,‘oid‘);
 11         $ztAeroWindow = new ztAeroWindow("updateDialog","update",updateUrl+"?oid="+upoid,($(window).height()-100),($(window).width()-100),"修改人员信息","center","center");
 12         ztAeroWindowOpen($ztAeroWindow);
 13     }
 14 }
 15 //删除裁判文书
 16 var openDialog4Deling = function(){
 17     var selectedRowId = loadSelectedRowData(‘gridTable‘);
 18     if(selectedRowId!=""){
 19         if(zt_confirm("确定要删除吗?")){
 20             upoid = jQuery(‘#gridTable‘).jqGrid(‘getCell‘,selectedRowId,‘oid‘);
 21             ajaxToAction(deleteUrl,{oid:upoid});
 22         } 
 23     }
 24 }
 25 //查看
 26 var openDialog4Viewing = function(){
 27     var selectedRowId = loadSelectedRowData(‘gridTable‘);
 28     if(selectedRowId!=""){
 29     upoid = jQuery(‘#gridTable‘).jqGrid(‘getCell‘,selectedRowId,‘oid‘);
 30         $.ajax( {
 31             type: "post",
 32             url : getFileNameUrl, 
 33             dataType : "json",
 34             data: {oid:upoid},
 35             success : function(data) {
 36                 var filername = data.filername;
 37                 var empname = data.empname;
 38                 var sizer = window.open("","","width="+$(window).width()+",height="+$(window).height()+",left=0,top=0,toolbar=no,menubar=no,location=no,scrollbars=no,status=no,resizable=yes");
 39                 sizer.location = viewUrl+"?oid="+upoid+"&filername="+filername+"&empname="+empname;
 40             },
 41             error: function(e) {
 42                  alert(e);
 43               }
 44         });
 45     }
 46 }
 47 
 48 //送达
 49 var openDialogSend = function(){
 50     var selectedRowId = loadSelectedRowData(‘gridTable‘);
 51     if(selectedRowId!=""){
 52     upoid = jQuery(‘#gridTable‘).jqGrid(‘getCell‘,selectedRowId,‘oid‘);
 53     $.ajax( {
 54         type: "post",
 55         url : getFileNameUrl, 
 56         dataType : "json",
 57         data: {oid:upoid},
 58         success : function(data) {
 59             var filername = data.filername;
 60             var empname = data.empname;
 61             var sizer = window.open("","","width="+$(window).width()+",height="+$(window).height()+",left=0,top=0,toolbar=no,menubar=no,location=no,scrollbars=no,status=no,resizable=yes");
 62             sizer.location = sendUrl+"?oid="+upoid+"&filername="+filername;
 63         },
 64         error: function(e) {
 65              alert(e);
 66           }
 67     });
 68     }
 69 }
 70 
 71 var colModel = 
 72 [
 73     {name:"oid",index:"oid",label:"OID",hidden:true}//
 74     ,{name:"ah",index:"ah",label:"案号",width:"12%",sortable:true,align:"center"}
 75     ,{name:"aymc",index:"aymc",label:"案由名称",width:"15%",sortable:true,align:"center"}
 76     ,{name:"larq",index:"larq",label:"立案日期",width:"6%",sortable:true,align:"center"}
 77     ,{name:"hytcy",index:"hytcy",label:"签名人员",width:"15%",sortable:true,align:"center"}
 78     ,{name:"dyfs",index:"dyfs",label:"打印份数",width:"5%",sortable:true,align:"center"}
 79     ,{name:"sj",index:"sj",label:"审级",width:"5%",sortable:true,align:"center"}
 80     ,{name:"ysfy",index:"ysfy",label:"一审法院",width:"12%",sortable:true,align:"center"}
 81     ,{name:"esfy",index:"esfy",label:"二审法院",width:"12%",sortable:true,align:"center"}
 82 //    ,{name:"zsfy",index:"zsfy",label:"再审法院",width:"10%",sortable:true,align:"center"}
 83     ,{name:"wszt",index:"wszt",label:"文书状态",width:"6%",sortable:true,align:"center"}
 84 ];
 85 //options.rowId  options.colModel.name
 86 function currencyFmatter (cellvalue, options, rowObject){if(cellvalue!=null){return cellvalue.substring(0,10);} return ""; }
 87 
 88 var navGridPrm = {edit:false,add:false,del:false,search:false,refreshtext:"刷新"};
 89 $(function(){
 90     var lastSel;
 91     //url,width,height,colModel列表,prmNames参数,caption标题,navGridPrm下方按钮,multiselect多选框,tableID,pagerID,rowNum,buttonInfo
 92     $ztJQGrid = new ztJQGrid(queryUrl,"","",colModel,"","裁判文书列表",navGridPrm,false,"","","","新增;删除;修改","","");
 93     jqGridInit($ztJQGrid);
 94     addPagerButtonAll($ztJQGrid);
 95 });
 96 
 97 /*
 98  * 2017-11-29 下午  添加部分注释
 99  * 2017-11-29 下午  添加 修改
100  */
cpwslist.js

 

技术分享图片
 1 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 2 <%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4  
 5 <html xmlns="http://www.w3.org/1999/xhtml">
 6 
 7 <jsp:include page="/common/includefile.jsp"></jsp:include>
 8 <%@ taglib uri="/struts-tags" prefix="s"%>
 9 
10 <body>
11     
12     <form name="form1" id="form1"> 
13     <div id="queryContainer" >
14 <%--        list="#{‘‘:‘‘,‘‘:‘‘}"--%>
15         <table class="zt__querytable">
16             <tr>
17                 <td align="right"><span class="locationtitle">裁判文书管理</span>
18                 案号<input type="text" style="width: 200px" id="ah" name="ah" />
19                 <a href="#" tableID="gridTable" name="form1" id="jqqbutton" verify="true" showResultMsg="true" showTipFrameName="" 
20         path="">查询</a>&nbsp;&nbsp;&nbsp;&nbsp;
21                 </td>
22             </tr>
23         </table>
24     </div>
25     </form>
26     <center>
27     <table id="gridTable"></table>  
28     <div id="gridPager"></div>
29     </center>    
30     <div id="_addDialogDiv_" style="display: none;">
31       <iframe src="" width="100%" height="100%" style="border: 0px;" frameborder="0" id="_addDialogFrame_"></iframe>
32       <div id="iframeHelperAdd"></div>
33     </div>
34     
35     <div id="_updateDialogDiv_" style="display: none;">
36       <iframe src="" width="100%" height="100%" style="border: 0px;" frameborder="0" id="_updateDialogFrame_"></iframe>
37       <div id="iframeHelperUpdate"></div>
38     </div>
39     
40     <div id="_viewDialogDiv_" style="display: none;">
41       <iframe src="" width="100%" height="100%" style="border: 0px;" frameborder="0" id="_viewDialogFrame_"></iframe>
42       <div id="iframeHelperView"></div>
43     </div>
44     
45 </body>
46 </html>
47 <script type="text/javascript">
48 
49     $("#jqqbutton").click(function(){
50         var ah = $("#ah").val();
51         if(ah!=""){
52             $("#jqqbutton").attr("path",queryUrl+"?ah="+ah);
53         }else{
54                $("#jqqbutton").attr("path",queryUrl);
55         }
56     });
57     function parantTrigger(){$(‘#gridTable‘).trigger("reloadGrid");}
58     
59     var queryUrl = "${appPath}" + "/gwgl/cpws_queryObjList.zt";
60     var addUrl = "${appPath}" + "/gwgl/cpws_goToaddObj.zt";
61     var updateUrl = "${appPath}" + "/gwgl/cpws_updatecpws.zt";
62     var deleteUrl = "${appPath}" + "/gwgl/cpws_deleteObj.zt";
63     var viewUrl = "${appPath}" + "/gwgl/cpws_queryWs.zt";
64     var getFileNameUrl = "${appPath}" + "/gwgl/cpwssign_getFileName.zt";
65     var sendUrl = "${appPath}" + "/gwgl/cpws_sendCpwsView.zt";
66 </script>
67 
68 <script type="text/javascript" src="${appPath}/jspjs/gwgl/cpws/cpwslist.js"></script>
cpwslist.jsp

 

技术分享图片
  1 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
  2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
  3 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
  4 <%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
  5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  6  
  7 <html xmlns="http://www.w3.org/1999/xhtml">
  8 
  9 <jsp:include page="/common/includefile.jsp"></jsp:include>
 10 
 11 <link rel="stylesheet" href="${appPath}/viewplugin/jquery/plugin/jquery-zTreev3.3/css/zTreeStyle/zTreeStyle.css" type="text/css">
 12 <script type="text/javascript" src="${appPath}/viewplugin/jquery/plugin/jquery-zTreev3.3/js/jquery.ztree.core-3.3.min.js"> </script>
 13 <script type="text/javascript" src="${appPath}/viewplugin/jquery/plugin/jquery-zTreev3.3/js/jquery.ztree.excheck-3.3.min.js"> </script>
 14 <script type="text/javascript" src="${appPath}/viewplugin/jquery/plugin/jquery-zTreev3.3/js/jquery.ztree.exedit-3.3.min.js"> </script>
 15 <script language="javascript" type="text/javascript" src="/courtoa/viewplugin/My97DatePicker/WdatePicker.js"></script>
 16 <script type="text/javascript" src="${appPath}/viewplugin/jquery/plugin/uploadify/jquery.uploadify.js"></script>
 17 <link rel="stylesheet" type="text/css" href="${appPath}/viewplugin/jquery/plugin/uploadify/uploadify.css">
 18 <%@ taglib uri="/struts-tags" prefix="s"%>
 19 <style type="text/css">
 20 ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
 21 
 22 </style>
 23 
 24 
 25    <body onload="adddsrli()">
 26     <div id="dialogContainer">
 27     <form name="form1" id="form1">
 28         <s:hidden name="formvo.oid" id="oid"></s:hidden> 
 29         <s:hidden name="formvo.hytcy" id="hytcy"></s:hidden> 
 30         <s:hidden name="formvo.hytcyid" id="hytcyid"></s:hidden> 
 31         <s:hidden name="formvo.ngrid" id="ngrid"></s:hidden>
 32         <s:hidden name="formvo.ngr" id="ngr"></s:hidden> 
 33            <input id="tempfliename1" name="tempfliename1" type="hidden"  />
 34         <s:hidden name="formvo.filename" id="filename"></s:hidden>
 35         <s:hidden name="formvo.filername" id="filername"></s:hidden>
 36     
 37     <table class="zt__listtable">    
 38         <tr>
 39             <td width="8%" align="right">案号:&nbsp;</td>
 40             <td width="24%" > 
 41                 <input name="formvo.ah" id="ah" theme="rkspsimple" cssStyle="width:90%" value="${formvo.ah}"/> 
 42             </td>
 43             <td width="8%" align="right">案由和名称:&nbsp;</td>
 44             <td width="30%" > <input name="formvo.aymc" id="aymc" theme="rkspsimple" cssStyle="width:90%" value="${formvo.aymc}"/> </td>
 45             <td width="10%" align="right">审委会签名:&nbsp;</td>
 46             <td width="20%" > 
 47                 <input name="formvo.swh" type="radio"  value="是">&nbsp; <input name="formvo.swh" checked="checked" type="radio"  value="否"> 48             </td>
 49         </tr>    
 50         
 51         <tr>
 52             <td align="right">选择签名人员:&nbsp;</td>
 53             <td colspan="2"><s:textfield name="mans" id="mans" theme="rkspsimple" cssStyle="width:90%" onclick="showMenu1();" readonly="true"/></td>
 54         </tr>            
 55         
 56         <tr>
 57             <td colspan="2">                
 58                 <ul class="szqmr">
 59                 </ul>
 60             </td>
 61                <td colspan="4" >                
 62                 <input type="hidden" name="listsize" id="listsize" value="${fn:length(list)}"/>
 63                 <ul class="dsrbox" id="dsrbox">
 64                     <%-- 
 65                     <li>
 66                         <input type="hidden" name="formvo.dsrs[0].oid" id="formvo.dsrs[0].oid" value="${list[0].oid}"/>
 67                         <span>当事人</span> <input name="formvo.dsrs[0].dsrname"type="text" size="25" value="${list[0].dsrname}"/>                        
 68                         <span>联系方式 </span><input name="formvo.dsrs[0].dsrphone" type="text"size="20"   maxlength="11" value="${list[0].dsrphone}"/>
 69                         <span>送达 </span><input name="formvo.dsrs[0].dsrsend" type="radio" checked="checked" value="1">&nbsp; 
 70                         <input name="formvo.dsrs[0].dsrsend"  type="radio"  value="2"><br/>
 71                         <span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="formvo.dsrs[0].dsrnote" type="text"size="80" value="${list[0].dsrnote}"/> 
 72                     </li>
 73                     <li>
 74                         <input type="hidden" name="formvo.dsrs[1].oid" id="formvo.dsrs[1].oid" value="${list[1].oid}"/>
 75                         <span>当事人</span> <input name="formvo.dsrs[1].dsrname"type="text" size="25" value="${list[1].dsrname}"/>                        
 76                         <span>联系方式 </span><input name="formvo.dsrs[1].dsrphone" type="text"size="20"   maxlength="11" value="${list[1].dsrphone}"/>
 77                         <span>送达 </span><input name="formvo.dsrs[1].dsrsend" type="radio" checked="checked" value="1">&nbsp; 
 78                         <input name="formvo.dsrs[1].dsrsend"  type="radio"  value="2"><br/>
 79                         <span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="formvo.dsrs[1].dsrnote" type="text"size="80" value="${list[1].dsrnote}"/> 
 80                     </li>
 81                      --%>
 82                 </ul>
 83             </td>
 84 
 85         </tr>
 86         
 87         <tr>
 88             <td align="right">打印份数:&nbsp;</td>
 89             <td><input name="formvo.dyfs" id="dyfs" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.dyfs}"/></td>
 90             <td align="right">拟稿人:&nbsp;</td>
 91             <td>${formvo.ngr}</td>
 92             <td align="right">立案日期:&nbsp;</td>
 93             <td><input name="formvo.larq" id="larq" class="Wdate" onClick="WdatePicker({dateFmt:‘yyyy-MM-dd‘})" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.larq}"/></td>
 94         </tr>
 95         
 96         <tr>
 97             <td align="right">审级:&nbsp;</td>
 98             <td><input name="formvo.sj" id="sj" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.sj}"/></td>
 99             <td align="right">延期批准人:&nbsp;</td>
100             <td><input name="formvo.ycpzr" id="ycpzr" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.ycpzr}"/></td>
101             <td align="right">延长期限至:&nbsp;</td>
102             <td><input name="formvo.ycsxrq" id="ycsxrq" class="Wdate" onClick="WdatePicker({dateFmt:‘yyyy-MM-dd‘})" theme="rkspsimple" cssStyle="width:90%" value="${formvo.ycsxrq}"/></td>
103         </tr>
104         
105         <tr>
106             <td align="right">一审法院:&nbsp;</td>
107             <td><input name="formvo.ysfy" id="ysfy" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.ysfy}"/></td>
108             <td align="right">二审法院:&nbsp;</td>
109             <td><input name="formvo.esfy" id="esfy" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.esfy}"/></td>
110             <td align="right">再审法院:&nbsp;</td>
111             <td><input name="formvo.zsfy" id="zsfy" theme="rkspsimple" cssStyle="width:90%"  value="${formvo.zsfy}"/></td>
112         </tr>
113         <tr>
114             <td colspan="5" id="nfileinfo" align="left" valign="top"></td>
115         </tr>
116         <tr>
117             <td align="right">备注:&nbsp;</td>
118             <td colspan="5" ><input style="width: 960px;height:70px;" name="formvo.note" cssStyle="width:90%" rows="3" theme="rkspsimple" value="${formvo.note}"/></td>
119         </tr>
120         
121     </table>    
122     
123     <div id="menuContent1" class="menuContent" style="display:none; position: absolute;">
124         <ul id="treeDemo1" class="ztree" style="margin-top:0; width:300px; height: 250px;"></ul>
125         <!-- 传递承办法官 -->
126        <!--  <input type="hidden" name="oid" id="oid1" value=""/> -->
127     </div>
128     
129     <div id="buttonDIV" align="right" >
130         <a href="#" name="form1sub" id="subbutton" verify="true" showResultMsg="true" showTipFrameName="" 
131         path="${appPath}/gwgl/cpws_updateCpwsInfo.zt" callfunction="beforeAdd(),,,closeDialog()">确 认</a>&nbsp;&nbsp;
132         <a href="#" name="cancel" id="cancelbutton">放 弃</a>
133     </div>
134     </form>
135     
136   </body>
137   
138   
139 </html>
140 
141 <script type="text/javascript">
142 var appPath = "${appPath}";
143 var ztreeNodes1 = ${ztreeNodes1};
144 
145 function beforeAdd(){
146 }
147 
148 function closeDialog(){
149     window.parent.parantTrigger();
150     zt__closeDialog();
151 }
152 
153 $(function() {
154     //表单验证
155     $("#form1").validate( {
156         rules : {
157             ‘formvo.ah‘        : { required : true , byteRangeLength1:[32]}
158             ,‘formvo.aymc‘    : { required : true , byteRangeLength1:[128]}
159             ,‘mans‘    : { required : true }
160             ,‘formvo.dyfs‘    : { required : true, digits:true }
161         }
162     });
163     $("#dsrbutton").click(function(){
164         var ulhtml = "<li><span>当事人</span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrname‘ size=‘25‘/>" +                
165                  " <span>联系方式 </span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrphone‘size=‘20‘ maxlength=‘11‘/>" +
166                  " <span>地址</span> <input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].note‘ size=‘45‘/>"+
167                  " <span>送达 </span><input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
168                  "<input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
169                  "<br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs["+($("ul.dsrbox li").length)+"].dsrnote‘ size=‘80‘/>" +
170                  " <a href=‘javascript:void(0)‘>删除当事人</a>"+
171                  "</li>";
172     $("ul.dsrbox").append(ulhtml);
173     $("ul.dsrbox a").click(function(){
174         $(this).parent().remove();
175     });
176     });
177     $("ul.dsrbox a").click(function(){
178         $(this).parent().remove();
179     });
180 });
181 
182 </script>
183 
184 <!-- 动态添加li -->
185 <script type="text/javascript">
186     function adddsrli(){
187         var len = ${fn:length(list)};  
188         for(var i=0;i<len;i++){ 
189             if(i==0){
190                 var ulhtml = "<li>"+
191                  " <input type=‘hidden‘ name=‘formvo.dsrs[0].oid‘ id=‘formvo.dsrs[0].oid‘ value=‘${list[0].oid}‘/>"+
192                  " <span>当事人</span><input name=‘formvo.dsrs[0].dsrname‘ size=‘25‘ value=‘${list[0].dsrname}‘/>" +                
193                  " <span>联系方式 </span><input name=‘formvo.dsrs[0].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[0].dsrphone}‘/>" +
194                  " <span>送达 </span><input name=‘formvo.dsrs[0].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
195                  " <input name=‘formvo.dsrs[0].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
196                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[0].dsrnote‘ size=‘80‘ value=‘${list[0].dsrnote}‘/>" +
197                  " </li>";
198                 $("ul.dsrbox").append(ulhtml);
199             }else if(i==1){
200                 var ulhtml = "<li>"+
201                  " <input type=‘hidden‘ name=‘formvo.dsrs[1].oid‘ id=‘formvo.dsrs[1].oid‘ value=‘${list[1].oid}‘/>"+
202                  " <span>当事人</span><input name=‘formvo.dsrs[1].dsrname‘ size=‘25‘ value=‘${list[1].dsrname}‘/>" +                
203                  " <span>联系方式 </span><input name=‘formvo.dsrs[1].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[1].dsrphone}‘/>" +
204                  " <span>送达 </span><input name=‘formvo.dsrs[1].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
205                  " <input name=‘formvo.dsrs[1].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
206                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[1].dsrnote‘ size=‘80‘ value=‘${list[1].dsrnote}‘/>" +
207                  " </li>";
208                 $("ul.dsrbox").append(ulhtml);
209             }
210             else if(i==2){
211                 var ulhtml = "<li>"+
212                  " <input type=‘hidden‘ name=‘formvo.dsrs[2].oid‘ id=‘formvo.dsrs[2].oid‘ value=‘${list[2].oid}‘/>"+
213                  " <span>当事人</span><input name=‘formvo.dsrs[2].dsrname‘ size=‘25‘ value=‘${list[2].dsrname}‘/>" +                
214                  " <span>联系方式 </span><input name=‘formvo.dsrs[2].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[2].dsrphone}‘/>" +
215                  " <span>送达 </span><input name=‘formvo.dsrs[2].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
216                  " <input name=‘formvo.dsrs[2].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
217                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[2].dsrnote‘ size=‘80‘ value=‘${list[2].dsrnote}‘/>" +
218                  " </li>";
219                 $("ul.dsrbox").append(ulhtml);
220             }else if(i==3){
221                 var ulhtml = "<li>"+
222                  " <input type=‘hidden‘ name=‘formvo.dsrs[3].oid‘ id=‘formvo.dsrs[3].oid‘ value=‘${list[3].oid}‘/>"+
223                  " <span>当事人</span><input name=‘formvo.dsrs[3].dsrname‘ size=‘25‘ value=‘${list[3].dsrname}‘/>" +                
224                  " <span>联系方式 </span><input name=‘formvo.dsrs[3].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[3].dsrphone}‘/>" +
225                  " <span>送达 </span><input name=‘formvo.dsrs[3].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
226                  " <input name=‘formvo.dsrs[3].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
227                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[3].dsrnote‘ size=‘80‘ value=‘${list[3].dsrnote}‘/>" +
228                  " </li>";
229                 $("ul.dsrbox").append(ulhtml);
230             }else if(i==4){
231                 var ulhtml = "<li>"+
232                  " <input type=‘hidden‘ name=‘formvo.dsrs[4].oid‘ id=‘formvo.dsrs[4].oid‘ value=‘${list[4].oid}‘/>"+
233                  " <span>当事人</span><input name=‘formvo.dsrs[4].dsrname‘ size=‘25‘ value=‘${list[4].dsrname}‘/>" +                
234                  " <span>联系方式 </span><input name=‘formvo.dsrs[4].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[4].dsrphone}‘/>" +
235                  " <span>送达 </span><input name=‘formvo.dsrs[4].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
236                  " <input name=‘formvo.dsrs[4].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
237                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[4].dsrnote‘ size=‘80‘ value=‘${list[4].dsrnote}‘/>" +
238                  " </li>";
239                 $("ul.dsrbox").append(ulhtml);
240             }else if(i==5){
241                 var ulhtml = "<li>"+
242                  " <input type=‘hidden‘ name=‘formvo.dsrs[5].oid‘ id=‘formvo.dsrs[5].oid‘ value=‘${list[5].oid}‘/>"+
243                  " <span>当事人</span><input name=‘formvo.dsrs[5].dsrname‘ size=‘25‘ value=‘${list[5].dsrname}‘/>" +                
244                  " <span>联系方式 </span><input name=‘formvo.dsrs[5].dsrphone‘size=‘20‘ maxlength=‘11‘ value=‘${list[5].dsrphone}‘/>" +
245                  " <span>送达 </span><input name=‘formvo.dsrs[5].dsrsend‘ type=‘radio‘ checked=‘checked‘ value=‘1‘>&nbsp; " +
246                  " <input name=‘formvo.dsrs[5].dsrsend‘ type=‘radio‘  value=‘2‘>否"+
247                  " <br/><span>说明</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name=‘formvo.dsrs[5].dsrnote‘ size=‘80‘ value=‘${list[5].dsrnote}‘/>" +
248                  " </li>";
249                 $("ul.dsrbox").append(ulhtml);
250             }
251         } 
252     }
253 </script>
254 
255   <script type="text/javascript" src="${appPath}/jspjs/gwgl/cpws/updatecpwsupfile.js"></script>
256   <script type="text/javascript" src="${appPath}/jspjs/gwgl/cpws/updatecpws.js"></script>
257   
cpwsupdate.jsp

 

2017-12-13   12:02:03

个人记录  仅供参考

关于页面EL表达式获取list集合、元素相关

标签:package   dateutil   bow   sim   servlet   web   ict   默认   war   

原文地址:http://www.cnblogs.com/angelye/p/8031156.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!