📄 direct_outward_2.asp
字号:
<%@ 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">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title><%=title%></title>
<link rel=stylesheet type=text/css href=../data/forum.css>
<%
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)
'id为OUTWARD表中的OUTW_ID
'若想更改信息的显示方式,换成数据库的信息而不用COOKIES,则将对应的信息赋予相应的变量
id = request("id")
if not isnumeric(id) then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""id必须为整数!"");history.go(-1);"
Response.Write "</script>"
Response.End
end if
if flag = 4 then
FlagUser = session("flag")
'该录入人员的客服的DC和PROD
dim dcservice,prodservice
dcservice = ""
prodservice = ""
dim dcFlag,prodFlag
dcFlag = false
prodFlag = false
for ver=0 to userno
if clng(newcompanyid) = clng(FlagUser(ver,9)) then
if instr(dcservice,FlagUser(ver,0)) < 1 then
if dcFlag = true then
dcservice = dcservice &","& FlagUser(ver,0)
else
dcservice = dcservice & FlagUser(ver,0)
dcFlag = true
end if
end if
if instr(prodservice,FlagUser(ver,1)) < 1 then
if prodFlag = true then
prodservice = prodservice &","& FlagUser(ver,1)
else
prodservice = prodservice & FlagUser(ver,1)
prodFlag = true
end if
end if
end if
next
end if
dim outw_dc_id_cookies,outw_date_cookies,consign_time_cookies,outw_sra_cookies
dim outw_prod_id_cookies,info_type_cookies
outw_dc_id_cookies = trim(Request.Cookies("dc_id"))
outw_date_cookies = Request.Cookies("outw_date")
prod_flag = Request.Cookies("prod_flag")
consign_time_cookies = trim(Request.Cookies("consign_date")) & " " & trim(Request.Cookies("consign_time"))
outw_sra_cookies = trim(Request.Cookies("outw_sra"))
outw_guest_id_cookies = Request.Cookies("outw_where")
outw_prod_id_cookies = Request.Cookies("prod_id")
info_type_cookies = Request.Cookies("info_type")
info_takeman_id_cookies = Request.Cookies("takeman_id")
info_yuji_time_cookies = Request.Cookies("yuji_time")
database = trim(request("database"))
direct = request("direct")
if direct <> "" then
direct = 1
inwa_take_address = Request.Cookies("take_address")
inwa_line_no = trim(Request.Cookies("line_no"))
if inwa_line_no = "" then inwa_line_no = " "
inwa_take_no = trim(Request.Cookies("take_no"))
if inwa_take_no = "" then inwa_take_no = " "
else
direct = 0
end if
'判断是否是追加记录
'如果DATABASE不为空,则须从数据库中将对应的信息取出让录入员参考是否
'DATABASE的变量
'1 从SAVE_OUTWARD.ASP中得到(在"?"参数之后)
'2 从SAVE_OUTWARD_2.ASP中得到
if database <> "" then
sql = "select * from outward where outw_id = "&id&""
set rs_outward = conn.execute(sql)
if not rs_outward.eof then
outw_dc_id_cookies = trim(rs_outward("outw_dc_id"))
sql = "select detail_prod_id,detail_guest_id from outward_detail where detail_id =(select max(detail_id) from outward_detail where detail_outw_id = "&id&" )"
set rs_max = conn.execute(sql)
if not rs_max.eof then
outw_prod_id_cookies = rs_max("detail_prod_id")
outw_guest_id_cookies = rs_max("detail_guest_id")
else
outw_prod_id_cookies = ""
outw_guest_id_cookies = ""
end if
rs_max.close
set rs_max = nothing
outw_date_cookies = rs_outward("outw_date")
consign_time_cookies = rs_outward("outw_consign_date")
outw_sra_cookies = rs_outward("outw_sra")
sql = "select info_type,info_takeman_id,info_yuji_time from detail_info where info_id = (select max(info_id) from detail_info where info_outw_id = "&id&")"
set rs_info = conn.execute(sql)
if not rs_info.eof then
info_type_cookies = rs_info("info_type")
info_takeman_id_cookies = rs_info("info_takeman_id")
info_yuji_time_cookies = rs_info("info_yuji_time")
else
info_type_cookies = ""
info_takeman_id_cookies = ""
info_yuji_time_cookies = ""
end if
rs_info.close
set rs_info = nothing
else
rs_outward.close
set rs_outward = nothing
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""该记录已经被删除!"");"
Response.Write "</script>"
Response.End
end if
end if
sql = "select inve_dc_id,inve_prod_id,inve_maysent,inve_total from inventory where inve_disabled = 0 and inve_companyid = "&newcompanyid&""
set rs_array = server.CreateObject("adodb.recordset")
rs_array.Open sql,conn,1,1
if not rs_array.eof then
i = 0
t = rs_array.recordcount
dim dc()
redim dc(t)
dim prod()
redim prod(t)
dim maysent()
redim maysent(t)
dim total()
redim total(t)
uv = 0
dc_id = 0
inve_total = 0
inve_maysent = 0
rs_array.movefirst
do while not rs_array.eof
dc(i) = rs_array("inve_dc_id")
prod(i) = rs_array("inve_prod_id")
maysent(i) = rs_array("inve_maysent")
total(i) = rs_array("inve_total")
rs_array.movenext
i = i + 1
loop
else
rs_array.Close
set rs_array = nothing
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""无可用库存或库存未被初始化!"");"
Response.Write "</script>"
Response.End
end if
rs_array.Close
set rs_array = nothing
sql = "select prod_id,prod_no,prod_type,prod_color,prod_flag from product where prod_companyid = "&newcompanyid&" and prod_disabled = 0"
set rs10 = conn.execute(sql)
sql = "select * from guest where guest_disabled = 0 and guest_flag = 1 and guest_companyid = "&newcompanyid&" order by guest_user "
set rs11 = conn.execute(sql)
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs10.eof
%>
subcat[<%=count%>] = new Array("<%response.write trim(rs10("prod_no"))&" " & rs10("prod_type") & " "&rs10("prod_color")%>","<%= trim(rs10("prod_flag"))%>","<%= trim(rs10("prod_id"))%>");
<%
count = count + 1
rs10.movenext
loop
rs10.close
set rs10=nothing
%>
onecount=<%=count%>;
var onecount2;
var u;
onecount2=0;
subcat2 = new Array();
var p;
p = 0;
city = new Array();
<%
count2 = 0
do while not rs11.eof
%>
subcat2[<%=count2%>] = new Array("<%response.write rs11("guest_code")%>","<%= trim(rs11("guest_user"))%>","<%= trim(rs11("guest_id"))%>","<%= trim(rs11("guest_address"))%>","<%= trim(rs11("guest_city"))%>","<%= trim(rs11("guest_contact"))%>","<%= trim(rs11("guest_tel"))%>","<%= trim(rs11("guest_pycode"))%>","<%= trim(rs11("guest_city"))%>");
<%
count2 = count2 + 1
rs11.movenext
loop
rs11.close
set rs11=nothing
%>
onecount2=<%=count2%>;
function changelocation2(locationid)
{
var locationid=locationid;
var i;
for (i=0;i < onecount2; i++)
{
if (subcat2[i][2] == locationid)
{
document.output1.guest_code.value = subcat2[i][0];
document.output1.guest_code.style.background = "#E7E4E6";
document.output1.guest_pycode.value = subcat2[i][7];
document.output1.guest_pycode.style.background = "#E7E4E6";
document.output1.guest_address.value = subcat2[i][3];
document.output1.guest_address.readOnly = true;
document.output1.guest_address.style.background = "#E7E4E6";
document.output1.guest_city.value = subcat2[i][4];
document.output1.guest_city.readOnly = true;
document.output1.guest_city.style.background = "#E7E4E6";
document.output1.guest_contact.value = subcat2[i][5];
document.output1.guest_contact.readOnly = true;
document.output1.guest_contact.style.background = "#E7E4E6";
document.output1.guest_tel.value = subcat2[i][6];
document.output1.guest_tel.readOnly = true;
document.output1.guest_tel.style.background = "#E7E4E6";
}
}
}
function GetCity(locationid)
{
document.output1.outw_where.length = 0;
var locationid=locationid;
var i;
city = new Array();
var ct;
ct = 0;
document.output1.city.options[0] = new Option('========请选择客户========','');
for (i=0;i < onecount2; i++)
{
document.output1.outw_where.options[document.output1.outw_where.length] = new Option(subcat2[i][1], subcat2[i][2]);
}
}
function GetGuest(locationid)
{
document.output1.outw_where.length = 0;
var locationid=locationid;
var i;
document.output1.outw_where.options[0] = new Option('========请选择客户========','');
for (i=0;i < onecount2; i++)
{
document.output1.outw_where.options[document.output1.outw_where.length] = new Option(subcat2[i][1], subcat2[i][2]);
}
}
function search(locationid,typeid)
{
var locationid=locationid;
var typeid = typeid;
var i;
var u;
u = 0;
for (i=0;i < onecount2; i++)
{ if (typeid == 1)
{
if (subcat2[i][0] == locationid)
{
document.output1.guest_code.value = subcat2[i][0];
document.output1.guest_code.style.background = "#E7E4E6";
document.output1.guest_pycode.value = subcat2[i][7];
document.output1.guest_pycode.style.background = "#E7E4E6";
document.output1.guest_address.value = subcat2[i][3];
document.output1.guest_address.readOnly = true;
document.output1.guest_address.style.background = "#E7E4E6";
document.output1.guest_city.value = subcat2[i][4];
document.output1.guest_city.readOnly = true;
document.output1.guest_city.style.background = "#E7E4E6";
document.output1.guest_contact.value = subcat2[i][5];
document.output1.guest_contact.readOnly = true;
document.output1.guest_contact.style.background = "#E7E4E6";
document.output1.guest_tel.value = subcat2[i][6];
document.output1.guest_tel.readOnly = true;
document.output1.guest_tel.style.background = "#E7E4E6";
document.output1.outw_where.selectedIndex = i+1;
u = 1;
sky();
}
}
else if (typeid == 2)
{
if (subcat2[i][7] == locationid)
{
document.output1.guest_code.value = subcat2[i][0];
document.output1.guest_code.style.background = "#E7E4E6";
document.output1.guest_pycode.style.background = "#E7E4E6";
document.output1.guest_address.value = subcat2[i][3];
document.output1.guest_address.readOnly = true;
document.output1.guest_address.style.background = "#E7E4E6";
document.output1.guest_city.value = subcat2[i][4];
document.output1.guest_city.readOnly = true;
document.output1.guest_city.style.background = "#E7E4E6";
document.output1.guest_contact.value = subcat2[i][5];
document.output1.guest_contact.readOnly = true;
document.output1.guest_contact.style.background = "#E7E4E6";
document.output1.guest_tel.value = subcat2[i][6];
document.output1.guest_tel.readOnly = true;
document.output1.guest_tel.style.background = "#E7E4E6";
document.output1.outw_where.selectedIndex = i+1;
u = 1;
sky();
}
}
}
if (u == 0)
{
document.output1.outw_where.selectedIndex = 0;
if (typeid == 1)
alert("没有找到客户编号为" + locationid + "相应的记录!");
else if (typeid == 2)
alert("没有找到客户的拼音编码为" + locationid + "相应的记录!");
set();
}
}
function set()
{
document.output1.guest_code.value = "";
document.output1.guest_code.readOnly = false;
document.output1.guest_code.style.background = "#FFFFFF";
document.output1.guest_pycode.value = "";
document.output1.guest_pycode.readOnly = false;
document.output1.guest_pycode.style.background = "#FFFFFF";
document.output1.guest_address.value = "";
document.output1.guest_address.readOnly = false;
document.output1.guest_address.style.background = "#FFFFFF";
document.output1.guest_city.value = "";
document.output1.guest_city.readOnly = false;
document.output1.guest_city.style.background = "#FFFFFF";
document.output1.guest_contact.value = "";
document.output1.guest_contact.readOnly = false;
document.output1.guest_contact.style.background = "#FFFFFF";
document.output1.guest_tel.value = "";
document.output1.guest_tel.readOnly = false;
document.output1.guest_tel.style.background = "#FFFFFF";
document.output1.guest_code.focus();
}
function init()
{
document.onkeydown=keydown;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -