chenlei 3 月之前
父节点
当前提交
285edf55d8

+ 19 - 1
src/components/MyTable/index.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
-import { Table } from 'antd'
+import { DatePicker, Input, Table } from 'antd'
 import ImageLazy from '../ImageLazy'
 import classNames from 'classnames'
 import { resJiLianFu } from '@/utils/history'
@@ -173,6 +173,24 @@ function MyTable({
           }
 
           return tempCom
+        },
+        input: (item: any) => {
+          return (
+            <Input
+              allowClear
+              value={item[v[2]]}
+              maxLength={v[3]?.maxLength}
+              placeholder={v[3]?.placeholder || '请输入'}
+              // @ts-ignore
+              onInput={v => (item[v[2]] = v.target.value)}
+            />
+          )
+        },
+        datePicker: (item: any) => {
+          return (
+            // @ts-ignore
+            <DatePicker onChange={v => (item[v[2]] = v)} />
+          )
         }
       }
 

+ 6 - 0
src/pages/A_workbench/A3flow/index.module.scss

@@ -58,5 +58,11 @@
       margin: 15px 0;
       justify-content: flex-end;
     }
+    .ant-select-selection-placeholder {
+      color: black !important;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 1 - 1
src/pages/A_workbench/A3flow/index.tsx

@@ -259,7 +259,7 @@ function A3flow() {
 
       {/* 表格 */}
       <MyTable
-        yHeight={595}
+        yHeight={580}
         list={tableInfo.list}
         columnsTemp={A3FLOW_TABLE_COLUMNS}
         lastBtn={tableLastBtn}

+ 17 - 0
src/pages/A_workbench/A4voucher/constants.ts

@@ -0,0 +1,17 @@
+import { selectObj } from '@/utils/select'
+import { A4voucherSearchType, IA4voucherParams } from './types'
+
+export const DEFAULT_A4VOUCHER_PARAMS: IA4voucherParams = {
+  pageNum: 1,
+  pageSize: 10,
+  num: ''
+}
+
+export const A4VOUCHER_PARAM_ROWS: A4voucherSearchType[] = [
+  { name: '凭证名称', key: 'num', type: '输入框' },
+  { name: '归档日期范围', key: 'num', type: '日期选择' },
+  { name: '业务类型', key: 'num', type: '下拉框', data: selectObj['业务类型'] },
+  { name: '业务编号', key: 'num', type: '输入框' }
+]
+
+export const A4VOUCHER_TABLE_COLUMNS = [['txt', '业务编号', 'num']]

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

@@ -1,4 +1,67 @@
 .A4voucher {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px 24px 0;
+  position: relative;
   :global {
+    .C1top {
+      display: flex;
+      justify-content: space-between;
+      .C1topll {
+        display: flex;
+        & > div {
+          display: flex;
+          align-items: center;
+          position: relative;
+          &:not(:last-child) {
+            margin-right: 15px;
+          }
+          & > span {
+            position: absolute;
+            top: -18px;
+            left: 0;
+            pointer-events: none;
+          }
+        }
+      }
+
+      .C1toprrSuo {
+        width: 100%;
+        margin-top: 15px;
+        text-align: right;
+      }
+
+      .C1toprrKai {
+        position: relative;
+        top: 10px;
+        width: 310px;
+        height: 84px;
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: center;
+      }
+
+      .C1topllAll {
+        width: 100%;
+        & > div {
+          flex: 1;
+          .ant-input,
+          .ant-select,
+          .ant-picker {
+            width: 100%;
+          }
+        }
+      }
+    }
+    .C1top2 {
+      margin: 15px 0;
+      justify-content: flex-end;
+    }
+    .ant-select-selection-placeholder {
+      color: black !important;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 204 - 2
src/pages/A_workbench/A4voucher/index.tsx

@@ -1,10 +1,212 @@
-import React from 'react'
+import React, { useCallback, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { Button, Checkbox, DatePicker, Input, Select } from 'antd'
+import MyTable from '@/components/MyTable'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { A4voucherSearchType, IA4voucherParams } from './types'
+import history, { btnFlagFu } from '@/utils/history'
+import {
+  A4VOUCHER_PARAM_ROWS,
+  A4VOUCHER_TABLE_COLUMNS,
+  DEFAULT_A4VOUCHER_PARAMS
+} from './constants'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { A3_APIList } from '@/store/action/A3flow'
+
+const { RangePicker } = DatePicker
+
 function A4voucher() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.F1exhibition.tableInfo)
+  const [formData, setFormData] = useState({ ...DEFAULT_A4VOUCHER_PARAMS })
+  const formDataRef = useRef({ ...DEFAULT_A4VOUCHER_PARAMS })
+  const dispatch = useDispatch()
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: keyof IA4voucherParams) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 顶部筛选
+  const searchDom = useCallback(
+    (arr: A4voucherSearchType[]) => {
+      return arr.map(item => {
+        return (
+          <div key={item.name}>
+            <span>{item.name}:</span>
+            {item.type === '输入框' ? (
+              <Input
+                placeholder='请输入'
+                maxLength={30}
+                value={formData[item.key]}
+                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 })}
+              />
+            ) : item.type === '日期选择' ? (
+              <RangePicker
+                format='YYYY-MM-DD'
+                allowClear={true}
+                onChange={(e, dateStrings) => setFormData({ ...formData, [item.key]: dateStrings })}
+              />
+            ) : null}
+          </div>
+        )
+      })
+    },
+    [formData, txtChangeFu]
+  )
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData({ ...DEFAULT_A4VOUCHER_PARAMS })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    const { date, ...rest } = formDataRef.current
+    if (Array.isArray(date) && date.length) {
+      // @ts-ignore
+      rest.startTime = date[0]
+      // @ts-ignore
+      rest.endTime = date[1]
+    }
+    dispatch(A3_APIList(rest))
+  }, [dispatch])
+
+  // 点击操作按钮
+  const tableBtnFu = useCallback((item: any, key: string) => {}, [])
+
+  // 点击删除
+  const delTableFu = useCallback(async (item: any) => {}, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          let obj = btnFlagFu(item)
+          return !Object.values(obj).some(Boolean) ? (
+            '-'
+          ) : (
+            <>
+              {obj['编辑'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '2')}>
+                  编辑
+                </Button>
+              ) : null}
+
+              {obj['审批'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '3')}>
+                  审批
+                </Button>
+              ) : null}
+              {obj['查看'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '4')}>
+                  查看
+                </Button>
+              ) : null}
+
+              {obj['删除'] ? <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item)} /> : null}
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, tableBtnFu])
+
+  // 多选
+  const [checkArr, setCheckArr] = useState<number[]>([])
+
+  const checkFu = useCallback(
+    (id: number) => {
+      if (checkArr.includes(id)) setCheckArr(checkArr.filter(v => v !== id))
+      else setCheckArr([...checkArr, id])
+    },
+    [checkArr]
+  )
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '选择',
+        width: 60,
+        render: (item: any) => (
+          <Checkbox checked={checkArr.includes(item.id)} onChange={() => checkFu(item.id)} />
+        )
+      }
+    ]
+  }, [checkArr, checkFu])
+
   return (
     <div className={styles.A4voucher}>
       <div className='pageTitle'>凭证管理</div>
-      <p>待开发</p>
+
+      {/* 第一行 */}
+      <div className='C1top'>
+        <div className='C1topll C1topllAll'>{searchDom(A4VOUCHER_PARAM_ROWS)}</div>
+      </div>
+
+      {/* 第二行 */}
+      <div className='C1top C1top2'>
+        <Button type='primary'>批量导出</Button>
+        &emsp;
+        <Button type='primary' onClick={clickSearch}>
+          查询
+        </Button>
+        &emsp;
+        <Button onClick={resetSelectFu}>重置</Button>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={580}
+        list={tableInfo.list}
+        columnsTemp={A4VOUCHER_TABLE_COLUMNS}
+        startBtn={startBtn}
+        lastBtn={tableLastBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={tableInfo.total}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
     </div>
   )
 }

+ 19 - 0
src/pages/A_workbench/A4voucher/types.ts

@@ -0,0 +1,19 @@
+export type A4voucherItemType = {
+  id: number
+  num: string
+  name: string
+}
+
+export type A4voucherSearchType = {
+  name: string
+  key: keyof IA4voucherParams
+  type: '输入框' | '下拉框' | '级联' | '日期选择'
+  data?: any[]
+}
+
+export interface IA4voucherParams {
+  pageSize: number
+  pageNum: number
+  num: string
+  date?: string[]
+}

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

@@ -0,0 +1,125 @@
+.C21edit {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 15px 24px 0px;
+  :global {
+    .D4Tit {
+      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;
+      }
+    }
+    .D4main {
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .D4rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .D4row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          .D4rowll {
+            width: 120px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d4f;
+            }
+          }
+          .D4rowrr {
+            width: calc(100% - 120px);
+            .ant-input-affix-wrapper {
+              width: 300px;
+            }
+            .ant-select {
+              width: 300px;
+            }
+          }
+        }
+        .D4row2 {
+          align-items: self-start;
+          .D4rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+        .D4row3 {
+          position: relative;
+          top: 4px;
+        }
+
+        .D4rowFull {
+          width: 100%;
+          margin-top: -20px;
+          align-items: self-start;
+          margin-bottom: 0;
+          .D4rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+      }
+      // 藏品清单
+      .D4googsBox {
+        padding-right: 20px;
+        .D1GtNum {
+          cursor: pointer;
+          text-decoration: underline;
+          // &:hover {
+          //   color: var(--themeColor);
+          // }
+        }
+
+        .D1GtNumAc {
+          color: var(--themeColor);
+        }
+      }
+      .D4Tit2 {
+        margin-top: 24px;
+        display: flex;
+        justify-content: space-between;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 20px;
+        .D4Tit2ll {
+          font-size: 18px;
+          font-weight: 700;
+          padding-left: 18px;
+          margin-bottom: 17px;
+          color: var(--themeColor);
+        }
+        .D4Tit2rr {
+          position: relative;
+          z-index: 2;
+          .ant-btn {
+            margin-left: 15px;
+          }
+        }
+      }
+    }
+
+    .D4btn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
+  }
+}

+ 554 - 0
src/pages/C_goodsManage/C21wealth/C21edit/index.tsx

@@ -0,0 +1,554 @@
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { useParams } from 'react-router-dom'
+import { Button, Input, Select } from 'antd'
+import ZRichTexts from '@/components/ZRichTexts'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import history, { btnFlagFu2, openGoodsInfoFu } from '@/utils/history'
+import { MessageFu } from '@/utils/message'
+import MyTable from '@/components/MyTable'
+import classNames from 'classnames'
+import { D4goodsTableC, statusObj } from '@/utils/tableData'
+import ZGaddNow from '@/components/ZGaddNow'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import ZflowTable from '@/components/ZflowTable'
+import {
+  D4_APIcreate,
+  D4_APIdel,
+  D4_APIgetInfo,
+  D4_APIrevocation,
+  D4_APIsaveApply,
+  D4_APIsaveAudit,
+  D4_APIsaveCreate,
+  D4_APIsaveDraft
+} from '@/store/action/D4impStor'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { D2_APIgetList } from '@/store/action/D2storSet'
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+import { EXbtnFu } from '@/utils/EXBtn'
+import { D6_APIgetList } from '@/store/action/D6putsStor'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+
+export const pageTitTxtObj = {
+  1: '新增',
+  2: '编辑',
+  3: '审批',
+  4: '查看'
+}
+
+function C21edit() {
+  const { key, id } = useParams<any>()
+  // key:1 新增 2编辑 3审批 4查看
+
+  // 滚到顶部
+  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)
+
+  // 入库库房数组信息
+  useEffect(() => {
+    dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  // 创建订单
+  const creatFu = useCallback(async () => {
+    const res = await D4_APIcreate()
+    if (res.code === 0) {
+      setTopInfo(res.data)
+    }
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(async () => {
+    const res = await D4_APIgetInfo(id)
+    if (res.code === 0) {
+      setTopInfo(res.data)
+
+      // 设置富文本
+      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
+    }
+  }, [id])
+
+  useEffect(() => {
+    if (key === '1') creatFu()
+    else getInfoFu()
+
+    if (sollrDom.current) sollrDom.current.scrollTop = 0
+  }, [creatFu, getInfoFu, key])
+
+  // 上传附件的ref
+  const filesRef = useRef<any>(null)
+  // const filesRes = filesRef.current.filesIdRes();
+
+  // 富文本的ref
+  const ZRichTextRef = useRef<any>(null)
+
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+
+  const pageTitTxt = useMemo(() => {
+    return Reflect.get(pageTitTxtObj, key)
+  }, [key])
+
+  const checkDataFu = useCallback(() => {
+    if (!topInfo.name) {
+      MessageFu.warning('申请名称不能为空')
+      return true
+    }
+    if (!topInfo.sonTypeName) {
+      MessageFu.warning('请选择业务类型')
+      return true
+    }
+    if (!topInfo.storageId) {
+      MessageFu.warning('请选择入库库房')
+      return true
+    }
+
+    return false
+  }, [topInfo])
+
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+
+  // 新增的底部按钮点击
+  const btnClickFu = useCallback(
+    async (val: '草稿' | '创建' | '保存' | '审批') => {
+      if (checkDataFu()) return
+
+      if (val !== '草稿') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        } else {
+          if (topInfo.goods.some(v => !v.siteStr || !v.siteId)) {
+            return MessageFu.warning('请选择存放位置')
+          }
+        }
+      }
+
+      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 D4_APIsaveAudit({
+          orderId: topInfo.id,
+          rtfOpinion: rtf2,
+          status: auditSta === '同意' ? 1 : 2
+        })
+
+        if (res.code === 0) {
+          MessageFu.success('审批成功')
+          // 跳详情页
+          history.push(`/wealth_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(','),
+          goods: topInfo.goods.map(v => ({
+            goodsId: v.id,
+            siteId: v.siteId
+          }))
+        }
+        // console.log(123, obj)
+
+        // if (1 + 1 === 2) return
+
+        if (val === '草稿') {
+          // 存草稿 当前页保存 不跳转
+          const res = await D4_APIsaveDraft(obj)
+          if (res.code === 0) {
+            MessageFu.success('草稿保存成功')
+          }
+        } else {
+          const res = val === '创建' ? await D4_APIsaveCreate(obj) : await D4_APIsaveApply(obj)
+          if (res.code === 0) {
+            MessageFu.success(`${val}成功`)
+            // 跳到详情页
+            history.push(`/impStor_edit/4/${topInfo.id}`)
+          }
+        }
+      }
+    },
+    [auditSta, checkDataFu, topInfo]
+  )
+
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '藏品编号',
+        render: (item: C1GoodType) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num}
+            </span>
+          )
+        }
+      }
+    ]
+  }, [cathet])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: C1GoodType) => {
+          return (
+            <>
+              <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
+                查看
+              </Button>
+              {['3', '4'].includes(key) ? null : (
+                <MyPopconfirm
+                  txtK='删除'
+                  onConfirm={() =>
+                    setTopInfo({
+                      ...topInfo,
+                      goods: topInfo.goods.filter(v => v.id !== item.id)
+                    })
+                  }
+                />
+              )}
+            </>
+          )
+        }
+      }
+    ]
+  }, [key, topInfo])
+
+  // 点击新增
+  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+
+  // 查看的按钮创建-提交-撤回
+  const lookBtnFu = useCallback(
+    async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        } else {
+          if (topInfo.goods.some(v => !v.siteStr || !v.siteId)) {
+            return MessageFu.warning('请选择存放位置')
+          }
+        }
+      }
+
+      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(','),
+        goods: topInfo.goods.map(v => ({
+          goodsId: v.id,
+          siteId: v.siteId
+        }))
+      }
+
+      const res =
+        val === '创建'
+          ? await D4_APIsaveCreate(obj)
+          : val === '提交'
+          ? await D4_APIsaveApply(obj)
+          : await D4_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 D4_APIdel(id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/impStor')
+    }
+  }, [id])
+
+  // 查看模式点击审批 编辑
+  const lookJumpFu = useCallback(
+    (val: '审批' | '编辑') => {
+      history.push(`/impStor_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(topInfo)}
+
+        {btnFlagFu2(topInfo)['删除'] ? (
+          <MyPopconfirm
+            txtK='删除'
+            onConfirm={() => delFu()}
+            Dom={
+              <Button type='primary' danger>
+                删除
+              </Button>
+            }
+          />
+        ) : null}
+
+        <Button onClick={() => history.push('/impStor')}>返回</Button>
+      </>
+    )
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+
+  // 申请记录
+  const [auditsShow, setAuditsShow] = useState(false)
+
+  return (
+    <div className={styles.C21edit}>
+      <div className='pageTitle'>资源使用-{pageTitTxt}</div>
+
+      <div className='D4main' ref={sollrDom}>
+        {['3'].includes(key) ? (
+          <X3auditInfo
+            dirCode='D4impStor'
+            myUrl='cms/orderIn/upload'
+            auditSta={auditSta}
+            auditStaFu={val => setAuDitSta(val)}
+            ref={ZAuditRef}
+          />
+        ) : null}
+
+        {/* 表单字段、附件等 */}
+        <div className='D4Tit'>
+          申请信息
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
+        </div>
+        <div className='D4rowAll'>
+          <div className='D4row'>
+            <div className='D4rowll'>业务单号:</div>
+            <div className='D4rowrr'>--</div>
+          </div>
+
+          <div className='D4row'>
+            <div className='D4rowll'>业务名称:</div>
+            <div className='D4rowrr'>--</div>
+          </div>
+
+          <div className='D4row'>
+            <div className='D4rowll'>发起人:</div>
+            <div className='D4rowrr'>--</div>
+          </div>
+
+          <div className='D4row'>
+            <div className='D4rowll'>发起部门:</div>
+            <div className='D4rowrr'>--</div>
+          </div>
+
+          <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>
+
+          <div className='D4row'>
+            <div className='D4rowll'>原因事由:</div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.reason}
+                onChange={e => setTopInfo({ ...topInfo, reason: e.target.value })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+
+          <div className='D4row D4rowFull'>
+            <div className='D4rowll'>备注:</div>
+            <div className='D4rowrr'>
+              <ZRichTexts
+                check={false}
+                dirCode='impStor'
+                myUrl='cms/orderIn/upload'
+                isLook={['3', '4'].includes(key)}
+                ref={ZRichTextRef}
+                isOne={true}
+                upAudioBtnNone={true}
+              />
+            </div>
+          </div>
+        </div>
+
+        {/* 藏品清单 */}
+        <div className='D4googsBox'>
+          <div className='D4Tit2'>
+            <div className='D4Tit2ll'>藏品清单</div>
+            <div className='D4Tit2rr'>
+              {['3', '4'].includes(key) ? null : (
+                <>
+                  <Button
+                    type='primary'
+                    onClick={() => {
+                      if (!topInfo.storageId) return MessageFu.warning('请先选择入库库房')
+                      setNowSta({ key: '5', id: 'cms/orderIn/goods/getList' })
+                    }}
+                  >
+                    新增
+                  </Button>
+                </>
+              )}
+            </div>
+          </div>
+
+          {/* 表格 */}
+          <MyTable
+            list={topInfo.goods || []}
+            columnsTemp={D4goodsTableC}
+            startBtn={startBtn}
+            lastBtn={tableLastBtn}
+            pagingInfo={false}
+          />
+        </div>
+
+        {/* 申请流程 */}
+        {auditsShow ? (
+          <ZflowTable tableArr={topInfo.audits || []} closeFu={() => setAuditsShow(false)} />
+        ) : null}
+      </div>
+
+      {/* 底部按钮 */}
+      <div className='D4btn'>
+        {['3', '4'].includes(key) && topInfo.audits && topInfo.audits.length ? (
+          <Button type='primary' onClick={() => setAuditsShow(true)}>
+            申请记录
+          </Button>
+        ) : null}
+
+        {key === '4' ? (
+          lookBtn
+        ) : (
+          <>
+            {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('草稿')}>
+                存草稿
+              </Button>
+            ) : null}
+
+            <MyPopconfirm txtK='取消' onConfirm={() => history.push('/impStor')} />
+          </>
+        )}
+      </div>
+
+      {/* 新增弹窗 */}
+      {nowSta.id ? (
+        <ZGaddNow
+          nowSta={nowSta}
+          closeFu={() => setNowSta({ key: '', id: '' })}
+          dataResFu={data => setTopInfo({ ...topInfo, goods: data })}
+          oldCheckArr={topInfo.goods || []}
+          canObj={{ storageId: topInfo.storageId }}
+        />
+      ) : null}
+    </div>
+  )
+}
+
+const MemoC21edit = React.memo(C21edit)
+
+export default MemoC21edit

+ 42 - 0
src/pages/C_goodsManage/C21wealth/constants.ts

@@ -0,0 +1,42 @@
+import { selectObj } from '@/utils/select'
+import { C21WealthSearchType, IC21WealthParams } from './types'
+import { statusStorageObj } from '@/utils/tableData'
+
+export const DEFAULT_C21WEALTH_PARAMS: IC21WealthParams = {
+  pageNum: 1,
+  pageSize: 10,
+  num: ''
+}
+
+export const C21WEALTH_PARAM_ROWS: C21WealthSearchType[] = [
+  { name: '业务编号', key: 'num', type: '输入框' },
+  { name: '展览名称', key: 'num', type: '输入框' },
+  { name: '展览类型', key: 'num', type: '下拉框', data: selectObj['业务类型'] },
+  { name: '借展类型', key: 'num', type: '下拉框', data: selectObj['业务类型'] },
+  { name: '借展单位/部门', key: 'num', type: '输入框' },
+  { name: '发起人', key: 'num', type: '输入框' },
+  { name: '发起日期范围', key: 'num', type: '日期选择' },
+  { name: '申请状态', key: 'num', type: '下拉框', data: selectObj['流程申请状态'] }
+]
+
+export const C21WEALTH_TABLE_COLUMNS = [['txt', '业务编号', 'num']]
+
+export const C21WEALTH_COLUMNS = [
+  ['img', '封面图', 'thumb'],
+  ['txt', '编号类型', 'numName'],
+  ['txt', '藏品编号', 'goodsNum'],
+  ['txt', '藏品名称', 'goodsName'],
+  ['ping', '数量', 'pcs', 'pcsUnit'],
+  ['txtChange', '库存状态', 'statusStorage', statusStorageObj],
+  [
+    'input',
+    '放置位置',
+    'address',
+    {
+      maxLength: 20,
+      placeholder: '请填写内容,不超过20字'
+    }
+  ],
+  ['datePicker', '借出日期 *', 'startDate'],
+  ['datePicker', '预计归还日期 *', 'endDate']
+]

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

@@ -1,4 +1,68 @@
 .C21wealth {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px 24px 0;
+  position: relative;
   :global {
+    .C1top {
+      display: flex;
+      justify-content: space-between;
+      .C1topll {
+        display: flex;
+        & > div {
+          display: flex;
+          align-items: center;
+          position: relative;
+          &:not(:last-child) {
+            margin-right: 15px;
+          }
+          & > span {
+            position: absolute;
+            top: -18px;
+            left: 0;
+            pointer-events: none;
+          }
+        }
+      }
+
+      .C1toprrSuo {
+        width: 100%;
+        margin-top: 15px;
+        text-align: right;
+      }
+
+      .C1toprrKai {
+        position: relative;
+        top: 10px;
+        width: 310px;
+        height: 84px;
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: center;
+      }
+
+      .C1topllAll {
+        width: 100%;
+        & > div {
+          flex: 1;
+          .ant-input {
+            width: 100%;
+          }
+          .ant-select {
+            width: 100%;
+          }
+        }
+      }
+    }
+    .C1top2 {
+      margin: 15px 0;
+      justify-content: flex-end;
+    }
+    .ant-select-selection-placeholder {
+      color: black !important;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 205 - 2
src/pages/C_goodsManage/C21wealth/index.tsx

@@ -1,10 +1,213 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { Button, Cascader, DatePicker, Input, Select } from 'antd'
+import { A3_APIList } from '@/store/action/A3flow'
+import history, { btnFlagFu } from '@/utils/history'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import MyTable from '@/components/MyTable'
+import {
+  C21WEALTH_PARAM_ROWS,
+  C21WEALTH_TABLE_COLUMNS,
+  DEFAULT_C21WEALTH_PARAMS
+} from './constants'
+import { C21WealthSearchType, IC21WealthParams } from './types'
+
+const { RangePicker } = DatePicker
+
 function C21wealth() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.F1exhibition.tableInfo)
+  const [formData, setFormData] = useState({ ...DEFAULT_C21WEALTH_PARAMS })
+  const formDataRef = useRef({ ...DEFAULT_C21WEALTH_PARAMS })
+  const dispatch = useDispatch()
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: keyof IC21WealthParams) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 顶部筛选
+  const searchDom = useCallback(
+    (arr: C21WealthSearchType[]) => {
+      return arr.map(item => {
+        return (
+          <div key={item.name}>
+            <span>{item.name}:</span>
+            {item.type === '输入框' ? (
+              <Input
+                placeholder='请输入'
+                maxLength={30}
+                value={formData[item.key]}
+                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 })}
+              />
+            ) : item.type === '日期选择' ? (
+              <RangePicker
+                format='YYYY-MM-DD'
+                allowClear={true}
+                onChange={(e, dateStrings) => setFormData({ ...formData, [item.key]: dateStrings })}
+              />
+            ) : (
+              <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 [timeKey, setTimeKey] = useState(0)
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData({ ...DEFAULT_C21WEALTH_PARAMS })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    const { date, ...rest } = formDataRef.current
+    if (Array.isArray(date) && date.length) {
+      // @ts-ignore
+      rest.startTime = date[0]
+      // @ts-ignore
+      rest.endTime = date[1]
+    }
+    dispatch(A3_APIList(rest))
+  }, [dispatch])
+
+  // 点击操作按钮
+  const tableBtnFu = useCallback((item: any, key: string) => {}, [])
+
+  // 点击删除
+  const delTableFu = useCallback(async (item: any) => {}, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          let obj = btnFlagFu(item)
+          return !Object.values(obj).some(Boolean) ? (
+            '-'
+          ) : (
+            <>
+              {obj['编辑'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '2')}>
+                  编辑
+                </Button>
+              ) : null}
+
+              {obj['审批'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '3')}>
+                  审批
+                </Button>
+              ) : null}
+              {obj['查看'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '4')}>
+                  查看
+                </Button>
+              ) : null}
+
+              {obj['删除'] ? <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item)} /> : null}
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, tableBtnFu])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
   return (
     <div className={styles.C21wealth}>
       <div className='pageTitle'>资源使用</div>
-      <p>待开发</p>
+
+      {/* 第一行 */}
+      <div className='C1top'>
+        <div className='C1topll C1topllAll'>{searchDom(C21WEALTH_PARAM_ROWS)}</div>
+      </div>
+
+      {/* 第二行 */}
+      <div className='C1top C1top2'>
+        <Button type='primary'>批量导出</Button>
+        &emsp;
+        <Button type='primary' onClick={() => history.push('/wealth_edit/1/null')}>
+          新增
+        </Button>
+        &emsp;
+        <Button type='primary' onClick={clickSearch}>
+          查询
+        </Button>
+        &emsp;
+        <Button onClick={resetSelectFu}>重置</Button>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={580}
+        list={tableInfo.list}
+        columnsTemp={C21WEALTH_TABLE_COLUMNS}
+        lastBtn={tableLastBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={tableInfo.total}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
     </div>
   )
 }

+ 19 - 0
src/pages/C_goodsManage/C21wealth/types.ts

@@ -0,0 +1,19 @@
+export type C21WealthItemType = {
+  id: number
+  num: string
+  name: string
+}
+
+export type C21WealthSearchType = {
+  name: string
+  key: keyof IC21WealthParams
+  type: '输入框' | '下拉框' | '级联' | '日期选择'
+  data?: any[]
+}
+
+export interface IC21WealthParams {
+  pageSize: number
+  pageNum: number
+  num: string
+  date?: string[]
+}

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

@@ -0,0 +1,125 @@
+.F1edit {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 15px 24px 0px;
+  :global {
+    .D4Tit {
+      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;
+      }
+    }
+    .D4main {
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .D4rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .D4row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          .D4rowll {
+            width: 120px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d4f;
+            }
+          }
+          .D4rowrr {
+            width: calc(100% - 120px);
+            .ant-input-affix-wrapper {
+              width: 300px;
+            }
+            .ant-select {
+              width: 300px;
+            }
+          }
+        }
+        .D4row2 {
+          align-items: self-start;
+          .D4rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+        .D4row3 {
+          position: relative;
+          top: 4px;
+        }
+
+        .D4rowFull {
+          width: 100%;
+          margin-top: -20px;
+          align-items: self-start;
+          margin-bottom: 0;
+          .D4rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+      }
+      // 藏品清单
+      .D4googsBox {
+        padding-right: 20px;
+        .D1GtNum {
+          cursor: pointer;
+          text-decoration: underline;
+          // &:hover {
+          //   color: var(--themeColor);
+          // }
+        }
+
+        .D1GtNumAc {
+          color: var(--themeColor);
+        }
+      }
+      .D4Tit2 {
+        margin-top: 24px;
+        display: flex;
+        justify-content: space-between;
+        padding-bottom: 10px;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 20px;
+        .D4Tit2ll {
+          font-size: 18px;
+          font-weight: 700;
+          padding-left: 18px;
+          margin-bottom: 17px;
+          color: var(--themeColor);
+        }
+        .D4Tit2rr {
+          position: relative;
+          z-index: 2;
+          .ant-btn {
+            margin-left: 15px;
+          }
+        }
+      }
+    }
+
+    .D4btn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
+  }
+}

+ 610 - 0
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -0,0 +1,610 @@
+import React, { useCallback, useMemo, useRef, useState } from 'react'
+import style from './index.module.scss'
+import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
+import { useParams } from 'react-router-dom'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import { Button, Input, Radio, Select } from 'antd'
+import { statusObj } from '@/utils/tableData'
+import ZRichTexts from '@/components/ZRichTexts'
+import MyTable from '@/components/MyTable'
+import { F1_GOOD_COLUMNS } from '../constants'
+import ZGaddNow from '@/components/ZGaddNow'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import history, { btnFlagFu2, openGoodsInfoFu } from '@/utils/history'
+import {
+  D4_APIdel,
+  D4_APIgetInfo,
+  D4_APIrevocation,
+  D4_APIsaveApply,
+  D4_APIsaveAudit,
+  D4_APIsaveCreate,
+  D4_APIsaveDraft
+} from '@/store/action/D4impStor'
+import { MessageFu } from '@/utils/message'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import { EXbtnFu } from '@/utils/EXBtn'
+
+function F1edit() {
+  const { key, id } = useParams<any>()
+  // 滚到顶部
+  const sollrDom = useRef<HTMLDivElement>(null)
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+  // 富文本的ref
+  const ZRichTextRef = useRef<any>(null)
+  // 点击新增
+  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+  // 申请记录
+  const [auditsShow, setAuditsShow] = useState(false)
+  // 上传附件的ref
+  const filesRef = useRef<any>(null)
+
+  const pageTitTxt = useMemo(() => {
+    return Reflect.get(pageTitTxtObj, key)
+  }, [key])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => (
+          <>
+            <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
+              查看
+            </Button>
+            {['3', '4'].includes(key) ? null : (
+              <MyPopconfirm
+                txtK='删除'
+                onConfirm={() =>
+                  setTopInfo({
+                    ...topInfo,
+                    goods: topInfo.goods.filter(v => v.id !== item.id)
+                  })
+                }
+              />
+            )}
+          </>
+        )
+      }
+    ]
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(async () => {
+    const res = await D4_APIgetInfo(id)
+    if (res.code === 0) {
+      setTopInfo(res.data)
+
+      // 设置富文本
+      ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
+    }
+  }, [id])
+
+  // 查看模式点击删除
+  const delFu = useCallback(async () => {
+    const res = await D4_APIdel(id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/impStor')
+    }
+  }, [id])
+
+  // 查看模式点击审批 编辑
+  const lookJumpFu = useCallback(
+    (val: '审批' | '编辑') => {
+      history.push(`/impStor_edit/${val === '审批' ? 3 : 2}/${id}`)
+      MessageFu.success(`已跳转至${val}页面`)
+    },
+    [id]
+  )
+
+  // 查看的按钮创建-提交-撤回
+  const lookBtnFu = useCallback(
+    async (val: '创建' | '提交' | '撤回') => {
+      if (val !== '撤回') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        } else {
+          if (topInfo.goods.some(v => !v.siteStr || !v.siteId)) {
+            return MessageFu.warning('请选择存放位置')
+          }
+        }
+      }
+
+      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(','),
+        goods: topInfo.goods.map(v => ({
+          goodsId: v.id,
+          siteId: v.siteId
+        }))
+      }
+
+      const res =
+        val === '创建'
+          ? await D4_APIsaveCreate(obj)
+          : val === '提交'
+          ? await D4_APIsaveApply(obj)
+          : await D4_APIrevocation(id)
+
+      if (res.code === 0) {
+        if (sollrDom.current) sollrDom.current.scrollTop = 0
+        MessageFu.success(val + '成功')
+        getInfoFu()
+      }
+    },
+    [getInfoFu, id, topInfo]
+  )
+
+  // 查看模式下的按钮
+  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(topInfo)}
+
+        {btnFlagFu2(topInfo)['删除'] ? (
+          <MyPopconfirm
+            txtK='删除'
+            onConfirm={() => delFu()}
+            Dom={
+              <Button type='primary' danger>
+                删除
+              </Button>
+            }
+          />
+        ) : null}
+
+        <Button onClick={() => history.push('/impStor')}>返回</Button>
+      </>
+    )
+  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+
+  const checkDataFu = useCallback(() => {
+    if (!topInfo.name) {
+      MessageFu.warning('申请名称不能为空')
+      return true
+    }
+    if (!topInfo.sonTypeName) {
+      MessageFu.warning('请选择业务类型')
+      return true
+    }
+    if (!topInfo.storageId) {
+      MessageFu.warning('请选择入库库房')
+      return true
+    }
+
+    return false
+  }, [topInfo])
+
+  // 新增的底部按钮点击
+  const btnClickFu = useCallback(
+    async (val: '草稿' | '创建' | '保存' | '审批') => {
+      if (checkDataFu()) return
+
+      if (val !== '草稿') {
+        if (!topInfo.goods || (topInfo.goods && topInfo.goods.length === 0)) {
+          return MessageFu.warning('请添加藏品')
+        } else {
+          if (topInfo.goods.some(v => !v.siteStr || !v.siteId)) {
+            return MessageFu.warning('请选择存放位置')
+          }
+        }
+      }
+
+      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 D4_APIsaveAudit({
+          orderId: topInfo.id,
+          rtfOpinion: rtf2,
+          status: auditSta === '同意' ? 1 : 2
+        })
+
+        if (res.code === 0) {
+          MessageFu.success('审批成功')
+          // 跳详情页
+          history.push(`/impStor_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(','),
+          goods: topInfo.goods.map(v => ({
+            goodsId: v.id,
+            siteId: v.siteId
+          }))
+        }
+        // console.log(123, obj)
+
+        // if (1 + 1 === 2) return
+
+        if (val === '草稿') {
+          // 存草稿 当前页保存 不跳转
+          const res = await D4_APIsaveDraft(obj)
+          if (res.code === 0) {
+            MessageFu.success('草稿保存成功')
+          }
+        } else {
+          const res = val === '创建' ? await D4_APIsaveCreate(obj) : await D4_APIsaveApply(obj)
+          if (res.code === 0) {
+            MessageFu.success(`${val}成功`)
+            // 跳到详情页
+            history.push(`/impStor_edit/4/${topInfo.id}`)
+          }
+        }
+      }
+    },
+    [auditSta, checkDataFu, topInfo]
+  )
+
+  return (
+    <div className={style.F1edit}>
+      <div className='pageTitle'>借展管理-{pageTitTxt}</div>
+
+      <div className='D4main' ref={sollrDom}>
+        {['3'].includes(key) ? (
+          <X3auditInfo
+            dirCode='D4impStor'
+            myUrl='cms/orderIn/upload'
+            auditSta={auditSta}
+            auditStaFu={val => setAuDitSta(val)}
+            ref={ZAuditRef}
+          />
+        ) : null}
+
+        {/* 表单字段、附件等 */}
+        <div className='D4Tit'>
+          申请信息
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
+        </div>
+        <div className='D4rowAll'>
+          <div className='D4row'>
+            <div className='D4rowll'>业务单号:</div>
+            <div className='D4rowrr'>这是一段文本</div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>业务名称:</div>
+            <div className='D4rowrr'>这是一段文本</div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>发起人:</div>
+            <div className='D4rowrr'>这是一段文本</div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>发起部门:</div>
+            <div className='D4rowrr'>这是一段文本</div>
+          </div>
+        </div>
+
+        <div className='D4Tit'>展览信息</div>
+        <div className='D4rowAll'>
+          <div className='D4row'>
+            <div className='D4rowll'>
+              <span> * </span>展览名称:
+            </div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>
+              <span> * </span>借展类型:
+            </div>
+            <div className='D4rowrr'>
+              <Radio.Group>
+                <Radio>馆内展览</Radio>
+                <Radio>馆外展览</Radio>
+              </Radio.Group>
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>
+              <span> * </span>展览类型:
+            </div>
+            <div className='D4rowrr'>
+              <Select
+                options={[
+                  {
+                    value: 0,
+                    label: '临时展览'
+                  },
+                  {
+                    value: 1,
+                    label: '固定展览'
+                  }
+                ]}
+              />
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>提用审批单号:</div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>
+              <span> * </span>借展部门:
+            </div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>提退凭证号:</div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>出借经手人:</div>
+            <div className='D4rowrr'>
+              <div className='D4row'>
+                <div className='D4rowll' style={{ width: 50 }}>
+                  甲方:
+                </div>
+                <div className='D4rowrr'>
+                  <Input
+                    value={topInfo.name}
+                    onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                    readOnly={['3', '4'].includes(key)}
+                    placeholder='请输入内容'
+                    maxLength={30}
+                    showCount
+                  />
+                </div>
+              </div>
+              <div className='D4row' style={{ marginBottom: 0 }}>
+                <div className='D4rowll' style={{ width: 50 }}>
+                  乙方:
+                </div>
+                <div className='D4rowrr'>
+                  <Input
+                    value={topInfo.name}
+                    onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                    readOnly={['3', '4'].includes(key)}
+                    placeholder='请输入内容'
+                    maxLength={30}
+                    showCount
+                  />
+                </div>
+              </div>
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>归还经手人:</div>
+            <div className='D4rowrr'>
+              <div className='D4row'>
+                <div className='D4rowll' style={{ width: 50 }}>
+                  甲方:
+                </div>
+                <div className='D4rowrr'>
+                  <Input
+                    value={topInfo.name}
+                    onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                    readOnly={['3', '4'].includes(key)}
+                    placeholder='请输入内容'
+                    maxLength={30}
+                    showCount
+                  />
+                </div>
+              </div>
+              <div className='D4row' style={{ marginBottom: 0 }}>
+                <div className='D4rowll' style={{ width: 50 }}>
+                  乙方:
+                </div>
+                <div className='D4rowrr'>
+                  <Input
+                    value={topInfo.name}
+                    onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                    readOnly={['3', '4'].includes(key)}
+                    placeholder='请输入内容'
+                    maxLength={30}
+                    showCount
+                  />
+                </div>
+              </div>
+            </div>
+          </div>
+          <div className='D4row'>
+            <div className='D4rowll'>记录人:</div>
+            <div className='D4rowrr'>
+              <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+          <div className='D4row D4rowFull' style={{ margin: 0 }}>
+            <div className='D4rowll'>备注:</div>
+            <div className='D4rowrr'>
+              <ZRichTexts
+                check={false}
+                dirCode='impStor'
+                myUrl='cms/orderIn/upload'
+                isLook={['3', '4'].includes(key)}
+                ref={ZRichTextRef}
+                isOne={true}
+                upAudioBtnNone={true}
+              />
+            </div>
+          </div>
+        </div>
+
+        <div className='D4googsBox'>
+          <div className='D4Tit2'>
+            <div className='D4Tit2ll'>参展藏品</div>
+            <div className='D4Tit2rr'>
+              {['3', '4'].includes(key) ? null : (
+                <>
+                  <Button
+                    type='primary'
+                    onClick={() => {
+                      setNowSta({ key: '5', id: 'cms/orderIn/goods/getList' })
+                    }}
+                  >
+                    新增
+                  </Button>
+                </>
+              )}
+            </div>
+          </div>
+
+          {/* 表格 */}
+          <MyTable
+            list={topInfo.goods || []}
+            columnsTemp={F1_GOOD_COLUMNS}
+            pagingInfo={false}
+            lastBtn={tableLastBtn}
+          />
+        </div>
+      </div>
+
+      {/* 底部按钮 */}
+      <div className='D4btn'>
+        {['3', '4'].includes(key) && topInfo.audits && topInfo.audits.length ? (
+          <Button type='primary' onClick={() => setAuditsShow(true)}>
+            申请记录
+          </Button>
+        ) : null}
+
+        {key === '4' ? (
+          lookBtn
+        ) : (
+          <>
+            {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('草稿')}>
+                存草稿
+              </Button>
+            ) : null}
+
+            <MyPopconfirm txtK='取消' onConfirm={() => history.push('/impStor')} />
+          </>
+        )}
+      </div>
+
+      {/* 新增弹窗 */}
+      {nowSta.id ? (
+        <ZGaddNow
+          nowSta={nowSta}
+          closeFu={() => setNowSta({ key: '', id: '' })}
+          dataResFu={data => setTopInfo({ ...topInfo, goods: data })}
+          oldCheckArr={topInfo.goods || []}
+          canObj={{ storageId: topInfo.storageId }}
+        />
+      ) : null}
+    </div>
+  )
+}
+
+const MemoF1edit = React.memo(F1edit)
+
+export default MemoF1edit

+ 42 - 0
src/pages/F_exhibition/F1exhibition/constants.ts

@@ -0,0 +1,42 @@
+import { selectObj } from '@/utils/select'
+import { F1exhibitionSearchType, IF1exhibitionParams } from './types'
+import { statusStorageObj } from '@/utils/tableData'
+
+export const DEFAULT_F1exhibition_PARAMS: IF1exhibitionParams = {
+  pageNum: 1,
+  pageSize: 10,
+  num: ''
+}
+
+export const F1EXHIBITION_PARAM_ROWS: F1exhibitionSearchType[] = [
+  { name: '业务编号', key: 'num', type: '输入框' },
+  { name: '展览名称', key: 'num', type: '输入框' },
+  { name: '展览类型', key: 'num', type: '下拉框', data: selectObj['业务类型'] },
+  { name: '借展类型', key: 'num', type: '下拉框', data: selectObj['业务类型'] },
+  { name: '借展单位/部门', key: 'num', type: '输入框' },
+  { name: '发起人', key: 'num', type: '输入框' },
+  { name: '发起日期范围', key: 'num', type: '日期选择' },
+  { name: '申请状态', key: 'num', type: '下拉框', data: selectObj['流程申请状态'] }
+]
+
+export const F1EXHIBITION_TABLE_COLUMNS = [['txt', '业务编号', 'num']]
+
+export const F1_GOOD_COLUMNS = [
+  ['img', '封面图', 'thumb'],
+  ['txt', '编号类型', 'numName'],
+  ['txt', '藏品编号', 'goodsNum'],
+  ['txt', '藏品名称', 'goodsName'],
+  ['ping', '数量', 'pcs', 'pcsUnit'],
+  ['txtChange', '库存状态', 'statusStorage', statusStorageObj],
+  [
+    'input',
+    '放置位置',
+    'address',
+    {
+      maxLength: 20,
+      placeholder: '请填写内容,不超过20字'
+    }
+  ],
+  ['datePicker', '借出日期 *', 'startDate'],
+  ['datePicker', '预计归还日期 *', 'endDate']
+]

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

@@ -1,4 +1,68 @@
 .F1exhibition {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px 24px 0;
+  position: relative;
   :global {
+    .C1top {
+      display: flex;
+      justify-content: space-between;
+      .C1topll {
+        display: flex;
+        & > div {
+          display: flex;
+          align-items: center;
+          position: relative;
+          &:not(:last-child) {
+            margin-right: 15px;
+          }
+          & > span {
+            position: absolute;
+            top: -18px;
+            left: 0;
+            pointer-events: none;
+          }
+        }
+      }
+
+      .C1toprrSuo {
+        width: 100%;
+        margin-top: 15px;
+        text-align: right;
+      }
+
+      .C1toprrKai {
+        position: relative;
+        top: 10px;
+        width: 310px;
+        height: 84px;
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: center;
+      }
+
+      .C1topllAll {
+        width: 100%;
+        & > div {
+          flex: 1;
+          .ant-input {
+            width: 100%;
+          }
+          .ant-select {
+            width: 100%;
+          }
+        }
+      }
+    }
+    .C1top2 {
+      margin: 15px 0;
+      justify-content: flex-end;
+    }
+    .ant-select-selection-placeholder {
+      color: black !important;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 205 - 2
src/pages/F_exhibition/F1exhibition/index.tsx

@@ -1,10 +1,213 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { Button, Cascader, DatePicker, Input, Select } from 'antd'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { F1exhibitionSearchType, IF1exhibitionParams } from './types'
+import {
+  DEFAULT_F1exhibition_PARAMS,
+  F1EXHIBITION_PARAM_ROWS,
+  F1EXHIBITION_TABLE_COLUMNS
+} from './constants'
+import history, { btnFlagFu } from '@/utils/history'
+import { A3_APIList } from '@/store/action/A3flow'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import MyTable from '@/components/MyTable'
+
+const { RangePicker } = DatePicker
+
 function F1exhibition() {
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.F1exhibition.tableInfo)
+  const [formData, setFormData] = useState({ ...DEFAULT_F1exhibition_PARAMS })
+  const formDataRef = useRef({ ...DEFAULT_F1exhibition_PARAMS })
+  const dispatch = useDispatch()
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: keyof IF1exhibitionParams) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 顶部筛选
+  const searchDom = useCallback(
+    (arr: F1exhibitionSearchType[]) => {
+      return arr.map(item => {
+        return (
+          <div key={item.name}>
+            <span>{item.name}:</span>
+            {item.type === '输入框' ? (
+              <Input
+                placeholder='请输入'
+                maxLength={30}
+                value={formData[item.key]}
+                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 })}
+              />
+            ) : item.type === '日期选择' ? (
+              <RangePicker
+                format='YYYY-MM-DD'
+                allowClear={true}
+                onChange={(e, dateStrings) => setFormData({ ...formData, [item.key]: dateStrings })}
+              />
+            ) : (
+              <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 [timeKey, setTimeKey] = useState(0)
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData({ ...DEFAULT_F1exhibition_PARAMS })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    const { date, ...rest } = formDataRef.current
+    if (Array.isArray(date) && date.length) {
+      // @ts-ignore
+      rest.startTime = date[0]
+      // @ts-ignore
+      rest.endTime = date[1]
+    }
+    dispatch(A3_APIList(rest))
+  }, [dispatch])
+
+  // 点击操作按钮
+  const tableBtnFu = useCallback((item: any, key: string) => {}, [])
+
+  // 点击删除
+  const delTableFu = useCallback(async (item: any) => {}, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          let obj = btnFlagFu(item)
+          return !Object.values(obj).some(Boolean) ? (
+            '-'
+          ) : (
+            <>
+              {obj['编辑'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '2')}>
+                  编辑
+                </Button>
+              ) : null}
+
+              {obj['审批'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '3')}>
+                  审批
+                </Button>
+              ) : null}
+              {obj['查看'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item, '4')}>
+                  查看
+                </Button>
+              ) : null}
+
+              {obj['删除'] ? <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item)} /> : null}
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, tableBtnFu])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
   return (
     <div className={styles.F1exhibition}>
       <div className='pageTitle'>借展管理</div>
-      <p>待开发</p>
+
+      {/* 第一行 */}
+      <div className='C1top'>
+        <div className='C1topll C1topllAll'>{searchDom(F1EXHIBITION_PARAM_ROWS)}</div>
+      </div>
+
+      {/* 第二行 */}
+      <div className='C1top C1top2'>
+        <Button type='primary'>批量导出</Button>
+        &emsp;
+        <Button type='primary' onClick={() => history.push('/exhibition_edit/1/null')}>
+          新增
+        </Button>
+        &emsp;
+        <Button type='primary' onClick={clickSearch}>
+          查询
+        </Button>
+        &emsp;
+        <Button onClick={resetSelectFu}>重置</Button>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={580}
+        list={tableInfo.list}
+        columnsTemp={F1EXHIBITION_TABLE_COLUMNS}
+        lastBtn={tableLastBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={tableInfo.total}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
     </div>
   )
 }

+ 19 - 0
src/pages/F_exhibition/F1exhibition/types.ts

@@ -0,0 +1,19 @@
+export type F1exhibitionItemType = {
+  id: number
+  num: string
+  name: string
+}
+
+export type F1exhibitionSearchType = {
+  name: string
+  key: keyof IF1exhibitionParams
+  type: '输入框' | '下拉框' | '级联' | '日期选择'
+  data?: any[]
+}
+
+export interface IF1exhibitionParams {
+  pageSize: number
+  pageNum: number
+  num: string
+  date?: string[]
+}

+ 17 - 3
src/pages/Layout/data.ts

@@ -370,28 +370,42 @@ export const routerSon: RouterTypeRow[] = [
     path: '/repair_edit/:key/:id',
     Com: React.lazy(() => import('../E_goodsStorage/E4repair/E4edit'))
   },
+  // -------------入库-----------------
   {
     id: 15,
+    name: '借展管理-新增/编辑/审批/查看',
+    path: '/exhibition_edit/:key/:id',
+    Com: React.lazy(() => import('../F_exhibition/F1exhibition/F1edit'))
+  },
+  {
+    id: 16,
     name: '藏品鉴定-新增/编辑/审批/查看',
     path: '/identify_edit/:key/:id',
     Com: React.lazy(() => import('../B_enterTibet/B2identify/B2edit'))
   },
   {
-    id: 16,
+    id: 17,
     name: '藏品登记-审批/查看',
     path: '/register_edit/:key/:id',
     Com: React.lazy(() => import('../C_goodsManage/C1register/C1look'))
   },
   {
-    id: 17,
+    id: 18,
     name: '藏品编辑-审批/查看',
     path: '/goodEdit_edit/:key/:id',
     Com: React.lazy(() => import('../C_goodsManage/C22goodEdit/C22look'))
   },
   {
-    id: 18,
+    id: 19,
     name: '藏品注销-新增、编辑、审批/查看',
     path: '/cancel_edit/:key/:id',
     Com: React.lazy(() => import('../D_storeManage/D8cancel/D8edit'))
+  },
+  // -------------资源使用-----------------
+  {
+    id: 20,
+    name: '资源使用-新增/编辑/审批/查看',
+    path: '/wealth_edit/:key/:id',
+    Com: React.lazy(() => import('../C_goodsManage/C21wealth/C21edit'))
   }
 ]

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

@@ -2,7 +2,7 @@ import http from '@/utils/http'
 import { AppDispatch } from '..'
 
 /**
- * 业务中心-编辑用户信息
+ * 业务中心-列表
  */
 export const A3_APIList = (data: any, exportFlag = false): any => {
   if (exportFlag) return http.post('/cms/flowManage/page', data)

+ 20 - 0
src/store/action/F1exhibition.ts

@@ -0,0 +1,20 @@
+import http from '@/utils/http'
+import { AppDispatch } from '..'
+
+/**
+ * 借展管理-列表
+ */
+export const F1_APIList = (data: any, exportFlag = false): any => {
+  if (exportFlag) return http.post('/cms/flowManage/page', data)
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('/cms/flowManage/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'F1/getList', payload: obj })
+    }
+  }
+}

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

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

+ 3 - 1
src/store/reducer/index.ts

@@ -28,6 +28,7 @@ import Z5role from './Z5role'
 import Z6user from './Z6user'
 import Z7log from './Z7log'
 import A3flow from './A3flow'
+import F1exhibition from './F1exhibition'
 
 // 合并 reducer
 const rootReducer = combineReducers({
@@ -56,7 +57,8 @@ const rootReducer = combineReducers({
   Z5role,
   Z6user,
   Z7log,
-  A3flow
+  A3flow,
+  F1exhibition
 })
 
 // 默认导出