From 3d4bc79a80eb9cff0f8ef7c53f9685c9ff9fbd2d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 02 九月 2021 23:17:36 +0800
Subject: [PATCH] 2021-09-02

---
 src/tabviews/verupmanage/actionList/index.jsx |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/tabviews/verupmanage/actionList/index.jsx b/src/tabviews/verupmanage/actionList/index.jsx
index 5671678..23dd7ef 100644
--- a/src/tabviews/verupmanage/actionList/index.jsx
+++ b/src/tabviews/verupmanage/actionList/index.jsx
@@ -2,13 +2,16 @@
 import PropTypes from 'prop-types'
 import moment from 'moment'
 import { Button, Modal, notification, message } from 'antd'
-import MutilForm from '@/tabviews/zshare/mutilform'
+
+import asyncSpinComponent from '@/utils/asyncSpinComponent'
 import Utils, { getSysDefaultSql } from '@/utils/utils.js'
 import options from '@/store/options.js'
+import { updateForm } from '@/utils/utils-update.js'
 import Api from '@/api'
 import './index.scss'
 
 const { confirm } = Modal
+const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform'))
 
 class MainAction extends Component {
   static propTpyes = {
@@ -109,6 +112,7 @@
         this.setState({loadingUuid: ''})
       })
     } else if (item.OpenType === 'pop') {
+      item = updateForm(item)
       if (item.setting.display === 'prompt') { // 濡傛灉琛ㄥ崟浠ユ槸鍚︽灞曠ず锛屼笉璇锋眰涓嬫媺鑿滃崟淇℃伅
         this.setState({
           execAction: item,
@@ -436,6 +440,7 @@
     let param = params.shift()
     let _outParam = null
     let _localParam = null
+    let errRes = null
 
     if (widthNumber) {
       this.setState({
@@ -539,9 +544,11 @@
       }
     }).then(res => {
       if (!res) return
-
+      
       if (_localParam) {
-
+        if (!res.status) {
+          errRes = res
+        }
         return Api.getLocalConfig(_localParam)
       } else if (res.status) {
         if (params.length === 0) {
@@ -557,7 +564,7 @@
     }).then(res => {
       if (!res) return
 
-      if (res.status) {
+      if (res.status && !errRes) {
         if (params.length === 0) {
           this.execSuccess(btn, res)
           _resolve()
@@ -565,7 +572,7 @@
           this.outerLoopRequest(params, btn, _resolve, widthNumber)
         }
       } else {
-        this.execError(res, btn)
+        this.execError(errRes || res, btn)
         _resolve()
       }
     })
@@ -648,17 +655,10 @@
     const { BData } = this.props
     const { execAction, tabledata } = this.state
     let _this = this
-    let _fields = []
-    
-    if (execAction.groups.length > 0) {
-      execAction.groups.forEach(group => {
-        _fields = [..._fields, ...group.sublist]
-      })
-    } else {
-      _fields = execAction.fields
-    }
 
-    let result = _fields.map(item => {
+    let result = []
+    execAction.fields.forEach(item => {
+      if (!item.field) return
       let _readin = item.readin !== 'false'
       let _initval = item.initval
 
@@ -679,14 +679,14 @@
         _fieldlen = item.decimal ? item.decimal : 0
       }
 
-      return {
+      result.push({
         key: item.field,
         readonly: item.readonly === 'true',
         readin: _readin,
         fieldlen: _fieldlen,
         type: item.type,
         value: _initval
-      }
+      })
     })
 
     confirm({

--
Gitblit v1.8.0