bkjxxxw/WebContent/webpage/modules/test/grid/goodsForm.jsp

68 lines
2.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>商品管理</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
var validateForm;
function doSubmit(){//回调函数在编辑和保存动作时供openDialog调用提交表单。
if(validateForm.form()){
$("#inputForm").submit();
return true;
}
return false;
}
$(document).ready(function() {
validateForm = $("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
</head>
<body>
<form:form id="inputForm" modelAttribute="goods" action="${ctx}/test/grid/goods/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
<tbody>
<tr>
<td class="width-15 active"><label class="pull-right">商品名称:</label></td>
<td class="width-35">
<form:input path="name" htmlEscape="false" maxlength="64" class="form-control "/>
</td>
<td class="width-15 active"><label class="pull-right">所属类型:</label></td>
<td class="width-35">
<sys:gridselect url="${ctx}/test/grid/goods/selectcategory" id="category" name="category.id" value="${goods.category.id}" title="选择所属类型" labelName="category.name"
labelValue="${goods.category.name}" cssClass="form-control required" fieldLabels="商品分类|备注" fieldKeys="name|remarks" searchLabel="分类名" searchKey="name" ></sys:gridselect>
</td>
</tr>
<tr>
<td class="width-15 active"><label class="pull-right">价格:</label></td>
<td class="width-35">
<form:input path="price" htmlEscape="false" maxlength="64" class="form-control "/>
</td>
<td class="width-15 active"><label class="pull-right">备注信息:</label></td>
<td class="width-35">
<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
</td>
</tr>
</tbody>
</table>
</form:form>
</body>
</html>