import React from 'react'
import styles from './index.module.scss'
import EditTop from '@/pages/Zother/EditTop'
import EditBtn from '@/pages/Zother/EditBtn'
import { InfoProvider } from '@/pages/Zother/InfoContext'
import { rowArrTemp } from '@/pages/Zother/data'
import { A4API_obj } from '@/store/action/Abench/A4proof'
import SonClueList from '@/pages/Zother/SonClueList'
import FileArchive from '@/pages/Zother/FileArchive'

const rowArr = rowArrTemp('征集')

function A4edit() {
  return (
    <InfoProvider>
      <div className={styles.A4edit} id='editBox'>
        <div className='editMain'>
          {/* 顶部 */}
          <EditTop
            pageTxt='凭证中心'
            rowArr={rowArr}
            APIobj={A4API_obj}
            fileUpInfo={{ myUrl: 'cms/order/collect/upload', dirCode: 'collect' }}
          />

          {/* 线索清单 */}
          <SonClueList
            fileUpInfo={{ myUrl: 'cms/order/collect/son/upload', dirCode: 'collectClues' }}
          />

          {/* 附件归档 */}
          <FileArchive />

          {/* 底部按钮 */}
          <EditBtn path='/collect' APIobj={A4API_obj} checkListTxt='请添加线索' />
        </div>
      </div>
    </InfoProvider>
  )
}

const MemoA4edit = React.memo(A4edit)

export default MemoA4edit
