Просмотр исходного кода

整合一波业务订单的查看

shaogen1995 11 месяцев назад
Родитель
Сommit
eb6947f25d

+ 9 - 0
src/pages/ALookPage/A2BX.tsx

@@ -0,0 +1,9 @@
+import React from 'react'
+import A2LookIndex from './A2LookIndex'
+function A2BX() {
+  return <A2LookIndex pageTit='业务订单-查看(报修)' />
+}
+
+const MemoA2BX = React.memo(A2BX)
+
+export default MemoA2BX

+ 9 - 0
src/pages/ALookPage/A2DS.tsx

@@ -0,0 +1,9 @@
+import React from 'react'
+import A2LookIndex from './A2LookIndex'
+function A2DS() {
+  return <A2LookIndex pageTit='业务订单-查看(定损)' />
+}
+
+const MemoA2DS = React.memo(A2DS)
+
+export default MemoA2DS

+ 0 - 55
src/pages/ALookPage/A2DS/index.module.scss

@@ -1,55 +0,0 @@
-.A2DS {
-  position: absolute;
-  z-index: 10;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background-color: #fff;
-  border-radius: 10px;
-  padding: 15px 24px;
-  :global {
-    .lookDSBtn {
-      text-align: end;
-      margin-bottom: 10px;
-      padding-right: 45px;
-    }
-
-    .lookDSBox {
-      width: 100%;
-      height: calc(100% - 42px);
-      position: relative;
-      overflow-y: auto;
-      .lookTit {
-        width: calc(100% - 30px);
-        font-weight: 700;
-        color: var(--themeColor);
-        font-size: 18px;
-        padding: 12px 0;
-        border-top: 1px solid #ccc;
-      }
-      .lookTit {
-        display: flex;
-        width: 1000px;
-        justify-content: space-between;
-      }
-    }
-
-    .lookDSBoxAdd {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 100;
-      width: 100%;
-      height: 100%;
-      padding: 50px;
-      background-color: rgba(0, 0, 0, 0.6);
-      border-radius: 10px;
-      & > div {
-        position: relative;
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-}

+ 0 - 145
src/pages/ALookPage/A2DS/index.tsx

@@ -1,145 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import styles from './index.module.scss'
-import { useParams } from 'react-router-dom'
-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 history from '@/utils/history'
-import { A2AListCamerasType, A2AListType } from '@/types'
-import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
-import LookTxt from '../components/LookTxt'
-import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
-import LookTxt2 from '../components/LookTxt2'
-import LookTable from '../components/LookTable'
-import { lookTable2 } from '../components/LookTable/tableData'
-
-function A2DS() {
-  const urlObj: any = useParams()
-
-  const [urlId, setUrlId] = useState(0)
-
-  const [info, setInfo] = useState({} as A2AListType)
-
-  // 获取地址栏参数
-  useEffect(() => {
-    setUrlId(Number(urlObj.id))
-  }, [urlObj])
-
-  // 通过id获取详情
-  const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2A_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-
-      const rtf = data.rtf || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const refObj = JSON.parse(rtf)
-
-      const rtfDesc = data.rtfDesc || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const rtfDescObj = JSON.parse(rtfDesc)
-      setInfo({
-        ...data,
-        cameras: data.cameras || [],
-        files: data.files || [],
-        rtf: refObj,
-        rtfDesc: rtfDescObj
-      })
-    }
-  }, [])
-
-  // 进页面发送请求
-  useEffect(() => {
-    if (urlId) {
-      getInfoFu(urlId)
-    }
-  }, [getInfoFu, urlId])
-
-  // 点击删除
-  const delFu = useCallback(async () => {
-    const res = await A2A_APIremove(urlId)
-    if (res.code === 0) {
-      MessageFu.success('删除成功!')
-      history.go(-1)
-    }
-  }, [urlId])
-
-  // 点击编辑
-  const [openInfo, setOpenInfo] = useState<A1addType>({ id: 0, txt: '' })
-
-  // 第二个信息标题
-  const tit2 = useMemo(() => {
-    return Reflect.get(A2AtopTypeObj, info.type)
-  }, [info.type])
-
-  return (
-    <div className={styles.A2DS}>
-      <div className='pageTitle'>业务订单-查看(定损)</div>
-
-      <div className='lookDSBtn'>
-        <Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
-          编辑
-        </Button>
-        &emsp;
-        <MyPopconfirm
-          txtK='删除'
-          loc='bottom'
-          onConfirm={() => delFu()}
-          Dom={<Button danger>删除</Button>}
-        />
-      </div>
-
-      {info.id ? (
-        <div className='lookDSBox'>
-          <div className='lookTit'>订单信息</div>
-
-          <LookTxt info={info} />
-
-          <div className='lookTit'>{tit2}信息</div>
-
-          <LookTxt2 info={info} tit2={tit2} />
-
-          <div className='lookTit'>相机清单</div>
-
-          <LookTable
-            list={info.cameras}
-            columnsTemp={lookTable2}
-            lastBtn={[
-              {
-                title: '操作',
-                render: (item: A2AListCamerasType) => (
-                  <Button
-                    size='small'
-                    type='text'
-                    onClick={() => history.push(`/lookList/${item.id}`)}
-                  >
-                    查看
-                  </Button>
-                )
-              }
-            ]}
-          />
-        </div>
-      ) : null}
-
-      {/* 编辑 出来的页面 */}
-      {openInfo.id ? (
-        <div className='lookDSBoxAdd'>
-          <div>
-            <AddBusiness
-              topType={info.type}
-              openInfo={openInfo}
-              closeFu={() => setOpenInfo({ id: 0, txt: '' })}
-              upTableFu={() => getInfoFu(urlId)}
-              addTableFu={() => {}}
-            />
-          </div>
-        </div>
-      ) : null}
-    </div>
-  )
-}
-
-const MemoA2DS = React.memo(A2DS)
-
-export default MemoA2DS

+ 7 - 4
src/pages/ALookPage/A2BX/index.module.scss

@@ -1,4 +1,4 @@
-.A2BX {
+.A2LookIndex {
   position: absolute;
   z-index: 10;
   top: 0;
@@ -9,13 +9,13 @@
   border-radius: 10px;
   padding: 15px 24px;
   :global {
-    .lookBXBtn {
+    .lookIndexBtn {
       text-align: end;
       margin-bottom: 10px;
       padding-right: 45px;
     }
 
-    .lookBXBox {
+    .lookIndexBox {
       width: 100%;
       height: calc(100% - 42px);
       position: relative;
@@ -32,10 +32,13 @@
         display: flex;
         width: 1000px;
         justify-content: space-between;
+        .ant-btn {
+          margin-left: 20px;
+        }
       }
     }
 
-    .lookBXBoxAdd {
+    .lookIndexBoxAdd {
       position: absolute;
       top: 0;
       left: 0;

+ 28 - 19
src/pages/ALookPage/A2BX/index.tsx

@@ -1,21 +1,25 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
 import { useParams } from 'react-router-dom'
+import { A2AListCamerasType, A2AListType } from '@/types'
 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 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 { Button } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import LookTxt from '../components/LookTxt'
 import LookTxt2 from '../components/LookTxt2'
 import LookTable from '../components/LookTable'
 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 [urlId, setUrlId] = useState(0)
@@ -73,10 +77,10 @@ function A2BX() {
   }, [info.type])
 
   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>
@@ -90,7 +94,7 @@ function A2BX() {
       </div>
 
       {info.id ? (
-        <div className='lookBXBox'>
+        <div className='lookIndexBox'>
           <div className='lookTit'>订单信息</div>
 
           <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>
+          ) : null}
         </div>
       ) : null}
 
       {/* 编辑 出来的页面 */}
       {openInfo.id ? (
-        <div className='lookBXBoxAdd'>
+        <div className='lookIndexBoxAdd'>
           <div>
             <AddBusiness
               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

+ 9 - 0
src/pages/ALookPage/A2WX.tsx

@@ -0,0 +1,9 @@
+import React from 'react'
+import A2LookIndex from './A2LookIndex'
+function A2WX() {
+  return <A2LookIndex pageTit='业务订单-查看(维修)' />
+}
+
+const MemoA2WX = React.memo(A2WX)
+
+export default MemoA2WX

+ 0 - 55
src/pages/ALookPage/A2WX/index.module.scss

@@ -1,55 +0,0 @@
-.A2WX {
-  position: absolute;
-  z-index: 10;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background-color: #fff;
-  border-radius: 10px;
-  padding: 15px 24px;
-  :global {
-    .lookWXBtn {
-      text-align: end;
-      margin-bottom: 10px;
-      padding-right: 45px;
-    }
-
-    .lookWXBox {
-      width: 100%;
-      height: calc(100% - 42px);
-      position: relative;
-      overflow-y: auto;
-      .lookTit {
-        width: calc(100% - 30px);
-        font-weight: 700;
-        color: var(--themeColor);
-        font-size: 18px;
-        padding: 12px 0;
-        border-top: 1px solid #ccc;
-      }
-      .lookTit {
-        display: flex;
-        width: 1000px;
-        justify-content: space-between;
-      }
-    }
-
-    .lookWXBoxAdd {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 100;
-      width: 100%;
-      height: 100%;
-      padding: 50px;
-      background-color: rgba(0, 0, 0, 0.6);
-      border-radius: 10px;
-      & > div {
-        position: relative;
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-}

+ 0 - 152
src/pages/ALookPage/A2WX/index.tsx

@@ -1,152 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import styles from './index.module.scss'
-import { useParams } from 'react-router-dom'
-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 history from '@/utils/history'
-import { A2AListCamerasType, A2AListType } from '@/types'
-import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
-import LookTxt from '../components/LookTxt'
-import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
-import LookTxt2 from '../components/LookTxt2'
-import LookTable from '../components/LookTable'
-import { lookTable2 } from '../components/LookTable/tableData'
-
-function A2WX() {
-  const urlObj: any = useParams()
-
-  const [urlId, setUrlId] = useState(0)
-
-  const [info, setInfo] = useState({} as A2AListType)
-
-  // 获取地址栏参数
-  useEffect(() => {
-    setUrlId(Number(urlObj.id))
-  }, [urlObj])
-
-  // 通过id获取详情
-  const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2A_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-
-      const rtf = data.rtf || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const refObj = JSON.parse(rtf)
-
-      const rtfDesc = data.rtfDesc || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const rtfDescObj = JSON.parse(rtfDesc)
-      setInfo({
-        ...data,
-        cameras: data.cameras || [],
-        files: data.files || [],
-        rtf: refObj,
-        rtfDesc: rtfDescObj
-      })
-    }
-  }, [])
-
-  // 进页面发送请求
-  useEffect(() => {
-    if (urlId) {
-      getInfoFu(urlId)
-    }
-  }, [getInfoFu, urlId])
-
-  // 点击删除
-  const delFu = useCallback(async () => {
-    const res = await A2A_APIremove(urlId)
-    if (res.code === 0) {
-      MessageFu.success('删除成功!')
-      history.go(-1)
-    }
-  }, [urlId])
-
-  // 点击编辑
-  const [openInfo, setOpenInfo] = useState<A1addType>({ id: 0, txt: '' })
-
-  // 第二个信息标题
-  const tit2 = useMemo(() => {
-    return Reflect.get(A2AtopTypeObj, info.type)
-  }, [info.type])
-
-  return (
-    <div className={styles.A2WX}>
-      <div className='pageTitle'>业务订单-查看(维修)</div>
-
-      <div className='lookWXBtn'>
-        <Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
-          编辑
-        </Button>
-        &emsp;
-        <MyPopconfirm
-          txtK='删除'
-          loc='bottom'
-          onConfirm={() => delFu()}
-          Dom={<Button danger>删除</Button>}
-        />
-      </div>
-
-      {info.id ? (
-        <div className='lookWXBox'>
-          <div className='lookTit'>订单信息</div>
-
-          <LookTxt info={info} />
-
-          <div className='lookTit'>{tit2}信息</div>
-
-          <LookTxt2 info={info} tit2={tit2} />
-
-          <div className='lookTit'>相机清单</div>
-
-          <LookTable
-            list={info.cameras}
-            columnsTemp={lookTable2}
-            lastBtn={[
-              {
-                title: '操作',
-                render: (item: A2AListCamerasType) => (
-                  <Button
-                    size='small'
-                    type='text'
-                    onClick={() => history.push(`/lookList/${item.id}`)}
-                  >
-                    查看
-                  </Button>
-                )
-              }
-            ]}
-          />
-          {/* 待完善 */}
-          <div className='lookTit'>
-            <div>物流订单</div>
-            <div>
-              <Button type='primary'>新增出库</Button>
-            </div>
-          </div>
-        </div>
-      ) : null}
-
-      {/* 编辑 出来的页面 */}
-      {openInfo.id ? (
-        <div className='lookWXBoxAdd'>
-          <div>
-            <AddBusiness
-              topType={info.type}
-              openInfo={openInfo}
-              closeFu={() => setOpenInfo({ id: 0, txt: '' })}
-              upTableFu={() => getInfoFu(urlId)}
-              addTableFu={() => {}}
-            />
-          </div>
-        </div>
-      ) : null}
-    </div>
-  )
-}
-
-const MemoA2WX = React.memo(A2WX)
-
-export default MemoA2WX

+ 9 - 0
src/pages/ALookPage/A2XS.tsx

@@ -0,0 +1,9 @@
+import React from 'react'
+import A2LookIndex from './A2LookIndex'
+function A2XS() {
+  return <A2LookIndex pageTit='业务订单-查看(销售)' />
+}
+
+const MemoA2XS = React.memo(A2XS)
+
+export default MemoA2XS

+ 0 - 55
src/pages/ALookPage/A2XS/index.module.scss

@@ -1,55 +0,0 @@
-.A2XS {
-  position: absolute;
-  z-index: 10;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background-color: #fff;
-  border-radius: 10px;
-  padding: 15px 24px;
-  :global {
-    .lookXSBtn {
-      text-align: end;
-      margin-bottom: 10px;
-      padding-right: 45px;
-    }
-
-    .lookXSBox {
-      width: 100%;
-      height: calc(100% - 42px);
-      position: relative;
-      overflow-y: auto;
-      .lookTit {
-        width: calc(100% - 30px);
-        font-weight: 700;
-        color: var(--themeColor);
-        font-size: 18px;
-        padding: 12px 0;
-        border-top: 1px solid #ccc;
-      }
-      .lookTit {
-        display: flex;
-        width: 1000px;
-        justify-content: space-between;
-      }
-    }
-
-    .lookXSBoxAdd {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 100;
-      width: 100%;
-      height: 100%;
-      padding: 50px;
-      background-color: rgba(0, 0, 0, 0.6);
-      border-radius: 10px;
-      & > div {
-        position: relative;
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-}

+ 0 - 149
src/pages/ALookPage/A2XS/index.tsx

@@ -1,149 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import styles from './index.module.scss'
-import { useParams } from 'react-router-dom'
-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 history from '@/utils/history'
-import { A2AListCamerasType, A2AListType } from '@/types'
-import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
-import LookTxt from '../components/LookTxt'
-import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
-import LookTxt2 from '../components/LookTxt2'
-import LookTable from '../components/LookTable'
-import { lookTable2 } from '../components/LookTable/tableData'
-
-function A2XS() {
-  const urlObj: any = useParams()
-
-  const [urlId, setUrlId] = useState(0)
-
-  const [info, setInfo] = useState({} as A2AListType)
-
-  // 获取地址栏参数
-  useEffect(() => {
-    setUrlId(Number(urlObj.id))
-  }, [urlObj])
-
-  // 通过id获取详情
-  const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2A_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-
-      const rtf = data.rtf || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const refObj = JSON.parse(rtf)
-      setInfo({
-        ...data,
-        cameras: data.cameras || [],
-        files: data.files || [],
-        rtf: refObj
-      })
-    }
-  }, [])
-
-  // 进页面发送请求
-  useEffect(() => {
-    if (urlId) {
-      getInfoFu(urlId)
-    }
-  }, [getInfoFu, urlId])
-
-  // 点击删除
-  const delFu = useCallback(async () => {
-    const res = await A2A_APIremove(urlId)
-    if (res.code === 0) {
-      MessageFu.success('删除成功!')
-      history.go(-1)
-    }
-  }, [urlId])
-
-  // 点击编辑
-  const [openInfo, setOpenInfo] = useState<A1addType>({ id: 0, txt: '' })
-
-  // 第二个信息标题
-  const tit2 = useMemo(() => {
-    return Reflect.get(A2AtopTypeObj, info.type)
-  }, [info.type])
-
-  return (
-    <div className={styles.A2XS}>
-      <div className='pageTitle'>业务订单-查看(销售)</div>
-
-      <div className='lookXSBtn'>
-        <Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
-          编辑
-        </Button>
-        &emsp;
-        <MyPopconfirm
-          txtK='删除'
-          loc='bottom'
-          onConfirm={() => delFu()}
-          Dom={<Button danger>删除</Button>}
-        />
-      </div>
-
-      {info.id ? (
-        <div className='lookXSBox'>
-          <div className='lookTit'>订单信息</div>
-
-          <LookTxt info={info} />
-
-          <div className='lookTit'>{tit2}信息</div>
-
-          <LookTxt2 info={info} tit2={tit2} />
-
-          <div className='lookTit'>相机清单</div>
-
-          <LookTable
-            list={info.cameras}
-            columnsTemp={lookTable2}
-            lastBtn={[
-              {
-                title: '操作',
-                render: (item: A2AListCamerasType) => (
-                  <Button
-                    size='small'
-                    type='text'
-                    onClick={() => history.push(`/lookList/${item.id}`)}
-                  >
-                    查看
-                  </Button>
-                )
-              }
-            ]}
-          />
-
-          {/* 待完善 */}
-          <div className='lookTit'>
-            <div>物流订单</div>
-            <div>
-              <Button type='primary'>新增出库</Button>
-            </div>
-          </div>
-        </div>
-      ) : null}
-
-      {/* 编辑 出来的页面 */}
-      {openInfo.id ? (
-        <div className='lookXSBoxAdd'>
-          <div>
-            <AddBusiness
-              topType={info.type}
-              openInfo={openInfo}
-              closeFu={() => setOpenInfo({ id: 0, txt: '' })}
-              upTableFu={() => getInfoFu(urlId)}
-              addTableFu={() => {}}
-            />
-          </div>
-        </div>
-      ) : null}
-    </div>
-  )
-}
-
-const MemoA2XS = React.memo(A2XS)
-
-export default MemoA2XS

+ 9 - 0
src/pages/ALookPage/A2ZL.tsx

@@ -0,0 +1,9 @@
+import React from 'react'
+import A2LookIndex from './A2LookIndex'
+function A2ZL() {
+  return <A2LookIndex pageTit='业务订单-查看(租赁)' />
+}
+
+const MemoA2ZL = React.memo(A2ZL)
+
+export default MemoA2ZL

+ 0 - 55
src/pages/ALookPage/A2ZL/index.module.scss

@@ -1,55 +0,0 @@
-.A2ZL {
-  position: absolute;
-  z-index: 10;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  background-color: #fff;
-  border-radius: 10px;
-  padding: 15px 24px;
-  :global {
-    .lookZLBtn {
-      text-align: end;
-      margin-bottom: 10px;
-      padding-right: 45px;
-    }
-
-    .lookZLBox {
-      width: 100%;
-      height: calc(100% - 42px);
-      position: relative;
-      overflow-y: auto;
-      .lookTit {
-        width: calc(100% - 30px);
-        font-weight: 700;
-        color: var(--themeColor);
-        font-size: 18px;
-        padding: 12px 0;
-        border-top: 1px solid #ccc;
-      }
-      .lookTit {
-        display: flex;
-        width: 1000px;
-        justify-content: space-between;
-      }
-    }
-
-    .lookZLBoxAdd {
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 100;
-      width: 100%;
-      height: 100%;
-      padding: 50px;
-      background-color: rgba(0, 0, 0, 0.6);
-      border-radius: 10px;
-      & > div {
-        position: relative;
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-}

+ 0 - 149
src/pages/ALookPage/A2ZL/index.tsx

@@ -1,149 +0,0 @@
-import React, { useCallback, useEffect, useMemo, useState } from 'react'
-import styles from './index.module.scss'
-import { useParams } from 'react-router-dom'
-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 history from '@/utils/history'
-import { A2AListCamerasType, A2AListType } from '@/types'
-import AddBusiness from '@/pages/A2Abusiness/AddBusiness'
-import LookTxt from '../components/LookTxt'
-import { A2AtopTypeObj } from '@/pages/A2Abusiness/data'
-import LookTxt2 from '../components/LookTxt2'
-import LookTable from '../components/LookTable'
-import { lookTable2 } from '../components/LookTable/tableData'
-
-function A2ZL() {
-  const urlObj: any = useParams()
-
-  const [urlId, setUrlId] = useState(0)
-
-  const [info, setInfo] = useState({} as A2AListType)
-
-  // 获取地址栏参数
-  useEffect(() => {
-    setUrlId(Number(urlObj.id))
-  }, [urlObj])
-
-  // 通过id获取详情
-  const getInfoFu = useCallback(async (id: number) => {
-    const res = await A2A_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-
-      const rtf = data.rtf || '{"isSection":"true","txtArr":[{"txt":"<p></p>"}]}'
-      const refObj = JSON.parse(rtf)
-      setInfo({
-        ...data,
-        cameras: data.cameras || [],
-        files: data.files || [],
-        rtf: refObj
-      })
-    }
-  }, [])
-
-  // 进页面发送请求
-  useEffect(() => {
-    if (urlId) {
-      getInfoFu(urlId)
-    }
-  }, [getInfoFu, urlId])
-
-  // 点击删除
-  const delFu = useCallback(async () => {
-    const res = await A2A_APIremove(urlId)
-    if (res.code === 0) {
-      MessageFu.success('删除成功!')
-      history.go(-1)
-    }
-  }, [urlId])
-
-  // 点击编辑
-  const [openInfo, setOpenInfo] = useState<A1addType>({ id: 0, txt: '' })
-
-  // 第二个信息标题
-  const tit2 = useMemo(() => {
-    return Reflect.get(A2AtopTypeObj, info.type)
-  }, [info.type])
-
-  return (
-    <div className={styles.A2ZL}>
-      <div className='pageTitle'>业务订单-查看(租赁)</div>
-
-      <div className='lookZLBtn'>
-        <Button type='primary' onClick={() => setOpenInfo({ id: urlId, txt: '编辑' })}>
-          编辑
-        </Button>
-        &emsp;
-        <MyPopconfirm
-          txtK='删除'
-          loc='bottom'
-          onConfirm={() => delFu()}
-          Dom={<Button danger>删除</Button>}
-        />
-      </div>
-
-      {info.id ? (
-        <div className='lookZLBox'>
-          <div className='lookTit'>订单信息</div>
-
-          <LookTxt info={info} />
-
-          <div className='lookTit'>{tit2}信息</div>
-
-          <LookTxt2 info={info} tit2={tit2} />
-
-          <div className='lookTit'>相机清单</div>
-
-          <LookTable
-            list={info.cameras}
-            columnsTemp={lookTable2}
-            lastBtn={[
-              {
-                title: '操作',
-                render: (item: A2AListCamerasType) => (
-                  <Button
-                    size='small'
-                    type='text'
-                    onClick={() => history.push(`/lookList/${item.id}`)}
-                  >
-                    查看
-                  </Button>
-                )
-              }
-            ]}
-          />
-
-          {/* 待完善 */}
-          <div className='lookTit'>
-            <div>物流订单</div>
-            <div>
-              <Button type='primary'>新增出库</Button>&emsp;<Button type='primary'>新增入库</Button>
-            </div>
-          </div>
-        </div>
-      ) : null}
-
-      {/* 编辑 出来的页面 */}
-      {openInfo.id ? (
-        <div className='lookZLBoxAdd'>
-          <div>
-            <AddBusiness
-              topType={info.type}
-              openInfo={openInfo}
-              closeFu={() => setOpenInfo({ id: 0, txt: '' })}
-              upTableFu={() => getInfoFu(urlId)}
-              addTableFu={() => {}}
-            />
-          </div>
-        </div>
-      ) : null}
-    </div>
-  )
-}
-
-const MemoA2ZL = React.memo(A2ZL)
-
-export default MemoA2ZL