<%@ page contentType="text/html; charset=UTF-8"%>
<%@include file="/WEB-INF/jsp/pages/ImportTld.jsp"%>
<tiles:insert definition="BaseLayout" flush="true">
<tiles:put name="module" value="机顶盒管理" />
<tiles:put name="title" value="入库单管理" />
<tiles:put name="function" value="入库单新增" />
<tiles:put name="body" type="string">
<script language="JavaScript" type="text/javascript" src="scripts/WebCalendar.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/list.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/check.js"></script>
<script language="JavaScript" type="text/JavaScript">
var index_no = 1;
function init()
{
if(document.getElementById("chooseId").value=="-1")
{
document.getElementById("ter").style.display="none";
}
}
function redirectPage(indicatedPage, totalCount, pageSize, lastIndex){
var page = parseInt(indicatedPage);
if(isNaN(page)){
alert("请输入正确的页数");
} else {
pageIndex = (page - 1) * pageSize;
if(pageIndex > totalCount){
pageIndex = lastIndex;
}
ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount='+totalCount+'&startIndex='+pageIndex);
}
}
function strlen(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=3; else len++;
}
return len;
}
function searchSerialNo()
{
openWindow('SearchAction.do?type=serialNo','选择进货批号',400,400);
return false;
}
function validate()
{
var reg2=/^[a-zA-Z0-9_\.\s\(\)]+$/;
if(document.all.deptId.value=="-1")
{
alert("请选择部门仓库");
document.all.deptId.focus();
return false;
}
if(lrtrim(document.all.serialNo.value)=="")
{
alert("请输入进货批号");
document.all.serialNo.focus();
return false;
}
if(document.all.arriveTime.value=="")
{
alert("请输入到货时间");
document.all.arriveTime.focus();
return false;
}
if(document.all.modelId.value=="-1")
{
alert("请选择机顶盒型号");
document.all.modelId.focus();
return false;
}
if(document.all.chooseId.value=="-1")
{
alert("请选择一种导入方式");
document.all.chooseId.focus();
return false;
}
if(strlen(document.all.serialNo.value)>50)
{
alert("对不起,您输入的进货批号字符过长!");
document.all.serialNo.focus();
return false;
}
if(strlen(document.all.memo.value)>150)
{
alert("对不起,您输入的备注字符过长!");
document.all.memo.focus();
return false;
}
ownSubmit('StbMgtStoreOrderAction.do', '', '')
}
function add_one(){
var ter_table = document.getElementById('tertable');
var ter_tr = ter_table.insertRow(ter_table.rows.length);
index_no++;
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML = " 机顶盒编号:";
ter_tr.insertCell(1).innerHTML ="<input type='text' size='10' maxlength='10' name='terminalserialNo' />" ;
ter_tr.insertCell(2).innerHTML = "出厂日期:";
ter_tr.insertCell(3).innerHTML ="<input type='text' name='terminalExpDate' size='10' maxlength='10' οnclick='SelectDate(this,\"yyyy-MM-dd\")' readonly='true' />";
ter_tr.insertCell(4).innerHTML = "<input type='button' class='btn2' value='删除' οnclick='delete_one(\"tr"+index_no+"\")' />" ;
}
function delete_one(curObj){
document.getElementById('tertable').deleteRow(document.getElementById(curObj).rowIndex);
}
function impSelect(selVal)
{
if(selVal==1)
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
var ter_tr = ter_table.insertRow(ter_table.rows.length);
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML = " 机顶盒编号:" ;
ter_tr.insertCell(1).innerHTML ="<input type='text' size='10' name='terminalserialNo' maxlength='10' class='input' />" ;
ter_tr.insertCell(2).innerHTML = "出厂日期:" ;
ter_tr.insertCell(3).innerHTML ="<input type='text' name='terminalExpDate' class='input' readonly='true' size='10' maxlength='10' οnclick='SelectDate(this,\"yyyy-MM-dd\")' />";
ter_tr.insertCell(4).innerHTML = "<input type='button' value='新增机顶盒' class='btn3' οnclick='add_one()' /><input type='hidden' name='method' value='add'/>" ;
}
else if(selVal==2)
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
var ter_tr = ter_table.insertRow(ter_table.rows.length);
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML=" 请选择文件路径";
ter_tr.insertCell(1).innerHTML="<input type='file' name='uploadFile' size='40' /> <input type='hidden' name='method' value='importExcel'/>";
}
else
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="none";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
}
}
</script>
<div class=swidth id=main>
<html:form action="StbMgtStoreOrderAction.do" method="POST" enctype="multipart/form-data">
<html:hidden name="stbMgtStoreOrderForm" property="terminalId" />
<table class="table" cellSpacing=1 cellPadding=0>
<tbody>
<tr>
<td class=left>
仓库名称
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="deptId" styleClass="textbox2">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<logic:present name="stbMgtStoreOrderForm" property="deptList">
<html:optionsCollection property="deptList" />
</logic:present>
</html:select>
</td>
</tr>
<tr>
<td class=left>
进货批号
<span class="redfont">*</span>
</td>
<td class=right>
<html:text size="35" name="stbMgtStoreOrderForm" property="serialNo" styleClass="input" styleId="serialNo" />
<html:button property="method" styleClass="button" οnclick="searchSerialNo();">
<bean:message key="button.dot" />
</html:button>
<html:button property="method" styleClass="button"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow & startIndex=0');">
<bean:message key="button.show" />
</html:button>
</td>
</tr>
<tr>
<td class=left>
到货时间
<span class="redfont">*</span>
</td>
<td class=right>
<html:text size="35" name="stbMgtStoreOrderForm" property="arriveTime" styleClass="textbox2" οnclick="SelectDate(this,'yyyy-MM-dd')"
readonly="true" size="10" maxlength="10" styleId="arriveTime" />
</td>
</tr>
<tr>
<td class=left>
备注
<span class="redfont"> </span>
</td>
<td class=right>
<html:text οnfοcus="this.select()" size="35" name="stbMgtStoreOrderForm" property="memo" styleClass="input" styleId="memo" />
</td>
</tr>
<tr>
<td class=left>
机顶盒型号名
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="modelId" styleClass="textbox2">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<logic:present name="stbMgtStoreOrderForm" property="modelList">
<html:optionsCollection property="modelList" />
</logic:present>
</html:select>
</td>
</tr>
<tr>
<td class=left>
请选择导入方式
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="chooseId" styleClass="textbox2" οnchange="impSelect(this.value)">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<html:optionsCollection property="importChoose" />
</html:select>
</td>
</tbody>
<tr id="ter">
<td class=left colspan="2">
<table id="tertable" class="table" cellSpacing=0 cellPadding=0>
<tr>
<logic:present name="stbMgtStoreOrderForm" property="uploadFile">
<td>
请选择文件路径
</td>
<td>
<input type='file' name='uploadFile' size='40' />
<input type='hidden' name='method' value='importExcel' />
</td>
</logic:present>
<%
if (request.getAttribute("terNo") != null) {
String[] terminalserialNo = (String[]) request
.getAttribute("terNo");
String[] terminalExpDate = (String[]) request
.getAttribute("terDate");
%>
<tr>
<td>
机顶盒编号:
</td>
<td>
<input type="text" size="10" name="terminalserialNo" class="input" value="<%=terminalserialNo[0]%>" />
</td>
<td>
出厂日期:
</td>
<td>
<input type="text" size="10" name="terminalExpDate" class="input" οnclick="SelectDate(this,'yyyy-MM-dd')"
value="<%=terminalExpDate[0]%>" readonly="true" size="10" maxlength="10" />
</td>
<td>
<input type=button value="新增机顶盒" οnclick="add_one()" class="btn3"></input>
<input type='hidden' name='method' value='add' />
</td>
</tr>
<%
for (int index_no = 1; index_no < terminalserialNo.length; index_no++) {
%>
<tr id="tr<%=index_no + 1%>">
<td>
机顶盒编号:
</td>
<td>
<input type='text' name='terminalserialNo' size="10" maxlength="10" value="<%=terminalserialNo[index_no]%>" />
</td>
<td>
出厂日期:
</td>
<td>
<input type='text' name='terminalExpDate' size="10" οnclick="SelectDate(this,'yyyy-MM-dd')" readonly="true"
value="<%=terminalExpDate[index_no]%>" />
</td>
<td>
<input type='button' class='btn2' value='删除' οnclick='delete_one("tr<%=index_no + 1%>")' />
</td>
</tr>
<%
}
}
%>
</table>
</td>
</tr>
<tr>
<td>
</td>
<td class=right>
<logic:present name="add">
<html:button property="method=add" styleClass="btn2" οnclick="validate()">
<bean:message key="button.confirm" />
</html:button>
</logic:present>
<html:reset styleClass="btn2">
<bean:message key="button.reset" />
</html:reset>
<html:button property="method=list" styleClass="btn2" οnclick="window.location.href='StbMgtStoreOrderSrhAction.do?method=search'">
<bean:message key="button.cancel" />
</html:button>
</td>
</tr>
</table>
<logic:present name="searchResult" property="totalCount">
<table class="searchtb" cellSpacing=1 cellPadding=0>
<div class="iconimg pal1">
共有
<bean:write name="searchResult" property="totalCount" />
条记录
</div>
<div class="none1">
</div>
<table cellpadding=0 cellspacing=1 class="table">
<tr class="ttitle">
<td class="right">
</td>
<td class="right">
<strong>机顶盒编号</strong>
</td>
<td class="right">
<strong>机顶盒型号名</strong>
</td>
<td class="right">
<strong>进货价格</strong>
</td>
<td class="right">
<strong>状态</strong>
</td>
<td class="right">
<strong>出厂日期</strong>
</td>
</tr>
<logic:iterate id="terminalId" indexId="terminalIndex" name="searchResult" property="items">
<tr οnmοuseοver="this.style.backgroundColor='#c1edff'" οnmοuseοut="this.style.backgroundColor=''">
<td class="right">
<jsp:include page="/WEB-INF/jsp/pages/IncludeIndexes.jsp">
<jsp:param name="indexes" value="<%=terminalIndex%>" />
</jsp:include>
</td>
<td class="right">
<bean:write name="terminalId" property="serialNo" />
</td>
<td class="right">
<logic:present name="terminalId" property="model">
<bean:write name="terminalId" property="model.modelName" />
</logic:present>
</td>
<td class="right">
<bean:write name="terminalId" property="model.selPrice" />
</td>
<td class="right">
<logic:equal value="1" name="terminalId" property="status">
未占用
</logic:equal>
<logic:equal value="2" name="terminalId" property="status">
占用
</logic:equal>
<logic:equal value="3" name="terminalId" property="status">
预占用
</logic:equal>
<logic:equal value="4" name="terminalId" property="status">
预撤销
</logic:equal>
<logic:equal value="5" name="terminalId" property="status">
已出库
</logic:equal>
<logic:equal value="6" name="terminalId" property="status">
损坏
</logic:equal>
<logic:equal value="7" name="terminalId" property="status">
已删除
</logic:equal>
</td>
<td class="right">
<bean:write name="terminalId" property="expDate" />
</td>
<td>
<logic:present name="add">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=preUpdateTerNew&terminalId=<bean:write name="terminalId" property="terminalId" />')">
<img src="images/icon/edit.gif" title="编辑" width="16" height="16" border="0"> </a>
</logic:present>
<logic:present name="add">
<a href="#"
οnclick="return ownDelete('StbMgtStoreOrderAction.do?method=updateTerStatus', 'terminalId', '<bean:write name="terminalId" property="terminalId" />', '<bean:message key="confirm.delete"/><customTag:write name="terminalId" property="serialNo" />')">
<img src="images/icon/del.gif" title="删除" width="16" height="16" border="0"> </a>
</logic:present>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="7">
<div align="right">
<logic:equal name="searchResult" property="enbleFirstPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=0')">
<img src="images/icon/first.gif" title="第一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleFirstPage" value="false">
<img src="images/icon/first_out.gif" title="第一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleFormerPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="previousIndex" />')">
<img src="images/icon/pre.gif" title="上一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleFormerPage" value="false">
<img src="images/icon/pre_out.gif" title="上一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleNextPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="nextIndex" />')">
<img src="images/icon/next.gif" title="下一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleNextPage" value="false">
<img src="images/icon/next_out.gif" title="下一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleLastPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="lastPageIndex" />')">
<img src="images/icon/last.gif" title="最后一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleLastPage" value="false">
<img src="images/icon/last_out.gif" title="最后一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
第
<bean:write name="searchResult" property="currentPage" />
页 共
<bean:write name="searchResult" property="totalIndex" />
页 共
<bean:write name="searchResult" property="totalCount" />
条 选择
<input name="textfield3" type="text" id="indicatedIndex" class="textbox" size="3" />
页
<img id="directImg" src="images/icon/go.gif" width="16" height="13" align="absmiddle"
οnclick="redirectPage(document.getElementById('indicatedIndex').value,'<bean:write name="searchResult" property="totalCount" />','<bean:write name="searchResult" property="pageSize" />','<bean:write name="searchResult" property="lastPageIndex" />');" />
</div>
</td>
</tr>
</table>
</logic:present>
</table>
</html:form>
</tiles:put>
</tiles:insert>
<%@include file="/WEB-INF/jsp/pages/ImportTld.jsp"%>
<tiles:insert definition="BaseLayout" flush="true">
<tiles:put name="module" value="机顶盒管理" />
<tiles:put name="title" value="入库单管理" />
<tiles:put name="function" value="入库单新增" />
<tiles:put name="body" type="string">
<script language="JavaScript" type="text/javascript" src="scripts/WebCalendar.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/list.js"></script>
<script language="JavaScript" type="text/javascript" src="scripts/check.js"></script>
<script language="JavaScript" type="text/JavaScript">
var index_no = 1;
function init()
{
if(document.getElementById("chooseId").value=="-1")
{
document.getElementById("ter").style.display="none";
}
}
function redirectPage(indicatedPage, totalCount, pageSize, lastIndex){
var page = parseInt(indicatedPage);
if(isNaN(page)){
alert("请输入正确的页数");
} else {
pageIndex = (page - 1) * pageSize;
if(pageIndex > totalCount){
pageIndex = lastIndex;
}
ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount='+totalCount+'&startIndex='+pageIndex);
}
}
function strlen(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=3; else len++;
}
return len;
}
function searchSerialNo()
{
openWindow('SearchAction.do?type=serialNo','选择进货批号',400,400);
return false;
}
function validate()
{
var reg2=/^[a-zA-Z0-9_\.\s\(\)]+$/;
if(document.all.deptId.value=="-1")
{
alert("请选择部门仓库");
document.all.deptId.focus();
return false;
}
if(lrtrim(document.all.serialNo.value)=="")
{
alert("请输入进货批号");
document.all.serialNo.focus();
return false;
}
if(document.all.arriveTime.value=="")
{
alert("请输入到货时间");
document.all.arriveTime.focus();
return false;
}
if(document.all.modelId.value=="-1")
{
alert("请选择机顶盒型号");
document.all.modelId.focus();
return false;
}
if(document.all.chooseId.value=="-1")
{
alert("请选择一种导入方式");
document.all.chooseId.focus();
return false;
}
if(strlen(document.all.serialNo.value)>50)
{
alert("对不起,您输入的进货批号字符过长!");
document.all.serialNo.focus();
return false;
}
if(strlen(document.all.memo.value)>150)
{
alert("对不起,您输入的备注字符过长!");
document.all.memo.focus();
return false;
}
ownSubmit('StbMgtStoreOrderAction.do', '', '')
}
function add_one(){
var ter_table = document.getElementById('tertable');
var ter_tr = ter_table.insertRow(ter_table.rows.length);
index_no++;
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML = " 机顶盒编号:";
ter_tr.insertCell(1).innerHTML ="<input type='text' size='10' maxlength='10' name='terminalserialNo' />" ;
ter_tr.insertCell(2).innerHTML = "出厂日期:";
ter_tr.insertCell(3).innerHTML ="<input type='text' name='terminalExpDate' size='10' maxlength='10' οnclick='SelectDate(this,\"yyyy-MM-dd\")' readonly='true' />";
ter_tr.insertCell(4).innerHTML = "<input type='button' class='btn2' value='删除' οnclick='delete_one(\"tr"+index_no+"\")' />" ;
}
function delete_one(curObj){
document.getElementById('tertable').deleteRow(document.getElementById(curObj).rowIndex);
}
function impSelect(selVal)
{
if(selVal==1)
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
var ter_tr = ter_table.insertRow(ter_table.rows.length);
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML = " 机顶盒编号:" ;
ter_tr.insertCell(1).innerHTML ="<input type='text' size='10' name='terminalserialNo' maxlength='10' class='input' />" ;
ter_tr.insertCell(2).innerHTML = "出厂日期:" ;
ter_tr.insertCell(3).innerHTML ="<input type='text' name='terminalExpDate' class='input' readonly='true' size='10' maxlength='10' οnclick='SelectDate(this,\"yyyy-MM-dd\")' />";
ter_tr.insertCell(4).innerHTML = "<input type='button' value='新增机顶盒' class='btn3' οnclick='add_one()' /><input type='hidden' name='method' value='add'/>" ;
}
else if(selVal==2)
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
var ter_tr = ter_table.insertRow(ter_table.rows.length);
ter_tr.id="tr"+index_no;
ter_tr.insertCell(0).innerHTML=" 请选择文件路径";
ter_tr.insertCell(1).innerHTML="<input type='file' name='uploadFile' size='40' /> <input type='hidden' name='method' value='importExcel'/>";
}
else
{
var ter_table = document.getElementById('tertable');
document.getElementById("ter").style.display="none";
var rowNum=ter_table.rows.length;
for (var i=0;i<rowNum;i++)
{
ter_table.deleteRow(i);
rowNum=rowNum-1;
i=i-1;
}
}
}
</script>
<div class=swidth id=main>
<html:form action="StbMgtStoreOrderAction.do" method="POST" enctype="multipart/form-data">
<html:hidden name="stbMgtStoreOrderForm" property="terminalId" />
<table class="table" cellSpacing=1 cellPadding=0>
<tbody>
<tr>
<td class=left>
仓库名称
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="deptId" styleClass="textbox2">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<logic:present name="stbMgtStoreOrderForm" property="deptList">
<html:optionsCollection property="deptList" />
</logic:present>
</html:select>
</td>
</tr>
<tr>
<td class=left>
进货批号
<span class="redfont">*</span>
</td>
<td class=right>
<html:text size="35" name="stbMgtStoreOrderForm" property="serialNo" styleClass="input" styleId="serialNo" />
<html:button property="method" styleClass="button" οnclick="searchSerialNo();">
<bean:message key="button.dot" />
</html:button>
<html:button property="method" styleClass="button"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow & startIndex=0');">
<bean:message key="button.show" />
</html:button>
</td>
</tr>
<tr>
<td class=left>
到货时间
<span class="redfont">*</span>
</td>
<td class=right>
<html:text size="35" name="stbMgtStoreOrderForm" property="arriveTime" styleClass="textbox2" οnclick="SelectDate(this,'yyyy-MM-dd')"
readonly="true" size="10" maxlength="10" styleId="arriveTime" />
</td>
</tr>
<tr>
<td class=left>
备注
<span class="redfont"> </span>
</td>
<td class=right>
<html:text οnfοcus="this.select()" size="35" name="stbMgtStoreOrderForm" property="memo" styleClass="input" styleId="memo" />
</td>
</tr>
<tr>
<td class=left>
机顶盒型号名
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="modelId" styleClass="textbox2">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<logic:present name="stbMgtStoreOrderForm" property="modelList">
<html:optionsCollection property="modelList" />
</logic:present>
</html:select>
</td>
</tr>
<tr>
<td class=left>
请选择导入方式
<span class="redfont">*</span>
</td>
<td class=right>
<html:select name="stbMgtStoreOrderForm" property="chooseId" styleClass="textbox2" οnchange="impSelect(this.value)">
<html:option value="-1">
<bean:message key="info.select" />
</html:option>
<html:optionsCollection property="importChoose" />
</html:select>
</td>
</tbody>
<tr id="ter">
<td class=left colspan="2">
<table id="tertable" class="table" cellSpacing=0 cellPadding=0>
<tr>
<logic:present name="stbMgtStoreOrderForm" property="uploadFile">
<td>
请选择文件路径
</td>
<td>
<input type='file' name='uploadFile' size='40' />
<input type='hidden' name='method' value='importExcel' />
</td>
</logic:present>
<%
if (request.getAttribute("terNo") != null) {
String[] terminalserialNo = (String[]) request
.getAttribute("terNo");
String[] terminalExpDate = (String[]) request
.getAttribute("terDate");
%>
<tr>
<td>
机顶盒编号:
</td>
<td>
<input type="text" size="10" name="terminalserialNo" class="input" value="<%=terminalserialNo[0]%>" />
</td>
<td>
出厂日期:
</td>
<td>
<input type="text" size="10" name="terminalExpDate" class="input" οnclick="SelectDate(this,'yyyy-MM-dd')"
value="<%=terminalExpDate[0]%>" readonly="true" size="10" maxlength="10" />
</td>
<td>
<input type=button value="新增机顶盒" οnclick="add_one()" class="btn3"></input>
<input type='hidden' name='method' value='add' />
</td>
</tr>
<%
for (int index_no = 1; index_no < terminalserialNo.length; index_no++) {
%>
<tr id="tr<%=index_no + 1%>">
<td>
机顶盒编号:
</td>
<td>
<input type='text' name='terminalserialNo' size="10" maxlength="10" value="<%=terminalserialNo[index_no]%>" />
</td>
<td>
出厂日期:
</td>
<td>
<input type='text' name='terminalExpDate' size="10" οnclick="SelectDate(this,'yyyy-MM-dd')" readonly="true"
value="<%=terminalExpDate[index_no]%>" />
</td>
<td>
<input type='button' class='btn2' value='删除' οnclick='delete_one("tr<%=index_no + 1%>")' />
</td>
</tr>
<%
}
}
%>
</table>
</td>
</tr>
<tr>
<td>
</td>
<td class=right>
<logic:present name="add">
<html:button property="method=add" styleClass="btn2" οnclick="validate()">
<bean:message key="button.confirm" />
</html:button>
</logic:present>
<html:reset styleClass="btn2">
<bean:message key="button.reset" />
</html:reset>
<html:button property="method=list" styleClass="btn2" οnclick="window.location.href='StbMgtStoreOrderSrhAction.do?method=search'">
<bean:message key="button.cancel" />
</html:button>
</td>
</tr>
</table>
<logic:present name="searchResult" property="totalCount">
<table class="searchtb" cellSpacing=1 cellPadding=0>
<div class="iconimg pal1">
共有
<bean:write name="searchResult" property="totalCount" />
条记录
</div>
<div class="none1">
</div>
<table cellpadding=0 cellspacing=1 class="table">
<tr class="ttitle">
<td class="right">
</td>
<td class="right">
<strong>机顶盒编号</strong>
</td>
<td class="right">
<strong>机顶盒型号名</strong>
</td>
<td class="right">
<strong>进货价格</strong>
</td>
<td class="right">
<strong>状态</strong>
</td>
<td class="right">
<strong>出厂日期</strong>
</td>
</tr>
<logic:iterate id="terminalId" indexId="terminalIndex" name="searchResult" property="items">
<tr οnmοuseοver="this.style.backgroundColor='#c1edff'" οnmοuseοut="this.style.backgroundColor=''">
<td class="right">
<jsp:include page="/WEB-INF/jsp/pages/IncludeIndexes.jsp">
<jsp:param name="indexes" value="<%=terminalIndex%>" />
</jsp:include>
</td>
<td class="right">
<bean:write name="terminalId" property="serialNo" />
</td>
<td class="right">
<logic:present name="terminalId" property="model">
<bean:write name="terminalId" property="model.modelName" />
</logic:present>
</td>
<td class="right">
<bean:write name="terminalId" property="model.selPrice" />
</td>
<td class="right">
<logic:equal value="1" name="terminalId" property="status">
未占用
</logic:equal>
<logic:equal value="2" name="terminalId" property="status">
占用
</logic:equal>
<logic:equal value="3" name="terminalId" property="status">
预占用
</logic:equal>
<logic:equal value="4" name="terminalId" property="status">
预撤销
</logic:equal>
<logic:equal value="5" name="terminalId" property="status">
已出库
</logic:equal>
<logic:equal value="6" name="terminalId" property="status">
损坏
</logic:equal>
<logic:equal value="7" name="terminalId" property="status">
已删除
</logic:equal>
</td>
<td class="right">
<bean:write name="terminalId" property="expDate" />
</td>
<td>
<logic:present name="add">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=preUpdateTerNew&terminalId=<bean:write name="terminalId" property="terminalId" />')">
<img src="images/icon/edit.gif" title="编辑" width="16" height="16" border="0"> </a>
</logic:present>
<logic:present name="add">
<a href="#"
οnclick="return ownDelete('StbMgtStoreOrderAction.do?method=updateTerStatus', 'terminalId', '<bean:write name="terminalId" property="terminalId" />', '<bean:message key="confirm.delete"/><customTag:write name="terminalId" property="serialNo" />')">
<img src="images/icon/del.gif" title="删除" width="16" height="16" border="0"> </a>
</logic:present>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="7">
<div align="right">
<logic:equal name="searchResult" property="enbleFirstPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=0')">
<img src="images/icon/first.gif" title="第一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleFirstPage" value="false">
<img src="images/icon/first_out.gif" title="第一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleFormerPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="previousIndex" />')">
<img src="images/icon/pre.gif" title="上一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleFormerPage" value="false">
<img src="images/icon/pre_out.gif" title="上一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleNextPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="nextIndex" />')">
<img src="images/icon/next.gif" title="下一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleNextPage" value="false">
<img src="images/icon/next_out.gif" title="下一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
<logic:equal name="searchResult" property="enbleLastPage" value="true">
<a href="#"
οnclick="ownSubmit('StbMgtStoreOrderAction.do?method=terminalShow&totalCount=<bean:write name="searchResult" property="totalCount" />&startIndex=<bean:write name="searchResult" property="lastPageIndex" />')">
<img src="images/icon/last.gif" title="最后一页" width="17" height="17" border="0" align="absmiddle"> </a>
</logic:equal>
<logic:equal name="searchResult" property="enbleLastPage" value="false">
<img src="images/icon/last_out.gif" title="最后一页" width="17" height="17" border="0" align="absmiddle">
</logic:equal>
第
<bean:write name="searchResult" property="currentPage" />
页 共
<bean:write name="searchResult" property="totalIndex" />
页 共
<bean:write name="searchResult" property="totalCount" />
条 选择
<input name="textfield3" type="text" id="indicatedIndex" class="textbox" size="3" />
页
<img id="directImg" src="images/icon/go.gif" width="16" height="13" align="absmiddle"
οnclick="redirectPage(document.getElementById('indicatedIndex').value,'<bean:write name="searchResult" property="totalCount" />','<bean:write name="searchResult" property="pageSize" />','<bean:write name="searchResult" property="lastPageIndex" />');" />
</div>
</td>
</tr>
</table>
</logic:present>
</table>
</html:form>
</tiles:put>
</tiles:insert>