|
|
@@ -1,14 +1,19 @@
|
|
|
-<% layout('/layouts/default.html', {title: 'mes_screw管理', libs: ['dataGrid']}){ %>
|
|
|
+<% layout('/layouts/default.html', {title: '锁付明细', libs: ['dataGrid']}){ %>
|
|
|
<div class="main-content">
|
|
|
<div class="box box-main">
|
|
|
<div class="box-header">
|
|
|
<div class="box-title">
|
|
|
- <i class="fa icon-notebook"></i> ${text('mes_screw管理')}
|
|
|
+ <i class="fa icon-notebook"></i>
|
|
|
+ <% if (isNotBlank(mesScrew.sn)) { %>
|
|
|
+ ${text('锁付明细')} - ${mesScrew.sn}
|
|
|
+ <% } else { %>
|
|
|
+ ${text('锁付明细管理')}
|
|
|
+ <% } %>
|
|
|
</div>
|
|
|
<div class="box-tools pull-right">
|
|
|
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
|
|
- <% if(hasPermi('mes:mesScrew:edit')){ %>
|
|
|
- <a href="${ctx}/mes/mesScrew/form" class="btn btn-default btnTool" title="${text('新增mes_screw')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
|
|
+ <% if(isBlank(mesScrew.sn) && hasPermi('mes:mesScrew:edit')){ %>
|
|
|
+ <a href="${ctx}/mes/mesScrew/form" class="btn btn-default btnTool" title="${text('新增锁付明细')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
|
|
<% } %>
|
|
|
<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
|
|
|
</div>
|
|
|
@@ -16,12 +21,8 @@
|
|
|
<div class="box-body">
|
|
|
<#form:form id="searchForm" model="${mesScrew}" action="${ctx}/mes/mesScrew/listData" method="post" class="form-inline hide"
|
|
|
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
|
|
- <div class="form-group">
|
|
|
- <label class="control-label">${text('工件码')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="sn" maxlength="255" class="form-control width-120"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <#form:hidden path="sn"/>
|
|
|
+ <#form:hidden path="batchId"/>
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">${text('工位号')}:</label>
|
|
|
<div class="control-inline">
|
|
|
@@ -41,36 +42,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
- <label class="control-label">${text('锁付扭力')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="screwToquer" maxlength="255" class="form-control width-120"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
- <label class="control-label">${text('锁付圈数')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="screwRing" maxlength="255" class="form-control width-120"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
- <label class="control-label">${text('锁付时长')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="screwTime" maxlength="255" class="form-control width-120"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
<label class="control-label">${text('结果')}:</label>
|
|
|
<div class="control-inline">
|
|
|
<#form:input path="result" maxlength="64" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
- <label class="control-label">${text('批次ID')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="batchId" maxlength="255" class="form-control width-120"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
|
|
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
|
|
</div>
|
|
|
@@ -82,33 +59,40 @@
|
|
|
</div>
|
|
|
<% } %>
|
|
|
<script>
|
|
|
+var detailMode = '${mesScrew.sn!}' !== '';
|
|
|
// 初始化DataGrid对象
|
|
|
$('#dataGrid').dataGrid({
|
|
|
searchForm: $("#searchForm"),
|
|
|
columnModel: [
|
|
|
- {header:'${text("工件码")}', name:'sn', index:'a.sn', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
|
|
- return '<a href="${ctx}/mes/mesScrew/form?id='+row.id+'" class="btnList" data-title="${text("编辑mes_screw")}">'+(val||row.id)+'</a>';
|
|
|
- }},
|
|
|
- {header:'${text("工位号")}', name:'oprno', index:'a.oprno', width:150, align:"left"},
|
|
|
- {header:'${text("螺丝序号")}', name:'screwNo', index:'a.screw_no', width:150, align:"left"},
|
|
|
- {header:'${text("锁付任务号")}', name:'screwTask', index:'a.screw_task', width:150, align:"left"},
|
|
|
- {header:'${text("锁付扭力")}', name:'screwToquer', index:'a.screw_toquer', width:150, align:"left"},
|
|
|
- {header:'${text("锁付圈数")}', name:'screwRing', index:'a.screw_ring', width:150, align:"left"},
|
|
|
- {header:'${text("锁付时长")}', name:'screwTime', index:'a.screw_time', width:150, align:"left"},
|
|
|
- {header:'${text("结果")}', name:'result', index:'a.result', width:150, align:"left"},
|
|
|
- {header:'${text("批次ID")}', name:'batchId', index:'a.batch_id', width:150, align:"left"},
|
|
|
- {header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
|
|
+ {header:'${text("工件码")}', name:'sn', index:'a.sn', width:220, align:"left", frozen:true},
|
|
|
+ {header:'${text("工位号")}', name:'oprno', index:'a.oprno', width:120, align:"left"},
|
|
|
+ {header:'${text("螺丝序号")}', name:'screwNo', index:'a.screw_no', width:120, align:"left"},
|
|
|
+ {header:'${text("锁付任务号")}', name:'screwTask', index:'a.screw_task', width:120, align:"left"},
|
|
|
+ {header:'${text("锁付扭力")}', name:'screwToquer', index:'a.screw_toquer', width:120, align:"left"},
|
|
|
+ {header:'${text("锁付圈数")}', name:'screwRing', index:'a.screw_ring', width:120, align:"left"},
|
|
|
+ {header:'${text("锁付时长")}', name:'screwTime', index:'a.screw_time', width:120, align:"left"},
|
|
|
+ {header:'${text("结果")}', name:'result', index:'a.result', width:100, align:"center"},
|
|
|
+ {header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
|
|
+ {header:'${text("批次ID")}', name:'batchId', index:'a.batch_id', width:150, align:"left", hidden: detailMode},
|
|
|
+ {header:'${text("操作")}', name:'actions', width:120, hidden: detailMode, formatter: function(val, obj, row, act){
|
|
|
var actions = [];
|
|
|
//<% if(hasPermi('mes:mesScrew:edit')){ %>
|
|
|
- actions.push('<a href="${ctx}/mes/mesScrew/form?id='+row.id+'" class="btnList" title="${text("编辑mes_screw")}"><i class="fa fa-pencil"></i></a> ');
|
|
|
- actions.push('<a href="${ctx}/mes/mesScrew/delete?id='+row.id+'" class="btnList" title="${text("删除mes_screw")}" data-confirm="${text("确认要删除该mes_screw吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
|
|
+ actions.push('<a href="${ctx}/mes/mesScrew/form?id='+row.id+'" class="btnList" title="${text("编辑锁付明细")}"><i class="fa fa-pencil"></i></a> ');
|
|
|
+ actions.push('<a href="${ctx}/mes/mesScrew/delete?id='+row.id+'" class="btnList" title="${text("删除锁付明细")}" data-confirm="${text("确认要删除该锁付明细吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
|
|
//<% } %>
|
|
|
return actions.join('');
|
|
|
}}
|
|
|
],
|
|
|
- // 加载成功后执行事件
|
|
|
+ frozenCols: true,
|
|
|
ajaxSuccess: function(data){
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
-</script>
|
|
|
+if (detailMode) {
|
|
|
+ var fixedSn = '${mesScrew.sn!}';
|
|
|
+ $('#searchForm').on('reset', function(){
|
|
|
+ setTimeout(function(){
|
|
|
+ $('#sn').val(fixedSn);
|
|
|
+ }, 0);
|
|
|
+ });
|
|
|
+}
|
|
|
+</script>
|