Commit 5f1d5398 by 胡懿

Merge branches 'hy' and 'master' of gitlab.yqdchina.com:huyi/warehouse into hy

parents 7724f5df 0ed291ec
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
<title>货架信息管理</title>
<meta name="decorator" content="ani"/>
<script type="text/javascript">
$(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>
<title>货架信息管理</title>
<meta name="decorator" content="ani"/>
<link rel="stylesheet" href="${ctxStatic}/common/css/form.css">
</head>
<body>
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
<a class="panelButton" href="${ctx}/warehouse/shelves/shelves"><i class="ti-angle-left"></i> 返回</a>
</h3>
</div>
<div class="panel-body">
<form:form id="inputForm" modelAttribute="shelves" action="${ctx}/warehouse/shelves/shelves/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<div class="form-group">
<label class="col-sm-2 control-label"><font color="red">*</font>货架名称:</label>
<div class="col-sm-10">
<form:input path="name" htmlEscape="false" class="form-control required"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><font color="red">*</font>货架编号:</label>
<div class="col-sm-10">
<form:input path="number" htmlEscape="false" class="form-control required"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">仓库id:</label>
<div class="col-sm-10">
<form:input path="warehouse.id" htmlEscape="false" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">备注信息:</label>
<div class="col-sm-10">
<form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/>
</div>
</div>
<c:if test="${mode == 'add' || mode=='edit'}">
<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 class="wrapper wrapper-content">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-body">
<form:form id="inputForm" modelAttribute="shelves" action="${ctx}/warehouse/shelves/shelves/save"
method="post" class="form-horizontal">
<form:hidden path="id"/>
<h3 class="text-center">货架表</h3>
<table class="table table-bordered main-table">
<tr>
<td><font color="red">*</font>货架名称</td>
<td>
<form:input path="name" htmlEscape="false" class="form-control required"/>
</td>
<td><font color="red">*</font>货架编号</td>
<td>
<form:input path="number" htmlEscape="false" class="form-control required"/>
</td>
</tr>
<tr>
<td><font color="red">*</font>仓库</td>
<td>
<sys:gridselect url="${ctx}/warehouse/warehouse/warehouse/data" id="warehouse" name="warehouse.id" value="${testCountry.warehouse.id}" labelName="warehouse.name" labelValue="${testCountry.warehouse.name}"
title="选择仓库" cssClass="form-control " fieldLabels="仓库名称|仓库编号" fieldKeys="name|code" searchLabels="仓库名称|仓库编号" searchKeys="name|code" ></sys:gridselect>
</td>
<td>备注</td>
<td>
<form:textarea path="remarks" htmlEscape="false" rows="4" class="form-control "/>
</td>
</tr>
</table>
</form:form>
</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>
</html>
\ No newline at end of file
......@@ -231,14 +231,14 @@ $(document).ready(function() {
$('#shelvesTable').bootstrapTable('refresh');
}
function add(){
jp.go("${ctx}/warehouse/shelves/shelves/form/add");
jp.openSaveDialog("新增货架","${ctx}/warehouse/shelves/shelves/form/add", '800', '600');
}
function edit(id){
if(id == undefined){
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) {
......
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