{layout:default} {class:Shop.Admin.user.UserMoney}
<lbhead>
    <title><%=Tag("会员资金")%>-<%=Tag("会员管理")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
        <ul>
            <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a>
                > <a href="<%=site.AdminPath %>/user/default.aspx"><%=Tag("会员管理")%></a> > <a href="<%=site.AdminPath %>/user/UserMoney.aspx"><%=Tag("会员资金")%></a><%if (user.UserName != ""){ %> > <%=user.UserName%><%} %></span>
           </li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <select name="type" id="type">
            <option value="0">┌ <%=Tag("类型")%></option>
            <%=Shop.Bussiness.EX_Type.TypeOption("MoneyType", type,CurrentLanguage.Code)%>
        </select>
        <input type="text" name="dateFrom" id="dateFrom" size="12" class="input-calendar" value="<%=dateFrom %>" /> - <input type="text" name="dateTo" id="dateTo" size="12" class="input-calendar" value="<%=dateTo %>" />
        <input name="key" type="text" id="key" class="input-query" value="<%=key %>" onkeydown="if(event.keyCode==13){search_();}" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" align="absmiddle" />
    </div>
    <table class="datalist">
        <tr class="title">
            <th style="width: 150px">
                <%=Tag("会员帐号")%>
            </th>
            <th style="width: 100px">
                <%=Tag("金额")%>
            </th>
            <th style="width: 100px">
                <%=Tag("余额")%>
            </th>
            <th style="width: 100px">
                <%=Tag("类型")%>
            </th>
            <th>
                <%=Tag("描述")%>
            </th>
            <th style="width: 150px">
                <%=Tag("时间")%>
            </th>
            <th style="width: 120px">
                <%=Tag("管理员")%>
            </th>
            <th style="width: 150px">
                <%=Tag("操作时间")%>
            </th>
            <th style="width: 100px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%decimal pagemoney = 0;foreach (DB.LebiShop.Lebi_User_Money model in models)
          {
           %>
        <tr class="list" ondblclick="EditObj(<%=model.User_id+","+ model.id %>);">
            <td>
                <a href="?user_id=<%=model.User_id %>"><%=model.User_UserName%></a>
            </td>
            <td>
                <%=FormatMoney(model.Money,"Number") %>
            </td>
            <td>
                <%=FormatMoney(model.Money_after,"Number") %>
            </td>
            <td>
                <%=Shop.Bussiness.EX_Type.TypeName(model.Type_id_MoneyType,CurrentLanguage.Code)%>
            </td>
            <td>
                <%=model.Remark %>&nbsp;
            </td>
            <td>
                <%=FormatTime(model.Time_Add) %>
            </td>
            <td>
                <%if (model.Admin_UserName != "")
                  {%><%=model.Admin_UserName %><%}else{%>&nbsp;<%} %>
            </td>
            <td>
                <%if (model.Admin_UserName != "")
                  {%><%=FormatTime(model.Time_Update) %><%}else{%>&nbsp;<%} %>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="EditObj('<%=model.User_UserName%>',<%=model.id %>);"><%=Tag("编辑")%></a> 
            </td>
        </tr>
        <%pagemoney += model.Money;} %>
        <tr class="list">
            <td align="right">
                <%=Tag("小计") %>：
            </td>
            <td colspan="6">
                <strong><%=pagemoney %></strong>
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        function search_() {
            var key = $("#key").val();
            var dateFrom = $("#dateFrom").val();
            var dateTo = $("#dateTo").val();
            var type = $("#type").val();
            window.location = "?key=" + escape(key) + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&type=" + type;
        }
        function EditObj(User_Name,id) {
            var title_ = "<%=Tag("编辑资金")%>";
            if (id ==0)
                var title_ = "<%=Tag("添加资金")%>";
            var url_ = "usermoney_edit_window.aspx?User_Name=" + User_Name+"&id="+id;
            var width_ = 600;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
    </script>
</lbbody>
<lbbottom>
    <div class="bottom" id="body_bottom">
        <%=PageString%>
    </div>
</lbbottom>