From 137499158bf8f68c74205e135f563859427fec0c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 18 四月 2023 11:03:42 +0800
Subject: [PATCH] 2023-04-18

---
 src/menu/components/form/simple-form/index.jsx     |    4 ++--
 src/tabviews/zshare/mutilform/index.jsx            |   13 ++++++++++---
 src/templates/zshare/modalform/index.jsx           |    4 ++++
 src/menu/components/form/step-form/index.jsx       |    2 ++
 src/menu/modalconfig/index.jsx                     |    2 ++
 src/mob/modalconfig/index.jsx                      |    2 ++
 src/templates/zshare/modalform/datatable/index.jsx |    6 ++++--
 src/menu/components/form/tab-form/index.jsx        |    2 ++
 8 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index 049c02d..9cacce7 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -443,6 +443,8 @@
           fieldrepet = true
         }
 
+        delete item.focus
+
         if (item.uuid === res.uuid) {
           if (item.style) {
             res.style = item.style
@@ -580,8 +582,6 @@
     _card.subcards[0].setting.align = _card.wrap.align
     _card.subcards[0].setting.enable = _card.wrap.enable
     _card.subcards[0].setting.verticalSpace = _card.wrap.verticalSpace
-
-    
 
     if (_card.wrap.closeEnable === 'true' && !_card.subcards[0].closeButton) {
       _card.subcards[0].closeButton = {label: '鍏抽棴', enable: 'true', type: 'close', style: {backgroundColor: '#ffffff', color: 'rgba(0,0,0,0.65)', borderColor: '#d9d9d9', borderWidth: '1px', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px', marginLeft: '10px'}}
diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx
index 71a2b3a..4f36315 100644
--- a/src/menu/components/form/step-form/index.jsx
+++ b/src/menu/components/form/step-form/index.jsx
@@ -545,6 +545,8 @@
           fieldrepet = true
         }
 
+        delete item.focus
+
         if (item.uuid === res.uuid) {
           if (item.style) {
             res.style = item.style
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 0d1e4f1..e27fb98 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -550,6 +550,8 @@
           fieldrepet = true
         }
 
+        delete item.focus
+
         if (item.uuid === res.uuid) {
           if (item.style) {
             res.style = item.style
diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index 0448d06..329af7d 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -238,6 +238,8 @@
           fieldrepet = true
         }
 
+        delete item.focus
+
         if (item.uuid === res.uuid) {
           if (item.style) {
             res.style = item.style
diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx
index b355b14..8f413d2 100644
--- a/src/mob/modalconfig/index.jsx
+++ b/src/mob/modalconfig/index.jsx
@@ -235,6 +235,8 @@
           fieldrepet = true
         }
 
+        delete item.focus
+
         if (item.uuid === res.uuid) {
           if (item.style) {
             res.style = item.style
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 35287d8..4a96938 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -410,10 +410,13 @@
 
         let cell = fieldMap.get(item.field)
 
-        if (cell.hidden) return
-
+        // if (cell.hidden) return
+        
         if (supItem.hidden || !item.values.includes(supItem.initval)) {
           cell.hidden = true
+          if (cell.empty === 'hidden') {
+            cell.$hidden = true
+          }
           fieldMap.set(item.field, cell)
         }
 
@@ -834,7 +837,7 @@
           }
         }
 
-        if (item.empty === 'hidden' && item.oriOptions.length > 0) {
+        if (item.empty === 'hidden' && item.oriOptions.length > 0 && !item.$hidden) {
           item.hidden = false
         }
         if (item.type === 'checkcard' && item.readonly && item.unchecked === 'hidden') {
@@ -911,6 +914,10 @@
         let m = map.get(cell.field)
         m.hidden = current.hidden || !cell.values.includes(val)
 
+        if (m.empty === 'hidden' && m.oriOptions.length === 0) {
+          m.hidden = true
+        }
+
         if (m.hidden) {
           m.initval = this.record[m.field]
         }
diff --git a/src/templates/zshare/modalform/datatable/index.jsx b/src/templates/zshare/modalform/datatable/index.jsx
index 7f13956..75a9a67 100644
--- a/src/templates/zshare/modalform/datatable/index.jsx
+++ b/src/templates/zshare/modalform/datatable/index.jsx
@@ -431,6 +431,8 @@
   }
 
   render() {
+    const { display, fields } = this.props
+
     const components = {
       body: {
         row: DragableBodyRow,
@@ -456,9 +458,9 @@
     })
 
     let addable = false
-    if (this.props.display === 'picture' || this.props.display === 'color') {
+    if (display === 'picture' || display === 'color') {
       addable = true
-    } else if (this.props.fields && this.props.fields.length > 0) {
+    } else if (fields && fields.length > 0) {
       addable = true
     }
 
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index cae1bd2..9e82b99 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -338,6 +338,10 @@
       shows.push('supvalue')
     }
 
+    if (this.record.hidden === 'true') {
+      shows = shows.filter(s => !['supField', 'supvalue', 'tooltip', 'extra', 'enter', 'tabField'].includes(s))
+    }
+
     return {
       shows,
       reOptions,

--
Gitblit v1.8.0