天津投入产出系统后端
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.
 
 
 
 
 
 

208 lines
7.3 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.ProduceManage.MendRecorderModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
不合格品记录查询
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(100,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.PRODUCTCODE)%>
</th>
<td>
<%=Html.QC(p => p.PRODUCTCODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.MENDREASON)%>
</th>
<td>
<%=Html.QC(p => p.MENDREASON)%>
</td>
<th align="right">
<%=Html.QV(p => p.PRODUCESHIFTTCODE)%>
</th>
<td>
<%=Html.QC(p => p.PRODUCESHIFTTCODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.MATERIAL_TYPE_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_TYPE_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MENDRESULT)%>
</th>
<td>
<%=Html.QC(p => p.MENDRESULT)%>
</td>
<th align="right">
<%=Html.QV(p => p.MATERIAL_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_CODE)%>
</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>
<div style="left: 1px; position: relative;">
</div>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.ProduceManage.MendRecorderModel>(Model)%>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("fileName") %>
<%=Html.HiddenFor(o => o.GETDETAILINFO)%>
<%=Html.QPEnd() %>
<script language="javascript" type="text/javascript" src="../../Scripts/GetMendReason.js"></script>
<script language="javascript" type="text/javascript">
$(function () {
//隐藏报废数量字段列
$('#MENDREASON').combobox({
url: "/Dict/GetDefectDropDownList",
panelHeight: '300',
panelWidth: '250',
editable: 'false',
valueField: 'id',
textField: 'text'
})
$('#MATERIAL_TYPE_CODE').combotree
({
url: '/Dict/GetMaterialClassTree?attr=1',
panelHeight: '300',
panelWidth: '350',
onBeforeSelect: function (node) {
if (!$(this).tree('isLeaf', node.target)) {
return false;
}
},
onSelect: function (node) {
var materialtype = node.id;
if (materialtype != "") {
//获取物料下拉数据源
$('#MATERIAL_CODE').combobox
({
url: "/Dict/GetMaterialWithTypeComboxSource?materialtype=" + materialtype,
panelHeight: '300',
panelWidth: '350',
editable: 'false',
valueField: 'MATERIAL_CODE',
textField: 'MATERIAL_NAME'
});
$('#MATERIAL_CODE').combobox("setValue", "");
}
else {
//清空物料下拉框
var plantData = [{ 'MATERIAL_CODE': "", 'MATERIAL_NAME': ""}];
$('#MATERIAL_CODE').combobox("loadData", plantData);
$('#MATERIAL_CODE').combobox("select", "");
}
}
});
List(1);
});
//查询
function Search() {
List(1);
}
//导出
function Export() {
document.getElementById("selectKey").value = getSelectKey();
submitByButton("ExportExcel");
}
//导出
function ExportMend() {
//debugger;
var rows = <%=ConfigurationManager.AppSettings["ExcelRows"]%>;
var ids = getSelectKey();
var idsCount = ids.split(":").length;
if (ids == "") {
MSI("错误", "请选择导出记录。");
}
else if (idsCount>rows) {
MSI("错误", "最多能导出"+rows+"行。");
}
else {
document.getElementById("selectKey").value = ids;
submitByButton("ExportExcelMend");
}
}
//导出报废
function ExportScrap() {
var rows = <%=ConfigurationManager.AppSettings["ExcelRows"]%>;
var ids = getSelectKey();
var idsCount = ids.split(":").length;
if (ids == "") {
MSI("错误", "请选择导出记录。");
}
else if (idsCount>rows) {
MSI("错误", "最多能导出"+rows+"行。");
}
else {
document.getElementById("selectKey").value = ids;
submitByButton("ExportExcelScrap");
}
}
$(function () {
List(1);
});
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("Delete");
})
}
}
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("MendRecorder", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("MendRecorder", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("exportMend", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "ExportMend()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("exportScrap", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "ExportScrap()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", (s, f) => { return true; })%>
</td>
</tr>
</table>
</asp:Content>