浏览代码

fix: --

chenlei 1 月之前
父节点
当前提交
a3c53bad9d

+ 9 - 3
src/pages/A_workbench/A1dataSta/components/Tab1/index.tsx

@@ -158,16 +158,22 @@ export const A1Tab1: FC = () => {
         const levels = ['total', 'level1', 'level2', 'level3', 'level0', 'level4']
         const levels = ['total', 'level1', 'level2', 'level3', 'level0', 'level4']
 
 
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
-        worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => prevYearData[0][i[2]] || 0)])
+        worksheet.addRow([
+          '',
+          ...NUMBER_OF_COLLECTION_COLUMNS.map(i => prevYearData?.[0]?.[i[2]] || 0)
+        ])
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
-        worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => curYearData[0][i[2]] || 0)])
+        worksheet.addRow([
+          '',
+          ...NUMBER_OF_COLLECTION_COLUMNS.map(i => curYearData?.[0]?.[i[2]] || 0)
+        ])
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
         worksheet.addRow(['', ...NUMBER_OF_COLLECTION_COLUMNS.map(i => i[1])])
         worksheet.addRow([
         worksheet.addRow([
           '',
           '',
           ...levels.map(level => {
           ...levels.map(level => {
             const curProp =
             const curProp =
               level === 'total' ? 'total' : `pcs${level.charAt(0).toUpperCase()}${level.slice(1)}`
               level === 'total' ? 'total' : `pcs${level.charAt(0).toUpperCase()}${level.slice(1)}`
-            const diff = curYearData[0][curProp] - prevYearData[0][curProp]
+            const diff = (curYearData?.[0]?.[curProp] || 0) - (prevYearData?.[0]?.[curProp] || 0)
             return !isNaN(diff) ? diff : 0
             return !isNaN(diff) ? diff : 0
           })
           })
         ])
         ])

+ 3 - 2
src/pages/B_enterTibet/B34typeIn/B34edit/index.tsx

@@ -33,9 +33,10 @@ import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 
 type Props = {
 type Props = {
   type: '入馆' | '入藏'
   type: '入馆' | '入藏'
+  menuId: number
 }
 }
 
 
-function B34edit({ type }: Props) {
+function B34edit({ type, menuId }: Props) {
   const { key, id } = useParams<any>()
   const { key, id } = useParams<any>()
   // key:1 新增 2编辑 3审批 4查看
   // key:1 新增 2编辑 3审批 4查看
 
 
@@ -555,7 +556,7 @@ function B34edit({ type }: Props) {
       </div>
       </div>
 
 
       {/* 打开侧边栏 */}
       {/* 打开侧边栏 */}
-      <Y1cathet sId={cathet} menuId={9901} closeFu={() => setCathet(0)} />
+      <Y1cathet sId={cathet} menuId={menuId} closeFu={() => setCathet(0)} />
 
 
       {/* 选中藏品弹窗 */}
       {/* 选中藏品弹窗 */}
       {nowSta.id ? (
       {nowSta.id ? (

+ 1 - 1
src/pages/B_enterTibet/B3entering/B3edit.tsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import React from 'react'
 import B34edit from '../B34typeIn/B34edit'
 import B34edit from '../B34typeIn/B34edit'
 function B3edit() {
 function B3edit() {
-  return <B34edit type='入馆' />
+  return <B34edit menuId={230} type='入馆' />
 }
 }
 
 
 const MemoB3edit = React.memo(B3edit)
 const MemoB3edit = React.memo(B3edit)

+ 1 - 1
src/pages/B_enterTibet/B4enterTibet/B4edit.tsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import React from 'react'
 import B34edit from '../B34typeIn/B34edit'
 import B34edit from '../B34typeIn/B34edit'
 function B4edit() {
 function B4edit() {
-  return <B34edit type='入藏' />
+  return <B34edit menuId={240} type='入藏' />
 }
 }
 
 
 const MemoB4edit = React.memo(B4edit)
 const MemoB4edit = React.memo(B4edit)

+ 10 - 2
src/pages/C_goodsManage/C21wealth/C21edit/index.tsx

@@ -32,6 +32,7 @@ import {
 import { MEDIA_TYPES } from '../constants'
 import { MEDIA_TYPES } from '../constants'
 import { IC21Detail } from '../types'
 import { IC21Detail } from '../types'
 import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 
 
 export const pageTitTxtObj = {
 export const pageTitTxtObj = {
   1: '新增',
   1: '新增',
@@ -233,7 +234,11 @@ function C21edit() {
         render: (item: C1GoodType) => {
         render: (item: C1GoodType) => {
           return (
           return (
             <>
             <>
-              <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id, 20)}>
+              <Button
+                size='small'
+                type='text'
+                onClick={() => openGoodsInfoFu(item.id, 340, '', id)}
+              >
                 查看
                 查看
               </Button>
               </Button>
               <Button size='small' type='text' onClick={() => downloadBatchZip([item.id])}>
               <Button size='small' type='text' onClick={() => downloadBatchZip([item.id])}>
@@ -250,7 +255,7 @@ function C21edit() {
         }
         }
       }
       }
     ]
     ]
-  }, [key, snaps])
+  }, [id, key, snaps])
 
 
   // 点击新增
   // 点击新增
   const [nowSta, setNowSta] = useState({ key: '', id: '' })
   const [nowSta, setNowSta] = useState({ key: '', id: '' })
@@ -548,6 +553,9 @@ function C21edit() {
         )}
         )}
       </div>
       </div>
 
 
+      {/* 打开侧边栏 */}
+      <Y1cathet sId={cathet} menuId={340} orderId={id} closeFu={() => setCathet(0)} />
+
       {/* 新增弹窗 */}
       {/* 新增弹窗 */}
       {nowSta.id ? (
       {nowSta.id ? (
         <ZGaddNow
         <ZGaddNow

+ 26 - 0
src/pages/D_storeManage/D7check/D7edit/index.tsx

@@ -31,6 +31,8 @@ import { areAllCheckersFilled } from '@/utils/objects'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 import { BatchFillingModal } from '../components/BatchFillingModal'
 import { BatchFillingModal } from '../components/BatchFillingModal'
 import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+import classNames from 'classnames'
+import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 
 
 export const pageTitTxtObj = {
 export const pageTitTxtObj = {
   1: '新增',
   1: '新增',
@@ -114,6 +116,26 @@ function D7edit() {
     return Reflect.get(pageTitTxtObj, key)
     return Reflect.get(pageTitTxtObj, key)
   }, [key])
   }, [key])
 
 
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '藏品编号',
+        render: (item: C1GoodType) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num}
+            </span>
+          )
+        }
+      }
+    ]
+  }, [cathet])
+
   const checkDataFu = useCallback(() => {
   const checkDataFu = useCallback(() => {
     if (!topInfo.date) {
     if (!topInfo.date) {
       MessageFu.warning('请选择盘点日期')
       MessageFu.warning('请选择盘点日期')
@@ -488,6 +510,7 @@ function D7edit() {
             widthSet={{ statusCheck: 200, remark: 200 }}
             widthSet={{ statusCheck: 200, remark: 200 }}
             yHeight={350}
             yHeight={350}
             list={collectionList}
             list={collectionList}
+            startBtn={startBtn}
             columnsTemp={D7CHECK_COLLECTION_COLUMNS}
             columnsTemp={D7CHECK_COLLECTION_COLUMNS}
             lastBtn={
             lastBtn={
               ['3', '4'].includes(key)
               ['3', '4'].includes(key)
@@ -596,6 +619,9 @@ function D7edit() {
         setVisible={setStocktakingVisible}
         setVisible={setStocktakingVisible}
         onOk={handleStocktakingOk}
         onOk={handleStocktakingOk}
       />
       />
+
+      {/* 打开侧边栏 */}
+      <Y1cathet sId={cathet} menuId={470} orderId={id} closeFu={() => setCathet(0)} />
     </div>
     </div>
   )
   )
 }
 }

+ 0 - 1
src/pages/D_storeManage/D7check/constants.tsx

@@ -76,7 +76,6 @@ export const D7CEHCK_COLLECTION_RESULT_OBJ = {
 
 
 export const D7CHECK_COLLECTION_COLUMNS = [
 export const D7CHECK_COLLECTION_COLUMNS = [
   ['txt', '登记号类型', 'numName'],
   ['txt', '登记号类型', 'numName'],
-  ['txt', '编号', 'num'],
   ['txt', '藏品分库号', 'siteNum'],
   ['txt', '藏品分库号', 'siteNum'],
   ['txt', '名称', 'name'],
   ['txt', '名称', 'name'],
   ['txtC', '年代', 'dictAge'],
   ['txtC', '年代', 'dictAge'],

+ 1 - 1
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -162,7 +162,7 @@ function F1edit() {
             <Button
             <Button
               size='small'
               size='small'
               type='text'
               type='text'
-              onClick={() => openGoodsInfoFu(item.id, 15, '', topInfo.id)}
+              onClick={() => openGoodsInfoFu(item.id, 910, '', topInfo.id)}
             >
             >
               查看
               查看
             </Button>
             </Button>