| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>项目列表</title>
- <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/ligerDialog.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript">
- var grid = null;
- var checkValue = new Array(); //定义一个数组
- var i = 0;
- function initSupplierGridList(params) {
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
-
- var columns = [
- {
- display : '项目编号',
- name : 'project_code',
- width : 120
- }, {
- display : '项目名称',
- name : 'project_name',
- width : 300
- }, {
- display : '创建时间',
- name : 'create_date',
- width : 180
- } ];
- grid = $("#maingrid4").ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'contractCommonChoose.do?method=getProjectData&time='
- + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '99%',
- checkbox : checkbox,
- isChecked: f_isChecked,
- 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();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
-
-
- //默认选中
- function f_isChecked(rowdata){
- if(checkValue != "" && typeof (checkValue) != "undefined"){
- if(checkValue[i]==rowdata.sid){
- i++;
- return true;
- }
- return false;
- }
- }
-
- $(function() {
- if('${checkValue}' != "" && typeof ('${checkValue}') != "undefined"){
- checkValue = '${checkValue}'.split(",");
- }
- initSupplierGridList();
- });
-
- function searchByKword() {
- var s = "";
- var sno = $("#sno").val();
- if (sno != "" && typeof (sno) != "undefined") {
- s += "&sno=" + encodeURI(encodeURI(sno));
- }
- var sname = $("#sname").val();
- if (sname != "" && typeof (sname) != "undefined") {
- s += "&sname=" + encodeURI(encodeURI(sname));
- }
- grid.set("newPage","1");
- $(function() {
- initSupplierGridList(s);
- });
- }
-
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <div class="default_search" >
- <ul class="list_search">
- <li class="title">项目编号:</li>
- <li class="text"><input type="text" name="sno" id="sno"></li>
- </ul>
- <ul class="list_search">
- <li class="title">项目全称:</li>
- <li class="text"><input type="text" name="sname" id="sname"></li>
- </ul>
-
- <input type="button" class='l-button' name="search" onclick="searchByKword()" value="查询" style="margin-left:15px;"/>
-
- </div>
- <div style="clear:both;"></div>
- <div id="searchbar">
- <div style="overflow: hidden;clear: both;">
- <div id="maingrid4" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|