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

📄 arrivefreight_confirm.asp

📁 在线医药销售管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%'******************************************************
  '功能:到货确认
  '入口参数:   
  '          1,货运单号
  '          2,人员编号
  '出口参数:
  '作者:钟宇    日期:2001年6月19日
  '******************************************************
%>
<HTML>
<HEAD>
<TITLE>到货确认页面</TITLE>
</HEAD>
<BODY>
<%
Dim DBConn,Rs,LStr_Sql,TStr_StfID,TStr_FreightBillNo,LInt_i,LInt_RecCount  
TStr_StfID=Trim(Session("Gs_StaffID"))
TStr_FreightBillNo=Trim(Request("select1"))
If TStr_StfID="" Or TStr_FreightBillNo="" Then
  Response.Write "网页已经过期,请重新登录系统!"
  Response.End 
End If
Set DBConn=Server.CreateObject("ADODB.Connection")
'DBConn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=CMS;Data Source=FileServer","sa",""
DBconn.ConnectionTimeout =application("Connection2_Connectiontimeout")
DBconn.OPEN Application("Connection2_ConnectionString")
LStr_Sql= "SELECT Warehouse_Deliver.Whs_DlvFreightBillNo,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvFreightType,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvFreightCorp,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvDate,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvReceiver,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvReceiveAddr,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvReceiveZip,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvReveiveTel,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvID,"
'LStr_Sql=LStr_Sql+"Basic_Customer.Cst_Name,"
LStr_Sql=LStr_Sql+"Basic_Category.Ctg_Name,"
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvNum "
LStr_Sql=LStr_Sql+"FROM Warehouse_Deliver,"
'LStr_Sql=LStr_Sql+"Basic_Customer,"
LStr_Sql=LStr_Sql+"Basic_Category "
'LStr_Sql=LStr_Sql+"WHERE ( Basic_Customer.Cst_ID = Warehouse_Deliver.Cst_ID ) AND "  
'LStr_Sql=LStr_Sql+"( Basic_Category.Ctg_ID = Warehouse_Deliver.Ctg_ID ) AND "
LStr_Sql=LStr_Sql+"where ( Basic_Category.Ctg_ID = Warehouse_Deliver.Ctg_ID ) AND "
LStr_Sql=LStr_Sql+"Warehouse_Deliver.Whs_DlvFlag='已发货' AND "
LStr_Sql=LStr_Sql+"( Warehouse_Deliver.Whs_DlvFreightBillNo='"& TStr_FreightBillNo &"')" 
Set Rs=Server.CreateObject("ADODB.Recordset")

Rs.Open LStr_Sql,DBConn
If Rs.EOF AND Rs.BOF Then
	Rs.Close 
	Set Rs=Nothing
	Set DBConn=Nothing
	Response.Write "该货运单没有待确认的发货单,请"
	Response.Write "<a href='FreightBill_Select.asp'>返回</a>"
	Response.Write "!!"
	Response.End 
End If
%>
<FORM action="ArriveFreight_Confirm_Operate.asp" name=form1 id=form1 method=post> 
<P><STRONG><FONT size=5>到货确认&gt;&gt;到货确认</FONT></STRONG></P>
<HR>
  <table width="632" border="0" style="HEIGHT: 454px; WIDTH: 700px">
    <tr>
    <td>&nbsp; 货运单号:<INPUT id=text3 name=text3 readonly value=<%=Rs("Whs_DlvFreightBillNo")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 货运方式:<INPUT id=text4 name=text4 readonly value=<%=Rs("Whs_DlvFreightType")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 货运公司:<INPUT id=text5 name=text5 readonly value=<%=Rs("Whs_DlvFreightCorp")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 发货日期:<INPUT id=text6 name=text6 readonly value=<%=Rs("Whs_DlvDate")%>></td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp; 收货人:<INPUT id=text7 readonly name=text7 value=<%=Rs("Whs_DlvReceiver")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 收货地址:<INPUT id=text8 name=text8 readonly value=<%=Rs("Whs_DlvReceiveAddr")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 邮政编码:<INPUT id=text9 name=text9 readonly value=<%=Rs("Whs_DlvReceiveZip")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 收货电话:<INPUT id=text10 name=text10 readonly value=<%=Rs("Whs_DlvReveiveTel")%>></td>
  </tr>
  <tr>
    <td>&nbsp; 对应货运单的发货单列表:</td>
  </tr>
    <tr valign="top"> 
      <td>
        <table width="96%" border="1">
          <tr>
            <td width="6%" height="38"> 
              <div align="center">&nbsp;</div>
            </td>
            <td width="16%" height="38"> 
              <div align="center">发货单编号</div>
            </td>
            <td width="20%" height="38"> 
              <div align="center">品种</div>
            </td>
            <td width="10%" height="38"> 
              <div align="center">发货数量</div>
            </td>
            <td width="16%" height="38"> 
              <div align="center">到货数量 </div>
            </td>
            <td width="16%" height="38"> 
              <div align="center">损坏数量 </div>
            </td>
          </tr>
           <%
            LInt_RecCount=0
            Do While Not Rs.EOF 
              Response.Write "<tr>"
              Response.Write "<td><INPUT type=checkbox id=checkbox1 name=checkbox1 value=" & Trim(Rs("Whs_DlvID")) & "></td>"
              Response.Write "<td><a href=../view/WarehouseDeliver_View.asp?Whs_Dlvid="& Trim(Rs("Whs_DlvID")) & " target=_blank>"& Trim(Rs("Whs_DlvID")) & "</a>" & "</td>"
              'Response.Write "<td>"& Trim(Rs("Cst_Name")) &"</td>"
              Response.Write "<td>"& Trim(Rs("Ctg_Name")) &"</td>"
              Response.Write "<td>"& Trim(Rs("Whs_DlvNum")) &"<INPUT type=hidden id=DlvNum name=DlvNum value="& Trim(Rs("Whs_DlvNum")) &"></td>"  
              Response.Write "<td><INPUT id=text1 name=text1 MaxLength=10  style='HEIGHT: 22px; WIDTH: 90px'></td>"
              Response.Write "<td><INPUT id=text2 name=text2 MaxLength=10  style='HEIGHT: 22px; WIDTH: 90px' value='0'></td>"
              Response.Write "</tr>"
              Rs.MoveNext 
              LInt_RecCount=LInt_RecCount+1
            Loop
           %>
        </table>
          </td>
  </tr>
  <tr>
    <td>
      &nbsp;&nbsp; 收货日期:<SELECT id=select1 name=select1 style="HEIGHT: 22px; WIDTH: 63px"> 
      <OPTION selected></OPTION>
      <%
      For LInt_i=1990 To Year(Date())
        If LInt_i=Year(Date()) Then
           Response.Write "<OPTION value="& LInt_i &" selected>"& LInt_i &"</OPTION>"
        Else
           Response.Write "<OPTION value="& LInt_i &">"& LInt_i &"</OPTION>"
        End If 
      Next 
      %>
      </SELECT>
      年&nbsp;<SELECT id=select2 name=select2 style="HEIGHT: 22px; WIDTH: 44px"> 
      <OPTION selected></OPTION>
      <%
      For LInt_i=1 To 12
        If LInt_i=Month(Date()) Then
          Response.Write "<OPTION value="& LInt_i &" selected>"& LInt_i &"</OPTION>"
        ELse
          Response.Write "<OPTION value="& LInt_i &">"& LInt_i &"</OPTION>"
        End If   
      Next 
      %>
      </SELECT>
      月&nbsp;<SELECT id=select3 name=select3 style="HEIGHT: 22px; WIDTH: 47px"> 
      <OPTION selected></OPTION>
      <%
      For LInt_i=1 To 31
        If LInt_i=Day(Date()) Then
          Response.Write "<OPTION value="& LInt_i &" selected>"& LInt_i &"</OPTION>"
        Else
          Response.Write "<OPTION value="& LInt_i &">"& LInt_i &"</OPTION>"
        End If  
      Next 
      %>
      </SELECT>日
    </td>
  </tr>
</table>
<P align=center>
<INPUT type=hidden id=FreightBillNo name=FreightBillNo value=<%=TStr_FreightBillNo%>>
<INPUT id=button1 name=button1 type=button value=" 提交 " onclick="SubmitOK()">
<INPUT id=button2 name=button2 type=button value=" 重置 " onclick="FormReset()">
<INPUT id=button3 name=button3 type=button value=" 返回 " onclick=window.navigate("FreightBill_Select.asp")>
</P>
</FORM>
</BODY>
</HTML>
<%'******************************************************************%>
<script LANGUAGE="vbscript">
<!--
'---------------------------------------------------------------------
'功能:提交到到货确认操作页
'参数:'返回值:
'--------------------------------------------------------------------
Function SubmitOK() 
  If <%=LInt_RecCount%>=0 Then
    MsgBox "没有发货单!",,"CMS系统提示"
    Exit Function
  End If
  
  If TestCheckBox()=0 Then
    MsgBox "请选择你要确认的发货单!",,"CMS系统提示"
    Exit Function
  End If
  
  If Trim(form1.select1.value)="" Or Trim(form1.select2.value)="" Or Trim(form1.select3.value)="" Then
    MsgBox "请选择你要确认的到货时间!",,"CMS系统提示"
    Exit Function     
  End If 
  
  If CDate(Trim(form1.select1.value) & "-" & Trim(form1.select2.value) & "-" & Trim(form1.select3.value))>Date() Then
    MsgBox "你的收货日期不应该大于当前日期!",,"CMS系统提示"
    Exit Function
  End If
  
  If <%=LInt_RecCount%>>1 Then
     For LInt_i=0 To <%=LInt_RecCount%>-1
        If (form1.checkbox1(LInt_i).checked=true) Then
          If ((Trim(form1.text1(LInt_i).value)="") Or (Trim(form1.text2(LInt_i).value)="")) Then
            MsgBox "请认真填写选中的发货单的到货数量和损坏数量!",,"CMS系统提示"
            Exit Function
          Else
            If CSng(Trim(form1.text1(LInt_i).value))<0 Then
              Msgbox "你的到货数量不能为负数,请确认!",,"CMS系统提示"
              Exit Function
            End If
            If CSng(Trim(form1.text2(LInt_i).value))<0 Then
              Msgbox "你的损坏数量不能为负数,请确认!",,"CMS系统提示"
              Exit Function
            End If
            If (CSng(Trim(form1.text1(LInt_i).value))+CSng(Trim(form1.text2(LInt_i).value)))<>CSng(Trim(form1.DlvNum(LInt_i).value)) Then
              Msgbox "你的到货数量和损坏数量之和不等于发货数量,请确认!",,"CMS系统提示"
              Exit Function
            End If
          End If  
        End If  
     Next
  Else
     If (form1.checkbox1.checked=true) Then
        If ((Trim(form1.text1.value)="") Or (Trim(form1.text2.value)="")) Then
          MsgBox "请认真填写选中的发货单的到货数量和损坏数量!",,"CMS系统提示"
          Exit Function
        Else
          If CSng(Trim(form1.text1.value))<0 Then
            Msgbox "你的到货数量不能为负数,请确认!",,"CMS系统提示"
            Exit Function
          End If
          If CSng(Trim(form1.text2.value))<0 Then
            Msgbox "你的损坏数量不能为负数,请确认!",,"CMS系统提示"
            Exit Function
          End If
          If (CSng(Trim(form1.text1.value))+CSng(Trim(form1.text2.value)))<>CSng(Trim(form1.DlvNum.value)) Then
            Msgbox "你的到货数量和损坏数量之和不等于发货数量,请确认!",,"CMS系统提示"
            Exit Function
          End If         
        End If  
     End If   
  End If     
  
  If <%=LInt_RecCount%>>1 Then
     For LInt_i=0 To <%=LInt_RecCount%>-1
        If form1.checkbox1(LInt_i).checked=true Then
          form1.checkbox1(LInt_i).value=trim(form1.checkbox1(LInt_i).value) & "&" & trim(form1.text1(LInt_i).value) & "&" & trim(form1.text2(LInt_i).value)
        End If  
     Next
  Else
     form1.checkbox1.value=trim(form1.checkbox1.value) & "&" & trim(form1.text1.value) & "&" & trim(form1.text2.value)
  End If   
  form1.submit 	
End Function

Function FormReset()
  form1.reset()
End Function
-->  
</script>

<script LANGUAGE="javascript">
<!--
/*---------------------------------------------------------------------
功能:测试当前选择的添加
参数:
返回值:
--------------------------------------------------------------------
*/
	function TestCheckBox()
	{
		var String;
		var num;
		String = "";
		for (num = 0; num < Form1.checkbox1.length; num++)
		{
			if(Form1.checkbox1[num].checked)
			{
				String =String + Form1.checkbox1[num].value + "W";
			}
		}
		if(Form1.checkbox1.checked)
		{
			String = Form1.checkbox1.value;
		}
		if(String == "")
		{
			return 0;		
		}
		else
		{
			return 1;
		}
	}
-->  
</script>

⌨️ 快捷键说明

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