<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('折扣券详情')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m table-striped">
        <div class="form-group">
            <label class="col-sm-3 control-label">券标题：</label>
            <div class="form-control-static col-sm-2">
                [[${mgtCouponInfoDto?.title}]]
            </div>
            <label class="col-sm-3 control-label">发放状态：</label>
            <div class="form-control-static col-sm-4">
                [[${@dict.getLabel('zhengzai_coupon_mgt_state', mgtCouponInfoDto?.state)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">描述说明（App显示）：</label>
            <div class="form-control-static col-sm-9">
                [[${mgtCouponInfoDto?.notice}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">适用范围：</label>
            <div class="form-control-static col-sm-9">
                [[${couponRule?.busiName}]][[${busiNameChildNode}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">券类别：</label>
            <div class="form-control-static col-sm-9">
                [[${@dict.getLabel('zhengzai_coupon_busi_type', mgtCouponInfoDto?.busiType)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="form-control-static col-sm-2">
                [[${@dict.getLabel('zhengzai_coupon_bind_type', mgtCouponInfoDto?.bindType)}]]
            </div>
            <label class="col-sm-3 control-label" th:if="${mgtCouponInfoDto?.bindType == 1 || mgtCouponInfoDto?.bindType == 3}">发送类型：</label>
            <div class="form-control-static col-sm-4" th:if="${mgtCouponInfoDto?.bindType == 1 || mgtCouponInfoDto?.bindType == 3}">
                [[${@dict.getLabel('zhengzai_coupon_event_type', mgtCouponInfoDto?.eventType)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">折扣：</label>
            <div class="form-control-static col-sm-2">
                [[${mgtCouponInfoDto?.discount}]] 折
            </div>
            <label class="col-sm-3 control-label">数量：</label>
            <div class="form-control-static col-sm-4">
                [[${mgtCouponInfoDto?.eventAmt}]][[${mgtCouponInfoDto?.bindType == 0 ? ' 张' : ' 张/账户'}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">券的有效期：</label>
            <div class="form-control-static col-sm-9">
                [[${mgtCouponInfoDto?.validity}]] 天
            </div>
        </div>
        <div class="form-group" id="show_detail_redeemValidity">
            <label class="col-sm-3 control-label">兑换有效期：</label>
            <div class="form-control-static col-sm-9">
                [[${mgtCouponInfoDto?.redeemValidity}]] 天
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生效时间：</label>
            <div class="form-control-static col-sm-3">
                [[${#strings.substring(mgtCouponInfoDto?.effectAt,0,19)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">失效时间：</label>
            <div class="form-control-static col-sm-9">
                [[${#strings.substring(mgtCouponInfoDto?.expireAt,0,19)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生成时间：</label>
            <div class="form-control-static col-sm-9">
                [[${#strings.substring(mgtCouponInfoDto?.createdAt,0,19)}]]
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">发放时间：</label>
            <div class="form-control-static col-sm-9">
                [[${#strings.substring(mgtCouponInfoDto?.eventAt,0,19)}]]
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    const detailVo = /*[[${mgtCouponInfoDto}]]*/{};
    if (!$.isEmptyObject(detailVo) && detailVo.bindType === 0) {
        $("#show_detail_redeemValidity").show();
    } else {
        $("#show_detail_redeemValidity").hide();
    }
</script>
</body>
</html>