king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification } from 'antd'
import { notification, Modal } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -228,6 +228,15 @@
        item.$Index = start + index + ''
        item.$type = 'upt'
        item.$origin = true
        if (config.absFields) {
          config.absFields.forEach(f => {
            if (!isNaN(item[f])) {
              item[f] = Math.abs(item[f])
            }
          })
        }
        return item
      })
@@ -243,11 +252,18 @@
      this.setState({
        loading: false
      })
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else {
      notification.error({
        top: 92,
        message: result.message,
        duration: 10
      })
      }
    }
  }
@@ -286,6 +302,14 @@
      _data.$$BData = BData || ''
      _data.$type = 'upt'
      _data.$origin = true
      if (config.absFields) {
        config.absFields.forEach(f => {
          if (!isNaN(_data[f])) {
            _data[f] = Math.abs(_data[f])
          }
        })
      }
      try {
        data = data.map(item => {
@@ -550,7 +574,7 @@
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { config } = this.state
    if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
    if (config.setting.useMSearch && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({pageIndex: 1}, () => {
        this.reloadtable()
      })