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
<?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="approvalMngForm">
        <p:panel styleClass="center-header">
            <p:outputLabel styleClass="title" value="审批管理"></p:outputLabel>
 
            <p:panelGrid styleClass="filter" columns="15">
                <p:outputLabel value="申购产品:"></p:outputLabel>
                <p:inputText value="#{approvalMngController.reagentName}"></p:inputText>
 
                <p:outputLabel value="货期:"></p:outputLabel>
                <p:calendar value="#{approvalMngController.startDeadline}" converter="timestampConvert"
                            pattern="yyyy-MM-dd" locale="zh_CN"></p:calendar>
                <p:outputLabel value=" ~ " style="margin-left: 10px;margin-right: 10px"></p:outputLabel>
                <p:calendar value="#{approvalMngController.endDeadline}" converter="timestampConvert"
                            pattern="yyyy-MM-dd" locale="zh_CN"></p:calendar>
 
                <p:outputLabel value="申购人:"></p:outputLabel>
                <p:inputText value="#{approvalMngController.applyUserName}"></p:inputText>
                <!--<p:selectOneMenu value="#{approvalMngController.applyUserId}" style="width: 70px">
                    <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem>
                    <f:selectItems value="#{approvalMngController.applyUserSelectList}" var="item"
                                   itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems>
                </p:selectOneMenu>-->
                <p:outputLabel value="审批者:" rendered="#{approvalMngController.approvalFlag==true}"></p:outputLabel>
                <p:inputText value="#{approvalMngController.approvaUserName}" rendered="#{approvalMngController.approvalFlag==true}"></p:inputText>
               <!-- <p:selectOneMenu value="#{approvalMngController.approvalUserId}" rendered="#{approvalMngController.approvalFlag==true}">
                    <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem>
                    <f:selectItems value="#{approvalMngController.approvalUserList}" var="item"
                                   itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems>
                </p:selectOneMenu>-->
                <p:outputLabel value="状态:"></p:outputLabel>
                <p:selectOneMenu value="#{approvalMngController.status}" style="width: 70px">
                    <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem>
                    <f:selectItems value="#{approvalMngController.statusSelectList}" var="item"
                                   itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems>
                </p:selectOneMenu>
 
                <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
            </p:panelGrid>
        </p:panel>
        <p:panel styleClass="center-body">
            <p:panelGrid columns="3" styleClass="btn">
                <p:commandButton value="审批" styleClass="edit-btn"
                                 process="@form"
                                 actionListener="#{approvalMngController.onApprovalBtnClick}"
                                 update=":approvalDialog"></p:commandButton>
                <p:commandButton value="取消" styleClass="del-btn"
                                 process="@form"
                                 actionListener="#{approvalMngController.onCancelBtnClick}"
                                 update="@form">
                    <p:confirm header="确认" message="确认操作?"></p:confirm>
                </p:commandButton>
                <p:commandButton update=":centerRootPanel" actionListener="#{approvalMngController.onExportFileBtnClickNew}"
                                 ajax="false" value="导出" styleClass="new-btn" />
            </p:panelGrid>
 
            <p:dataTable id="approvalMngDataTable" styleClass="data-table"
                         paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
                         lazy="true" value="#{approvalMngController.dataModel}" var="row" rowKey="#{row.id}"
                         emptyMessage="无数据" selection="#{approvalMngController.selectedList}"
                         rows="20" pageLinks="5">
                <p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
                <p:column headerText="订单状态" width="60px;" style="text-align: center">
                    <h:outputText value="#{row.status!=null?row.status.text:''}"></h:outputText>
                </p:column>
                <p:column headerText="申购编号" width="118px;">
                    <h:outputText value="#{row.applyCode}"></h:outputText>
                </p:column>
 
                <p:column headerText="产品编号">
                    <h:outputText value="#{row.reagent!=null?row.reagent.productSn:''}"></h:outputText>
                </p:column>
 
                <p:column headerText="试剂名称" width="129px;">
                    <h:outputText value="#{row.reagent!=null?row.reagent.name:''}" style="font-size: 13px;"></h:outputText>
                </p:column>
 
                <p:column headerText="管制品">
                    <h:outputText value="#{row.reagent!=null?row.reagent.controlProducts:''}"></h:outputText>
                </p:column>
 
                <p:column headerText="规格型号" width="84px;">
                    <h:outputText
                            value="#{row.reagent.reagentFormat}" style="font-size:13px"></h:outputText>
                </p:column>
 
                <p:column headerText="包装">
                    <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(row.reagent.reagentUnit)):''}"></h:outputText>
                </p:column>
 
                <p:column headerText="含税售价" width="60px;">
                    <h:outputText value="#{row.applyPrice}"></h:outputText>
                </p:column>
 
                <p:column headerText="数量" width="34px;">
                    <h:outputText value="#{row.num}"></h:outputText>
                </p:column>
 
                <p:column headerText="CAS号">
                    <h:outputText value="#{row.reagent!=null?row.reagent.cas:''}"></h:outputText>
                </p:column>
 
                <p:column headerText="危险性质" width="85px;">
                    <h:outputText value="#{row.reagent.reagentCharacter}"></h:outputText>
                </p:column>
 
                <p:column headerText="厂家">
                    <h:outputText value="#{row.reagent!=null?row.reagent.productHome:''}"></h:outputText>
                </p:column>
 
                <!--<p:column headerText="供应商">-->
                    <!--<h:outputText value="#{row.reagent!=null?row.reagent.supplierName:''}"></h:outputText>-->
                <!--</p:column>-->
 
                <p:column headerText="试剂类型" width="60px;">
                    <h:outputText value="#{row.reagent.reagentType}"></h:outputText>
                </p:column>
 
                <p:column headerText="申购人" style="text-align: center">
                    <h:outputText value="#{row.applyUserName}" style="text-align: center;"></h:outputText>
                </p:column>
 
                <p:column headerText="申购日期"  width="73px;">
                    <h:outputText value="#{row.createTime}">
                        <f:convertDateTime pattern="yyyy-MM-dd" locale="zh_CN"></f:convertDateTime>
                    </h:outputText>
                </p:column>
                <!--<p:column headerText="审批者">
                    <h:outputText value="#{approvalMngController.getUserName(row.approveUserId)}"></h:outputText>
                </p:column>-->
                <p:column headerText="一级审批者" style="text-align: center" width="71px;">
                    <h:outputText value="#{row.first}"></h:outputText>
                </p:column>
                <p:column headerText="二级审批者" style="text-align: center" width="71px;">
                    <h:outputText value="#{row.second}"></h:outputText>
                </p:column>
                <!--现在报销不按课题编号了,所以先注释掉-->
<!--                <p:column headerText="课题编号" width="83px;">-->
<!--                    <h:outputText value="#{row.objective}"></h:outputText>-->
<!--                </p:column>-->
                <p:column headerText="备注" width="83px;">
                    <h:outputText value="#{row.memo}"></h:outputText>
                </p:column>
            </p:dataTable>
        </p:panel>
    </h:form>
 
    <p:dialog modal="true" header="审批" appendTo="@(body)"
              id="approvalDialog" widgetVar="approvalDialog"
              resizable="false" width="950">
        <h:form id="approvalDialogForm">
              <p:panel styleClass="center-body">
                <p:dataTable styleClass="data-table" var="row" value="#{approvalMngController.selectedList}"
                         rows="3" paginator="true" paginatorPosition="bottom"
                        paginatorAlwaysVisible="false">
 
                    <p:column headerText="申购产品">
                        <h:outputText value="#{row.reagent!=null?row.reagent.name:''}"></h:outputText>
                    </p:column>
 
                    <!--<p:column headerText="指定供应商">
                        <h:outputText value="#{row.reagent!=null?row.reagent.supplierName:''}"></h:outputText>
                    </p:column>-->
 
                    <p:column headerText="规格">
                        <h:outputText value="#{row.reagent!=null?row.reagent.reagentFormat:''}"></h:outputText>
                    </p:column>
 
                    <p:column headerText="包装">
                        <h:outputText value="#{row.reagent!=null?(''.concat(row.reagent.mainMetering).concat(row.reagent.reagentUnit)):''}"></h:outputText>
                    </p:column>
 
                    <p:column headerText="参考价格">
                        <h:outputText value="#{row.applyPrice}"></h:outputText>
                    </p:column>
 
                    <!--<p:column headerText="每箱数量">-->
                        <!--<h:outputText value="#{row.reagent!=null?row.reagent.perBox:''}"></h:outputText>-->
                    <!--</p:column>    -->
 
                    <p:column headerText="申购数量">
                        <h:outputText value="#{row.num}"></h:outputText>
                    </p:column>
 
                    <p:column headerText="货期">
                        <h:outputText value="#{row.deadline}">
                            <f:convertDateTime pattern="yyyy-MM-dd" locale="zh_CN"></f:convertDateTime>
                        </h:outputText>
                    </p:column>
 
                    <p:column headerText="申购目的">
                        <h:outputText value="#{row.applyGoal}"></h:outputText>
                    </p:column>
                </p:dataTable>
            </p:panel>
            <br />
            <p:panel styleClass="center-body">
                <p:panelGrid styleClass="content2 grid-padding-bottom2">
                    <c:if test="#{approvalMngController.dangerousFlag}">
                        <p:row>
                            <p:column>
                                <p:outputLabel value="审批者:"></p:outputLabel>
                            </p:column>
                            <p:column>
                                <p:selectOneMenu value="#{approvalMngController.adminApproveUserId}"
                                                 required="true" requiredMessage="请选择审批者">
                                    <f:selectItems value="#{approvalMngController.adminApproveUserIdSelectList}"
                                                   var="item" itemLabel="#{item.name}" itemValue="#{item.id}"></f:selectItems>
                                </p:selectOneMenu>
                            </p:column>
                        </p:row>
                    </c:if>
                    <p:row>
                        <p:column>
                            <p:outputLabel value="批注"></p:outputLabel>
                        </p:column>
                        <p:column>
                            <p:inputTextarea value="#{approvalMngController.memo}"
                                             autoResize="false" maxlength="200"
                                             style="height: 80px; width: 60%"></p:inputTextarea>
                        </p:column>
                    </p:row>
                </p:panelGrid>
            </p:panel>
 
            <p:panel styleClass="btn" style="text-align: right">
                <p:commandButton value="拒绝" actionListener="#{approvalMngController.onNoBtnClick}"
                                 process="@form"
                                 styleClass="no-btn">
                    <p:confirm header="确认" message="确认操作?"></p:confirm>
                </p:commandButton>
                <p:commandButton value="批准" actionListener="#{approvalMngController.onYesBtnClick}"
                                 process="@form"
                                 styleClass="yes-btn">
                    <p:confirm header="确认" message="确认操作?"></p:confirm>
                </p:commandButton>
            </p:panel>
        </h:form>
    </p:dialog>
</ui:composition>
</html>