king
2023-02-10 253fbcbdd06f6354e857a8e1e47ddf116459df42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React, {Component} from 'react'
import { fromJS } from 'immutable'
import { Button, Modal } from 'antd'
 
import './index.scss'
 
class ResetAttach extends Component {
  state = {
    visible: false,
    list: ''
  }
 
  submit = () => {
    this.setState({remark: '', visible: false})
    this.props.onChange()
  }
 
  trigger = () => {
    const { attachlist } = this.props
 
    this.setState({visible: true, list: fromJS(attachlist).toJS()})
  }
 
  render() {
    const { visible } = this.state
 
    return (
      <>
        <Button type="link" onClick={this.trigger}>附件</Button>
        <Modal
          title="添加附件"
          wrapClassName="voucher-attach-wrap"
          visible={visible}
          width={700}
          maskClosable={false}
          onOk={this.submit}
          onCancel={() => { this.setState({ visible: false })}}
          cancelText=""
          destroyOnClose
        >
          <Button type="link" className="attach-type-btn" onClick={this.trigger}>上传新文件</Button>
          <Button type="link" className="attach-type-btn" onClick={this.trigger}>从会计电子档案选择</Button>
          <div className="attach-selected-list">
 
 
          </div>
        </Modal>
      </>
    )
  }
}
 
export default ResetAttach