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

53 lines
1.8 KiB

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QMAPP.FJC.Entity.Operation.MainOperation>" %>
<table id="<%=Model.MACHINECODDE + "_Table"%>" style="display: none" class="PartList">
<tr>
<th>
焊头
</th>
<%foreach (var p in Model.ParamColumns.GroupBy(p => p.PARANAME.Substring(0, 3)).First())
{%>
<th>
<%:p.PARADESCRIBE.Substring(4) %>
</th>
<%} %>
</tr>
<%foreach (var gr in Model.ParamColumns.GroupBy(p => p.PARANAME.Substring(0, 3)))
{
%>
<tr>
<th>
<%:gr.Key %>
</th>
<%foreach (var p in gr)
{%>
<td id="<%=Model.MACHINECODDE + "_" + p.PARANAME%>">
</td>
<%} %>
</tr>
<%}%>
</table>
<span id="<%=Model.MACHINECODDE + "_Holder"%>" style="display: block">正在加载... </span>
<script type="text/javascript" language="javascript">
$.ajax({
type: "POST",
url: "/ProductArchives/LoadParameter",
dataType: "json",
data: {
tables: '<%=Model.PARATABLENAME %>',
fileds: '<%=Model.SelectCollumns %>',
productcode: '<%=Model.PRODUCTCODE %>',
machinecode: '<%=Model.MACHINECODDE %>'
},
success: function (data) {
<%foreach (var p in Model.ParamColumns)
{ %>
$('#<%=Model.MACHINECODDE + "_" + p.PARANAME%>').html(data[0].<%=p.PARANAME%>);
<%} %>
$('#<%=Model.MACHINECODDE + "_Table"%>').css('display','table');
$('#<%=Model.MACHINECODDE + "_Holder"%>').css('display','none');
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
$('#<%=Model.MACHINECODDE + "_Holder"%>').text('加载失败!');
}
});
</script>