From 4d30a5f9748b4523fe2e1d582b1e34a8e433ffc2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 13 四月 2025 10:35:17 +0800
Subject: [PATCH] 2025-04-13

---
 src/menu/components/share/pasteforms/index.jsx |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/share/pasteforms/index.jsx b/src/menu/components/share/pasteforms/index.jsx
index 6cf98a8..1f19f21 100644
--- a/src/menu/components/share/pasteforms/index.jsx
+++ b/src/menu/components/share/pasteforms/index.jsx
@@ -26,6 +26,12 @@
     const { config } = this.props
 
     this.pasteFormRef.handleConfirm().then(res => {
+      if (res.copyType === 'mk_forms') { // dms-trans
+        this.props.update(res.fields, res)
+
+        this.setState({visible: false})
+        return
+      }
       if (res.copyType === 'search' && ['text', 'select', 'multiselect', 'link', 'checkcard', 'date', 'datemonth'].includes(res.type)) {
         res.copyType = 'form'
       }
@@ -38,6 +44,8 @@
       if (res.copyType === 'form') {
         delete res.copyType
         res = {fields: [res]}
+      } else if (res.copyType === 'simpleform') {
+        res = {fields: res.subcards[0].fields}
       }
 
       res.fields = res.fields || []
@@ -85,6 +93,7 @@
     let forms = fromJS(config.fields).toJS()
     let fields = fromJS(result.fields).toJS()
     let repeats = []
+    let lastId = ''
 
     forms = forms.map(item => {
       if (!item.field) return item
@@ -92,11 +101,16 @@
       let cell = fields.filter(m => m.field && m.field.toLowerCase() === item.field.toLowerCase())[0]
       if (cell) {
         repeats.push(cell.field)
+        lastId = cell.uuid
         return cell
       }
 
       return item
     })
+
+    if (lastId) {
+      window.GLOB.formId = lastId
+    }
     
     fields = fields.filter(m => !m.field || !repeats.includes(m.field))
 

--
Gitblit v1.8.0