wms_snN7pp_nantong/wms-admin/target/classes/templates/business/goods/goodsModal.html
2024-08-21 10:13:13 +08:00

155 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('物料列表')" />
</head>
<body class="gray-bg">
<input type="hidden" id="rowIds">
<div class="container-div">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>物料编码:</label>
<input type="text" name="goodsId"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="goodsName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "business/goods";
$(function() {
var options = {
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
fixedColumns: true,
fixedNumber: 3,
columns: [{
radio: true
},
{
field: 'goodsId',
title: '物料编码'
},
{
field: 'goodsName',
title: '物料名称',
width: '250px'
},
{
field: 'goodsTypeId',
title: '物料分类'
},
{
field: 'specification',
title: '规格'
},
// {
// field: 'barcode',
// title: '条形码'
// },
// {
// field: 'glength',
// title: '长'
// },
// {
// field: 'gwidth',
// title: '宽'
// },
// {
// field: 'gheight',
// title: '高'
// },
// {
// field: 'gvolume',
// title: '容积'
// },
// {
// field: 'scaleUnit',
// title: '重量单位 '
// },
{
field: 'unit',
title: '物料单位 '
},
// {
// field: 'warnUp',
// title: '库存上限'
// },
// {
// field: 'warnDown',
// title: '库存下限'
// },
{
field: 'period',
title: '保质期'
},
{
field: 'periodunit',
title: '保质期单位'
},
// {
// field: 'recheckdays',
// title: '复检天数'
// },
{
field: 'remark',
title: '备注'
}
// {
// field: 'updateMan',
// title: '更新人'
// },
// {
// field: 'updateDate',
// title: '更新时间'
// }
]
};
$.table.init(options);
});
/* 添加物料-选择物料-提交 */
function submitHandler() {
var rows = $.table.selectFirstColumns();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
alert(rows.join());
}
/* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
function getSelections() {
return $.table.selectFirstColumns();
}
$("#bootstrap-table").on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) {
var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter;
var rowIds = $.table.affectedRowIds(rows);
$("#rowIds").val(rowIds);
});
</script>
</body>
</html>