<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改订单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-tickets-edit" th:object="${orderDetailsVo}">
<!--        <input name="mid" th:field="*{mid}" type="hidden">-->
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">演出名称：</label>
            <div class="col-sm-8">
                <input name="performanceTitle" th:field="*{performanceVo.title}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">票名：</label>
            <div class="col-sm-8">
                <input name="performanceTitle" th:field="*{ticketsVo.title}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">单价：</label>
            <div class="col-sm-8">
                <input name="price" th:field="*{orderTicketVo.price}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">数量：</label>
            <div class="col-sm-8">
                <input name="number" th:field="*{orderTicketVo.number}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">适用日期：</label>
            <div class="col-sm-8">
                <input name="payCountdownMinute" th:field="*{ticketsVo.useStart}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">应付价格：</label>
            <div class="col-sm-8">
                <input name="priceTotal" th:field="*{orderTicketVo.priceTotal}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">优惠价格：</label>
            <div class="col-sm-8">
                <input name="priceVoucher" th:field="*{orderTicketVo.priceVoucher}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">实付价格：</label>
            <div class="col-sm-8">
                <input name="priceActual" th:field="*{orderTicketVo.priceActual}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">快递价格：</label>
            <div class="col-sm-8">
                <input name="priceExpress" th:field="*{orderTicketVo.priceExpress}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">退款价格：</label>
            <div class="col-sm-8">
                <input name="priceRefund" th:field="*{orderTicketVo.priceRefund}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">订单状态：</label>
            <div class="col-sm-8">
<!--                <input name="priceVoucher" th:field="*{orderTicketVo.}" class="form-control" type="text" required>-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">转增状态：</label>
            <div class="col-sm-8">
<!--                <input name="priceVoucher" th:field="*{priceVoucher}" class="form-control" type="text" required>-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">订单号：</label>
            <div class="col-sm-8">
                <input name="orderCode" th:field="*{orderTicketVo.orderCode}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生成时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
<!--                    <input name="createdAt" th:value="${#dates.format(orderTicketVo.createdAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
                    <input name="createdAt" th:value="*{orderTicketVo.createdAt}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实际支付方式：</label>
            <div class="col-sm-8">
                <select name="paymentType" th:with="type=${@dict.getType('zhengzai_pay_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{orderTicketVo.paymentType}" readonly></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">微信订单号：</label>
            <div class="col-sm-8">
<!--                <input name="orderCode" th:field="*{orderCode}" class="form-control" type="text" required>-->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">支付时间：</label>
            <div class="col-sm-8">
                <input name="timePay" th:field="*{orderTicketVo.timePay}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">取票方式：</label>
            <div class="col-sm-8" th:text="${@dict.getLabel('zhengzai_get_ticket_type',orderDetailsVo.orderTicketVo.getTicketType)}">
            </div>
        </div>
        <div th:each="ticketEntity,ticketEntityStat : *{orderTicketEntitiesVo}" class="select-list" >
            <label class="col-sm-3 control-label is-required">取票人[[${ticketEntityStat.count}]]：</label>
            <div class="col-sm-3">
                <input th:value="${ticketEntity.enterName}" class="form-control" type="text" readonly>
            </div>
            <label class="col-sm-3 control-label">证件号：</label>
            <div class="col-sm-3">
                <input th:value="${ticketEntity.enterIdCode}" class="form-control" type="text" readonly>
            </div>
            <label class="col-sm-3 control-label">电话：</label>
            <div class="col-sm-3">
                <input th:value="${ticketEntity.enterMobile}" class="form-control" type="text" readonly>
            </div>
            <label class="col-sm-3 control-label">票务状态：</label>
            <div class="col-sm-3">
                <input th:value="${@dict.getLabel('zhengzai_payment_type',ticketEntity.isPayment)}" class="form-control" type="text" readonly>
            </div>
            <label class="col-sm-3 control-label">出票状态：</label>
            <div class="col-sm-3">
                <input th:value="${@dict.getLabel('zhengzai_ticket_status',ticketEntity.status)}" class="form-control" type="text" readonly>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "kylin/tickets";
    var payTypeDatas = [[${@dict.getType('zhengzai_pay_type')}]];

    $("#form-tickets-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-tickets-edit').serialize());
        }
    }

    $("input[name='createdAt']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='updatedAt']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>