From 8e3b4c6dede34e8be6ba47a20ecd9a70576675cf Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 13 一月 2025 18:02:33 +0800
Subject: [PATCH] 2025-01-13

---
 src/utils/utils-custom.js |   52 ++++++++++++++++++++++------------------------------
 1 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 12e86d5..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))
     }
@@ -3891,7 +3883,7 @@
       _sql += `
         /* 鍒涘缓鍑瘉 */
         exec s_BVoucher_Create
-          @Bill ='0',
+          @Bill = @${_voucher.linkField},
           @BVoucherType ='${_voucher.BVoucherType}',
           @VoucherTypeOne ='${_voucher.VoucherTypeOne}',
           @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}',

--
Gitblit v1.8.0