- 数据管理
+ 编辑表格多行编辑
查询
@@ -111,7 +111,7 @@
#form:form>
- <#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
+ <#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal table-form">
- 数据管理
+ 多表头分组小计合计
查询
diff --git a/web/src/main/resources/views/modules/demo/demoFormEditForm.html b/web/src/main/resources/views/modules/demo/demoFormEditForm.html
index 925cd634..1c7ca916 100644
--- a/web/src/main/resources/views/modules/demo/demoFormEditForm.html
+++ b/web/src/main/resources/views/modules/demo/demoFormEditForm.html
@@ -1,9 +1,9 @@
-<% layout('/layouts/default.html', {title: '数据管理', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
+<% layout('/layouts/default.html', {title: '组件应用实例', libs: ['validate','fileupload','ueditor','dataGrid','inputmask']}){ %>
+
+
-
- ${testData.isNewRecord ? '新增数据' : '编辑数据'}
+ 组件应用实例
@@ -96,6 +96,36 @@
+
+
+
+
+
+
+
+
+
+ <#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
+ data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
+ (千分位,右对齐,保留2位小数)
+
+
+
+
+
+
+
+
+
+ <#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
+ data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
+ (正则表达式)
+
+
@@ -147,7 +177,19 @@
+
+
-
+
+
+
+
+ <#form:treeselect id="testAreaCode" title="区域选择"
+ path="testAreaCode" labelPath="testAreaName"
+ url="${ctx}/sys/area/treeData?parentCode=0"
+ class="" allowClear="true" returnFullName="true"/>
+
+
-
-
-
-
- <#form:treeselect id="testAreaCode" title="区域选择"
- path="testAreaCode" labelPath="testAreaName"
- url="${ctx}/sys/area/treeData?parentCode=0"
- class="" allowClear="true"/>
-
-
+ 城市选择(联动):
@@ -205,36 +235,6 @@
-
-
-
-
-
-
-
-
-
- <#form:input path="testInput_money" maxlength="200" class="form-control inputmask"
- data-inputmask-alias="money" data-inputmask="'digits':'2'"/>
- (千分位,右对齐,保留2位小数)
-
-
-
-
-
-
-
-
-
- <#form:input path="testInput_regex" maxlength="200" class="form-control inputmask"
- data-inputmask-regex="[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}"/>
- (正则表达式)
-
-
@@ -285,7 +285,7 @@
测试数据子表
-
+
<% if (hasPermi('test:testData:edit')){ %>
增行
@@ -447,7 +447,7 @@ $("#testDataChildDataGrid").dataGrid({
// 编辑表格参数
editGrid: true, // 是否是编辑表格
- editGridInitRowNum: 1, // 编辑表格的初始化新增行数
+ editGridInitRowNum: 3, // 编辑表格的初始化新增行数
editGridAddRowBtn: $('#testDataChildDataGridAddRowBtn'), // 子表增行按钮
editGridAddRowInitData: {id: '', status: Global.STATUS_NORMAL}, // 新增行的时候初始化的数据
diff --git a/web/src/main/resources/views/modules/demo/demoFormLayoutForm.html b/web/src/main/resources/views/modules/demo/demoFormLayoutForm.html
index 3eeb7b38..8b88f28d 100644
--- a/web/src/main/resources/views/modules/demo/demoFormLayoutForm.html
+++ b/web/src/main/resources/views/modules/demo/demoFormLayoutForm.html
@@ -1,9 +1,9 @@
-<% layout('/layouts/default.html', {title: '数据管理', libs: ['validate','fileupload','ueditor','dataGrid']}){ %>
+<% layout('/layouts/default.html', {title: '栅格布局实例', libs: ['validate','fileupload','ueditor','dataGrid']}){ %>
- ${testData.isNewRecord ? '新增数据' : '编辑数据'}
+ 栅格布局实例
diff --git a/web/src/main/resources/views/modules/demo/demoFormTableForm.html b/web/src/main/resources/views/modules/demo/demoFormTableForm.html
index 309060fa..c5e00206 100644
--- a/web/src/main/resources/views/modules/demo/demoFormTableForm.html
+++ b/web/src/main/resources/views/modules/demo/demoFormTableForm.html
@@ -1,220 +1,146 @@
<% layout('/layouts/default.html', {title: '数据管理', libs: ['validate','fileupload','ueditor','dataGrid']}){ %>
-
+
<#form:form id="inputForm" model="${testData}" action="${ctx}/test/testData/save" method="post" class="form-horizontal">
-
- ${testData.isNewRecord ? '新增数据' : '编辑数据'}
+ 表格表单实例
-
基本信息
- <#form:hidden path="id"/>
-
-
-
-
-
-
-
-
- <#form:input path="testInput" maxlength="200" class="form-control"/>
-
-
-
-
-
-
-
-
-
- <#form:textarea path="testTextarea" rows="4" maxlength="200" class="form-control"/>
-
-
-
-
-
-
-
-
-
- <#form:select path="testSelect" dictType="sys_menu_type" blankOption="true" class="form-control" />
-
-
-
-
-
-
-
- <#form:select path="testSelectMultiple" dictType="sys_menu_type" multiple="true" blankOption="true" class="form-control" />
-
-
-
-
-
-
-
-
-
- <#form:radio path="testRadio" dictType="sys_menu_type" class="form-control" />
-
-
-
-
-
-
-
- <#form:checkbox path="testCheckbox" dictType="sys_menu_type" class="form-control" />
-
-
-
-
-
-
-
-
-
- <#form:input path="testDate" readonly="true" maxlength="20" class="form-control laydate "
- dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
-
-
-
-
-
-
-
- <#form:input path="testDatetime" readonly="true" maxlength="20" class="form-control laydate "
- dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
-
-
-
-
-
-
-
-
-
- <#form:treeselect id="testUser" title="用户选择"
- path="testUser.userCode" labelPath="testUser.userName"
- url="${ctx}/sys/office/treeData?isLoadUser=true"
- class="" allowClear="true"/>
-
-
-
-
-
-
-
- <#form:treeselect id="testUser2" title="用户选择"
- path="testUser.userCode" labelPath="testUser.userName"
- url="${ctx}/sys/office/treeData?isLoadUser=true"
- class="" allowClear="true" checkbox="true"/>
-
-
-
-
-
-
@@ -231,10 +157,8 @@ $("#testDataChildDataGrid").dataGrid({
columnModel: [
{header:'状态', name:'status', editable:true, hidden:true},
{header:'主键', name:'id', editable:true, hidden:true},
- {header:'排序号', name:'testSort', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'11', 'class':'form-control digits'}},
- {header:'父表主键', name:'testData.id', editable:true, hidden:true},
- {header:'单行文本', name:'testInput', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
- {header:'多行文本', name:'testTextarea', width:150, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
+ {header:'单行文本', name:'testInput', width:100, editable:true, edittype:'text', editoptions:{'maxlength':'200', 'class':'form-control'}},
+ {header:'多行文本', name:'testTextarea', width:100, editable:true, edittype:'textarea', editoptions:{'maxlength':'200', 'class':'form-control', 'rows':'1'}},
{header:'下拉框', name:'testSelect', width:100,
editable:true, edittype:'select', editoptions:{'class':'form-control',
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
@@ -243,31 +167,7 @@ $("#testDataChildDataGrid").dataGrid({
}
}
},
- {header:'下拉多选', name:'testSelectMultiple', width:100,
- editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
- items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
- itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
- $(element).select2().on("change",function(){$(this).resetValid()});
- }
- }
- },
- {header:'单选框', name:'testRadio', width:100,
- editable:true, edittype:'select', editoptions:{'class':'form-control',
- items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
- itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
- $(element).select2().on("change",function(){$(this).resetValid()});
- }
- }
- },
- {header:'复选框', name:'testCheckbox', width:100,
- editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
- items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
- itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
- $(element).select2().on("change",function(){$(this).resetValid()});
- }
- }
- },
- {header:'日期选择', name:'testDate', width:150,
+ {header:'日期选择', name:'testDate', width:100,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d'},
editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
dataInit: function(element){
@@ -275,15 +175,7 @@ $("#testDataChildDataGrid").dataGrid({
}
}
},
- {header:'日期时间', name:'testDatetime', width:150,
- formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},
- editable:true, edittype:'text', editoptions:{'class':'form-control laydate ', 'readonly':'true',
- dataInit: function(element){
- laydate.render({elem:element, type:'datetime', format:'yyyy-MM-dd HH:mm'});
- }
- }
- },
- {header:'用户选择', name:'testUser', width:150,
+ {header:'用户选择', name:'testUser', width:100,
formatter: function(val, obj, row, act){
return js.val(row, 'testUser.userCode')+'|'+js.val(row, 'testUser.userName');
}, editable: true, edittype: "custom", editoptions: {
@@ -297,34 +189,6 @@ $("#testDataChildDataGrid").dataGrid({
}
}
},
- {header:'机构选择', name:'testOffice', width:150,
- formatter: function(val, obj, row, act){
- return js.val(row, 'testOffice.officeCode')+'|'+js.val(row, 'testOffice.officeName');
- }, editable: true, edittype: "custom", editoptions: {
- custom_element: function(val, editOptions) {
- return js.template('treeselectTpl', {
- id: 'office_'+editOptions.id, title: '机构选择',
- name: 'testOffice.officeCode', value: val.split('|')[0],
- labelName: 'testOffice.officeName', labelValue: val.split('|')[1],
- url: '${ctx}/sys/office/treeData?officeTypes=1,2', cssClass: ''
- });
- }
- }
- },
- {header:'区域选择', name:'testAreaCode', width:150,
- formatter: function(val, obj, row, act){
- return js.val(row, 'testAreaCode')+'|'+js.val(row, 'testAreaName');
- }, editable: true, edittype: "custom", editoptions: {
- custom_element: function(val, editOptions) {
- return js.template('treeselectTpl', {
- id: 'area_'+editOptions.id, title: '区域选择',
- name: 'testAreaCode', value: val.split('|')[0],
- labelName: 'testAreaName', labelValue: val.split('|')[1],
- url: '${ctx}/sys/area/treeData', cssClass: ''
- });
- }
- }
- },
{header:'操作', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
if (val == 'new'){
@@ -340,6 +204,7 @@ $("#testDataChildDataGrid").dataGrid({
editGrid: true, // 是否是编辑表格
editGridInitRowNum: 1, // 编辑表格的初始化新增行数
editGridAddRowBtn: $('#testDataChildDataGridAddRowBtn'), // 子表增行按钮
+ editGridAddRowBtnToHeader: true, // 子表增行按钮是否显示到表头上 v4.1.7
editGridAddRowInitData: {id: '', status: Global.STATUS_NORMAL}, // 新增行的时候初始化的数据
// 编辑表格的提交数据参数
diff --git a/web/src/main/resources/views/modules/test/testDataForm.html b/web/src/main/resources/views/modules/test/testDataForm.html
index d51e3987..30e478c6 100644
--- a/web/src/main/resources/views/modules/test/testDataForm.html
+++ b/web/src/main/resources/views/modules/test/testDataForm.html
@@ -171,7 +171,7 @@
- <#form:treeselect id="testOffice" title="机构选择"
+
+
+
+
+
+
+
#form:form>
产品信息情况
+| 基本信息 | |||||||||||||||||
| * 负责人 | ++ <#form:input path="testInput" maxlength="200" class="form-control required" defaultValue="小王"/> + | +所属部门 | +
+ <#form:treeselect id="testOffice" title="机构选择"
path="testOffice.officeCode" labelPath="testOffice.officeName"
- url="${ctx}/sys/office/treeData"
- class="" allowClear="true"/>
-
-
-
-
-
-
-
-
-
-
- <#form:treeselect id="testAreaCode" title="区域选择"
- path="testAreaCode" labelPath="testAreaName"
- url="${ctx}/sys/area/treeData"
- class="" allowClear="true"/>
-
-
-
-
-
-
-
-
-
- <#form:ueditor path="remarks" maxlength="10000" height="200" class=""
- simpleToolbars="true" readonly="false" outline="false"/>
-
-
-
-
-
-
+ url="${ctx}/sys/office/treeData" defaultLabel="技术部"
+ class="required" allowClear="true"/>
+ |
+
+
-
-
-
-
-
-
-
-
-
-
-
- <#form:fileupload id="uploadImage2" returnPath="true"
- filePathInputId="uploadImage2Path" fileNameInputId="uploadImage2Name"
- uploadType="image" readonly="false" preview="true" maxUploadNum="3" isMini="false"/>
- <#form:input name="uploadImage2Path" class="form-control"/>
- <#form:input name="uploadImage2Name" class="form-control"/>
-
-
-
-
-
-
- <#form:fileupload id="uploadFile" bizKey="${testData.id}" bizType="testData_file"
+ |
+ |||||||||||||
| 单行文本 | ++ <#form:input path="testInput" maxlength="200" class="form-control" defaultValue="演示文本"/> + | +单行文本 | ++ <#form:input path="testInput" maxlength="200" class="form-control" defaultValue="演示文本"/> + | +||||||||||||||
| 下拉框 | ++ <#form:select path="testSelect" dictType="sys_menu_type" blankOption="true" class="form-control" defaultValue="1"/> + | +下拉多选 | ++ <#form:select path="testSelectMultiple" dictType="sys_menu_type" multiple="true" blankOption="true" class="form-control" defaultValue="2"/> + | +||||||||||||||
| 单选框 | ++ <#form:radio path="testRadio" dictType="sys_menu_type" class="form-control" defaultValue="1"/> + | +复选框 | ++ <#form:checkbox path="testCheckbox" dictType="sys_menu_type" class="form-control" defaultValue="1"/> + | +||||||||||||||
| 日期选择 | ++ <#form:input path="testDate" readonly="true" maxlength="20" class="form-control laydate " + dataFormat="date" data-type="date" data-format="yyyy-MM-dd" defaultValue="${date()}"/> + | +日期时间 | ++ <#form:input path="testDatetime" readonly="true" maxlength="20" class="form-control laydate " + dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm" defaultValue="${date()}"/> + | +||||||||||||||
| 团队人数 | +共 人。其中技术人员 + 人。 + | +||||||||||||||||
| 办公面积 | +M² | +服务户数 | +家 | +||||||||||||||
| 详细信息 | |||||||||||||||||
+
|
+ |||||||||||||||||
| 内容简介 | ++ + | +||||||||||||||||
| 子表数据 | +
+ |
+ ||||||||||||||||
| 附件 | |||
+ <#form:fileupload id="uploadFile" bizKey="${testData.id}" bizType="testData_file"
uploadType="all" class="" readonly="false" preview="true"/>
-
-
-
-
- 测试数据子表-
-
-
- |
+
+
+
+
${text('子表数据')}
-
+
<% if (hasPermi('test:testData:edit')){ %>
${text('增行')}