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.
192 lines
7.2 KiB
192 lines
7.2 KiB
4 years ago
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.Dict.HMaterialModel>" %>
|
||
|
|
||
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||
|
自制件零件与器具关系信息
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||
|
<script language="javascript" type="text/javascript">
|
||
|
|
||
|
//添加
|
||
|
function add() {
|
||
|
openAppWindow1('添加自制件零件与器具关系', 'HMaterialEdit', '550', '400');
|
||
|
}
|
||
|
|
||
|
//修改
|
||
|
function Update() {
|
||
|
|
||
|
var ids = getSelectKey();
|
||
|
if (ids == "") {
|
||
|
MSI("提示", "请选择修改记录。");
|
||
|
return;
|
||
|
}
|
||
|
if (ids.indexOf(":") > 0) {
|
||
|
MSI("提示", "每次只能修改一条记录。");
|
||
|
return;
|
||
|
}
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
|
||
|
openAppWindow1('修改自制件零件与器具关系', 'HMaterialEdit?HMATERIALID=' + ids, '550', '400');
|
||
|
}
|
||
|
|
||
|
//删除
|
||
|
function Delete() {
|
||
|
var ids = getSelectKey();
|
||
|
|
||
|
if (ids == "") {
|
||
|
MSI("错误", "至少选择一条记录");
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
MSQ("提示", "确定要删除选中的记录吗?", function () {
|
||
|
submitByButton("SingleTableDelete");
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//导入
|
||
|
function Import() {
|
||
|
|
||
|
var fileName = window.showModalDialog("/File/UploadFile", "", "dialogHeight: 200px; dialogWidth: 400px; center: Yes; help: Yes;status: Yes;");
|
||
|
|
||
|
if (fileName == null)
|
||
|
return;
|
||
|
|
||
|
document.getElementById("fileName").value = fileName;
|
||
|
|
||
|
//处理等待
|
||
|
_showProgress();
|
||
|
|
||
|
submitByButton("ImportExcel");
|
||
|
}
|
||
|
|
||
|
//导出
|
||
|
function Export() {
|
||
|
var ids = getSelectKey();
|
||
|
document.getElementById("selectKey").value = ids;
|
||
|
submitByButton("ExportExcel");
|
||
|
}
|
||
|
//下载模板
|
||
|
function getTemplate() {
|
||
|
submitByButton("GetTemplate");
|
||
|
}
|
||
|
|
||
|
//设置仓库主键
|
||
|
function setCorpID(data) {
|
||
|
if (data != null) {
|
||
|
document.getElementById("CORPID").value = data.id;
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("CORPID").value = "";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//设置零件主键
|
||
|
function setMatNoID(data) {
|
||
|
if (data != null) {
|
||
|
document.getElementById("MATERIALID").value = data.id;
|
||
|
$("#HidMATERIALNO").val('');
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("MATERIALID").value = "";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//设置器具主键
|
||
|
function setUtensilID(data) {
|
||
|
if (data != null) {
|
||
|
document.getElementById("UTENSILID").value = data.id;
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("UTENSILID").value = "";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//设置发货地主键
|
||
|
function setSendPlaceID(data) {
|
||
|
if (data != null) {
|
||
|
document.getElementById("SENDPLACEID").value = data.id;
|
||
|
}
|
||
|
else {
|
||
|
document.getElementById("SENDPLACEID").value = "";
|
||
|
}
|
||
|
}
|
||
|
function Search() {
|
||
|
if (document.getElementById("CORPID").value == "" && document.getElementById("CORPCODE").value != "") {
|
||
|
alert("仓库不存在!");
|
||
|
return;
|
||
|
}
|
||
|
if (document.getElementById("SENDPLACEID").value == "" && document.getElementById("SENDPLACEID").value != "") {
|
||
|
alert("工厂不存在!");
|
||
|
return;
|
||
|
}
|
||
|
if (document.getElementById("MATERIALID").value == "" && document.getElementById("MATERIALID").value != "") {
|
||
|
alert("零件不存在!");
|
||
|
return;
|
||
|
}
|
||
|
if (document.getElementById("UTENSILID").value == "" && document.getElementById("UTENSILID").value != "") {
|
||
|
alert("器具不存在!");
|
||
|
return;
|
||
|
}
|
||
|
List(1);
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
<%=Html.QPSeach(80,true) %>
|
||
|
<table id="condiTable">
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p=>p.MATERIALNO) %>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.HiddenFor(p => p.MATERIALID)%>
|
||
|
<%=Html.QMyPerceptTextboxForD(p => p.MATERIALNO, p => p.MATERIALNAME, "matcode", "setMatNoID", null, "HidMATERIALNO", "MATERIALNO", "")%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p=>p.CORPCODE) %>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.HiddenFor(p => p.CORPID)%>
|
||
|
<%=Html.QMyPerceptTextboxFor(p => p.CORPCODE, p => p.CORPNAME, "corp", "setCorpID", null, "")%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.SENDPLACENO)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.HiddenFor(p => p.SENDPLACEID)%>
|
||
|
<%=Html.QMyPerceptTextboxFor(p => p.SENDPLACENO, p => p.SENDPLACENAME, "sendplace", "setSendPlaceID", null, "")%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.UTENSILNO)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.HiddenFor(p => p.UTENSILID)%>
|
||
|
<%=Html.QMyPerceptTextboxFor(p => p.UTENSILNO, p => p.UTENSILNAME, "utensil", "setUtensilID", null, "")%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<%=Html.QPEnd()%>
|
||
|
<%=Html.QPList() %>
|
||
|
<%=Html.QDateGrid<QMAPP.MD.Web.Models.Dict.HMaterialModel>(Model)%>
|
||
|
<%=Html.QPEnd() %>
|
||
|
<%=Html.Hidden("HidMATERIALNO")%>
|
||
|
<%=Html.Hidden("selectKey")%>
|
||
|
<%=Html.Hidden("fileName") %>
|
||
|
<% Html.RenderPartial("ShowProgress"); %>
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
||
|
<table cellpadding="0" cellspacing="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<%=Html.QTButtonSearch("HMaterial", "HMaterialList", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButtonAdd("HMaterial", "SingleTableAdd", "add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButtonUpdate("HMaterial", "SingleTableUpdate", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButtonDelete("HMaterial", "SingleTableDelete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
||
|
<%=Html.QTButton("help", "", "help", "SysHelp('02170000','HMaterialList')", (s, f) => { return true; })%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</asp:Content>
|