From 5733fc7e386a51217ba6d07e272ca8bd95045abc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 一月 2025 10:14:35 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/utils/utils-custom.js |   75 ++++++++++++++++++++-----------------
 1 files changed, 41 insertions(+), 34 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index db18898..021894d 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -451,11 +451,7 @@
             card.elements = card.elements.map(cell => {
               if (cell.eleType === 'button') {
                 cell.uuid = md5(commonId + cell.uuid)
-                if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
-                  cell.pageTemplate = ''
-                  cell.linkmenu = ''
-                }
-                this.resetBtn(cell, commonId)
+                this.resetBtn(cell, commonId, clear)
               } else {
                 cell.uuid = this.getuuid()
               }
@@ -467,11 +463,7 @@
             card.backElements = card.backElements.map(cell => {
               if (cell.eleType === 'button') {
                 cell.uuid = md5(commonId + cell.uuid)
-                if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
-                  cell.pageTemplate = ''
-                  cell.linkmenu = ''
-                }
-                this.resetBtn(cell, commonId)
+                this.resetBtn(cell, commonId, clear)
               } else {
                 cell.uuid = this.getuuid()
               }
@@ -491,11 +483,7 @@
           item.elements = item.elements.map(cell => {
             if (cell.eleType === 'button') {
               cell.uuid = md5(commonId + cell.uuid)
-              if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
-                cell.pageTemplate = ''
-                cell.linkmenu = ''
-              }
-              this.resetBtn(cell, commonId)
+              this.resetBtn(cell, commonId, clear)
             } else {
               cell.uuid = this.getuuid()
             }
@@ -528,12 +516,7 @@
                 cell.uuid = md5(commonId + cell.uuid)
 
                 if (cell.eleType === 'button') {
-                  if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
-                    cell.pageTemplate = ''
-                    cell.linkmenu = ''
-                  }
-
-                  this.resetBtn(cell, commonId)
+                  this.resetBtn(cell, commonId, clear)
                 }
 
                 return cell
@@ -572,11 +555,15 @@
           })
 
           if (cell.subButton) {
-            this.resetBtn(cell.subButton, commonId)
+            this.resetBtn(cell.subButton, commonId, clear)
           }
 
           return cell
         })
+      } else if (item.type === 'login') {
+        if (clear) {
+          item.wrap.linkmenu = ''
+        }
       }
   
       if (item.btnlog) {
@@ -587,12 +574,7 @@
         item.action = item.action.map(cell => {
           cell.uuid = md5(commonId + cell.uuid)
 
-          if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) {
-            cell.pageTemplate = ''
-            cell.linkmenu = ''
-          }
-
-          this.resetBtn(cell, commonId)
+          this.resetBtn(cell, commonId, clear)
 
           return cell
         })
@@ -650,7 +632,7 @@
   /**
    * @description 鎸夐挳閲嶇疆
    */
-  static resetBtn (btn, commonId) {
+  static resetBtn (btn, commonId, clear = false) {
     if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.execMode === 'pop')) {
       if (btn.modal && btn.modal.fields && btn.modal.fields.length > 0) {
         btn.modal.fields = btn.modal.fields.map(m => {
@@ -659,6 +641,16 @@
         })
       }
     }
+
+    if (clear) {
+      if (btn.pageTemplate === 'linkpage') {
+        btn.pageTemplate = ''
+      }
+      delete btn.linkmenu
+      delete btn.openmenu
+      delete btn.refreshTab
+    }
+    
     if (btn.switchTab && btn.switchTab.length > 0) {
       btn.switchTab = btn.switchTab.map(m => md5(commonId + m))
     }
@@ -666,6 +658,15 @@
       btn.anchors = btn.anchors.map(m => md5(commonId + m))
     }
     if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) {
+      if (btn.syncComponents[0] && Array.isArray(btn.syncComponents[0])) {
+        btn.syncComponents = btn.syncComponents.map((item, i) => {
+          return {
+            syncComId: item,
+            label: '',
+            uuid: 'fixed' + i
+          }
+        })
+      }
       btn.syncComponents = btn.syncComponents.map(m => {
         m.syncComId = m.syncComId.map(n => {
           if (/\$focus/.test(n)) {
@@ -3882,7 +3883,7 @@
       _sql += `
         /* 鍒涘缓鍑瘉 */
         exec s_BVoucher_Create
-          @Bill ='0',
+          @Bill = @${_voucher.linkField},
           @BVoucherType ='${_voucher.BVoucherType}',
           @VoucherTypeOne ='${_voucher.VoucherTypeOne}',
           @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}',
@@ -4077,7 +4078,9 @@
         _sql += `
           /* 宸ヤ綔娴佸紓甯竤ql */
           if @works_flow_error@ != ''
-          select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+          begin
+            select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+          end
 
           /* 宸ヤ綔娴侀粯璁ql */
           insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid)
@@ -4096,7 +4099,9 @@
         _sql += `
           /* 宸ヤ綔娴佸紓甯竤ql */
           if @works_flow_error@ != ''
-          select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+          begin
+            select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+          end
 
           if @works_flow_countersign@ = 'Y'
           begin
@@ -5228,7 +5233,9 @@
         sql += `
         /* 宸ヤ綔娴佸紓甯竤ql */
         if @works_flow_error@ != ''
-        select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+        begin
+          select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa
+        end
 
         /* 宸ヤ綔娴侀粯璁ql */
         insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid)
@@ -6434,7 +6441,7 @@
   filterComponent(config.components, _mainSearch)
 
   let keys = sqls.map(item => item.uuid)
-  if (keys.length > Array.from(new Set(keys)).length && !window.GLOB.syscheck) {
+  if (keys.length > Array.from(new Set(keys)).length) {
     if (window.backend) {
       let m = new Map()
       let n = new Map()

--
Gitblit v1.8.0