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

📄 sell_add.aspx

📁 该商品销售管理系统是一个基于WEB的适应于小型企业的管理系统!可以实现商品基本信息的查询。添加
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sell_Add.aspx.cs" Inherits="销售管理_Sell_Add" %>

<%@ Register Assembly="CustomControlFreak" Namespace="CustomControlFreak" TagPrefix="cc1" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
     <script type="text/javascript">
    //本方法实现应付金额的自动计算功能
    function getPrice()
        {
            with(document)
            {
                var number = document.getElementById("Number"); //数量
                var price = document.getElementById("Pirce");   //单价
                var payment = document.getElementById("Payment");   //应付金额
                var num = number.value * price.value;   //应付金额=数量*单价
                payment.value = num;
                var Label4=document.getElementById("Label4");
                var resout=Label4.innerHTML-number.value;
                if (resout<0)
                {
                    alert('数量大于最大值!');
                    number.value=Label4.innerHTML;
                    
                }
            }
            getPrice1();
        }
        //本方法实现未付金额的自动计算功能
        function getPrice1()
        {
            with(document)
            {
                var payment = document.getElementById("Payment");   //应付金额
                var factpayment = document.getElementById("FactPayment");   //实付金额
                var nopayment = document.getElementById("NoPayment");   //未付金额
                var num = payment.value - factpayment.value;    //未付金额=应付金额-实付金额
                
                if (num<0)  //对实付金额进行判断
                {
                    alert("实收金额应小于等于应收金额!");  //提示信息
                    factpayment.value="";   //若实付金额应小于等于应付金额,则清空实付金额

                }
                else
                {
                    nopayment.value = num;  //进行正确的赋值
                }
                
            }
        }
  
    </script>
    <div style="text-align: center">
        <span style="font-size: 10pt; color: #990000; font-family: 宋体">销售管理→添加销售信息<br />
        </span>
        <br />
        <table style="left: 15px; top: 63px; border-collapse: separate; width: 85%; height: 300px; font-size: smaller; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; width: 100px; border-bottom: #0033cc 1px solid; height: 43px;">
                    商品名称:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; width: 199px; border-bottom: #0033cc 1px solid">
                    <asp:DropDownList ID="CommodityName" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="CommodityName" DataValueField="id" OnDataBound="CommodityName_DataBound" OnSelectedIndexChanged="CommodityName_SelectedIndexChanged" Width="120px">
                    </asp:DropDownList>
                </td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; width: 100px; border-bottom: #0033cc 1px solid">
                    供应商:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; width: 199px; border-bottom: #0033cc 1px solid">
                    <asp:TextBox ID="CompanyID" runat="server" ReadOnly="True" Width="120px"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 43px;">
                    客户名称:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:DropDownList ID="ClientName" runat="server" Width="120px" AutoPostBack="True" OnSelectedIndexChanged="ClientName_SelectedIndexChanged" >
                    </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;
                </td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    结算方式:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:DropDownList ID="SettlementType" runat="server" Width="60px">
                        <asp:ListItem Selected="True">现金</asp:ListItem>
                        <asp:ListItem>支票</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 43px;">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Pirce"
                        ErrorMessage="*"></asp:RequiredFieldValidator>单 价:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:TextBox ID="Pirce" runat="server" Width="60px"></asp:TextBox>
                    元<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="Pirce"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <br />
                    销售日期:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <cc1:daintydate id="StockDate" runat="server" calendartype="JustTextBox" style="left: 0px; position: relative; top: 2px" Width="133px" EnableTextBox="False"></cc1:daintydate>
                    </td>
            </tr>
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 43px;">
                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Number"
                        ErrorMessage="*"></asp:RequiredFieldValidator>数 量:<br />
                </td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:TextBox ID="Number" runat="server" OnTextChanged="Number_TextChanged" Width="60px"></asp:TextBox>
                    件<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="Number"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    <br />
                </td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="FactPayment"
                        ErrorMessage="*"></asp:RequiredFieldValidator>实收金额:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; vertical-align: middle;">
                    &nbsp;<asp:TextBox ID="FactPayment" runat="server" Width="55px"></asp:TextBox>
                    元<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="FactPayment"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$"></asp:RegularExpressionValidator><br />
                </td>
            </tr>
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 43px;">
                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="Payment"
                        ErrorMessage="*"></asp:RequiredFieldValidator>应收金额:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; vertical-align: middle; text-align: left;">
                    <br />
                    <asp:TextBox ID="Payment" runat="server" ReadOnly="True" Width="60px"></asp:TextBox>元</td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="NoPayment"
                        ErrorMessage="*"></asp:RequiredFieldValidator>未收金额:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid">
                    <asp:TextBox ID="NoPayment" runat="server" ReadOnly="True" Width="60px"></asp:TextBox>元</td>
            </tr>
            <tr>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 43px;">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ManageMan"
                        ErrorMessage="*"></asp:RequiredFieldValidator>经手人:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="ManageMan" runat="server" Width="60px"></asp:TextBox></td>
                <td align="center" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    操作员:</td>
                <td align="left" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label></td>
            </tr>
            <tr>
                <td align="center" colspan="4" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 28px; text-align: center;">
                    &nbsp;
                    <asp:Button ID="AddButton" runat="server" Text="添 加" OnClick="AddButton_Click" Width="70px" />
                    <input id="ResetBotton" style="width: 70px" type="reset" value="重 置" onclick="return ResetBotton_onclick()" /></td>
            </tr>
        </table>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:db_sellConnectionString %>"
                        SelectCommand="SELECT [id], [CommodityName] FROM [tb_Commodity]"></asp:SqlDataSource>
        <asp:Label ID="Label3" runat="server" Text="Label" Width="67px" Visible="False"></asp:Label>
        <asp:Label ID="Label4" runat="server" Text="Label" style="color: white"></asp:Label>
        &nbsp;
                </div>
                <script type="text/javascript">
        var textStockDate = document.getElementById("txtStockDate");

        textStockDate.style.width = "75px";
function ResetBotton_onclick() {

}

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

⌨️ 快捷键说明

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