From 97c484d25d4b698df7fcc2a6efcf1740156d26e2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 10 一月 2025 22:54:39 +0800
Subject: [PATCH] 2025-01-10

---
 src/utils/utils-custom.js |   49 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 4cac796..12e86d5 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -666,6 +666,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)) {
@@ -1934,6 +1943,10 @@
           })
         }
         let emptys = []
+        if (cell.Ot !== 'notRequired') {
+          forms.push(...columns)
+        }
+
         cell.verify.uniques.forEach(m => {
           if (m.status === 'false') return
 
@@ -1945,7 +1958,11 @@
         })
 
         if (emptys.length) {
-          errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓笉瀛樺湪锛乣})
+          if (cell.Ot === 'notRequired') {
+            errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓笉瀛樺湪锛乣})
+          } else {
+            errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濆敮涓�鎬ч獙璇佸瓧娈�${emptys.join('銆�')}锛屽湪琛ㄥ崟涓庡瓧娈甸泦涓笉瀛樺湪锛乣})
+          }
         }
       }
 
@@ -3385,7 +3402,9 @@
           })
         }
 
-        filterComponent(cell.config.components, _mainSearch, '-' + cell.label, true)
+        let label = (item.name ? '-' + item.name : '') + '-' + cell.label
+
+        filterComponent(cell.config.components, _mainSearch, label, true)
       }
     }
   }
@@ -3794,24 +3813,26 @@
           let _val2 = ''
   
           arr.push(_key)
-          if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺
+          if (_key === 'bid') {
             _val = BID
           } else {
-            _val = `'@mk_${_key}_mk@'`
+            // _val = `'@mk_${_key}_mk@'`
+            _val = `@${_field}`
           }
 
           _fieldValue.push(`${_key}=${_val}`)
 
-          if (_key === 'bid') { // 琛ㄥ崟涓病鏈塨id鍒欎娇鐢ㄧ郴缁焍id鍙橀噺
+          if (_key === 'bid') {
             _val2 = `' + ${BID} + '`
           } else {
-            _val2 = `@mk_${_key}_mk@`
+            // _val2 = `@mk_${_key}_mk@`
+            _val2 = `' + @${_field} + '`
           }
 
           _value.push(`${_labels[index] || ''}锛�${_val2}`)
         })
   
-        if (!arr.includes(primaryKey.toLowerCase())) {
+        if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') {
           _fieldValue.push(`${primaryKey} !=${primaryId}`)
         }
   
@@ -4065,7 +4086,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)
@@ -4084,7 +4107,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
@@ -5216,7 +5241,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)
@@ -6422,7 +6449,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