Commit e80734bbc719e675ac2f02c92e3178e6d7a3f5d2
1 parent
15c8263e
add 盘点文件
Showing
1 changed file
with
378 additions
and
0 deletions
src/main/resources/templates/inventory/cycleCountHeader/cyclecountHeader.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<style> | |
6 | + #toolbar1 { | |
7 | + display: inline-block; | |
8 | + /*position: absolute; | |
9 | + margin: 10px auto;*/ | |
10 | + line-height: 34px; | |
11 | + } | |
12 | +</style> | |
13 | +<body class="gray-bg"> | |
14 | +<div class="container-div"> | |
15 | + <div class="row"> | |
16 | + <div class="col-sm-12 select-info"> | |
17 | + <ul id="myTab" class="nav nav-tabs"> | |
18 | + <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li> | |
19 | + <li><a href="#tabDetail" data-toggle="tab">明细</a></li> | |
20 | + </ul> | |
21 | + <div id="myTabContent" class="tab-content"> | |
22 | + <div class="tab-pane fade in active" id="tabHeader"> | |
23 | + <div class="col-sm-12 select-info"> | |
24 | + <form id="cycleHeader-form"> | |
25 | + <div class="select-list"> | |
26 | + <ul> | |
27 | + <li> | |
28 | + 盘点主单ID:<input type="text" name="id"/> | |
29 | + </li> | |
30 | + <li> | |
31 | + 源盘点单号:<input type="text" name="sourceCode"/> | |
32 | + </li> | |
33 | + <li> | |
34 | + 盘点单编码:<input type="text" name="code"/> | |
35 | + </li> | |
36 | + <li> | |
37 | + 原始盘点ID:<input type="text" name="countOrderId"/> | |
38 | + </li> | |
39 | + <li> | |
40 | + 盘点单类型:<select name="countType" | |
41 | + th:with="firstStatus=${@dict.getType('cyclecountType')}"> | |
42 | + <option value="">所有</option> | |
43 | + <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" | |
44 | + th:value="${e['dictValue']}"></option> | |
45 | + </select> | |
46 | + </li> | |
47 | + <li> | |
48 | + 盘点单状态:<select name="statusCyc" | |
49 | + th:with="lastStatus=${@dict.getType('cyclecountStatus')}"> | |
50 | + <option value="">所有</option> | |
51 | + <option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}" | |
52 | + th:value="${e['dictValue']}"></option> | |
53 | + </select> | |
54 | + </li> | |
55 | + <li class="time"> | |
56 | + <label>创建时间: </label> | |
57 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" | |
58 | + name="createdBegin"/> | |
59 | + <span>-</span> | |
60 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" | |
61 | + name="createdEnd"/> | |
62 | + </li> | |
63 | + <li> | |
64 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i | |
65 | + class="fa fa-search"></i> 搜索</a> | |
66 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
67 | + </li> | |
68 | + </ul> | |
69 | + </div> | |
70 | + </form> | |
71 | + </div> | |
72 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
73 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
74 | + shiro:hasPermission="inventory:cycleCountHeader:add"> | |
75 | + <i class="fa fa-plus"></i> 新增 | |
76 | + </a> | |
77 | + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
78 | + shiro:hasPermission="inventory:cycleCountHeader:remove"> | |
79 | + <i class="fa fa-trash-o"></i> 删除 | |
80 | + </a>--> | |
81 | + </div> | |
82 | + <table id="bootstrap-table" data-mobile-responsive="true" | |
83 | + class="table table-bordered table-hover text-nowrap"></table> | |
84 | + </div> | |
85 | + <div class="tab-pane fade" id="tabDetail"></div> | |
86 | + </div> | |
87 | + </div> | |
88 | + | |
89 | + </div> | |
90 | +</div> | |
91 | +<div th:include="include :: footer"></div> | |
92 | +<script th:inline="javascript"> | |
93 | + var reportFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:report')}]]; | |
94 | + //var editFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:edit')}]]; | |
95 | + var removeFlag = [[${@permission.hasPermi('inventory:cycleCount:remove')}]]; | |
96 | + var prefix = ctx + "inventory/cycleCountHeader"; | |
97 | + var datas = [[${@dict.getType('sys_normal_disable')}]]; | |
98 | + var types = [[${@dict.getType('cyclecountType')}]]; | |
99 | + var preference = [[${@cycleCountPreferenceService.selectCycleCountPreferenceList()}]]; | |
100 | + var cyclecountStatus = [[${@dict.getType('cyclecountStatus')}]]; | |
101 | + var ifs = [[${@dict.getType('false_and_true')}]]; | |
102 | + var addDifference = [[${@dict.getType('inventory:cyclecountHead:addAdjust')}]]; | |
103 | + $(function () { | |
104 | + var options = { | |
105 | + url: prefix + "/list", | |
106 | + createUrl: prefix + "/add", | |
107 | + updateUrl: prefix + "/edit/{id}", | |
108 | + removeUrl: prefix + "/remove", | |
109 | + modalName: "盘点单主", | |
110 | + sortName: "created", | |
111 | + sortOrder: "desc", | |
112 | + search: false, | |
113 | + | |
114 | + // onDblClickRow: function (row) { | |
115 | + // showDetail(row.id,row.code); | |
116 | + // }, | |
117 | + onDblClickRow:function(row){ | |
118 | + detail(row.id,row.masterCode); | |
119 | + }, | |
120 | + columns: [{ | |
121 | + checkbox: true | |
122 | + }, | |
123 | + { | |
124 | + field: 'id', | |
125 | + title: 'ID', | |
126 | + sortable: true | |
127 | + }, | |
128 | + { | |
129 | + field: 'code', | |
130 | + title: '盘点单编码' | |
131 | + }, | |
132 | + { | |
133 | + field: 'warehouseCode', | |
134 | + title: '仓库', | |
135 | + visible: false | |
136 | + }, | |
137 | + /*{ | |
138 | + field: 'companyCode', | |
139 | + title: '货主编码' | |
140 | + },*/ | |
141 | + { | |
142 | + field: 'round', | |
143 | + title: ' 盘点轮次', | |
144 | + visible: false | |
145 | + }, | |
146 | + { | |
147 | + field: 'sourceCode', | |
148 | + title: '源盘点单' | |
149 | + }, | |
150 | + | |
151 | + { | |
152 | + field: 'countOrderId', | |
153 | + title: '原始盘点内部号' | |
154 | + }, | |
155 | + | |
156 | + { | |
157 | + field: 'totalLocs', | |
158 | + title: '总货位数' | |
159 | + }, | |
160 | + { | |
161 | + field: 'totalItems', | |
162 | + title: '总物料数' | |
163 | + }, | |
164 | + { | |
165 | + field: 'zoneCode', | |
166 | + title: '指定区域', | |
167 | + visible: false | |
168 | + }, | |
169 | + { | |
170 | + field: 'locationFilter', | |
171 | + title: '库位条件(模糊)', | |
172 | + visible: false | |
173 | + }, | |
174 | + { | |
175 | + field: 'releasedBy', | |
176 | + title: '释放人', | |
177 | + visible: false | |
178 | + }, | |
179 | + { | |
180 | + field: 'releasedAt', | |
181 | + title: '释放时间', | |
182 | + visible: false | |
183 | + }, | |
184 | + { | |
185 | + field: 'closedBy', | |
186 | + title: '关闭人', | |
187 | + visible: false | |
188 | + }, | |
189 | + { | |
190 | + field: 'closedAt', | |
191 | + title: '关闭时间', | |
192 | + visible: false | |
193 | + }, | |
194 | + { | |
195 | + field: 'countType', | |
196 | + title: '盘点单类型', | |
197 | + align: 'center', | |
198 | + formatter: function (value, row, index) { | |
199 | + return $.table.selectDictLabel(types, value); | |
200 | + }, | |
201 | + sortable: true | |
202 | + }, | |
203 | + | |
204 | + { | |
205 | + field: 'preferenceCode', | |
206 | + title: '盘点方式', | |
207 | + align: 'center', | |
208 | + formatter: function(value, row, index) { | |
209 | + var actions = []; | |
210 | + $.each(preference, function(index, dict) { | |
211 | + if (dict.code == value) { | |
212 | + actions.push("<span class='badge badge-info'>" + dict.name + "</span>"); | |
213 | + return false; | |
214 | + } | |
215 | + }); | |
216 | + return actions.join(''); | |
217 | + }, | |
218 | + visible: false | |
219 | + }, | |
220 | + | |
221 | + { | |
222 | + field: 'statusCyc', | |
223 | + title: '盘点主单状态', | |
224 | + formatter: function(value, row, index) { | |
225 | + return $.table.selectDictLabel(cyclecountStatus, value); | |
226 | + }, | |
227 | + visible: true | |
228 | + }, | |
229 | + { | |
230 | + field: 'verifyBy', | |
231 | + title: '审核人', | |
232 | + visible: false | |
233 | + }, | |
234 | + { | |
235 | + field: 'uploadTime', | |
236 | + title: '上传时间', | |
237 | + visible: false | |
238 | + }, | |
239 | + { | |
240 | + field: 'uploadStatus', | |
241 | + title: '上传状态', | |
242 | + align: 'center', | |
243 | + formatter: function (value, row, index) { | |
244 | + return $.table.selectDictLabel(ifs, value); | |
245 | + } | |
246 | + }, | |
247 | + { | |
248 | + field: 'version', | |
249 | + title: '数据版本', | |
250 | + visible: false | |
251 | + }, | |
252 | + { | |
253 | + field: 'created', | |
254 | + title: '创建时间', | |
255 | + formatter: function (created, row, index) { //去除时间中间的T | |
256 | + return created.replace("T", " "); | |
257 | + } | |
258 | + }, | |
259 | + { | |
260 | + field: 'createdBy', | |
261 | + title: '创建用户' | |
262 | + }, | |
263 | + { | |
264 | + field: 'lastUpdated', | |
265 | + title: '更新时间', | |
266 | + formatter: function (lastUpdated, row, index) { //去除时间中间的T | |
267 | + return lastUpdated.replace("T", " "); | |
268 | + } | |
269 | + }, | |
270 | + { | |
271 | + field: 'lastUpdatedBy', | |
272 | + title: '更新用户' | |
273 | + }, | |
274 | + { | |
275 | + field: 'enable', | |
276 | + title: '是否有效', | |
277 | + align: 'center', | |
278 | + formatter: function (value, row, index) { | |
279 | + return $.table.selectDictLabel(datas, value); | |
280 | + } | |
281 | + }, | |
282 | + { | |
283 | + field: 'remark', | |
284 | + title: '备注', | |
285 | + visible: true | |
286 | + }, | |
287 | + // { | |
288 | + // field : 'userDef1', | |
289 | + // title : '', | |
290 | + // visible: false | |
291 | + // }, | |
292 | + // { | |
293 | + // field : 'userDef2', | |
294 | + // title : '自定义字段2' | |
295 | + // }, | |
296 | + // { | |
297 | + // field : 'userDef3', | |
298 | + // title : '自定义字段3' | |
299 | + // }, | |
300 | + { | |
301 | + title: '操作', | |
302 | + align: 'center', | |
303 | + formatter: function (value, row, index) { | |
304 | + var actions = []; | |
305 | + //actions.push('<a class="btn btn-success btn-xs ' + reportFlag + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); | |
306 | + if(row.statusCyc == 105){ | |
307 | + actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="goDifference(\'' + row.id + '\')"><i class="fa fa-plus"></i>生成调整单</a> '); | |
308 | + } | |
309 | + //actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
310 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> '); | |
311 | + return actions.join(''); | |
312 | + } | |
313 | + }] | |
314 | + }; | |
315 | + $.table.init(options); | |
316 | + $("#myTab li:eq(1)").click(function () { | |
317 | + // var cyc_id = $("#bootstrap-table tr:eq(1) td:eq(1)").text(); | |
318 | + // var cyc_code = $("#bootstrap-table tr:eq(1) td:eq(2)").text(); | |
319 | + detail(); | |
320 | + }); | |
321 | + }); | |
322 | + | |
323 | + function detail(id,code) { | |
324 | + let url = ctx + "inventory/cycleCountDetail"; | |
325 | + if(code != null && code != "" && code != undefined ){ | |
326 | + url = ctx + "inventory/cycleCountDetail/cycleCountHead?cycleCountHeadCode=" + code; | |
327 | + }else{ | |
328 | + url = ctx + "inventory/cycleCountDetail/cycleCountHead?cycleCountHeadCode=" + ""; | |
329 | + } | |
330 | + $("#tabDetail").children().remove(); | |
331 | + $("#myTab li").removeClass("active"); | |
332 | + var height = $(document).height() - 100 + 'px'; | |
333 | + var str = '<iframe class="huaheng_iframe" name="iframe" width="100%" height="' + height + '" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>'; | |
334 | + $("#tabDetail").empty(); | |
335 | + $("#tabDetail").append(str); | |
336 | + $(".tab-pane").removeClass("in active"); | |
337 | + $("#myTab li:eq(1)").addClass("active"); | |
338 | + $("#tabDetail").addClass("in active"); | |
339 | + } | |
340 | + | |
341 | + //盘点单打印 | |
342 | + function cyclecountPrint(id) { | |
343 | + var url = prefix + "/report/" + id; | |
344 | + $.modal.open("盘点单打印", url); | |
345 | + } | |
346 | + | |
347 | + //生成差异调整单 | |
348 | + function goDifference(id) { | |
349 | + var url = prefix + "/goAdjust"; | |
350 | + var data = {"id": id}; | |
351 | + postInner(url, data); | |
352 | + } | |
353 | + | |
354 | + function postInner(url, data) { | |
355 | + $.modal.loading("正在处理中,请稍后..."); | |
356 | + $.ajax({ | |
357 | + url: url, | |
358 | + type: "post", | |
359 | + data: data, | |
360 | + success: function (result) { | |
361 | + if (result.code == web_status.SUCCESS) { | |
362 | + $.modal.msgSuccess(result.msg); | |
363 | + //update(); | |
364 | + $("button [name = 'refresh']").click(); //点击事件成功后刷新 | |
365 | + } else { | |
366 | + $.modal.alertError(result.msg); | |
367 | + } | |
368 | + $.modal.closeLoading(); | |
369 | + } | |
370 | + }) | |
371 | + } | |
372 | + | |
373 | + | |
374 | + | |
375 | + | |
376 | +</script> | |
377 | +</body> | |
378 | +</html> | |
0 | 379 | \ No newline at end of file |
... | ... |