You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
8.0 KiB
206 lines
8.0 KiB
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BadInjectionSearch.aspx.cs" Inherits="MESWebSite.Manage.BadInjectionSearch" %>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head runat="server">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||
|
<link href="/CSS/Basics.css" rel="stylesheet" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/metro/easyui.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/icon.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/color.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/jquery.min.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/jquery.easyui.min.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/MyJs.js" type="text/javascript"></script>
|
||
|
<style>
|
||
|
#w td {
|
||
|
padding: 5px 5px;
|
||
|
text-align: left;
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
|
||
|
#w .title {
|
||
|
vertical-align: middle;
|
||
|
text-align: right;
|
||
|
width: 80px;
|
||
|
height: 40px;
|
||
|
}
|
||
|
|
||
|
p {
|
||
|
padding: 5px;
|
||
|
font-size: small;
|
||
|
font-family: 微软雅黑;
|
||
|
}
|
||
|
|
||
|
.datagrid {
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
.search_first {
|
||
|
margin-left: 13.5%
|
||
|
}
|
||
|
|
||
|
/* 中等屏幕 桌面显示器 992至1400 */
|
||
|
@media screen and (min-width:992px) and (max-width:1400px) {
|
||
|
.search_first {
|
||
|
margin-left: 10%
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
<title>塑件报废查询</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<form id="form1" runat="server">
|
||
|
<div class="top">
|
||
|
<table style="width: 100%">
|
||
|
<tr style="display: flex">
|
||
|
|
||
|
<td><span class="title" style="width: 200px;">塑件报废查询</span>
|
||
|
</td>
|
||
|
<td style="width: 100px;"></td>
|
||
|
<td style="width: 250px;">条码:
|
||
|
<input type="text" id="barcode" style="width: 120px;" /></td>
|
||
|
<td style="width: 500px;">时间:
|
||
|
<input id="StartTime" class="easyui-datetimebox" data-options="onShowPanel:function(){ $(this).datetimebox('spinner').timespinner('setValue','00:00:00');}" /> 至
|
||
|
<input id="EndTime" class="easyui-datetimebox" data-options="onShowPanel:function(){ $(this).datetimebox('spinner').timespinner('setValue','23:59:59');}" />
|
||
|
</td>
|
||
|
<td style="width: 80px" class="search_first"><a class="topsearchBtn">查询</a></td>
|
||
|
<td style="width: 80px">
|
||
|
<a class="topexcelBtn" id="exportbtn">导出</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</div>
|
||
|
<table id="tb" title="塑件报废列表" style="width: 99%;">
|
||
|
</table>
|
||
|
|
||
|
<div hidden="hidden">
|
||
|
<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
|
||
|
</div>
|
||
|
<input id="UserID" type="text" hidden="hidden" runat="server" />
|
||
|
|
||
|
<script>
|
||
|
/**************** 全局变量 ***************/
|
||
|
var dg = $('#tb'); //表格
|
||
|
|
||
|
/**************** DOM加载 ***************/
|
||
|
$(function () {
|
||
|
$.ajaxSetup({
|
||
|
cache: false //关闭AJAX缓存
|
||
|
});
|
||
|
|
||
|
|
||
|
//搜索按钮
|
||
|
$('.topsearchBtn').first().click(function () {
|
||
|
SearchInfo();
|
||
|
});
|
||
|
|
||
|
//导出按钮
|
||
|
$("#exportbtn").bind('click', function () {
|
||
|
|
||
|
var barcode = $('#barcode').val();
|
||
|
var StartTime = $('#StartTime').datetimebox('getValue');
|
||
|
var EndTime = $('#EndTime').datetimebox('getValue');
|
||
|
var queryParams = {
|
||
|
barcode: barcode,
|
||
|
StartTime: StartTime,
|
||
|
EndTime: EndTime
|
||
|
};
|
||
|
|
||
|
post('<%=ResolveUrl("~/HttpHandlers/BadInjectionSearchHandler.ashx?method=QueryExcel") %>', queryParams);
|
||
|
});
|
||
|
|
||
|
//编辑窗口加载
|
||
|
$('#w').window({
|
||
|
modal: true,
|
||
|
closed: true,
|
||
|
minimizable: false,
|
||
|
maximizable: false,
|
||
|
collapsible: false,
|
||
|
width: 460,
|
||
|
height: 520,
|
||
|
footer: '#ft',
|
||
|
top: 20,
|
||
|
onBeforeClose: function () { clearw(); },
|
||
|
onBeforeOpen: function () {
|
||
|
$('#w').css('visibility', 'visible'); $('#ft').css('visibility', 'visible');
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
dg = $('#tb').datagrid({
|
||
|
fitColumns: true,
|
||
|
nowrap: false,
|
||
|
striped: true,
|
||
|
collapsible: false,
|
||
|
url: "/HttpHandlers/BadInjectionSearchHandler.ashx?method=QueryList",
|
||
|
sortName: 'CreateTime',
|
||
|
sortOrder: 'asc',
|
||
|
remoteSort: false,
|
||
|
columns: [[
|
||
|
{ field: 'ID', title: 'ID', hidden: true },
|
||
|
{ field: 'code', title: '条码', sortable: 'true', width: 10 },
|
||
|
{ field: 'BadPosition', title: '缺陷区域', sortable: 'true', width: 10 },
|
||
|
{ field: 'BadReason', title: '缺陷原因', sortable: 'true', width: 10 },
|
||
|
{ field: 'CreateTime', title: '报废时间', sortable: 'true', width: 10 }
|
||
|
]],
|
||
|
|
||
|
pagination: true,//表示在datagrid设置分页
|
||
|
rownumbers: true,
|
||
|
singleSelect: true
|
||
|
});
|
||
|
|
||
|
dg.datagrid('getPager').pagination({
|
||
|
pageSize: 10,
|
||
|
pageNumber: 1,
|
||
|
pageList: [10, 20, 30, 40, 50],
|
||
|
beforePageText: '第',//页数文本框前显示的汉字
|
||
|
afterPageText: '页 共 {pages} 页',
|
||
|
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
|
||
|
});
|
||
|
});
|
||
|
|
||
|
/**************** 主要业务程序 ***************/
|
||
|
|
||
|
//查询方法
|
||
|
function SearchInfo() {
|
||
|
|
||
|
var barcode = $('#barcode').val();
|
||
|
var StartTime = $('#StartTime').datetimebox('getValue');
|
||
|
var EndTime = $('#EndTime').datetimebox('getValue');
|
||
|
var queryParams = {
|
||
|
barcode: barcode,
|
||
|
StartTime: StartTime,
|
||
|
EndTime: EndTime
|
||
|
};
|
||
|
|
||
|
dg.datagrid({
|
||
|
queryParams: queryParams
|
||
|
});
|
||
|
|
||
|
dg.datagrid('reload');
|
||
|
}
|
||
|
|
||
|
|
||
|
/**************** 辅助业务程序 ***************/
|
||
|
function post(url, PARAMS) {
|
||
|
var temp_form = document.createElement("form");
|
||
|
temp_form.action = url;
|
||
|
temp_form.target = "_blank";
|
||
|
temp_form.method = "post";
|
||
|
temp_form.style.display = "none"; for (var x in PARAMS) {
|
||
|
var opt = document.createElement("textarea");
|
||
|
opt.name = x;
|
||
|
opt.value = PARAMS[x];
|
||
|
temp_form.appendChild(opt);
|
||
|
}
|
||
|
document.body.appendChild(temp_form);
|
||
|
temp_form.submit();
|
||
|
}
|
||
|
</script>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|