- 注册时间
- 2013-6-19
- 最后登录
- 2013-9-9
- 阅读权限
- 10
- 积分
- 108
- 精华
- 0
- 帖子
- 23
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="caiwu.aspx.cs" Inherits="users_user" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>用户管理</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="../demo/demo.css" rel="stylesheet" type="text/css" />
<script src="../scripts/boot.js" type="text/javascript"></script>
<!--引入皮肤样式-->
<link href="../scripts/miniui/themes/blue/skin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1
{
color: #FF3300;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<h1>业余时间来院加班人员登记表 <span class="style1">(财务报表)</span>
<asp:TextBox ID="TextBoxUser" runat="server" Width="0px" BorderStyle="None"
Enabled="False" EnableViewState="False" Height="0px"></asp:TextBox>
<asp:TextBox ID="TextBoxYuanqu" runat="server" Width="0px" BorderStyle="None"
Enabled="False" Height="0px" style="font-size: medium; color: #FF3300"></asp:TextBox>
</h1>
<div style="width:70%;">
<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
<table style="width:100%;">
<tr>
<td style="width:100%;">
开始时间<input id="start_time" style="width:150px;" property="editor" class="mini-datepicker" showtime="true" format="yyyy-MM-dd H:mm" />截止时间
<input id="end_time" style="width:150px;" property="editor" class="mini-datepicker" showtime="true" format="yyyy-MM-dd H:mm" />
<a class="mini-button" iconCls="icon-search" plain="true">提取</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-downgrade" plain="true">导出EXCEL</a>
<span class="separator"></span>
</td>
</tr>
</table>
</div>
</div>
<div id="datagrid1" class="mini-datagrid" style="width:70%;height:280px;"
url="StaffService.aspx?method=GetShenheByDate" idfileld="id" allowResize="false" pageSize="20"
allowCellEdit="true" allowCellSelect="true" multiSelect="false" allowRowSelect="true"
>
<div property="columns">
<div field="dept" name="dept" allowResize="false" width="20" headerAlign="center" allowSort="true">科室
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="staff_id" name = "staff_id" allowResize="false" width="10" headerAlign="center" allowSort="true">工号
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="staff_name" name="staff_name" allowResize="false" width="10" headerAlign="center" allowSort="true">姓名
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="grade" name="grade" width="10" headerAlign="center" >职称
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="fee_kind" name="fee_kind" width="18" headerAlign="center" >标准(小时/元)
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="sum_work" name="work_hour" width="18" headerAlign="center" >总时间(小时)
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
<div field="fee_sum" name="fee_sum" width="18" headerAlign="center" >金额(元)
<input property="editor" class="mini-textbox" style="width:100%;" />
</div>
</div>
</div>
</form>
<iframe id="exportIFrame" style="display:none;"></iframe>
<!--导出Excel相关HTML-->
<form id="excelForm" action="export.aspx?type=excel" method="post" target="excelIFrame">
<input type="hidden" name="columns" id="excelData" />
</form>
<iframe id="excelIFrame" name="excelIFrame" style="display:none;"></iframe>
<script type="text/javascript">
mini.parse();
var txtUser = document.all.TextBoxUser.value;
var txtYuanqu = document.all.TextBoxYuanqu.value;
var grid = mini.get("datagrid1");
function retrieve() {
var d1 = mini.get("start_time");
var d2 = mini.get("end_time");
grid.on("load", function () {
grid.mergeColumns(["dept"]);
});
grid.load({ start_time: mini.formatDate(d1.value, "yyyy-MM-dd HH:mm:ss"), end_time: mini.formatDate(d2.value, "yyyy-MM-dd HH:mm:ss") });
}
function ExportExcel() {
var columns = grid.getBottomColumns();
function getColumns(columns) {
columns = columns.clone();
for (var i = columns.length - 1; i >= 0; i--) {
var column = columns;
if (!column.field) {
columns.removeAt(i);
} else {
var c = { header: column.header, field: column.field };
columns = c;
}
}
return columns;
}
var columns = getColumns(columns);
var json = mini.encode(columns);
document.getElementById("excelData").value = json;
var excelForm = document.getElementById("excelForm");
excelForm.submit();
}
</script>
<div class="description">
<h3>操作说明</h3>
<ul>
<li>按时间段提取审核签字后的加班记录</li>
<li>报表可以通过导出EXCEL功能进行保存并打印</li>
</ul>
<p>
</p>
</div>
</body>
</html>
-----------------------------------------------
以上是我的查询代码,需要传入两个时间参数,我提取没有问题,但是导出excel时总是取不到时间参数,不知道该在什么地方赋值?
请教,非常感谢!
|
|