📄 timesheetcrud.jsp
字号:
<%@ include file="../includes/taglibs.jsp" %><%@ page import="net.java.workeffort.infrastructure.security.ISecurityProfile"%><form name="appForm" action="timesheetCrud.do" method="post"> <input type="hidden" name="dispatch" value=""><input type="hidden" name="_txToken" value="<%=session.getAttribute("txToken") %>"> <input type="hidden" name="collectionIdx"/> <input type="hidden" name="targetPropertyNameForValue"/> <input type="hidden" name="subFlow"/> <%@ include file="../includes/crumbs.jsp" %> <div id="buttonBar"> <c:if test='${! viewHelper.viewonly}' > <c:if test='${timesheetFormHelper.timesheetUserType == "user" && empty command.submitTs }' > <input type="button" name="saveBtn" onclick="confirmSubmit(this.form,'saveTimesheet')" value="<spring:message code="button.save" />" /> </c:if> <input type="button" name="submitBtn" onclick="confirmSubmit(this.form,'submitTimesheet')" value="<spring:message code="button.submit" />" /> <input type="button" name="submitBtn" onclick="resetForm(this.form)" value="<spring:message code="button.reset" />" /> </c:if> </div> <spring:nestedPath path="command"> <div id="crud"> <div id="master"> <table> <tr> <td class="label"> <spring:message code="partyCd"/>: </td> <td> <html:hidden path="version"/> <html:text path="partyCd" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> <td class="assignedLabel" width="150"> <spring:message code="timesheetId"/>: </td> <td> <html:text path="timesheetId" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> </tr> <tr> <td class="label"> <spring:message code="timesheetPeriod"/>: </td> <td> <html:text path="fromDt" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> - <html:text path="thruDt" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> </tr> <tr> <td class="label"> <spring:message code="approvedFlg"/>: </td> <td> <c:if test='${timesheetFormHelper.timesheetUserType == "user" || timesheetFormHelper.timesheetUserType =="management" || not empty command.processedFlg}' > <c:set var="approvedFlgReadonly" value ="true" /> </c:if> <html:checkbox path="approvedFlg" value="Y" disabled='${approvedFlgReadonly}'/> <%-- Take care of the checkbox. see WebDataBinder.setFieldMarkerPrefix(). --%> <input type="hidden" name="_approvedFlg"/> </td> </tr> </table> </div> <c:if test='${timesheetFormHelper.timesheetUserType == "user"}' > <%@ include file="../includes/addRowButton.jsp" %> </c:if> <div id="detail"> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th><spring:message code="rowNo" /> </th> <th class="nowrap"><spring:message code="rowAction" /> </th> <th><spring:message code="workId" />*</th> <th><spring:message code="rateTypeCd" />*</th> <c:forEach items="${datesForTimesheet}" var="dateHeader" > <th><c:out value='${dateHeader}' /></th> </c:forEach> <th><spring:message code="timesheetLineTotal" /></th> </tr> </thead> <tbody> <jsp:useBean id="rowHelper" class="net.java.workeffort.infrastructure.view.RowHelper" /> <c:forEach varStatus="loop" items="${command.timeEntries}"> <spring:bind path="timeEntries[${loop.index}].processType" > <c:set target="${rowHelper}" property="processType" value="${status.value}"/> <c:set target="${rowHelper}" property="processTypePath" value="timeEntries[${loop.index}].processType"/> </spring:bind> <tr class="<c:out value='${rowHelper.rowCss}' />" > <td> <c:out value="${loop.index+1}" /> </td> <td class="nowrap"> <c:if test='${! viewHelper.viewonly}' > <c:if test='${timesheetFormHelper.timesheetUserType == "user" && (empty rowHelper.processType || rowHelper.processType =="update" || rowHelper.processType =="delete") }' > <html:radio path="${rowHelper.processTypePath}" value="update" onclick="editRow(this.form)" > <spring:message code="update.action"/> </html:radio> <html:radio path="${rowHelper.processTypePath}" value="delete"> <spring:message code="delete.action"/> </html:radio> </c:if> <c:if test='${timesheetFormHelper.timesheetUserType == "user" && (rowHelper.processType =="insert" || rowHelper.processType == "ignore") }' > <html:radio path="${rowHelper.processTypePath}" value="insert"> <spring:message code="insert.action"/> </html:radio> <html:radio path="${rowHelper.processTypePath}" value="ignore" onclick="ignoreRow(this.form)" > <spring:message code="ignore.action"/> </html:radio> </c:if> </c:if> </td> <td nowrap> <c:set var="timesheetUserTypeVal" value="${timesheetFormHelper.timesheetUserType}" /> <workeffort:selectValueFlow path="timeEntries[${loop.index}].workId" size="10" maxlength="10" readonly='${rowHelper.keyReadonly}' styleClass='${rowHelper.keyCss}' onclick="startFlowSetValue(this.form, ${loop.index}, 'workId', '/timesheetWorkLov.do?partyCd=${command.partyCd}×heetUserType=${timesheetUserTypeVal}')" /> </td> <td nowrap> <workeffort:selectValueFlow path="timeEntries[${loop.index}].rateTypeCd" size="10" maxlength="10" readonly='${rowHelper.keyReadonly}' styleClass='${rowHelper.keyCss}' onclick="startFlowSetValue(this.form, ${loop.index}, 'rateTypeCd', '/timesheetRateTypeLov.do?partyCd=${command.partyCd}×heetUserType=${timesheetUserTypeVal}')" /> </td> <c:forEach items="${datesForTimesheet}" varStatus="tmp" > <c:set var="dayCount" value="day${tmp.index}" /> <td> <html:text path="timeEntries[${loop.index}].${dayCount}" size="5" maxlength="5" readonly='${rowHelper.fldReadonly}' styleClass = '${rowHelper.fldCss}' /> </td> </c:forEach> <td class="number"> <c:set var="timeEntryLine" value="timeEntry${loop.index}" /> <c:out value="${timesheetFormHelper.timesheetTotals[timeEntryLine]}" /> </td> </tr> </c:forEach> <tr> <%-- there has to be atleast one time entry to show total --%> <c:if test="${timesheetFormHelper.timesheetTotals['timeEntry0'] != null }" > <td></td><td></td><td></td><td align="right"><b>Total:</b></td> </c:if> <c:forEach items="${datesForTimesheet}" varStatus="tmp" > <c:set var="dayCount" value="day${tmp.index}" /> <td> <c:out value="${timesheetFormHelper.timesheetTotals[dayCount]}" /> </td> </c:forEach> <td class="number"> <c:out value="${timesheetFormHelper.timesheetTotals.cumTotal}" /> </td> </tr> </tbody> </table> </div> <div id="masterBottom"> <table> <tr> <td class="label"> <spring:message code="comments"/>: </td> <td> <html:textarea path="comments" cols="40" rows="2" readonly='${viewHelper.fldReadonly}' styleClass='${viewHelper.fldCss}'/> </td> </tr> <tr> <td class="assignedLabel"> <spring:message code="submitTs"/>: </td> <td> <html:text path="submitTs" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> </tr> <tr> <td class="assignedLabel"> <spring:message code="approvedBy"/>: </td> <td> <html:text path="approvedBy" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> <td class="assignedLabel"> <spring:message code="approvedTs"/>: </td> <td> <html:text path="approvedTs" size="10" maxlength="10" readonly='true' styleClass='readonlyField' /> </td> </tr> </table> </div> <%-- if person has management privileges show timesheet amount total info --%> <% ISecurityProfile securityProfile = (ISecurityProfile) pageContext.findAttribute("net.java.workeffort.SECURITY_PROFILE"); if (securityProfile.getAccessDecision("TimesheetService", "getTimesheetManagement") == ISecurityProfile.ALLOWED) { pageContext.getRequest().setAttribute("management", "yes"); } %> <c:if test="${not empty management}" > <br /> <div id="timesheetProcessInfo" > <table> <tr> <td class="label"><spring:message code="batchJobId" />:</td> <td> <c:out value="${command.batchJobId}" /> </td> </tr> <tr> <td class="label"><spring:message code="processedTs" />:</td> <td> <c:out value="${command.processedTs}"/> </td> </tr> <tr> <td class="label" nowrap><spring:message code="timesheetTotalAmt"/>:</td> <td> <c:out value="${command.totalAmt} ${command.totalAmtCur}" /></td> </tr> </table> </div> <br /> </c:if> </div> </spring:nestedPath></form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -