From 0f79daefced8980fa571dd3d2c781a0e3646614f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 24 十一月 2020 16:57:19 +0800
Subject: [PATCH] 2020-11-24

---
 src/utils/utils.js |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 7e970f3..987a514 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -642,9 +642,7 @@
     } else {
       baseurl = window.GLOB.location + window.GLOB.service
     }
-    // if (!/Content\/images\/upload\//.test(url)) {
-    //   baseurl = baseurl + 'Content/images/upload/'
-    // }
+
     let realurl = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url
     return realurl
   }
@@ -697,7 +695,7 @@
     if (item.orderBy) {
       sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield},${item.orderBy} as orderfield from ${_datasource} ) a order by orderfield ${item.orderType}`
     } else {
-      sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield} from ${_datasource})`
+      sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield} from ${_datasource}) a`
     }
 
     return {
@@ -1046,7 +1044,8 @@
     let _sql = ''
 
     let _initvars = [] // 宸茶祴鍊煎瓧娈甸泦
-    let _initfields = []
+    let _initFormfields = []
+    let _initColfields = []
     let _declarefields = []
 
     // 鑾峰彇瀛楁閿�煎
@@ -1071,9 +1070,9 @@
               val = 0
             }
           }
-          _initfields.push(`@${_key}=${val}`)
+          _initFormfields.push(`@${_key}=${val}`)
         } else {
-          _initfields.push(`@${_key}='${form.value}'`)
+          _initFormfields.push(`@${_key}='${form.value}'`)
         }
       }
       
@@ -1116,9 +1115,9 @@
                   _val = 0
                 }
               }
-              _initfields.push(`@${_key}=${_val}`)
+              _initColfields.push(`@${_key}=${_val}`)
             } else {
-              _initfields.push(`@${_key}='${_val}'`)
+              _initColfields.push(`@${_key}='${_val}'`)
             }
           }
           
@@ -1153,12 +1152,20 @@
         Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields}
       `
 
-    // 鍙橀噺璧嬪��
-    _initfields = _initfields.join(',')
-    if (_initfields) {
+    // 琛ㄥ崟鍙橀噺璧嬪��
+    _initFormfields = _initFormfields.join(',')
+    if (_initFormfields) {
       _sql += `
-        
-        select ${_initfields}
+        /* 琛ㄥ崟鍙橀噺璧嬪�� */
+        select ${_initFormfields}
+        `
+    }
+    // 鏄剧ず鍒楀彉閲忚祴鍊�
+    _initColfields = _initColfields.join(',')
+    if (_initColfields) {
+      _sql += `
+        /* 鏄剧ず鍒楀彉閲忚祴鍊� */
+        select ${_initColfields}
         `
     }
 

--
Gitblit v1.8.0