<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>领淘报表系统</title>
<%@include file="/views/common.jsp"%>
<style>
  	.layui-input{
		width:120%
	}
  	.btn_groups{
  		width:200px;
  		margin:auto
  	}
</style>
</head>

<body>
	<div class="layui-input-block layui-form" style="margin-top: 30px">
		<form class="layui-form " action="">
			<input type="hidden" name="type" value="企业介绍">
			<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
			<div class="layui-form-item">
				<label class="layui-form-label">产品类型</label>
				<div class="layui-input-inline">
					<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
						placeholder="请输入类型" class="layui-input" lay-verify="required">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">排序</label>
				<div class="layui-input-inline">
					<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
						
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">说明</label>
					<div class="layui-input-inline">
						<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block btn_groups">
					<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		layui.use([ 'form', 'laydate','layedit' ], function() {
			var form = layui.form;
			var laydate = layui.laydate;
			var layedit = layui.layedit;
			var $ = layui.$;
			
			//监听提交
			form.on('submit(updateBtn)', function(data) {
				$.ajax({
					url : '${path}/updateCustomerTrainKindLabel',
					dataType : 'json',
					data:$("form").serialize(),
					type : 'post',
					success : function(data) {
						if (data.code == 200) {
							layer.msg('修改成功！',{icon:6,offset:"auto",time:1000});//提示框
							setTimeout(function(){
								var index = parent.layer.getFrameIndex(window.name);
								parent.layer.close(index);//关闭弹出层
								parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
							}, 1100);
						}else  {
							layer.msg('修改失败！',{icon:5,offset:"auto",time:1000});//提示框
						}
					}
				});
				return false;
			});
		});
	</script>
</body>
</html>