+
@@ -125,7 +127,9 @@
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
- <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
+ <#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+ <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
+ <#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end']],
#if>
#if>
@@ -335,6 +339,14 @@
#if>
-
\ No newline at end of file
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
index 9d28ed629..1c65925df 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
@@ -119,6 +119,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -161,6 +164,10 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
component: 'JRangeNumber',
+<#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+<#elseif po.classType=='time'>
+ component: 'RangeTime',
+<#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
<#else>
component: 'Input', //TODO 范围查询
#if>
@@ -208,6 +215,9 @@ export const formSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -245,11 +255,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',//TODO 注意string转换问题
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -328,7 +344,7 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
@@ -488,6 +504,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -608,7 +627,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
index 69e4731e7..4974f34ab 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
@@ -1,6 +1,6 @@
<#include "/common/utils.ftl">
-
+
<#assign query_field_no=0>
<#assign need_category = false>
<#assign need_pca = false>
@@ -85,6 +85,7 @@
<#-- 结束循环 -->
+
@@ -139,7 +140,7 @@
-
+
<#assign sub_seq=1>
<#list subTables as sub>
forceRender#if>>
@@ -148,6 +149,7 @@
<#assign sub_seq=sub_seq+1>
#list>
+
<${entityName}Modal ref="registerModal" @success="handleSuccess" />
@@ -423,25 +425,19 @@
* @param value
*/
function handleFormJoinChange(key, value) {
- queryParam[key] = value.join(',');
+ if (typeof value != 'string') {
+ queryParam[key] = value.join(',');
+ }
}
#if>
\ No newline at end of file
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
index 37a9e8d00..470054902 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
@@ -119,6 +119,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -210,6 +213,9 @@ export const formSchema: FormSchema[] = [
component: 'DatePicker',
<#elseif po.classType =='datetime'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
componentProps: {
showTime:true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
@@ -245,11 +251,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',//TODO 注意string转换问题
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
- dictCode:"${form_field_dictCode}"
- },
+ dictCode:"${form_field_dictCode}"
+ },
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -328,7 +340,7 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
@@ -488,6 +500,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -525,11 +540,17 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
- dictCode:"${form_field_dictCode}"
- },
+ dictCode:"${form_field_dictCode}"
+ },
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583]Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -608,7 +629,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/[1-n]List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/[1-n]List.vuei
index 60fa006c8..bb94f7d54 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/[1-n]List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/[1-n]List.vuei
@@ -1,5 +1,6 @@
<#list subTables as sub>
#segment#${sub.entityName}List.vue
+<#assign need_pca = false>
<#-- 结束循环 -->
@@ -43,6 +44,7 @@
下载
#if>
<#if po.classType=='pca'>
+ <#assign need_pca = true>
{{ getAreaTextByCode(text) }}
#if>
@@ -66,6 +68,9 @@
import { isEmpty } from "/@/utils/is";
import { useMessage } from '/@/hooks/web/useMessage';
import { downloadFile } from '/@/utils/common/renderUtils';
+<#if need_pca>
+ import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
+#if>
const toggleSearchStatus = ref
(false);
//接收主表id
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
index c3c38c0b5..9895d074a 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
@@ -1,8 +1,10 @@
<#include "/common/utils.ftl">
-
-
+
+
+
+
<#assign need_category = false>
<#assign bpm_flag=false>
<#assign need_pca = false>
@@ -38,13 +40,15 @@
#if>
<#include "/common/form/native/vue3NativeForm.ftl">
#list>
- <#if bpm_flag>
-
- 提 交
-
- #if>
-
-
+ <#if bpm_flag>
+
+ 提 交
+
+ #if>
+
+
+
+
@@ -56,13 +60,14 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../${entityName}.api';
import { Form } from 'ant-design-vue';
+ import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
<#if hasOnlyValidate == true>
import { duplicateValidate } from '/@/utils/helper/validator'
#if>
const props = defineProps({
formDisabled: { type: Boolean, default: false },
- formData: { type: Object, default: ()=>{} },
+ formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true }
});
const useForm = Form.useForm;
@@ -76,9 +81,9 @@
const wrapperCol = ref({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref(false);
//表单验证
- const validatorRules = {
+ const validatorRules = reactive({
<#include "/common/validatorRulesTemplate/native/vue3MainNative.ftl">
- };
+ });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
const formRef = ref();
// 表单禁用
@@ -217,8 +222,6 @@
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Modal.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Modal.vuei
index bc31abbd0..53db095ef 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Modal.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Modal.vuei
@@ -1,12 +1,13 @@
-
+
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">${entityName}Form>
-
+
-
+
#list>
\ No newline at end of file
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
index 74784e96a..fd0651e25 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
@@ -388,7 +388,7 @@
//流程表单data
formData: {
type: Object,
- default: ()=>{},
+ default: () => ({}),
required: false
},
//表单模式:false流程表单 true普通表单
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
index 27034c9ee..e737fbfd3 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
@@ -134,7 +134,9 @@
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
- <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
+ <#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+ <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
+ <#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end']],
#if>
#if>
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
index 3c4eb950b..0c822ed77 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
@@ -123,6 +123,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -165,6 +168,10 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
component: 'JRangeNumber',
+<#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+<#elseif po.classType=='time'>
+ component: 'RangeTime',
+<#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
<#else>
component: 'Input', //TODO 范围查询
#if>
@@ -211,6 +218,9 @@ export const formSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -248,11 +258,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -331,7 +347,7 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
@@ -487,6 +503,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -524,11 +543,17 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -607,7 +632,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
index 51b96c79e..1c49211bc 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Form.vuei
@@ -411,7 +411,7 @@
//流程表单data
formData: {
type: Object,
- default: ()=>{},
+ default: () => ({}),
required: false
},
//表单模式:false流程表单 true普通表单
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
index c57dbecac..73d087f04 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
@@ -116,7 +116,9 @@
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
- <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
+ <#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+ <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
+ <#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end']],
#if>
#if>
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
index 8cb45c881..f0f1730e8 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
@@ -123,6 +123,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -165,6 +168,10 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
component: 'JRangeNumber',
+<#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+<#elseif po.classType=='time'>
+ component: 'RangeTime',
+<#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
<#else>
component: 'Input', //TODO 范围查询
#if>
@@ -211,6 +218,9 @@ export const formSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps:{
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -248,11 +258,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -331,7 +347,7 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
@@ -427,6 +443,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -464,11 +483,17 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -547,7 +572,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
index 21e56de2e..1a52aef62 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
@@ -402,25 +402,12 @@
* @param value
*/
function handleFormJoinChange(key, value) {
- queryParam[key] = value.join(',');
+ if (typeof value != 'string') {
+ queryParam[key] = value.join(',');
+ }
}
#if>
\ No newline at end of file
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
index fea38f389..b775bfd52 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
@@ -122,6 +122,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -197,6 +200,9 @@ export const formSchema: FormSchema[] = [
field: ${autoStringSuffix(po)},
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps:{
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -234,11 +240,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -317,13 +329,13 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
<#-- 6到18位字符串 -->
<#elseif fieldValidType == 's6-18'>
- { pattern: /^.{6,18}$/, message: '请输入6到18位任意字符!'},
+ { pattern: /^[a-z|A-Z]{6,18}$/, message: '请输入6到18位字母!'},
<#-- 网址 -->
<#elseif fieldValidType == 'url'>
{ pattern: /^((ht|f)tps?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/, message: '请输入正确的网址!'},
@@ -406,6 +418,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
component: 'DatePicker',
<#elseif po.classType =='datetime'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
componentProps: {
showTime:true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
@@ -441,11 +456,17 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583]Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -524,13 +545,13 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
<#-- 6到18位字符串 -->
<#elseif fieldValidType == 's6-18'>
- { pattern: /^.{6,18}$/, message: '请输入6到18位任意字符!'},
+ { pattern: /^[a-z|A-Z]{6,18}$/, message: '请输入6到18位字母!'},
<#-- 网址 -->
<#elseif fieldValidType == 'url'>
{ pattern: /^((ht|f)tps?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/, message: '请输入正确的网址!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
index 87bb1a782..de3191b2b 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
@@ -31,19 +31,23 @@
<#assign hasOnlyValidate = false>
-
-
- <#list columns as po>
- <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
- <#assign hasOnlyValidate = true>
- #if>
- <#if po.fieldDbName=='bpm_status'>
- <#assign bpm_flag=true>
- #if>
-<#include "/common/form/native/vue3NativeForm.ftl">
- #list>
-
-
+
+
+
+
+ <#list columns as po>
+ <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
+ <#assign hasOnlyValidate = true>
+ #if>
+ <#if po.fieldDbName=='bpm_status'>
+ <#assign bpm_flag=true>
+ #if>
+ <#include "/common/form/native/vue3NativeForm.ftl">
+ #list>
+
+
+
+
@@ -102,6 +106,7 @@
<#if hasOnlyValidate == true>
import { duplicateValidate } from '/@/utils/helper/validator'
#if>
+ import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { Form } from 'ant-design-vue';
const useForm = Form.useForm;
@@ -112,6 +117,7 @@
<#if hasOne2manyTable == true>
JVxeTable,
#if>
+ JFormContainer,
<#list subTables as sub>
<#if sub.foreignRelationType =='1'>
${sub.entityName}Form,
@@ -330,4 +336,5 @@
}
}
});
-
\ No newline at end of file
+
+
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/[1-n]Form.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/[1-n]Form.vuei
index c44c55551..104bf850f 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/[1-n]Form.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/[1-n]Form.vuei
@@ -31,19 +31,23 @@
<#assign hasOnlyValidate = false>
-
-
- <#list sub.colums as po>
- <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
- <#assign hasOnlyValidate = true>
- #if>
- <#if po.fieldDbName=='bpm_status'>
- <#assign bpm_flag=true>
- #if>
- <#include "/common/form/native/vue3NativeForm.ftl">
- #list>
-
-
+
+
+
+
+ <#list sub.colums as po>
+ <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
+ <#assign hasOnlyValidate = true>
+ #if>
+ <#if po.fieldDbName=='bpm_status'>
+ <#assign bpm_flag=true>
+ #if>
+ <#include "/common/form/native/vue3NativeForm.ftl">
+ #list>
+
+
+
+
@@ -55,6 +59,7 @@
import { duplicateValidate } from '/@/utils/helper/validator'
#if>
import { useMessage } from '/@/hooks/web/useMessage';
+ import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { Form } from 'ant-design-vue';
const useForm = Form.useForm;
@@ -62,6 +67,7 @@
name: '${sub.entityName}Form',
components:{
<#include "/common/form/native/vue3NativeComponents.ftl">
+ JFormContainer,
},
props:{
disabled:{
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
index a05ad660a..7862e1c33 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
@@ -116,7 +116,9 @@
<#list columns as po>
<#if po.isQuery=='Y'>
<#if po.queryMode!='single'>
- <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
+ <#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+ <#if po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal' || po.classType=='time'>
+ <#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
['${po.fieldName}', ['${po.fieldName}_begin', '${po.fieldName}_end']],
#if>
#if>
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
index 6c24026d1..8d23797b4 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
@@ -123,6 +123,9 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.classType=='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType=='datetime'>
component: 'DatePicker',
componentProps: {
@@ -165,6 +168,10 @@ export const searchFormSchema: FormSchema[] = [
},
<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
component: 'JRangeNumber',
+<#-- update-begin---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
+<#elseif po.classType=='time'>
+ component: 'RangeTime',
+<#-- update-end---author:chenrui ---date:20240527 for:[TV360X-388]时间范围查询控件---------- -->
<#else>
component: 'Input', //TODO 范围查询
#if>
@@ -211,6 +218,9 @@ export const formSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -219,6 +229,9 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='time'>
component: 'TimePicker',
+ componentProps: {
+ valueFormat: 'HH:mm:ss'
+ },
<#elseif po.classType =='popup'>
<#include "/common/form/vue3popup.ftl">
<#elseif po.classType =='sel_depart'>
@@ -245,11 +258,17 @@ export const formSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -328,7 +347,7 @@ export const formSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
@@ -424,6 +443,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
<#if po.classType =='date'>
component: 'DatePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD'
+ },
<#elseif po.classType =='datetime'>
component: 'DatePicker',
componentProps: {
@@ -432,6 +454,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='time'>
component: 'TimePicker',
+ componentProps: {
+ valueFormat: 'HH:mm:ss'
+ },
<#elseif po.classType =='popup'>
<#include "/common/form/vue3popup.ftl">
<#elseif po.classType =='sel_depart'>
@@ -458,11 +483,17 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
},
<#elseif po.classType =='textarea'>
component: 'InputTextArea',
- <#elseif po.classType=='list' || po.classType=='radio'>
+ <#elseif po.classType=='list'>
component: 'JDictSelectTag',
componentProps:{
dictCode:"${form_field_dictCode}"
},
+ <#elseif po.classType=='radio'>
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"${form_field_dictCode}",
+ type: "radio"
+ },
<#-- update-begin---author:chenrui ---date:20231228 for:[QQYUN-7583] Vue3风格表单页面多选控件渲染成了下拉多选---------- -->
<#elseif po.classType=='list_multi'>
component: 'JSelectMultiple',
@@ -541,7 +572,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
{...rules.duplicateCheckRule(<#if sub?default("")?trim?length gt 1>'${sub.tableName}'<#else>'${tableName}'#if>, '${po.fieldDbName}',model,schema)[0]},
<#-- 6到16位数字 -->
<#elseif fieldValidType == 'n6-16'>
- { pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
+ { pattern: /^\d{6,16}$|^(?=\d+\.\d+)[\d.]{7,17}$/, message: '请输入6到16位数字!'},
<#-- 6到16位任意字符 -->
<#elseif fieldValidType == '*6-16'>
{ pattern: /^.{6,16}$/, message: '请输入6到16位任意字符!'},
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/components/${entityName}Modal.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/components/${entityName}Modal.vuei
index 42322c2d6..d45a6ef0f 100644
--- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/components/${entityName}Modal.vuei
+++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/components/${entityName}Modal.vuei
@@ -1,39 +1,46 @@
<#include "/common/utils.ftl">
-
-
-
-
-
-
-
-<#list subTables as sub><#rt/>
- <#assign refKey = sub.entityName?uncap_first/>
- <#if sub.foreignRelationType =='1'>
-
- <${sub.entityName}Form ref="${sub.entityName?uncap_first}Form" :disabled="formDisabled">${sub.entityName}Form>
-
-
- <#else>
-
-
-
- #if>
-#list>
-
+
+
+
+
{{ title }}
+
+
+
+ {{ item.tableTxt }}
+
+
+
+
+
+
+
+
+
+
+ <#list subTables as sub><#rt/>
+ <#assign refKey = sub.entityName?uncap_first/>
+ <#if sub.foreignRelationType =='1'>
+ <${sub.entityName}Form ref="${sub.entityName?uncap_first}Form" :disabled="formDisabled" v-show="activeKey == '${refKey}'">${sub.entityName}Form>
+ <#else>
+
+ #if>
+ #list>
+
@@ -57,6 +64,12 @@
const formDisabled = ref(false);
const modalRef = ref();
const refKeys = ref(['${tableVo.entityName?uncap_first}',<#list subTables as sub>'${sub.entityName?uncap_first}', #list>]);
+ const tabNav = ref([
+ { tableName: '${tableVo.entityName?uncap_first}', tableTxt: '${tableVo.ftlDescription}' },
+ <#list subTables as sub>
+ { tableName: '${sub.entityName?uncap_first}', tableTxt: '${sub.ftlDescription}' },
+ #list>
+ ]);
<#assign hasOne2Many = false>
<#assign hasOne2One = false>
const activeKey = ref('${tableVo.entityName?uncap_first}');
@@ -133,7 +146,9 @@
return {height, minHeight, maxHeight, overflow};
<#-- update-end-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后,新增 没有滚动条,只能填写部分字段 -->
})
-
+ //设置标题
+ const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
+ //重置
async function reset(){
await resetFields();
activeKey.value = '${tableVo.entityName?uncap_first}';
@@ -209,16 +224,36 @@
:deep(.ant-calendar-picker){
width: 100%
}
+
+ .titleArea {
+ display: flex;
+ align-content: center;
+ padding-right: 70px;
+ .title {
+ margin-right: 16px;
+ line-height: 32px;
+ }
+ .right {
+ overflow-x: auto;
+ overflow-y: hidden;
+ flex: 1;
+ white-space: nowrap;
+ }
+ }