kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"
    xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
<head></head>
<ui:composition>
    <h:form id="warehouseReagentUseForm">
        <p:panel styleClass="center-header">
            <p:outputLabel styleClass="title" value="仓库库存管理 > 订单领用"></p:outputLabel>
        </p:panel>
        <p:panel styleClass="center-body">
            <p:panel styleClass="apply-mng-new-body">
                <p:panelGrid styleClass="info grid-padding-bottom2" columns="10">
                    <p:outputLabel value="申领人:"></p:outputLabel>
 
                    <p:autoComplete value="#{warehouseStockMngController.userId}" completeMethod="#{warehouseStockMngController.getUserSelectList}"
                                    var="item"
                                    dropdown="true"
                                    styleClass="apply-user-autocomplete"
                                    itemLabel="#{!empty warehouseStockMngController.userId?warehouseStockMngController.getSelectedUserById(warehouseStockMngController.userId).name : ' '}"
                                    itemValue="#{item.id}" forceSelection="true">
                        <p:ajax event="itemSelect" listener="#{warehouseStockMngController.resetLaboratory()}" process="@this" update="@this,experments,stacks" />
                        <p:column>
                            <h:outputText value="#{item.name}" />
                        </p:column>
                    </p:autoComplete>
 
                    <p:outputLabel value="实验室:" style="margin-left: 20px"></p:outputLabel>
                    <p:selectOneMenu value="#{warehouseStockMngController.laboratoryId}"
                         id="experments">
                        <f:selectItems value="#{warehouseStockMngController.laboratory}"
                            var="item" itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems>
                        <f:ajax listener="#{warehouseStockMngController.resetLaboratoryContainers}" render="stacks"/>
                    </p:selectOneMenu>
                    <p:outputLabel value="实验室试剂柜:"></p:outputLabel>
                    <p:selectOneMenu value="#{warehouseStockMngController.laboratoryContainerId}" id="stacks"
                        >
                        <f:selectItems value="#{warehouseStockMngController.laboratoryContainers}"
                            var="item" itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems>
                    </p:selectOneMenu>
                </p:panelGrid>
 
                <p:panel styleClass="btn">
                    <p:commandButton value="返回" process="@this" update=":centerRootPanel"
                        actionListener="#{warehouseStockMngController.onCancelBtnClick}"
                        styleClass="cancel-btn"></p:commandButton>
                    <p:commandButton value="重置" process="@this" update="@form"
                        actionListener="#{warehouseStockMngController.onResetBtnClick}"
                        styleClass="reset-btn"></p:commandButton>
                    <p:commandButton value="保存" process="@form" update=":centerRootPanel"
                        actionListener="#{warehouseStockMngController.onSaveBtnClickForPerson}"
                        styleClass="save-btn">
                        <p:confirm header="确认" message="确认操作?"></p:confirm>
                    </p:commandButton>
                </p:panel>
            </p:panel>
 
            <p:dataTable id="warehouseReagentUseDataTableForPerson" styleClass="data-table"
                paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
                lazy="true" value="#{warehouseStockMngController.selectedTmpOrderList}" var="row"
                rowKey="#{row.id}" emptyMessage="无数据">
                <p:column headerText="试剂名称">
                    <h:outputText value="#{row.reagent.name}"></h:outputText>
                </p:column>
 
                <p:column headerText="CAS">
                    <h:outputText value="#{row.reagent.cas}"></h:outputText>
                </p:column>
 
                <p:column headerText="厂家">
                    <h:outputText value="#{row.reagent.productHome}"></h:outputText>
                </p:column>
 
                <p:column headerText="规格型号">
                    <h:outputText value="#{row.reagent.reagentFormat}"></h:outputText>
                </p:column>
                <p:column headerText="包装">
                    <h:outputText value="#{row.reagent.mainMetering}"></h:outputText>
                </p:column>
 
                <p:column headerText="批号">
                    <h:outputText value="#{row.articleNumber}"></h:outputText>
                </p:column>
 
                <p:column headerText="申领人">
                    <h:outputText value="#{row.applyUserId}"></h:outputText>
                </p:column>
 
                <p:column headerText="申请数量">
                    <h:outputText value="#{row.num}"></h:outputText>
                </p:column>
 
                <p:column headerText="已领用数量">
                    <h:outputText value="#{row.used}"></h:outputText>
                </p:column>
 
                <p:column headerText="领用数量">
                    <h:outputText value="#{row.selectNum!=null?row.selectNum:0}"></h:outputText>
                </p:column>
 
                <p:column headerText="条形码">
                    <p:commandButton value="操作" styleClass="edit-btn" process="@form"
                        actionListener="#{warehouseStockMngController.onReagentCodeBtnClickForPerson(row)}"
                        update=":reagentCodeDialogForPerson,@(.startReagentCode),@(.endReagentCode)">
                    </p:commandButton>
                </p:column>
            </p:dataTable>
        </p:panel>
    </h:form>
    <p:dialog id="apply-ui" header="领用单" widgetVar="printDialog" appendTo="@(body)" modal="true" resizable="false">
        <div id="printTarget" style="margin-right: -51px;">
            <div style="margin: 25mm 17mm 0mm 15mm; ">
                <h:form id="printDialog" style="width: 1100px">
 
                    <p:outputPanel style="text-align: center;font-size: 17px;font-weight: 700;">#{warehouseStockMngController.printTable['head']}</p:outputPanel>
                    <p:outputPanel style="text-align: center;font-size: 16px;margin: 20px;font-weight: 700;">#{warehouseStockMngController.printTable['title']}</p:outputPanel>
                    <div>
                        <div style="display: flex;flex-direction: row;justify-content: flex-end;width: 1081px;">
                            <div style="width: 98px;">单据编号:</div>
                            <div style="width: 183px;">
<!--                                <input style="border: 0;" value="#{warehouseStockMngController.printTable['receiptNumber']}"/>-->
                                <p:inputText value="#{warehouseStockMngController.receiptNumber}" valueChangeListener="#{warehouseStockMngController.receiptNumberChange}">
                                    <p:ajax event="valueChange" listener="#{warehouseStockMngController.receiptNumberChange()}"  />
                                </p:inputText>
                            </div>
                        </div>
                    </div>
 
                    <div style="margin: 10px 0;">
                        <div style="display: inline-flex;">
                            <div style="width: 100px;margin-left: 10px;">部门:</div>
                            <div style="width: 300px;">#{warehouseStockMngController.printTable['department']}</div>
                        </div>
                        <div style="display: inline-flex;">
                            <div style="width: 100px;">申购人:</div>
                            <div style="width: 200px;padding-top: 1px;">#{warehouseStockMngController.printTable['applyPerson']}</div>
                        </div>
                        <div style="display: inline-flex;float: right;">
                            <div style="width: 100px;">日期:</div>
                            <div style="width: 200px;padding-top: 1px;"><input style="border: 0;" value="#{warehouseStockMngController.printTable['date']}"/></div>
                        </div>
                    </div>
 
                    <div style="margin-bottom: 10px;">
                        <div style="display: inline-flex;">
                            <div style="width: 100px;margin-left: 10px;">课题组:</div>
                            <div style="width: 300px;">#{warehouseStockMngController.printTable['project']}</div>
                        </div>
                        <div style="display: inline-flex;">
                            <div style="width: 100px;">使用地点:</div>
                            <div style="width: 200px;padding-top: 1px;">#{warehouseStockMngController.printTable['lab']}</div>
                        </div>
                        <div style="display: inline-flex;float: right;">
                            <div style="width: 100px;">联系方式:</div>
                            <div style="width: 200px;">
                                <input style="border: 0;" value="#{warehouseStockMngController.printTable['phone']}"/></div>
                        </div>
                    </div>
 
                    <div style="margin-bottom: 20px;">
                        <div style="display: inline-flex;">
                            <div style="width: 100px;margin-left: 10px;">备注</div>
                            <div style="">
                                <p:inputText value="#{warehouseStockMngController.note}" style="width: 950px;">
                                    <p:ajax event="valueChange"   />
                                </p:inputText></div>
                        </div>
                    </div>
 
 
 
 
                    <p:dataTable id="printTB" styleClass="apply-list"
                                 value="#{warehouseStockMngController.printTable['applyList']}" var="row" >
                        <p:column headerText="产品编号" width="150px;" style="text-align: center;">
                            <h:outputText value="#{row.productCode}" />
                        </p:column>
                        <p:column headerText="产品名称" width="150px;" style="text-align: center;">
                            <h:outputText value="#{row.productName}" />
                        </p:column>
 
                        <p:column headerText="管制品" width="100px;" style="text-align: center;">
                            <h:outputText value="#{row.controlProducts}" />
                        </p:column>
 
                        <p:column headerText="规格型号" width="160px;" style="text-align: center;">
                            <h:outputText value="#{row.reagentFormat}" />
                        </p:column>
 
                        <p:column headerText="包装" width="90px;" style="text-align: center;">
                            <h:outputText value="#{row.mainMetering==null?'':row.mainMetering.replace('null','')}" />
                        </p:column>
 
                        <p:column headerText="数量" width="90px;" style="text-align: center;">
                            <h:outputText value="#{row.num}" />
                        </p:column>
 
                        <p:column headerText="备注" width="170px;" style="text-align: center;">
                            <h:outputText value="#{row.memo}" />
                        </p:column>
                    </p:dataTable>
 
                    <div style="display: flex;flex-direction: row;justify-content: space-between;margin-top:20px; ">
                        <div style="margin-left: 94px;">
                            <div style="display: flex;flex-direction: row;justify-content: flex-end;">
                                <div style="width: 100px">出库人:</div>
                                <div style="width: 100px"></div>
                            </div>
                            <div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px; ">
                                <div style="width: 100px">日期:</div>
                                <div style="width: 100px"></div>
                            </div>
 
                        </div>
                        <div style="margin-right: 94px;">
                            <div style="display: flex;flex-direction: row;justify-content: flex-end;">
                                <div style="width: 100px">签收人:</div>
                                <div style="width: 100px"></div>
                            </div>
                            <div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top:10px;">
                                <div style="width: 100px">日期:</div>
                                <div style="width: 100px"></div>
                            </div>
 
                        </div>
                    </div>
 
 
                    <p:panel styleClass="btn  no-print">
                        <p:commandButton value="关闭"
                                         process="@this"
                                         styleClass="yes-btn"
                                         actionListener="#{warehouseStockMngController.closeDialog}"
                                         style="position: relative;left: 20px;"
                                         update=":centerRootPanel"
                                         oncomplete="PF('printDialog').hide()">
                        </p:commandButton>
                        <div style="display: none" id="indirectPrint"></div>
                        <p:commandButton value="打印"
                                         styleClass="yes-btn"
                                         actionListener="#{warehouseStockMngController.associatedFlowReceiptNumber()}"
                                         style="position: relative;left: 20px;"
                                         >
                        </p:commandButton>
 
                        <script type="text/javascript" src="resources/js/print.js"/>
                        <script type="text/javascript">
                            $(function () {
                                $("#indirectPrint").on("click", function () {
                                    jQuery.print('#printTarget')
                                })
                            })
 
 
                        </script>
                    </p:panel>
                </h:form>
            </div>
        </div>
    </p:dialog>
    <p:dialog modal="true" header="领用详情" appendTo="@(body)" id="reagentCodeDialogForPerson"
        widgetVar="reagentCodeDialogForPerson" resizable="false" width="1000" class="ui-dialog">
        <p:tabView dynamic="true" style="margin-left: 26px">
<!--            <p:tab title="补贴条码" id="applyInOrder">-->
<!--                <h:form id="reagentCodeDialogForm2">-->
<!--                    <p:panelGrid styleClass="center-header content2" columns="6">-->
<!--                        <p:column style="width: 60px !important;"><p:outputLabel value="仓库名:"/></p:column>-->
<!--                            <p:selectOneMenu value="#{warehouseStockMngController.opeWarehouseReserve.warehouseId}" >-->
<!--                                    <p:ajax event="change" process="@this" listener="#{warehouseStockMngController.selectChangeReserve(warehouseStockMngController.opeWarehouseReserve.warehouseId)}"-->
<!--                                            update="reserve"/>-->
<!--                                    <f:selectItems value="#{warehouseStockMngController.warehouseReserveList}"-->
<!--                                                   var="item"-->
<!--                                                   itemValue="#{item.warehouseId}"-->
<!--                                                   itemLabel="#{item.warehouseName}"/>-->
<!--                            </p:selectOneMenu>-->
 
 
<!--                            <p:column>-->
<!--                                <p:outputLabel id="reserve"  value="可供库存:" style="width: 100px;">-->
<!--                                    <span style="color: #1c427b;font-weight: bolder;font-size: 20px">#{warehouseStockMngController.opeWarehouseReserve.reserve}</span>-->
<!--                                </p:outputLabel>-->
<!--                            </p:column>-->
 
 
<!--                            <p:outputLabel value="领用数量:" style="width: 80px;"/>-->
<!--                            <p:inputNumber value="#{warehouseStockMngController.useNum}"-->
<!--                                                     minValue="0" decimalPlaces="0"-->
<!--                                                     required="true" requiredMessage="请输入领用数量" id="useNum"/>-->
<!--                            <p:column>-->
<!--                                <p:panel styleClass="btn" style="text-align: right">-->
<!--                              <p:commandButton value="添加"-->
<!--                                               process="@this,useNum"-->
<!--                                               styleClass="yes-btn"-->
<!--                                               actionListener="#{warehouseStockMngController.add2()}"-->
<!--                                               update="@(.reagentCode),endReagentCode"-->
<!--                                               style="position: relative;left: -8px;width: 62px;height: 34px;font-size: 12px;background-color: #ee7135">-->
<!--                              </p:commandButton>-->
<!--                                </p:panel>-->
<!--                            </p:column>-->
<!--                    </p:panelGrid>-->
<!--                    <p:separator style="margin: 15px"/>-->
<!--                    <p:dataTable id="reagentCode" styleClass="reagentCode"-->
<!--                                     paginatorPosition="bottom"-->
<!--                                     lazy="true"-->
<!--                                     value="#{warehouseStockMngController.getDataTmp()}"-->
<!--                                     var="row"-->
<!--                                     rowKey="#{row.id}"-->
<!--                                     scrollable="false"-->
<!--                                     rows="5" pageLinks="5"-->
<!--                                     emptyMessage="无领用数据">-->
 
<!--                            <p:column headerText="操作"  style="text-align: center;">-->
<!--                                <p:commandButton  style="background: #e68280; border: 1px solid #e68280;color: white;" styleClass="store-btn"-->
<!--                                                  value="取消"-->
<!--                                                  actionListener="#{warehouseStockMngController.remove2(row)}"-->
<!--                                                  process="@this"-->
<!--                                                  update="@(.reagentCode),@(.endReagentCode)">-->
<!--                                </p:commandButton>-->
<!--                            </p:column>-->
 
<!--                            <p:column headerText="仓库名" style="text-align: center;">-->
<!--                                <h:outputText value="#{row.warehouseName}" />-->
<!--                            </p:column>-->
<!--                            <p:column headerText="试剂名称"  style="text-align: center;">-->
<!--                                <h:outputText value="#{sysReagentService.getSysReagent(row.reagentId).name}" />-->
<!--                            </p:column>-->
 
<!--                            <p:column headerText="库存"  style="text-align: center;">-->
<!--                                <h:outputText value="#{row.reserve}" />-->
<!--                            </p:column>-->
 
<!--                            <p:column headerText="领用数量" style="text-align: center;">-->
<!--                                <h:outputText value="#{row.useNum}" />-->
<!--                            </p:column>-->
<!--                        </p:dataTable>-->
 
<!--                    <p:panelGrid styleClass="center-header content2" columns="4" id="code" style="margin-top:20px;">-->
 
<!--                        <p:outputLabel value="条形码开始"/>-->
<!--                        <p:inputText id="startReagentCode" styleClass="startReagentCode" value="#{warehouseStockMngController.startReagentCodeForPerson}" maxlength="32" required="true" requiredMessage="请输入条形码开始">-->
<!--                            <p:ajax event="change" listener="#{warehouseStockMngController.btCodeChange()}" update="endReagentCode"/>-->
<!--                        </p:inputText>-->
 
<!--                        <p:outputLabel value="条形码结束"/>-->
<!--                        <p:inputText id="endReagentCode" styleClass="endReagentCode" value="#{warehouseStockMngController.endReagentCodeForPerson}" maxlength="32" required="true" requiredMessage="请输入条形码结束"/>-->
<!--                    </p:panelGrid>-->
 
 
 
<!--                    &lt;!&ndash;</p:panel>&ndash;&gt;-->
<!--                    <p:panel styleClass="btn" style="text-align: right">-->
<!--                        <p:commandButton value="确定"-->
<!--                                         actionListener="#{warehouseStockMngController.onYesBtnClickForPerson2}"-->
<!--                                         process="@form"-->
<!--                                         update=":warehouseReagentUseForm:warehouseReagentUseDataTableForPerson"-->
<!--                                         styleClass="yes-btn">-->
<!--                        </p:commandButton>-->
<!--                    </p:panel>-->
<!--                </h:form>-->
<!--            </p:tab>-->
            <p:tab title="库中领取" id="applyInWarehouse">
                <h:form id="reagentCodeDialogForm">
                    <p:panel styleClass="center-header content2">
                        <p:panelGrid styleClass="filter" columns="6">
                            <p:outputLabel value="领用数量:"></p:outputLabel>
                            <p:inputNumber value="#{warehouseStockMngController.useNum}"
                                           minValue="0" decimalPlaces="0" style="width: 100%"
                                           required="true" requiredMessage="请输入领用数量"/>
                            <!--<p:outputLabel value="条形码:"></p:outputLabel>
                            <p:inputText value="#{warehouseStockMngController.reagentCode}"></p:inputText>
 
                            <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>-->
                        </p:panelGrid>
                    </p:panel>
                    <p:panel styleClass="center-body" style="margin-top:20px!important;max-height: 200px;overflow-y: auto;">
                        <p:selectManyCheckbox id="reagentCodeGrid"
                                              value="#{warehouseStockMngController.reagentCodeSelectedList}"
                                              layout="grid" columns="4">
                            <f:selectItems
                                    value="#{warehouseStockMngController.reagentStatusSelectListForPerson}" var="item"
                                    itemLabel="#{item.reagentCode}" itemValue="#{item.reagentCode}" />
                        </p:selectManyCheckbox>
                    </p:panel>
 
                    <p:panel styleClass="btn" style="text-align: right">
                        <p:commandButton value="确定"
                                         actionListener="#{warehouseStockMngController.onYesBtnClickForPerson}"
                                         process="@form"
                                         update=":warehouseReagentUseForm:warehouseReagentUseDataTableForPerson"
                                         styleClass="yes-btn">
                        </p:commandButton>
                    </p:panel>
                </h:form>
            </p:tab>
 
        </p:tabView>
 
    </p:dialog>
 
</ui:composition>
</html>