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

📄 cull_convert.asp

📁 用VB语言编写的物流管理系统的
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<% 
response.buffer=true
Response.Expires = 0
Response.CacheControl = "Private"
%>
<%const title="分拣操作"%>
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!-- #include file=../data/myPrg.asp-->
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<title><%=title%></title>
<link rel="stylesheet" type="text/css" href="../data/forum.css">
<script language=vbscript>
<!--
Sub datacheck()
if isdate(trim(input1.cull_date.value)) = false then
   msgbox "「分拣日期」格式不对!", 64, "请输入正确的日期!"
     document.input1.cull_date.focus()
     Exit Sub
  End if  
if isdate(trim(input1.cull_time.value)) = false then
   msgbox "「分拣时间」格式不对!", 64, "请输入正确的时间格式!"
     document.input1.cull_time.focus()
     Exit Sub
  End if  
if trim(input1.elink_odd.value)=empty then
   msgbox "「易联单号」不得为空白!", 64, "请输入易联单号 !"
     document.input1.elink_odd.focus()
     Exit Sub
  End if
if trim(input1.fact_weight.value)<> empty then
	if isnumeric(trim(input1.fact_weight.value)) = false then
	   msgbox "「实际重量」必须为数字!", 64, "请输入实际重量 !"
     document.input1.fact_weight.focus()
     Exit Sub
     end if
End if
if trim(input1.tally_weight.value)<> empty then
	if isnumeric(trim(input1.tally_weight.value)) = false then
	   msgbox "「记费重量」必须为数字!", 64, "请输入记费重量 !"
     document.input1.tally_weight.focus()
     Exit Sub
     end if
End if
if trim(input1.fact_weight.value)<> empty and trim(input1.tally_weight.value)<> empty then
	if clng(trim(input1.fact_weight.value)) > clng(trim(input1.tally_weight.value)) then
		msgbox "「记费重量」必须大于等于「实际重量」!", 64, "请输入正确的记费重量 !"
		document.input1.tally_weight.focus()
		Exit Sub	
	end if
end if
if trim(input1.cull_operate.value)= empty then
   msgbox "「分拣操作人」必须选择!", 64, "请输入分拣操作人!"
     document.input1.cull_operate.focus()
     Exit Sub
End if
if trim(input1.transport_no.value) <> empty then
	if isnumeric(trim(input1.transport_no.value)) = false then
	   msgbox "「件数」必须为数字!", 64, "请输入件数!"
     document.input1.transport_no.focus()
    
     Exit Sub
     end if
End if
input1.Submit
End Sub
-->
</script>
</head>
<body topmargin="0"  onload="javascript:self.moveTo(0,0);document.input1.cull_date.focus();">
<%
if isempty(session("username")) then
	call closedatabase
	Response.Write "请重新登入!"
	Response.End 
end if 
newcompanyid = request("companyid")
if newcompanyid = "" then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""请先选择公司再做此步操作!"");"
	Response.write "history.go(-1);"
	Response.Write "</script>"
	Response.End
elseif not isnumeric(newcompanyid) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""companyid必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
else
	newcompanyid = cint(newcompanyid)  
end if
arra = split(session("username"),";")
UserCompanyid = arra(0)
flag = arra(1)
User = arra(2)
userno = arra(4)
outw_id = request("id")
if not isnumeric(outw_id) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""id必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
end if
guest_id = request("guest_id")
if not isnumeric(guest_id) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""guest_id必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
end if
dc_id = request("dc_id")
if not isnumeric(dc_id) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""dc_id必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
end if
dir_flag = request("dir_flag")
if cstr(dir_flag) = "False" or cstr(dir_flag) = "0" then
	dir_flag = 0
elseif cstr(dir_flag) = "True"  or cstr(dir_flag) = "1" then
	dir_flag = 1
else
	call closedatabase
	Response.End 
end if
'Response.Write dir_flag
'Response.End 
outw_sra = request("sra")
outw_sra = replace(outw_sra,"'","’")
detail_id = request("detail_id")
detail_id = replace(detail_id,"'","’")
if Request.ServerVariables("REQUEST_METHOD")="POST" then
	'发运日期
	cull_date = trim(request("cull_date"))
	cull_date = replace(cull_date,":",":")
	'发运时间
	cull_time = trim(request("cull_time"))
	cull_time = replace(cull_time,":",":")
	cull_datetime = cull_date&" "&cull_time
	if isdate(cull_datetime) = false then
		call closedatabase
		Response.Write "<script language=javascript>"
		Response.Write "alert(""发运时间格式不正确,请按规定的格式填写!!!"");"
		Response.Write "history.go(-1);"
		Response.Write "</script>"
		Response.End 
	end if
	'易联单号
	elink_odd = trim(request("elink_odd"))
	elink_odd = replace(elink_odd,"'","’")
	'运输件数
	transport_no = trim(request("transport_no"))
	if transport_no = "" then transport_no = 0
	'实际重量
	fact_weight = trim(request("fact_weight"))
	if fact_weight = "" then fact_weight = 0
	'记费重量
	tally_weight = trim(request("tally_weight"))
	if tally_weight = "" then tally_weight = 0
	'分拣操作人
	cull_operate = trim(Request("cull_operate"))
	cull_operate = replace(cull_operate,"'","’")
	'分拣备注
	cull_beizu = trim(request("cull_beizu"))
	if cull_beizu = "" then 
		cull_beizu= " "
	else
		cull_beizu = replace(cull_beizu,"'","’")
	end if
	'分运单号
	transport_fenyun = trim(Request("transport_fenyun"))
	transport_fenyun = replace(transport_fenyun,"'","’")
	if transport_fenyun <> "" then
		sp = split(transport_fenyun,"/")
	     high = ubound(sp)+1
	end if
	if transport_no <> "" and transport_fenyun <> "" then 	     
		 Response.Write "<br>"
		 for i = 0 to ubound(sp)
			 if trim(sp(i)) = "" then
			 call closedatabase	
			 Response.Write "<center>第" & i+1 &"个分运单不对,您的输入格式可能错了</center>"
			 Response.Write  "<center>请<a href='#' onclick=history.go(-1)><font color=blue size=3>返回</font></a>检查分运单!</center>"
			 Response.End
			 end if
		 next
	end if
	if transport_fenyun <> "" then    
		if (transport_no <> "") and (transport_fenyun <> "") and (clng(transport_no) <> clng(high)) then 
				 call closedatabase	     
				 Response.Write "<br>"
			 	 Response.Write "<center>分运单个数不对!</center>"
				 Response.Write  "<center>请<a href='#' onclick=history.go(-1)><font color=blue size=3>返回</font></a>检查分运单!</center>"
				 Response.End
		end if    
	end  if
	'--------------------------------------
	'2003-1-27修改
	'检验该客户是否已经被分拣,防止被多次分拣
	sql = "select * from outward_detail where detail_outw_id = "&outw_id&" and detail_guest_id = "&guest_id&" and detail_elink_id = 0"
	set rs_detail = conn.execute(sql)
	if rs_detail.eof then
		rs_detail.close
		set rs_detail = nothing
		call closedatabase
		Response.Write "<script language=javascript>"
		Response.write "alert(""该客户分拣操作在此之前已经完成!请确认!!!"");opener.location.reload();"
		Response.Write  "window.close();</script>"
		Response.End 
	else
		rs_detail.close
		set rs_detail = nothing
	end if
	'--------------------------------------
	
	
	sql = "select * from outward_elink where elink_odd = '"&elink_odd&"' and elink_companyid = "&newcompanyid&""
	set rs_elink = conn.execute(sql)
	if rs_elink.eof then
		'Response.Write "outw_id "&outw_id&"<br>"
		'Response.Write "guest_id "&guest_id&"<br>"
		'Response.Write "elink_odd "&elink_odd&"<br>"
		'Response.Write "cull_datetime "&cull_datetime&"<br>"
		'Response.Write "transport_no "&transport_no &"<br>"
		'Response.Write "fact_weight " &fact_weight &"<br>"
		'Response.Write "tally_weight " &tally_weight &"<br>"
		'Response.Write "cull_operate "&cull_operate &"<br>"
		'Response.Write "newcompanyid " &newcompanyid&"<br>"
		'Response.Write "user " &user&"<br>"
		'Response.End 
		
		set cmd=server.CreateObject("ADODB.Command")
		cmd.ActiveConnection = conn
		cmd.CommandType = 4
		cmd.CommandText = "Cull_Convert"

⌨️ 快捷键说明

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