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

📄 fayun_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>
<%
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
%>
<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.etd.value) <> empty then
	if isdate(trim(input1.etd.value)) = false then
		msgbox "「预计出发时间」格式不对!", 64, "预计出发时间必须为时间格式!!"
		document.input1.etd.focus()
		exit sub
	end if
end if
if trim(input1.etd.value) <> empty then
	if cdate(trim(input1.etd.value)) < cdate(trim(input1.cull_date.value) + " " + trim(input1.cull_time.value)) then
		msgbox "「预计出发时间」必须比「分拣时间」晚!!", 64, "请确认!!!"
		document.input1.etd.focus()
		exit sub
	end if
end if
 
if trim(input1.eta.value) <> empty then
	if isdate(trim(input1.eta.value)) = false then
		msgbox "「预计到达时间」格式不对!", 64, "预计到达时间必须为时间格式!!"
		document.input1.eta.focus()
		exit sub
	end if
end if
if trim(input1.etd.value) <> empty and trim(input1.eta.value) <> empty then
	if cdate(trim(input1.etd.value)) > cdate(trim(input1.eta.value)) then
		msgbox "「预计到达时间」必须比「预计出发时间」晚!", 64, "请确认!!!"
		document.input1.eta.focus()
		exit sub	
	end if
end if
if input1.car_city.value = "" then
   msgbox "「中转城市」必须选择!", 64, "请选择中转城市!"
     document.input1.car_city.focus()
     Exit Sub
  End if  
input1.Submit
End Sub
sub change()
	if input1.outw_type.value = 1 then
		window.location.href = "fayun_convert.asp?id=<%=request("id")%>&companyid=<%=newcompanyid%>"
	elseif input1.outw_type.value = 2 then
		window.location.href = "air_convert.asp?id=<%=request("id")%>&companyid=<%=newcompanyid%>"
	elseif input1.outw_type.value = 3 then
		window.location.href = "railway_convert.asp?id=<%=request("id")%>&companyid=<%=newcompanyid%>"
	elseif input1.outw_type.value = 4 then
		window.location.href = "ems_convert.asp?id=<%=request("id")%>&companyid=<%=newcompanyid%>"
	end if	
end sub
-->
</script>
</head>
<body topmargin="0"  onload="javascript:self.moveTo(0,0);document.input1.outw_type.focus();">
<%

arra = split(session("username"),";")
UserCompanyid = arra(0)
flag = arra(1)
User = arra(2)
userno = arra(4)
elink_id = request("id")
if flag > 4 then
	call closedatabase
	Response.Write "您无权操作!!!"
	Response.End 
end if
if Request.ServerVariables("REQUEST_METHOD")="POST" then
	fayuntype = request("outw_type")
	'发运日期
	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
	dim carFlag
	carFlag = 0
	etd = trim(request("etd"))
	etd = replace(etd,":",":")
	if etd <> "" then 
		carFlag = 1
	end if
	eta = trim(request("eta"))
	eta = replace(eta,":",":")
	if eta <> "" then 
		carFlag = 1
	end if
	car_city = trim(request("car_city"))
	if car_city = "" then
		 car_city = 0
	end if
	car_no = trim(request("car_no"))
	if car_no = "" then
		 car_no= " "
	else
		carFlag = 1
	end if
	car_paisong = trim(request("car_paisong"))
	if car_paisong = "" then 
		car_paisong = " " 
	else
		carFlag = 1
	end if
	sql = "select * from outward_elink where elink_id = "&elink_id&""
	set rs_elink = server.CreateObject("adodb.recordset")
	rs_elink.Open sql,conn,3,2
	if not rs_elink.eof then
		flagtype = rs_elink("transport_type")
		elink_flag = rs_elink("elink_flag")
		if flag <> 0 then
				rs_elink("send_date") = cull_datetime
				rs_elink("transport_type") = fayuntype
				rs_elink("attemper") = User
				if elink_flag <> 1 then
					rs_elink("elink_flag") = 9
				end if
				rs_elink("attemper_dc_id") = car_city
				rs_elink.Update 
			'sql = "update outward_elink set transport_type = "&fayuntype&",send_date = '"&cull_datetime&"',attemper = '"&user&"',elink_flag = 9 where elink_id = "&elink_id&" and elink_flag <> 1"
			'conn.execute(sql)
				if cint(carFlag) = 1 then
					sql = "select * from car"
					set rs_trans = server.CreateObject("adodb.recordset")
					rs_trans.Open sql,conn,3,2
					rs_trans.AddNew 
					rs_trans("car_elink_id") = elink_id
					if etd <> "" then
						rs_trans("car_etd") = etd
					end if
					if eta <> "" then
						rs_trans("car_eta") = eta
					end if
					'rs_trans("car_city_dc") = car_city
					rs_trans("car_no") = car_no
					rs_trans("car_paisong") = car_paisong
					rs_trans.Update 
					rs_trans.Close
					set rs_trans = nothing
				end if
			rs_elink.Close

⌨️ 快捷键说明

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