list.jsp
5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>报关单管理列表</title>
<%-- <link href="<%=basePath %>static/css/login.css" rel="stylesheet"> --%>
<%-- <link rel="stylesheet" href="<%=basePath %>/static/css/main.css" /> --%>
<script src="<%=request.getContextPath()%>/resource/library/easyui/jquery.min.js"></script>
<link href="<%=request.getContextPath()%>/resource/library/layui2.4.5/css/layui.css" rel="stylesheet">
<script src="<%=request.getContextPath()%>/resource/library/layui2.4.5/layui.js"></script>
<style>
body{
/* margin: 10px; */
/* text-align: center; */
}
</style>
</head>
<body>
<input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>">
<input type="hidden" name="flag" value="">
<input type="hidden" id="startTime" value="">
<input type="hidden" id="endTime" value="">
<blockquote class="layui-elem-quote" align="left">报关单查询列表</blockquote>
<div>
<div class="layui-inline">
<label class="layui-form-label"
style="font-weight: bold; font-size: 15px; width: 80px;">日期段:</label>
<div class="layui-input-inline">
<input type="text" autocomplete="off" class="layui-input" id="flightdate" name="flightdate" placeholder=" - "/>
</div>
</div>
<div class="layui-inline">
<div class="layui-inline">
<label class="layui-form-label"
style="font-weight: bold; font-size: 15px; width:90px;">进出库类别:</label>
<div class="layui-input-inline">
<form class="layui-form">
<select name="flag" id="flag">
<option value="">请选择</option>
<option value="0">进库</option>
<option value="1">出库</option>
</select>
</form>
</div>
</div>
</div>
<div class="layui-inline">
<button class="layui-btn" lay-submit="" id="searchBtn" data-type="getInfo" margin-left:15px> 查询</button>
</div>
</div>
<!-- <button class="layui-btn" lay-submit="" id="searchBtn" data-type="getInfo">查询</button> -->
</div>
<hr>
<blockquote class="layui-elem-quote" align="left">明细</blockquote>
<div class="layui-inline" >
<table class="layui-hide" id="flight" lay-filter="flight" style="width:99%; text-align="center"></table>
</div>
<script>
layui.use('table', function(){
var table = layui.table;
table.render({
elem: '#flight'
,url:'<%=request.getContextPath()%>/rest/manifest/find'
,toolbar: '#toolbar'
,title: '统计查询'
,height: 'full-200'
,cols: [[
{type: 'checkbox', fixed: 'left'}
,{field:'entryId', align:'center',title:'报关单号', width:200,sort:true}
,{field:'flag', align:'center',title:'进出库标识', width:125}
,{field:'startDate', align:'center',title:'时间', width:200,sort:true}
,{field:'count', align:'center',title:'总报关单数', width:110 ,templet: function(d){
debugger;
var text = d.LAY_INDEX;
if(text==1){
return d.count
}else{
return ' '
}
}}
/* ,{fixed: 'right', title:'操作',align:'center', toolbar: '#barDemo', width:300} */
]]
});
$('#searchBtn').on('click',function(){
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
// 点击获取数据
var active = {
getInfo: function () {
var flightdate = $('#flightdate').val();
var flag=$('#flag').val();
/* if (flightno) { */
var index = layer.msg('查询中,请稍候...',{icon: 16,time:false,shade:0});
setTimeout(function(){
table.reload('flight', { //表格的id
url:'<%=request.getContextPath()%>/rest/manifest/find',
method:"post",
where: {
'flag':$.trim(flag),
'flightdate':$.trim(flightdate)
}
});
layer.close(index);
},800);
/* } else {
layer.msg("请输入航班号");
} */
},
};
$("#flightno").bind("keyup", function (e) {
if (e.keyCode == 13) {
var type = "getInfo";
active[type] ? active[type].call(this) : '';
}
});
});
</script>
<script type="text/javascript">
layui.use(['form', 'laydate'], function(){
var form = layui.form
,laydate = layui.laydate;
//日期
laydate.render({
elem: '#flightdate'
,range: true
,done: function(value, date, endDate){
StartTime = dateToStringForLayui(date);
$("#startTime").val(StartTime);
EndTime = dateToStringForLayui(endDate);
$("#endTime").val(EndTime);
}
});
form.on('select', function(data){
console.log(data.elem); //得到select原始DOM对象
console.log(data.value); //得到被选中的值]
$("#flag").val(data.value)
console.log(data.othis); //得到美化后的DOM对象
});
});
function dateToStringForLayui(dateObj) {
var FullYear = dateObj.year;
var Month = dateObj.month;
var Day = dateObj.date;
/* var Hours = dateObj.hours;
var Minutes = dateObj.minutes;
var Seconds = dateObj.seconds; */
return FullYear+"-"+Month+"-"+Day/* +" "+Hours+":"+Minutes+":"+Seconds */
}
</script>
</body>
</html>