<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../Global.Master" CodeBehind="ReNewOrders.aspx.cs" Inherits="Web.AdminManager.Product.ReNewOrders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/Product.ReNewOrders.js"></script>
    <script type="text/javascript">
        $(function () {
            function CheckSuccessType() {
                if ($(".SuccessType").val() == "1") {
                    $(".ui-enddate").css("display", "block");
                } else {
                    $(".ui-enddate").css("display", "none");
                }
            }
            $(".SuccessType").change(function () {
                CheckSuccessType();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div runat="server" id="UI_Edit" visible="false">
        <form class="ui-form ui-form-vertical" method="post" action="ReNewOrders.aspx?Action=SetSuccess&Id=<%=mor[0]["Id"] %>">
            <div class="ui-form-group">
                <label class="ui-form-label">订单名称</label><div class="ui-form-ctrls">
                    <%=mor[0]["OrderName"] %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">下单时间</label><div class="ui-form-ctrls">
                    <%=mor[0]["AddDate"] %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">处理时间</label><div class="ui-form-ctrls">
                    <%=mor[0]["OKDate"] %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">状态</label><div class="ui-form-ctrls">
                    <%=(bool)mor[0]["Success"]?"成功":"待处理" %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">接口消息</label><div class="ui-form-ctrls">
                    <%=Server.HtmlEncode(mor[0]["Msg"].ToString()) %>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">状态修改方式</label>
                <div class="ui-form-ctrls">
                    <select name="SuccessType" class="SuccessType">
                        <option value="1">手动</option>
                        <option value="2">自动</option>
                    </select>
                    <span class="ui-help-inline">如果使用自动模式，系统将再次请求接口执行本操作，请根据实际情况选择</span>
                </div>
            </div>
            <div class="ui-form-group ui-enddate">
                <label class="ui-form-label">到期时间</label>
                <div class="ui-form-ctrls">
                    <input type="text" class="ui-input-small" value="<%=((DateTime)mor[0]["EndDate"]).ToString("yyyy-MM-dd") %>" name="EndDate" />
                    <span class="ui-help-inline"></span>
                </div>
            </div>
            <div class="ui-form-group">
                <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                    <%if (!(bool)mor[0]["Success"])
                      { %>
                    <button class="ui-btn ui-btn-primary" type="submit">设为已成功</button>
                    <%} %>
                    <button class="ui-btn" type="button" onclick="history.back();">返回</button>
                </div>
            </div>
        </form>
    </div>
    <div runat="server" id="UI_List" visible="false">
        <table class="ui-table ui-table-striped">
            <thead>
                <tr>
                    <th>续费编号</th>
                    <th>订单编号</th>
                    <th>订单名称</th>
                    <th>产品类型</th>
                    <th>下单时间</th>
                    <th>续费时长</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <%=OrderListString %>
            <tr>
                <td colspan="8" class="Pager"><%=PagerString %></td>
            </tr>
        </table>
    </div>
</asp:Content>
