From 3f0f0b7e222cf0c159b6f646af7084ed4c29e409 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 26 八月 2023 10:46:52 +0800
Subject: [PATCH] 2023-08-26

---
 src/utils/utils.js |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 369abde..7f89611 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -967,7 +967,15 @@
       let _colindex = cols[cindex] || (cindex + 1)
       let _position = (_topline + lindex + 1) + '琛� ' + _colindex + '鍒� '
 
-      if (/^Nvarchar/ig.test(col.type)) {
+      if (col.import === 'init') {
+        if (/^Nvarchar/ig.test(col.type)) {
+          val = ''
+        } else if (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type)) {
+          val = 0
+        } else if (col.type === 'date') {
+          val = '1949-10-01'
+        }
+      } else if (/^Nvarchar/ig.test(col.type)) {
         val = val + ''
 
         if (/'/.test(val)) {
@@ -1160,7 +1168,7 @@
       _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
     }
 
-    if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) {
+    if (window.GLOB.debugger === true) {
       let fsql = `
       ${_sql}
       ${_sqlInsert}
@@ -1395,7 +1403,7 @@
       _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
     }
 
-    if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) {
+    if (window.GLOB.debugger === true) {
       let fsql = `
       ${_sql}
       ${_sqlInsert}
@@ -2186,7 +2194,7 @@
     _sql = _sql.replace(/@datam@/ig, '\'\'')
   }
 
-  if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) {
+  if (window.GLOB.debugger === true) {
     // _sql = _sql.replace(/\n\s{8}/ig, '\n')
     console.info(_sql)
   }

--
Gitblit v1.8.0