easyUI一览页面查询、导出功能

<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>

<!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=utf-8">
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<title>病毒复核检测结果一览</title>
<link href="<%= request.getContextPath() %>/css/reset.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath() %>/css/styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/page.css"/>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/themes/default/easyui.css" media="all">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/themes/icon.css" media="all">
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery.easyui.min.js" ></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/easyloader.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/message.js"></script>
<script type="text/javascript">

    $(function(){
        window.onresize=function(){
            try{
                var w=document.body.clientWidth;
                $(‘#filterDiv‘).panel(‘resize‘,{width:w-8});
                $(‘#grid‘).datagrid(‘getPanel‘).panel(‘resize‘,{width:w-8});
            }catch(e){

            }
        };
    });

    //初始化easyui datagrid控件
    $(function(){
        //设置grid宽度
        $(‘#grid‘).datagrid({
            title:‘检索结果‘,//&nbsp;&nbsp;&nbsp;<a href="#" onclick="javascript:add();">新增</a>
            pageNumber:1,
            pageList:[10,20,50],
            nowrap: true,
            striped: true,
            collapsible:true,
            method:‘get‘,
            height:325,
            fitColumns:false,
            remoteSort:false,
            idField:"id",
            animate:true,
            singleSelect:true,
            loadMsg:"Loading...",
            onLoadSuccess:function(){
                $("#grid").datagrid("clearSelections");
            },
            frozenColumns:[[//固定列
                    {field:"no",title:"&nbsp;No.",width:"30",align:"center",
                        formatter:function(value,rec,rowIndex){
                        var pageSize=$("#grid").datagrid("options").pageSize;
                        var pageNumber=$("#grid").datagrid("options").pageNumber;
                        return (pageNumber-1)*pageSize+rowIndex+1;
                            }
                    },
                    {field:"id",hidden:true},
                    {field:"blbh",title:"病例编号",width:"100",align:"center"},
                    {field:"xm",title:"姓名",width:"50",align:"center"},
                    {field:"xb",title:"性别",width:"50",align:"center"},
                    {field:"zjhm",title:"证件号码",width:"120",align:"center"},
                    {field:"lrrq",title:"录入日期",width:"100",align:"center"},
                    {field:"lrz",title:"录入者",width:"80",align:"center"}

                ]],
            columns:[[
                    {field:"jcjg",title:"病毒检测结果",width:"240",align:"center"}
                ]],
                pagination:true,
                onDblClickRow:function(rowIndex,rowData) {
                    $("#grid").datagrid("selectRow",rowIndex); //获取双击选中行的病例编号单元格数据
                    var blbh = $("#grid").datagrid("getSelected").blbh;    

                       var url = "../fxb/redirect.action?result=fxbUpdateFhbd&blbh="+blbh; //详情修改页面(同区录入)
                      var params = "dialogWidth:800px;dialogHeight:400px;center:yes;status:no;help:no;scrollbars:auto";
                      showModalDialog(url,window,params);
                      $("#grid").datagrid("reload");
                  }
        }); 

        $(".pagination-info").text("显示1到0,共0记录");
        $("#grid").datagrid("loaded");

        //阳性病例是否不可编辑
        $("#bdjcjg").combobox({
            onChange:function(v){
                if(v==‘02‘){
                    $(‘#yxbl‘).combobox(‘enable‘);
                }else{
                    $(‘#yxbl‘).combobox(‘setValue‘,‘‘);
                    $(‘#yxbl‘).combobox(‘disable‘);
                }
            }
        });
    });

    //查询
    function doSearch() {
        var param = new Object();
        var xm = $("#xm")[0].value;
        var xb = $(‘#xb‘).combobox("getValue");

        var zjhm = $(‘#zjhm‘)[0].value;
        var blbh = $("#blbh")[0].value;
        var startDate = $("#startDate").val();
        var endDate = $("#endDate").val();
        if(startDate==null||startDate==""){
            }else
            if(endDate==null||endDate==""){
            }else
            if(startDate > endDate){
                $.messager.alert(‘警告‘, getMessage(MSG_C012,"录入日期(结束)","录入日期(开始)"));
                return false;
        }
        var bdjcjg = $("#bdjcjg").combobox("getValue");
        var yxbl = $("#yxbl").combobox("getValue");
        if(xm) {
            param.xm = xm;
        }
        if(xb) {
            param.xb = xb;
        }
        if(zjhm) {
            param.zjhm = zjhm;
        }
        if(blbh) {
            param.blbh = blbh;
        }
        if(startDate) {
            param.startDate = startDate;
        }
        if(endDate) {
            param.endDate = endDate;
        }
        if(bdjcjg) {
            param.bdjcjg = bdjcjg;
        }
        if(yxbl) {
            param.yxbl = yxbl;
        }
        $("#grid").datagrid("options").url="<%= request.getContextPath() %>/fxb/fxbListFhbdQuery.action";
        $("#grid").datagrid("load",param);
    }

    //重置查询条件
    function resetForm() {
        //$("#queryForm").form("clear");
        $("#xm").val("");
        $("#zjhm").val("");
        $("#blbh").val("");
        $("#startDate").val("");
        $("#endDate").val("");
        $("#xb").combobox("setValue","");
        $("#bdjcjg").combobox("setValue","");
        $("#yxbl").combobox("setValue","");
    }

    //导出功能
    function exportExcel() {
        var rows = $("#grid").datagrid("getData").rows;
        var maxCount = rows.length;
        if (maxCount < 10000 && maxCount >= 1) {
            var str = $.param($("#grid").datagrid("options").queryParams); //查询参数
            var form = document.getElementById("excelForm");
            if(str == "") {
                form.action = "<%= request.getContextPath() %>/fxb/exportExcelQuery.action";
            }else {
                form.action = "<%= request.getContextPath() %>/fxb/exportExcelQuery.action?"+str;
            }
            form.submit();
        }
        else if (maxCount < 1) {
            $.messager.alert("警告", getMessage(MSG_C017));
        }else {
            $.messager.alert("警告", getMessage(MSG_C005));
        }
    }

</script>
</head>
<body class="main_bg">
<div class="cfbk">
<h3><span>病毒复核检测结果一览</span></h3></div>
<form id="excelForm"  method="POST"></form>
<table width="99%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
    <td width="100%"> <br/>
    <div id="filterDiv" class="easyui-panel" style="padding:2px;" title="检索条件" collapsible="true">
    <form id="queryForm"  method="POST">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="commonTable">
        <tr>
            <th>姓名</th>
            <td><input id="xm" name="xm" class="easyui-validatebox" style="width:100px;" ></td>
            <th>性别</th>
            <td><input id="xb" name="xb" class="easyui-combobox" valueField="code" textField="text" method="get" editable="false"
                  url="<%= request.getContextPath() %>/pt/codeQuery!getComboboxInfoForJquery.action?key=gb&code=xb&showPlease=true"
                  style="width:100px;" panelHeight="auto" panelWidth="auto"/>
            </td>
            <th>证件号码</th>
            <td ><input id="zjhm" name="zjhm" class="easyui-validatebox" ></td>
        </tr>
        <tr>
            <th>病例编号</th>
            <td><input id="blbh" name="blbh" class="easyui-validatebox" ></td>
            <th>录入日期</th>
            <td><input id="startDate" name="startDate" style="width:70px;" onClick="WdatePicker()"> 至
                <input id="endDate" name="endDate" style="width:70px;" onClick="WdatePicker()">
            </td>
            <td></td><td></td>
        </tr>
        <tr>
            <th align="right">病毒检测结果</th>
            <td><input id="bdjcjg" name="bdjcjg" class="easyui-combobox" style="width:100px;" editable="false"
                  url="<%= request.getContextPath() %>/pt/codeQuery!getComboboxInfoForJquery.action?key=fxb&code=bd_jcjg&showPlease=true"
                  valueField="code" textField="text" method="get" panelHeight="auto" panelWidth="auto"/>
            </td>
            <th>阳性病例</th>
            <td colspan="4"><input id="yxbl" name="yxbl" class="easyui-combobox" style="width:100px;" editable="false" disabled="disabled"
                   url="<%= request.getContextPath() %>/pt/codeQuery!getComboboxInfoForJquery.action?key=fxb&code=bd_yxbl&showPlease=true"
                  valueField="code" textField="text" method="get" panelHeight="auto" panelWidth="auto"/>
            </td>
        </tr>

        <tr>
            <td colspan="6" align="center">
                <input class="submit_01" type="button" onClick="doSearch();" value="搜索" />
                <input class="submit_01" type="button" onclick="resetForm();" value="重置" />
                <input class="submit_01" type="button" onclick="exportExcel();" value="导出" />
            </td>
        </tr>
        </table>
    </form></div><br/>

    <table id="grid" width="99%"></table>
    </td>

    <td width="1%" rowspan="6"></td>
    </tr>    

</table>
</body>
</html>

FxbListFhbd.jsp

    /**
     * 病毒复核检测信息分页查询
     * @return
     * @throws Exception
     */
    public String query() throws Exception {
        String pageNo = this.servletRequest.getParameter("page");
        String pageSize = this.servletRequest.getParameter("rows");
        vo.setPage(Integer.parseInt(pageNo));
        vo.setRows(Integer.parseInt(pageSize));

        Page page = fxbListFhbdService.queryByPage(vo, vo.getPage(), vo.getRows(),"1");
        BaseJqueryGridVo gridVo = new BaseJqueryGridVo();
        gridVo.setRows(page.getResult());
        gridVo.setTotal(page.getTotalSize());
        String json = VOUtils.getJsonData(gridVo);
        createJSonData(json);
        return "ajax";
    }

分页查询

    /**
     * 病毒复核检测信息分页查询
     * @param pageNo
     * @param pageSize
     * @param bz
     * @return
     */
    @SuppressWarnings("unchecked")
    public Page queryByPage(FxbListFhbdVo vo, int pageNo, int pageSize,String bz) {
        Page page = this.fxbListFhbdDao.queryByPage(vo, pageNo, pageSize,bz);

        List<FxbListFhbdVo> list = page.getResult();
        if (list != null && list.size() > 0) {
            FxbListFhbdVo bo = null;
            FxbListFhbdVo voResult = null;
            List<FxbListFhbdVo> volist=new ArrayList<FxbListFhbdVo>();
            for (int i = 0; i < list.size(); i++)  {
                bo=list.get(i);
                voResult = new FxbListFhbdVo();
                if(bo.getXb()!=null){
                    voResult.setXb(codeService.getNameByValue("gb", "xb", bo.getXb()));
                }
                if("99".equals(bo.getJcjg()) || "01".equals(bo.getJcjg()) ) {
                    voResult.setJcjg(codeService.getNameByValue("fxb", "bd_bdjcjg", bo.getJcjg()));
                }
                else {
                    voResult.setJcjg(codeService.getNamesByValueJcjg("fxb", "bd_bdjcjg", bo.getJcjg()));
                }
                voResult.setXm(bo.getXm());
                voResult.setBlbh(bo.getBlbh());
                voResult.setZjhm(bo.getZjhm());
                voResult.setLrz(bo.getLrz());
                //SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
                //vo1.setLrrq(sdf.format(bo.getLrrq()));
                voResult.setLrrq(bo.getLrrq());
                volist.add(voResult);
            }
            page.setResult(volist);
        }
        return page;
    }

serviceImpl

package com.wonders.cutecdc.fxb.dao.impl;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;

import com.wonders.cutecdc.common.StringUtils;
import com.wonders.cutecdc.fxb.dao.FxbListFhbdDao;
import com.wonders.cutecdc.fxb.entity.bo.TC7Fxjcbdjcjg;
import com.wonders.cutecdc.fxb.entity.vo.FxbListFhbdVo;
import com.wondersgroup.framework.core.bo.Page;
import com.wondersgroup.framework.core5.dao.impl.AbstractHibernateDaoImpl;

public class FxbListFhbdDaoImpl extends AbstractHibernateDaoImpl<TC7Fxjcbdjcjg> implements FxbListFhbdDao {

    /**
     * 病毒复核检测信息分页查询
     * @param  pageNo
     * @return pageSize
     * @param  bz
     * @return
     */
    @SuppressWarnings("unchecked")
    public Page queryByPage(FxbListFhbdVo vo, int pageNo, int pageSize,String bz) {
        int startCount = pageSize *(pageNo-1);
        int endCount = pageSize * (pageNo); 

        StringBuilder hql = new StringBuilder("select tb.* ");
        StringBuilder countHql = new StringBuilder(" select count(*) ");
        String sqlFromStr="FROM (SELECT ROWNUM RN,"+
            " GA.XM, GA.XB, GA.ZJHM, T.BLBH, T.CJSJ, T.CJZ, T.JCJG "+
            " FROM T_C7_FXJCBDJCJG T "+
            " LEFT JOIN T_C7_FXJCGA GA ON GA.BLBH = T.BLBH AND GA.YXBZ = ‘1‘ "+
            " WHERE T.YXBZ = ‘1‘ AND T.JCLX = ‘1‘ ";

        hql.append(sqlFromStr);
        countHql.append(sqlFromStr);

        //姓名
        if (!StringUtils.isEmpty(vo.getXm())) {
            hql.append(" and ga.xm like ‘%"+vo.getXm()+"%‘ ");
            countHql.append(" and ga.xm like ‘%"+vo.getXm()+"%‘ ");
        }
        //性别
        if (!StringUtils.isEmpty(vo.getXb())) {
            hql.append(" and ga.xb =‘"+vo.getXb()+"‘") ;
            countHql.append(" and ga.xb =‘"+vo.getXb()+"‘ ");
        }
        //证件号码
        if (!StringUtils.isEmpty(vo.getZjhm())) {
            hql.append(" and ga.zjhm like ‘%"+vo.getZjhm()+"%‘ ");
            countHql.append(" and ga.zjhm like ‘%"+vo.getZjhm()+"%‘ ");
        }
        //病例编号
        if (!StringUtils.isEmpty(vo.getBlbh())) {
            hql.append(" and ga.blbh like ‘%"+vo.getBlbh()+"%‘ ");
            countHql.append(" and ga.blbh like ‘%"+vo.getBlbh()+"%‘ ");
        }
        //录入日期
        if(vo.getStartDate() != null){
            hql.append(" and to_char(t.cjsj,‘yyyy-mm-dd‘) >= ‘"+vo.getStartDate()+"‘ ");
            countHql.append(" and to_char(t.cjsj,‘yyyy-mm-dd‘) >= ‘"+vo.getStartDate()+"‘ ");
        }
        if(vo.getEndDate() != null){
            hql.append(" and to_char(t.cjsj,‘yyyy-mm-dd‘) <= ‘"+vo.getEndDate()+"‘ ");
            countHql.append(" and to_char(t.cjsj,‘yyyy-mm-dd‘) <= ‘"+vo.getEndDate()+"‘ ");
        }
        //病毒检测结果
        if (!StringUtils.isEmpty(vo.getBdjcjg())) {

            if("01".equals(vo.getBdjcjg()) || "99".equals(vo.getBdjcjg())) {
                hql.append(" and t.jcjg =‘"+vo.getBdjcjg()+"‘ ") ;
                countHql.append(" and t.jcjg =‘"+vo.getBdjcjg()+"‘ ");
            }

            if("02".equals(vo.getBdjcjg())) { //阳性病例
                if (!StringUtils.isEmpty(vo.getYxbl())) {
                    hql.append(" and t.jcjg like ‘%"+vo.getYxbl()+"%‘ ");
                    countHql.append(" and t.jcjg like ‘%"+vo.getYxbl()+"%‘ ");
                }
                else {
                    hql.append(" and (t.jcjg not like ‘%01%‘ and t.jcjg not like ‘%99%‘) ");
                    countHql.append(" and (t.jcjg not like ‘%01%‘ and t.jcjg not like ‘%99%‘) ");
                }
            }
        }

        if("1".equals(bz)){ //查询
        hql.append(" ) tb where tb.rn > "+startCount+" and tb.rn <= "+endCount);
        countHql.append(" ) tb ");
        }
        else{ //导出
                hql.append( " ) tb ");
                countHql.append(" ) tb ");
        }

        Query query = this.getSession().createSQLQuery(hql.toString());
        List<Object[]> list = query.list();
        List<FxbListFhbdVo> voList=new ArrayList<FxbListFhbdVo>();
        int j=0;
        if(list != null && list.size()>0){
            for(int i=0; i<list.size(); i++){
                j = 1;
                Object[] po = list.get(i) ;
                FxbListFhbdVo result=new FxbListFhbdVo();
                result.setXm(StringUtils.ObjectToString(po[j++]));
                result.setXb(StringUtils.ObjectToString(po[j++]));
                result.setZjhm(StringUtils.ObjectToString(po[j++]));
                result.setBlbh(StringUtils.ObjectToString(po[j++]));
                result.setLrrq(StringUtils.ObjectToString(po[j++]));
                result.setLrz(StringUtils.ObjectToString(po[j++]));
                result.setJcjg(StringUtils.ObjectToString(po[j++]));
                voList.add(result);
            }
        }

        Query countQuery = this.getSession().createSQLQuery(countHql.toString());
        //Object obj  = countQuery.uniqueResult();
        //int count = Integer.valueOf(obj == null?0:Integer.valueOf(obj+""));
        Integer count = Integer.parseInt(countQuery.list().get(0)+"");

        Page page = new Page();
        page.setCurrentPageNo(pageNo);
        page.setCurrentPageSize(pageSize);
        page.setResult(voList);
        page.setTotalSize(count);
        return page;
    }

    /**
     * 通过病例编号和检测类型获取id
     * @param blbh
     * @param jclx
     * @return
     */
    @SuppressWarnings("unchecked")
    public Long queryId(String blbh, String jclx) {

        StringBuilder sql = new StringBuilder("select t.id from T_C7_FXJCBDJCJG t where t.blbh= :blbh and t.jclx= :jclx ");        

        Query query = this.getSession().createSQLQuery(sql.toString());
        query.setString("blbh", blbh);
        query.setString("jclx", jclx);
        List <BigDecimal>list = query.list();
        Long ids=0l;
        if(list!=null&&list.size()>0) {
             ids = (list.get(0)).longValue();
        }
        return ids;
    }

}

DaoImpl

    /**
     * 病毒复核检测信息导出
     * @return
     */
    @SuppressWarnings("unchecked")
    public void exportExcelQuery() {
        String realPath = PublicUtil.getRealPath(this.servletRequest);
        String filepath=realPath+"\\excel\\FxbListFhbdReport.xls";
        try {
                HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(new File(filepath)));
                List<FxbListFhbdVo> list = null; 

                Page page = fxbListFhbdService.queryByPage(vo, vo.getPage(), vo.getRows(),"2");
                list = page.getResult();
                HSSFSheet sheet = wb.getSheetAt(0);
                ExportExcelUtil exportExce = new ExportExcelUtil(wb, sheet);
                String[] fields = { "blbh", "xm", "xb", "zjhm", "lrrq", "lrz", "jcjg" };
                if(list != null){
                    exportExce.cteateTableByList(list, fields, 2);
            }
            exportExce.outputExcel("病毒复核检测结果");
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }  

导出

双击一览页面跳转到详情页面从后台获取数据并显示的完整代码:RedirectAction

package com.wonders.cutecdc.fxb.action;

import com.wonders.cutecdc.fxb.entity.vo.FxbListFhbdVo;
import com.wonders.cutecdc.fxb.entity.vo.FxbTaskYmbzgzglVo;
import com.wonders.cutecdc.fxb.service.FxbListFhbdService;
import com.wonders.cutecdc.fxb.service.FxbTaskYmbzgzglService;
import com.wondersgroup.framework.core.web.struts2.action.BaseAction;

public class RedirectAction extends BaseAction {
    private static final long serialVersionUID = 6333873045441654724L;
    private FxbListFhbdVo fhbdQxVo;//区县
    private FxbListFhbdVo fhbdVo;//市平台

    private FxbListFhbdService fxbListFhbdService;    

    public FxbListFhbdService getFxbListFhbdService() {
        return fxbListFhbdService;
    }

    public void setFxbListFhbdService(FxbListFhbdService fxbListFhbdService) {
        this.fxbListFhbdService = fxbListFhbdService;
    }

    public FxbListFhbdVo getFhbdQxVo() {
        return fhbdQxVo;
    }

    public void setFhbdQxVo(FxbListFhbdVo fhbdQxVo) {
        this.fhbdQxVo = fhbdQxVo;
    }

    public FxbListFhbdVo getFhbdVo() {
        return fhbdVo;
    }

    public void setFhbdVo(FxbListFhbdVo fhbdVo) {
        this.fhbdVo = fhbdVo;
    }

    protected String operate() {
        String result = super.getServletRequest().getParameter("result");
        String blbh = super.getServletRequest().getParameter("blbh");
        if("fxbUpdateFhbd".equals(result)) {
            Long id = fxbListFhbdService.queryId(blbh,"1");    //1=复核检测样本
            if(id != null && id != 0l) {
                fhbdVo = fxbListFhbdService.loadByFhbdId(id);
            }else {
                fhbdVo = new FxbListFhbdVo();
                fhbdVo.setBlbh(blbh);
            }
            Long qxid = fxbListFhbdService.queryId(blbh,"3"); //3=区县检测样本
            if(qxid != null && qxid != 0l) {
                fhbdQxVo = fxbListFhbdService.loadByFhbdId(qxid);
            }
        }
}

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
	<package name="fxb" namespace = "/fxb" extends="gwcdc-default">
		<!--腹泻病 -->
		<action name="redirect" class="fxbRedirectAction" method="execute">

    /**
     * 通过病例编号和检测类型获取id
     * @param blbh
     * @param jclx
     * @return
     */
    @SuppressWarnings("unchecked")
    public Long queryId(String blbh, String jclx) {

        StringBuilder sql = new StringBuilder("select t.id from T_C7_FXJCBDJCJG t where t.blbh= :blbh and t.jclx= :jclx ");        

        Query query = this.getSession().createSQLQuery(sql.toString());
        query.setString("blbh", blbh);
        query.setString("jclx", jclx);
        List <BigDecimal>list = query.list();
        Long id = 0l;
        if(list!=null&&list.size()>0) {
             id = (list.get(0)).longValue();
        }
        return id;
    }

<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %> 

<!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=utf-8">
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<title>病毒检测结果修改</title>
<link rel="stylesheet" href="<%= request.getContextPath() %>/css/main.css" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/page.css"/>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/themes/default/easyui.css" media="all">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/themes/icon.css" media="all">
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery.easyui.min.js" ></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/even.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery.grid.scrollbar.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/message.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/jquery.autocomplete.min.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/js/common.js"></script>
<%
    String blbh = request.getParameter("blbh");
%>
<script type="text/javascript">

    //限制只能输入数字和字母
    $.fn.onlyNumAlpha = function () {
        $(this).keypress(function (event) {
            var eventObj = event || e;
            var keyCode = eventObj.keyCode || eventObj.which;
            if ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 97 && keyCode <= 122))
                return true;
            else
                return false;
        }).focus(function () {
                this.style.imeMode = ‘disabled‘;
            }).bind("paste", function () {
            var clipboard = window.clipboardData.getData("Text");
            if (/^(\d|[a-zA-Z])+$/.test(clipboard))
                return true;
            else
                return false;
        });
    };

    //初始化
    $(function() {
        // 限制使用了onlyNumAlpha类样式的控件只能输入数字和字母
        $(".onlyNumAlpha").onlyNumAlpha();

        initCheckboxCommon("qxbdjcjg",‘<s:property value="fhbdQxVo.jcjg"/>‘);
        initCheckboxCommon("bdjcjg",‘<s:property value="fhbdVo.jcjg"/>‘);
        showOrHide();
    });

    function doSave() {
        var bdjcjg = $("input[name=‘bdjcjg‘]:checked").map(function() {
            return $(this).val();
            }).get().join(‘,‘);
        $("#bdjcjg").val(bdjcjg);
        //var id=‘<s:property value="fhbdVo.id"/>‘;//后台已经获取id
        var azlzbdjyfx = $("input[name=‘fx2‘]").val();
        var filter  = /^G[0-9]{1,2}P[0-9]{1,2}$/;
        if(azlzbdjyfx !="" && filter.test(azlzbdjyfx)==false){
            alert("[A组轮状病毒基因分型]格式不正确,正确格式为:“G”+“1到2位的<br>不固定的数字”+固定大写字母“P”+“1到2位的不固定的数<br>字”,如G1P2,G23P3,G2P33,G22P35");
            return ;
        }
        if(bdjcjg == "" ||bdjcjg == null) {
            $.messager.alert("提示!", getMessage(MSG_C001,"病毒检测录入结果"));
            return ;
        }
        $.messager.confirm("提示", "是否确认保存?", function(r) {
            if(r){
            $.ajax({
                type:"get",
                url:‘../fxb/bdjcjgInputSave.action?bdjcjg=‘+bdjcjg,
                data:$("#inputForm").serialize(),
                dataType:"text",
                async:false,
                global:false,
                success:function(data){
                if(data=="1"){
                    $.messager.confirm("提示", getMessage(MSG_T009),function(r) {
                        if(r){
                            window.close();    }});
                }else{
                    $.messager.alert("提示!", getMessage(MSG_T027));
                }}
            });
            }
        });
    }

    //病毒检测结果click
    function bdClick(obj){
        if(obj.value == ‘01‘) {
            checkSfyx(‘1‘,‘bdjcjg‘);
        }
        else if(obj.value == ‘99‘) {
            checkSfyx(‘2‘,‘bdjcjg‘);
        }
        else {
            checkSfyx(‘3‘,‘bdjcjg‘);
        }
    }
    //判断勾选内容是否阳性
    function checkSfyx(tel,checkName) {
        var obj = document.getElementsByName(checkName);
        if(tel == 1) {//阴性
            for(var i = 1; i < obj.length; i++) {
                obj[i].checked = false;
            }
        }else if(tel==2) {//未检测
            for(var i = 0; i < obj.length-1; i++) {
                obj[i].checked = false;
            }
        }else if(tel==3) {//阳性
            $("[name=‘"+checkName+"‘]")[0].checked = false;
            $("[name=‘"+checkName+"‘]")[obj.length-1].checked = false;
        }
        for(var i = 0; i < obj.length; i++) {
            obj[i].nextSibling.style.color=(obj[i].checked)?"#CC33CC":"black";
        }
        showOrHide();
    }

    //基因测序(基因分型)显示或隐藏
    function showOrHide() {

        var bdjcjg2=document.getElementById("bdjcjg2");
        var bdjcjg3=document.getElementById("bdjcjg3");
        var bdjcjg4=document.getElementById("bdjcjg4");
        var bdjcjg5=document.getElementById("bdjcjg5");
        var bdjcjg6=document.getElementById("bdjcjg6");
        var bdjcjg7=document.getElementById("bdjcjg7");
        var bdjcjg8=document.getElementById("bdjcjg8");
        var bdjcjg9=document.getElementById("bdjcjg9"); 

        if(bdjcjg2.checked==true){
            $(‘#cx2‘).show();
        }else{
            $(‘#cx2‘).hide();
        }
        if(bdjcjg3.checked==true){
            $(‘#cx3‘).show();
        }else{
            $(‘#cx3‘).hide();
        }
        if(bdjcjg4.checked==true){
            $(‘#cx4‘).show();
        }else{
            $(‘#cx4‘).hide();
        }
        if(bdjcjg5.checked==true){
            $(‘#fx1‘).show();
            $(‘#fx2‘).show();
            $(‘#cx5‘).show();
        }else{
            $(‘#fx1‘).hide();
            $(‘#fx2‘).hide();
            $(‘#cx5‘).hide();
        }
        if(bdjcjg6.checked==true){
            $(‘#cx6‘).show();
        }else{
            $(‘#cx6‘).hide();
        }
        if(bdjcjg7.checked==true){
            $(‘#cx7‘).show();
        }else{
            $(‘#cx7‘).hide();
        }
        if(bdjcjg8.checked==true){
            $(‘#cx8‘).show();
        }else{
            $(‘#cx8‘).hide();
        }
        if(bdjcjg9.checked==true){
            $(‘#cx9‘).show();
        }else{
            $(‘#cx9‘).hide();
        }
    }

    //阳性勾选改变颜色
    function chgColor() {
        var obj=event.srcElement;
        obj.nextSibling.style.color=(obj.checked)?"#CC33CC":"black";
    }

</script>
</head>

<body class="main_bg">
<div class="cfbk">
    <form name="inputForm" id="inputForm" method="post">
    <input type="hidden" id ="id" name="id" value="<s:property value="fhbdVo.id"/>"/>
    <input type="hidden" id ="blbh" name="blbh" value="<s:property value="fhbdVo.blbh"/>"/>
    <div class="easyui-panel" border="0" title="病毒检测结果修改(同区录入)" closable="false" style="border-bottom: 0px">
        <table border="0"  width="100%" cellpadding="0" cellspacing="0"  class="commonTable">
            <tr>
                <th width="10%">病例编号</th>
                <td align="left" width="30%"><s:property value="fhbdVo.blbh"/></td>
                <td align="left" width="60%"></td>
            </tr>
            <tr><td style="color:red; text-align:left; font-weight:bold;" colspan="3">检测信息</td></tr>
            <tr>
                <th rowspan="3">病毒检测结果<font color="red"></font></th>
                   <td colspan="2">
                <table width="100%" border="0" cellspacing="1" cellpadding="0" class="commonTable2" id="resultTable">
                    <th width="30%" align="left"><b>区县结果</b> </th>
                     <th width="60%"><b>录入结果</b></th>
                   </table>
                </td>
            </tr>
            <tr>
            <td>
                <table border="0" width="100%" cellpadding="0" cellspacing="0" class="commonTable">
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="01" disabled="disabled"/><font>阴性</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="02" disabled="disabled"/><font>星状病毒</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="03" disabled="disabled"/><font>肠道腺病毒</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="04" disabled="disabled"/><font>札如病毒</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg"  value="05" disabled="disabled"/>
                        <font>轮状病毒A组</font>
                        <font color="#239AD7">基因分型 <input value="<s:property value="fhbdQxVo.azlzbdjyfx"/>" disabled="disabled" style="width:80px;"/></span></font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="06" disabled="disabled"/><font>轮状病毒B组</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="07" disabled="disabled"/><font>轮状病毒C组</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="08" disabled="disabled"/><font>诺如病毒GI型</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="09" disabled="disabled"/><font>诺如病毒GII型</font></td></tr>
                    <tr>
                        <td align="left" height="20px">
                        <input type="checkbox" name="qxbdjcjg" value="99" disabled="disabled"/><font>未检测</font></td></tr>
                   </table>
            </td>
               <td>
                <table id="eytab" border="1" width="100%" cellpadding="0" cellspacing="0" class="commonTable">
                    <tr>
                        <td align="left" width="25%" height="20px">
                            <input type="checkbox" name="bdjcjg" value="01" id="bdjcjg1" onclick="bdClick(this)"/><font>阴性</font></td>
                        <td align="left" width="65%" ></td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="02" id="bdjcjg2" onclick="bdClick(this)"/><font>星状病毒</font></td>
                        <td align="left" height="20px"><span id="cx2" style="display:none">基因测序
                            <input id="cx2Input" name="cx2" value="<s:property value="fhbdVo.jycy_xz"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="03" id="bdjcjg3" onclick="bdClick(this)"/><font>肠道腺病毒</font></td>
                        <td align="left" height="20px"><span id="cx3" style="display:none">基因测序
                            <input id="cx3Input" name="cx3" value="<s:property value="fhbdVo.jycy_cdx"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="04" id="bdjcjg4" onclick="bdClick(this)"/><font>札如病毒</font></td>
                        <td align="left" height="20px"><span id="cx4" style="display:none">基因测序
                            <input name="cx4" value="<s:property value="fhbdVo.jycy_zr"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="05" id="bdjcjg5" onclick="bdClick(this)"/><font>轮状病毒A组</font></td>
                           <td align="left" height="20px"><span id="cx5" style="display:none">基因测序
                             <input name="cx5" value="<s:property value="fhbdVo.jycy_lza"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                                <span id="fx1" style="display:none"><font color="#239AD7">基因分型</font></span>
                                <span id="fx2" style="display:none">
                                <input name="fx2" value="<s:property value="fhbdVo.azlzbdjyfx"/>" class="easyui-combobox" style="width:100px;height:20px;"
                                    url="<%= request.getContextPath() %>/pt/codeQuery!getComboboxInfoForJquery.action?key=fxb&code=fxb_jyfx"
                                    valueField="code" textField="text" method="get" editable="true" panelHeight="100px"/></span>
                            </td></tr>
                      <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="06" id="bdjcjg6" onclick="bdClick(this)"/><font>轮状病毒B组</font></td>
                        <td align="left" height="20px"><span id="cx6" style="display:none">基因测序
                            <input name="cx6" value="<s:property value="fhbdVo.jycy_lzb"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                       <tr>
                           <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="07" id="bdjcjg7" onclick="bdClick(this)"/><font>轮状病毒C组</font></td>
                        <td align="left" height="20px"><span id="cx7" style="display:none">基因测序
                            <input name="cx7" value="<s:property value="fhbdVo.jycy_lzc"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                           <td align="left" height="20px" >
                            <input type="checkbox" name="bdjcjg" value="08" id="bdjcjg8" onclick="bdClick(this)"/><font>诺如病毒GI型</font></td>
                        <td align="left" height="20px"><span id="cx8" style="display:none">基因测序
                            <input name="cx8" value="<s:property value="fhbdVo.jycy_nryx"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="09" id="bdjcjg9" onclick="bdClick(this)"/><font>诺如病毒GII型</font></td>
                        <td align="left" height="20px"><span id="cx9" style="display:none">基因测序
                            <input name="cx9" value="<s:property value="fhbdVo.jycy_nrex"/>" class="onlyNumAlpha" style="width:100px;"/></span>
                            </td></tr>
                    <tr>
                        <td align="left" height="20px">
                            <input type="checkbox" name="bdjcjg" value="99" id="bdjcjg99" onclick="bdClick(this)"/><font>未检测</font></td>
                        <td align="left" height="20px">
                            </td></tr>
              </table>
            </td>
            </tr>
        </table>
    </div>
    </form>
</div>

    <table align="center" height="40">
    <tr align="center" height="30">
        <td align="center">
            <input class="submit_01" type="button" value="保存" onClick="doSave()">
            <input class="submit_01" type="button" value="关闭" onClick="window.close();">
        </td>
    </tr>
    </table>

</body>
</html>

fxbUpdataFhbd.jsp

    /**
     * 保存病毒检测详情修改录入结果
     * @return
     */
    public String inputSave() {
        SecurityUser userVo = Login.getLoginUser(servletRequest);
        String jcjg = this.servletRequest.getParameter("bdjcjg");
        vo.setJcjg(jcjg);
        fxbListFhbdService.saveBdjcjg(vo, userVo);

        String json = "1";
        createJSonData(json);
        //createJSonData((new StringBuilder()).append("{\"success\":true,\"result\":[").append(json.toString()).append("]}").toString());
        return "ajax";
    }

保存修改结果

    /**
     * 通过id查询病毒检测结果
     * @param id
     * @return
     */
    public FxbListFhbdVo loadByFhbdId (Long id) {
        FxbListFhbdVo vo=new FxbListFhbdVo();
        TC7Fxjcbdjcjg bo = fxbListFhbdDao.load(id);
        if (bo != null) {
            vo.setId(id);
            vo.setBlbh(bo.getBlbh());
            vo.setJcjg(bo.getJcjg());
            vo.setAzlzbdjyfx(bo.getAzlzbdjyfx());
            vo.setJycy_xz(bo.getJycy_xz());
            vo.setJycy_cdx(bo.getJycy_cdx());
            vo.setJycy_zr(bo.getJycy_zr());
            vo.setJycy_lza(bo.getJycy_lza());
            vo.setJycy_lzb(bo.getJycy_lzb());
            vo.setJycy_lzc(bo.getJycy_lzc());
            vo.setJycy_nryx(bo.getJycy_nryx());
            vo.setJycy_nrex(bo.getJycy_nrex());
        }
        return vo;
    }

    /**
     * 保存病毒检测录入结果
     * @param vo
     * @return
     */
    public void saveBdjcjg(FxbListFhbdVo vo, SecurityUser userVo) {
        Long id = fxbListFhbdDao.queryId(vo.getBlbh(),"1");
        TC7Fxjcbdjcjg bo = null;
        if(id == 0l) {
            bo = new TC7Fxjcbdjcjg();
            bo.setBlbh(vo.getBlbh());
            bo.setJcjg(vo.getJcjg());
            bo.setAzlzbdjyfx(vo.getAzlzbdjyfx());
            bo.setJycy_xz(vo.getJycy_xz());
            bo.setJycy_cdx(vo.getJycy_cdx());
            bo.setJycy_zr(vo.getJycy_zr());
            bo.setJycy_lza(vo.getJycy_lza());
            bo.setJycy_lzb(vo.getJycy_lzb());
            bo.setJycy_lzc(vo.getJycy_lzc());
            bo.setJycy_nryx(vo.getJycy_nryx());
            bo.setJycy_nrex(vo.getJycy_nrex());
            bo.setZzjgxdrq(new Date()); //最终结果修订日期
            bo.setYxbz(ConstantsUtils.YXBZ_YX); //有效标志
            bo.setYljgdm(ConstantsUtils.QX_SHSJK); //医疗机构代码(市疾控)
            bo.setJclx(ConstantsUtils.FXB_JCLX_FHJCYB); //检测类型(复核检测)
            bo.setXgbz(ConstantsUtils.XGBZ_XZ); //修改标志(新增)
            bo.setRksj(new Date()); //入库时间
            bo.setIsxf(ConstantsUtils.ISXF_WXF); //下发标志(未下发)
            bo.setCjsj(new Date()); //创建时间
            bo.setCjz(userVo.getName()); //创建者
            bo.setCjjg(ConstantsUtils.QX_SHSJK); //创建机构(上海市疾控中心)
            this.fxbListFhbdDao.save(bo);
        }else {
            bo = fxbListFhbdDao.load(id);
            bo.setJcjg(vo.getJcjg());
            bo.setAzlzbdjyfx(vo.getAzlzbdjyfx());
            bo.setJycy_xz(vo.getJycy_xz());
            bo.setJycy_cdx(vo.getJycy_cdx());
            bo.setJycy_zr(vo.getJycy_zr());
            bo.setJycy_lza(vo.getJycy_lza());
            bo.setJycy_lzb(vo.getJycy_lzb());
            bo.setJycy_lzc(vo.getJycy_lzc());
            bo.setJycy_nryx(vo.getJycy_nryx());
            bo.setJycy_nrex(vo.getJycy_nrex());
            bo.setZzjgxdrq(new Date()); //最终结果修订日期
            bo.setXgbz(ConstantsUtils.XGBZ_XG);
            bo.setIsxf(ConstantsUtils.ISXF_CXXF);
            bo.setXgsj(new Date());
            bo.setXgz(userVo.getName());
            bo.setXgjg(ConstantsUtils.QX_SHSJK);
            this.fxbListFhbdDao.update(bo);
        }
    }

时间: 2024-10-14 05:12:29

easyUI一览页面查询、导出功能的相关文章

解决highCharts导出功能汉化问题

转自:http://www.cnblogs.com/jyh317/p/4191841.html 本文以highCharts中文网上的例子为原型,处理解决highCharts导出功能为英文的问题. 我们使用highCharts当然希望所有提示或文本都是中文的了,但是highCharts的默认语言是英语,如下图. 那么怎么把图片中导出功能的提示换成中文呢? 本文利用highCharts的在线测试平台来解决这个问题. 只需要加入一个全局设置,即可解决这个问题. Highcharts.setOption

一个共通的viewModel搞定所有的分页查询一览及数据导出(easyui + knockoutjs + mvc4.0)

前言 大家看标题就明白了我想写什么了,在做企业信息化系统中可能大家写的最多的一种页面就是查询页面了.其实每个查询页面,除了条件不太一样,数据不太一样,其它的其实都差不多.所以我就想提取一些共通的东西出来,再写查询时只要引入我共通的东西,再加上极少的代码就能完成.我个人比较崇尚代码简洁干净,有不合理的地方欢迎大家指出. 这篇文章主要介绍两个重点:1.前台viewModel的实现.2.后台服务端如何简洁的处理查询请求. 需求分析 查询页面要有哪些功能呢 1.有条件部输入查询条件(这个不打算做成共通的

利用Aspose.Cells完成easyUI中DataGrid数据的Excel导出功能

我准备在项目中实现该功能之前,google发现大部分代码都是利用一般处理程序 HttpHandler实现的服务器端数据的Excel导出,但是这样存在的问题是ashx读取的数据一般都是数据库中视图的数据,难免会含有方便操作的 主键ID这列的记录.现在项目需要在easyUI的DataGrid中显示的数据能全部导出Excel,包括DataGrid中的中文标题,其他的统统不 要. 完成该功能所需的工具和环境:Newtonsoft.Json序列化和反序列化类库.easyUI前端UI框架.HttpHandl

写了一个Windows API Viewer,提供VBA语句的导出功能。提供两万多个API的MSDN链接查询

世面上的API Viewer已经不少了,但给VBA用的几乎没有.我自己写了一个Windows API Viewer,提供VBA语句的导出功能,并可以提供两万多个API的MSDN链接查询. 环境需求:Windows 7.1 SP1及以上操作系统,安装.Net 4.5.2及以上框架. 下载地址:API Viewer v1.1 下载

实现excel导入导出功能,excel导入数据到页面中,页面数据导出生成excel文件

今天接到项目中的一个功能,要实现excel的导入,导出功能.这个看起来思路比较清楚,但是做起了就遇到了不少问题. 不过核心的问题,大家也不会遇到了.每个项目前台页面,以及数据填充方式都不一样,不过大多都是以json数据填充的.在导入excel填充json数据到页面时,真的让我差点吐血了.在做这个导入导出的时候,那一个礼拜都是黑暗的. 好了,废话不多说了,我今天就给大家展示这个两个功能的核心点,excel生成json数据和json数据生成excel文件. 一:从上传文件到服务器,后台java解析,

Jxl、JxCell图表导出功能的实现

最近接触过许多报表导出功能,也用过多种工具进行导出功能的实现,但对于图表的导出一直没有仔细的去展开研究和探讨,直到最近略微整理了下这方面的需求和技术攻克. 首先导出excel功能的实现主要有JXL.JXCELL.POI等工具.目前只实现了JXL和JXCELL. JXL: 先介绍下JXL: jxl是一个韩国人写的java操作excel的工具, 在开源世界中,有两套比较有影响的API可 供使用,一个是POI,一个是jExcelAPI.其中功能相对POI比较弱一点.但jExcelAPI对中文支持非常好

谈一谈EasyUI的TreeGrid的过滤功能

写在最前面 这个星期一直在纠结easyui的treegrid的过滤功能,原因呢,自然是项目中一个莫名奇妙的需求. easyui虽说是后端程序员的前端框架,但是说句实话,除去api,让我直接写里面的节点信息的话,还真是无从下手,在这里先对前端的同学膜拜下. 说下需求吧,最近一个项目中有个界面使用的easyui的treegrid展示,起初是没什么问题的,但是随着数据的导入发现实际操作上十分不便.原因呢是开发的时候treegrid并没有做分页的处理,目前测试环境数据达到456条,想从中找到一条然后处理

数据报表导出功能改进

一.           前言 财务在每月月底做财务数据统计时,需要统计每月产品的出货单及退货单报表数据,故要求在每月月底要汇总当月的报表数据,每一季度或者半年也要相应的统计报表数据,并能把数据导出到excl表格,所以数据报表导出功能则是必然的.财务提供的excel表格字段繁多,汇总下关联到数据库表达到7张以上,故在进行出货单或者退货单报表查询之时,由于涉及到多张表关联,故每次查询都需要耗费相当多的时间和空间. 二.           实现 数据报表只需要按照起始时间和结束时间进行查询和导出.

使用EasyUI实现添加和删除功能

        增删该查是任何一个项目都少不了的功能操作,这篇博文主要简介一下如何使用EasyUI实现添加和删除功能.         首先,导入EasyUI的js代码: <link href="~/EasyuiSource/themes/default/easyui.css" rel="stylesheet" /> <link href="~/EasyuiSource/themes/icon.css" rel="st