?? outward_2.asp
字號:
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;
}
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();
}
function changelocation(locationid)
{
GetPinming();
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.smalllocation.value)=empty then
msgbox "「物品編號」必須選擇!", 64, "請選擇物品編號!"
document.output1.smalllocation.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="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>出庫單號SRA:</td>
<td><%
Response.Write outw_sra_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>倉庫 編 號:</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&") order by dc_code asc"
elseif flag < 4 then
sql = "select dc_id,dc_code,dc_name from dc where dc_disabled = 0 and dc_companyid = "&newcompanyid&" order by dc_code asc"
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_danwei")+"</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
call closedatabase
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>
<select name="pinming" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onChange="javascript:ChangePinming(document.output1.pinming.options[document.output1.pinming.selectedIndex].value)">
<option selected value="">========物品品名========</option>
</select>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>物品 編 號:</td>
<td>
<select name="smalllocation" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" >
<option selected value="">========物品編號========</option>
</select>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>出庫 數 量:</td>
<td><input class=smallInput type=textbox name="outw_no" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" 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 tabindex=25 type=button 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 tabindex=26 size=40 type=textbox 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 tabindex=27 size=40 type=textbox 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 tabindex=28 size=40 type=textbox name="guest_city" value='' maxlength='10' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>領貨人 地 址:</td>
<td>
<input class=smallInput tabindex=29 size=40 type=textbox name="guest_address" value='' maxlength='25' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>聯系人:</td>
<td>
<input class=smallInput tabindex=30 size=40 type=textbox name="guest_contact" value='' maxlength='10' readonly>
</td>
</tr>
<tr>
<td nowrap align=right><font color=blue>聯系電話:</td>
<td>
<input class=smallInput tabindex=31 size=40 type=textbox name="guest_tel" value='' maxlength='80' readonly>
</td>
</tr>
<tr style="display:none">
<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>
</td>
</tr>
<tr style="display:none">
<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 style="display:none">
<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-->
<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;
GetPinming();
changelocation2(document.output1.outw_where.options[document.output1.outw_where.selectedIndex].value);
</script>
</body>
</html>
<%call closedatabase%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -