|
@@ -1,7 +1,6 @@
|
|
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import { useParams } from 'react-router-dom'
|
|
import { useParams } from 'react-router-dom'
|
|
|
-import { API_getGoodsInfo } from '@/store/action/B1ledger'
|
|
|
|
|
import { B1listType } from '@/pages/B1ledger/data'
|
|
import { B1listType } from '@/pages/B1ledger/data'
|
|
|
import { Button } from 'antd'
|
|
import { Button } from 'antd'
|
|
|
import { statusSelect } from '@/utils/select'
|
|
import { statusSelect } from '@/utils/select'
|
|
@@ -10,17 +9,44 @@ import Tab1info from '@/pages/A0goodsInfo/Tab1info'
|
|
|
import MyTable from '@/components/MyTable'
|
|
import MyTable from '@/components/MyTable'
|
|
|
import TextArea from 'antd/es/input/TextArea'
|
|
import TextArea from 'antd/es/input/TextArea'
|
|
|
import { MessageFu } from '@/utils/message'
|
|
import { MessageFu } from '@/utils/message'
|
|
|
-import { B2_APIaduit } from '@/store/action/B2register'
|
|
|
|
|
|
|
+import { B2_APIaduit, B2_APIgetInfo } from '@/store/action/B2register'
|
|
|
|
|
+import { API_getFileListByIds } from '@/store/action/B1ledger'
|
|
|
|
|
+import { auditTableC } from '@/utils/tableData'
|
|
|
|
|
|
|
|
function B2look() {
|
|
function B2look() {
|
|
|
const { key, id } = useParams<any>()
|
|
const { key, id } = useParams<any>()
|
|
|
|
|
|
|
|
|
|
+ // 订单相关信息
|
|
|
const [info, setInfo] = useState({} as B1listType)
|
|
const [info, setInfo] = useState({} as B1listType)
|
|
|
|
|
|
|
|
|
|
+ // 藏品相关信息
|
|
|
|
|
+ const [goodsInfo, setGoodsInfo] = useState({} as B1listType)
|
|
|
|
|
+
|
|
|
const getInfoFu = useCallback(async (id: number) => {
|
|
const getInfoFu = useCallback(async (id: number) => {
|
|
|
- const res = await API_getGoodsInfo(id)
|
|
|
|
|
|
|
+ const res = await B2_APIgetInfo(id)
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
setInfo(res.data)
|
|
setInfo(res.data)
|
|
|
|
|
+
|
|
|
|
|
+ const goodsArr = res.data.snaps
|
|
|
|
|
+
|
|
|
|
|
+ if (goodsArr && goodsArr[0] && goodsArr[0].snap) {
|
|
|
|
|
+ const objStr = goodsArr[0].snap
|
|
|
|
|
+ try {
|
|
|
|
|
+ const obj: B1listType = JSON.parse(objStr)
|
|
|
|
|
+ if (obj.fileIds) {
|
|
|
|
|
+ const fileArr = obj.fileIds.split(',').map(v => Number(v))
|
|
|
|
|
+
|
|
|
|
|
+ const res2 = await API_getFileListByIds(fileArr)
|
|
|
|
|
+
|
|
|
|
|
+ if (res2.code === 0) {
|
|
|
|
|
+ obj.file = res2.data
|
|
|
|
|
+ setGoodsInfo(obj)
|
|
|
|
|
+ }
|
|
|
|
|
+ } else setGoodsInfo(obj)
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ MessageFu.warning('JSON数据错误')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}, [])
|
|
}, [])
|
|
|
|
|
|
|
@@ -84,7 +110,6 @@ function B2look() {
|
|
|
|
|
|
|
|
<div className='B2lTxt'>
|
|
<div className='B2lTxt'>
|
|
|
<div className='B2lTrow'>
|
|
<div className='B2lTrow'>
|
|
|
- {/* 待完善 返回数据确实参数 */}
|
|
|
|
|
<div className='B2lTrow1'>订单编号:</div>
|
|
<div className='B2lTrow1'>订单编号:</div>
|
|
|
<div className='B2lTrow2'>{info.num}</div>
|
|
<div className='B2lTrow2'>{info.num}</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -94,7 +119,7 @@ function B2look() {
|
|
|
</div>
|
|
</div>
|
|
|
<div className='B2lTrow'>
|
|
<div className='B2lTrow'>
|
|
|
<div className='B2lTrow1'>发起人:</div>
|
|
<div className='B2lTrow1'>发起人:</div>
|
|
|
- <div className='B2lTrow2'>待完善</div>
|
|
|
|
|
|
|
+ <div className='B2lTrow2'>{info.creatorName + ' - ' + info.createTime}</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{/* 审批相关 */}
|
|
{/* 审批相关 */}
|
|
@@ -116,7 +141,7 @@ function B2look() {
|
|
|
))}
|
|
))}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div className='B2lTrow B2lTrowAll'>
|
|
|
|
|
|
|
+ <div className='B2lTrow B2lTrowAll' style={{ marginBottom: 25 }}>
|
|
|
<div className='B2lTrow1'>审批意见:</div>
|
|
<div className='B2lTrow1'>审批意见:</div>
|
|
|
<div className='B2lTrow2'>
|
|
<div className='B2lTrow2'>
|
|
|
<TextArea
|
|
<TextArea
|
|
@@ -135,29 +160,16 @@ function B2look() {
|
|
|
<div className='B2lTit'>藏品详情</div>
|
|
<div className='B2lTit'>藏品详情</div>
|
|
|
|
|
|
|
|
<div className='B2lGood'>
|
|
<div className='B2lGood'>
|
|
|
- <Tab1info info={info} auto />
|
|
|
|
|
|
|
+ <Tab1info info={goodsInfo} auto />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div className='B2lTit'>申请流程</div>
|
|
<div className='B2lTit'>申请流程</div>
|
|
|
|
|
|
|
|
- {/* 待完善 */}
|
|
|
|
|
<MyTable
|
|
<MyTable
|
|
|
- list={[
|
|
|
|
|
- { id: 1, name: '11' },
|
|
|
|
|
- { id: 2, name: '22' },
|
|
|
|
|
- { id: 3, name: '33' },
|
|
|
|
|
- { id: 4, name: '44' },
|
|
|
|
|
- { id: 5, name: '55' }
|
|
|
|
|
- ]}
|
|
|
|
|
- columnsTemp={[
|
|
|
|
|
- ['txt', '节点名称', 'name'],
|
|
|
|
|
- ['txt', '提交日期', 'name'],
|
|
|
|
|
- ['txt', '处理人', 'name'],
|
|
|
|
|
- ['txt', '审批结果', 'name'],
|
|
|
|
|
- ['text', '审批意见', 'xxxxx', 100]
|
|
|
|
|
- ]}
|
|
|
|
|
|
|
+ list={info.audits || []}
|
|
|
|
|
+ columnsTemp={auditTableC}
|
|
|
pagingInfo={false}
|
|
pagingInfo={false}
|
|
|
- widthSet={{ xxxxx: 800 }}
|
|
|
|
|
|
|
+ widthSet={{ rtfOpinion: 600 }}
|
|
|
/>
|
|
/>
|
|
|
</>
|
|
</>
|
|
|
) : null}
|
|
) : null}
|