From a6be5cfd9c6fb084af584b77f79100fe32b385c1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 30 十一月 2023 16:20:54 +0800
Subject: [PATCH] 2023-11-30

---
 src/tabviews/custom/popview/index.jsx |   45 +++++++++++++++++++--------------------------
 1 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 0dd6bfd..eb22032 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -405,6 +405,10 @@
               col.linkThdMenu = ''
             }
 
+            if (col.marks && col.marks.length === 0) {
+              col.marks = null
+            }
+
             return true
           })
         }
@@ -504,39 +508,14 @@
       } else if (item.type === 'form') {
         item.subcards = item.subcards.map(group => {
           group.subButton.uuid = group.uuid
-          group.subButton.$menuId = group.uuid
-          group.subButton.$MenuID = Tab.$MenuID
           group.subButton.OpenType = 'formSubmit'
           group.subButton.execError = 'never'
-          group.subButton.logLabel = item.$menuname + '-' + group.subButton.label
-          group.subButton.$tabId = Tab.uuid
 
           if (!group.subButton.Ot) {
             group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl'
           }
 
-          group.subButton.syncComponentId = group.subButton.syncComponent ? (group.subButton.syncComponent.pop() || '') : ''
-
-          if (group.subButton.syncComponentId && group.subButton.syncComponentId === item.setting.supModule) {
-            group.subButton.syncComponentId = ''
-            if (group.subButton.execSuccess === 'grid') {
-              group.subButton.execSuccess = 'mainline'
-            }
-          }
-
-          if (group.subButton.verify && group.subButton.verify.invalid === 'true') {
-            if (item.wrap.datatype === 'static') {
-              group.subButton.verify.invalid = 'false'
-            } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) {
-              group.subButton.verify.invalid = 'false'
-            } else if (group.subButton.intertype !== 'system' && group.subButton.procMode !== 'system') {
-              group.subButton.verify.invalid = 'false'
-            } else if (group.subButton.sqlType === 'insert') {
-              group.subButton.verify.invalid = 'false'
-            } else if (group.subButton.Ot === 'notRequired') {
-              group.subButton.verify.invalid = 'false'
-            }
-          }
+          group.subButton = this.resetButton(item, group.subButton, Tab)
 
           group.fields = group.fields.map(cell => {
             // 鏁版嵁婧恠ql璇彞锛岄澶勭悊锛屾潈闄愰粦鍚嶅崟瀛楁璁剧疆涓洪殣钘忚〃鍗�
@@ -656,6 +635,16 @@
       }
     }
 
+    if (cell.verify && cell.verify.preHandle === 'true') {
+      try {
+        // eslint-disable-next-line
+        let func = new Function('btn', 'systemType', cell.verify.pre_func)
+        func(cell, window.GLOB.systemType)
+      } catch (e) {
+        console.warn(e)
+      }
+    }
+
     if (cell.syncComponentId) {
       if (cell.syncComponentId === item.setting.supModule) {
         cell.syncComponentId = ''
@@ -692,6 +681,10 @@
       cell.style.verticalAlign = 'top'
     }
 
+    if (cell.marks && cell.marks.length === 0) {
+      cell.marks = null
+    }
+
     if (['text', 'number', 'formula'].includes(cell.eleType)) {
       if (!cell.height) {
         cell.innerHeight = 'auto'

--
Gitblit v1.8.0