From f128d679cacda2a6b5b730ad0368b5fe73f887f7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 14 二月 2025 15:27:02 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/utils/utils-custom.js |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 59eee91..c78b049 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -1886,6 +1886,25 @@
     if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
       if (!cell.modal || cell.modal.fields.length === 0) {
         errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑琛ㄥ崟灏氭湭娣诲姞`})
+      } else if (cell.OpenType === 'pop') {
+        let forms = []
+        cell.modal.fields.forEach(n => {
+          if (n.type === 'funcvar' && n.field) {
+            forms.push(n.field)
+          }
+        })
+        if (cell.verify && cell.verify.billcodes && cell.verify.billcodes.length > 0) {
+          let bills = cell.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field)
+          bills.forEach(n => {
+            if (!forms.includes(n)) {
+              errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍗曞彿鐢熸垚鐨勫嚱鏁板彉閲忊��${n}鈥濅笉瀛樺湪`})
+            }
+          })
+          forms = forms.filter(n => !bills.includes(n))
+        }
+        if (forms.length) {
+          errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅腑鍑芥暟鍙橀噺琛ㄥ崟鈥�${forms.join(',')}鈥濆皻鏈娇鐢╜})
+        }
       }
     } else if (cell.OpenType === 'excelIn') {
       if (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0) {
@@ -2085,6 +2104,73 @@
     }
   }
 
+  if (card.$c_fc) {
+    let idCtrl = false
+    let supModule = ''
+
+    if (card.wrap.datatype === 'dynamic') {
+      supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
+      if (supModule === 'empty') {
+        supModule = ''
+      }
+    } else {
+      if (card.wrap.datatype === 'static') {
+        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      } else {
+        supModule = null
+      }
+    }
+
+    card.subcards.forEach(item => {
+      if (item.subButton.intertype === 'system' && !item.subButton.sqlType) {
+        errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳璇疯缃搷浣滅被鍨媊})
+      }
+      if (item.subButton.verify && !item.subButton.output) {
+        if (item.subButton.verify.noteEnable === 'true') {
+          errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�肩煭淇″彂閫佹棤鏁堬紒`})
+        } else if (item.subButton.verify.emailEnable === 'true') {
+          errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�奸偖浠跺彂閫佹棤鏁堬紒`})
+        }
+      }
+
+      let forms = []
+      item.fields.forEach(m => {
+        if (m.type === 'funcvar' && m.field) {
+          forms.push(m.field)
+        }
+        if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
+          idCtrl = true
+        }
+        if (m.type === 'linkMain' && !supModule && supModule !== null) {
+          if (item.setting && item.setting.title) {
+            errors.push({ level: 1, detail: `璇锋鏌ュ垎缁勨��${item.setting.title}鈥濅腑鍏宠仈涓昏〃鈥�${m.label}鈥濇槸鍚︽湁鏁坄})
+          } else {
+            errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄})
+          }
+        }
+      })
+      
+      if (item.subButton.verify && item.subButton.verify.billcodes && item.subButton.verify.billcodes.length > 0) {
+        let bills = item.subButton.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field)
+        bills.forEach(n => {
+          if (!forms.includes(n)) {
+            errors.push({ level: 0, detail: `鎸夐挳鈥�${item.subButton.label}鈥濅腑鍗曞彿鐢熸垚鐨勫嚱鏁板彉閲忊��${n}鈥濅笉瀛樺湪`})
+          }
+        })
+        forms = forms.filter(n => !bills.includes(n))
+      }
+      if (forms.length) {
+        if (item.setting && item.setting.title) {
+          errors.push({ level: 0, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍑芥暟鍙橀噺琛ㄥ崟鈥�${forms.join(',')}鈥濆皻鏈娇鐢╜})
+        } else {
+          errors.push({ level: 0, detail: `鍑芥暟鍙橀噺琛ㄥ崟鈥�${forms.join(',')}鈥濆皻鏈娇鐢╜})
+        }
+      }
+    })
+
+    card.idCtrl = idCtrl
+  }
+
   return errors
 }
 

--
Gitblit v1.8.0