From 729fb5e7f41f45c6962993d86c3a4eb81c2c784b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 六月 2025 23:06:06 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/zshare/mutilform/mkSwitch/index.jsx          |    4 +-
 public/manifest.json                                      |    2 
 src/tabviews/rolemanage/index.jsx                         |    8 +++-
 src/tabviews/zshare/mutilform/mkPopSelect/index.jsx       |    4 +-
 src/tabviews/custom/popview/index.jsx                     |    2 
 src/tabviews/zshare/mutilform/index.jsx                   |   11 +++++
 src/tabviews/zshare/mutilform/mkCheck/index.jsx           |    4 +-
 src/tabviews/zshare/mutilform/mkSelect/index.jsx          |    4 +-
 src/tabviews/custom/index.jsx                             |    2 
 src/tabviews/zshare/mutilform/mkInput/index.jsx           |    2 
 src/tabviews/custom/components/form/simple-form/index.jsx |    6 +-
 src/tabviews/zshare/mutilform/mkVercode/index.jsx         |    2 
 src/tabviews/zshare/mutilform/mkNumberInput/index.jsx     |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx     |   22 ++++++++---
 src/tabviews/zshare/mutilform/mkDatePicker/index.jsx      |    2 
 src/utils/utils.js                                        |    4 ++
 16 files changed, 54 insertions(+), 27 deletions(-)

diff --git a/public/manifest.json b/public/manifest.json
index 809cb78..2ce0dbe 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -6,5 +6,5 @@
   "display": "standalone",
   "theme_color": "#000000",
   "background_color": "#ffffff",
-  "mk_version": "20250502"
+  "mk_version": "20250605"
 }
diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx
index c3edeff..fc9822d 100644
--- a/src/tabviews/custom/components/form/simple-form/index.jsx
+++ b/src/tabviews/custom/components/form/simple-form/index.jsx
@@ -403,12 +403,12 @@
     }
   }
 
-  mkFormSubmit = (btnId, callback, formId) => {
+  mkFormSubmit = (btnId, callback, formId, errId) => {
     const { group } = this.state
 
     if (group.uuid !== btnId) return
 
-    this.formRef.handleConfirm(formId).then(res => {
+    this.formRef.handleConfirm(formId, errId).then(res => {
       MKEmitter.emit('triggerFormSubmit', {menuId: btnId, form: res})
     }, () => {
       callback && callback()
@@ -460,7 +460,7 @@
           data={data}
           action={group}
           unload={config.setting.supModule && !BID}
-          inputSubmit={(id) => this.mkFormSubmit(group.uuid, null, id)}
+          inputSubmit={(id, errId) => this.mkFormSubmit(group.uuid, null, id, errId)}
           wrappedComponentRef={(inst) => this.formRef = inst}
         /> : null}
         {data ? <div className={'mk-form-action ' + (group.$button || '')}>
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 36e091f..9e84a15 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -1258,7 +1258,7 @@
       } else if (component.wrap && component.wrap.datatype === 'static') {
         component.format = ''
         component.setting = component.setting || {}
-        component.setting.useMSearch = false
+        component.setting.useMSearch = component.wrap.useMSearch === 'true'
         component.setting.sync = 'false'
 
         return component
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 57a2d3f..f0139d1 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -905,7 +905,7 @@
       } else if (component.wrap && component.wrap.datatype === 'static') {
         component.format = ''
         component.setting = component.setting || {}
-        component.setting.useMSearch = false
+        component.setting.useMSearch = component.wrap.useMSearch === 'true'
         component.setting.sync = 'false'
 
         return component
diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx
index 8ecdb80..4801d55 100644
--- a/src/tabviews/rolemanage/index.jsx
+++ b/src/tabviews/rolemanage/index.jsx
@@ -142,11 +142,11 @@
    * @description 鑾峰彇鎵�鏈夎彍鍗曡妭鐐癸紝褰㈡垚鏉冮檺鏍�
    */
   getAllMenuList = async () => {
-    const { selectRoleId, mainMenus } = this.state
+    const { mainMenus } = this.state
 
     let param = {
       func: 's_rolemenu_get_FunMenu',
-      RoleID: selectRoleId,
+      RoleID: '',
       SelectedType: '',
       version: 1
     }
@@ -186,6 +186,10 @@
         loadingTree: false,
         menuTrees: _tree,
         menuOpenKeys: _openKeys
+      }, () => {
+        if (this.state.selectRoleId) {
+          this.getSelectMenuList()
+        }
       })
     } else {
       this.setState({
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index b415701..6a1abc0 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2682,11 +2682,16 @@
       delete result.message
       delete result.status
 
-      param = {
-        ...outParam,
-        ...result,
-        func: btn.callbackFunc
-      }
+      param = {}
+
+      Object.keys(outParam).forEach(key => {
+        param[key.toLowerCase()] = outParam[key]
+      })
+      Object.keys(result).forEach(key => {
+        param[key.toLowerCase()] = result[key]
+      })
+
+      param.func = btn.callbackFunc
 
       if (window.GLOB.mkHS) {
         if (btn.callbackFunc === 's_sVersion_Local_add' && window.GLOB.forcedUpdate) { // special 浼犺緭鍙锋坊鍔犲洖璋冨鐞�
@@ -3011,6 +3016,7 @@
     if (focusField) {
       MKEmitter.emit('resetFocus', btn.uuid, focusField)
     }
+    window.GLOB.errFocusId = ''
 
     this.setState({
       loadingNumber: '',
@@ -3837,7 +3843,11 @@
       loadingTotal: '',
     })
 
-    if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
+    if (window.GLOB.errFocusId && (btnconfig || btn.OpenType === 'formSubmit')) {
+      MKEmitter.emit('mkFC', 'focus', window.GLOB.errFocusId)
+
+      window.GLOB.errFocusId = ''
+    } else if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
       MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
     }
 
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 37fb86b..f185b87 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -696,6 +696,13 @@
       
       if (item.enter === 'tab' || item.enter === 'sub') {
         item.tabUuid = ''
+        if (item.enter === 'sub' && item.errTabField) {
+          if (item.errTabField === 'origin') {
+            item.errTabUuid = item.uuid
+          } else if (fieldMap.has(item.errTabField)) {
+            item.errTabUuid = fieldMap.get(item.errTabField).uuid
+          }
+        }
         if (item.tabField && fieldMap.has(item.tabField)) {
           item.tabUuid = fieldMap.get(item.tabField).uuid
         } else if (item.enter === 'tab') {
@@ -1550,10 +1557,11 @@
     return fields
   }
 
-  handleConfirm = (formId) => {
+  handleConfirm = (formId, errId) => {
     const { action } = this.props
     const { formlist, send_type, timestamp, n_id } = this.state
 
+    window.GLOB.errFocusId = ''
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     return new Promise((resolve, reject) => {
       this.props.form.validateFieldsAndScroll((err, values) => {
@@ -1680,6 +1688,7 @@
         })
 
         this.submitId = formId || ''
+        window.GLOB.errFocusId = errId || ''
 
         if (locals) {
           sessionStorage.setItem('local_' + action.uuid, JSON.stringify(locals))
diff --git a/src/tabviews/zshare/mutilform/mkCheck/index.jsx b/src/tabviews/zshare/mutilform/mkCheck/index.jsx
index b6c3195..0079dd8 100644
--- a/src/tabviews/zshare/mutilform/mkCheck/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkCheck/index.jsx
@@ -30,10 +30,10 @@
         config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
         if (config.linkFields || config.subFields || config.controlFields) {
           setTimeout(() => {
-            this.props.onSubmit(config.tabUuid)
+            this.props.onSubmit(config.tabUuid, config.errTabUuid)
           }, 1000)
         } else {
-          this.props.onSubmit(config.tabUuid)
+          this.props.onSubmit(config.tabUuid, config.errTabUuid)
         }
       }
     })
diff --git a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx
index 48ababe..1f96b82 100644
--- a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx
@@ -78,7 +78,7 @@
         MKEmitter.emit('mkFC', 'focus', config.tabUuid)
       } else if (config.enter === 'sub') {
         config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
-        this.props.onSubmit(config.tabUuid)
+        this.props.onSubmit(config.tabUuid, config.errTabUuid)
       }
     }, 50)
   }
diff --git a/src/tabviews/zshare/mutilform/mkInput/index.jsx b/src/tabviews/zshare/mutilform/mkInput/index.jsx
index 9bdbbcf..0083264 100644
--- a/src/tabviews/zshare/mutilform/mkInput/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -125,7 +125,7 @@
       MKEmitter.emit('mkFC', 'focus', config.tabUuid)
     } else {
       MKEmitter.emit('mkFC', 'focus', config.tabUuid)
-      this.props.onSubmit(config.tabUuid)
+      this.props.onSubmit(config.tabUuid, config.errTabUuid)
     }
   }
 
diff --git a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
index aa4d070..b842510 100644
--- a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
@@ -71,7 +71,7 @@
       MKEmitter.emit('mkFC', 'focus', config.tabUuid)
     } else {
       MKEmitter.emit('mkFC', 'focus', config.tabUuid)
-      this.props.onSubmit(config.tabUuid)
+      this.props.onSubmit(config.tabUuid, config.errTabUuid)
     }
   }
 
diff --git a/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx b/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx
index bc9fe92..3aca1c8 100644
--- a/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx
@@ -360,10 +360,10 @@
         config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
         if (config.subFields) {
           setTimeout(() => {
-            this.props.onSubmit(config.tabUuid)
+            this.props.onSubmit(config.tabUuid, config.errTabUuid)
           }, 1000)
         } else {
-          this.props.onSubmit(config.tabUuid)
+          this.props.onSubmit(config.tabUuid, config.errTabUuid)
         }
       }
     })
diff --git a/src/tabviews/zshare/mutilform/mkSelect/index.jsx b/src/tabviews/zshare/mutilform/mkSelect/index.jsx
index ebc1a80..7371348 100644
--- a/src/tabviews/zshare/mutilform/mkSelect/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkSelect/index.jsx
@@ -162,10 +162,10 @@
         config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
         if (config.linkFields || config.subFields || config.controlFields) {
           setTimeout(() => {
-            this.props.onSubmit(config.tabUuid)
+            this.props.onSubmit(config.tabUuid, config.errTabUuid)
           }, 1000)
         } else {
-          this.props.onSubmit(config.tabUuid)
+          this.props.onSubmit(config.tabUuid, config.errTabUuid)
         }
       }
     })
diff --git a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
index 7cea5b9..ad7c009 100644
--- a/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkSwitch/index.jsx
@@ -41,10 +41,10 @@
         config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
         if (config.linkFields || config.subFields || config.controlFields) {
           setTimeout(() => {
-            this.props.onSubmit(config.tabUuid)
+            this.props.onSubmit(config.tabUuid, config.errTabUuid)
           }, 1000)
         } else {
-          this.props.onSubmit(config.tabUuid)
+          this.props.onSubmit(config.tabUuid, config.errTabUuid)
         }
       }
     })
diff --git a/src/tabviews/zshare/mutilform/mkVercode/index.jsx b/src/tabviews/zshare/mutilform/mkVercode/index.jsx
index 7f6eff9..080584d 100644
--- a/src/tabviews/zshare/mutilform/mkVercode/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkVercode/index.jsx
@@ -56,7 +56,7 @@
       MKEmitter.emit('mkFC', 'focus', config.tabUuid)
     } else {
       config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid)
-      this.props.onSubmit(config.tabUuid)
+      this.props.onSubmit(config.tabUuid, config.errTabUuid)
     }
   }
 
diff --git a/src/utils/utils.js b/src/utils/utils.js
index c655419..d9502c6 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -1188,6 +1188,10 @@
 
         val = val.replace(/(^\s+$)|\t+|\v+/ig, '')
 
+        if (col.interception !== 'false') {
+          val = val.replace(/^\s+|\s+$/g, '')
+        }
+
         if (!val && col.required === 'true') {            // 蹇呭~鏍¢獙
           errors.push(_position + '鍐呭涓嶅彲涓虹┖')
         } else if (col.limit && val.length > col.limit) { // 闀垮害鏍¢獙

--
Gitblit v1.8.0