| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
-
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
- <head>
-
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title></title>
-
- <link rel="stylesheet" type="text/css" media="screen" href="plug-in/jqgrid/css/css/cupertino/jquery-ui-1.8.16.custom.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="plug-in/ace/css/ui.jqgrid.css" />
-
- <link rel="stylesheet" type="text/css" media="screen" href="plug-in/jqgrid/js/src/css/jquery.searchFilter.css" />
-
- <script type="text/javascript" src="plug-in/jqgrid/js/jquery-1.7.1.js"></script>
- <script type="text/javascript" src="plug-in/jquery/jquery-1.9.0.min.js"></script>
- <script type="text/javascript" src="plug-in/jqgrid/js/jquery.jqGrid.src.js"></script>
- <script type="text/javascript" src="plug-in/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
- <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js?skin=metrole"></script>
- <script src = "webpage/cn/com/lzt/report/purchaseRptCommon.js"></script>
- <script type="text/javascript" src="plug-in/tableExport/libs/FileSaver/FileSaver.min.js"></script>
- <script type="text/javascript" src="plug-in/tableExport/libs/js-xlsx/xlsx.core.min.js"></script>
- <script type="text/javascript" src="plug-in/tableExport/tableExport.min.js"></script>
-
- <style>
- .ui-jqgrid {
- font-size: 14px;
- }
- .ui-jqgrid-view {
- font-size: 14px;
- }
- .ui-jqgrid .ui-jqgrid-htable th {
- height: 28px;
- font-size: 14px; /* 14 */
- }
- .ui-jqgrid .ui-jqgrid-btable {
- height: 28px;
- font-size: 12px;
- }
- .ui-jqgrid .ui-jqgrid-ftable {
- font-size: 13px;
- }
- .ui-jqgrid .ui-jqgrid-pager {
- height: 28px;
- font-size: 14px; /* 14 */
- }
- .ui-jqgrid .ui-pg-input {
- font-size: 1em;
- height: 20px;
- }
- .ui-jqgrid .i-pg-selbox {
- font-size: 0.9em;
- height: 20px;
- }
- .ui-jqgrid tr.ui-row-ltr td {
- text-align: center;
- }
- .ui-jqgrid tr.footrow-ltr td {
- text-align: center;
- }
-
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
- {
- background: #5187c9 ;
- color: #fffbf8;
- }
- .ui-widget-content
- {
- background:#fff;
- }
- </style>
-
- </head>
-
- <body style="background:#FFFFFF">
- <!-- <form id="form1" runat="server"> -->
- <div>
- <div id="div2">
- <%--查询框begin --%>
- <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;top:5px;"> <!-- bottom -->
- <tr >
- <td align="right" width="100px">
- <label class="Validform_label">领料点: </label>
- </td>
- <td class="value" nowrap>
- <input id="warehouseId" name="warehouseId" type="hidden" >
- <input name="warehouseName" type="text" class="inputxt" style="width: 150px" id="warehouseName" readonly="readonly" />
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">领料点</label>
- <t:choose hiddenName="warehouseId" hiddenid="id" url="pOrdersController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName" name="list"
- left="40%" width="450px" height="700px" icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
- </td>
- <td align="right">
- <label class="Validform_label"> 申购月份: </label>
- </td>
- <td class="value">
- <!-- <t:dictSelect id="period" field="period" type="list" extendJson="{class:'form-control',style:'width:136px'}"
- typeGroupCode="orderMonths" hasLabel="false" title="采购期间" ></t:dictSelect>
- <label class="Validform_label" style="display: none;"> 提交申购月份: </label>-->
- <t:dictSelect field="period" id="period" type="list"
- dictTable="t_b_ordermonths" dictField="id"
- dictCondition="where 1=1"
- dictText="ordermonths_name" datatype="*"
- defaultVal="${ordersPage.orderMonths}"
- hasLabel="false" title="申购月份"></t:dictSelect>
- <span class="Validform_checktip"></span>
- <label class="Validform_label" style="display: none;">申购月份</label>
- </td>
- <td width="65px"><label class="Validform_label" style="display: none;"> </label></td>
- <td height="50px" align="right" colspan="8">
- <!-- <a style="margin-left:80px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div> -->
- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-search" onclick="btn_query()">查询</a>
- <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-putout" onclick="btn_output()">导出excel</a>
- </td>
- </tr>
- <tr>
- <!-- <table id="jqGrid"></table>
- <div id="pager2"></div> -->
- </tr>
- </table>
- <%--查询框end --%>
- </div>
- <br/><br/><br/>
- <div id="div1">
- <table id="jqGrid"></table>
- <div id="pager2"></div>
- </div>
- </div>
- <!-- </form>
- -->
-
- <script>
- $(function(){
- setDefault();
- _rpttitle='物料申购汇总表';
- });
- function btn_query()
- {
- showGridTable();
- }
- function showGridTable() {
- var period = $("#period").val();
- var warehouseid = $("#warehouseId").val();
- var requrl='purchaseRptController.do?SGDSummaryRptData';
- if(period != null)
- requrl+=('&period='+period);
- if(warehouseid != null)
- requrl+=('&warehouseid='+warehouseid);
-
- $("#div1").empty();
- $("#div1").html("<table class='jqgrid' id='jqGrid'></table><div class='jqgridpager' id='pager2'></div>");
- $("#jqGrid").jqGrid({
- url: requrl,
- datatype: "json",
- colModel: [
- { label: '领料点名称', name: 'projectName', width: 240 ,sortable:false},
- { label: '申购月份', name: 'period', width: 200 ,sortable:false},
- { label: '货品分类名称', name: 'rootclassname', width: 200 ,sortable:false},
- /* { label: '存货型号', name: 'specType', width: 80 }, */
- { label: '金 额', name: 'amount', width: 160 , align : 'right',
- formatter : "number", summaryType:'sum', summaryTpl:'<b>小计: {0}</b>',sortable:false}/* ,
- { label: '上月成本金额', name: 'preamount', width: 160 , summaryType:'sum', summaryTpl:'<b>小计: {0}</b>',sortable:false} */
- ],
- viewrecords: true,
- height: 500,
- rowNum: -1,
- rownumbers: true,
- rownumWidth: 25,
- autowidth:false,
- multiselect: false,
- //分组
- viewrecords: true,
- sortname: 'projectName', //需要分组的列
- grouping:true,
- groupingView : {
- groupField : ['projectName'], //需要分组的列
- groupSummary : [true], //是否显示汇总 如果为true需要在colModel中进行配置 如: summaryType:'sum', summaryTpl:'<b>小计: {0}</b>''
- groupColumnShow : [true], //是否显示分组列
- groupText : ['<b>{0}</b>'], //在分组的头部显示的信息
- groupCollapse : false, //该属性表示在加载数据的时候是否只显示分组信息,false表示既显示分组信息也显示每个分组里面的详细信息,true则只显示分组信息
- },
- //统计
- footerrow:true, //开启统计
- userDataOnFooter : true, //在页脚显示统计
- altRows : true ,
- pager: "#jqGridPager",
- jsonReader : {
- root: "page.list",
- page: "page.currPage",
- total: "page.totalPage",
- records: "page.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
- var rowNum=parseInt($(this).getGridParam("records"),10);
- if(rowNum>0){
- $(".ui-jqgrid-sdiv").show();
- var sum_inAmount = $(this).getCol("amount",false,"sum");
- /* var sum_preamount = $(this).getCol("preamount",false,"sum"); */
- $(this).footerData("set",{"projectName" : "合计:",
- "amount" : sum_inAmount/* ,
- "preamount" : sum_preamount */ }); //将合计值显示出来
- }else{
- $(".ui-jqgrid-sdiv").hide();
- }
- _hasSearch=true;
- }
- });
- }
- $("#jqGrid").jqGrid({
- url :'purchaseRptController.do?SGDSummaryRptData&load=false',
- datatype: "json",
- colModel: [
- { label: '领料点名称', name: 'projectName', width: 240 ,sortable:false},
- { label: '申购月份', name: 'period', width: 200 ,sortable:false},
- { label: '货品分类名称', name: 'rootclassname', width: 200 ,sortable:false},
- /* { label: '存货型号', name: 'specType', width: 80 }, */
- { label: '金 额', name: 'amount', width: 160 , align : 'right',
- formatter : "number", summaryType:'sum', summaryTpl:'<b>小计: {0}</b>',sortable:false} /* ,
- { label: '上月成本金额', name: 'preamount', width: 160 , summaryType:'sum', summaryTpl:'<b>小计: {0}</b>',sortable:false} */
- ],
-
- viewrecords: true,
- height: 500,
- rowNum: -1,
- rownumbers: false,
- rownumWidth: 25,
- autowidth:false,
- multiselect: false,
- //统计
- footerrow:true, //开启统计
- userDataOnFooter : true, //在页脚显示统计
- altRows : true ,
- pager: "#jqGridPager",
- jsonReader : {
- root: "page.list",
- page: "page.currPage",
- total: "page.totalPage",
- records: "page.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
- var rowNum=parseInt($(this).getGridParam("records"),10);
- if(rowNum>0){
- $(".ui-jqgrid-sdiv").show();
- var sum_inAmount = $(this).getCol("amount",false,"sum");
- /* var sum_preamount = $(this).getCol("preamount",false,"sum"); */
- $(this).footerData("set",{"projectName" : "合计:",
- "amount" : sum_inAmount /* ,
- "preamount" : sum_preamount */ }); //将合计值显示出来
- }else{
- $(".ui-jqgrid-sdiv").hide();
- }
- }/*,
- autowidth:true,
- height: 500 ,
- datatype:"local" */
- });
- </script>
-
- </body>
-
- </html>
|