|
@@ -1,4 +1,4 @@
|
|
|
-import React, { useMemo, useState } from 'react'
|
|
|
|
|
|
|
+import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import { authorityFu } from '@/utils/authority'
|
|
import { authorityFu } from '@/utils/authority'
|
|
|
import { selectObj, getDictFu, resJiLianFu } from '@/utils/dataChange'
|
|
import { selectObj, getDictFu, resJiLianFu } from '@/utils/dataChange'
|
|
@@ -7,6 +7,7 @@ import TableList from '@/pages/Zother/TableList'
|
|
|
import { useSelector } from 'react-redux'
|
|
import { useSelector } from 'react-redux'
|
|
|
import { RootState } from '@/store'
|
|
import { RootState } from '@/store'
|
|
|
import { API_getGoodsList, API_getGoodsListAll } from '@/store/action/Cledger/C1ledger'
|
|
import { API_getGoodsList, API_getGoodsListAll } from '@/store/action/Cledger/C1ledger'
|
|
|
|
|
+import { I1_APIwarehouseSimpleList } from '@/store/action/Isystem/I1storageSet'
|
|
|
import { baseFormData } from '@/pages/Zother/data'
|
|
import { baseFormData } from '@/pages/Zother/data'
|
|
|
import { goodsSonTableC } from '@/utils/tableData'
|
|
import { goodsSonTableC } from '@/utils/tableData'
|
|
|
import { Button, Dropdown, Modal, Radio, Checkbox } from 'antd'
|
|
import { Button, Dropdown, Modal, Radio, Checkbox } from 'antd'
|
|
@@ -14,67 +15,6 @@ import { exportExcelFile } from '@/utils/xlsxExport'
|
|
|
import { CaretDownOutlined } from '@ant-design/icons'
|
|
import { CaretDownOutlined } from '@ant-design/icons'
|
|
|
import C1Import from './C1Import'
|
|
import C1Import from './C1Import'
|
|
|
|
|
|
|
|
-const C1topSearch = [
|
|
|
|
|
- {
|
|
|
|
|
- type: 'input',
|
|
|
|
|
- key: 'searchKey',
|
|
|
|
|
- placeholder: '搜索藏品登记号、藏品名称'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- 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: 'status',
|
|
|
|
|
- placeholder: '入藏状态',
|
|
|
|
|
- options: selectObj['藏品入藏状态']
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: 'select',
|
|
|
|
|
- key: 'siteStatus',
|
|
|
|
|
- placeholder: '库存状态',
|
|
|
|
|
- options: selectObj['藏品库存状态']
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: 'select',
|
|
|
|
|
- key: 'siteLoc',
|
|
|
|
|
- placeholder: `搜索库房位置`
|
|
|
|
|
- }
|
|
|
|
|
-]
|
|
|
|
|
-
|
|
|
|
|
const C1baseFormData = {
|
|
const C1baseFormData = {
|
|
|
...baseFormData,
|
|
...baseFormData,
|
|
|
typeDictId: '',
|
|
typeDictId: '',
|
|
@@ -85,8 +25,8 @@ const C1baseFormData = {
|
|
|
const columnsTempAdd = [
|
|
const columnsTempAdd = [
|
|
|
...goodsSonTableC(false),
|
|
...goodsSonTableC(false),
|
|
|
['select', '入藏状态', 'status', selectObj['藏品入藏状态']],
|
|
['select', '入藏状态', 'status', selectObj['藏品入藏状态']],
|
|
|
- ['txt', '库存状态', 'siteStatus'],
|
|
|
|
|
- ['txt', '库房位置', 'siteLoc']
|
|
|
|
|
|
|
+ ['select', '库存状态', 'siteStatus', selectObj['藏品库存状态']],
|
|
|
|
|
+ ['connectTxt', '库房位置', 'storageName', 'siteLoc']
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
const ExportModal = ({
|
|
const ExportModal = ({
|
|
@@ -148,6 +88,90 @@ const ExportModal = ({
|
|
|
function C1ledger() {
|
|
function C1ledger() {
|
|
|
const tableInfo = useSelector((state: RootState) => state.C1ledger.tableInfo)
|
|
const tableInfo = useSelector((state: RootState) => state.C1ledger.tableInfo)
|
|
|
|
|
|
|
|
|
|
+ const [allWarehouseList, setAllWarehouseList] = useState<any[]>([])
|
|
|
|
|
+ const getAllWarehouseListFu = useCallback(async () => {
|
|
|
|
|
+ const res = await I1_APIwarehouseSimpleList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 9999
|
|
|
|
|
+ })
|
|
|
|
|
+ setAllWarehouseList(res.data.records)
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ getAllWarehouseListFu()
|
|
|
|
|
+ }, [getAllWarehouseListFu])
|
|
|
|
|
+
|
|
|
|
|
+ const warehouseOptions = useMemo(() => {
|
|
|
|
|
+ return allWarehouseList.map((i: any) => ({
|
|
|
|
|
+ label: i.name,
|
|
|
|
|
+ value: i.id
|
|
|
|
|
+ }))
|
|
|
|
|
+ }, [allWarehouseList])
|
|
|
|
|
+
|
|
|
|
|
+ const C1topSearch = useMemo(
|
|
|
|
|
+ () => [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ key: 'searchKey',
|
|
|
|
|
+ placeholder: '搜索藏品登记号、藏品名称'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 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['完残程度']
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ key: 'status',
|
|
|
|
|
+ placeholder: '入藏状态',
|
|
|
|
|
+ options: selectObj['藏品入藏状态']
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ key: 'siteStatus',
|
|
|
|
|
+ placeholder: '库存状态',
|
|
|
|
|
+ options: selectObj['藏品库存状态']
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ key: 'siteId',
|
|
|
|
|
+ placeholder: `选择库房`,
|
|
|
|
|
+ options: warehouseOptions
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ [warehouseOptions]
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
const rightBtnOptions = useMemo(() => {
|
|
const rightBtnOptions = useMemo(() => {
|
|
|
return {
|
|
return {
|
|
|
dangan: [
|
|
dangan: [
|