king
2022-12-19 102be577a7f8df2ae30045d55a1a5fc584f90363
src/templates/sharecomponent/actioncomponent/verifyprint/editable/index.jsx
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import { fromJS } from 'immutable'
import { Table, Input, Popconfirm, Form } from 'antd'
import { ArrowUpOutlined, ArrowDownOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
@@ -160,11 +161,14 @@
    this.setState({
      dataSource: _data
    })
    this.props.onChange(fromJS(_data).toJS())
  }
  handleDelete = key => {
    const dataSource = [...this.state.dataSource]
    this.setState({ dataSource: dataSource.filter(item => item.key !== key) })
    const dataSource = [...this.state.dataSource].filter(item => item.key !== key)
    this.setState({ dataSource: dataSource })
    this.props.onChange(fromJS(dataSource).toJS())
  }
  handleAdd = () => {
@@ -174,11 +178,13 @@
      Value: `${count}`,
      Text: `${count}`
    }
    let list = [...dataSource, newData]
    this.setState({
      dataSource: [...dataSource, newData],
      dataSource: list,
      count: count + 1
    })
    this.props.onChange(fromJS(list).toJS())
  }
  handleSave = row => {
@@ -190,10 +196,7 @@
      ...row
    })
    this.setState({ dataSource: newData })
  }
  UNSAFE_componentWillReceiveProps () {
    this.props.onChange(fromJS(newData).toJS())
  }
  render() {