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.
131 lines
4.7 KiB
131 lines
4.7 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.ProcessRouteWorkCellModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
工序配置编辑
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<%=Html.QPEdit("工序配置编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
|
|
<table id="editTable" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.WORKCELL_CODE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.WORKCELL_CODE)%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.FLAG_QC)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.FLAG_QC)%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.VER_NUM)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.VER_NUM)%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.REMARK)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.REMARK)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<%= Html.QTButtonAdd("ProcessRoute", "Add", "Add()")%>
|
|
<%= Html.QTButtonDelete("ProcessRoute", "Delete", "Delete()")%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%=Html.QDataGridEditable<QMAPP.MD.Web.Models.ProcessRouteWorkCellSeqModel>("grid1", Model.workCellSeqModel)%>
|
|
<%=Html.HiddenFor(p => p.PID)%>
|
|
<%=Html.HiddenFor(p => p.FLGDEL)%>
|
|
<%=Html.HiddenFor(p => p.ROUTE_CODE)%>
|
|
<%=Html.HiddenFor(p => p.FACTORY_CODE)%>
|
|
<%=Html.HiddenFor(p => p.CREATEDATE)%>
|
|
<%=Html.HiddenFor(p => p.CREATEUSER)%>
|
|
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
|
|
<%=Html.HiddenFor(p => p.UPDATEUSER)%>
|
|
<%= Html.HiddenFor(p => p.DetailValue) %>
|
|
<%=Html.QPEnd() %>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table width="100%" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td>
|
|
<%=Html.QTButtonSave("ProcessRoute", "ProcessRouteWorkCellSave", "return Save();")%>
|
|
<%=Html.QTButtonBack("close", "ProcessRouteWorkCellList", "parent.closeAppWindow1();return false;")%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#VER_NUM").attr("readOnly", "readOnly");
|
|
$("#VER_NUM").attr("class", "validatebox-readonly");
|
|
})
|
|
//添加
|
|
function Add() {
|
|
$("#grid1").datagrideditable('appendRow', { "PRE_WORKCELL_CODE": ""
|
|
});
|
|
}
|
|
//删除
|
|
function Delete() {
|
|
var rowIndexSelected = $("#grid1").datagrideditable("rowIndexSelected");
|
|
if (rowIndexSelected == "") {
|
|
MSI(MsgNormalTitle, AtLeastOneTitle);
|
|
}
|
|
else {
|
|
$("#grid1").datagrideditable("deleteRow", rowIndexSelected);
|
|
}
|
|
}
|
|
//保存
|
|
function Save() {
|
|
if (!isValidate()) {
|
|
return false;
|
|
}
|
|
//列表数据
|
|
var data = $("#grid1").datagrid("getRows")
|
|
//当前工序
|
|
var workCellCode= $("#WORKCELL_CODE").combobox('getValue');
|
|
|
|
//校验
|
|
for (i = 0; i < data.length; i++) {
|
|
var row = i + 1;
|
|
if (data[i]["PRE_WORKCELL_CODE"] == workCellCode) {
|
|
MSI("提示", "第" + row + "行前置工序不能与当前工序相同");
|
|
return false;
|
|
}
|
|
for (j = i + 1; j < data.length; j++) {
|
|
var exrow = j + 1;
|
|
if (data[i]["PRE_WORKCELL_CODE"] == data[j]["PRE_WORKCELL_CODE"]) {
|
|
MSI("提示", "第" + exrow + "行前置工序在列表中已存在!");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
if ($("#grid1").datagrideditable("isValid") == false)
|
|
return false;
|
|
$('#DetailValue').val(JSON.stringify(data));
|
|
submitByButton("ProcessRouteWorkCellSave");
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
|