editmateriel.jsp

来自「一个关于tlms的一个小程序 看看能否帮助到别人」· JSP 代码 · 共 198 行

JSP
198
字号
<%@ include file="/WEB-INF/jsp/common/Taglibs.jsp" %>

<script type="text/javascript" language="javascript">
    function addMateriel() {
        var form = document.forms[0];
        if (validateAddedMaterielBean(form)) {
            form.action = '<c:url value="/admin/materiel/addMateriel.do"/>';
            form.submit();
        }
    }

    function updateMateriel() {
        var form = document.forms[0];
        if (validateUpdateMaterielBean(form)) {
            form.action = '<c:url value="/admin/materiel/updateMateriel.do"/>';
            form.submit();
        }
    }

    function searchMateriel() {
        var f = document.forms[0];
        f.action = "<c:url value="/admin/materiel/searchMateriel.do"/>";
        f.submit();
    }
</script>
<html:form action="/materiel/addMateriel.do">
<html:hidden property="materielBean.id" value="${materielBean.id}"/>

<div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="table1">
<tr>
    <td height="28" colspan="2">
        <img src="<c:url value='/images/dot.gif'/>" width="11" height="11" alt="">
        <bean:message key="label.admin.systemSetting"/> &gt;
        <bean:message key="label.admin.materiel.title"/>
    </td>
</tr>
<tr>
    <td width="2%" height="31" class="section">
        <img src="<c:url value='/images/menu_dot.jpg'/>" width="6" height="19" alt="">
    </td>
    <td width="98%" class="section">
        <bean:message key="label.admin.materiel.basicInfo"/>
    </td>
</tr>
<tr>
    <td></td>
    <td></td>
</tr>
<tr>
    <td></td>
    <td>
        <table width="100%" height="43" border="0" cellpadding="0" cellspacing="0"
               style="font-size:12px; width:96%" id="table2">
            <tr>
                <td nowrap><bean:message key="label.admin.materiel.code"/></td>
                <td nowrap>
                    <html:text property="materielBean.code" value="${materielBean.code}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.shortName"/></td>
                <td nowrap>
                    <html:text property="materielBean.shortName" value="${materielBean.shortName}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.admin.materiel.measureUnit"/></td>
                <td nowrap>
                    <html:text property="materielBean.measureUnit" value="${materielBean.measureUnit}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.ch_Name"/></td>
                <td nowrap>
                    <html:text property="materielBean.ch_Name" value="${materielBean.ch_Name}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.admin.materiel.unitPrice"/></td>
                <td nowrap>
                    <html:text property="materielBean.unitPrice" value="${materielBean.unitPrice}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.avgPrice"/></td>
                <td nowrap>
                    <html:text property="materielBean.avgPrice" value="${materielBean.avgPrice}"/>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.admin.materiel.endStockPrice"/></td>
                <td nowrap>
                    <html:text property="materielBean.endStockPrice" value="${materielBean.endStockPrice}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.highestStocks"/></td>
                <td nowrap>
                    <html:text property="materielBean.highestStocks" value="${materielBean.highestStocks}"/>
                </td>
            </tr>

            <tr>
                <td width="11%" nowrap><bean:message key="label.admin.materiel.clientID"/></td>
                <td width="28%" nowrap>
                    <html:select property="materielBean.clientID" value="${materielBean.clientID}">
                        <html:option value=""><bean:message key="label.common.pleaseSelect"/></html:option>
                        <c:forEach items="${clientList}" var="client">
                            <html:option value="${client.id}"><c:out value="${client.name}"/></html:option>
                        </c:forEach>
                    </html:select>
                </td>
                <td width="11%" nowrap><bean:message key="label.admin.materiel.storehouseID"/></td>

                <td width="53%" nowrap>
                    <html:select property="materielBean.storehouseID" value="${materielBean.storehouseID}">
                        <html:option value=""><bean:message key="label.common.pleaseSelect"/></html:option>
                        <c:forEach items="${storehouseList}" var="storehouse">
                            <html:option value="${storehouse.id}"><c:out value="${storehouse.name}"/></html:option>
                        </c:forEach>
                    </html:select>
                </td>
            </tr>
            <tr>
                <td nowrap><bean:message key="label.admin.materiel.lowestStocks"/></td>
                <td nowrap>
                    <html:text property="materielBean.lowestStocks" value="${materielBean.lowestStocks}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.reorderGoods"/></td>
                <td nowrap>
                    <html:text property="materielBean.reorderGoods" value="${materielBean.reorderGoods}"/>
                </td>
            </tr>

            <tr>
                <td nowrap><bean:message key="label.admin.materiel.handlers"/></td>
                <td nowrap>
                    <html:text property="materielBean.handlers" value="${materielBean.handlers}"/>
                </td>
                <td nowrap><bean:message key="label.admin.materiel.createDate"/></td>
                <td nowrap>
                    <html:text property="materielBean.createDate" value="${materielBean.createDate}"/>
                </td>
            </tr>
        </table>
    </td>
</tr>
<tr>
    <td>&nbsp;</td><td>&nbsp;</td>
</tr>

<tr>
    <td colspan="2"><hr size="1"></td>
</tr>
<tr>
    <td></td>
    <td>
        <table border="0" cellspacing="0" cellpadding="0" align="left">
            <tr>
                <td width="8" class="ButtonHOMEL-msover"></td>
                <td class="ButtonHOME-msover">


                    <c:choose>
                    <c:when test="${empty materielBean.id}">
                    <a href="#" class="hrefColor" onclick="addMateriel()">
                            <bean:message key="button.save"/>
                        </c:when>
                        <c:otherwise>
                        <a href="#" class="hrefColor" onclick="updateMateriel()">
                                <bean:message key="button.update"/>
                            </c:otherwise>
                            </c:choose>

                </td>
                <td width="8" class="ButtonHOMER-msover"></td>
                <td width="10"></td>
            </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" align="left">
            <tr>
                <td width="8" class="ButtonHOMEL-msover"></td>
                <td class="ButtonHOME-msover">
                    <a href="#" class="hrefColor" onclick="searchMateriel()">
                        <bean:message key="button.cancel"/>
                    </a>
                </td>
                <td width="8" class="ButtonHOMER-msover"></td>
            </tr>
        </table>
    </td>
</tr>
</table>
</div>
</html:form>

<c:choose>
    <c:when test="${empty materielBean.id}">
        <html:javascript formName="/materiel/addMateriel" method="validateAddedMaterielBean"/>
    </c:when>
    <c:otherwise>
        <html:javascript formName="/materiel/updateMateriel" method="validateUpdateMaterielBean"/>
    </c:otherwise>
</c:choose>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?