From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 五月 2024 10:56:41 +0800
Subject: [PATCH] 2024-05-16

---
 src/tabviews/zshare/mutilform/index.jsx |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 309cff6..f3de88e 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -617,7 +617,11 @@
         item.supInitVal = ''
 
         if (fieldMap.has(item.linkField)) {
-          item.supInitVal = fieldMap.get(item.linkField).initval || ''
+          let supitem = fieldMap.get(item.linkField)
+          item.supInitVal = supitem.initval || ''
+          if (supitem.$first) {
+            item.$resetSup = true
+          }
         } else if (data.hasOwnProperty(item.linkField.toLowerCase())) {
           item.supInitVal = data[item.linkField.toLowerCase()]
         }
@@ -1087,7 +1091,11 @@
 
         // if (item.type === 'link') {
         if (item.linkField) {
-          item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.value === '')
+          let supInitVal = item.supInitVal
+          if (item.$resetSup) {
+            supInitVal = this.record[item.linkField]
+          }
+          item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.value === '')
         // } else if (['select', 'radio', 'checkbox', 'checkcard', 'multiselect'].includes(item.type)) {
         } else {
           item.options = item.oriOptions

--
Gitblit v1.8.0