<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
if isDepartment("0402")=0 then
|
Response.Redirect "/"
|
Response.End()
|
end If
|
|
'各种返回信息
|
SystemMessageType=trim(Request("SystemMessageType"))
|
SMT=trim(Request("SMT"))
|
if SystemMessageType<>"" then
|
if SMT="1" then
|
SystemMessageTXT="必要数据不足!!"
|
elseif SMT="2" then
|
SystemMessageTXT="单据保存完成!!"
|
elseif SMT="3" then
|
SystemMessageTXT="单据已审核或已完结,不可修改!!"
|
elseif SMT="4" then
|
SystemMessageTXT="单据审核完成!!"
|
elseif SMT="5" then
|
SystemMessageTXT="单据操作失败!!"
|
elseif SMT="6" then
|
SystemMessageTXT="单据反审核完成!!"
|
elseif SMT="7" then
|
SystemMessageTXT="单据作废完成!!"
|
elseif SMT="8" then
|
SystemMessageTXT="单据部分"&OrdTypeName1&"完成!!"
|
elseif SMT="9" then
|
SystemMessageTXT="单据审核"&OrdTypeName1&"完成!!"
|
end if
|
end if
|
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
%>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<title><%=LindemanAdmin%></title>
|
<!--#include virtual="/inc/ccs.gds"-->
|
</head>
|
<body onkeydown="xKeyEvent(event)">
|
<!--#INCLUDE FILE="menu_header.gds" -->
|
<!-- content -->
|
<div id="content">
|
<!--#INCLUDE FILE="MRP_menu_left.gds" -->
|
<!-- content / right -->
|
<div id="right">
|
<!-- messages -->
|
<!-- forms -->
|
<div class="box">
|
<!-- box / title -->
|
<div class="title">
|
<h5>新增物品货架对照</h5>
|
<ul class="links">
|
<li><a href="javascript:JS_Form1SaveSubmit(0);">提交新增</a></li>
|
<%
|
if PositionURLID="1" then PositionURLID=11
|
ReturnURL=session("PositionURL"&PositionURLID)
|
if InStr(ReturnURL,"?")<1 then
|
ReturnURL=ReturnURL&"?ReturnURLID="&(PositionURLID)
|
else
|
ReturnURL=ReturnURL&"&ReturnURLID="&(PositionURLID)
|
end if
|
%>
|
<li><a href="<%=ReturnURL%>">返回</a></li>
|
</ul>
|
</div>
|
<script LANGUAGE="javascript">
|
//表单提交-保存
|
function JS_Form1SaveSubmit(State)
|
{
|
JS_SystemMessageClose();
|
if (State==0) //新建/修改单据
|
{
|
if (document.getElementById("OrderWarehouseID").value=='')
|
{
|
JS_SystemMessage(1,"仓库不可为空");
|
return false;
|
}
|
if (document.getElementById("ShelvesListY").value<=0)
|
{
|
JS_SystemMessage(1,"请选择关连的货架");
|
return false;
|
}
|
if (document.getElementById("StItmListY").value<=0)
|
{
|
JS_SystemMessage(1,"请选择关连的物品");
|
return false;
|
}
|
form1.submit();
|
}
|
}
|
</script>
|
<!-- end box / title -->
|
<!--#include virtual="/inc/SystemMessages.gds" -->
|
<form id="form1" name="form1" action="admin_save.gds" method="post">
|
<input name="admin_save" id="admin_save" type="hidden" value="97">
|
<div class="form">
|
<div class="fields">
|
<div class="field field-first">
|
<div class="label" style="float: left;margin-left: 0px;">
|
<label for="input-small"><%=OrdTypeName1%>仓库:</label>
|
</div>
|
<div class="input" style="float:left;margin-left: 70px;">
|
<select name="OrderWarehouseID" id="OrderWarehouseID" style="width:150px;padding: 5px 0 5px 1px;" class="select">
|
<%If MRP_OrderID="" then%><option value="">请选择</option><%End If%>
|
<%sql="select WarehouseID,WarehouseName from MRP_Warehouse"
|
rs.open Sql,objConn,1,1
|
do while not rs.Eof
|
WarehouseID = rs("WarehouseID")
|
WarehouseName = rs("WarehouseName")
|
%>
|
<option value="<%=WarehouseID%>"<%if WarehouseID=OrderWarehouseID then Response.Write " selected"%>><%=WarehouseName%></option>
|
<%
|
rs.movenext
|
Loop
|
rs.close()
|
%>
|
</select>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
<!-- box / title -->
|
<div class="title">
|
<h5>货架</h5>
|
<ul class="links">
|
<li><a onclick="javascript:JS_ShelvesOpen('OrderWarehouseID');">添加</a></li>
|
<li><a onclick="javascript:JS_ShelvesDel();">删除</a></li>
|
</ul>
|
</div>
|
<div class="table">
|
<table>
|
<thead>
|
<tr style="white-space: nowrap;">
|
<th class="left" style="width: 20px;">序号</th>
|
<th>货架</th>
|
<th>备注</th>
|
<th></th>
|
</tr>
|
</thead>
|
<input name="ShelvesListY" id="ShelvesListY" type="hidden" value="0">
|
<tbody id="ShelvesList">
|
|
</tbody>
|
<%if Y<=4 then%>
|
<tbody id="ShelvesList1">
|
<%for j=Y to 4%>
|
<tr id="Shelves1_<%=j%>">
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td class="selected last"> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
<%end if%>
|
|
</table>
|
</div>
|
<!-- end box / title -->
|
<!-- 弹窗A -->
|
<div class="dialogJ dialogJfix dialogJshadow" id="window_Shelves" style="z-index: 50007; width:900px; left: 0px; top: 0px;display:none;">
|
<div class="dialogJtitle">
|
<a href="javascript:JS_ShelvesClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<input id="ShelvesJSID" type="hidden" value="">
|
<span class="dialogJtxt">选择货架</span> <input type="text" id="ShelvesSearchTXT" name="ShelvesSearchTXT" value="<%=ShelvesSearchTXT%>" style="width: 200px;" onkeypress="EnterPress_Shelves(event)" onkeydown="EnterPress_Shelves()"/> <input type="button" name="button3" value="查询" onclick="JS_ShelvesSearch();"> <input type="button" name="button3" value="添加" onclick="JS_ShelvesSave(0);");"> <input type="button" name="button3" value="继续添加" onclick="JS_ShelvesSave(1);">
|
</div>
|
<div class="dialogJcontent">
|
<div class="box">
|
<div class="table" style="padding: 0px;">
|
<input name="window_ShelvesID" type="hidden" value="">
|
<table>
|
<thead>
|
<tr>
|
<th class="selected left" style="text-align: center;">选择</th>
|
<th class="selected left" style="text-align: center;">仓库</th>
|
<th class="selected left" style="text-align: center;">货架</th>
|
<th class="selected left" style="text-align: center;">备注</th>
|
</tr>
|
</thead>
|
<tbody id="NewShelvesList">
|
<%for j=0 to 10%>
|
<tr>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script LANGUAGE="javascript">
|
//打开选择货架窗口
|
function JS_ShelvesOpen(id)
|
{
|
JS_SystemMessageClose();
|
WarehouseID=document.getElementById("OrderWarehouseID").value;
|
var sTop=document.documentElement.scrollTop;
|
if (sTop==0) {sTop=document.body.scrollTop;}
|
var sLeft= document.documentElement.scrollLeft;
|
if (sLeft==0) {sLeft=document.body.scrollLeft;}
|
|
var dTop = document.getElementById(id).getBoundingClientRect().top;
|
if (dTop<200) {dTop=110;}
|
var dLeft = document.getElementById(id).getBoundingClientRect().left;
|
if (dLeft<200) {dLeft=200;}
|
window_Shelves.style.display="block";
|
window_Shelves.style.left=(dLeft)+"px";
|
window_Shelves.style.top=(sTop+dTop+30)+"px";
|
window.HiddenFrame.location.replace("ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID);
|
}
|
//关闭选择货架窗口
|
function JS_ShelvesClose()
|
{
|
document.all.ShelvesSearchTXT.value='';
|
window_Shelves.style.display="none";
|
}
|
//选择货架查询
|
function JS_ShelvesSearch()
|
{
|
ShelvesSearchTXT=document.all.ShelvesSearchTXT.value;
|
WarehouseID=document.getElementById("OrderWarehouseID").value;
|
window.HiddenFrame.location.replace('ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID='+WarehouseID+'&ShelvesSearchTXT='+ShelvesSearchTXT);
|
}
|
function EnterPress_Shelves(e){ //传入 event
|
var e = e || window.event;
|
if(e.keyCode == 13){JS_ShelvesSearch();}
|
}
|
//选择货架
|
function JS_ShelvesSave(is)
|
{
|
var NewShelvesIDs=document.getElementsByName("NewShelvesID");
|
var Y=parseInt(document.getElementById("ShelvesListY").value);
|
var ShelvesListArray=new Array()
|
for(var i=1;i<=Y;i++)
|
{
|
var OD_ShelvesDle=document.getElementById("ShelvesDle_"+i).checked;
|
ShelvesListArray[i]=new Array(OD_ShelvesDle)
|
}
|
var ShelvesList=document.getElementById("ShelvesList");
|
var ShelvesListHTML=ShelvesList.innerHTML;
|
for(var i=0;i<NewShelvesIDs.length;i++)
|
{
|
if (NewShelvesIDs[i].checked==true)
|
{
|
Y=Y+1;
|
ShelvesName=document.getElementById("NewShelvesName_"+NewShelvesIDs[i].value).innerHTML;
|
ShelvesOrder2=document.getElementById("NewvOrder2_"+NewShelvesIDs[i].value).innerHTML;
|
|
ShelvesListHTML=ShelvesListHTML+"<tr style='white-space: nowrap;' id='Shelves_"+Y+"'>"
|
ShelvesListHTML=ShelvesListHTML+"<input name='ShelvesID_"+Y+"' type='hidden' value='"+NewShelvesIDs[i].value+"'>"
|
ShelvesListHTML=ShelvesListHTML+"<td class='selected'>"+Y+"</td>"
|
ShelvesListHTML=ShelvesListHTML+"<td class='category left'>"+ShelvesName+"</td>"
|
ShelvesListHTML=ShelvesListHTML+"<td class='category left'>"+ShelvesOrder2+"</td>"
|
ShelvesListHTML=ShelvesListHTML+"<td class='selected last'><input id='ShelvesDle_"+Y+"' name='ShelvesDle' value='"+Y+"' type='checkbox'/></td>"
|
ShelvesListHTML=ShelvesListHTML+"</tr>"
|
ShelvesList.innerHTML=ShelvesListHTML;
|
if (Y-1<4) {document.getElementById("ShelvesList1").deleteRow(0);}
|
document.getElementById("ShelvesListY").value=Y;
|
JS_NewShelves(NewShelvesIDs[i].value,0);
|
};
|
}
|
if (ShelvesListArray.length>1)
|
{
|
for (var i=1;i<ShelvesListArray.length;i++)
|
{
|
document.getElementById("ShelvesDle_"+i).checked=ShelvesListArray[i][3];
|
}
|
}
|
if (is==0){JS_ShelvesClose();}
|
//JS_ShelvesListSum();
|
}
|
//删除选择货架
|
function JS_ShelvesDel()
|
{
|
var ShelvesDle=document.getElementsByName("ShelvesDle");
|
for(var i=0;i<ShelvesDle.length;i++)
|
{
|
if (ShelvesDle[i].checked==true)
|
{
|
document.getElementById('Shelves_'+ShelvesDle[i].value).style.display='none';
|
};
|
}
|
//JS_ShelvesListSum();
|
}
|
//显示货架列表窗口
|
function JS_ShelvesList(ShelvesListArray,acc1,acc2,ShelvesSearchTXT,acc3)
|
{
|
var WarehouseID=document.getElementById("OrderWarehouseID").value;
|
var ShelvesListHTML = "";
|
var i = 0;
|
if (ShelvesListArray.length>0)
|
{
|
for (var i=0;i<ShelvesListArray.length;i++)
|
{
|
ShelvesListHTML = ShelvesListHTML+"<tr style='cursor:pointer' id='NewShelvesTR_"+ShelvesListArray[i][0]+"'>"
|
ShelvesListHTML = ShelvesListHTML+"<td class='selected last'><input id='NewShelves_"+ShelvesListArray[i][0]+"' name='NewShelvesID' value='"+ShelvesListArray[i][0]+"' type='checkbox'/></td>"
|
ShelvesListHTML = ShelvesListHTML+"<td class='selected' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewWarehouseName_"+ShelvesListArray[i][0]+"' style='white-space: nowrap;'>"+ShelvesListArray[i][4]+"</td>"
|
ShelvesListHTML = ShelvesListHTML+"<td class='selected' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewShelvesName_"+ShelvesListArray[i][0]+"' style='white-space: nowrap;'>"+ShelvesListArray[i][1]+"</td>"
|
ShelvesListHTML = ShelvesListHTML+"<td class='category' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewvOrder2_"+ShelvesListArray[i][0]+"' style='white-space: nowrap;'>"+ShelvesListArray[i][3]+"</td>"
|
ShelvesListHTML = ShelvesListHTML+"</tr>";
|
}
|
}
|
if (acc2>1)
|
{
|
i=i+1;
|
ShelvesListHTML = ShelvesListHTML+"<tr><td colspan='9' style='text-align:center;'>";
|
if (acc1>1){ShelvesListHTML = ShelvesListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&ShelvesSearchTXT="+ShelvesSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{ShelvesListHTML = ShelvesListHTML+" ";}
|
if (acc1<acc2){ShelvesListHTML = ShelvesListHTML+" <a href='javascript:window.HiddenFrame.location.replace(\"ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&ShelvesSearchTXT="+ShelvesSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a>";}
|
ShelvesListHTML = ShelvesListHTML+" 共 "+acc3+" 条记录</td></tr>";
|
}
|
|
for (var j=i;j<=10;j++)
|
{
|
ShelvesListHTML = ShelvesListHTML+"<tr><td class='category'> </td><td class='category last1'> </td><td class='category last1'> </td><td class='category last1'> </td></tr>";
|
}
|
document.getElementById("NewShelvesList").innerHTML=ShelvesListHTML;
|
|
}
|
//选择项目
|
function JS_NewShelves(id,is)
|
{
|
var NewShelvesCheckbox=document.getElementById('NewShelves_'+id).checked;
|
if (is==1 && NewShelvesCheckbox==false)
|
{
|
document.getElementById('NewShelves_'+id).checked=true;
|
document.getElementById("NewShelvesTR_"+id).className='selected ';
|
}
|
else if (is==0 && NewShelvesCheckbox==true)
|
{
|
document.getElementById('NewShelves_'+id).checked=false;
|
document.getElementById("NewShelvesTR_"+id).className='';
|
}
|
}
|
</script>
|
<!-- end 弹窗A -->
|
|
|
<!-- box / title -->
|
<div class="title">
|
<h5>物品列表</h5>
|
<ul class="links">
|
<li><a onclick="javascript:JS_StItmOpen('OrderWarehouseID');">添加</a></li>
|
<li><a onclick="javascript:JS_StItmDel();">删除</a></li>
|
</ul>
|
</div>
|
<!-- end box / title -->
|
<%
|
StItmListY=0
|
%>
|
<div class="table">
|
<table>
|
<thead>
|
<tr style="white-space: nowrap;">
|
<th class="left" style="width: 20px;">序号</th>
|
<th>物品名称</th>
|
<th>单位</th>
|
<th>现库存</th>
|
<th></th>
|
</tr>
|
</thead>
|
<input name="StItmListY" id="StItmListY" type="hidden" value="<%=StItmListY%>">
|
<tbody id="StItmList">
|
|
</tbody>
|
<%if Y<=11 then%>
|
<tbody id="StItmList1">
|
<%for j=Y to 11%>
|
<tr id="StItm1_<%=j%>">
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td class="selected last"> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
<%end if%>
|
|
</table>
|
</div>
|
</div>
|
</div>
|
</form>
|
<!-- end forms -->
|
|
<!-- 弹窗 -->
|
<div class="dialogJ dialogJfix dialogJshadow" id="window_StItm" style="z-index: 50007; width:900px; left: 0px; top: 0px;display:none;">
|
<div class="dialogJtitle">
|
<a href="javascript:JS_StItmClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<input id="StItmJSID" type="hidden" value="">
|
<span class="dialogJtxt">选择物品</span> <input type="text" id="StItmSearchTXT" name="StItmSearchTXT" value="<%=StItmSearchTXT%>" style="width: 200px;" onkeypress="EnterPress_StItm(event)" onkeydown="EnterPress_StItm()"/> <input type="button" name="button3" value="查询" onclick="JS_StItmSearch();"> <input type="button" name="button3" value="添加" onclick="JS_StItmSave(0);");"> <input type="button" name="button3" value="继续添加" onclick="JS_StItmSave(1);">
|
</div>
|
<div class="dialogJcontent">
|
<div class="box">
|
<div class="table" style="padding: 0px;">
|
<input name="window_StItmID" type="hidden" value="">
|
<table>
|
<thead>
|
<tr>
|
<th class="selected left" style="text-align: center;">选择</th>
|
<th class="selected left" style="text-align: center;">物料号</th>
|
<th class="selected left" style="text-align: center;">条形码</th>
|
<th class="category left" style="text-align: center;">物品名称</th>
|
<th class="selected left" style="text-align: center;">单位</th>
|
<th>库存</th>
|
</tr>
|
</thead>
|
<tbody id="NewStItmList">
|
<%for j=0 to 10%>
|
<tr>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script LANGUAGE="javascript">
|
//打开选择物品窗口
|
function JS_StItmOpen(id)
|
{
|
JS_SystemMessageClose();
|
WarehouseID=document.getElementById("OrderWarehouseID").value;
|
var sTop=document.documentElement.scrollTop;
|
if (sTop==0) {sTop=document.body.scrollTop;}
|
var sLeft= document.documentElement.scrollLeft;
|
if (sLeft==0) {sLeft=document.body.scrollLeft;}
|
|
var dTop = document.getElementById(id).getBoundingClientRect().top;
|
if (dTop<200) {dTop=110;}
|
var dLeft = document.getElementById(id).getBoundingClientRect().left;
|
if (dLeft<200) {dLeft=200;}
|
window_StItm.style.display="block";
|
window_StItm.style.left=(dLeft)+"px";
|
window_StItm.style.top=(sTop+dTop+30)+"px";
|
window.HiddenFrame.location.replace("MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID);
|
}
|
//关闭选择物品窗口
|
function JS_StItmClose()
|
{
|
document.all.StItmSearchTXT.value='';
|
window_StItm.style.display="none";
|
}
|
//选择物品查询
|
function JS_StItmSearch()
|
{
|
StItmSearchTXT=document.all.StItmSearchTXT.value;
|
WarehouseID=document.getElementById("OrderWarehouseID").value;
|
window.HiddenFrame.location.replace('StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID='+WarehouseID+'&StItmSearchTXT='+StItmSearchTXT);
|
}
|
function EnterPress_StItm(e){ //传入 event
|
var e = e || window.event;
|
if(e.keyCode == 13){JS_StItmSearch();}
|
}
|
//物品列表总金额/总数量
|
function JS_StItmListSum()
|
{
|
JS_SystemMessageClose();
|
var Y=parseInt(document.getElementById("StItmListY").value);
|
var TotalMoney=0;
|
var TotalQty=0;
|
for(var i=1;i<=Y;i++)
|
{
|
var Stock=document.getElementById("Stock_"+i).innerHTML;
|
var OD_Price=document.getElementById("OD_Price_"+i).value;
|
var OD_Qty=document.getElementById("OD_Qty_"+i).value;
|
var OD_Remarks=document.getElementById("OD_Remarks_"+i).value;
|
var OD_ItmDle=document.getElementById("ItmDle_"+i).checked;
|
if (OD_ItmDle!=true)
|
{
|
<%if OrdType="15" then Response.Write "if (parseFloat(OD_Qty)>parseFloat(Stock)){JS_SystemMessage(4,'"&OrdTypeName1&"数量不可以大于现有库存');document.getElementById('TotalQty_TXT').value=0;return false;}"%>
|
SumMoney=parseFloat(OD_Price)*parseFloat(OD_Qty)
|
TotalMoney=(TotalMoney+SumMoney);
|
TotalQty=TotalQty+parseFloat(OD_Qty);
|
}
|
document.getElementById("OD_PriceSum_"+i).innerHTML=SumMoney.toFixed(2);
|
}
|
document.getElementById("TotalMoney_TXT").value=TotalMoney.toFixed(2);
|
document.getElementById("TotalQty_TXT").value=TotalQty;
|
|
}
|
//选择物品
|
function JS_StItmSave(is)
|
{
|
var NewItmIDs=document.getElementsByName("NewItmID");
|
var Y=parseInt(document.getElementById("StItmListY").value);
|
var StItmListArray=new Array()
|
for(var i=1;i<=Y;i++)
|
{
|
var OD_ItmDle=document.getElementById("ItmDle_"+i).checked;
|
StItmListArray[i]=new Array(OD_ItmDle)
|
}
|
var StItmList=document.getElementById("StItmList");
|
var StItmListHTML=StItmList.innerHTML;
|
for(var i=0;i<NewItmIDs.length;i++)
|
{
|
if (NewItmIDs[i].checked==true)
|
{
|
Y=Y+1;
|
strItmName=document.getElementById("NewItmName_"+NewItmIDs[i].value).innerHTML;
|
ItmUnit=document.getElementById("NewItmUnit_"+NewItmIDs[i].value).innerHTML;
|
Stock=document.getElementById("NewItmStock_"+NewItmIDs[i].value).innerHTML;
|
|
StItmListHTML=StItmListHTML+"<tr style='white-space: nowrap;' id='StItm_"+Y+"'>"
|
StItmListHTML=StItmListHTML+"<input name='StItmID_"+Y+"' type='hidden' value='"+NewItmIDs[i].value+"'>"
|
StItmListHTML=StItmListHTML+"<td class='selected'>"+Y+"</td>"
|
StItmListHTML=StItmListHTML+"<td class='category left'>"+strItmName+"</td>"
|
StItmListHTML=StItmListHTML+"<td class='selected'>"+ItmUnit+"</td>"
|
StItmListHTML=StItmListHTML+"<td class='selected' id='Stock_"+Y+"'>"+Stock+"</td>"
|
StItmListHTML=StItmListHTML+"<td class='selected last'><input id='ItmDle_"+Y+"' name='ItmDle' value='"+Y+"' type='checkbox'/></td>"
|
StItmListHTML=StItmListHTML+"</tr>"
|
StItmList.innerHTML=StItmListHTML;
|
if (Y-1<11) {document.getElementById("StItmList1").deleteRow(0);}
|
document.getElementById("StItmListY").value=Y;
|
JS_NewItm(NewItmIDs[i].value,0);
|
};
|
}
|
if (StItmListArray.length>1)
|
{
|
for (var i=1;i<StItmListArray.length;i++)
|
{
|
document.getElementById("ItmDle_"+i).checked=StItmListArray[i][3];
|
}
|
}
|
if (is==0){JS_StItmClose();}
|
//JS_StItmListSum();
|
}
|
//删除选择物品
|
function JS_StItmDel()
|
{
|
var ItmDle=document.getElementsByName("ItmDle");
|
for(var i=0;i<ItmDle.length;i++)
|
{
|
if (ItmDle[i].checked==true)
|
{
|
document.getElementById('StItm_'+ItmDle[i].value).style.display='none';
|
};
|
}
|
//JS_StItmListSum();
|
}
|
//显示物品列表窗口
|
function JS_StItmList(StItmListArray,acc1,acc2,StItmSearchTXT,acc3)
|
{
|
var WarehouseID=document.getElementById("OrderWarehouseID").value;
|
var StItmListHTML = "";
|
var i = 0;
|
if (StItmListArray.length>0)
|
{
|
for (var i=0;i<StItmListArray.length;i++)
|
{
|
StItmListHTML = StItmListHTML+"<tr style='cursor:pointer' id='NewItmTR_"+StItmListArray[i][0]+"'>"
|
StItmListHTML = StItmListHTML+"<td class='selected last'><input id='NewItm_"+StItmListArray[i][0]+"' name='NewItmID' value='"+StItmListArray[i][0]+"' type='checkbox'/></td>"
|
StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmNo_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][1]+"</td>"
|
StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmBarcode_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][5]+"</td>"
|
StItmListHTML = StItmListHTML+"<td class='category' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmName_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][2]+"</td>"
|
StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmUnit_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][3]+"</td>"
|
StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmStock_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][6]+"</td>"
|
StItmListHTML = StItmListHTML+"</tr>";
|
}
|
}
|
if (acc2>1)
|
{
|
i=i+1;
|
StItmListHTML = StItmListHTML+"<tr><td colspan='9' style='text-align:center;'>";
|
if (acc1>1){StItmListHTML = StItmListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&StItmSearchTXT="+StItmSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{StItmListHTML = StItmListHTML+" ";}
|
if (acc1<acc2){StItmListHTML = StItmListHTML+" <a href='javascript:window.HiddenFrame.location.replace(\"MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&StItmSearchTXT="+StItmSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a>";}
|
StItmListHTML = StItmListHTML+" 共 "+acc3+" 条记录</td></tr>";
|
}
|
|
for (var j=i;j<=10;j++)
|
{
|
StItmListHTML = StItmListHTML+"<tr><td class='category'> </td><td class='category last1'> </td><td class='category last1'> </td><td class='category last1'> </td><td class='category last1'> </td><td class='category last1'> </td></tr>";
|
}
|
document.getElementById("NewStItmList").innerHTML=StItmListHTML;
|
|
}
|
//选择项目
|
function JS_NewItm(id,is)
|
{
|
var NewItmCheckbox=document.getElementById('NewItm_'+id).checked;
|
if (is==1 && NewItmCheckbox==false)
|
{
|
document.getElementById('NewItm_'+id).checked=true;
|
document.getElementById("NewItmTR_"+id).className='selected ';
|
}
|
else if (is==0 && NewItmCheckbox==true)
|
{
|
document.getElementById('NewItm_'+id).checked=false;
|
document.getElementById("NewItmTR_"+id).className='';
|
}
|
}
|
</script>
|
<!-- end 弹窗 -->
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
|
|
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
|
<!--#include FILE="vicgame.asp"-->
|
</body>
|
</html>
|