⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coupon.aspx

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 ASPX
📖 第 1 页 / 共 2 页
字号:
                            <td style="width: 100px">
                                <input type="button" class="inputbutton" onclick="DelProduct('<%=LstLimit.ClientID%>','<%=HdnLimit.ClientID %>','<%=HdnLimitAllValue.ClientID %>')"
                                    value="删除" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </asp:PlaceHolder>
        <tr class="tdbg">
            <td class="tdbgleft">
                <b>使用该优惠券需要订单满足金额为:</b></td>
            <td>
                <asp:TextBox ID="TxtOrderTotalMoney" runat="server" MaxLength="50"></asp:TextBox>
                <pe:RequiredFieldValidator ID="ValrOrderTotalMoney" runat="server" ErrorMessage="订单满足金额不能为空"
                    ControlToValidate="TxtOrderTotalMoney" Display="Dynamic"></pe:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="ValeOrderTotalMoney" ControlToValidate="TxtOrderTotalMoney"
                    runat="server" Display="dynamic" SetFocusOnError="true" ValidationExpression="[1-9]+[0-9]*(\.?[0-9]+)?|0\.0*[0-9]*|0"
                    ErrorMessage="订单满足金额格式不正确"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td colspan="2" style="text-align: center">
                <asp:HiddenField ID="HdnCouponID" runat="server" />
                <asp:Button ID="BtnSave" runat="server" Text="保存" OnClick="BtnSave_Click" />&nbsp;&nbsp;
                <input name="Cancel" type="button" class="inputbutton" id="Cancel" value="取消" onclick="Redirect('CouponManage.aspx')" />
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
        function SelectModel()
        {
                window.open("../Shop/ProductModelList.aspx","","width=670,height=400,resizable=0,scrollbars=yes");
        }
          
        function SelectModel2()
        {
                window.open("../Shop/ProductModelList.aspx?FunctionName=DoProductListPostBack2","","width=670,height=400,resizable=0,scrollbars=yes");
        }
                  
        function SetListValue(listControl,hdnControl,hdnAllValueControl,arr)
        {
            var list = document.getElementById(listControl)
            var hdn = document.getElementById(hdnControl);
            var allValue = document.getElementById(hdnAllValueControl);         
            if (arr != null){
               var ss=arr.split('$$$');
               if(checkName(list,ss[1]))
               {
                   return;
               }
               else
               {    
                    list.options[list.length] = new Option(ss[0],ss[1]);
                    if(hdn.value == "")
                    {
                        hdn.value = ss[1];
                        allValue.value = ss[0] + "$$$" + ss[1];
                        
                    }
                    else
                    {
                        hdn.value = hdn.value + "," + ss[1];
                        allValue.value = allValue.value + "," + ss[0] + "$$$" + ss[1];
                    }
                }
            }
        }
          
        function SelectProductToList()
        {
            window.open("../Shop/ProductList.aspx?ShowProperty=False&ProductType=0,1,2,3","ProductList","width=670,height=400,resizable=0,scrollbars=yes");
        }

        function SelectProductToList2()
        {
            window.open("../Shop/ProductList.aspx?ShowProperty=False&FunctionName=DoProductListPostBack2&ProductType=0,1,2,3","ProductList","width=670,height=400,resizable=0,scrollbars=yes");
        }
          
        function DoProductListPostBack(productString)
        {
            var list = "<%=LstSelectedProduct.ClientID%>";
            var hdn = "<%=HdnSelecedtProduct.ClientID%>";
            var allValue = "<%=HdnAllValue.ClientID%>";
            SetListValue(list,hdn,allValue,productString)                       
        }

        function DoProductListPostBack2(productString)
        {
            var list = "<%=LstLimit.ClientID%>";
            var hdn = "<%=HdnLimit.ClientID%>";
            var allValue = "<%=HdnLimitAllValue.ClientID%>";
            SetListValue(list,hdn,allValue,productString)                       
        }
          
        function checkName(listControl,checkName)
        {
            for(i=0;i<listControl.length;i++)
            {
                if(listControl.options[i].value == checkName)
                {
                    return true;
                }
            }
            return false;
        }
          
                
        function DelProduct(listControl,hdnControl,hdnAllValueControl)
        {         
        var list = document.getElementById(listControl);
        if(list.length==0 || list.selectedIndex==-1){return false;}   
        var hdn = document.getElementById(hdnControl);
        var hdnAllValue = document.getElementById(hdnAllValueControl);
        var arr = hdn.value.split(',');
        var arrAllValue = hdnAllValue.value.split(',');
        var newValue ="";
        var allValue = "";
        for(i=0;i<arr.length;i++)
        {
            if(arr[i] != list.options[list.selectedIndex].value)
            {
                if(newValue == "")
                {
                    newValue = arr[i];
                    allValue = arrAllValue[i];
                } 
                else
                {
                    newValue = newValue + "," + arr[i];
                    allValue = allValue + "," + arrAllValue[i];
                }
            }
        }
        list.options[list.selectedIndex]=null;
        hdn.value = newValue;   
        hdnAllValue.value = allValue; 
        }
        
        function ValxSelectedProduct_ClientValidate(s,e)
        {
            CheckSelected(s,e,"2","<%=HdnSelecedtProduct.ClientID %>","<%=RadlCouponCreateType.UniqueID%>");       
        }

        function ValxSelectedModel_ClientValidate(s,e)
        {
            CheckSelected(s,e,"1","<%=HdnSelecedtProduct.ClientID %>","<%=RadlCouponCreateType.UniqueID%>");             
        }
        
        function ValcLimitProduct_ClientValidate(s,e)
        {
            CheckSelected(s,e,"2","<%=HdnLimit.ClientID %>","<%=RadlProductLimit.UniqueID%>");       
        }

        function ValcLimitdModel_ClientValidate(s,e)
        {
            CheckSelected(s,e,"1","<%=HdnLimit.ClientID %>","<%=RadlProductLimit.UniqueID%>");             
        }
        
        function CheckSelected(s,e,selectType,HdnControl,RadlControl)
        {
            var listValue = document.getElementById(HdnControl).value;
            var selcetType;
            
           var objSel = document.getElementsByName(RadlControl);
           
           for(i=0;i<objSel.length;i++ )
           {
               if(objSel[i].checked==true)
                   selcetType = objSel[i].value;
           } 
           if(selcetType == selectType && listValue == "")
           {
                e.IsValid = false;
           }
           else
           {
                e.IsValid = true;
           }        
        }
        

    </script>

</asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -