list.jsp
8.0 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<%@ 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">
<label class="layui-form-label" style="font-size: 15px; font-weight: bold; width: 70px;">项号:</label>
<div class="layui-input-inline">
<input type="text" name="gNo" id="gNo" autocomplete="off" class="layui-input" style="text-transform:uppercase;" onkeyup="this.value=this.value.toUpperCase()"/>
</div>
</div>
<div class="layui-inline">
<div class="layui-inline">
<label class="layui-form-label"
style="font-weight: bold; font-size: 15px; width: 70px;">运单号:</label>
<div class="layui-input-inline">
<input type="text" name="ordersNo" autocomplete="off" class="layui-input" id="ordersNo" />
</div>
</div>
</div>
<div class="layui-inline">
<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" name="entryId" autocomplete="off" class="layui-input" id="entryId" style="text-transform:uppercase;" onkeyup="this.value=this.value.toUpperCase()"/>
</div>
</div>
</div>
<hr class="layui-bg-white">
<div class="layui-inline">
<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" name="tinName" autocomplete="off" class="layui-input" id="tinName" />
</div>
</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="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/statistics/find'
,toolbar: '#toolbar'
,title: '统计查询'
,height: 'full-200'
,cols: [[
{field:'gno', align:'center',title:'项号', width:80 , sort: true}
,{field:'gname', align:'center',title:'品名', width:150}
,{field:'codeTS', title:'商品编码',align:'center', width:110,}
,{field:'qty',align:'center', title:'数量', width:120}
,{field:'netWt', align:'center',title:'净重', width:100}
,{field:'price', align:'center',title:'单价', width:100}
,{field:'total', align:'center',title:'总价', width:100}
,{field:'wqsy', align:'center',title:'物权所有人', width:103}
,{field:'tinName', align:'center',title:'库位', width:100}
,{field:'ordersNo', align:'center',title:'运单号', width:100}
,{field:'entryId', align:'center',title:'报关单号', width:125}
,{field:'startDate', align:'center',title:'时间', width:121,sort:true}
/* ,{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 gNo=$('#gNo').val();
var ordersNo=$('#ordersNo').val();
var entryId=$('#entryId').val();
var flightdate = $('#flightdate').val();
var flag=$('#flag').val();
var tinName=$('#tinName').val();
/* if (flightno) { */
var index = layer.msg('查询中,请稍候...',{icon: 16,time:false,shade:0});
setTimeout(function(){
table.reload('flight', { //表格的id
url:'<%=request.getContextPath()%>/rest/statistics/find',
method:"post",
where: {
'gNo':$.trim(gNo),
'ordersNo':$.trim(ordersNo),
'entryId':$.trim(entryId),
'flag':$.trim(flag),
'tinName':$.trim(tinName),
'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>