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

📄 showjshk.asp

📁 创建和运行动态、交互的Web服务器应用程序
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title><%=webname%>--图书采购单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
</head>
<body>

<script language = "JavaScript">
<!--
function checkhk()
{
    if(document.myform.hkgyname.value==0) {
	document.myform.hkgyname.focus();
    alert("请先选择供应商!");
	return false;
    }
    
}

function changelocation(locationid) 
{
   var locationid; 
   window.location=locationid; 
}

function regInput(obj, reg, inputStr)
{
  var docSel	= document.selection.createRange()
  if (docSel.parentElement().tagName != "INPUT")	return false
  oSel = docSel.duplicate()
  oSel.text = ""
  var srcRange	= obj.createTextRange()
  oSel.setEndPoint("StartToStart", srcRange)
  var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
  return reg.test(str)
}
-->  
</script>

<%
dim  action 
     action= request.QueryString("action")

select case action
       case ""

'//先清空所有变量
hk     = Session("myhk") 
hkindex= session("hkindex")

for i=0 to hkindex 
    for j=0 to 4
    hk(i,j)=""
    next
next

Session("myhk")=hk 
session("hkindex")=0

%>
<table width="90%" height="450" border="0"  cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#ece9d8"><br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr><td>
            <table width=154  border="0"  cellpadding="0" cellspacing="0">
              <tr valign=bottom>
                <td background=images/get_img.gif  width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>选择供应商</font></div></td>
                <td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#000000>填写付款单</font></div></td>
              </tr>
            </table>

            <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
               <tr><td>
                   <table width="100%" border="1" cellspacing="0" cellpadding="0">
                      <tr><td>
                         <table width="100%" border="0">
                            <form name="myform" method="POST" action="addjshk.asp?action=addgy">
                               <tr><td height=3></td>
                               <tr>
                                 <td width="12%" align="right">供应商名称</td>
                                 <td colspan=5>

           <%set rs2=server.CreateObject("adodb.recordset")
                 rs2.open "select * from shop_gongyi",conn,1,3%>
           <select id=hkgyname name=hkgyname onChange="changelocation(document.myform.hkgyname.options[document.myform.hkgyname.selectedIndex].value)" >
           <option value=0 selected>--请选择供应商--</option>
           <%do while not rs2.eof%> 
               <option value="addjshk.asp?action=addgy&gyid=<%=rs2("gyid")%>"><%=rs2("gyname")%></option>
           <%rs2.movenext
             loop%>
           </select>   
                       </tr>
                    </table> 
                <tr><td>
                    <table width="100%" align=center border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
                       <tr>                          
                          <td width="40%" bgcolor="#ece9d8">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</td>
                          <td bgcolor="#ece9d8" align="center">定价    </td>                         
                          <td bgcolor="#ece9d8" align="center">付款数量</td>
                          <td bgcolor="#ece9d8" align="center">应付金额</td>                                                  
                          <td bgcolor="#ece9d8" align="center">修改    </td>
                          <td bgcolor="#ece9d8" align="center">取消    </td>
                       </tr>
                       <tr>
                          <td bgcolor="#ffffff" height=20></td>
                          <td bgcolor="#ffffff"></td>
                          <td bgcolor="#ffffff"></td>
                          <td bgcolor="#ffffff"></td>
                          <td bgcolor="#ffffff"></td>
                          <td bgcolor="#ffffff"></td>
                          
                       </tr>
                   </table> 
         
                   <table>
                      <tr><td bgcolor="#ece9d8" STYLE='PADDING-LEFT: 50px' colspan="9" height=40> 总数量&nbsp;<font color="#FF0000">0</font>&nbsp;册&nbsp;&nbsp;&nbsp;&nbsp; 
                                                                                                总计码洋&nbsp;<font color="#FF0000">0:00</font>&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                                总计实洋&nbsp;<font color="#FF0000">0:00</font>&nbsp;元</td>
                      </tr>
                   </table> 

                </tr>
            </table>
 
          </tr>
      </table> 

    </tr>
</table> 

    <%case "gylist"

    hk     = Session("myhk") 
    hkindex= session("hkindex")

    gyid=hk(0,0)
   

set rs=server.CreateObject("adodb.recordset")
    rs.open "select * from shop_gongyi where gyid="&gyid,conn,1,3%>

<table width="90%" height="450" border="0"  cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#ece9d8"><br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr><td>
            <table width=154  border="0"  cellpadding="0" cellspacing="0">
               <tr valign=bottom>
                 <td background=images/lose_img.gif  width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href=showjshk.asp><font color=#000000>重选供应商</font></a></div></td>
                 <td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>填写付款单</font></div></td>
               </tr>
             </table>

            <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
               <tr><td>
                   <table width="100%" border="1" cellspacing="0" cellpadding="0">
                      <tr><td>
                         <table width="100%" border="0">
                            <form name="frm_txsfs" method="POST" action="addjshk.asp?action=addhk">
                               <tr><td height=3></td>
                               <tr>
                                  <td width="12%" align="right">供应商名称</td>
                                  <td colspan=5><input type="text" name="gyname"  size="23" value=<%=rs("gyname")%>       style="BACKGROUND-COLOR: #ffffff" readonly=true>
                               </tr>
                               </form>
                         </table> 
                     <tr><td>
                          <table width="100%" align=center border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
                             <tr> 
                                <td width="40%" bgcolor="#ece9d8">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</td>
                                <td bgcolor="#ece9d8"><div align="center">定价</div></td>                         
                                <td bgcolor="#ece9d8"><div align="center">付款数量</div></td>
                                <td bgcolor="#ece9d8"><div align="center">应付金额</div></td>                                                        
                                <td bgcolor="#ece9d8" align="center">修改</td>
                                <td bgcolor="#ece9d8" align="center">取消</td>
                             </tr>
                             <% 
                               dim i,total_count,total_sy       
                                   i=1
                                   total_count=0

                         while i < hkindex

                               bookid      =hk(i,0)   
		               cgid        =hk(i,1)

		               bookname    =hk(i,2)
                               shichangjia =hk(i,3)
                               yhkcount    =hk(i,4)
                               yhksy       =hk(i,5) 

                         if hk(i,4)<>0 then%>

                                  <form method="POST" action="addjshk.asp?action=adchange">
  	                             <tr>
                                         <td bgcolor="#ffffff" align="center"><%=bookname%></td>
                                         <td bgcolor="#ffffff" align="center"><%=formatnumber(shichangjia,2)%></td>
                                         <td bgcolor="#ffffff" align="center"><input type="text" value="<%=yhkcount%>" size="6" name="yhkcount" onkeypress="return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))"
		                         onpaste = "return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))"
		                         ondrop	 = "return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))"></td>
                                            <%yhksy=yhkcount*shichangjia*hk(0,1)%>
                                         <td bgcolor="#ffffff" align="center"><%=formatnumber(yhksy,2)%></td>
                                            <input type="hidden" value="<%=yhkcount%>" name="b_yhkcount">     
                                         <td bgcolor="#ffffff" align="center"><input type="submit" value="修改" name="submit_e_hk">
     	                                    <input type="hidden" value="<%=i%>" name="index"> 
                                         <td bgcolor="#ffffff" align="center"><a href="addjshk.asp?action=addelet&index=<%=i%>"><img src=images/trash.gif width=15 height=17 border=0></a>
  	                              </tr>
                                   </form>
	                       <%
                                   total_count=total_count+yhkcount
                                   total_sy=total_sy+yhksy
  
                                   i=i+1
                               else
                                   response.Write "<tr>"                               
                                   response.Write "<td width=40% bgcolor=#ffffff align=center height=20></td>"
                                   response.Write "<td bgcolor=#ffffff align=center></td>"
                                   response.Write "<td bgcolor=#ffffff align=center></td>"
                                   response.Write "<td bgcolor=#ffffff align=center></td>"
                                   response.Write "<td bgcolor=#ffffff align=center></td>"
                                   response.Write "<td bgcolor=#ffffff align=center></td>"
                                   response.Write "</tr>"
                               
                                   i=i+1                         
                           end if 
                           wend
                     hkindex=i
	             session("hkindex") = hkindex

                     if total_count<>0 then%>
                           
                           </tr>
                        </table>

                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                           <tr>
                             <td width="60%" bgcolor="#ece9d8" align=right height=40>总数量&nbsp;<font color="#FF0000"><%=total_count%></font>&nbsp;册</td>
                             <td bgcolor="#ece9d8" align=center>总计应付款&nbsp;<font color="#FF0000"><%=formatnumber(total_sy,2)%></font>&nbsp;元</td>
                           </tr>
                        </table>
                     <%else%>
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                           <tr>
                             <td width="60%" bgcolor="#ece9d8" align=right height=40>总数量&nbsp;<font color="#FF0000">0</font>&nbsp;册</td>
                             <td bgcolor="#ece9d8" align=center>总计应付款&nbsp;<font color="#FF0000">0:00</font>&nbsp;元</td>
                           </tr>
                        </table> 
                     <%end if%>
                     <table><tr><td height=5></table>
                     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                        <form name="frm_s_jshk" method="POST" action="yhklist.asp">                           
                           <tr height=30>
                              <input type="hidden" value="<%=session("admin")%>" name="yhk_admin"> 
                              <td colspan=10 align="center"><input type=submit value="生成付款单" name="submit_s_hk"></td>
                           </tr>
                        </form>
                    </table>

                 </tr>
             </table>

          </tr>
      </table> 

    </tr>
</table> 

<%end select%>
</body>
</html>

⌨️ 快捷键说明

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