一厂MES,含注塑,喷涂,冲孔
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.

264 lines
12 KiB

2 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlatingInspection.aspx.cs" Inherits="MESWebSite.Manage.PlatingInspection" %>
<!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;
padding: 0px;
}
p {
padding: 0px 5px;
font-size: small;
font-family: 微软雅黑;
margin: 0px;
}
.tree-folder-open, .tree-folder, .tree-file {
display: none;
}
.datagrid {
text-align: center;
}
.ttb {
width: 180px;
display: block;
}
</style>
<title>喷涂检测记录</title>
<script>
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="top">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<thead>
<tr>
<td><span class="title">喷涂检测记录</span></td>
</tr>
</thead>
<tbody>
<tr style="display: flex; flex-direction: row; flex-wrap: wrap;">
<td style="width: 1100px;">位置:<select name="position" id="position" class="easyui-combobox">
<option value=""></option>
<option value="下线一检 A侧 下支架">下线一检 A侧 下支架</option>
<option value="下线一检 A侧 中支架">下线一检 A侧 中支架</option>
<option value="下线一检 A侧 上支架">下线一检 A侧 上支架</option>
<option value="下线一检 B侧 下支架">下线一检 B侧 下支架</option>
<option value="下线一检 B侧 中支架">下线一检 B侧 中支架</option>
<option value="下线一检 B侧 上支架">下线一检 B侧 上支架</option>
<option value="下线二检 抛光区">下线二检 抛光区</option>
<option value="下线二检 点修补">下线二检 点修补</option>
</select>
&nbsp;&nbsp;
结果:<select name="inspectResult" id="inspectResult" class="easyui-combobox">
<option value=""></option>
<option value="合格">合格</option>
<option value="抛光">抛光</option>
<option value="报废">报废</option>
</select>
&nbsp;&nbsp;
条码:
<input type="text" id="barcode" style="width: 170px;" />
&nbsp;&nbsp;
时间:
<%-- <input id="start_time" class="easyui-datebox" style="width: 130px;" />&nbsp;至&nbsp;
<input id="end_time" class="easyui-datebox" style="width: 130px;" />--%>
<input id="start_time" class="easyui-datetimebox" data-options="onShowPanel:function(){ $(this).datetimebox('spinner').timespinner('setValue','00:00:00');}" />&nbsp;至&nbsp;
<input id="end_time" class="easyui-datetimebox" data-options="onShowPanel:function(){ $(this).datetimebox('spinner').timespinner('setValue','23:59:59');}" />
&nbsp;&nbsp;
<a class="topsearchBtn">查询</a>
&nbsp;&nbsp;
<a class="topexcelBtn" id="exportbtn">导出</a>
</td>
</tr>
</tbody>
</table>
</div>
<table id="tb" title="喷涂检测记录" style="width: 99%;">
</table>
<input id="UserID" type="text" hidden="hidden" runat="server" />
<script>
/**************** 全局变量 ***************/
var PrimaryID; //要编辑的id
var dg = $('#tb'); //表格
var isEdit = false; //是否为编辑状态
/**************** DOM加载 ***************/
$(function () {
var curr_time = new Date();
var str = curr_time.getFullYear() + "-";
str += curr_time.getMonth() + 1 + "-";
str += curr_time.getDate()
$('#start_time').datetimebox('setValue', str + " 00:00:00");
$('#end_time').datetimebox('setValue', str + " 23:59:59");
$.ajaxSetup({
cache: false //关闭AJAX缓存
});
//搜索按钮
$('.topsearchBtn').first().click(function () {
SearchInfo();
});
//导出
$("#exportbtn").bind('click', function () {
var position = $('#position').combobox('getValue');
var inspectResult = $('#inspectResult').combobox('getValue');
var StartTime = $('#start_time').datetimebox('getValue');
var EndTime = $('#end_time').datetimebox('getValue');
var barCode = $('#barcode').val();
var queryParams = {
position: position,
inspectResult: inspectResult,
StartTime: StartTime,
EndTime: EndTime,
barCode: barCode
};
post('<%=ResolveUrl("~/HttpHandlers/PlatingInspectionHandler.ashx?method=QueryExcel") %>', queryParams);
});
//排序
function sorts(obj, sortName, sortOrder) {
var queryParams = $('#' + obj).datagrid('options').queryParams;
queryParams.sortName = sortName;
queryParams.sortOrder = sortOrder;
console.log(queryParams.sortOrder)
$('#' + obj).datagrid('reload');
}
dg = $('#tb').datagrid({
fitColumns: true,
nowrap: false,
striped: true,
collapsible: true,
url: "/HttpHandlers/PlatingInspectionHandler.ashx?method=QueryList",
queryParams: { "sortName": "", "sortOrder": "desc" },
remoteSort: false,
columns: [[
{ field: 'ID', title: 'ID', hidden: true },
{ field: 'barcode', title: '条码', sortable: 'true', width: 100 },
{ field: 'side', title: 'A/B侧', sortable: 'true', width: 50 },
{ field: 'position', title: '位置', sortable: 'true', width: 30 },
{ field: 'workClass', title: '班次', sortable: 'true', width: 30 },
{ field: 'productInfo', title: '产品信息', sortable: 'true', width: 150 },
{ field: 'productOption', title: '生产模式', sortable: 'true', width: 30 },
{ field: 'inspectResult_1', title: '一次结果', sortable: 'true', width: 50 },
{ field: 'damnPosition_1', title: '一次缺陷位置', sortable: 'true', width: 50 },
{ field: 'reason_1', title: '一次原因', sortable: 'true', width: 50 },
{ field: 'createTime_1', title: '一次时间', sortable: 'true', width: 80 },
{ field: 'inspectResult_2', title: '二次结果', sortable: 'true', width: 50 },
{ field: 'damnPosition_2', title: '二次缺陷位置', sortable: 'true', width: 50 },
{ field: 'reason_2', title: '二次原因', sortable: 'true', width: 50 },
{ field: 'createTime_2', title: '二次时间', sortable: 'true', width: 80 },
{ field: 'inspectResult_3', title: '三次结果', sortable: 'true', width: 50 },
{ field: 'damnPosition_3', title: '三次缺陷位置', sortable: 'true', width: 50 },
{ field: 'reason_3', title: '三次原因', sortable: 'true', width: 50 },
{ field: 'createTime_3', title: '三次时间', sortable: 'true', width: 80 }
]],
onSortColumn: function (sort, order) {
sorts('tb', sort, order);//调用排序方法。
},
pagination: true,//表示在datagrid设置分页
rownumbers: true,
singleSelect: true
});
dg.datagrid('getPager').pagination({
pageSize: 10,
pageNumber: 1,
pageList: [10, 20, 30, 40, 50, 100],
beforePageText: '第',//页数文本框前显示的汉字
afterPageText: '页 共 {pages} 页',
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
});
});
/**************** 主要业务程序 ***************/
//查询方法
function SearchInfo() {
var position = $('#position').combobox('getValue');
var inspectResult = $('#inspectResult').combobox('getValue');
var StartTime = $('#start_time').datetimebox('getValue');
var EndTime = $('#end_time').datetimebox('getValue');
var barCode = $('#barcode').val();
var queryParams = {
position: position,
inspectResult: inspectResult,
StartTime: StartTime,
EndTime: EndTime,
barCode: barCode,
"sortName": "",
"sortOrder": "desc"
};
dg.datagrid({
queryParams: queryParams
});
}
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>