2017-02-22
来源:互联网 发布:新淘宝试用中心在哪里 编辑:程序博客网 时间:2024/06/06 00:23
一、实现色系管理模糊查询
1.color.html
<div class="page-container">
<div class="cl pd-5 bg-1 bk-gray"> <span class="l"><a href="javascript:;" onclick="_add()" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 添加色系管理</a></span> <span class="r" style="line-height:31px;">共有数据:<strong>${totalrow}</strong> 条</span>
<span class="l ml-10" style="width: 170px">
<input type="text" class="input-text" placeholder="输入色系查询" value="${fcolor!}" id="fcolor" maxlength="20">
</span>
<input class="btn btn-primary ml-10" type="submit" value="查找" onclick="color_search()">
</div>
function color_search(){
fcolor = encodeURI($.trim($('#fcolor').val()));
if($.trim($('#fcolor').val())!=''){
var reg = /^[a-zA-Z0-9_\u0391-\uFFE5 ]{1,30}$/;
if(!reg.test($('#fcolor').val())){
layer.tips('不允许有特殊字符,最多20个字符', '#fcolor', {tips: [1, '#34495E']});return;
}
}
location.replace('/manage/iframe/product/color/1-' + fcolor );
}
2ManageProductCtrl.java
/*********************色系管理*********************/
//管理色系
public void color(){
Integer pageno = getParaToInt(0)==null?1:getParaToInt(0);
String fcolor = getPara(1);
try {
fcolor = URLDecoder.decode(fcolor==null?"":fcolor, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
Page<Record> page = MCDao.getColor(pageno, 16, fcolor);
setAttr("fcolor", fcolor);
setAttr("pageno", page.getPageNumber());
setAttr("totalpage", page.getTotalPage());
setAttr("totalrow", page.getTotalRow());
setAttr("colorlist", page.getList());
render("color.html");
}
3.MCDao.java
//获得色系列表
public static Page<Record> getColor(int pageno, int pagesize, String fcolor){
String sqlExceptSelect = " from f_color a where 1=1";
if(fcolor != ""){
sqlExceptSelect += " and a.name like '%"+ fcolor +"%'";
}
return Db.paginate(pageno, pagesize, "select id,name,jh", sqlExceptSelect);
}
二
- 2017-02-22
- CV 2017-02-22
- acm训练 2017 02 22
- 2017-02-22Hibernate(4)
- Java编程题练习2017-02-22
- 【软件期刊01】2017-02-22
- 王老思J十万个问答-2017-02-22
- 【共鸣】技术人员的发展之路 2017-02-22 陈皓
- 2017年7月27日22:02:18
- 第888期机器学习日报(2017-02-22)
- 02/22
- CVPR 2017-02-02
- 微服务架构类型的未来到底是什么?(2017-02-22 Daniel Bryant)
- 2017-02-22-jquery-选择器带特殊字符出错-需要转义
- https://streamhpc.com/blog/2017-02-22/nvidia-enables-opencl-2-0-beta-support/
- 02/11/22(夜)
- worklog 2010-02-22
- 2010-02-22
- python deamon example
- 【技术】C#入门:StreamReader类以及其方法ReadLine,Read,ReadToEnd的分析
- matlab 高阶(三)—— 插值(fft、)
- Enable Enterprise Geodatabase工具的使用
- shiro权限控制的应用
- 2017-02-22
- 安卓通知栏自定义布局提示(NotificationCompat.Builder)
- 【hdoj_2391】FilthyRich
- (转)Glide图片加载库介绍
- SQL SERVER 存储过程和自定义函数
- Race Condition(竞争条件)
- PAT乙级1041 考试座位号
- GDB+Gdbserver ARM远程调试
- CS0618号警告是什么