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/templates/sharecomponent/settingcomponent/settingform/index.jsx |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

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()

--
Gitblit v1.8.0