<%
    //-----------------------------------------------------------
    // 文件名称: System_Delivery_Defined.aspx
    // 页面名称:配送方式管理 
    //
    // 描    述:
    //
    // 修改标识: Add By 沈先强 2010-03-08  
    //-----------------------------------------------------------
%>
<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.System_Delivery_Defined, V5Shop.Shop.Payment" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!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 runat="server">
    <title>用户自定义配送方式</title>
    <link href="css/css.css" rel="stylesheet" type="text/css">
    <link href="css/css_list.css" rel="stylesheet" type="text/css">
    <link href="css/control.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
         <div>
            <div class="OperateTitle">
                <div>
                    【 编辑自定义配送方式 】<a href="System_Delivery_Manage.aspx">
                        <asp:Label ID="lblList" runat="server" Text="返回列表" meta:resourcekey="lblListResource1"></asp:Label></a>
                </div>
            </div>
             <table id="OperateTable" runat="server" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr class="FFtr" style="border:0;">
                     <td align="right" height="30" width="20%">
                            <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="配送方式名称" HideSelects="False" ImageURL="images/help.gif" Text='配送方式名称,例如"邮政快递"。' />
                            <asp:Label ID="Label1" runat="server" Text="配送方式名称：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="tb_Name" runat="server"></asp:TextBox>
                                <span class="NeedMsg">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tb_Name"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr class="F7tr" style="border:0;">
                     <td align="right" height="30" width="20%">
                            <cc1:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="配送方式简称" HideSelects="False"
                                ImageURL="images/help.gif" Text='配送方式简称,例如“邮政快递”简称为：“EMS”，注意：该值不能与其他配送方式相同！' />
                            <asp:Label ID="Label6" runat="server" Text="配送方式简称：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="tb_DllName" runat="server"></asp:TextBox>
                                <span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic" ControlToValidate="tb_DllName"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator15" runat="server"
                                            ControlToValidate="tb_DllName" Display="Dynamic" ErrorMessage="只能为英文字母"
                                            ValidationExpression="[a-zA-Z]*"></asp:RegularExpressionValidator>
                                            <span style="color:red">只能为英文字母且不能为空，保存后不可以更改。 </span>
                    </td>
                </tr>
                <tr class="FFtr">
                    <td align="right" height="30" width="20%">
                            <cc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="付款类型" HideSelects="False" ImageURL="images/help.gif" Text='该配送方式支持的付款类型。' />
                            <asp:Label ID="Label2" runat="server" Text="付款类型：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rbl_Type" runat="server" RepeatDirection="Horizontal" CssClass="input2" OnSelectedIndexChanged="rbl_Type_SelectedIndexChanged" AutoPostBack="true">
                            <asp:ListItem Text="先收款后发货" Value="0" Selected="True"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                 <tr class="FFtr" id="tr1" runat="server" visible="false" >
                     <td align="right" height="30" width="20%">
                     </td>
                     <td align="left">
                     <div id="u16_rtf">
                     <span style="font-family: ''cb'ce'cc'e5'; color: rgb(0, 0, 0); font-size: 13px;">支付定金:</span>
                        <asp:TextBox ID="tb_Money" runat="server" Width="50"></asp:TextBox>元
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                            ControlToValidate="tb_Money" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                        </div>
                        <div id="u18">
                        <div id="u18_rtf">
                            <span style="color:red">
                            （此处如果填写0则顾客无需再选择支付方式）<br/>
                            如果是固定定金则直接填写50，如果是收取货品的百分比定金，则直接输入50%。
                            </span>
                        </div>
                        </div>
                     </td>
                 </tr>
                <tr class="F7tr">
                    <td align="right" height="30" width="20%">
                            <cc1:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="地区费用类型" HideSelects="False" ImageURL="images/help.gif" Text='该快递的收费方式。' />
                            <asp:Label ID="Label3" runat="server" Text="地区费用类型：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rbl_AreFeeType" runat="server" RepeatDirection="Horizontal" CssClass="input2" OnSelectedIndexChanged="rbl_AreFeeType_SelectedIndexChanged" AutoPostBack="true">
                            <asp:ListItem Text="统一设置" Value="0"></asp:ListItem>
                            <asp:ListItem Text="指定配送地区和费用" Value="1" Selected="True"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                 <tr class="F7tr" id="tr2" runat="server">
                     <td align="right" height="30" width="20%">
                     </td>
                     <td align="left">
                     	<span style="color:red">
				您可以在添加完毕以后使用列表页的“设置配送区域”设置该配送方式支持的区域及相关运费设置
			</span>
                     </td>
                 </tr>
                <tr class="F7tr" id="tr3" runat="server" visible="false">
                    <td align="right" height="30" width="20%">
                        <cc1:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="重量设置" HideSelects="False" ImageURL="images/help.gif" Text='该快递的运费计算方式。' />
                        <asp:Label ID="Label4" runat="server" Text="重量设置：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <table>
                            <tr>
                                <td>
                                    首重重量<asp:TextBox ID="tb_FirstWeight" runat="server" CssClass="input2" Width="50" Text="1"></asp:TextBox>千克
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic" ControlToValidate="tb_FirstWeight"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                                            ControlToValidate="tb_FirstWeight" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    费用<asp:TextBox ID="tb_FirstWeightFee" runat="server" CssClass="input2" Width="50" Text="10"></asp:TextBox>元
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic" ControlToValidate="tb_FirstWeightFee"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                            ControlToValidate="tb_FirstWeightFee" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    续重重量<asp:TextBox ID="tb_SecondWeight" runat="server" CssClass="input2" Width="50" Text="0.5"></asp:TextBox>千克
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Display="Dynamic" ControlToValidate="tb_SecondWeight"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
                                            ControlToValidate="tb_SecondWeight" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    费用<asp:TextBox ID="tb_SecondWeightFee" runat="server" CssClass="input2" Width="50" Text="5"></asp:TextBox>元
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" Display="Dynamic" ControlToValidate="tb_SecondWeightFee"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
                                            ControlToValidate="tb_SecondWeightFee" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    满<asp:TextBox ID="tb_MaxMoney" runat="server" CssClass="input2" Width="50" Text="0"></asp:TextBox>元免运费
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" Display="Dynamic" ControlToValidate="tb_MaxMoney"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server"
                                            ControlToValidate="tb_MaxMoney" Display="Dynamic" ErrorMessage="只能为数字"
                                            ValidationExpression="[\d\.]*\%|[\d\.]*"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    （如果填写0则为不免运费）
                                </td>
                                <td></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr class="FFtr">
                    <td align="right" height="30" width="20%">
                            <cc1:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="详细描述" HideSelects="False" ImageURL="images/help.gif" Text='该快递的一点描述。' />
                            <asp:Label ID="Label5" runat="server" Text="详细描述：" meta:resourcekey="lblTitleResource1"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="tb_Description" runat="server" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox>
                    </td>
                </tr>
                <tr class="F7tr">
                    <td align="left" height="30" width="20%"></td>
                    <td align="left">
                        <asp:Button ID="btn_Add" runat="server" Text="添加" CssClass="button" OnClick="btn_Add_Click" />
                    <asp:Button ID="btn_Edit" runat="server" CssClass="button" OnClick="btn_Edit_Click" Text="更新" />
                        <asp:Button ID="btn_Back" runat="server" Text="返回列表" CssClass="button" OnClick="btn_Back_Click" CausesValidation="false" />
                    </td>
                </tr>
             </table>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
        <div id="hiddenfield">
            <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
            <asp:HiddenField ID="PageIndex" runat="server" Value="0"/>
            <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0"/>
            <uc1:HiddenField ID="Alert" runat="server" />
        </div>
    </form>
    <script language="javascript" type="text/javascript">
            //加TABLE样式
            InitTrClass();

        function ShowTR(obj1,obj2)
        {
            var objtr1 = document.getElementById(obj1);
            var objtr2;
            if(obj2 != null && obj2 != "")
            {
                objtr2 = document.getElementById(obj2);
            }
            if(objtr1.display == "none")
            {
                objtr1.display = "block";
                if(objtr2)
                {
                    objtr2.display = "none";
                }
            }
            else
            {
                objtr1.display = "none";
                if(objtr2)
                {
                    objtr2.display = "block";
                }
            }
            
        }
    </script>
</body>
</html>
