shaogen1995 4 달 전
부모
커밋
88d83d3792
28개의 변경된 파일914개의 추가작업 그리고 526개의 파일을 삭제
  1. 13 6
      src/pages/B_enterTibet/B3_4page/type.d.ts
  2. 1 1
      src/pages/B_enterTibet/B3flowTable/index.tsx
  3. 15 28
      src/pages/B_enterTibet/B3goodsTable/B3GaddNew/index.tsx
  4. 3 16
      src/pages/B_enterTibet/B3goodsTable/B3GaddNow/index.tsx
  5. 51 58
      src/pages/C_goodsManage/C1ledger/data.ts
  6. 142 90
      src/pages/C_goodsManage/C1ledger/index.tsx
  7. 27 21
      src/pages/C_goodsManage/C1ledger/type.d.ts
  8. 4 4
      src/pages/C_goodsManage/C2files/data.ts
  9. 2 2
      src/pages/C_goodsManage/C2files/type.d.ts
  10. 1 1
      src/pages/C_goodsManage/C8recycleBin/index.tsx
  11. 1 1
      src/pages/D_storeManage/D1storage/D1goods/index.tsx
  12. 21 16
      src/pages/D_storeManage/D4impStor/D4edit/index.tsx
  13. 0 5
      src/pages/D_storeManage/D6putsStor/D6edit/index.module.scss
  14. 388 173
      src/pages/D_storeManage/D6putsStor/D6edit/index.tsx
  15. 21 0
      src/pages/D_storeManage/D6putsStor/D6impRelation/index.module.scss
  16. 44 0
      src/pages/D_storeManage/D6putsStor/D6impRelation/index.tsx
  17. 3 2
      src/pages/D_storeManage/D6putsStor/index.tsx
  18. 4 0
      src/pages/F_exhibition/F1exhibition/index.module.scss
  19. 14 0
      src/pages/F_exhibition/F1exhibition/index.tsx
  20. 54 42
      src/pages/Layout/data.ts
  21. 3 1
      src/pages/Layout/index.tsx
  22. 3 16
      src/pages/Y_goodsDetails/Y2look/Y33setType.tsx
  23. 21 3
      src/store/action/C1ledger.ts
  24. 28 0
      src/store/reducer/C1ledger.ts
  25. 2 0
      src/store/reducer/index.ts
  26. 27 15
      src/utils/history.ts
  27. 2 2
      src/utils/http.ts
  28. 19 23
      src/utils/tableData.ts

+ 13 - 6
src/pages/B_enterTibet/B3_4page/type.d.ts

@@ -13,7 +13,6 @@ export type TypeB3Form = {
 
 export type TypeB3PageSta = '新增' | '编辑' | '查看' | '审批'
 
-// 待完善
 export type FourTableType = {
   audits: B3flowTableType[]
   authInfoRtf: string
@@ -21,14 +20,10 @@ export type FourTableType = {
   authUnit: string
   authUser: string
   collectIds: string
-  // collects?: any
   createTime: string
   creatorId: number
   creatorName: string
-  // currentProcessId?: any
   date: string
-  // dateEnd?: any
-  // dateStart?: any
   deptName: string
   fileIds: string
   files: FileImgListType[]
@@ -42,10 +37,18 @@ export type FourTableType = {
   rtf: string
   sonTypeName: string
   status: number
-  // storageRelatedId?: any
+  thumb: string
+  thumbPc: string
   type: string
   typeName: string
   updateTime: string
+  dictType: string
+  dictAge: string
+  dictTexture3: string
+  dictTorn: string
+  source: string
+  statusCollect: string
+  statusStorage: string
   // 历史审核人
   auditUserIds: string
   // 抄送人
@@ -66,4 +69,8 @@ export type FourTableType = {
   // ---------------出库有的
   // 是否需要归还
   isReturn: 0 | 1
+  // 预计归还日期
+  returnDate: string
+  // 相关出库单
+  relatedOrder: FourTableType[]
 }

+ 1 - 1
src/pages/B_enterTibet/B3flowTable/index.tsx

@@ -47,7 +47,7 @@ function B3flowTable({ tableArr }: Props) {
   const [look, setLook] = useState('')
 
   return (
-    <div className={styles.B3flowTable}>
+    <div className={styles.B3flowTable} hidden={tableArr.length === 0}>
       <div className='B3Ftop'>申请流程</div>
 
       {/* 表格 */}

+ 15 - 28
src/pages/B_enterTibet/B3goodsTable/B3GaddNew/index.tsx

@@ -22,9 +22,6 @@ import YtableVideo from '@/components/YtableVideo'
 import { selectObj } from '@/utils/select'
 import dayjs from 'dayjs'
 import { getTokenInfo } from '@/utils/storage'
-import { useSelector } from 'react-redux'
-import { RootState } from '@/store'
-import { cascaderArr } from './data'
 import Z3upFiles from '@/components/Z3upFiles'
 import { GoodFileType } from './type'
 import { baseURL } from '@/utils/http'
@@ -33,6 +30,7 @@ import { API_C2dels } from '@/store/action/C2files'
 import { API_goodsAdd, API_goodsInfo } from '@/store/action/C1ledger'
 import { C1GoodType } from '@/pages/C_goodsManage/C1ledger/type'
 import { MessageFu } from '@/utils/message'
+import { cascaderObjFu } from '@/utils/history'
 
 // 级联的数据转换成字符串
 const cascaderChArr = [
@@ -58,8 +56,6 @@ type Props = {
 }
 
 function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
-  const { dictAll } = useSelector((state: RootState) => state.Z1dict)
-
   // 制档日期 / 制档人
   const [txtArr, setTxtArr] = useState([getTokenInfo().user.realName, dayjs().format('YYYY-MM-DD')])
 
@@ -104,15 +100,6 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
     }
   }, [getInfo, nowSta.id])
 
-  // 所有级联的数据平铺
-  const cascaderObj = useMemo(() => {
-    let obj: any = {}
-    if (dictAll && dictAll.length) {
-      obj = cascaderArr(dictAll)
-    }
-    return obj
-  }, [dictAll])
-
   // 设置表单ref
   const FormBoxRef = useRef<FormInstance>(null)
 
@@ -183,7 +170,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
         title: '附件用途',
         render: (item: GoodFileType) => (
           <Cascader
-            options={cascaderObj['附件用途']}
+            options={cascaderObjFu()['附件用途']}
             value={item.effect ? item.effect.split(',') : []}
             onChange={e => tableFu('effect', item.id, e ? e.join(',') : '')}
             placeholder='请选择'
@@ -192,7 +179,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
         )
       }
     ]
-  }, [cascaderObj, tableFu])
+  }, [tableFu])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -370,7 +357,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 rules={[{ required: true, message: '请选择文物类别' }]}
               >
                 <Cascader
-                  options={cascaderObj['文物类别']}
+                  options={cascaderObjFu()['文物类别']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}
@@ -384,7 +371,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 rules={[{ required: true, message: '请选择年代' }]}
               >
                 <Cascader
-                  options={[...cascaderObj['年代'], { name: '其他', id: '其他' }]}
+                  options={[...cascaderObjFu()['年代'], { name: '其他', id: '其他' }]}
                   onChange={value => setAgeAc(value[0] === '其他')}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
@@ -431,7 +418,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
 
               <Form.Item name='pcsUnit' rules={[{ required: true, message: '请选择单位' }]}>
                 <Cascader
-                  options={cascaderObj['数量单位']}
+                  options={cascaderObjFu()['数量单位']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}
@@ -454,21 +441,21 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 name='dictTexture1'
               >
                 <Cascader
-                  options={cascaderObj['质地']}
+                  options={cascaderObjFu()['质地']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                 />
               </Form.Item>
               <Form.Item name='dictTexture2'>
                 <Cascader
-                  options={cascaderObj['复合或组合质地']}
+                  options={cascaderObjFu()['复合或组合质地']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                 />
               </Form.Item>
               <Form.Item name='dictTexture3' rules={[{ required: true, message: '请选择质地3' }]}>
                 <Cascader
-                  options={cascaderObj['单一质地']}
+                  options={cascaderObjFu()['单一质地']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}
@@ -482,7 +469,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                   rules={[{ required: true, message: '请选择完残程度' }]}
                 >
                   <Cascader
-                    options={cascaderObj['完残程度']}
+                    options={cascaderObjFu()['完残程度']}
                     placeholder='请选择'
                     fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                     allowClear={false}
@@ -632,7 +619,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
 
                 <Form.Item name='sizeUnit'>
                   <Cascader
-                    options={cascaderObj['尺寸单位']}
+                    options={cascaderObjFu()['尺寸单位']}
                     placeholder='请选择'
                     fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   />
@@ -647,7 +634,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 rules={[{ required: true, message: '请选择质量范围' }]}
               >
                 <Cascader
-                  options={cascaderObj['质量范围']}
+                  options={cascaderObjFu()['质量范围']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}
@@ -666,7 +653,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
 
                 <Form.Item name='qualityUnit'>
                   <Cascader
-                    options={cascaderObj['质量单位']}
+                    options={cascaderObjFu()['质量单位']}
                     placeholder='请选择'
                     fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   />
@@ -709,7 +696,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 rules={[{ required: true, message: '请选择入藏日期范围' }]}
               >
                 <Cascader
-                  options={cascaderObj['入藏日期范围']}
+                  options={cascaderObjFu()['入藏日期范围']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}
@@ -724,7 +711,7 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
                 rules={[{ required: true, message: '请选择来源' }]}
               >
                 <Cascader
-                  options={cascaderObj['来源']}
+                  options={cascaderObjFu()['来源']}
                   placeholder='请选择'
                   fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                   allowClear={false}

+ 3 - 16
src/pages/B_enterTibet/B3goodsTable/B3GaddNow/index.tsx

@@ -4,14 +4,11 @@ import { Button, Cascader, Checkbox, Input, Modal, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import MyTable from '@/components/MyTable'
 import { B3eTableC } from '@/utils/tableData'
-import { openGoodsInfoFu } from '@/utils/history'
+import { cascaderObjFu, openGoodsInfoFu } from '@/utils/history'
 import { MessageFu } from '@/utils/message'
 import { C1GoodType } from '@/pages/C_goodsManage/C1ledger/type'
 import { API_goodsNowAdd } from '@/store/action/C1ledger'
 import { selectObj } from '@/utils/select'
-import { useSelector } from 'react-redux'
-import { RootState } from '@/store'
-import { cascaderArr } from '../B3GaddNew/data'
 import { B3nowSearchType } from './type'
 import { B3baseFormData, B3nowArr1, B3nowArr2 } from './data'
 
@@ -154,16 +151,6 @@ function B3GaddNow({ nowSta, closeFu, isOne = false, dataResFu, oldCheckArr, can
     ]
   }, [])
 
-  // 所有级联的数据平铺
-  const { dictAll } = useSelector((state: RootState) => state.Z1dict)
-  const cascaderObj = useMemo(() => {
-    let obj: any = {}
-    if (dictAll && dictAll.length) {
-      obj = cascaderArr(dictAll)
-    }
-    return obj
-  }, [dictAll])
-
   // 点击提交
   const btnOk = useCallback(() => {
     dataResFu(checkArr)
@@ -200,7 +187,7 @@ function B3GaddNow({ nowSta, closeFu, isOne = false, dataResFu, oldCheckArr, can
               />
             ) : (
               <Cascader
-                options={cascaderObj[item.nameKey || item.name]}
+                options={cascaderObjFu()[item.nameKey || item.name]}
                 placeholder='全部'
                 fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                 allowClear={true}
@@ -212,7 +199,7 @@ function B3GaddNow({ nowSta, closeFu, isOne = false, dataResFu, oldCheckArr, can
         )
       })
     },
-    [RuChangSelect, cascaderObj, formData]
+    [RuChangSelect, formData]
   )
 
   return (

+ 51 - 58
src/pages/C_goodsManage/C1ledger/data.ts

@@ -1,30 +1,31 @@
-import { C1InputKeyType, TYpeC1Form, TYpeC1Form1, TYpeC1Form2 } from './type'
+import { selectObj } from '@/utils/select'
+import { C1DomArrType, TYpeC1Form, TYpeC1Form1, TYpeC1Form2 } from './type'
+import { cascaderObjFu } from '@/utils/history'
 
 export const C1baseFormData1: TYpeC1Form1 = {
-  aaaa: '',
-  bbbb: '',
-  cccc: '',
-  dddd: '',
-  eeee: '',
-  ffff: '',
-  gggg: '',
-  hhhh: '',
-  iiii: '',
-  jjjj: '',
-  kkkk: ''
+  numName: '藏品总登记号',
+  num: '',
+  name: '',
+  dictLevel: '',
+  dictType: '',
+  dictAge: '',
+  dictTexture3: '',
+  dictTorn: '',
+  source: '',
+  statusCollect: '',
+  statusStorage: ''
 }
 
 export const C1baseFormData2: TYpeC1Form2 = {
-  llll: '',
-  mmmm: '',
-  nnnn: '',
-  oooo: '',
-  pppp: '',
-  qqqq: '',
-  rrrr: '',
-  ssss: '',
-  tttt: '',
-  uuuu: ''
+  numType: '',
+  userName: '',
+  qualityDictScope: '',
+  inDictDateScope: '',
+  sourcePass: '',
+  sourcePreface: '',
+  sourceStamp: '',
+  historyWork: '',
+  historyUndergo: ''
 }
 
 export const C1baseFormData: TYpeC1Form = {
@@ -36,44 +37,36 @@ export const C1baseFormData: TYpeC1Form = {
   ...C1baseFormData2
 }
 
-export const C1InputKeyArr1: {
-  name: string
-  key: C1InputKeyType
-  type: '输入框' | '下拉框' | '级联'
-}[] = [
-  { name: '编号类型', key: 'aaaa', type: '下拉框' },
-  { name: '藏品编号', key: 'bbbb', type: '输入框' },
-  { name: '藏品名称', key: 'cccc', type: '输入框' },
-  { name: '文物级别', key: 'dddd', type: '级联' },
-  { name: '文物类别', key: 'eeee', type: '级联' },
-  { name: '年代', key: 'ffff', type: '级联' },
-  { name: '质地', key: 'gggg', type: '级联' },
-  { name: '完残程度', key: 'hhhh', type: '级联' },
-  { name: '来源', key: 'iiii', type: '级联' },
-  { name: '入藏状态', key: 'jjjj', type: '下拉框' },
-  { name: '库存状态', key: 'kkkk', type: '下拉框' }
+export const C1InputKeyArr1: C1DomArrType = [
+  { name: '编号类型', key: 'numName', type: '下拉框', data: selectObj['藏品编号类型'] },
+  { name: '藏品编号', key: 'num', type: '输入框' },
+  { name: '藏品名称', key: 'name', type: '输入框' },
+  { name: '文物级别', key: 'dictLevel', type: '下拉框', data: selectObj['文物级别'] },
+  { name: '文物类别', key: 'dictType', type: '级联', data: cascaderObjFu()['文物类别'] },
+  { name: '年代', key: 'dictAge', type: '级联', data: cascaderObjFu()['年代'] },
+  { name: '质地', key: 'dictTexture3', type: '级联', data: cascaderObjFu()['单一质地'] },
+  { name: '完残程度', key: 'dictTorn', type: '级联', data: cascaderObjFu()['完残程度'] },
+  { name: '来源', key: 'source', type: '级联', data: cascaderObjFu()['来源'] },
+  { name: '入藏状态', key: 'statusCollect', type: '下拉框', data: selectObj['入藏状态'] },
+  { name: '库存状态', key: 'statusStorage', type: '下拉框', data: selectObj['库存状态'] }
 ]
 
-export const C1InputKeyArr2: {
-  name: string
-  key: C1InputKeyType
-  type: '输入框' | '下拉框' | '级联'
-}[] = [
-  { name: '分类号', key: 'llll', type: '输入框' },
-  { name: '档案编号', key: 'mmmm', type: '输入框' },
-  { name: '制档人', key: 'nnnn', type: '输入框' },
-  { name: '质量范围', key: 'oooo', type: '级联' },
-  { name: '入藏日期范围', key: 'pppp', type: '级联' }
+export const C1InputKeyArr2: C1DomArrType = [
+  { name: '分类号', key: 'numType', type: '输入框' },
+  { name: '制档人', key: 'userName', type: '输入框' },
+  { name: '质量范围', key: 'qualityDictScope', type: '级联', data: cascaderObjFu()['质量范围'] },
+  {
+    name: '入藏日期范围',
+    key: 'inDictDateScope',
+    type: '级联',
+    data: cascaderObjFu()['入藏日期范围']
+  },
+  { name: '征集经过', key: 'sourcePass', type: '输入框' }
 ]
 
-export const C1InputKeyArr3: {
-  name: string
-  key: C1InputKeyType
-  type: '输入框' | '下拉框' | '级联'
-}[] = [
-  { name: '征集经过', key: 'qqqq', type: '输入框' },
-  { name: '铭记题跋', key: 'rrrr', type: '输入框' },
-  { name: '鉴藏印记', key: 'ssss', type: '输入框' },
-  { name: '著作书目', key: 'tttt', type: '输入框' },
-  { name: '流转经历', key: 'uuuu', type: '输入框' }
+export const C1InputKeyArr3: C1DomArrType = [
+  { name: '铭记题跋', key: 'sourcePreface', type: '输入框' },
+  { name: '鉴藏印记', key: 'sourceStamp', type: '输入框' },
+  { name: '著作书目', key: 'historyWork', type: '输入框' },
+  { name: '流转经历', key: 'historyUndergo', type: '输入框' }
 ]

+ 142 - 90
src/pages/C_goodsManage/C1ledger/index.tsx

@@ -9,15 +9,25 @@ import {
   C1baseFormData2
 } from './data'
 import { C1InputKeyType } from './type'
-import history, { openGoodsInfoFu } from '@/utils/history'
+import history, { openGoodsInfoFu, resJiLianFu } from '@/utils/history'
 import MyTable from '@/components/MyTable'
-import { C1tableC } from '@/utils/tableData'
+import { C1tableC, statusCollectObj, statusStorageObj } from '@/utils/tableData'
 import classNames from 'classnames'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
+import { useDispatch, useSelector } from 'react-redux'
+import { C1_APIgetList } from '@/store/action/C1ledger'
+import { RootState } from '@/store'
+import dayjs from 'dayjs'
+import { MessageFu } from '@/utils/message'
+import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
+import ExportJsonExcel from 'js-export-excel'
 
 function C1ledger() {
+  const dispatch = useDispatch()
+
   const [formData, setFormData] = useState(C1baseFormData)
   const formDataRef = useRef(C1baseFormData)
+  const formDataOldRef = useRef(C1baseFormData)
 
   useEffect(() => {
     formDataRef.current = formData
@@ -36,8 +46,9 @@ function C1ledger() {
 
   // 封装发送请求的函数
   const getListFu = useCallback(() => {
-    console.log('发送请求', formDataRef.current)
-  }, [])
+    formDataOldRef.current = { ...formDataRef.current }
+    dispatch(C1_APIgetList(formDataRef.current))
+  }, [dispatch])
 
   useEffect(() => {
     getListFu()
@@ -72,7 +83,6 @@ function C1ledger() {
     },
     [formData]
   )
-  // 待完善 各种参数 接口
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -89,6 +99,9 @@ function C1ledger() {
     ]
   }, [])
 
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.C1ledger.tableInfo)
+
   // 高级搜索的切换
   const [advanced, setAdvanced] = useState(false)
 
@@ -110,7 +123,7 @@ function C1ledger() {
     return [
       {
         title: '藏品编号',
-        render: (item: any) => {
+        render: (item: FourTableType) => {
           return (
             <span
               onClick={() => setCathet(item.id)}
@@ -124,70 +137,132 @@ function C1ledger() {
     ]
   }, [cathet])
 
+  // 顶部筛选
+  const searchDom = useCallback(
+    (arr: any[]) => {
+      return arr.map(item => {
+        return (
+          <div key={item.name}>
+            <span>{item.name}:</span>
+            {item.type === '输入框' ? (
+              <Input
+                placeholder='请输入'
+                maxLength={30}
+                value={formData[item.key as 'num']}
+                onChange={e => txtChangeFu(e.target.value, item.key)}
+              />
+            ) : item.type === '下拉框' ? (
+              <Select
+                options={item.data}
+                placeholder='全部'
+                allowClear={true}
+                value={formData[item.key as 'num'] ? formData[item.key as 'num'] : null}
+                onChange={e => setFormData({ ...formData, [item.key]: e })}
+              />
+            ) : (
+              <Cascader
+                options={item.data}
+                placeholder='全部'
+                fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                allowClear={true}
+                value={
+                  formData[item.key as 'num']
+                    ? (formData[item.key as 'num'] as string).split(',')
+                    : []
+                }
+                onChange={e => setFormData({ ...formData, [item.key]: e ? e.join(',') : '' })}
+              />
+            )}
+          </div>
+        )
+      })
+    },
+    [formData, txtChangeFu]
+  )
+
+  // 点击导出
+  const deriveFu = useCallback(async () => {
+    const name = '藏品总账' + dayjs(new Date()).format('YYYY-MM-DD HH:mm')
+
+    const res = await C1_APIgetList(
+      {
+        ...formDataOldRef.current,
+        pageNum: 1,
+        pageSize: 99999
+      },
+      true
+    )
+
+    if (res.code === 0) {
+      if (res.data.records.length <= 0) return MessageFu.warning('当前搜索条件没有数据!')
+
+      const option = {
+        fileName: name,
+        datas: [
+          {
+            sheetData: res.data.records.map((v: FourTableType) => ({
+              ...v,
+              thumbPc: window.location.origin + v.thumbPc,
+              dictType: resJiLianFu(v.dictType),
+              dictAge: v.dictAge === '其他' ? '其他' : resJiLianFu(v.dictAge),
+              dictTexture3: resJiLianFu(v.dictTexture3),
+              dictTorn: resJiLianFu(v.dictTorn),
+              source: resJiLianFu(v.source),
+              statusCollect: Reflect.get(statusCollectObj, v.statusCollect) || '(空)',
+              statusStorage: Reflect.get(statusStorageObj, v.statusStorage) || '(空)'
+            })),
+            sheetName: name,
+            sheetFilter: [
+              'num',
+              'thumbPc',
+              'numName',
+              'name',
+              'dictLevel',
+              'dictType',
+              'dictAge',
+              'dictTexture3',
+              'dictTorn',
+              'source',
+
+              'statusCollect',
+              'statusStorage'
+            ],
+            sheetHeader: [
+              '藏品编号',
+              '封面图地址',
+              '编号类型',
+              '藏品名称',
+              '文物级别',
+              '文物类别',
+              '年代',
+              '质地',
+              '完残程度',
+              '来源',
+              '入藏状态',
+              '库存状态'
+            ],
+            columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
+          }
+        ]
+      }
+
+      const toExcel = new ExportJsonExcel(option) //new
+      toExcel.saveExcel() //保存
+    }
+  }, [])
+
   return (
     <div className={styles.C1ledger}>
       <div className='pageTitle'>藏品总账</div>
       {/* 第一行 */}
       <div className='C1top'>
-        <div className='C1topll C1topllAll'>
-          {C1InputKeyArr1.map(item => (
-            <div key={item.name}>
-              <span>{item.name}:</span>
-
-              {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
-              {item.type === '输入框' ? (
-                <Input
-                  placeholder='请输入'
-                  maxLength={30}
-                  value={formData[item.key]}
-                  onChange={e => txtChangeFu(e.target.value, item.key)}
-                />
-              ) : null}
-
-              {item.type === '级联' ? (
-                <Cascader
-                  changeOnSelect
-                  options={[]}
-                  placeholder='全部'
-                  // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-                  allowClear={false}
-                />
-              ) : null}
-            </div>
-          ))}
-        </div>
+        <div className='C1topll C1topllAll'>{searchDom(C1InputKeyArr1)}</div>
       </div>
 
       {/* 第二行 */}
       <div className='C1top C1top2'>
         {advanced ? (
-          <div className='C1topll'>
-            {C1InputKeyArr2.map(item => (
-              <div key={item.name}>
-                <span>{item.name}:</span>
-
-                {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
-                {item.type === '输入框' ? (
-                  <Input
-                    placeholder='请输入'
-                    maxLength={30}
-                    value={formData[item.key]}
-                    onChange={e => txtChangeFu(e.target.value, item.key)}
-                  />
-                ) : null}
-
-                {item.type === '级联' ? (
-                  <Cascader
-                    changeOnSelect
-                    options={[]}
-                    placeholder='全部'
-                    // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-                    allowClear={false}
-                  />
-                ) : null}
-              </div>
-            ))}
-          </div>
+          <div className='C1topll'>{searchDom(C1InputKeyArr2)}</div>
         ) : (
           <div className='C1topll'></div>
         )}
@@ -197,7 +272,10 @@ function C1ledger() {
             {advanced ? '收起' : ''}高级搜索
           </Button>
           &emsp;
-          <Button type='primary'>批量导出</Button>&emsp;
+          <Button type='primary' onClick={deriveFu}>
+            批量导出
+          </Button>
+          &emsp;
           <Button type='primary' onClick={() => history.push('/register_edit/1/null/3')}>
             藏品登记
           </Button>
@@ -217,33 +295,7 @@ function C1ledger() {
       {/* 第三行 */}
       {advanced ? (
         <div className='C1top C1top2'>
-          <div className='C1topll'>
-            {C1InputKeyArr3.map(item => (
-              <div key={item.name}>
-                <span>{item.name}:</span>
-
-                {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
-                {item.type === '输入框' ? (
-                  <Input
-                    placeholder='请输入'
-                    maxLength={30}
-                    value={formData[item.key]}
-                    onChange={e => txtChangeFu(e.target.value, item.key)}
-                  />
-                ) : null}
-
-                {item.type === '级联' ? (
-                  <Cascader
-                    changeOnSelect
-                    options={[]}
-                    placeholder='全部'
-                    // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-                    allowClear={false}
-                  />
-                ) : null}
-              </div>
-            ))}
-          </div>
+          <div className='C1topll'>{searchDom(C1InputKeyArr3)}</div>
           <div className='C1toprr'>
             <Button type='primary' onClick={clickSearch}>
               查询
@@ -259,13 +311,13 @@ function C1ledger() {
       {/* 表格 */}
       <MyTable
         yHeight={advanced ? 540 : 595}
-        list={[{ id: 66, thumb: '', num: 'xxx' }]}
+        list={tableInfo.list}
         columnsTemp={C1tableC}
         lastBtn={tableLastBtn}
         startBtn={startBtn}
         pageNum={formData.pageNum}
         pageSize={formData.pageSize}
-        total={0}
+        total={tableInfo.total}
         onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
       />
 

+ 27 - 21
src/pages/C_goodsManage/C1ledger/type.d.ts

@@ -6,32 +6,38 @@ export interface TYpeC1Form extends TYpeC1Form1, TYpeC1Form2 {
 }
 
 export interface TYpeC1Form1 {
-  aaaa: string
-  bbbb: string
-  cccc: string
-  dddd: string
-  eeee: string
-  ffff: string
-  gggg: string
-  hhhh: string
-  iiii: string
-  jjjj: string
-  kkkk: string
+  numName: string
+  num: string
+  name: string
+  dictLevel: string
+  dictType: string
+  dictAge: string
+  dictTexture3: string
+  dictTorn: string
+  source: string
+  statusCollect: string
+  statusStorage: string
 }
 
 export interface TYpeC1Form2 {
-  llll: string
-  mmmm: string
-  nnnn: string
-  oooo: string
-  pppp: string
-  qqqq: string
-  rrrr: string
-  ssss: string
-  tttt: string
-  uuuu: string
+  numType: string
+  userName: string
+  qualityDictScope: string
+  inDictDateScope: string
+  sourcePass: string
+  sourcePreface: string
+  sourceStamp: string
+  historyWork: string
+  historyUndergo: string
 }
 
+export type C1DomArrType = {
+  name: string
+  key: C1InputKeyType
+  type: '输入框' | '下拉框' | '级联'
+  data?: any[]
+}[]
+
 export type C1GoodType = {
   display: 0 | 1
   ageInfo: string

+ 4 - 4
src/pages/C_goodsManage/C2files/data.ts

@@ -5,8 +5,8 @@ import { TypeZ1dict } from '@/pages/Z_system/Z1dict/type'
 import store from '@/store'
 
 export const C2baseFormData: TypeC2Form = {
-  numName: '藏品总登记号',
-  num: '',
+  goodNumName: '藏品总登记号',
+  goodNum: '',
   goodName: '',
   fileName: '',
   effect: '',
@@ -38,8 +38,8 @@ export const C2InputKeyArr: {
   type: '输入框' | '下拉框' | '级联'
   data?: any[]
 }[] = [
-  { name: '编号类型', key: 'numName', type: '下拉框', data: selectObj['藏品编号类型'] },
-  { name: '藏品编号', key: 'num', type: '输入框' },
+  { name: '编号类型', key: 'goodNumName', type: '下拉框', data: selectObj['藏品编号类型'] },
+  { name: '藏品编号', key: 'goodNum', type: '输入框' },
   { name: '藏品名称', key: 'goodName', type: '输入框' },
   { name: '附件名称', key: 'fileName', type: '输入框' },
   { name: '用途', key: 'effect', type: '级联', data: cascaderFu('附件用途') },

+ 2 - 2
src/pages/C_goodsManage/C2files/type.d.ts

@@ -1,6 +1,6 @@
 export type TypeC2Form = {
-  numName: string
-  num: string
+  goodNumName: string
+  goodNum: string
   goodName: string
   fileName: string
   effect: any

+ 1 - 1
src/pages/C_goodsManage/C8recycleBin/index.tsx

@@ -124,7 +124,7 @@ function C8recycleBin() {
                 <Input
                   placeholder='请输入'
                   maxLength={30}
-                  value={formData[item.key as 'aaaa']}
+                  value={formData[item.key as 'numName']}
                   onChange={e => txtChangeFu(e.target.value, item.key)}
                 />
               ) : null}

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

@@ -14,7 +14,7 @@ import { D1canType } from '../type'
 const baseFormData: TypeD1Gform = {
   pageSize: 10,
   pageNum: 1,
-  numName: null,
+  numName: '藏品总登记号',
   num: '',
   name: '',
   statusStorage: null

+ 21 - 16
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -9,6 +9,7 @@ import ZRichTexts from '@/components/ZRichTexts'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import history, {
   btnFlagFu2,
+  cascaderObjFu,
   kuIsTreeChangeFu,
   openGoodsInfoFu,
   ruTransformDataFu
@@ -35,13 +36,13 @@ import {
 import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
 import { useDispatch, useSelector } from 'react-redux'
 import { RootState } from '@/store'
-import { cascaderArr } from '@/pages/B_enterTibet/B3goodsTable/B3GaddNew/data'
 import { D2_APIgetList } from '@/store/action/D2storSet'
 import { D1_APIgetSiteList } from '@/store/action/D1storage'
 import { C1GoodType } from '@/pages/C_goodsManage/C1ledger/type'
 import { TypeD2list } from '../../D2storSet/type'
 import { KuIsTreeType } from '../type'
 import { EXbtnFu } from '@/utils/EXBtn'
+import { D6_APIgetList } from '@/store/action/D6putsStor'
 
 export const pageTitTxtObj = {
   1: '新增',
@@ -57,12 +58,19 @@ function D4edit() {
   // 滚到顶部
   const sollrDom = useRef<HTMLDivElement>(null)
 
+  // 获取出库列表,下拉 - 相关出库单用
+  const dispatch = useDispatch()
+
+  useEffect(() => {
+    dispatch(D6_APIgetList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const putsList = useSelector((state: RootState) => state.D6putsStor.tableInfo.list)
+
   // 顶部数据
   const [topInfo, setTopInfo] = useState({} as FourTableType)
 
   // 入库库房数组信息
-  const dispatch = useDispatch()
-
   useEffect(() => {
     dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
   }, [dispatch])
@@ -105,10 +113,10 @@ function D4edit() {
       setTopInfo(res.data)
 
       // 设置富文本
-      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf))
+      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
 
       // 入库库房筛选存放位置数据
-      kuIsTreeFu(res.data.storageId)
+      if (res.data.storageId) kuIsTreeFu(res.data.storageId)
     }
   }, [id, kuIsTreeFu])
 
@@ -241,7 +249,7 @@ function D4edit() {
     return [
       {
         title: '藏品编号',
-        render: (item: any) => {
+        render: (item: C1GoodType) => {
           return (
             <span
               onClick={() => setCathet(item.id)}
@@ -436,14 +444,6 @@ function D4edit() {
   }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   // 所有级联的数据平铺
-  const { dictAll } = useSelector((state: RootState) => state.Z1dict)
-  const cascaderObj = useMemo(() => {
-    let obj: any = {}
-    if (dictAll && dictAll.length) {
-      obj = cascaderArr(dictAll)
-    }
-    return obj
-  }, [dictAll])
 
   // 自动分配空置库位
   const autoNullFu = useCallback(async () => {
@@ -518,7 +518,7 @@ function D4edit() {
                 value={topInfo.sonTypeName ? topInfo.sonTypeName.split(',') : []}
                 onChange={e => setTopInfo({ ...topInfo, sonTypeName: e ? e.join(',') : '' })}
                 disabled={['3', '4'].includes(key)}
-                options={cascaderObj['藏品入库']}
+                options={cascaderObjFu()['藏品入库']}
                 changeOnSelect
                 placeholder='请选择'
                 fieldNames={{ label: 'name', value: 'id', children: 'children' }}
@@ -540,12 +540,17 @@ function D4edit() {
           ))}
 
           <div className='D4row'>
-            {/* 待完善 */}
             <div className='D4rowll'>相关出库单:</div>
             <div className='D4rowrr'>
               <Select
                 disabled={['3', '4'].includes(key)}
                 placeholder={['3', '4'].includes(key) ? '(空)' : '请搜索出库单编码'}
+                showSearch
+                options={putsList}
+                fieldNames={{ label: 'num', value: 'num' }}
+                allowClear={true}
+                value={topInfo.relatedOrderNum || null}
+                onChange={e => setTopInfo({ ...topInfo, relatedOrderNum: e ? e : '' })}
               />
             </div>
           </div>

+ 0 - 5
src/pages/D_storeManage/D6putsStor/D6edit/index.module.scss

@@ -123,11 +123,6 @@
       }
     }
 
-    // 相关入库单
-    .D6_4tableBox {
-      margin-top: 24px;
-    }
-
     .ant-table-cell {
       padding: 8px !important;
     }

+ 388 - 173
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -8,15 +8,40 @@ import dayjs from 'dayjs'
 import Z3upFiles from '@/components/Z3upFiles'
 import ZRichTexts from '@/components/ZRichTexts'
 import { MessageFu } from '@/utils/message'
-import history, { openGoodsInfoFu } from '@/utils/history'
+import history, {
+  btnFlagFu2,
+  cascaderObjFu,
+  kuIsTreeChangeFu,
+  openGoodsInfoFu
+} from '@/utils/history'
 import B3GaddNow from '@/pages/B_enterTibet/B3goodsTable/B3GaddNow'
 import MyTable from '@/components/MyTable'
 import classNames from 'classnames'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import { D4tableC, D6goodsTableC } from '@/utils/tableData'
+import { D4goodsTableC, statusObj } from '@/utils/tableData'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import B3flowTable from '@/pages/B_enterTibet/B3flowTable'
+import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
+import { useDispatch, useSelector } from 'react-redux'
+import { D2_APIgetList } from '@/store/action/D2storSet'
+import { RootState } from '@/store'
+import {
+  D6_APIcreate,
+  D6_APIdel,
+  D6_APIgetInfo,
+  D6_APIrevocation,
+  D6_APIsaveApply,
+  D6_APIsaveAudit,
+  D6_APIsaveCreate,
+  D6_APIsaveDraft
+} from '@/store/action/D6putsStor'
+import { KuIsTreeType } from '../../D4impStor/type'
+import { D1_APIgetSiteList } from '@/store/action/D1storage'
+import { C1GoodType } from '@/pages/C_goodsManage/C1ledger/type'
+import { EXbtnFu } from '@/utils/EXBtn'
+import { TypeD2list } from '../../D2storSet/type'
+import D6impRelation from '../D6impRelation'
 
 function D6edit() {
   const { key, id } = useParams<any>()
@@ -25,15 +50,67 @@ function D6edit() {
   // 滚到顶部
   const sollrDom = useRef<HTMLDivElement>(null)
 
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  // 出库库房数组信息
+  const dispatch = useDispatch()
+
   useEffect(() => {
-    console.log('key:', key)
+    dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
 
-    if (sollrDom.current) sollrDom.current.scrollTop = 0
-  }, [key])
+  const { list: storSetList } = useSelector((state: RootState) => state.D2storSet.tableInfo)
 
-  const pageTitTxt = useMemo(() => {
-    return Reflect.get(pageTitTxtObj, key)
-  }, [key])
+  // 库房负责人txt
+  const managerUser = useMemo(() => {
+    let txt = ''
+    if (topInfo.storageId && storSetList.length) {
+      let obj = storSetList.find(v => v.id === topInfo.storageId)
+      if (obj) txt = obj.managerUser
+    }
+    return txt
+  }, [storSetList, topInfo.storageId])
+
+  // 创建订单
+  const creatFu = useCallback(async () => {
+    const res = await D6_APIcreate()
+    if (res.code === 0) {
+      setTopInfo({ ...res.data, isReturn: 0 })
+    }
+  }, [])
+
+  // 入库的排架 层数 层格变成树
+  const [kuIsTree, setKuIsTreeFu] = useState<KuIsTreeType[]>([])
+
+  const kuIsTreeFu = useCallback(async (id: number) => {
+    const res = await D1_APIgetSiteList(id, false)
+    if (res.code === 0) {
+      const arrTemp: KuIsTreeType[] = kuIsTreeChangeFu(res.data)
+      setKuIsTreeFu(arrTemp)
+    }
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(async () => {
+    const res = await D6_APIgetInfo(id)
+    if (res.code === 0) {
+      setTopInfo(res.data)
+
+      // 设置富文本
+      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf) || '{}')
+
+      // 出库库房筛选存放位置数据
+      if (res.data.storageId) kuIsTreeFu(res.data.storageId)
+    }
+  }, [id, kuIsTreeFu])
+
+  useEffect(() => {
+    if (key === '1') creatFu()
+    else getInfoFu()
+
+    if (sollrDom.current) sollrDom.current.scrollTop = 0
+  }, [creatFu, getInfoFu, key])
 
   // 上传附件的ref
   const filesRef = useRef<any>(null)
@@ -45,94 +122,114 @@ function D6edit() {
   // 审批意见的ref
   const ZAuditRef = useRef<any>(null)
 
-  // 设置富文本
-  //  ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf))
-
-  // 新增的底部按钮点击
-  const btnClickFu = useCallback((val: number) => {
-    const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
-    console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
-
-    const rtf2 = ZAuditRef.current?.resData()
-    console.log('审批信息富文本', rtf2)
+  const pageTitTxt = useMemo(() => {
+    return Reflect.get(pageTitTxtObj, key)
+  }, [key])
 
-    // if (1 + 1 === 2) return
+  const timeChange = useCallback(
+    (e: any) => {
+      setTopInfo({ ...topInfo, date: dayjs(e).format('YYYY-MM-DD') })
+    },
+    [topInfo]
+  )
 
-    if (val === 2) {
-      // 存草稿 当前页保存 不跳转
-      MessageFu.success('草稿保存成功')
+  const checkDataFu = useCallback(() => {
+    if (!topInfo.name) {
+      MessageFu.warning('申请名称不能为空')
+      return true
+    }
+    if (!topInfo.sonTypeName) {
+      MessageFu.warning('请选择业务类型')
+      return true
+    }
+    if (!topInfo.storageId) {
+      MessageFu.warning('请选择出库库房')
+      return true
+    }
+    if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+      MessageFu.warning('请添加藏品')
+      return true
     } else {
-      // 跳到详情页
-      history.push(`/putsStor_edit/4/999`)
+      if (topInfo.goods.some(v => !v.siteStr)) {
+        MessageFu.warning('请选择出库位置')
+        return true
+      }
     }
-  }, [])
 
-  // 打开侧边栏
-  const [cathet, setCathet] = useState(0)
-
-  const timeChange = useCallback((e: any) => {
-    console.log(123, e)
-  }, [])
-
-  // 是否归还 单选框
-  const [bbbb, setBBBB] = useState(0)
-
-  const [huanTime, setHuanTime] = useState('')
-
-  // 是否归还 选择 否 的时候  清空预计归还日期
-  useEffect(() => {
-    if (!bbbb) setHuanTime('')
-  }, [bbbb])
-
-  // 点击新增
-  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+    return false
+  }, [topInfo])
 
   // 审批的sta
   const [auditSta, setAuDitSta] = useState('')
 
-  // 查看模式下的按钮 待完善
-  const lookBtn = useMemo(() => {
-    return (
-      <>
-        <Button type='primary'>创建</Button>
-        <Button type='primary'>提交</Button>
-        <MyPopconfirm
-          txtK='撤回'
-          onConfirm={() => {}}
-          Dom={
-            <Button type='primary' danger>
-              撤回
-            </Button>
-          }
-        />
+  // 新增的底部按钮点击
+  const btnClickFu = useCallback(
+    async (val: '草稿' | '创建' | '保存' | '审批') => {
+      if (checkDataFu()) return
+
+      if (val === '审批') {
+        // console.log('审批信息富文本', rtf2)
+        if (!auditSta) {
+          if (sollrDom.current) sollrDom.current.scrollTop = 0
+          return MessageFu.warning('请选择审批结果')
+        }
+        const rtf2 = ZAuditRef.current?.resData()
+
+        const res = await D6_APIsaveAudit({
+          orderId: topInfo.id,
+          rtfOpinion: rtf2,
+          status: auditSta === '同意' ? 1 : 2
+        })
+
+        if (res.code === 0) {
+          MessageFu.success('审批成功')
+          // 跳详情页
+          history.push(`/putsStor_edit/4/${topInfo.id}`)
+        }
+      } else {
+        const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
+        // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
+
+        // 上传附件
+        const filesRes = filesRef.current.filesIdRes()
+
+        const obj = {
+          ...topInfo,
+          fileIds: filesRes.join(','),
+          rtf: JSON.stringify(rtf1.val || ''),
+          goodsIds: topInfo.goods.map(v => v.id).join(',')
+        }
+        // console.log(123, obj)
 
-        <Button type='primary'>审批</Button>
-        <Button type='primary'>编辑</Button>
-        <Button type='primary'>重新提交</Button>
-        <Button type='primary'>导出</Button>
-        <MyPopconfirm
-          txtK='删除'
-          onConfirm={() => {}}
-          Dom={
-            <Button type='primary' danger>
-              删除
-            </Button>
+        // if (1 + 1 === 2) return
+
+        if (val === '草稿') {
+          // 存草稿 当前页保存 不跳转
+          const res = await D6_APIsaveDraft(obj)
+          if (res.code === 0) {
+            MessageFu.success('草稿保存成功')
           }
-        />
-        <Button onClick={() => history.push('/putsStor')}>返回</Button>
-      </>
-    )
-  }, [])
+        } else {
+          const res = val === '创建' ? await D6_APIsaveCreate(obj) : await D6_APIsaveApply(obj)
+          if (res.code === 0) {
+            MessageFu.success(`${val}成功`)
+            // 跳到详情页
+            history.push(`/putsStor_edit/4/${topInfo.id}`)
+          }
+        }
+      }
+    },
+    [auditSta, checkDataFu, topInfo]
+  )
 
-  // ----------------表格的逻辑
-  // 点击删除
-  const delTableFu = useCallback(async (id: number) => {}, [])
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
 
   const startBtn = useMemo(() => {
     return [
       {
         title: '藏品编号',
-        render: (item: any) => {
+        render: (item: C1GoodType) => {
           return (
             <span
               onClick={() => setCathet(item.id)}
@@ -150,57 +247,162 @@ function D6edit() {
     return [
       {
         title: '出库位置',
-        render: (item: any) => (
-          <Cascader
-            disabled={['3', '4'].includes(key)}
-            options={[
-              { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
-              { value: '其他', label: '其他' }
-            ]}
-            placeholder='请选择'
-            // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-            allowClear={false}
-          />
-        )
+        width: 200,
+        render: (item: C1GoodType) => {
+          return (
+            <Cascader
+              disabled
+              // disabled={['3', '4'].includes(key)}
+              options={kuIsTree}
+              placeholder='请选择'
+              // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+              allowClear={false}
+              value={item.siteStr ? item.siteStr.split(',').map(v => Number(v)) : undefined}
+              onChange={() => {}}
+            />
+          )
+        }
       },
       {
         title: '操作',
-        render: (item: any) => {
+        render: (item: C1GoodType) => {
           return (
             <>
               <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
                 查看
               </Button>
               {['3', '4'].includes(key) ? null : (
-                <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+                <MyPopconfirm
+                  txtK='删除'
+                  onConfirm={() =>
+                    setTopInfo({
+                      ...topInfo,
+                      goods: topInfo.goods.filter(v => v.id !== item.id)
+                    })
+                  }
+                />
               )}
             </>
           )
         }
       }
     ]
-  }, [delTableFu, key])
+  }, [key, kuIsTree, topInfo])
 
-  const tableLastBtn2 = useMemo(() => {
-    return [
-      {
-        title: '操作',
-        render: (item: any) => {
-          return (
-            <Button
-              size='small'
-              type='text'
-              onClick={() => {
-                window.open(`/#/impStor_edit/4/${item.id}`, '_blank')
-              }}
-            >
-              查看
-            </Button>
-          )
-        }
+  // 点击新增
+  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+
+  // 查看的按钮创建-提交-撤回
+  const lookBtnFu = useCallback(
+    async (val: '创建' | '提交' | '撤回') => {
+      const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
+      // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
+
+      // 上传附件
+      const filesRes = filesRef.current.filesIdRes()
+      const obj = {
+        ...topInfo,
+        fileIds: filesRes.join(','),
+        rtf: JSON.stringify(rtf1.val || ''),
+        goodsIds: topInfo.goods.map(v => v.id).join(',')
       }
-    ]
-  }, [])
+
+      const res =
+        val === '创建'
+          ? await D6_APIsaveCreate(obj)
+          : val === '提交'
+          ? await D6_APIsaveApply(obj)
+          : await D6_APIrevocation(id)
+
+      if (res.code === 0) {
+        if (sollrDom.current) sollrDom.current.scrollTop = 0
+        MessageFu.success(val + '成功')
+        getInfoFu()
+      }
+    },
+    [getInfoFu, id, topInfo]
+  )
+
+  // 查看模式点击删除
+  const delFu = useCallback(async () => {
+    const res = await D6_APIdel(id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/putsStor')
+    }
+  }, [id])
+
+  // 查看模式点击审批 编辑
+  const lookJumpFu = useCallback(
+    (val: '审批' | '编辑') => {
+      history.push(`/putsStor_edit/${val === '审批' ? 3 : 2}/${id}`)
+      MessageFu.success(`已跳转至${val}页面`)
+    },
+    [id]
+  )
+
+  // 查看模式下的按钮
+  const lookBtn = useMemo(() => {
+    return (
+      <>
+        {btnFlagFu2(topInfo)['创建'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('创建')}>
+            创建
+          </Button>
+        ) : null}
+        {btnFlagFu2(topInfo)['提交'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('提交')}>
+            提交
+          </Button>
+        ) : null}
+
+        {btnFlagFu2(topInfo)['撤回'] ? (
+          <MyPopconfirm
+            txtK='撤回'
+            onConfirm={() => lookBtnFu('撤回')}
+            Dom={
+              <Button type='primary' danger>
+                撤回
+              </Button>
+            }
+          />
+        ) : null}
+
+        {btnFlagFu2(topInfo)['审批'] ? (
+          <Button type='primary' onClick={() => lookJumpFu('审批')}>
+            审批
+          </Button>
+        ) : null}
+        {btnFlagFu2(topInfo)['编辑'] ? (
+          <Button type='primary' onClick={() => lookJumpFu('编辑')}>
+            编辑
+          </Button>
+        ) : null}
+
+        {btnFlagFu2(topInfo)['重新提交'] ? (
+          <Button type='primary' onClick={() => lookBtnFu('提交')}>
+            重新提交
+          </Button>
+        ) : null}
+
+        {EXbtnFu()}
+
+        {btnFlagFu2(topInfo)['删除'] ? (
+          <MyPopconfirm
+            txtK='删除'
+            onConfirm={() => delFu()}
+            Dom={
+              <Button type='primary' danger>
+                删除
+              </Button>
+            }
+          />
+        ) : null}
+
+        <Button onClick={() => history.push('/putsStor')}>返回</Button>
+      </>
+    )
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
 
   return (
     <div className={styles.D6edit}>
@@ -209,8 +411,8 @@ function D6edit() {
       <div className='D6main' ref={sollrDom}>
         {['3'].includes(key) ? (
           <X3auditInfo
-            dirCode='待完善'
-            myUrl='待完善'
+            dirCode='putsStor'
+            myUrl='cms/orderOut/upload'
             auditSta={auditSta}
             auditStaFu={val => setAuDitSta(val)}
             ref={ZAuditRef}
@@ -219,9 +421,10 @@ function D6edit() {
 
         {/* 表单字段、附件等 */}
         <div className='D6Tit'>
-          {/* 待完善 */}
           申请信息
-          <Button type='dashed'>草稿</Button>
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
         </div>
 
         <div className='D6rowAll'>
@@ -231,6 +434,8 @@ function D6edit() {
             </div>
             <div className='D6rowrr'>
               <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
                 readOnly={['3', '4'].includes(key)}
                 placeholder='请输入内容'
                 maxLength={30}
@@ -245,14 +450,13 @@ function D6edit() {
             </div>
             <div className='D6rowrr'>
               <Cascader
+                value={topInfo.sonTypeName ? topInfo.sonTypeName.split(',') : []}
+                onChange={e => setTopInfo({ ...topInfo, sonTypeName: e ? e.join(',') : '' })}
                 disabled={['3', '4'].includes(key)}
-                options={[
-                  { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
-                  { value: '其他', label: '其他' }
-                ]}
+                options={cascaderObjFu()['藏品出库']}
                 changeOnSelect
                 placeholder='请选择'
-                // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                fieldNames={{ label: 'name', value: 'id', children: 'children' }}
                 allowClear={false}
               />
             </div>
@@ -262,9 +466,9 @@ function D6edit() {
             <div className='D6row' key={v.name}>
               <div className='D6rowll'>{v.name}:</div>
               <div className='D6rowrr'>
-                这是一段文本
+                {topInfo[v.key as 'name']}
                 {['3', '4'].includes(key) && v.name === '发起人'
-                  ? ' - 查看和审批后面显示创建时间'
+                  ? ' - ' + topInfo.createTime || ''
                   : ''}
               </div>
             </div>
@@ -277,8 +481,14 @@ function D6edit() {
             <div className='D6rowrr'>
               <Radio.Group
                 disabled={['3', '4'].includes(key)}
-                value={bbbb}
-                onChange={e => setBBBB(e.target.value)}
+                value={topInfo.isReturn}
+                onChange={e =>
+                  setTopInfo({
+                    ...topInfo,
+                    isReturn: e.target.value,
+                    returnDate: e.target.value === 0 ? '' : topInfo.returnDate
+                  })
+                }
                 options={[
                   { value: 1, label: '是' },
                   { value: 0, label: '否' }
@@ -288,13 +498,16 @@ function D6edit() {
           </div>
 
           <div className='D6row'>
-            <div className='D6rowll'>{bbbb ? <span> * </span> : null} 预计归还日期:</div>
+            <div className='D6rowll'> 预计归还日期:</div>
             <div className='D6rowrr'>
               <DatePicker
-                disabled={['3', '4'].includes(key) || bbbb === 0}
-                allowClear={false}
-                value={huanTime ? dayjs(huanTime) : null}
-                onChange={e => setHuanTime(dayjs(e).format('YYYY-MM-DD'))}
+                placeholder={topInfo.isReturn !== 1 ? '(空)' : '请选择日期'}
+                disabled={['3', '4'].includes(key) || topInfo.isReturn !== 1}
+                allowClear={true}
+                value={topInfo.returnDate ? dayjs(topInfo.returnDate) : null}
+                onChange={e =>
+                  setTopInfo({ ...topInfo, returnDate: e ? dayjs(e).format('YYYY-MM-DD') : '' })
+                }
               />
             </div>
           </div>
@@ -307,7 +520,7 @@ function D6edit() {
               <DatePicker
                 disabled={['3', '4'].includes(key)}
                 allowClear={false}
-                value={dayjs()}
+                value={dayjs(topInfo.date)}
                 onChange={timeChange}
               />
             </div>
@@ -316,6 +529,8 @@ function D6edit() {
             <div className='D6rowll'>原因事由:</div>
             <div className='D6rowrr'>
               <Input
+                value={topInfo.reason}
+                onChange={e => setTopInfo({ ...topInfo, reason: e.target.value })}
                 readOnly={['3', '4'].includes(key)}
                 placeholder='请输入内容'
                 maxLength={30}
@@ -332,9 +547,9 @@ function D6edit() {
                 isLook={['3', '4'].includes(key)}
                 ref={filesRef}
                 fileCheck={false}
-                dirCode={'xxxxxxx'}
-                myUrl='xxxxxxxxxxxx'
-                lookData={[]}
+                dirCode='putsStor'
+                myUrl='cms/orderOut/upload'
+                lookData={topInfo.files || []}
                 size={500}
               />
             </div>
@@ -345,10 +560,10 @@ function D6edit() {
             <div className='D6rowrr'>
               <ZRichTexts
                 check={false}
-                dirCode={'xxxxxxxx'}
+                dirCode='putsStor'
+                myUrl='cms/orderOut/upload'
                 isLook={['3', '4'].includes(key)}
                 ref={ZRichTextRef}
-                myUrl='xxxxxxxxxx'
                 isOne={true}
                 upAudioBtnNone={true}
               />
@@ -363,13 +578,22 @@ function D6edit() {
               <span> * </span>出库库房:
             </div>
             <div className='D6rowrr'>
-              {/* 待完善 从库房设置列表里面选择 --根据选择刷新下面的藏品清单列表*/}
-              <Select disabled={['3', '4'].includes(key)} placeholder='请选择' />
+              <Select
+                options={storSetList}
+                value={topInfo.storageId}
+                onChange={(storageId, arr) => {
+                  setTopInfo({ ...topInfo, storageId, goods: [] })
+                  kuIsTreeFu((arr as TypeD2list).id)
+                }}
+                disabled={['3', '4'].includes(key)}
+                fieldNames={{ value: 'id', label: 'name' }}
+                placeholder='请选择'
+              />
             </div>
           </div>
           <div className='D6row D6row3'>
             <div className='D6rowll'>库房负责人:</div>
-            <div className='D6rowrr'>这是一段文本</div>
+            <div className='D6rowrr'>{managerUser || '(空)'}</div>
           </div>
         </div>
 
@@ -379,7 +603,13 @@ function D6edit() {
             <div className='D6Tit2ll'>藏品清单</div>
             <div className='D6Tit2rr'>
               {['3', '4'].includes(key) ? null : (
-                <Button type='primary' onClick={() => setNowSta({ key: '6', id })}>
+                <Button
+                  type='primary'
+                  onClick={() => {
+                    if (!topInfo.storageId) return MessageFu.warning('请先选择出库库房')
+                    setNowSta({ key: '5', id: 'cms/orderOut/goods/getList' })
+                  }}
+                >
                   新增
                 </Button>
               )}
@@ -388,8 +618,8 @@ function D6edit() {
 
           {/* 表格 */}
           <MyTable
-            list={[{ id: 99, thumb: '', num: '一段编号_可点击' }]}
-            columnsTemp={D6goodsTableC}
+            list={topInfo.goods || []}
+            columnsTemp={D4goodsTableC}
             startBtn={startBtn}
             lastBtn={tableLastBtn}
             pagingInfo={false}
@@ -397,31 +627,10 @@ function D6edit() {
         </div>
 
         {/* 相关入库单 */}
-
-        {/* 通过后端数据,没有入库单的隐藏 */}
-
-        {key === '4' ? (
-          <div className='D6_4tableBox'>
-            <div className='D6Tit'>相关入库单</div>
-            <MyTable
-              list={[{ id: 77, thumb: '' }]}
-              columnsTemp={D4tableC}
-              lastBtn={tableLastBtn2}
-              pagingInfo={false}
-            />
-          </div>
-        ) : null}
+        {key === '4' ? <D6impRelation list={topInfo.relatedOrder || []} /> : null}
 
         {/* 申请流程 */}
-        {['3', '4'].includes(key) ? (
-          <B3flowTable
-            tableArr={
-              [
-                //  待完善
-              ]
-            }
-          />
-        ) : null}
+        {['3', '4'].includes(key) ? <B3flowTable tableArr={topInfo.audits || []} /> : null}
       </div>
 
       {/* 底部按钮 */}
@@ -430,12 +639,18 @@ function D6edit() {
           lookBtn
         ) : (
           <>
-            <Button type='primary' onClick={() => btnClickFu(1)}>
-              {key === '1' ? '创建' : '保存'}
-            </Button>
+            {key === '3' ? (
+              <Button type='primary' onClick={() => btnClickFu('审批')}>
+                审批
+              </Button>
+            ) : (
+              <Button type='primary' onClick={() => btnClickFu(key === '1' ? '创建' : '保存')}>
+                {key === '1' ? '创建' : '保存'}
+              </Button>
+            )}
 
             {key === '1' ? (
-              <Button type='primary' onClick={() => btnClickFu(2)}>
+              <Button type='primary' onClick={() => btnClickFu('草稿')}>
                 存草稿
               </Button>
             ) : null}
@@ -452,9 +667,9 @@ function D6edit() {
         <B3GaddNow
           nowSta={nowSta}
           closeFu={() => setNowSta({ key: '', id: '' })}
-          dataResFu={data => {}}
-          // 待完善
-          oldCheckArr={[]}
+          dataResFu={data => setTopInfo({ ...topInfo, goods: data })}
+          oldCheckArr={topInfo.goods || []}
+          canObj={{ storageId: topInfo.storageId }}
         />
       ) : null}
     </div>

+ 21 - 0
src/pages/D_storeManage/D6putsStor/D6impRelation/index.module.scss

@@ -0,0 +1,21 @@
+.D6impRelation {
+  margin-top: 24px;
+  :global {
+    .D6RTit {
+      font-size: 18px;
+      font-weight: 700;
+      padding-bottom: 10px;
+      padding-left: 18px;
+      border-bottom: 1px solid #ccc;
+      margin-bottom: 17px;
+      color: var(--themeColor);
+      .ant-btn {
+        margin-left: 15px;
+        pointer-events: none;
+      }
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
+  }
+}

+ 44 - 0
src/pages/D_storeManage/D6putsStor/D6impRelation/index.tsx

@@ -0,0 +1,44 @@
+import React, { useMemo } from 'react'
+import styles from './index.module.scss'
+import MyTable from '@/components/MyTable'
+import { D4tableC } from '@/utils/tableData'
+import { Button } from 'antd'
+import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
+
+type Props = {
+  list: FourTableType[]
+}
+
+function D6impRelation({ list }: Props) {
+  const tableLastBtn2 = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          return (
+            <Button
+              size='small'
+              type='text'
+              onClick={() => {
+                window.open(`/#/impStor_edit/4/${item.id}`, '_blank')
+              }}
+            >
+              查看
+            </Button>
+          )
+        }
+      }
+    ]
+  }, [])
+
+  return (
+    <div className={styles.D6impRelation} hidden={list.length === 0}>
+      <div className='D6RTit'>相关入库单</div>
+      <MyTable list={list} columnsTemp={D4tableC} lastBtn={tableLastBtn2} pagingInfo={false} />
+    </div>
+  )
+}
+
+const MemoD6impRelation = React.memo(D6impRelation)
+
+export default MemoD6impRelation

+ 3 - 2
src/pages/D_storeManage/D6putsStor/index.tsx

@@ -21,7 +21,7 @@ const { RangePicker } = DatePicker
 function D6putsStor() {
   const dispatch = useDispatch()
 
-  // 获取库库房下拉框 - 库房设置列表
+  // 获取库库房下拉框 - 库房设置列表
   useEffect(() => {
     dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
   }, [dispatch])
@@ -181,7 +181,8 @@ function D6putsStor() {
             sheetData: res.data.records.map((v: FourTableType) => ({
               ...v,
               status: statusObj[v.status as 1],
-              isReturn: v.isReturn === 1 ? '是' : '否'
+              isReturn: v.isReturn === 1 ? '是' : '否',
+              returnDate: v.returnDate || '(空)'
             })),
             sheetName: name,
             sheetFilter: [

+ 4 - 0
src/pages/F_exhibition/F1exhibition/index.module.scss

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

+ 14 - 0
src/pages/F_exhibition/F1exhibition/index.tsx

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

+ 54 - 42
src/pages/Layout/data.ts

@@ -20,7 +20,7 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 130,
-        name: '流程管理444',
+        name: '流程管理',
         path: '/process',
         Com: React.lazy(() => import('../A_workbench/A3flow'))
       }
@@ -38,7 +38,7 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 220,
-        name: '藏品鉴定222',
+        name: '藏品鉴定',
         path: '/identify',
         Com: React.lazy(() => import('../B_enterTibet/B2identify'))
       },
@@ -72,12 +72,12 @@ const tabLeftArr: RouterType = [
         path: '/files',
         Com: React.lazy(() => import('../C_goodsManage/C2files'))
       },
-      // {
-      //   id: 330,
-      //   name: '藏品关注',
-      //   path: '/focus',
-      //   Com: React.lazy(() => import('../C_goodsManage/C3focus'))
-      // },
+      {
+        id: 330,
+        name: '藏品关注',
+        path: '/focus',
+        Com: React.lazy(() => import('../C_goodsManage/C3focus'))
+      },
       {
         id: 340,
         name: '藏品导入',
@@ -128,7 +128,7 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 430,
-        name: '人员出入库19',
+        name: '人员出入库',
         path: '/staff',
         Com: React.lazy(() => import('../D_storeManage/D3staff'))
       },
@@ -140,7 +140,7 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 450,
-        name: '移库20',
+        name: '移库',
         path: '/moveStor',
         Com: React.lazy(() => import('../D_storeManage/D5moveStor'))
       },
@@ -152,50 +152,62 @@ const tabLeftArr: RouterType = [
       },
       {
         id: 470,
-        name: '盘点555',
+        name: '盘点',
         path: '/check',
         Com: React.lazy(() => import('../D_storeManage/D7check'))
       },
       {
         id: 480,
-        name: '注销21',
+        name: '注销',
         path: '/cancel',
         Com: React.lazy(() => import('../D_storeManage/D8cancel'))
       }
     ]
   },
-  // {
-  //   id: 5,
-  //   name: '藏品维护',
-  //   son: [
-  //     {
-  //       id: 510,
-  //       name: '事故登记',
-  //       path: '/accident',
-  //       Com: React.lazy(() => import('../E_goodsStorage/E1accident'))
-  //     },
-  //     {
-  //       id: 520,
-  //       name: '残损登记',
-  //       path: '/damaged',
-  //       Com: React.lazy(() => import('../E_goodsStorage/E2damaged'))
-  //     },
-  //     {
-  //       id: 530,
-  //       name: '现状登记',
-  //       path: '/actuality',
-  //       Com: React.lazy(() => import('../E_goodsStorage/E3actuality'))
-  //     },
-  //     {
-  //       id: 540,
-  //       name: '修复登记',
-  //       path: '/repair',
-  //       Com: React.lazy(() => import('../E_goodsStorage/E4repair'))
-  //     }
-  //   ]
-  // },
+  {
+    id: 5,
+    name: '藏品维护',
+    son: [
+      {
+        id: 510,
+        name: '事故登记',
+        path: '/accident',
+        Com: React.lazy(() => import('../E_goodsStorage/E1accident'))
+      },
+      {
+        id: 520,
+        name: '残损登记',
+        path: '/damaged',
+        Com: React.lazy(() => import('../E_goodsStorage/E2damaged'))
+      },
+      {
+        id: 530,
+        name: '现状登记',
+        path: '/actuality',
+        Com: React.lazy(() => import('../E_goodsStorage/E3actuality'))
+      },
+      {
+        id: 540,
+        name: '修复登记',
+        path: '/repair',
+        Com: React.lazy(() => import('../E_goodsStorage/E4repair'))
+      }
+    ]
+  },
   // 待完善-展览管理
   {
+    id: 6,
+    name: '展览管理',
+    son: [
+      {
+        id: 9800,
+        name: '展览管理',
+        path: '/exhibition',
+        Com: React.lazy(() => import('../F_exhibition/F1exhibition'))
+      }
+    ]
+  },
+  {
     id: 7,
     name: '系统管理',
     son: [

+ 3 - 1
src/pages/Layout/index.tsx

@@ -78,9 +78,11 @@ function Layout() {
       if (userInfo.isAdmin === 1) {
         // push角色管理
         isOkIdArr.push(9900)
-        // isOkIdArr.push(9901)
       }
 
+      // 待完善 手动打开展览管理
+      isOkIdArr.push(9800)
+
       const tempArr: RouterTypeRow[] = []
 
       tabLeftArr.forEach(v1 => {

+ 3 - 16
src/pages/Y_goodsDetails/Y2look/Y33setType.tsx

@@ -1,13 +1,11 @@
-import React, { useCallback, useEffect, useMemo, useRef } from 'react'
+import React, { useCallback, useEffect, useRef } from 'react'
 import styles from './index.module.scss'
 import { Button, Cascader, Form, FormInstance, Modal, Select } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { selectObj } from '@/utils/select'
-import { useSelector } from 'react-redux'
-import { RootState } from '@/store'
-import { cascaderArr } from '@/pages/B_enterTibet/B3goodsTable/B3GaddNew/data'
 import { API_C2setFile } from '@/store/action/C2files'
 import { MessageFu } from '@/utils/message'
+import { cascaderObjFu } from '@/utils/history'
 
 export type infoType = {
   ids: number[]
@@ -58,17 +56,6 @@ function Y33setType({ info, closeFu, succFu }: Props) {
     [closeFu, info.ids, succFu]
   )
 
-  const { dictAll } = useSelector((state: RootState) => state.Z1dict)
-
-  // 所有级联的数据平铺
-  const cascaderObj = useMemo(() => {
-    let obj: any = {}
-    if (dictAll && dictAll.length) {
-      obj = cascaderArr(dictAll)
-    }
-    return obj
-  }, [dictAll])
-
   return (
     <Modal
       wrapClassName={styles.Y33setType}
@@ -97,7 +84,7 @@ function Y33setType({ info, closeFu, succFu }: Props) {
             <Cascader
               changeOnSelect
               fieldNames={{ label: 'name', value: 'id', children: 'children' }}
-              options={cascaderObj['附件用途']}
+              options={cascaderObjFu()['附件用途']}
               placeholder='请选择'
             />
           </Form.Item>

+ 21 - 3
src/store/action/C1ledger.ts

@@ -1,4 +1,5 @@
 import http from '@/utils/http'
+import { AppDispatch } from '..'
 
 /**
  * 藏品-新增 /编辑
@@ -16,9 +17,26 @@ export const API_goodsInfo = (id: number) => {
   return http.get(`cms/goods/detail/${id}`)
 }
 
-/**
- * 从已存在的藏品中添加
- */
 export const API_goodsNowAdd = (url: string, data: any) => {
   return http.post(url, data)
 }
+
+/**
+ * 总账-获取分页列表
+ */
+export const C1_APIgetList = (data: any, exportFlag?: boolean): any => {
+  if (exportFlag) return http.post('cms/goods/page', data)
+  else {
+    return async (dispatch: AppDispatch) => {
+      const res = await http.post('cms/goods/page', data)
+      if (res.code === 0) {
+        const obj = {
+          list: res.data.records,
+          total: res.data.total
+        }
+
+        dispatch({ type: 'C1/getList', payload: obj })
+      }
+    }
+  }
+}

+ 28 - 0
src/store/reducer/C1ledger.ts

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

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

@@ -4,6 +4,7 @@ import { combineReducers } from 'redux'
 // 导入 登录 模块的 reducer
 import A0Layout from './layout'
 import FourAll from './FourAll'
+import C1ledger from './C1ledger'
 import C2files from './C2files'
 import D2storSet from './D2storSet'
 import D4impStor from './D4impStor'
@@ -20,6 +21,7 @@ import Z7log from './Z7log'
 const rootReducer = combineReducers({
   A0Layout,
   FourAll,
+  C1ledger,
   C2files,
   D2storSet,
   D4impStor,

+ 27 - 15
src/utils/history.ts

@@ -6,6 +6,7 @@ import { getTokenInfo } from './storage'
 import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
 import { TypeZ4Tree } from '@/pages/Z_system/Z4organization/type'
 import { KuIsTreeType } from '@/pages/D_storeManage/D4impStor/type'
+import { cascaderArr } from '@/pages/B_enterTibet/B3goodsTable/B3GaddNew/data'
 const history = createHashHistory()
 export default history
 
@@ -169,9 +170,8 @@ export const btnFlagFu = (item: FourTableType) => {
   }
   if (Reflect.get(obj, status)) Reflect.get(obj, status)()
 
-  // return flagObj
-  // 待完善
-  return { 查看: true, 编辑: true, 删除: true, 审批: true, 盘点: true }
+  return flagObj
+  // return { 查看: true, 编辑: true, 删除: true, 审批: true, 盘点: true }
 }
 
 // -------------------详情页面的按钮权限-------------------
@@ -241,18 +241,17 @@ export const btnFlagFu2 = (item: FourTableType) => {
   }
   if (Reflect.get(obj, status)) Reflect.get(obj, status)()
 
-  // return flagObj
-  // 待完善
-  return {
-    创建: true,
-    提交: true,
-    撤回: true,
-    审批: true,
-    编辑: true,
-    重新提交: true,
-    删除: true,
-    盘点: true
-  }
+  return flagObj
+  // return {
+  //   创建: true,
+  //   提交: true,
+  //   撤回: true,
+  //   审批: true,
+  //   编辑: true,
+  //   重新提交: true,
+  //   删除: true,
+  //   盘点: true
+  // }
 }
 
 // -------------------排架层数库位平铺转树结构-------------------
@@ -335,3 +334,16 @@ export const ruTransformDataFu = (data: any[]): any[] => {
     siteStr: `${regionBaseIdCache[item.regionName]},${item.layer1},${item.layer2},${item.layer3}`
   }))
 }
+
+// ---------------所有级联的数据平铺-------------------
+export const cascaderObjFu = (): any => {
+  if (dictAll && dictAll.length === 0) {
+    dictAll = store.getState().Z1dict.dictAll
+  }
+
+  let obj: any = {}
+  if (dictAll && dictAll.length) {
+    obj = cascaderArr(dictAll)
+  }
+  return obj
+}

+ 2 - 2
src/utils/http.ts

@@ -8,8 +8,8 @@ import { domShowFu } from './domShow'
 const envFlag = process.env.NODE_ENV === 'development'
 
 // 待完善
-const baseUrlTemp = 'https://sit-yiwubwg.4dage.com' // 测试环境
-// const baseUrlTemp = 'http://192.168.20.61:8096' // 线下环境
+// const baseUrlTemp = 'https://sit-yiwubwg.4dage.com' // 测试环境
+const baseUrlTemp = 'http://192.168.20.61:8096' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')
 

+ 19 - 23
src/utils/tableData.ts

@@ -17,11 +17,17 @@
 import { selectObj } from './select'
 
 // 库存状态obj
-const statusStorageObj: any = {}
+export const statusStorageObj: any = {}
 selectObj['库存状态'].forEach(v => {
   statusStorageObj[v.value] = v.label
 })
 
+// 入藏状态obj
+export const statusCollectObj: any = {}
+selectObj['入藏状态'].forEach(v => {
+  statusCollectObj[v.value] = v.label
+})
+
 // 待完善
 export const B1TableC = [
   ['txt', '线索名称', 'description'],
@@ -81,24 +87,23 @@ export const B3tableC = [
   ['txtChange', '申请状态', 'status', statusObj]
 ]
 
-// 待完善
 export const C1tableC = [
   ['img', '封面图', 'thumb'],
-  ['txt', '编号类型', 'xxx'],
-  ['txt', '藏品名称', 'xxx'],
-  ['txt', '文物级别', 'xxx'],
-  ['txt', '文物类别', 'xxx'],
-  ['txt', '年代', 'xxx'],
-  ['txt', '质地', 'xxx'],
-  ['txt', '完残程度', 'xxx'],
-  ['txt', '来源', 'xxx'],
-  ['txt', '入藏状态', 'xxx'],
-  ['txt', '库存状态', 'xxx']
+  ['txt', '编号类型', 'numName'],
+  ['txt', '藏品名称', 'name'],
+  ['txt', '文物级别', 'dictLevel'],
+  ['txtC', '文物类别', 'dictType'],
+  ['txtC', '年代', 'dictAge'],
+  ['txtC', '质地', 'dictTexture3'],
+  ['txtC', '完残程度', 'dictTorn'],
+  ['txtC', '来源', 'source'],
+  ['txtChange', '入藏状态', 'statusCollect', statusCollectObj],
+  ['txtChange', '库存状态', 'statusStorage', statusStorageObj]
 ]
 
 export const C2tableC = [
-  ['txt', '藏品名称', 'goodNumName'],
-  ['txt', '编号类型', '待完善'],
+  ['txt', '藏品名称', 'goodName'],
+  ['txt', '编号类型', 'goodNumName'],
   ['txt', '藏品编号', 'goodNum'],
   ['txt', '附件名称', 'fileName'],
   ['txt', '上传日期', 'updateTime'],
@@ -168,15 +173,6 @@ export const D4goodsTableC = [
 ]
 
 // 待完善
-export const D6goodsTableC = [
-  ['img', '封面图', 'thumb'],
-  ['txt', '编号类型', 'numName'],
-  ['txt', '藏品名称', 'name'],
-  ['ping', '数量', 'pcs', 'pcsUnit'],
-  ['txt', '库存状态', 'userName']
-]
-
-// 待完善
 export const Y22tableC = [
   ['txt', '库存信息', 'xxxx'],
   ['txt', '库存详情', 'description']