initial commit
This commit is contained in:
439
WebRoot/page/system/deviceManage/addBatchDevTypeInfo.jsp
Normal file
439
WebRoot/page/system/deviceManage/addBatchDevTypeInfo.jsp
Normal file
@@ -0,0 +1,439 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_abdti.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value="/js/fileInput.js"/>"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
function trim(id) {
|
||||
jQuery("#"+id).val(jQuery.trim(jQuery("#"+id).val()));
|
||||
}
|
||||
|
||||
function add(){
|
||||
|
||||
//去空格
|
||||
trim("deviceTypeCode");//设备型号
|
||||
trim("showIndexStart");//编号开始值
|
||||
trim("showIndexEnd");//编号结束值
|
||||
trim("nameFormat");//名称格式
|
||||
trim("statusValue");//异常比较值
|
||||
|
||||
if($id("deviceRandCode","xz","i18n_abdti.text.deviceRandCode_n81i") && $id("pid","","i18n_abdti.text.pid_n81i")){//&& !hasDevTypeCode():不进行判断了,$id("deviceTypeCode","","设备型号") 也不用判断了,默认赋值
|
||||
|
||||
|
||||
//var parCode = jQuery("select[id='pid'] option:selected").val();
|
||||
//if(isNotBlank(parCode)){
|
||||
var showIndexStart=document.getElementById("showIndexStart").value;
|
||||
var showIndexEnd=document.getElementById("showIndexEnd").value;
|
||||
if(showIndexStart=='' ){
|
||||
$("#showIndexEnd").next().html('i18n_abdti.message.showIndexEnd1_n81i');
|
||||
return;
|
||||
}else if(showIndexStart.replace(/[\d+]/ig,"").length>0){
|
||||
$("#showIndexEnd").next().html('i18n_abdti.message.showIndexEnd2_n81i');
|
||||
return;
|
||||
}else if(showIndexEnd=='') {
|
||||
$("#showIndexEnd").next().html('i18n_abdti.message.showIndexEnd3_n81i');
|
||||
return;
|
||||
}else if(showIndexEnd.replace(/[\d+]/ig,"").length>0) {
|
||||
$("#showIndexEnd").next().html('i18n_abdti.message.showIndexEnd4_n81i');
|
||||
return;
|
||||
}else if(showIndexStart>showIndexEnd){
|
||||
//$("#showIndexEnd").next().html('编号开始值:'+showIndexStart+'应小于编号结束值:'+showIndexEnd);
|
||||
//return;//????????????
|
||||
}else {
|
||||
$("#showIndexEnd").next().html('*');
|
||||
}
|
||||
//}
|
||||
|
||||
var myfileVal = document.getElementById("figureFill").value;
|
||||
if(myfileVal=="") {
|
||||
//$("#figureFill").next().html('请选择设备图片');
|
||||
//return;
|
||||
}else {
|
||||
var allowExt = ".png , .bmp , .jpg , .gif";
|
||||
var fileExt = myfileVal.substr(myfileVal.lastIndexOf(".")).toLowerCase();
|
||||
if(allowExt.indexOf(fileExt)==-1){
|
||||
$("#figureFill").next().html('i18n_abdti.message.figureFill_n81i:'+allowExt);
|
||||
return;
|
||||
}else {
|
||||
//$("#figureFill").next().html('*');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=addBatchDevType";
|
||||
document.Brandform.submit();
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
}
|
||||
|
||||
//判断设备型号是否重复
|
||||
function hasDevTypeCode(){
|
||||
var hasDevCode = false;
|
||||
$.ajaxSettings.async = false;//设置同步
|
||||
//先判断任务编号是否存在,不存在不查询
|
||||
var deviceTypeCode = jQuery.trim(jQuery("#deviceTypeCode").val());
|
||||
var deviceRandCode = jQuery.trim(jQuery("select[id='deviceRandCode'] option:selected").val());
|
||||
if(deviceTypeCode!='') {
|
||||
$.getJSON("<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevType&devTypeCodeForSearch="+deviceTypeCode+"&devRandCodeForSearch="+deviceRandCode,
|
||||
{}, function(data){
|
||||
if(data!=null&&data!=""&&data.result=='success') {//设备型号已存在
|
||||
var tip = data.tip;
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = true;
|
||||
return true;
|
||||
}else {
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDevCode;
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
//检查是否包含特殊字符
|
||||
function containSpecial(s)
|
||||
{
|
||||
var cs = /^\w+$/;
|
||||
resu = cs.test(s);
|
||||
return (cs.test(s));
|
||||
}
|
||||
|
||||
//暂时无用
|
||||
function chShowIndex() {
|
||||
var pid = $("select[id='pid'] option:selected").val();
|
||||
$("#showIndex").val('');
|
||||
if(pid!='' && pid!=null && pid!='undefined') {
|
||||
$("#devShowIndex").show();
|
||||
}else {
|
||||
$("#devShowIndex").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function changeShowHide() {
|
||||
jQuery("select[id='indexFiled']").empty();
|
||||
jQuery("select[id='statusFiled']").empty();
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='diTableName'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='statusFiled']").append('<option value="" >i18n_abdti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='statusFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("select[id='indexFiled']").append('<option value="" >i18n_abdti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='indexFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
//jQuery("#tableStatusValue").show();
|
||||
//jQuery("#tableSymbols").show();
|
||||
jQuery("#tableStatusField").show();
|
||||
jQuery("#tableLinkField").show();
|
||||
}else {
|
||||
jQuery("#tableStatusField").hide();
|
||||
jQuery("#tableLinkField").hide();
|
||||
}
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
|
||||
}
|
||||
|
||||
function changeparCode() {
|
||||
jQuery("select[id='pid']").empty();//清空父设备型号列表
|
||||
var selecVal = jQuery("select[id='deviceRandCode'] option:selected").val(); //所选品牌
|
||||
//品牌改变时,编号清空,隐藏
|
||||
$("#showIndex").val('');
|
||||
//$("#devShowIndex").hide();
|
||||
|
||||
jQuery("select[id='pid']").append('<option value="" >i18n_abdti.message.selectDefault_n81i</option>');
|
||||
if(isNotBlank(selecVal)) {
|
||||
<c:forEach items="${devTypeListInfo}" var="type" >
|
||||
if('${type.deviceRandCode}'==selecVal) {
|
||||
var htmlStr = '<option value="${type.id}" >${type.deviceTypeCode}</option>';
|
||||
jQuery("select[id='pid']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
//jQuery("#parDevCode").show();
|
||||
}else {
|
||||
//jQuery("#parDevCode").hide();
|
||||
}
|
||||
|
||||
jQuery("#deviceTypeCode").val('');//设置端口名的前缀
|
||||
}
|
||||
|
||||
//选择父设备型号后,改变端口的前缀(端口名=选择的父设备型号+编号)
|
||||
function setDevCode() {
|
||||
var selecVal = jQuery("select[id='pid'] option:selected").text(); //所选父设备型号
|
||||
jQuery("#deviceTypeCode").val(selecVal);//设置端口名的前缀
|
||||
}
|
||||
|
||||
|
||||
function changeStatus() {
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='statusFiled'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("#tableStatusValue").show();
|
||||
jQuery("#tableSymbols").show();
|
||||
}else {
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_abdti.button.back_n81i"/>
|
||||
</div>
|
||||
<form action="" name="Brandform" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" />
|
||||
<input type="hidden" name="devRandCodeForSearch" id="devRandCodeForSearch" value="${devRandCodeForSearch}" />
|
||||
<input type="hidden" name="parDevId" id="parDevId" value="${parDevId}" />
|
||||
<input type="hidden" name="devType.isPositionDev" id="isNotPositionDev" value="0" />
|
||||
|
||||
<input type="hidden" name="devType.deviceTypeCode" id="deviceTypeCode" value="" />
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_abdti.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="deviceRandCode" name="devType.deviceRandCode" style="width: 170px;" onchange="changeparCode();">
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${devBrandListInfo}" var="brand" >
|
||||
<option value="${brand.deviceRandCode}" >${brand.deviceRandCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<font id = "deviceRandCodeTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="parDevCode">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.pid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="pid" name="devType.pid" onchange="setDevCode();">
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
|
||||
</select>
|
||||
<font id = "pidTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
设备型号
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="hidden" name="devType.deviceTypeCode" id="deviceTypeCode" value="" />
|
||||
<font id = "deviceTypeCodeTip" color="red">*</font>自动在设备型号后添加编号(如输入DPX8000-A12,则设备型号为'DPX8000-A12-编号')
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
最大叠加数
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.maxDeviceNum" id="maxDeviceNum" value="" />
|
||||
<font id = "maxDeviceNumTip" color="red"></font>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.showIndexRule_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="radio" name="devType.showIndexRule" id="showIndexRule" value="0" checked="checked"/>i18n_abdti.message.showIndexRule.all_n81i
|
||||
<input type="radio" name="devType.showIndexRule" id="showIndexRule" value="1" />i18n_abdti.message.showIndexRule.odd_n81i
|
||||
<input type="radio" name="devType.showIndexRule" id="showIndexRule" value="2" />i18n_abdti.message.showIndexRule.even_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="devShowIndex">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.showIndexStart_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.showIndexStart" id="showIndexStart" value="" size="6" />--<input type="text" name="devType.showIndexEnd" id="showIndexEnd" value="" size="6" />
|
||||
<font id = "showIndexTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr style="display: inline" id="devShowIndex">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
槽位设备
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="radio" name="devType.isPositionDev" id="isPositionDev" value="0" />是
|
||||
<input type="radio" name="devType.isPositionDev" id="isNotPositionDev" value="1" checked="checked" />否
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.figureFill_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="button" value="i18n_abdti.text.figureFill_n81i" title="i18n_abdti.text.figureFill_n81i" class="btn3_mouseout" onclick="javascript:uploadFile(this)"/>
|
||||
<input type="file" name="figureFill" id="figureFill" value="" onchange="javascript:setValue(this.value)"/>
|
||||
<!-- <font id = "figureFillTip" color="red">*</font> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.nameFormat_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.nameFormat" id="nameFormat" value="" />(i18n_abdti.text.nameFormatInfo_n81i)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.diTableName_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="diTableName" name="devType.diTableName" onchange="changeShowHide();">
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${metadataList}" var="meta" >
|
||||
<option value="${meta}" >${meta}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableLinkField" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.indexFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="indexFiled" name="devType.indexFiled" >
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusField" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.statusFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusFiled" name="devType.statusFiled" onchange="changeStatus();">
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableSymbols" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.statusSymbols_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusSymbols" name="devType.statusSymbols" >
|
||||
<option value="" >i18n_abdti.message.selectDefault_n81i</option>
|
||||
<option value=">" >></option>
|
||||
<option value="=" >=</option>
|
||||
<option value="<" ><</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusValue" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_abdti.text.statusValue_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.statusValue" id="statusValue" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_abdti.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
<textarea type="text" name="devType.deviceDesc" id="deviceDesc" rows="3" cols="50"></textarea>i18n_abdti.text.autoAddDeviceID_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="add()"
|
||||
value="i18n_abdti.button.submit_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_abdti.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
151
WebRoot/page/system/deviceManage/addDevBrandInfo.jsp
Normal file
151
WebRoot/page/system/deviceManage/addDevBrandInfo.jsp
Normal file
@@ -0,0 +1,151 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_adbi.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//判断品牌编号是否重复
|
||||
function hasDevBrandCode(){
|
||||
var hasDevCode = false;
|
||||
$.ajaxSettings.async = false;//设置同步
|
||||
//先判断任务编号是否存在,不存在不查询
|
||||
var deviceBrandCode = jQuery.trim(jQuery("#deviceRandCode").val());
|
||||
if(deviceBrandCode!='') {
|
||||
$.getJSON("<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevBrand&devRandCodeForSearch="+deviceBrandCode,
|
||||
{}, function(data){
|
||||
if(data!=null&&data!=""&&data.result=='success') {//设备型号已存在
|
||||
var tip = data.tip;
|
||||
$("#deviceRandCode").next().html(tip);
|
||||
hasDevCode = true;
|
||||
return true;
|
||||
}else {
|
||||
$("#deviceRandCode").next().html(tip);
|
||||
hasDevCode = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDevCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function add(){
|
||||
if($id("deviceRandCode","","i18n_adbi.text.deviceRandCode_n81i") && $id("deviceRandName","","i18n_adbi.text.deviceRandName_n81i") && !hasDevBrandCode()){
|
||||
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=addDevBrand";
|
||||
document.Brandform.submit();
|
||||
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
//检查是否包含特殊字符
|
||||
function containSpecial(s)
|
||||
{
|
||||
var cs = /^\w+$/;
|
||||
resu = cs.test(s);
|
||||
return (cs.test(s));
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="返回"/>
|
||||
</div>
|
||||
|
||||
<form action="" name="Brandform" method="post">
|
||||
<input type="hidden" name="brandNameForSearch" id="brandNameForSearch" value="${brandNameForSearch}" />
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_adbi.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adbi.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devBrand.deviceRandCode" id="deviceRandCode" size="30" value="${devBrand.deviceRandCode }" />
|
||||
<font id = "deviceRandCode" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adbi.text.deviceRandName_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<input type="text" name="devBrand.deviceRandName" id="deviceRandName" value="${devBrand.deviceRandName }" size="30"/>
|
||||
<font id = "ctypeName1"color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_adbi.text.deviceBrandDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
<textarea type="text" name="devBrand.deviceBrandDesc" id="deviceBrandDesc" rows="3" cols="50">${devBrand.deviceBrandDesc }</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="add()"
|
||||
value="i18n_adbi.button.submit_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_adbi.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
447
WebRoot/page/system/deviceManage/addDevTypeInfo.jsp
Normal file
447
WebRoot/page/system/deviceManage/addDevTypeInfo.jsp
Normal file
@@ -0,0 +1,447 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_adti.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value="/js/fileInput.js"/>"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
function trim(id) {
|
||||
jQuery("#"+id).val(jQuery.trim(jQuery("#"+id).val()));
|
||||
}
|
||||
|
||||
function add(){
|
||||
|
||||
//去空格
|
||||
trim("deviceTypeCode");//设备型号
|
||||
trim("maxDeviceNum");//最大叠加数
|
||||
trim("showIndex");//编号
|
||||
trim("nameFormat");//名称格式
|
||||
trim("statusValue");//异常比较值
|
||||
|
||||
if($id("deviceRandCode","xz","i18n_adti.text.deviceRandCode_n81i")&& $id("deviceTypeCode","","i18n_adti.text.deviceTypeCode_n81i") && !hasDevTypeCode()){
|
||||
//如果最大叠加数非空,则判断是否为数字
|
||||
var maxDeviceNum=jQuery.trim(document.getElementById('maxDeviceNum').value);
|
||||
if(maxDeviceNum!=''&& maxDeviceNum.replace(/[\d+]/ig,"").length>0){
|
||||
$("#maxDeviceNum").next().html('i18n_adti.message.maxDeviceNum_n81i');
|
||||
return;
|
||||
}else {
|
||||
$("#maxDeviceNum").next().html('');
|
||||
}
|
||||
|
||||
var parCode = jQuery("select[id='pid'] option:selected").val();
|
||||
if(isNotBlank(parCode)){
|
||||
var name=document.getElementById('showIndex').value;
|
||||
if(name=='' ){
|
||||
$("#showIndex").next().html('i18n_adti.message.showIndex1_n81i');
|
||||
return;
|
||||
}else if(name.replace(/[\d+]/ig,"").length>0){
|
||||
$("#showIndex").next().html('i18n_adti.message.showIndex2_n81i');
|
||||
return;
|
||||
}else {
|
||||
$("#showIndex").next().html('*');
|
||||
}
|
||||
}
|
||||
|
||||
var myfileVal = document.getElementById("figureFill").value;
|
||||
if(myfileVal=="") {
|
||||
//$("#figureFill").next().html('请选择设备图片');
|
||||
//return;
|
||||
}else {
|
||||
var allowExt = ".png , .bmp , .jpg , .gif";
|
||||
var fileExt = myfileVal.substr(myfileVal.lastIndexOf(".")).toLowerCase();
|
||||
if(allowExt.indexOf(fileExt)==-1){
|
||||
$("#figureFill").next().html('i18n_adti.message.figureFill_n81i:'+allowExt);
|
||||
return;
|
||||
}else {
|
||||
//$("#figureFill").next().html('*');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=addDevType";
|
||||
document.Brandform.submit();
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
}
|
||||
|
||||
//判断设备型号是否重复
|
||||
function hasDevTypeCode(){
|
||||
var hasDevCode = false;
|
||||
$.ajaxSettings.async = false;//设置同步
|
||||
//先判断任务编号是否存在,不存在不查询
|
||||
var deviceTypeCode = jQuery.trim(jQuery("#deviceTypeCode").val());
|
||||
var deviceRandCode = jQuery.trim(jQuery("select[id='deviceRandCode'] option:selected").val());
|
||||
if(deviceTypeCode!='') {
|
||||
$.getJSON("<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevType&devTypeCodeForSearch="+deviceTypeCode+"&devRandCodeForSearch="+deviceRandCode,
|
||||
{}, function(data){
|
||||
if(data!=null&&data!=""&&data.result=='success') {//设备型号已存在
|
||||
var tip = data.tip;
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = true;
|
||||
return true;
|
||||
}else {
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDevCode;
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.Brandform.submit();
|
||||
}
|
||||
//检查是否包含特殊字符
|
||||
function containSpecial(s)
|
||||
{
|
||||
var cs = /^\w+$/;
|
||||
resu = cs.test(s);
|
||||
return (cs.test(s));
|
||||
}
|
||||
|
||||
function chShowIndex() {
|
||||
//父设备型号
|
||||
var pid = $("select[id='pid'] option:selected").val();
|
||||
$("#showIndex").val('');
|
||||
if(pid!='' && pid!=null && pid!='undefined') {
|
||||
$("#devShowIndex").show();
|
||||
}else {
|
||||
$("#devShowIndex").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function changeShowHide() {
|
||||
jQuery("select[id='indexFiled']").empty();
|
||||
jQuery("select[id='statusFiled']").empty();
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='diTableName'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='statusFiled']").append('<option value="" >i18n_adti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='statusFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("select[id='indexFiled']").append('<option value="" >i18n_adti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='indexFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
//jQuery("#tableStatusValue").show();
|
||||
//jQuery("#tableSymbols").show();
|
||||
jQuery("#tableStatusField").show();
|
||||
jQuery("#tableLinkField").show();
|
||||
}else {
|
||||
jQuery("#tableStatusField").hide();
|
||||
jQuery("#tableLinkField").hide();
|
||||
}
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
|
||||
}
|
||||
|
||||
function changeparCode() {
|
||||
//父设备型号
|
||||
jQuery("select[id='pid']").empty();//清空父设备型号列表
|
||||
var selecVal = jQuery("select[id='deviceRandCode'] option:selected").val(); //所选品牌
|
||||
//品牌改变时,编号清空,隐藏
|
||||
$("#showIndex").val('');
|
||||
$("#devShowIndex").hide();
|
||||
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='pid']").append('<option value="" >i18n_adti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${devTypeListInfo}" var="type" >
|
||||
if('${type.deviceRandCode}'==selecVal) {
|
||||
var htmlStr = '<option value="${type.id}" >${type.deviceTypeCode}</option>';
|
||||
jQuery("select[id='pid']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("#parDevCode").show();
|
||||
}else {
|
||||
jQuery("#parDevCode").hide();
|
||||
}
|
||||
|
||||
//可配父设备
|
||||
jQuery("select[id='canConfigPid']").empty();//清空列表
|
||||
var selecVal = jQuery("select[id='deviceRandCode'] option:selected").val(); //所选品牌
|
||||
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='canConfigPid']").append('<option value="" >i18n_adti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${devTypeListInfo}" var="type" >
|
||||
if('${type.deviceRandCode}'==selecVal) {
|
||||
var htmlStr = '<option value="${type.id}" >${type.deviceTypeCode}</option>';
|
||||
jQuery("select[id='canConfigPid']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("#canConfigPidDev").show();
|
||||
}else {
|
||||
jQuery("#canConfigPidDev").hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function changeStatus() {
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='statusFiled'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("#tableStatusValue").show();
|
||||
jQuery("#tableSymbols").show();
|
||||
}else {
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_adti.button.back_n81i"/>
|
||||
</div>
|
||||
<form action="" name="Brandform" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" />
|
||||
<input type="hidden" name="devRandCodeForSearch" id="devRandCodeForSearch" value="${devRandCodeForSearch}" />
|
||||
<input type="hidden" name="parDevId" id="parDevId" value="${parDevId}" />
|
||||
<input type="hidden" name="pageNo" value="${pageNo }" />
|
||||
<input type="hidden" name="pageSize" value="${pageSize }" />
|
||||
<input type="hidden" name="devType.isPositionDev" value="0" />
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_adti.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="deviceRandCode" name="devType.deviceRandCode" style="width: 170px;" onchange="changeparCode();">
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${devBrandListInfo}" var="brand" >
|
||||
<option value="${brand.deviceRandCode}" >${brand.deviceRandCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<font id = "deviceRandCodeTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.deviceTypeCode_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.deviceTypeCode" id="deviceTypeCode" value="" />
|
||||
<font id = "deviceTypeCodeTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.maxDeviceNum_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.maxDeviceNum" id="maxDeviceNum" value="" />
|
||||
<font id = "maxDeviceNumTip" color="red"></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none" id="parDevCode">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.pid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="pid" name="devType.pid" onchange="javascript:chShowIndex();" >
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
|
||||
</select>i18n_adti.message.pid_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none" id="canConfigPidDev">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.canConfigPid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="canConfigPid" name="devType.canConfigPid" >
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
|
||||
</select>i18n_adti.message.canConfigPid_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display: none" id="devShowIndex">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.index_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.showIndex" id="showIndex" value="" />
|
||||
<font id = "showIndexTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr style="display: inline" id="isPositionDev">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
槽位设备
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="radio" name="devType.isPositionDev" id="isPositionDev" value="0" />是
|
||||
<input type="radio" name="devType.isPositionDev" id="isNotPositionDev" value="1" checked="checked" />否
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.figureFill_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="button" value="i18n_adti.text.figureFill_n81i" title="i18n_adti.text.figureFill_n81i" class="btn3_mouseout" onclick="javascript:uploadFile(this)"/>
|
||||
<input type="file" name="figureFill" id="figureFill" value="" onchange="javascript:setValue(this.value)"/>
|
||||
<!-- <font id = "figureFillTip" color="red">*</font> -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
端口名称格式
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.nameFormat" id="nameFormat" value="" />(新增端口时使用:[Y]:代表设备本身在父设备的位置,[X]:代表父设备在祖父设备的位置)
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.diTableName_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="diTableName" name="devType.diTableName" onchange="changeShowHide();">
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${metadataList}" var="meta" >
|
||||
<option value="${meta}" >${meta}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableLinkField" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.indexFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="indexFiled" name="devType.indexFiled" >
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusField" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.statusFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusFiled" name="devType.statusFiled" onchange="changeStatus();">
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableSymbols" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.statusSymbols_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusSymbols" name="devType.statusSymbols" >
|
||||
<option value="" >i18n_adti.message.selectDefault_n81i</option>
|
||||
<option value=">" >></option>
|
||||
<option value="=" >=</option>
|
||||
<option value="<" ><</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusValue" style="display: none;">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_adti.text.statusValue_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.statusValue" id="statusValue" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_adti.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
<textarea type="text" name="devType.deviceDesc" id="deviceDesc" rows="3" cols="50"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="add()"
|
||||
value="i18n_adti.button.add_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_adti.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
238
WebRoot/page/system/deviceManage/addPosDevTypeInfo.jsp
Normal file
238
WebRoot/page/system/deviceManage/addPosDevTypeInfo.jsp
Normal file
@@ -0,0 +1,238 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_apdti.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
function trim(id) {
|
||||
jQuery("#"+id).val(jQuery.trim(jQuery("#"+id).val()));
|
||||
}
|
||||
|
||||
function add(){
|
||||
|
||||
//去空格
|
||||
trim("deviceTypeCode");//设备型号
|
||||
//trim("showIndex");//编号
|
||||
trim("showIndexStart");//编号开始值
|
||||
trim("showIndexEnd");//编号结束值
|
||||
|
||||
//if($id("deviceTypeCode","","设备型号") ){//&& !hasDevTypeCode()
|
||||
|
||||
var showIndexStart=document.getElementById("showIndexStart").value;
|
||||
var showIndexEnd=document.getElementById("showIndexEnd").value;
|
||||
if(showIndexStart=='' ){
|
||||
$("#showIndexEnd").next().html('i18n_apdti.message.showIndexEnd1_n81i');
|
||||
return;
|
||||
}else if(showIndexStart.replace(/[\d+]/ig,"").length>0){
|
||||
$("#showIndexEnd").next().html('i18n_apdti.message.showIndexEnd2_n81i');
|
||||
return;
|
||||
}else if(showIndexEnd=='') {
|
||||
$("#showIndexEnd").next().html('i18n_apdti.message.showIndexEnd3_n81i');
|
||||
return;
|
||||
}else if(showIndexEnd.replace(/[\d+]/ig,"").length>0) {
|
||||
$("#showIndexEnd").next().html('i18n_apdti.message.showIndexEnd4_n81i');
|
||||
return;
|
||||
}else if(showIndexStart>showIndexEnd){
|
||||
//$("#showIndexEnd").next().html('编号开始值:'+showIndexStart+'应小于编号结束值:'+showIndexEnd);
|
||||
//return;//????????????
|
||||
}else {
|
||||
$("#showIndexEnd").next().html('*');
|
||||
}
|
||||
//编号不可为空
|
||||
/*var name=document.getElementById('showIndex').value;
|
||||
if(name=='' ){
|
||||
$("#showIndex").next().html('请输入编号');
|
||||
return;
|
||||
}else if(name.replace(/[\d+]/ig,"").length>0){
|
||||
$("#showIndex").next().html('请输入数字');
|
||||
return;
|
||||
}else {
|
||||
$("#showIndex").next().html('*');
|
||||
}*/
|
||||
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=addPosDevType";
|
||||
document.Brandform.submit();
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
//}
|
||||
}
|
||||
|
||||
//判断设备型号是否重复
|
||||
function hasDevTypeCode(){
|
||||
var hasDevCode = false;
|
||||
$.ajaxSettings.async = false;//设置同步
|
||||
//先判断任务编号是否存在,不存在不查询
|
||||
var deviceTypeCode = jQuery.trim(jQuery("#deviceTypeCode").val());
|
||||
var deviceRandCode = '${devType.deviceRandCode}';
|
||||
if(deviceTypeCode!='') {
|
||||
$.getJSON("<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevType&devTypeCodeForSearch="+deviceTypeCode+"&devRandCodeForSearch="+deviceRandCode,
|
||||
{}, function(data){
|
||||
if(data!=null&&data!=""&&data.result=='success') {//设备型号已存在
|
||||
var tip = data.tip;
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = true;
|
||||
return true;
|
||||
}else {
|
||||
$("#deviceTypeCode").next().html(tip);
|
||||
hasDevCode = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDevCode;
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
//检查是否包含特殊字符
|
||||
function containSpecial(s)
|
||||
{
|
||||
var cs = /^\w+$/;
|
||||
resu = cs.test(s);
|
||||
return (cs.test(s));
|
||||
}
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_apdti.button.back_n81i"/>
|
||||
</div>
|
||||
|
||||
<form action="" name="Brandform" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" />
|
||||
<input type="hidden" name="devRandCodeForSearch" id="devRandCodeForSearch" value="${devRandCodeForSearch}" />
|
||||
<input type="hidden" name="parDevId" id="parDevId" value="${parDevId}" />
|
||||
<input type="hidden" name="devType.isPositionDev" value="1" />
|
||||
<input type="hidden" name="devType.deviceRandCode" value="${devType.deviceRandCode}" />
|
||||
<input type="hidden" name="devType.maxDeviceNum" value="1" />
|
||||
<input type="hidden" name="devType.pid" value="${devType.id}" />
|
||||
|
||||
<input type="hidden" name="devType.deviceTypeCode" id="deviceTypeCode" value="${devType.deviceTypeCode}" />
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_apdti.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="parDevCode">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_apdti.text.deviceTypeCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
${devType.deviceTypeCode}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_apdti.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
${devType.deviceRandCode}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
设备型号
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.deviceTypeCode" id="deviceTypeCode" value="" />
|
||||
<font id = "deviceTypeCodeTip" color="red">*</font>自动在设备型号后添加编号(如输入DPX8000-A12,则设备型号为'DPX8000-A12-编号')
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr id="devShowIndex">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
编号
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.showIndex" id="showIndex" value="" />
|
||||
<font id = "showIndexTip" color="red">*</font>
|
||||
</td>
|
||||
</tr> -->
|
||||
<tr id="devShowIndex">
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_apdti.text.showIndexStart_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.showIndexStart" id="showIndexStart" value="" size="6" />--<input type="text" name="devType.showIndexEnd" id="showIndexEnd" value="" size="6" />
|
||||
<font id = "showIndexTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_apdti.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
<textarea type="text" name="devType.deviceDesc" id="deviceDesc" rows="3" cols="50"></textarea>i18n_apdti.text.autoAddDeviceID_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="add()"
|
||||
value="i18n_apdti.button.add_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_apdti.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
703
WebRoot/page/system/deviceManage/confDevPos.jsp
Normal file
703
WebRoot/page/system/deviceManage/confDevPos.jsp
Normal file
@@ -0,0 +1,703 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%@ taglib uri="/jstl/fmt" prefix="fmt"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
response.setHeader("Pragma","No-Cache");
|
||||
response.setHeader("Cache-Control","No-Cache");
|
||||
response.setDateHeader("Expires", 0);
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns=" http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>i18n_cdp.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<style type="text/css">
|
||||
div
|
||||
{
|
||||
position: absolute; /*Div设置为position: absolute;才可以设置zIndex*/
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
document.onmousemove = function (a) {//鼠标移动
|
||||
if (!a) a = window.event; //移动时创建一个事件
|
||||
}
|
||||
|
||||
//暂时无用
|
||||
function replaceSpecChars(str) {
|
||||
return str.replace(new RegExp("[+]","g"),"\\\\+");//替换+,+为特殊字符
|
||||
}
|
||||
|
||||
function getAttributeValueById(id,attrStr) {
|
||||
var ele = document.getElementById(id);
|
||||
return ele.getAttribute(attrStr);
|
||||
}
|
||||
|
||||
function getAttributeValueByEle(ele,attrStr) {
|
||||
return ele.getAttribute(attrStr);
|
||||
}
|
||||
var keydownscrollTop;
|
||||
window.onscroll=function() {
|
||||
var scrollTop = document.documentElement.scrollTop;
|
||||
if(${devScrollHeight=='0'}) {//devScrollHeight可能为98%
|
||||
return false;
|
||||
}else if(scrollTop>=${devScrollHeight}){
|
||||
return false;
|
||||
}
|
||||
|
||||
var backBut = document.getElementById("backBut");
|
||||
backBut.style.top = scrollTop +5;
|
||||
|
||||
jQuery("div[id^='div_']").each(function() {
|
||||
var divId = this.id;
|
||||
//var devCode = divId.split("_")[1];//设备型号
|
||||
var devCode = divId.substring(4);//设备型号
|
||||
var initDivId = "initDivTop_"+devCode;
|
||||
var initTextId = "initTextTop_"+devCode;
|
||||
var initDivTop = document.getElementById(initDivId).value;//当ID中包含"+"时,jQuery获取不到元素
|
||||
var initTextTop = document.getElementById(initTextId).value;
|
||||
|
||||
var newTop = "";
|
||||
if(isEndWith(divId,'_name')) {
|
||||
newTop = initTextTop;
|
||||
}else if(isEndWith(divId,'_backImg')) {
|
||||
newTop = initDivTop;
|
||||
}else {
|
||||
newTop = initDivTop;
|
||||
}
|
||||
var sum = Number(newTop)+Number(scrollTop);//不能再加字符,否则之前的数字也按字符串进行相加
|
||||
this.style.top = sum+"px";
|
||||
|
||||
});
|
||||
|
||||
var subDevSele = document.getElementById("subDevSelect");
|
||||
var sumSubTop = Number(40) + Number(scrollTop);
|
||||
subDevSele.style.top = sumSubTop+"px";
|
||||
|
||||
var noteStrELe = document.getElementById("noteStr");
|
||||
var sumNoteTop = Number(130) + Number(scrollTop);
|
||||
noteStrELe.style.top = sumNoteTop+"px";
|
||||
|
||||
}
|
||||
|
||||
//判断str是否以endStr结尾
|
||||
function isEndWith(str,endStr) {
|
||||
var strLen = str.length;
|
||||
var endStrLen = endStr.length;
|
||||
if(endStrLen<=strLen) {
|
||||
var subStr = str.substring((strLen-endStrLen),strLen);
|
||||
if(subStr==endStr) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var count = 1;//设备div的ID为:div_${device.deviceCode}+"_ture"+count;
|
||||
var deviceCount = 1;
|
||||
var zIndexCount = 1000;//zIndex的最大值为20多亿,zIndex必须设置position为absolute或者fixed等
|
||||
|
||||
|
||||
//鼠标down时的坐标
|
||||
var startX;
|
||||
var startY;
|
||||
var selectedDiv;
|
||||
var indstanceDivId = "selectedDivInstance";
|
||||
|
||||
function createInstanceDiv() {
|
||||
var instanceDiv = document.createElement("div");
|
||||
instanceDiv.setAttribute("id",indstanceDivId);
|
||||
instanceDiv.style.width = "1"+"px";
|
||||
instanceDiv.style.height = "1"+"px";
|
||||
instanceDiv.style.left = 10+"px";
|
||||
instanceDiv.style.top = 10+"px";
|
||||
instanceDiv.style.border = "1px solid red";
|
||||
instanceDiv.style.zIndex = 1000;
|
||||
|
||||
document.deviceConfigForm.appendChild(instanceDiv);
|
||||
|
||||
//给选中区域添加选中事件---暂时不使用
|
||||
dragMouseToCreateDiv(indstanceDivId);
|
||||
}
|
||||
|
||||
function dragMouseToCreateDiv(objId) {
|
||||
if (typeof objId == "string") {
|
||||
var obj = document.getElementById(objId);
|
||||
}
|
||||
//调用当前div的mousedown事件的同时,调用document的mousemove和mouseup事件
|
||||
//调用document的mousemove和mouseup事件
|
||||
obj.onmousedown = function(event) {
|
||||
//jQuery("#indexStr2").val("mouseDown"+countTmp);
|
||||
//countTmp = countTmp+1;
|
||||
//底图的范围:只可在底图范围内进行选择(选择区域也可以选择)
|
||||
var widthTmp = ${devType.figureWidth};
|
||||
var heightTmp = ${devType.figureHeight};
|
||||
var xTmp = ${rootDeviceX};
|
||||
var yTmp = ${rootDeviceY};
|
||||
var xMaxTmp = xTmp+widthTmp;
|
||||
var yMaxTmp = yTmp+heightTmp;
|
||||
|
||||
//当前鼠标的坐标
|
||||
var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
|
||||
if(navigator.userAgent.indexOf("MSIE")>0) {
|
||||
var startX = Number(window.event.clientX)+Number(scrollLeft);
|
||||
var startY = Number(window.event.clientY)+Number(scrollTop);
|
||||
}else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
|
||||
var e = event ? event : window.event;
|
||||
x = e.clientX;
|
||||
y = e.clientY;
|
||||
var startX = Number(x)+Number(scrollLeft);
|
||||
var startY = Number(y)+Number(scrollTop);
|
||||
}
|
||||
|
||||
if(xTmp<=startX && startX<=xMaxTmp && yTmp<=startY && startY<=yMaxTmp) {
|
||||
//设置frame外捕获鼠标事件
|
||||
if(obj.setCapture) {
|
||||
obj.setCapture();
|
||||
}else if(window.captureEvents) {
|
||||
window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
|
||||
}
|
||||
|
||||
var curDevCode = jQuery("input:checked[name=devTypeForPosition]").val();//单选钮方式
|
||||
|
||||
var selecDevCode = jQuery("select[id='confDevCode'] option:selected").val();//下拉列表方式
|
||||
var a = window.event;
|
||||
//鼠标down的时候,创建一个div
|
||||
var selectDiv = document.getElementById(indstanceDivId);
|
||||
selectDiv.style.width = "1"+"px";
|
||||
selectDiv.style.height = "1"+"px";
|
||||
selectDiv.style.left = startX+"px";
|
||||
selectDiv.style.top = startY+"px";
|
||||
selectDiv.style.zIndex = 1000;
|
||||
var divFinalWidth = 1;
|
||||
var divFinalHeight = 1;
|
||||
|
||||
document.onmousemove = function (event) {//鼠标移动
|
||||
if (!a) a = window.event; //移动时创建一个事件
|
||||
//改变div的大小和位置
|
||||
var curScrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
|
||||
var curScrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if(navigator.userAgent.indexOf("MSIE")>0) {
|
||||
var curX = Number(window.event.clientX)+Number(curScrollLeft);
|
||||
var curY = Number(window.event.clientY)+Number(curScrollTop);
|
||||
}else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
|
||||
var s = event ? event : window.event;
|
||||
x = s.clientX;
|
||||
y = s.clientY;
|
||||
var curX = Number(x)+Number(curScrollLeft);
|
||||
var curY = Number(y)+Number(curScrollTop);
|
||||
}
|
||||
|
||||
var subtractX = Number(curX)-Number(startX);
|
||||
var subtractY = Number(curY)-Number(startY);
|
||||
divFinalWidth = Math.abs(subtractX);
|
||||
divFinalHeight = Math.abs(subtractY);
|
||||
selectDiv.style.width = divFinalWidth+"px";
|
||||
selectDiv.style.height = divFinalHeight+"px";
|
||||
|
||||
var finalX = startX-${rootDeviceX};
|
||||
var finalY = startY-${rootDeviceY};
|
||||
jQuery("#PosSelect_X_"+selecDevCode).val(finalX);
|
||||
jQuery("#PosSelect_Y_"+selecDevCode).val(finalY);
|
||||
jQuery("#PosSelect_Width_"+selecDevCode).val(divFinalWidth);
|
||||
jQuery("#PosSelect_Height_"+selecDevCode).val(divFinalHeight);
|
||||
//jQuery("#Pos_Show_For_All").val(startX+","+startY);
|
||||
//jQuery("#Pos_Show_For_All").val(startX+","+startY+","+divFinalWidth+","+divFinalHeight);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+finalX+",Y:"+finalY+",W:"+divFinalWidth+",H:"+divFinalHeight);
|
||||
|
||||
}
|
||||
|
||||
document.onmouseup = function (a) {//鼠标up:为div增加双击事件(双击时,生成input:子设备对应的坐标位置,双击时,div的大小为0);单击拖拽事件(可以拖动div的位置);改变div大小的事件
|
||||
document.onmousemove = null;
|
||||
//取消frame外捕获鼠标事件
|
||||
if(obj.releaseCapture) {
|
||||
obj.releaseCapture();
|
||||
}else if(window.captureEvents) {
|
||||
window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
document.getElementById("confDevCode").blur();
|
||||
}
|
||||
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//新增位置配置
|
||||
function add() {
|
||||
/*for(var prop in map){
|
||||
alert(prop);
|
||||
alert(map[prop]);
|
||||
}*/
|
||||
var jsonMap = JSON.stringify(map);
|
||||
$("input[name=jsonStr]").val(jsonMap);
|
||||
document.deviceConfigForm.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=addDevicePos&devtype="+'${devType.deviceTypeCode}';
|
||||
document.deviceConfigForm.submit();
|
||||
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
|
||||
function goBack() {
|
||||
document.deviceConfigForm.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo&devTypeCodeForSearch=${devTypeCodeForSearch}&devRandCodeForSearch=${devRandCodeForSearch}&parDevId=${parDevId}";
|
||||
document.deviceConfigForm.submit();
|
||||
}
|
||||
|
||||
var map = {};//key子设备--value板卡集合
|
||||
function changeDevCode() {
|
||||
var selecDevCode = jQuery("select[id='confDevCode'] option:selected").val();//下拉列表方式
|
||||
var xTmp = jQuery("#PosSelect_X_"+selecDevCode).val();
|
||||
var yTmp = jQuery("#PosSelect_Y_"+selecDevCode).val();
|
||||
var widthTmp = jQuery("#PosSelect_Width_"+selecDevCode).val();
|
||||
var heightTmp = jQuery("#PosSelect_Height_"+selecDevCode).val();
|
||||
|
||||
if(isNotBlank(xTmp) || isNotBlank(yTmp)) {
|
||||
var xSum = Number(xTmp)+Number(${rootDeviceX});
|
||||
var ySum = Number(yTmp)+Number(${rootDeviceY});
|
||||
jQuery("#Pos_Show_For_All").val("X:"+xTmp+",Y:"+yTmp+",W:"+widthTmp+",H:"+heightTmp);
|
||||
}else {
|
||||
jQuery("#Pos_Show_For_All").val('');
|
||||
}
|
||||
var selectDiv = document.getElementById(indstanceDivId);
|
||||
if(isNotBlank(selectDiv) && isNotBlank(xTmp) && isNotBlank(yTmp) && isNotBlank(widthTmp) && isNotBlank(heightTmp)) {
|
||||
var xSum = Number(xTmp)+Number(${rootDeviceX});
|
||||
var ySum = Number(yTmp)+Number(${rootDeviceY});
|
||||
selectDiv.style.left = xSum+"px";
|
||||
selectDiv.style.top = ySum+"px";
|
||||
selectDiv.style.width = widthTmp+"px";
|
||||
selectDiv.style.height = heightTmp+"px";
|
||||
}else {
|
||||
selectDiv.style.width = "0"+"px";
|
||||
selectDiv.style.height = "0"+"px";
|
||||
selectDiv.style.left = 10+"px";
|
||||
selectDiv.style.top = 10+"px";
|
||||
}
|
||||
var count = 0;
|
||||
jQuery("#banka").find("option").each(function (){
|
||||
count++;
|
||||
});
|
||||
if(count == 1){
|
||||
jQuery("#bkwz").hide();
|
||||
jQuery("#banka").hide();
|
||||
}
|
||||
if(map[$("#confDevCode").val()]!=undefined){
|
||||
$("#bankaVal").val("");
|
||||
var arr = map[$("#confDevCode").val()];
|
||||
var str = arr.join(",");
|
||||
$("#bankaVal").val(str);
|
||||
$("#banKaTip").html("");
|
||||
var str = arr.join("<br>");
|
||||
$("#banKaTip").html(str);
|
||||
}else{
|
||||
jQuery.post("<c:url value='/sysManage/deviceBrandManage!ajaxGetBanKa.do' />",{bcname:jQuery("select[id='confDevCode'] option:selected").val(),deviceTypeCode:'${devType.deviceTypeCode}'},function(data,textStatus){
|
||||
$("#bankaVal").val("");
|
||||
var arr = eval(data);
|
||||
var str = arr.join(",");
|
||||
$("#bankaVal").val(str);
|
||||
$("#banKaTip").html("");
|
||||
var str = arr.join("<br>");
|
||||
$("#banKaTip").html(str);
|
||||
map[$("#confDevCode").val()]=eval(data);
|
||||
});
|
||||
}
|
||||
document.getElementById("confDevCode").blur();
|
||||
}
|
||||
|
||||
|
||||
function checkVal(){
|
||||
var selecDevCode = jQuery("select[id='confDevCode'] option:selected").val();//下拉列表方式
|
||||
var xTmp = jQuery("#PosSelect_X_"+selecDevCode).val();
|
||||
var yTmp = jQuery("#PosSelect_Y_"+selecDevCode).val();
|
||||
var widthTmp = jQuery("#PosSelect_Width_"+selecDevCode).val();
|
||||
var heightTmp = jQuery("#PosSelect_Height_"+selecDevCode).val();
|
||||
|
||||
if(isNotBlank(xTmp) || isNotBlank(yTmp)) {
|
||||
|
||||
var xSum = Number(xTmp)+Number(${rootDeviceX});
|
||||
var ySum = Number(yTmp)+Number(${rootDeviceY});
|
||||
jQuery("#Pos_Show_For_All").val("X:"+xTmp+",Y:"+yTmp+",W:"+widthTmp+",H:"+heightTmp);
|
||||
}else {
|
||||
jQuery("#Pos_Show_For_All").val('');
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
keydownFun();
|
||||
});
|
||||
|
||||
function keydownFun(event){
|
||||
document.onkeydown = function switchDev(event) {
|
||||
var e = event ? event : window.event;
|
||||
var keyValTmp = e.keyCode||e.which;
|
||||
|
||||
//38:上箭头,40:下箭头, 37:左箭头,39:右箭头 width height
|
||||
var selecDevCode = jQuery("select[id='confDevCode'] option:selected").val();//下拉列表方式
|
||||
|
||||
var selectDiv = document.getElementById(indstanceDivId);
|
||||
var oldHeight = 1;
|
||||
var oldWidth = 1;
|
||||
var oldLeft = 10;
|
||||
var oldTop = 10;
|
||||
if(isNotBlank(selectDiv)) {
|
||||
oldHeight = selectDiv.style.height;
|
||||
oldWidth = selectDiv.style.width;
|
||||
oldLeft = selectDiv.style.left;
|
||||
oldTop = selectDiv.style.top;
|
||||
if(oldHeight.length>=3) {
|
||||
oldHeight = oldHeight.substr(0,oldHeight.length-2);
|
||||
}
|
||||
if(oldWidth.length>=3) {
|
||||
oldWidth = oldWidth.substr(0,oldWidth.length-2);
|
||||
}
|
||||
if(oldLeft.length>=3) {
|
||||
oldLeft = oldLeft.substr(0,oldLeft.length-2);
|
||||
}
|
||||
if(oldTop.length>=3) {
|
||||
oldTop = oldTop.substr(0,oldTop.length-2);
|
||||
}
|
||||
}
|
||||
|
||||
if(e.ctrlKey && keyValTmp==38) {//ctrl+↑:向上切换设备
|
||||
var prevText = $("#confDevCode option:selected").prev().text();
|
||||
if(prevText!=""){
|
||||
$("#confDevCode option:selected").prev().attr("selected","selected");
|
||||
$("#confDevCode").change();
|
||||
}
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
}else if(e.ctrlKey && keyValTmp==40) {//ctrl+↓:向下切换设备
|
||||
var nextText = $("#confDevCode option:selected").next().text();
|
||||
if(nextText!=""){
|
||||
$("#confDevCode option:selected").next().attr("selected","selected");
|
||||
$("#confDevCode").change();
|
||||
}
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
}else if(e.shiftKey && keyValTmp==38) {//shift+↑:缩小高度
|
||||
if(oldHeight>1) {
|
||||
var heightVal = Number(oldHeight)-Number(1)
|
||||
selectDiv.style.height = heightVal+"px";
|
||||
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_Height_"+selecDevCode).val(heightVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+oldTop+",W:"+oldWidth+",H:"+heightVal);
|
||||
}
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
}else if(e.shiftKey && keyValTmp==40) {//shift+↓:扩大高度
|
||||
//if(oldHeight>=1) {//此处可以不加条件,因为是增加高度
|
||||
var heightVal = Number(oldHeight)+Number(1)
|
||||
selectDiv.style.height = heightVal+"px";
|
||||
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_Height_"+selecDevCode).val(heightVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+oldTop+",W:"+oldWidth+",H:"+heightVal);
|
||||
//}
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
}else if(e.shiftKey && keyValTmp==37) {//shift+←:缩小宽度
|
||||
if(oldWidth>1) {
|
||||
var widthVal = Number(oldWidth)-Number(1);
|
||||
selectDiv.style.width = widthVal+"px";
|
||||
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_Width_"+selecDevCode).val(widthVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+oldTop+",W:"+widthVal+",H:"+oldHeight);
|
||||
}
|
||||
|
||||
}else if(e.shiftKey && keyValTmp==39) {//shift+→:扩大宽度
|
||||
//if(oldWidth>=1) {
|
||||
var widthVal = Number(oldWidth)+Number(1);
|
||||
selectDiv.style.width = widthVal+"px";
|
||||
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_Width_"+selecDevCode).val(widthVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+oldTop+",W:"+widthVal+",H:"+oldHeight);
|
||||
//}
|
||||
|
||||
}else if(keyValTmp==37) {//←:向左移动选中区域
|
||||
if(oldLeft>=1) {
|
||||
var xVal = Number(oldLeft)-Number(1);
|
||||
selectDiv.style.left = xVal+"px";
|
||||
|
||||
xVal = xVal-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_X_"+selecDevCode).val(xVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+xVal+",Y:"+oldTop+",W:"+oldWidth+",H:"+oldHeight);
|
||||
}
|
||||
|
||||
}else if(keyValTmp==39) {//→:向右移动选中区域
|
||||
if(oldLeft>=1) {
|
||||
var xVal = Number(oldLeft)+Number(1);
|
||||
selectDiv.style.left = xVal+"px";
|
||||
|
||||
xVal = xVal-${rootDeviceX};
|
||||
oldTop = oldTop-${rootDeviceY};
|
||||
jQuery("#PosSelect_X_"+selecDevCode).val(xVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+xVal+",Y:"+oldTop+",W:"+oldWidth+",H:"+oldHeight);
|
||||
}
|
||||
|
||||
}else if(keyValTmp==38) {//↑:向上移动选中区域
|
||||
if(oldTop>=1) {
|
||||
var yVal = Number(oldTop)-Number(1);
|
||||
selectDiv.style.top = yVal+"px";
|
||||
|
||||
yVal = yVal-${rootDeviceY};
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
jQuery("#PosSelect_Y_"+selecDevCode).val(yVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+yVal+",W:"+oldWidth+",H:"+oldHeight);
|
||||
}
|
||||
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
|
||||
}else if(keyValTmp==40) {//↓:向下移动选中区域
|
||||
if(oldTop>=1) {
|
||||
var yVal = Number(oldTop)+Number(1);
|
||||
selectDiv.style.top = yVal+"px";
|
||||
|
||||
yVal = yVal-${rootDeviceY};
|
||||
oldLeft = oldLeft-${rootDeviceX};
|
||||
jQuery("#PosSelect_Y_"+selecDevCode).val(yVal);
|
||||
jQuery("#Pos_Show_For_All").val("X:"+oldLeft+",Y:"+yVal+",W:"+oldWidth+",H:"+oldHeight);
|
||||
}
|
||||
|
||||
if(e.preventDefault) {
|
||||
e.preventDefault();//FF
|
||||
}else {
|
||||
e.returnValue = false;//IE
|
||||
}
|
||||
}
|
||||
};
|
||||
document.getElementById("confDevCode").blur();
|
||||
}
|
||||
document.onclick = function devFocus() {
|
||||
//document.getElementById("confDevCode").focus();
|
||||
};
|
||||
|
||||
function selectBanKa(){
|
||||
var url = "<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=selectBanKa&posParDevId=${devType.deviceTypeCode }&bcname="+jQuery("select[id='confDevCode'] option:selected").val();
|
||||
/* var result = window.showModalDialog(url, window, 'dialogHeight:430px;dialogWidth:850px;status:no;resizable:no'); */
|
||||
//改为layer-20180831-chenjs---
|
||||
parent.layer.open({
|
||||
type: 2,
|
||||
title: "i18n_sbk.text.selectBK_n81i",
|
||||
area:['850px', '470px'],
|
||||
shade: 0.6,
|
||||
closeBtn: 1,
|
||||
maxmin:true,
|
||||
content: url,
|
||||
end: function(){
|
||||
var str = $("#temp").val();
|
||||
if (str) {
|
||||
var arr = str.split(",");
|
||||
$("#bankaVal").val(str);
|
||||
$("#banKaTip").html("");
|
||||
var str = str.replace(/,/g, "<br>");
|
||||
$("#banKaTip").html(str);
|
||||
map[jQuery("select[id='confDevCode'] option:selected").val()]=arr;
|
||||
}
|
||||
}
|
||||
});
|
||||
/* var loop = setInterval(function(){
|
||||
if(newWindow.closed) {
|
||||
clearInterval(loop);
|
||||
var str = $("#temp").val();
|
||||
var arr = str.split(",");
|
||||
$("#bankaVal").val(str);
|
||||
$("#banKaTip").html("");
|
||||
var str = str.replace(/,/g, "<br>");
|
||||
$("#banKaTip").html(str);
|
||||
map[jQuery("select[id='confDevCode'] option:selected").val()]=arr;
|
||||
};
|
||||
}, 500); */
|
||||
|
||||
//把选择的板卡显示到文本框中
|
||||
/* if(result!=undefined){
|
||||
$("#bankaVal").val("");
|
||||
var str = result.join(",");
|
||||
$("#bankaVal").val(str);
|
||||
$("#banKaTip").html("");
|
||||
var str = result.join("<br>");
|
||||
$("#banKaTip").html(str);
|
||||
map[jQuery("select[id='confDevCode'] option:selected").val()]=result;
|
||||
} */
|
||||
}
|
||||
function showTitle(showContentSpanId,obj,event) {
|
||||
//当前鼠标的坐标
|
||||
var scrollLeft = document.documentElement.scrollLeft;
|
||||
var event = event ? event : window.event;
|
||||
var startX = Number(event.clientX)+Number(scrollLeft);
|
||||
//span的坐标及宽度
|
||||
var instanceDiv = document.getElementById(showContentSpanId);
|
||||
var spanRealWidth = 200;
|
||||
if(instanceDiv!=null && instanceDiv!='undefined') {
|
||||
if(navigator.userAgent.indexOf("MSIE")>0) {
|
||||
instanceDiv.style.left = startX-80+"px";
|
||||
}
|
||||
if(navigator.userAgent.indexOf("Firefox")>0){
|
||||
instanceDiv.style.left = startX-100+"px";
|
||||
}
|
||||
instanceDiv.style.top =60+"px";
|
||||
$(instanceDiv).css("width",spanRealWidth);//宽度为当前鼠标的位置到最右边窗口的距离
|
||||
instanceDiv.style.zIndex = 1000;
|
||||
}
|
||||
$("#"+showContentSpanId).show();
|
||||
}
|
||||
function hideTitle(showContentSpanId) {
|
||||
$("#"+showContentSpanId).hide();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size: 12px;-moz-user-select:none;" onselectstart="return false;" unselectable="on" >
|
||||
<form id="deviceConfigForm" action="" name="deviceConfigForm" method="post">
|
||||
|
||||
<input id="temp" type="hidden"/>
|
||||
|
||||
<input name="jsonStr" type="hidden" />
|
||||
|
||||
<input id="indexStr" type="hidden" />
|
||||
<input id="kuangPosi0" type="hidden" />
|
||||
<input id="kuangPosi1" type="hidden" />
|
||||
<input id="kuangPosi2" type="hidden" />
|
||||
<input id="kuangPosi3" type="hidden" />
|
||||
<input id="kuangPosi4" type="hidden" />
|
||||
<input id="kuangPosi5" type="hidden" />
|
||||
<input id="kuangPosi6" type="hidden" />
|
||||
<input id="kuangPosi7" type="hidden" />
|
||||
<input id="kuangPosi8" type="hidden" />
|
||||
<input id="kuangPosi9" type="hidden" />
|
||||
<input id="kuangPosi10" type="hidden" />
|
||||
<input id="kuangPosi11" type="hidden" />
|
||||
<input id="oldXY" type="hidden" />
|
||||
<input id="listSize" type="hidden" />
|
||||
<!-- 以上均为调试使用的input -->
|
||||
|
||||
<input id="seqId" name="seqId" value="${seqId}" type="hidden"/>
|
||||
<input id="BanKaAndBanCao" name="pzbkbc" value="" type="hidden"/>
|
||||
<input name="posParDevId" value="${devType.deviceTypeCode }" type="hidden"/>
|
||||
<input id="bankaselect" value="" type="hidden"/>
|
||||
<input id="nouse" value="" type="hidden"/>
|
||||
<input id="bankanouse" value="" type="hidden"/>
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width:100%;height: 90%;margin-top: 5px;">
|
||||
<tr>
|
||||
<td width="5%">
|
||||
<div style="left: 550px;top:7px;">
|
||||
i18n_cdp.text.deviceTypeCode_n81i:${devType.deviceTypeCode}
|
||||
<div>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<div id="subDevSelect" style="left: 80px;top:40px;">
|
||||
i18n_cdp.text.confDevCode_n81i:<select id="confDevCode" onchange="changeDevCode();" onkeyup="this.blur();this.focus();" style="margin-left:10px;">
|
||||
<c:forEach items="${devTypeForPosList}" var="device" >
|
||||
<option value="${device.deviceTypeCode}" >${device.deviceTypeCode}</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="text" value="" id="Pos_Show_For_All" readonly="readonly" size="20" onfocus="checkVal();"/>
|
||||
<br/><br/>
|
||||
<c:if test="${devType.showLevel==1 && devType.isLeaf==0 && devType.pid==0 }">
|
||||
<font id="bkwz">i18n_cdp.text.bkwz_n81i:</font>
|
||||
<input onmouseover="showTitle('banKaTip',this,event);" onmouseout="hideTitle('banKaTip');" type="text" readonly="readonly" value="" id="bankaVal" title="" name="bankaVal" style="width: 175px;height: 20px"/>
|
||||
<span id="banKaTip" class="infoTip" style="display:none;"></span>
|
||||
<input type="button" value="i18n_cdp.button.select_n81i" onclick="selectBanKa()" style="height: 21px;" class=btn3_mouseout />
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
<div id="noteStr" style="top: 130px; left: 80px;">
|
||||
i18n_cdp.text.setComments.config_n81i:<br /><br />
|
||||
i18n_cdp.text.setComments.selectSubDevice_n81i<br /><br />
|
||||
i18n_cdp.text.setComments.configPosition_n81i<br /><br />
|
||||
i18n_cdp.text.shortcut_n81i:<br /><br />
|
||||
1. ctrl+↑ i18n_cdp.text.or_n81i ctrl+↓ :i18n_cdp.text.changeSubDevice_n81i<br /><br />
|
||||
2. ↑ ↓ ← → :i18n_cdp.text.movePosition_n81i<br /><br />
|
||||
3. shift+↑ i18n_cdp.text.or_n81i shift+↓ :i18n_cdp.text.setHeigh_n81i<br /><br />
|
||||
4. shift+← i18n_cdp.text.or_n81i shift+→ :i18n_cdp.text.setWiedth_n81i<br /><br />
|
||||
</div>
|
||||
|
||||
<c:forEach items="${devTypeForPosList}" var="device" varStatus="devCount">
|
||||
<input type="hidden" value="${device.id}" id="PosSelect_Id_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].id"/>
|
||||
<input type="hidden" value="${device.deviceTypeCode}" id="PosSelect_DeviceTypeCode_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].deviceTypeCode"/>
|
||||
<input type="hidden" value="${device.figureX}" id="PosSelect_X_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].figureX"/>
|
||||
<input type="hidden" value="${device.figureY}" id="PosSelect_Y_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].figureY"/>
|
||||
<input type="hidden" value="${device.figureWidth}" id="PosSelect_Width_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].figureWidth"/>
|
||||
<input type="hidden" value="${device.figureHeight}" id="PosSelect_Height_${device.deviceTypeCode}" name="devTypeForPosList[${devCount.count-1}].figureHeight"/>
|
||||
</c:forEach>
|
||||
|
||||
|
||||
<div id="rootDev" style="display:inline;width:${devType.figureWidth}px;height:${devType.figureHeight}px;left: ${rootDeviceX}px;top:${rootDeviceY}px;background:no-repeat; background-image: url('<%=path %>/images/svg/${devType.figureFill}');" >
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td width="30%" valign="top" >
|
||||
<div id="backBut" style="position: absolute; top: 5; left: 90%;width: 90px">
|
||||
<input type="button" class="btn3_mouseout" id="addButton" style="display: inline"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="add()" value="i18n_cdp.button.add_n81i"/>
|
||||
|
||||
<input type="button" class="btn3_mouseout" id="backButton" style="display: inline"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_cdp.button.back_n81i"/>
|
||||
<input id="indexStr2" type="hidden" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
//先创建一个公用的div,默认大小为0,当鼠标move的时候,div的大小改变
|
||||
createInstanceDiv();
|
||||
dragMouseToCreateDiv('rootDev');
|
||||
document.getElementById("confDevCode").focus();
|
||||
changeDevCode();
|
||||
</script>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
90
WebRoot/page/system/deviceManage/detailBrandInfo.jsp
Normal file
90
WebRoot/page/system/deviceManage/detailBrandInfo.jsp
Normal file
@@ -0,0 +1,90 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_dtbi.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/brandManage.do?action=queryBrandInfo";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<form action="" name="Brandform" method="post">
|
||||
<input type="hidden" name="brand.id" id="brandId" value="${brand.id}" />
|
||||
<input type="hidden" name="brandNameForSearch" id="brandNameForSearch" value="${brandNameForSearch}" />
|
||||
<jsp:include page="/common/transferHiddenParameter.jsp" />
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="4" class="color_8">
|
||||
<strong>i18n_dtbi.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_dtbi.text.brandName_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${brand.brandName}
|
||||
</td>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_dtbi.text.brandOid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
${brand.brandOid}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_dtbi.text.brandDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" colspan="3">
|
||||
${brand.brandDesc}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="4" align="right">
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_dtbi.button.back_n81i"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
189
WebRoot/page/system/deviceManage/detailDevTypeInfo.jsp
Normal file
189
WebRoot/page/system/deviceManage/detailDevTypeInfo.jsp
Normal file
@@ -0,0 +1,189 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_ddti.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.Brandform.submit();
|
||||
}
|
||||
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function downLoadDevPic(fileName) {
|
||||
document.Brandform.action="<%=basePath%>/download/downLoadFile!downloadDevPic.do?file="+fileName+"&backPathStr=<%=basePath%>/sysManage/deviceBrandManage.do?action=detailDevType%26devId=${devType.id}";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_ddti.button.back_n81i"/>
|
||||
</div>
|
||||
<form action="" name="Brandform" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" />
|
||||
<input type="hidden" name="devRandCodeForSearch" id="devRandCodeForSearch" value="${devRandCodeForSearch}" />
|
||||
<input type="hidden" name="parDevId" id="parDevId" value="${parDevId}" />
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_ddti.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
${devType.deviceRandCode}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.deviceTypeCode_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.deviceTypeCode}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.maxDeviceNum_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.maxDeviceNum}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="parDevCode" <c:if test="${devType.deviceRandCode==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.pid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<c:forEach items="${devTypeListInfo}" var="type" ><!-- 共选择的只有当前品牌的型号 -->
|
||||
<c:if test="${type.id==devType.pid}">
|
||||
${type.deviceTypeCode}
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="devShowIndex" <c:if test="${devType.pid==0}">style="display: none;"</c:if>>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.index_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.showIndex}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.figureFill_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<a href="javascript:downLoadDevPic('/images/svg/upload/${devType.figureFill}');">${devType.figureFill}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.nameFormat_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.nameFormat}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.diTableName_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.diTableName}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableLinkField" <c:if test="${devType.diTableName==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.indexFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.indexFiled}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusField" <c:if test="${devType.diTableName==null}">style="display: none;"</c:if>>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.statusFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.statusFiled}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableSymbols" <c:if test="${devType.statusFiled==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.statusSymbols_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.statusSymbols}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusValue" <c:if test="${devType.statusFiled==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_ddti.text.statusSymbols_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
${devType.statusValue}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_ddti.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
${devType.deviceDesc}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
289
WebRoot/page/system/deviceManage/deviceBrandInfoList.jsp
Normal file
289
WebRoot/page/system/deviceManage/deviceBrandInfoList.jsp
Normal file
@@ -0,0 +1,289 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib prefix="c" uri="/jstl/c"%>
|
||||
<%@ taglib prefix="fn" uri="/jstl/fn"%>
|
||||
<%@ taglib prefix="fmt" uri="/jstl/fmt"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_dbil.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value="/js/fileInput.js"/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.suggest.js'/>"></script>
|
||||
<style type="text/css">
|
||||
.mydiv {
|
||||
background-color:#fff;
|
||||
border: 1px solid #000;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
z-index:99;
|
||||
width: 220px;
|
||||
height: 80px;
|
||||
left:50%;/*FF IE7*/
|
||||
top: 50%;/*FF IE7*/
|
||||
|
||||
margin-left:-150px!important;/*FF IE7 该值为本身宽的一半 */
|
||||
margin-top:-60px!important;/*FF IE7 该值为本身高的一半*/
|
||||
|
||||
margin-top:0px;
|
||||
|
||||
position:fixed!important;/*FF IE7*/
|
||||
position:absolute;/*IE6*/
|
||||
|
||||
_top: expression(eval(document.compatMode &&
|
||||
document.compatMode=='CSS1Compat') ?
|
||||
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
|
||||
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
.bg {
|
||||
background-color: #ccc;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left:0;
|
||||
top:0;/*FF IE7*/
|
||||
filter:alpha(opacity=50);/*IE*/
|
||||
opacity:0.5;/*FF*/
|
||||
z-index:1;
|
||||
|
||||
position:fixed!important;/*FF IE7*/
|
||||
position:absolute;/*IE6*/
|
||||
|
||||
_top: expression(eval(document.compatMode &&
|
||||
document.compatMode=='CSS1Compat') ?
|
||||
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
|
||||
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
|
||||
|
||||
}
|
||||
/*The END*/
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
//新增品牌信息
|
||||
function toAddDevBrand() {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=toAddDevBrand";
|
||||
document.form3.submit();
|
||||
};
|
||||
//修改品牌信息
|
||||
function toUpdateDevBrand() {
|
||||
if(!isRigthCheck("ids", "edit")){
|
||||
alert("i18n_dbil.message.selectOne_n81i");
|
||||
}else{
|
||||
//获取选择的品牌信息
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=toUpdateDevBrand";
|
||||
document.form3.submit();
|
||||
}
|
||||
};
|
||||
|
||||
//查询记录
|
||||
function qry(){
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
document.form3.submit();
|
||||
}
|
||||
|
||||
//品牌详细信息
|
||||
/*function detail(brandId) {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=detailBrand&brandId="+brandId;
|
||||
document.form3.submit();
|
||||
}*/
|
||||
|
||||
//删除品牌信息
|
||||
function deleteDevBrand() {
|
||||
if(!isRigthCheck("ids", "remove")){
|
||||
alert("i18n_dbil.message.selectOne_n81i");
|
||||
}else if(confirm("i18n_dbil.message.delete_n81i")){
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=deleteDevBrand";
|
||||
document.form3.submit();
|
||||
}
|
||||
}
|
||||
|
||||
// 程辉 2013-5-8 新增 模板下载
|
||||
function downloadExample() {
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=downloadExample";
|
||||
document.form3.submit();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
}
|
||||
|
||||
//程辉 2013-5-8 新增 导入
|
||||
function importXls() {
|
||||
var myfileVal = document.getElementById("myFile").value;
|
||||
if(myfileVal=="") {
|
||||
alert("i18n_dbil.message.selectImportFile_n81i");
|
||||
}else if((myfileVal.lastIndexOf(".xlsx")+5)!=myfileVal.length && (myfileVal.lastIndexOf(".xls")+4)!=myfileVal.length){
|
||||
alert("i18n_dbil.message.selectCorrectFile_n81i");
|
||||
}else if(confirm('i18n_dbil.message.sureToImport_n81i')){
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=importXls";
|
||||
document.form3.submit();
|
||||
document.form3.action ="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
}
|
||||
}
|
||||
//程辉 2013-5-8 新增 导出当前页
|
||||
function emportCurrentXls() {
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=emportCurrentXls&pageNo="+'${pageNo }'+"&pageSize="+'${pageSize }'+"&brandNameForSearch="+$("#brandNameForSearch").val();
|
||||
document.form3.submit();
|
||||
closeDiv();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
}
|
||||
//程辉 2013-5-8 新增 导出全部
|
||||
function emportAllXls() {
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=emportAllXls&brandNameForSearch="+$("#brandNameForSearch").val();
|
||||
document.form3.submit();
|
||||
closeDiv();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
}
|
||||
function showDiv(){
|
||||
document.getElementById('popDiv').style.display='block';
|
||||
document.getElementById('bg').style.display='block';
|
||||
}
|
||||
|
||||
function closeDiv(){
|
||||
document.getElementById('popDiv').style.display='none';
|
||||
document.getElementById('bg').style.display='none';
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
<div class="middle_list">
|
||||
<form name="form3" id="frmArticleType"
|
||||
action="<c:url value='/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo'/>" method="post" enctype="multipart/form-data">
|
||||
<div class="box_1">
|
||||
<label class="divTopText"><font class="selectText">i18n_dbil.text.brandName_n81i </font>
|
||||
<input style="width:140px;" name="brandNameForSearch" id="brandNameForSearch" value="${brandNameForSearch}"></label>
|
||||
<img src="<c:url value='/images/button_chaxun.png'/>"
|
||||
class="img_middle2" onclick="javascript:qry();" />
|
||||
</div>
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:downloadExample();" value="i18n_dbil.button.downloadExample_n81i"/>
|
||||
|
||||
|
||||
<input type="button" value="i18n_dbil.text.importXls_n81i" title="i18n_dbil.text.importXls_n81i" class="btn3_mouseout" onclick="javascript:uploadFile(this)"/>
|
||||
<input type="file" name="myFile" id="myFile" value="" class="filebtn" onchange="javascript:setValue(this.value)"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:importXls();" value="i18n_dbil.buton.importXls_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:showDiv();" value="i18n_dbil.buton.exportXls_n81i"/>
|
||||
|
||||
<jsp:include page="/include/include.jsp" /></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" style="clear: left;">
|
||||
<tr>
|
||||
<td width="6%" class="color_top">
|
||||
<input type="checkbox" name="checkbox62" value="checkbox" onClick="checkAll(this)" />i18n_dbil.text.index_n81i
|
||||
</td>
|
||||
<td width="12%" class="color_top">
|
||||
i18n_dbil.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dbil.text.deviceRandName_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dbil.text.deviceBrandDesc_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_8">
|
||||
i18n_dbil.text.addTime_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="index" value="${1}" />
|
||||
<c:choose>
|
||||
|
||||
<c:when test="${fn:length(devBrandListInfo) > 0}">
|
||||
<c:forEach items="${devBrandListInfo}" var="devBrand" varStatus="vs">
|
||||
<c:set var="color" value="color_1"/>
|
||||
<c:set var="color_end" value="color_7"/>
|
||||
<c:if test="${vs.count%2!=0 }">
|
||||
<c:set var="color" value="color_3"/>
|
||||
<c:set var="color_end" value="color_6"/>
|
||||
</c:if>
|
||||
<tr >
|
||||
<td class="${color }">
|
||||
<input type="checkbox" name="ids" id="ids" value="${devBrand.id}" />${index+(pageNo-1)*pageSize}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devBrand.deviceRandCode}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devBrand.deviceRandName}
|
||||
</td>
|
||||
<td class="${color}">
|
||||
${devBrand.deviceBrandDesc}
|
||||
</td>
|
||||
<td class="${color_end}">
|
||||
<fmt:formatDate value="${devBrand.addTime}" type="both" />
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="index" value="${index + 1}" />
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="5" align="center" class="color_6">
|
||||
i18n_dbil.text.noRecord_n81i
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
<c:if test="${!empty devBrandListInfo}">
|
||||
<jsp:include page="/common/page.jsp" />
|
||||
</c:if>
|
||||
</form>
|
||||
</div>
|
||||
<div id="popDiv" class="mydiv" style="display:none;">
|
||||
<input type="hidden" />
|
||||
<input type="button" class=btn3_mouseout style="width:100px;"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:emportCurrentXls();" value="i18n_dbil.button.exportCurrentPage_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout style="width:80px"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:emportAllXls();" value="i18n_dbil.button.exportAllData_n81i"/>
|
||||
<br/>
|
||||
<a href="javascript:closeDiv()">i18n_dbil.text.closeWindow_n81i</a></div>
|
||||
|
||||
<div id="bg" class="bg" style="display:none;"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
500
WebRoot/page/system/deviceManage/deviceTypeInfoList.jsp
Normal file
500
WebRoot/page/system/deviceManage/deviceTypeInfoList.jsp
Normal file
@@ -0,0 +1,500 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib prefix="c" uri="/jstl/c"%>
|
||||
<%@ taglib prefix="fn" uri="/jstl/fn"%>
|
||||
<%@ taglib prefix="fmt" uri="/jstl/fmt"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_dtil.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
<script type="text/javascript" src="<c:url value='/js/jquery.suggest.js' />"></script>
|
||||
<style type="text/css">
|
||||
.mydiv {
|
||||
background-color:#fff;
|
||||
border: 1px solid #000;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
z-index:99;
|
||||
width: 220px;
|
||||
height: 80px;
|
||||
left:50%;/*FF IE7*/
|
||||
top: 50%;/*FF IE7*/
|
||||
|
||||
margin-left:-150px!important;/*FF IE7 该值为本身宽的一半 */
|
||||
margin-top:-60px!important;/*FF IE7 该值为本身高的一半*/
|
||||
|
||||
margin-top:0px;
|
||||
|
||||
position:fixed!important;/*FF IE7*/
|
||||
position:absolute;/*IE6*/
|
||||
|
||||
_top: expression(eval(document.compatMode &&
|
||||
document.compatMode=='CSS1Compat') ?
|
||||
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
|
||||
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
|
||||
|
||||
}
|
||||
|
||||
.bg {
|
||||
background-color: #ccc;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left:0;
|
||||
top:0;/*FF IE7*/
|
||||
filter:alpha(opacity=50);/*IE*/
|
||||
opacity:0.5;/*FF*/
|
||||
z-index:1;
|
||||
|
||||
position:fixed!important;/*FF IE7*/
|
||||
position:absolute;/*IE6*/
|
||||
|
||||
_top: expression(eval(document.compatMode &&
|
||||
document.compatMode=='CSS1Compat') ?
|
||||
documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
|
||||
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/
|
||||
|
||||
}
|
||||
/*The END*/
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ajaxForPardevice(obj)
|
||||
{
|
||||
jQuery.post("<%=path%>/sysManage/deviceBrandManage.do?action=ajaxForParDevCode",
|
||||
{"brand":obj},function(data)
|
||||
{
|
||||
var everyItems=jQuery.trim(data).split(",");
|
||||
$("#parDevCode").suggest(everyItems,{hot_list:everyItems,attachObject:"#suggest1"});
|
||||
$("#suggest1").css("display","none");
|
||||
});
|
||||
}
|
||||
//新增设备型号信息
|
||||
function toAddDevType() {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=toAddDevType&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.form3.submit();
|
||||
};
|
||||
|
||||
//新增槽位设备信息
|
||||
function toAddPosDevType(pid) {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=toAddPosDevType&posParDevId="+pid;
|
||||
document.form3.submit();
|
||||
};
|
||||
//配置设备位置
|
||||
function toConfDevPos(pid) {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=toConfDevPos&posParDevId="+pid;
|
||||
document.form3.submit();
|
||||
};
|
||||
|
||||
//批量新增设备型号信息
|
||||
function toAddBatchDevType() {
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=toAddBatchDevType";
|
||||
document.form3.submit();
|
||||
};
|
||||
//修改设备型号信息
|
||||
function toUpdateDevType() {
|
||||
if(!isRigthCheck("ids", "edit")){
|
||||
alert("i18n_dtil.message.selectOne_n81i");
|
||||
}else{
|
||||
//获取选择的设备型号信息
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=toUpdateDevType&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.form3.submit();
|
||||
}
|
||||
};
|
||||
|
||||
//查询记录
|
||||
function qry(){
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
document.form3.submit();
|
||||
}
|
||||
|
||||
function detailDev(id){
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=detailDevType&devId="+id+"&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.form3.submit();
|
||||
}
|
||||
|
||||
//删除设备型号信息
|
||||
function deleteDevType() {
|
||||
if(!isRigthCheck("ids", "remove")){
|
||||
alert("i18n_dtil.message.selectOne_n81i");
|
||||
}else if(confirm("i18n_dtil.message.delete_n81i")){
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=deleteDevType";
|
||||
document.form3.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//add by wx
|
||||
function emptyCode(){
|
||||
jQuery("input[id='parDevCode']").val("");
|
||||
}
|
||||
//add by wx 品牌改变时改变suggest提示内容
|
||||
function changeparCode1() {
|
||||
jQuery("div[id='suggest1']").empty();//清空父设备型号列表
|
||||
var selecVal = jQuery("select[id='devRandCodeForSearch'] option:selected").val(); //所选品牌
|
||||
|
||||
if(isNotBlank(selecVal)) {
|
||||
ajaxForPardevice(selecVal);
|
||||
$("#suggest1").hide();
|
||||
}else {
|
||||
ajaxForPardevice("");
|
||||
$("#suggest1").hide();
|
||||
}
|
||||
}
|
||||
// 程辉 2013-5-8 新增 模板下载
|
||||
function downloadExample() {
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=downloadExampleType";
|
||||
document.form3.submit();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
}
|
||||
|
||||
//程辉 2013-5-8 新增 导入
|
||||
function importXls() {
|
||||
var myfileVal = document.getElementById("myFile").value;
|
||||
if(myfileVal=="") {
|
||||
alert("i18n_dtil.message.selectImportFile_n81i");
|
||||
}else if((myfileVal.lastIndexOf(".xlsx")+5)!=myfileVal.length && (myfileVal.lastIndexOf(".xls")+4)!=myfileVal.length){
|
||||
alert("i18n_dtil.message.selectCorrectFile_n81i");
|
||||
}else if(confirm('i18n_dtil.message.sureToImport_n81i')){
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=importXlsType";
|
||||
document.form3.submit();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
}
|
||||
}
|
||||
//程辉 2013-5-8 新增 导出当前页
|
||||
function emportCurrentXls() {
|
||||
if($("#noresult").html() != ""&&$("#noresult").html() != null){
|
||||
alert("i18n_dtil.message.noDataExport_n81i");
|
||||
return ;
|
||||
}
|
||||
var currentPage = $("#currentPage").html();
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=emportCurrentXlsType&pageNo="+currentPage+"&pageSize="+'${pageSize }'+"&devTypeCodeForSearch="+$("#devTypeCodeForSearch").val()+"&devRandCodeForSearch="+$("#devRandCodeForSearch").val()+"&parDevId="+$("#parDevCode").val();
|
||||
document.form3.submit();
|
||||
closeDiv();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
}
|
||||
//程辉 2013-5-8 新增 导出全部
|
||||
function emportAllXls() {
|
||||
if($("#noresult").html() != ""&&$("#noresult").html() != null){
|
||||
alert("i18n_dtil.message.noDataExport_n81i");
|
||||
return ;
|
||||
}
|
||||
document.form3.action = "<c:url value='/'/>/sysManage/deviceBrandManage.do?action=emportAllXlsType&devTypeCodeForSearch="+$("#devTypeCodeForSearch").val()+"&devRandCodeForSearch="+$("#devRandCodeForSearch").val()+"&parDevId="+$("#parDevCode").val();
|
||||
document.form3.submit();
|
||||
closeDiv();
|
||||
document.form3.action = "<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo";
|
||||
}
|
||||
function showDiv(){
|
||||
document.getElementById('popDiv').style.display='block';
|
||||
document.getElementById('bg').style.display='block';
|
||||
}
|
||||
|
||||
function closeDiv(){
|
||||
document.getElementById('popDiv').style.display='none';
|
||||
document.getElementById('bg').style.display='none';
|
||||
}
|
||||
|
||||
function ieBrowser(){
|
||||
if($.browser.msie){
|
||||
if($.browser.version.split('.')[0]<=7){
|
||||
return false;
|
||||
}else{
|
||||
return true;//ie8+
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var dh = document.body.clientHeight;
|
||||
var dhh = dh-60+"px;";
|
||||
var tableHeight = $("#info").height();
|
||||
if(tableHeight > dh-60){
|
||||
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:99%;font-size:12px;height: "+dhh);
|
||||
if(ieBrowser()){
|
||||
$("#info").attr("style","width:100%;");
|
||||
}else{
|
||||
$("#info").attr("style","width:98.5%;");
|
||||
}
|
||||
}else{
|
||||
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:98%;font-size:12px;height: "+dhh);
|
||||
$("#info").attr("style","width:100%;");
|
||||
}
|
||||
$("#info").floatHeaderDiv();
|
||||
});
|
||||
window.onresize = function(){
|
||||
$("#info").floatHeader();//用于浏览器调整大小后 列表表头自动适应
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var dh = document.body.clientHeight;
|
||||
var dhh = dh-60+"px;";
|
||||
var tableHeight = $("#info").height();
|
||||
if(tableHeight > dh-60){
|
||||
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:99%;font-size:12px;height: "+dhh);
|
||||
if(ieBrowser()){
|
||||
$("#info").attr("style","width:100%;");
|
||||
}else{
|
||||
$("#info").attr("style","width:98.5%;");
|
||||
}
|
||||
}else{
|
||||
$("#maindiv").attr("style","clear:both;margin-left:6px;overflow-y:auto;overflow-x:auto;width:98%;font-size:12px;height: "+dhh);
|
||||
$("#info").attr("style","width:100%;");
|
||||
}
|
||||
$("#info").floatHeaderDiv();
|
||||
});
|
||||
/*------ 滚动条滚动 延迟加载页面操作--------------*/
|
||||
var hght=0;//初始化滚动条总长
|
||||
var topH=0;//初始化滚动条的当前位置
|
||||
var pagePoint = ${pageNo};
|
||||
var memoryData ;
|
||||
var intervalID ;
|
||||
var currentPage = 0; //当前页数
|
||||
var currenttotalPage = 0; //总页数
|
||||
$(function(){//DOM的onload事件
|
||||
$("#maindiv").scroll( function() {//定义滚动条位置改变时触发的事件。
|
||||
hght=this.scrollHeight;//得到滚动条总长,赋给hght变量
|
||||
topH=this.scrollTop+this.clientHeight;//得到滚动条当前值,赋给top变量
|
||||
});
|
||||
intervalID = setInterval(function(){cando();},1000);//每隔2秒钟调用一次cando函数来判断当前滚动条位置。
|
||||
function cando(){
|
||||
currentPage = $("#currentPage").html();
|
||||
currenttotalPage = $("#currenttotalPage").html();
|
||||
if(Number(currentPage) < Number(currenttotalPage)){
|
||||
if(topH!=0 && hght!=0 && topH == hght ){//判断滚动条当前位置是否超过总长的3/2,parseInt为取整函数
|
||||
show();//如果是,调用show函数加载内容。
|
||||
}
|
||||
}else if(Number(currentPage) == Number(currenttotalPage)){
|
||||
clearInterval(intervalID);
|
||||
}
|
||||
}
|
||||
function show(){
|
||||
hght=0;//恢复滚动条总长,因为$(”#mypage”).scroll事件一触发,又会得到新值,不恢复的话可能会造成判断错误而再次加载……
|
||||
topH=0;//原因同上。
|
||||
var url2="<c:url value='deviceBrandManage.do?action=queryDeviceTypeInfoChild'/>&pageSize="+'${pageSize }'+"&pageNo="+(++pagePoint)+"&devTypeCodeForSearch="+$("#devTypeCodeForSearch").val()+"&devRandCodeForSearch="+$("#devRandCodeForSearch").val()+"&parDevCode="+$("#parDevCode").val();
|
||||
var urlTmp = encodeURI(url2);
|
||||
$.ajax({
|
||||
url:urlTmp,
|
||||
type : "get",
|
||||
async:false,
|
||||
success : function(data) {
|
||||
$("#info").append($(data));//用append方法追加内容到mypage元素。
|
||||
$("#currentPage").html(pagePoint);//修改页码
|
||||
$("#pageNo").val(pagePoint);
|
||||
}
|
||||
});
|
||||
loadButton();
|
||||
}
|
||||
});
|
||||
/*------ 滚动条滚动 延迟加载页面操作--------------*/
|
||||
var set_Id;
|
||||
var parDevCode = "";
|
||||
function suggestKeyUp(str){
|
||||
parDevCode = str;
|
||||
if(!checkStrNoDian(str)){
|
||||
clearTimeout(set_Id);
|
||||
set_Id = setTimeout(suggestResult,800);
|
||||
}else{
|
||||
clearTimeout(set_Id);
|
||||
alert('i18n_dtil.message.inputInfo_n81i');
|
||||
$("#parDevCode").val('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
function suggestResult(){
|
||||
if(parDevCode==""){
|
||||
return ;
|
||||
}
|
||||
var brand = $("#devRandCodeForSearch").val();
|
||||
$.ajax({
|
||||
url:"<%=path%>/sysManage/deviceBrandManage.do?action=suggestResult",
|
||||
type : "POST",
|
||||
data:{"brand":brand,"keyWord":parDevCode},
|
||||
success : function(data) {
|
||||
var lianxiangList = data.split(",");
|
||||
$("#parDevCode").suggest(lianxiangList,{hot_list:lianxiangList,attachObject:"#suggest1",showType:"scroll"});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list">
|
||||
<form name="form3" id="frmArticleType"
|
||||
action="<c:url value='/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo'/>" method="post" enctype="multipart/form-data">
|
||||
<div class="box_1">
|
||||
<label class="divTopText"><font class="selectText">i18n_dtil.text.devTypeCode_n81i</font>
|
||||
<input style="width:80px;" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" /></label>
|
||||
<label class="divTopText"><font class="selectText">i18n_dtil.text.devRandCode_n81i</font>
|
||||
<select id="devRandCodeForSearch" name="devRandCodeForSearch">
|
||||
<option value="" >i18n_dtil.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${devBrandListInfo}" var="brand" >
|
||||
<option value="${brand.deviceRandCode}"
|
||||
<c:if test="${devRandCodeForSearch==brand.deviceRandCode }">selected="selected"</c:if> >${brand.deviceRandCode}</option>
|
||||
</c:forEach>
|
||||
</select></label>
|
||||
<label class="divTopText"><font class="selectText">i18n_dtil.text.parDev_n81i</font>
|
||||
<input type="text" id="parDevCode" name="parDevCode" value="${parDevCode}" onkeyup="suggestKeyUp(this.value)">
|
||||
<div id="suggest1" class="ac_results" style="display:none;"></label>
|
||||
</div>
|
||||
<img src="<c:url value='/images/button_chaxun.png'/>"
|
||||
class="img_middle" onclick="javascript:qry();" />
|
||||
</div>
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:showDiv();" value="i18n_dtil.button.export_n81i"/>
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="toAddDevType()" value="i18n_dtil.button.add_n81i"/>
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="toAddBatchDevType()" value="i18n_dtil.button.toAddBatchDevType_n81i"/>
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="toUpdateDevType()" value="i18n_dtil.button.update_n81i"/>
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="deleteDevType()" value="i18n_dtil.button.delete_n81i"/>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="maindiv">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table" id="info">
|
||||
<tr>
|
||||
<td width="6%" class="color_top">
|
||||
<input type="checkbox" name="checkbox62" value="checkbox" onClick="checkAll(this)" />i18n_dtil.text.index_n81i
|
||||
</td>
|
||||
<td width="12%" class="color_top">
|
||||
i18n_dtil.text.devTypeCode_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dtil.text.devRandCode_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dtil.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dtil.text.parDevCode_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_top">
|
||||
i18n_dtil.text.addTime_n81i
|
||||
</td>
|
||||
<td width="10%" class="color_8">
|
||||
i18n_dtil.text.opration_n81i
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="index" value="${1}" />
|
||||
<c:choose>
|
||||
|
||||
<c:when test="${fn:length(devTypeListInfo) > 0}">
|
||||
<c:forEach items="${devTypeListInfo}" var="devType" varStatus="vs">
|
||||
<c:set var="color" value="color_1"/>
|
||||
<c:set var="color_end" value="color_7"/>
|
||||
<c:if test="${vs.count%2!=0 }">
|
||||
<c:set var="color" value="color_3"/>
|
||||
<c:set var="color_end" value="color_6"/>
|
||||
</c:if>
|
||||
<tr >
|
||||
<td class="${color }">
|
||||
<input type="checkbox" name="ids" id="ids" value="${devType.id}"
|
||||
<c:if test="${devType.hasInstance==1}">disabled="disabled"</c:if> />${index+(pageNo-1)*pageSize}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceTypeCode}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceRandCode}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceDesc}
|
||||
</td>
|
||||
<td class="${color}">
|
||||
${devType.parDevCode}
|
||||
</td>
|
||||
<td class="${color}">
|
||||
<fmt:formatDate value="${devType.addTime}" type="both" />
|
||||
</td>
|
||||
<td class="${color_end}">
|
||||
<a href="javascript:detailDev('${devType.id}');">i18n_dtil.text.detailDev_n81i</a>
|
||||
<c:if test="${not empty devType.pid && devType.pid==0 && devType.isPositionDev!=1}">
|
||||
<a href="javascript:toAddPosDevType('${devType.id}');">i18n_dtil.text.toAddPosDevType_n81i</a>
|
||||
</c:if>
|
||||
<c:if test="${devType.figureFill !=null && devType.isLeaf==0 && devType.isPositionDev!=1}">
|
||||
<a href="javascript:toConfDevPos('${devType.id}');">i18n_dtil.text.toConfDevPos_n81i</a>
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="index" value="${index + 1}" />
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<tr>
|
||||
<td colspan="7" align="center" class="color_6">
|
||||
<div id="noresult">i18n_dtil.text.noRecord_n81i</div>
|
||||
</td>
|
||||
</tr>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</table>
|
||||
</div>
|
||||
<c:if test="${!empty devTypeListInfo}">
|
||||
<jsp:include page="/common/page.jsp" />
|
||||
</c:if>
|
||||
</form>
|
||||
</div>
|
||||
<div id="popDiv" class="mydiv" style="display:none;">
|
||||
<input type="hidden" />
|
||||
<input type="button" class=btn3_mouseout style="width:100px;"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:emportCurrentXls();" value="i18n_dtil.button.exportCurrentPage_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout style="width:80px"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:emportAllXls();" value="i18n_dtil.button.exportAllDate_n81i"/>
|
||||
<br/>
|
||||
<a href="javascript:closeDiv()">i18n_dtil.text.closeWindow_n81i</a></div>
|
||||
|
||||
<div id="bg" class="bg" style="display:none;"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
48
WebRoot/page/system/deviceManage/deviceTypeInfoListChild.jsp
Normal file
48
WebRoot/page/system/deviceManage/deviceTypeInfoListChild.jsp
Normal file
@@ -0,0 +1,48 @@
|
||||
<%@ page language="java" pageEncoding="utf-8"%>
|
||||
<%@include file="/common/taglib.jsp"%>
|
||||
<c:set var="index" value="${1}" />
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(devTypeListInfo) > 0}">
|
||||
<c:forEach items="${devTypeListInfo}" var="devType" varStatus="vs">
|
||||
<c:set var="color" value="color_1" />
|
||||
<c:set var="color_end" value="color_7" />
|
||||
<c:if test="${vs.count%2!=0 }">
|
||||
<c:set var="color" value="color_3" />
|
||||
<c:set var="color_end" value="color_6" />
|
||||
</c:if>
|
||||
<tr>
|
||||
<td class="${color }">
|
||||
<input type="checkbox" name="ids" id="ids" value="${devType.id}"
|
||||
<c:if test="${devType.hasInstance==1}">disabled="disabled"</c:if> />
|
||||
${index+(pageNo-1)*pageSize}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceTypeCode}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceRandCode}
|
||||
</td>
|
||||
<td class="${color }">
|
||||
${devType.deviceDesc}
|
||||
</td>
|
||||
<td class="${color}">
|
||||
${devType.parDevCode}
|
||||
</td>
|
||||
<td class="${color}">
|
||||
<fmt:formatDate value="${devType.addTime}" type="both" />
|
||||
</td>
|
||||
<td class="${color_end}">
|
||||
<a href="javascript:detailDev('${devType.id}');">i18n_dtilc.text.detailDev_n81i</a>
|
||||
<c:if test="${devType.pid==0 && devType.isPositionDev!=1}">
|
||||
<a href="javascript:toAddPosDevType('${devType.id}');">i18n_dtilc.text.toAddPosDevType_n81i</a>
|
||||
</c:if>
|
||||
<c:if test="${devType.figureFill !=null && devType.isLeaf==0 && devType.isPositionDev!=1}">
|
||||
<a href="javascript:toConfDevPos('${devType.id}');">i18n_dtilc.text.toConfDevPos_n81i</a>
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="index" value="${index + 1}" />
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
|
||||
143
WebRoot/page/system/deviceManage/selectBanKa.jsp
Normal file
143
WebRoot/page/system/deviceManage/selectBanKa.jsp
Normal file
@@ -0,0 +1,143 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%@ taglib uri="/jstl/fmt" prefix="fmt"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<link href="<c:url value='/css/nms.css'/>" type="text/css"
|
||||
rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
td {
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
window.onload=function(){
|
||||
window.dialogHeight = (parseInt(window.dialogHeight) + (document.body.scrollHeight - document.body.clientHeight)) + "px";
|
||||
};
|
||||
$(function(){
|
||||
var parentWindow=window.dialogArguments.document;
|
||||
var bankaVal = $(parentWindow.getElementById("bankaVal")).val();//获取从父窗口的值
|
||||
var arr = bankaVal.split("\,");
|
||||
for(var i=0;i<arr.length;i++){
|
||||
$("input[type=checkbox]").each(function(index,item){
|
||||
if($(item).val()==arr[i]){
|
||||
$(item).attr("checked","true");
|
||||
}
|
||||
});
|
||||
}
|
||||
$("tr").each(function(index,item){
|
||||
if($(item).attr("class")!=""){
|
||||
if(($(item).children().length)==1){
|
||||
$(item).append("<td></td>");
|
||||
}
|
||||
if(index%2==0){
|
||||
$(item).children().attr("class","color_1");
|
||||
}else{
|
||||
$(item).children().attr("class","color_3");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function selectBanKa(){
|
||||
var checkboxObj = $("input[type=checkbox][name=banka]:checked");
|
||||
var arr = new Array();
|
||||
checkboxObj.each(function(index,item){
|
||||
arr.push($(item).val());
|
||||
});
|
||||
var resu = $(window.parent.document).find("#I3").contents();
|
||||
resu.find("#temp").val(arr);
|
||||
layclose();
|
||||
}
|
||||
|
||||
function selectAll(obj){
|
||||
if($(obj).attr("id")=="selectAll"){
|
||||
if(obj.checked){
|
||||
$("input[type=checkbox][name=banka]").attr("checked","checked");
|
||||
}else{
|
||||
$("input[type=checkbox][name=banka]").removeAttr("checked");
|
||||
}
|
||||
}else{
|
||||
if(obj.checked){
|
||||
if($("input[type=checkbox][name=banka]").not("input:checked").length==0){
|
||||
$("#selectAll").attr("checked","checked");
|
||||
}
|
||||
}else{
|
||||
$("#selectAll").removeAttr("checked");
|
||||
}
|
||||
}
|
||||
}
|
||||
function layclose() {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td class="color_8" colspan="2" >
|
||||
<div style="margin-left: 100px;float: left"><input type="checkbox" id="selectAll" onclick="selectAll(this)"> i18n_sbk.text.selectAll_n81i</div> <div style="margin-right: 13%">i18n_sbk.text.selectBK_n81i</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="height: 350px" valign="top" bgcolor="#D9D8D8">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table"
|
||||
style="">
|
||||
<c:forEach items="${deviceBrandTypeList}" var="device"
|
||||
varStatus="status">
|
||||
<c:set var="index" value="${status.index+1}" />
|
||||
<c:set var="length" value="${fn:length(deviceBrandTypeList)}" />
|
||||
<c:if test="${index==1}">
|
||||
<tr class="${index}" style="height: 20px">
|
||||
</c:if>
|
||||
<td style="padding-left: 100px;" align="left">
|
||||
<input type="checkbox" name="banka"
|
||||
value="${device.subDeviceTypeCode}" onclick="selectAll(this)"/>
|
||||
${device.subDeviceTypeCode}
|
||||
</td>
|
||||
<c:if test="${index%2==0&&index<length}">
|
||||
</tr>
|
||||
<tr class="${index}" style="height: 20px">
|
||||
</c:if>
|
||||
<c:if test="${index==length}"></tr></c:if>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right" class="td_1">
|
||||
<div style="margin-right: 30px">
|
||||
<input type="button" class=btn3_mouseout id="sub"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="selectBanKa()"
|
||||
value="i18n_sbk.button.submit_n81i" />
|
||||
|
||||
<input type="button" class=btn3_mouseout
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="layclose();"
|
||||
value="i18n_sbk.button.close_n81i" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
143
WebRoot/page/system/deviceManage/updateDevBrandInfo.jsp
Normal file
143
WebRoot/page/system/deviceManage/updateDevBrandInfo.jsp
Normal file
@@ -0,0 +1,143 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_udbi.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//判断品牌编号是否重复
|
||||
function hasDevBrandCode(){
|
||||
var hasDevCode = false;
|
||||
$.ajaxSettings.async = false;//设置同步
|
||||
//先判断任务编号是否存在,不存在不查询
|
||||
var deviceBrandCode = jQuery.trim(jQuery("#deviceRandCode").val());
|
||||
if(deviceBrandCode!='') {
|
||||
$.getJSON("<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevBrand&devRandCodeForSearch="+deviceBrandCode,
|
||||
{}, function(data){
|
||||
if(data!=null&&data!=""&&data.result=='success') {//设备型号已存在
|
||||
var tip = data.tip;
|
||||
$("#deviceRandCode").next().html(tip);
|
||||
hasDevCode = true;
|
||||
return true;
|
||||
}else {
|
||||
$("#deviceRandCode").next().html(tip);
|
||||
hasDevCode = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return hasDevCode;
|
||||
}
|
||||
|
||||
|
||||
function update(){
|
||||
if($id("deviceRandCode","","i18n_udbi.text.deviceRandCode_n81i")&& !hasDevBrandCode()){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=updateDevBrand";
|
||||
document.Brandform.submit();
|
||||
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceBrandInfo";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_udbi.button.back_n81i"/>
|
||||
</div>
|
||||
<form action="" name="Brandform" method="post">
|
||||
<input type="hidden" name="devBrand.id" id="brandId" value="${devBrand.id}" />
|
||||
<input type="hidden" name="brandNameForSearch" id="brandNameForSearch" value="${brandNameForSearch}" />
|
||||
<jsp:include page="/common/transferHiddenParameter.jsp" />
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_udbi.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udbi.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devBrand.deviceRandCode" id="deviceRandCode" size="30" value="${devBrand.deviceRandCode}" />
|
||||
<font id = "deviceRandCode" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udbi.text.deviceRandName_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<input type="text" name="devBrand.deviceRandName" id="deviceRandName" value="${devBrand.deviceRandName}" size="30"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_udbi.text.deviceBrandDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" colspan="1">
|
||||
<textarea type="text" name="devBrand.deviceBrandDesc" id="deviceBrandDesc" rows="3" cols="50">${devBrand.deviceBrandDesc}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="update()"
|
||||
value="i18n_udbi.button.update_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_udbi.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
438
WebRoot/page/system/deviceManage/updateDevTypeInfo.jsp
Normal file
438
WebRoot/page/system/deviceManage/updateDevTypeInfo.jsp
Normal file
@@ -0,0 +1,438 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/jstl/c" prefix="c"%>
|
||||
<%@ taglib uri="/jstl/fn" prefix="fn"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>i18n_udti.message.title_n81i</title>
|
||||
<link href="<c:url value='/css/nms.css'/>" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<link href="<c:url value='/js//dtree/css/dtree.css'/>"
|
||||
rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/onmouse.js'/>"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/dtree/js/dtree_checkbox.js'/>"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value='/js/jquery.tools.js'/>"></script>
|
||||
<script type="text/javascript"
|
||||
src="<c:url value='/js/WebCalendar.js' />"></script>
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="<c:url value="/js/fileInput.js"/>"></script>
|
||||
</head>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
function trim(id) {
|
||||
jQuery("#"+id).val(jQuery.trim(jQuery("#"+id).val()));
|
||||
}
|
||||
|
||||
function update(){
|
||||
//去空格
|
||||
trim("deviceTypeCode");//设备型号
|
||||
trim("maxDeviceNum");//最大叠加数
|
||||
trim("showIndex");//编号
|
||||
trim("nameFormat");//名称格式
|
||||
trim("statusValue");//异常比较值
|
||||
|
||||
if($id("deviceRandCode","xz","i18n_udti.text.deviceRandCode_n81i")&& $id("deviceTypeCode","","i18n_udti.text.deviceTypeCode_n81i") && hasDevTypeCode()){
|
||||
|
||||
//如果最大叠加数非空,则判断是否为数字
|
||||
var maxDeviceNum=jQuery.trim(document.getElementById('maxDeviceNum').value);
|
||||
if(maxDeviceNum!=''&& maxDeviceNum.replace(/[\d+]/ig,"").length>0){
|
||||
$("#maxDeviceNum").next().html('i18n_udti.message.maxDeviceNum_n81i');
|
||||
return;
|
||||
}else {
|
||||
$("#maxDeviceNum").next().html('');
|
||||
}
|
||||
|
||||
var parCode = jQuery("select[id='pid'] option:selected").val();
|
||||
if(isNotBlank(parCode)){
|
||||
var name=document.getElementById('showIndex').value;
|
||||
if(name=='' ){
|
||||
$("#showIndex").next().html('i18n_udti.message.showIndex1_n81i');
|
||||
return;
|
||||
}else if(name.replace(/[\d+]/ig,"").length>0){
|
||||
$("#showIndex").next().html('i18n_udti.message.showIndex2_n81i');
|
||||
return;
|
||||
}else {
|
||||
$("#showIndex").next().html('*');
|
||||
}
|
||||
}
|
||||
|
||||
var myfileVal = document.getElementById("figureFill").value;
|
||||
if(myfileVal!="") {//修改图片后,进行替换
|
||||
var allowExt = ".png , .bmp , .jpg , .gif";
|
||||
var fileExt = myfileVal.substr(myfileVal.lastIndexOf(".")).toLowerCase();
|
||||
if(allowExt.indexOf(fileExt)==-1){
|
||||
$("#figureFill").next().html('i18n_udti.message.figureFill_n81i:'+allowExt);
|
||||
return;
|
||||
}else {
|
||||
//$("#figureFill").next().html('*');
|
||||
}
|
||||
}
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage!executeAction.do?action=updateDevType";
|
||||
document.Brandform.submit();
|
||||
|
||||
jQuery("#addButton").attr("disabled","true");
|
||||
jQuery("#resetButton").attr("disabled","true");
|
||||
jQuery("#backButton").attr("disabled","true");
|
||||
}
|
||||
}
|
||||
function hasDevTypeCode(){
|
||||
var type;
|
||||
$.ajax({
|
||||
url:"<%=path%>/sysManage/deviceBrandManage!execute.do?action=hasDevTypeForUpdate",
|
||||
type : "POST",
|
||||
async:false,
|
||||
data:$('#Mkform').serialize(),
|
||||
success : function(data) {
|
||||
if(data == "error"){
|
||||
//alert("记录已存在,请重新输入!");
|
||||
$("#deviceTypeCode").next().html("i18n_udti.message.deviceTypeCode_n81i");
|
||||
type = false;
|
||||
}else if(data == "exception"){
|
||||
alert("i18n_udti.message.faild_n81i");
|
||||
type = false;
|
||||
}else if(data =="success"){
|
||||
type = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
return type;
|
||||
}
|
||||
|
||||
function goBack(){
|
||||
document.Brandform.action="<%=path%>/sysManage/deviceBrandManage.do?action=queryDeviceTypeInfo&pageSize="+'${pageSize }'+"&pageNo="+'${pageNo }';
|
||||
document.Brandform.submit();
|
||||
}
|
||||
//检查是否包含特殊字符
|
||||
function containSpecial(s)
|
||||
{
|
||||
var cs = /^\w+$/;
|
||||
resu = cs.test(s);
|
||||
return (cs.test(s));
|
||||
}
|
||||
|
||||
function chShowIndex() {
|
||||
var pid = $("select[id='pid'] option:selected").val();
|
||||
$("#showIndex").val('');
|
||||
if(pid!='' && pid!=null && pid!='undefined') {
|
||||
$("#devShowIndex").show();
|
||||
}else {
|
||||
$("#devShowIndex").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function isNotBlank(obj) {
|
||||
if(obj!="" && obj!=null && obj!='undefined') {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function changeShowHide() {
|
||||
jQuery("select[id='indexFiled']").empty();
|
||||
jQuery("select[id='statusFiled']").empty();
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='diTableName'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='statusFiled']").append('<option value="" >i18n_udti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='statusFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("select[id='indexFiled']").append('<option value="" >i18n_udti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${fieldList}" var="field" >
|
||||
if('${field[0]}'==selecVal) {
|
||||
var htmlStr = '<option value="${field[1]}" >${field[1]}</option>';
|
||||
jQuery("select[id='indexFiled']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
//jQuery("#tableStatusValue").show();
|
||||
//jQuery("#tableSymbols").show();
|
||||
jQuery("#tableStatusField").show();
|
||||
jQuery("#tableLinkField").show();
|
||||
}else {
|
||||
//jQuery("#tableStatusValue").hide();
|
||||
//jQuery("#tableSymbols").hide();
|
||||
jQuery("#tableStatusField").hide();
|
||||
jQuery("#tableLinkField").hide();
|
||||
}
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
|
||||
}
|
||||
function changeparCode() {
|
||||
jQuery("select[id='pid']").empty();//清空父设备型号列表
|
||||
var selecVal = jQuery("select[id='deviceRandCode'] option:selected").val(); //所选品牌
|
||||
//品牌改变时,编号清空,隐藏
|
||||
$("#showIndex").val('');
|
||||
$("#devShowIndex").hide();
|
||||
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("select[id='pid']").append('<option value="" >i18n_udti.message.selectDefault_n81i</option>');
|
||||
<c:forEach items="${devTypeListInfo}" var="type" >
|
||||
if('${type.deviceRandCode}'==selecVal) {
|
||||
var htmlStr = '<option value="${type.id}" >${type.deviceTypeCode}</option>';
|
||||
jQuery("select[id='pid']").append(htmlStr);
|
||||
}
|
||||
</c:forEach>
|
||||
|
||||
jQuery("#parDevCode").show();
|
||||
}else {
|
||||
jQuery("#parDevCode").hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function changeStatus() {
|
||||
jQuery("#statusValue").val('');
|
||||
jQuery("select[id='statusSymbols']").val('');
|
||||
var selecVal = jQuery("select[id='statusFiled'] option:selected").val();
|
||||
if(isNotBlank(selecVal)) {
|
||||
jQuery("#tableStatusValue").show();
|
||||
jQuery("#tableSymbols").show();
|
||||
}else {
|
||||
jQuery("#tableStatusValue").hide();
|
||||
jQuery("#tableSymbols").hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function downLoadDevPic(fileName) {
|
||||
document.Brandform.action="<%=basePath%>/download/downLoadFile!downloadDevPic.do?file="+fileName+"&backPathStr=<%=basePath%>/sysManage/deviceBrandManage.do?action=toUpdateDevType%26ids=${devType.id}";
|
||||
document.Brandform.submit();
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div class="middle_list" >
|
||||
<div class="box_2">
|
||||
<input type="button" class=btn3_mouseout id="backButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="goBack()" value="i18n_udti.button.back_n81i"/>
|
||||
</div>
|
||||
<form action="" name="Brandform" method="post" enctype="multipart/form-data" id="Mkform">
|
||||
<input type="hidden" name="devTypeCodeForSearch" id="devTypeCodeForSearch" value="${devTypeCodeForSearch}" />
|
||||
<input type="hidden" name="devRandCodeForSearch" id="devRandCodeForSearch" value="${devRandCodeForSearch}" />
|
||||
<input type="hidden" name="parDevId" id="parDevId" value="${parDevId}" />
|
||||
<input type="hidden" name="devType.id" value="${devType.id}" />
|
||||
<input type="hidden" name="devType.figureFill" value="${devType.figureFill}" />
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<td colspan="2" class="color_8">
|
||||
<strong>i18n_udti.text.title_n81i</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.deviceRandCode_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="deviceRandCode" name="devType.deviceRandCode" style="width: 170px;" onchange="changeparCode();">
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${devBrandListInfo}" var="brand" >
|
||||
<option value="${brand.deviceRandCode}"
|
||||
<c:if test="${brand.deviceRandCode==devType.deviceRandCode}">selected="selected"</c:if> >
|
||||
${brand.deviceRandCode}
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<font id = "deviceRandCodeTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.deviceTypeCode_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.deviceTypeCode" id="deviceTypeCode" value="${devType.deviceTypeCode}" />
|
||||
<font id = "deviceTypeCodeTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.maxDeviceNum_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.maxDeviceNum" id="maxDeviceNum" value="${devType.maxDeviceNum}" />
|
||||
<font id = "maxDeviceNumTip" color="red"></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="parDevCode" <c:if test="${devType.deviceRandCode==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.pid_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left">
|
||||
<select id="pid" name="devType.pid" onchange="javascript:chShowIndex();" >
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${devTypeListInfo}" var="type" ><!-- 共选择的只有当前品牌的型号 -->
|
||||
<c:if test="${type.deviceRandCode==devType.deviceRandCode}">
|
||||
<option value="${type.id}"
|
||||
<c:if test="${type.id==devType.pid}">selected="selected"</c:if> >
|
||||
${type.deviceTypeCode}
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="devShowIndex" <c:if test="${devType.pid==0}">style="display: none;"</c:if>>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.showIndex_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.showIndex" id="showIndex" value="${devType.showIndex}" />
|
||||
<font id = "showIndexTip" color="red">*</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.figureFill_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="button" value="i18n_udti.text.figureFill_n81i" title="i18n_udti.text.figureFill_n81i" class="btn3_mouseout" onclick="javascript:uploadFile(this)"/>
|
||||
<input type="file" name="figureFill" id="figureFill" value="${devType.figureFill}" onchange="javascript:setValue(this.value)"/>
|
||||
<a href="javascript:downLoadDevPic('/images/svg/upload/${devType.figureFill}');">${devType.figureFill}</a>
|
||||
<!-- <font id = "figureFillTip" color="red">*</font> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.nameFormat_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.nameFormat" id="nameFormat" value="${devType.nameFormat}" />(i18n_udti.text.nameFormatInfo_n81i)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.diTableName_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="diTableName" name="devType.diTableName" onchange="changeShowHide();">
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${metadataList}" var="meta" >
|
||||
<option value="${meta}"
|
||||
<c:if test="${meta==devType.diTableName}">selected="selected"</c:if>>
|
||||
${meta}
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableLinkField" <c:if test="${devType.diTableName==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.indexFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="indexFiled" name="devType.indexFiled" >
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${fieldList}" var="field" ><!-- 共选择的只有当前品牌的型号 -->
|
||||
<c:if test="${field[0]==devType.diTableName}">
|
||||
<option value="${field[1]}"
|
||||
<c:if test="${field[1]==devType.indexFiled}">selected="selected"</c:if> >
|
||||
${field[1]}
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusField" <c:if test="${devType.diTableName==null}">style="display: none;"</c:if>>
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.statusFiled_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusFiled" name="devType.statusFiled" onchange="changeStatus();">
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<c:forEach items="${fieldList}" var="field" ><!-- 共选择的只有当前品牌的型号 -->
|
||||
<c:if test="${field[0]==devType.diTableName}">
|
||||
<option value="${field[1]}"
|
||||
<c:if test="${field[1]==devType.statusFiled}">selected="selected"</c:if> >
|
||||
${field[1]}
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableSymbols" <c:if test="${devType.statusFiled==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.tableStatusValue_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<select id="statusSymbols" name="devType.statusSymbols" >
|
||||
<option value="" >i18n_udti.message.selectDefault_n81i</option>
|
||||
<option value=">" <c:if test="${devType.statusSymbols=='>'}">selected="selected"</c:if> >></option>
|
||||
<option value="=" <c:if test="${devType.statusSymbols=='='}">selected="selected"</c:if> >=</option>
|
||||
<option value="<" <c:if test="${devType.statusSymbols=='<'}">selected="selected"</c:if> ><</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tableStatusValue" <c:if test="${devType.statusFiled==null}">style="display: none;"</c:if> >
|
||||
<td class="color_1" width="15%" align="right" nowrap="nowrap">
|
||||
i18n_udti.text.statusValue_n81i
|
||||
</td>
|
||||
<td class="color_3" width="30%" align="left" >
|
||||
<input type="text" name="devType.statusValue" id="statusValue" value="${devType.statusValue}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_1" align="right" valign="top" nowrap="nowrap">
|
||||
i18n_udti.text.deviceDesc_n81i
|
||||
</td>
|
||||
<td class="color_3" align="left" >
|
||||
<textarea type="text" name="devType.deviceDesc" id="deviceDesc" rows="3" cols="50">${devType.deviceDesc}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color_7" colspan="2" align="right">
|
||||
<input type="button" class=btn3_mouseout id="addButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'" onclick="update()"
|
||||
value="i18n_udti.button.update_n81i"/>
|
||||
|
||||
<input type="button" class=btn3_mouseout id="resetButton"
|
||||
onmouseover="this.className='btn3_mouseover'"
|
||||
onmouseout="this.className='btn3_mouseout'"
|
||||
onmousedown="this.className='btn3_mousedown'"
|
||||
onmouseup="this.className='btn3_mouseup'"
|
||||
onclick="javascript:document.forms['Brandform'].reset()"
|
||||
value="i18n_udti.button.reset_n81i"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user