<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Open Park</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="<%=path%>/static/css/font.css">
    <link rel="stylesheet" href="<%=path%>/static/css/xadmin.css">
    <script type="text/javascript" src="<%=path%>/static/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="<%=path%>/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path%>/static/js/xadmin.js"></script>
    <script>
        var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
        $(function () {
            var flag = "${flag}";
            if (flag == 1) {
                parent.layer.alert("修改成功", {icon: 6}, function () {
                    parent.location.reload();
                    parent.layer.close(index); //执行关闭
                });
            }
        });
    </script>
</head>

<body>
<div class="x-body">
    <form class="layui-form" id="editForm" action="<%=path %>/order/update" method="post">
        <input type="hidden" value="${order.id}" name="id">
        <div class="layui-form-item">
            <label for="orderDate" class="layui-form-label">
                <span class="x-red">*</span>日期
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderDate" name="orderDate" required="" lay-verify="required" autocomplete="off"
                       value="${order.orderDate}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderName" class="layui-form-label">
                <span class="x-red">*</span>项目名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderName" name="orderName" required="" lay-verify="required" autocomplete="off"
                       value="${order.orderName}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderType" class="layui-form-label">
                <span class="x-red">*</span>类型
            </label>
            <div class="layui-input-inline">
                <select name="orderType">
                    <option value="定制" <c:if test="${order.orderType == '定制'}">selected</c:if> >定制</option>
                    <option value="成品" <c:if test="${order.orderType == '成品'}">selected</c:if> >成品</option>
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="orderDetail" class="layui-form-label">
                <span class="x-red"></span>描述
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderDetail" name="orderDetail"
                       autocomplete="off" value="${order.orderDetail}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderMoney" class="layui-form-label">
                <span class="x-red">*</span>金额
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderMoney" name="orderMoney" required="" lay-verify="required"
                       autocomplete="off" value="${order.orderMoney}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderDeposit" class="layui-form-label">
                <span class="x-red"></span>定金
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderDeposit" name="orderDeposit"
                       autocomplete="off" value="${order.orderDeposit}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderWangwang" class="layui-form-label">
                <span class="x-red"></span>旺旺名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderWangwang" name="orderWangwang"
                       autocomplete="off" value="${order.orderWangwang}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderContact" class="layui-form-label">
                <span class="x-red"></span>联系人
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderContact" name="orderContact"
                       autocomplete="off" value="${order.orderContact}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderPrincipal" class="layui-form-label">
                <span class="x-red"></span>负责人
            </label>
            <div class="layui-input-inline">
                <input type="text" id="orderPrincipal" name="orderPrincipal"
                       autocomplete="off" value="${order.orderPrincipal}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux"><span class="x-red"></span></div>
        </div>
        <div class="layui-form-item">
            <label for="orderShop" class="layui-form-label">
                <span class="x-red">*</span>淘宝店
            </label>
            <div class="layui-input-inline">
                <select name="orderShop">
                    <option value="feastcoding" <c:if test="${order.orderShop == 'feastcoding'}">selected</c:if> >feastcoding</option>
                    <option value="feastcode" <c:if test="${order.orderShop == 'feastcode'}">selected</c:if> >feastcode</option>
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label"></label>
            <button class="layui-btn" lay-filter="edit" lay-submit="">
                修改
            </button>
        </div>
    </form>
</div>
<script>
    layui.use('laydate',function(){
        var laydate = layui.laydate;
        laydate.render({
            elem: '#orderDate'
        })
    });
</script>
</body>
</html>