<%@ 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,.layui-input-inline{
	width:350px
}
</style>
</head>
<body>
	<div class="layui-input-block layui-form" lay-filter="addUser"
		style="margin-top: 30px">
		<form class="layui-form " action="">
			<input type="hidden" name="id" id="id">
			<div class="layui-form-item">
				<label class="layui-form-label">省份</label>
				<div class="layui-input-inline">
					<input type="text" name="province" placeholder="请输入省份" class="layui-input" id="provinceUpdate">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">快递费</label>
				<div class="layui-input-inline">
					<input type="text" name="price" placeholder="请输入快递费金额" class="layui-input" id="price">
				</div>
			</div>


			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		layui.use([ 'table', 'laydate', 'form','layer' ], function() {
			var $ = layui.jquery;
			var table = layui.table;
			var laydate = layui.laydate;
			var form = layui.form;
			var layer = layui.layer;
			
			form.on('submit(enadd)',function(data){
				$.ajax({
					url:'${path}/updateExpressFee',
					dataType : 'json',
					data:$(data.form).serialize(),
					type : 'post',
					success:function(data){
						if (data.code == 200) {
							layer.msg('修改成功！',{icon:6,offset:"auto",time:2000});//提示框
						}else  {
							layer.msg('修改失败！',{icon:5,offset:"auto",time:2000});//提示框
						}
						setTimeout(function(){
							var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
							parent.layer.close(index);//关闭弹出层
							parent.layui.table.reload("expressFeeTableAll"); //重新加载页面表格
						}, 2100);
					}
				})
				return false;
			});
			
		})
	</script>
</body>
</html>