diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml
index 7a2ee884..4fd8807b 100644
--- a/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml
+++ b/modules/core/src/main/resources/templates/modules/gen/crud/viewList.xml
@@ -33,113 +33,6 @@
\<% } %>
-]]>
+<% include('/templates/modules/gen/include/dataGridScript.html'){} %>]]>
\ No newline at end of file
diff --git a/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html b/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html
new file mode 100644
index 00000000..aead9aac
--- /dev/null
+++ b/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html
@@ -0,0 +1,114 @@
+
\ No newline at end of file
diff --git a/modules/core/src/main/resources/templates/modules/gen/include/formChildTable.html b/modules/core/src/main/resources/templates/modules/gen/include/formChildTable.html
index c6c9e30a..876c2dc4 100644
--- a/modules/core/src/main/resources/templates/modules/gen/include/formChildTable.html
+++ b/modules/core/src/main/resources/templates/modules/gen/include/formChildTable.html
@@ -5,9 +5,11 @@
+ <% if(table.tplCategory != 'query'){ %>
\<% if (hasPermi('${permissionPrefix}:edit')){ %>
\${text('增行')}
\<% } %>
+ <% } %>
<%
}
diff --git a/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html b/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html
index 7ec6a5db..58524b0c 100644
--- a/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html
+++ b/modules/core/src/main/resources/templates/modules/gen/include/formChildTableScript.html
@@ -73,7 +73,7 @@ for (c in child.columnList){
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d${isTime?' H:i:s':''}'},
editable:true, edittype:'text', editoptions:{'class':'form-control Wdate${cssClass}', 'readonly':'true',
dataInit: function(element){ $(element).on('focus', function(){
- WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:false});
+ WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:${c.isRequired != '1'}});
});
}}
},
@@ -133,6 +133,7 @@ for (c in child.columnList){
<%
}
}
+if (table.tplCategory != 'query'){
%>
{header:'\${text('操作')}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
@@ -143,6 +144,9 @@ for (c in child.columnList){
}
return actions.join('');
}, editoptions: {defaultValue: 'new'}}
+<% }else{ %>
+ {header:'\${text('操作')}', name:'actions', hidden: true}
+<% } %>
],
// 编辑表格参数
diff --git a/modules/core/src/main/resources/templates/modules/gen/include/formControl.html b/modules/core/src/main/resources/templates/modules/gen/include/formControl.html
index 84be69e3..6afbe842 100644
--- a/modules/core/src/main/resources/templates/modules/gen/include/formControl.html
+++ b/modules/core/src/main/resources/templates/modules/gen/include/formControl.html
@@ -131,7 +131,7 @@
var isTime = (c.showType == 'datetime');
%>
<${'#'}form:input path="${c.attrName}" readonly="true" maxlength="20" class="form-control Wdate${cssClass}"
- dataFormat="date${isTime?'time':''}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:false});"/>
+ dataFormat="date${isTime?'time':''}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:${c.isRequired != '1'}});"/>
<%
} else if (c.showType == 'userselect') {
%>
diff --git a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml
index 1d1010c0..3e760bd0 100644
--- a/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml
+++ b/modules/core/src/main/resources/templates/modules/gen/query/viewList.xml
@@ -30,97 +30,6 @@
\<% } %>
-]]>
+<% include('/templates/modules/gen/include/dataGridScript.html'){} %>]]>
\ No newline at end of file