Commit 0ed291ec by yyq1988

优化货架表单

parent eb06b89d
<%@ page contentType="text/html;charset=UTF-8" %> <%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%> <%@ include file="/webpage/include/taglib.jsp" %>
<html> <html>
<head> <head>
<title>货架信息管理</title> <title>货架信息管理</title>
<meta name="decorator" content="ani"/> <meta name="decorator" content="ani"/>
<script type="text/javascript"> <link rel="stylesheet" href="${ctxStatic}/common/css/form.css">
$(document).ready(function() {
jp.ajaxForm("#inputForm",function(data){
if(data.success){
jp.success(data.msg);
jp.go("${ctx}/warehouse/shelves/shelves");
}else{
jp.error(data.msg);
$("#inputForm").find("button:submit").button("reset");
}
});
});
</script>
</head> </head>
<body> <body>
<div class="wrapper wrapper-content"> <div class="wrapper wrapper-content">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-body">
<h3 class="panel-title"> <form:form id="inputForm" modelAttribute="shelves" action="${ctx}/warehouse/shelves/shelves/save"
<a class="panelButton" href="${ctx}/warehouse/shelves/shelves"><i class="ti-angle-left"></i> 返回</a> method="post" class="form-horizontal">
</h3> <form:hidden path="id"/>
</div> <h3 class="text-center">货架表</h3>
<div class="panel-body"> <table class="table table-bordered main-table">
<form:form id="inputForm" modelAttribute="shelves" action="${ctx}/warehouse/shelves/shelves/save" method="post" class="form-horizontal"> <tr>
<form:hidden path="id"/> <td><font color="red">*</font>货架名称</td>
<div class="form-group"> <td>
<label class="col-sm-2 control-label"><font color="red">*</font>货架名称:</label> <form:input path="name" htmlEscape="false" class="form-control required"/>
<div class="col-sm-10"> </td>
<form:input path="name" htmlEscape="false" class="form-control required"/> <td><font color="red">*</font>货架编号</td>
</div> <td>
</div> <form:input path="number" htmlEscape="false" class="form-control required"/>
<div class="form-group"> </td>
<label class="col-sm-2 control-label"><font color="red">*</font>货架编号:</label> </tr>
<div class="col-sm-10"> <tr>
<form:input path="number" htmlEscape="false" class="form-control required"/> <td><font color="red">*</font>仓库</td>
</div> <td>
</div> <sys:gridselect url="${ctx}/warehouse/warehouse/warehouse/data" id="warehouse" name="warehouse.id" value="${testCountry.warehouse.id}" labelName="warehouse.name" labelValue="${testCountry.warehouse.name}"
<div class="form-group"> title="选择仓库" cssClass="form-control " fieldLabels="仓库名称|仓库编号" fieldKeys="name|code" searchLabels="仓库名称|仓库编号" searchKeys="name|code" ></sys:gridselect>
<label class="col-sm-2 control-label">仓库id:</label> </td>
<div class="col-sm-10"> <td>备注</td>
<form:input path="warehouse.id" htmlEscape="false" class="form-control"/> <td>
</div> <form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/>
</div> </td>
<div class="form-group"> </tr>
<label class="col-sm-2 control-label">备注信息:</label> </table>
<div class="col-sm-10"> </form:form>
<form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/> </div>
</div> </div>
</div> </div>
<c:if test="${mode == 'add' || mode=='edit'}"> </div>
<div class="col-lg-3"></div>
<div class="col-lg-6">
<div class="form-group text-center">
<div>
<button class="btn btn-primary btn-block btn-lg btn-parsley" data-loading-text="正在提交...">提 交</button>
</div>
</div>
</div>
</c:if>
</form:form>
</div>
</div>
</div>
</div>
</div> </div>
<script>
function save() {
var isValidate = jp.validateForm('#inputForm');//校验表单
if(!isValidate){
return false;
}else{
jp.loading();
jp.post($("#inputForm").attr('action'),$('#inputForm').serialize(),function(data){
if(data.success){
jp.getParent().refresh();
var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(dialogIndex);
jp.success(data.msg)
}else{
jp.error(data.msg);
}
})
}
}
</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -231,14 +231,14 @@ $(document).ready(function() { ...@@ -231,14 +231,14 @@ $(document).ready(function() {
$('#shelvesTable').bootstrapTable('refresh'); $('#shelvesTable').bootstrapTable('refresh');
} }
function add(){ function add(){
jp.go("${ctx}/warehouse/shelves/shelves/form/add"); jp.openSaveDialog("新增货架","${ctx}/warehouse/shelves/shelves/form/add", '800', '600');
} }
function edit(id){ function edit(id){
if(id == undefined){ if(id == undefined){
id = getIdSelections(); id = getIdSelections();
} }
jp.go("${ctx}/warehouse/shelves/shelves/form/edit?id=" + id); jp.openSaveDialog("编辑货架","${ctx}/warehouse/shelves/shelves/form/edit?id=" + id, '800', '600');
} }
function view(id) { function view(id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment