|
@@ -1,21 +1,25 @@
|
|
import React, { useCallback, useEffect, 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 { useParams } from 'react-router-dom'
|
|
import { useParams } from 'react-router-dom'
|
|
|
|
+import { A2AListCamerasType, A2AListType } from '@/types'
|
|
import { A2A_APIgetInfo, A2A_APIremove } from '@/store/action/A2Abusiness'
|
|
import { A2A_APIgetInfo, A2A_APIremove } from '@/store/action/A2Abusiness'
|
|
-import { Button } from 'antd'
|
|
|
|
-import MyPopconfirm from '@/components/MyPopconfirm'
|
|
|
|
-import { A1addType } from '@/pages/A1Camera/data'
|
|
|
|
import { MessageFu } from '@/utils/message'
|
|
import { MessageFu } from '@/utils/message'
|
|
import history from '@/utils/history'
|
|
import history from '@/utils/history'
|
|
-import { A2AListCamerasType, A2AListType } from '@/types'
|
|
|
|
-import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
|
|
|
|
-import LookTxt from '../components/LookTxt'
|
|
|
|
|
|
+import { A1addType } from '@/pages/A1Camera/data'
|
|
import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
|
|
import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
|
|
|
|
+import { Button } from 'antd'
|
|
|
|
+import MyPopconfirm from '@/components/MyPopconfirm'
|
|
|
|
+import LookTxt from '../components/LookTxt'
|
|
import LookTxt2 from '../components/LookTxt2'
|
|
import LookTxt2 from '../components/LookTxt2'
|
|
import LookTable from '../components/LookTable'
|
|
import LookTable from '../components/LookTable'
|
|
import { lookTable2 } from '../components/LookTable/tableData'
|
|
import { lookTable2 } from '../components/LookTable/tableData'
|
|
|
|
+import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
|
|
|
|
|
|
-function A2BX() {
|
|
|
|
|
|
+type Props = {
|
|
|
|
+ pageTit: string
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function A2Index({ pageTit }: Props) {
|
|
const urlObj: any = useParams()
|
|
const urlObj: any = useParams()
|
|
|
|
|
|
const [urlId, setUrlId] = useState(0)
|
|
const [urlId, setUrlId] = useState(0)
|
|
@@ -73,10 +77,10 @@ function A2BX() {
|
|
}, [info.type])
|
|
}, [info.type])
|
|
|
|
|
|
return (
|
|
return (
|
|
- <div className={styles.A2BX}>
|
|
|
|
- <div className='pageTitle'>业务订单-查看(报修)</div>
|
|
|
|
|
|
+ <div className={styles.A2LookIndex}>
|
|
|
|
+ <div className='pageTitle'>{pageTit}</div>
|
|
|
|
|
|
- <div className='lookBXBtn'>
|
|
|
|
|
|
+ <div className='lookIndexBtn'>
|
|
<Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
|
|
<Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
|
|
编辑
|
|
编辑
|
|
</Button>
|
|
</Button>
|
|
@@ -90,7 +94,7 @@ function A2BX() {
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{info.id ? (
|
|
{info.id ? (
|
|
- <div className='lookBXBox'>
|
|
|
|
|
|
+ <div className='lookIndexBox'>
|
|
<div className='lookTit'>订单信息</div>
|
|
<div className='lookTit'>订单信息</div>
|
|
|
|
|
|
<LookTxt info={info} />
|
|
<LookTxt info={info} />
|
|
@@ -121,18 +125,23 @@ function A2BX() {
|
|
/>
|
|
/>
|
|
|
|
|
|
{/* 待完善 */}
|
|
{/* 待完善 */}
|
|
- <div className='lookTit'>
|
|
|
|
- <div>物流订单</div>
|
|
|
|
- <div>
|
|
|
|
- <Button type='primary'>新增入库</Button>
|
|
|
|
|
|
+ {['ZL', 'XS', 'BX', 'WX'].includes(info.type) ? (
|
|
|
|
+ <div className='lookTit'>
|
|
|
|
+ <div>物流订单</div>
|
|
|
|
+ <div>
|
|
|
|
+ {['ZL', 'XS', 'WX'].includes(info.type) ? (
|
|
|
|
+ <Button type='primary'>新增出库</Button>
|
|
|
|
+ ) : null}
|
|
|
|
+ {['ZL', 'BX'].includes(info.type) ? <Button type='primary'>新增入库</Button> : null}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ ) : null}
|
|
</div>
|
|
</div>
|
|
) : null}
|
|
) : null}
|
|
|
|
|
|
{/* 编辑 出来的页面 */}
|
|
{/* 编辑 出来的页面 */}
|
|
{openInfo.id ? (
|
|
{openInfo.id ? (
|
|
- <div className='lookBXBoxAdd'>
|
|
|
|
|
|
+ <div className='lookIndexBoxAdd'>
|
|
<div>
|
|
<div>
|
|
<AddBusiness
|
|
<AddBusiness
|
|
topType={info.type}
|
|
topType={info.type}
|
|
@@ -148,6 +157,6 @@ function A2BX() {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
-const MemoA2BX = React.memo(A2BX)
|
|
|
|
|
|
+const MemoA2Index = React.memo(A2Index)
|
|
|
|
|
|
-export default MemoA2BX
|
|
|
|
|
|
+export default MemoA2Index
|