From 9a7fd64a5af9d441ef9b92a3d3c8b3b8bc1cd8e2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 08 二月 2025 12:22:21 +0800
Subject: [PATCH] 2025-02-08

---
 src/tabviews/zshare/mutilform/index.jsx |   90 ++++++++++++++++++++++++++++++---------------
 1 files changed, 60 insertions(+), 30 deletions(-)

diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 53398a4..4d4591f 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -173,6 +173,7 @@
       } else if (item.type === 'linkMain') {
         readin = false
         item.readin = false
+        item.$verify = item.verifyVal === 'true'
       } else if (item.type === 'number') {
         item.decimal = item.decimal || 0
         item.fieldlength = item.decimal
@@ -286,6 +287,17 @@
         } else {
           item.showValue = ''
         }
+        if (window.backend && action.uuid) {
+          item.formSqlId = md5(action.uuid.replace(/_pop$/, '') + item.uuid)
+        }
+      } else if (item.type === 'brafteditor') {
+        if (window.backend && newval && /<\/span>/.test(newval) && item.encryption === 'true') {
+          try {
+            newval = window.btoa(window.encodeURIComponent(newval))
+          } catch (e) {
+            newval = ''
+          }
+        }
       }
 
       if (newval !== '$empty') {
@@ -389,7 +401,7 @@
             })
           } else if (item.regular === 'phone') {
             item.rules.push({
-              pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
+              pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\s?\d{4}\s?\d{4}$/,
               message: item.regularText || dict['phone_error'] || '璇锋纭緭鍏ユ墜鏈哄彿'
             })
           } else if (item.regular === 'email') {
@@ -940,11 +952,13 @@
       return new Promise(resolve => {
         Api.getSystemCacheConfig(item, cache).then(res => {
           if (!res.status) {
-            notification.warning({
-              top: 92,
-              message: res.message,
-              duration: 5
-            })
+            if (res.ErrCode !== '-2') {
+              notification.warning({
+                top: 92,
+                message: res.message,
+                duration: 5
+              })
+            }
             skip = true
           }
           resolve(res)
@@ -1036,11 +1050,13 @@
         new Promise(resolve => {
           Api.getSystemCacheConfig(param, cache).then(res => {
             if (!res.status) {
-              notification.warning({
-                top: 92,
-                message: res.message,
-                duration: 5
-              })
+              if (res.ErrCode !== '-2') {
+                notification.warning({
+                  top: 92,
+                  message: res.message,
+                  duration: 5
+                })
+              }
               skip = true
             }
             resolve(res)
@@ -1078,11 +1094,13 @@
         new Promise(resolve => {
           Api.getSystemCacheConfig(mainparam, cache).then(res => {
             if (!res.status) {
-              notification.warning({
-                top: 92,
-                message: res.message,
-                duration: 5
-              })
+              if (res.ErrCode !== '-2') {
+                notification.warning({
+                  top: 92,
+                  message: res.message,
+                  duration: 5
+                })
+              }
               skip = true
             }
             resolve(res)
@@ -1148,11 +1166,13 @@
           setTimeout(() => {
             Api.getSystemCacheConfig(param, cache).then(res => {
               if (!res.status) {
-                notification.warning({
-                  top: 92,
-                  message: res.message,
-                  duration: 5
-                })
+                if (res.ErrCode !== '-2') {
+                  notification.warning({
+                    top: 92,
+                    message: res.message,
+                    duration: 5
+                  })
+                }
                 skip = true
               }
               resolve(res)
@@ -1515,6 +1535,11 @@
             key: item.field,
             isconst: item.constant === 'true'
           }
+
+          if (item.$verify) {
+            _item.$verify = true
+            _item.label = item.label
+          }
     
           _item.value = record[item.field] !== undefined ? record[item.field] : ''
     
@@ -1526,7 +1551,7 @@
           } else if (['text', 'textarea', 'linkMain'].includes(item.type)) {
             _item.value = _item.value + ''
             _item.value = _item.value.replace(/\t+|\v+/g, '')       // 鍘婚櫎鍒惰〃绗�
-    
+
             if (item.interception !== 'false') {                    // 鍘婚櫎棣栧熬绌烘牸
               if (item.interception === 'func') {
                 try {
@@ -1556,14 +1581,19 @@
                 _item.value = _item.value.replace(/(^\s*|\s*$)/g, '')
               }
             }
-            if (item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 鐗规畩瀛楁鏇挎崲
-              _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
-            }
-            if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') {
-              if (item.lenControl === 'left') {
-                _item.value = _item.value.substr(0, item.fieldlength)
-              } else {
-                _item.value = _item.value.slice(-item.fieldlength)
+            if (item.type === 'text') {
+              if (/@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 鐗规畩瀛楁鏇挎崲
+                _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
+              }
+              if (item.lenControl && item.lenControl !== 'limit') {
+                if (item.lenControl === 'left') {
+                  _item.value = _item.value.substr(0, item.fieldlength)
+                } else {
+                  _item.value = _item.value.slice(-item.fieldlength)
+                }
+              }
+              if (item.regular === 'phone') {
+                _item.value = _item.value.replace(/\s+/g, '')
               }
             }
           } else if (item.type === 'datemonth') {

--
Gitblit v1.8.0