From 7bd04b1c21a59e8d79325f247bdb1726507b51fb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 13 八月 2024 18:51:20 +0800
Subject: [PATCH] 2024-08-13

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

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 1141a14..c64fdea 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -703,10 +703,6 @@
   * @return {String}  item 缁勪欢淇℃伅
   */
   static resetComponentConfig = (item, appType, commonId) => {
-    if (item.type === 'navbar') {
-      return item
-    }
-
     if (item.subtype === 'tablecard') { // 鍏煎
       item.type = 'card'
     }
@@ -724,7 +720,22 @@
       item.name = item.setting.name
     }
 
-    if (item.type === 'menubar') {
+    if (item.columns) {
+      item.columns = item.columns.map(cell => {
+        cell.uuid = this.getuuid()
+        return cell
+      })
+    }
+
+    if (item.type === 'navbar') {
+      if (appType === 'mob') {
+        item.menus.forEach(menu => {
+          menu.MenuID = this.getuuid()
+        })
+        item.wrap.MenuNo = item.wrap.MenuNo + sign
+      }
+      return item
+    } else if (item.type === 'menubar') {
       item.subMenus = item.subMenus.map(cell => {
         cell.uuid = this.getuuid()
         return cell
@@ -923,12 +934,6 @@
       }
     } else if (item.search) {
       item.search = item.search.map(cell => {
-        cell.uuid = this.getuuid()
-        return cell
-      })
-    }
-    if (item.columns) {
-      item.columns = item.columns.map(cell => {
         cell.uuid = this.getuuid()
         return cell
       })
@@ -1842,21 +1847,27 @@
           errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒`})
         }
       } else if (cell.intertype === 'custom' || cell.intertype === 'outer') {
-        if (cell.callbackType === 'script' && (!cell.verify || !cell.verify.cbScripts || !cell.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) {
+        if (cell.callbackType === 'script' && (!cell.verify || !cell.verify.cbScripts || cell.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) {
           errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鑷畾涔夎剼鏈洖璋冿紝鍥炶皟鑴氭湰涓嶅彲涓虹┖锛乣})
         } else if (cell.procMode === 'system' && cell.Ot === 'notRequired' && cell.verify && cell.verify.voucher && cell.verify.voucher.enabled) {
           errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒`})
         }
       }
-    } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'print') {
-      if (!cell.verify || !cell.verify.printMode) {
-        errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濊瀹屽杽楠岃瘉淇℃伅锛乣})
-      } else if (cell.intertype === 'system' && cell.verify.dataType === 'custom' && (!cell.verify.setting || cell.verify.columns.length === 0)) {
-        errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鑷畾涔夋墦鍗版暟鎹紝璇疯缃暟鎹簮锛乣})
+    } else if (cell.OpenType === 'funcbutton') {
+      if (cell.funcType === 'print') {
+        if (!cell.verify || !cell.verify.printMode) {
+          errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濊瀹屽杽楠岃瘉淇℃伅锛乣})
+        } else if (cell.intertype === 'system' && cell.verify.dataType === 'custom' && (!cell.verify.setting || cell.verify.columns.length === 0)) {
+          errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濅娇鐢ㄤ簡鑷畾涔夋墦鍗版暟鎹紝璇疯缃暟鎹簮锛乣})
+        }
+      } else if ((cell.funcType === 'refund' || cell.funcType === 'pay') && cell.payMode === 'system' && (!cell.verify || !cell.verify.scripts || cell.verify.scripts.filter(item => item.status !== 'false').length === 0)) {
+        errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋渶娣诲姞鑷畾涔夎剼鏈紒`})
       }
     } else if (cell.OpenType === 'innerpage' || cell.OpenType === 'outerpage') {
       if (!cell.pageTemplate) {
         errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋〉闈㈢被鍨嬭缃敊璇紒`})
+      } else if (cell.pageTemplate === 'pay' && cell.payMode === 'system' && (!cell.verify || !cell.verify.scripts || cell.verify.scripts.filter(item => item.status !== 'false').length === 0)) {
+        errors.push({ level: 0, detail: `鎸夐挳鈥�${cell.label}鈥濋渶娣诲姞鑷畾涔夎剼鏈紒`})
       }
     }
   }
@@ -2050,6 +2061,13 @@
       duration: 5
     })
     return false
+  } else if (/\sdecimal\(8,/ig.test(sql)) {
+    notification.warning({
+      top: 92,
+      message: `涓嶅彲浣跨敤 decimal(8`,
+      duration: 5
+    })
+    return false
   } else if (type === 'customscript' && /\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(sql)) {
     let list = sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
     let errors = []

--
Gitblit v1.8.0