Browse Source

新画面

git-svn-id: https://192.168.57.71/svn/jsgkj@1309 931142cf-59ea-a443-aa0e-51397b428577
ld_zhoutl 8 năm trước cách đây
mục cha
commit
8d3e63d25c
36 tập tin đã thay đổi với 2932 bổ sung483 xóa
  1. 17 16
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/common/BaseVo.java
  2. 4 0
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/common/DictConsts.java
  3. 79 26
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/ctl/ZyfzsqCtl.java
  4. 2 1
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/mappers/ZyfzModelMapper.java
  5. 31 0
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/model/ZyfzModelDto.java
  6. 4 3
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/ZyfzsqService.java
  7. 6 7
      gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/impl/ZyfzsqServiceImpl.java
  8. 17 6
      gkaqv2/trunk/modules/web/src/main/resources/com/xt/js/gkaq/web/mappers/ZyfzModelMapper.xml
  9. 5 1
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/footer.jsp
  10. 2 4
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/header.jsp
  11. 4 8
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/scripts.jsp
  12. 23 15
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/sys/index.jsp
  13. 0 2
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/fjsc.jsp
  14. 19 22
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/fzzxx.jsp
  15. 54 49
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/main.jsp
  16. 0 2
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/sgyahz.jsp
  17. 15 19
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/whxx.jsp
  18. 0 2
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/yjsbqd.jsp
  19. 0 2
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/zdhqd.jsp
  20. 0 2
      gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/zyryhz.jsp
  21. 12 11
      gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/basic.css
  22. 66 92
      gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/main.css
  23. 2 2
      gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/navbar.css
  24. 79 0
      gkaqv2/trunk/modules/web/src/main/webapp/static/css/index.css
  25. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/add.png
  26. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/delete.png
  27. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/edit.png
  28. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/home.png
  29. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/print.png
  30. BIN
      gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/search.png
  31. 38 33
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/common.js
  32. 848 0
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/grid/GridManager.css
  33. 1295 0
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/grid/GridManager.js
  34. 30 1
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/index.js
  35. 25 0
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/zyfzsq/fzzxx.js
  36. 255 157
      gkaqv2/trunk/modules/web/src/main/webapp/static/js/zyfzsq/index.js

+ 17 - 16
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/common/BaseVo.java

@@ -1,28 +1,29 @@
 package com.xt.js.gkaq.common;
 
 public class BaseVo{
-	/** 当前页码 */
-	private Integer page;
-	/** 每页行数 */
-	private Integer rows;
 	/** 当前操作 */
 	private String opt;
-	public Integer getPage() {
-		return page;
-	}
-	public void setPage(Integer page) {
-		this.page = page;
-	}
-	public Integer getRows() {
-		return rows;
-	}
-	public void setRows(Integer rows) {
-		this.rows = rows;
-	}
 	public String getOpt() {
 		return opt;
 	}
 	public void setOpt(String opt) {
 		this.opt = opt;
 	}
+	
+	/** 行数大小 */
+    private Integer pSize;
+    /** 页数大小 */
+    private Integer cPage;
+    public Integer getpSize() {
+        return pSize;
+    }
+    public void setpSize(Integer pSize) {
+        this.pSize = pSize;
+    }
+    public Integer getcPage() {
+        return cPage;
+    }
+    public void setcPage(Integer cPage) {
+        this.cPage = cPage;
+    }
 }

+ 4 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/common/DictConsts.java

@@ -8,4 +8,8 @@ public class DictConsts {
     public static final String DM_SZD = "DM_SZD";
     /** Σ»õµÈ¼¶ */
     public static final String DM_WHDJ = "DM_WHDJ";
+    /** ×÷Òµ³¡Ëù */
+    public static final String DM_ZYCS = "DM_ZYCS";
+    /** ²úȨ */
+    public static final String DM_CQ = "DM_CQ";
 }

+ 79 - 26
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/ctl/ZyfzsqCtl.java

@@ -1,7 +1,9 @@
 package com.xt.js.gkaq.web.ctl;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,6 +21,7 @@ import com.xt.js.gkaq.frame.model.ComboBoxDto;
 import com.xt.js.gkaq.frame.service.CodeService;
 import com.xt.js.gkaq.web.model.GqModel;
 import com.xt.js.gkaq.web.model.ZyfzModel;
+import com.xt.js.gkaq.web.model.ZyfzModelDto;
 import com.xt.js.gkaq.web.service.GqService;
 import com.xt.js.gkaq.web.service.ZyfzsqService;
 import com.xt.js.gkaq.web.vo.ZyfzsqVo;
@@ -52,30 +55,28 @@ public class ZyfzsqCtl extends BaseCtl {
 	 */
     @RequestMapping("list")
     @ResponseBody
-	public PageInfo<ZyfzModel> getPageInfo(ZyfzsqVo vo) {
-		// 初始化参数
-		if (null == vo.getPage() || vo.getPage() < 1) {
-			vo.setPage(1);
-		}
-		if (null == vo.getRows() || vo.getRows() < 1) {
-			vo.setRows(1);
-		}
-		PageHelper.startPage(vo.getPage(), vo.getRows());
-		ZyfzModel model = new ZyfzModel();
-        if (StringUtils.isNotEmpty(vo.getQymc())) {
-            model.setQymc("%" +vo.getQymc() + "%");
+	public PageInfo<ZyfzModelDto> getPageInfo(ZyfzsqVo vo) {
+		PageHelper.startPage(vo.getcPage(), vo.getpSize());
+		ZyfzModelDto model = new ZyfzModelDto();
+        if (StringUtils.isNotEmpty(vo.getJyr())) {
+            model.setJyrmc("%" +vo.getJyr() + "%");
         }
-        /*if (StringUtils.isNotEmpty(vo.getLoginName())) {
-            model.setLoginName("%" + vo.getLoginName() + "%");
+        if (StringUtils.isNotEmpty(vo.getSzd())) {
+            model.setSzd(vo.getSzd());
         }
-        if (StringUtils.isNotEmpty(vo.getOrgid())) {
-            model.setOrgid(vo.getOrgid());
-        }*/
-		List<ZyfzModel> list = zyfzsqService.findAllByCond(model);
-		PageInfo<ZyfzModel> pageResult = new PageInfo<>(list);
+        if (StringUtils.isNotEmpty(vo.getSsgq())) {
+            model.setSsgq(vo.getSsgq());
+        }
+		List<ZyfzModelDto> list = zyfzsqService.findAllByCond(model);
+		PageInfo<ZyfzModelDto> pageResult = new PageInfo<>(list);
 		return pageResult;
 	}
 
+    /**
+     * 增加记录
+     * @param vo
+     * @return
+     */
     @RequestMapping("add")
     @ResponseBody
     public WebJsonResult add(ZyfzsqVo vo) {
@@ -85,28 +86,64 @@ public class ZyfzsqCtl extends BaseCtl {
     }
 
     /**
-     * 保存
+     * 保存主信息
      * @param vo
      * @return
      */
     @RequestMapping("save")
     @ResponseBody
     @Transactional
-    public WebJsonResult save(ZyfzsqVo vo) {
+    public ZyfzModel save(ZyfzsqVo vo) {
+        ZyfzModel model = null;
         // 新增
         if(StringUtils.isEmpty(vo.getId())) {
-            ZyfzModel model = new ZyfzModel();
+            model = new ZyfzModel();
             BeanUtils.copyProperties(vo, model);
             zyfzsqService.add(model);
-        } else {
+        }
+        return model;
+    }
+
+    /**
+     * 保存所有
+     * @param vo
+     * @return
+     */
+    @RequestMapping("saveall")
+    @ResponseBody
+    @Transactional
+    public WebJsonResult saveall(ZyfzsqVo vo) {
+        // 新增
+        if(StringUtils.isNotEmpty(vo.getId())) {
             // 更新
             ZyfzModel model = zyfzsqService.findById(vo.getId());
-            BeanUtils.copyProperties(vo, model);
+            model.setSzd(vo.getSzd());
+            model.setSsgq(vo.getSsgq());
+            model.setJyr(vo.getJyr());
+            model.setGkjyxkz(vo.getGkjyxkz());
+            model.setDz(vo.getDz());
+            model.setFddbr(vo.getFddbr());
+            model.setAqgljg(vo.getAqgljg());
+            model.setAqfz(vo.getAqfz());
+            model.setGqgljgfzrxm(vo.getGqgljgfzrxm());
+            model.setGqgljgfzrzc(vo.getGqgljgfzrzc());
+            model.setGqgljgfzrlxdh(vo.getGqgljgfzrlxdh());
+            model.setGqgljgfzrdzyx(vo.getGqgljgfzrdzyx());
+            model.setZycs(vo.getZycs());
+            model.setCq(vo.getCq());
+            model.setZyfs(vo.getZyfs());
+            model.setWhdj(vo.getWhdj());
+            model.setZywxhwpm(vo.getZywxhwpm());
             zyfzsqService.update(model);
         }
         return success();
     }
 
+    /**
+     * 根据id获取记录
+     * @param id
+     * @return
+     */
     @RequestMapping("getRecord")
     @ResponseBody
     public ZyfzsqVo getRecord(String id) {
@@ -117,6 +154,11 @@ public class ZyfzsqCtl extends BaseCtl {
         return vo;
     }
 
+    /**
+     * 根据ID删除记录
+     * @param ids
+     * @return
+     */
     @RequestMapping("del")
     @ResponseBody
     @Transactional
@@ -133,11 +175,18 @@ public class ZyfzsqCtl extends BaseCtl {
 		return cnt;
     }
 
+    /**
+     * 初始化编辑
+     * @param id
+     * @return
+     */
     @RequestMapping("initEdit")
     @ResponseBody
-    public ZyfzModel initEdit(String id) {
+    public Map<String, Object> initEdit(String id) {
+        Map<String, Object> mapObj = new HashMap<String, Object>();
     	ZyfzModel model = zyfzsqService.findById(id);
-        return model;
+    	mapObj.put("zyfz", model);
+        return mapObj;
     }
     
 
@@ -172,6 +221,10 @@ public class ZyfzsqCtl extends BaseCtl {
                 dto.setOptVal(ztVal[i]);
                 list.add(dto);
             }
+        } else if("zycs".equals(lx)) {
+            list = codeService.findByPcode(DictConsts.DM_ZYCS);
+        } else if("cq".equals(lx)) {
+            list = codeService.findByPcode(DictConsts.DM_CQ);
         }
         return JSONArray.toJSONString(list);
     }

+ 2 - 1
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/mappers/ZyfzModelMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.xt.js.gkaq.common.BaseMapper;
 import com.xt.js.gkaq.web.model.ZyfzModel;
+import com.xt.js.gkaq.web.model.ZyfzModelDto;
 
 public interface ZyfzModelMapper extends BaseMapper<ZyfzModel> {
     int deleteByPrimaryKey(String id);
@@ -16,5 +17,5 @@ public interface ZyfzModelMapper extends BaseMapper<ZyfzModel> {
 
     int updateByPrimaryKey(ZyfzModel record);
     
-    public List<ZyfzModel> selectAllByCond(ZyfzModel model);
+    public List<ZyfzModelDto> selectAllByCond(ZyfzModelDto model);
 }

+ 31 - 0
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/model/ZyfzModelDto.java

@@ -0,0 +1,31 @@
+package com.xt.js.gkaq.web.model;
+
+
+public class ZyfzModelDto extends ZyfzModel{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+    private String jyrmc;
+    private String szdmc;
+    private String ssgqmc;
+    public String getJyrmc() {
+        return jyrmc;
+    }
+    public void setJyrmc(String jyrmc) {
+        this.jyrmc = jyrmc;
+    }
+    public String getSzdmc() {
+        return szdmc;
+    }
+    public void setSzdmc(String szdmc) {
+        this.szdmc = szdmc;
+    }
+    public String getSsgqmc() {
+        return ssgqmc;
+    }
+    public void setSsgqmc(String ssgqmc) {
+        this.ssgqmc = ssgqmc;
+    }
+}

+ 4 - 3
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/ZyfzsqService.java

@@ -2,10 +2,11 @@ package com.xt.js.gkaq.web.service;
 
 import java.util.List;
 
-import com.xt.js.gkaq.common.BaseService;
+import com.xt.js.gkaq.common.BaseUUIDModelService;
 import com.xt.js.gkaq.web.model.ZyfzModel;
+import com.xt.js.gkaq.web.model.ZyfzModelDto;
 
-public interface ZyfzsqService extends BaseService<ZyfzModel> {
+public interface ZyfzsqService extends BaseUUIDModelService<ZyfzModel> {
     /**
      * ¸ù¾ÝIDÂß¼­É¾³ý¼Ç¼
      * 
@@ -14,5 +15,5 @@ public interface ZyfzsqService extends BaseService<ZyfzModel> {
      */
     int deleteLogicByID(String id);
     
-    public List<ZyfzModel> findAllByCond(ZyfzModel model);
+    public List<ZyfzModelDto> findAllByCond(ZyfzModelDto model);
 }

+ 6 - 7
gkaqv2/trunk/modules/web/src/main/java/com/xt/js/gkaq/web/service/impl/ZyfzsqServiceImpl.java

@@ -1,6 +1,5 @@
 package com.xt.js.gkaq.web.service.impl;
 
-import java.util.Date;
 import java.util.List;
 
 import org.apache.shiro.SecurityUtils;
@@ -9,17 +8,17 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.xt.js.gkaq.common.BaseMapper;
-import com.xt.js.gkaq.common.BaseServiceImpl;
-import com.xt.js.gkaq.common.BaseUUIDModel;
+import com.xt.js.gkaq.common.BaseUUIDModelServiceImpl;
 import com.xt.js.gkaq.common.User;
 import com.xt.js.gkaq.web.mappers.ZyfzModelMapper;
 import com.xt.js.gkaq.web.model.ZyfzModel;
+import com.xt.js.gkaq.web.model.ZyfzModelDto;
 import com.xt.js.gkaq.web.service.ZyfzsqService;
 
 @Service
-public class ZyfzsqServiceImpl extends BaseServiceImpl<ZyfzModel> implements ZyfzsqService {
-	@Autowired
-	ZyfzModelMapper mapper;
+public class ZyfzsqServiceImpl extends BaseUUIDModelServiceImpl<ZyfzModel> implements ZyfzsqService {
+    @Autowired
+    private ZyfzModelMapper mapper;
 	
 	@Override
 	protected BaseMapper<ZyfzModel> getMapper() {
@@ -27,7 +26,7 @@ public class ZyfzsqServiceImpl extends BaseServiceImpl<ZyfzModel> implements Zyf
 	}
 
     @Override
-    public List<ZyfzModel> findAllByCond(ZyfzModel model) {
+    public List<ZyfzModelDto> findAllByCond(ZyfzModelDto model) {
         return mapper.selectAllByCond(model);
     }
 

+ 17 - 6
gkaqv2/trunk/modules/web/src/main/resources/com/xt/js/gkaq/web/mappers/ZyfzModelMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xt.js.gkaq.web.mappers.ZyfzModelMapper">
-  <resultMap id="BaseResultMap" type="com.xt.js.gkaq.web.model.ZyfzModel">
+  <resultMap id="BaseResultMap" type="com.xt.js.gkaq.web.model.ZyfzModelDto">
     <id column="ID" jdbcType="VARCHAR" property="id" />
     <result column="QYMC" jdbcType="VARCHAR" property="qymc" />
     <result column="SZD" jdbcType="VARCHAR" property="szd" />
@@ -45,7 +45,11 @@
     <result column="YXQJSSJ" jdbcType="TIMESTAMP" property="yxqjssj" />
     <result column="QYNBBH" jdbcType="VARCHAR" property="qynbbh" />
     <result column="GKJYXKZ" jdbcType="VARCHAR" property="gkjyxkz" />
-    <result column="JYR" jdbcType="VARCHAR" property="jyr" />
+    <result column="JYR" jdbcType="VARCHAR" property="jyr" />
+    <!--扩展展示字段-->
+    <result column="JYRMC" jdbcType="VARCHAR" property="jyrmc" />
+    <result column="SZDMC" jdbcType="VARCHAR" property="szdmc" />
+    <result column="SSGQMC" jdbcType="VARCHAR" property="ssgqmc" />
   </resultMap>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
     delete from AQ_GKWXHWZYFZBLHHZ
@@ -145,16 +149,23 @@
     GKJYXKZ, JYR
     from AQ_GKWXHWZYFZBLHHZ
   </select>
-  <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.web.model.ZyfzModel" >
+  <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.web.model.ZyfzModelDto" >
 		select ID, QYMC, SZD, SSGQ, DZ, FDDBR, AQGLJG, AQFZ, GQGLJGFZRXM, GQGLJGFZRZC, GQGLJGFZRLXDH, 
 	    GQGLJGFZRDZYX, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, STATE, SFTB, TBZT, 
 	    TBDYID, QYLB, SSQY, ORG_CODE, BLBH, WXHWPM, ZYCS, CQ, ZYFS, WHDJ, ZYWXHWPM, BH, SQTBRQ, 
 	    FZSJ, FZFZRQ, FZGKJYXKZH, FZZYCS, FZCSBH, FZQYNBBH, FZJG, YXQKSSJ, YXQJSSJ, QYNBBH, 
 	    GKJYXKZ, JYR
-	    from AQ_GKWXHWZYFZBLHHZ
+	    from AQ_GKWXHWZYFZBLHHZ fz
     	<where>
-		    <if test="qymc != null and qymc != ''">
-		        and QYMC like #{qymc,jdbcType=VARCHAR}
+		    <if test="jyrmc != null and jyrmc != ''">
+		        and exists(select 1 from AQ_DWXX_JYRJCXX jyr where 
+		        	jyr.gkjyr like #{jyrmc,jdbcType=VARCHAR} and fz.JYR = jyr.ID)
+		    </if>
+		    <if test="szd != null and szd != ''">
+		        and szd = #{szd,jdbcType=VARCHAR}
+		    </if>
+		    <if test="ssgq != null and ssgq != ''">
+		        and ssgq = #{ssgq,jdbcType=VARCHAR}
 		    </if>
     	</where>
     	order by ID desc

+ 5 - 1
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/footer.jsp

@@ -1,8 +1,12 @@
 
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<div style="margin:0px;background-color:#6FC2D7;height:26px;">
+<!-- <div style="margin:0px;background-color:#6FC2D7;height:26px;">
 	<div style="height:100%;max-height:30px;padding-top:4px;text-align:center;color:#043D7D;font-size: 13px;">
 		Copyright江苏省交通规划设计院股份有限公司 2013版权所有
 	</div>
+</div> -->
+
+<div class="p_footer">
+	Copyright江苏省交通规划设计院股份有限公司 2013版权所有
 </div>

+ 2 - 4
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/header.jsp

@@ -17,7 +17,8 @@
 <link rel="shortcut icon" href="<%=request.getContextPath()%>/static/images/system.ico" />
 
 <link rel="stylesheet" href="<%=request.getContextPath()%>/static/bootstrap-3.3.0/dist/css/bootstrap.css">
-<link rel="stylesheet" href="<%=request.getContextPath()%>/static/js/common/jqgrid/ui.jqgrid.css" />
+<%-- <link rel="stylesheet" href="<%=request.getContextPath()%>/static/js/common/jqgrid/ui.jqgrid.css" /> --%>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/static/js/common/grid/GridManager.css" />
 
 <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/static/js/common/bootstrap-select/css/bootstrap-select.min.css" />
 <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/static/js/common/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
@@ -31,8 +32,5 @@
 
 
 <link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/main.css" />
-<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/navbar.css" />
-<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/menubar.css" />
-<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/flexy-menu.css" />
 
 <%@ include file="scripts.jsp"%>

+ 4 - 8
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/layouts/scripts.jsp

@@ -14,8 +14,10 @@
 <script src="<%=request.getContextPath()%>/static/bootstrap-3.3.0/dist/js/bootstrap.min.js"></script>
 <script src="<%=request.getContextPath()%>/static/bootstrap-3.3.0/js/modal.js"></script>
 
-<script src="<%=request.getContextPath()%>/static/js/common/jqgrid/jquery.jqGrid.src.js"></script>
-<script src="<%=request.getContextPath()%>/static/js/common/jqgrid/i18n/grid.locale-cn.js"></script>
+<%-- <script src="<%=request.getContextPath()%>/static/js/common/jqgrid/jquery.jqGrid.src.js"></script>
+<script src="<%=request.getContextPath()%>/static/js/common/jqgrid/i18n/grid.locale-cn.js"></script> --%>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/jquery-easyui-1.5/jquery.easyui.min.js"></script>
+<script src="<%=request.getContextPath()%>/static/js/common/grid/GridManager.js"></script>
 
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/bootstrap-select/js/bootstrap-select.min.js"></script>
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/bootstrap-select/js/i18n/defaults-zh_CN.min.js"></script>
@@ -25,12 +27,6 @@
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/bootstrap-validator/js/language/zh_CN.js"></script>
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/zTree_v3/js/jquery.ztree.all-3.5.min.js"></script>
 
-<script type="text/javascript" src="<%=request.getContextPath()%>/static/jquery-easyui-1.5/jquery.easyui.min.js"></script>
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/easyui-lang-zh_CN.js"></script>
-
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/common.js"></script>
 <script type="text/javascript" src="<%=request.getContextPath()%>/static/js/common/util.js"></script>
-<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/index.js"></script>
-<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/navbar.js"></script>
-<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/sidebar.js"></script>
-<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/flexy-menu.js"></script>

+ 23 - 15
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/sys/index.jsp

@@ -4,27 +4,35 @@
 <html>
 <head>
 <title>Ê×Ò³</title>
-<%@ include file="../layouts/header.jsp"%>
-<link rel="stylesheet" href="<%=base%>/static/css/index.css">
+<%
+	String base = request.getContextPath();
+	String res = base;
+%>
+<link rel="shortcut icon" href="<%=request.getContextPath()%>/static/images/system.ico" />
+<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/jquery-easyui-1.5/themes/default/easyui.css">
+<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/jquery-easyui-1.5/themes/icon.css">
+<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/index.css">
+<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/navbar.css" />
+<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/menubar.css" />
+<link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/common/flexy-menu.css" />
 <script type="text/javascript">
-function dotest (scouse) {
-	$.ajax({
-		type : "post",
-		url : basePath + "/test",
-		success : function (data) {
-
-		}
-	});
-	
-}
+	var basePath = '<%=request.getContextPath()%>';
 </script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/jquery-1.11.3.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/jquery-easyui-1.5/jquery.easyui.min.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/easyui-lang-zh_CN.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/index.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/navbar.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/sidebar.js"></script>
+<script type="text/javascript" src="<%=request.getContextPath()%>/static/js/flexy-menu.js"></script>
+
 </head>
 <body class="p_body">
 <div class="easyui-layout" data-options="fit:true">
 <!-- ÄÚÈݲ¿·Ö -->
 <div id="regionCenter" data-options="region:'center'" class="regionNorthStyle">
 	<%@ include file="../layouts/menubar.jsp"%>
-	<br><br><br><br><br><br><br><br><br><br><br>
+	<iframe id="mainFrame" style="width:100%;min-height:500px;margin:0px;padding:0px;border:0px;" src=""></iframe>
 </div>
 <!-- Í·²¿ -->
 <div id="regionNorth" data-options="region:'north'" class="regionNorthStyle">
@@ -35,9 +43,9 @@ function dotest (scouse) {
 	<%@ include file="../layouts/sidebar.jsp"%>
 </div>
 <!-- µ×²¿ -->
-<div id="regionFooter" data-options="region:'south'" class="regionFooterStyle">
+<%-- <div id="regionFooter" data-options="region:'south'" class="regionFooterStyle">
 	<%@ include file="../layouts/footer.jsp"%>
-</div>
+</div> --%>
 </div>
 
 </body>

+ 0 - 2
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/fjsc.jsp

@@ -1,6 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <div class="form-group">
          <label class="col-sm-2 control-label" for="groupid">ÎļþÀàÐÍ</label>
          <div class="col-sm-4">
@@ -16,4 +15,3 @@
 		<!--ÁÐ±í²¿·Ö-->
 		<table id="fjscTable"></table>
 	</div>
-</form>

+ 19 - 22
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/fzzxx.jsp

@@ -1,7 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <input type="hidden" id="id" name="id">
     <div class="form-group">
          <label class="col-sm-2 control-label" for="szd">所在地</label>
@@ -16,55 +14,54 @@
     <div class="form-group">
          <label class="col-sm-2 control-label" for="jyr">港口经营人名称</label>
          <div class="col-sm-4">
-             <select class="selectpicker form-control" style="overflow: scroll;" id="jyr" name="jyr" title="请选择..."></select>
+             <select class="selectpicker form-control" id="jyr" name="jyr" title="请选择..." onchange="getJyrInfo(this);"></select>
          </div>
-        <label class="col-sm-2 control-label" for="loginName">港口经营许可证号</label>
+        <label class="col-sm-2 control-label" for="gkjyxkz">港口经营许可证号</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="gkjyxkz" name="gkjyxkz" type="text" />
         </div>
     </div>
     <div class="form-group">
-        <label class="col-sm-2 control-label" for="loginName">地址</label>
+        <label class="col-sm-2 control-label" for="dz">地址</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="dz" name="dz" type="text" />
         </div>
-        <label class="col-sm-2 control-label" for="loginName">法定代表人</label>
+        <label class="col-sm-2 control-label" for="fddbr">法定代表人</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="fddbr" name="fddbr" type="text" />
         </div>
     </div>
     <div class="form-group">
-        <label class="col-sm-2 control-label" for="loginName">安全管理机构</label>
+        <label class="col-sm-2 control-label" for="aqgljg">安全管理机构</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="aqgljg" name="aqgljg" type="text" />
         </div>
-        <label class="col-sm-2 control-label" for="loginName">安全副总</label>
+        <label class="col-sm-2 control-label" for="aqfz">安全副总</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="aqfz" name="aqfz" type="text" />
         </div>
     </div>
     <div class="form-group">
         <div><b>安全管理机构负责人信息</b></div>
     </div>
     <div class="form-group">
-        <label class="col-sm-2 control-label" for="loginName">姓名</label>
+        <label class="col-sm-2 control-label" for="gqgljgfzrxm">姓名</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="gqgljgfzrxm" name="gqgljgfzrxm" type="text" />
         </div>
-        <label class="col-sm-2 control-label" for="loginName">职称</label>
+        <label class="col-sm-2 control-label" for="gqgljgfzrzc">职称</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="gqgljgfzrzc" name="gqgljgfzrzc" type="text" />
         </div>
     </div>
     <div class="form-group">
-        <label class="col-sm-2 control-label" for="loginName">联系电话</label>
+        <label class="col-sm-2 control-label" for="gqgljgfzrlxdh">联系电话</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="gqgljgfzrlxdh" name="gqgljgfzrlxdh" type="text" />
         </div>
-        <label class="col-sm-2 control-label" for="loginName">电子邮箱</label>
+        <label class="col-sm-2 control-label" for="gqgljgfzrdzyx">电子邮箱</label>
         <div class="col-sm-4">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="gqgljgfzrdzyx" name="gqgljgfzrdzyx" type="text" />
         </div>
     </div>
-</form>
 	  	 

+ 54 - 49
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/main.jsp

@@ -22,37 +22,42 @@
 </style>
 </head>
 <body class="p_body">
-<div id="easyuiLayout" class="easyui-layout" data-options="fit:true">
-<!-- 内容部分 -->
-<div id="regionCenter" data-options="region:'center'" class="regionCenterStyle">
 	<div class="p_all">
-	<%@ include file="../layouts/menubar.jsp"%>
-	<div class="p_block">
-		<div class="p_headdiv">
-			<div class="p_headblock">
-				<div class="p_headleft">作业附证申请</div>
-			</div>
+	<div class="p_headdiv">
+		<div class="p_headnav">
+			<img class="p_headnavimg" src="<%=base%>/static/images/list/home.png"/>
 		</div>
-		<div class="p_buttondiv">
-			<div class="p_buttonbg">
-				<img class="p_buttonimg" src="<%=base%>/static/images/list/add.png" 
-					onclick="addInfo()" title="新增"/>
-			</div>
-			<div class="p_buttonbg">
-				<img class="p_buttonimg" src="<%=base%>/static/images/list/delete.png" 
-					onclick="delInfo()" title="删除"/>
-			</div>
-			<div class="p_buttonbg">
-				<img class="p_buttonimg" src="<%=base%>/static/images/list/edit.png" 
-					onclick="editInfo()" title="修改"/>
-			</div>
-			<div class="p_buttonbg">
-				<img class="p_buttonimg" src="<%=base%>/static/images/list/search.png" 
-					onclick="showSearch()" title="查询"/>
+		<div class="p_headblock">
+			<div class="p_headleft">安全审批管理 > 作业附证申请</div>
+		</div>
+	</div>
+	<div class="p_block">
+		<div class="p_fucdiv">
+			<div class="p_titlediv">
+				<div class="p_titlename">作业附证申请</div>
+				<div id="totalRecord" class="p_titlerecord">共0条记录</div>
 			</div>
-			<div class="p_buttonbg">
-				<img class="p_buttonimg" src="<%=base%>/static/images/list/print.png" 
-					onclick="printInfo()" title="打印"/>
+			<div class="p_buttondiv">
+				<div class="p_buttonbg">
+					<img class="p_buttonimg" src="<%=base%>/static/images/list/add.png" 
+						onclick="addInfo()" title="新增"/>
+				</div>
+				<div class="p_buttonbg">
+					<img class="p_buttonimg" src="<%=base%>/static/images/list/delete.png" 
+						onclick="delInfo()" title="删除"/>
+				</div>
+				<div class="p_buttonbg">
+					<img class="p_buttonimg" src="<%=base%>/static/images/list/edit.png" 
+						onclick="editInfo()" title="修改"/>
+				</div>
+				<div class="p_buttonbg">
+					<img class="p_buttonimg" src="<%=base%>/static/images/list/search.png" 
+						onclick="showSearch()" title="查询"/>
+				</div>
+				<div class="p_buttonbg">
+					<img class="p_buttonimg" src="<%=base%>/static/images/list/print.png" 
+						onclick="printInfo()" title="打印"/>
+				</div>
 			</div>
 		</div>
 		<div class="p_searchdiv">
@@ -93,17 +98,15 @@
 				</tr>
 			</table>
 		</div>
-		<div class="page-content">
-			<!--列表部分-->
-			<table id="grid-table"></table>
-			<div id="grid-pager"></div>
+		<div class="gridmanager">
+		    <table grid-manager="mainGrid" id="mainGrid"></table>
 		</div>
 	</div>
+	<%@ include file="../layouts/footer.jsp"%>
 	</div>
-
 	<div class="modal fade" id="myModal" tabindex="99999999" role="dialog"
 		aria-labelledby="myModalLabel" aria-hidden="true">
-		<div class="modal-dialog" style="width:900px;height:550px;">
+		<div class="modal-dialog" style="width:900px;height:650px;">
 			<div class="modal-content">
 				<div class="modal-header">
 					<button type="button" class="close" data-dismiss="modal">
@@ -120,8 +123,10 @@
 					<!-- yjsbqd.jsp 应急设备设施清单 -->
 					<!-- sgyahz.jsp 事故应急预案汇总表 -->
 					<!-- fjsc.jsp 附件上传 -->
+
+					<form class="form-horizontal" id="zyfzsqform" method="post" >
 					<div id="tt" class="easyui-tabs" data-options="" style="width:870px;"> 
-					    <div title="港口危险作业附证申请" data-options=""  style="display:block;padding:10px;">
+					    <div id="div_fzzxx" title="港口危险作业附证申请" data-options=""  style="display:block;padding:10px;">
 					    	<%@ include file="fzzxx.jsp"%>
 					    </div>
 					    <div id="div_whxx" title="危险货物港口作业附证申请表" data-options="" style="overflow:auto;padding:20px;display:none;">   
@@ -143,24 +148,24 @@
 					         <%@ include file="fjsc.jsp"%>  
 					    </div>
 					</div>
+					</form>
 				</div>
 				<!-- form 表单信息 -->
+				
+	            <div class="modal-footer">
+	                    <div class="row">
+	                        <div class="center-block" style="width: 160px;">
+	                            <button id="btnSave" class="btn btn-success btn-round btn-sm" onclick="save()">
+	                                <i class="glyphicon glyphicon-ok"></i> 保存
+	                            </button>
+	                            <button type="button" class="btn btn-grey btn-round btn-sm" onclick="closeWin()">
+	                                <i class="glyphicon glyphicon-remove"></i> 关闭
+	                            </button>
+	                        </div>
+	                    </div>
+	            </div>
 			</div>
 		</div>
 	</div>
-</div>
-<!-- 头部 -->
-<div id="regionNorth" data-options="region:'north'" class="regionNorthStyle">
-	<%@ include file="../layouts/navbar.jsp"%>
-</div>
-<!-- 左边部分 -->
-<div id="regionWest" data-options="region:'west'" class="regionWestStyle">
-	<%@ include file="../layouts/sidebar.jsp"%>
-</div>
-<!-- 底部 -->
-<div id="regionFooter" data-options="region:'south'" class="regionFooterStyle">
-	<%@ include file="../layouts/footer.jsp"%>
-</div>
-</div>
 </body>
 </html>

+ 0 - 2
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/sgyahz.jsp

@@ -1,6 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <div class="row">
         <div class="left-block" style="width: 160px;padding:0px 0px 5px 16px;">
             <button id="btnSave" class="btn btn-success btn-round btn-sm" onclick="save()">
@@ -15,4 +14,3 @@
 		<!--ÁÐ±í²¿·Ö-->
 		<table id="sgyahzTable"></table>
 	</div>
-</form>

+ 15 - 19
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/whxx.jsp

@@ -1,38 +1,35 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
-    
     <div class="form-group">
         <label class="col-sm-2 control-label" for="ifMapviewChk">作业场所</label>
-        <div class="col-sm-10" style="padding-top:7px;">
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">码头泊位
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">储罐
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">堆场
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">仓库
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">过驳区
+        <div id="div_zycs" class="col-sm-10" style="padding-top:7px;">
+            <!-- <input type="checkbox" id="zycs" name="zycs" class="chk" value="Y">码头泊位
+            <input type="checkbox" id="zycs" name="zycs" class="chk" value="Y">储罐
+            <input type="checkbox" id="zycs" name="zycs" class="chk" value="Y">堆场
+            <input type="checkbox" id="zycs" name="zycs" class="chk" value="Y">仓库
+            <input type="checkbox" id="zycs" name="zycs" class="chk" value="Y">过驳区 -->
         </div>
     </div>
     <div class="form-group">
         <label class="col-sm-2 control-label" for="ifMapviewChk">产权</label>
-        <div class="col-sm-10" style="padding-top:7px;">
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">自有
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">承包
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">租赁
+        <div id="div_cq" class="col-sm-10" style="padding-top:7px;">
         </div>
     </div>
     <div class="form-group">
-        <label class="col-sm-2 control-label" for="loginName">作业方式</label>
+        <label class="col-sm-2 control-label" for="zyfs">作业方式</label>
         <div class="col-sm-10">
-            <input class="form-control" id="loginName" name="loginName" type="text" />
+            <input class="form-control" id="zyfs" name="zyfs" type="text" />
         </div>
     </div>
     <div class="form-group">
         <label class="col-sm-2 control-label" for="ifMapviewChk">危货等级</label>
+        <div id="div_whdj" class="col-sm-10" style="padding-top:7px;">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="col-sm-2 control-label" for="ifMapviewChk">作业危险货物品名</label>
         <div class="col-sm-10" style="padding-top:7px;">
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">普通危货
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">危险化学品
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">剧毒化学品
-            <input type="checkbox" id="ifMapviewChk" name="ifMapviewChk" class="chk" value="Y">重大危险源
+        	<textarea class="form-control" id="zywxhwpm" name="zywxhwpm"/></textarea>
         </div>
     </div>
     <div class="row">
@@ -46,4 +43,3 @@
 		<!--列表部分-->
 		<table id="whxxTable"></table>
 	</div>
-</form>

+ 0 - 2
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/yjsbqd.jsp

@@ -1,6 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <div class="row">
         <div class="left-block" style="width: 160px;padding:0px 0px 5px 16px;">
             <button id="btnSave" class="btn btn-success btn-round btn-sm" onclick="save()">
@@ -15,4 +14,3 @@
 		<!--ÁÐ±í²¿·Ö-->
 		<table id="yjsbqdTable"></table>
 	</div>
-</form>

+ 0 - 2
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/zdhqd.jsp

@@ -1,6 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <div class="row">
         <div class="left-block" style="width: 160px;padding:0px 0px 5px 16px;">
             <button id="btnSave" class="btn btn-success btn-round btn-sm" onclick="save()">
@@ -15,4 +14,3 @@
 		<!--ÁÐ±í²¿·Ö-->
 		<table id="zdhqdTable"></table>
 	</div>
-</form>

+ 0 - 2
gkaqv2/trunk/modules/web/src/main/webapp/WEB-INF/view/zyfzsq/zyryhz.jsp

@@ -1,6 +1,5 @@
 <%@ page language="java" contentType="text/html;charset=GBK"
 	pageEncoding="GBK"%>
-<form class="form-horizontal" id="jyrInfoform" method="post" >
     <div class="row">
         <div class="left-block" style="width: 160px;padding:0px 0px 5px 16px;">
             <button id="btnSave" class="btn btn-success btn-round btn-sm" onclick="save()">
@@ -15,4 +14,3 @@
 		<!--ÁÐ±í²¿·Ö-->
 		<table id="zyryhzTable"></table>
 	</div>
-</form>

+ 12 - 11
gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/basic.css

@@ -1,4 +1,4 @@
-@font-face {
+/* @font-face {
   font-family: 'FontAwesome';
   src: url('../../font/fontawesome-webfont.eot?v=4.2.0');
   src: url('../../font/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../../font/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../../font/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../../font/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
@@ -716,7 +716,7 @@ pre.prettyprint {
 .no-border-right {
   border-right-width: 0;
 }
-/**
+*
 .no-underline {
  text-decoration: none !important;
 }
@@ -733,7 +733,7 @@ pre.prettyprint {
 
 .overflow-auto {overflow: auto !important;}
 .overflow-visible {overflow: visible !important;}
-*/
+
 .overflow-hidden {
   overflow: hidden !important;
 }
@@ -1183,7 +1183,7 @@ pre.prettyprint {
 .navbar .navbar-brand:focus {
   color: #ffffff;
 }
-/**
+*
 @media (min-width: @grid-float-breakpoint) {
   .navbar > .container .navbar-brand,
   .navbar > .container-fluid .navbar-brand {
@@ -1191,7 +1191,7 @@ pre.prettyprint {
 	margin-right: 0;
   }
 }
-*/
+
 @media only screen and (min-width: 992px) {
   .navbar-container {
     padding-left: 10px;
@@ -1293,7 +1293,7 @@ pre.prettyprint {
     right: 2px;
   }
 }
-/* dialog */
+dialog
 .ui-widget-overlay {
   background: rgba(0, 0, 0, 0.25);
   opacity: 1 !important;
@@ -1386,7 +1386,7 @@ pre.prettyprint {
 .ui-jqdialog .widget-header .ui-jqdialog-titlebar-close {
   right: 10px !important;
 }
-/* accordion */
+accordion
 .ui-accordion .ui-accordion-header {
   color: #478fca;
   font-weight: normal;
@@ -1426,7 +1426,7 @@ pre.prettyprint {
   border-top-width: 0;
   padding: 11px 16px;
 }
-/* tabs */
+tabs
 .ui-tabs .ui-tabs-nav {
   padding: 0;
   border-bottom: 1px solid #C5D0DC;
@@ -1466,7 +1466,7 @@ pre.prettyprint {
   top: auto;
   bottom: auto;
 }
-/* menu */
+menu
 .ui-menu {
   -webkit-box-sizing: content-box;
   -moz-box-sizing: content-box;
@@ -1539,7 +1539,7 @@ pre.prettyprint {
   background-color: #FFF;
   color: #999;
 }
-/* auto complete */
+auto complete
 .ui-autocomplete {
   background-color: #FFF;
   border: 1px solid rgba(0, 0, 0, 0.2);
@@ -1798,7 +1798,7 @@ pre.prettyprint {
   border-right: 1px solid #E1E1E1 !important;
   text-align: left !important;
 }
-/* checkbox container */
+checkbox container
 .ui-jqgrid-labels th[id*="_cb"]:first-child > div {
   padding-top: 0;
   text-align: center !important;
@@ -2261,3 +2261,4 @@ th[aria-selected=true] .ui-jqgrid-sortable {
     width: 300px;
   }
 }
+ */

+ 66 - 92
gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/main.css

@@ -3,50 +3,84 @@
 	min-width:700px;
 	min-height:500px;
 	margin: 0px;
-	background-image:url('../../images/list/repeat_bg.png');
+	/* background-image:url('../../images/list/repeat_bg.png'); */
+	background-color:#e5e8f0;
+	color:#313e63;
 }
 .p_all {
 	height:100%;
-	background-image:url('../../images/list/repeat_bg.png');
+	background-color:#e5e8f0;
 }
 .p_block {
-	width:100%;
+	width:calc(100%-20)%;
+	height:100%;
 	margin:0;
+	border-radius:5px;
+	border:1px solid #E1E1E1;
+	margin:0px 10px 10px 10px;
+	padding:2px 10px 10px 10px;
+	background-color:#ffffff;
 }
 .p_headblock {
-	background-color:#23A5B8;
 	width:100%;
 	height:22px;
 	margin:0 auto;
 }
+.p_headnav {
+	float:left;
+	padding:1px 0px 0px 18px;
+}
+.p_headnavimg {
+	width:12px;
+	height:16px;
+}
 .p_headleft {
-	width:100%;
+	float:left;
+	width:90%;
 	text-align:left;
-	padding:2px 0px 0px 10px;
-	color:#ffffff;
+	padding:3px 0px 0px 10px;
+	color:#313e63;
+	font-weight:bold;
+	font-size:12px;
+}
+.p_fucdiv{
+	height:40px;
+}
+.p_titlediv {
+	float:left;
+	width:30%;
+	height:40px;
+	padding:13px 0 0 10px;
+}
+.p_titlename {
+	float:left;
 	font-weight:bold;
 }
+.p_titlerecord {
+	float:left;
+	padding-left:5px;
+	font-size:8px;
+	margin-top: 3px;
+}
 
 .p_buttondiv {
-	width:100%;
-	text-align:left;
-	padding:6px 0px 0px 10px;
-	height:56px;
+	float:right;
+	width:70%;
+	height:40px;
+	text-align:right;
 }
 
 .p_buttonbg {
 	margin:0px 0px 0px 0px;
-	float:left;
-	width:46px;
-	height:46px;
+	float:right;
 	background-size:46px;
-	background-image:url('../../images/list/btn_bg.9.png');
 	background-repeat:no-repeat;
 	padding:6px 0px 0px 6px;
 }
 
 .p_buttonimg {
 	cursor:pointer;
+	margin:0px 10px 0px 10px;
 }
 
 .p_searchdiv {
@@ -60,6 +94,17 @@
 	margin-top:0px;
 	cursor:pointer;
 }
+
+.p_footer{
+	text-align:center;
+	width: 100%;
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	height: 18px;
+	z-index: 11;
+	color:#96a6ca;
+}
 	
 .datadiv {
 	width:100%;
@@ -100,7 +145,7 @@
 }
 
 .tabsearch {
-	width:1260px;
+	width:95%;
 	border:0px;
 	border-spacing: 0px;
 }
@@ -110,6 +155,7 @@
 
 .tdname {
 	text-align:right;
+	white-space: nowrap;
 	padding-right:3px;
 	width:110px;
 	height:35px;
@@ -234,33 +280,6 @@ body .demo-class .layui-layer-title{background:#46B5EA; color:#fff; border-top-l
 body .demo-class iframe{border-bottom-left-radius:0px;border-bottom-right-radius:0px}
 
 /**
-easyui꼈애묾繫땍屢
-*/
-.regionCenterStyle{
-	width:auto;
-	padding:0px;
-	border:0px;
-}
-.regionNorthStyle{
-	height:60px;
-	border:0px;
-}
-.regionNorthMenuStyle{
-	height:40px;
-	border:0px;
-}
-.regionWestStyle{
-	border:0px;
-	width:90px;
-    background-color: #313e63;
-    overflow: hidden;
-}
-.regionFooterStyle{
-	height:26px;
-	border:0px;
-	padding:0px;
-}
-/**
 bootstrap 錦맣
 */
 .form-horizontal .form-group {
@@ -281,53 +300,8 @@ input[type=radio], input[type=checkbox] {
   line-height: normal;
 }
 
-.arrowdiv {
-	top: 300px;width: 18px;height:21px;margin: 0px;position: absolute; z-index: 1;overflow: hidden;
-}
-
-.arrowdiv1 {
-	top: 300px;width: 18px;height:21px;margin: 0px;position: absolute; z-index: 1;overflow: hidden;
-}
-
-.arrowright {
-    display: block;
-    width: 18px;
-    height: 21px;
-    margin: 0px 0px 0px 1px;
-    vertical-align: top;
-    background: url('../../images/nav2/expand.png') no-repeat 0 0px;
-}
-
-.arrowleft {
-    display: block;
-    width: 18px;
-    height: 21px;
-    margin: 0px 0px 0px 0px;
-    vertical-align: top;
-    background: url('../../images/nav2/collapse.png') no-repeat 0 0px;z-index: 1254;
-}
-
-<!-- 璘긋으 -->
-.s_all {
-	text-align:center;
-}
-.s_node {
-    width: 90px;
-    height: 80px;
-    cursor:pointer;
-}
-.s_nodeImg {
-    width: 40px;
-    height: 35px;
-}
-.s_nodeImgDiv {
-	margin:0px 0px 0px 25px;
-	padding:14px 0px 0px 0px;
-}
-.s_nodeTextDiv {
-	margin:5px 0px 0px 0px;
-	text-align:center;
-	color:#a1b5ef;/** 70eaff */
+.gridmanager{
+	width:100%;
+	padding:0px 8px 0px 8px;
+	margin:0px auto;
 }
-
-

+ 2 - 2
gkaqv2/trunk/modules/web/src/main/webapp/static/css/common/navbar.css

@@ -82,7 +82,7 @@
 	width:50px;
 	height:26px;
 	float:left;
-	margin:22px 0px 0px 0px;
+	margin:21px 0px 0px 0px;
 	font-family:"΢ÈíÑźÚ";
 	font-size:12px;
 	color:#FFFFFF;
@@ -122,7 +122,7 @@
 	width:175px;
 	height:26px;
 	float:left;
-	margin:22px 0px 0px 0px;
+	margin:19px 0px 0px 0px;
 	font-family:"΢ÈíÑźÚ";
 	font-size:12px;
 	color:#FFFFFF;

+ 79 - 0
gkaqv2/trunk/modules/web/src/main/webapp/static/css/index.css

@@ -29,3 +29,82 @@
 	top: 501px; left: 541px;
 	padding:0px 0px 0px 0px;
 }
+
+
+/**
+easyui²¼¾Ö¹²Í¨¶¨Òå
+*/
+.regionCenterStyle{
+	width:auto;
+	padding:0px;
+	border:0px;
+}
+.regionNorthStyle{
+	height:60px;
+	border:0px;
+	overflow: hidden;
+}
+.regionNorthMenuStyle{
+	height:40px;
+	border:0px;
+}
+.regionWestStyle{
+	border:0px;
+	width:90px;
+    background-color: #313e63;
+    overflow: hidden;
+}
+.regionFooterStyle{
+	height:26px;
+	border:0px;
+	padding:0px;
+}
+
+.arrowdiv {
+	top: 300px;width: 18px;height:21px;margin: 0px;position: absolute; z-index: 1;overflow: hidden;
+}
+
+.arrowdiv1 {
+	top: 300px;width: 18px;height:21px;margin: 0px;position: absolute; z-index: 1;overflow: hidden;
+}
+
+.arrowright {
+    display: block;
+    width: 18px;
+    height: 21px;
+    margin: 0px 0px 0px 1px;
+    vertical-align: top;
+    background: url('../images/nav2/expand.png') no-repeat 0 0px;
+}
+
+.arrowleft {
+    display: block;
+    width: 18px;
+    height: 21px;
+    margin: 0px 0px 0px 0px;
+    vertical-align: top;
+    background: url('../images/nav2/collapse.png') no-repeat 0 0px;z-index: 1254;
+}
+
+<!-- ×ó±ßÀ¸ -->
+.s_all {
+	text-align:center;
+}
+.s_node {
+    width: 90px;
+    height: 80px;
+    cursor:pointer;
+}
+.s_nodeImg {
+    width: 40px;
+    height: 35px;
+}
+.s_nodeImgDiv {
+	margin:0px 0px 0px 25px;
+	padding:14px 0px 0px 0px;
+}
+.s_nodeTextDiv {
+	margin:5px 0px 0px 0px;
+	text-align:center;
+	color:#a1b5ef;/** 70eaff */
+}

BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/add.png


BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/delete.png


BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/edit.png


BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/home.png


BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/print.png


BIN
gkaqv2/trunk/modules/web/src/main/webapp/static/images/list/search.png


+ 38 - 33
gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/common.js

@@ -125,25 +125,6 @@ function enableTooltips(table) {
 	});
 };
 
-
-
-/**
- * jqGrid默认属性
- */
-jQuery.extend(jQuery.jgrid.defaults,{
-	sortable:true, // 列是否可拖拽
-	viewrecords : true, //是否在导航分页栏显示记录总数
-	emptyrecords: "无数据显示" // 无数据提示信息
-});
-
-/**
- * 替换jqGrid的操作图标
- */
-$.jgrid.defaults.gridComplete = function () {
-    updatePagerIcons(this);
-    //$(this).closest(".ui-jqgrid-bdiv").css("overflow-x", "hidden");
-};
-
 /**
  * 灰化DIV层控件
  * @param modal
@@ -256,22 +237,46 @@ function ajustJqGrid(grid_selector, pager_selector) {
 	});
 }
 
+$.fn.GM.defaults = {
+    isDevelopMode: false
+    ,autoLoadCss:false  //自动加载CSS文件,无需在页面中引用
+    ,supportRemind: true
+    ,i18n:'zh-cn'
+    ,textConfig:{
+        'page-go': {
+            'zh-cn':'跳转',
+            'en-us':'Go '
+        }
+    }
+    ,disableCache:false
+    ,disableOrder:false
+    ,supportSorting: true
+    ,isCombSorting: true
+    ,sortDownText: 'up'
+    ,sortUpText: 'down'
+    ,supportDrag:true
+    ,supportAjaxPage:true
+    ,pageSize:_rowNum
+    ,dataKey:'list'
+    ,totalsKey:'total'
+}
+
 /**
  *	获取多行选中的id 
  */
-function getMultiData(grid_selector){
-	var ids = "";
-	//获取选择行的id
-	var row = jQuery(grid_selector).jqGrid('getGridParam','selarrrow');
-	if (row.length >= 1) {
-		for (var i = 0; i < row.length; i++) {
-			//获取选择的行的数据,只要传入rowId即可
-			var data = jQuery(grid_selector).jqGrid('getRowData', row[i]);
-			ids += data.id +",";
-		}
-		ids = ids.substr(0, ids.length - 1);
-	}
-	return ids;
+function getMultiData(mainGrid){
+    var ids = "";
+    //获取选择行的id
+    var rows = $(mainGrid).GM('getCheckedTr');
+    if (rows.length >= 1) {
+        for (var i = 0; i < rows.length; i++) {
+            //获取选择的行的数据,只要传入rowId即可
+            var data = $(mainGrid).GM('getRowData', rows[i]);
+            ids += data.id +",";
+        }
+        ids = ids.substr(0, ids.length - 1);
+    }
+    return ids;
 }
 
 function addZero(m){return m<10?'0'+m:m };
@@ -430,4 +435,4 @@ if (typeof constData == "undefined") {
         });
         _ajax(_opt);
     };
-})(jQuery);
+})(jQuery);

+ 848 - 0
gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/grid/GridManager.css

@@ -0,0 +1,848 @@
+table[grid-manager], table[grid-manager] * {
+	box-sizing: border-box !important
+}
+
+.table-div, .table-warp {
+	position: relative
+}
+
+/* @font-face {
+	font-family: iconfont;
+	src: url(../fonts/iconfont.eot);
+	src: url(../fonts/iconfont.eot?#iefix) format('embedded-opentype'),
+		url(../fonts/iconfont.woff) format('woff'), url(../fonts/iconfont.ttf)
+		format('truetype'), url(../fonts/iconfont.svg#iconfont) format('svg')
+} */
+
+.iconfont {
+	font-family: iconfont !important;
+	font-size: 16px;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-webkit-text-stroke-width: .2px;
+	-moz-osx-font-smoothing: grayscale
+}
+
+.icon-liebiao:before {
+	content: "\e60a"
+}
+
+.icon-liebiao1:before {
+	content: "\e600"
+}
+
+.icon-erwei:before {
+	content: "\e611"
+}
+
+.icon-erwei1:before {
+	content: "\e612"
+}
+
+.icon-sousuo:before {
+	content: "\e60b"
+}
+
+.icon-chanpincanshu:before {
+	content: "\e601"
+}
+
+.icon-baocun:before {
+	content: "\e613"
+}
+
+.icon-sanjiao2:before {
+	content: "\e602"
+}
+
+.icon-sanjiao1:before {
+	content: "\e603"
+}
+
+.icon-search:before {
+	content: "\e604"
+}
+
+.icon-shuaxin:before {
+	content: "\e60c"
+}
+
+.icon-shezhi:before {
+	content: "\e60d"
+}
+
+.icon-liebiaomoshi:before {
+	content: "\e605"
+}
+
+.icon-31shuaxin:before {
+	content: "\e606"
+}
+
+.icon-31shanchu:before {
+	content: "\e607"
+}
+
+.icon-bianji:before {
+	content: "\e608"
+}
+
+.icon-31fanhui1:before {
+	content: "\e60e"
+}
+
+.icon-31fanhui2:before {
+	content: "\e60f"
+}
+
+.icon-31xingdongdian:before {
+	content: "\e610"
+}
+
+.icon-saveas24:before {
+	content: "\e614"
+}
+
+.icon-icon:before {
+	content: "\e609"
+}
+
+.no-select-text {
+	user-select: none;
+	-moz-user-select: none;
+	-webkit-user-select: none
+}
+
+table[grid-manager] {
+	visibility: hidden;
+	border-collapse: separate !important
+}
+
+table[grid-manager].GridManager-ready {
+	visibility: visible
+}
+
+.table-div {
+	overflow-x: auto;
+	overflow-y: hidden;
+	border: 1px solid #d9d9d9;
+}
+
+.table-div.config-editing {
+	overflow-x: hidden
+}
+
+.table-warp table[grid-manager] {
+	table-layout: fixed;
+	word-wrap: break-word;
+	text-align: center;
+	margin: 0 !important
+}
+
+.trOdd {
+	background-color: #ffffff;
+	height:26px;
+}
+
+.trEven {
+	background-color: #eef1fa;
+	height:26px;
+}
+
+.operation {
+	color: #313e63;
+}
+
+.table-warp table[grid-manager] tr td {
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	padding-top:5px;
+}
+
+.table-warp table[grid-manager] th[th-visible=none] {
+	display: none
+}
+
+.table-warp table[grid-manager] th[th-visible=visible] {
+	height: 28px;
+	display: table-cell;
+	color:#ffffff;
+	padding:2px 0px 8px 0px;
+}
+
+.table-warp table[grid-manager] th .th-text {
+	white-space: nowrap
+}
+
+table.grid-manager-default {
+	background-color: #dad9c7;
+	width: 100%;
+	border-collapse: separate;
+	border-spacing: 0px;
+	border: 1 solid #000000;
+	font-size: 12px !important;
+	font-family: arial !important
+}
+
+table.grid-manager-default thead tr th {
+	background-color: #96a6ca;
+	border: 0px solid #fff;
+	font-size: 8pt;
+	text-align: center
+}
+
+table.grid-manager-default thead tr th:hover {
+	background-color: #96a6ca;
+}
+
+table.grid-manager-default tbody tr td {
+	color: #6c81b0;
+	padding: 0px;
+	vertical-align: top;
+	text-align: left
+}
+
+table.grid-manager-default tbody tr:hover td {
+	background-color: #e6eeee;
+	color: #000
+}
+
+.table-warp .config-area {
+	display: none;
+	max-width: 100%;
+	position: absolute;
+	top: 0;
+	right: 0;
+	cursor: pointer;
+	z-index: 2
+}
+
+.table-warp .config-area .config-action {
+	display: block;
+	width: 20px;
+	height: 20px;
+	position: absolute;
+	right: 5px;
+	top: 9px;
+	overflow: hidden;
+	vertical-align: middle;
+	text-align: center;
+	z-index: 2
+}
+
+.table-warp .config-area .config-action i {
+	display: inline-block;
+	font-size: 18px
+}
+
+.table-warp .config-area .config-action:hover i {
+	color: #09f
+}
+
+.table-warp .config-area .config-list {
+	display: block;
+	width: 100%;
+	padding: 2px 30px 0 2px;
+	list-style-type: none;
+	font-size: 12px;
+	background: #f8f8f8;
+	border: 1px solid #ddd;
+	border-radius: 3px;
+	margin: 0
+}
+
+.table-warp .config-area .config-list>li {
+	display: inline-block;
+	padding: 4px 10px;
+	line-height: 20px;
+	background-color: #e8e8e8;
+	margin-right: 2px;
+	margin-bottom: 2px
+}
+
+.table-warp .config-area .config-list>li>label {
+	margin: 0
+}
+
+.table-warp .config-area .config-list li.no-click, .table-warp .config-area .config-list li.no-click *
+	{
+	cursor: not-allowed
+}
+
+.table-warp .config-area .config-list li input[type=checkbox] {
+	display: none
+}
+
+.table-warp .config-area .config-list li label {
+	cursor: pointer;
+	color: #666;
+	font-weight: 500
+}
+
+.table-warp .config-area .config-list li:hover label {
+	color: #09f
+}
+
+.table-warp .config-area .config-list li.no-click:hover label {
+	color: #666
+}
+
+.table-warp .config-area .config-list li .fake-checkbox {
+	display: inline-block;
+	width: 14px;
+	height: 14px;
+	position: relative;
+	border: 1px solid #999;
+	border-radius: 50%;
+	box-shadow: 0 0 1px 1px #e8e8e8;
+	vertical-align: middle;
+	margin-right: 5px
+}
+
+.table-warp .config-area .config-list li .fake-checkbox:after {
+	display: block;
+	width: 8px;
+	height: 8px;
+	position: absolute;
+	top: 2px;
+	left: 2px;
+	content: "";
+	background: #e8e8e8;
+	border-radius: 50%
+}
+
+.table-warp .config-area .config-list li:hover .fake-checkbox {
+	border-color: #09f
+}
+
+.table-warp .config-area .config-list li.checked-li .fake-checkbox:after
+	{
+	background: #09f
+}
+
+.table-warp table[grid-manager] th .remind-action {
+	width: 16px;
+	height: 16px;
+	position: absolute;
+	top: 4px;
+	left: 4px;
+	cursor: help
+}
+
+.table-warp table[grid-manager] th .remind-action .ra-area {
+	display: none;
+	min-width: 150px;
+	max-width: 300px;
+	position: absolute;
+	top: 80%;
+	left: 80%;
+	padding: 12px;
+	border: 3px solid #000;
+	z-index: 9999;
+	border-radius: 5px;
+	box-shadow: 3px 3px 10px 0 #222;
+	background-color: #000;
+	opacity: .8;
+	line-height: 14px;
+	color: #fff
+}
+
+.table-warp table[grid-manager] .set-top th .remind-action .ra-area {
+	visibility: hidden;
+	display: none
+}
+
+.table-warp table[grid-manager] .set-top th .remind-action:hover .ra-area
+	{
+	visibility: visible;
+	display: block !important
+}
+
+.table-warp table[grid-manager] th .remind-action .ra-help {
+	display: block;
+	width: 16px;
+	height: 16px;
+	font-size: 12px;
+	line-height: 18px;
+	color: #666
+}
+
+.table-warp table[grid-manager] th .remind-action:hover .ra-help {
+	color: #2b669a
+}
+
+.table-warp table[grid-manager] th .remind-action .ra-area .ra-title {
+	display: block;
+	text-align: left;
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	margin-bottom: 4px;
+	font-weight: 600;
+	font-size: 1.1em;
+	color: #FF6
+}
+
+.table-warp table[grid-manager] th .remind-action .ra-area .ra-con {
+	display: block;
+	font-weight: 500;
+	text-align: left;
+	font-size: .9em
+}
+
+#gm-export-action {
+	display: none
+}
+
+.table-warp .set-top {
+	display: none;
+	position: absolute;
+	left: 0;
+	top: 0;
+	z-index: 99
+}
+
+.table-warp .set-top .adjust-action, .table-warp .set-top .sorting-action
+	{
+	display: none !important
+}
+
+.table-warp .set-top .drag-action {
+	cursor: default !important
+}
+
+.table-warp table[grid-manager] thead.scrolling {
+	visibility: hidden
+}
+
+.table-warp .scroll-area {
+	height: 18px;
+	margin-top: -18px;
+	z-index: 9999;
+	overflow-x: auto;
+	overflow-y: hidden
+}
+
+.table-warp .scroll-area .sa-inner {
+	height: 20px
+}
+
+.table-warp table[grid-manager] th .th-warp {
+	width: 100%;
+	height: 100%;
+	position: relative;
+	padding: 4px;
+	text-align: center
+}
+
+.table-warp table[grid-manager] th .adjust-action {
+	display: block;
+	width: 4px;
+	height: 100%;
+	position: absolute;
+	top: 0;
+	right: -4px;
+	cursor: col-resize;
+	z-index: 2
+}
+
+.table-warp table[grid-manager] .adjust-selected {
+	border-right-width: 4px;
+	border-right-style: dashed;
+	border-right-color: #ccc
+}
+
+.table-warp table[grid-manager] .adjust-selected .drag-action {
+	cursor: col-resize
+}
+
+.table-warp .text-dreamland {
+	position: absolute;
+	top: 0;
+	left: 0;
+	white-space: nowrap;
+	visibility: hidden;
+	z-index: -1
+}
+
+.table-warp table[grid-manager] .sorting-action {
+	display: block;
+	width: 20px;
+	height: 18px;
+	position: absolute;
+	top: 4px;
+	right: 5px;
+	cursor: default;
+	z-index: 2;
+	color: #444
+}
+
+.table-warp table[grid-manager] .sorting-action:hover {
+	color: #000
+}
+
+.table-warp table[grid-manager] .sorting-action.sortion-up {
+	content: "\f102"
+}
+
+.table-warp table[grid-manager] .sorting-action.sortion-down {
+	content: "\f103"
+}
+
+.table-warp table[grid-manager] .sorting-action .sa-icon {
+	display: block;
+	height: 10px;
+	font-size: 12px;
+	line-height: 10px;
+	position: absolute
+}
+
+.table-warp table[grid-manager] .sorting-action .sa-up {
+	top: 0;
+	right: 0
+}
+
+.table-warp table[grid-manager] .sorting-action .sa-down {
+	bottom: 0;
+	right: 0
+}
+
+.table-warp table[grid-manager] .sorting-action.sorting-up .sa-up {
+	opacity: 1
+}
+
+.table-warp table[grid-manager] .sorting-action.sorting-down .sa-up,
+	.table-warp table[grid-manager] .sorting-action.sorting-up .sa-down {
+	opacity: .1
+}
+
+.table-warp table[grid-manager] .sorting-action.sorting-down .sa-down {
+	opacity: 1
+}
+
+.table-warp table[grid-manager] th .drag-action {
+	display: block;
+	width: 100%;
+	height: 100%;
+	cursor: all-scroll
+}
+
+.table-warp table[grid-manager] .drag-ongoing {
+	cursor: all-scroll;
+	background: #000 !important;
+	border-color: #ccc !important;
+	color: #fff !important;
+	opacity: .5
+}
+
+.table-warp table[grid-manager] .drag-ongoing.opacityChange {
+	opacity: 1;
+	-webkit-animation: opacityChange 1s ease-in-out infinite;
+	-moz-animation: opacityChange 1s ease-in-out infinite;
+	animation: opacityChange 1s ease-in-out infinite
+}
+
+.table-warp .dreamland-div {
+	display: none;
+	position: absolute;
+	border: 1px solid #ccc;
+	padding: 0;
+	background: #fff;
+	cursor: all-scroll;
+	z-index: 9
+}
+
+.table-warp .dreamland-div .dreamland-table {
+	table-layout: fixed;
+	width: 100%;
+	margin: 0 !important;
+	padding: 0 !important
+}
+
+.table-warp .dreamland-div .dreamland-table td {
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis
+}
+
+.table-warp table[grid-manager] [gm-create=true] {
+	width: 50px !important;
+	text-align: center;
+	cursor: default
+}
+
+.table-warp table[grid-manager] th[gm-create=true] {
+	background-color: #96a6ca;
+}
+
+.table-warp table[grid-manager] tr:hover td[gm-create=true] {
+	background-color: #e6eeee
+}
+
+.table-warp table[grid-manager] [gm-checkbox=true] input[type=checkbox]
+	{
+	vertical-align: middle
+}
+
+.table-warp table[grid-manager] .gm-emptyTemplate {
+	width: 100%;
+	height: 100px;
+	line-height: 100px;
+	text-align: center;
+	font-size: 24px;
+	color: #ddd;
+	background-color: #f8f8f8
+}
+
+.table-warp .mask-element {
+	width: 100%;
+	height: 100%;
+	position: absolute;
+	top: 0;
+	left: 0;
+	background: #000;
+	opacity: .6;
+	z-index: 9
+}
+
+@
+-webkit-keyframes opacityChange { 0%{
+	opacity: .1
+}
+
+100%{
+opacity
+:
+.7
+}
+}
+@
+-moz-keyframes opacityChange { 0%{
+	opacity: .1
+}
+
+100%{
+opacity
+:
+.7
+}
+}
+@
+keyframes opacityChange { 0%{
+	opacity: .1
+}
+
+100%{
+opacity
+:
+.7
+}
+}
+@
+-webkit-keyframes rotationMedia { 0%{
+	-webkit-transform: rotate(0)
+}
+
+100%{
+-webkit-transform
+:rotate(360deg)
+}
+}
+@
+-moz-keyframes rotationMedia { 0%{
+	-moz-transform: rotate(0)
+}
+
+100%{
+-moz-transform
+:rotate(360deg)
+}
+}
+@
+keyframes rotationMedia { 0%{
+	transform: rotate(0)
+}
+
+100%{
+transform
+:rotate(360deg)
+}
+}
+.hidden {
+	display: none
+}
+
+.table-warp .page-toolbar {
+	width: 100%;
+	padding-top: 10px;
+	clear: both
+}
+
+.table-warp .page-toolbar .dataTables_info {
+	display: inline-block;
+	padding: 5px
+}
+
+.table-warp .page-toolbar .change-size {
+	display: inline-block
+}
+
+.table-warp .page-toolbar .goto-page {
+	display: inline-block;
+	padding: 5px 10px
+}
+
+.table-warp .page-toolbar .goto-page .gp-input {
+	width: 50px;
+	height: 20px;
+	border: 1px solid #ccc;
+	padding: 0 5px;
+	margin: 0 5px
+}
+
+.table-warp .page-toolbar .refresh-action {
+	display: inline-block;
+	padding: 7.5px;
+	vertical-align: top;
+	color: #777
+}
+
+.table-warp .page-toolbar .refresh-action:hover {
+	color: #3276b1
+}
+
+.table-warp .page-toolbar .refresh-action .iconfont {
+	display: block;
+	width: 15px;
+	height: 15px;
+	cursor: pointer;
+	font-weight: 600;
+	line-height: 16px;
+	overflow: hidden
+}
+
+.table-warp .page-toolbar .refresh-action.refreshing {
+	-webkit-animation: rotationMedia 2s ease-in-out infinite;
+	-moz-animation: rotationMedia 2s ease-in-out infinite;
+	animation: rotationMedia 2s ease-in-out infinite
+}
+
+.table-warp .page-toolbar .ajax-page {
+	display: inline-block;
+	text-align: right;
+	vertical-align: middle;
+	float: right
+}
+
+.table-warp .page-toolbar .ajax-page .pagination {
+	display: inline-block;
+	margin: 0
+}
+
+.table-warp .page-toolbar .ajax-page .pagination li {
+	height: 30px;
+	display: inline
+}
+
+.pagination>li:first-child>a, .pagination>li:first-child>span {
+	border-bottom-left-radius: 2px;
+	border-top-left-radius: 2px;
+	margin-left: 0
+}
+
+.pagination li.disabled>a, .pagination li.disabled>a:focus, .pagination li.disabled>a:hover,
+	.pagination li.disabled>span, .pagination li.disabled>span:focus,
+	.pagination li.disabled>span:hover {
+	margin: 0px 3px 0px 3px;
+	background-color: #fff;
+	border-color: #ddd;
+	color: #999;
+	border-radius:3px;
+	cursor: not-allowed
+}
+
+.pagination li.active>a, .pagination li.active>a:focus, .pagination li.active>a:hover,
+	.pagination li.active>span, .pagination li.active>span:focus,
+	.pagination li.active>span:hover {
+	margin: 0px 3px 0px 3px;
+	background-color: #96a6ca;
+	border-color: #96a6ca;
+	border-radius:3px;
+	color: #fff;
+	cursor: default;
+	z-index: 2
+}
+
+.pagination>li>a, .pagination>li>span {
+	margin:0px 3px 0px 3px;
+	height: 30px;
+	padding: 5px 10px;
+	background-color: #fff;
+	border: 1px solid #ddd;
+	border-radius:3px;
+	color: #96a6ca;
+	float: left;
+	line-height: 1.42857;
+	position: relative;
+	text-decoration: none
+}
+
+.pagination li>a:hover, .pagination li>span, .pagination li>span:focus,
+	.pagination li>span:hover {
+	background-color: #eee;
+	border-color: #ddd;
+	color: #214e75
+}
+
+.table-warp .page-toolbar select[name=pSizeArea] {
+	height: 20px;
+	padding: 0px;
+	margin-left: 10px
+}
+
+.grid-menu[grid-master] {
+	display: none;
+	width: 200px;
+	max-height: 200px;
+	position: absolute;
+	border: 1px solid #ccc;
+	padding: 5px 0;
+	background-color: #fff;
+	z-index: 3
+}
+
+.grid-menu[grid-master] [grid-action] {
+	display: block;
+	position: relative;
+	padding: 5px 20px;
+	cursor: default
+}
+
+.grid-menu[grid-master] [grid-action]:hover {
+	background-color: #3276b1;
+	color: #fff
+}
+
+.grid-menu[grid-master] [grid-action].disabled {
+	color: #ccc;
+	background-color: #fff
+}
+
+.grid-menu[grid-master] [grid-action] .iconfont {
+	display: block;
+	width: 18px;
+	height: 18px;
+	font-size: 18px;
+	position: absolute;
+	top: 5px;
+	right: 10px
+}
+
+.grid-menu[grid-master] .grid-line {
+	display: block;
+	height: 3px;
+	background-color: #e8e8e8;
+	border-top: 1px solid #f8f8f8;
+	border-bottom: 1px solid #f8f8f8
+}

+ 1295 - 0
gkaqv2/trunk/modules/web/src/main/webapp/static/js/common/grid/GridManager.js

@@ -0,0 +1,1295 @@
+!
+function() {
+    "use strict";
+    function e(e) {
+        "undefined" == typeof e ? e = {}: "",
+        this.version = "2.0",
+        this.isDevelopMode = !1,
+        this.basePath = "",
+        this.useDefaultStyle = !0,
+        this.supportDrag = !0,
+        this.isRealTime = !1,
+        this.supportAdjust = !0,
+        this.supportRemind = !1,
+        this.supportConfig = !0,
+        this.supportSetTop = !0,
+        this.scrollDOM = window,
+        this.topValue = 0,
+        this.animateTime = 300,
+        this.disableCache = !1,
+        this.autoLoadCss = !1,
+        this.supportSorting = !1,
+        this.isCombSorting = !1,
+        this.sortData = {},
+        this.sortUpText = "up",
+        this.sortDownText = "down",
+        this.sortingBefore = $.noop,
+        this.sortingAfter = $.noop,
+        this.supportAjaxPage = !1,
+        this.sizeData = [10, 20, 30, 50, 100],
+        this.pageSize = 20,
+        this.pageData = {},
+        this.query = {},
+        this.pagingBefore = $.noop,
+        this.pagingAfter = $.noop,
+        this.pageCssFile = "",
+        this.supportAutoOrder = !0,
+        this.orderThName = "order",
+        this.supportCheckbox = !0,
+        this.checkboxThName = "gm-checkbox",
+        this.i18n = "zh-cn",
+        this.columnData = [],
+        this.gridManagerName = "",
+        this.ajax_url = "",
+        this.ajax_type = "GET",
+        this.ajax_beforeSend = $.noop,
+        this.ajax_success = $.noop,
+        this.ajax_complete = $.noop,
+        this.ajax_error = $.noop,
+        this.ajax_data = void 0,
+        this.dataKey = "data",
+        this.totalsKey = "totals",
+        this.supportExport = !0;
+        var t = {};
+        "object" == typeof gridManagerConfig && ($.extend(!0, t, this.textConfig, gridManagerConfig.textConfig), $.extend(!0, this, gridManagerConfig)),
+        $.extend(!0, t, this.textConfig, e.textConfig),
+        $.extend(this, e, {
+            textConfig: t
+        })
+    }
+    e.prototype = {
+        isChrome: function() {
+            return navigator.userAgent.indexOf("Chrome") != -1
+        },
+        getRandom: function() {
+            return this.version + Math.random()
+        },
+        init: function(e, t) {
+            var a = this;
+            if (a.cleanTableCacheForVersion(e), "string" == typeof a.gridManagerName && "" !== a.gridManagerName.trim() || (a.gridManagerName = e.attr("grid-manager")), "" === a.gridManagerName.trim()) return a.outLog("请在html标签中为属性[grid-manager]赋值或在配置项中配置gridManagerName", "error"),
+            !1;
+            if (e.hasClass("GridManager-ready") || e.hasClass("GridManager-loading")) return a.outLog("渲染失败:可能该表格已经渲染或正在渲染", "error"),
+            !1;
+            a.supportAjaxPage && a.configPageForCache(e);
+            var i = $.extend({},
+            a.query, a.pageData);
+            return e.addClass("GridManager-loading"),
+            a.loadGridManagerFile(function() {
+                a.initTable(e),
+                "undefined" != typeof e.attr("grid-manager-cache-error") && window.setTimeout(function() {
+                    a.setToLocalStorage(e, !0),
+                    e.removeAttr("grid-manager-cache-error")
+                },
+                1e3),
+                "function" == typeof t ? t(i) : ""
+            }),
+            e
+        },
+        setGridManagerToJQuery: function(e) {
+            e.data("gridManager", this)
+        },
+        get: function(e) {
+            return this.__getGridManager(e)
+        },
+        __getGridManager: function(e) {
+            return e.data("gridManager")
+        },
+        setSort: function(e, t, a, i) {
+            var n = this;
+            if (0 == e.length || !t || $.isEmptyObject(t)) return ! 1;
+            "undefined" == typeof i && (i = !0);
+            var r, o, s;
+            for (var c in t) r = $('[th-name="' + c + '"]', e),
+            s = t[c],
+            o = $(".sorting-action", r),
+            s == n.sortUpText ? (r.attr("sorting", n.sortUpText), o.removeClass("sorting-down"), o.addClass("sorting-up")) : s == n.sortDownText && (r.attr("sorting", n.sortDownText), o.removeClass("sorting-up"), o.addClass("sorting-down"));
+            return i ? n.__refreshGrid(a) : "function" == typeof a ? a() : "",
+            e
+        },
+        loadGridManagerFile: function(e) {
+            function t() {
+                i && n && e()
+            }
+            var a = this,
+            i = !1,
+            n = !1;
+            if (0 == $("link#GridManager-css").length && a.autoLoadCss) {
+                var r = document.createElement("link");
+                r.id = "GridManager-css",
+                r.rel = "stylesheet",
+                r.type = "text/css",
+                r.href = a.basePath + "css/GridManager.css",
+                document.head.appendChild(r),
+                r.addEventListener("load",
+                function(e) {
+                    a.outLog("GridManager-css load OK", "info"),
+                    i = !0,
+                    t()
+                }),
+                r.addEventListener("error",
+                function() {
+                    a.outLog("GridManager-css load error", "error"),
+                    i = !1
+                })
+            } else i = !0;
+            if (a.supportAjaxPage && 0 == $("link#GridManager-ajaxPage-css").length && a.pageCssFile && "" != a.pageCssFile) {
+                var o = document.createElement("link");
+                o.id = "GridManager-ajaxPage-css",
+                o.rel = "stylesheet",
+                o.type = "text/css",
+                o.href = a.pageCssFile,
+                document.head.appendChild(o),
+                o.addEventListener("load",
+                function(e) {
+                    a.outLog("GridManager-ajaxPage-css load OK", "info"),
+                    n = !0,
+                    t()
+                }),
+                o.addEventListener("error",
+                function() {
+                    a.outLog("GridManager-ajaxPage-css load error", "error"),
+                    n = !1
+                })
+            } else n = !0;
+            t()
+        },
+        initTable: function(e) {
+            var t = this;
+            t.createDOM(e),
+            t.disableCache || t.configTheadForCache(e),
+            t.supportAdjust && t.bindAdjustEvent(e),
+            t.supportDrag && t.bindDragEvent(e),
+            t.supportSorting && t.bindSortingEvent(e),
+            t.supportRemind && t.bindRemindEvent(e),
+            t.supportConfig && t.bindConfigEvent(e),
+            t.supportSetTop && t.bindSetTopFunction(e),
+            t.bindRightMenuEvent(e),
+            t.__refreshGrid(),
+            t.setGridManagerToJQuery(e)
+        },
+        cacheData: {},
+        getRowData: function(e, t) {
+            return this.cacheData[$(t).attr("cache-key")]
+        },
+        refreshGrid: function(e, t, a) {
+            var i = this;
+            "boolean" != typeof t && (a = t, t = !1),
+            t && (i.pageData.cPage = 1),
+            i.__refreshGrid(a)
+        },
+        __refreshGrid: function(e) {
+            function t() {
+                window.setTimeout(function() {
+                    o.removeClass("refreshing")
+                },
+                2e3)
+            }
+            function a(t) {
+                if (!t) return void i.outLog("请求数据失败!请查看配置参数[ajax_url或ajax_data]是否配置正确,并查看通过该地址返回的数据格式是否正确", "error");
+                var a, o, s, c, d = "",
+                l = "string" == typeof t ? JSON.parse(t) : t,
+                g = l[i.dataKey];
+                i.cacheData = {},
+                g && 0 !== g.length ? ($.each(g,
+                function(e, t) {
+                    i.cacheData[e] = t,
+                    d += '<tr '+ (e%2==0?'class="trOdd"':'class="trEven"') + 'cache-key="' + e + '">',
+                    $.each(i.columnData,
+                    function(e, i) {
+                        a = i.key,
+                        s = i.template,
+                        c = "function" == typeof s ? s(t[a], t) : t[a],
+                        o = i.align ? 'style="text-align:' + i.align + '"': "",
+                        d += "<td " + o + ">" + (null==c?"":c) + "</td>"
+                    }),
+                    d += "</tr>"
+                }), r.html(d), i.resetTd(n, !1)) : (d = '<tr emptyTemplate><td colspan="' + $('th[th-visible="visible"]', n).length + '">' + (i.emptyTemplate || '<div class="gm-emptyTemplate">数据为空</div>') + "</td></tr>", l.totals = 0, r.html(d)),
+                i.supportAjaxPage && (i.resetPageData(n, l[i.totalsKey]), i.checkMenuPageAction()),
+                "function" == typeof e ? e() : ""
+            }
+            var i = this,
+            n = $('table[grid-manager="' + i.gridManagerName + '"]'),
+            r = $("tbody", n),
+            o = $(".page-toolbar .refresh-action", n.closest(".table-warp"));
+            if (o.addClass("refreshing"), i.ajax_data) return a(i.ajax_data),
+            i.ajax_success(i.ajax_data),
+            t(),
+            void("function" == typeof e ? e() : "");
+            if ("string" != typeof i.ajax_url || "" === i.ajax_url) return i.outLog("请求表格数据失败!参数[ajax_url]配制错误", "error"),
+            t(),
+            void("function" == typeof e ? e() : "");
+            var s = $.extend({},
+            i.query);
+            return i.supportAjaxPage && $.extend(s, i.pageData),
+            i.supportSorting && $.extend(s, i.sortData),
+//            s.cPage < 1 || s.cPage > s.tPage ? (i.outLog("请求表格数据失败!分页信息错误", "error"), t(), void("function" == typeof e ? e() : "")) : void $.ajax({
+            s.cPage < 1 ? (i.outLog("请求表格数据失败!分页信息错误", "error"), t(), void("function" == typeof e ? e() : "")) : void $.ajax({  
+            url: i.ajax_url,
+                type: i.ajax_type,
+                data: s,
+                cache: !0,
+                beforeSend: function(e) {
+                    i.ajax_beforeSend(e)
+                },
+                success: function(e) {
+                    a(e),
+                    i.ajax_success(e)
+                },
+                error: function(e, t, a) {
+                    i.ajax_error(e, t, a)
+                },
+                complete: function(e, a) {
+                    i.ajax_complete(e, a),
+                    t()
+                }
+            })
+        },
+        checkMenuPageAction: function() {
+            var e = this,
+            t = $('.grid-menu[grid-master="' + e.gridManagerName + '"]');
+            if (t && 0 !== t.length) {
+                var a = $('[refresh-type="previous"]', t),
+                i = $('[refresh-type="next"]', t);
+                1 === e.pageData.cPage || 0 === e.pageData.tPage ? a.addClass("disabled") : a.removeClass("disabled"),
+                e.pageData.cPage === e.pageData.tPage || 0 === e.pageData.tPage ? i.addClass("disabled") : i.removeClass("disabled")
+            }
+        },
+        initOrderDOM: function(e) {
+            var t = this,
+            a = '<th th-name="' + t.orderThName + '" gm-order="true" gm-create="true">' + t.i18nText("order-text") + "</th>";
+            $("thead tr", e).prepend(a)
+        },
+        initCheckboxDOM: function(e) {
+            var t = this,
+            a = '<th th-name="' + t.checkboxThName + '" gm-checkbox="true" gm-create="true"><input type="checkbox"/><span style="display: none">' + t.i18nText("checkall-text") + "</span></th>";
+            $("thead tr", e).prepend(a),
+            e.off("click", 'input[type="checkbox"]'),
+            e.on("click", 'input[type="checkbox"]',
+            function() {
+                var a = $(this),
+                i = !0,
+                n = $('thead th[gm-checkbox] input[type="checkbox"]', e),
+                r = $('tbody td[gm-checkbox] input[type="checkbox"]', e);
+                1 === a.closest('th[th-name="' + t.checkboxThName + '"]').length ? $.each(r,
+                function(e, t) {
+                    t.checked = a.prop("checked"),
+                    $(t).closest("tr").attr("checked", t.checked)
+                }) : ($.each(r,
+                function(e, t) {
+                    t.checked === !1 && (i = !1),
+                    $(t).closest("tr").attr("checked", t.checked)
+                }), n.prop("checked", i))
+            })
+        },
+        getCheckedTr: function(e) {
+            return $('tbody td[gm-checkbox] input[type="checkbox"]:checked', e).closest("tr")
+        },
+        createDOM: function(e) {
+            var t = this;
+            e.attr({
+                width: "100%",
+                cellspacing: 1,
+                cellpadding: 0,
+                "grid-manager": t.gridManagerName
+            });
+            var a = "<thead>",
+            i = "<tbody></tbody>",
+            n = "",
+            r = "",
+            o = "",
+            s = "";
+            $.each(t.columnData,
+            function(e, i) {
+                t.supportRemind && "string" == typeof i.remind && "" !== i.remind && (o = 'remind="' + i.remind + '"'),
+                s = "",
+                t.supportSorting && "string" == typeof i.sorting && (i.sorting === t.sortDownText ? (s = 'sorting="' + t.sortDownText + '"', t.sortData[i.key] = t.sortDownText) : i.sorting === t.sortUpText ? (s = 'sorting="' + t.sortUpText + '"', t.sortData[i.key] = t.sortUpText) : s = "sorting"),
+                r = i.width ? 'width="' + i.width + '"': "",
+                n = i.align ? 'align="' + i.align + '"': "",
+                a += '<th th-name="' + i.key + '" ' + o + " " + s + " " + r + " " + n + ">" + i.text + "</th>"
+            }),
+            a += "</thead>",
+            e.html(a + i),
+            t.supportAutoOrder && t.initOrderDOM(e),
+            t.supportCheckbox && t.initCheckboxDOM(e),
+            t.setOriginalThDOM(e);
+            var c = '<div class="remind-action"><i class="ra-help iconfont icon-icon"></i><div class="ra-area"><span class="ra-title"></span><span class="ra-con"></span></div></div>',
+            d = '<div class="config-area"><span class="config-action"><i class="iconfont icon-31xingdongdian"></i></span><ul class="config-list"></ul></div>',
+            l = '<span class="adjust-action"></span>',
+            g = '<div class="sorting-action"><i class="sa-icon sa-up iconfont icon-sanjiao2"></i><i class="sa-icon sa-down iconfont icon-sanjiao1"></i></div>',
+            h = '<a href="" download="" id="gm-export-action"></a>';
+            if (t.supportAjaxPage) var p = '<div class="page-toolbar"><div class="dataTables_info"></div><div class="change-size"><select name="pSizeArea"></select></div><div class="goto-page">' + t.i18nText("goto-first-text") + '<input type="text" class="gp-input"/>' + t.i18nText("goto-last-text") + '</div><div class="refresh-action"><i class="iconfont icon-shuaxin"></i></div><div class="ajax-page"><ul class="pagination"></ul></div></div>';
+            var u, f, m, v, b, x, w, y, T, C, k, D, M, S;
+            t.checkTable(e),
+            t.useDefaultStyle && e.addClass("grid-manager-default"),
+            v = $("thead", e),
+            b = v.find("th"),
+            e.wrap('<div class="table-warp"><div class="table-div"></div><span class="text-dreamland"></span></div>'),
+            u = e.parents(".table-warp").eq(0),
+            m = $(".table-div", u),
+            t.supportConfig && u.append(d),
+            f = e.attr("grid-manager"),
+            t.supportAjaxPage && (u.append(p), t.initAjaxPage(e)),
+            t.supportExport && u.append(h),
+            t.supportSetTop && m.after('<div class="scroll-area"><div class="sa-inner"></div></div>'),
+            $.each(b,
+            function(e, a) {
+                x = $(a),
+                x.attr("th-visible", "visible"),
+                M = !(!t.supportAutoOrder || "true" != x.attr("gm-order")),
+                S = !(!t.supportCheckbox || "true" != x.attr("gm-checkbox")),
+                w = $('<div class="th-warp"></div>'),
+                y = t.isChrome() ? x.css("padding") : x.css("padding-top") + " " + x.css("padding-right") + " " + x.css("padding-bottom") + " " + x.css("padding-left"),
+                y = $.trim(y),
+                "" != y && "0px" != y && "0px 0px 0px 0px" != y && (w.css("padding", y), x.css("cssText", "padding:0px!important")),
+                t.supportConfig && $(".config-list", u).append('<li th-name="' + x.attr("th-name") + '" class="checked-li"><input type="checkbox" checked="checked"/><label><span class="fake-checkbox"></span>' + x.text() + "</label></li>"),
+                !t.supportDrag || M || S ? w.html('<span class="th-text">' + x.html() + "</span>") : w.html('<span class="th-text drag-action">' + x.html() + "</span>");
+                var i = w.css("padding-top");
+                if (!t.supportRemind || void 0 == x.attr("remind") || M || S || (T = $(c), T.find(".ra-title").text(x.text()), T.find(".ra-con").text(x.attr("remind") || x.text()), "" != i && "0px" != i && T.css("top", i), w.append(T)), D = x.attr("sorting"), t.supportSorting && void 0 != D && !M && !S) {
+                    switch (k = $(g), D) {
+                    case t.sortUpText:
+                        k.addClass("sorting-up");
+                        break;
+                    case t.sortDownText:
+                        k.addClass("sorting-down")
+                    }
+                    "" != i && "0px" != i && k.css("top", i),
+                    w.append(k)
+                }
+                t.supportAdjust && !S && (C = $(l), e == b.length - 1 && C.hide(), w.append(C)),
+                x.html(w);
+                var n = x.prop("width");
+                if (n && "" !== n) x.width(n),
+                x.removeAttr("width");
+                else {
+                    var r = t.getTextWidth(x);
+                    x.css("min-width", r)
+                }
+            }),
+            e.removeClass("GridManager-loading"),
+            e.addClass("GridManager-ready")
+        },
+        checkTable: function(e) {
+            var t = this,
+            e = $(e),
+            a = $("thead th", e),
+            i = !1;
+            $.each(a,
+            function(e, a) {
+                a.getAttribute("th-name") || (i ? "": i = !0, a.setAttribute("th-name", "auto-th-" + t.getRandom()))
+            }),
+            i && e.attr("no-cache", "true")
+        },
+        bindConfigEvent: function(e) {
+            var t = this,
+            a = $(e).parents("div.table-warp"),
+            i = $(".config-action", a);
+            i.unbind("click"),
+            i.bind("click",
+            function() {
+                var e = $(this),
+                t = e.closest(".config-area");
+                $(".config-list", t);
+                if ("block" == t.css("display")) return t.hide(),
+                !1;
+                t.show();
+                var a, i = e.parents(".table-warp").eq(0),
+                n = $("[grid-manager]", i),
+                r = $("thead th", n),
+                o = $("tbody tr", n);
+                $.each(r,
+                function(e, t) {
+                    t = $(t),
+                    $.each(o,
+                    function(e, i) {
+                        a = $("td", i).eq(t.index()),
+                        a.css("display", t.css("display"))
+                    })
+                });
+                var s = $(".checked-li", t);
+                1 == s.length ? s.addClass("no-click") : s.removeClass("no-click")
+            }),
+            $(".config-list li", a).unbind("click"),
+            $(".config-list li", a).bind("click",
+            function() {
+                var e, a = $(this),
+                i = (a.closest(".config-area"), a.attr("th-name")),
+                n = a.find('input[type="checkbox"]'),
+                r = a.closest(".table-warp"),
+                o = $(".table-div", r),
+                s = $("[grid-manager]", r),
+                c = $('thead th[th-name="' + i + '"]', s);
+                if (a.hasClass("no-click")) return ! 1;
+                a.closest(".config-list").find(".no-click").removeClass("no-click");
+                var d = !n.get(0).checked;
+                o.addClass("config-editing"),
+                t.setAreVisible(c, d, !1,
+                function() {
+                    o.removeClass("config-editing")
+                }),
+                e = $('.config-area input[type="checkbox"]:checked', r),
+                1 == e.length && e.parent().addClass("no-click"),
+                t.resetAdjust(s),
+                t.supportSetTop && $(".sa-inner", r).width("100%");
+                var l = $('thead th[th-visible="visible"]', s);
+                $.each(l,
+                function(e, t) {
+                    t.style.width = "auto"
+                }),
+                $.each(l,
+                function(e, a) {
+                    var i = t.getTextWidth(a),
+                    n = $(a).width();
+                    n < i ? $(a).width(i) : $(a).width(n)
+                }),
+                t.setToLocalStorage(s)
+            })
+        },
+        showTh: function(e, t) {
+            var a = this;
+            a.setAreVisible($(t), !0)
+        },
+        hideTh: function(e, t) {
+            var a = this;
+            a.setAreVisible($(t), !1)
+        },
+        setAreVisible: function(e, t, a, i) {
+            var n, r, o, s, c, d, l = $(this),
+            g = [],
+            h = a ? 0 : l.animateTime;
+            $.each(e,
+            function(e, l) {
+                o = $(l),
+                n = o.closest("table"),
+                r = n.closest(".table-warp"),
+                s = $("tbody tr", n),
+                c = $('.config-area li[th-name="' + o.attr("th-name") + '"]', r),
+                d = c.find('input[type="checkbox"]'),
+                0 != d.length && ($.each(s,
+                function(e, t) {
+                    g.push($(t).find("td").eq(o.index()))
+                }), t ? (o.attr("th-visible", "visible"), $.each(g,
+                function(e, t) {
+                    a ? $(t).show() : $(t).fadeIn(h)
+                }), c.addClass("checked-li"), d.get(0).checked = !0) : (o.attr("th-visible", "none"), $.each(g,
+                function(e, t) {
+                    $(t).hide()
+                }), c.removeClass("checked-li"), d.get(0).checked = !1), "function" == typeof i ? i() : "")
+            })
+        },
+        bindRemindEvent: function(e) {
+            var t, a, i, n = $(".remind-action", e);
+            n.unbind("mouseenter"),
+            n.bind("mouseenter",
+            function() {
+                t = $(this).find(".ra-area"),
+                a = $(this).closest(".table-div"),
+                t.show(),
+                i = a.get(0).offsetWidth - ($(this).offset().left - a.offset().left) > t.get(0).offsetWidth,
+                t.css({
+                    left: i ? "0px": "auto",
+                    right: i ? "auto": "0px"
+                })
+            }),
+            n.unbind("mouseleave"),
+            n.bind("mouseleave",
+            function() {
+                t = $(this).find(".ra-area"),
+                t.hide()
+            })
+        },
+        bindSortingEvent: function(e) {
+            var t, a, i, n, r, o = this,
+            s = $("th[sorting]", e);
+            $(".sorting-action", s).unbind("mouseup"),
+            $(".sorting-action", s).bind("mouseup",
+            function() {
+                if (t = $(this), a = t.closest("th"), i = a.closest("table"), n = i.attr("grid-manager"), r = a.attr("th-name"), !r || "" == $.trim(r)) return o.outLog("排序必要的参数丢失", "error"),
+                !1;
+                o.isCombSorting || $.each($(".sorting-action", i),
+                function(e, a) {
+                    a != t.get(0) && ($(a).removeClass("sorting-up sorting-down"), $(a).closest("th").attr("sorting", ""))
+                }),
+                t.hasClass("sorting-down") ? (t.addClass("sorting-up"), t.removeClass("sorting-down"), a.attr("sorting", o.sortUpText)) : (t.addClass("sorting-down"), t.removeClass("sorting-up"), a.attr("sorting", o.sortDownText)),
+                o.isCombSorting ? $.each($("th[th-name][sorting]", i),
+                function(e, t) {
+                    "" != t.getAttribute("sorting") && (o.sortData[t.getAttribute("th-name")] = t.getAttribute("sorting"))
+                }) : (o.sortData = {},
+                o.sortData[a.attr("th-name")] = a.attr("sorting"));
+                var e = $.extend({},
+                o.query, o.sortData, o.pageData);
+                o.sortingBefore(e),
+                o.__refreshGrid(function() {
+                    o.sortingAfter(e, a)
+                })
+            })
+        },
+        bindDragEvent: function(e) {
+            var t, a, i, n, r, o, s, c, d, l, g, h, p, u = this,
+            f = $("thead th", e),
+            m = f.find(".drag-action");
+            m.unbind("mousedown"),
+            m.bind("mousedown",
+            function() {
+                t = $(this).closest("th"),
+                a = void 0,
+                i = void 0,
+                n = void 0,
+                r = void 0,
+                o = t.parent(),
+                s = o.find("th"),
+                c = o.parents("table").eq(0),
+                d = c.parents(".table-div").eq(0),
+                l = c.find("tbody").find("tr").find("td:eq(" + t.index() + ")"),
+                $("body").addClass("no-select-text"),
+                g = d.css("position"),
+                "relative" != g && "absolute" != g && d.css("position", "relative"),
+                u.isRealTime ? (t.addClass("drag-ongoing"), l.addClass("drag-ongoing"), window.clearInterval(p), p = window.setInterval(function() {
+                    l = c.find("tbody tr").find("td:eq(" + t.index() + ")"),
+                    l.addClass("drag-ongoing")
+                },
+                100)) : (t.addClass("drag-ongoing opacityChange"), l.addClass("drag-ongoing opacityChange")),
+                h = $('<div class="dreamland-div"></div>'),
+                d.parent().append(h);
+                var e, f, m = '<table class="dreamland-table ' + c.attr("class") + '"><thead><tr><th style="height:' + t.get(0).offsetHeight + 'px">' + t.find(".drag-action").get(0).outerHTML + "</th></tr></thead><tbody>";
+                $.each(l,
+                function(t, a) {
+                    f = a.cloneNode(!0),
+                    f.style.height = a.offsetHeight + "px",
+                    e = $(a).closest("tr").clone(),
+                    m += e.html(f.outerHTML).get(0).outerHTML
+                }),
+                m += "</tbody></table>",
+                h.html(m),
+                $("body").unbind("mousemove"),
+                $("body").bind("mousemove",
+                function(e) {
+                    a = void 0,
+                    0 != t.index() && (a = s.eq(t.index() - 1)),
+                    i = void 0,
+                    t.index() != s.length - 1 && (i = s.eq(t.index() + 1)),
+                    a && "true" === a.attr("gm-create") ? a = void 0 : i && "true" === i.attr("gm-create") && (i = void 0),
+                    h.show(),
+                    h.css({
+                        width: t.get(0).offsetWidth,
+                        height: c.get(0).offsetHeight,
+                        left: e.clientX - d.offset().left + d.get(0).scrollLeft + (document.body.scrollLeft || document.documentElement.scrollLeft) - t.get(0).offsetWidth / 2,
+                        top: e.clientY - d.offset().top + d.get(0).scrollTop + (document.body.scrollTop || document.documentElement.scrollTop) - h.find("th").get(0).offsetHeight / 2
+                    }),
+                    a && 0 != a.length && h.get(0).offsetLeft < a.get(0).offsetLeft && (n = c.find("tbody").find("tr").find("td:eq(" + a.index() + ")"), a.before(t), $.each(l,
+                    function(e, t) {
+                        n.eq(e).before(t)
+                    }), s = o.find("th")),
+                    i && 0 != i.length && h.get(0).offsetLeft > i.get(0).offsetLeft - h.get(0).offsetWidth / 2 && (r = c.find("tbody").find("tr").find("td:eq(" + i.index() + ")"), i.after(t), $.each(l,
+                    function(e, t) {
+                        r.eq(e).after(t)
+                    }), s = o.find("th"))
+                }),
+                $("body").unbind("mouseup"),
+                $("body").bind("mouseup",
+                function() {
+                    $("body").unbind("mousemove"),
+                    h = $(".dreamland-div"),
+                    0 != h.length && h.animate({
+                        top: c.get(0).offsetTop,
+                        left: t.get(0).offsetLeft - d.get(0).scrollLeft
+                    },
+                    u.animateTime,
+                    function() {
+                        d.css("position", g),
+                        t.removeClass("drag-ongoing"),
+                        l.removeClass("drag-ongoing"),
+                        h.remove()
+                    }),
+                    u.setToLocalStorage(c),
+                    u.resetAdjust(c),
+                    $("body").removeClass("no-select-text"),
+                    u.isRealTime && window.clearInterval(p)
+                })
+            })
+        },
+        bindAdjustEvent: function(e) {
+            var t = this,
+            a = $("thead th", e);
+            a.off("mousedown", ".adjust-action"),
+            a.on("mousedown", ".adjust-action",
+            function(e) {
+                var a = $(this),
+                i = a.parents("th").eq(0),
+                n = i.parent(),
+                r = n.parents("table").eq(0),
+                o = r.parents(".table-div").eq(0),
+                s = (o.parents(".table-warp"), $(".th-warp", i)),
+                a = $(".drag-action", s),
+                c = n.find("th[th-visible!=none]"),
+                d = c.eq(i.index() + 1),
+                l = c.eq(c.length - 1),
+                g = c.eq(c.length - 2),
+                h = r.find("tbody").find("tr").find("td:eq(" + i.index() + ")");
+                $.each(c,
+                function(e, t) {
+                    "auto" != t.style.width && "" != t.style.width || $(t).width($(t).width())
+                }),
+                i.addClass("adjust-selected"),
+                h.addClass("adjust-selected");
+                var p, u, f = (e.clientX, t.getTextWidth(i));
+                return r.unbind("mousemove"),
+                r.bind("mousemove",
+                function(e) {
+                    p = e.clientX - i.offset().left - i.css("padding-left").split("px")[0] - i.css("padding-right").split("px")[0],
+                    p < f && (p = f),
+                    i.index() == g.index() && (u = i.width() - p + l.width(), l.width(Math.ceil(u < f ? f: u))),
+                    i.width(Math.ceil(p));
+                    var a = t.isChrome() ? r.get(0).offsetWidth == o.width() || r.get(0).offsetWidth == o.width() + 1 || r.get(0).offsetWidth == o.width() - 1 : r.get(0).offsetWidth == o.width();
+                    a && i.width() > p && d.width(Math.ceil(d.width() + i.width() - p)),
+                    t.supportSetTop && $(t.scrollDOM).trigger("scroll")
+                }),
+                r.unbind("mouseup mouseleave"),
+                r.bind("mouseup mouseleave",
+                function() {
+                    r.unbind("mousemove mouseleave"),
+                    i.removeClass("adjust-selected"),
+                    h.removeClass("adjust-selected"),
+                    t.supportSetTop && $(t.scrollDOM).trigger("scroll"),
+                    t.setToLocalStorage(r)
+                }),
+                !1
+            })
+        },
+        getTextWidth: function(e) {
+            var t = $(e),
+            a = $(".th-warp", t),
+            i = $(".th-text", t),
+            n = $(".remind-action", a),
+            r = $(".sorting-action", a),
+            o = $(".text-dreamland", t.parents(".table-warp"));
+            o.text(i.text()),
+            o.css({
+                fontSize: i.css("font-size"),
+                fontWeight: i.css("font-weight"),
+                fontFamily: i.css("font-family")
+            });
+            var s = a.css("padding-left").split("px")[0] || 0,
+            c = a.css("padding-right").split("px")[0] || 0,
+            d = o.width() + (Number(s) ? Number(s) : 0) + (Number(c) ? Number(c) : 0) + (1 == n.length ? 20 : 5) + (1 == r.length ? 20 : 5);
+            return d
+        },
+        bindSetTopFunction: function(e) {
+            var t = this;
+            $(window).resize(function() {
+                $(t.scrollDOM).trigger("scroll", [!0])
+            }),
+            $(".scroll-area").unbind("scroll"),
+            $(".scroll-area").bind("scroll",
+            function() {
+                $(this).parents(".table-div").scrollLeft(this.scrollLeft),
+                this.style.left = this.scrollLeft + "px"
+            }),
+            t.scrollDOM != window && $(t.scrollDOM).css("padding", "0px"),
+            $(t.scrollDOM).unbind("scroll"),
+            $(t.scrollDOM).bind("scroll",
+            function(a, i) {
+                var n, r, o, s, c, d, l, g, h = $(this),
+                p = h.scrollTop(),
+                u = 0,
+                f = void 0;
+                if (n = e.parents(".table-div").eq(0), r = n.parents(".table-warp").eq(0), c = e.get(0), d = $('> thead[class!="set-top"]', e), g = $("tbody", e), !n || 0 == n.length) return ! 0;
+                if (u = t.scrollDOM == window ? n.offset().top: 0, s = c.offsetTop, o = $(".set-top", e), 0 == $("tr", g).length) return ! 0;
+                var m = $(".scroll-area", r);
+                return n.width() < e.width() ? (f = t.scrollDOM == window ? Number(n.height()) + Number(r.css("margin-bottom").split("px")[0]) - (document.body.scrollTop || document.documentElement.scrollTop || window.scrollY) - (window.innerHeight - n.offset().top) : Number(n.height()) + Number(r.css("margin-bottom").split("px")[0]) - h.scrollTop() - h.height(), f < 0 && (f = 0), $(".sa-inner", m).css({
+                    width: e.width()
+                }), m.css({
+                    bottom: f - 18,
+                    left: n.scrollLeft()
+                }), m.scrollLeft(n.scrollLeft()), m.show()) : m.hide(),
+                (t.scrollDOM == window ? u - p >= -s: 0 == p) ? (d.hasClass("scrolling") && d.removeClass("scrolling"), o.remove(), !0) : t.scrollDOM == window && (u - p < 0 && Math.abs(u - p) + d.height() - s > n.height()) ? (o.show(), o.css({
+                    top: "auto",
+                    bottom: "0px"
+                }), !0) : ((0 == o.length || i) && (0 == o.length ? e.append(d.clone(!1).addClass("set-top")) : "", o = $(".set-top", e), o.css({
+                    width: d.width() + Number(d.css("border-left-width").split("px")[0] || 0) + Number(d.css("border-right-width").split("px")[0] || 0),
+                    left: e.css("border-left-width")
+                }), l = $("th", d), $.each($("th", o),
+                function(e, t) {
+                    $(t).css({
+                        width: l.eq(e).width() + Number(l.eq(e).css("border-left-width").split("px")[0] || 0) + Number(l.eq(e).css("border-right-width").split("px")[0] || 0)
+                    })
+                })), o.css("background") && "" != o.css("background") && "none" != o.css("background") || o.css("background", "#f5f5f5"), !(t.scrollDOM != window || u - p < 0 && Math.abs(u - p) <= n.height() + s) || (d.hasClass("scrolling") || d.addClass("scrolling"), o.css({
+                    top: p - u + t.topValue,
+                    bottom: "auto"
+                }), o.show(), !0))
+            }),
+            $(t.scrollDOM).trigger("scroll")
+        },
+        bindRightMenuEvent: function(e) {
+            function t(e, t) {
+                return !! $(e).hasClass("disabled") && (t.stopPropagation(), t.preventDefault(), !0)
+            }
+            var a = this,
+            i = $(e).closest(".table-warp"),
+            n = ($("tbody", i), '<div class="grid-menu" grid-master="' + a.gridManagerName + '">');
+            a.supportAjaxPage && (n += '<span grid-action="refresh-page" refresh-type="previous">' + a.i18nText("previous-page") + '<i class="iconfont icon-sanjiao2"></i></span><span grid-action="refresh-page" refresh-type="next">' + a.i18nText("next-page") + '<i class="iconfont icon-sanjiao1"></i></span>'),
+            n += '<span grid-action="refresh-page" refresh-type="refresh">' + a.i18nText("refresh") + '<i class="iconfont icon-31shuaxin"></i></span>',
+            a.supportExport && (n += '<span class="grid-line"></span><span grid-action="export-excel" only-checked="false">' + a.i18nText("save-as-excel") + '<i class="iconfont icon-baocun"></i></span><span grid-action="export-excel" only-checked="true">' + a.i18nText("save-as-excel-for-checked") + '<i class="iconfont icon-saveas24"></i></span>'),
+            a.supportConfig && (n += '<span class="grid-line"></span><span grid-action="setting-grid">' + a.i18nText("setting-grid") + '<i class="iconfont icon-shezhi"></i></span>'),
+            n += "</div>";
+            var r = $("body");
+            r.append(n);
+            var o = $('.grid-menu[grid-master="' + a.gridManagerName + '"]');
+            i.unbind("contextmenu"),
+            i.bind("contextmenu",
+            function(e) {
+                if (e.preventDefault(), e.stopPropagation(), "TBODY" === e.target.nodeName || 0 !== $(e.target).closest("tbody").length) {
+                    var t = $('[grid-action="export-excel"][only-checked="true"]');
+                    0 === $('tbody tr[checked="checked"]', 'table[grid-manager="' + a.gridManagerName + '"]').length ? t.addClass("disabled") : t.removeClass("disabled");
+                    var n = o.width(),
+                    s = o.height(),
+                    c = document.documentElement.offsetHeight,
+                    d = document.documentElement.offsetWidth,
+                    l = c < e.clientY + s ? e.clientY - s: e.clientY,
+                    g = d < e.clientX + n ? e.clientX - n: e.clientX;
+                    o.css({
+                        top: l + i.get(0).scrollTop + (document.body.scrollTop || document.documentElement.scrollTop),
+                        left: g + i.get(0).scrollLeft + (document.body.scrollLeft || document.documentElement.scrollLeft)
+                    }),
+                    $(".grid-menu[grid-master]").hide(),
+                    o.show(),
+                    r.off("mousedown.gridMenu"),
+                    r.on("mousedown.gridMenu",
+                    function(e) {
+                        var t = $(e.target);
+                        t.hasClass(".grid-menu") || 1 === t.closest(".grid-menu").length || (r.off("mousedown.gridMenu"), o.hide())
+                    })
+                }
+            });
+            var s = $('[grid-action="refresh-page"]');
+            s.unbind("click"),
+            s.bind("click",
+            function(e) {
+                if (t(this, e)) return ! 1;
+                var i = $(this).closest(".grid-menu"),
+                n = $('table[grid-manager="' + i.attr("grid-master") + '"]');
+                a = a.__getGridManager(n);
+                var o = this.getAttribute("refresh-type");
+                "previous" === o && a.pageData.cPage > 1 ? a.pageData.cPage = a.pageData.cPage - 1 : "next" === o && a.pageData.cPage < a.pageData.tPage && (a.pageData.cPage = a.pageData.cPage + 1);
+                var s = $.extend({},
+                a.query, a.sortData, a.pageData);
+                a.pagingBefore(s),
+                a.__refreshGrid(function() {
+                    a.pagingAfter(s)
+                }),
+                r.off("mousedown.gridMenu"),
+                i.hide()
+            });
+            var c = $('[grid-action="export-excel"]');
+            c.unbind("click"),
+            c.bind("click",
+            function(e) {
+                if (t(this, e)) return ! 1;
+                var i = $(this).closest(".grid-menu"),
+                n = $('table[grid-manager="' + i.attr("grid-master") + '"]'),
+                o = !1;
+                "true" === this.getAttribute("only-checked") && (o = !0),
+                a.exportGridToXls(n, void 0, o),
+                r.off("mousedown.gridMenu"),
+                i.hide()
+            });
+            var d = $('[grid-action="setting-grid"]');
+            d.unbind("click"),
+            d.bind("click",
+            function(e) {
+                if (t(this, e)) return ! 1;
+                var a = $(this).closest(".grid-menu"),
+                i = $('table[grid-manager="' + a.attr("grid-master") + '"]'),
+                n = $(".config-area", i.closest(".table-warp"));
+                $(".config-action", n).trigger("click"),
+                r.off("mousedown.gridMenu"),
+                a.hide()
+            })
+        },
+        exportGridToXls: function(e, t, a) {
+            function i(e) {
+                return window.btoa(unescape(encodeURIComponent(e)))
+            }
+            var n = this,
+            r = $("#gm-export-action");
+            if (!n.supportExport || 0 === r.length) return void n.outLog("导出失败,请查看配置项:supportExport是否配置正确", "error");
+            var o, s, c = "data:application/vnd.ms-excel;base64,",
+            d = "",
+            l = "",
+            g = "",
+            h = $(e),
+            p = $('thead[class!="set-top"] th[th-visible="visible"][gm-create!="true"]', h);
+            o = n.supportCheckbox && a ? $('tbody tr[checked="checked"]', h) : $("tbody tr", h),
+            $.each(p,
+            function(e, t) {
+                l += "<th>" + t.getElementsByClassName("th-text")[0].textContent + "</th>"
+            }),
+            $.each(o,
+            function(e, t) {
+                s = $('td[gm-create!="true"]', t),
+                g += "<tr>",
+                $.each(s,
+                function(e, t) {
+                    g += t.outerHTML
+                }),
+                g += "</tr>"
+            }),
+            d = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><table><thead>' + l + "</thead><tbody>" + g + "</tbody></table></body></html>",
+            r.prop("href", c + i(d)),
+            r.prop("download", (t || h.attr("grid-manager")) + ".xls"),
+            r.get(0).click()
+        },
+        resetAdjust: function(e) {
+            var t = this;
+            if (!t.supportAdjust) return ! 1;
+            var a = $(e),
+            i = $('thead [th-visible="visible"]', a),
+            n = $(".adjust-action", i);
+            return ! (!n || 0 == n.length) && (n.show(), void n.eq(n.length - 1).hide())
+        },
+        setToLocalStorage: function(e, t) {
+            var a = this;
+            if (!a.disableCache) {
+                var i = $(e),
+                n = i.attr("no-cache");
+                if (n && "true" == n) return a.outLog("缓存已被禁用:当前表缺失必要html标签属性[grid-manager或th-name]", "info"),
+                !1;
+                if (!window.localStorage) return a.outLog("当前浏览器不支持:localStorage,缓存功能失效。", "error"),
+                !1;
+                if (!i || 0 == i.length) return a.outLog("setToLocalStorage:无效的table", "error"),
+                !1;
+                var r = i.attr("grid-manager");
+                if (!r || "" == $.trim(r)) return a.outLog("setToLocalStorage:无效的grid-manager", "error"),
+                !1;
+                var o = {},
+                s = "",
+                c = {},
+                d = new Array,
+                l = {},
+                g = $('thead[class!="set-top"] th', i);
+                if (!g || 0 == g.length) return a.outLog("setToLocalStorage:无效的thList,请检查是否正确配置table,thead,th", "error"),
+                !1;
+                var h, p = window.location.pathname + window.location.hash + "-" + r;
+                return $.each(g,
+                function(e, n) {
+                    h = $(n),
+                    l = {},
+                    l.th_name = n.getAttribute("th-name"),
+                    a.supportDrag && (l.th_index = h.index()),
+                    a.supportAdjust && (t ? h.css("width", h.css("width")) : "", l.th_width = n.offsetWidth),
+                    a.supportConfig && (l.isShow = $('.config-area li[th-name="' + l.th_name + '"]', i.parents(".table-warp").eq(0)).find('input[type="checkbox"]').get(0).checked),
+                    d.push(l)
+                }),
+                o.th = d,
+                a.supportAjaxPage && (c.pSize = $('select[name="pSizeArea"]', i.closest(".table-warp")).val(), o.page = c),
+                s = JSON.stringify(o),
+                window.localStorage.setItem(p, s),
+                s
+            }
+        },
+        getLocalStorage: function(e) {
+            var t = this,
+            a = $(e),
+            i = t.getLocalStorageKey(a);
+            if (!i) return {};
+            var n = {},
+            r = (new Array, window.localStorage.getItem(i));
+            return r ? (n.key = i, n.cache = JSON.parse(r), n) : (a.attr("grid-manager-cache-error", "error"), {})
+        },
+        clear: function(e) {
+            var t = this,
+            a = $(e),
+            i = t.getLocalStorageKey(a);
+            return !! i && (window.localStorage.removeItem(i), !0)
+        },
+        getLocalStorageKey: function(e) {
+            var t = this,
+            a = e.attr("no-cache");
+            if (a && "true" == a) return t.outLog("缓存已被禁用:当前表缺失必要html标签属性[grid-manager或th-name]", "info"),
+            !1;
+            if (!window.localStorage) return t.outLog("当前浏览器不支持:localStorage,缓存功能失效", "info"),
+            !1;
+            if (!e || 0 == e.length) return t.outLog("getLocalStorage:无效的table", "error"),
+            !1;
+            var i = e.attr("grid-manager");
+            if (!i || "" == $.trim(i)) return t.outLog("getLocalStorage:无效的grid-manager", "error"),
+            !1;
+            $('thead[class!="set-top"] th', e);
+            return window.location.pathname + window.location.hash + "-" + i
+        },
+        configPageForCache: function(e) {
+            var t, a = this,
+            i = a.getLocalStorage(e),
+            n = i.cache;
+            t = n && n.page && n.page.pSize ? n.page.pSize: a.pageSize || 10,
+            a.pageData = {
+                pSize: t,
+                cPage: 1
+            }
+        },
+        setOriginalThDOM: function(e) {
+            e.data("originalThDOM", $("thead th", e))
+        },
+        getOriginalThDOM: function(e) {
+            return $(e).data("originalThDOM")
+        },
+        configTheadForCache: function(e) {
+            var t, a, i, n, r = this,
+            o = r.getLocalStorage(e),
+            s = [];
+            if (!o || $.isEmptyObject(o)) return void r.outLog("configTheadForCache:当前table没有缓存数据", "info");
+            if (a = o.cache, i = a.th, !i || i.length != $("thead th", e).length) return void r.cleanTableCache(e, "缓存数据与当前列表不匹配");
+            var c = [],
+            d = !0;
+            $.each(i,
+            function(a, i) {
+                return n = i,
+                t = $("th[th-name=" + n.th_name + "]", e),
+                0 == t.length || c.indexOf(n.th_name) != -1 ? (r.cleanTableCache(e, "缓存数据与当前列表不匹配"), d = !1, !1) : void c.push(n.th_name)
+            }),
+            d && ($.each(i,
+            function(a, i) {
+                n = i,
+                t = $("th[th-name=" + n.th_name + "]", e),
+                r.supportAdjust && t.css("width", n.th_width),
+                r.supportDrag && "undefined" != typeof n.th_index ? s[n.th_index] = t: s[a] = t,
+                r.supportConfig && r.setAreVisible(t, "undefined" == typeof n.isShow || n.isShow, !0)
+            }), r.supportDrag && e.find("thead tr").html(s), r.resetAdjust(e))
+        },
+        resetTd: function(e, t) {
+            var a = this;
+            if (t) var i = $(e),
+            n = i.parents("table").eq(0);
+            else var n = $(e),
+            i = n.find("tbody tr");
+            if (!i || 0 == i.length) return ! 1;
+            if (a.supportAutoOrder) {
+                var r, o = a.pageData,
+                s = void 0,
+                c = 1;
+                o && o.pSize && o.cPage && (c = o.pSize * (o.cPage - 1) + 1),
+                $.each(i,
+                function(e, t) {
+                    r = c + e,
+                    s = $('td[gm-order="true"]', t),
+                    0 == s.length ? $(t).prepend('<td gm-order="true" gm-create="true">' + r + "</td>") : s.text(r)
+                })
+            }
+            if (a.supportCheckbox) {
+                var d = void 0;
+                $.each(i,
+                function(e, t) {
+                    d = $('td[gm-checkbox="true"]', t),
+                    0 == d.length ? $(t).prepend('<td gm-checkbox="true" gm-create="true"><input type="checkbox"/></td>') : $('[type="checkbox"]', d).prop("checked", !1)
+                })
+            }
+            if (a.supportAdjust) {
+                var l, g = a.getOriginalThDOM(n);
+                if (!g || 0 == g.length) return a.outLog("resetTdForCache:列位置重置所必须的原TH DOM获取失败", "error"),
+                !1;
+                var h = [],
+                p = [];
+                $.each(i,
+                function(e, t) {
+                    h[e] = $(t),
+                    l = $(t).find("td"),
+                    $.each(l,
+                    function(e, t) {
+                        p[g.eq(e).index()] = t
+                    }),
+                    h[e].html(p)
+                })
+            }
+            if (a.supportConfig && a.setAreVisible($('[th-visible="none"]'), !1, !0), a.supportSetTop) {
+                var u = n.parents(".table-div").eq(0),
+                f = u.parents(".table-warp").eq(0);
+                u.css({
+                    height: "auto"
+                }),
+                f.css({
+                    marginBottom: 0
+                })
+            }
+        },
+        cleanTableCacheForVersion: function(e) {
+            var t = this,
+            a = window.localStorage.getItem("GridManagerVersion");
+            a && a == t.version || t.cleanTableCache(e, "插件版本已更新")
+        },
+        cleanTableCache: function(e, t) {
+            var a = this;
+            $.each(e,
+            function(e, i) {
+                window.localStorage.removeItem(i.getAttribute("grid-manager")),
+                window.localStorage.removeItem(i.getAttribute("grid-manager") + "-" + $("th", i).length),
+                a.outLog(i.getAttribute("grid-manager") + "清除缓存成功,原因:" + t, "info")
+            }),
+            window.localStorage.setItem("GridManagerVersion", a.version)
+        },
+        initAjaxPage: function(e) {
+            var t = this,
+            e = $(e),
+            a = e.attr("grid-manager"),
+            i = e.closest(".table-warp"),
+            n = $(".page-toolbar", i),
+            r = $.isArray(t.sizeData) ? t.sizeData: t.sizeData[a];
+            n.hide(),
+            t.createPageSizeDOM(e, r),
+            t.bindPageJumpEvent(e),
+            t.bindSetPageSizeEvent(e)
+        },
+        createPageDOM: function(e, t) {
+            var a = this,
+            i = $(e),
+            n = i.parents(".table-warp").eq(0),
+            r = $(".page-toolbar", n),
+            o = $(".pagination", r),
+            s = Number(t.cPage || 0),
+            c = Number(t.tPage || 0),
+            d = "",
+            l = "",
+            g = "first-page",
+            h = "previous-page";
+            1 == s && (g += " disabled", h += " disabled"),
+            d += '<li cPage="1" class="' + g + '"><a href="javascript:void(0);">' + a.i18nText("first-page") + '</a></li><li cPage="' + (s - 1) + '" class="' + h + '"><a href="javascript:void(0);">' + a.i18nText("previous-page") + "</a></li>";
+            var p = 1,
+            u = c;
+            for (s > 4 && (d += '<li cPage="1"><a href="javascript:void(0);">1</a></li><li class="disabled"><a href="javascript:void(0);">...</a></li>', p = s - 2), c - s > 4 && (u = s + 2, l += '<li class="disabled"><a href="javascript:void(0);">...</a></li><li cPage="' + c + '"><a href="javascript:void(0);">' + c + "</a></li>"), p; p <= u; p++) d += p != s ? '<li cPage="' + p + '"><a href="javascript:void(0);">' + p + "</a></li>": '<li class="active"><a href="javascript:void(0);">' + s + "</a></li>";
+            d += l;
+            var f = "next-page",
+            m = "last-page";
+            s >= c && (f += " disabled", m += " disabled"),
+            d += '<li cPage="' + (s + 1) + '" class="' + f + '"><a href="javascript:void(0);">' + a.i18nText("next-page") + '</a></li><li cPage="' + c + '" class="' + m + '"><a href="javascript:void(0);">' + a.i18nText("last-page") + "</a></li>",
+            o.html(d)
+        },
+        createPageSizeDOM: function(e, t) {
+            var a = this,
+            i = $(e),
+            n = i.closest(".table-warp"),
+            r = $(".page-toolbar", n),
+            o = $('select[name="pSizeArea"]', r);
+            if (!t || !$.isArray(t)) return void a.outLog("渲染失败:参数[sizeData]配置错误", "error");
+            var s = "";
+            $.each(t,
+            function(e, t) {
+                s += '<option value="' + t + '">' + t + "</option>"
+            }),
+            o.html(s)
+        },
+        bindPageJumpEvent: function(e) {
+            function t(e, t) {
+                $("table[grid-manager]", e),
+                $('select[name="pSizeArea"]', e);
+                t > a.pageData.tPage && (t = a.pageData.tPage),
+                a.pageData.cPage = t,
+                a.pageData.pSize = a.pageData.pSize || a.pageSize;
+                var i = $.extend({},
+                a.query, a.sortData, a.pageData);
+                a.pagingBefore(i),
+                a.__refreshGrid(function() {
+                    a.pagingAfter(i)
+                })
+            }
+            var a = this,
+            i = $(e),
+            n = i.closest(".table-warp"),
+            r = $(".page-toolbar", n),
+            o = ($(".pagination", r), $(".gp-input", r)),
+            s = $(".refresh-action", r);
+            r.off("click", "li"),
+            r.on("click", "li",
+            function() {
+                var e = $(this),
+                i = e.closest(".table-warp"),
+                n = e.attr("cPage");
+                return n && Number(n) && !e.hasClass("disabled") ? (n = parseInt(n), void t(i, n)) : (a.outLog("指定页码无法跳转,已停止。原因:1、可能是当前页已处于选中状态; 2、所指向的页不存在", "info"), !1)
+            }),
+            o.unbind("keyup"),
+            o.bind("keyup",
+            function(e) {
+                if (13 === e.which) {
+                    var a = $(this).closest(".table-warp"),
+                    i = parseInt(this.value, 10);
+                    if (!i) return void this.focus();
+                    t(a, i),
+                    this.value = ""
+                }
+            }),
+            s.unbind("click"),
+            s.bind("click",
+            function() {
+                var e = ($(this), $(this).closest(".table-warp")),
+                i = $(".page-toolbar .gp-input", e),
+                n = i.val();
+                if ("" === n.trim()) return void a.__refreshGrid();
+                var r = parseInt(i.val(), 10);
+                return r ? (t(e, r), void i.val("")) : void i.focus()
+            })
+        },
+        bindSetPageSizeEvent: function(e) {
+            var t = this,
+            a = $(e),
+            i = a.parents(".table-warp").eq(0),
+            n = $(".page-toolbar", i),
+            r = $("select[name=pSizeArea]", n);
+            return r && 0 != r.length ? (r.unbind("change"), void r.change(function() {
+                var e = $(this),
+                a = e.parents(".table-warp").eq(0),
+                i = $("table[grid-manager]", a);
+                $("table", a).attr("grid-manager");
+                t.pageData = {
+                    cPage: 1,
+                    pSize: e.val()
+                },
+                t.setToLocalStorage(i);
+                var n = $.extend({},
+                t.query, t.sortData, t.pageData);
+                t.pagingBefore(n),
+                t.__refreshGrid(function() {
+                    t.pagingAfter(n)
+                })
+            })) : (t.outLog("未找到单页显示数切换区域,停止该事件绑定", "info"), !1)
+        },
+        resetPSize: function(e, t) {
+            var a = this,
+            e = $(e),
+            i = e.parents(".table-warp").eq(0),
+            n = $(".page-toolbar", i),
+            r = $('select[name="pSizeArea"]', n),
+            o = $(".dataTables_info", n);
+            if (!r || 0 == r.length) return a.outLog("未找到条数切换区域,停止该事件绑定", "info"),
+            !1;
+            var s = 1 == t.cPage ? 1 : (t.cPage - 1) * t.pSize + 1,
+            c = t.cPage * t.pSize,
+            d = t.tSize,
+            l = a.i18nText("dataTablesInfo", [s, c, d]);
+            r.val(t.pSize || 10),
+            o.html(l),
+            r.show()
+        },
+        resetPageData: function(e, t) {
+            function a(e) {
+                var t = i.pageData.pSize || i.pageSize,
+                a = e,
+                n = i.pageData.cPage;
+                return {
+                    tPage: Math.ceil(a / t),
+                    cPage: n,
+                    pSize: t,
+                    tSize: a
+                }
+            }
+            var i = this;
+            if (!isNaN(parseInt(t, 10))) {
+                var n = a(t);
+                i.createPageDOM(e, n),
+                i.resetPSize(e, n);
+                var e = $(e),
+                r = e.parents(".table-warp").eq(0),
+                o = $(".page-toolbar", r);
+                $.extend(i.pageData, n),
+                o.show()
+            }
+        },
+        i18nText: function(e, t, a, i) {
+            var n = this,
+            r = [];
+            if (2 == arguments.length && "object" == typeof arguments[1]) r = arguments[1];
+            else if (arguments.length > 1) for (var o = 1; o < arguments.length; o++) r.push(arguments[o]);
+            var s = "";
+            try {
+                return s = n.textConfig[e][n.i18n] || "",
+                r && 0 != r.length ? s = s.replace(/{\d+}/g,
+                function(e) {
+                    return r[e.match(/\d+/)]
+                }) : s
+            } catch(c) {
+                return n.outLog("未找到与" + e + "相匹配的" + n.i18n + "语言", "warn"),
+                ""
+            }
+        },
+        textConfig: {
+            "order-text": {
+                "zh-cn": "序号",
+                "en-us": "order"
+            },
+            "first-page": {
+                "zh-cn": "首页",
+                "en-us": "first"
+            },
+            "previous-page": {
+                "zh-cn": "上一页",
+                "en-us": "previous"
+            },
+            "next-page": {
+                "zh-cn": "下一页",
+                "en-us": "next "
+            },
+            "last-page": {
+                "zh-cn": "尾页",
+                "en-us": "last "
+            },
+            dataTablesInfo: {
+                "zh-cn": "此页显示 {0}-{1} 共{2}条",
+                "en-us": "this page show {0}-{1} count {2}"
+            },
+            "goto-first-text": {
+                "zh-cn": "跳转至",
+                "en-us": "goto "
+            },
+            "goto-last-text": {
+                "zh-cn": "页",
+                "en-us": "page "
+            },
+            refresh: {
+                "zh-cn": "重新加载",
+                "en-us": "Refresh "
+            },
+            "save-as-excel": {
+                "zh-cn": "另存为Excel",
+                "en-us": "Save as Excel "
+            },
+            "save-as-excel-for-checked": {
+                "zh-cn": "已选中项另存为Excel",
+                "en-us": "Save as Excel of Checked"
+            },
+            "setting-grid": {
+                "zh-cn": "配置表",
+                "en-us": "Setting Grid"
+            },
+            "checkall-text": {
+                "zh-cn": "全选",
+                "en-us": "All"
+            }
+        },
+        setQuery: function(e, t) {
+            e.GridManager("get").query = t
+        },
+        outLog: function(e, t) {
+            return this.isDevelopMode || t ? this.isDevelopMode || "info" !== t ? this.isDevelopMode || "warn" !== t ? "error" === t ? console.error("GridManager Error: ", e) : void 0 : console.warn("GridManager Warn: ", e) : console.info("GridManager Info: ", e) : console.log("GridManager:", e)
+        }
+    },
+    $.fn.GM = $.fn.GridManager = function(t, a, i) {
+        if (0 == this.length) throw new Error("GridManager Error:JQuery对象为空,请确定选择器匹配是否正确");
+        var n = this.eq(0);
+        "TR" === n.get(0).nodeName && (n = n.closest("table[grid-manager]"));
+        var r, o, s;
+        0 === arguments.length ? (r = "init", o = {},
+        s = void 0) : 1 === arguments.length && "string" == typeof arguments[0] && "init" == typeof arguments[0] ? (r = arguments[0], o = {},
+        s = void 0) : 1 === arguments.length && "string" == typeof arguments[0] && "init" != typeof arguments[0] ? (r = arguments[0], o = void 0, s = void 0) : 1 === arguments.length && $.isPlainObject(arguments[0]) ? (r = "init", o = arguments[0], s = void 0) : 1 === arguments.length && "function" == typeof arguments[0] ? (r = "init", o = void 0, s = arguments[0]) : 2 === arguments.length && "string" == typeof arguments[0] && "function" == typeof arguments[1] ? (r = arguments[0], o = arguments[1], s = void 0) : 2 === arguments.length && "string" == typeof arguments[0] && "function" != typeof arguments[1] ? (r = arguments[0], o = arguments[1], s = void 0) : 2 === arguments.length && $.isPlainObject(arguments[0]) && "function" == typeof arguments[1] ? (r = "init", o = arguments[0], s = arguments[1]) : 2 === arguments.length && "string" == typeof arguments[0] && "boolean" == typeof arguments[1] ? (r = arguments[0], o = arguments[1], s = void 0) : 3 === arguments.length && (r = arguments[0], o = arguments[1], s = arguments[2]);
+        var c = ["init", "setSort", "get", "getCheckedTr", "showTh", "hideTh", "exportGridToXls", "getLocalStorage", "resetTd", "setQuery", "refreshGrid", "getRowData", "clear"];
+        if (c.indexOf(r) === -1) throw new Error("GridManager Error:方法调用错误,请确定方法名[" + r + "]是否正确");
+        var d;
+        if ("init" == r) {
+            var l = $.extend({},
+            $.fn.GridManager.defaults, o);
+            return d = new e(l),
+            d.init(n, s),
+            n
+        }
+        if ("init" != r) {
+            d = n.data("gridManager");
+            var g = d[r](n, o, s);
+            return "undefined" == typeof g ? n: g
+        }
+    }
+} ();

+ 30 - 1
gkaqv2/trunk/modules/web/src/main/webapp/static/js/index.js

@@ -6,9 +6,12 @@
 /** 页面初始化 */
 $(function () {
     getUserMenuTree();
+    var bodyheight = document.documentElement.clientHeight;
+    $("#mainFrame").css("height", bodyheight - 99);
 });
 function linkUrl(url) {
-    window.location.href = basePath + "/" + url;
+//    window.location.href = basePath + "/" + url;
+    $("#mainFrame").attr("src", basePath + "/" + url);
 }
 /**
  * 移入事件
@@ -171,5 +174,31 @@ function changeFolderBg(obj, flag, type) {
     }
 }
 
+/**
+ *
+ * 增加formatString功能
+ *
+ * 使用方法:$.formatString('字符串{0}字符串{1}字符串','第一个变量','第二个变量');
+ *
+ * @returns 格式化后的字符串
+ */
+$.formatString = function (str) {
+    for (var i = 0; i < arguments.length - 1; i++) {
+        str = str.replace("{" + i + "}", arguments[i + 1]);
+    }
+    return str;
+};
+
+/**
+ * 标准日起转换成yyyy-MM-dd
+ */
+var formatDate = function (date) {  
+    var y = date.getFullYear();  
+    var m = date.getMonth() + 1;  
+    m = m < 10 ? '0' + m : m;  
+    var d = date.getDate();  
+    d = d < 10 ? ('0' + d) : d;  
+    return y + '-' + m + '-' + d;  
+}; 
 
 

+ 25 - 0
gkaqv2/trunk/modules/web/src/main/webapp/static/js/zyfzsq/fzzxx.js

@@ -108,3 +108,28 @@ function initZdhqdGrid() {
     // 隐藏水平垂直滚动条
     jQuery(zdhqdgrid_selector).closest(".ui-jqgrid-bdiv").css({ 'overflow-x' : 'hidden' ,'overflow-y':'hidden'});
 };
+
+function getJyrInfo(obj){
+    var selVal = $(obj).val();
+    if(selVal != "") {
+        $.ajax({
+            type : "post",
+            url : basePath + "/jyr/initEdit",
+            data : {"id": selVal},
+            success : function (data) {
+                if(data) {
+                    var obj = data[0];
+                    $("#gkjyxkz").val(obj.gkjyxkzh);
+                    $("#dz").val(obj.bgdz);
+                    $("#fddbr").val(obj.fddbr);
+                    $("#aqgljg").val(obj.aqgljg);
+                    //$("#aqfz").val();
+                    $("#gqgljgfzrxm").val(obj.aqbmfzr);
+                    //$("#gqgljgfzrzc").val();
+                    $("#gqgljgfzrlxdh").val(obj.aqfzrlxdh);
+                    //$("#gqgljgfzryx").val();
+                }
+            }
+        });
+    }
+}

+ 255 - 157
gkaqv2/trunk/modules/web/src/main/webapp/static/js/zyfzsq/index.js

@@ -2,15 +2,14 @@
  * js
  */
 var tabName = "#tt"
-var grid_selector = "#grid-table";
-var pager_selector = "#grid-pager";
+var mainGrid = "#mainGrid";
 jQuery(function($) {
     // 初始化基本信息
     initBasicData();
     // 初始化Grid
     initGrid();
     // 危险货物
-    initWhxxGrid();
+    /*initWhxxGrid();
     // 制度和操作规程清单
     initZdhqdGrid();
     // 特种设备作业人员汇总
@@ -20,7 +19,7 @@ jQuery(function($) {
     // 事故应急预案汇总
     initSgyahzGrid();
     // 附件上传
-    initFjscGrid();
+    initFjscGrid();*/
     $(tabName).tabs({
 //        fit:true,
         border:true, 
@@ -37,8 +36,6 @@ jQuery(function($) {
     $(".tabs-scroller-right").css("height","27");
     $(".tabs-wrap").css("margin","0px 18px 0px 18px");
     $(".tabs-wrap").css("width","834");
-    // 只启用主信息tab
-    //enableMain();
 });
 
 //初始化基本信息
@@ -99,6 +96,75 @@ function initBasicData() {
             $(select).selectpicker('refresh');
         }
     });
+    // 初始化作业场所check框
+    $.ajax({
+        type : "post",
+        url : basePath + "/zyfzsq/getDdlData",
+        data : {"lx": "zycs"},
+        success : function (data) {
+            var chkDiv = "#div_zycs";
+            var chkStr = "";
+            $.each(data, function() {
+                chkStr += "<input type='checkbox' id='zycs' name='zycs' class='chk' value='" 
+                    + this.optVal + "'>" + this.optName+"&emsp;";
+            });
+            $(chkDiv).html(chkStr);
+            $(':checkbox[name=zycs]').each(function() {
+                $(this).click(function() {
+                    if ($(this).prop('checked')) {
+                        $(':checkbox[name=zycs]').removeAttr('checked');
+                        $(this).prop('checked',true);
+                    }
+                });
+            });
+        }
+    });
+    // 初始化产权check框
+    $.ajax({
+        type : "post",
+        url : basePath + "/zyfzsq/getDdlData",
+        data : {"lx": "cq"},
+        success : function (data) {
+            var chkDiv = "#div_cq";
+            var chkStr = "";
+            $.each(data, function() {
+                chkStr += "<input type='checkbox' id='cq' name='cq' class='chk' value='" 
+                    + this.optVal + "'>" + this.optName+"&emsp;";
+            });
+            $(chkDiv).html(chkStr);
+            $(':checkbox[name=cq]').each(function() {
+                $(this).click(function() {
+                    if ($(this).prop('checked')) {
+                        $(':checkbox[name=cq]').removeAttr('checked');
+                        $(this).prop('checked',true);
+                    }
+                });
+            });
+        }
+    });
+    // 初始化危货等级check框
+    $.ajax({
+        type : "post",
+        url : basePath + "/zyfzsq/getDdlData",
+        data : {"lx": "whdj"},
+        success : function (data) {
+            var chkDiv = "#div_whdj";
+            var chkStr = "";
+            $.each(data, function() {
+                chkStr += "<input type='checkbox' id='whdj' name='whdj' class='chk' value='" 
+                    + this.optVal + "'>" + this.optName+"&emsp;";
+            });
+            $(chkDiv).html(chkStr);
+            $(':checkbox[name=whdj]').each(function() {
+                $(this).click(function() {
+                    if ($(this).prop('checked')) {
+                        $(':checkbox[name=whdj]').removeAttr('checked');
+                        $(this).prop('checked',true);
+                    }
+                });
+            });
+        }
+    });
 }
 
 /**
@@ -106,7 +172,7 @@ function initBasicData() {
  */
 function enableMain(){
     //$(tabName).tabs('enableTab', 0);
-    for(var i=1;i<8;i++) {
+    for(var i=1;i<7;i++) {
         $(tabName).tabs('disableTab', i);  
     }
 }
@@ -114,147 +180,108 @@ function enableMain(){
  * 启用所有tab
  */
 function enableAll(){
-    for(var i=1;i<8;i++) {
+    for(var i=1;i<7;i++) {
         $(tabName).tabs('enableTab', i);
     }
 }
 
-
 /**
  * 初始化Grid
  */
 function initGrid() {
-    //resize to fit page size
-    resizePageGrid(grid_selector);
-    // 数据表格初始化
-    jQuery(grid_selector).jqGrid({
-        url : basePath + '/zyfzsq/list',
-        mtype : "POST", //提交方式
-        datatype : "json",
-        autowidth: false,
-        height :"auto",
-        shrinkToFit: true,
-        sortname : "", //默认的排序列
-        sortorder : "", //默认的排序列
-        colNames : [ 'id','办理编号','港口经营人名称','任务状态','发证机关','附证编号','危险货物品名','法定代表人','联系电话','所属港区','所在地','操作',''],
-        colModel : [ {
-            name : 'id',
-            index : 'id',
-            key : true,
-            hidden:true,
-            editable : false,
-            sortable : false
-        },{
-            name : 'blbh',
-            index : 'blbh',
-            editable : false,
-            sortable : false
-        },{
-            name : 'qymc',
-            index : 'qymc',
-            editable : false,
-            sortable : false
-        },{
-            name : 'loginName',
-            index : 'loginName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'realName',
-            index : 'realName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'loginName',
-            index : 'loginName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'realName',
-            index : 'realName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'realName',
-            index : 'realName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'loginName',
-            index : 'loginName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'realName',
-            index : 'realName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'loginName',
-            index : 'loginName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'realName',
-            index : 'realName',
-            editable : false,
-            sortable : false
-        },{
-            name : 'loginName',
-            index : 'loginName',
-            editable : false,
-            sortable : false
-        } ],
-        rowNum : _rowNum, //每页显示记录数
-        rowList : _rowList, //用于改变显示行数的下拉列表框的元素数组。
-        pager : pager_selector, //定义翻页用的导航栏
-        page : 1, //设置初始的页码,初始为1
-        rownumbers : true,
-        pagerpos : 'center', //指定分页栏的位置
-        altRows : true, //设置为交替行表格,默认为false
-        multiselect : true, //可以多选
-        multiboxonly : true, //只有选择checkbox才会起作用 
-        loadComplete : function() {
-            var table = this;
-            setTimeout(function() {
-                updatePagerIcons(table);
-                enableTooltips(table);
-            }, 0);
-        },
-        prmNames : {
-             oper : "oper",
-             page : "page",
-             rows : "rows",
-             sort : "sidx",
-             order : "sord"
-        },
-        postData :{
-            condition1 : function(){ return ""; },//查询条件1
-            condition2 : function(){ return ""; }//查询条件2
-        },
-        jsonReader : {
-            root : "list", // json中代表实际模型数据的入口
-            page : "page", // json中代表当前页码的数据
-            total : "pages", // json中代表页码总数的数据
-            records : "total", // json中代表数据行总数的数据
-            repeatitems : false// 如果设为false,则jqGrid在解析json时,会根据name来搜索对应的数据元素
-        },
-        gridComplete: function () {
-            comGridComplete("grid-table", "editRecord");
-        },
-        onPaging: function(){
-            comGridPage("grid-table");
-        }
+    //单列表简易渲染
+    var table = $(mainGrid);
+    table.GM({
+        ajax_url: basePath + '/zyfzsq/list'
+        ,ajax_type: 'POST'
+        ,columnData: [{
+                key: 'blbh',
+                width: '100px',
+                text: '办理编号'
+            },{
+                key: 'jyr',
+                width: '100px',
+                align:'center',
+                text: '港口经营人名称'
+            },{
+                key: 'state',
+                sorting: 'down',
+                width: '100px',
+                text: '任务状态'
+            },{
+                key: 'fzjg',
+                width: '100px',
+                text: '发证机关'
+            },{
+                key: 'gkjyxkz',
+                width: '100px',
+                text: '附证编号'
+            },{
+                key: 'wxhwpm',
+                width: '100px',
+                text: '危险货物品名'
+            },{
+                key: 'fddbr',
+                width: '60px',
+                text: '法定代表人'
+            },{
+                key: 'gqgljgfzrlxdh',
+                width: '80px',
+                text: '联系电话'
+            },{
+                key: 'ssgq',
+                width: '100px',
+                text: '所属港区'
+            },{
+                key: 'szd',
+                width: '100px',
+                text: '所在地'
+            },{
+                key: 'id',
+                width: '100px',
+                text: '操作',
+                align:'center',
+                template: function(operation, rowObject){  
+                    //operation:当前key所对应的单条数据;rowObject:单个一行完整数据
+                    return '<a class="operation" href=javascript:alert(\''+rowObject["id"]+'\');>编辑</a>&emsp;'
+                    +'<a class="operation" href=javascript:alert(\''+rowObject["id"]+'\');>删除</a>';
+                }
+            },{
+                key: 'id',
+                width: '100px',
+                text: '',
+                template: function(operation, rowObject){  
+                    //operation:当前key所对应的单条数据;rowObject:单个一行完整数据
+                    return '<a class="operation" href=javascript:alert("这是一个按纽");>'+operation+'</a>';
+                }
+            }
+        ]
+        ,pagingBefore:function(query){}
+        ,pagingAfter: function(query){}
+        ,sortingBefore:function(query){}
+        ,sortingAfter: function(query){}
+        ,ajax_beforeSend: function(query){}
+        ,ajax_complete: function(data){}
+    },function(query){
+//        console.log('init方法回调query参数', query);
     });
-    // 调整jqgrid
-    ajustJqGrid(grid_selector, pager_selector);
 };
 
+
 /**
  * 查询事件
  */
 function searchRecord() {
-     jQuery(grid_selector).trigger("reloadGrid", [{ page: 1 }]);
+    // 定义查询参数
+    var obj = {
+        'jyrmc':$("#srchGkjyr").val(),
+        'ssgq':$("#srchDdlQq").val(),
+        'szd':$("#srchDdlSzd").val()
+    };
+    // 设置gird参数
+    $(mainGrid).GM('setQuery',obj);
+    // 查询grid
+    $(mainGrid).GM('refreshGrid',true, null);
 };
 
 
@@ -263,26 +290,52 @@ function searchRecord() {
  * @param 
  */
 function save() {
-    $.ajax({
-        type : "post",
-        url : basePath + '/zyfzsq/save',
-        dataType:'json',
-        data : $('#form').serialize()
-        , //表单序列化,获取数据
-        success : function(data) {
-            // 成功删除后刷新页面
-            if (data && data.success == true) {
-                layer.alert("数据已成功保存!");
-                closeWin();
-                searchRecord();
-            } else {
-                layer.alert("数据保存失败!");
+    if($("#id").val() == "") {
+        $.ajax({
+            type : "post",
+            url : basePath + '/zyfzsq/save',
+            dataType:'json',
+            data : $('#zyfzsqform').serialize()
+            , //表单序列化,获取数据
+            success : function(data) {
+                // 成功删除后刷新页面
+                if (data && data.success != false) {
+                    console.info(data);
+                    $("#id").val(data.id);
+                    layer.alert("数据已成功保存!");
+                    searchRecord();
+                    enableAll();
+                } else {
+                    layer.alert("数据保存失败!");
+                }
+            }, //操作成功后的操作!data是后台传过来的值 
+            error: function (XMLHttpRequest, textStatus, errorThrown) {
+                layer.alert("error:" + errorThrown);
             }
-        }, //操作成功后的操作!data是后台传过来的值 
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-            layer.alert("error:" + errorThrown);
-        }
-    });
+        });
+    } else {
+        $.ajax({
+            type : "post",
+            url : basePath + '/zyfzsq/saveall',
+            dataType:'json',
+            data : $('#zyfzsqform').serialize()
+            , //表单序列化,获取数据
+            success : function(data) {
+                // 成功删除后刷新页面
+                if (data && data.success != false) {
+                    console.info(data);
+                    $("#id").val(data.id);
+                    layer.alert("数据已成功保存!");
+                    searchRecord();
+                } else {
+                    layer.alert("数据保存失败!");
+                }
+            }, //操作成功后的操作!data是后台传过来的值 
+            error: function (XMLHttpRequest, textStatus, errorThrown) {
+                layer.alert("error:" + errorThrown);
+            }
+        });
+    }
 }
 
 /**
@@ -291,8 +344,12 @@ function save() {
 function addInfo() {
     // 清空表单信息
     comClearFormData("form");
+    $("#szd").selectpicker('refresh');
+    $("#ssgq").selectpicker('refresh');
+    $("#jyr").selectpicker('refresh');
     // 弹出模态框
     showModelDialog("myModal", "新增");
+    enableMain();
 };
 
 /**
@@ -300,7 +357,7 @@ function addInfo() {
  */
 function delInfo() {
     // 获取选择行
-    var ids = getMultiData(grid_selector);
+    var ids = getMultiData(mainGrid);
     if(!isNull(ids)) {
         layer.confirm('确定删除吗?', {icon: 3, title:'提示'}, function(index){
             $.ajax({
@@ -327,7 +384,7 @@ function delInfo() {
  */
 function editInfo() {
     // 获取选择行
-    var ids = getMultiData(grid_selector);
+    var ids = getMultiData(mainGrid);
     if(isNull(ids) || ids.indexOf(",")!=-1) {
         layer.alert("请选择且只选择一条记录");
     } else {
@@ -337,10 +394,9 @@ function editInfo() {
             data : {"id":ids},
             url : basePath + '/zyfzsq/initEdit',//请求的路径               
             success : function(data) {
-                $("#id").val(data.id);
-                $("#realName").val(data.realName);
-                $("#loginName").val(data.loginName);
+                fillMainData(data);
                 showModelDialog("myModal", "编辑");
+                enableAll();
             },
             error: function (XMLHttpRequest, textStatus, errorThrown) {
             }
@@ -348,9 +404,51 @@ function editInfo() {
     }
 };
 
+function fillMainData(data) {
+    var obj = data.zyfz;
+    $("#id").val(obj.id);
+    $("#szd").val(obj.szd);
+    $("#szd").selectpicker('refresh');
+    $("#ssgq").val(obj.ssgq);
+    $("#ssgq").selectpicker('refresh');
+    $("#jyr").val(obj.jyr);
+    $("#jyr").selectpicker('refresh');
+    $("#gkjyxkz").val(obj.gkjyxkz);
+    $("#dz").val(obj.dz);
+    $("#fddbr").val(obj.fddbr);
+    $("#aqgljg").val(obj.aqgljg);
+    $("#aqfz").val(obj.aqfz);
+    $("#gqgljgfzrxm").val(obj.gqgljgfzrxm);
+    $("#gqgljgfzrzc").val(obj.gqgljgfzrzc);
+    $("#gqgljgfzrlxdh").val(obj.gqgljgfzrlxdh);
+    $("#gqgljgfzrdzyx").val(obj.gqgljgfzrdzyx);
+    // whxx
+    $("#zyfs").val(obj.zyfs);
+    $(':checkbox[name=zycs]').removeAttr('checked');
+    $(':checkbox[name=zycs]').each(function() {
+        if ($(this).val() == obj.zycs) {
+            $(this).prop('checked',true);
+        }
+    });
+    $(':checkbox[name=cq]').removeAttr('checked');
+    $(':checkbox[name=cq]').each(function() {
+        if ($(this).val() == obj.cq) {
+            $(this).prop('checked',true);
+        }
+    });
+    $(':checkbox[name=whdj]').removeAttr('checked');
+    $(':checkbox[name=whdj]').each(function() {
+        if ($(this).val() == obj.whdj) {
+            $(this).prop('checked',true);
+        }
+    });
+    $("#zywxhwpm").val(obj.zywxhwpm);
+}
+
 /**
  * 关闭当前窗口
  */
 function closeWin() {
+    $(tabName).tabs("select",0);
     hideModelDialog("myModal");
 }