Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.0.115:3000/shaogen1995/qingDao_goods

lanxin 2 settimane fa
parent
commit
b18eb909bf

+ 1 - 8
src/pages/Benter/B2enterGuan/B2edit/index.tsx

@@ -31,14 +31,7 @@ function B2edit() {
           />
 
           {/* 底部按钮 */}
-          <EditBtn
-            path='/enterGuan'
-            APIobj={B2API_obj}
-            checkListTxt='藏品'
-            verifyBackFu={() => {
-              return { flag: true, txt: 'xsafasfas' }
-            }}
-          />
+          <EditBtn path='/enterGuan' APIobj={B2API_obj} checkListTxt='藏品' />
         </div>
       </div>
     </InfoProvider>

+ 4 - 0
src/pages/Benter/B4enterCang/B4edit/index.module.scss

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

+ 49 - 0
src/pages/Benter/B4enterCang/B4edit/index.tsx

@@ -0,0 +1,49 @@
+import React from 'react'
+import styles from './index.module.scss'
+import { rowArrTemp } from '@/pages/Zother/data'
+import { InfoProvider } from '@/pages/Zother/InfoContext'
+import EditTop from '@/pages/Zother/EditTop'
+import { B4_APIgetClueList, B4API_obj } from '@/store/action/Benter/B4enterCang'
+import EditBtn from '@/pages/Zother/EditBtn'
+import SonGoodsList from '@/pages/Zother/SonGoodsList'
+
+const rowArr = rowArrTemp('入藏')
+
+function B4edit() {
+  return (
+    <InfoProvider>
+      <div className={styles.B4edit} id='editBox'>
+        <div className='editMain'>
+          {/* 顶部 */}
+          <EditTop
+            pageTxt='藏品入藏'
+            rowArr={rowArr}
+            APIobj={B4API_obj}
+            fileUpInfo={{ myUrl: 'cms/order/hide/upload', dirCode: 'enterCang' }}
+          />
+
+          {/* 藏品清单 */}
+          <SonGoodsList
+            fileUpInfo={{ myUrl: 'cms/order/hide/son/upload', dirCode: 'enterCangGoods' }}
+            selectApi={B4_APIgetClueList}
+            // 这里其实不用传,为了类型更具体,先这样。咱不设置为可选参数
+            addGoodsApi=''
+            // 不是从线索中拿数据,是从已入馆中拿
+            isClueSelect={false}
+            // 选择藏品字符串
+            btnTxt='从已入馆藏品中添加'
+            // 没有新增和编辑
+            addShow={false}
+          />
+
+          {/* 底部按钮 */}
+          <EditBtn path='/enterCang' APIobj={B4API_obj} checkListTxt='藏品' />
+        </div>
+      </div>
+    </InfoProvider>
+  )
+}
+
+const MemoB4edit = React.memo(B4edit)
+
+export default MemoB4edit

+ 4 - 4
src/pages/Benter/B4enterCang/index.module.scss

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

+ 24 - 0
src/pages/Benter/B4enterCang/index.tsx

@@ -1,9 +1,33 @@
 import React from 'react'
 import styles from './index.module.scss'
+import { baseFormData, topSearch } from '@/pages/Zother/data'
+import { useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import TableList from '@/pages/Zother/TableList'
+import { B4_APIgetList } from '@/store/action/Benter/B4enterCang'
+import { baseTableC } from '@/utils/tableData'
+
+const search = topSearch('入藏')
+
+const baseFormDataRes = baseFormData()
+
 function B4enterCang() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.B4enterCang.tableInfo)
+
   return (
     <div className={styles.B4enterCang}>
       <div className='pageTitle'>藏品入藏</div>
+
+      <TableList
+        baseFormData={baseFormDataRes}
+        getListAPI={B4_APIgetList}
+        pageKey='enterCang'
+        tableInfo={tableInfo}
+        columnsTemp={baseTableC('入藏')}
+        yHeight={585}
+        searchDom={search}
+      />
     </div>
   )
 }

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

@@ -330,6 +330,12 @@ export const routerSon: RouterTypeRow[] = [
     Com: React.lazy(() => import('../Benter/B2enterGuan/B2edit'))
   },
   {
+    id: 240,
+    name: '藏品入藏-详情页',
+    path: '/enterCang_edit/:key/:id',
+    Com: React.lazy(() => import('../Benter/B4enterCang/B4edit'))
+  },
+  {
     id: 410,
     name: '藏品登记-详情页',
     path: '/register_edit/:key/:id',

+ 10 - 4
src/pages/Zother/AddClues/index.tsx

@@ -213,10 +213,16 @@ function AddClues({ closeFu, succFu, moduleId, info, fileUpInfo, isLook }: Props
 
             {/* 确定和取消按钮 */}
             <Form.Item className='ACbtnok'>
-              <Button type='primary' htmlType='submit'>
-                提交
-              </Button>
-              <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+              {isLook ? (
+                <Button onClick={closeFu}>关闭</Button>
+              ) : (
+                <>
+                  <Button type='primary' htmlType='submit'>
+                    提交
+                  </Button>
+                  <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+                </>
+              )}
             </Form.Item>
           </div>
         </Form>

+ 7 - 4
src/pages/Zother/EditBtn/index.tsx

@@ -20,7 +20,7 @@ type Props = {
   // 需要校验的字段和提示
   verifyArr?: { key: string; txt: string }[]
   // 其他需要校验的回调函数,返回 flag为true 表示校验不通过,txt为提示语
-  verifyBackFu?: () => { flag: true; txt: string }
+  verifyBackFu?: () => { flag: true; txt: string; info?: any }
 }
 
 function EditBtn({
@@ -95,7 +95,7 @@ function EditBtn({
           else goodIdArr.push(v.id)
 
           snapsArr.push({
-            goodsId: v.isNew || flag ? null : v.id,
+            goodId: v.isNew || flag ? null : v.id,
             id: v.id2 ? v.id2 : null,
             orderId: info.id,
             snap: JSON.stringify({
@@ -165,9 +165,8 @@ function EditBtn({
               MessageFu.warning(`请至少添加一个${checkListTxt}${txt}`)
               return
             } else if (['/register', '/enterGuan'].includes(path)) {
-              // 藏品登记/藏品入馆,需要校验
+              // 藏品登记/藏品入馆,需要校验 藏品登记号 为空 或者 重复
 
-              // 校验藏品登记号 为空 或者 重复
               // console.log('-----', snaps, obj)
               const flag = numFlag(snaps)
 
@@ -187,6 +186,10 @@ function EditBtn({
               MessageFu.warning(flagObj.txt + txt)
               return
             }
+            // 如果需要传递数据
+            if (flagObj.info) {
+              // 自己把数据加到obj里面 给后端
+            }
           }
 
           const res = await APIobj['发起'](obj)

+ 1 - 1
src/pages/Zother/EditTop/index.tsx

@@ -69,7 +69,7 @@ function EditTop({ rowArr, pageTxt, APIobj, fileUpInfo }: Props) {
         const arrTemp: any = []
         const snapsTemp = data.snaps || []
         snapsTemp.forEach((v: any, i: number) => {
-          snapsID2ref.current.push({ goodsId: v.goodsId, id: v.id })
+          snapsID2ref.current.push({ goodId: v.goodId, id: v.id })
 
           const obj = JSON.parse(v.snap || '{}')
 

+ 1 - 1
src/pages/Zother/InfoContext.tsx

@@ -2,7 +2,7 @@ import { createContext, ReactNode, useCallback, useContext, useMemo, useRef, use
 import { Typetable } from './data'
 import { GoodsType } from './SonGoodsList/data'
 
-export type SnapsID2refType = { goodsId: number; id: number }
+export type SnapsID2refType = { goodId: number; id: number }
 
 type InfoContextValue = {
   info: Typetable

+ 36 - 4
src/pages/Zother/SelectGoods/index.tsx

@@ -6,6 +6,8 @@ import { openLink } from '@/utils/history'
 import { MessageFu } from '@/utils/message'
 import MyTable from '@/components/MyTable'
 import MyPopconfirm from '@/components/MyPopconfirm'
+import AddClues from '../AddClues'
+import { FileUpInfoType } from '../data'
 
 type Props = {
   API_getList: any
@@ -15,6 +17,7 @@ type Props = {
   closeFu: () => void
   dataResFu: (data: GoodsType[]) => void
   oldCheckArr: GoodsType[]
+  myType?: '线索' | '藏品'
   // 单选
   isOne?: boolean
   //其他额外的参数
@@ -30,7 +33,8 @@ function SelectGoods({
   dataResFu,
   oldCheckArr,
   isOne,
-  canObj
+  canObj,
+  myType = '线索'
 }: Props) {
   const [formData, setFormData] = useState({ ...baseFormData })
   const formDataRef = useRef({ ...baseFormData })
@@ -124,20 +128,35 @@ function SelectGoods({
     ]
   }, [checkArr, checkFu, isOne])
 
+  // 打开线索弹窗-查看详情
+  const [clueInfo, setClueInfo] = useState({} as GoodsType)
+
   const tableLastBtn = useMemo(() => {
     return [
       {
         title: '操作',
         render: (item: GoodsType) => {
           return (
-            <Button size='small' type='text' onClick={() => openLink(`/goodsLook/${item.id}`)}>
+            <Button
+              size='small'
+              type='text'
+              onClick={() => {
+                if (myType === '线索') {
+                  // 打开线索查看弹窗
+                  setClueInfo(item)
+                } else {
+                  // 新页面打开藏品详情
+                  openLink(`/goodsLook/${item.id}`)
+                }
+              }}
+            >
               查看
             </Button>
           )
         }
       }
     ]
-  }, [])
+  }, [myType])
 
   // 点击提交
   const btnOk = useCallback(() => {
@@ -159,6 +178,7 @@ function SelectGoods({
                 placeholder={item.name}
                 maxLength={30}
                 showCount
+                style={{ width: item.width || '' }}
               />
             ) : item.type === 'Select' ? (
               <Select
@@ -192,7 +212,7 @@ function SelectGoods({
       open={true}
       title={
         <div className='sgtit'>
-          <div>选择藏品</div> <div>已选中 {resNum} 条</div>
+          <div>选择{myType}</div> <div>已选中 {resNum} 条</div>
         </div>
       }
       footer={[]}
@@ -228,6 +248,18 @@ function SelectGoods({
           <MyPopconfirm txtK='取消' onConfirm={closeFu} />
         </div>
       </div>
+
+      {/* 线索查看详情 */}
+      {clueInfo.id ? (
+        <AddClues
+          info={clueInfo}
+          closeFu={() => setClueInfo({} as GoodsType)}
+          succFu={() => {}}
+          moduleId={0}
+          fileUpInfo={{} as FileUpInfoType}
+          isLook={true}
+        />
+      ) : null}
     </Modal>
   )
 }

+ 1 - 1
src/pages/Zother/SonClueList/index.tsx

@@ -115,7 +115,7 @@ function SonClueList({ fileUpInfo }: Props) {
           moduleId={info.id}
           succFu={(val: '新增' | '编辑', info: GoodsType) => {
             let objTemp = { ...info }
-            const id2Obj = snapsID2ref.current.find(c => c.goodsId === objTemp.id)
+            const id2Obj = snapsID2ref.current.find(c => c.goodId === objTemp.id)
             if (id2Obj) objTemp.id2 = id2Obj.id
             if (val === '新增') {
               // 是新增

+ 63 - 1
src/pages/Zother/SonGoodsList/data.ts

@@ -1,3 +1,4 @@
+import store from '@/store'
 import { getDictFu, selectObj } from '@/utils/dataChange'
 
 // 藏品类型
@@ -65,11 +66,12 @@ export type GoodsType = {
   clueId: number
 }
 
-// 藏品征集选择
+// 选择线索-----------------
 export const sgBaseFormData = {
   pageNum: 1,
   pageSize: 99999,
 
+  searchKey: '',
   typeDictId: '',
   ageDictId: '',
   tornLevel: ''
@@ -100,3 +102,63 @@ export const sgTopSelectDom = [
     options: selectObj['完残程度']
   }
 ]
+
+// 选择藏品-----------------------
+export const sgBaseFormDataGood = {
+  pageNum: 1,
+  pageSize: 99999,
+
+  searchKey: '',
+  tagIds: '',
+  level: '',
+  typeDictId: '',
+  ageDictId: '',
+  textureDictId: '',
+  tornLevel: ''
+}
+
+export const sgTopSelectDomGood = [
+  {
+    name: '搜索藏品登记号、藏品名称',
+    key: 'searchKey',
+    type: 'Input',
+    width: 240
+  },
+  {
+    name: '搜索藏品标签',
+    key: 'tagIds',
+    type: 'Cascader',
+    options: store.getState().E1tag.treeData
+  },
+  {
+    name: '级别',
+    key: 'level',
+    type: 'Select',
+    options: selectObj['藏品级别']
+  },
+
+  {
+    name: '类别',
+    key: 'typeDictId',
+    type: 'Cascader',
+    options: getDictFu('藏品类别')
+  },
+  {
+    name: '年代',
+    key: 'ageDictId',
+    type: 'Cascader',
+    options: getDictFu('藏品年代')
+  },
+  {
+    name: '质地',
+    key: 'textureDictId',
+    type: 'Cascader',
+    options: getDictFu('质地')
+  },
+  {
+    name: '完残程度',
+    key: 'tornLevel',
+    type: 'Select',
+    options: selectObj['完残程度']
+  }
+]

+ 78 - 37
src/pages/Zother/SonGoodsList/index.tsx

@@ -5,12 +5,19 @@ import MyTable from '@/components/MyTable'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import AddGoods from '../AddGoods'
 import { useInfo } from '../InfoContext'
-import { GoodsType, sgBaseFormData, sgTopSelectDom } from './data'
+import {
+  GoodsType,
+  sgBaseFormData,
+  sgBaseFormDataGood,
+  sgTopSelectDom,
+  sgTopSelectDomGood
+} from './data'
 import { goodsSelectCuleC, goodsSonTableC } from '@/utils/tableData'
 import { useParams } from 'react-router-dom'
 import { openLink } from '@/utils/history'
 import { FileUpInfoType } from '../data'
 import SelectGoods from '../SelectGoods'
+import AddClues from '../AddClues'
 
 type Props = {
   // 上传附件的信息
@@ -21,9 +28,20 @@ type Props = {
   addGoodsApi: any
   // 需要从征集里面选择数据(现在是藏品登记/藏品入馆 需要 藏品入藏不需要)
   isClueSelect: boolean
+  // 选择藏品的按钮字符串
+  btnTxt?: string
+  // 是否有新增和编辑可以操作藏品,默认true
+  addShow?: boolean
 }
 
-function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Props) {
+function SonGoodsList({
+  fileUpInfo,
+  selectApi,
+  addGoodsApi,
+  isClueSelect,
+  btnTxt,
+  addShow = true
+}: Props) {
   const { info, snaps, setSnapsFu, delSnapIdsRef, snapsID2ref } = useInfo()
 
   const { key } = useParams<any>()
@@ -35,37 +53,45 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
 
   const [openInfo, setOpenInfo] = useState({} as GoodsType)
 
+  // 打开线索弹窗-查看详情
+  const [clueInfo, setClueInfo] = useState({} as GoodsType)
+
   const tableLastBtn = useMemo(() => {
     return [
       {
         title: '操作',
-        render: (item: GoodsType) => (
-          <>
-            {isLook ? (
-              <Button size='small' type='text' onClick={() => openLink(`/goodsLook/${item.id}`)}>
-                查看
-              </Button>
-            ) : (
-              <>
-                <Button size='small' type='text' onClick={() => setOpenInfo(item)}>
-                  编辑
+        render: (item: GoodsType) => {
+          return (
+            <>
+              {isLook ? (
+                <Button size='small' type='text' onClick={() => openLink(`/goodsLook/${item.id}`)}>
+                  查看
                 </Button>
-                <MyPopconfirm
-                  txtK='删除'
-                  onConfirm={() => {
-                    if (item.id2 && !delSnapIdsRef.current.includes(item.id2)) {
-                      delSnapIdsRef.current.push(item.id2)
-                    }
-                    setSnapsFu(snaps.filter(v => v.id !== item.id))
-                  }}
-                />
-              </>
-            )}
-          </>
-        )
+              ) : (
+                <>
+                  {addShow ? (
+                    <Button size='small' type='text' onClick={() => setOpenInfo(item)}>
+                      编辑
+                    </Button>
+                  ) : null}
+
+                  <MyPopconfirm
+                    txtK='删除'
+                    onConfirm={() => {
+                      if (item.id2 && !delSnapIdsRef.current.includes(item.id2)) {
+                        delSnapIdsRef.current.push(item.id2)
+                      }
+                      setSnapsFu(snaps.filter(v => v.id !== item.id))
+                    }}
+                  />
+                </>
+              )}
+            </>
+          )
+        }
       }
     ]
-  }, [delSnapIdsRef, isLook, setSnapsFu, snaps])
+  }, [addShow, delSnapIdsRef, isLook, setSnapsFu, snaps])
 
   // 从征集线索中添加
   const [clueShow, setClueShow] = useState(false)
@@ -79,11 +105,13 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
         ) : (
           <div>
             <Button type='primary' onClick={() => setClueShow(true)}>
-              从征集线索中添加
-            </Button>
-            <Button type='primary' onClick={() => setOpenInfo({ id: -1 } as GoodsType)}>
-              新增
+              {btnTxt ? btnTxt : '从征集线索中添加'}
             </Button>
+            {addShow ? (
+              <Button type='primary' onClick={() => setOpenInfo({ id: -1 } as GoodsType)}>
+                新增
+              </Button>
+            ) : null}
           </div>
         )}
       </div>
@@ -91,7 +119,7 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
         <MyTable
           classKey='SonGoodsList'
           list={snaps}
-          columnsTemp={goodsSonTableC}
+          columnsTemp={goodsSonTableC()}
           lastBtn={tableLastBtn}
           pagingInfo={false}
         />
@@ -106,7 +134,7 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
           moduleId={info.id}
           succFu={(val: '新增' | '编辑', info: GoodsType) => {
             let objTemp = { ...info }
-            const id2Obj = snapsID2ref.current.find(c => c.goodsId === objTemp.id)
+            const id2Obj = snapsID2ref.current.find(c => c.goodId === objTemp.id)
             if (id2Obj) objTemp.id2 = id2Obj.id
             if (val === '新增') {
               // 是新增
@@ -126,10 +154,11 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
       {/* 从藏品征集中添加 */}
       {clueShow ? (
         <SelectGoods
+          myType={isClueSelect ? '线索' : '藏品'}
           API_getList={selectApi}
-          baseFormData={sgBaseFormData}
-          topSelectDom={sgTopSelectDom}
-          columnsTemp={goodsSelectCuleC}
+          baseFormData={isClueSelect ? sgBaseFormData : sgBaseFormDataGood}
+          topSelectDom={isClueSelect ? sgTopSelectDom : sgTopSelectDomGood}
+          columnsTemp={isClueSelect ? goodsSelectCuleC : goodsSonTableC(true)}
           closeFu={() => setClueShow(false)}
           oldCheckArr={snaps}
           dataResFu={data => {
@@ -146,8 +175,8 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
                 v.pageType = 'clue'
               }
 
-              // id2表示的是自己这条数据的id id才是goodsId
-              const obj = snapsID2ref.current.find(c => c.goodsId === v.id)
+              // id2表示的是自己这条数据的id id才是goodId
+              const obj = snapsID2ref.current.find(c => c.goodId === v.id)
 
               if (obj) v.id2 = obj.id
             })
@@ -156,6 +185,18 @@ function SonGoodsList({ fileUpInfo, selectApi, addGoodsApi, isClueSelect }: Prop
           }}
         />
       ) : null}
+
+      {/* 线索查看详情 */}
+      {clueInfo.id ? (
+        <AddClues
+          info={clueInfo}
+          closeFu={() => setClueInfo({} as GoodsType)}
+          succFu={() => {}}
+          moduleId={0}
+          fileUpInfo={{} as FileUpInfoType}
+          isLook={true}
+        />
+      ) : null}
     </div>
   )
 }

+ 8 - 6
src/pages/Zother/data.ts

@@ -29,12 +29,14 @@ export const baseFormData = (can?: { [x: string]: string }) => {
 
 // 顶部筛选
 export const topSearch = (txt: string, can?: { [x: number]: string | string[] }) => {
-  const txtObj = {
-    征集: '或线索名称',
-    登记: '、藏品编号或名称',
-    入馆: '、藏品编号或名称'
-  }
-  const txt2Res = Reflect.get(txtObj, txt)
+  // const txtObj = {
+  //   征集: '或线索名称',
+  //   登记: '、藏品编号或名称',
+  //   入馆: '、藏品编号或名称'
+  // }
+  // const txt2Res = Reflect.get(txtObj, txt)
+
+  const txt2Res = txt === '征集' ? '或线索名称' : '、藏品编号或名称'
 
   const canArr = [
     ['businessStartTime', 'businessEndTime'],

+ 38 - 0
src/store/action/Benter/B4enterCang.ts

@@ -0,0 +1,38 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+import { APIbase } from '../layout'
+
+/**
+ * 藏品入藏 -获取分页列表
+ */
+export const B4_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/order/hide/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'B4/getList', payload: obj })
+    }
+  }
+}
+
+/**
+ * 藏品入藏-已入馆藏品列表-分页
+ */
+export const B4_APIgetClueList = (data: any) => {
+  return http.post('cms/order/hide/house/getList', data)
+}
+
+export const B4API_obj = {
+  创建订单: () => APIbase('get', 'cms/order/hide/create'),
+  获取详情: (id: number) => APIbase('get', `cms/order/hide/detail/${id}`),
+  草稿: (data: any) => APIbase('post', `cms/order/hide/saveDraft`, data),
+  发起: (data: any) => APIbase('post', `cms/order/hide/saveApply`, data),
+  重新发起: (id: number) => APIbase('get', `cms/order/hide/reissue/${id}`),
+  审批: (data: any) => APIbase('post', `cms/order/hide/audit`, data),
+  撤回: (id: number) => APIbase('get', `cms/order/hide/revocation/${id}`),
+  删除: (id: number) => APIbase('get', `cms/order/hide/remove/${id}`)
+}

+ 28 - 0
src/store/reducer/Benter/B4enterCang.ts

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

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

@@ -5,6 +5,7 @@ import { combineReducers } from 'redux'
 import A0Layout from './layout'
 import B1collect from './Benter/B1collect'
 import B2enterGuan from './Benter/B2enterGuan'
+import B4enterCang from './Benter/B4enterCang'
 import D1register from './Dmanage/D1register'
 import E1tag from './Eculture/E1tag'
 import E2story from './Eculture/E2story'
@@ -22,6 +23,7 @@ const rootReducer = combineReducers({
   A0Layout,
   B1collect,
   B2enterGuan,
+  B4enterCang,
   D1register,
   E1tag,
   E2story,

+ 18 - 14
src/utils/tableData.ts

@@ -40,21 +40,25 @@ export const SonClueListTableC = [
   ['text', '备注', 'remark', 50]
 ]
 
-// 藏品登记-订单页面的藏品清单
-export const goodsSonTableC = [
-  ['txt', '藏品登记号', 'num'],
-  ['img', '封面', 'thumb'],
-  ['txtCTag', '藏品标签', 'tagDictId'],
-  ['txt', '藏品名称', 'name'],
-  ['select', '级别', 'level', selectObj['藏品级别']],
-  ['txtC', '类别', 'typeDictId'],
-  ['txtC', '年代', 'ageDictId'],
-  ['txtC', '质地', 'textureDictId'],
-  ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
-  ['ping', '数量', 'pcs', 'pcsUnitDictId']
-]
+// 藏品登记-订单页面的藏品清单 、-----选择藏品-藏品
+export const goodsSonTableC = (loc?: boolean) => {
+  const arr: any = [
+    ['txt', '藏品登记号', 'num'],
+    ['img', '封面', 'thumb'],
+    ['txtCTag', '藏品标签', 'tagDictId'],
+    ['txt', '藏品名称', 'name'],
+    ['select', '级别', 'level', selectObj['藏品级别']],
+    ['txtC', '类别', 'typeDictId'],
+    ['txtC', '年代', 'ageDictId'],
+    ['txtC', '质地', 'textureDictId'],
+    ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
+    ['ping', '数量', 'pcs', 'pcsUnitDictId']
+  ]
+  if (loc) arr.push(['txt', '库房位置', '待完善sg'])
+  return arr
+}
 
-// 藏品登记-里面选择藏品征集列表
+// -----选择藏品-线索
 export const goodsSelectCuleC = [
   ['txt', '线索编号', 'num'],
   ['img', '封面', 'thumb'],