|
|
@@ -18,9 +18,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="box-body">
|
|
|
+ <div class="alert alert-info" style="margin-bottom:10px;">
|
|
|
+ <i class="fa fa-info-circle"></i>
|
|
|
+ ${text('列表按工件码聚合。点击「查看明细」弹出模态层,可先看工位再看工艺明细。')}
|
|
|
+ </div>
|
|
|
<#form:form id="searchForm" model="${mesProductRecord}" action="${ctx}/mes/mesProductRecord/listData" method="post" class="form-inline hide"
|
|
|
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
|
|
- <#form:hidden path="pid"/>
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">${text('工件码')}:</label>
|
|
|
<div class="control-inline">
|
|
|
@@ -39,18 +42,6 @@
|
|
|
<#form:input path="craft" maxlength="30" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<!-- <div class="form-group">-->
|
|
|
-<!-- <label class="control-label">${text('工位结果序号')}:</label>-->
|
|
|
-<!-- <div class="control-inline">-->
|
|
|
-<!-- <#form:input path="serial" maxlength="8" class="form-control width-120"/>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="form-group">-->
|
|
|
-<!-- <label class="control-label">${text('报文类型')}:</label>-->
|
|
|
-<!-- <div class="control-inline">-->
|
|
|
-<!-- <#form:input path="messageType" maxlength="50" class="form-control width-120"/>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">${text('工件类型')}:</label>
|
|
|
<div class="control-inline">
|
|
|
@@ -69,33 +60,22 @@
|
|
|
<#form:input path="content" maxlength="1000" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<!-- <div class="form-group">-->
|
|
|
-<!-- <label class="control-label">${text('备注')}:</label>-->
|
|
|
-<!-- <div class="control-inline">-->
|
|
|
-<!-- <#form:input path="remark" maxlength="255" class="form-control width-120"/>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label class="control-label">${text('加工状态')}:</label>
|
|
|
- <div class="control-inline" style="width: 80px">
|
|
|
- <#form:select path="processState" dictType="mes_product_record_process_state" blankOption="true" class="form-control width-120" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label class="control-label">${text('更新日期')}:</label>
|
|
|
- <div class="control-inline">
|
|
|
- <#form:input path="updateDate_gte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
|
|
|
- dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" data-done="updateDate_lte.click()"/>
|
|
|
- -
|
|
|
- <#form:input path="updateDate_lte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
|
|
|
- dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">${text('加工状态')}:</label>
|
|
|
+ <div class="control-inline" style="width: 80px">
|
|
|
+ <#form:select path="processState" dictType="mes_product_record_process_state" blankOption="true" class="form-control width-120" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="control-label">${text('更新日期')}:</label>
|
|
|
+ <div class="control-inline">
|
|
|
+ <#form:input path="updateDate_gte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
|
|
|
+ dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" data-done="updateDate_lte.click()"/>
|
|
|
+ -
|
|
|
+ <#form:input path="updateDate_lte" readonly="true" maxlength="20" class="form-control laydate width-datetime"
|
|
|
+ dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
|
|
+ </div>
|
|
|
</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>
|
|
|
@@ -108,59 +88,54 @@
|
|
|
</div>
|
|
|
<% } %>
|
|
|
<script>
|
|
|
-// 初始化DataGrid对象
|
|
|
+/** 打开工件明细模态层(工位 → 工艺) */
|
|
|
+function openProductRecordDetail(sn) {
|
|
|
+ if (!sn) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ js.layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '${text("生产明细")} - ' + sn,
|
|
|
+ area: ['92%', '88%'],
|
|
|
+ maxmin: true,
|
|
|
+ shadeClose: true,
|
|
|
+ scrollbar: true,
|
|
|
+ content: '${ctx}/mes/mesProductRecord/detailList?sn=' + encodeURIComponent(sn)
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
$('#dataGrid').dataGrid({
|
|
|
searchForm: $("#searchForm"),
|
|
|
columnModel: [
|
|
|
- {header:'${text("工件码")}', name:'sn', index:'a.sn', width:280, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
|
|
- return '<a href="${ctx}/mes/mesProductRecord/info?id='+row.id+'" class="btnList" data-title="${text("查看生产记录")}">'+(val||row.id)+'</a>';
|
|
|
+ {header:'${text("工件码")}', name:'sn', index:'a.sn', width:260, align:"center", formatter: function(val, obj, row, act){
|
|
|
+ var sn = val || '';
|
|
|
+ if (!sn) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return '<a href="javascript:void(0);" class="btn-open-detail" data-sn="'+sn+'">'+sn+'</a>';
|
|
|
}},
|
|
|
- {header:'${text("工位号")}', name:'oprno', index:'a.oprno', width:90, align:"center"},
|
|
|
- {header:'${text("工位名称")}', name:'oprnoTitle', index:'oprnoTitle', width:150, align:"center", sortable:false},
|
|
|
- {header:'${text("工艺号")}', name:'craft', index:'a.craft', width:90, align:"center"},
|
|
|
- {header:'${text("报文名称")}', name:'title', index:'b.title', width:180, align:"center",sortable:false},
|
|
|
- {header:'${text("结果")}', name:'content', index:'a.content', width:80, align:"center"},
|
|
|
- {header:'${text("绑定内容")}', name:'materielSn', index:'a.materiel_sn', width:180, align:"center"},
|
|
|
- {header:'${text("工件类型")}', name:'cateSn', index:'a.cate_sn', width:90, align:"center"},
|
|
|
- {header:'${text("产线编号")}', name:'lineSn', index:'a.line_sn', width:90, align:"center"},
|
|
|
- // {header:'${text("工位结果序号")}', name:'sort', index:'b.sort', width:120, align:"center",sortable:true},
|
|
|
- // {header:'${text("报文类型")}', name:'messageType', index:'b.cate', width:100, align:"center"},
|
|
|
+ {header:'${text("工件类型")}', name:'cateSn', index:'a.cate_sn', width:100, align:"center"},
|
|
|
+ {header:'${text("产线编号")}', name:'lineSn', index:'a.line_sn', width:100, align:"center"},
|
|
|
{header:'${text("备注")}', name:'remark', index:'a.remark', width:150, align:"center"},
|
|
|
- {header:'${text("来源")}', name:'source', index:'a.source', width:150, align:"center", formatter: function(val, obj, row, act){
|
|
|
- return js.getDictLabel(${@DictUtils.getDictListJson('mes_product_modify_source')}, val, '${text("未知")}', true);
|
|
|
- }},
|
|
|
- {header:'${text("创建人")}', name:'createBy', index:'a.create_by', width:120, align:"center"},
|
|
|
- {header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:120, align:"center"},
|
|
|
{header:'${text("更新人")}', name:'updateBy', index:'a.update_by', width:120, align:"center"},
|
|
|
- {header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:125, align:"center"},
|
|
|
- //{header:'${text("更新日期")}', name:'updateDate', index:'a.update_date', width:160, align:"center",frozen:true },
|
|
|
- {header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
|
|
- var actions = [];
|
|
|
- //<% if(hasPermi('mes:mesProductRecord:edit')){ %>
|
|
|
- actions.push('<a href="${ctx}/mes/mesProductRecord/edit?id='+row.id+'" class="btnList" title="${text("编辑")}"><i class="fa fa-pencil"></i></a> ');
|
|
|
- //<% } %>
|
|
|
- actions.push('<a href="${ctx}/mes/mesProductRecord/info?id='+row.id+'" class="btnList" title="${text("查看生产记录")}"><i class="fa fa-fw fa-eye"></i></a> ');
|
|
|
- //<% if(hasPermi('mes:mesProductRecord:reload')){ %>
|
|
|
- actions.push('<a href="${ctx}/mes/mesProductRecord/cz?id='+row.id+'" class="btnList" title="重置" data-confirm="确认要重置该数据吗?"><i class="fa fa-refresh"></i></a> ');
|
|
|
- //
|
|
|
- // if(row.content != "OK"){
|
|
|
- actions.push('<a href="${ctx}/mes/mesProductRecord/ok?id='+row.id+'" class="btnList" title="OK" data-confirm="确认要该记录OK吗?"><i class="fa fa-check-circle-o"></i></a> ');
|
|
|
- // }
|
|
|
- //<% } %>
|
|
|
- return actions.join('');
|
|
|
+ {header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
|
|
|
+ {header:'${text("操作")}', name:'actions', width:120, align:"center", formatter: function(val, obj, row, act){
|
|
|
+ var sn = row.sn || '';
|
|
|
+ if (!sn) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return '<a href="javascript:void(0);" class="btn btn-info btn-xs btn-open-detail" data-sn="'+sn+'">${text("查看明细")}</a>';
|
|
|
}}
|
|
|
],
|
|
|
- // treeGrid: true, // 启用树结构表格
|
|
|
- // defaultExpandLevel: 0, // 默认展开的层次
|
|
|
- // // treeGridModel: 'adjacency',
|
|
|
- frozenCols: true,
|
|
|
- // expandNodeClearPostData: 'sn,oprno,craft,serial,messageType,materielSn,remark,updateDate',// 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
|
|
|
- // 加载成功后执行事件
|
|
|
ajaxSuccess: function(data){
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+$(document).on('click', '.btn-open-detail', function(e){
|
|
|
+ e.preventDefault();
|
|
|
+ openProductRecordDetail($(this).attr('data-sn'));
|
|
|
+});
|
|
|
+
|
|
|
$('#btnExport').click(function(){
|
|
|
js.ajaxSubmitForm($('#searchForm'), {
|
|
|
url:'${ctx}/mes/mesProductRecord/exportData',
|