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.
258 lines
10 KiB
258 lines
10 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.ParameterQuery.ParameterQueryModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
加工参数查询
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<%=Html.QPSeach(110,true) %>
|
|
<table id="condiTable">
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.WorkCenter)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.WorkCenter)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MachineCode)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.MachineCode)%>
|
|
</td>
|
|
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MouldCode)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.MouldCode)%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.ProductCode)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.ProductCode)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.CREATEDATESTART)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.CREATEDATESTART)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.CREATEDATEEND)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.CREATEDATEEND)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<input id="Tables" name="Tables" type="hidden" value="<%=Model.Tables %>" />
|
|
<input id="Fileds" name="Fileds" type="hidden" value="<%=Model.Fileds %>" />
|
|
<%--
|
|
<%=Html.HiddenFor(p=>p.Tables) %>--%>
|
|
<div style="left: 1px; position: relative;">
|
|
</div>
|
|
<%=Html.QPEnd()%>
|
|
<%=Html.QPList() %>
|
|
<%if (Model != null&&Model.ColumnsLoaded)
|
|
{ %>
|
|
<table id="QDateGrid" cellspacing="0" cellpadding="0" data-options="pageNumber:1,pageSize:20">
|
|
<thead>
|
|
<tr>
|
|
<%Html.RenderPartial(string.IsNullOrEmpty(Model.GridViewName)?"DefaultView":Model.GridViewName,Model); %>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<input id="pageNumber" name="pageNumber" type="hidden" value="" />
|
|
<input id="pageSize" name="pageSize" type="hidden" value="" />
|
|
<input id="pageSort" name="pageSort" type="hidden" value="" />
|
|
<script type="text/javascript" language="javascript">
|
|
$(function () {
|
|
$('#QDateGrid').datagrid({
|
|
//IconCls:'icon-save',
|
|
//height: 350,
|
|
fit: true,
|
|
nowrap: true,
|
|
striped: true,
|
|
collapsible: false,
|
|
onSortColumn: function (sort, order) {
|
|
$('#pageSort').attr('value', sort + ' ' + order);
|
|
if ($('#pageNumber').val() == '') { List(1); } else { List(parseInt($('#pageNumber').val())); }
|
|
},
|
|
pagination: true,
|
|
rownumbers: true,
|
|
remoteSort: false,
|
|
idField: '',
|
|
fitColumns: false,
|
|
toolbar: false,
|
|
onLoadError: function () { MSI('error', '获取数据时出现异常。'); }
|
|
});
|
|
var p = $('#QDateGrid').datagrid('getPager');
|
|
if (p) {
|
|
$(p).pagination({
|
|
pageSize: 20,
|
|
pageList: [20, 40, 60],
|
|
pageNumber: 1,
|
|
onSelectPage: function (pageNumber) {
|
|
var ops = $('#QDateGrid').datagrid('options');
|
|
ops.url = ""
|
|
List(pageNumber);
|
|
}
|
|
});
|
|
}
|
|
var ops = $('#QDateGrid').datagrid('options');
|
|
ops.view.onBeforeRender = function () { $.tabPages.beginDraw(); }
|
|
ops.view.onAfterRender = function () { $.tabPages.endDraw(); };
|
|
|
|
})
|
|
function List(pageNumber) {
|
|
if (pageNumber == null) { pageNumber = 1; }
|
|
$('#QDateGrid').datagrid('loading');
|
|
$('#QDateGrid').datagrid('clearSelections');
|
|
$('#pageNumber').attr('value', pageNumber);
|
|
var p = $('#QDateGrid').datagrid('getPager');
|
|
if (p) {
|
|
var ipageSize = p.data("pagination").options.pageSize;
|
|
$('#pageSize').attr('value', ipageSize);
|
|
}
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/ParameterQuery/GetParamList",
|
|
dataType: "json",
|
|
data: $('#Mainform').serialize(),
|
|
success: function (data) {
|
|
|
|
var arrSort = null;
|
|
var obj = null;
|
|
if ($('#pageSort').val() != '') {
|
|
arrSort = $('#pageSort').val().split(' ');
|
|
obj = $('#QDateGrid').datagrid('options');
|
|
obj.sortName = null;
|
|
obj.sortOrder = 'asc';
|
|
}
|
|
|
|
$("#QDateGrid").datagrid('loadData', data);
|
|
$('#QDateGrid').datagrid('loaded');
|
|
|
|
if (arrSort != null) {
|
|
obj.sortName = arrSort[0];
|
|
obj.sortOrder = arrSort[1];
|
|
}
|
|
|
|
var p = $('#QDateGrid').datagrid('getPager');
|
|
if (p) {
|
|
$(p).pagination({
|
|
pageNumber: pageNumber
|
|
});
|
|
}
|
|
},
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
$('#QDateGrid').datagrid('loaded');
|
|
MSI('error', '获取数据时出现异常。');
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<%} %>
|
|
<%=Html.QPEnd() %>
|
|
<script type="text/javascript" language="javascript">
|
|
$(function () {
|
|
$('#WorkCenter').combobox({
|
|
onSelect: function () {
|
|
var workcentercode = $('#WorkCenter').combobox('getValue');
|
|
if (workcentercode != "") {
|
|
$('#MachineCode').combobox({
|
|
url: "/Dict/GetMachineList?workcentercode=" + workcentercode,
|
|
editable: 'false',
|
|
valueField: 'MACHINECODDE',
|
|
textField: 'MACHINENAME'
|
|
});
|
|
$('#MachineCode').combobox("setValue", "");
|
|
}
|
|
else {
|
|
var tempData = [{ 'MACHINECODDE': "", 'MACHINENAME': ""}];
|
|
$('#MachineCode').combobox("loadData", tempData);
|
|
$('#MachineCode').combobox("select", "");
|
|
}
|
|
},
|
|
onLoadSuccess: function () {
|
|
var workcentercode = $('#WorkCenter').combobox('getValue');
|
|
if (workcentercode != "") {
|
|
$('#MachineCode').combobox({
|
|
url: "/Dict/GetMachineList?workcentercode=" + workcentercode,
|
|
editable: 'false',
|
|
valueField: 'MACHINECODDE',
|
|
textField: 'MACHINENAME'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
$('#MachineCode').combobox({
|
|
onSelect: function () {
|
|
var MachineCode = $('#MachineCode').combobox('getValue');
|
|
if (MachineCode != "") {
|
|
$('#MouldCode').combobox({
|
|
url: "/Dict/GetMouldList?machinecode=" + MachineCode,
|
|
editable: 'false',
|
|
valueField: 'MODELCODE',
|
|
textField: 'MODELNAME'
|
|
});
|
|
$('#MouldCode').combobox("setValue", "");
|
|
$('#QDateGrid').datagrid('loading');
|
|
}
|
|
else {
|
|
var tempData = [{ 'MODELCODE': "", 'MODELNAME': ""}];
|
|
$('#MouldCode').combobox("loadData", tempData);
|
|
$('#MouldCode').combobox("select", "");
|
|
}
|
|
},
|
|
onLoadSuccess: function () {
|
|
var MachineCode = $('#MachineCode').combobox('getValue');
|
|
if (MachineCode != "") {
|
|
$('#MouldCode').combobox({
|
|
url: "/Dict/GetMouldList?machinecode=" + MachineCode,
|
|
editable: 'false',
|
|
valueField: 'MODELCODE',
|
|
textField: 'MODELNAME'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
<%if (Model != null&&Model.ColumnsLoaded)
|
|
{ %>
|
|
List(1);
|
|
<%}%>
|
|
});
|
|
|
|
function Index() {
|
|
var machineCode = $('#MachineCode').combobox('getValue');
|
|
if (machineCode == "") {
|
|
MSI("错误", "请选择设备!");
|
|
return false;
|
|
}
|
|
submitByButton("Index");
|
|
}
|
|
function Export() {
|
|
var machineCode = $('#MachineCode').combobox('getValue');
|
|
if (machineCode == "") {
|
|
MSI("错误", "请选择设备!");
|
|
return false;
|
|
}
|
|
submitByButton("Export");
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td align="center">
|
|
<%=Html.QTButtonSearch("ParameterQuery", "Index", "Index()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
|
<%=Html.QTButton("export","Export",QMFrameWork.WebUI.IconCls.download, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</asp:Content>
|
|
|