<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="charge_v2.aspx.cs" Inherits="VA.Modules.JDingMember.consume.charge_v2" %>

<!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>
    <title>消费收银</title>
    <!--#include virtual="/include/css/edit.aspx"-->
    <link href="/uicontrols/jtongui/themes/<% = webSiteConfig.ThemeName %>/tabs.css" type="text/css" rel="Stylesheet" />
    <link href="/app_themes/<% = webSiteConfig.ThemeName %>/css/pages/consume.css" type="text/css" rel="Stylesheet" />
    <!--#include virtual="/include/js/edit.aspx"-->         
    <script type="text/javascript" src="/uicontrols/jtongui/plugins/jtong.tabs.js"></script>
    <script type="text/javascript" src="/scripts/page/consume_charge_v2.js"></script>
</head>
<body>
<form id="Form1" method="post" runat="server">

<div id="wrapper" style="height:1%;overflow:hidden;">

<div class="editPageWrapper" style="width:700px;float:left;">

<div class="centerFormTitle">
   <h1>消费收银</h1>
</div>

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-bottom:-1px;">
<tr>
<td style="font-weight:bold;text-align:right;">
    <asp:CheckBox ID="ckbIsFreeCustomer" runat="server"
         Text="散客" />
</td>
</tr>
</table>

<!--#include file="../include/memberinfo-simple2.aspx"--> 

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td class="th" style="font-weight:bold;text-align:left;">消费清单</td>
</tr>
</table>
<div class="formEditListTableWrapper" style="min-height:255px;">
<table cellspacing="0" class="formEditListTable" id="srcTable" style="width:700px;margin-top:-1px;">
<thead>
<tr>
<td style="width:30px;text-align:center;">No.</td>
<td style="width:70px;text-align:center;">项目代码</td>
<td style="width:190px;text-align:center;">项目名称</td>
<td style="width:40px;text-align:center;">单位</td>
<td style="width:50px;text-align:center;">单价</td>    
<td style="width:60px;text-align:center;">折后单价</td>    
<td style="width:40px;text-align:center;">数量</td>
<td style="width:60px;text-align:center;">折后金额</td>
<td style="width:50px;text-align:center;">优惠</td>
<td style="width:50px;text-align:center;">服务员</td>
<td style="text-align:center;">操作</td>
</tr>    
</thead>    

<tbody>
</tbody>
</table>

<table id="tbNoRecord" cellspacing="0" cellpadding="3"  style="margin-top:-1px;width:100%;">
<tr>
<td style="text-align:center;height:175px;font-size:14px;">
    暂无数据
</td>
</tr>
</table>
</div><!--formEditListTableWrapper.END-->

<table id="Table1" cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td style="text-align:right;">
    商品/服务项目：
    <VACTL:TextBox ID="txtItemName" Runat="server"
                EnableViewState="False"
                CssClass="input"
                Width="200px"
                />
    <asp:HiddenField runat="server" id="txtItemName_hiddenValue" />  
    <input type="button" id="btnClearItems" class="simpleBtn" onclick="clearItems()" value="清除项目" />    

    服务员：
    <VACTL:TextBox ID="txtWaiter" Runat="server"
                EnableViewState="False"
                CssClass="input"
                onfocus="JTongSmartDropDownList_OnfocusHandler(this, '../smartdropdownlist_datasrc/get_employees.aspx',true,true,300,180);"
                Width="110px"
                />
    <asp:HiddenField runat="server" id="txtWaiter_hiddenValue" />  
    <input type="button" id="btnClearWaiters" class="simpleBtn" onclick="clearWaiters()" value="清除服务员" />    
</td>
</tr>
</table>

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td class="th">消费总额：</td>
<td style="width:119px;">
    <VACTL:TextBox runat="server" ID="txtTotalAmount" 
            CssClass="input" 
            Width="110px"
            CanBeNull="No"
            FieldName="消费总额"
            RequiredFieldType="Money"
            Enabled="false"
            Font-Bold="true"
            />
    <asp:HiddenField runat="server" id="hfTotalAmount" />
    <asp:HiddenField runat="server" id="hfStrategyCode" />
    <asp:HiddenField runat="server" id="hfStrategyName" />
</td>
<td class="th">优惠金额：</td>
<td>
    <VACTL:TextBox runat="server" ID="txtDiscountAmount" 
            CssClass="input" 
            Width="110px"
            CanBeNull="No"
            FieldName="优惠金额"
            RequiredFieldType="Money"
            Text="0.00"
            Enabled="false"
            Font-Bold="true"
            />
</td>
<td class="th">实收金额：</td>
<td>
    <VACTL:TextBox runat="server" ID="txtRealChargeAmount" 
            CssClass="input" 
            Width="110px"
            CanBeNull="No"
            FieldName="支付金额"
            Font-Bold="true"            
            />     

    <div style="display:none;">
    应收金额：
    <VACTL:TextBox runat="server" ID="txtChargeAmount" 
            CssClass="input" 
            Width="110px"
            CanBeNull="No"
            FieldName="实收金额"
            Enabled="false"
            Font-Bold="true"
            
            />
    <asp:HiddenField runat="server" id="hfChargeAmount" />
    <span id="spanSaleStrategyApplyDesc" style="color:green;font-weight:bold;">提示：系统自动应用了优惠策略：满100减20</span>
    </div>
            
</td>
</tr>
<tr>
<td class="th">支付方式：</td>
<td>
    <asp:DropDownList ID="ddlPayTypes" Runat="server" >
    </asp:DropDownList>
    <span id="spanCostPoints" style="color:green;"></span>
    <asp:HiddenField ID="hfPayAmount" runat="server" />    
  <%--  <VACTL:TextBox runat="server" ID="hfPayAmount" 
            CssClass="input" 
            Width="110px"
            CanBeNull="No"
            FieldName="支付金额"
            Font-Bold="true"            
            />     --%>
</td>
<td class="th"><asp:CheckBox ID="ckbUseVoucher" runat="server" /><label for="ckbUseVoucher">代金券</label>：</td>
<td colspan="3">
    <VACTL:TextBox ID="txtVoucherNo" Runat="server"
        EnableViewState="False"
        CssClass="input"
        Width="110px"
        MaxLength="50"
        /> 
    <asp:HiddenField ID="hfVoucherNo" runat="server" />
    <asp:HiddenField ID="hfVoucherName" runat="server" />
    <asp:HiddenField ID="hfVoucherFaceValue" runat="server" />    
    <span id="spanVoucherInfo" style="color:green;"><%--(面值：50.00元，状态：有效)--%></span>
    <input type="button" id="btnClearVoucher" value="清空" onclick="clearVoucher()" style="display:none;" class="simpleBtn" />
    <span id="spanVoucherNote" class="note">注：输入后回车</span>    
</td>
</tr>
<tr id="trDebtInfo" style="display:none;">
<td class="th">顾客姓名：</td>
<td>              
    <VACTL:TextBox ID="txtDebtCustomerName" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="110px"
            FieldName="顾客姓名"
            MaxLength="10"
            next="ddlSex" />        
</td>
<td class="th">顾客手机号：</td>
<td colspan="3">
    <VACTL:TextBox ID="txtDebtMobileNo" runat="server"
            EnableViewState="False"
		    CssClass="input"
            Width="110px"
            FieldName="顾客手机号"
            RequiredFieldType="Mobile"
            MaxLength="11" /> 
</td>
</tr>
</table>

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td class="th">收银备注：</td>
<td>
    <VACTL:TextBox ID="txtRemark" Runat="server"
        EnableViewState="False"
        CssClass="input"
        Width="99%"
        MaxLength="100"
        />        
</td>
</tr>
</table>

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td class="footer">

    <input type="button" id="btnDiscount" class="btn"  style="width:80px" onclick="setDiscount()" value="打折" />    
    <input type="button" id="btnNext" class="btn" style="width:80px" onclick="confirm()" value="收银" />
    <input type="button" id="btnResetPage" class="btn" style="width:80px" onclick="resetPage()" value="重置" />

    <asp:HiddenField ID="hfKey" runat="server" />

    <!--本地会员结账使用.BEGIN-->
    <asp:HiddenField ID="hfPointXSEqualMoney" runat="server" />
    
    <VACTL:Hint ID="Hint1" runat="server" HintImageUrl="/app_themes/default/images/textbox" />
    <VACTL:ValidationSummary ID="ValidationSummary1" runat="server"
            DisplayMode="List"
            EnableClientScript="true" />
    
    <!--注意：这个文件一定要放到页面底部，以便覆盖asp.net验证脚本中的同名函数-->
    <script type="text/javascript" src="/scripts/utils/aspnet_validator_extend.js"></script>
</td>
</tr>
</table>

</div><!--editPageWrapper.END-->

</div><!--"wrapper.END"-->

<div id="winEditor" style="display:none;">                            
    <div style="margin:auto;">
    <table cellspacing="0" cellpadding="3" class="editTable">    
    <tr>
    <td class="th">单价：</td>
    <td>    
	    <VACTL:TextBox runat="server" ID="txtPrice2" 
            CssClass="input" 
            Width="100px"
            Height="30px"
            Font-Size="20px"
            Font-Bold="true"
            CanBeNull="No"
            FieldName="单价"
            RequiredFieldType="Money"
            Text="0.00"
            />
        <input type="button" id="Button5" class="btn" style="width:25px" onclick="changePrice('+', 'txtPrice2')" value="+" />            
        <input type="button" id="Button6" class="btn" style="width:25px" onclick="changePrice('-', 'txtPrice2')" value="-" />
    </td>
    </tr>
    <tr>
    <td class="th">数量：</td>
    <td>    	  
        <VACTL:TextBox runat="server" ID="txtQuantity2" 
            CssClass="input" 
            Width="100px"
            Height="30px"
            Font-Size="20px"
            Font-Bold="true"
            CanBeNull="No"
            FieldName="数量"
            RequiredFieldType="Numeric"
            Text="1"
            />
        <input type="button" id="btnPlus" class="btn" style="width:25px" onclick="changeQuantity('+', 'txtQuantity2')" value="+" />            
        <input type="button" id="btnSubtract" class="btn" style="width:25px" onclick="changeQuantity('-', 'txtQuantity2')" value="-" />
    </td>
    </tr>
    <tr>
    <td colspan="2" class="footer">

        <input type="button" id="Button1" class="btn" style="width:80px" onclick="takeQuantityCallback()" value="确定" />
        <input type="button" id="Button2" class="btn" style="width:80px" onclick="takeQuantityCancel()" value="取消" />

    </td>
    </tr>
    </table>
    </div>
</div> 

<div id="winDiscount" style="display:none;">  
    <div style="margin:auto;">
    <table cellspacing="0" cellpadding="3" class="editTable">    
    <tr>
    <td class="th">折扣：</td>
    <td>
        <input id="txtDiscountValue" type="number" class="input" min="0" max="1" step="0.1" style="width:84px;height:30px;font-size:20px;font-weight:bold;text-align:center;outline:0px;"  value="1.0" />

	   <%-- <VACTL:TextBox runat="server" ID="txtDiscountValue" 
            CssClass="input" 
            Width="100px"
            Height="30px"
            Font-Size="20px"
            Font-Bold="true"
            CanBeNull="No"
            FieldName="折扣"
            RequiredFieldType="Money"
            Text="1.0"
            />--%>
        折
    </td>
    </tr>
    <tr>   
    <td colspan="2" class="footer">   	  
        <asp:CheckBox ID="ckbChargeItemExcept" runat="server" Text="商品除外" />
    </td>
    </tr>
    <tr>
    <td colspan="2" class="footer">

        <input type="button" id="Button3" class="btn" style="width:80px" onclick="applyDiscount()" value="确定" />
        <input type="button" id="Button4" class="btn" style="width:80px" onclick="cancelSetDiscount()" value="取消" />

    </td>
    </tr>
    </table>
    </div>
</div> 

<!--确认窗口-->    
<div id="winConfirm" style="display:none;">

    <div style="margin:auto;margin-left:10px;margin-right:10px;">
    
    <br />

    <div class="centerFormTitle">
        <h1>确认收银信息</h1>
    </div>

    <table cellspacing="0" cellpadding="3" class="editTable" style="margin:auto;width:100%;">
    <tr>
    <td class="th">操 作 员：</td>
    <td>    
	    <span id="span_Confirm_OperatorName"><%= base.EmployeeName %></span>
    </td>
    </tr>
    <tr>
    <td class="th">收银日期：</td>
    <td>    
	    <span id="span1"><% = DateTime.Now.ToString("yyyy-MM-dd") %></span>
    </td>
    </tr>
    <tr>
    <td class="th">消费总额：</td>
    <td>    
	    <span id="span_Confirm_TotalAmount" style="font-weight:bold;"></span>
    </td>
    </tr>
    <tr>
    <td class="th">优惠金额：</td>
    <td>    
        <span id="span_Confirm_DiscountAmount" style="font-weight:bold;"></span>
    </td>
    </tr>
    <tr style="display:none;">
    <td class="th">应收金额：</td>
    <td>   
        <span id="span_Confirm_ChargeAmount" style="font-weight:bold;"></span> 
    </td>
    </tr>
    <tr>
    <td class="th">实收金额：</td>
    <td>   
        <span id="span_Confirm_RealChargeAmount" style="font-weight:bold;"></span> 
    </td>
    </tr>
    <tr>
    <td class="th">支付方式：</td>
    <td>    
        <span id="span_Confirm_PayTypeDesc" style="font-weight:bold;"></span>
    </td>
    </tr>     
    <tr>
    <td class="th">收现找零：</td>
    <td>
        收现：
        <VACTL:TextBox runat="server" ID="txtSk" 
                CssClass="input" 
                Width="50px"
                Height="30px"
                Font-Size="16px"
                FieldName="收现金"
                Font-Bold="true"  
                RequiredFieldType="Money" 
                Text="0.00"         
                />

        找零：
        <VACTL:TextBox runat="server" ID="txtZl" 
                CssClass="input" 
                Width="50px"
                Height="30px"
                Font-Size="16px"                
                FieldName="找零"
                Font-Bold="true"  
                RequiredFieldType="Money"
                ReadOnly="true"  
                Text="0.00"          
                />
    </td>
    </tr>      
    <tr>
    <td colspan="2" style="text-align:center;">  
        <asp:CheckBox ID="ckbPrintBill" runat="server"
             Text="打票" />         
        <asp:CheckBox ID="ckbNotify" runat="server"
             Text="短信通知" />         
    </td>
    </tr>
    <tr>
    <td colspan="2" class="footer">

        <input type="button" id="btnSubmit" class="btn" style="width:80px" onclick="save()" value="确定" />
        <input type="button" id="btnCancel" class="btn" style="width:80px" onclick="cancelSave()" value="取消" />
    </td>
    </tr>
    </table>
    </div>

</div><!--winConfirm.END-->

<div id="divFavPanel" style="border:solid 0px red;z-index:0;width:250px;height:516px;position:absolute;left:715px;top:45px;padding:0px;">

    <div id="divMemberInfoContaienr">
    <div class="jtongui-tabs" fill="true">
	    <ul class="header" style="border-bottom:solid 0px;">
		    <li class="tabheader-item-selected"><a>常用项目</a></li>        		    
            <li>项目组套</li>			
	    </ul>

	    <div id="div_FavItems" class="tabcontent tabcontent-selected">
	        <table cellspacing="0" class="listTable" style="table-layout:fixed;margin-left:-1px;">
            <thead>
            <tr>
            <td style="width:20px;text-align:center;">No.</td>
            <td style="width:190px;text-align:center;">项目名称</td>    
            <td></td>
            </tr>    
            </thead>    
            </table>
            <div id="div_FavItems_DataBody">        
            </div><!--dataBody.END-->

            <div style="height:26px;line-height:28px;margin-top:1px;text-align:right;padding-right:2px;">
                <input type="button" class="simpleBtn" onclick="refreshFavItems()" value="刷新" />
                <input type="button" class="simpleBtn" onclick="manageFavItems()" value="维护常用项目" />
                <input type="button" class="simpleBtn" onclick="sortFavItems()" value="排序" />
            </div>
	    </div><!--div_FavItems.END-->	   
        
        <div id="div_FavGroups" class="tabcontent">
	        
            <table cellspacing="0" class="listTable" style="table-layout:fixed;margin-left:-1px;">
            <thead>
            <tr>
            <td style="width:20px;text-align:center;">No.</td>
            <td style="width:190px;text-align:center;">组套名称</td>    
            <td></td>
            </tr>    
            </thead>    
            </table>
            <div id="div_FavGroups_DataBody">        
            </div><!--dataBody.END-->

            <div style="height:26px;line-height:28px;margin-top:1px;text-align:right;padding-right:2px;">
                <input type="button" class="simpleBtn" onclick="refreshGrups()" value="刷新" />
                <input type="button" class="simpleBtn" onclick="manageGroups()" value="维护项目组套" />
                <input type="button" class="simpleBtn" onclick="sortGroups()" value="排序" />
            </div>

	    </div><!--div_FavGroups.END-->	   

    </div>    
    </div><!--divMemberInfoContaienr.END-->   
</div>


<!--每个页面上只能有一个该控件实例-->
<VACTL:SmartDropDownList ID="SmartDropDownList1" runat="server"></VACTL:SmartDropDownList>  


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

