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

122 lines
4.5 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Basic.ProcessRouteWorkCellModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
工序配置编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="panel" data-options="region:'north',border:false" style="height: 140px">
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<th align="right">
<%=Html.QV(p => p.WORKCELL_PID)%>
</th>
<td>
<%=Html.QC(p => p.WORKCELL_PID)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.BACKFLUSH)%>
</th>
<td>
<%=Html.QC(p => p.BACKFLUSH)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.REMARK)%>
</th>
<td>
<%=Html.QC(p => p.REMARK)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.OPT_STANDARD)%>
</th>
<td>
<%=Html.QC(p => p.OPT_STANDARD)%>
</td>
</tr>
</table>
</div>
<%=Html.QPEdit("工序配置编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table>
<tr>
<td>
<%= Html.QTButtonAdd("ProcessRoute", "Add", "Add()")%>
<%= Html.QTButtonDelete("ProcessRoute", "Delete", "Delete()")%>
</td>
</tr>
</table>
<%=Html.QDataGridEditable<QMAPP.FJC.Web.Models.Basic.ProcessRouteWorkCellSeqModel>("grid1", Model.workCellSeqModel)%>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.FLAGDEL)%>
<%=Html.HiddenFor(p => p.ROUTE_PID)%>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p => p.CREATEUSR)%>
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
<%=Html.HiddenFor(p => p.UPDATEUSR)%>
<%= 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 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 workCellId = $("#WORKCELL_PID").combobox('getValue');
//校验
for (i = 0; i < data.length; i++) {
var row = i + 1;
if (data[i]["PRE_WORKCELL_CODE"] == workCellId) {
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>