纯table复杂页面

2022/7/13 6:22:27

本文主要是介绍纯table复杂页面,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

<%@ page import="com.velcro.base.Globals" %>
<%@page import="com.velcro.base.label.service.LabelService" %>
<%@page import="com.velcro.kernel.base.IPage" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="com.navi.dao.jdbc.IDataService" %>
<%@ page import="com.velcro.base.orgunit.service.OrgunitService" %>
<%@ page import="com.velcro.base.selectitem.service.SelectitemService" %>
<%@ page import="com.velcro.kernel.workflow.pipe.service.IPipeinfoService" %>
<%@ page import="com.velcro.kernel.workflow.workflow.service.IWorkflowbaseService" %>
<%@ page import="com.velcro.workflow.pipe.service.NodeinfoService" %>
<%@ include file="/vbase/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
    IHumresService humresService = (HumresService) BaseContext.getBean(request, "humresService");
    IPipeinfoService pipeinfoService = (IPipeinfoService) BaseContext.getBean(request, "pipeinfoService");
    IWorkflowbaseService workflowbaseService = (IWorkflowbaseService) BaseContext.getBean(request, "workflowbaseService");
    DataService dateService = (DataService) BaseContext.getBean(getServletContext(), "dataService");
    NodeinfoService nodeinfoService = (NodeinfoService) BaseContext.getBean(getServletContext(), "nodeinfoService");

//    String titles = StringHelper.null2String(request.getParameter("titles"));  //标题
//    String creators = StringHelper.null2String(request.getParameter("creator"));  //创建人
//    String createdates = StringHelper.null2String(request.getParameter("createdate"));//开始时间
//    String createdates_1 = StringHelper.null2String(request.getParameter("createdate_1"));//结束时间
//    String categoryid = StringHelper.null2String(request.getParameter("categoryids"));//分类id
//    String isdeletes = StringHelper.null2String(request.getParameter("isdeletes"));
    String selectSql = "select * from PropertyListView ";

//    if (StringHelper.isNotEmpty(titles)){
//        selectSql=selectSql + "and title like '%"+titles+"%' ";
//    }
//
//    if (StringHelper.isNotEmpty(creators)){
//        selectSql=selectSql + "and creatorname like '%"+creators+"%' ";
//    }
//    if (StringHelper.isNotEmpty(createdates)){
//        selectSql=selectSql + "and createdate >='"+createdates+"' ";
//    }
//    if (StringHelper.isNotEmpty(createdates_1)){
//        selectSql=selectSql + "and createdate <='"+createdates_1+"' ";
//    }
//    if (StringHelper.isNotEmpty(categoryid)){
//        String category=dateservice.getValue("select id from CATEGORY where IDPATH like '%"+categoryid+"%'");
//        String[] objnames = new String[0];
//        objnames = category.split(",");
//        String categoryidss="";
//        for (int i=0;i<objnames.length;i++){
//            categoryidss=categoryidss+"'"+objnames[i]+"'"+",";
//        }
//        categoryidss=categoryidss+"'12345'";
//        selectSql=selectSql + " and categoryid in ("+categoryidss+") ";
//    }
//    if (StringHelper.isNotEmpty(isdeletes)){
//        selectSql=selectSql + "and isdelete ='"+isdeletes+"' ";
//    }
//    String categoryname=dateservice.getValue("select objname from categoryv where id='"+categoryid+"'");
    System.out.println(selectSql);

    int pageno = NumberHelper.string2Int((String) request.getParameter("pageno"), 1);
    int pagesize = NumberHelper.string2Int((String) request.getParameter("pagesize"), 20);
    Page pageObject = (Page) dateService.pagedQuery(selectSql, pageno, pagesize);
    List list = new ArrayList();
    if (pageObject.getTotalSize() != 0) {
        list = (List) pageObject.getResult();
    }
    System.out.println("list" + list);
%>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>物业清单</title>
    <script type="text/javascript" src="/vjs/base/DataHelper.js"></script>
    <script type="text/javascript" src="/vjs/base/InputMsg.js"></script>
    <link href="/vkm/style/css/zglystyle.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        /*table{*/
        /*border: 1px solid #cccc77;*/
        /*}*/
        /*table th{*/
        /*border: solid #ccc 1px;*/
        /*}*/
    </style>
</head>

<body>
<div class="mW2">
    <div class="pB">
        <form action="" id="velcroForm" name="VelcroForm" method="post">
            <div class="direct-right-search">
                <button class="btn" id="button_S" accesskey="S" onclick="javascript:onSubmit() " type="button">搜索(s)
                </button>
            </div>
            <div class="direct-right-search">
                <%--<span></span>--%>
                <%--<span>问题名称:</span>--%>
                <%--<input type="text" name= "titles" id="titles" style="margin-right:32px;!important;" value="<%=titles%>"/>--%>
                <%--<span>创建人:</span>--%>
                <%--<input type="text" name= "creator" id="creator" style="margin-right:32px;!important;" value="<%=creators%>"/>--%>
                <%----%>
                <%--<span>创建日期:</span>--%>
                <%--<input name="createdate" class="dateIpt" id="createdate" type="text" value="<%=createdates%>">--%>
                <%--<button class="icoR iRDat" onclick="WdatePicker({el:$dp.$('createdate')})" type="button"></button>--%>
                <%-----%>
                <%--<input name="createdate_1" class="dateIpt" id="createdate_1" type="text" value="<%=createdates_1%>">--%>
                <%--<button class="icoR iRDat" onclick="WdatePicker({el:$dp.$('createdate_1')})" type="button">--%>
                <%--</button>--%>
            </div>

            <div class="direct-right-table">
                <div class="right-table-wrap">
                    <table id="tb_1" cellpadding="0" cellspacing="1" border="1">
                             
                        <thead>
                               
                        <tr align="center">
                                     
                            <td rowspan="2">编号</td>
                                     
                            <td colspan="3" rowspan="2">物业地址</td>
                                     
                            <td rowspan="2">产权人</td>
                                     
                            <td rowspan="2">物业性质</td>
                                     
                            <td rowspan="2">物业用途</td>
                                     
                            <td>物业面积</td>
                                     
                            <td colspan="2">租期</td>
                                     
                            <td rowspan="2">中介费用(等于几个月租金)</td>
                                     
                            <td rowspan="2">押金(等于几个月租金)</td>
                                     
                            <td colspan="2">月租金(港元)</td>
                            <td colspan="2">欠租情况</td>
                            <td colspan="2">管理费拖欠情况</td>
                            <td colspan="2">差响拖欠情况</td>
                            <td rowspan="2">欠款追收进度</td>
                            <td colspan="5">租客</td>
                            <td colspan="2">免租期</td>
                        </tr>

                               
                        <tr align="center">       
                            <td>平方英尺</td>       
                            <td>起始日</td>         
                            <td>结束日</td>       
                            <td>单位价格</td>
                            <td>金额</td>
                            <td>期限</td>
                            <td>金额</td>
                            <td>期限</td>
                            <td>金额</td>
                            <td>期限</td>
                            <td>金额</td>
                            <td>名称</td>
                            <td>是否为SPV公司</td>
                            <td>联系人</td>
                            <td>联系方式</td>
                            <td>所在行业</td>
                            <td>起始时间</td>         
                            <td>结束时间</td>   
                        </tr>
                        </thead>
                           
                        <tbody>   
                        <tr> 
                            <td>1</td>   
                            <td>学才大夏</td>   
                            <td>5/F</td>   
                            <td>广州市黄浦区</td> 
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td> 
                            <td>1</td> 
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td> 
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>       
                        </tr>
                             
                        </tbody>
                           
                    </table>
                </div>
            </div>
            <%@ include file="/vbase/pagenavigator.jsp" %>
        </form>
    </div>
</div>
<%--<script src="/vjs/jquery/jquery.min.js" type="text/javascript"></script>--%>
<%--<script src="/home/js/mail.js"></script>--%>
<script language="javascript" type="text/javascript">
    function onSubmit() {
        document.VelcroForm.pageno.value = "1";
        document.VelcroForm.submit();
    }

    new vjs.base.ListTable({table: '#vTable'});
</script>
<script type="text/javascript">
    var tTD; //用来存储当前更改宽度的Table Cell,避免快速移动鼠标的问题
    var table = document.getElementById("tb_1");
    for (j = 0; j < table.rows[0].cells.length; j++) {
        table.rows[0].cells[j].onmousedown = function () {
            //记录单元格
            tTD = this;
            if (event.offsetX > tTD.offsetWidth - 10) {
                tTD.mouseDown = true;
                tTD.oldX = event.x;
                tTD.oldWidth = tTD.offsetWidth;
            }
            //记录Table宽度
            //table = tTD; while (table.tagName != ‘TABLE') table = table.parentElement;
            //tTD.tableWidth = table.offsetWidth;
        };
        table.rows[0].cells[j].onmouseup = function () {
            //结束宽度调整
            if (tTD == undefined) tTD = this;
            tTD.mouseDown = false;
            tTD.style.cursor = 'default';
        };
        table.rows[0].cells[j].onmousemove = function () {
            //更改鼠标样式
            if (event.offsetX > this.offsetWidth - 10)
                this.style.cursor = 'col-resize';
            else
                this.style.cursor = 'default';
            //取出暂存的Table Cell
            if (tTD == undefined) tTD = this;
            //调整宽度
            if (tTD.mouseDown != null && tTD.mouseDown == true) {
                tTD.style.cursor = 'default';
                if (tTD.oldWidth + (event.x - tTD.oldX) > 0)
                    tTD.width = tTD.oldWidth + (event.x - tTD.oldX);
                //调整列宽
                tTD.style.width = tTD.width;
                tTD.style.cursor = 'col-resize';
                //调整该列中的每个Cell
                table = tTD;
                while (table.tagName != 'TABLE') table = table.parentElement;
                for (j = 0; j < table.rows.length; j++) {
                    table.rows[j].cells[tTD.cellIndex].width = tTD.width;
                }
                //调整整个表
                //table.width = tTD.tableWidth + (tTD.offsetWidth – tTD.oldWidth);
                //table.style.width = table.width;
            }
        };
    }
</script>

</body>
</html>
<script>
    function onSubmit() {
        document.getElementById("VelcroForm").submit();
    }
</script>

 



这篇关于纯table复杂页面的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程