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

164 lines
6.3 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.Basic.ProcessParameterModel>" %>
<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.STEP)%>
</th>
<td>
<%=Html.QC(p => p.STEP)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.PARADESCRIBE)%>
</th>
<td>
<%=Html.QC(p => p.PARADESCRIBE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MACHINECODDE)%>
</th>
<td>
<%=Html.QC(p => p.MACHINECODDE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.PROCESSTYPETXT)%>
</th>
<td>
<%=Html.QC(p => p.PROCESSTYPETXT)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MAXVALUE)%>
</th>
<td>
<%=Html.QC(p => p.MAXVALUE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MINVALUE)%>
</th>
<td>
<%=Html.QC(p => p.MINVALUE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.MEMO) %>
</th>
<td>
<%=Html.QC(p => p.MEMO)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.HiddenFor(p => p.PARANAME)%>
<%=Html.HiddenFor(p => p.PARATABLENAME)%>
<%=Html.HiddenFor(p => p.CREATEDATE)%>
<%=Html.HiddenFor(p => p.CREATEUSER)%>
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
<%=Html.HiddenFor(p => p.UPDATEUSER)%>
<%=Html.HiddenFor(p => p.PRODUCELINE)%>
<%=Html.HiddenFor(p => p.MACHINEID)%>
<%=Html.HiddenFor(p => p.PROCESSTYPE)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
var PID = $("#PID").val();
//设置工序类型为只读
$("#PROCESSTYPETXT").attr("readonly", true)
$("#PROCESSTYPETXT").css({ "backgroundColor": "#C0C0C0" });
//设备编号下拉事件,根据设备id,获取工序类别
$("#MACHINECODDE").combobox({
onSelect: function () {
var MACHINEID = $("#MACHINECODDE").combobox("getValue");
if (MACHINEID != "") {
$.ajax({
url: "/ProcessParameter/GetProcessType",
data: {
'MACHINEID': MACHINEID
},
type: "GET",
cache: false,
dataType: "json",
async: false,
success: function (data) {
var processType = eval(data);
$("#PROCESSTYPE").val(processType.value);
$("#PROCESSTYPETXT").val(processType.text);
}
});
}
}
});
});
function Save() {
if (isValidate() == false) {
return false;
}
var reg = new RegExp("^[0-9]+(.[0-9]{1,10})?$");
var maxValue = $("#MAXVALUE").val();
var minVlaue = $("#MINVALUE").val();
// var STEP = $("#STEP").val();
// if (!reg.test(STEP)) {
// MSI("提示", "间隔应输入数字");
// return;
// }
if (maxValue != "") {
if (!reg.test(maxValue)) {
MSI("提示", "上限值应输入数字");
return;
}
}
if (minVlaue != "") {
if (!reg.test(minVlaue)) {
MSI("提示", "下限值应输入数字");
return;
}
}
if (parseFloat(maxValue) < parseFloat(minVlaue)) {
MSI("提示", "上限值不能小于下限值!");
return;
}
//把设备ID赋值给MACHNEID保存到数据库
var MACHINECODDE = $("#MACHINECODDE").combobox("getText");
var MACHINEID = $("#MACHINECODDE").combobox("getValue");
$('#MACHINECODDE').combobox('setValue', MACHINECODDE);
$("#MACHINEID").val(MACHINEID);
submitByButton("Save");
}
</script>
</asp:Content>