shaogen1995 16 stundas atpakaļ
vecāks
revīzija
e5a69649bb

BIN
public/myData/xlsx/实盘数据-导入.xlsx


BIN
public/myData/xlsx/盘点基准-一普文物信息.xlsx


+ 5 - 227
src/assets/styles/base.css

@@ -75,7 +75,6 @@ textarea {
   overflow: hidden;
   overflow: hidden;
   /* 普通文字按钮的颜色 */
   /* 普通文字按钮的颜色 */
   /* 按钮的危险颜色 */
   /* 按钮的危险颜色 */
-  /* antd分页器样式 */
   /* 表格的图片居中 */
   /* 表格的图片居中 */
   /* antd图片预览组件 */
   /* antd图片预览组件 */
   /* antd表格居中 */
   /* antd表格居中 */
@@ -85,20 +84,11 @@ textarea {
   color: black;
   color: black;
   outline: none;
   outline: none;
 }
 }
-#root .iconHoverTit {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-#root .iconHoverTitTxt {
-  background-color: var(--themeColor);
-  color: #fff;
-  width: 16px;
-  height: 16px;
-  line-height: 16px;
-  text-align: center;
-  font-size: 12px;
-  border-radius: 50%;
+#root .AA1Itop1 {
+  color: var(--themeColor);
+  border-color: var(--themeColor);
+  padding: 0px 15px;
+  line-height: 40px;
 }
 }
 #root .ant-btn-text {
 #root .ant-btn-text {
   color: var(--themeColor);
   color: var(--themeColor);
@@ -153,14 +143,6 @@ textarea {
 #root .ant-table-cell {
 #root .ant-table-cell {
   text-align: center !important;
   text-align: center !important;
 }
 }
-#root #A2Table3 .ant-table-row-expand-icon {
-  background-color: var(--themeColor);
-  color: #fff;
-}
-#root #A2Table3 .ant-table-cell-with-append {
-  display: flex;
-  justify-content: flex-start;
-}
 [hidden] {
 [hidden] {
   display: none !important;
   display: none !important;
 }
 }
@@ -227,207 +209,3 @@ textarea {
 .ant-image-preview-operations-wrapper {
 .ant-image-preview-operations-wrapper {
   z-index: 10002 !important;
   z-index: 10002 !important;
 }
 }
-.Y2xia {
-  display: block;
-  width: 100%;
-  height: 100%;
-  text-align: center;
-}
-.D1GtNum {
-  cursor: pointer;
-  text-decoration: underline;
-}
-.D1GtNumAc {
-  color: var(--themeColor);
-}
-.Y1info {
-  width: 100%;
-  margin-top: 5px;
-  height: calc(100% - 35px);
-  font-size: 16px;
-  padding: 15px;
-  overflow-y: auto;
-}
-.Y1info .Y1tit {
-  font-size: 18px;
-  padding-left: 15px;
-  font-weight: 700;
-  position: relative;
-  margin-bottom: 15px;
-  color: var(--themeColor);
-}
-.Y1info .Y1tit::before {
-  position: absolute;
-  left: 0px;
-  top: 50%;
-  transform: translateY(-50%);
-  content: '';
-  width: 6px;
-  height: 18px;
-  background-color: var(--themeColor);
-}
-.Y1info .Y1row {
-  width: 100%;
-  display: flex;
-  margin-bottom: 10px;
-}
-.Y1info .Y1row .Y1rowll {
-  width: 120px;
-  text-align: right;
-  font-weight: 700;
-}
-.Y1info .Y1row .Y1rowrr {
-  width: calc(100% - 120px);
-  word-wrap: break-word;
-  max-height: 130px;
-  overflow-y: auto;
-  white-space: pre-wrap;
-}
-.Y1info .Y1rowZ .Y1z1 {
-  margin-bottom: 20px;
-  display: flex;
-  justify-content: space-between;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZll {
-  width: 48%;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 48%;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr .Y1rowZrrModel {
-  margin-left: 20px;
-  height: 200px;
-  overflow-y: auto;
-  width: calc(100% - 220px);
-  display: flex;
-  align-items: center;
-  color: var(--themeColor);
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr .Y1rowZrrModel .Y1rowZrrModelBox {
-  width: 100%;
-  max-height: 100%;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr .Y1rowZrrModel .Y1rowZrrModelBox > h3 {
-  margin-bottom: 10px;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr .Y1rowZrrModel .Y1rowZrrModelBox > div {
-  margin: 4px 0;
-  cursor: pointer;
-  transition: all 0.3s;
-  word-wrap: break-word;
-}
-.Y1info .Y1rowZ .Y1z1 .Y1rowZrr .Y1rowZrrModel .Y1rowZrrModelBox > div:hover {
-  text-shadow: 1px 1px 1px #ccc;
-}
-.Y1info .Y1rowZ .Y1z2 {
-  margin-bottom: 20px;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 {
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: space-between;
-  width: 100%;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 {
-  margin-bottom: 10px;
-  width: 48%;
-  display: flex;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r11 {
-  width: 130px;
-  text-align: right;
-  font-weight: 700;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r12 {
-  width: calc(100% - 130px);
-  word-wrap: break-word;
-  max-height: 130px;
-  overflow-y: auto;
-  white-space: pre-wrap;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1Full {
-  width: 100%;
-}
-.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1Full .y1z2_1r12 {
-  max-height: 1000px;
-}
-.Y1info .Y22com .Y22sta {
-  font-weight: 700;
-  font-size: 18px;
-  margin-bottom: 20px;
-}
-.Y1info .Y22com .Y22No {
-  font-size: 16px;
-  letter-spacing: 4px;
-  height: 200px;
-  display: flex;
-  align-items: center;
-}
-.Y1info .Y22com .Y22Info {
-  width: 800px;
-  border: 1px solid #ccc;
-  border-bottom: none;
-}
-.Y1info .Y22com .Y22Info .Y22row {
-  display: flex;
-}
-.Y1info .Y22com .Y22Info .Y22row > div {
-  width: 200px;
-  text-align: center;
-  padding: 8px 4px;
-  border-bottom: 1px solid #ccc;
-}
-.Y1info .Y22com .Y22Info .Y22row > div:nth-of-type(1) {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-.Y1info .Y22com .Y22Info .Y22row > div:nth-of-type(2) {
-  width: 600px;
-}
-.Y1info .Y22com .Y22Info .Y22row1 {
-  background-color: #eaeaea;
-}
-.Y1info .Y22com .Y22Info .Y22rowNo {
-  height: 40px;
-  line-height: 40px;
-  text-align: center;
-  border-bottom: 1px solid #ccc;
-}
-.Y1info .Y33com .Y33top {
-  margin-bottom: 20px;
-  display: flex;
-  justify-content: space-around;
-}
-.Y1info .Y33com .Y33top .ant-btn {
-  margin-right: 15px;
-}
-.Y1info .Y33com .Y33no {
-  font-size: 16px;
-  letter-spacing: 4px;
-  height: 200px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-.C22revampBox {
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 100;
-  padding: 30px;
-  background-color: rgba(0, 0, 0, 0.6);
-}
-.C22revampBox > div {
-  position: relative;
-  width: 100%;
-  height: 100%;
-}

+ 5 - 327
src/assets/styles/base.less

@@ -108,29 +108,13 @@ textarea {
     color: black;
     color: black;
     outline: none;
     outline: none;
   }
   }
-
-  // ?的提示
-  .iconHoverTit {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
-
-  .iconHoverTitTxt {
-    background-color: var(--themeColor);
-    color: #fff;
-    width: 16px;
-    height: 16px;
-    line-height: 16px;
-    text-align: center;
-    font-size: 12px;
-    border-radius: 50%;
+  .AA1Itop1 {
+    color: var(--themeColor);
+    border-color: var(--themeColor);
+    padding: 0px 15px;
+    line-height: 40px;
   }
   }
 
 
-  // a {
-  //   color: var(--themeColor);
-  // }
-
   /* 普通文字按钮的颜色 */
   /* 普通文字按钮的颜色 */
   .ant-btn-text {
   .ant-btn-text {
     color: var(--themeColor);
     color: var(--themeColor);
@@ -146,63 +130,6 @@ textarea {
     color: #ff4d4d;
     color: #ff4d4d;
   }
   }
 
 
-  /* antd分页器样式 */
-  // .ant-pagination .ant-pagination-item {
-  //   border-radius: 50%;
-  //   border: 1px solid #999;
-  //   background-color: transparent !important;
-  // }
-
-  // .ant-pagination .ant-pagination-item-active {
-  //   background-color: var(--themeColor) !important;
-  // }
-
-  // .ant-pagination .ant-pagination-item-active a {
-  //   color: #fff !important;
-  // }
-
-  // .ant-pagination .ant-pagination-item:hover {
-  //   background-color: var(--themeColor) !important;
-  // }
-
-  // .ant-pagination .ant-pagination-item:hover a {
-  //   color: #fff !important;
-  // }
-
-  // .ant-pagination-prev {
-  //   border-radius: 50% !important;
-  //   border: 1px solid #999;
-  // }
-
-  // .ant-pagination-prev:hover {
-  //   background-color: var(--themeColor);
-  // }
-
-  // .ant-pagination-prev:hover button {
-  //   color: #fff;
-  // }
-
-  // .ant-pagination-next {
-  //   border-radius: 50% !important;
-  //   border: 1px solid #999;
-  // }
-
-  // .ant-pagination-next:hover {
-  //   background-color: var(--themeColor);
-  // }
-
-  // .ant-pagination-next:hover button {
-  //   color: #fff;
-  // }
-
-  // .ant-pagination-disabled {
-  //   border: 1px solid #ccc;
-  // }
-
-  // .ant-pagination-disabled:hover {
-  //   background-color: transparent;
-  // }
-
   /* 表格的图片居中 */
   /* 表格的图片居中 */
   .tableImgAuto {
   .tableImgAuto {
     display: flex;
     display: flex;
@@ -254,19 +181,6 @@ textarea {
   .ant-table-cell {
   .ant-table-cell {
     text-align: center !important;
     text-align: center !important;
   }
   }
-
-  // 树型 表格 定制化
-  #A2Table3 {
-    .ant-table-row-expand-icon {
-      background-color: var(--themeColor);
-      color: #fff;
-    }
-
-    .ant-table-cell-with-append {
-      display: flex;
-      justify-content: flex-start;
-    }
-  }
 }
 }
 
 
 [hidden] {
 [hidden] {
@@ -364,239 +278,3 @@ textarea {
 //     right: 0;
 //     right: 0;
 //   }
 //   }
 // }
 // }
-
-.Y2xia {
-  display: block;
-  width: 100%;
-  height: 100%;
-  text-align: center;
-}
-
-// 打开侧边栏高亮
-.D1GtNum {
-  cursor: pointer;
-  text-decoration: underline;
-  // &:hover {
-  //   color: var(--themeColor);
-  // }
-}
-
-.D1GtNumAc {
-  color: var(--themeColor);
-}
-
-// 侧边栏藏品详情
-.Y1info {
-  width: 100%;
-  margin-top: 5px;
-  height: calc(100% - 35px);
-  font-size: 16px;
-  padding: 15px;
-  overflow-y: auto;
-  .Y1tit {
-    font-size: 18px;
-    padding-left: 15px;
-    font-weight: 700;
-    position: relative;
-    margin-bottom: 15px;
-    color: var(--themeColor);
-    &::before {
-      position: absolute;
-      left: 0px;
-      top: 50%;
-      transform: translateY(-50%);
-      content: '';
-      width: 6px;
-      height: 18px;
-      background-color: var(--themeColor);
-    }
-  }
-
-  .Y1row {
-    width: 100%;
-    display: flex;
-    margin-bottom: 10px;
-    .Y1rowll {
-      width: 120px;
-      text-align: right;
-      font-weight: 700;
-    }
-    .Y1rowrr {
-      width: calc(100% - 120px);
-      word-wrap: break-word;
-      max-height: 130px;
-      overflow-y: auto;
-      white-space: pre-wrap;
-    }
-  }
-
-  // ------------------------档案信息
-  .Y1rowZ {
-    .Y1z1 {
-      margin-bottom: 20px;
-      display: flex;
-      justify-content: space-between;
-      .Y1rowZll {
-        width: 48%;
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-      }
-      .Y1rowZrr {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        width: 48%;
-        .Y1rowZrrModel {
-          margin-left: 20px;
-          height: 200px;
-          overflow-y: auto;
-          width: calc(100% - 220px);
-          display: flex;
-          align-items: center;
-          color: var(--themeColor);
-          .Y1rowZrrModelBox {
-            width: 100%;
-            max-height: 100%;
-            & > h3 {
-              // text-align: center;
-              margin-bottom: 10px;
-            }
-            & > div {
-              margin: 4px 0;
-              cursor: pointer;
-              transition: all 0.3s;
-              word-wrap: break-word;
-              &:hover {
-                text-shadow: 1px 1px 1px #ccc;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    .Y1z2 {
-      margin-bottom: 20px;
-      .y1z2_1 {
-        display: flex;
-        flex-wrap: wrap;
-        justify-content: space-between;
-        width: 100%;
-        .y1z2_1row1 {
-          margin-bottom: 10px;
-          width: 48%;
-          display: flex;
-          .y1z2_1r11 {
-            width: 130px;
-            text-align: right;
-            font-weight: 700;
-          }
-          // .y1z2_1r11long {
-          //   width: 132px;
-          //   position: relative;
-          //   left: -6px;
-          // }
-          .y1z2_1r12 {
-            width: calc(100% - 130px);
-            word-wrap: break-word;
-            max-height: 130px;
-            overflow-y: auto;
-            white-space: pre-wrap;
-          }
-        }
-        .y1z2_1row1Full {
-          width: 100%;
-          .y1z2_1r12 {
-            max-height: 1000px;
-          }
-        }
-      }
-    }
-  }
-
-  // ------------------------库存信息
-  .Y22com {
-    .Y22sta {
-      font-weight: 700;
-      font-size: 18px;
-      margin-bottom: 20px;
-    }
-    .Y22No {
-      font-size: 16px;
-      letter-spacing: 4px;
-      height: 200px;
-      display: flex;
-      align-items: center;
-    }
-    .Y22Info {
-      width: 800px;
-      border: 1px solid #ccc;
-      border-bottom: none;
-      .Y22row {
-        display: flex;
-        // align-items: center;
-        & > div {
-          width: 200px;
-          text-align: center;
-          padding: 8px 4px;
-          border-bottom: 1px solid #ccc;
-          &:nth-of-type(1) {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-          }
-          &:nth-of-type(2) {
-            width: 600px;
-          }
-        }
-      }
-      .Y22row1 {
-        background-color: #eaeaea;
-      }
-      .Y22rowNo {
-        height: 40px;
-        line-height: 40px;
-        text-align: center;
-        border-bottom: 1px solid #ccc;
-      }
-    }
-  }
-
-  // ------------------------藏品附件
-  .Y33com {
-    .Y33top {
-      margin-bottom: 20px;
-      display: flex;
-      justify-content: space-around;
-      .ant-btn {
-        margin-right: 15px;
-      }
-    }
-    .Y33no {
-      font-size: 16px;
-      letter-spacing: 4px;
-      height: 200px;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-    }
-  }
-}
-
-// 点击藏品编辑
-.C22revampBox {
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 100;
-  padding: 30px;
-  background-color: rgba(0, 0, 0, 0.6);
-  & > div {
-    position: relative;
-    width: 100%;
-    height: 100%;
-  }
-}

+ 6 - 0
src/components/MyTable/index.tsx

@@ -14,6 +14,7 @@ import classNames from 'classnames'
 import { resJiLianFu } from '@/utils/history'
 import { resJiLianFu } from '@/utils/history'
 import { baseURL } from '@/utils/http'
 import { baseURL } from '@/utils/http'
 import dayjs from 'dayjs'
 import dayjs from 'dayjs'
+import { tablePingFu } from '@/pages/A1check/A1ledger/data'
 
 
 interface MyTableProps extends Omit<TableProps, 'onChange'> {
 interface MyTableProps extends Omit<TableProps, 'onChange'> {
   yHeight?: number //设置表格的高度
   yHeight?: number //设置表格的高度
@@ -267,6 +268,11 @@ const MyTable = forwardRef<MyTableMethods, MyTableProps>(
             const endLen = v[3]?.endLen || 4
             const endLen = v[3]?.endLen || 4
 
 
             return getDesensitizeTxt(txt, frontLen, endLen)
             return getDesensitizeTxt(txt, frontLen, endLen)
+          },
+          // 年代和质地需要拼接
+          tablePing: (item: any) => {
+            const txt = tablePingFu(item, v[2])
+            return txt
           }
           }
         }
         }
 
 

+ 21 - 7
src/pages/A1check/A1ledger/data.ts

@@ -1,42 +1,44 @@
+import { GoodsType } from '@/pages/AAnew/data'
 import { resDictStr } from '@/utils/select'
 import { resDictStr } from '@/utils/select'
 
 
+// 待完善
 export const A1topArr = [
 export const A1topArr = [
   {
   {
-    key: 'x1',
+    key: 'numName',
     placeholder: '编号类型',
     placeholder: '编号类型',
     type: 'Select',
     type: 'Select',
     options: resDictStr('编号类型')
     options: resDictStr('编号类型')
   },
   },
   {
   {
-    key: 'x2',
+    key: 'num',
     placeholder: '请输入编号',
     placeholder: '请输入编号',
     type: 'Input'
     type: 'Input'
   },
   },
   {
   {
-    key: 'x3',
+    key: 'name',
     placeholder: '请搜索名称或原名',
     placeholder: '请搜索名称或原名',
     type: 'Input'
     type: 'Input'
   },
   },
   {
   {
-    key: 'x4',
+    key: 'age',
     placeholder: '年代',
     placeholder: '年代',
     type: 'Select',
     type: 'Select',
     options: resDictStr('年代')
     options: resDictStr('年代')
   },
   },
   {
   {
-    key: 'x5',
+    key: 'type',
     placeholder: '类别',
     placeholder: '类别',
     type: 'Select',
     type: 'Select',
     options: resDictStr('类别')
     options: resDictStr('类别')
   },
   },
   {
   {
-    key: 'x6',
+    key: 'texture',
     placeholder: '质地',
     placeholder: '质地',
     type: 'Select',
     type: 'Select',
     options: resDictStr('质地')
     options: resDictStr('质地')
   },
   },
   {
   {
-    key: 'x7',
+    key: 'level',
     placeholder: '级别',
     placeholder: '级别',
     type: 'Select',
     type: 'Select',
     options: resDictStr('文物级别')
     options: resDictStr('文物级别')
@@ -44,3 +46,15 @@ export const A1topArr = [
 ]
 ]
 
 
 export type A1tableType = any
 export type A1tableType = any
+
+// 年代和质地需要拼接字符串
+export const tablePingFu = (item: GoodsType, type: '年代' | '质地') => {
+  const temp =
+    type === '年代' ? ['age1', 'age2', 'age3', 'age4'] : ['texture1', 'texture2', 'texture3']
+
+  const arr: string[] = []
+  temp.forEach(v => {
+    if (item[v]) arr.push(item[v])
+  })
+  return arr.length ? arr.join('-') : '(空)'
+}

+ 77 - 6
src/pages/A1check/A1ledger/index.tsx

@@ -1,11 +1,13 @@
-import React, { useMemo, useRef } from 'react'
+import React, { useCallback, useMemo, useRef } from 'react'
 import styles from './index.module.scss'
 import styles from './index.module.scss'
 import TopSearch from '@/pages/ZcomPage/TopSearch'
 import TopSearch from '@/pages/ZcomPage/TopSearch'
 import { A1tableType, A1topArr } from './data'
 import { A1tableType, A1topArr } from './data'
 import AAbtn from '@/pages/ZcomPage/AAbtn'
 import AAbtn from '@/pages/ZcomPage/AAbtn'
 import { MessageFu } from '@/utils/message'
 import { MessageFu } from '@/utils/message'
 import { Button } from 'antd'
 import { Button } from 'antd'
-import { openLink } from '@/utils/history'
+import { downloadFileByUrl, openLink } from '@/utils/history'
+import { API_upFile } from '@/store/action/layout'
+import { fileDomInitialFu } from '@/utils/domShow'
 
 
 function A1ledger() {
 function A1ledger() {
   // --------------右侧按钮
   // --------------右侧按钮
@@ -13,8 +15,12 @@ function A1ledger() {
     return (
     return (
       <>
       <>
         <AAbtn txt={1} onClick={() => MessageFu.warning('功能开发中')} tit='新增藏品' />
         <AAbtn txt={1} onClick={() => MessageFu.warning('功能开发中')} tit='新增藏品' />
-        <AAbtn txt={1} onClick={() => {}} tit='下载模板' />
-        <AAbtn txt={1} onClick={() => {}} tit='导入数据' />
+        <AAbtn
+          txt={1}
+          onClick={() => downloadFileByUrl('./myData/xlsx/盘点基准-一普文物信息.xlsx')}
+          tit='下载模板'
+        />
+        <AAbtn txt={1} onClick={() => myInput.current?.click()} tit='导入数据' />
         <AAbtn txt={1} onClick={() => topDomRef.current.clickSearch()} tit='查询' />
         <AAbtn txt={1} onClick={() => topDomRef.current.clickSearch()} tit='查询' />
         <AAbtn txt={2} onClick={() => topDomRef.current.clickReset()} />
         <AAbtn txt={2} onClick={() => topDomRef.current.clickReset()} />
       </>
       </>
@@ -22,8 +28,58 @@ function A1ledger() {
   }, [])
   }, [])
 
 
   const topDomRef = useRef<any>(null)
   const topDomRef = useRef<any>(null)
+
+  const myInput = useRef<HTMLInputElement>(null)
+
+  // 上传文件
+  const handeUpPhoto = useCallback(async (e: React.ChangeEvent<HTMLInputElement>) => {
+    if (e.target.files) {
+      // 拿到files信息
+      const filesInfo = e.target.files[0]
+
+      let fileNmae: string = filesInfo.name
+      fileNmae = fileNmae.toLowerCase()
+
+      // 校验格式
+      if (!fileNmae.endsWith('.xlsx')) {
+        e.target.value = ''
+        return MessageFu.warning(`只支持.xlsx格式!`)
+      }
+      const fd = new FormData()
+
+      fd.append('file', filesInfo)
+      fd.append('type', 'doc')
+      fd.append('dirCode', 'A1ledger')
+      fd.append('isDb', 'true')
+
+      // 开启压缩图片
+      fd.append('isCompress', 'true')
+
+      e.target.value = ''
+
+      try {
+        const res = await API_upFile(fd, 'cms/importLedger/uploadExcel')
+        if (res.code === 0) {
+          MessageFu.success(res.data.msg)
+          topDomRef.current.clickReset()
+        }
+        fileDomInitialFu()
+      } catch (error) {
+        fileDomInitialFu()
+      }
+    }
+  }, [])
+
   return (
   return (
     <div className={styles.A1ledger}>
     <div className={styles.A1ledger}>
+      <input
+        id='upInput'
+        type='file'
+        accept='.xlsx'
+        ref={myInput}
+        onChange={e => handeUpPhoto(e)}
+      />
+
       <div className='pageTitle'>
       <div className='pageTitle'>
         盘库总账
         盘库总账
         <AAbtn
         <AAbtn
@@ -39,9 +95,24 @@ function A1ledger() {
         ref={topDomRef}
         ref={topDomRef}
         leftArr={A1topArr}
         leftArr={A1topArr}
         rightBtn={rightBtn}
         rightBtn={rightBtn}
-        waiWidth={500}
+        waiWidth={490}
         sonWidth='13.3%'
         sonWidth='13.3%'
-        columnsTemp={[['txt', '登录账号', 'name']]}
+        columnsTemp={[
+          ['txt', '序号', '待完善'],
+          ['txt', '编号类型', 'numName'],
+          ['txt', '编号', 'num'],
+          ['txt', '名称', 'name'],
+          ['txt', '原名', 'namePrimitive'],
+          ['tablePing', '年代'],
+          ['txt', '类别', 'type'],
+          ['tablePing', '质地'],
+          ['txt', '完残状况', 'torn'],
+          ['txt', '数量', 'pcs'],
+          ['txt', '级别', 'level'],
+          ['txt', '来源', 'source'],
+          ['txt', '创建时间', '待完善'],
+          ['txt', '创建用户', '待完善']
+        ]}
         tableLastBtn={[
         tableLastBtn={[
           {
           {
             title: '操作',
             title: '操作',

+ 1 - 6
src/pages/AAnew/AA1info/index.module.scss

@@ -12,12 +12,7 @@
     .AA1Itop {
     .AA1Itop {
       display: flex;
       display: flex;
       justify-content: space-between;
       justify-content: space-between;
-      .AA1Itop1 {
-        color: var(--themeColor);
-        border-color: var(--themeColor);
-        padding: 0px 15px;
-        line-height: 40px;
-      }
+
       .AA1Itop2 {
       .AA1Itop2 {
         display: flex;
         display: flex;
         & > div {
         & > div {

+ 6 - 7
src/pages/Login/index.tsx

@@ -60,19 +60,18 @@ export default function Login() {
 
 
       // 用户信息存到本地
       // 用户信息存到本地
       setTokenInfo(res.data)
       setTokenInfo(res.data)
-      history.push('/')
 
 
       // 记住密码
       // 记住密码
       if (check) {
       if (check) {
         setPassSave({ userName, passWord })
         setPassSave({ userName, passWord })
       } else setPassSave({})
       } else setPassSave({})
 
 
-      // const urlAll = window.location.href
-      // if (urlAll.includes('?back=')) {
-      //   const url = urlAll.split('?back=')[1]
-      //   if (url) history.push(`/${url}`)
-      //   else history.push('/')
-      // } else history.push('/')
+      const urlAll = window.location.href
+      if (urlAll.includes('?back=')) {
+        const url = urlAll.split('?back=')[1]
+        if (url) history.push(`/${url}`)
+        else history.push('/')
+      } else history.push('/')
     } else if (res.code === 3014) {
     } else if (res.code === 3014) {
       MessageFu.warning('用户名或密码错误')
       MessageFu.warning('用户名或密码错误')
     }
     }

+ 3 - 0
src/pages/ZcomPage/TopSearch/index.module.scss

@@ -37,6 +37,9 @@
         #AAbtn {
         #AAbtn {
           margin-left: 10px;
           margin-left: 10px;
           margin-bottom: 10px;
           margin-bottom: 10px;
+          &:nth-of-type(1) {
+            margin-left: 0;
+          }
         }
         }
       }
       }
     }
     }

+ 74 - 0
src/pages/ZgoodsInfo/GI_info/index.module.scss

@@ -0,0 +1,74 @@
+.GI_info {
+  display: flex;
+  justify-content: space-between;
+  :global {
+    .GI1left {
+      width: calc(100% - 320px);
+
+      .GI1leftTit {
+        font-weight: 700;
+        font-size: 18px;
+        margin-bottom: 10px;
+      }
+      .GI1leftTit2 {
+        margin-top: 20px;
+      }
+
+      .GI1leftMain {
+        display: flex;
+        flex-wrap: wrap;
+        align-content: flex-start;
+        border-bottom: 1px solid #dfcece;
+      }
+      .GI1Lrow {
+        // margin-bottom: 2px;
+        display: flex;
+        font-size: 16px;
+        width: 50%;
+        border: 1px solid #dfcece;
+        border-bottom: none;
+        // border-right: 0;
+        & > div {
+          text-align: center;
+          font-weight: 700;
+          width: 150px;
+          background-color: #ecdfce;
+          padding: 5px 0;
+        }
+        & > p {
+          padding: 5px 0;
+          padding-left: 10px;
+          width: calc(100% - 150px);
+          word-wrap: break-word;
+        }
+      }
+      .GI1LrowFull {
+        width: 100%;
+      }
+    }
+    .GI1Right {
+      width: 240px;
+      .GI1Right1 {
+        border-radius: 10px;
+        overflow: hidden;
+      }
+      .GI1Right2 {
+        margin-top: 10px;
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: flex-start;
+        align-content: flex-start;
+        .GI1Rrow {
+          border: 3px solid transparent;
+          border-radius: 6px;
+          overflow: hidden;
+          cursor: pointer;
+          margin: 5px;
+        }
+        .GI1RrowAc {
+          border-color: var(--themeColor);
+        }
+      }
+    }
+  }
+}

+ 86 - 0
src/pages/ZgoodsInfo/GI_info/index.tsx

@@ -0,0 +1,86 @@
+import React, { useMemo, useState } from 'react'
+import styles from './index.module.scss'
+import { GoodsType } from '@/pages/AAnew/data'
+import ImageLazy from '@/components/ImageLazy'
+import classNames from 'classnames'
+import { GIrowArr1, GIrowArr2 } from '../data'
+
+type Props = {
+  info: GoodsType
+  fileList: any[]
+}
+
+function GI_info({ info, fileList }: Props) {
+  const imgList = useMemo(() => {
+    return fileList.filter(v => v.type === 'img')
+  }, [fileList])
+  const [imgAc, setImgAc] = useState(0)
+  const imgAcObj = useMemo(() => {
+    let res: any = ''
+    if (imgList.length && imgList[imgAc]) res = imgList[imgAc]
+    return res
+  }, [imgAc, imgList])
+
+  return (
+    <div className={styles.GI_info}>
+      <div className='GI1left' style={{ width: imgList.length === 0 ? '100%' : '' }}>
+        <div className='GI1leftTit'>主要信息</div>
+
+        <div className='GI1leftMain'>
+          {GIrowArr1.map((item, index) => (
+            <div key={index} className={classNames('GI1Lrow', item.full ? 'GI1LrowFull' : '')}>
+              <div>{item.name}</div>
+              <p>{item.resFu ? item.resFu(info) : info[item.key] || '(空)'}</p>
+            </div>
+          ))}
+        </div>
+
+        <div className='GI1leftTit GI1leftTit2'>辅助信息</div>
+
+        <div className='GI1leftMain'>
+          {GIrowArr2.map((item, index) => (
+            <div key={index} className={classNames('GI1Lrow', item.full ? 'GI1LrowFull' : '')}>
+              <div>{item.name}</div>
+              <p>{item.resFu ? item.resFu(info) : info[item.key] || '(空)'}</p>
+            </div>
+          ))}
+        </div>
+      </div>
+      {imgList.length === 0 ? null : (
+        <div className='GI1Right'>
+          <div className='GI1Right1'>
+            {imgAcObj ? (
+              <ImageLazy
+                width={240}
+                height={220}
+                src={imgAcObj.thumb || imgAcObj.filePath}
+                srcBig={imgAcObj.filePath || imgAcObj.thumb}
+              />
+            ) : null}
+          </div>
+          <div className='GI1Right2'>
+            {imgList.map((item, index) => (
+              <div
+                onClick={() => setImgAc(index)}
+                className={classNames('GI1Rrow', imgAc === index ? 'GI1RrowAc' : '')}
+                key={item.id}
+              >
+                <ImageLazy
+                  width={64}
+                  height={64}
+                  src={item.thumb || item.filePath}
+                  srcBig={item.filePath || item.thumb}
+                  noLook={true}
+                />
+              </div>
+            ))}
+          </div>
+        </div>
+      )}
+    </div>
+  )
+}
+
+const MemoGI_info = React.memo(GI_info)
+
+export default MemoGI_info

+ 69 - 0
src/pages/ZgoodsInfo/data.ts

@@ -0,0 +1,69 @@
+import { tablePingFu } from '../A1check/A1ledger/data'
+import { GoodsType } from '../AAnew/data'
+
+export const GIrowArr1: any[] = [
+  { key: '创建日期', name: '创建日期' },
+  { key: '创建人', name: '创建人' },
+  { key: '编号类型', name: '编号类型' },
+  { key: '藏品编号', name: '藏品编号' },
+  { key: '名称', name: '名称' },
+  { key: '原名', name: '原名' },
+  { key: '分类号', name: '分类号' },
+  { key: '文物类别', name: '文物类别' },
+  { key: '入馆凭证号', name: '入馆凭证号' },
+  { key: '原登记号', name: '原登记号' },
+  { key: '年代', name: '年代', resFu: (info: GoodsType) => tablePingFu(info, '年代') },
+  { key: '具体年代', name: '具体年代' },
+  { key: '质地', name: '质地', resFu: (info: GoodsType) => tablePingFu(info, '年代') },
+  { key: '藏品分类', name: '藏品分类' },
+  { key: '是否完成数字化采集', name: '是否完成数字化采集' },
+  { key: '是否为革命文物', name: '是否为革命文物' },
+  { key: '数量', name: '数量' },
+  { key: '外形尺寸', name: '外形尺寸' },
+  { key: '具体尺寸', name: '具体尺寸' },
+  { key: '质量范围', name: '质量范围' },
+  { key: '具体质量', name: '具体质量' },
+  { key: '单位', name: '单位' },
+  { key: '文物级别', name: '文物级别' },
+  { key: '文物来源', name: '文物来源' },
+  { key: '具体来源', name: '具体来源' },
+  { key: '完残程度', name: '完残程度' },
+  { key: '完残状况', name: '完残状况' },
+  { key: '保存状态', name: '保存状态' },
+  { key: '入藏时间范围', name: '入藏时间范围' },
+  { key: '入藏年度', name: '入藏年度' },
+  { key: '著者', name: '著者' },
+  { key: '版本', name: '版本' },
+  { key: '存卷', name: '存卷' },
+  { key: '备注', name: '备注' }
+]
+
+export const GIrowArr2: any[] = [
+  { key: '收藏单位', name: '收藏单位' },
+  { key: '形态特征', name: '形态特征' },
+  { key: '款识', name: '款识' },
+  { key: '题跋', name: '题跋' },
+  { key: '印鉴', name: '印鉴' },
+  { key: '内容摘要', name: '内容摘要' },
+  { key: '搜索经过', name: '搜索经过' },
+  { key: '当前状况', name: '当前状况' },
+  { key: '人物传略', name: '人物传略' },
+  { key: '铭文', name: '铭文' },
+  { key: '流派', name: '流派' },
+  { key: '装饰生成工艺', name: '装饰生成工艺' },
+  { key: '藏品基本部类', name: '藏品基本部类' },
+  { key: '地域', name: '地域' },
+  { key: '人文表示方法', name: '人文表示方法' },
+  { key: '功能类别', name: '功能类别' },
+  { key: '流派类型', name: '流派类型' },
+  { key: '绘画技法', name: '绘画技法' },
+  { key: '文字生成工艺', name: '文字生成工艺' },
+  { key: '来源单位或个人', name: '来源单位或个人' },
+  { key: '成型工艺', name: '成型工艺' },
+  { key: '人文', name: '人文' },
+  { key: '人文类型', name: '人文类型' },
+  { key: '地域标识方式', name: '地域标识方式' },
+  { key: '年代类型', name: '年代类型' },
+  { key: '标本类别', name: '标本类别' },
+  { key: '注销凭证号', name: '注销凭证号', full: true }
+]

+ 56 - 0
src/pages/ZgoodsInfo/index.module.scss

@@ -1,4 +1,60 @@
 .ZgoodsInfo {
 .ZgoodsInfo {
+  background-color: #fcf9f5;
+  border-radius: 10px;
+  padding: 15px 24px 0;
+  position: relative;
   :global {
   :global {
+    .ZGtop {
+      display: flex;
+      justify-content: space-between;
+      & > div {
+        display: flex;
+        align-items: center;
+        & > h3 {
+          font-size: 18px;
+          margin-right: 15px;
+        }
+        #AAbtn {
+          margin-left: 15px;
+        }
+      }
+    }
+    .GItab {
+      margin-top: 15px;
+      display: flex;
+      border-bottom: 1px solid #ccc;
+      padding-bottom: 15px;
+      .GItab1 {
+        cursor: pointer;
+        font-size: 18px;
+        padding: 0 10px;
+        margin: 0 10px;
+        position: relative;
+        font-weight: 700;
+      }
+      .GItab1Ac {
+        color: var(--themeColor);
+        &::before {
+          content: '';
+          position: absolute;
+          bottom: -15px;
+          left: 0;
+          width: 100%;
+          height: 6px;
+          background-color: var(--themeColor);
+        }
+      }
+    }
+
+    .GImain {
+      margin-top: 15px;
+      width: 100%;
+      height: calc(100% - 125px);
+      & > div {
+        width: 100%;
+        height: 100%;
+        overflow-y: auto;
+      }
+    }
   }
   }
 }
 }

+ 39 - 2
src/pages/ZgoodsInfo/index.tsx

@@ -1,9 +1,46 @@
-import React from 'react'
+import React, { useState } from 'react'
 import styles from './index.module.scss'
 import styles from './index.module.scss'
+import { Tag } from 'antd'
+import AAbtn from '../ZcomPage/AAbtn'
+import { MessageFu } from '@/utils/message'
+import classNames from 'classnames'
+import GiInfo from './GI_info'
+
+const tabArr = ['藏品信息', '盘点记录', '藏品附件']
+
 function ZgoodsInfo() {
 function ZgoodsInfo() {
+  const [tabAc, setTabAc] = useState('藏品信息')
+
   return (
   return (
     <div className={styles.ZgoodsInfo}>
     <div className={styles.ZgoodsInfo}>
-      <h1>ZgoodsInfo</h1>
+      <div className='pageTitle'>藏品详情</div>
+
+      <div className='ZGtop'>
+        <div>
+          <h3>这个藏品名称</h3>
+          <Tag className='AA1Itop1'>待处理</Tag>
+        </div>
+        <div>
+          <AAbtn txt={3} onClick={() => MessageFu.warning('功能开发中')} />
+          <AAbtn txt={1} onClick={() => MessageFu.warning('功能开发中')} tit='编辑' />
+        </div>
+      </div>
+
+      <div className='GItab'>
+        {tabArr.map(item => (
+          <div
+            className={classNames('GItab1', tabAc === item ? 'GItab1Ac' : '')}
+            key={item}
+            onClick={() => setTabAc(item)}
+          >
+            {item}
+          </div>
+        ))}
+      </div>
+
+      <div className='GImain'>
+        {tabAc === '藏品信息' ? <GiInfo info={{ id: 1 }} fileList={[]} /> : null}
+      </div>
     </div>
     </div>
   )
   )
 }
 }

+ 35 - 0
src/store/action/A1check/A1ledger.ts

@@ -0,0 +1,35 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+
+/**
+ * 盘库总账 - 获取分页列表
+ */
+export const AA1_APIgetList = (data: any, exportFlag?: boolean): any => {
+  if (exportFlag) return http.post('cms/antique/page', data)
+  else {
+    return async (dispatch: AppDispatch) => {
+      const res = await http.post('cms/antique/page', data)
+      if (res.code === 0) {
+        const obj = {
+          list: res.data.records,
+          total: res.data.total
+        }
+        dispatch({ type: 'AA1/getList', payload: obj })
+      }
+    }
+  }
+}
+
+/**
+ * 盘库总账-详情
+ */
+export const AA1_APIgetInfo = (id: number) => {
+  return http.get(`cms/antique/detail/${id}`)
+}
+
+/**
+ * 盘库总账-删除
+ */
+export const AA1_APIdel = (id: number) => {
+  return http.get(`cms/antique/remove/${id}`)
+}

+ 24 - 0
src/utils/history.ts

@@ -147,3 +147,27 @@ export const loginOutFu = () => {
     } else history.push('/login')
     } else history.push('/login')
   }
   }
 }
 }
+
+// 简化版本:通过URL下载同域文件
+export const downloadFileByUrl = async (fileUrl: string, fileName?: string, back?: () => void) => {
+  const a = document.createElement('a')
+  a.href = fileUrl.startsWith('./') ? fileUrl : baseURL + fileUrl
+  a.target = '_blank'
+
+  // 设置下载文件名
+  if (fileName) {
+    a.download = fileName
+  } else {
+    // 自动从URL提取文件名
+    const urlParts = fileUrl.split('/')
+    const originalName = urlParts[urlParts.length - 1]
+    a.download = originalName || 'download'
+  }
+
+  // 触发下载
+  a.style.display = 'none'
+  document.body.appendChild(a)
+  a.click()
+  document.body.removeChild(a)
+  if (back) back()
+}