📄 direct_outward_2.asp
字号:
function keydown(locationid)
{
key = event.keyCode;
var locationid = locationid;
if (key == 13) //enter
if (locationid == 1)
{
if (document.output1.city.value != "")
GetGuest();
search(document.output1.guest_code.value,1);
}
else if (locationid == 2)
{
if (document.output1.city.value != "")
GetGuest();
search(document.output1.guest_pycode.value,2);
}
}
function changecity(locationid)
{
document.output1.outw_where.length = 0;
var locationid=locationid;
var i;
if (locationid == "")
GetGuest();
document.output1.outw_where.options[0] = new Option('========客户名称=======','');
for (i=0;i < onecount2; i++)
{
if (subcat2[i][4] == locationid)
{
document.output1.outw_where.options[document.output1.outw_where.length] = new Option(subcat2[i][1], subcat2[i][2]);
}
}
set();
document.output1.city.focus();
}
function changelocation(locationid)
{
document.output1.smalllocation.length = 0;
var locationid=locationid;
var i;
document.output1.smalllocation.options[0] = new Option('========产品编号========','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.output1.smalllocation.options[document.output1.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<script language=vbscript>
<!--
Sub datacheck()
if trim(output1.prod_type.value)=empty then
msgbox "「产品描述」不得为空白!", 64, "请输入产品描述!"
document.output1.prod_type.focus()
Exit Sub
End if
if output1.outw_no.value=empty then
msgbox "「数量」不得为空白!", 64, "请输入数量!"
document.output1.outw_no.focus()
Exit Sub
End if
if not isNumeric(trim(output1.outw_no.value)) then
msgbox "请检查数量的正确性!(要为数字)!", 64, "请输入数量!"
document.output1.outw_no.focus()
Exit Sub
end if
if trim(output1.outw_no.value) <= 0 then
msgbox "请检查数量的正确性!(要为大于0)!", 64, "请输入数量!"
document.output1.outw_no.focus()
Exit Sub
End if
if trim(output1.outw_type.value)=empty then
msgbox "「出库方式」必须选择!", 64, "请选择出库方式!"
document.output1.outw_type.focus()
Exit Sub
End if
if trim(output1.outw_where.value)=0 then
msgbox "「目的地」必须选择!", 64, "请选择目的地!"
document.output1.outw_where.focus()
Exit Sub
End if
if trim(output1.yuji_time.value)=empty then
msgbox "「时限要求」不得为空白!", 64, "请输入正确的时间!"
document.output1.yuji_time.focus()
Exit Sub
End if
if isdate(trim(output1.yuji_time.value)) = false then
msgbox "「时限要求」格式不对!", 64, "请输入正确的时间格式!"
document.output1.yuji_time.focus()
Exit Sub
End if
output1.Submit
End Sub
-->
</script>
</head><BODY >
<body topmargin="0" onload="javascript:document.output1.dc_id.focus()">
<%
Showtitle(title)
%>
<form action="direct_save_outward_2.asp" method="POST" name="output1">
<p align=center><font color=red>请在以下的表格中填入相关的数据</font>
<p>
<table align=center border=0>
<tr>
<td nowrap align=right><font color=blue>S R A :</td>
<td><%
Response.Write outw_sra_cookies
%></td>
</tr>
<tr>
<td nowrap align=right><font color=blue>填写 日 期:</td>
<td><%
Response.Write outw_date_cookies
%></td>
</tr>
<tr>
<td nowrap align=right><font color=blue>委托 时 间:</td>
<td><%
Response.Write consign_time_cookies
%></td>
</tr>
<tr>
<td nowrap align=right><font color=blue>D C 编 号:</td>
<td>
<%
response.write " <select class='smallinput' name='dc_id' size='1' onkeydown=""javascript:if(event.keyCode==13)event.keyCode=9"" >"
if flag = 4 then
sql="select dc_id,dc_code,dc_name from dc where dc_disabled = 0 and dc_companyid = "&newcompanyid&" and dc_id in ("&dcservice&")"
elseif flag < 4 then
sql = "select dc_id,dc_code,dc_name from dc where dc_disabled = 0 and dc_companyid = "&newcompanyid&""
end if
'Response.Write sql
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
rs.movefirst
do while not rs.eof
'if prod_id = rs("prod_id") then
' response.write "<option value='"+CStr(rs("prod_id"))+"' selected>"+rs("prod_no")+" "+rs("prod_type")+" "+rs("prod_color")+"</option>"+chr(13)+chr(10)
'else
if cstr(rs("dc_id")) = cstr(outw_dc_id_cookies) then
response.write "<option value='"+CStr(rs("dc_id"))+"'>"+rs("dc_code")+" "+rs("dc_name")+" </option>"+chr(13)+chr(10)
end if
'end if
rs.movenext
loop
else
response.write "<option value='0'>没有DC编号</option>"+chr(13)+chr(10)
end if
rs.close
set rs = nothing
response.write " </select>"
'response.write " ( 共 <font color=red>"&ntotal&"</font> 个 ) "
%>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>产品 类 别:</td>
<td>
<select name="biglocation" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onChange="javascript:changelocation(document.output1.biglocation.options[document.output1.biglocation.selectedIndex].value)">
<%
if flag = 4 then
sql = "select id,type_name from prod_type where type_companyid = "&newcompanyid&" and id in ("&prodservice&") order by id asc"
elseif flag < 4 then
sql = "select id,type_name from prod_type where type_companyid = "&newcompanyid&" order by id asc"
else
Response.Write "操作无效!"
Response.End
end if
'Response.Write sql
'Response.End
set rs10 = conn.Execute (sql)
do while not rs10.eof
if cstr(prod_flag) = cstr(rs10("id")) then
Response.Write "<option value='"&trim(rs10("id"))&"' selected >"&trim(rs10("type_name"))&"</option>"+chr(13)+chr(10)
else
Response.Write "<option value='"&trim(rs10("id"))&"'>"&trim(rs10("type_name"))&"</option>"+chr(13)+chr(10)
end if
rs10.movenext
loop
rs10.close
set rs10 = nothing
%>
</select>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>产品 编 号:</td>
<td>
<input class=smallInput onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" type=textbox name="prod_no" value='' maxlength='15'>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>产品 描 述:</td>
<td>
<input class=smallInput onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" type=textbox name="prod_type" value='' maxlength='25'>**
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>产品 备 注:</td>
<td>
<input class=smallInput onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" type=textbox name="prod_color" value='' maxlength='15'>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>出库数量:</td>
<td><input class=smallInput onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" type=textbox name="outw_no" value=''>**</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>客户 城 市:</td>
<td>
<select name="city" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onChange="javascript:changecity(document.output1.city.options[document.output1.city.selectedIndex].value)">
<option selected value="">========请选择城市========</option>
<%
sql = "select distinct guest_city from guest where guest_disabled = 0 and guest_flag = 1 and guest_companyid = "&newcompanyid&" order by guest_city asc "
set rs10 = conn.Execute (sql)
do while not rs10.eof
%>
<option value="<%=trim(rs10("guest_city"))%>"><%=trim(rs10("guest_city"))%></option>
<%
rs10.movenext
loop
rs10.close
set rs10 = nothing
%>
</select>
</tr>
<tr>
<td nowrap align=right><font color=blue>目 的 地:</td>
<td>
<%
response.write " <select class='smallinput' name='outw_where' onkeydown=""javascript:if(event.keyCode==13)event.keyCode=9"" size='1' onchange=""javascript:sky();changelocation2(document.output1.outw_where.options[document.output1.outw_where.selectedIndex].value)"">"
response.write "<option value='0'>--请选择客户--</option>"+chr(13)+chr(10)
sql="select * from guest where guest_disabled = 0 and guest_companyid = "&newcompanyid&" order by guest_user "
'Response.Write sql
set rs_guest = server.CreateObject("adodb.recordset")
rs_guest.open sql,conn,1,1
'set rs_guest = conn.execute(sql)
'rs.open sql,conn,1,1
'ntotal=rs_guest.recordcount
if not rs_guest.eof then
rs_guest.movefirst
do while not rs_guest.eof
if ((outw_guest_id_cookies <> "") and (cstr(outw_guest_id_cookies) = cstr(rs_guest("guest_id")))) then
response.write "<option value='"&rs_guest("guest_id")&"' selected>"&rs_guest("guest_user")&"</option>"+chr(13)+chr(10)
else
response.write "<option value='"&rs_guest("guest_id")&"'>"&rs_guest("guest_user")&"</option>"+chr(13)+chr(10)
end if
rs_guest.movenext
loop
else
response.write "<option value='0'>没有客户</option>"+chr(13)+chr(10)
end if
rs_guest.close
set rs_guest = nothing
response.write " </select>"
%>
<input class=buttonface type=button tabindex=30 value=新增客户 onclick="javascript:window.open('guestadd.asp?action=edit&tt=<%=now()%>&companyid=<%=newcompanyid%>&id='+document.output1.outw_where.options[document.output1.outw_where.selectedIndex].value,'hamier6','height=500,width=600,scrollbars')" id=button1 name=button1>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>客户 编 号:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=31 name="guest_code" value='' maxlength='9' onkeydown="javascript:keydown(1)">
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>拼音 编 码:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=32 name="guest_pycode" value='' maxlength='20' onkeydown="javascript:keydown(2)">
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>所属 城 市:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=33 name="guest_city" value='' maxlength='10' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>客户 地 址:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=34 name="guest_address" value='' maxlength='25' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>联系人:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=35 name="guest_contact" value='' maxlength='10' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>联系电话:</td>
<td>
<input class=smallInput size=40 type=textbox tabindex=36 name="guest_tel" value='' maxlength='80' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>出库方式:</td>
<td>
<select class='smallinput' name='outw_type' size='1' onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" >
<option value=''>===请选择====</option>
<option value='空运门到门' <% if cstr(info_type_cookies) = "空运门到门" then Response.Write "selected"%> >空运门到门</option>
<option value='空运自提' <% if cstr(info_type_cookies) = "空运自提" then Response.Write "selected"%>>空运自提</option>
<option value='汽运门到门' <% if cstr(info_type_cookies) = "汽运门到门" then Response.Write "selected"%>>汽运门到门</option>
<option value='汽运自提' <% if cstr(info_type_cookies) = "汽运自提" then Response.Write "selected"%>>汽运自提</option>
<option value='仓库自提' <% if cstr(info_type_cookies) = "仓库自提" then Response.Write "selected"%>>仓库自提</option>
<option value='EMS' <% if cstr(info_type_cookies) = "EMS" then Response.Write "selected"%>>EMS</option>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>收货人订单号:</td>
<td><input class=smallInput type=textbox name="takeman_id" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" value='<%
Response.Write info_takeman_id_cookies
%>' maxlength=30></td>
</tr>
<tr>
<td nowrap align=right><font color=blue>时限 要 求:</td>
<td><input class=smallInput type=textbox name="yuji_time" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" value='<%
Response.Write info_yuji_time_cookies
%>'>**(如:2001-11-23 18:30)</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>出库摘要:</td>
<td><textarea class=smallarea name=outw_beizu rows=3 cols=40 onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" ></textarea></td>
</tr>
<tr>
<td>
<td><br>
<input type=hidden name=direct value="<%=direct%>">
<input type=hidden name=database value="<%=database%>">
<input type=hidden name=id value="<%=id%>">
<input type=hidden name=companyid value="<%=newcompanyid%>">
<input class=buttonface type=button onclick="datacheck()" name=ok value=" 确 定 ">
</tr>
</table>
</form>
<script language="JavaScript">
<!--
function sky()
{var tyu;
tyu = output1.outw_where.value;
if (<%=outw_guest_id_cookies%> == tyu )
{
document.output1.outw_type.disabled =true;
document.output1.takeman_id.disabled = true;
document.output1.yuji_time.disabled = true;
document.output1.outw_beizu.disabled = true;
}
else
{
document.output1.outw_type.disabled =false;
document.output1.takeman_id.disabled = false;
document.output1.yuji_time.disabled = false;
document.output1.outw_beizu.disabled = false;
}
}
-->
</script>
<!--#include file=../data/copyright.asp-->
<%call closedatabase%>
<script LANGUAGE="javascript">
changelocation(document.output1.biglocation.options[document.output1.biglocation.selectedIndex].value);
document.output1.outw_type.disabled =true;
document.output1.takeman_id.disabled = true;
document.output1.yuji_time.disabled = true;
document.output1.outw_beizu.disabled = true;
changelocation2(document.output1.outw_where.options[document.output1.outw_where.selectedIndex].value);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -