You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.3 KiB

6 months ago
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="../static/layui/css/layui.css">
<script src="../static/layui/layui.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>库存管理</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo "><i class="layui-icon layui-icon-cart"></i>库存管理系统</div>
<!-- 头部区域可配合layui已有的水平导航 -->
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item" ><a href="/index/"><i class="layui-icon layui-icon-table"></i>库存管理</a></li>
<li class="layui-nav-item"><a href="/count/"><i class="layui-icon layui-icon-rmb"></i>预算统计</a></li>
<li class="layui-nav-item"><a href="/other/"><i class="layui-icon layui-icon-time"></i>出入库记录</a></li>
</ul>
</div>
<div style="padding: 5%;">
<!-- 内容主体区域 -->
<table class="layui-hide" id="record"></table>
<script type="text/html" id="toolbarDemo"></script>
</div>
</div>
<script>
layui.use('table', function () {
var table = layui.table;
table.render({
elem: '#record'
, url:'/data/records/'
, toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
, defaultToolbar: ['filter', 'exports', 'print',]
, title: '记录数据表'
, cols: [[
{ field: 'time', title: '时间', width: 160, fixed: 'left', sort: true ,templet:function (d) {
return layui.util.toDateString(d.time);
}}
, { field: 'name', title: '品名', width: 200, sort: true }
, { field: 'model', title: '型号', width: 200, sort: true }
, { field: 'factory', title: '厂家', width: 200, sort: true }
, { field: 'process', title: '用途', width: 100, sort: true }
, { field: 'inorout', title: '出/入库', width: 100, sort: true }
, { field: 'change', title: '数量', width: 150 }
, { field: 'people', title: '操作人员', width: 150 }
]]
, page: true
,limit:50
,skin: 'row'
,even: true
,height: 'full-120'
});
});
</script>
</body>
</html>