<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderSearch.aspx.cs" Inherits="JRAPI.Admin.OrderForm.OrderSearch" %>
<%@ Register src="../Controls/SubPageTop.ascx" tagname="SubPageTop" tagprefix="uc1" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<uc1:SubPageTop ID="SubPageTop1" runat="server" />
<script type="text/javascript">
    $(function () {
        $(".linkid").click(function () {
            var txt = $(this).text();
            copyToClipboard(txt);
        });
    })
</script>
<body>
<form id="Form1" runat="server">
<style type="text/css">
	html{_overflow-y:scroll}
</style><div class="pad-lr-10"  style="margin-top:10px">
<div width="100%" cellspacing="0" class="search-form" >
<script src="../statics/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

		<div class="explain-col" style="line-height:30px">
                订单日期:<input id="startDate" type="text" readonly="readonly" onfocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss'})" runat="server" class="date" />
                至<input id="endDate" type="text" readonly="readonly" onfocus="WdatePicker({startDate:'%y-%M-%d 00:59:59',dateFmt:'yyyy-MM-dd HH:mm:ss'})" runat="server" class="date"/>
                商户编号:<asp:TextBox ID="txtUserID" runat="server"></asp:TextBox> 
                <br />
				订 单 号:<asp:TextBox ID="txtBillNo" runat="server" 
                    Width="220px"></asp:TextBox> 
                商户订单:<asp:TextBox ID="txtLinkID" runat="server"></asp:TextBox>
                充值卡号:<asp:TextBox ID="txtCardNo" runat="server"></asp:TextBox> <br />
                
                支付网关:<asp:DropDownList ID="dpdGate" runat="server" 
                    AppendDataBoundItems="True"><asp:ListItem Value="0">选择网关</asp:ListItem></asp:DropDownList> 
                使用通道:<asp:DropDownList ID="dpdChannel" runat="server" 
                    AppendDataBoundItems="True"><asp:ListItem Value="0">选择通道</asp:ListItem></asp:DropDownList> 
                订单类型:<asp:DropDownList ID="dpdPayType" runat="server"><asp:ListItem Value="0">所有</asp:ListItem>
                    <asp:ListItem Value="1">网银</asp:ListItem>
                    <asp:ListItem Value="2">点卡</asp:ListItem>
                    <asp:ListItem Value="3">支付宝</asp:ListItem>
                    <asp:ListItem Value="4">财付通</asp:ListItem>
                    <asp:ListItem Value="5">微信</asp:ListItem>
                </asp:DropDownList> 订单状态:<asp:DropDownList ID="dpdGateStatus" runat="server">
                    <asp:ListItem Value="-1">所有</asp:ListItem>
                    <asp:ListItem Value="0">支付中</asp:ListItem>
                    <asp:ListItem Value="1" Selected="True">成功</asp:ListItem>
                    <asp:ListItem Value="2">失败</asp:ListItem>
            </asp:DropDownList> 下发状态:<asp:DropDownList ID="dpdSendStatus" runat="server">
                    <asp:ListItem Value="-1">所有</asp:ListItem>
                    <asp:ListItem Value="0">未发送</asp:ListItem>
                    <asp:ListItem Value="1">成功</asp:ListItem>
                    <asp:ListItem Value="2">失败</asp:ListItem>
            </asp:DropDownList>
            
	            &nbsp;<asp:Button ID="btnSearch" runat="server" Text="检 索" CssClass="button" 
                    onclick="btnSearch_Click" />&nbsp;&nbsp;
                    <!---<asp:Button ID="btnCardExcel" runat="server" CssClass="button" 
                    Text="导出点卡Excel" onclick="btnCardExcel_Click" />&nbsp;
                    <asp:Button ID="btnBankExcel" runat="server" CssClass="button" 
                    Text="导出网银Excel" onclick="btnBankExcel_Click" /> --->
                    <br />总成功金额:<font color=red><asp:Literal ID="liAllMoney" runat="server"></asp:Literal></font>元&nbsp;&nbsp;平台收益:<font color=red><asp:Literal ID="liSysPrice" runat="server"></asp:Literal></font>元
                    &nbsp;&nbsp;商户收益:<font color=red><asp:Literal ID="liUserPrice" runat="server"></asp:Literal></font>元 &nbsp;&nbsp;代理收益:<font color=red><asp:Literal ID="liAgentPrice" runat="server"></asp:Literal></font>元
	    </div>
</div>
<div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
            <th align="center">序号</th>
			<th align="center">商户ID</th>
			<th align="center">订单号码</th>
			<th align="center">支付方式</th>
			<th align="center">支付通道</th>
			<th align="center">提交金额</th>
			<th align="center">成功金额</th>
			<th align="center">平台收益</th>
			<!---<th align="center">代理收益</th>--->
			<th align="center">商户收益</th>
			<th align="center">提交时间</th>
			<th align="center">完成时间</th>
			<th align="center">订单状态</th>
			<th align="center">下发状态</th>
            <th align="center">操作</th>
            </tr>
        </thead>
    <tbody>
        <asp:Repeater ID="repList" runat="server">
            <ItemTemplate>
	            <tr style="cursor:pointer;" title="点击查看订单详情">
	            <td align="center"><%# Eval("OrderID")%></td>
	            <td align="center"><%# Eval("UserID")%></td>
	            <td align="center"><a href="javascript:void(0);" class="linkid"><%# Eval("BillNO")%></a></td>
	            <td align="center"><%# JRAPI.Common.pub.getGateTypeStr(JRAPI.Common.TypeConverter.ObjectToInt(Eval("paytype")))%></td>
	            <td align="center"><%# Eval("ChannelName")%></td>
	            <td align="center"><%# Eval("OrderMoney")%></td>
	            <td align="center"><%# Eval("Realmoney")%></td>
	            <td align="center"><%# Eval("SysMoney")%></td>
	            <!---<td align="center"><%# Eval("AgentMoney")%></td>--->
	            <td align="center"><%# Eval("UserMoney")%></td>
	            <td align="center"><%# Eval("PayDate")%></td>
	            <td align="center"><%# Eval("GiveDate")%></td>
	            <td align="center"><%# JRAPI.Common.pub.getOrderStatus(JRAPI.Common.TypeConverter.ObjectToInt(Eval("OrderStatus")))%><%# Eval("OrderStatus").ToString()!="1"?"&nbsp;<a href='order_success.aspx?orderid="+Eval("orderid")+"'>补单</a>":""%></td>
	            <td align="center"><%# JRAPI.Common.pub.getSendStatus(JRAPI.Common.TypeConverter.ObjectToInt(Eval("SendStatus")))%></td>
                <td align="center"><a href="javascript:void(0);" onclick="showRow('<%# Eval("OrderID")%>');">详情</a>&nbsp;<%# Convert.ToInt32(Eval("OrderStatus")) > 0 ? "<a href=\"Order_Send.aspx?orderid=" + Eval("OrderID") + "\">订单重发</a>" : ""%></td>
	            </tr>
                <tr id="append_<%# Eval("OrderID")%>" style="display:none;">
                    <td colspan="17"><font color=blue>接口网关:<font color=red><%# Eval("GateName")%></font>&nbsp;&nbsp;&nbsp;&nbsp;商户订单号:<font color=red><a href="javascript:void(0);" class="linkid"><%# Eval("LinkID")%></a></font>&nbsp;&nbsp;&nbsp;&nbsp;<%# Eval("paytype").ToString() == "2" ? "充值卡卡号:<font color=red>" + Eval("CardNumber") + "</font>&nbsp;&nbsp;充值卡卡密:<font color=red>" + Eval("CardPass") + "</font>" : ""%>&nbsp;&nbsp;&nbsp;&nbsp;
                    <%# Eval("OrderStatus").ToString() == "2" ? "上级网关错误信息:<font color=red>" + Eval("GateMsg") + "</font>" : ""%>&nbsp;&nbsp;&nbsp;&nbsp;
                    <%# Eval("SendStatus").ToString() == "2" ? "客户端返回信息:<font color=red>" + Eval("SendMsg") + "</font>" : ""%>
                    &nbsp;&nbsp;提交IP:<%# Eval("UserIp")%>&nbsp;&nbsp;提交来路:<%# JRAPI.Common.pub.getChannelType(Convert.ToInt32(Eval("ChannelType")))%>
                    </font>
                    </td>
                </tr>            </ItemTemplate>
        </asp:Repeater>

</tbody>
    </table>
    
    </div>
     <webdiyer:AspNetPager ID="pages" runat="server" FirstPageText="首页" LastPageText="尾页"
                                            NextPageText="下一页" PrevPageText="上一页" 
        AlwaysShow="True" PageSize="20" UrlPageIndexName="pageindex" CustomInfoHTML="共有%RecordCount%条数据,每页%PageSize%条,当前第%CurrentPageIndex%页,共%PageCount%页"
                                            ShowCustomInfoSection="Left"  CurrentPageButtonClass="current"   
        CustomInfoClass="pxofy" 
        NavigationClass="pagin-list" onpagechanging="PageList_PageChanging" 
        PageIndexBoxClass="gotoinput" SubmitButtonClass="gotobtn" 
        FirstLastButtonsClass="a1" PagingButtonsClass="" PrevNextButtonsClass="a1">
                                        </webdiyer:AspNetPager>

</div></form>
</body>
</html>