king
2 天以前 729fb5e7f41f45c6962993d86c3a4eb81c2c784b
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -308,7 +308,9 @@
        })
      } else {
        this.setState({ BID: id, BData: data }, () => {
          this.loadData()
          if (config.wrap.datatype !== 'public') {
            this.loadData()
          }
        })
      }
    }
@@ -401,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()
@@ -417,6 +419,14 @@
    const { group } = this.state
    MKEmitter.emit('closeTabView', group.subButton.$MenuID)
    let tabId = ''
    if (group.closeButton.refreshTab && group.closeButton.refreshTab.length > 0 && window.GLOB.appType !== 'pc') {
      tabId = group.closeButton.refreshTab[group.closeButton.refreshTab.length - 1]
    }
    if (tabId && group.subButton.$MenuID !== tabId) { // 刷新当前菜单时无效
      MKEmitter.emit('reloadMenuView', tabId)
    }
  }
  resetTab = () => {
@@ -450,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 || '')}>