Browse Source

修复存草稿的bug

shaogen1995 3 months ago
parent
commit
27ecfb0bfa

+ 3 - 0
src/pages/A3_ledger/C1ledger/type.d.ts

@@ -145,4 +145,7 @@ export type C1GoodType = {
   txt4: string
   beiZhu: string
   storageId: number
+
+  // 移库
+  siteNumNew: number | null
 }

+ 12 - 8
src/pages/B_enterTibet/B1collect/B1edit/index.tsx

@@ -78,13 +78,16 @@ function B1edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await B1_APIgetInfo(id)
-    if (res.code === 0) {
-      setTopInfo(res.data)
-      setClueArr(res.data.collects || [])
-    }
-  }, [id])
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await B1_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        setTopInfo(res.data)
+        setClueArr(res.data.collects || [])
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -145,6 +148,7 @@ function B1edit() {
           const res = await B1_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await B1_APIsaveCreate(obj) : await B1_APIsaveApply(obj)
@@ -156,7 +160,7 @@ function B1edit() {
         }
       }
     },
-    [auditSta, clueArr, topInfo]
+    [auditSta, clueArr, getInfoFu, topInfo]
   )
 
   // 查看的按钮创建-提交-撤回

+ 3 - 0
src/pages/B_enterTibet/B1collect/type.d.ts

@@ -108,4 +108,7 @@ export type FourTableType = {
   effect: string
   receiveUnit: string
   returnUnit: string
+
+  // 移库
+  storageOutId: number | null
 }

+ 22 - 18
src/pages/B_enterTibet/B2identify/B2edit/index.tsx

@@ -108,26 +108,29 @@ function B2edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await B2_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-      setTopInfo(data)
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await B2_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
+        setTopInfo(data)
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -189,6 +192,7 @@ function B2edit() {
           const res = await B2_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await B2_APIsaveCreate(obj) : await B2_APIsaveApply(obj)
@@ -200,7 +204,7 @@ function B2edit() {
         }
       }
     },
-    [auditSta, snaps, topInfo]
+    [auditSta, getInfoFu, snaps, topInfo]
   )
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(

+ 28 - 24
src/pages/B_enterTibet/B34typeIn/B34edit/index.tsx

@@ -129,31 +129,34 @@ function B34edit({ type }: Props) {
   }, [type])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await FourAPI_getInfo(type === '入馆' ? '1' : '2', id)
-    if (res.code === 0) {
-      const data = res.data
-      setTopInfo(data)
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
-
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
-
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
-
-        arrTemp.push({
-          ...obj,
-          subNum: v.subNum ? v.subNum : '',
-          relatedOrderId: v.relatedOrderId ? v.relatedOrderId : ''
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await FourAPI_getInfo(type === '入馆' ? '1' : '2', id2 || id)
+      if (res.code === 0) {
+        const data = res.data
+        setTopInfo(data)
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
+
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
+
+          arrTemp.push({
+            ...obj,
+            subNum: v.subNum ? v.subNum : '',
+            relatedOrderId: v.relatedOrderId ? v.relatedOrderId : ''
+          })
         })
-      })
 
-      setSnaps(arrTemp)
-    }
-  }, [id, type])
+        setSnaps(arrTemp)
+      }
+    },
+    [id, type]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -225,6 +228,7 @@ function B34edit({ type }: Props) {
           const res = await FourAPI_saveDraft(type === '入馆' ? '1' : '2', obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res =
@@ -239,7 +243,7 @@ function B34edit({ type }: Props) {
         }
       }
     },
-    [auditSta, snaps, topInfo, type]
+    [auditSta, getInfoFu, snaps, topInfo, type]
   )
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(

+ 23 - 19
src/pages/C_goodsManage/C21wealth/C21edit/index.tsx

@@ -61,29 +61,32 @@ function C21edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await C21_APIgetInfo(id)
-    if (res.code === 0) {
-      setTopInfo(res.data)
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await C21_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        setTopInfo(res.data)
 
-      // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
+        // 设置富文本
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
 
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = res.data.snaps || []
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = res.data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -171,6 +174,7 @@ function C21edit() {
           const res = await C21_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await C21_APIsaveCreate(obj) : await C21_APIsaveApply(obj)
@@ -182,7 +186,7 @@ function C21edit() {
         }
       }
     },
-    [auditSta, checkDataFu, topInfo, snaps]
+    [checkDataFu, snaps, auditSta, topInfo, getInfoFu]
   )
 
   // 打开侧边栏

+ 11 - 7
src/pages/D_storeManage/D3staff/D3edit/index.tsx

@@ -53,12 +53,15 @@ function C21edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await D3_APIgetInfo(id)
-    if (res.code === 0) {
-      setTopInfo(res.data)
-    }
-  }, [id])
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D3_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        setTopInfo(res.data)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -138,6 +141,7 @@ function C21edit() {
           const res = await D3_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await D3_APIsaveCreate(obj) : await D3_APIsaveApply(obj)
@@ -149,7 +153,7 @@ function C21edit() {
         }
       }
     },
-    [auditSta, checkDataFu, topInfo]
+    [auditSta, checkDataFu, getInfoFu, topInfo]
   )
 
   // 查看的按钮创建-提交-撤回

+ 10 - 6
src/pages/D_storeManage/D4impStor/D4edit/D4check/index.tsx

@@ -24,9 +24,10 @@ type Props = {
   listTemp: D4checkArrType[]
   storageId: number
   waiSiteNumArr: number[]
+  type: '入库' | '移库'
 }
 
-function D4check({ closeFu, listTemp, storageId, waiSiteNumArr }: Props) {
+function D4check({ closeFu, listTemp, storageId, waiSiteNumArr, type }: Props) {
   const [tableList, setTableList] = useState<C1GoodType[]>([])
 
   useEffect(() => {
@@ -75,10 +76,13 @@ function D4check({ closeFu, listTemp, storageId, waiSiteNumArr }: Props) {
 
     if (errNum) return MessageFu.warning(`分库号${errNum}重复`)
 
-    const res1 = await D4_APIcheckSiteNum({
-      siteNums,
-      storageId
-    })
+    const res1 = await D4_APIcheckSiteNum(
+      {
+        siteNums,
+        storageId
+      },
+      type
+    )
     if (res1.code === 0) {
       if (res1.data.length) MessageFu.warning(`分库号${res1.data}重复`)
       else {
@@ -109,7 +113,7 @@ function D4check({ closeFu, listTemp, storageId, waiSiteNumArr }: Props) {
         }
       }
     }
-  }, [closeFu, listTemp, storageId, tableList, waiSiteNumArr])
+  }, [closeFu, listTemp, storageId, tableList, type, waiSiteNumArr])
 
   return (
     <Modal

+ 29 - 19
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -87,28 +87,31 @@ function D4edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await D4_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D4_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
 
-      setTopInfo(data)
+        setTopInfo(data)
 
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -212,6 +215,7 @@ function D4edit() {
           const res = await D4_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res: any = val === '创建' ? await D4_APIsaveCreate(obj) : await D4_APIsaveApply(obj)
@@ -228,7 +232,7 @@ function D4edit() {
         }
       }
     },
-    [auditSta, checkFu, snaps, topInfo]
+    [auditSta, checkFu, getInfoFu, snaps, topInfo]
   )
 
   // 打开侧边栏
@@ -372,7 +376,7 @@ function D4edit() {
 
       // if (1 + 1 === 2) return
 
-      const res =
+      const res: any =
         val === '创建'
           ? await D4_APIsaveCreate(obj)
           : val === '提交'
@@ -383,6 +387,11 @@ function D4edit() {
         if (sollrDom.current) sollrDom.current.scrollTop = 0
         MessageFu.success(val + '成功')
         getInfoFu()
+      } else if (res.code === 3101) {
+        const data = JSON.parse(res.msg || '[]')
+        // setCheckArr(data)
+        const siteNumArr = data.map((v: any) => v.siteNum)
+        MessageFu.warning(`分库号${siteNumArr}已存在`)
       }
     },
     [getInfoFu, id, snaps, topInfo]
@@ -742,6 +751,7 @@ function D4edit() {
           closeFu={() => setCheckArr([])}
           listTemp={checkArr}
           waiSiteNumArr={snaps.map(v => v.siteNum!)}
+          type='入库'
         />
       ) : null}
     </div>

+ 122 - 0
src/pages/D_storeManage/D5moveStor/D5edit/index.module.scss

@@ -0,0 +1,122 @@
+.D5edit {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 15px 24px 0px;
+  :global {
+    .D5Tit {
+      font-size: 18px;
+      font-weight: 700;
+      padding-bottom: 10px;
+      padding-left: 18px;
+      border-bottom: 1px solid #ccc;
+      margin-bottom: 17px;
+      color: var(--themeColor);
+      .ant-btn {
+        margin-left: 15px;
+        pointer-events: none;
+      }
+    }
+
+    .D5Tit2 {
+      margin-top: 24px;
+      display: flex;
+      justify-content: space-between;
+      border-bottom: 1px solid #ccc;
+      margin-bottom: 20px;
+      .D5Tit2ll {
+        font-size: 18px;
+        font-weight: 700;
+        padding-left: 18px;
+        margin-bottom: 17px;
+        color: var(--themeColor);
+      }
+      .D5Tit2rr {
+        position: relative;
+        z-index: 2;
+        .ant-btn {
+          margin-left: 15px;
+        }
+      }
+    }
+
+    .D5main {
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .D5rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .D5row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          min-height: 32px;
+          .D5rowll {
+            width: 124px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d5f;
+            }
+          }
+          .D5rowrr {
+            width: calc(100% - 124px);
+            .ant-input-affix-wrapper {
+              width: 300px;
+            }
+            .ant-select {
+              width: 300px;
+            }
+          }
+        }
+        .D5row2 {
+          align-items: self-start;
+          .D5rowll {
+            position: relative;
+            top: 3px;
+          }
+          .ant-input-affix-wrapper {
+            width: 600px !important;
+          }
+        }
+        .D5row3 {
+          position: relative;
+          top: 4px;
+        }
+
+        .D5rowFull {
+          width: 100%;
+          align-items: self-start;
+          margin-bottom: 0;
+          .D5rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+      }
+
+      // 藏品清单
+      .D5googsBox {
+        padding-right: 20px;
+      }
+    }
+
+    .D5btn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
+  }
+}

+ 819 - 0
src/pages/D_storeManage/D5moveStor/D5edit/index.tsx

@@ -0,0 +1,819 @@
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { useDispatch, useSelector } from 'react-redux'
+import { D2_APIgetList } from '@/store/action/D2storSet'
+import { RootState } from '@/store'
+import { useParams } from 'react-router-dom'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+import {
+  D5_APIcreate,
+  D5_APIdel,
+  D5_APIgetInfo,
+  D5_APIgetStorageNum,
+  D5_APIrevocation,
+  D5_APIsaveApply,
+  D5_APIsaveAudit,
+  D5_APIsaveCreate,
+  D5_APIsaveDraft
+} from '@/store/action/D5moveStor'
+import { API_goodsInfo } from '@/store/action/C1ledger'
+import { pageTitTxtObj } from '../../D4impStor/D4edit'
+import dayjs from 'dayjs'
+import { MessageFu } from '@/utils/message'
+import { findFirstDuplicate } from '../../D4impStor/data'
+import history, { btnFlagFu2, openGoodsInfoFu } from '@/utils/history'
+import classNames from 'classnames'
+import { Button, DatePicker, Input, InputNumber, Modal, Select } from 'antd'
+import TextArea from 'antd/es/input/TextArea'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { EXbtnFu } from '@/utils/EXBtn'
+import D4check, { D4checkArrType } from '../../D4impStor/D4edit/D4check'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import { D4tableCgoods, statusObj } from '@/utils/tableData'
+import MyTable from '@/components/MyTable'
+import ZflowTable from '@/components/ZflowTable'
+import ZupFileTable from '@/components/ZupFileTable'
+import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
+import ZGaddNow from '@/components/ZGaddNow'
+
+function D5edit() {
+  // 获取库房设置列表  用于分库缩写下拉
+  const dispatch = useDispatch()
+
+  useEffect(() => {
+    dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const { list: storageIdArr } = useSelector((state: RootState) => state.D2storSet.tableInfo)
+
+  const { key, id } = useParams<any>()
+  // key:1 新增 2编辑 3审批 4查看
+  // 滚到顶部
+  const sollrDom = useRef<HTMLDivElement>(null)
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  // 藏品清单快照数据
+  const [snaps, setSnaps] = useState<C1GoodType[]>([])
+  const delSnapIdsRef = useRef<number[]>([])
+
+  const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
+
+  // 创建订单
+  const creatFu = useCallback(async () => {
+    const res = await D5_APIcreate()
+    if (res.code === 0) {
+      // 从藏品详情点击按钮进来
+      const urlAll = window.location.href
+      if (urlAll.includes('?id=')) {
+        const urlId = urlAll.split('?id=')[1]
+        const res2 = await API_goodsInfo(Number(urlId))
+        if (res2.code === 0) {
+          setTopInfo({ ...res.data, storageOutId: res2.data.storageId })
+          setSnaps([res2.data])
+        }
+      } else setTopInfo(res.data)
+    }
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D5_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
+
+        setTopInfo(data)
+
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
+
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
+
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
+
+  useEffect(() => {
+    if (key === '1') creatFu()
+    else getInfoFu()
+
+    if (sollrDom.current) sollrDom.current.scrollTop = 0
+  }, [creatFu, getInfoFu, key])
+
+  const pageTitTxt = useMemo(() => {
+    return Reflect.get(pageTitTxtObj, key)
+  }, [key])
+
+  const timeChange = useCallback(
+    (e: any, key: 'date') => {
+      setTopInfo({ ...topInfo, [key]: dayjs(e).format('YYYY-MM-DD') })
+    },
+    [topInfo]
+  )
+
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+
+  // 字段的校验
+  const checkFu = useCallback(() => {
+    if (!topInfo.date) {
+      MessageFu.warning('请选择移库日期')
+      return true
+    }
+    if (!topInfo.num) {
+      MessageFu.warning('请输入移库单编号')
+      return true
+    }
+
+    if (!topInfo.storageOutId) {
+      MessageFu.warning('请选择出库分库缩写')
+      return true
+    }
+
+    if (!topInfo.storageId) {
+      MessageFu.warning('请选择入库分库缩写')
+      return true
+    }
+
+    if (!topInfo.reason) {
+      MessageFu.warning('请输入移库原因')
+      return true
+    }
+
+    if (!topInfo.sonUser) {
+      MessageFu.warning('请输入移库人员')
+      return true
+    }
+  }, [topInfo])
+
+  // 新增的底部按钮点击
+  const btnClickFu = useCallback(
+    async (val: '草稿' | '创建' | '保存' | '审批') => {
+      if (checkFu()) {
+        if (sollrDom.current) sollrDom.current.scrollTop = 0
+        return
+      }
+
+      if (val !== '草稿') {
+        if (snaps.length === 0) return MessageFu.warning('请添加藏品')
+        if (snaps.some(v => !v.siteNumNew)) return MessageFu.warning('请输入入库分库号')
+        // 分库号输入重复校验
+        const siteNumArr = snaps.map(v => v.siteNumNew!)
+        const num = findFirstDuplicate(siteNumArr)
+        if (num) return MessageFu.warning(`入库分库号${num}重复`)
+      }
+
+      if (val === '审批') {
+        // console.log('审批信息富文本', rtf2)
+        if (!auditSta) {
+          if (sollrDom.current) sollrDom.current.scrollTop = 0
+          return MessageFu.warning('请选择审批结果')
+        }
+        const rtf2 = ZAuditRef.current?.resData()
+
+        const res: any = await D5_APIsaveAudit({
+          orderId: topInfo.id,
+          rtfOpinion: rtf2,
+          status: auditSta === '同意' ? 1 : 2
+        })
+
+        if (res.code === 0) {
+          MessageFu.success('审批成功')
+          // 跳详情页
+          history.push(`/moveStor_edit/4/${topInfo.id}`)
+        } else if (res.code === 3101) {
+          const data = JSON.parse(res.msg || '[]')
+          setCheckArr(data)
+        }
+      } else {
+        const obj = {
+          ...topInfo,
+          goodsIds: snaps.map(v => v.id).join(','),
+          siteNums: snaps.map(v => v.siteNumNew).join(','),
+          delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
+          snaps: snaps.map(v => ({
+            goodsId: v.id,
+            id: v.id2 ? v.id2 : null,
+            orderId: topInfo.id,
+            siteNum: v.siteNumNew,
+            snap: JSON.stringify(v)
+          }))
+        }
+        // console.log(123, obj.snaps)
+
+        // if (1 + 1 === 2) return
+
+        if (val === '草稿') {
+          // 存草稿 当前页保存 不跳转
+          const res = await D5_APIsaveDraft(obj)
+          if (res.code === 0) {
+            MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
+          }
+        } else {
+          const res: any = val === '创建' ? await D5_APIsaveCreate(obj) : await D5_APIsaveApply(obj)
+          if (res.code === 0) {
+            MessageFu.success(`${val}成功`)
+            // 跳到详情页
+            history.push(`/moveStor_edit/4/${topInfo.id}`)
+          } else if (res.code === 3101) {
+            const data = JSON.parse(res.msg || '[]')
+            // setCheckArr(data)
+            const siteNumArr = data.map((v: any) => v.siteNum)
+            MessageFu.warning(`入库分库号${siteNumArr}已存在`)
+          }
+        }
+      }
+    },
+    [auditSta, checkFu, getInfoFu, snaps, topInfo]
+  )
+
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+
+  // 表格的输入框改变
+  const tableInputChange = useCallback(
+    (id: number, val: number | null, key: 'siteNumNew') => {
+      setSnaps(
+        snaps.map(v => ({
+          ...v,
+          [key]: v.id === id ? val : v[key]
+        }))
+      )
+    },
+    [snaps]
+  )
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '编号',
+        render: (item: C1GoodType) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num || '(空)'}
+            </span>
+          )
+        }
+      },
+      {
+        title: '登记号类型',
+        render: (item: C1GoodType) => item.numName || '(空)'
+      },
+      // {
+      //   title: '出库分库号',
+      //   render: (item: C1GoodType) => item.siteNumOld || '(空)'
+      // },
+      {
+        title: (
+          <div>
+            <span style={{ color: '#ff4d4f' }}> * </span>入库分库号
+          </div>
+        ),
+        width: 180,
+        render: (item: C1GoodType) => (
+          <InputNumber
+            style={{ width: 170 }}
+            disabled={!topInfo.storageId}
+            readOnly={['3', '4'].includes(key)}
+            min={1}
+            max={99999999}
+            precision={0}
+            value={item.siteNumNew}
+            onChange={e => tableInputChange(item.id, e, 'siteNumNew')}
+            placeholder={!topInfo.storageId ? '请先选择入库分库缩写' : '请输入'}
+          />
+        )
+      }
+    ]
+  }, [cathet, key, tableInputChange, topInfo.storageId])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '备注',
+        width: 240,
+        render: (item: C1GoodType) => (
+          <TextArea
+            readOnly={['3', '4'].includes(key)}
+            placeholder={
+              ['3', '4'].includes(key) && !item.beiZhu ? '(空)' : '请输入内容,不超过200字'
+            }
+            maxLength={200}
+            value={item.beiZhu}
+            onChange={e =>
+              setSnaps(
+                snaps.map(v => ({
+                  ...v,
+                  beiZhu: v.id === item.id ? e.target.value.trim() : v.beiZhu
+                }))
+              )
+            }
+          />
+        )
+      },
+      {
+        title: '操作',
+        render: (item: C1GoodType) => {
+          return (
+            <>
+              <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
+                查看
+              </Button>
+              {['3', '4'].includes(key) ? null : (
+                <MyPopconfirm
+                  txtK='删除'
+                  onConfirm={() => {
+                    if (item.id2 && !delSnapIdsRef.current.includes(item.id2))
+                      delSnapIdsRef.current.push(item.id2)
+                    setSnaps(snaps.filter(v => v.id !== item.id))
+                  }}
+                />
+              )}
+            </>
+          )
+        }
+      }
+    ]
+  }, [key, snaps])
+
+  // 点击添加按钮
+  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+
+  // 查看的按钮创建-提交-撤回
+  const lookBtnFu = useCallback(
+    async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (snaps.length === 0) return MessageFu.warning('请添加藏品')
+        if (snaps.some(v => !v.siteNumNew)) return MessageFu.warning('请输入入库分库号')
+        // 分库号输入重复校验
+        const siteNumArr = snaps.map(v => v.siteNumNew!)
+        const num = findFirstDuplicate(siteNumArr)
+        if (num) return MessageFu.warning(`入库分库号${num}重复`)
+      }
+
+      const obj = {
+        ...topInfo,
+        goodsIds: snaps.map(v => v.id).join(','),
+        siteNums: snaps.map(v => v.siteNumNew).join(','),
+        delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
+        snaps: snaps.map(v => ({
+          goodsId: v.id,
+          id: v.id2 ? v.id2 : null,
+          orderId: topInfo.id,
+          siteNum: v.siteNumNew,
+          snap: JSON.stringify(v)
+        }))
+      }
+
+      // console.log(123, obj.snaps)
+
+      // if (1 + 1 === 2) return
+
+      const res: any =
+        val === '创建'
+          ? await D5_APIsaveCreate(obj)
+          : val === '提交'
+          ? await D5_APIsaveApply(obj)
+          : await D5_APIrevocation(id)
+
+      if (res.code === 0) {
+        if (sollrDom.current) sollrDom.current.scrollTop = 0
+        MessageFu.success(val + '成功')
+        getInfoFu()
+      } else if (res.code === 3101) {
+        const data = JSON.parse(res.msg || '[]')
+        // setCheckArr(data)
+        const siteNumArr = data.map((v: any) => v.siteNum)
+        MessageFu.warning(`入库分库号${siteNumArr}已存在`)
+      }
+    },
+    [getInfoFu, id, snaps, topInfo]
+  )
+
+  // 查看模式点击删除
+  const delFu = useCallback(async () => {
+    const res = await D5_APIdel(id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/moveStor')
+    }
+  }, [id])
+
+  // 查看模式点击审批 编辑
+  const lookJumpFu = useCallback(
+    (val: '审批' | '编辑') => {
+      history.push(`/moveStor_edit/${val === '审批' ? 3 : 2}/${id}`)
+      MessageFu.success(`已跳转至${val}页面`)
+    },
+    [id]
+  )
+
+  // 查看模式下的按钮
+  const lookBtn = useMemo(() => {
+    return (
+      <>
+        {btnFlagFu2(topInfo)['创建'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('创建')}>
+            创建
+          </Button>
+        ) : null}
+        {btnFlagFu2(topInfo)['提交'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('提交')}>
+            提交
+          </Button>
+        ) : null}
+
+        {btnFlagFu2(topInfo)['撤回'] ? (
+          <MyPopconfirm
+            txtK='撤回'
+            onConfirm={() => lookBtnFu('撤回')}
+            Dom={
+              <Button type='primary' danger>
+                撤回
+              </Button>
+            }
+          />
+        ) : null}
+
+        {btnFlagFu2(topInfo)['审批'] ? (
+          <Button type='primary' onClick={() => lookJumpFu('审批')}>
+            审批
+          </Button>
+        ) : null}
+        {btnFlagFu2(topInfo)['编辑'] ? (
+          <Button type='primary' onClick={() => lookJumpFu('编辑')}>
+            编辑
+          </Button>
+        ) : null}
+
+        {btnFlagFu2(topInfo)['重新提交'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('提交')}>
+            重新提交
+          </Button>
+        ) : null}
+
+        {EXbtnFu(topInfo)}
+
+        {btnFlagFu2(topInfo)['删除'] ? (
+          <MyPopconfirm
+            txtK='删除'
+            onConfirm={() => delFu()}
+            Dom={
+              <Button type='primary' danger>
+                删除
+              </Button>
+            }
+          />
+        ) : null}
+
+        <Button onClick={() => history.push('/moveStor')}>返回</Button>
+      </>
+    )
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+
+  // 申请记录
+  const [auditsShow, setAuditsShow] = useState(false)
+
+  // 点击自动分配空置分库号
+  const autoFu = useCallback(async () => {
+    if (!topInfo.storageId) return MessageFu.warning('请先选择入库分库缩写')
+    const res = await D5_APIgetStorageNum(snaps.length, topInfo.storageId!)
+    if (res.code === 0) {
+      setSnaps(
+        snaps.map((v, i) => ({
+          ...v,
+          siteNumNew: res.data[i]
+        }))
+      )
+      MessageFu.success('分配成功')
+    }
+  }, [snaps, topInfo.storageId])
+
+  // 二次校验分库号
+  const [checkArr, setCheckArr] = useState<D4checkArrType[]>([])
+
+  // 变更入库分库缩写 清空 藏品清单
+  const [isModalOpen, setIsModalOpen] = useState(0)
+  return (
+    <div className={styles.D5edit}>
+      <div className='pageTitle'>藏品移库-{pageTitTxt}</div>
+
+      <div className='D5main' ref={sollrDom}>
+        {['3'].includes(key) ? (
+          <X3auditInfo
+            dirCode='D5moveStor'
+            myUrl='cms/goodsFile/upload'
+            auditSta={auditSta}
+            auditStaFu={val => setAuDitSta(val)}
+            ref={ZAuditRef}
+          />
+        ) : null}
+
+        {/* 表单字段、附件等 */}
+        <div className='D5Tit'>
+          申请信息
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
+        </div>
+
+        <div className='D5rowAll'>
+          <div className='D5row'>
+            <div className='D5rowll'>
+              <span> * </span>移库日期:
+            </div>
+            <div className='D5rowrr'>
+              <DatePicker
+                disabled={['3', '4'].includes(key)}
+                allowClear={false}
+                value={topInfo.date ? dayjs(topInfo.date) : null}
+                onChange={e => timeChange(e, 'date')}
+              />
+            </div>
+          </div>
+
+          <div className='D5row'>
+            <div className='D5rowll'>
+              <span> * </span>移库单编号:
+            </div>
+            <div className='D5rowrr'>
+              <Input
+                value={topInfo.num}
+                onChange={e => setTopInfo({ ...topInfo, num: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+
+          <div className='D5row'>
+            <div className='D5rowll'>
+              <span> * </span>出库分库缩写:
+            </div>
+            <div className='D5rowrr'>
+              <Select
+                disabled={['3', '4'].includes(key)}
+                placeholder='请搜索选择'
+                showSearch
+                filterOption={(input, option) => {
+                  const txt = option!.label
+                  return txt.toLowerCase().includes(input.toLowerCase())
+                }}
+                options={storageIdArr.map(v => ({
+                  label: v.num + ' - ' + v.name,
+                  value: v.id,
+                  disabled: v.id === topInfo.storageId
+                }))}
+                // fieldNames={{ label: 'num', value: 'num' }}
+                allowClear={true}
+                value={topInfo.storageOutId || null}
+                onChange={e => {
+                  if (topInfo.storageOutId && topInfo.storageOutId !== e && snaps.length) {
+                    setIsModalOpen(e)
+                  } else setTopInfo({ ...topInfo, storageOutId: e ? e : null })
+                }}
+              />
+            </div>
+          </div>
+
+          <div className='D5row'>
+            <div className='D5rowll'>
+              <span> * </span>入库分库缩写:
+            </div>
+            <div className='D5rowrr'>
+              <Select
+                disabled={['3', '4'].includes(key) || !topInfo.storageOutId}
+                placeholder={topInfo.storageOutId ? '请搜索选择' : '请先选择出库分库缩写'}
+                showSearch
+                filterOption={(input, option) => {
+                  const txt = option!.label
+
+                  return txt.toLowerCase().includes(input.toLowerCase())
+                }}
+                options={storageIdArr.map(v => ({
+                  label: v.num + ' - ' + v.name,
+                  value: v.id,
+                  disabled: v.id === topInfo.storageOutId
+                }))}
+                // fieldNames={{ label: 'num', value: 'num' }}
+                allowClear={true}
+                value={topInfo.storageId || null}
+                onChange={e => {
+                  setSnaps(
+                    snaps.map(v => ({
+                      ...v,
+                      siteNumNew: null
+                    }))
+                  )
+                  setTopInfo({ ...topInfo, storageId: e ? e : null })
+                }}
+              />
+            </div>
+          </div>
+
+          <div className='D5row D5row2'>
+            <div className='D5rowll'>
+              <span> * </span>移库原因:
+            </div>
+            <div className='D5rowrr'>
+              <TextArea
+                value={topInfo.reason}
+                onChange={e => setTopInfo({ ...topInfo, reason: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder={['3', '4'].includes(key) ? '(空)' : '请输入内容'}
+                maxLength={200}
+                showCount
+              />
+            </div>
+          </div>
+
+          <div className='D5row'>
+            <div className='D5rowll'>
+              <span> * </span>移库人员:
+            </div>
+            <div className='D5rowrr'>
+              <Input
+                value={topInfo.sonUser}
+                onChange={e => setTopInfo({ ...topInfo, sonUser: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder={['3', '4'].includes(key) ? '(空)' : '请输入内容'}
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+        </div>
+
+        {/* 藏品清单 */}
+        <div className='D5googsBox'>
+          <div className='D5Tit2'>
+            <div className='D5Tit2ll'>藏品清单</div>
+            <div className='D5Tit2rr'>
+              {['3', '4'].includes(key) ? null : (
+                <>
+                  <Button type='primary' onClick={autoFu} disabled={snaps.length === 0}>
+                    自动分配空置分库号
+                  </Button>
+                  &emsp;
+                  <Button
+                    type='primary'
+                    onClick={() => {
+                      if (!topInfo.storageOutId) return MessageFu.warning('请先选择出库分库缩写')
+                      setNowSta({
+                        key: '藏品入库',
+                        id: 'cms/orderMove/goods/getList'
+                      })
+                    }}
+                  >
+                    新增
+                  </Button>
+                </>
+              )}
+            </div>
+          </div>
+
+          {/* 表格 */}
+          <MyTable
+            list={snaps}
+            columnsTemp={D4tableCgoods}
+            startBtn={startBtn}
+            lastBtn={tableLastBtn}
+            pagingInfo={false}
+          />
+        </div>
+
+        {/* 申请流程 */}
+        {auditsShow ? (
+          <ZflowTable tableArr={topInfo.audits || []} closeFu={() => setAuditsShow(false)} />
+        ) : null}
+
+        {/* 底部按钮 */}
+        <div className='D5btn'>
+          {['3', '4'].includes(key) && topInfo.audits && topInfo.audits.length ? (
+            <Button type='primary' onClick={() => setAuditsShow(true)}>
+              申请记录
+            </Button>
+          ) : null}
+
+          {key === '4' ? (
+            lookBtn
+          ) : (
+            <>
+              {key === '3' ? (
+                <Button type='primary' onClick={() => btnClickFu('审批')}>
+                  审批
+                </Button>
+              ) : (
+                <Button type='primary' onClick={() => btnClickFu(key === '1' ? '创建' : '保存')}>
+                  {key === '1' ? '创建' : '保存'}
+                </Button>
+              )}
+
+              {key === '1' ? (
+                <Button type='primary' onClick={() => btnClickFu('草稿')}>
+                  存草稿
+                </Button>
+              ) : null}
+
+              <MyPopconfirm txtK='取消' onConfirm={() => history.push('/moveStor')} />
+            </>
+          )}
+        </div>
+
+        {/* 附件归档 */}
+        {topInfo.status === 4 ? (
+          <ZupFileTable
+            listTemp={topInfo.filing || []}
+            dirCode='D5moveStor'
+            myUrl='cms/orderMove/upload'
+            fromData={{ moduleId: topInfo.id }}
+          />
+        ) : null}
+      </div>
+
+      {/* 打开侧边栏 */}
+      <Y1cathet sId={cathet} closeFu={() => setCathet(0)} />
+
+      {nowSta.id ? (
+        <ZGaddNow
+          canObj={{ storageId: topInfo.storageOutId }}
+          nowSta={nowSta}
+          closeFu={() => setNowSta({ key: '', id: '' })}
+          dataResFu={data => {
+            const dataTemp = [...data]
+            dataTemp.forEach(v => {
+              // id2表示的是自己这条数据的id id才是goodsId
+              const obj = snapsID2ref.current.find(c => c.goodsId === v.id)
+
+              if (obj) v.id2 = obj.id
+            })
+            setSnaps(dataTemp)
+          }}
+          oldCheckArr={snaps}
+        />
+      ) : null}
+
+      {/* 二次校验分库号 */}
+      {checkArr.length ? (
+        <D4check
+          storageId={Number(topInfo.storageId)}
+          closeFu={() => setCheckArr([])}
+          listTemp={checkArr}
+          waiSiteNumArr={snaps.map(v => v.siteNumNew!)}
+          type='移库'
+        />
+      ) : null}
+
+      {/* 入库分库缩写改变的时候校验一下 */}
+      <Modal
+        wrapClassName={styles.D6editMo}
+        title='变更入库分库后,将清空当前的藏品清单'
+        open={!!isModalOpen}
+        footer={[]}
+      >
+        <div className='D6editMoBtn'>
+          <Button
+            type='primary'
+            onClick={() => {
+              setTopInfo({ ...topInfo, storageId: isModalOpen })
+
+              snaps.forEach(v => {
+                if (!delSnapIdsRef.current.includes(v.id)) delSnapIdsRef.current.push(v.id)
+              })
+              setSnaps([])
+              setIsModalOpen(0)
+            }}
+          >
+            继续
+          </Button>
+          &emsp;
+          <Button onClick={() => setIsModalOpen(0)}>取消</Button>
+        </div>
+      </Modal>
+    </div>
+  )
+}
+
+const MemoD5edit = React.memo(D5edit)
+
+export default MemoD5edit

+ 26 - 0
src/pages/D_storeManage/D5moveStor/index.module.scss

@@ -1,4 +1,30 @@
 .D5moveStor {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px 24px 0;
   :global {
+    .D5top {
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 15px;
+      .D5topll {
+        display: flex;
+        & > div {
+          position: relative;
+          margin-right: 15px;
+          display: flex;
+          align-items: center;
+          .ant-input {
+            width: 160px;
+          }
+        }
+      }
+      .ant-select-selection-placeholder {
+        color: black;
+      }
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 312 - 2
src/pages/D_storeManage/D5moveStor/index.tsx

@@ -1,10 +1,320 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { Button, DatePicker, Input, Select } from 'antd'
+import { useDispatch, useSelector } from 'react-redux'
+import { D5_APIdel, D5_APIgetList } from '@/store/action/D5moveStor'
+import { MessageFu } from '@/utils/message'
+import history, { btnFlagFu } from '@/utils/history'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { D4baseFormData, D4InputKeyType } from '../D4impStor/data'
+import store, { RootState } from '@/store'
+import { D5tableC, statusObj } from '@/utils/tableData'
+import dayjs from 'dayjs'
+import { selectObj } from '@/utils/select'
+import MyTable from '@/components/MyTable'
+const { RangePicker } = DatePicker
+
 function D5moveStor() {
+  const dispatch = useDispatch()
+  const [formData, setFormData] = useState(D4baseFormData)
+  const formDataRef = useRef(D4baseFormData)
+  const formDataOldRef = useRef(D4baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 时间选择器改变
+
+  const timeChange = useCallback(
+    (date: any, dateString: any) => {
+      let businessTimeStart = ''
+      let businessTimeEnd = ''
+      if (dateString[0] && dateString[1]) {
+        businessTimeStart = dateString[0] + ' 00:00:00'
+        businessTimeEnd = dateString[1] + ' 23:59:59'
+      }
+      setFormData({ ...formData, businessTimeStart, businessTimeEnd })
+    },
+    [formData]
+  )
+
+  const timeChange2 = useCallback(
+    (date: any, dateString: any) => {
+      let startTime = ''
+      let endTime = ''
+      if (dateString[0] && dateString[1]) {
+        startTime = dateString[0] + ' 00:00:00'
+        endTime = dateString[1] + ' 23:59:59'
+      }
+      setFormData({ ...formData, startTime, endTime })
+    },
+    [formData]
+  )
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    formDataOldRef.current = { ...formDataRef.current }
+    dispatch(D5_APIgetList(formDataRef.current))
+  }, [dispatch])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: D4InputKeyType) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData(D4baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  // 点击删除
+  const delTableFu = useCallback(
+    async (id: number) => {
+      const res = await D5_APIdel(id)
+      if (res.code === 0) {
+        MessageFu.success('删除成功')
+        getListFu()
+      }
+    },
+    [getListFu]
+  )
+
+  // 点击各种操作按钮
+  const tableBtnFu = useCallback((id: number, key: string) => {
+    history.push(`/moveStor_edit/${key}/${id}`)
+  }, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: FourTableType) => {
+          let obj = btnFlagFu(item)
+          return !Object.values(obj).some(Boolean) ? (
+            '-'
+          ) : (
+            <>
+              {obj['编辑'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '2')}>
+                  编辑
+                </Button>
+              ) : null}
+
+              {obj['审批'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '3')}>
+                  审批
+                </Button>
+              ) : null}
+              {obj['查看'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '4')}>
+                  查看
+                </Button>
+              ) : null}
+
+              {obj['删除'] ? (
+                <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+              ) : null}
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, tableBtnFu])
+
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.D5moveStor.tableInfo)
+
+  // 点击导出
+  const deriveFu = useCallback(async () => {
+    const res = await D5_APIgetList(
+      {
+        ...formDataOldRef.current,
+        pageNum: 1,
+        pageSize: 99999
+      },
+      true
+    )
+
+    if (res.code === 0) {
+      if (res.data.records.length <= 0) return MessageFu.warning('当前搜索条件没有数据!')
+
+      store.dispatch({
+        type: 'layout/exInfo',
+        payload: {
+          name: '藏品移库',
+          show: true,
+          arr: [
+            { key: 'date', txt: '移库日期' },
+            { key: 'num', txt: '移库单编号' },
+            { key: 'sonNum2', txt: '出库分库缩写' },
+            { key: 'sonNum', txt: '入库分库缩写' },
+            { key: 'deptName', txt: '发起部门' },
+            { key: 'creatorName', txt: '发起人' },
+            { key: 'createTime', txt: '发起日期' },
+            { key: 'status', txt: '申请状态' }
+          ],
+          data: res.data.records.map((v: FourTableType) => ({
+            ...v,
+            status: statusObj[v.status as 1]
+          }))
+        }
+      })
+    }
+  }, [])
+
   return (
     <div className={styles.D5moveStor}>
       <div className='pageTitle'>藏品移库</div>
-      <p>待开发</p>
+      <div className='D5top'>
+        <div className='D5topll'>
+          <div>
+            <span>移库日期范围:</span>
+            <RangePicker
+              value={
+                formData.businessTimeStart
+                  ? [dayjs(formData.businessTimeStart), dayjs(formData.businessTimeEnd)]
+                  : null
+              }
+              onChange={timeChange}
+            />
+          </div>
+
+          <div>
+            <span>移库单编号:</span>
+            <Input
+              style={{ width: 240 }}
+              placeholder='请输入入库单编号'
+              maxLength={30}
+              value={formData.num}
+              onChange={e => txtChangeFu(e.target.value, 'num')}
+            />
+          </div>
+
+          <div>
+            <span>发起部门:</span>
+            <Input
+              style={{ width: 240 }}
+              placeholder='请输入发起部门'
+              maxLength={30}
+              value={formData.deptName}
+              onChange={e => txtChangeFu(e.target.value, 'deptName')}
+            />
+          </div>
+        </div>
+        <div className='D5toprr'>
+          <Button type='primary' onClick={deriveFu}>
+            批量导出
+          </Button>
+          &emsp;
+          <Button type='primary' onClick={() => history.push('/moveStor_edit/1/null')}>
+            新增
+          </Button>
+        </div>
+      </div>
+
+      <div className='D5top'>
+        <div className='D5topll'>
+          <div>
+            <span>发起人:</span>
+            <Input
+              placeholder='请输入发起人'
+              maxLength={30}
+              value={formData.userName}
+              onChange={e => txtChangeFu(e.target.value, 'userName')}
+            />
+          </div>
+
+          <div>
+            <span>发起日期范围:</span>
+            <RangePicker
+              style={{ width: 240 }}
+              value={
+                formData.startTime ? [dayjs(formData.startTime), dayjs(formData.endTime)] : null
+              }
+              onChange={timeChange2}
+            />
+          </div>
+          <div>
+            <span>申请状态:</span>
+            <Select
+              allowClear={true}
+              placeholder='全部'
+              style={{ width: 158 }}
+              value={formData.status ? formData.status : null}
+              onChange={e => setFormData({ ...formData, status: e })}
+              options={selectObj['申请状态'].filter(v => v.label !== '待盘点')}
+            />
+          </div>
+
+          <div>
+            <span>选择角色:</span>
+            <Select
+              allowClear={true}
+              style={{ width: 158 }}
+              placeholder='全部'
+              options={selectObj['角色']}
+              // fieldNames={{ value: 'id', label: 'roleName' }}
+              value={formData.userType ? formData.userType : null}
+              onChange={e => setFormData({ ...formData, userType: e })}
+            />
+          </div>
+        </div>
+        <div className='D5toprr'>
+          <Button type='primary' onClick={clickSearch}>
+            查询
+          </Button>
+          &emsp;<Button onClick={resetSelectFu}>重置</Button>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={610}
+        list={tableInfo.list}
+        columnsTemp={D5tableC}
+        lastBtn={tableLastBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={tableInfo.total}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
     </div>
   )
 }

+ 23 - 19
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -76,26 +76,29 @@ function D6edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await D6_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
-      setTopInfo(data)
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D6_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
+        setTopInfo(data)
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -232,6 +235,7 @@ function D6edit() {
           const res = await D6_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res: any = val === '创建' ? await D6_APIsaveCreate(obj) : await D6_APIsaveApply(obj)
@@ -243,7 +247,7 @@ function D6edit() {
         }
       }
     },
-    [auditSta, checkFu, snaps, topInfo]
+    [auditSta, checkFu, getInfoFu, snaps, topInfo]
   )
 
   // 打开侧边栏
@@ -896,7 +900,7 @@ function D6edit() {
         </div>
       </Modal>
 
-      {/* 批量填写 */}
+      {/* 批量填写*/}
       {batch ? (
         <D6batchInput
           type={topInfo.sonTypeName as '1'}

+ 24 - 20
src/pages/D_storeManage/D8cancel/D8edit/index.tsx

@@ -70,30 +70,33 @@ function D8edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await D8_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D8_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
 
-      setTopInfo(data)
-      // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
+        setTopInfo(data)
+        // 设置富文本
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
 
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -166,6 +169,7 @@ function D8edit() {
           const res = await D8_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await D8_APIsaveCreate(obj) : await D8_APIsaveApply(obj)
@@ -177,7 +181,7 @@ function D8edit() {
         }
       }
     },
-    [auditSta, snaps, topInfo]
+    [auditSta, getInfoFu, snaps, topInfo]
   )
 
   // 打开侧边栏

+ 18 - 14
src/pages/E_goodsStorage/E1accident/E1edit/index.tsx

@@ -79,22 +79,25 @@ function E1edit() {
   }, [numNameChangeFu])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await E1_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await E1_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
 
-      setTopInfo(data)
+        setTopInfo(data)
 
-      // 设置富文本
-      ZRichTextRefQian.current?.ritxtShowFu(JSON.parse(data.authInfoRtf || '{}'))
-      ZRichTextRefHou.current?.ritxtShowFu(JSON.parse(data.authResultRtf || '{}'))
-      ZRichTextRefYuan.current?.ritxtShowFu(JSON.parse(data.reason || '{}'))
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
+        // 设置富文本
+        ZRichTextRefQian.current?.ritxtShowFu(JSON.parse(data.authInfoRtf || '{}'))
+        ZRichTextRefHou.current?.ritxtShowFu(JSON.parse(data.authResultRtf || '{}'))
+        ZRichTextRefYuan.current?.ritxtShowFu(JSON.parse(data.reason || '{}'))
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
 
-      if (data.numName) numNameChangeFu(data.numName)
-    }
-  }, [id, numNameChangeFu])
+        if (data.numName) numNameChangeFu(data.numName)
+      }
+    },
+    [id, numNameChangeFu]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -205,6 +208,7 @@ function E1edit() {
           const res = await E1_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await E1_APIsaveCreate(obj) : await E1_APIsaveApply(obj)
@@ -216,7 +220,7 @@ function E1edit() {
         }
       }
     },
-    [auditSta, checkFu, topInfo]
+    [auditSta, checkFu, getInfoFu, topInfo]
   )
 
   // 查看的按钮创建-提交-撤回

+ 15 - 11
src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx

@@ -93,19 +93,22 @@ function E3edit() {
   }, [numNameChangeFu])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await E3_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await E3_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
 
-      setTopInfo(data)
+        setTopInfo(data)
 
-      // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
+        // 设置富文本
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
 
-      if (data.numName) numNameChangeFu(data.numName)
-    }
-  }, [id, numNameChangeFu])
+        if (data.numName) numNameChangeFu(data.numName)
+      }
+    },
+    [id, numNameChangeFu]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -208,6 +211,7 @@ function E3edit() {
           const res = await E3_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await E3_APIsaveCreate(obj) : await E3_APIsaveApply(obj)
@@ -219,7 +223,7 @@ function E3edit() {
         }
       }
     },
-    [auditSta, checkFu, topInfo]
+    [auditSta, checkFu, getInfoFu, topInfo]
   )
 
   // 查看的按钮创建-提交-撤回

+ 24 - 20
src/pages/E_goodsStorage/E4repair/E4edit/index.tsx

@@ -71,30 +71,33 @@ function E4edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await E4_APIgetInfo(id)
-    if (res.code === 0) {
-      const data = res.data
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await E4_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        const data = res.data
 
-      setTopInfo(data)
-      // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
+        setTopInfo(data)
+        // 设置富文本
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf || '{}'))
 
-      // 藏品清单快照信息id对比
-      const arrTemp: any = []
-      const snapsTemp = data.snaps || []
+        // 藏品清单快照信息id对比
+        const arrTemp: any = []
+        const snapsTemp = data.snaps || []
 
-      snapsTemp.forEach((v: any) => {
-        snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+        snapsTemp.forEach((v: any) => {
+          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
 
-        const obj = JSON.parse(v.snap || '{}')
-        if (obj.id) obj.id2 = v.id
+          const obj = JSON.parse(v.snap || '{}')
+          if (obj.id) obj.id2 = v.id
 
-        arrTemp.push(obj)
-      })
-      setSnaps(arrTemp)
-    }
-  }, [id])
+          arrTemp.push(obj)
+        })
+        setSnaps(arrTemp)
+      }
+    },
+    [id]
+  )
 
   useEffect(() => {
     if (key === '1') creatFu()
@@ -198,6 +201,7 @@ function E4edit() {
           const res = await E4_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await E4_APIsaveCreate(obj) : await E4_APIsaveApply(obj)
@@ -209,7 +213,7 @@ function E4edit() {
         }
       }
     },
-    [auditSta, checkFu, snaps, topInfo]
+    [auditSta, checkFu, getInfoFu, snaps, topInfo]
   )
 
   // 打开侧边栏

+ 13 - 9
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -74,15 +74,18 @@ function F1edit() {
   }, [])
 
   // 获取详情
-  const getInfoFu = useCallback(async () => {
-    const res = await D4_APIgetInfo(id)
-    if (res.code === 0) {
-      setTopInfo(res.data)
+  const getInfoFu = useCallback(
+    async (id2?: number) => {
+      const res = await D4_APIgetInfo(id2 || id)
+      if (res.code === 0) {
+        setTopInfo(res.data)
 
-      // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
-    }
-  }, [id])
+        // 设置富文本
+        ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
+      }
+    },
+    [id]
+  )
 
   // 查看模式点击删除
   const delFu = useCallback(async () => {
@@ -287,6 +290,7 @@ function F1edit() {
           const res = await D4_APIsaveDraft(obj)
           if (res.code === 0) {
             MessageFu.success('草稿保存成功')
+            getInfoFu(topInfo.id)
           }
         } else {
           const res = val === '创建' ? await D4_APIsaveCreate(obj) : await D4_APIsaveApply(obj)
@@ -298,7 +302,7 @@ function F1edit() {
         }
       }
     },
-    [auditSta, checkDataFu, topInfo]
+    [auditSta, checkDataFu, getInfoFu, topInfo]
   )
 
   return (

+ 7 - 0
src/pages/Layout/data.ts

@@ -420,6 +420,7 @@ export const routerSon: RouterTypeRow[] = [
     path: '/enterTibet_edit/:key/:id',
     Com: React.lazy(() => import('../B_enterTibet/B4enterTibet/B4edit'))
   },
+
   // -------------资源使用-----------------
   {
     id: 20,
@@ -438,5 +439,11 @@ export const routerSon: RouterTypeRow[] = [
     name: '藏品盘点-新增/编辑/审批/查看',
     path: '/check_edit/:key/:id',
     Com: React.lazy(() => import('../D_storeManage/D7check/D7edit'))
+  },
+  {
+    id: 25,
+    name: '藏品移库-新增、编辑、审批/查看',
+    path: '/moveStor_edit/:key/:id',
+    Com: React.lazy(() => import('../D_storeManage/D5moveStor/D5edit'))
   }
 ]

+ 4 - 2
src/store/action/D4impStor.ts

@@ -86,8 +86,10 @@ export const D4_APIgetStorageNum = (num: number, storageId: number) => {
 /**
  * 入库-检查分库号是否使用
  */
-export const D4_APIcheckSiteNum = (data: any) => {
-  return http.post('cms/orderIn/checkSiteNum', data)
+export const D4_APIcheckSiteNum = (data: any, type: '入库' | '移库') => {
+  const url = `cms/${type === '入库' ? 'orderIn' : 'orderMove'}/checkSiteNum`
+
+  return http.post(url, data)
 }
 
 /**

+ 98 - 0
src/store/action/D5moveStor.ts

@@ -0,0 +1,98 @@
+import http from '@/utils/http'
+import { AppDispatch } from '..'
+/**
+ * 移库 - 获取分页列表
+ */
+export const D5_APIgetList = (data: any, exportFlag?: boolean): any => {
+  if (exportFlag) return http.post('cms/orderMove/page', data)
+  else {
+    return async (dispatch: AppDispatch) => {
+      const res = await http.post('cms/orderMove/page', data)
+      if (res.code === 0) {
+        const obj = {
+          list: res.data.records,
+          total: res.data.total
+        }
+
+        dispatch({ type: 'D5/getList', payload: obj })
+      }
+    }
+  }
+}
+
+/**
+ * 移库-删除
+ */
+export const D5_APIdel = (id: number) => {
+  return http.get(`cms/orderMove/remove/${id}`)
+}
+
+/**
+ * 移库-创建订单
+ */
+export const D5_APIcreate = () => {
+  return http.get('cms/orderMove/create')
+}
+
+/**
+ * 移库-获取详情
+ */
+export const D5_APIgetInfo = (id: number) => {
+  return http.get(`cms/orderMove/detail/${id}`)
+}
+
+/**
+ * 移库-存草稿
+ */
+export const D5_APIsaveDraft = (data: any) => {
+  return http.post('cms/orderMove/saveDraft', data)
+}
+
+/**
+ * 移库-创建
+ */
+export const D5_APIsaveCreate = (data: any) => {
+  return http.post('cms/orderMove/saveCreate', data)
+}
+
+/**
+ * 移库-编辑保存
+ */
+export const D5_APIsaveApply = (data: any) => {
+  return http.post('cms/orderMove/saveApply', data)
+}
+
+/**
+ * 移库-审批
+ */
+export const D5_APIsaveAudit = (data: any) => {
+  return http.post('cms/orderMove/audit', data)
+}
+
+/**
+ * 移库-撤回订单
+ */
+export const D5_APIrevocation = (id: number) => {
+  return http.get(`cms/orderMove/revocation/${id}`)
+}
+
+/**
+ * 移库-自动分配分库号
+ */
+export const D5_APIgetStorageNum = (num: number, storageId: number) => {
+  return http.get(`cms/orderMove/getStorageNum?limit=${num}&storageId=${storageId}`)
+}
+
+/**
+ * 移库-检查分库号是否使用
+ */
+export const D5_APIcheckSiteNum = (data: any) => {
+  return http.post('cms/orderMove/checkSiteNum', data)
+}
+
+/**
+ * 移库-保存审核快照
+ */
+export const D5_APIauditSnap = (data: any) => {
+  return http.post('cms/orderMove/auditSnap', data)
+}

+ 28 - 0
src/store/reducer/D5moveStor.ts

@@ -0,0 +1,28 @@
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as FourTableType[],
+    total: 0
+  }
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'D5/getList'
+  payload: { list: FourTableType[]; total: number }
+}
+
+// reducer
+export default function userReducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'D5/getList':
+      return { ...state, tableInfo: action.payload }
+
+    default:
+      return state
+  }
+}

+ 2 - 0
src/store/reducer/index.ts

@@ -14,6 +14,7 @@ import C6edit from './C6edit'
 import C8recycleBin from './C8recycleBin'
 import D2storSet from './D2storSet'
 import D4impStor from './D4impStor'
+import D5moveStor from './D5moveStor'
 import D6putsStor from './D6putsStor'
 import D8cancel from './D8cancel'
 import E1accident from './E1accident'
@@ -48,6 +49,7 @@ const rootReducer = combineReducers({
   C8recycleBin,
   D2storSet,
   D4impStor,
+  D5moveStor,
   D6putsStor,
   D8cancel,
   E1accident,

+ 12 - 0
src/utils/tableData.ts

@@ -253,6 +253,18 @@ export const D4tableC = [
   ['txtChange', '申请状态', 'status', statusObj]
 ]
 
+// 移库
+export const D5tableC = [
+  ['txt', '移库日期', 'date'],
+  ['txt', '移库单编号', 'num'],
+  ['txt', '出库分库缩写', 'sonNum2'],
+  ['txt', '入库分库缩写', 'sonNum'],
+  ['txt', '发起部门', 'deptName'],
+  ['txt', '发起人', 'creatorName'],
+  ['txt', '发起日期', 'createTime'],
+  ['txtChange', '申请状态', 'status', statusObj]
+]
+
 // 提退类型obj
 export const sonTypeNameObj: any = {}
 D6typeArr.forEach(v => {