Pārlūkot izejas kodu

订单附件增加id参数

shaogen1995 3 mēneši atpakaļ
vecāks
revīzija
b8a852d6c5
27 mainītis faili ar 264 papildinājumiem un 119 dzēšanām
  1. 4 4
      src/pages/A2_query/A22antique/index.module.scss
  2. 2 7
      src/pages/A2_query/A22antique/index.tsx
  3. 4 4
      src/pages/A2_query/A23media/index.module.scss
  4. 2 7
      src/pages/A2_query/A23media/index.tsx
  5. 2 1
      src/pages/A3_ledger/C1ledger/index.module.scss
  6. 16 6
      src/pages/A3_ledger/C1ledger/index.tsx
  7. 3 0
      src/pages/A3_ledger/C1ledger/type.d.ts
  8. 4 0
      src/pages/A_workbench/A4voucher/index.module.scss
  9. 14 0
      src/pages/A_workbench/A4voucher/index.tsx
  10. 1 0
      src/pages/B_enterTibet/B1collect/B1edit/index.tsx
  11. 1 0
      src/pages/B_enterTibet/B3_4page/B3edit/B3aTop/index.tsx
  12. 9 3
      src/pages/B_enterTibet/B3goodsTable/B3GaddNew/index.tsx
  13. 4 0
      src/pages/C_goodsManage/C1register/index.module.scss
  14. 14 0
      src/pages/C_goodsManage/C1register/index.tsx
  15. 4 0
      src/pages/C_goodsManage/C21wealth/index.module.scss
  16. 14 0
      src/pages/C_goodsManage/C21wealth/index.tsx
  17. 4 0
      src/pages/C_goodsManage/C22goodEdit/index.module.scss
  18. 14 0
      src/pages/C_goodsManage/C22goodEdit/index.tsx
  19. 32 18
      src/pages/C_goodsManage/C2files/index.tsx
  20. 1 0
      src/pages/C_goodsManage/C6edit/C6add/index.tsx
  21. 1 0
      src/pages/D_storeManage/D4impStor/D4edit/index.tsx
  22. 1 0
      src/pages/D_storeManage/D6putsStor/D6edit/index.tsx
  23. 1 0
      src/pages/E_goodsStorage/E2damaged/E2edit/index.tsx
  24. 1 1
      src/pages/F_exhibition/F1exhibition/index.tsx
  25. 101 66
      src/pages/Layout/data.ts
  26. 9 1
      src/pages/Y_goodsDetails/Y1cathet/data.tsx
  27. 1 1
      src/utils/select.ts

+ 4 - 4
src/pages/A2_query/A22antique/index.module.scss

@@ -1,4 +1,4 @@
-.A22antique {
-  :global {
-  }
-}
+// .A22antique {
+//   :global {
+//   }
+// }

+ 2 - 7
src/pages/A2_query/A22antique/index.tsx

@@ -1,12 +1,7 @@
 import React from 'react'
-import styles from './index.module.scss'
+import C1ledger from '@/pages/A3_ledger/C1ledger'
 function A22antique() {
-  return (
-    <div className={styles.A22antique}>
-      <div className='pageTitle'>文物信息查询</div>
-      <p>待开发</p>
-    </div>
-  )
+  return <C1ledger />
 }
 
 const MemoA22antique = React.memo(A22antique)

+ 4 - 4
src/pages/A2_query/A23media/index.module.scss

@@ -1,4 +1,4 @@
-.A23media {
-  :global {
-  }
-}
+// .A23media {
+//   :global {
+//   }
+// }

+ 2 - 7
src/pages/A2_query/A23media/index.tsx

@@ -1,12 +1,7 @@
+import C2files from '@/pages/C_goodsManage/C2files'
 import React from 'react'
-import styles from './index.module.scss'
 function A23media() {
-  return (
-    <div className={styles.A23media}>
-      <div className='pageTitle'>多媒体信息查询</div>
-      <p>待开发</p>
-    </div>
-  )
+  return <C2files />
 }
 
 const MemoA23media = React.memo(A23media)

+ 2 - 1
src/pages/A3_ledger/C1ledger/index.module.scss

@@ -38,10 +38,11 @@
       .C1toprrKai {
         position: relative;
         top: 10px;
-        width: 300px;
+        width: 310px;
         height: 84px;
         display: flex;
         flex-wrap: wrap;
+        justify-content: center;
       }
 
       .C1topllAll {

+ 16 - 6
src/pages/A3_ledger/C1ledger/index.tsx

@@ -20,6 +20,13 @@ import C4import from '../ComPage/C4import'
 import { selectObj } from '@/utils/select'
 
 function C1ledger() {
+  // 是否是藏品查询的藏品信息
+  const [antiqueSearch, setAntiqueSearch] = useState(window.location.href.includes('antiqueSearch'))
+
+  useEffect(() => {
+    if (1 + 1 !== 2) console.log(setAntiqueSearch)
+  }, [])
+
   const dispatch = useDispatch()
 
   const [formData, setFormData] = useState(C1baseFormData)
@@ -189,7 +196,9 @@ function C1ledger() {
 
   // 点击导出
   const deriveFu = useCallback(async () => {
-    const name = '藏品总账' + dayjs(new Date()).format('YYYY-MM-DD HH:mm')
+    const name = antiqueSearch
+      ? '藏品信息'
+      : '藏品总账' + dayjs(new Date()).format('YYYY-MM-DD HH:mm')
 
     const res = await C1_APIgetList(
       {
@@ -262,7 +271,7 @@ function C1ledger() {
       const toExcel = new ExportJsonExcel(option) //new
       toExcel.saveExcel() //保存
     }
-  }, [])
+  }, [antiqueSearch])
 
   // 点击回收站
   const [recycleBin, setRecycleBin] = useState(false)
@@ -273,7 +282,8 @@ function C1ledger() {
   return (
     <div className={styles.C1ledger}>
       <div className='pageTitle'>
-        藏品总账{recycleBin ? '-回收站' : ''}
+        {antiqueSearch ? '藏品信息' : '藏品总账'}
+        {recycleBin ? '-回收站' : ''}
         {importPage ? (
           <>
             -数据导入<span className='C4tit'>最多支持单次导入1000条</span>
@@ -296,15 +306,15 @@ function C1ledger() {
         )}
 
         <div className={classNames(advanced ? 'C1toprrKai' : 'C1toprrSuo')}>
-          <Button type='primary' onClick={() => setRecycleBin(true)}>
+          <Button type='primary' onClick={() => setRecycleBin(true)} hidden={antiqueSearch}>
             回收站
           </Button>
           &emsp;
-          <Button type='primary' onClick={() => setImportPage(true)}>
+          <Button type='primary' onClick={() => setImportPage(true)} hidden={antiqueSearch}>
             数据导入
           </Button>
           &emsp;
-          <Button type='primary' onClick={deriveFu}>
+          <Button type='primary' onClick={deriveFu} hidden={antiqueSearch}>
             批量导出
           </Button>
           &emsp;

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

@@ -113,4 +113,7 @@ export type C1GoodType = {
   statusStorage: number
   // 藏品关注
   isFocus: 1 | 0
+
+  // 入藏去向
+  accountType: string
 }

+ 4 - 0
src/pages/A_workbench/A4voucher/index.module.scss

@@ -0,0 +1,4 @@
+.A4voucher {
+  :global {
+  }
+}

+ 14 - 0
src/pages/A_workbench/A4voucher/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react'
+import styles from './index.module.scss'
+function A4voucher() {
+  return (
+    <div className={styles.A4voucher}>
+      <div className='pageTitle'>凭证管理</div>
+      <p>待开发</p>
+    </div>
+  )
+}
+
+const MemoA4voucher = React.memo(A4voucher)
+
+export default MemoA4voucher

+ 1 - 0
src/pages/B_enterTibet/B1collect/B1edit/index.tsx

@@ -365,6 +365,7 @@ function B1edit() {
                 myUrl='cms/orderCollect/upload'
                 lookData={topInfo.files || []}
                 size={500}
+                fromData={{ moduleId: topInfo.id }}
               />
             </div>
           </div>

+ 1 - 0
src/pages/B_enterTibet/B3_4page/B3edit/B3aTop/index.tsx

@@ -150,6 +150,7 @@ function B3aTop({ info, pageSta, Dom }: Props, ref: any) {
               myUrl={fileUrl}
               lookData={info.files || []}
               size={500}
+              fromData={{ moduleId: info.id }}
             />
           </div>
         </div>

+ 9 - 3
src/pages/B_enterTibet/B3goodsTable/B3GaddNew/index.tsx

@@ -754,18 +754,24 @@ function B3GaddNew({ nowSta, closeFu, succFu, isEdit }: Props) {
                 label='入藏日期范围'
                 className='B3NlongTxt'
                 name='inDictDateScope'
-                rules={[{ required: true, message: '请选择入藏日期范围' }]}
+                // rules={[{ required: true, message: '请选择入藏日期范围' }]}
               >
                 <Cascader
                   options={cascaderObjFu()['入藏日期范围']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-                  allowClear={false}
+                  allowClear={true}
                 />
               </Form.Item>
             </div>
 
-            <div className='B3Nrow formRow2'>
+            <div className='B3Nrow'>
+              <Form.Item label='入藏去向' name='accountType'>
+                <Select options={selectObj['入藏去向']} placeholder='请选择' />
+              </Form.Item>
+            </div>
+
+            <div className='B3Nrow'>
               <Form.Item
                 label='来源'
                 name='source'

+ 4 - 0
src/pages/C_goodsManage/C1register/index.module.scss

@@ -0,0 +1,4 @@
+.C1register {
+  :global {
+  }
+}

+ 14 - 0
src/pages/C_goodsManage/C1register/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react'
+import styles from './index.module.scss'
+function C1register() {
+  return (
+    <div className={styles.C1register}>
+      <div className='pageTitle'>藏品登记</div>
+      <p>待开发</p>
+    </div>
+  )
+}
+
+const MemoC1register = React.memo(C1register)
+
+export default MemoC1register

+ 4 - 0
src/pages/C_goodsManage/C21wealth/index.module.scss

@@ -0,0 +1,4 @@
+.C21wealth {
+  :global {
+  }
+}

+ 14 - 0
src/pages/C_goodsManage/C21wealth/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react'
+import styles from './index.module.scss'
+function C21wealth() {
+  return (
+    <div className={styles.C21wealth}>
+      <div className='pageTitle'>资源使用</div>
+      <p>待开发</p>
+    </div>
+  )
+}
+
+const MemoC21wealth = React.memo(C21wealth)
+
+export default MemoC21wealth

+ 4 - 0
src/pages/C_goodsManage/C22goodEdit/index.module.scss

@@ -0,0 +1,4 @@
+.C22goodEdit {
+  :global {
+  }
+}

+ 14 - 0
src/pages/C_goodsManage/C22goodEdit/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react'
+import styles from './index.module.scss'
+function C22goodEdit() {
+  return (
+    <div className={styles.C22goodEdit}>
+      <div className='pageTitle'>藏品编辑</div>
+      <p>待开发</p>
+    </div>
+  )
+}
+
+const MemoC22goodEdit = React.memo(C22goodEdit)
+
+export default MemoC22goodEdit

+ 32 - 18
src/pages/C_goodsManage/C2files/index.tsx

@@ -21,6 +21,13 @@ import { MessageFu } from '@/utils/message'
 const { RangePicker } = DatePicker
 
 function C2files() {
+  // 是否是藏品查询
+  const [mediaSearch, setmediaSearch] = useState(window.location.href.includes('mediaSearch'))
+
+  useEffect(() => {
+    if (1 + 1 !== 2) console.log(setmediaSearch)
+  }, [])
+
   const dispatch = useDispatch()
 
   const [formData, setFormData] = useState(C2baseFormData)
@@ -216,6 +223,7 @@ function C2files() {
 
               <>
                 <Button
+                  hidden={mediaSearch}
                   size='small'
                   type='text'
                   onClick={() =>
@@ -229,18 +237,20 @@ function C2files() {
                 >
                   设置
                 </Button>
-                <MyPopconfirm txtK='删除' onConfirm={() => delFu([item.id])} />
+                {mediaSearch ? null : (
+                  <MyPopconfirm txtK='删除' onConfirm={() => delFu([item.id])} />
+                )}
               </>
             </>
           )
         }
       }
     ]
-  }, [delFu, downImg])
+  }, [delFu, downImg, mediaSearch])
 
   return (
     <div className={styles.C2files}>
-      <div className='pageTitle'>藏品附件</div>
+      <div className='pageTitle'>{mediaSearch ? '多媒体信息' : '藏品附件'}</div>
 
       {/* 第一行 */}
       <div className='C2top'>
@@ -274,21 +284,25 @@ function C2files() {
               批量下载
             </Button>
           )}
-          &emsp;
-          <Button
-            type='primary'
-            disabled={checkArr.length === 0}
-            onClick={() =>
-              setTypeMo({
-                ids: checkArr,
-                type: '',
-                effect: '',
-                flag: '多个'
-              })
-            }
-          >
-            批量设置
-          </Button>
+          {mediaSearch ? null : (
+            <>
+              &emsp;
+              <Button
+                type='primary'
+                disabled={checkArr.length === 0}
+                onClick={() =>
+                  setTypeMo({
+                    ids: checkArr,
+                    type: '',
+                    effect: '',
+                    flag: '多个'
+                  })
+                }
+              >
+                批量设置
+              </Button>
+            </>
+          )}
           &emsp;
           <Button type='primary' onClick={clickSearch}>
             查询

+ 1 - 0
src/pages/C_goodsManage/C6edit/C6add/index.tsx

@@ -517,6 +517,7 @@ function C6add() {
                 myUrl='cms/orderEdit/upload'
                 lookData={topInfo.files || []}
                 size={500}
+                fromData={{ moduleId: topInfo.id }}
               />
             </div>
           </div>

+ 1 - 0
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -599,6 +599,7 @@ function D4edit() {
                 myUrl='cms/orderIn/upload'
                 lookData={topInfo.files || []}
                 size={500}
+                fromData={{ moduleId: topInfo.id }}
               />
             </div>
           </div>

+ 1 - 0
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -521,6 +521,7 @@ function D6edit() {
                 myUrl='cms/orderOut/upload'
                 lookData={topInfo.files || []}
                 size={500}
+                fromData={{ moduleId: topInfo.id }}
               />
             </div>
           </div>

+ 1 - 0
src/pages/E_goodsStorage/E2damaged/E2edit/index.tsx

@@ -442,6 +442,7 @@ function E2edit() {
                 myUrl='cms/orderPreserveDamaged/upload'
                 lookData={topInfo.files || []}
                 size={500}
+                fromData={{ moduleId: topInfo.id }}
               />
             </div>
           </div>

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

@@ -3,7 +3,7 @@ import styles from './index.module.scss'
 function F1exhibition() {
   return (
     <div className={styles.F1exhibition}>
-      <div className='pageTitle'>展管理</div>
+      <div className='pageTitle'>展管理</div>
       <p>待开发</p>
     </div>
   )

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

@@ -23,23 +23,30 @@ const tabLeftArr: RouterType = [
         name: '流程管理',
         path: '/process',
         Com: React.lazy(() => import('../A_workbench/A3flow'))
+      },
+      // 待完善
+      {
+        id: 9801,
+        name: '凭证管理',
+        path: '/voucher',
+        Com: React.lazy(() => import('../A_workbench/A4voucher'))
       }
     ]
   },
   {
     id: 8,
-    name: '藏品信息查询',
+    name: '藏品查询',
     son: [
       // 待完善
       {
         id: 9802,
-        name: '文物信息查询',
+        name: '藏品信息',
         path: '/antiqueSearch',
         Com: React.lazy(() => import('../A2_query/A22antique'))
       },
       {
         id: 9803,
-        name: '多媒体信息查询',
+        name: '多媒体信息',
         path: '/mediaSearch',
         Com: React.lazy(() => import('../A2_query/A23media'))
       }
@@ -64,7 +71,74 @@ const tabLeftArr: RouterType = [
       }
     ]
   },
+  {
+    id: 3,
+    name: '藏品管理',
+    son: [
+      // 待完善
+      {
+        id: 9800,
+        name: '藏品登记',
+        path: '/register',
+        Com: React.lazy(() => import('../C_goodsManage/C1register'))
+      },
+      {
+        id: 320,
+        name: '藏品附件',
+        path: '/files',
+        Com: React.lazy(() => import('../C_goodsManage/C2files'))
+      },
+      // 待完善
+      {
+        id: 9801,
+        name: '资源使用',
+        path: '/wealth',
+        Com: React.lazy(() => import('../C_goodsManage/C21wealth'))
+      },
+      // 待完善
+      {
+        id: 9802,
+        name: '藏品编辑',
+        path: '/goodEdit',
+        Com: React.lazy(() => import('../C_goodsManage/C22goodEdit'))
+      },
+      {
+        id: 330,
+        name: '藏品关注',
+        path: '/focus',
+        Com: React.lazy(() => import('../C_goodsManage/C3focus'))
+      },
+      // 待完善v1.1.1去掉之前的模块
+      // {
+      //   id: 350,
+      //   name: '藏品登记',
+      //   path: '/register',
+      //   Com: React.lazy(() => import('../C_goodsManage/C5register'))
+      // },
+
+      // 待完善v1.1.1去掉之前的模块
+      // {
+      //   id: 360,
+      //   name: '藏品编辑',
+      //   path: '/edit',
+      //   Com: React.lazy(() => import('../C_goodsManage/C6edit'))
+      // },
 
+      {
+        id: 480,
+        name: '藏品注销',
+        path: '/cancel',
+        Com: React.lazy(() => import('../D_storeManage/D8cancel'))
+      }
+      // 待完善v1.1.1去掉之前的模块
+      // {
+      //   id: 370,
+      //   name: '藏品删除',
+      //   path: '/delete',
+      //   Com: React.lazy(() => import('../C_goodsManage/C7delete'))
+      // }
+    ]
+  },
   {
     id: 2,
     name: '入藏管理',
@@ -95,48 +169,7 @@ const tabLeftArr: RouterType = [
       }
     ]
   },
-  {
-    id: 3,
-    name: '藏品管理',
-    son: [
-      {
-        id: 320,
-        name: '藏品附件',
-        path: '/files',
-        Com: React.lazy(() => import('../C_goodsManage/C2files'))
-      },
-      {
-        id: 330,
-        name: '藏品关注',
-        path: '/focus',
-        Com: React.lazy(() => import('../C_goodsManage/C3focus'))
-      },
-      {
-        id: 350,
-        name: '藏品登记',
-        path: '/register',
-        Com: React.lazy(() => import('../C_goodsManage/C5register'))
-      },
-      {
-        id: 360,
-        name: '藏品编辑',
-        path: '/edit',
-        Com: React.lazy(() => import('../C_goodsManage/C6edit'))
-      },
-      {
-        id: 480,
-        name: '藏品注销',
-        path: '/cancel',
-        Com: React.lazy(() => import('../D_storeManage/D8cancel'))
-      },
-      {
-        id: 370,
-        name: '藏品删除',
-        path: '/delete',
-        Com: React.lazy(() => import('../C_goodsManage/C7delete'))
-      }
-    ]
-  },
+
   {
     id: 4,
     name: '库房管理',
@@ -215,15 +248,15 @@ const tabLeftArr: RouterType = [
       }
     ]
   },
-  // 待完善-展管理
+  // 待完善-展管理
   {
     id: 6,
-    name: '展管理',
+    name: '展管理',
     son: [
       {
         // 待完善
         id: 9800,
-        name: '展管理',
+        name: '展管理',
         path: '/exhibition',
         Com: React.lazy(() => import('../F_exhibition/F1exhibition'))
       }
@@ -319,18 +352,19 @@ export const routerSon: RouterTypeRow[] = [
     path: '/enterTibet_edit/:key/:id/:pageKey',
     Com: React.lazy(() => import('../B_enterTibet/B3_4page/B3edit'))
   },
-  {
-    id: 5,
-    name: '藏品 登记 新增-编辑/审批/查看',
-    path: '/register_edit/:key/:id/:pageKey',
-    Com: React.lazy(() => import('../B_enterTibet/B3_4page/B3edit'))
-  },
-  {
-    id: 6,
-    name: '藏品 删除 新增-编辑/审批/查看',
-    path: '/delete_edit/:key/:id/:pageKey',
-    Com: React.lazy(() => import('../B_enterTibet/B3_4page/B3edit'))
-  },
+  // 待完善v1.1.1去掉之前的模块
+  // {
+  //   id: 5,
+  //   name: '藏品 登记 新增-编辑/审批/查看',
+  //   path: '/register_edit/:key/:id/:pageKey',
+  //   Com: React.lazy(() => import('../B_enterTibet/B3_4page/B3edit'))
+  // },
+  // {
+  //   id: 6,
+  //   name: '藏品 删除 新增-编辑/审批/查看',
+  //   path: '/delete_edit/:key/:id/:pageKey',
+  //   Com: React.lazy(() => import('../B_enterTibet/B3_4page/B3edit'))
+  // },
 
   // -------------入库-----------------
   {
@@ -347,12 +381,13 @@ export const routerSon: RouterTypeRow[] = [
     Com: React.lazy(() => import('../D_storeManage/D6putsStor/D6edit'))
   },
   // ------------藏品编辑------------------
-  {
-    id: 9,
-    name: '藏品编辑-新增/编辑/审批/查看',
-    path: '/edit_add/:key/:id',
-    Com: React.lazy(() => import('../C_goodsManage/C6edit/C6add'))
-  },
+  // 待完善v1.1.1去掉之前的模块
+  // {
+  //   id: 9,
+  //   name: '藏品编辑-新增/编辑/审批/查看',
+  //   path: '/edit_add/:key/:id',
+  //   Com: React.lazy(() => import('../C_goodsManage/C6edit/C6add'))
+  // },
 
   // ------------藏品征集------------------
   {

+ 9 - 1
src/pages/Y_goodsDetails/Y1cathet/data.tsx

@@ -1,5 +1,6 @@
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
 import { resJiLianFu, textFu } from '@/utils/history'
+import { selectObj } from '@/utils/select'
 
 export type ArrKeyType = {
   name: string
@@ -138,6 +139,13 @@ export const Y11infoArr4: ArrKeyType = [
     }
   },
   {
+    name: '入藏去向',
+    key: 'accountType',
+    backFu: info => {
+      return (selectObj['入藏去向'].find(c => c.value === info.accountType) || {}).label || '(空)'
+    }
+  },
+  {
     name: '来源',
     key: 'source',
     backFu: info => {
@@ -147,7 +155,7 @@ export const Y11infoArr4: ArrKeyType = [
   { name: '来源详情', key: 'sourceInfo' },
   { name: '征集经过', key: 'sourcePass' },
   { name: '铭记题跋', key: 'sourcePreface' },
-  { name: '鉴藏印记', key: 'sourceStamp', full: true }
+  { name: '鉴藏印记', key: 'sourceStamp' }
 ]
 
 export const Y11infoArr5: ArrKeyType = [

+ 1 - 1
src/utils/select.ts

@@ -52,7 +52,7 @@ export const selectObj = {
     { value: '藏品管理', label: '藏品管理' },
     { value: '库存管理', label: '库存管理' },
     { value: '藏品保管', label: '藏品保管' },
-    { value: '展览管理', label: '展览管理' }
+    { value: '展品管理', label: '展品管理' }
   ],
   启用状态: [
     { value: 1, label: '启用' },