From fdd7fea4c6723fff657cfbe59b5e8201fa1cf0fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Wed, 24 Nov 2021 14:24:40 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E6=95=B0=E5=AD=97?=
=?UTF-8?q?=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.CodeGenerator/CodeGenerateTemplate.cs | 16 +++++++++++-----
ZR.CodeGenerator/GenConstants.cs | 2 ++
ZR.Vue/src/views/tool/gen/editTable.vue | 1 +
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/ZR.CodeGenerator/CodeGenerateTemplate.cs b/ZR.CodeGenerator/CodeGenerateTemplate.cs
index 5df2d316..e409527b 100644
--- a/ZR.CodeGenerator/CodeGenerateTemplate.cs
+++ b/ZR.CodeGenerator/CodeGenerateTemplate.cs
@@ -88,10 +88,10 @@ namespace ZR.CodeGenerator
{
return InputDtoContent;
}
- else if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
- {
- return InputDtoContent;
- }
+ //else if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
+ //{
+ // return InputDtoContent;
+ //}
else if (dbFieldInfo.IsInsert || dbFieldInfo.IsEdit || dbFieldInfo.IsPk || dbFieldInfo.IsIncrement)
{
InputDtoContent += $" public {dbFieldInfo.CsharpType}{GetModelRequired(dbFieldInfo)} {dbFieldInfo.CsharpField} {{ get; set; }}\r\n";
@@ -131,7 +131,13 @@ namespace ZR.CodeGenerator
{
return sb.ToString();
}
- if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
+ if (dbFieldInfo.HtmlType == GenConstants.HTML_INPUT_NUMBER)
+ {
+ sb.AppendLine($" ");
+ sb.AppendLine($" ");
+ sb.AppendLine(" ");
+ }
+ else if (dbFieldInfo.HtmlType == GenConstants.HTML_DATETIME)
{
//时间
sb.AppendLine($" ");
diff --git a/ZR.CodeGenerator/GenConstants.cs b/ZR.CodeGenerator/GenConstants.cs
index 7c24f721..65d2e9f7 100644
--- a/ZR.CodeGenerator/GenConstants.cs
+++ b/ZR.CodeGenerator/GenConstants.cs
@@ -87,6 +87,8 @@ namespace ZR.CodeGenerator
/** 文本框 */
public static string HTML_INPUT = "input";
+ /** 数字框 */
+ public static string HTML_INPUT_NUMBER = "inputNumber";
/** 文本域 */
public static string HTML_TEXTAREA = "textarea";
diff --git a/ZR.Vue/src/views/tool/gen/editTable.vue b/ZR.Vue/src/views/tool/gen/editTable.vue
index 81a6f7cd..6893bee0 100644
--- a/ZR.Vue/src/views/tool/gen/editTable.vue
+++ b/ZR.Vue/src/views/tool/gen/editTable.vue
@@ -74,6 +74,7 @@
+