新增功能及名称控制

This commit is contained in:
yan.y
2025-09-18 15:01:34 +08:00
parent ef74154136
commit 4bc9778d38
23 changed files with 1134 additions and 69 deletions
@@ -119,12 +119,12 @@
<input type="hidden" name="hardwareTypes" id="hardwareTypes"/>
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control" required/>
</div>
</div>
<%-- <div class="form-group">--%>
<%-- <label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>--%>
<%-- <div class="col-xs-7">--%>
<%-- <input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control" required/>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit" id="submitBtn"><i class="icon-ok bigger-110"></i>提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -0,0 +1,127 @@
<%@page import="com.ifish.enums.SysUserEnum"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<title>新增鱼缸厂配置</title>
<!-- css and js -->
<%@ include file="../htm/script.jsp" %>
<script type="text/javascript">
$(function(){
//取消
$("#cancelBtn").click(function(){
location.href="<%=basePath%>page/admin/factoryList1.do";
});
$(".venderListCheckbox").change(function(){
var checkboxs = $(".venderListCheckbox");
var brandCodes = new Array();
for (var i = 0; i < checkboxs.length; i++) {
if(checkboxs[i].checked){
brandCodes.push($(checkboxs[i]).val());
}
}
$("#brandCodes").val(brandCodes);
});
$(".hardwareTypeCheckbox").change(function(){
var checkboxs = $(".hardwareTypeCheckbox");
var hardwareTypes = new Array();
for (var i = 0; i < checkboxs.length; i++) {
if(checkboxs[i].checked){
hardwareTypes.push($(checkboxs[i]).val());
}
}
$("#hardwareTypes").val(hardwareTypes);
});
});
</script>
</head>
<body>
<!-- 头部 -->
<%@ include file="../htm/header.jsp" %>
<!-- 主体 -->
<div class="main-container" id="main-container">
<div class="main-container-inner">
<!-- 侧边栏 -->
<%@ include file="../htm/sidebar.jsp" %>
<!-- 主体内容 -->
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<script type="text/javascript">
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
</script>
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="<%=basePath%>page/public/index.do">首页</a>
</li>
<li>
<a href="<%=basePath%>page/admin/venderList.do">鱼缸厂列表</a>
</li>
</ul>
</div>
<div class="page-content">
<c:set var="failed101" value="<%=SysUserEnum.failed101.getKey()%>"></c:set>
<c:set var="warn106" value="<%=SysUserEnum.warn106.getKey()%>"></c:set>
<c:set var="warn107" value="<%=SysUserEnum.warn107.getKey()%>"></c:set>
<c:if test="${status == warn106}">
<div class="alert alert-block alert-warning">
<i class="icon-ok green"><%=SysUserEnum.warn106.getValue()%></i>
</div>
</c:if>
<c:if test="${status == warn107}">
<div class="alert alert-block alert-warning">
<i class="icon-ok green"><%=SysUserEnum.warn107.getValue()%></i>
</div>
</c:if>
<c:if test="${status == failed101}">
<div class="alert alert-block alert-danger">
<i class="icon-remove red">保存<%=SysUserEnum.failed101.getValue()%></i>
</div>
</c:if>
<h4 class="header smaller lighter blue"></h4>
<div class="row">
<div class="col-xs-12">
<form id="form-add" method="post" class="form-horizontal" action="<%=basePath%>page/admin/saveFactory1.do" enctype="multipart/form-data">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">鱼缸厂<span style="color:red;">*</span></label>
<div class="col-sm-9">
<c:forEach items="${venderList }" var="vender">
<label><input type="radio" name="brandCodes" class="venderListCheckbox" value="${vender.brandCode }"/>${vender.brandName }</label>&nbsp;&nbsp;&nbsp;&nbsp;
</c:forEach>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">硬件类型<span style="color:red;">*</span></label>
<div class="col-sm-9">
<c:forEach items="${hardwareType }" var="hardware">
<label><input type="radio" name="hardwareTypes" class="hardwareTypeCheckbox" value="${hardware.hardwareType }"/>${hardware.hardwareName }</label>&nbsp;&nbsp;&nbsp;&nbsp;
</c:forEach>
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control" required/>
</div>
</div>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit" id="submitBtn"><i class="icon-ok bigger-110"></i>提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
<button class="btn" type="button" id="cancelBtn"><i class="icon-undo bigger-110"></i>取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 设置工具 -->
<%@ include file="../htm/setting.jsp" %>
</div>
</div>
</body>
</html>
@@ -169,6 +169,15 @@
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="hidden" name="background" id="background" value="${venderList.background}"/>
<img id="backgroud" src="<%=picturePath%>Img/goods/${venderList.background}"/>
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">联系电话</label>
<div class="col-sm-4">
@@ -122,14 +122,13 @@
<input type="hidden" name="hardwareTypes" id="hardwareTypes"/>
</div>
</div>
<div class="form-group">
<%--<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="hidden" name="background" id="background" value="${factoryList.background}"/>
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control"/>
</div>
</div>
</div>--%>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit" id="submitBtn"><i class="icon-ok bigger-110"></i>提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -0,0 +1,135 @@
<%@page import="com.ifish.enums.SysUserEnum"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<title>编辑鱼缸厂配置</title>
<!-- css and js -->
<%@ include file="../htm/script.jsp" %>
<script type="text/javascript">
$(function(){
//取消
$("#cancelBtn").click(function(){
location.href="<%=basePath%>page/admin/factoryList1.do";
});
//提交
$(".venderListCheckbox").change(function(){
var checkboxs = $(".venderListCheckbox");
var brandCodes = new Array();
for (var i = 0; i < checkboxs.length; i++) {
if(checkboxs[i].checked){
brandCodes.push($(checkboxs[i]).val());
}
}
$("#brandCodes").val(brandCodes);
});
$(".hardwareTypeCheckbox").change(function(){
var checkboxs = $(".hardwareTypeCheckbox");
var hardwareTypes = new Array();
for (var i = 0; i < checkboxs.length; i++) {
if(checkboxs[i].checked){
hardwareTypes.push($(checkboxs[i]).val());
}
}
$("#hardwareTypes").val(hardwareTypes);
});
$(".venderListCheckbox").change();
$(".hardwareTypeCheckbox").change();
});
</script>
</head>
<body>
<!-- 头部 -->
<%@ include file="../htm/header.jsp" %>
<!-- 主体 -->
<div class="main-container" id="main-container">
<div class="main-container-inner">
<!-- 侧边栏 -->
<%@ include file="../htm/sidebar.jsp" %>
<!-- 主体内容 -->
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<script type="text/javascript">
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
</script>
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="<%=basePath%>page/public/index.do">首页</a>
</li>
<li>
<a href="<%=basePath%>page/admin/venderList.do">电子厂列表</a>
</li>
<li class="active">电子厂维护</li>
</ul>
</div>
<div class="page-content">
<c:set var="failed101" value="<%=SysUserEnum.failed101.getKey()%>"></c:set>
<c:set var="warn106" value="<%=SysUserEnum.warn106.getKey()%>"></c:set>
<c:set var="warn107" value="<%=SysUserEnum.warn107.getKey()%>"></c:set>
<c:if test="${status == warn106}">
<div class="alert alert-block alert-warning">
<i class="icon-ok green"><%=SysUserEnum.warn106.getValue()%></i>
</div>
</c:if>
<c:if test="${status == warn107}">
<div class="alert alert-block alert-warning">
<i class="icon-ok green"><%=SysUserEnum.warn107.getValue()%></i>
</div>
</c:if>
<c:if test="${status == failed101}">
<div class="alert alert-block alert-danger">
<i class="icon-remove red">保存<%=SysUserEnum.failed101.getValue()%></i>
</div>
</c:if>
<h4 class="header smaller lighter blue"></h4>
<div class="row">
<div class="col-xs-12">
<form id="form-add" method="post" class="form-horizontal" action="<%=basePath%>page/admin/updateFactory1.do" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="${hardwareVender.id}"/>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">鱼缸厂<span style="color:red;">*</span></label>
<div class="col-sm-9">
<c:forEach items="${brandCodeMap }" var="checkNames">
<label><input type="radio" name="brandCodes" class="venderListCheckbox" value="${checkNames.value.showValue }" ${checkNames.value.checked==true?"checked":""}/>${checkNames.value.showName }</label>&nbsp;&nbsp;&nbsp;&nbsp;
</c:forEach>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">硬件类型<span style="color:red;">*</span></label>
<div class="col-sm-9">
<c:forEach items="${hardwareTypeMap }" var="checkNames">
<label><input type="radio" name="hardwareTypes" class="hardwareTypeCheckbox" value="${checkNames.value.showValue }" ${checkNames.value.checked==true?"checked":""}/>${checkNames.value.showName }</label>&nbsp;&nbsp;&nbsp;&nbsp;
</c:forEach>
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="hidden" name="background" id="background" value="${hardwareVender.background}"/>
<img id="avatar" src="<%=picturePath%>Img/goods/${hardwareVender.background}"/>
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control"/>
</div>
</div>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit" id="submitBtn"><i class="icon-ok bigger-110"></i>提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
<button class="btn" type="button" id="cancelBtn"><i class="icon-undo bigger-110"></i>取消</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 设置工具 -->
<%@ include file="../htm/setting.jsp" %>
</div>
</div>
</body>
</html>
@@ -11,7 +11,7 @@
$(function(){
//取消
$("#cancelBtn").click(function(){
location.href="<%=basePath%>page/admin/hardwareTypeList.do";
location.href="<%=basePath%>page/admin/factoryList1.do";
});
});
</script>
@@ -58,21 +58,31 @@
<div class="col-sm-4">
<input type="text" name="hardwareType" id="hardwareType" value="${hardwareTypeAttr.hardwareType }" ${hardwareTypeAttr.hardwareType!=null?'readonly="readonly"':'' } class="form-control" maxlength="10"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关1<span style="color:red;">*</span></label>
</div><div class="form-group">
<label class="col-sm-3 control-label no-padding-right">鱼缸厂编号<span style="color:red;">*</span></label>
<div class="col-sm-4">
<input type="text" name="switchS1" id="switchS1" value="${hardwareTypeAttr.switchS1 }" class="form-control" />
<input type="text" name="venderCode" id="venderCode" value="${hardwareTypeAttr.venderCode }" ${hardwareTypeAttr.venderCode!=null?'readonly="readonly"':'' } class="form-control" maxlength="10"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关2<span style="color:red;">*</span></label>
<div class="col-sm-4">
<input type="text" name="switchS2" id="switchS2" value="${hardwareTypeAttr.switchS2 }" class="form-control" />
<c:if test="${hardwareTypeAttrSwitch.switchS1 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关1<span style="color:red;">*</span></label>
<div class="col-sm-4">
<input type="text" name="switchS1" id="switchS1" value="${hardwareTypeAttr.switchS1 }" class="form-control" />
</div>
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS2 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关2<span style="color:red;">*</span></label>
<div class="col-sm-4">
<input type="text" name="switchS2" id="switchS2" value="${hardwareTypeAttr.switchS2 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS3 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关3<span style="color:red;">*</span></label>
@@ -80,6 +90,8 @@
<input type="text" name="switchS3" id="switchS3" value="${hardwareTypeAttr.switchS3 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS4 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关4<span style="color:red;">*</span></label>
@@ -87,6 +99,8 @@
<input type="text" name="switchS4" id="switchS4" value="${hardwareTypeAttr.switchS4 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS5 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关5<span style="color:red;">*</span></label>
@@ -94,6 +108,8 @@
<input type="text" name="switchS5" id="switchS5" value="${hardwareTypeAttr.switchS5 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS6 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关6<span style="color:red;">*</span></label>
@@ -101,6 +117,8 @@
<input type="text" name="switchS6" id="switchS6" value="${hardwareTypeAttr.switchS6 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS7 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关7<span style="color:red;">*</span></label>
@@ -108,6 +126,8 @@
<input type="text" name="switchS7" id="switchS7" value="${hardwareTypeAttr.switchS7 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS8 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关8<span style="color:red;">*</span></label>
@@ -115,6 +135,8 @@
<input type="text" name="switchS8" id="switchS8" value="${hardwareTypeAttr.switchS8 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS9 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关9<span style="color:red;">*</span></label>
@@ -122,6 +144,8 @@
<input type="text" name="switchS9" id="switchS9" value="${hardwareTypeAttr.switchS9 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS10 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关10<span style="color:red;">*</span></label>
@@ -129,6 +153,8 @@
<input type="text" name="switchS10" id="switchS10" value="${hardwareTypeAttr.switchS10 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS11 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关11<span style="color:red;">*</span></label>
@@ -136,6 +162,8 @@
<input type="text" name="switchS11" id="switchS11" value="${hardwareTypeAttr.switchS11 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS12 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关12<span style="color:red;">*</span></label>
@@ -143,94 +171,127 @@
<input type="text" name="switchS12" id="switchS12" value="${hardwareTypeAttr.switchS12 }" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS1 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关1图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar1" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS1Ico1}"/><br/>
<input type="file" name="fileUpload1" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS2 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关2图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar2" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS2Ico2}"/><br/>
<input type="file" name="fileUpload2" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS3 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关3图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar3" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS3Ico3}"/><br/>
<input type="file" name="fileUpload3" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS4 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关4图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar4" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS4Ico4}"/><br/>
<input type="file" name="fileUpload4" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS5 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关5图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar5" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS5Ico5}"/><br/>
<input type="file" name="fileUpload5" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS6 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关6图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar6" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS6Ico6}"/><br/>
<input type="file" name="fileUpload6" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS7 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关7图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar7" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS7Ico7}"/><br/>
<input type="file" name="fileUpload7" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS8 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关8图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar8" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS8Ico8}"/><br/>
<input type="file" name="fileUpload8" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS9 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关9图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar9" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS9Ico9}"/><br/>
<input type="file" name="fileUpload9" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS10 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关10图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar10" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS10Ico10}"/><br/>
<input type="file" name="fileUpload10" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS11 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关11图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar11" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS11Ico11}"/><br/>
<input type="file" name="fileUpload11" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<c:if test="${hardwareTypeAttrSwitch.switchS12 == 1}">
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">开关12图标<span style="color:red;">*</span></label>
<div class="col-sm-4">
<img id="avatar12" src="<%=picturePath%>Img/goods/${hardwareTypeAttr.switchS12Ico12}"/><br/>
<input type="file" name="fileUpload12" accept="image/png,image/jpg,image/jpeg" class="form-control" />
</div>
</div>
</c:if>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit" id="submitBtn"><i class="icon-ok bigger-110"></i>提交</button>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -159,6 +159,15 @@
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-xs-3 control-label no-padding-right">背景图<span style="color:red;">*</span></label>
<div class="col-xs-7">
<input type="hidden" name="background" id="background" value="${venderList.background}"/>
<img id="backgroud" src="<%=picturePath%>Img/goods/${venderList.background}"/>
<input type="file" name="fileUpload" accept="image/png,image/jpg,image/jpeg" class="form-control"/>
</div>
</div>
<div class="space-4"></div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right">联系电话</label>
<div class="col-sm-4">
@@ -0,0 +1,139 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<title>鱼缸厂配置</title>
<!-- css and js -->
<%@ include file="../htm/script.jsp" %>
<script type="text/javascript">
$(function(){
//分页
var dataTable = $('#sample-table-2').dataTable({
"sPaginationType": "bootstrap",
//"bProcessing": true,
"bServerSide": true,//指定从服务器端获取数据
"sAjaxSource": "<%=basePath%>page/admin/factoryListInf1.do",
"fnServerData": function(sSource, aoData, fnCallback){
$.ajax({
"dataType": "json",
"type": "POST",
"url": sSource,
"data": aoData,
"cache": false,
"success": function(json){
fnCallback(json);
}
});
},
"aoColumns": [
{ "mData": "id","bSortable": false },
{ "mData": "venderCode","bSortable": false },
{ "mData": "venderName","bSortable": false },
{ "mData": "hardwareType","bSortable": false },
{ "mData": "hardwareName","bSortable": false },
{ "mData": "createTime","bSortable": false },
{ "mData": function(factory){
return '<a href="<%=basePath%>page/admin/doUpdateHardwareAttr.do?hardwareType='+factory.hardwareType+'&venderCode='+ factory.venderCode +'" title="设置名称" class="label label-primary"><span class="icon-edit align-top"></span></a>'
},
"bSortable": false,
"sClass":"center"
},
{ "mData": function(factory){
var detail = '<a href="<%=basePath%>page/admin/editFactory1.do?id='+factory.id+'" title="修改" class="label label-primary"><span class="icon-edit"></span></a> ';
var remove = '<a href="javascript:void(0);" onclick=deleteFactory("'+factory.id+'") title="删除" class="label label-danger"><span class="icon-trash"></span></a>';
return detail+remove;
},
"bSortable": false,
"sClass":"center"
}
],
"oLanguage": {
"sLengthMenu": "每页显示 _MENU_条",
"sZeroRecords": "没有找到符合条件的数据",
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
"sProcessing": "<img src='<%=basePath%>static/css/images/loading.gif'>",
"sInfoEmpty": "木有记录",
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
"sSearch": "搜索名称:",
"oPaginate": {
"sFirst": "首页",
"sPrevious": "前一页",
"sNext": "后一页",
"sLast": "尾页"
}
}
});
$("#sample-table-2_length").append('&nbsp;&nbsp;&nbsp;&nbsp;<label><a href="<%=basePath%>page/admin/addFactory1.do" class="btn btn-xs btn-primary"><i class="icon-edit"></i><span class="no-text-shadow">新增</span></a></label>');
$("table th input:checkbox").on("click" , function(){
var that = this;
$(this).closest('table').find('tr > td:first-child input:checkbox').each(function(){
this.checked = that.checked;
$(this).closest('tr').toggleClass('selected');
});
});
});
function deleteFactory(id){
var r = confirm("确定要删除吗?");
if (r == true) {
location.href="<%=basePath%>page/admin/deleteFactory1.do?id="+id;
}
}
</script>
</head>
<body>
<!-- 头部 -->
<%@ include file="../htm/header.jsp" %>
<!-- 主体 -->
<div class="main-container" id="main-container">
<div class="main-container-inner">
<!-- 侧边栏 -->
<%@ include file="../htm/sidebar.jsp" %>
<!-- 主体内容 -->
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<script type="text/javascript">
try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
</script>
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i>
<a href="<%=basePath%>page/public/index.do">首页</a>
</li>
<li class="active">鱼缸厂设备配置</li>
</ul>
</div>
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<div class="table-header"></div>
<div class="table-responsive">
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>编号</th>
<th>鱼缸厂编号</th>
<th>鱼缸厂名称</th>
<th>硬件类型编号</th>
<th>硬件类型名称</th>
<th>创建时间</th>
<th class="center">设置名称</th>
<th class="center">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- 设置工具 -->
<%@ include file="../htm/setting.jsp" %>
</div>
</div>
</body>
</html>
@@ -71,12 +71,6 @@
"bSortable": false,
"sClass":"center"
},
{ "mData": function(hardwareType){
return '<a href="<%=basePath%>page/admin/doUpdateHardwareAttr.do?hardwareType='+hardwareType.hardwareType+'" title="设置名称" class="label label-primary"><span class="icon-edit align-top"></span></a>'
},
"bSortable": false,
"sClass":"center"
},
{ "mData": function(hardwareType){
return '<a href="javascript:void(0);" onclick=deleteHardwareType("'+hardwareType.hardwareType+'") title="删除" class="label label-danger"><span class="icon-trash align-top"></span></a>';
},
@@ -160,7 +154,6 @@
<th>柜灯</th>
<th>图标</th>
<th class="center">修改</th>
<th class="center">设置名称</th>
<th class="center">删除</th>
</tr>
</thead>
@@ -5,6 +5,8 @@
<title>鱼缸厂列表</title>
<!-- css and js -->
<%@ include file="../htm/script.jsp" %>
<link href="<%=basePath%>static/css/datepicker.css" rel="stylesheet"/>
<script src="<%=basePath%>static/js/date-time/bootstrap-datepicker.min.js"></script>
<script type="text/javascript">
$(function(){
@@ -54,6 +56,11 @@
},
{ "mData": "contactPhone","bSortable": false },
{ "mData": "contactAddress","bSortable": false },
{ "mData": function (vender) {
return '<img src="<%=picturePath%>Img/goods/' + vender.background + '" width="50%"/>';
},
"bSortable": false
},
{ "mData": "createTime","bSortable": false },
{ "mData": function(vender){
return '<a href="<%=basePath%>page/admin/editVender.do?brandCode='+vender.brandCode+'" title="修改" class="label label-primary"><span class="icon-edit"></span></a>'
@@ -164,6 +171,7 @@
<th>APP展示</th>
<th>联系电话</th>
<th>联系地址</th>
<th>背景</th>
<th>创建时间</th>
<th class="center">修改</th>
<th class="center">删除</th>