提交 914e7c9c authored 作者: 林海冰's avatar 林海冰

init

上级 ae8de3f5
...@@ -28,7 +28,7 @@ public class StoreService implements StoreManager{ ...@@ -28,7 +28,7 @@ public class StoreService implements StoreManager{
* @throws Exception * @throws Exception
*/ */
public int save(PageData pd)throws Exception{ public int save(PageData pd)throws Exception{
return (int) dao.save("VehicleUserManager.save", pd); return (int) dao.save("StoreManager.save", pd);
} }
/**删除 /**删除
...@@ -36,7 +36,7 @@ public class StoreService implements StoreManager{ ...@@ -36,7 +36,7 @@ public class StoreService implements StoreManager{
* @throws Exception * @throws Exception
*/ */
public void delete(PageData pd)throws Exception{ public void delete(PageData pd)throws Exception{
dao.delete("VehicleUserManager.delete", pd); dao.delete("StoreManager.delete", pd);
} }
...@@ -45,7 +45,7 @@ public class StoreService implements StoreManager{ ...@@ -45,7 +45,7 @@ public class StoreService implements StoreManager{
* @throws Exception * @throws Exception
*/ */
public void edit(PageData pd)throws Exception{ public void edit(PageData pd)throws Exception{
dao.update("VehicleUserManager.edit", pd); dao.update("StoreManager.edit", pd);
} }
/**列表 /**列表
...@@ -54,7 +54,7 @@ public class StoreService implements StoreManager{ ...@@ -54,7 +54,7 @@ public class StoreService implements StoreManager{
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public List<PageData> list(Page page)throws Exception{ public List<PageData> list(Page page)throws Exception{
return (List<PageData>)dao.findForList("VehicleUserManager.datalistPage", page); return (List<PageData>)dao.findForList("StoreManager.datalistPage", page);
} }
/**列表(全部) /**列表(全部)
...@@ -63,7 +63,7 @@ public class StoreService implements StoreManager{ ...@@ -63,7 +63,7 @@ public class StoreService implements StoreManager{
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public List<PageData> listAll(PageData pd)throws Exception{ public List<PageData> listAll(PageData pd)throws Exception{
return (List<PageData>)dao.findForList("VehicleUserManager.listAll", pd); return (List<PageData>)dao.findForList("StoreManager.listAll", pd);
} }
/**通过id获取数据 /**通过id获取数据
...@@ -71,7 +71,7 @@ public class StoreService implements StoreManager{ ...@@ -71,7 +71,7 @@ public class StoreService implements StoreManager{
* @throws Exception * @throws Exception
*/ */
public PageData findById(PageData pd)throws Exception{ public PageData findById(PageData pd)throws Exception{
return (PageData)dao.findForObject("VehicleUserManager.findById", pd); return (PageData)dao.findForObject("StoreManager.findById", pd);
} }
/**批量删除 /**批量删除
...@@ -79,7 +79,7 @@ public class StoreService implements StoreManager{ ...@@ -79,7 +79,7 @@ public class StoreService implements StoreManager{
* @throws Exception * @throws Exception
*/ */
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
dao.delete("VehicleUserManager.deleteAll", ArrayDATA_IDS); dao.delete("StoreManager.deleteAll", ArrayDATA_IDS);
} }
/** /**
* 查询是否存在该手机该的数据 * 查询是否存在该手机该的数据
...@@ -88,7 +88,7 @@ public class StoreService implements StoreManager{ ...@@ -88,7 +88,7 @@ public class StoreService implements StoreManager{
*/ */
@Override @Override
public int findByPhone(PageData pd) throws Exception { public int findByPhone(PageData pd) throws Exception {
return (int) dao.findForObject("VehicleUserManager.findByPhone", pd); return (int) dao.findForObject("StoreManager.findByPhone", pd);
} }
} }
......
<<<<<<< HEAD
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
...@@ -264,271 +263,4 @@ ...@@ -264,271 +263,4 @@
//图js start //图js start
</script> </script>
</body> </body>
=======
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- 下拉框 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<!-- 日期框 -->
<%-- <link rel="stylesheet" href="${pageContext.request.contextPath}/static/ace/css/datepicker.css" /> --%>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/fun/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/ace/css/chosen.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/fun/css/base.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/fun/css/home.css">
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<%-- <script type="text/javascript" src="${pageContext.request.contextPath}/static/fun/js/jquery.min.js"></script> --%>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/fun/js/up.js"></script>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
<!-- /section:basics/sidebar -->
<div class="main-content">
<div class="main-content-inner">
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<section class="aui-content">
<div id="zhongxin" style="padding-top: 13px;">
<div style="height:20px;"></div>
<div class="aui-content-up">
<form action="${msg }.do" name="Form" id="Form" method="post" enctype="multipart/form-data" >
<!-- <div class="aui-content-up-form">
<h2>开户资质</h2>
</div> -->
<input type="hidden" name="banner_id" id="banner_id" value="${pd.banner_id}"/>
<input type="hidden" name="type" id="type" value="${pd.type }"/>
<div class="aui-form-group clear">
<label class="aui-label-control">
是否启用 <em>*</em>
</label>
<div class="aui-form-input">
<select class="chosen-select form-control" name="is_satart_up" id="is_satart_up" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
<option value="1" ${pd.is_satart_up==1?'selected':'' }>启用 </option>
<option value="0" ${pd.is_satart_up==0?'selected':'' } >禁用</option>
</select>
</div>
</div>
<div class="aui-form-group clear">
<label class="aui-label-control">
封面 <em>*</em>
<span>小于2M</span>
</label>
<div class="aui-form-input">
<div class="aui-content-img-box aui-content-full">
<div class="aui-photo aui-up-img clear">
<input type="hidden" value="${pd.icom}" id="icom" name="icom">
<img alt="" id="image111" src="${pd.icom}" style="width: 130px;height: 110px;">
<input id="file" type="file" name="file" onchange="uploadLogo();" style="position: absolute; filter: alpha(opacity = 0); opacity: 0; width: 30px;" accept="image/jpg,image/jpeg,image/png,image/bmp">
<a class="btn btn-mini" onclick="chooseImage()">请选择</a>(图片比例100:48)
<%-- <section class="aui-file-up fl">
<c:if test="${pd.ICOM !=null}">
<img src="${pd.ICOM}" class="add-img">
</c:if>
<input type="file" name="file" id="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
</section> --%>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="aui-btn-default">
<button class="aui-btn aui-btn-account" style="margin-left:30%" onclick="sumitForm()">上架</button>
<button class="aui-btn aui-btn-account" onclick="top.Dialog.close();">取消</button>
</div>
</section>
<!-- mask begin -->
<div class="aui-mask aui-works-mask" >
<div class="aui-mask-content">
<p class="aui-delete-text">确定要删除你上传的资料?</p>
<p class="aui-check-text">
<span class="aui-delete aui-accept-ok" onclick="sumintOk()" id="sumintOk">确定</span>
<span class="aui-accept-no">取消</span>
</p>
</div>
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.page-content -->
</div>
</div>
<!-- /.main-content -->
</div>
<!-- /.main-container -->
<%@ include file="../../system/index/foot.jsp"%>
<!-- 下拉框 -->
<script src="${pageContext.request.contextPath}/static/ace/js/chosen.jquery.js"></script>
<!-- 日期框 -->
<%-- <script src="${pageContext.request.contextPath}/static/ace/js/date-time/bootstrap-datepicker.js"></script>
--%> <script src="${pageContext.request.contextPath}/static/fun/bootstrap-datetimepicker.js"></script>
<script src="${pageContext.request.contextPath}/static/fun/bootstrap-datetimepicker.zh-CN.js"></script>
<!--提示框-->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.tips.js"></script>
<script type="text/javascript">
$(top.hangge());
$(function() {
$(".date-picker").datetimepicker({
language : "zh-CN",
format : 'yyyy-mm-dd hh:ii',
autoclose : true,
clearBtn : true
//添加清除按钮,可选值:true/false
});
//日期框
/* $('.date-picker').datepicker({
autoclose: true,
todayHighlight: true,
clearBtn:true
}); */
//下拉框
if (!ace.vars['touch']) {
$('.chosen-select').chosen({
allow_single_deselect : true
});
$(window).off('resize.chosen').on('resize.chosen',
function() {
$('.chosen-select').each(function() {
var $this = $(this);
$this.next().css({
'width' : $this.parent().width()
});
});
}).trigger('resize.chosen');
$(document).on('settings.ace.chosen',
function(e, event_name, event_val) {
if (event_name != 'sidebar_collapsed')
return;
$('.chosen-select').each(function() {
var $this = $(this);
$this.next().css({
'width' : $this.parent().width()
});
});
});
$('#chosen-multiple-style .btn').on(
'click',
function(e) {
var target = $(this).find('input[type=radio]');
var which = parseInt(target.val());
if (which == 2)
$('#form-field-select-4').addClass(
'tag-input-style');
else
$('#form-field-select-4').removeClass(
'tag-input-style');
});
}
//复选框全选控制
});
//保存
function sumitForm() {
if($("#file").val()=="" && "${pd.icom}"==""){
$("#file").tips({
side:3,
msg:"图标不能为空! ",
bg:'#AE81FF',
time:3
});
return false;
}
$("#Form").submit();
}
//图js start
function chooseImage() {
$("#file").click();
}
function uploadLogo() {
var file = document.getElementById("file").files[0];
if(!checkPic(file)){
return false;
}
/* var logo_url = uploadFile(file); */
var logo_url = getObjectURL(file);
$('#image111').attr('src',logo_url);
$('#icom').val(logo_url);
}
//建立一個可存取到該file的url
function getObjectURL(file) {
var url = null ;
if (window.createObjectURL!=undefined) { // basic
url = window.createObjectURL(file) ;
} else if (window.URL!=undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file) ;
} else if (window.webkitURL!=undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file) ;
}
return url ;
}
function checkPic(file){
var fileName = file.name.toLowerCase().split('.').splice(-1);
var fileSize = file.size;
if("png-jpg-gif-jpeg".indexOf(fileName)<0){
alert("只能上传png-jpg-gif-jpeg格式的图片");
return false;
}
if(fileSize>2*1024*1024){
alert("图片不能超过2M");
return false;
}
return true;
}
//图js start
</script>
</body>
>>>>>>> branch 'master' of http://code.diaosaas.com/linhaibing/tongmeng-app.git
</html> </html>
\ No newline at end of file
<<<<<<< HEAD
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
...@@ -160,167 +159,4 @@ ...@@ -160,167 +159,4 @@
}); });
</script> </script>
</body> </body>
=======
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- 下拉框 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<!-- 日期框 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/ace/css/datepicker.css" />
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
<!-- /section:basics/sidebar -->
<div class="main-content">
<div class="main-content-inner">
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<form action="${msg }.do" name="Form" id="Form" method="post" enctype="multipart/form-data">
<input type="hidden" name="CLASSIFY_ID" id="CLASSIFY_ID" value="${pd.CLASSIFY_ID}"/>
<div id="zhongxin" style="padding-top: 13px;">
<table id="table_report" class="table table-striped table-bordered table-hover">
<tr>
<td style="width:75px;text-align: right;padding-top: 13px;">名称:</td>
<td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="50" placeholder="这里输入名称" title="名称" style="width:98%;"/></td>
</tr>
<tr>
<td style="width:75px;text-align: right;padding-top: 13px;">二级类型:</td>
<td>
<select id="ONE_CLASSFY_TAG" name="ONE_CLASSFY_TAG" ${msg=='edit'?'disabled="disabled" style="background-color: #F5F5F5"':'' } >
<option value="1" ${pd.ONE_CLASSFY_TAG =='1'?'selected':''}>没有二级</option>
<option value="2" ${pd.ONE_CLASSFY_TAG =='2'?'selected':''}>车牌</option>
<option value="3" ${pd.ONE_CLASSFY_TAG =='3'?'selected':''}>二级分类</option>
</select>
</td>
</tr>
<tr>
<td style="width:75px;text-align: right;padding-top: 13px;">封图:</td>
<td>
<div class="aui-form-input">
<div class="aui-content-img-box aui-content-full">
<div class="aui-photo aui-up-img clear">
<input type="hidden" value="${pd.ICOM}" id="ICOM" name="ICOM">
<img alt="" id="add-img" src="${pd.ICOM}" style="width: 130px;height: 110px;">
<input id="file" type="file" name="file" style="position: absolute; filter: alpha(opacity = 0); opacity: 0; width: 30px;" accept="image/jpg,image/jpeg,image/png,image/bmp" />
<a class="btn btn-mini" onclick="chooseImage()">请选择</a><%--(图片比例100:48)--%>
<%-- <section class="aui-file-up fl">
<c:if test="${pd.ICOM !=null}">
<img src="${pd.icom}" class="add-img" id="icom">
</c:if>
<input type="file" name="file" id="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple/>
</section> --%>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td style="text-align: center;" colspan="10">
<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
</td>
</tr>
</table>
</div>
<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
</form>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.page-content -->
</div>
</div>
<!-- /.main-content -->
</div>
<!-- /.main-container -->
<!-- 页面底部js¨ -->
<%@ include file="../../system/index/foot.jsp"%>
<!-- 下拉框 -->
<script src="${pageContext.request.contextPath}/static/ace/js/chosen.jquery.js"></script>
<!-- 日期框 -->
<script src="${pageContext.request.contextPath}/static/ace/js/date-time/bootstrap-datepicker.js"></script>
<!--提示框-->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.tips.js"></script>
<script type="text/javascript">
$(top.hangge());
//保存
function save(){
if($("#NAME").val()==""){
$("#NAME").tips({
side:3,
msg:'请输入名称',
bg:'#AE81FF',
time:2
});
$("#NAME").focus();
return false;
}
if($("#ICOM").val()==""){
$("#ICOM").tips({
side:3,
msg:'请输入分类图标',
bg:'#AE81FF',
time:2
});
$("#ICOM").focus();
return false;
}
$("#Form").submit();
$("#zhongxin").hide();
$("#zhongxin2").show();
}
//图片预览
function chooseImage() {
$("#file").click();
}
$("#file").change(function(){
var objUrl = getObjectURL(this.files[0]) ;
console.log("objUrl = "+objUrl) ;
if (objUrl) {
$("#add-img").attr("src", objUrl) ;
$("#ICOM").val(objUrl);
}
});
//建立一個可存取到該file的url
function getObjectURL(file) {
var url = null ;
if (window.createObjectURL!=undefined) { // basic
url = window.createObjectURL(file) ;
} else if (window.URL!=undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file) ;
} else if (window.webkitURL!=undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file) ;
}
return url ;
}
$(function() {
//日期框
$('.date-picker').datepicker({autoclose: true,todayHighlight: true});
});
</script>
</body>
>>>>>>> branch 'master' of http://code.diaosaas.com/linhaibing/tongmeng-app.git
</html> </html>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论