<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="rewards.aspx.cs" Inherits="zhongchou.AddProject.rewards" %>

<asp:Content ID="Content1" ContentPlaceHolderID="titleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../Images/ee7ae0c1751620090a1f580e44d12fbaeb28.css" rel="stylesheet" type="text/css" />
    <style>
        .edui-image ul li { width: 92px; height: 90px; padding: 10px 20px 10px 0px; float: left; }
        .edui-image ul li a { width: 90px; height: 90px; border: 1px solid #eaeaea; display: block; position: relative; }
        .edui-image ul li img { width: 90px; height: 90px; }
        .edui-image ul li a .pos-bg { width: 100%; height: 22px; display: none; background: #FFF; filter: alpha(opacity:70); opacity: 0.7; position: absolute; left: 0; top: 70px; z-index: 2; }
        .edui-image ul li a .pos-opt { width: 100%; height: 22px; text-align: center; display: none; position: absolute; left: 0; top: 70px; z-index: 3; }
        .hblx { height: 36px; float: left; font-size: 14px; line-height: 18px; color: #555; padding: 4px 5px; margin-left: 5px; border: 1px solid #bababa; border-radius: 3px; position: relative; }
        .form-item .input-notes { line-height: 45px; }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="process">
        <!--flow step static-->
        <div class="project-edit-nav">
            <h3 class="steps-2">
                回报设置</h3>
        </div>
        <!--flow step end-->
    </div>
    <!--main static-->
    <div class="main clearfix">
        <div class="process-wrap clearfix">
            <div class="tit-wrap">
                <h3>
                    项目信息</h3>
            </div>
            <!--project start-->
            <div class="project-box">
                <div class="project-con fl w760">
                    <div class="project-set">
                        <!--project-info static-->
                        <div class="project-info">
                            <table>
                                <colgroup>
                                    <col width="120" />
                                    <col width="60" />
                                    <col width="290" />
                                    <col width="80" />
                                    <col width="60" />
                                    <col width="60" />
                                </colgroup>
                                <thead>
                                    <tr>
                                        <td>
                                            支持金额
                                        </td>
                                        <td>
                                            名额
                                        </td>
                                        <td>
                                            回报内容
                                        </td>
                                        <td>
                                            回报时间
                                        </td>
                                        <td>
                                            运费
                                        </td>
                                        <td>
                                            操作
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="ListRP" runat="server">
                                        <ItemTemplate>
                                            <tr>
                                                <td class="strong">
                                                    ¥<%#Eval("money") %>
                                                </td>
                                                <td>
                                                    <%#Eval("CountLimit").ToString() == "0"?"不限额" : Eval("CountLimit") %>
                                                </td>
                                                <td class="tl">
                                                    <%#Eval("jianjie").ToString().Length>50? Eval("jianjie").ToString().Substring(0,50)+"...":Eval("jianjie") %>
                                                </td>
                                                <td>
                                                    <%#Eval("need") %>
                                                </td>
                                                <td>
                                                    ￥<%#Eval("needmoney") %>
                                                </td>
                                                <td>
                                                    <a data-id="<%#Eval("id") %>" class="green Js-del-item">删除</a><br />
                                                    <a class="green Js-edit" href="rewards.aspx?id=<%#Eval("ProjectID") %>&pid=<%#Eval("id") %>" href="javascript:;">编辑</a>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </div>
                        <!--project-info end-->
                        <!--project-set-form static-->
                        <div class="project-set-form">
                            <div id="Js-edit-num" class="form-item-tit">
                                支持回报选项</div>
                            <div class="form-item clearfix">
                                <label>
                                    支持金额：</label>
                                <input type="text" class="w188 " onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');" name="money" value="<%=show.money %>" />
                                <em>元</em>
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    回报内容：</label>
                                <textarea class="return-textarea" name="content" placeholder="请填写关于回报或任何你希望项目发起人知道的信息,不多于500字" maxlength="500"><%=show.jianjie %></textarea>                                
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    说明图片：</label>
                                <div class="edui-image up-btn fs14">
                                    <div class="ipt-file">
                                        <input class="photo file" accept="image/gif,image/jpeg,image/png,image/pjpeg,image/x-png" id="rew_logo" name="rew_logo" type="file" runat="server"><br>
                                        <input class="photo file" accept="image/gif,image/jpeg,image/png,image/pjpeg,image/x-png" id="rew_logo2" name="rew_logo2" type="file" runat="server"><br>
                                        <input class="photo file" accept="image/gif,image/jpeg,image/png,image/pjpeg,image/x-png" id="rew_logo3" name="rew_logo3" type="file" runat="server">
                                    </div>
                                    <span class="gray">支持jpg、jpeg、png、gif格式，大小不超过500KB。<%=!string.IsNullOrEmpty(Request.QueryString["id"]) ? "，<b>如不需要重新上传图片，请勿动此处<b>":""%></span>
                                    <ul id="JS-deal_item_imgload" class="clearfix" style="clear: both;">
                                    </ul>
                                </div>
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    限定名额：</label>
                                <input class="w188" type="text" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');" placeholder="“0”为不限名额" name="limit_num" class="inp-w68" value="<%=show.CountLimit %>" />
                                <em>个</em> <span class="input-tips gray">“0”为不限名额</span>
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    运费：</label>
                                <input class="w188" type="text" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');" placeholder="“0”为不收运费" name="delivery_fee" value="<%=show.needMoney %>" />
                                <em>元</em> <span class="input-tips gray">“0”为不收运费</span>
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    回报时间：</label>
                                <em class="w80"></em>
                                <input class="w107" type="text" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');" maxlength="2" placeholder="“0”为项目结束后立即发送" name="day" value="<%=show.returnDay %>" />
                                 <em>天</em> <span class="input-tips gray">“0”为项目结束后立即发送</span>
                            </div>
                            <div class="form-item clearfix">
                                <label>
                                    回报类型：</label>
                                <input class="hblx" <%=show.need == "实物回报" ? "checked" : "" %> name="return_type" id="return_type1" type="radio" group='grp_return_type' value="实物回报" />
                                <span class="input-notes">实物回报(需要快递／邮寄的)</span>
                                <input class="hblx" <%=show.need == "虚拟回报" ? "checked" : "" %> name="return_type" id="return_type2" type="radio" group='grp_return_type' value="虚拟回报" />
                                <span class="input-notes">虚拟回报(不需要快递/邮寄的，电子照片等)</span>
                            </div>
                            <div class="form-submit" name="finish">
                                <asp:Button ID="Button1" runat="server" class="remin-save" Text="保存回报" OnClick="Button1_Click" />
                                <input id="Reset1" type="reset" value="取消保存" class="remin-save" />
                            </div>
                            <div class="action fl">
                                <input id="Button3" class="btn-effect-blue btn-sub w170" type="button" value="上一步" onclick="javascript:history.go(-1);" />
                                <asp:Button ID="nextButton" runat="server" Text="下一步" class="btn-effect-blue btn-sub w170" onclick="nextButton_Click" />
                            </div>
                        </div>
                        <!--project-set-form static-->
                    </div>
                </div>
                <!--project end-->
                <!--side static-->
                <div class="sidebar w413 fr">
                    <!--side-list static-->
                    <div class="reminder fs14">
                        <h3>
                            温馨提示</h3>
                        <p class="black fb">
                            3个以上的回报</p>
                        <p>
                            多些选择能提高项目的支持率。</p>
                        <p class="black fb">
                            几十、几百、上千元的支持</p>
                        <p>
                            3个不同档次的回报，能让你的项目 更快成功。</p>
                        <p class="black fb">
                            回报最好是项目的衍生品</p>
                        <p>
                            与项目内容有关的回报更能吸引到大家的支持。</p>
                    </div>
                    <!--side-list end-->
                </div>
                <!--side end-->
            </div>
        </div>
    </div>
    <script src="../Images/4d7c9e426f1a32e3f16c4f53b8c9cdcf.js" type="text/javascript"></script>
    <script>
        $("#add_item_button").click(function () {
            $("#add_item_form").show("slow");
            $("#project-add-item").hide();
        });

        $("#cancel_item").click(function () {
            location.reload();
        });

        $(".Js-del-item").click(function () {
            var id = $(this).attr("data-id");
            wx.confirm("确认删除吗?", function () {
                $.ajax({
                    url: 'rewards.aspx?action=del&id=' + id,
                    type: 'get',
                    data: {},
                    cache: false,
                    success: function (data) {
                        location.reload();
                    },
                    error: function (data) {
                        alert(data);
                    }
                });
            });
        });        
    </script>
</asp:Content>
