| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <% layout('/layouts/default.html', {title: '工序件数明细', libs: ['dataGrid']}){ %>
- <style>
- .pc-proc { margin-left: 12px; font-weight: normal; color: #2f80ed; font-size: 14px; }
- .pc-oprno { display: inline-block; margin-right: 8px; font-weight: 600; }
- .pc-ok { color: #27ae60; font-weight: 600; }
- .pc-ng { color: #e74c3c; font-weight: 600; }
- .pc-udf { color: #95a5a6; }
- .pc-tip { margin-left: 10px; font-weight: normal; font-size: 12px; color: #999; }
- </style>
- <div class="main-content">
- <div class="box box-main">
- <div class="box-header">
- <div class="box-title">
- <i class="fa fa-list-alt"></i> ${text('工序件数明细')}
- <span class="pc-proc">
- <span class="pc-oprno">${mesProcessCnt.oprno!}</span>
- <span>${mesProcessCnt.processTitle!}</span>
- </span>
- <span class="pc-tip">${text('默认只显示有 OK/NG 判定结果的记录(与列表件数一致);查未判定的请把结果选为 UDF')}</span>
- </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>
- <a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
- </div>
- </div>
- <div class="box-body">
- <#form:form id="searchForm" model="${mesProcessCnt}" action="${ctx}/mes/mesProcessCnt/detailData" method="post" class="form-inline hide"
- data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
- <#form:hidden path="oprno"/>
- <#form:hidden path="lineSn"/>
- <#form:hidden path="startDate"/>
- <#form:hidden path="endDate"/>
- <div class="form-group">
- <label class="control-label">${text('产品二维码')}:</label>
- <div class="control-inline">
- <#form:input path="sn" maxlength="50" class="form-control width-260" placeholder="支持模糊查询"/>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label">${text('结果')}:</label>
- <div class="control-inline" style="width:120px;">
- <select name="content" id="content" class="form-control width-120">
- <option value="">${text('全部(有判定)')}</option>
- <option value="OK">OK</option>
- <option value="NG">NG</option>
- <option value="UDF">${text('未判定(UDF)')}</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
- <button type="button" class="btn btn-default btn-sm" id="btnReset">${text('重置')}</button>
- </div>
- </#form:form>
- <table id="dataGrid"></table>
- <div id="dataGridPage"></div>
- </div>
- </div>
- </div>
- <% } %>
- <script>
- // 初始化DataGrid对象
- $('#dataGrid').dataGrid({
- searchForm: $("#searchForm"),
- pageSize: 50,
- columnModel: [
- {header:'${text("产品二维码")}', name:'sn', width:280, align:"left", frozen:true, sortable:false, formatter: function(val, obj, row, act){
- return val ? '<a href="${ctx}/mes/mesProductRecord/list?sn=' + encodeURIComponent(val) + '" class="btnList" data-title="${text("生产记录")}">' + val + '</a>' : '';
- }},
- {header:'${text("工位号")}', name:'oprno', width:100, align:"center", sortable:false},
- {header:'${text("工序名称")}', name:'processTitle', width:200, align:"left", sortable:false},
- {header:'${text("工件类型")}', name:'cateSn', width:110, align:"center", sortable:false},
- {header:'${text("结果")}', name:'content', width:90, align:"center", sortable:false, formatter: function(val){
- if(val === 'OK'){ return '<span class="pc-ok">OK</span>'; }
- if(val === 'NG'){ return '<span class="pc-ng">NG</span>'; }
- return '<span class="pc-udf">' + (val || 'UDF') + '</span>';
- }},
- {header:'${text("产线")}', name:'lineSn', width:90, align:"center", sortable:false},
- {header:'${text("工序时间")}', name:'workTime', width:170, align:"center", sortable:false, formatter: function(val){
- return val ? val : '-';
- }},
- {header:'${text("备注")}', name:'remark', width:200, align:"left", sortable:false, formatter: function(val){
- return val ? val : '';
- }}
- ]
- });
- // 重置(只清空本页查询条件,保留工序参数)
- $('#btnReset').click(function(){
- $('#sn').val('');
- $('#content').val('');
- $('#dataGrid').trigger('reloadGrid');
- });
- </script>
|