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.
101 lines
3.8 KiB
101 lines
3.8 KiB
|
3 years ago
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<title>layui</title>
|
||
|
|
<meta name="renderer" content="webkit">
|
||
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
|
|
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
|
||
|
|
<link rel="stylesheet" href="/static/css/public.css" media="all">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="layui-bg-gray">
|
||
|
|
<fieldset class="layui-elem-field layui-field-title" style="padding: 10px;">
|
||
|
|
<legend>我的申请</legend>
|
||
|
|
</fieldset>
|
||
|
|
<table class="layui-table">
|
||
|
|
<colgroup>
|
||
|
|
<col width="25%">
|
||
|
|
<col width="25%">
|
||
|
|
<col width="25%">
|
||
|
|
<col width="25%">
|
||
|
|
</colgroup>
|
||
|
|
<tbody id="LAY_floor">
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
|
||
|
|
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
|
||
|
|
<script>
|
||
|
|
var data;
|
||
|
|
//先声明
|
||
|
|
function openDetail(data){};
|
||
|
|
layui.use(['flow','layer', 'flow','util'], function () {
|
||
|
|
var $ = layui.jquery,
|
||
|
|
layer=layui.layer,
|
||
|
|
flow = layui.flow,
|
||
|
|
util=layui.util;
|
||
|
|
let size=8;
|
||
|
|
let pre=0;
|
||
|
|
flow.load({
|
||
|
|
elem: '#LAY_floor' //流加载容器
|
||
|
|
,scrollElem: '#LAY_floor' //滚动条所在元素,一般不用填,此处只是演示需要。
|
||
|
|
,isAuto:false
|
||
|
|
,done: function(page, next){ //执行下一页的回调
|
||
|
|
let lis = [];
|
||
|
|
let result;
|
||
|
|
$.get('/depositoryRecord/myApply?page='+page+'&size='+size, function(res){
|
||
|
|
result=res.data;
|
||
|
|
for (let i=0;i<result.length;i++){
|
||
|
|
if (i%4===0){
|
||
|
|
lis.push('<tr>');
|
||
|
|
}
|
||
|
|
lis.push('<td><div class="layui-card my-shadow my-card flow1" onclick="openDetail('
|
||
|
|
+result[i].id+')"><div class="layui-card-header"><h2>'
|
||
|
|
+result[i].applicantName+'的')
|
||
|
|
if (result[i].type===1){
|
||
|
|
lis.push('入库请求</h2></div>');
|
||
|
|
}else {
|
||
|
|
lis.push('出库请求</h2></div>');
|
||
|
|
}
|
||
|
|
lis.push('<div class="layui-card-body">'+result[i].applyRemark
|
||
|
|
+'</div><div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">'
|
||
|
|
+result[i].applyTime+'</div></div></td>');
|
||
|
|
if (i%4===3){
|
||
|
|
lis.push('</tr>');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if (result.length%4!==0){
|
||
|
|
lis.push('</tr>');
|
||
|
|
}
|
||
|
|
pre+=result.length;
|
||
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
|
||
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
|
||
|
|
next(lis.join(''), pre < res.count);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
openDetail = function (item) {
|
||
|
|
var index = layer.open({
|
||
|
|
title: '请求详情',
|
||
|
|
type: 2,
|
||
|
|
shade: 0.2,
|
||
|
|
maxmin: true,
|
||
|
|
shadeClose: true,
|
||
|
|
area: ['100%', '100%'],
|
||
|
|
content: '/form_step_look?id='+item,
|
||
|
|
});
|
||
|
|
$(window).on("resize", function () {
|
||
|
|
layer.full(index);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
</html>
|