|
|
@@ -0,0 +1,85 @@
|
|
|
+import React, { useState, useRef, useMemo } from 'react'
|
|
|
+import styles from './index.module.scss'
|
|
|
+import { rowArrTemp } from '@/pages/Zother/data'
|
|
|
+import { InfoProvider } from '@/pages/Zother/InfoContext'
|
|
|
+import EditTop from '@/pages/Zother/EditTop'
|
|
|
+import MyTable from '@/components/MyTable'
|
|
|
+import SelectGoods from '@/pages/Zother/SelectGoods'
|
|
|
+import { useParams } from 'react-router-dom'
|
|
|
+import { Button, Input } from 'antd'
|
|
|
+import { API_getGoodsLists } from '@/store/action/Cledger/C1ledger'
|
|
|
+import { B3_APIgetClueList, B3_APIgoodsSave, B3API_obj } from '@/store/action/Benter/B3auth'
|
|
|
+import EditBtn from '@/pages/Zother/EditBtn'
|
|
|
+import SonGoodsList from '@/pages/Zother/SonGoodsList'
|
|
|
+import { useInfo } from '@/pages/Zother/InfoContext'
|
|
|
+import { goodsSonTableC } from '@/utils/tableData'
|
|
|
+import { sgBaseFormDataGood, sgTopSelectDomGood } from '@/pages/Zother/SonGoodsList/data'
|
|
|
+
|
|
|
+const rowArr = [
|
|
|
+ {
|
|
|
+ name: `鉴定入藏`,
|
|
|
+ type: 'txt'
|
|
|
+ },
|
|
|
+ ...rowArrTemp('入藏').slice(1)
|
|
|
+]
|
|
|
+
|
|
|
+function B3edit() {
|
|
|
+ // const { info, setInfoFu, setSnapsFu, timeKey, auditInfo, setAuditInfoFu } = useInfo()
|
|
|
+ const [showSelectGoods, setShowSelectGoods] = useState(false)
|
|
|
+ const ZRichTextRef = useRef<any>(null)
|
|
|
+ const fileRef = useRef<any>(null)
|
|
|
+ const { key, id } = useParams<any>()
|
|
|
+ const isEdit = useMemo(() => {
|
|
|
+ return ['2'].includes(key)
|
|
|
+ }, [key])
|
|
|
+ const isView = useMemo(() => {
|
|
|
+ return ['3', '4'].includes(key)
|
|
|
+ }, [key])
|
|
|
+
|
|
|
+ return (
|
|
|
+ <InfoProvider>
|
|
|
+ <div className={styles.B3edit} id='editBox'>
|
|
|
+ <div className='editMain'>
|
|
|
+ {/* 顶部 */}
|
|
|
+ <EditTop
|
|
|
+ pageTxt='藏品鉴定'
|
|
|
+ rowArr={rowArr}
|
|
|
+ APIobj={B3API_obj}
|
|
|
+ fileUpInfo={{ myUrl: 'cms/order/auth/upload', dirCode: 'auth' }}
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* <div className='Edtop1row Edtop1rowFull'>
|
|
|
+ <div className='Edtop1ll'>关联产品 :</div>
|
|
|
+ <div className='Edtop1rr'>
|
|
|
+ {!isView && (
|
|
|
+ <Button type='primary' onClick={() => setShowSelectGoods(true)}>
|
|
|
+ 添加藏品
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </div> */}
|
|
|
+ {/* 添加藏品 */}
|
|
|
+ {/* {showSelectGoods && (
|
|
|
+ <SelectGoods
|
|
|
+ myType='藏品'
|
|
|
+ API_getList={API_getGoodsLists}
|
|
|
+ closeFu={() => setShowSelectGoods(false)}
|
|
|
+ baseFormData={sgBaseFormDataGood}
|
|
|
+ topSelectDom={sgTopSelectDomGood}
|
|
|
+ columnsTemp={goodsSonTableC(true)}
|
|
|
+ oldCheckArr={info.goods || []}
|
|
|
+ dataResFu={res => setInfoFu({ ...info, goods: res || [] })}
|
|
|
+ />
|
|
|
+ )} */}
|
|
|
+
|
|
|
+ {/* 底部按钮 */}
|
|
|
+ <EditBtn path='/auth' APIobj={B3API_obj} checkListTxt='请添加藏品' />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </InfoProvider>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+const MemoB3edit = React.memo(B3edit)
|
|
|
+
|
|
|
+export default MemoB3edit
|