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
<?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="reagentUseFlowInfoForm">
        <p:panel styleClass="center-header">
            <p:outputLabel styleClass="title" value="试剂流向追踪"></p:outputLabel>
 
            <p:panel styleClass="center-header">
                <p:panelGrid styleClass="filter" columns="16">
                    <style type="text/css">
                        .ui-selectonemenu.ui-widget.ui-state-default.ui-corner-all{
                            min-width: 60px !important;
                        }
                        .ui-selectonemenu-items.ui-selectonemenu-list.ui-widget-content.ui-widget.ui-corner-all.ui-helper-reset{
                            width: 77px !important;
                        }
                    </style>
                    <p:outputLabel value="开始时间:"></p:outputLabel>
                    <p:calendar value="#{opeUseFlowInfoController.startDate}"></p:calendar>
 
                    <p:outputLabel value="结束时间:"></p:outputLabel>
                    <p:calendar value="#{opeUseFlowInfoController.endDate}"></p:calendar>
 
                    <p:outputLabel value="试剂名称:"></p:outputLabel>
                    <p:inputText value="#{opeUseFlowInfoController.reagentId}"></p:inputText>
 
                    <p:outputLabel value="条形码:"></p:outputLabel>
                    <p:inputText value="#{opeUseFlowInfoController.reagentCode}"></p:inputText>
 
                    <p:outputLabel value="柜号:"></p:outputLabel>
                    <p:inputText value="#{opeUseFlowInfoController.containerCode}"></p:inputText>
 
                    <p:outputLabel value="场所名:"></p:outputLabel>
                    <p:inputText value="#{opeUseFlowInfoController.houseName}"></p:inputText>
 
                    <p:outputLabel value="操作状态:"></p:outputLabel>
                    <p:selectOneMenu value="#{opeUseFlowInfoController.operatestate}" style="width: 60px;">
                        <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem>
                        <f:selectItems value="#{opeUseFlowInfoController.getOperatestateList()}"
                                       var="item" itemLabel="#{item.value}" itemValue="#{item.key}"></f:selectItems>
                    </p:selectOneMenu>
 
 
                    <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
                </p:panelGrid>
            </p:panel>
        </p:panel>
 
 
        <p:panel styleClass="center-body">
            <p:panelGrid columns="2" styleClass="btn">
                <p:commandButton value="报废" styleClass="del-btn"  ajax="false" actionListener="#{opeUseFlowInfoController.scrapReagent}" />
                <p:commandButton value="导出" styleClass="new-btn"  ajax="false" id="exportButton" widgetVar="exportButton"
                                 actionListener="#{opeUseFlowInfoController.export2Excel}" />
            </p:panelGrid>
            <p:dataTable id="reagentUseFlowInfoDataTable" styleClass="data-table"
                paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
                lazy="true" value="#{opeUseFlowInfoController.dataModel}" var="row"
                selectionMode="single"
                selection="#{opeUseFlowInfoController.selectedOne}"
                rowKey="#{row.id}" emptyMessage="无数据" rows="20" pageLinks="5">
                <p:column headerText="试剂条形码">
                    <h:outputText value="#{row.reagentCode}"></h:outputText>
                </p:column>
                <p:column headerText="试剂名称">
                    <h:outputText value="#{row.reagent.name}"></h:outputText>
                </p:column>
 
                <p:column headerText="柜号">
                    <h:outputText value="#{row.laboratoryContainerCode}" rendered="${!empty row.laboratoryContainerName}"/>
                    <h:outputText value="#{row.warehouseContainerCode}" rendered="${!empty row.warehouseContainerName}"/>
                </p:column>
 
                <p:column headerText="操作状态">
                    <h:outputText value="#{row.operatestateName}" />
                </p:column>
                <p:column headerText="残存量">
                    <h:outputText value="#{row.remainder == null?'':row.remainder}"
                                  rendered="#{row.operatestateName ne '仓库领用'
                                        and row.operatestateName ne '仓库入库'}"/>
                </p:column>
 
 
                <!--<p:column headerText="重量">
                    <h:outputText value="#{row.remainder}"></h:outputText>
                </p:column>-->
 
                <p:column headerText="持有者">
                    <h:outputText value="#{row.userName}" />
                </p:column>
 
                <p:column headerText="更新时间">
                    <h:outputText value="#{row.createTime}">
                        <f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" locale="zh_CN"></f:convertDateTime>
                    </h:outputText>
                </p:column>
 
 
                <p:column headerText="场所名">
                    <h:outputText value="#{row.laboratoryName}" rendered="#{!empty row.laboratoryName}"/>
                    <h:outputText value="#{row.warehouseName}" rendered="#{!empty row.warehouseName}"/>
                </p:column>
 
<!--                <p:column headerText="领用单号">-->
<!--                    <h:outputText value="#{row.receiptNumber}"/>-->
<!--                </p:column>-->
 
 
<!--                <p:column headerText="操作" style="text-align: center">-->
<!--                <p:commandButton value="生成领用单"-->
<!--                                 actionListener="#{opeUseFlowInfoController.generateRecipients(row)}"-->
<!--                                 rendered="#{row.receiptNumber != null}"-->
<!--                                 update="reagentUseFlowInfoForm:apply-ui"-->
<!--                                 oncomplete="PF('printDialog').show()"-->
<!--                                 async="true"-->
<!--                >-->
<!--                </p:commandButton>-->
<!--                </p:column>-->
 
            </p:dataTable>
 
        </p:panel>
    </h:form>
    <p:dialog id="apply-ui" header="领用单" widgetVar="printDialog" appendTo="@(body)" modal="true" resizable="false"
              width="1000">
        <div id="printTarget">
            <div style=" margin: 10mm 10mm 0mm 2mm;">
                <h:form id="printDialog">
 
                    <p:outputPanel style="text-align: center;font-size: 14px;font-weight: 700;">#{opeUseFlowInfoController.printTable['head']}</p:outputPanel>
                    <p:outputPanel style="text-align: center;font-size: 15px;margin: 20px;font-weight: 700;">#{opeUseFlowInfoController.printTable['title']}</p:outputPanel>
                    <div>
                        <div style="display: flex;flex-direction: row;justify-content: flex-end;">
                            <div style="width: 100px;">单据编号:</div>
                            <div style="width: 300px;">#{opeUseFlowInfoController.printTable['receiptNumber']}</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;">#{opeUseFlowInfoController.printTable['department']}</div>
                        </div>
                        <div style="display: inline-flex;float: right;">
                            <div style="width: 100px;">日期:</div>
                            <div style="width: 300px;padding-top: 1px;">
                                <div>#{opeUseFlowInfoController.printTable['date']}</div>
                            </div>
                        </div>
                    </div>
 
                    <div style="margin-bottom: 20px;">
                        <div style="display: inline-flex;">
                            <div style="width: 100px;margin-left: 10px;">申购人:</div>
                            <div style="width: 300px;">#{opeUseFlowInfoController.printTable['applyPerson']}</div>
                        </div>
                        <div style="display: inline-flex;float: right;">
                            <div style="width: 100px;">联系方式:</div>
                            <div style="width: 300px;">
                                <div >#{opeUseFlowInfoController.printTable['phone']}</div>
                            </div>
                        </div>
                    </div>
 
 
 
 
                    <p:dataTable id="printTB" styleClass="apply-list"
                                 value="#{opeUseFlowInfoController.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}" />
                        </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">
                        <div class="div-btn cancel" id="cancel">关闭</div>
                        <div class="div-btn print" id="print">打印</div>
                    </p:panel>
                </h:form>
            </div>
        </div>
        <script type="text/javascript" src="resources/js/print.js"/>
        <script type="text/javascript">
            $(function () {
                $("#print").on("click", function () {
                    jQuery.print('#printTarget');
                });
                $("#cancel").on("click", function () {
                    $("#reagentUseFlowInfoForm\\:apply-ui a").click();
                })
            })
 
 
        </script>
    </p:dialog>
</ui:composition>
</html>