修改 批次入库导出

master
wanghao 2 months ago
parent 027c44c132
commit 15bac9f85f

@ -20,7 +20,7 @@ public class RecordInSort extends BaseEntity
/** 主键 */
private Long objid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入库时间" , width = 30, dateFormat = "yyyy-MM-dd")
private Date createTime;
/** 批次码 */

@ -53,7 +53,8 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <i class="fa fa-info-circle" style="color: red;"></i> 勾选数据导出指定列,否则为全部-->
<a class="btn btn-warning" onclick="exportSelected()">
<!-- <a class="btn btn-warning" onclick="exportSelected()">-->
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -84,12 +85,11 @@
</div>
<script>
var prefix = ctx + "manage/record_in";
var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
// var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
$(function() {
var options = {
url: prefix + "/sort_list",
showSearch: false,
@ -97,7 +97,8 @@
showToggle: false,
showColumns: false,
detailView: true,
modalName: "轮挡批次入库记录",
exportUrl: prefix + "/export_sort",
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
@ -107,8 +108,8 @@
},
{
field: 'createTime',
title: '入库时间',
formatter: function(value, row, index) {
title: '入库时间',width :250
/* formatter: function(value, row, index) {
// 假设value是一个标准的日期时间字符串
if (value) {
// 解析日期时间字符串并格式化为仅显示日期部分
@ -118,11 +119,11 @@
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0');
}
return value; // 如果value为空或不是有效的日期时间字符串则直接返回原始值
}
}*/
},
{
field : 'batchCode',
title : '批次码'
title : '批次码',width :250
},
{
field: 'recordCount',
@ -140,16 +141,7 @@
// return $.table.selectDictLabel(datas, value);
// }
// },
{
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs" href="javascript:;"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:;"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
}]
]
};
$.table.init(options);
@ -252,11 +244,11 @@
objIds: objIds.join(',')
};
*/
$.modal.confirm("确定导出数据吗?", function() {
/* $.modal.confirm("确定导出数据吗?", function() {
$.ajax({
url: prefix + "/export_sort", // 修改为您的导出接口URL
method: 'POST',
// data: dataParam,
data: dataParam,
success: function(result) {
if (result.code === web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
@ -268,7 +260,7 @@
$.modal.alertError("导出失败");
}
});
});
});*/
}

@ -14,6 +14,11 @@
<label>RFID</label>
<input type="text" name="epcCode"/>
</li>
<li>
<label>机位码:</label>
<input type="text" name="locationCode"/>
</li>
<li>
<label>领用人:</label>
<input type="text" name="useUser"/>

@ -50,8 +50,8 @@
<table id="bootstrap-table"></table>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<i class="fa fa-info-circle" style="color: red;"></i>
勾选数据导出指定列,否则为全部
<!-- <i class="fa fa-info-circle" style="color: red;"></i>
勾选数据导出指定列,否则为全部-->
<a class="btn btn-warning" onclick="exportSelected()">
<i class="fa fa-download"></i> 导出
</a>
@ -83,7 +83,7 @@
</div>
<script>
var prefix = ctx + "manage/record_out";
var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
// var datas = [{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u6B63\u5E38\u72B6\u6001","dictCode":6,"dictSort":1,"dictLabel":"\u6B63\u5E38","dictValue":"0","dictType":"sys_normal_disable","cssClass":"","listClass":"primary","isDefault":"Y","status":"0","default":true},{"createBy":"admin","createTime":"2024-06-06 02:06:39","updateBy":null,"updateTime":null,"remark":"\u505C\u7528\u72B6\u6001","dictCode":7,"dictSort":2,"dictLabel":"\u505C\u7528","dictValue":"1","dictType":"sys_normal_disable","cssClass":"","listClass":"danger","isDefault":"N","status":"0","default":false}];
$(function() {
var options = {
@ -233,13 +233,13 @@
};
// 导出数据
function exportSelected() {
var userIds = $.table.selectColumns("objid");
// var userIds = $.table.selectColumns("objid");
var dataParam = $("#export-form").serializeArray();
var tipMsg = "确定导出所有数据吗?";
if($.common.isNotEmpty(userIds)){
tipMsg = "确定导出勾选" + userIds.length + "条数据吗?";
dataParam.push({ "name": "userIds", "value": userIds });
}
// if($.common.isNotEmpty(userIds)){
// tipMsg = "确定导出勾选" + userIds.length + "条数据吗?";
// dataParam.push({ "name": "userIds", "value": userIds });
// }
$.modal.confirm(tipMsg, function() {
$.post(prefix + "/exportData", dataParam, function(result) {
if (result.code == web_status.SUCCESS) {

Loading…
Cancel
Save