king
2024-12-04 91b24f0de889b647d581bf1d89ab94d93eb1f4fb
2024-12-04
3个文件已修改
31 ■■■■■ 已修改文件
src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/resetAttach/documents/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/resetAttach/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/resetAttach/addAttach/index.jsx
@@ -131,8 +131,8 @@
                  message: '请输入文件名!'
                },
                {
                  max: 50,
                  message: '最大长度为50位!'
                  max: 100,
                  message: '最大长度为100位!'
                }
              ]
            })(<Input />)}
src/tabviews/custom/components/module/voucher/resetAttach/documents/index.jsx
@@ -1,4 +1,5 @@
import React, {Component} from 'react'
import { fromJS } from 'immutable'
class Documents extends Component {
  state = {
@@ -7,9 +8,16 @@
  }
  UNSAFE_componentWillMount() {
    const { documents } = this.props
    const { documents, list } = this.props
    let actFolder = documents[0] || null
    let actFolder = null
    if (documents[0]) {
      actFolder = fromJS(documents[0]).toJS()
      let ids = list.map(item => item.id)
      actFolder.attachments = actFolder.attachments.filter(doc => !ids.includes(doc.id))
    }
    this.setState({selectKey: [], actFolder: actFolder})
  }
@@ -31,15 +39,17 @@
  }
  checkfolder = (id) => {
    const { documents } = this.props
    const { documents, list } = this.props
    const { actFolder } = this.state
    if (!actFolder || actFolder.id === id) return
    let _actFolder = null
    let ids = list.map(item => item.id)
    documents.forEach(item => {
      if (item.id === id) {
        _actFolder = item
        _actFolder = fromJS(item).toJS()
        _actFolder.attachments = _actFolder.attachments.filter(doc => !ids.includes(doc.id))
      }
    })
src/tabviews/custom/components/module/voucher/resetAttach/index.jsx
@@ -202,7 +202,6 @@
  docSubmit = () => {
    const { selectDocs, list } = this.state
    if (selectDocs.length > 0 && list.length > 0) {
      let _list = fromJS(list).toJS()
      let err = ''
@@ -241,7 +240,7 @@
          title="添加附件"
          wrapClassName="voucher-attach-wrap"
          visible={visible}
          width={700}
          width={'62vw'}
          maskClosable={false}
          onOk={this.submit}
          onCancel={() => { this.setState({ visible: false })}}
@@ -270,7 +269,7 @@
          title="添加附件"
          wrapClassName="voucher-attach-add-wrap"
          visible={upVisible}
          width={700}
          width={'62vw'}
          maskClosable={false}
          onOk={this.upSubmit}
          onCancel={() => { this.setState({ upVisible: false })}}
@@ -282,13 +281,13 @@
          title="电子档案"
          wrapClassName="voucher-attach-document-wrap"
          visible={docVisible}
          width={700}
          width={'62vw'}
          maskClosable={false}
          onOk={this.docSubmit}
          onCancel={() => { this.setState({ docVisible: false, selectDocs: [] })}}
          destroyOnClose
        >
          {docVisible ? <Documents documents={documents} onChange={(vals) => this.setState({selectDocs: vals})}/> : null}
          {docVisible ? <Documents documents={documents} list={list} onChange={(vals) => this.setState({selectDocs: vals})}/> : null}
        </Modal>
      </>
    )