From be8f81fe2eb52e841efead8586e514842471e0ba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 九月 2023 16:50:35 +0800
Subject: [PATCH] 2023-09-14

---
 src/menu/datasource/verifycard/utils.jsx                                           |   25 +++-
 src/mob/searchconfig/index.jsx                                                     |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx |   12 ++
 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx   |    2 
 src/templates/zshare/verifycard/callbackcustomscript/index.jsx                     |    2 
 src/menu/components/share/searchcomponent/index.jsx                                |    2 
 src/menu/datasource/verifycard/customscript/index.jsx                              |   24 ++++
 src/templates/zshare/verifycard/customscript/index.jsx                             |    2 
 src/templates/sharecomponent/searchcomponent/index.jsx                             |    2 
 src/menu/components/form/simple-form/index.jsx                                     |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx              |   19 +++
 src/templates/modalconfig/index.jsx                                                |    2 
 src/templates/zshare/verifycard/customform/index.jsx                               |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx  |    2 
 src/templates/sharecomponent/settingcomponent/settingform/index.jsx                |   23 ++++
 src/mob/modalconfig/index.jsx                                                      |    2 
 src/menu/components/table/edit-table/columns/editColumn/index.jsx                  |    2 
 src/menu/datasource/verifycard/index.jsx                                           |   68 +++++--------
 src/utils/utils.js                                                                 |   22 +++
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx              |    2 
 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx                 |    2 
 src/menu/components/form/step-form/index.jsx                                       |    2 
 src/templates/zshare/formconfig.jsx                                                |    2 
 src/menu/components/form/tab-form/index.jsx                                        |    2 
 src/menu/components/share/actioncomponent/formconfig.jsx                           |    4 
 src/menu/components/search/main-search/index.jsx                                   |    2 
 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx            |    2 
 src/menu/modalconfig/index.jsx                                                     |    2 
 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx        |    2 
 src/templates/sharecomponent/searchcomponent/searchform/index.jsx                  |   13 ++
 30 files changed, 169 insertions(+), 83 deletions(-)

diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index bc66a55..fc29105 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -456,7 +456,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               editform: null,
diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx
index 1d81503..eaffe09 100644
--- a/src/menu/components/form/step-form/index.jsx
+++ b/src/menu/components/form/step-form/index.jsx
@@ -558,7 +558,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               editform: null,
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 18b4656..5edd560 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -563,7 +563,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               editform: null,
diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx
index f526199..6998ffd 100644
--- a/src/menu/components/search/main-search/index.jsx
+++ b/src/menu/components/search/main-search/index.jsx
@@ -274,7 +274,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               visible: false
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 361a3a6..0169f0f 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -647,7 +647,7 @@
       type: 'select',
       key: 'popClose',
       label: '鍏抽棴鍚�',
-      initVal: card.popClose || 'never',
+      initVal: card.popClose || 'grid',
       required: true,
       options: [{
         value: 'never',
@@ -1756,7 +1756,7 @@
       type: 'select',
       key: 'popClose',
       label: '鍏抽棴鍚�',
-      initVal: card.popClose || 'never',
+      initVal: card.popClose || 'grid',
       required: true,
       options: [{
         value: 'never',
diff --git a/src/menu/components/share/searchcomponent/index.jsx b/src/menu/components/share/searchcomponent/index.jsx
index 3d94abe..ec4201f 100644
--- a/src/menu/components/share/searchcomponent/index.jsx
+++ b/src/menu/components/share/searchcomponent/index.jsx
@@ -222,7 +222,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               searchlist: _searchlist,
diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 14f0606..4d3e477 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -469,7 +469,7 @@
           }
           
           Api.genericInterface(param).then(result => {
-            if (result.status) {
+            if (result.status || result.ErrCode === '-2') {
               this.setState({visible: false, loading: false, formlist: null})
               this.props.submitCol(values)
               this.record = null
diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
index 9aab9bf..3fe2f7c 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -226,7 +226,7 @@
         } else {
           this.setState({loading: true})
           Api.genericInterface(param).then(res => {
-            if (res.status) {
+            if (res.status || res.ErrCode === '-2') {
               this.setState({
                 loading: false,
                 editItem: null
diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx
index 5126286..5babfa1 100644
--- a/src/menu/datasource/verifycard/customscript/index.jsx
+++ b/src/menu/datasource/verifycard/customscript/index.jsx
@@ -41,9 +41,19 @@
         _usefulFields.push(item.field)
         _usefulFields.push(item.datefield)
         _usefulFields.push(item.datefield + '1')
-      } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
+      } else if (['dateweek', 'datemonth'].includes(item.type)) {
         _usefulFields.push(item.field)
         _usefulFields.push(item.field + '1')
+      } else if (item.type === 'daterange') {
+        let _skey = item.field
+        let _ekey = item.field + '1'
+
+        if (/,/.test(item.field)) {
+          _skey = item.field.split(',')[0]
+          _ekey = item.field.split(',')[1]
+        }
+        _usefulFields.push(_skey)
+        _usefulFields.push(_ekey)
       } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
         _usefulFields.push(item.field + '1')
       } else {
@@ -67,9 +77,19 @@
           _usefulFields.push(item.field)
           _usefulFields.push(item.datefield)
           _usefulFields.push(item.datefield + '1')
-        } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
+        } else if (['dateweek', 'datemonth'].includes(item.type)) {
           _usefulFields.push(item.field)
           _usefulFields.push(item.field + '1')
+        } else if (item.type === 'daterange') {
+          let _skey = item.field
+          let _ekey = item.field + '1'
+
+          if (/,/.test(item.field)) {
+            _skey = item.field.split(',')[0]
+            _ekey = item.field.split(',')[1]
+          }
+          _usefulFields.push(_skey)
+          _usefulFields.push(_ekey)
         } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
           _usefulFields.push(item.field + '1')
         } else {
diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx
index 4cdee7a..fa17198 100644
--- a/src/menu/datasource/verifycard/index.jsx
+++ b/src/menu/datasource/verifycard/index.jsx
@@ -385,7 +385,7 @@
     }
 
     return new Promise((resolve, reject) => {
-      this.sqlverify(resolve, reject, false, scripts)
+      this.sqlverify(resolve, reject, 'script', scripts)
     })
   }
 
@@ -449,7 +449,7 @@
               loading: false
             })
             this.getdefaultSql()
-          }, true)
+          }, 'change')
         })
       }, () => {
         this.setState({loading: false})
@@ -622,7 +622,7 @@
             defaultSearch: _search,
             setting: res
           }, () => {
-            this.sqlverify(() => { resolve({setting: res, columns, subColumns, scripts, cols }) }, reject, false)
+            this.sqlverify(() => { resolve({setting: res, columns, subColumns, scripts, cols }) }, reject, 'submit')
           })
         }, () => {
           reject()
@@ -637,7 +637,7 @@
           reject()
           return
         }
-        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, false)
+        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
       } else if (activeKey === 'subcolumns') {
         if (this.subdatasource && this.subdatasource.state.editingKey) {
           notification.warning({
@@ -648,7 +648,7 @@
           reject()
           return
         }
-        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, false)
+        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
       } else if (activeKey === 'scripts') {
         let _loading = false
         if (this.scriptsForm && this.scriptsForm.state.editItem) {
@@ -667,12 +667,12 @@
           return
         }
 
-        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, false)
+        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
       }
     })
   }
 
-  sqlverify = (resolve, reject, change = false, testScripts) => {
+  sqlverify = (resolve, reject, type, testScripts) => {
     const { config } = this.props
     const { columns, setting, scripts, searches, defaultSearch, debugId } = this.state
 
@@ -681,7 +681,7 @@
     if (testScripts) {
       _scripts = testScripts.filter(item => item.status !== 'false')
     }
-    if (!change && setting.interType === 'system' && setting.execute === 'false' && _scripts.length === 0) {
+    if (type !== 'change' && setting.interType === 'system' && setting.execute === 'false' && _scripts.length === 0) {
       notification.warning({
         top: 92,
         message: '涓嶆墽琛岄粯璁ql鏃讹紝璇锋坊鍔犺嚜瀹氫箟鑴氭湰锛�',
@@ -691,7 +691,7 @@
       return
     }
 
-    if (change && columns.length === 0) {
+    if (type === 'change' && columns.length === 0) {
       reject()
       return
     }
@@ -724,43 +724,31 @@
       param.timestamp = timestamp
       param.secretkey = Utils.encrypt('', timestamp)
 
-      let sumParam = null
-      if (r.sumSql) {
-        sumParam = {
-          func: 's_debug_sql',
-          exec_type: 'y',
-          LText: r.sumSql
-        }
-        sumParam.LText = Utils.formatOptions(sumParam.LText)
-        sumParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-        sumParam.secretkey = Utils.encrypt('', sumParam.timestamp)
-      }
-      
       Api.genericInterface(param).then(result => {
-        if (result.status) {
-          if (sumParam) {
-            Api.genericInterface(sumParam).then(res => {
-              if (res.status) {
-                this.setState({debugId: _debugId}, () => {
-                  resolve()
-                })
-              } else {
+        if (result.status || result.ErrCode === '-2') {
+          this.setState({debugId: _debugId}, () => {
+            resolve()
+          })
+        } else {
+          if (type === 'submit') {
+            Modal.confirm({
+              title: result.message,
+              okText: '鐭ラ亾浜�',
+              cancelText: '寮哄埗淇濆瓨',
+              onOk: () => {
                 reject()
-                Modal.error({
-                  title: res.message
-                })
+              },
+              onCancel() {
+                resolve()
               }
             })
           } else {
-            this.setState({debugId: _debugId}, () => {
-              resolve()
+            reject()
+            Modal.error({
+              title: result.message,
+              okText: '鐭ラ亾浜�'
             })
           }
-        } else {
-          reject()
-          Modal.error({
-            title: result.message
-          })
         }
       })
     } else {
@@ -801,7 +789,7 @@
 
     this.setState({loading: true})
 
-    this.sqlverify(() => {this.setState({scripts: _scripts, script: null, scriptValue: '', loading: false})}, () => {this.setState({loading: false})}, false, _scripts)
+    this.sqlverify(() => {this.setState({scripts: _scripts, script: null, scriptValue: '', loading: false})}, () => {this.setState({loading: false})}, 'script', _scripts)
   }
 
   updatefields = (columns) => {
diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx
index b04140c..4ab7ea0 100644
--- a/src/menu/datasource/verifycard/utils.jsx
+++ b/src/menu/datasource/verifycard/utils.jsx
@@ -103,46 +103,53 @@
       if (!item.field) return
       if (item.datefield) {
         _regoptions.push({
-          var: new RegExp('@' + item.datefield, 'ig'),
           reg: new RegExp('@' + item.datefield + '@', 'ig')
         })
         _regoptions.push({
-          var: new RegExp('@' + item.datefield + '1', 'ig'),
           reg: new RegExp('@' + item.datefield + '1@', 'ig')
         })
       }
-      if (['dateweek', 'datemonth', 'daterange', 'range'].includes(item.type)) {
+      if (['dateweek', 'datemonth', 'range'].includes(item.type)) {
         _regoptions.push({
-          var: new RegExp('@' + item.field, 'ig'),
           reg: new RegExp('@' + item.field + '@', 'ig')
         })
         _regoptions.push({
-          var: new RegExp('@' + item.field + '1', 'ig'),
           reg: new RegExp('@' + item.field + '1@', 'ig')
+        })
+      } else if (item.type === 'daterange') {
+        let _skey = item.field
+        let _ekey = item.field + '1'
+
+        if (/,/.test(item.field)) {
+          _skey = item.field.split(',')[0]
+          _ekey = item.field.split(',')[1]
+        }
+
+        _regoptions.push({
+          reg: new RegExp('@' + _skey + '@', 'ig')
+        })
+        _regoptions.push({
+          reg: new RegExp('@' + _ekey + '@', 'ig')
         })
       } else if (item.type === 'date') {
         if (_fields.includes(item.field)) {
           _regoptions.push({
-            var: new RegExp('@' + item.field + '1', 'ig'),
             reg: new RegExp('@' + item.field + '1@', 'ig')
           })
         } else {
           _fields.push(item.field)
           _regoptions.push({
-            var: new RegExp('@' + item.field, 'ig'),
             reg: new RegExp('@' + item.field + '@', 'ig')
           })
         }
       } else if (item.type === 'text' || item.type === 'select') {
         item.field.split(',').forEach(field => {
           _regoptions.push({
-            var: new RegExp('@' + field, 'ig'),
             reg: new RegExp('@' + field + '@', 'ig')
           })
         })
       } else {
         _regoptions.push({
-          var: new RegExp('@' + item.field, 'ig'),
           reg: new RegExp('@' + item.field + '@', 'ig')
         })
       }
diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index 9791220..fcbd8d5 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -283,7 +283,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               config: _config,
diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx
index c33da82..82aa489 100644
--- a/src/mob/modalconfig/index.jsx
+++ b/src/mob/modalconfig/index.jsx
@@ -280,7 +280,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               config: _config,
diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx
index 62c27cb..cd556d0 100644
--- a/src/mob/searchconfig/index.jsx
+++ b/src/mob/searchconfig/index.jsx
@@ -247,7 +247,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               group: _group,
diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx
index 0ce29b4..d1f1488 100644
--- a/src/templates/modalconfig/index.jsx
+++ b/src/templates/modalconfig/index.jsx
@@ -411,7 +411,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               config: _config,
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
index 07c8db4..add3b7b 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -243,7 +243,7 @@
         } else {
           this.setState({loading: true})
           Api.genericInterface(param).then(res => {
-            if (res.status) {
+            if (res.status || res.ErrCode === '-2') {
               this.setState({
                 loading: false,
                 editItem: null
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
index 9f4f640..2bcd93c 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -95,9 +95,19 @@
         _usefulFields.push(item.field)
         _usefulFields.push(item.datefield)
         _usefulFields.push(item.datefield + '1')
-      } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
+      } else if (['dateweek', 'datemonth'].includes(item.type)) {
         _usefulFields.push(item.field)
         _usefulFields.push(item.field + '1')
+      } else if (item.type === 'daterange') {
+        let _skey = item.field
+        let _ekey = item.field + '1'
+
+        if (/,/.test(item.field)) {
+          _skey = item.field.split(',')[0]
+          _ekey = item.field.split(',')[1]
+        }
+        _usefulFields.push(_skey)
+        _usefulFields.push(_ekey)
       } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
         _usefulFields.push(item.field + '1')
       } else {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index beddccf..10ac57f 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -905,7 +905,7 @@
     param.secretkey = Utils.encrypt('', timestamp)
 
     Api.genericInterface(param).then(result => {
-      if (result.status) {
+      if (result.status || result.ErrCode === '-2') {
         this.setState({debugId: _debugId})
         _resolve()
       } else {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
index 0d8cbf7..b0b9452 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
@@ -220,12 +220,29 @@
           value: '0'
         })
         options.push(item)
-      } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) {
+      } else if (['datemonth', 'dateweek'].includes(search.type)) {
         options.push(item)
         options.push({
           key: item.key + '1',
           value: '0'
         })
+      } else if (search.type === 'daterange') {
+        let _skey = search.field
+        let _ekey = search.field + '1'
+
+        if (/,/.test(search.field)) {
+          _skey = search.field.split(',')[0]
+          _ekey = search.field.split(',')[1]
+        }
+
+        options.push({
+          key: _skey,
+          value: '0'
+        })
+        options.push({
+          key: _ekey,
+          value: '0'
+        })
       } else if (search.type === 'text' || search.type === 'select') {
         item.key.split(',').forEach(field => {
           let cell = JSON.parse(JSON.stringify(item))
diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
index 3feecc6..98ab893 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -657,7 +657,7 @@
     param.secretkey = Utils.encrypt('', timestamp)
 
     Api.genericInterface(param).then(result => {
-      if (result.status) {
+      if (result.status || result.ErrCode === '-2') {
         this.setState({debugId: _debugId})
         _resolve()
       } else {
diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx
index 6eb1a3b..79c8b09 100644
--- a/src/templates/sharecomponent/searchcomponent/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/index.jsx
@@ -229,7 +229,7 @@
         }
         
         Api.genericInterface(param).then(result => {
-          if (result.status) {
+          if (result.status || result.ErrCode === '-2') {
             this.setState({
               sqlVerifing: false,
               searchlist: _searchlist,
diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
index 34b71e8..400b7d9 100644
--- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -257,6 +257,8 @@
 
     if (type === 'text' || type === 'select') {
       reTooltip.field = '瀛楁鍚嶅彲浠ヤ娇鐢ㄩ�楀彿鍒嗛殧锛岃繘琛岀患鍚堟悳绱€��'
+    } else if (type === 'daterange') {
+      reTooltip.field = '瀛楁鍚嶅彲浠ヤ娇鐢ㄩ�楀彿鍒嗛殧锛屼緥濡俿tartTime,endTime銆�'
     } else if (type === 'group') {
       reTooltip.field = '鏌ヨ鏁版嵁鏃讹紙鑷畾涔夎剼鏈垨缁熻鏁版嵁婧愶級锛岀被鍨嬪瓧娈靛皢鐢ㄤ綔鏇挎崲鑴氭湰涓殑 @瀛楁@ 锛岀被鍨嬪瓧娈靛搴斿�间负锛氭棩 -> day锛涘懆 -> week锛涙湀 -> month锛涘 -> quarter锛涘勾 -> year锛涜嚜瀹氫箟 -> customized'
       reLabel.field = '绫诲瀷瀛楁'
@@ -463,7 +465,7 @@
         ]
         if (item.key === 'field' || item.key === 'datefield') {
           rules.push({
-            pattern: (type === 'text' || type === 'select') ? formRule.field.multipattern : formRule.field.pattern,
+            pattern: (type === 'text' || type === 'select' || type === 'daterange') ? formRule.field.multipattern : formRule.field.pattern,
             message: formRule.field.message
           }, {
             max: formRule.field.max,
@@ -619,6 +621,15 @@
       this.props.form.validateFieldsAndScroll((err, values) => {
         if (!err) {
           values.uuid = this.props.card.uuid
+
+          if (/,/.test(values.field)) {
+            values.field = values.field.split(',').filter(Boolean)
+            if (values.type === 'daterange' && values.field.length > 2) {
+              values.field.length = 2
+            }
+            values.field = values.field.join(',')
+          }
+
           // 涓嬫媺鑿滃崟鎴栬仈鍔ㄨ彍鍗�
           if (['multiselect', 'select', 'link', 'radio'].includes(values.type)) {
             if (values.resourceType === '0') {
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
index 5e8df8d..57c89ef 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -156,10 +156,27 @@
           value: '0'
         })
         options.push(item)
-      } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) {
+      } else if (['datemonth', 'dateweek'].includes(search.type)) {
         options.push(item)
         options.push({
           key: item.key + '1',
+          value: '0'
+        })
+      } else if (search.type === 'daterange') {
+        let _skey = search.field
+        let _ekey = search.field + '1'
+
+        if (/,/.test(search.field)) {
+          _skey = search.field.split(',')[0]
+          _ekey = search.field.split(',')[1]
+        }
+
+        options.push({
+          key: _skey,
+          value: '0'
+        })
+        options.push({
+          key: _ekey,
           value: '0'
         })
       } else if (search.type === 'text' || search.type === 'select') {
@@ -331,10 +348,10 @@
       }
       
       Api.genericInterface(param).then(result => {
-        if (result.status) {
+        if (result.status || result.ErrCode === '-2') {
           if (sumParam) {
             Api.genericInterface(sumParam).then(res => {
-              if (res.status) {
+              if (res.status || res.ErrCode === '-2') {
                 _resolve()
               } else {
                 _reject()
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
index 4b274f6..de51194 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -314,7 +314,7 @@
     
     this.setState({loading: true})
     Api.genericInterface(param).then(result => {
-      if (result.status) {
+      if (result.status || result.ErrCode === '-2') {
         this.setState({
           loading: false,
           scripts: _scripts,
diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
index 31c37e5..595cd77 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -146,7 +146,7 @@
       param.secretkey = Utils.encrypt('', timestamp)
       
       Api.genericInterface(param).then(result => {
-        if (result.status) {
+        if (result.status || result.ErrCode === '-2') {
           _resolve()
         } else {
           _reject()
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index db78cd8..15ef63d 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1417,7 +1417,7 @@
       type: refresh.length === 0 ? 'radio' : 'select',
       key: 'popClose',
       label: '鍏抽棴鍚�',
-      initVal: card.popClose || 'never',
+      initVal: card.popClose || 'grid',
       required: true,
       options: [{
         value: 'never',
diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
index c0750c8..a0e7a52 100644
--- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
+++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -175,7 +175,7 @@
         } else {
           this.setState({loading: true})
           Api.genericInterface(param).then(res => {
-            if (res.status) {
+            if (res.status || res.ErrCode === '-2') {
               this.setState({
                 loading: false,
                 editItem: null
diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx
index 2af2b05..78fde6a 100644
--- a/src/templates/zshare/verifycard/customform/index.jsx
+++ b/src/templates/zshare/verifycard/customform/index.jsx
@@ -152,7 +152,7 @@
         
         this.setState({loading: true})
         Api.genericInterface(param).then(res => {
-          if (res.status) {
+          if (res.status || res.ErrCode === '-2') {
             this.setState({
               loading: false,
               editItem: null
diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx
index e34f54e..65653ed 100644
--- a/src/templates/zshare/verifycard/customscript/index.jsx
+++ b/src/templates/zshare/verifycard/customscript/index.jsx
@@ -228,7 +228,7 @@
         } else {
           this.setState({loading: true})
           Api.genericInterface(param).then(res => {
-            if (res.status) {
+            if (res.status || res.ErrCode === '-2') {
               this.setState({
                 loading: false,
                 editItem: null
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 3f2c69a..7839cb6 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -546,8 +546,16 @@
           }
         }
 
-        newsearches[item.key] = _startval
-        newsearches[item.key + '1'] = _endval
+        let _skey = item.key
+        let _ekey = item.key + '1'
+
+        if (/,/.test(item.key)) {
+          _skey = item.key.split(',')[0]
+          _ekey = item.key.split(',')[1]
+        }
+
+        newsearches[_skey] = _startval
+        newsearches[_ekey] = _endval
       } else if (item.type === 'text' || item.type === 'select') {
         item.key.split(',').forEach(field => { // 缁煎悎鎼滅储锛屾墍瀛楁鎷兼帴
           newsearches[field] = item.value
@@ -638,7 +646,15 @@
           _endval = val[1] + '.000'
         }
 
-        searchText.push('(' + item.key + ' >= \'' + _startval + '\' AND ' + item.key + ' < \'' + _endval + '\')')
+        let _skey = item.key
+        let _ekey = item.key
+
+        if (/,/.test(item.key)) {
+          _skey = item.key.split(',')[0]
+          _ekey = item.key.split(',')[1]
+        }
+
+        searchText.push('(' + _skey + ' >= \'' + _startval + '\' AND ' + _ekey + ' < \'' + _endval + '\')')
       } else if (item.type === 'range') {
         let val = item.value.split(',')
 

--
Gitblit v1.8.0