import React from 'react'
import styles from './index.module.scss'
import { baseFormData, topSearch } from '@/pages/Zother/data'
import { useSelector } from 'react-redux'
import { RootState } from '@/store'
import TableList from '@/pages/Zother/TableList'
import { D3_APIgetList } from '@/store/action/Dmanage/D3writeOff'
import { baseTableC } from '@/utils/tableData'

const search = topSearch('注销')

const baseFormDataRes = baseFormData()

function D3writeOff() {
  // 从仓库拿数据
  const tableInfo = useSelector((state: RootState) => state.D3writeOff.tableInfo)

  return (
    <div className={styles.D3writeOff}>
      <div className='pageTitle'>藏品注销</div>

      <TableList
        baseFormData={baseFormDataRes}
        getListAPI={D3_APIgetList}
        pageKey='writeOff'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('注销')}
        yHeight={585}
        searchDom={search}
      />
    </div>
  )
}

const MemoD3writeOff = React.memo(D3writeOff)

export default MemoD3writeOff
