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

247 lines
8.5 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.WorkCellStateModel>" %>
<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 class="editTable" >
<tr>
<th align="right">
<%=Html.QV(p => p.STATE_CODE)%>
</th>
<td>
<%=Html.QC(p => p.STATE_CODE)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.STATE_NAME)%>
</th>
<td>
<%=Html.QC(p => p.STATE_NAME)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.STATE_SEQ)%>
</th>
<td>
<%=Html.QC(p => p.STATE_SEQ)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.ENTRY_ACTION)%>
</th>
<td>
<%=Html.QC(p => p.ENTRY_ACTION)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.EXIT_ACTION)%>
</th>
<td>
<%=Html.QC(p => p.EXIT_ACTION)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p=>p.FACTORY_CODE) %>
</th>
<td>
<%=Html.QC(p => p.FACTORY_CODE)%>
</td>
</tr>
<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.ENTRY_ACTIONS)%>
</th>
<td>
<%=Html.QC(p => p.ENTRY_ACTIONS)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.EXIT_ACTIONS)%>
</th>
<td>
<%=Html.QC(p => p.EXIT_ACTIONS)%>
</td>
</tr>
<%-- <tr>
<td colspan = 2>
<%= Html.QTButtonAdd("Dai", "Add", "Add()") %>
<%= Html.QTButtonDelete("Dai", "Delete", "Delete()") %>
</td>
</tr>
<tr>
<td colspan=2 height="200px" width="500px" >
<div class="easyui-layout" style="width:450px;height:300px;">
<%=Html.QPList() %>
<%=Html.QDataGridEditable<QMAPP.MD.Web.Models.DaiDataModel>("grid1", new QMAPP.MD.Web.Models.DaiDataModel())%>
<%=Html.QPEnd() %>
</div>
</td>
</tr>--%>
</table>
<%=Html.HiddenFor(p => p.PID)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("WorkCellState", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
//工厂,工序
var workCenterCode = "";
//修改时:赋值
var factoryCode = $('#FACTORY_CODE').combobox('getValue');
if (factoryCode != "") {
//获取下拉数据源
$('#WORKCELL_CODE').combobox({
url: "/Dict/GetFactoryWorkCellComboxSource?factoryCode=" + factoryCode + "&workCenterCode=" + workCenterCode,
editable: 'false',
valueField: 'WORKCELL_CODE',
textField: 'WORKCELL_NAME'
});
//$('#WORKCELL_CODE').combobox("setText", $('#WORKCELL_NAME').val());
}
else {
$('#WORKCELL_CODE').combobox("setText", "");
}
//新增时:级联
$('#FACTORY_CODE').combobox({
onSelect: function () {
var selectCode = $('#FACTORY_CODE').combobox('getValue');
if (selectCode != "") {
//获取下拉数据源
$('#WORKCELL_CODE').combobox({
url: "/Dict/GetFactoryWorkCellComboxSource?factoryCode=" + factoryCode + "&workCenterCode=" + workCenterCode,
editable: 'false',
valueField: 'WORKCELL_CODE',
textField: 'WORKCELL_NAME'
});
$('#WORKCELL_CODE').combobox("setValue", "");
}
else {
//清空工序下拉框
var emptyData = [{ 'WORKCELL_CODE': "", 'WORKCELL_NAME': ""}];
$('#WORKCELL_CODE').combobox("loadData", emptyData);
$('#WORKCELL_CODE').combobox("select", "");
}
}
});
//录入下拉级联
$('#ENTRY_ACTIONS').combobox({
onSelect: function () {
var action = $('#ENTRY_ACTIONS').combobox('getValue');
if (action !== "") {
var eAction = $('#ENTRY_ACTION').val();
if (eAction === "") {
eAction=action;
}
else {
if (eAction.indexOf(action) >= 0) {
alert('已经存在,不能重复选择。');
} else {
eAction += ";" + action;
}
}
$('#ENTRY_ACTION').val(eAction);
}
else {
$('#ENTRY_ACTION').val("");
}
}
});
//退出下拉级联
$('#EXIT_ACTIONS').combobox({
onSelect: function () {
var action = $('#EXIT_ACTIONS').combobox('getValue');
if (action !== "") {
var eAction = $('#EXIT_ACTION').val();
if (eAction === "") {
eAction = action;
}
else {
if (eAction.indexOf(action) >= 0) {
alert('已经存在,不能重复选择。');
} else {
eAction += ";" + action;
}
}
$('#EXIT_ACTION').val(eAction);
}
else {
$('#EXIT_ACTION').val("");
}
}
});
});
//添加
function Add() {
$("#grid1").datagrideditable('appendRow', {});
}
//删除
function Delete() {
var rowIndexSelected = $("#grid1").datagrideditable("rowIndexSelected");
if (rowIndexSelected == "") {
MSI(MsgNormalTitle, AtLeastOneTitle);
}
else {
$("#grid1").datagrideditable("deleteRow", rowIndexSelected);
}
}
//保存
function Save() {
if (!isValidate()) {
return false;
}
var reg = /^[0-9]+$/;
var netId = $("#STATE_SEQ").val();
if (!reg.test(netId)) {
MSI("提示", "顺序只能输入数字。");
return;
}
// if ($("#grid1").datagrideditable("isValid") == false)
// return false;
// var data = JSON.stringify($("#grid1").datagrid("getRows"));
// $('#DetailValue').val(data);
submitByButton("Save");
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>