<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_Withdrawnotelist, LebiMall" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>提现审批操作</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        var page='<%=page %>';
        function initw(){
            var state='<%=state %>';
            var lists=document.getElementById("select1");
            for(var i=0;i<lists.length;i++){
                if(state==lists[i].value){
                    lists[i].selected=true;
                    break;
                }
            }
        }
        function update(id_,wtate){
            if(wtate==0){
                window.location.href="Withdrawnotelistm.aspx?id="+id_+"&type=update&page="+page;
            }else{
                alert("您已经审批过了不能重复操作！");
            }
        }
        function del(id){
            if (confirm("确认要删除？")) {
                window.location.href="Withdrawnotelistm.aspx?id="+id+"&type=del&page="+page;
            }
        }
        function updates(){
            document.getElementById("form1").submit();
        }
        function dels(){
            var form =document.forms[0];
            var strid="";
            if (confirm("确认要删除？")) {
                for(i=0;i<form.elements.length;i++)
                {
                    if(form.elements[i].type=="checkbox")
                    {
                        if(form.elements[i].checked==true){
                            strid+=form.elements[i].value+",";
                        }
                    }
                }
                if(strid!="")
                window.location.href="Withdrawnotelistm.aspx?strid="+strid+"&type=dels&page="+page;
            }
        }
        function updates(){
            var form =document.forms[0];
            var strid="";
            for(i=0;i<form.elements.length;i++)
            {
                if(form.elements[i].type=="checkbox")
                {
                    if(form.elements[i].checked==true){
                        strid+=form.elements[i].value+",";
                    }
                }
            }
            if(strid!=""){
                document.getElementById("list_id").value=strid;
                form.submit();
            }
        }
        function selectw(){
            var strkey=document.getElementById("strkey").value;
            var isf=document.getElementById("Select1").value;
            var stime=escape(document.getElementById("txt_starttime").value);
            var etime=escape(document.getElementById("txt_endtime").value);
            window.location.href="Withdrawnotelist.aspx?strkey="+escape(strkey)+"&stime="+stime+"&etime="+etime+"&isf="+isf+"&page=1";
        }
    </script>
</head>
<body onload="initw();">
<form id="form1" runat="server" method="post">
<script>header(1,2,"images/");</script>
        <div class="blank clearfix">
        </div>
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="Withdrawlist.aspx"><span>提现管理</span></a></li>
                <li><a href="WithdrawelM.aspx"><span>提现设置</span></a></li>
                <li class="current"><a href="withdrawnotelist.aspx"><span>申请提现</span></a></li>
            </ul>
        </div>
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix" style="padding:3px 0 3px 4px">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width:70px">
                                <select id="Select1">
                                    <option value="-1">全部</option>
                                    <option value="1">已操作</option>
                                    <option value="0">未操作</option>
                                </select>
                            </td>
                            <td width="125px"><input type="text" id="txt_starttime"  runat=server class="texttime" style="width: 100px;"
                                onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',skin:'whyGreen',autoPickDate:'null'})" /></td>
                            <td width="5px">-</td>
                            <td width="130px"><input type="text" id="txt_endtime" runat=server class="texttime" style="width: 100px;" 
                                onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',skin:'whyGreen',autoPickDate:'null'})" /></td>
                            <td><input type=text class=input id="strkey" style="width:150px;" runat="server" /><input type=button class="btn-search" onclick="selectw();" /></td>
                        </tr>
                        <tr>
                            <td colspan="6" style="height:30px;"> 
                                <input type="image" border="0" title=" 保存 " onclick="updates();return false;" src="images/bt_app.gif" align="absmiddle" />
                                <input type="image" title=" 删除 " onClick="dels();return false;" src="images/bt_delete.gif" align="absmiddle" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="datalist">
                    <table cellspacing="0" width="100%" cellpadding="0" id="list">
                        <tr>
                            <td colspan="9" class="list-head">
                            
                            </td>
                        </tr>
                        <tr>
                            <th style="width: 5%; cursor: pointer;" title="全选" onclick="AllChecked()">
                                选择</th>
                            <th style="width: 26%">
                                用户名</th>
                            <th style="width: 8%">
                                余额(元) 
                            </th>
                            <th style="width: 10%">
                                冻结金额(元) 
                            </th>
                            <th style="width: 10%">
                                申请提现(元)
                            </th>
                            <th style="width: 13%">
                                申请提现时间
                            </th>
                            <th style="width: 10%">
                                是否操作
                            </th>
                            <th style="width: 13%">
                                操作时间
                            </th>
                            <th style="width: 5%">
                                操作
                            </th>
                        </tr>
                        <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++){%>
                        <tr>
                            <td>
                                <input type="checkbox" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                                <input type="hidden" id="hidden_id<%=i %>" name="hidden_id<%=i %>" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                                <input type="hidden" id="h_uid<%=i %>" name="h_uid<%=i %>" value="<%=ds.Tables[0].Rows[i]["uid"] %>" />
                            </td>
                            <td>
                                <%=subStr(ds.Tables[0].Rows[i]["username"].ToString()) %>
                            </td>
                            <td>
                                <%=ds.Tables[0].Rows[i]["balance"] %>
                            </td>
                            <td>
                                <%=ds.Tables[0].Rows[i]["djmoney"] %>
                            </td>
                            <td>
                               <%=ds.Tables[0].Rows[i]["wmoney"] %>
                               <input type="hidden" id="h_wmoney<%=i %>" name="h_wmoney<%=i %>" value="<%=ds.Tables[0].Rows[i]["wmoney"] %>" />
                            </td>
                            <td>
                                <%=ds.Tables[0].Rows[i]["submittime"]%>
                            </td>
                            <td>
                                <%if (ds.Tables[0].Rows[i]["wstate"].ToString()=="0") {%>未操作<%}else{ %><span style="color:Red">已操作</span><%} %>
                                <input type="hidden" id="h_wstate<%=i %>" name="h_wstate<%=i %>" value="<%=ds.Tables[0].Rows[i]["wstate"] %>" />
                            </td>
                            <td>
                               <%=ds.Tables[0].Rows[i]["submittimeadmin"] %>&nbsp;
                            </td>
                            <td>
                                <a href="javascript:update(<%=ds.Tables[0].Rows[i]["id"] %>,<%=ds.Tables[0].Rows[i]["wstate"]  %>)">操作</a>
                            </td>
                        </tr>
                        <%} %>
                        <tr>
                            <td colspan="9" class="list-foot">
                                <div style="float: left; padding-top: 3px;">
                                </div>
                                <div id="divAsp" runat="server" style="float: right; padding-top: 3px;">
                                    <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                        runat="server" RecordCount="228" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                        PrevPageText="上一页" PageSize="20" UrlPaging="True" CustomInfoClass="pages1" CurrentPageButtonPosition="Center" ShowBoxThreshold="50"
                                        ShowFirstLast="true" NumericButtonCount="4" BackColor="Transparent" ShowDisabledButtons="False" EnableViewState="False">
                                    </webdiyer:AspNetPager>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <input type=hidden id="list_id" runat=server />
                    <script type="text/javascript">tdshowm("list");</script>
                </div>
        </div>
    </div>
</form>
</body>
</html>
