添加轮档入库分类记录模块

master
wg 3 months ago
parent ca8a5c661c
commit 30c09ce988

@ -0,0 +1,67 @@
package com.ruoyi.manage.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* record_in
*
* @author wangh
* @date 2024-01-17
*/
public class RecordInSort extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long objid;
/** 批次码 */
@Excel(name = "批次码")
private String batchCode;
/** 数量 */
@Excel(name = "数量")
public int recordCount;
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setBatchCode(String batchCode)
{
this.batchCode = batchCode;
}
public String getBatchCode()
{
return batchCode;
}
public int getRecordCount() {
return recordCount;
}
public void setRecordCount(int recordCount) {
this.recordCount = recordCount;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
// .append("recordCount", getRecordCount())
.append("batchCode", getBatchCode())
// .append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

@ -0,0 +1,205 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="">
<meta name="description" content="">
<title>轮挡入库分类记录</title>
<link href="/css/bootstrap.min.css?v=3.3.7" rel="stylesheet"/>
<link href="/css/font-awesome.min.css?v=4.7.0" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<link href="/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.22.6" rel="stylesheet"/>
<link href="/css/animate.min.css?v=20210831" rel="stylesheet"/>
<link href="/css/style.min.css?v=20210831" rel="stylesheet"/>
<link href="/ruoyi/css/ry-ui.css?v=4.7.9" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<!-- 点击事件的方式打开使用 detailViewIcon: false and detailViewByClick: true
data-detail-view-icon="false"
data-detail-view-by-click="true" -->
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<div>
<script> var ctx = "\/"; var lockscreen = null; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
<a id="scroll-up" href="javascript:;" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script src="/js/jquery.min.js?v=3.6.3"></script>
<script src="/js/bootstrap.min.js?v=3.3.7"></script>
<!-- bootstrap-table 表格插件 -->
<script src="/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=1.22.6"></script>
<script src="/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=1.22.6"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="/ajax/libs/validate/jquery.validate.min.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/jquery.validate.extend.js?v=1.19.3"></script>
<script src="/ajax/libs/validate/messages_zh.js?v=1.19.3"></script>
<!-- bootstrap-table 表格树插件 -->
<script src="/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js?v=1.22.6"></script>
<!-- 遮罩层 -->
<script src="/ajax/libs/blockUI/jquery.blockUI.js?v=2.70.0"></script>
<script src="/ajax/libs/iCheck/icheck.min.js?v=1.0.3"></script>
<script src="/ajax/libs/layer/layer.min.js?v=3.7.0"></script>
<script src="/ajax/libs/layui/layui.min.js?v=2.8.18"></script>
<script src="/ruoyi/js/common.js?v=4.7.9"></script>
<script src="/ruoyi/js/ry-ui.js?v=4.7.9"></script>
</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}];
$(function() {
var options = {
url: prefix + "/sort_list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [
{
field: 'createTime',
title: '入库时间',
formatter: function(value, row, index) {
// 假设value是一个标准的日期时间字符串
if (value) {
// 解析日期时间字符串并格式化为仅显示日期部分
var date = new Date(value);
// 使用JavaScript的Date对象方法来格式化日期
// 注意这里使用了简单的拼接来格式化日期您也可以使用更复杂的库如moment.js来格式化日期
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0');
}
return value; // 如果value为空或不是有效的日期时间字符串则直接返回原始值
}
},
{
field : 'batchCode',
title : '批次码'
},
{
field: 'recordCount',
title: '数量',
formatter: function(value, row, index) {
console.log('Record Count Value:', value); // 在控制台打印数量值
return value;
}
},
// {
// // field: 'status',
// // title: '用户状态',
// // align: 'center',
// formatter: function(value, row, index) {
// 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);
});
initChildTable = function(index, row, $detail) {
var batchCode = row.batchCode;
var childTable = $detail.html('<table </table>').find('table');
$(childTable).bootstrapTable({
url: prefix + "/sort_BatchCode",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
// pagination: true, // 开启分页功能
// pageSize: 10, // 设置每页显示的记录数
// pageList: [10, 25, 50, 100], // 设置可供选择的每页显示的记录数
// queryParams : {
// userName: '轮挡入库分类记录'
// },
queryParams: function(params) {
// 在queryParams中添加批次码参数
return {
batchCode: batchCode, // 将批次码添加到查询参数中
// limit: params.limit,
// offset: params.offset,
// sort: params.sort,
// order: params.order,
// 可以根据需要添加其他查询参数
};
},
columns: [
// {
// checkbox: true
// },
{
title: '序号',
formatter: function (value, row, index) {
return index+1
}
},
{
field: 'objid',
title: '主键',
visible: false
},
{
field: 'epcCode',
title: 'RFID编码'
},
// {
// field: 'batchCode',
// title: '批次码'
// },
{
field: 'recordCount',
title: '数量',
visible: false
},
{
field: 'locationCode',
title: '库位码'
},
{
field: 'manufacturerName',
title: '厂家'
},
{
field: 'createBy',
title: '入库人'
},
// {
// field: 'createTime',
// title: '入库时间'
// },
/* {
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
});
};
</script>
</body>
</html>
Loading…
Cancel
Save