|
|
@@ -21,7 +21,7 @@
|
|
|
<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"/>
|
|
|
+ <#form:input path="sn" maxlength="50" class="form-control width-180"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
@@ -30,19 +30,29 @@
|
|
|
<#form:input path="oprno" maxlength="20" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
+ <div class="form-group" style="display:none;">
|
|
|
<label class="control-label">${text('产线编号')}:</label>
|
|
|
<div class="control-inline">
|
|
|
<#form:input path="lineSn" maxlength="10" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
+ <div class="form-group" style="display:none;">
|
|
|
<label class="control-label">${text('参数内容')}:</label>
|
|
|
<div class="control-inline">
|
|
|
<#form:input path="content" class="form-control width-120"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
+ <label class="control-label">${text('日期')}:</label>
|
|
|
+ <div class="control-inline">
|
|
|
+ <#form:input path="createDate_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="createDate_lte.click()"/>
|
|
|
+ -
|
|
|
+ <#form:input path="createDate_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 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>
|
|
|
@@ -65,13 +75,8 @@ $('#dataGrid').dataGrid({
|
|
|
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
|
|
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
|
|
var actions = [];
|
|
|
- // //<% if(hasPermi('mes:mesProductCmt:edit')){ %>
|
|
|
- // // actions.push('<a href="${ctx}/mes/mesProductCmt/form?id='+row.id+'" class="btnList" title="${text("编辑CMT过程参数")}"><i class="fa fa-pencil"></i></a> ');
|
|
|
- // //<% } %>
|
|
|
- // return actions.join('');
|
|
|
- actions.push('<a href="${ctx}/mes/mesProductCmt/info?id='+row.id+'" class="btnList" title="${text("详情")}"><i class="fa fa-fw fa-eye"></i></a> ');
|
|
|
- return actions.join('');
|
|
|
-
|
|
|
+ actions.push('<a href="${ctx}/mes/mesProductCmt/info?id='+row.id+'" class="btnList" title="${text("详情")}"><i class="fa fa-fw fa-eye"></i></a> ');
|
|
|
+ return actions.join('');
|
|
|
}}
|
|
|
],
|
|
|
// 加载成功后执行事件
|
|
|
@@ -81,9 +86,46 @@ $('#dataGrid').dataGrid({
|
|
|
});
|
|
|
</script><script>
|
|
|
$('#btnExport').click(function(){
|
|
|
- js.ajaxSubmitForm($('#searchForm'), {
|
|
|
- url:'${ctx}/mes/mesProductCmt/exportData',
|
|
|
- downloadFile:true
|
|
|
+ js.layer.open({
|
|
|
+ type: 1,
|
|
|
+ area: ['420px'],
|
|
|
+ title: '${text("按日期导出CMT过程参数")}',
|
|
|
+ resize: false,
|
|
|
+ scrollbar: false,
|
|
|
+ content: js.template('exportTpl'),
|
|
|
+ btn: ['<i class="fa fa-check"></i> ${text("导出")}',
|
|
|
+ '<i class="fa fa-remove"></i> ${text("关闭")}'],
|
|
|
+ btn1: function(index, layero){
|
|
|
+ // 取弹窗里选择的开始/结束日期
|
|
|
+ var gte = layero.find('#exportDateGte').val();
|
|
|
+ var lte = layero.find('#exportDateLte').val();
|
|
|
+ if (!gte || !lte){
|
|
|
+ js.showMessage('${text("请选择开始和结束日期")}', null, 'warning');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ // 日期补全:开始=当天00:00:00,结束=当天23:59:59,保证包含完整一天
|
|
|
+ var gteFull = gte + ' 00:00:00';
|
|
|
+ var lteFull = lte + ' 23:59:59';
|
|
|
+ $('#searchForm [name="createDate_gte"]').val(gteFull);
|
|
|
+ $('#searchForm [name="createDate_lte"]').val(lteFull);
|
|
|
+ js.ajaxSubmitForm($('#searchForm'), {
|
|
|
+ url:'${ctx}/mes/mesProductCmt/exportData',
|
|
|
+ downloadFile:true
|
|
|
+ });
|
|
|
+ js.layer.close(index);
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ success: function(layero, index){
|
|
|
+ // 弹窗打开后初始化 laydate 日期选择(只选日期,不选时分)
|
|
|
+ var ld = (window.top && window.top.laydate) ? window.top.laydate : window.laydate;
|
|
|
+ layero.find('#exportDateGte').on('click', function(){
|
|
|
+ ld.render({elem: this, type: 'date', format: 'yyyy-MM-dd', show: true, closeStop: this,
|
|
|
+ done: function(){ layero.find('#exportDateLte').click(); }});
|
|
|
+ });
|
|
|
+ layero.find('#exportDateLte').on('click', function(){
|
|
|
+ ld.render({elem: this, type: 'date', format: 'yyyy-MM-dd', show: true, closeStop: this});
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
$('#btnImport').click(function(){
|
|
|
@@ -132,4 +174,21 @@ $('#btnImport').click(function(){
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
-//--></script>
|
|
|
+//--></script>
|
|
|
+
|
|
|
+<script id="exportTpl" type="text/template">//<!--
|
|
|
+<div class="form-horizontal mt20 mb10" style="padding:10px 20px;">
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-xs-4 control-label">${text('开始日期')}:</label>
|
|
|
+ <div class="col-xs-8">
|
|
|
+ <input type="text" id="exportDateGte" readonly class="form-control" placeholder="${text('开始日期')}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-xs-4 control-label">${text('结束日期')}:</label>
|
|
|
+ <div class="col-xs-8">
|
|
|
+ <input type="text" id="exportDateLte" readonly class="form-control" placeholder="${text('结束日期')}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+//--></script>
|