Blame view

src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html 13.8 KB
tangying authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
		<div class="row">
            <div class="col-sm-12 select-info">
                <form id="inventory-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                库位编码:<input type="text" name="locationCode"/>
                            </li>
                            <li>
                                容器编码:<input type="text" name="containerCode"/>
                            </li>
                            <li>
xqs authored
19
                                货主:<input type="text" name="companyCode"/>
tangying authored
20
21
                            </li>
                            <li>
xqs authored
22
                                出入库单编码:<input type="text" name="billCode"/>
tangying authored
23
                            </li>
xqs authored
24
tangying authored
25
                            <li>
xqs authored
26
                                物料编码:<input type="text" name="materialCode"/>
tangying authored
27
28
29
30
31
32
33
                            </li>
                            <li>
                                物料名称:<input type="text" name="materialName"/>
                            </li>
                            <li>
                                物料规格:<input type="text" name="materialSpec"/>
                            </li>
xqs authored
34
                            <li>
xqs authored
35
36
37
38
39
40
                                库存状态:
                                <select name="inventorySts" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">
                                    <option value="">所有</option>
                                    <option th:each="e : ${inventoryStatus}" th:text="${e['dictLabel']}"
                                            th:value="${e['dictValue']}"></option>
                                </select>
xqs authored
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
                            </li>
                            <li>
                                供应商编码:<input type="text" name="supplierCode"/>
                            </li>

                            <li>
                                属性号:<input type="text" name="attributeId"/>
                            </li>
                            <li>
                                上游单号:<input type="text" name="referCode"/>
                            </li>
                            <li>
                                批号:<input type="text" name="lot"/>
                            </li>
                            <li>
                                批次:<input type="text" name="batch"/>
                            </li>
                            <li>
                                项 目 号:<input type="text" name="projectNo"/>
                            </li>
                            <li>
                                交易类型:<select name="type" th:with="type=${@dict.getType('inventoryTransactionType')}">
                                <option value="">所有</option>
                                <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
                            </select>
                            </li>
tangying authored
68
69
70
71
72
73
74
75
                            <li class="time">
                                <label>创建时间: </label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
xqs authored
76
                                <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="general:inventoryHeader:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
tangying authored
77
78
79
80
81
82
83
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-info">
                <div class="btn-group hidden-xs" id="toolbar" role="group">
84
85
                    <a class="btn btn-outline btn-success btn-rounded" onclick="report()"
                       shiro:hasPermission="inventory:inventoryTransaction:report">
tangying authored
86
87
88
89
90
91
92
93
94
                        <i class="fa fa-plus"></i> 打印
                    </a>
                </div>
                <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
            </div>
         </div>
     </div>
     <div th:include="include :: footer"></div>
     <script th:inline="javascript">
xqs authored
95
         var editFlag = [[${@permission.hasPermi('inventoryHeader:inventoryTransaction:edit')}]];
tangying authored
96
         var prefix = ctx + "inventory/inventoryTransaction";
97
         var inventoryStatus=[[${@dict.getType('inventorySts')}]];
tangying authored
98
99
100
         var inventoryTransactionType = [[${@dict.getType('inventoryTransactionType')}]];
         $(function() {
             $("#bootstrap-table").bootstrapTable({
xqs authored
101
                 url: prefix + "/inventoryTransactionList",
tangying authored
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
                 modalName: "库存交易",
                 method:"post",
                 contentType: "application/x-www-form-urlencoded",
                 search: false,
                 showRefresh: true, //刷新
                 showToggle:true, //视图切换
                 showColumns:true, //列选择
                 clickToSelect: true,
                 sortable: true,                                     // 是否启用排序
                 sortStable: true,                                   // 设置为 true 将获得稳定的排序
                 sortName: "id",
                 sortOrder: "desc",
                 showExport: true, //导出
                 exportDataType: "selected",                        //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
                 pagination:true,
                 pageNumber: 1,                                      // 初始化加载第一页,默认第一页
                 pageSize: 10,                                       // 每页的记录行数(*)
                 pageList: [10, 25, 50],                             // 可供选择的每页的行数(*)
                 iconSize: 'outline',                                // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
                 toolbar: '#toolbar',                                // 指定工作栏
                 // sidePagination: "server",                           // 启用服务端分页
                 columns: [{
                     checkbox: true
                 },
                     {
                         field : 'id',
128
                         title : 'ID'
tangying authored
129
130
131
132
133
134
                     },
                     {
                         field : 'locationCode',
                         title : '库位编号'
                     },
                     {
135
136
                         field : 'containerCode',
                         title : '容器编号'
tangying authored
137
                     },
138
tangying authored
139
                     {
140
                         field : 'transactionType',
tangying authored
141
142
143
144
145
146
147
                         title : '交易类型',
                         formatter: function(value, row, index) {
                             return $.table.selectDictLabel(inventoryTransactionType, value);
                         }
                     },
                     {
                         field : 'companyCode',
148
149
150
151
152
153
154
                         title : '货主编码',
                         visible:true
                     },
                     {
                         field : 'supplierCode',
                         title : '供应商',
                         visible:true
tangying authored
155
156
157
                     },
                     {
                         field : 'materialCode',
158
                         title : '物料编码'
tangying authored
159
160
161
162
163
164
165
166
167
168
                     },
                     {
                         field : 'materialName',
                         title : '物料名称'
                     },
                     {
                         field : 'materialSpec',
                         title : '物料规格'
                     },
                     {
169
170
                         field : 'materialUnit',
                         title : '物料单位'
tangying authored
171
172
173
174
175
                     },
                     {
                         field : 'billCode',
                         title : '出入库单号'
                     },
176
                     {
tangying authored
177
                          field : 'billDetailId',
178
179
                          title : '出入库明细ID',
                          visible:false
180
                      },
tangying authored
181
                     {
182
183
184
185
                         field : 'taskQty',
                         title : '任务数量'
                     },
                     {
tangying authored
186
                         field : 'batch',
187
188
                         title : '批次',
                         visible:false
tangying authored
189
190
191
                     },
                     {
                         field : 'lot',
192
193
                         title : '批号',
                         visible:false
tangying authored
194
195
                     },
                     {
196
                         field : 'projectNo',
197
198
                         title : '项目号',
                         visible:true
tangying authored
199
200
                     },
                     {
201
202
203
204
205
206
207
208
209
210
                         field : 'referCode',
                         title : '上游单号'
                     },
                     {
                         field : 'referDetailId',
                         title : '上游单号明细ID',
                         visible:false
                     },
                     {
                         field : 'qcCheck',
211
212
                         title : '质检',
                         visible:false
213
214
215
216
217
218
219
                     },
                     {
                         field : 'weight',
                         title : '重量'
                     },

                     {
tangying authored
220
221
222
223
224
225
226
227
228
229
                         field : 'manufactureDate',
                         title : '生产日期'  ,
                         visible:false
                     },
                     {
                         field : 'expirationDate',
                         title : '失效日期'  ,
                         visible:false
                     },
                     {
230
                         field : 'inventorySts',
tangying authored
231
232
233
234
235
236
                         title : '库存状态' ,
                         align: 'center',
                         formatter: function(value, row, index) {
                             return $.table.selectDictLabel(inventoryStatus, value);
                         }
                     },
237
tangying authored
238
                     {
239
240
                         field : 'created',
                         title : '交易时间',
241
                         sortable:true
tangying authored
242
243
                     },
                     {
244
245
                         field : 'createdBy',
                         title : '创建用户'
tangying authored
246
247
                     },
                     {
248
                         field : 'attributeId',
xqs authored
249
                         title : '属性号',
250
                         visible:true
tangying authored
251
252
                     },
                     {
253
254
                         field : 'attribute1',
                         title : '属性1',
tangying authored
255
256
257
                         visible:false
                     },
                     {
258
259
260
                         field : 'attribute2',
                         title : '属性2',
                         visible:false
tangying authored
261
262
                     },
                     {
263
264
265
                         field : 'attribute3',
                         title : '属性3',
                         visible:false
tangying authored
266
267
                     },
                     {
268
269
270
                         field : 'attribute4',
                         title : '属性4',
                         visible:false
tangying authored
271
272
                     },
                     {
273
274
275
276
277
278
279
280
                         field : 'lockCode',
                         title : '交易锁',
                         visible:false
                     },
                     {
                         field : 'processStamp',
                         title : '处理标记',
                         visible:false
tangying authored
281
282
283
                     },
                     // {
                     // 	field : 'userDef1',
284
285
                     // 	title : '自定义字段1',
                     //     visible:false
tangying authored
286
287
288
                     // },
                     // {
                     // 	field : 'userDef2',
289
290
                     // 	title : '自定义字段2',
                     //     visible:false
tangying authored
291
292
293
                     // },
                     // {
                     // 	field : 'userDef3',
294
295
                     // 	title : '自定义字段3',
                     //     visible:false
tangying authored
296
297
298
299
300
                     // },
                 ]
             });

             $.ajax({
301
                 url:prefix+'/inventoryTransactionList',
tangying authored
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
                 type:"post",
                 success:function (value) {
                     $("#bootstrap-table").bootstrapTable('load',value.data);
                 }
             })

         });

         function report() {
             var rows=$("#bootstrap-table").bootstrapTable('getSelections');
             if (rows.length == 0) {
                 $.modal.alertWarning("请至少选择一条记录");
                 return;
             }
             var ids = "";
             for(var i=0; i<rows.length; i++) {
                 ids = ids + rows[i].id + ","
             }
             let url=prefix+'/report/' + ids;
             $.modal.open("打印",url);
         }
     </script>
 </body>
 </html>