Commit 69e86c97 by 罗绍泽

Merge remote-tracking branch 'origin/develop' into develop

parents afb3e5f1 ae06553e
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<classpathentry kind="src" path="src_utils"/> <classpathentry kind="src" path="src_utils"/>
<classpathentry kind="src" path="src_jwapp"/> <classpathentry kind="src" path="src_jwapp"/>
<classpathentry kind="src" path="src_standard"/> <classpathentry kind="src" path="src_standard"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/idk1.6"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/> <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/tomcat60"/>
<classpathentry kind="output" path="build/classes"/> <classpathentry kind="output" path="build/classes"/>
</classpath> </classpath>
(function($){
//定义公共的参数(变量,方法)
var defaults_options = {
tip:{
color:'#999',
fontFamily:'微软雅黑',
fontSize:'12px',
text:'请输入信息!'
}
}
//把默认的参数变成string型的,防止引用类型带来的问题
var defaults_options_str = JSON.stringify(defaults_options);
$.fn.inputTips = function(options){
//把参数转化为数json的
var defaults = JSON.parse(defaults_options_str);
//如果传进来是字符串时
if(typeof options == 'string'){
defaults.tip.text = options;
}
else{
//配置
if(options!=null){
$.each(options, function(i, val) {
if (typeof val == 'object' && defaults[i]){
$.extend(true,defaults[i], val);
}
else {
defaults[i] = val;
}
});
}
}
$(this).map(function(){
var $input = $(this);
//先判断下父容器是否是position:relative
if($input.parent().css('position')!='relative'){
$input.parent().css('position','relative');
}
//在input之后添加一个label标签
var $label;
if($input.next('label').length==0){
$label = $('<label></label>');
$label.css({
'position':'absolute',
'top':'0',
'left':$input.css('paddingLeft'),
'cursor':'text',
'color':defaults.tip.color,
'fontFamily':defaults.tip.fontFamily,
'fontSize':defaults.tip.fontSize,
'height':$input.outerHeight(true)+'px',
'lineHeight':$input.outerHeight(true)+'px',
'display':'inlineBlock'
});
}
else{
$label=$input.next('label');
}
//如果input给了value值时
if($input.val()){
$label.text($input.val());
$input.val('');
}
else{
$label.text(defaults.tip.text)
}
$input.after($label);
/*var timeid = setInterval(function(){
if(!$input.val()==""){
$input.siblings("label").hide();
clearInterval(timeid);
}
},10);*/
$input.siblings('label').click(function(){
$(this).siblings("input").focus();
});
$input.bind({
focus:function(){
//如果用户传进来的话就调用用户的
if(options!=null && typeof options.focus == 'function'){
options.focus(this);
return;
}
/*if (this.value == ""){
$(this).siblings("label").hide();
}*/
},
blur:function(){
//如果用户传进来的话就调用用户的
if(options!=null && typeof options.blur == 'function'){
options.blur(this);
return;
}
if (this.value == ""){
$(this).siblings("label").show();
}
},
input:function(){
//如果用户传进来的话就调用用户的
if(options!=null && typeof options.input == 'function'){
options.input(this);
return;
}
if (this.value == ""){
$(this).siblings("label").show();
}
else{
$(this).siblings("label").hide();
}
}
});
});
}//$.fn
})(jQuery);
\ No newline at end of file
...@@ -18,5 +18,6 @@ ...@@ -18,5 +18,6 @@
<div id="detail" style="overflow:auto;"></div> <div id="detail" style="overflow:auto;"></div>
<div id="templateIframe" style="overflow:auto;"></div> <div id="templateIframe" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/common/js/inputTips.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/process/pages/formtable/js/formtableModule.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/process/pages/formtable/js/formtableModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/process/pages/formtable/js/formtableTab.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/process/pages/formtable/js/formtableTab.js" charset="utf-8"></script>
$.extend($.fn.validatebox.defaults.rules, { $.extend($.fn.validatebox.defaults.rules, {
widthBigThanZero:{ widthBigThanZero:{
validator: function (value) { validator: function (value) {
console.log(value);
return value>0; return value>0;
}, },
message: '宽度必须大于0' message: '宽度必须大于0'
...@@ -18,6 +19,17 @@ $.extend($.fn.validatebox.defaults.rules, { ...@@ -18,6 +19,17 @@ $.extend($.fn.validatebox.defaults.rules, {
return patt.test(value);; return patt.test(value);;
}, },
message: '长度必须为正整数' message: '长度必须为正整数'
},
lengthByType :{
validator: function (value) {
console.log(value);
if(value>1&&value<4){
return true;
}else{
return false;
}
},
message: '长度必须在指定范围内'
} }
}); });
/** /**
...@@ -285,7 +297,9 @@ function initTableInsert(){ ...@@ -285,7 +297,9 @@ function initTableInsert(){
tr2=replaceByJson(tr2,fieldModel(i,field)); tr2=replaceByJson(tr2,fieldModel(i,field));
$(tr2).appendTo(fieldTable); $(tr2).appendTo(fieldTable);
initEasyUiControl(i); initEasyUiControl(i);
} }
//重置表的索引 //重置表的索引
resetFieldTableIndex(); resetFieldTableIndex();
//设置表的最大索引值(为了简单起见,第一次初始化为当前行数,以后每新增一行,该值+1) //设置表的最大索引值(为了简单起见,第一次初始化为当前行数,以后每新增一行,该值+1)
...@@ -322,7 +336,7 @@ function fieldModel(i,field){ ...@@ -322,7 +336,7 @@ function fieldModel(i,field){
field_name:'<input type="text" name="LIST['+i+'].NAME" value="'+field.FIELD_NAME+'" />', field_name:'<input type="text" name="LIST['+i+'].NAME" value="'+field.FIELD_NAME+'" />',
content:'<input type="text" name="LIST['+i+'].CONTENT" value="'+field.CONTENT+'" />', content:'<input type="text" name="LIST['+i+'].CONTENT" value="'+field.CONTENT+'" />',
type:'<input type="combobox" name="LIST['+i+'].TYPE" value="'+field.TYPE+'" />', type:'<input type="combobox" name="LIST['+i+'].TYPE" value="'+field.TYPE+'" />',
length:'<input type="text" name="LIST['+i+'].LENGTH" value="'+field.LENGTH+'" />', length:'<input placeholder="dfsd" type="text" name="LIST['+i+'].LENGTH" value="'+field.LENGTH+'" />',
point:'<input type="text" name="LIST['+i+'].POINT" value="'+field.POINT+'" />', point:'<input type="text" name="LIST['+i+'].POINT" value="'+field.POINT+'" />',
field_default:'<input type="text" name="LIST['+i+'].FIELD_DEFAULT" value="'+field.FIELD_DEFAULT+'" />', field_default:'<input type="text" name="LIST['+i+'].FIELD_DEFAULT" value="'+field.FIELD_DEFAULT+'" />',
field_width:'<input type="text" name="LIST['+i+'].FIELD_WIDTH" value="'+field.FIELD_WIDTH+'" />', field_width:'<input type="text" name="LIST['+i+'].FIELD_WIDTH" value="'+field.FIELD_WIDTH+'" />',
...@@ -344,7 +358,7 @@ function initEasyUiControl(i){ ...@@ -344,7 +358,7 @@ function initEasyUiControl(i){
required: true required: true
}); });
$('input[name="LIST['+i+'].LENGTH"]').textbox({ $('input[name="LIST['+i+'].LENGTH"]').textbox({
validType:'lengthPositive' //validType:'lengthPositive'
}); });
$('input[name="LIST['+i+'].POINT"]').textbox({ $('input[name="LIST['+i+'].POINT"]').textbox({
validType:'pointIsNatural' validType:'pointIsNatural'
...@@ -362,6 +376,11 @@ function initEasyUiControl(i){ ...@@ -362,6 +376,11 @@ function initEasyUiControl(i){
editable:false, editable:false,
panelHeight:'auto', panelHeight:'auto',
onSelect:function(record){ onSelect:function(record){
//$('input[name="LIST['+i+'].LENGTH"]').prev().attr("placeholder","1-4");
console.log($('input[name="LIST['+i+'].LENGTH"]').textbox());
$('input[name="LIST['+i+'].LENGTH"]').textbox({
validType:'lengthByType'
});
} }
}); });
} }
...@@ -601,6 +620,7 @@ function synchRow(index){ ...@@ -601,6 +620,7 @@ function synchRow(index){
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
if(is_row[0].IS_DBSYNCH=='1'){ if(is_row[0].IS_DBSYNCH=='1'){
$.messager.alert('警告',"该表已同步到数据库",'info'); $.messager.alert('警告',"该表已同步到数据库",'info');
return;
} }
$.ajax({ $.ajax({
url:'formtableAct_synchFormTable', url:'formtableAct_synchFormTable',
...@@ -609,10 +629,9 @@ function synchRow(index){ ...@@ -609,10 +629,9 @@ function synchRow(index){
tableName:is_row[0].TABLE_NAME tableName:is_row[0].TABLE_NAME
}, },
success:function(data){ success:function(data){
console.log(data); $('#list').datagrid('load',{});
} }
}); });
//formtableModule.act.updateFormTable(is_row[0]) //formtableModule.act.updateFormTable(is_row[0])
return;
} }
\ No newline at end of file
...@@ -76,7 +76,43 @@ function rowstyler(index,row){ ...@@ -76,7 +76,43 @@ function rowstyler(index,row){
} }
} }
//展示列表 //展示列表
datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/procdefinitionmodelsData_list", Object.assign({},$("#procdefinitionmodelsTab_searchForm").getFormVal(),queryData), is_column, 60, 80); //datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/procdefinitionmodelsData_list", Object.assign({},$("#procdefinitionmodelsTab_searchForm").getFormVal(),queryData), is_column, 60, 80);
$('#list').datagrid({
title:null,
iconCls:$.getJwWindowPic(),
url:gaowj.WEB_APP_NAME + "/procdefinitionmodelsData_list",
queryParams : Object.assign({},$("#procdefinitionmodelsTab_searchForm").getFormVal(),queryData),//查询参数
rownumbers : true,//显示索引号
singleSelect : true,//是否多选
fitColumns : false,//是否撑满
autoRowHeight : false,//设定高度
rowStyler :function(index,row){return rowstyler(index,row);},
pagination : true,//分页显示
pageSize : rows,//显示行数
pageList : listPageSize,//条数选择
striped : true, //是否隔行显示
remoteSort : false,//是否从服务器排序
frozenColumns : [[
{
field : 'ck',
checkbox : true
},
{
field : 'option',
title : '操作',
width : '80',
align : 'center',
formatter : formatMenu
}
]],
columns : is_column,
toolbar : '#tb',
onLoadSuccess : function() {
createOptionMenuTooltip(60);
dataOnLoadSuccess();
}
});
/****/ /****/
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<delete id="delete_form_field" parameterType="list"> <delete id="delete_form_field" parameterType="list">
<![CDATA[ <![CDATA[
delete from C_T_FORM_FIELD where UUID IN update C_T_FORM_FIELD set DELETE_FLAG=1 where UUID IN
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<delete id="delete_form_field_byTableid" parameterType="list"> <delete id="delete_form_field_byTableid" parameterType="list">
<![CDATA[ <![CDATA[
delete from C_T_FORM_FIELD where TABLE_ID IN update C_T_FORM_FIELD set DELETE_FLAG=1 where TABLE_ID IN
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<select id="list_form_field" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_form_field" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* select f.*
from C_T_FORM_FIELD f from C_T_FORM_FIELD f where DELETE_FLAG=0
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<delete id="delete_form_table" parameterType="list"> <delete id="delete_form_table" parameterType="list">
<![CDATA[ <![CDATA[
delete from C_T_FORM_TABLE where UUID IN update C_T_FORM_TABLE set DELETE_FLAG=1 where UUID IN
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<select id="list_form_table" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_form_table" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* select f.*
from C_T_FORM_TABLE f from C_T_FORM_TABLE f where DELETE_FLAG=0
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
...@@ -93,12 +93,11 @@ ...@@ -93,12 +93,11 @@
</when> </when>
</choose> </choose>
<if test="item.IS_NULL == 0"> <if test="item.IS_NULL == 0">
NOT NULL NOT NULL,
</if> </if>
<if test="item.IS_NULL == 1"> <if test="item.IS_NULL == 1">
DEFAULT NULL DEFAULT NULL,
</if> </if>
COMMENT '#{item.CONTENT}',
</foreach> </foreach>
</trim> </trim>
<![CDATA[ ) ]]> <![CDATA[ ) ]]>
......
...@@ -216,7 +216,6 @@ public class actAction extends BasicAction { ...@@ -216,7 +216,6 @@ public class actAction extends BasicAction {
public String synchFormTable()throws BusinessException{ public String synchFormTable()throws BusinessException{
//
FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class); FormfieldBusiness fieldBusiness=BusinessManager.getBusiness(FormfieldBusiness.class);
FormtableBusiness tableBusiness=BusinessManager.getBusiness(FormtableBusiness.class); FormtableBusiness tableBusiness=BusinessManager.getBusiness(FormtableBusiness.class);
...@@ -228,6 +227,11 @@ public class actAction extends BasicAction { ...@@ -228,6 +227,11 @@ public class actAction extends BasicAction {
create_param.put("tableName", table_name); create_param.put("tableName", table_name);
create_param.put("list", listField); create_param.put("list", listField);
tableBusiness.create_form_table(create_param); tableBusiness.create_form_table(create_param);
Map<String, Object> entity=new HashMap<String, Object>();
entity.put("UUID", table_id);
entity.put("IS_DBSYNCH", 1);
tableBusiness.update_form_table(entity);
return "json"; return "json";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment