king
2019-12-19 ff045a6a19e2e0bd5c2433aae71145401627c22d
src/tabviews/commontable/mainAction/index.jsx
@@ -32,11 +32,15 @@
    this.props.refreshdata(item, type)
  }
  
  actionTrigger = (item) => {
  actionTrigger = (item, record) => {
    const { setting } = this.props
    let _this = this
    let data = this.props.gettableselected() || []
    if (record) { // 表格中触发按钮
      data = [record]
    }
    if (item.Ot !== 'notRequired' && data.length === 0) {
      // 需要选择行时,校验数据
@@ -88,6 +92,7 @@
        this.improveAction(item)
      })
    } else if (item.OpenType === 'excelOut') {
      this.setState({loadingUuid: item.uuid})
      this.refreshdata(item, 'excelOut')
    } else {
      notification.warning({
@@ -497,11 +502,17 @@
  }
  execSuccess = (btn) => {
    notification.success({
      top: 92,
      message: this.props.dict['main.action.confirm.success'],
      duration: 2
    })
    if (btn.OpenType === 'excelOut') {
      this.setState({
        loadingUuid: ''
      })
    } else {
      notification.success({
        top: 92,
        message: this.props.dict['main.action.confirm.success'],
        duration: 2
      })
    }
    
    if (btn.OpenType === 'pop' && btn.setting && btn.setting.finish !== 'unclose') {
      this.setState({
@@ -512,11 +523,18 @@
  }
  execError = (res, btn) => {
    notification.error({
      top: 92,
      message: res.message,
      duration: 15
    })
    if (!res.ErrCode || res.ErrCode === 'E') {
      notification.error({
        top: 92,
        message: res.message || res.ErrMesg,
        duration: 15
      })
    } else if (res.ErrCode === 'E') {
      Modal.error({
        title: res.message || res.ErrMesg
      })
    }
    this.refreshdata(btn, 'error')
  }