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.
301 lines
11 KiB
301 lines
11 KiB
4 years ago
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage<QMAPP.MD.Web.Models.DaiModel>" %>
|
||
|
<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.DA_CODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DA_CODE)%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.DA_NAME)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DA_NAME)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.DATA_TYPE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DATA_TYPE)%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.DA_SEQ)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DA_SEQ)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p=>p.FACTORY_CODE) %>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.FACTORY_CODE)%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.WORKCELL_CODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.WORKCELL_CODE)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<%--<tr>
|
||
|
<th>
|
||
|
<div id="dath" style="display: none">
|
||
|
<%=Html.QV(p => p.DA_STATUS)%>
|
||
|
</div>
|
||
|
</th>
|
||
|
<td>
|
||
|
<div id="datd" style="display: none">
|
||
|
<%=Html.QC(p => p.DA_STATUS)%>
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>--%>
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.DA_MODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DA_MODE)%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.ISPROCESSCODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.ISPROCESSCODE)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.DIVBY_MOULD)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.DIVBY_MOULD)%>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.ANALYZE_CODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.ANALYZE_CODE)%>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.MATERIAL_CODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.MATERIAL_CODE)%>
|
||
|
<script type="text/javascript" language="javascript">
|
||
|
$(function () {
|
||
|
$('#MATERIAL_CODE').combotree({
|
||
|
panelHeight: '230',
|
||
|
panelWidth: '500',
|
||
|
onBeforeSelect: function (node) {
|
||
|
//是否选中叶子节点
|
||
|
if (!$(this).tree('isLeaf', node.target)) {
|
||
|
//return false;
|
||
|
//alert(node.id);
|
||
|
$("#MATERIAL_TYPE").val(node.id);
|
||
|
}
|
||
|
else {
|
||
|
var parent = $(this).tree('getParent', node.target);
|
||
|
if (parent != null) {
|
||
|
$("#MATERIAL_TYPE").val(parent.id);
|
||
|
//alert(parent.id + ":::" + node.id);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
})
|
||
|
</script>
|
||
|
</td>
|
||
|
<th align="right">
|
||
|
<%=Html.QV(p => p.STATE_CODE)%>
|
||
|
</th>
|
||
|
<td>
|
||
|
<%=Html.QC(p => p.STATE_CODE)%>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<%--<tr>
|
||
|
<td>
|
||
|
<asp:TreeView ID="TreeView1" runat="server"></asp:TreeView>
|
||
|
<select id="Select1">
|
||
|
<option></option>
|
||
|
</select>
|
||
|
<asp:Timer ID="Timer1" runat="server">
|
||
|
</asp:Timer>
|
||
|
</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.HiddenFor(p => p.MATERIAL_TYPE)%>
|
||
|
<%=Html.HiddenFor(p => p.WORKCELL_NAME)%>
|
||
|
<%=Html.HiddenFor(p => p.CREATEDATE)%>
|
||
|
<%=Html.HiddenFor(p => p.CREATEUSER)%>
|
||
|
<%=Html.HiddenFor(p => p.UPDATEDATE)%>
|
||
|
<%=Html.HiddenFor(p => p.UPDATEUSER)%>
|
||
|
<%=Html.QPEnd() %>
|
||
|
</asp:Content>
|
||
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
||
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<%=Html.QTButtonSave("Dai", "DaiSave", "return Save();")%>
|
||
|
<%=Html.QTButtonBack("close", "DaiList", "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", "");
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
var workCellCodeInit = $('#WORKCELL_CODE').combobox('getValue');
|
||
|
if (workCellCodeInit != "") {
|
||
|
//获取工序下拉数据源
|
||
|
$('#STATE_CODE').combobox({
|
||
|
url: "/Dict/GetWorkCellStateCodeComboxSource?workCellCode=" + workCellCodeInit,
|
||
|
editable: 'false',
|
||
|
valueField: 'STATE_CODE',
|
||
|
textField: 'STATE_NAME'
|
||
|
});
|
||
|
}
|
||
|
//工序下拉级联
|
||
|
$('#WORKCELL_CODE').combobox({
|
||
|
onSelect: function () {
|
||
|
var workCellCode = $('#WORKCELL_CODE').combobox('getValue');
|
||
|
if (workCellCode != "") {
|
||
|
//获取工序下拉数据源
|
||
|
$('#STATE_CODE').combobox({
|
||
|
url: "/Dict/GetWorkCellStateCodeComboxSource?workCellCode=" + workCellCode,
|
||
|
editable: 'false',
|
||
|
valueField: 'STATE_CODE',
|
||
|
textField: 'STATE_NAME'
|
||
|
});
|
||
|
$('#STATE_CODE').combobox("setValue", "");
|
||
|
}
|
||
|
else {
|
||
|
//清空物料下拉框
|
||
|
var plantData = [{ 'STATE_CODE': "", 'STATE_NAME': ""}];
|
||
|
$('#STATE_CODE').combobox("loadData", plantData);
|
||
|
$('#STATE_CODE').combobox("select", "");
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
//添加
|
||
|
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 = $("#DA_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("DaiSave");
|
||
|
}
|
||
|
|
||
|
$(function () {
|
||
|
|
||
|
$('#FACTORY_CODE').combobox({
|
||
|
panelWidth: '350'
|
||
|
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</asp:Content>
|
||
|
|
||
|
|
||
|
|
||
|
|