|
|
@@ -2,17 +2,132 @@ import React, { useCallback, useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import http from '@/utils/http'
|
|
|
import { GoodsType } from '@/pages/Zother/SonGoodsList/data'
|
|
|
-import { selectObj } from '@/utils/dataChange'
|
|
|
+import { selectObj, getDictFu } from '@/utils/dataChange'
|
|
|
import TableList from '@/pages/Zother/TableList'
|
|
|
import { useSelector } from 'react-redux'
|
|
|
import { RootState } from '@/store'
|
|
|
import { API_getGoodsList } from '@/store/action/Cledger/C1ledger'
|
|
|
import { baseFormData, topSearch } from '@/pages/Zother/data'
|
|
|
import { baseTableC } from '@/utils/tableData'
|
|
|
+import history from '@/utils/history'
|
|
|
+import { Button, Dropdown } from 'antd'
|
|
|
+
|
|
|
+const C1topSearch = [
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ key: 'searchKey',
|
|
|
+ placeholder: '搜索藏品登记号、藏品名称,不超过30个字'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ key: 'searchTagName',
|
|
|
+ placeholder: `搜索藏品标签`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'select',
|
|
|
+ key: 'level',
|
|
|
+ placeholder: '级别',
|
|
|
+ options: selectObj['藏品级别']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'cascader',
|
|
|
+ key: 'typeDictId',
|
|
|
+ placeholder: '类别',
|
|
|
+ options: getDictFu('藏品类别')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'cascader',
|
|
|
+ key: 'ageDictId',
|
|
|
+ placeholder: '年代',
|
|
|
+ options: getDictFu('藏品年代')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'cascader',
|
|
|
+ key: 'textureDictId',
|
|
|
+ placeholder: '质地',
|
|
|
+ options: getDictFu('质地')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'select',
|
|
|
+ key: 'tornLevel',
|
|
|
+ placeholder: '完残程度',
|
|
|
+ options: selectObj['完残程度']
|
|
|
+ },
|
|
|
+ // TODO
|
|
|
+ {
|
|
|
+ type: 'select',
|
|
|
+ key: 'xxx',
|
|
|
+ placeholder: '入藏状态',
|
|
|
+ options: selectObj['藏品入藏状态']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'select',
|
|
|
+ key: 'xxx',
|
|
|
+ placeholder: '库存状态',
|
|
|
+ options: selectObj['藏品库存状态']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ key: 'xxx',
|
|
|
+ placeholder: `搜索库房位置`
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const rightBtnOptions = {
|
|
|
+ dangan: [
|
|
|
+ {
|
|
|
+ key: '1',
|
|
|
+ label: '登记',
|
|
|
+ value: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '2',
|
|
|
+ label: '注销',
|
|
|
+ value: '2'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
|
|
|
function C1ledger() {
|
|
|
const tableInfo = useSelector((state: RootState) => state.D1register.tableInfo)
|
|
|
|
|
|
+ const dataExport = () => {
|
|
|
+ console.log('数据导出了')
|
|
|
+ }
|
|
|
+
|
|
|
+ // 故事管理定制右侧内容
|
|
|
+ const storyTableListToprr = ({
|
|
|
+ clickSearch,
|
|
|
+ resetSelectFu
|
|
|
+ }: {
|
|
|
+ clickSearch: () => void
|
|
|
+ resetSelectFu: () => void
|
|
|
+ }) => {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ {/* <Dropdown menu={{ items: rightBtnOptions['dangan'] }} trigger={['click']}>
|
|
|
+ 档案管理
|
|
|
+ </Dropdown>
|
|
|
+ <Dropdown menu={{ items: rightBtnOptions['dangan'] }} trigger={['click']}>
|
|
|
+ 库房管理
|
|
|
+ </Dropdown>
|
|
|
+ <Dropdown menu={{ items: rightBtnOptions['dangan'] }} trigger={['click']}>
|
|
|
+ 藏品维护
|
|
|
+ </Dropdown> */}
|
|
|
+ <Button type='primary' onClick={dataExport}>
|
|
|
+ 数据导入
|
|
|
+ </Button>
|
|
|
+ <Button type='primary' onClick={dataExport}>
|
|
|
+ 数据导出
|
|
|
+ </Button>
|
|
|
+ <Button type='primary' onClick={clickSearch}>
|
|
|
+ 查询
|
|
|
+ </Button>
|
|
|
+ <Button onClick={resetSelectFu}>重置</Button>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<div className={styles.C1ledger}>
|
|
|
<div className='pageTitle'>藏品总账</div>
|
|
|
@@ -23,8 +138,11 @@ function C1ledger() {
|
|
|
pageKey='ledger'
|
|
|
tableInfo={tableInfo}
|
|
|
columnsTemp={baseTableC('总账')}
|
|
|
+ rightBtnWidth={390}
|
|
|
+ leftRowWidth={'20%'}
|
|
|
yHeight={585}
|
|
|
- searchDom={topSearch('总账')}
|
|
|
+ searchDom={C1topSearch}
|
|
|
+ storyTableListToprr={storyTableListToprr}
|
|
|
/>
|
|
|
</div>
|
|
|
)
|