x03570227 / one-day-project Goto Github PK
View Code? Open in Web Editor NEW花很少时间就能做的各类小功能,小网站,小应用
花很少时间就能做的各类小功能,小网站,小应用
由
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd"
变更为
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"
在1.3.x中实现
Invocation of destroy method 'close' failed on bean with name 'sqlSessionTemplate'
产品需要能够归入系列,系列指同一类产品,只是存在极小差异的产品
类目以下按照规则编码:
Main.sub1.sub2.sub3
大类关系到product.define的定义,用require引入
以基本信息+define的形式保存数据
net.caiban.pc.erp.config.AppConst.SESSION_KEY="pceventsession";
变更为:
net.caiban.pc.erp.config.AppConst.SESSION_KEY="sessionuserkey";
各级符号用.区分
main.sub1.sub2
整理行业类目,或按照需求整理
允许重置子账号密码
可以在顶部设置一个功能条
net.caiban.pc.erp.service.sys.SysUserService
public final static String CLASSIFY_A="A";
public final static String CLASSIFY_M="M";
public final static String CLASSIFY_E="E";
public final static int ACCEPT_TRUE=1;
public final static int DEFAULT_UID=0;
常量应放到 SysUser 中去
https://github.com/1000hz/bootstrap-validator
需要显式地调用一下 validator 方法
jQuery("#definition_form").validator();
需要显示信息的位置下添加DIV:
登录页面的说明
能够实现与第三方应用对应,一家C可以对接多个第三方应用,目前做口袋通的对接
/pom.xml
org.codehaus.jackson
1.9.13 vs 1.9.11
允许通过邮件或者手机找回密码,但是需要能够保存和认证邮件和手机
全局
Date.prototype.format = function(format){
var o = {
"M+" : this.getMonth()+1, //month
"d+" : this.getDate(), //day
"h+" : this.getHours(), //hour
"m+" : this.getMinutes(), //minute
"s+" : this.getSeconds(), //second
"q+" : Math.floor((this.getMonth()+3)/3), //quarter
"S" : this.getMilliseconds() //millisecond
}
if(/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
}
for(var k in o) {
if(new RegExp("("+ k +")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));
}
}
return format;
}
}
使用方法
console.log(new Date().format('yyyy-MM-dd hh:mm:ss'));
帐号暂不开放注册,只实现登录及相关核心业务功能,页面暂不做特别处理,优先满足手机浏览器
增加 clear filter 搜索(按钮或图标或连接)
在properties中设置相应的值
规则:
方案1:
方案2:
更新方案1:
在ERP底部(仅登录页和首页即可)
/**
Product 模块相关的操作
*/
define( ["jquery","template","utils/table/pager"],
function( jQuery, template, pg){
var table={};
table["init"] = function(config){
config = config||{};
this.config=config;
if(this.config.pager==null){
this.config.pager={};
}
};
table["search"] = function(searchCond){
searchCond=searchCond||{};
this.searchCond=searchCond;
jQuery.post(this.config.url, this.buildSubmit(searchCond), this.buildHtml, "json");
};
table["buildSubmit"]=function(searchCond){
var pager = this.config.pager;
if(typeof searchCond == "string"){
jQuery.each(pager,function(k, v){
searchCond = searchCond+"&"+k+"="+encodeURIComponent(v);
});
return searchCond;
}
jQuery.each(pager,function(k, v){
searchCond[k]=encodeURIComponent(v);
});
return searchCond;
};
table["buildHtml"]=function(p){
p = table.preBuildTable(p);
// p= table.preBuildTable(p);
var tableHtml = template(table.config.tpl.table, p);
var pagerBar = pg.pageBar(p);
jQuery("#"+table.config.renderTo).empty();
jQuery("#"+table.config.renderTo).html(tableHtml);
jQuery("#"+table.config.renderTo).append(pagerBar);
//绑定分页导航事件
pg.doPage(table.config.renderTo, function(item){
var start = item.attr("page-start");
start = start||0;
table.setStart(start);
table.search(table.searchCond);
});
table.afterBuildTable();
};
//需要按照实情情况重新实现
table["preBuildTable"] = function(p){
// pre build html
return p;
};
table["afterBuildTable"] = function(){
// jQuery("#"+table.config.renderTo+" .act-delete").click(function(){
// var pid= jQuery(this).attr("model-product-id");
//
// table.remove(pid, jQuery(this));
//
// });
};
table["setOrder"]=function(sort, desc){
var pager = this.config.pager||{};
pager["sort"]=sort;
pager["desc"]=desc;
this.config.pager = pager;
};
table["setStart"]=function(start){
var pager = this.config.pager||{};
pager["start"]=start;
this.config.pager = pager;
};
table["setLimit"]=function(limit){
var pager = this.config.pager||{};
pager["limit"]=limit;
this.config.pager = pager;
};
return table;
}
);
如果用户未登录,直接跳转到登录页面
不同公司可以不一样,可以提供一套模板(可作为二次开发使用)
将中文冒号替换为E文冒号,仅登录时允许这么做
可能会有中文 /
将 Tomcat 插件变更为 tomcat7
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/task</path>
<!-- <protocol>org.apache.coyote.http11.Http11NioProtocol</protocol> -->
</configuration>
</plugin>
jQuery("#product_list").on("click", "data-act-delete", function(){
//TODO here is things you should do
});
针对口袋通实现订单处理功能
Condition 类
public enum Sort{
ID("1", "js.id"),
GMT_BASETIME("2", "js.gmt_basetime"),
GMT_TRIGGER("3", "js.gmt_trigger") ;
private String code;
private String column;
private Sort(String code, String column){
this.code = code;
this.column = column;
}
@Override
public String toString(){
return this.column;
}
}
public String getSort(String code){
if(Strings.isNullOrEmpty(code)){
return Sort.ID.toString();
}
for(Sort sort: Sort.values()){
if(code.equalsIgnoreCase(sort.code)){
return sort.toString();
}
}
return Sort.ID.toString();
}
xml 配置
<if test="page.sortColumn != null and page.sortColumn != '' ">
order by ${page.sortColumn} ${page.dir}
</if>
limit #{page.start}, #{page.limit}
Class Pager 修改
private String sortColumn;
public String getSortColumn() {
return sortColumn;
}
public void setSortColumn(String sortColumn) {
this.sortColumn = sortColumn;
}
private enum DIR{
DESC("desc"), ASC("asc");
private String dir;
private DIR(String dir){
this.dir = dir;
}
@Override
public String toString(){
return this.dir;
}
}
public String getDir() {
if(Strings.isNullOrEmpty(dir)){
return DIR.DESC.toString();
}
for(DIR d: DIR.values()){
if(dir.equalsIgnoreCase(d.dir)){
return dir;
}
}
return DIR.DESC.toString();
}
分页调用
page.setSortColumn(cond.getSort(page.getSort()));
从bower的jquery插件中获取
请贴部分的自定义属性没保存成功
现在出现换行情况
可变更当前登录用户的密码信息
搜索时重置到第一页
无法按照状态搜索产品信息
从列表中选择好产品,拷贝添加新的产品
实现:
现为SAILING,正确应为 SALING
允许记住一段时间,默认一周
可以通过 classify 实现
Classify = B
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.