chenlei 1 ヶ月 前
コミット
63735ad657
39 ファイル変更898 行追加355 行削除
  1. 2 2
      src/components/ZGaddNow/index.tsx
  2. 4 5
      src/pages/A3_ledger/C1ledger/type.d.ts
  3. 33 26
      src/pages/A_workbench/A1dataSta/data.ts
  4. 2 2
      src/pages/A_workbench/A1dataSta/index.tsx
  5. 34 0
      src/pages/A_workbench/A1dataSta/index2.module.scss
  6. 130 0
      src/pages/A_workbench/A1dataSta/index2.tsx
  7. 3 3
      src/pages/B_enterTibet/B1collect/B1edit/index.tsx
  8. 3 3
      src/pages/B_enterTibet/B2identify/B2edit/index.tsx
  9. 4 4
      src/pages/B_enterTibet/B34typeIn/B34edit/index.tsx
  10. 4 4
      src/pages/C_goodsManage/C1register/C1look/index.tsx
  11. 3 3
      src/pages/C_goodsManage/C21wealth/C21edit/index.tsx
  12. 5 1
      src/pages/D_storeManage/D1storage/index.tsx
  13. 251 0
      src/pages/D_storeManage/D2storSet/D2site/D2SaddNew.tsx
  14. 18 1
      src/pages/D_storeManage/D2storSet/D2site/index.module.scss
  15. 21 21
      src/pages/D_storeManage/D2storSet/D2site/index.tsx
  16. 4 4
      src/pages/D_storeManage/D2storSet/index.tsx
  17. 5 5
      src/pages/D_storeManage/D3staff/D3edit/index.tsx
  18. 3 3
      src/pages/D_storeManage/D4impStor/D4edit/D4check/index.tsx
  19. 50 36
      src/pages/D_storeManage/D4impStor/D4edit/index.tsx
  20. 53 39
      src/pages/D_storeManage/D5moveStor/D5edit/index.tsx
  21. 6 6
      src/pages/D_storeManage/D6putsStor/D6edit/index.tsx
  22. 5 5
      src/pages/D_storeManage/D7check/D7edit/index.tsx
  23. 3 3
      src/pages/D_storeManage/D8cancel/D8edit/index.tsx
  24. 3 3
      src/pages/E_goodsStorage/E1accident/E1edit/index.tsx
  25. 3 3
      src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx
  26. 3 3
      src/pages/E_goodsStorage/E4repair/E4edit/index.tsx
  27. 3 3
      src/pages/F_exhibition/F1exhibition/F1edit/index.tsx
  28. 102 101
      src/pages/Layout/data.ts
  29. 5 1
      src/pages/Y_goodsDetails/Y1cathet/Y11com.tsx
  30. 9 1
      src/pages/Y_goodsDetails/Y2look/index.module.scss
  31. 51 49
      src/pages/Y_goodsDetails/Y2look/index.tsx
  32. 2 2
      src/pages/Z_system/Z2numRule/Z2edit.tsx
  33. 1 1
      src/pages/Z_system/Z2numRule/index.tsx
  34. 51 0
      src/store/action/A1dataSta.ts
  35. 7 0
      src/store/action/D2storSet.ts
  36. 1 1
      src/store/action/D4impStor.ts
  37. 1 1
      src/store/action/D5moveStor.ts
  38. 2 2
      src/utils/http.ts
  39. 8 8
      src/utils/tableData.ts

+ 2 - 2
src/components/ZGaddNow/index.tsx

@@ -254,14 +254,14 @@ function ZGaddNow({
           <div className='B3Gatopll'>
             {searchDom(B3nowArr1.filter(i => !searchFilterKey.includes(i.key)))}
           </div>
-          <div>
+          {/* <div>
             <Checkbox
               checked={formData.isFocus === 1}
               onChange={e => setFormData({ ...formData, isFocus: e.target.checked ? 1 : null })}
             >
               我关注的
             </Checkbox>
-          </div>
+          </div> */}
         </div>
 
         <div className='B3GaTop'>

+ 4 - 5
src/pages/A3_ledger/C1ledger/type.d.ts

@@ -108,7 +108,8 @@ export type C1GoodType = {
   updateTime: string
   uses: string
   // 存放位置数组
-  siteId: number
+  siteId: number | null
+  siteNum: string
   // 库存状态
   statusStorage: number
   // 藏品关注
@@ -131,9 +132,6 @@ export type C1GoodType = {
   dictHouse1: string
   dictHouse2: string
 
-  // 藏品入库
-  siteNum: number | null
-
   // 详情按钮的盘点
   statusCollect: number
 
@@ -147,5 +145,6 @@ export type C1GoodType = {
   storageId: number
 
   // 移库
-  siteNumNew: number | null
+  siteNumNew: string
+  siteIdNew: number | null
 }

+ 33 - 26
src/pages/A_workbench/A1dataSta/data.ts

@@ -31,42 +31,49 @@ echarts.use([
 ])
 
 // 折线图
-export const echartsFu1 = (dom: HTMLDivElement) => {
+export const echartsFu1 = (dom: HTMLDivElement, data: Record<string, number>) => {
   const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
   const option = {
+    title: {
+      text: '近14天已登记藏品数量',
+      left: 'center',
+      top: 10
+    },
     grid: {
-      left: '-30', //距左边边框的距离
-      right: '0%', //距右边边框的距离
-      bottom: '10', //距下面边框的距离
-      top: '15', //距上面边框的距离
+      left: '0', //距左边边框的距离
+      right: '2', //距右边边框的距离
+      bottom: '0', //距下面边框的距离
+      top: '50', //距上面边框的距离
       containLabel: true
     },
 
     xAxis: {
       type: 'category',
-      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+      name: '日期',
+      data: Object.keys(data),
       axisLine: {
-        show: false //隐藏X轴
+        show: true //隐藏X轴
       },
       axisTick: {
-        show: false //隐藏刻度线
+        show: true //隐藏刻度线
       },
       axisLabel: {
-        show: false //隐藏X轴文字
+        show: true //隐藏X轴文字
       }
     },
     yAxis: {
-      type: 'value'
+      type: 'value',
+      name: '件数',
+      minInterval: 1,
+      axisLabel: {
+        formatter: (value: number) => {
+          return Math.floor(value).toString()
+        }
+      }
     },
     series: [
       {
-        data: [182, 193, 988, 546, 454, 1111, 1200],
-        type: 'line'
-        // showSymbol: false,
-        // smooth: true
-      },
-      {
-        data: [820, 932, 901, 934, 1290, 1330, 1320],
+        data: Object.values(data),
         type: 'line'
         // showSymbol: false,
         // smooth: true
@@ -79,10 +86,10 @@ export const echartsFu1 = (dom: HTMLDivElement) => {
         label: {
           backgroundColor: '#6a7985'
         }
-      },
-      formatter: (val: any) => {
-        return `${val[0].axisValue}<br/>入馆${val[0].data}件<br/>入藏${val[1].data}件`
       }
+      // formatter: (val: any) => {
+      //   return `${val[0].axisValue}`
+      // }
     }
   }
   option && myChart.setOption(option)
@@ -205,7 +212,7 @@ export const echartsFu3 = (dom: HTMLDivElement) => {
 
 // 柱状图
 
-export const echartsFu4 = (dom: HTMLDivElement) => {
+export const echartsFu4 = (dom: HTMLDivElement, data: { value: unknown; name: string }[]) => {
   const myChart = echarts.getInstanceByDom(dom) || echarts.init(dom)
   const option = {
     grid: {
@@ -217,14 +224,14 @@ export const echartsFu4 = (dom: HTMLDivElement) => {
     },
     xAxis: {
       type: 'category',
-      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
+      data: data.map((item: any) => item.name)
     },
     yAxis: {
       type: 'value'
     },
     series: [
       {
-        data: [120, 200, 150, 80, 70, 110],
+        data: data.map((item: any) => item.value),
         type: 'bar'
       }
     ],
@@ -235,10 +242,10 @@ export const echartsFu4 = (dom: HTMLDivElement) => {
         label: {
           backgroundColor: '#6a7985'
         }
-      },
-      formatter: (val: any) => {
-        return '展览数量' + val[0].data
       }
+      // formatter: (val: any) => {
+      //   return val[0].data
+      // }
     }
   }
   option && myChart.setOption(option)

+ 2 - 2
src/pages/A_workbench/A1dataSta/index.tsx

@@ -22,7 +22,7 @@ function A1dataSta() {
   // 加载折线图,固定12个月
   const echartRef1 = useRef<HTMLDivElement>(null)
   useEffect(() => {
-    echartsFu1(echartRef1.current!)
+    echartsFu1(echartRef1.current!, {})
   }, [])
 
   // 入藏数据 下拉框
@@ -93,7 +93,7 @@ function A1dataSta() {
   const getInfo6 = useCallback(() => {
     echartsFu2(echartRefBin5.current!, '展览41场', 1, dataTemp[1])
     echartsFu2(echartRefBin6.current!, '展品9999件', 1, dataTemp[1])
-    echartsFu4(echartRefBin7.current!)
+    echartsFu4(echartRefBin7.current!, [])
   }, [])
 
   useEffect(() => {

+ 34 - 0
src/pages/A_workbench/A1dataSta/index2.module.scss

@@ -0,0 +1,34 @@
+.A1dataSta {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px;
+
+  > h3 {
+    display: flex;
+    align-items: center;
+    gap: 20px;
+    font-size: 20px;
+
+    span {
+      color: #999;
+      font-size: 12px;
+    }
+  }
+
+  :global {
+    .A1box {
+      margin: 10px 0;
+      display: flex;
+      align-items: center;
+      gap: 20px;
+    }
+    .A1box1rr {
+      flex: 1;
+      height: 300px;
+    }
+    .A1box2rr {
+      width: 370px;
+      height: 300px;
+    }
+  }
+}

+ 130 - 0
src/pages/A_workbench/A1dataSta/index2.tsx

@@ -0,0 +1,130 @@
+import React, { useEffect, useRef } from 'react'
+import styles from './index2.module.scss'
+import { echartsFu1, echartsFu2, echartsFu4 } from './data'
+import {
+  A1_APIGetCountDictTorn,
+  A1_APIGetCountLevel,
+  A1_APIGetCountOrder,
+  A1_APIGetCountTexture,
+  A1_APIGetCountType,
+  A1_APIGetLineChart
+} from '@/store/action/A1dataSta'
+import { cascaderObjFu } from '@/utils/history'
+import { selectObj } from '@/utils/select'
+
+function A1dataSta() {
+  const echartRef1 = useRef<HTMLDivElement>(null)
+  const echartRef2 = useRef<HTMLDivElement>(null)
+  const echartRef3 = useRef<HTMLDivElement>(null)
+  const echartRef4 = useRef<HTMLDivElement>(null)
+  const echartRef5 = useRef<HTMLDivElement>(null)
+  const echartRef6 = useRef<HTMLDivElement>(null)
+
+  const getLineChart = async () => {
+    const { data } = await A1_APIGetLineChart(14)
+    echartsFu1(echartRef1.current!, data)
+  }
+
+  const getCountType = async (dict: any[]) => {
+    const { data } = await A1_APIGetCountType()
+    echartsFu2(
+      echartRef2.current!,
+      '藏品类别',
+      0,
+      data.map((item: any) => ({
+        value: item.count,
+        name: dict.find(i => i.id === item.dict_type)?.name
+      }))
+    )
+  }
+
+  const getCountLevel = async () => {
+    const { data } = await A1_APIGetCountLevel()
+    echartsFu2(
+      echartRef3.current!,
+      '藏品级别',
+      0,
+      data.map((item: any) => ({ value: item.count, name: item.dict_level }))
+    )
+  }
+
+  const getCountOrder = async (dict: any[]) => {
+    const { data } = await A1_APIGetCountOrder()
+    echartsFu4(
+      echartRef4.current!,
+      data.map((i: any) => ({ value: i.count, name: dict.find(ii => ii.value === i.type)?.label }))
+    )
+  }
+
+  const getCountTexture = async (dict: any[]) => {
+    const { data } = await A1_APIGetCountTexture()
+
+    echartsFu2(
+      echartRef5.current!,
+      '藏品质地',
+      0,
+      data.map((item: any) => {
+        const arr = item.dict_texture3.split(',')
+        const parent = dict.find(i => {
+          return i.id === arr[1]
+        })
+
+        return {
+          value: item.count,
+          name: parent?.children
+            ? parent?.children.find((i: any) => i.id === arr[2])?.name
+            : parent?.name
+        }
+      })
+    )
+  }
+
+  const getCountDictTorn = async (dict: any[]) => {
+    const { data } = await A1_APIGetCountDictTorn()
+    echartsFu2(
+      echartRef6.current!,
+      '藏品类别',
+      0,
+      data.map((item: any) => ({
+        value: item.count,
+        name: dict.find(i => i.id === item.dict_torn)?.name
+      }))
+    )
+  }
+
+  useEffect(() => {
+    const dict = cascaderObjFu()
+
+    getLineChart()
+    getCountType(dict['文物类别'])
+    getCountLevel()
+    getCountOrder(selectObj['业务类型'])
+    getCountTexture([...dict['单一质地'], ...dict['复合或组合质地']])
+    getCountDictTorn(dict['完残程度'])
+  }, [])
+
+  return (
+    <div className={styles.A1dataSta}>
+      <div className='pageTitle'>数据统计</div>
+
+      <h3>
+        已登记藏品 1498 件<span>仅统计状态为“已登记”的藏品数量,每日23:00更新</span>
+      </h3>
+
+      <div className='A1box'>
+        <div className='A1box1rr' ref={echartRef1}></div>
+        <div className='A1box2rr' ref={echartRef2} style={{ width: 500 }}></div>
+        <div className='A1box2rr' ref={echartRef3}></div>
+      </div>
+      <div className='A1box' style={{ marginTop: 30 }}>
+        <div className='A1box1rr' ref={echartRef4}></div>
+        <div className='A1box2rr' ref={echartRef5} style={{ width: 450 }}></div>
+        <div className='A1box2rr' ref={echartRef6} style={{ width: 500 }}></div>
+      </div>
+    </div>
+  )
+}
+
+const MemoA1dataSta = React.memo(A1dataSta)
+
+export default MemoA1dataSta

+ 3 - 3
src/pages/B_enterTibet/B1collect/B1edit/index.tsx

@@ -21,7 +21,7 @@ import {
   B1X_APIgoodsIdTofileId
 } from '@/store/action/B1collect'
 import dayjs from 'dayjs'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import B1MoAdd from './B1MoAdd'
 import { B1Xtype } from '../data'
@@ -29,7 +29,7 @@ import ZupFileTable from '@/components/ZupFileTable'
 import { FourTableType, TypeinfoXLSX } from '../type'
 import B1upXLSX from './B1upXLSX'
 import ZupFile from '@/components/ZupFile'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 import { baseURL } from '@/utils/http'
 
 function B1edit() {
@@ -260,7 +260,7 @@ function B1edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_LIST])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_LIST])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 3 - 3
src/pages/B_enterTibet/B2identify/B2edit/index.tsx

@@ -15,7 +15,7 @@ import {
 } from '@/store/action/B2identify'
 import { MessageFu } from '@/utils/message'
 import history, { btnFlagFu2, infoPageBackFu } from '@/utils/history'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { B2TableC2, statusObj } from '@/utils/tableData'
@@ -30,7 +30,7 @@ import classNames from 'classnames'
 import B2MoAdd from './B2MoAdd'
 import { B2keyFliterFu } from '../data'
 import { FourTableType } from '../../B1collect/type'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 function B2edit() {
   const { key, id } = useParams<any>()
@@ -306,7 +306,7 @@ function B2edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.CERTIFICATE])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.CERTIFICATE])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 4 - 4
src/pages/B_enterTibet/B34typeIn/B34edit/index.tsx

@@ -18,7 +18,7 @@ import {
 } from '@/store/action/FourAll'
 import { MessageFu } from '@/utils/message'
 import history, { btnFlagFu2, infoPageBackFu, openGoodsInfoFu } from '@/utils/history'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { B34TableC2, statusObj } from '@/utils/tableData'
@@ -29,7 +29,7 @@ import ZupFileTable from '@/components/ZupFileTable'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import ZGaddNow from '@/components/ZGaddNow'
 import B34MoAdd from '../B34MoAdd'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 type Props = {
   type: '入馆' | '入藏'
@@ -356,9 +356,9 @@ function B34edit({ type, menuId }: Props) {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [
+        {/* {EXbtnFu(topInfo, [
           type === '入馆' ? EXPORT_WORD_ENUM.VOUCHER : EXPORT_WORD_ENUM.STORAGE_VOUCHER
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 4 - 4
src/pages/C_goodsManage/C1register/C1look/index.tsx

@@ -22,9 +22,9 @@ import ZupFileTable from '@/components/ZupFileTable'
 import ZflowTable from '@/components/ZflowTable'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { MessageFu } from '@/utils/message'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import { C22infoBtnFu } from '../../C22goodEdit/data'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 function C1look() {
   const { key, id } = useParams<any>()
   const query = useQuery()
@@ -256,10 +256,10 @@ function C1look() {
               </Button>
             ) : null}
 
-            {EXbtnFu(info, [
+            {/* {EXbtnFu(info, [
               EXPORT_WORD_ENUM.COLLECTION_CARD,
               EXPORT_WORD_ENUM.COLLECTION_ARCHIVES
-            ])}
+            ])} */}
 
             {C22infoBtnFu(topInfo)['审批'] ? (
               <Button type='primary' onClick={toAuditFu}>

+ 3 - 3
src/pages/C_goodsManage/C21wealth/C21edit/index.tsx

@@ -18,7 +18,7 @@ import ZGaddNow from '@/components/ZGaddNow'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import ZflowTable from '@/components/ZflowTable'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import {
   C21_APIcreate,
   C21_APIdel,
@@ -31,7 +31,7 @@ import {
 } from '@/store/action/C21wealth'
 import { MEDIA_TYPES } from '../constants'
 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'
 import { baseURL } from '@/utils/http'
 
@@ -341,7 +341,7 @@ function C21edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.FORM_FOR_DIGITAL])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.FORM_FOR_DIGITAL])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 5 - 1
src/pages/D_storeManage/D1storage/index.tsx

@@ -165,7 +165,11 @@ function D1storage() {
               </Button>
             ))}
           </>
-        ) : null}
+        ) : (
+          <Button type='primary' ghost>
+            三维场景
+          </Button>
+        )}
       </div>
       <div className='D1main'>
         {topAc === '按库位查看' ? (

+ 251 - 0
src/pages/D_storeManage/D2storSet/D2site/D2SaddNew.tsx

@@ -0,0 +1,251 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, InputNumber, Modal } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { D2_APIaddAdd, D2_APIaddEdit } from '@/store/action/D2storSet'
+import { MessageFu } from '@/utils/message'
+import { TypeD2listSite } from '../type'
+
+type ArrType = {
+  name: string
+  num1: null | number
+  num2: null | number
+}
+
+type ArrResType = {
+  layer1: number | null
+  layer2: number | null
+  layer3: number | null
+  storageId: number
+}
+
+// 错误信息类型
+type ErrorType = Record<
+  string,
+  {
+    num1?: string
+    num2?: string
+  }
+>
+
+type Props = {
+  addObj: TypeD2listSite
+  sId: number
+  addTableFu: () => void
+  closeFu: () => void
+}
+
+function D2Sadd({ addObj, sId, addTableFu, closeFu }: Props) {
+  const [arr, setArr] = useState<ArrType[]>([
+    { name: '橱柜', num1: null, num2: null },
+    { name: '层数', num1: null, num2: null },
+    { name: '格位', num1: null, num2: null }
+  ])
+
+  // 错误信息状态管理
+  const [errors, setErrors] = useState<ErrorType>({})
+
+  // 单个字段校验
+  const validateField = useCallback(
+    (name: string, field: 'num1' | 'num2', value: number | null) => {
+      let error = ''
+      // 非空校验
+      if (value === null || value === undefined) {
+        error = '此字段不能为空'
+      } else if (value < 1 || value > 999) {
+        // 范围校验
+        error = '请输入1-999之间的正整数'
+      } else {
+        // num1不能大于num2的校验
+        if (field === 'num1') {
+          const item = arr.find(v => v.name === name)
+          if (item?.num2 !== null && value > item!.num2) {
+            error = '开始值不能大于结束值'
+          }
+        } else if (field === 'num2') {
+          const item = arr.find(v => v.name === name)
+          if (item?.num1 !== null && value < item!.num1) {
+            error = '结束值不能小于开始值'
+          }
+        }
+      }
+      return error
+    },
+    [arr]
+  )
+
+  // 全量校验
+  const validateAll = useCallback(
+    (data: ArrType[]) => {
+      const newErrors: ErrorType = {}
+
+      data.forEach(item => {
+        const fieldErrors: { num1?: string; num2?: string } = {}
+
+        // 校验num1
+        const num1Error = validateField(item.name, 'num1', item.num1)
+        if (num1Error) fieldErrors.num1 = num1Error
+
+        // 校验num2
+        const num2Error = validateField(item.name, 'num2', item.num2)
+        if (num2Error) fieldErrors.num2 = num2Error
+
+        if (Object.keys(fieldErrors).length > 0) {
+          newErrors[item.name] = fieldErrors
+        }
+      })
+
+      setErrors(newErrors)
+      return Object.keys(newErrors).length === 0
+    },
+    [validateField]
+  )
+
+  useEffect(() => {
+    if (addObj.id > 0) {
+      const newArr = [
+        { name: '橱柜', num1: addObj.layer1, num2: null },
+        { name: '层数', num1: addObj.layer2, num2: null },
+        { name: '格位', num1: addObj.layer3, num2: null }
+      ]
+      setArr(newArr)
+      // 初始化编辑状态的错误信息
+      validateAll(newArr)
+    }
+  }, [addObj, validateAll])
+
+  // 输入框改变
+  const inputChangeFu = useCallback(
+    (name: string, key: 'num1' | 'num2', val: number | null) => {
+      const newArr = arr.map(v => ({
+        ...v,
+        [key]: v.name === name ? val : v[key]
+      }))
+      setArr(newArr)
+
+      const fieldError = validateField(name, key, val)
+      setErrors(prev => ({
+        ...prev,
+        [name]: {
+          ...prev[name],
+          [key]: fieldError || undefined
+        }
+      }))
+    },
+    [arr, validateField]
+  )
+
+  const generateMatrix = useCallback(
+    (arr: ArrType[]) => {
+      const combinations: number[][] = []
+      const validLayers = arr.map(item => {
+        if (item.num1 === null || item.num2 === null) {
+          throw new Error('num1和num2不能为null')
+        }
+        return [item.num1, item.num2]
+      })
+      const generateCombinations = (current: number[], index: number) => {
+        if (index === validLayers.length) {
+          combinations.push([...current])
+          return
+        }
+
+        for (const value of validLayers[index]) {
+          current.push(value)
+          generateCombinations(current, index + 1)
+          current.pop()
+        }
+      }
+
+      generateCombinations([], 0)
+
+      return combinations.map(comb =>
+        comb.reduce((obj, val, i) => {
+          obj[`layer${i + 1}`] = val
+          obj['storageId'] = Number(sId)
+          return obj
+        }, {} as Record<string, number>)
+      )
+    },
+    [sId]
+  )
+
+  // 点击确定
+  const isOkBtn = useCallback(async () => {
+    // 全量校验
+    const isValid = validateAll(arr)
+    if (!isValid) return
+
+    const arrRes = generateMatrix(arr)
+
+    let objRes = {} as ArrResType
+
+    const res = addObj.id > 0 ? await D2_APIaddEdit(objRes) : await D2_APIaddAdd(arrRes)
+
+    if (res.code === 0) {
+      MessageFu.success(addObj.id > 0 ? '编辑成功' : '新增成功')
+      addTableFu()
+      closeFu()
+    }
+  }, [addObj.id, addTableFu, arr, closeFu, generateMatrix, validateAll])
+
+  return (
+    <Modal
+      wrapClassName={styles.D2Sarea}
+      open={true}
+      title={addObj.id > 0 ? '编辑仓位' : '新增仓位'}
+      footer={[]}
+    >
+      <div className='D2Smain'>
+        {arr.map((item, index) => (
+          <div className='formBox' key={item.name}>
+            <div className='formBox1'>
+              <span>* </span>
+              {item.name}:
+            </div>
+            <div className='formBox2'>
+              从
+              <InputNumber
+                style={{ width: 140 }}
+                min={1}
+                max={999}
+                precision={0}
+                placeholder='必填'
+                value={item.num1}
+                onChange={e => inputChangeFu(item.name, 'num1', e as number | null)}
+                status={errors[item.name]?.num1 ? 'error' : undefined}
+              />
+              到
+              <InputNumber
+                style={{ width: 140, marginLeft: 8 }}
+                min={1}
+                max={999}
+                precision={0}
+                placeholder='必填'
+                value={item.num2}
+                onChange={e => inputChangeFu(item.name, 'num2', e as number | null)}
+                status={errors[item.name]?.num2 ? 'error' : undefined}
+              />
+              <span style={{ marginLeft: 8 }}>3位内正整数</span>
+              {(errors[item.name]?.num1 || errors[item.name]?.num2) && (
+                <p className='error-text'>{errors[item.name].num1 || errors[item.name]?.num2}</p>
+              )}
+            </div>
+          </div>
+        ))}
+
+        <div className='D2Sbtn'>
+          <Button type='primary' onClick={isOkBtn}>
+            提交
+          </Button>
+          &emsp;
+          <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+        </div>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoD2Sadd = React.memo(D2Sadd)
+
+export default MemoD2Sadd

+ 18 - 1
src/pages/D_storeManage/D2storSet/D2site/index.module.scss

@@ -31,7 +31,7 @@
     }
 
     .ant-modal {
-      width: 800px !important;
+      width: 500px !important;
     }
 
     .ant-modal-body {
@@ -64,8 +64,25 @@
           }
         }
         .formBox2 {
+          position: relative;
+          display: flex;
+          align-items: center;
+          gap: 5px;
           width: 298px;
           margin-right: 15px;
+          white-space: nowrap;
+
+          span {
+            color: #999;
+            font-size: 12px;
+          }
+          .error-text {
+            position: absolute;
+            left: 0;
+            bottom: -19px;
+            color: #ff4d4f;
+            font-size: 12px;
+          }
         }
         .D2Stit {
           color: #999;

+ 21 - 21
src/pages/D_storeManage/D2storSet/D2site/index.tsx

@@ -8,9 +8,9 @@ import { D2tableCSon } from '@/utils/tableData'
 import { D2_APIaddDels, D2_APIgetSiteList } from '@/store/action/D2storSet'
 import { TypeD2listSite } from '../type'
 import D2Sarea from './D2Sarea'
-import D2Sadd from './D2Sadd'
+import D2Sadd from './D2SaddNew'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { MessageFu } from '@/utils/message'
+
 function D2site() {
   const { id: sId, title } = useParams<any>()
 
@@ -26,36 +26,36 @@ function D2site() {
 
   const [list, setList] = useState<TypeD2listSite[]>([])
 
-  // 点击删除
-  const delTableFu = useCallback(
-    async (id: number) => {
-      const res = await D2_APIaddDels([id])
-      if (res.code === 0) {
-        MessageFu.success('删除成功!')
-        getListFu()
-      }
-    },
-    [getListFu]
-  )
-
   const tableLastBtn = useMemo(() => {
     return [
       {
         title: '操作',
         width: 240,
         render: (item: TypeD2listSite) => {
+          const handleDelete = async () => {
+            try {
+              const validResult = await D2_APIaddDels([item.id])
+
+              if (validResult.code === 0) {
+                getListFu()
+              }
+            } catch (error) {
+              console.error('删除校验失败', error)
+            }
+          }
+
           return (
             <>
-              <Button size='small' type='text' onClick={() => setAddObj(item)}>
+              {/* <Button size='small' type='text' onClick={() => setAddObj(item)}>
                 编辑
-              </Button>
-              <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+              </Button> */}
+              <MyPopconfirm txtK='删除' onConfirm={handleDelete} />
             </>
           )
         }
       }
     ]
-  }, [delTableFu])
+  }, [getListFu])
 
   // 区域设置
   const [areaShow, setAreaShow] = useState(false)
@@ -65,15 +65,15 @@ function D2site() {
 
   return (
     <div className={styles.D2site}>
-      <div className='pageTitle'>库房设置-库位设置</div>
+      <div className='pageTitle'>位设置</div>
 
       <div className='D2Stop'>
         <h2>{title}</h2>
         <div>
-          <Button type='primary' onClick={() => setAreaShow(true)}>
+          {/* <Button type='primary' onClick={() => setAreaShow(true)}>
             区域设置
           </Button>
-          &emsp;
+          &emsp; */}
           <Button type='primary' onClick={() => setAddObj({ id: -1 } as TypeD2listSite)}>
             新增库位
           </Button>

+ 4 - 4
src/pages/D_storeManage/D2storSet/index.tsx

@@ -11,7 +11,7 @@ import { D2tableC } from '@/utils/tableData'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { MessageFu } from '@/utils/message'
 import D2edit from './D2edit'
-// import history from '@/utils/history'
+import history from '@/utils/history'
 
 const formDataTemp: TypeD2form = {
   pageNum: 1,
@@ -115,13 +115,13 @@ function D2storSet() {
               >
                 查看
               </Button> */}
-              {/* <Button
+              <Button
                 size='small'
                 type='text'
                 onClick={() => history.push(`/storSet_site/${item.id}/${item.name}`)}
               >
-                位设置
-              </Button> */}
+                位设置
+              </Button>
               <Button
                 size='small'
                 type='text'

+ 5 - 5
src/pages/D_storeManage/D3staff/D3edit/index.tsx

@@ -9,7 +9,7 @@ import { statusObj } from '@/utils/tableData'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import ZflowTable from '@/components/ZflowTable'
 import MyTable from '@/components/MyTable'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import {
   D3_APIcreate,
   D3_APIdel,
@@ -27,7 +27,7 @@ import { OutsiderModal } from '../components/OutsiderModal'
 import { D3STAFF_OUTSIDER_TABLE_COLUMNS } from '../constants'
 import { D2_APIgetList } from '@/store/action/D2storSet'
 import dayjs from 'dayjs'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 import encodeStr, { decodeStr } from '@/utils/pass'
 
 export const pageTitTxtObj = {
@@ -272,11 +272,11 @@ function C21edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [
+        {/* {EXbtnFu(topInfo, [
           curTab === SON_TYPE_NAME.IN
             ? EXPORT_WORD_ENUM.INSIDER_FORM
             : EXPORT_WORD_ENUM.OUTSIDER_FORM
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -293,7 +293,7 @@ function C21edit() {
         <Button onClick={() => infoPageBackFu('/staff')}>返回</Button>
       </>
     )
-  }, [curTab, delFu, lookBtnFu, lookJumpFu, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

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

@@ -15,7 +15,7 @@ export type D4checkArrType = {
   goodsId: number // 文物id
   id: number //自己的id
   orderId: number // 订单id
-  siteNum: number // 库位号
+  siteId: number // 库位号
   snap: string //快照数据
 }
 
@@ -70,7 +70,7 @@ function D4check({ closeFu, listTemp, storageId, waiSiteNumArr, type }: Props) {
 
   // 点击确定
   const btnOk = useCallback(async () => {
-    const siteNums = tableList.map(v => v.siteNum!)
+    const siteNums = tableList.map(v => v.siteId!)
 
     const errNum = findFirstCommon(siteNums, waiSiteNumArr)
 
@@ -94,7 +94,7 @@ function D4check({ closeFu, listTemp, storageId, waiSiteNumArr, type }: Props) {
             goodsId: v.goodsId,
             id: v.id,
             orderId: v.orderId,
-            siteNum: obj22.siteNum!,
+            siteId: obj22.siteId!,
             snap: JSON.stringify(obj22)
           })
         })

+ 50 - 36
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -23,13 +23,13 @@ import history, {
   openGoodsInfoFu
 } from '@/utils/history'
 import classNames from 'classnames'
-import { Button, Cascader, DatePicker, Input, InputNumber, Select } from 'antd'
+import { Button, Cascader, DatePicker, Input, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { D4tableCgoods, statusObj } from '@/utils/tableData'
 import { useDispatch, useSelector } from 'react-redux'
-import { D2_APIgetList } from '@/store/action/D2storSet'
+import { D2_APIgetList, D2_APIgetSiteList } from '@/store/action/D2storSet'
 import { RootState } from '@/store'
 import { FourAPI_getList } from '@/store/action/FourAll'
 import MyTable from '@/components/MyTable'
@@ -40,8 +40,8 @@ import ZGaddNow from '@/components/ZGaddNow'
 import TextArea from 'antd/es/input/TextArea'
 import D4check, { D4checkArrType } from './D4check'
 import { API_goodsInfo } from '@/store/action/C1ledger'
-import { findFirstDuplicate } from '../data'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+import { TypeD2listSite } from '../../D2storSet/type'
 
 export const pageTitTxtObj = {
   1: '新增',
@@ -74,6 +74,7 @@ function D4edit() {
   const delSnapIdsRef = useRef<number[]>([])
 
   const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
+  const [siteList, setSiteList] = useState<TypeD2listSite[]>([])
 
   // 创建订单
   const creatFu = useCallback(async () => {
@@ -92,6 +93,12 @@ function D4edit() {
     }
   }, [])
 
+  // 获取仓位列表
+  const getSiteList = useCallback(async (id: number) => {
+    const { data } = await D2_APIgetSiteList(id)
+    setSiteList(data)
+  }, [])
+
   // 获取详情
   const getInfoFu = useCallback(
     async (id2?: number) => {
@@ -114,9 +121,11 @@ function D4edit() {
           arrTemp.push(obj)
         })
         setSnaps(arrTemp)
+
+        getSiteList(data.storageId)
       }
     },
-    [id]
+    [getSiteList, id]
   )
 
   useEffect(() => {
@@ -169,11 +178,7 @@ function D4edit() {
 
       if (val !== '草稿') {
         if (snaps.length === 0) return MessageFu.warning('请添加藏品')
-        if (snaps.some(v => !v.siteNum)) return MessageFu.warning('请输入藏品分库号')
-        // 分库号输入重复校验
-        const siteNumArr = snaps.map(v => v.siteNum!)
-        const num = findFirstDuplicate(siteNumArr)
-        if (num) return MessageFu.warning(`分库号${num}重复`)
+        if (snaps.some(v => !v.siteNum)) return MessageFu.warning('请选择仓位')
       }
 
       if (val === '审批') {
@@ -202,6 +207,7 @@ function D4edit() {
         const obj = {
           ...topInfo,
           goodsIds: snaps.map(v => v.id).join(','),
+          siteIds: snaps.map(v => v.siteId).join(','),
           siteNums: snaps.map(v => v.siteNum).join(','),
           delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
           snaps: snaps.map(v => ({
@@ -209,6 +215,7 @@ function D4edit() {
             id: v.id2 ? v.id2 : null,
             orderId: topInfo.id,
             siteNum: v.siteNum,
+            siteId: v.siteId,
             snap: JSON.stringify(v)
           }))
         }
@@ -246,11 +253,11 @@ function D4edit() {
 
   // 表格的输入框改变
   const tableInputChange = useCallback(
-    (id: number, val: number | null, key: 'siteNum') => {
+    (id: number, val = {} as Partial<Record<keyof C1GoodType, any>>) => {
       setSnaps(
         snaps.map(v => ({
           ...v,
-          [key]: v.id === id ? val : v[key]
+          ...(v.id === id ? val : {})
         }))
       )
     },
@@ -279,26 +286,32 @@ function D4edit() {
       {
         title: (
           <div>
-            <span style={{ color: '#ff4d4f' }}> * </span>藏品分库号
+            <span style={{ color: '#ff4d4f' }}> * </span>仓位
           </div>
         ),
         width: 160,
         render: (item: C1GoodType) => (
-          <InputNumber
+          <Select
+            labelInValue
+            value={item.siteId ? { value: item.siteId, label: item.siteNum } : null}
             style={{ width: 140 }}
-            disabled={!topInfo.storageId}
-            readOnly={['3', '4'].includes(key)}
-            min={1}
-            max={99999999}
-            precision={0}
-            value={item.siteNum}
-            onChange={e => tableInputChange(item.id, e, 'siteNum')}
-            placeholder={!topInfo.storageId ? '请先选择分库缩写' : '请输入'}
+            disabled={!topInfo.storageId || ['3', '4'].includes(key)}
+            onChange={e => {
+              tableInputChange(item.id, {
+                siteId: e.value,
+                siteNum: e.label
+              })
+            }}
+            options={siteList.map(i => ({
+              label: `${i.layer1}-${i.layer2}-${i.layer3}`,
+              value: i.id
+            }))}
+            placeholder={!topInfo.storageId ? '请先选择分库缩写' : '请选择'}
           />
         )
       }
     ]
-  }, [cathet, key, tableInputChange, topInfo.storageId])
+  }, [cathet, key, siteList, tableInputChange, topInfo.storageId])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -360,16 +373,13 @@ function D4edit() {
           if (val === '创建') history.push(`/impStor_edit/2/${id}`)
           return MessageFu.warning('请添加藏品')
         }
-        if (snaps.some(v => !v.siteNum)) return MessageFu.warning('请输入藏品分库号')
-        // 分库号输入重复校验
-        const siteNumArr = snaps.map(v => v.siteNum!)
-        const num = findFirstDuplicate(siteNumArr)
-        if (num) return MessageFu.warning(`分库号${num}重复`)
+        if (snaps.some(v => !v.siteNum)) return MessageFu.warning('请选择仓位')
       }
 
       const obj = {
         ...topInfo,
         goodsIds: snaps.map(v => v.id).join(','),
+        siteIds: snaps.map(v => v.siteId).join(','),
         siteNums: snaps.map(v => v.siteNum).join(','),
         delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
         snaps: snaps.map(v => ({
@@ -377,6 +387,7 @@ function D4edit() {
           id: v.id2 ? v.id2 : null,
           orderId: topInfo.id,
           siteNum: v.siteNum,
+          siteId: v.siteId,
           snap: JSON.stringify(v)
         }))
       }
@@ -468,9 +479,9 @@ function D4edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+        {/* {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
           EXPORT_WORD_ENUM.SUB_PUT_IN
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -487,7 +498,7 @@ function D4edit() {
         <Button onClick={() => infoPageBackFu('/impStor')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)
@@ -500,7 +511,8 @@ function D4edit() {
       setSnaps(
         snaps.map((v, i) => ({
           ...v,
-          siteNum: res.data[i]
+          siteId: res.data[i].id,
+          siteNum: `${res.data[i].layer1}-${res.data[i].layer2}-${res.data[i].layer3}`
         }))
       )
       MessageFu.success('分配成功')
@@ -586,10 +598,12 @@ function D4edit() {
                   setSnaps(
                     snaps.map(v => ({
                       ...v,
-                      siteNum: null
+                      siteId: null,
+                      siteNum: ''
                     }))
                   )
                   setTopInfo({ ...topInfo, storageId: e ? e : null })
+                  getSiteList(e)
                 }}
               />
             </div>
@@ -657,7 +671,7 @@ function D4edit() {
               {['3', '4'].includes(key) ? null : (
                 <>
                   <Button type='primary' onClick={autoFu} disabled={snaps.length === 0}>
-                    自动分配空置分库号
+                    自动分配空置仓位
                   </Button>
                   &emsp;
                   <Button
@@ -771,7 +785,7 @@ function D4edit() {
           storageId={Number(topInfo.storageId)}
           closeFu={() => setCheckArr([])}
           listTemp={checkArr}
-          waiSiteNumArr={snaps.map(v => v.siteNum!)}
+          waiSiteNumArr={snaps.map(v => v.siteId!)}
           type='入库'
         />
       ) : null}

+ 53 - 39
src/pages/D_storeManage/D5moveStor/D5edit/index.tsx

@@ -1,7 +1,7 @@
 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 { D2_APIgetList, D2_APIgetSiteList } from '@/store/action/D2storSet'
 import { RootState } from '@/store'
 import { useParams } from 'react-router-dom'
 import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
@@ -21,13 +21,12 @@ 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, infoPageBackFu, openGoodsInfoFu } from '@/utils/history'
 import classNames from 'classnames'
-import { Button, DatePicker, Input, InputNumber, Modal, Select } from 'antd'
+import { Button, DatePicker, Input, Modal, Select } from 'antd'
 import TextArea from 'antd/es/input/TextArea'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { EXbtnFu } from '@/utils/EXBtn'
+// 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'
@@ -36,7 +35,8 @@ import ZflowTable from '@/components/ZflowTable'
 import ZupFileTable from '@/components/ZupFileTable'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import ZGaddNow from '@/components/ZGaddNow'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+import { TypeD2listSite } from '../../D2storSet/type'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 function D5edit() {
   // 获取库房设置列表  用于分库缩写下拉
@@ -60,6 +60,13 @@ function D5edit() {
   const delSnapIdsRef = useRef<number[]>([])
 
   const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
+  const [siteList, setSiteList] = useState<TypeD2listSite[]>([])
+
+  // 获取仓位列表
+  const getSiteList = useCallback(async (id: number) => {
+    const { data } = await D2_APIgetSiteList(id)
+    setSiteList(data)
+  }, [])
 
   // 创建订单
   const creatFu = useCallback(async () => {
@@ -100,9 +107,11 @@ function D5edit() {
           arrTemp.push(obj)
         })
         setSnaps(arrTemp)
+
+        getSiteList(data.storageId)
       }
     },
-    [id]
+    [getSiteList, id]
   )
 
   useEffect(() => {
@@ -171,11 +180,7 @@ function D5edit() {
 
       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 (snaps.some(v => !v.siteNumNew)) return MessageFu.warning('请选择入库仓位')
       }
 
       if (val === '审批') {
@@ -204,12 +209,14 @@ function D5edit() {
         const obj = {
           ...topInfo,
           goodsIds: snaps.map(v => v.id).join(','),
+          siteIds: snaps.map(v => v.siteIdNew).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,
+            siteId: v.siteIdNew,
             siteNum: v.siteNumNew,
             snap: JSON.stringify(v)
           }))
@@ -235,7 +242,7 @@ function D5edit() {
             const data = JSON.parse(res.msg || '[]')
             // setCheckArr(data)
             const siteNumArr = data.map((v: any) => v.siteNum)
-            MessageFu.warning(`入库分库号${siteNumArr}已存在`)
+            MessageFu.warning(`入库仓位${siteNumArr}已存在`)
           }
         }
       }
@@ -248,11 +255,11 @@ function D5edit() {
 
   // 表格的输入框改变
   const tableInputChange = useCallback(
-    (id: number, val: number | null, key: 'siteNumNew') => {
+    (id: number, val = {} as Partial<Record<keyof C1GoodType, any>>) => {
       setSnaps(
         snaps.map(v => ({
           ...v,
-          [key]: v.id === id ? val : v[key]
+          ...(v.id === id ? val : {})
         }))
       )
     },
@@ -285,26 +292,32 @@ function D5edit() {
       {
         title: (
           <div>
-            <span style={{ color: '#ff4d4f' }}> * </span>入库分库号
+            <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 ? '请先选择入库分库缩写' : '请输入'}
+          <Select
+            labelInValue
+            value={item.siteIdNew ? { value: item.siteIdNew, label: item.siteNumNew } : null}
+            style={{ width: 140 }}
+            disabled={!topInfo.storageId || ['3', '4'].includes(key)}
+            onChange={e => {
+              tableInputChange(item.id, {
+                siteIdNew: e.value,
+                siteNumNew: e.label
+              })
+            }}
+            options={siteList.map(i => ({
+              label: `${i.layer1}-${i.layer2}-${i.layer3}`,
+              value: i.id
+            }))}
+            placeholder={!topInfo.storageId ? '请先选择入库分库缩写' : '请选择'}
           />
         )
       }
     ]
-  }, [cathet, key, tableInputChange, topInfo.storageId])
+  }, [cathet, key, siteList, tableInputChange, topInfo.storageId])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -370,22 +383,20 @@ function D5edit() {
           if (val === '创建') history.push(`/moveStor_edit/2/${id}`)
           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 (snaps.some(v => !v.siteNumNew)) return MessageFu.warning('请选择入库仓位')
       }
 
       const obj = {
         ...topInfo,
         goodsIds: snaps.map(v => v.id).join(','),
+        siteIds: snaps.map(v => v.siteIdNew).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,
+          siteId: v.siteIdNew,
           siteNum: v.siteNumNew,
           snap: JSON.stringify(v)
         }))
@@ -410,7 +421,7 @@ function D5edit() {
         const data = JSON.parse(res.msg || '[]')
         // setCheckArr(data)
         const siteNumArr = data.map((v: any) => v.siteNum)
-        MessageFu.warning(`入库分库号${siteNumArr}已存在`)
+        MessageFu.warning(`入库仓位${siteNumArr}已存在`)
       }
     },
     [getInfoFu, id, snaps, topInfo]
@@ -478,9 +489,9 @@ function D5edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+        {/* {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
           EXPORT_WORD_ENUM.COLLECTION_RELOCATION
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -497,7 +508,7 @@ function D5edit() {
         <Button onClick={() => infoPageBackFu('/moveStor')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)
@@ -510,7 +521,8 @@ function D5edit() {
       setSnaps(
         snaps.map((v, i) => ({
           ...v,
-          siteNumNew: res.data[i]
+          siteIdNew: res.data[i].id,
+          siteNumNew: `${res.data[i].layer1}-${res.data[i].layer2}-${res.data[i].layer3}`
         }))
       )
       MessageFu.success('分配成功')
@@ -632,10 +644,12 @@ function D5edit() {
                   setSnaps(
                     snaps.map(v => ({
                       ...v,
-                      siteNumNew: null
+                      siteNumNew: '',
+                      siteIdNew: null
                     }))
                   )
                   setTopInfo({ ...topInfo, storageId: e ? e : null })
+                  getSiteList(e)
                 }}
               />
             </div>
@@ -682,7 +696,7 @@ function D5edit() {
               {['3', '4'].includes(key) ? null : (
                 <>
                   <Button type='primary' onClick={autoFu} disabled={snaps.length === 0}>
-                    自动分配空置分库号
+                    自动分配空置仓位
                   </Button>
                   &emsp;
                   <Button
@@ -794,7 +808,7 @@ function D5edit() {
           storageId={Number(topInfo.storageId)}
           closeFu={() => setCheckArr([])}
           listTemp={checkArr}
-          waiSiteNumArr={snaps.map(v => v.siteNumNew!)}
+          waiSiteNumArr={snaps.map(v => v.siteIdNew!)}
           type='移库'
         />
       ) : null}

+ 6 - 6
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -22,7 +22,7 @@ import classNames from 'classnames'
 import TextArea from 'antd/es/input/TextArea'
 import { Button, DatePicker, Input, Modal, Radio, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { D6tableCgoods, statusObj } from '@/utils/tableData'
 import { useDispatch, useSelector } from 'react-redux'
@@ -34,7 +34,7 @@ import ZupFileTable from '@/components/ZupFileTable'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import ZGaddNow from '@/components/ZGaddNow'
 import D6batchInput from './D6batchInput'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 function D6edit() {
   // 获取库房设置列表/入馆凭证号-用于分库缩写下拉
@@ -284,7 +284,7 @@ function D6edit() {
 
     if (topInfo.sonTypeName === '1') {
       arr.push({
-        title: '藏品分库号',
+        title: '仓位编号',
         render: (item: C1GoodType) => item.siteNum
       })
     }
@@ -529,13 +529,13 @@ function D6edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+        {/* {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
           topInfo.sonTypeName === '1'
             ? EXPORT_WORD_ENUM.SUB_PUT_BACK
             : topInfo.sonTypeName === '2'
             ? EXPORT_WORD_ENUM.HALL_PUT_BACK
             : EXPORT_WORD_ENUM.BORROW
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -552,7 +552,7 @@ function D6edit() {
         <Button onClick={() => infoPageBackFu('/putsStor')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

+ 5 - 5
src/pages/D_storeManage/D7check/D7edit/index.tsx

@@ -9,7 +9,7 @@ import { statusObj } from '@/utils/tableData'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import ZflowTable from '@/components/ZflowTable'
 import MyTable, { MyTableMethods } from '@/components/MyTable'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import {
   D7_APIcreate,
   D7_APIdel,
@@ -30,7 +30,7 @@ import dayjs from 'dayjs'
 import { areAllCheckersFilled } from '@/utils/objects'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 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'
 
@@ -341,9 +341,9 @@ function D7edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+        {/* {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
           EXPORT_WORD_ENUM.COLLECTION_INVENTORY
-        ])}
+        ])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -360,7 +360,7 @@ function D7edit() {
         <Button onClick={() => infoPageBackFu('/check')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

+ 3 - 3
src/pages/D_storeManage/D8cancel/D8edit/index.tsx

@@ -19,7 +19,7 @@ import history, { btnFlagFu2, infoPageBackFu, openGoodsInfoFu } from '@/utils/hi
 import TextArea from 'antd/es/input/TextArea'
 import { Button } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { D8tableCgoods, statusObj } from '@/utils/tableData'
 import ZRichTexts from '@/components/ZRichTexts'
@@ -30,7 +30,7 @@ import ZGaddNow from '@/components/ZGaddNow'
 import classNames from 'classnames'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import { API_goodsInfo } from '@/store/action/C1ledger'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 const tableArrTemp = [
   { name: '注销后去向', key: 'txt1' },
@@ -385,7 +385,7 @@ function D8edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.CANCEL_VOUCHER])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.CANCEL_VOUCHER])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 3 - 3
src/pages/E_goodsStorage/E1accident/E1edit/index.tsx

@@ -24,11 +24,11 @@ import {
   E1_APIsaveCreate,
   E1_APIsaveDraft
 } from '@/store/action/E1accident'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import ZflowTable from '@/components/ZflowTable'
 import ZupFileTable from '@/components/ZupFileTable'
 import { API_goodsInfo } from '@/store/action/C1ledger'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 function E1edit() {
   const { key, id } = useParams<any>()
   // key:1 新增 2编辑 3审批 4查看
@@ -322,7 +322,7 @@ function E1edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.ACCIDENT_HANDLING_CERTIFICATE])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.ACCIDENT_HANDLING_CERTIFICATE])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 3 - 3
src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx

@@ -20,7 +20,7 @@ import { MessageFu } from '@/utils/message'
 import history, { btnFlagFu2, infoPageBackFu } from '@/utils/history'
 import { Button, DatePicker, Input, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { statusObj } from '@/utils/tableData'
 import { selectObj } from '@/utils/select'
@@ -32,7 +32,7 @@ import ZRichTexts from '@/components/ZRichTexts'
 import { useDispatch, useSelector } from 'react-redux'
 import { RootState } from '@/store'
 import { D7_APIList } from '@/store/action/D7check'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 function E3edit() {
   // 相关盘点单下拉数据
   // 从仓库拿数据
@@ -330,7 +330,7 @@ function E3edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_CURRENT_STATUS])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_CURRENT_STATUS])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 3 - 3
src/pages/E_goodsStorage/E4repair/E4edit/index.tsx

@@ -21,7 +21,7 @@ import classNames from 'classnames'
 import { Button, DatePicker, Input } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import TextArea from 'antd/es/input/TextArea'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import { E4tableCgoods, statusObj } from '@/utils/tableData'
 import Z3upFiles from '@/components/Z3upFiles'
@@ -32,7 +32,7 @@ import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import ZGaddNow from '@/components/ZGaddNow'
 import ZupFileTable from '@/components/ZupFileTable'
 import { API_goodsInfo } from '@/store/action/C1ledger'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 
 const tableArrTemp = [
   { name: '损坏情况', key: 'txt1' },
@@ -420,7 +420,7 @@ function E4edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.RELIC_REPAIR_LIST])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.RELIC_REPAIR_LIST])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

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

@@ -20,14 +20,14 @@ import {
   F1_APIsaveDraft
 } from '@/store/action/F1exhibition'
 import { MessageFu } from '@/utils/message'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import { F1_SON_TYPE_ENUM, F1_SON_TYPE_NAME_ENUM, F1exhibitionItemType } from '../types'
 import ZflowTable from '@/components/ZflowTable'
 import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 import { areAllCheckersFilled } from '@/utils/objects'
 import dayjs, { Dayjs } from 'dayjs'
-import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM } from '@/utils/exportTemplates'
 import { useDispatch, useSelector } from 'react-redux'
 import { RootState } from '@/store'
 import { D6_APIgetList } from '@/store/action/D6putsStor'
@@ -324,7 +324,7 @@ function F1edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.REGISTER_LEDGER])}
+        {/* {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.REGISTER_LEDGER])} */}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm

+ 102 - 101
src/pages/Layout/data.ts

@@ -10,11 +10,11 @@ const tabLeftArr: RouterType = [
         id: 110,
         name: '数据统计',
         path: '/',
-        Com: React.lazy(() => import('../A_workbench/A1dataSta/panel'))
+        Com: React.lazy(() => import('../A_workbench/A1dataSta/index2'))
       },
       {
         id: 120,
-        name: '业务中心',
+        name: '个人中心',
         path: '/business',
         Com: React.lazy(() => import('../A_workbench/A2business'))
       },
@@ -33,24 +33,24 @@ const tabLeftArr: RouterType = [
     ]
   },
 
-  {
-    id: 8,
-    name: '藏品查询',
-    son: [
-      {
-        id: 1001,
-        name: '藏品信息',
-        path: '/antiqueSearch',
-        Com: React.lazy(() => import('../A2_query/A22antique'))
-      },
-      {
-        id: 1002,
-        name: '多媒体信息',
-        path: '/mediaSearch',
-        Com: React.lazy(() => import('../A2_query/A23media'))
-      }
-    ]
-  },
+  // {
+  //   id: 8,
+  //   name: '藏品查询',
+  //   son: [
+  //     {
+  //       id: 1001,
+  //       name: '藏品信息',
+  //       path: '/antiqueSearch',
+  //       Com: React.lazy(() => import('../A2_query/A22antique'))
+  //     },
+  //     {
+  //       id: 1002,
+  //       name: '多媒体信息',
+  //       path: '/mediaSearch',
+  //       Com: React.lazy(() => import('../A2_query/A23media'))
+  //     }
+  //   ]
+  // },
 
   {
     id: 2,
@@ -64,13 +64,6 @@ const tabLeftArr: RouterType = [
         Com: React.lazy(() => import('../B_enterTibet/B1collect'))
       },
       {
-        id: 220,
-        name: '藏品鉴定',
-        isLog: true,
-        path: '/identify',
-        Com: React.lazy(() => import('../B_enterTibet/B2identify'))
-      },
-      {
         id: 230,
         name: '藏品入馆',
         isLog: true,
@@ -78,6 +71,13 @@ const tabLeftArr: RouterType = [
         Com: React.lazy(() => import('../B_enterTibet/B3entering'))
       },
       {
+        id: 220,
+        name: '藏品鉴定',
+        isLog: true,
+        path: '/identify',
+        Com: React.lazy(() => import('../B_enterTibet/B2identify'))
+      },
+      {
         id: 240,
         name: '藏品入藏',
         isLog: true,
@@ -105,6 +105,54 @@ const tabLeftArr: RouterType = [
     ]
   },
   {
+    id: 3,
+    name: '藏品管理',
+    son: [
+      {
+        id: 310,
+        name: '藏品登记',
+        isLog: true,
+        path: '/register',
+        Com: React.lazy(() => import('../C_goodsManage/C1register'))
+      },
+
+      {
+        id: 320,
+        name: '藏品注销',
+        isLog: true,
+        path: '/cancel',
+        Com: React.lazy(() => import('../D_storeManage/D8cancel'))
+      },
+      {
+        id: 330,
+        name: '藏品档案',
+        path: '/files',
+        Com: React.lazy(() => import('../C_goodsManage/C2files'))
+      },
+      // {
+      //   id: 340,
+      //   name: '资源使用',
+      //   isLog: true,
+      //   path: '/wealth',
+      //   Com: React.lazy(() => import('../C_goodsManage/C21wealth'))
+      // },
+      {
+        id: 350,
+        name: '藏品编辑',
+        isLog: true,
+        path: '/goodEdit',
+        Com: React.lazy(() => import('../C_goodsManage/C22goodEdit'))
+      }
+      // {
+      //   id: 360,
+      //   name: '藏品关注',
+      //   path: '/focus',
+      //   Com: React.lazy(() => import('../C_goodsManage/C3focus'))
+      // }
+    ]
+  },
+
+  {
     id: 4,
     name: '库房管理',
     son: [
@@ -115,12 +163,6 @@ const tabLeftArr: RouterType = [
         Com: React.lazy(() => import('../D_storeManage/D1storage'))
       },
       {
-        id: 420,
-        name: '库房设置',
-        path: '/storSet',
-        Com: React.lazy(() => import('../D_storeManage/D2storSet'))
-      },
-      {
         id: 430,
         name: '人员出入',
         path: '/staff',
@@ -156,53 +198,6 @@ const tabLeftArr: RouterType = [
       }
     ]
   },
-  {
-    id: 3,
-    name: '藏品管理',
-    son: [
-      {
-        id: 310,
-        name: '藏品登记',
-        isLog: true,
-        path: '/register',
-        Com: React.lazy(() => import('../C_goodsManage/C1register'))
-      },
-
-      {
-        id: 320,
-        name: '藏品注销',
-        isLog: true,
-        path: '/cancel',
-        Com: React.lazy(() => import('../D_storeManage/D8cancel'))
-      },
-      {
-        id: 330,
-        name: '藏品附件',
-        path: '/files',
-        Com: React.lazy(() => import('../C_goodsManage/C2files'))
-      },
-      {
-        id: 340,
-        name: '资源使用',
-        isLog: true,
-        path: '/wealth',
-        Com: React.lazy(() => import('../C_goodsManage/C21wealth'))
-      },
-      {
-        id: 350,
-        name: '藏品编辑',
-        isLog: true,
-        path: '/goodEdit',
-        Com: React.lazy(() => import('../C_goodsManage/C22goodEdit'))
-      },
-      {
-        id: 360,
-        name: '藏品关注',
-        path: '/focus',
-        Com: React.lazy(() => import('../C_goodsManage/C3focus'))
-      }
-    ]
-  },
 
   {
     id: 5,
@@ -239,24 +234,30 @@ const tabLeftArr: RouterType = [
     ]
   },
 
-  {
-    id: 900,
-    name: '展品管理',
-    son: [
-      {
-        id: 910,
-        name: '借展管理',
-        isLog: true,
-        path: '/exhibition',
-        Com: React.lazy(() => import('../F_exhibition/F1exhibition'))
-      }
-    ]
-  },
+  // {
+  //   id: 900,
+  //   name: '展品管理',
+  //   son: [
+  //     {
+  //       id: 910,
+  //       name: '借展管理',
+  //       isLog: true,
+  //       path: '/exhibition',
+  //       Com: React.lazy(() => import('../F_exhibition/F1exhibition'))
+  //     }
+  //   ]
+  // },
   {
     id: 7,
     name: '系统管理',
     son: [
       {
+        id: 420,
+        name: '库房设置',
+        path: '/storSet',
+        Com: React.lazy(() => import('../D_storeManage/D2storSet'))
+      },
+      {
         id: 710,
         name: '数据字典',
         path: '/dict',
@@ -264,13 +265,13 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 720,
-        name: '编号规则',
+        name: '表单管理',
         path: '/numRule',
         Com: React.lazy(() => import('../Z_system/Z2numRule'))
       },
       {
         id: 730,
-        name: '流程设置',
+        name: '规则管理',
         path: '/flowSet',
         Com: React.lazy(() => import('../Z_system/Z3flowSet'))
       },
@@ -322,12 +323,12 @@ export const routerSon: RouterTypeRow[] = [
   //   path: '/storSet_look/:id',
   //   Com: React.lazy(() => import('../D_storeManage/D2storSet/D2look'))
   // },
-  // {
-  //   id: 2,
-  //   name: '库房设置-库位设置',
-  //   path: '/storSet_site/:id/:title',
-  //   Com: React.lazy(() => import('../D_storeManage/D2storSet/D2site'))
-  // },
+  {
+    id: 2,
+    name: '库房设置-库位设置',
+    path: '/storSet_site/:id/:title',
+    Com: React.lazy(() => import('../D_storeManage/D2storSet/D2site'))
+  },
 
   // -------------入库-----------------
   {

+ 5 - 1
src/pages/Y_goodsDetails/Y1cathet/Y11com.tsx

@@ -50,7 +50,11 @@ function Y11com({ info }: Props) {
                 <div className='y1z2_1r11'>{v2.name}:</div>
 
                 <div className='y1z2_1r12'>
-                  {v2.backFu ? v2.backFu(info) : info[v2.key] || '(空)'}
+                  {v2.backFu
+                    ? v2.backFu(info)
+                    : info[v2.key] && info[v2.key] !== 'null'
+                    ? info[v2.key]
+                    : '(空)'}
                 </div>
               </div>
             ))}

+ 9 - 1
src/pages/Y_goodsDetails/Y2look/index.module.scss

@@ -51,7 +51,7 @@
     .Y2info {
       width: 100%;
       margin-top: 5px;
-      height: calc(100% - 18px);
+      height: calc(100% - 88px);
       font-size: 16px;
       padding: 15px;
       overflow-y: auto;
@@ -255,6 +255,14 @@
         }
       }
     }
+    .C2btn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
   }
 }
 

+ 51 - 49
src/pages/Y_goodsDetails/Y2look/index.tsx

@@ -9,10 +9,10 @@ import Y22com from '../Y1cathet/Y22com'
 import Y33com from '../Y1cathet/Y33com'
 import Y44com from '../Y1cathet/Y44com'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
-import { API_getGoodsLedger, API_goodsInfo } from '@/store/action/C1ledger'
-import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportTemplates'
-import { API_goodFileList } from '@/store/action/C2files'
-import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
+import { API_goodsInfo } from '@/store/action/C1ledger'
+// import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportTemplates'
+// import { API_goodFileList } from '@/store/action/C2files'
+// import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
 import { MessageFu } from '@/utils/message'
 import C22revamp from '@/pages/C_goodsManage/C22goodEdit/C22revamp'
 import history, { useQuery } from '@/utils/history'
@@ -42,37 +42,37 @@ function Y2look() {
     [menuId, query.oId]
   )
 
-  const handleExport = async () => {
-    Promise.all([API_goodFileList(sId), API_getGoodsLedger(sId)]).then(res => {
-      exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_ARCHIVES, {
-        ...info,
-        records: res[1].data
-          .filter((i: any) => i.type === 'JD')
-          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
-        repairs: res[1].data
-          .filter((i: any) => i.type === 'XF')
-          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
-        status: res[1].data
-          .filter((i: any) => i.type === 'XZ')
-          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
-        imagePages: [
-          {
-            thumb: info.thumb
-          },
-          ...(res[0].data?.filter((i: any) => i.type === 'img') || [])
-        ]
-      })
-    })
-  }
-  const handleExport2 = async () => {
-    const res = await API_getGoodsLedger(sId)
-    const jd = res.data.filter((i: any) => i.type === 'JD') ?? []
-    exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_CARD, {
-      ...info,
-      authUnit: jd.map((i: any) => i.authUnit),
-      records: jd.map((i: any) => ({ ...i, ...JSON.parse(i.snap) }))
-    })
-  }
+  // const handleExport = async () => {
+  //   Promise.all([API_goodFileList(sId), API_getGoodsLedger(sId)]).then(res => {
+  //     exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_ARCHIVES, {
+  //       ...info,
+  //       records: res[1].data
+  //         .filter((i: any) => i.type === 'JD')
+  //         .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+  //       repairs: res[1].data
+  //         .filter((i: any) => i.type === 'XF')
+  //         .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+  //       status: res[1].data
+  //         .filter((i: any) => i.type === 'XZ')
+  //         .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+  //       imagePages: [
+  //         {
+  //           thumb: info.thumb
+  //         },
+  //         ...(res[0].data?.filter((i: any) => i.type === 'img') || [])
+  //       ]
+  //     })
+  //   })
+  // }
+  // const handleExport2 = async () => {
+  //   const res = await API_getGoodsLedger(sId)
+  //   const jd = res.data.filter((i: any) => i.type === 'JD') ?? []
+  //   exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_CARD, {
+  //     ...info,
+  //     authUnit: jd.map((i: any) => i.authUnit),
+  //     records: jd.map((i: any) => ({ ...i, ...JSON.parse(i.snap) }))
+  //   })
+  // }
 
   useEffect(() => {
     getInfoFu(sId)
@@ -207,17 +207,17 @@ function Y2look() {
   }, [sId])
 
   // 点击关注
-  const focusFu = useCallback(
-    async (val: '关注' | '取消关注') => {
-      const res = val === '关注' ? await C3_APIfocus(sId) : await C3_APIfocusNo(sId)
+  // const focusFu = useCallback(
+  //   async (val: '关注' | '取消关注') => {
+  //     const res = val === '关注' ? await C3_APIfocus(sId) : await C3_APIfocusNo(sId)
 
-      if (res.code === 0) {
-        MessageFu.success(val + '成功!')
-        getInfoFu(sId)
-      }
-    },
-    [getInfoFu, sId]
-  )
+  //     if (res.code === 0) {
+  //       MessageFu.success(val + '成功!')
+  //       getInfoFu(sId)
+  //     }
+  //   },
+  //   [getInfoFu, sId]
+  // )
 
   // 点击藏品编辑(修改)
   const [isEdit, setIsEdit] = useState(false)
@@ -245,7 +245,7 @@ function Y2look() {
         <div className='Y2toprr'>
           {info.display === 1 && info.statusStorage !== 7 ? (
             <>
-              <Button
+              {/* <Button
                 type='primary'
                 danger={info.isFocus === 1}
                 onClick={() => focusFu(info.isFocus === 1 ? '取消关注' : '关注')}
@@ -268,7 +268,7 @@ function Y2look() {
                   </Button>
                   &emsp;
                 </>
-              ) : null}
+              ) : null} */}
               {goodsInfoPower.includes('goodsBtn3') ? (
                 <>
                   <Dropdown menu={{ items: items1 }} placement='bottom' arrow>
@@ -295,8 +295,6 @@ function Y2look() {
               ) : null}
             </>
           ) : null}
-
-          {/* <Button onClick={() => history.go(-1)}>返回</Button> */}
         </div>
       </div>
 
@@ -333,6 +331,10 @@ function Y2look() {
         </div>
       ) : null}
 
+      <div className='C2btn'>
+        <Button onClick={() => history.go(-1)}>返回</Button>
+      </div>
+
       {isEdit ? (
         <div className='C22revampBox'>
           <C22revamp goodsId={sId} closeFu={() => setIsEdit(false)} type='新增' />

+ 2 - 2
src/pages/Z_system/Z2numRule/Z2edit.tsx

@@ -59,12 +59,12 @@ function Z2edit({ editObj, editFu, closeFu }: Props) {
           onFinishFailed={onFinishFailed}
           autoComplete='off'
         >
-          <Form.Item label='编号类型' name='name'>
+          <Form.Item label='表单类型' name='name'>
             <Input maxLength={30} disabled />
           </Form.Item>
 
           <Form.Item
-            label='前缀'
+            label='表单前缀'
             name='prefix'
             rules={[{ pattern: /^[A-Z0-9]*$/, message: '请输入大写英文字母或数字' }]}
           >

+ 1 - 1
src/pages/Z_system/Z2numRule/index.tsx

@@ -53,7 +53,7 @@ function Z2numRule() {
 
   return (
     <div className={styles.Z2numRule}>
-      <div className='pageTitle'>编号规则</div>
+      <div className='pageTitle'>表单管理</div>
       {/* 顶部 */}
       <div className='Z2top'>
         <div className='Z2topll'>

+ 51 - 0
src/store/action/A1dataSta.ts

@@ -22,3 +22,54 @@ export const A1_APIGetDynamic = (params?: any) => {
 export const A1_APIGetStorage = (year: number) => {
   return http.get(`/cms/report/getStorage/${year}`)
 }
+
+/**
+ * 藏品-已登记总数
+ */
+export const A1_APIGetCount = () => {
+  return http.get('/cms/count/total')
+}
+
+/**
+ * 藏品-折线图
+ */
+export const A1_APIGetLineChart = (limit: number) => {
+  return http.get('/cms/count/lineChart', {
+    params: { limit }
+  })
+}
+
+/**
+ * 藏品-类别
+ */
+export const A1_APIGetCountType = () => {
+  return http.get('/cms/count/type')
+}
+
+/**
+ * 藏品-级别
+ */
+export const A1_APIGetCountLevel = () => {
+  return http.get('/cms/count/level')
+}
+
+/**
+ * 藏品-级别
+ */
+export const A1_APIGetCountOrder = () => {
+  return http.get('/cms/count/order')
+}
+
+/**
+ * 藏品-质地
+ */
+export const A1_APIGetCountTexture = () => {
+  return http.get('/cms/count/dictTexture3')
+}
+
+/**
+ * 藏品-完残程度
+ */
+export const A1_APIGetCountDictTorn = () => {
+  return http.get('/cms/count/dictTorn')
+}

+ 7 - 0
src/store/action/D2storSet.ts

@@ -101,3 +101,10 @@ export const D2_APIaddAdd = (data: any) => {
 export const D2_APIaddEdit = (data: any) => {
   return http.post('cms/storage/site/edit', data)
 }
+
+/**
+ * 库房设置-库位-删除
+ */
+export const D2_APIaddDel = (id: any) => {
+  return http.get('/api/cms/storage/st/remove/' + id)
+}

+ 1 - 1
src/store/action/D4impStor.ts

@@ -80,7 +80,7 @@ export const D4_APIrevocation = (id: number) => {
  * 入库-自动分配分库号
  */
 export const D4_APIgetStorageNum = (num: number, storageId: number) => {
-  return http.get(`cms/orderIn/getStorageNum?limit=${num}&storageId=${storageId}`)
+  return http.get(`cms/orderIn/getStorageEmpty?limit=${num}&storageId=${storageId}`)
 }
 
 /**

+ 1 - 1
src/store/action/D5moveStor.ts

@@ -80,7 +80,7 @@ export const D5_APIrevocation = (id: number) => {
  * 移库-自动分配分库号
  */
 export const D5_APIgetStorageNum = (num: number, storageId: number) => {
-  return http.get(`cms/orderMove/getStorageNum?limit=${num}&storageId=${storageId}`)
+  return http.get(`cms/orderMove/getStorageEmpty?limit=${num}&storageId=${storageId}`)
 }
 
 /**

+ 2 - 2
src/utils/http.ts

@@ -15,8 +15,8 @@ const toErrPageFu = (path: string, txt: string) => {
 
 export const envFlag = process.env.NODE_ENV === 'development'
 
-const baseUrlTemp = 'https://sit-leshancms.4dage.com' // 测试环境
-// const baseUrlTemp = 'http://192.168.20.61:8107' // 线下环境
+// const baseUrlTemp = 'https://sit-leshancms.4dage.com' // 测试环境
+const baseUrlTemp = 'http://192.168.20.61:8109' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')
 

+ 8 - 8
src/utils/tableData.ts

@@ -168,7 +168,7 @@ export const B3FtableC = [
 
 export const D1GtableC = [
   ['txt', '编号类型', 'numName'],
-  ['txt', '库位号', 'siteNum'],
+  ['txt', '仓位编号', 'siteNum'],
   // ['img', '封面图', 'thumb'],
   ['txt', '藏品名称', 'name'],
   ['ping', '数量', 'pcs', 'pcsUnit'],
@@ -259,11 +259,11 @@ export const D2tableC = [
 ]
 
 export const D2tableCSon = [
-  ['txt', '区域名称', 'regionName'],
-  ['txt', '排架', 'layer1'],
+  // ['txt', '区域名称', 'regionName'],
+  ['txt', '橱柜', 'layer1'],
   ['txt', '层数', 'layer2'],
-  ['txt', '库位', 'layer3'],
-  ['text', '库位说明', 'description', 50]
+  ['txt', '格位', 'layer3']
+  // ['text', '库位说明', 'description', 50]
 ]
 
 export const D4tableC = [
@@ -441,10 +441,10 @@ export const Y44tableC = [
 ]
 
 export const Z2tableC = [
-  ['txt', '编号类型', 'name'],
-  ['txt', '前缀', 'prefix'],
+  ['txt', '表单类型', 'name'],
+  ['txt', '表单前缀', 'prefix'],
   ['txt', '日期方式', 'dateType'],
-  ['txt', '起始流水编号', 'length']
+  ['txt', '起始表单编号', 'length']
 ]
 
 export const Z3tableC = [