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

<!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"-->
    <!--#include virtual="/include/js/edit.aspx"-->     
    <script type="text/javascript">    
    function save() {

        //调用asp.net验证控件自带的js数据验证脚本对控件进行验证；
        var validationResult = Page_ClientValidate('');
        if (!validationResult) {
            return;
        }

        var requestType = "POST";
        var url = pageName + "?act=save";  //pageName在BasePage中注册到的客户端；
        var dataType = "html";
        var data = $("form").eq(0).serialize();
        var successFN = function (data, textStatus) {
            if (data == "ok") {
                showActResult("保存成功！退出并重新登录系统后，设置生效！", true, doAfterAdd);
            } else if (data.indexOf("01|") != -1) {
                showActResult(data.substring(3), false, doAfterAdd);
            }
            else {
                showActResult(data, false, doAfterAdd);
            }
        };
        ajaxRequest(requestType,
            url,
            dataType,
            data,
            successFN,
            errorFN
            );
    }

    function doAfterAdd(actResult) {
        if (actResult) {
            try {
                if (window.parent != window.self) {
                    window.parent.reload();
                }
            } catch (e) { }
            resetPage();
        }
    }

    $(function () {
        $("#txtPointXS").focus();
    });

    </script>
    <style type="text/css">
        .editTable .th {
            width:180px;
        }
    </style>
</head>
<body>
<form id="Form1" method="post" runat="server">

<div class="editPageWrapper" style="width:760px;">

<div class="centerFormTitle">
   <h1>基本参数设置</h1>
</div>

<table cellspacing="0" cellpadding="3" class="editTable">
<tr>
<td class="th">单位名称：</td>
<td>              
    <VACTL:TextBox ID="txtCompanyName" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="300px"
            FieldName="单位名称"
            MaxLength="50"
            />        
</td>
</tr>
<tr style="display:none">
<td class="th">单位电话：</td>
<td>              
    <VACTL:TextBox ID="txtCompanyPhone" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="300px"
            FieldName="单位电话"
            MaxLength="50"
            />        
</td>
</tr>
<tr style="display:none">
<td class="th">单位地址：</td>
<td>              
    <VACTL:TextBox ID="txtCompanyAddress" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="300px"
            FieldName="单位地址"
            MaxLength="100"
            />        
</td>
</tr>
<tr>
<td class="th">积分兑换系数1：</td>
<td>              
    <VACTL:TextBox ID="txtPointXSConsumeDonate" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="65px"
            FieldName="积分兑换系数1"
            RequiredFieldType="PositiveInteger"
            MaxLength="10"
            next="ddlSex" />    
     <span class="note">表示每消费1元赠送多少个积分。</span>    
</td>
</tr>
<tr>
<td class="th">积分兑换系数2：</td>
<td>              
    <VACTL:TextBox ID="txtPointXSEqualMoney" Runat="server"
            EnableViewState="False"
            CssClass="input"
            Width="65px"
            FieldName="积分兑换系数2"
            RequiredFieldType="PositiveInteger"
            MaxLength="10"
            next="ddlSex" />        
    <span class="note">表示每多少个积分可抵1元消费用。</span>  
</td>
</tr>
<tr runat="server" visible="false">
<td class="th">是否启用商品库存管理：</td>
<td>
    <asp:DropDownList ID="ddlChargeItem_Apply_StockManage" Runat="server">
    <asp:ListItem Value="1" Selected="True">启用</asp:ListItem>
    <asp:ListItem Value="0">不启用</asp:ListItem>
    </asp:DropDownList>
    <span class="note">如果启用，则消费收银、商品赠送时，要求库存必须充足。</span>
</td>
</tr>
<tr id="Tr1" runat="server" visible="false">
<td class="th">是否启用礼品库存管理：</td>
<td>
    <asp:DropDownList ID="ddlGift_Apply_StockManage" Runat="server">
    <asp:ListItem Value="1" Selected="True">启用</asp:ListItem>
    <asp:ListItem Value="0">不启用</asp:ListItem>
    </asp:DropDownList>
    <span class="note">如果启用，则礼品赠送、礼品兑换时，要求库存必须充足。</span>
</td>
</tr>
<tr>
<td class="th">充值后是否默认打印小票：</td>
<td>
    <asp:DropDownList ID="ddlPrintWalletChargeBill" Runat="server">
    <asp:ListItem Value="1" Selected="True">打印</asp:ListItem>
    <asp:ListItem Value="0">不打印</asp:ListItem>
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">消费后是否默认打印小票：</td>
<td>
    <asp:DropDownList ID="ddlPrintConsumeChargeBill" Runat="server">
    <asp:ListItem Value="1" Selected="True">打印</asp:ListItem>
    <asp:ListItem Value="0">不打印</asp:ListItem>
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">充值后是否默认通知会员：</td>
<td>
    <asp:DropDownList ID="ddlNotifyMemberWhenCharged" Runat="server">
    <asp:ListItem Value="1" Selected="True">通知</asp:ListItem>
    <asp:ListItem Value="0">不通知</asp:ListItem>
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">提现后是否默认通知会员：</td>
<td>
    <asp:DropDownList ID="ddlNotifyMemberWhenWithdrawed" Runat="server">
    <asp:ListItem Value="1" Selected="True">通知</asp:ListItem>
    <asp:ListItem Value="0">不通知</asp:ListItem>
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">消费后是否默认通知会员：</td>
<td>
    <asp:DropDownList ID="ddlNotifyMemberWhenConsumed" Runat="server">
    <asp:ListItem Value="1" Selected="True">通知</asp:ListItem>
    <asp:ListItem Value="0">不通知</asp:ListItem>
    </asp:DropDownList>
</td>
</tr>
<tr>
<td class="th">是否启用会员自助平台：</td>
<td>
    <asp:DropDownList ID="ddlMyCenterEnabled" Runat="server">
    <asp:ListItem Value="1" Selected="True">启用</asp:ListItem>
    <asp:ListItem Value="0">不启用</asp:ListItem>
    </asp:DropDownList>
    <span class="note">如果启用，则会员可通过手机号、姓名自助查询充值、消费情况等信息。</span>
</td>
</tr>
<tr>
<td colspan="2" class="footer">

    <input type="button" id="btnSubmit" class="btn" style="width:100px" onclick="save()" value="保存" />
    <input type="button" id="btnClear" class="btn" style="width:100px" onclick="resetPage()" value="清空" />

    <asp:HiddenField ID="hfKey" 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-->

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

