| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>公共列表页面</title>
- <script type="text/javascript">
- var pictype = "0";
- var basePath = "<%=basePath %>";
- <c:set var="pictype" value="0"/>
- <c:forEach var="item1" items="${conditioncolumn}" varStatus="idxStatus1">
- <c:if test="${item1.column_name == 'accessory_path'}"><%--判断是否有图片展现 pictype 为0 没有 1 有 --%>
- <c:set var="pictype" value="1"/>
- pictype = "1";
- </c:if>
- </c:forEach>
- </script>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="/shares/js/yw/sales/publicutils.js" type="text/javascript"></script>
- <script src="/shares/js/yw/sales/ligerui.all.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/util.js"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/file.js"></script>
- <script type="text/javascript" src="/shares/js/yw/oa/folderTree.js"></script>
- <script type="text/javascript">
- function pubOnCilck(){
- if(!getthinktime()){
- return;
- }
- var checkbox = false;
- grid = $("#maingrid4").ligerGrid({
- columns: [
- <c:forEach var="item" items="${conditioncolumn}" varStatus="idxStatus">
- <c:if test="${item.column_name != 'id'}"><%-- 字段为id 的时候不展现 数据库字段配置的时候 必须把 id放到第一列 --%>
- <c:set var="conditioncolumnname" value="${conditioncolumnname},${item.column_name}"/>
- <c:set var="conditioncolumndesc" value="${conditioncolumndesc},${item.column_desc}"/>
-
- <c:set var="width" value="130"/>
- <c:if test="${fn:contains(item.column_name, 'remark')}">
- <c:set var="width" value="300"/>
- </c:if>
- { display: '${item.column_desc}', name: '${item.column_name}', width: ${width} }
- <c:if test="${idxStatus.index < fn:length(conditioncolumn) -1}">,</c:if>
- </c:if>
- </c:forEach>
- <c:if test="${menuaccess.columnedit == 1 || menuaccess.columndel == 1}">
- , {display: '操作', name: '', width: 120,
- render:function(row){
- var html = "";
- <c:if test="${menuaccess.columnedit == 1}">
- html += '<a href=\"#\" onclick=\"editbasicInformation(\''+ row.id + '\',\'${menu_code}\')\">修改</a>';
- </c:if>
- <c:if test="${menuaccess.columndel == 1}">
- html += ' <a href=\"#\" onclick=\"delbasicInformation(\''+ row.id + '\',\'${menu_code}\')\">删除</a>';
- </c:if>
- return html;
- }
- }
-
- </c:if>
- ],
- checkbox:checkbox,
- deleteRow: true,
- pageParmName: 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
- url: 'UtilsAction.do?task=queryList&menu_code=${menu_code}&time=' + new Date().getTime(),
- method: 'post',
- parms: getParamsVal(0),
- width: '99.9%',
- height: '99%',
- <c:if test="${pictype == '1'}"><%-- pictype 值为1 表示有图片列 设置列高度为 80 默认为 22 --%>
- rowHeight: '80',
- fixedCellHeight: true,
- </c:if>
- single :true,
- allowHideColumn: false, rownumbers: true, colDraggable: true, rowDraggable: true,
- onCheckRow: function(checked, rowdata, rowindex) {
- <%-- 里面的代码为单选 for (var rowid in this.records){ this.unselect(rowid); } if(checked){this.select(rowindex); }else{ this.unselect(rowindex); } --%>
- }
- });
- $("#pageloading").hide();
- }
-
-
- function getdivdisplay(v,v_this,v_type){
- if("0" == v){
- document.getElementById("container-layout").style.display="none";
- document.getElementById("searchbar").style.marginTop="-38px";
- document.getElementById(v_this).style.display="none";
- document.getElementById(v_type).style.display="";
- } else {
- document.getElementById("container-layout").style.display="";
- document.getElementById("searchbar").style.marginTop="0px";
- document.getElementById(v_this).style.display="";
- document.getElementById(v_type).style.display="none";
- }
- }
- </script>
- </head>
- <body onload="pubOnCilck()">
- <%-- columnParams 参数拼接 --%>
- <c:forEach var="item" items="${querycondition}" varStatus="idxStatus1">
- <c:if test="${item.column_name == 'createdatebegincreatedateend'}">
- <c:set var="columnname" value="createdatebegin,createdateend"/>
- <c:set var="connflag" value="4,4"/>
- </c:if>
- <c:if test="${item.column_name != 'createdatebegincreatedateend'}">
- <c:set var="columnname" value="${columnname},${item.column_name}"/>
- <c:set var="connflag" value="${connflag},${item.connflag}"/>
- </c:if>
- </c:forEach>
- <form id="report" action="${pageContext.request.contextPath }/UtilsAction.do" method="post" target="_blank">
- <input type="hidden" id="task" name="task" value="queryListExport"> <%-- 查询条件字段名称 --%>
- <input type="hidden" id="menu_code" name="menu_code" value="${menu_code }"> <%-- 查询条件字段名称 --%>
- <input type="hidden" id="columnname" name="columnname" value="${columnname }"> <%-- 查询条件字段名称 --%>
- <input type="hidden" id="connflag" name="connflag" value="${connflag }"> <%-- 查询条件字段连接符号 --%>
- <input type="hidden" id="export_type" name="export_type" value=""> <%-- 导出类型 --%>
- <input type="hidden" id="columnvalue" name="columnvalue" value=""> <%-- 输入的值 --%>
- <input type="hidden" id="pictype" name="pictype" value="${pictype }"> <%-- 输入的值 --%>
- <input type="hidden" id="menu_name" name="menu_name" value=""> <%-- 导出的菜单名称 --%>
- </form>
- <div class="container-layout">
- <div id="container-layout" style="margin-top: -38px;">
- <%-- 查询条件拼接拼接 --%>
- <c:set var="countPRI" value="0"/> <%-- 判断第一列第一个是不是 起始时间控件 0 不是 1 是 --%>
- <c:forEach var="item" items="${querycondition}" varStatus="idxStatus1">
- <c:if test="${idxStatus1.index== 0 || idxStatus1.index== 4 || idxStatus1.index== 8 || idxStatus1.index== 12}">
- <c:if test="${idxStatus1.index== 0}">
- <div id="default_search" class="default_search">
- </c:if>
- <c:if test="${idxStatus1.index== 4 || idxStatus1.index== 8 || idxStatus1.index== 12}">
- <div id="default_search" class="default_search">
- </c:if>
- </c:if>
- <c:if test="${item.column_name == 'createdatebegincreatedateend'}">
- <c:set var="countPRI" value="1"/> <%-- 判断第一列第一个是不是 起始时间控件 0 不是 1 是 --%>
- <ul class="list_search" style="width: 370px;">
- <li class="title" style="width: 70px;">${item.column_desc}:</li>
- <li class="text" style="width: 135px;">
- <input type="text" id="createdatebegin" name="createdatebegin" style="width: 130px;" />
- <li class="title" style="width: 15px;">至
- </li>
- <li class="text" style="width: 135px;">
- <input type="text" id="createdateend" name="createdateend" style="width: 130px;" />
- </li>
- </ul>
- <script type="text/javascript">
- $("#createdatebegin").ligerDateEditor({ labelWidth : 128, labelAlign : 'right', showTime : false });<%-- 初始化开始时间控件 --%>
- $("#createdateend").ligerDateEditor({ labelWidth : 128, labelAlign : 'right' }); <%-- 初始化结束时间控件 --%>
- </script>
- </c:if>
- <c:if test="${item.column_name != 'createdatebegincreatedateend'}">
- <c:set var="width" value="225"/><%-- 设置列默认宽度 --%>
- <c:if test="${(idxStatus1.index== 4 || idxStatus1.index== 8 || idxStatus1.index== 12) && (countPRI == 1)}">
- <c:set var="width" value="370"/> <%-- 当第一个查询条件为 起始条件时 第一列的宽度加大 --%>
- </c:if>
- <ul class="list_search" style="width: ${width }px;">
- <li class="title" style="width: 70px;">${item.column_desc}:</li>
- <li class="text" style="width: 135px;">
- <c:if test="${item.treetype == 3}"> <%-- 3 为input框 --%>
- <input type="text" id="${item.column_name}" name="${item.column_name}" style="width: 130px;" />
- </c:if>
- <c:if test="${item.treetype == 4}"> <%-- 4 为下拉框 --%>
- <select name="${item.column_name}" id="${item.column_name}" style="width: 130px;" >
- <option value="" selected="selected">全部</option>
- <c:forEach items="${item.list }" var="flow" varStatus="status">
- <option value="${flow.key }">${flow.value }</option>
- </c:forEach>
- </select>
- </c:if>
- <c:if test="${item.treetype == 5}"> <%-- 5 为区域树 --%>
- <input type="text" id="${item.column_name}_text" name="${item.column_name}_text" style="width: 130px;" onclick="onClickTree('areatree','${item.column_name}','${item.column_name}_text')"/>
- <input type="hidden" id="${item.column_name}" name="${item.column_name}" style="width: 130px;" />
- </c:if>
- <c:if test="${item.treetype == 6}"> <%-- 6 为部门树 --%>
- <input type="text" id="${item.column_name}_text" name="${item.column_name}_text" style="width: 130px;" />
- <input type="hidden" id="${item.column_name}" name="${item.column_name}" style="width: 130px;" />
- <script type="text/javascript">
- loadTypeTree("${item.column_name}_text",{type:"user",tab:"1,2",backId:"${item.column_name}",backName:"${item.column_name}_text"});
- </script>
- </c:if>
- <c:if test="${item.treetype == 7}"> <%-- 7 为产品类别树 --%>
- <input type="text" id="${item.column_name}_text" name="${item.column_name}_text" style="width: 130px;" onclick="onClickTree('productclasstree','${item.column_name}','${item.column_name}_text')"/>
- <input type="hidden" id="${item.column_name}" name="${item.column_name}" style="width: 130px;" />
- </c:if>
- </li>
- </ul>
- </c:if>
- <c:if test="${idxStatus1.index == (fn:length(querycondition) -1)}">
- <ul>
- <li class="search-button">
- <input type="button" class='l-button' name="search" onclick="pubOnCilck()" value="查询"/>
- </ul>
- <c:if test="${idxStatus1.index!= 3 && idxStatus1.index!= 7 && idxStatus1.index!= 11 && idxStatus1.index!= 15}">
- </div>
- </c:if>
- </c:if>
- <c:if test="${idxStatus1.index== 3 || idxStatus1.index== 7 || idxStatus1.index== 11 || idxStatus1.index== 15}">
- </div>
- </c:if>
- </c:forEach>
- <div id="default_search" class="default_search">
- <ul style="width: 100%">
- <li class="search-button" style="text-align: left; width: 50%">
- <c:if test="${menuaccess.columnadd == 1}">
- <input type="button" class="l-button" style="display: " name="search" onclick="createbasicInformation('${menu_code}')" value="新增"/>
- </c:if>
- </li>
- <li class="" style="text-align: right;">
- <jsp:include page="/yw/sales/utils/exportbutton.jsp"></jsp:include>
- <a id="v0" href="javascript:getdivdisplay(0,'v0','v1')" style="text-align: right; ">隐藏</a>
- </li>
- </ul>
- </div>
- </div>
- <div id="searchbar" style="width: 100%;text-align: right;">
- <a id="v1" href="javascript:getdivdisplay(1,'v0','v1')" style="display: none">显示</a>
- <div style="clear: both;margin-right: 2px;margin-bottom:0px;margin-left:0px;margin-top:0px; padding: 0">
- <div id="maingrid4" style="margin:0; padding:0"></div>
- </div>
- </div>
- </div>
- <%@ include file="/include/message.jsp"%>
- </body>
- <script type="text/javascript">
- // 如果有时间段选择,验证开始时间不能大于结束时间
- function getthinktime(){
- <c:if test="${countPRI==1}">
- var createdatebegin = $("#createdatebegin").val();
- var createdateend = $("#createdateend").val();
-
- if(createdatebegin != "" && createdateend != ""){
- var startTmp = createdatebegin.split("-");
- var endTmp = createdateend.split("-");
- var sd = new Date(startTmp[0],startTmp[1],startTmp[2]);
- var ed = new Date(endTmp[0],endTmp[1],endTmp[2]);
- if(sd.getTime()>ed.getTime()){
- alert("开始日期不能大于结束日期");
- return false;
- }
- }
- </c:if>
- return true;
- }
- </script>
- </html>
|