From a5f41b5d98f23d618dc7519c605ce943b114dfd5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 13 十一月 2023 18:07:51 +0800
Subject: [PATCH] 2023-11-13

---
 src/menu/components/form/formaction/formconfig.jsx |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx
index 978be6e..75d27e3 100644
--- a/src/menu/components/form/formaction/formconfig.jsx
+++ b/src/menu/components/form/formaction/formconfig.jsx
@@ -4,7 +4,7 @@
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
 
-export function getActionForm (card, functip, tableName, usefulFields, modules, anchors, uuid) {
+export function getActionForm (card, functip, tableName, usefulFields, modules, anchors, uuid, fields) {
   const appType = sessionStorage.getItem('appType')
   let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
   let _type = '鎻愪氦'
@@ -121,6 +121,21 @@
       value: 'popclose',  // 鎵ц寮圭獥鍏抽棴鏃剁殑鍒锋柊
       text: '鍒锋柊婧愮粍浠�'
     })
+  }
+
+  let resets = []
+  fields.forEach(item => {
+    if (item.hidden === 'true') return
+    if (item.type !== 'text' && item.type !== 'number') return
+
+    resets.push({
+      value: item.uuid,
+      text: item.label
+    })
+  })
+
+  if (card.resetForm && resets.findIndex(item => item.value === card.resetForm) === -1) {
+    card.resetForm = ''
   }
 
   return [
@@ -476,6 +491,16 @@
       options: linkButtons
     },
     {
+      type: 'select',
+      key: 'resetForm',
+      label: '閲嶇疆琛ㄥ崟',
+      tooltip: '鎸夐挳鎵ц鎴愬姛鍚庨渶瑕侀噸缃殑琛ㄥ崟锛岃〃鍗曚細鎭㈠榛樿鍊煎苟鑱氱劍銆�',
+      initVal: card.resetForm || '',
+      required: false,
+      allowClear: true,
+      options: resets
+    },
+    {
       type: 'radio',
       key: 'reload',
       label: '涓婁竴椤�',

--
Gitblit v1.8.0