shaogen1995 před 2 roky
rodič
revize
ac618f1735

+ 3 - 1
src/components/ObjectAdd/index.tsx

@@ -217,7 +217,9 @@ function ObjectAdd({ id, colsePage, editId, dirCode, upInfoAPIFu }: Props) {
 
       const data = res.data.entity;
       const size = data.size.split(",");
-      const quality = data.quality.split(",");
+
+      const quality = data.quality ? data.quality.split(",") : ["", "kg"];
+
       const dictAge = data.dictAge.split(",");
       const dictTexture = data.dictTexture.split(",");
       FormBoxRef.current.setFieldsValue({

+ 28 - 0
src/pages/Object/index.tsx

@@ -17,6 +17,14 @@ const LookObject3 = React.lazy(
   () => import("../ObjectSon/Object3/LookObject3")
 );
 
+const LookObject4 = React.lazy(
+  () => import("../ObjectSon/Object4/LookObject4")
+);
+const LookObject5 = React.lazy(
+  () => import("../ObjectSon/Object5/LookObject5")
+);
+
+
 export default function Object() {
   const data = useMemo(() => {
     return [
@@ -85,6 +93,24 @@ export default function Object() {
         Com: React.lazy(() => import("../ObjectSon/Object3/AuditObject3")),
         path: "/object/3/audit",
       },
+      {
+        id: 4001,
+        name: "出库管理新增",
+        Com: React.lazy(() => import("../ObjectSon/Object4/AddObject4")),
+        path: "/object/4/add",
+      },
+      {
+        id: 4002,
+        name: "出库管理审核",
+        Com: React.lazy(() => import("../ObjectSon/Object4/AuditObject4")),
+        path: "/object/4/audit",
+      },
+      {
+        id: 5001,
+        name: "出库管理审核",
+        Com: React.lazy(() => import("../ObjectSon/Object5/AuditObject5")),
+        path: "/object/5/audit",
+      },
     ];
   }, []);
 
@@ -117,6 +143,8 @@ export default function Object() {
             <AuthRoute path="/object/1/look" component={LookObject1} />
             <AuthRoute path="/object/2/look" component={LookObject2} />
             <AuthRoute path="/object/3/look" component={LookObject3} />
+            <AuthRoute path="/object/4/look" component={LookObject4} />
+            <AuthRoute path="/object/5/look" component={LookObject5} />
 
             {/* 新增 */}
             {dataIn.map((v) => (

+ 10 - 4
src/pages/ObjectSon/Object1/index.tsx

@@ -36,11 +36,17 @@ export default function Object1() {
   // 顶部的状态改变了,统一管理,传到二级页码
   const statusRef = useRef<null | number>(null);
 
-  const dataTit = useSelector((state: RootState) => state.object1Store.infoNum1);
+  const dataTit = useSelector(
+    (state: RootState) => state.object1Store.infoNum1
+  );
 
   // 封装发送请求的函数
   const getList = () => {
-    const data = { ...tableSelect, pageNum: pageNumRef.current };
+    const data = {
+      ...tableSelect,
+      pageNum: pageNumRef.current,
+      status: statusRef.current,
+    };
     dispatch(getObject1List(data));
   };
 
@@ -56,7 +62,7 @@ export default function Object1() {
       ...tableSelect,
       pageNum: Number(urlParam.k) ? Number(urlParam.k) : 1,
       // eslint-disable-next-line eqeqeq
-      status: urlParam.d&&urlParam.d!='null'? Number(urlParam.d) : null,
+      status: urlParam.d && urlParam.d != "null" ? Number(urlParam.d) : null,
     });
     // eslint-disable-next-line react-hooks/exhaustive-deps
   }, [location]);
@@ -174,7 +180,7 @@ export default function Object1() {
       },
       {
         title: "完成日期",
-        render: (item: any) => (item.day&&item.status===3 ? item.day : "-"),
+        render: (item: any) => (item.day && item.status === 3 ? item.day : "-"),
       },
       {
         title: "状态",

+ 1 - 1
src/pages/ObjectSon/Object3/AddObject3/index.tsx

@@ -239,7 +239,7 @@ function AddObject3() {
     <div className={styles.AddObject3}>
       <div className="breadTit">
         <BreadTit>
-          <div className="breadTitRow">藏品登记</div>
+          <div className="breadTitRow">入库管理</div>
           <div className="splitStr">/</div>
           <div className="breadTitRow active">
             {urlParam.id ? "编辑" : "新增"}

+ 1 - 1
src/pages/ObjectSon/Object3/LookObject3/index.tsx

@@ -172,7 +172,7 @@ function LookObject3() {
               type="primary"
               onClick={() =>
                 history.push(
-                  `/object/1/add?k=${urlParamRef.current.k}&d=${urlParamRef.current.d}&id=${urlParamRef.current.id}`
+                  `/object/3/add?k=${urlParamRef.current.k}&d=${urlParamRef.current.d}&id=${urlParamRef.current.id}`
                 )
               }
             >

+ 7 - 3
src/pages/ObjectSon/Object3/index.tsx

@@ -16,7 +16,7 @@ import {
 
 const { RangePicker } = DatePicker;
 
-export default function Object1() {
+export default function Object3() {
   const dispatch = useDispatch();
 
   // 获取顶部数量
@@ -34,7 +34,11 @@ export default function Object1() {
 
   // 封装发送请求的函数
   const getList = () => {
-    const data = { ...tableSelect, pageNum: pageNumRef.current };
+    const data = {
+      ...tableSelect,
+      pageNum: pageNumRef.current,
+      status: statusRef.current,
+    };
     dispatch(getObject3List(data));
   };
 
@@ -159,7 +163,7 @@ export default function Object1() {
       },
       {
         title: "完成日期",
-        render: (item: any) => (item.day&&item.status===3 ? item.day : "-"),
+        render: (item: any) => (item.day && item.status === 3 ? item.day : "-"),
       },
       {
         title: "状态",

+ 163 - 0
src/pages/ObjectSon/Object4/AddObject4/GoodsAll.tsx

@@ -0,0 +1,163 @@
+import { Button, Input, message, Modal, Table } from "antd";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import styles from "./index.module.scss";
+import { getGoodsListAllAPI } from "@/store/action/object4";
+import { useDispatch, useSelector } from "react-redux";
+import { RootState } from "@/store";
+import ImageLazy from "@/components/ImageLazy";
+import '../../Object3/AddObject3/GoodsAll.css'
+
+type Props = {
+  colsePage: any;
+};
+function GoodsAll({ colsePage }: Props) {
+  const dispatch = useDispatch();
+
+  // 进页面获取列表
+  useEffect(() => {
+    dispatch(getGoodsListAllAPI(""));
+  }, [dispatch]);
+
+  // 藏品名称
+  const [name, setName] = useState("");
+  const nameTime = useRef(-1);
+  const nameChange = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>) => {
+      setName(e.target.value);
+      clearTimeout(nameTime.current);
+      nameTime.current = window.setTimeout(() => {
+        dispatch(getGoodsListAllAPI(e.target.value));
+      }, 500);
+    },
+    [dispatch]
+  );
+
+  // 有关表格
+  const results = useSelector(
+    (state: RootState) => state.object4Store.goodsAllList
+  );
+
+  // 已经选中的表格数据
+  const resultsAc = useSelector(
+    (state: RootState) => state.object4Store.goodsTableList
+  );
+
+  const columns = useMemo(() => {
+    return [
+      {
+        title: "缩略图",
+        render: (item: any) => (
+          <ImageLazy width={120} height={70} src={item.thumb} />
+        ),
+      },
+      {
+        title: "藏品编号名称",
+        dataIndex: "dictNum",
+      },
+      {
+        title: "藏品编号",
+        render: (item: any) => (item.num ? item.num : "-"),
+      },
+      {
+        title: "藏品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "类别",
+        dataIndex: "dictGoodType",
+      },
+    ];
+  }, []);
+
+  // 选中的表格数据
+  const [tableSelectList, setTableSelectList] = useState([]);
+  // 表格的多选
+
+  const rowSelection = useMemo(() => {
+    return {
+      onChange: (selectedRowKeys: any, selectedRows: any) => {
+        setTableSelectList(selectedRows);
+      },
+      // 默认选中
+      defaultSelectedRowKeys: resultsAc.map((v: any) => v.id),
+    };
+  }, [resultsAc]);
+
+  // 点击确定
+  const btnOkFu = useCallback(() => {
+    dispatch({
+      type: "object4/getGoodsTableList",
+      payload: tableSelectList.map((v:any)=>{
+        return {
+          ...v,
+          outLocation:'',
+        }
+      }),
+    });
+    message.success("添加成功!");
+    colsePage();
+  }, [colsePage, dispatch, tableSelectList]);
+
+  return (
+    <div className={styles.GoodsAll}>
+      <Modal
+        open={true}
+        destroyOnClose
+        wrapClassName="GoodsAllModel"
+        title="添加藏品"
+        onCancel={colsePage}
+        footer={
+          [] // 设置footer为空,去掉 取消 确定默认按钮
+        }
+      >
+        <div className="ObjectAddTit">
+          <div className="topSearch">
+            <span>藏品名称:</span>
+            <Input
+              value={name}
+              maxLength={10}
+              style={{ width: 300 }}
+              placeholder="请输入"
+              allowClear
+              onChange={(e) => nameChange(e)}
+            />
+          </div>
+        </div>
+        <div className="tableBox">
+          <Table
+            size="small"
+            scroll={{ y: 500 }}
+            rowSelection={{
+              type: "checkbox",
+              ...rowSelection,
+            }}
+            dataSource={results}
+            columns={columns}
+            rowKey="id"
+            pagination={false}
+          />
+        </div>
+        <br />
+        <div className="moveBtn">
+          <Button
+            type="primary"
+            onClick={btnOkFu}
+            disabled={tableSelectList.length === 0}
+          >
+            提交
+          </Button>
+        </div>
+      </Modal>
+    </div>
+  );
+}
+
+const MemoGoodsAll = React.memo(GoodsAll);
+
+export default MemoGoodsAll;

+ 87 - 0
src/pages/ObjectSon/Object4/AddObject4/index.module.scss

@@ -0,0 +1,87 @@
+.AddObject4 {
+  :global {
+    .objectSonMain {
+      padding: 10px 30px;
+
+      .addInfoTop {
+        .row {
+          display: flex;
+          justify-content: space-between;
+          height: 50px;
+
+          &>div {
+            width: 33.33%;
+            height: 50px;
+            align-items: center;
+            display: flex;
+
+            &>span {
+              width: 80px;
+            }
+
+            .bs {
+              position: relative;
+
+              &::before {
+                content: '*';
+                position: absolute;
+                z-index: 10;
+                top: 2px;
+                left: -10px;
+                color: #ff4d4f;
+
+              }
+            }
+          }
+        }
+
+        .rowAll {
+          display: flex;
+          margin-top: 6px;
+
+          &>span {
+            width: 80px;
+          }
+
+          .ant-input-textarea {
+            width: calc(100% - 80px);
+          }
+        }
+      }
+
+      .addTableBox {
+        margin-top: 30px;
+        width: 100%;
+        height: 485px;
+
+        .addTableBox_Tit {
+          height: 40px;
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+
+          .addTableBox_TitL {
+            display: flex;
+            align-items: center;
+            color: var(--themeColor);
+            font-size: 20px;
+            font-weight: 700;
+          }
+        }
+
+        .addTableBox_table {
+          width: 100%;
+          height: calc(100% - 90px);
+        }
+
+        .addTableBox_btn {
+          width: 100%;
+          height: 40px;
+          display: flex;
+          justify-content: center;
+          margin-top: 10px;
+        }
+      }
+    }
+  }
+}

+ 356 - 0
src/pages/ObjectSon/Object4/AddObject4/index.tsx

@@ -0,0 +1,356 @@
+import BreadTit from "@/components/BreadTit";
+import { object4AddAPI, object4infoOutAPI } from "@/store/action/object4";
+import history, { urlParameter } from "@/utils/history";
+import { Button, Input, message, Popconfirm, Select, Table } from "antd";
+import TextArea from "antd/es/input/TextArea";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import { useLocation } from "react-router-dom";
+import _ from "lodash";
+import styles from "./index.module.scss";
+import { useDispatch, useSelector } from "react-redux";
+import { RootState } from "@/store";
+import ImageLazy from "@/components/ImageLazy";
+import GoodsAll from "./GoodsAll";
+import LookModal from "@/components/LookObjTable/LookModal";
+function AddObject4() {
+  const dispatch = useDispatch();
+
+  // 从仓库拿表格信息
+  const results = useSelector(
+    (state: RootState) => state.object4Store.goodsTableList
+  );
+
+  // 表格里面的输入框信息
+  const inputRef = useRef(-1);
+  const inputInfoRef = useRef<any>({});
+  const inputChangeFu = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>, id: number) => {
+      clearTimeout(inputRef.current);
+      inputRef.current = window.setTimeout(() => {
+        if (e.target.value.trim() === "") return;
+        inputInfoRef.current[id] = {
+          names: e.target.value.trim(),
+        };
+        console.log(inputInfoRef.current);
+      }, 500);
+    },
+    []
+  );
+
+  // 顶部数据
+  const [addInfoTop, setAddInfoTop] = useState<any>({
+    outType: "展览",
+  });
+
+  // 进入页面新增请求函数
+  const object4AddAPIFu = useCallback(async () => {
+    const res = await object4AddAPI();
+    setAddInfoTop({ ...res.data, outType: "展览" });
+    // 初始化表格数据
+    dispatch({
+      type: "object4/getGoodsTableList",
+      payload: [],
+    });
+  }, [dispatch]);
+
+  // 通过id获取详情函数
+  const object4infoOutAPIFu = useCallback(
+    async (id: number) => {
+      const res = await object4infoOutAPI(id);
+      setAddInfoTop(res.data.entity);
+      // 设置表格信息
+      dispatch({
+        type: "object4/getGoodsTableList",
+        payload: res.data.child,
+      });
+      // 设置出库位置ref
+      if (res.data.child && res.data.child.length) {
+        res.data.child.forEach((v: any) => {
+          inputInfoRef.current[v.id] = {
+            names: v.outLocation,
+          };
+        });
+      }
+    },
+    [dispatch]
+  );
+
+  // 获取地址栏参数
+  const location = useLocation();
+  const [urlParam, setUrlParam] = useState<any>({});
+  useEffect(() => {
+    const obj = urlParameter(location.search);
+    setUrlParam(obj);
+
+    if (obj.id) {
+      // 如果是编辑
+      object4infoOutAPIFu(obj.id);
+    } else object4AddAPIFu();
+  }, [location, object4AddAPIFu, object4infoOutAPIFu]);
+  // 点击返回
+  const cancelFu = useCallback(() => {
+    history.push({
+      pathname: `/object/4`,
+      state: { k: urlParam.k ? urlParam.k : "1", d: urlParam.d },
+    });
+  }, [urlParam.d, urlParam.k]);
+
+  // 点击提交
+  const submitFu = useCallback(async () => {
+    if (results.length === 0)
+      return message.warning("至少需要添加一条藏品信息!");
+
+    const objLength = Object.keys(inputInfoRef.current).length;
+    if (objLength < results.length) return message.warning("请输入出库位置!");
+
+    const obj = {
+      description: addInfoTop.description,
+      id: addInfoTop.id,
+      outType: addInfoTop.outType,
+      goodsIds: results.map((v: any) => v.id).join(","),
+      location: inputInfoRef.current,
+    };
+
+    const res: any = await object4AddAPI(obj);
+    if (res.code === 0) {
+      message.success("操作成功!");
+      cancelFu();
+    }
+  }, [
+    addInfoTop.description,
+    addInfoTop.id,
+    addInfoTop.outType,
+    cancelFu,
+    results,
+  ]);
+
+  // 点击添加或者编辑出来页面
+  const [addPage, setAddPage] = useState(false);
+
+  // 表格的多选
+  const rowSelection = {
+    onChange: (selectedRowKeys: any, selectedRows: any) => {
+      setTableSelectList(selectedRows);
+    },
+  };
+
+  // 点击添加
+  const addPageFu = useCallback((id?: any) => {
+    setAddPage(true);
+  }, []);
+
+  // 选中的表格数据
+  const [tableSelectList, setTableSelectList] = useState([]);
+
+  // 点击删除
+  const delTableListFu = useCallback(() => {
+    console.log("多个删除", tableSelectList);
+    const data = _.differenceBy(results, tableSelectList, "id");
+    dispatch({ type: "object4/getGoodsTableList", payload: data });
+    setTableSelectList(data);
+
+    // 同时删除出库位置信息
+    tableSelectList.forEach((v: any) => {
+      delete inputInfoRef.current[v.id];
+    });
+  }, [dispatch, results, tableSelectList]);
+
+  // 控制弹窗的显示隐藏
+  const [show, setShow] = useState(false);
+  // 点击表格里面的查看
+  const lookIdRef = useRef(-1);
+  const lookGoods = useCallback((id: number) => {
+    lookIdRef.current = id;
+    setShow(true);
+  }, []);
+
+  // 表格数据
+  const columns = useMemo(() => {
+    return [
+      {
+        title: "缩略图",
+        render: (item: any) => (
+          <ImageLazy width={120} height={70} src={item.thumb} />
+        ),
+      },
+
+      {
+        title: "藏品编号名称",
+        dataIndex: "dictNum",
+      },
+      {
+        title: "藏品编号",
+        render: (item: any) => (item.num ? item.num : "-"),
+      },
+      {
+        title: "藏品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "类别",
+        dataIndex: "dictGoodType",
+      },
+      {
+        title: "完残程度",
+        dataIndex: "complete",
+      },
+      {
+        title: "出库位置",
+        width: 200,
+        render: (item: any) => (
+          <Input
+            defaultValue={item.outLocation}
+            onChange={(e) => inputChangeFu(e, item.id)}
+            maxLength={15}
+            showCount
+            placeholder="请输入"
+          />
+        ),
+      },
+      {
+        title: "操作",
+        render: (item: any) => (
+          <>
+            <Button type="text" danger onClick={() => lookGoods(item.id)}>
+              查看
+            </Button>
+          </>
+        ),
+      },
+    ];
+  }, [inputChangeFu, lookGoods]);
+
+  // 出库类型下拉框变化
+
+  const options = useSelector(
+    (state: RootState) => state.object4Store.typeSelectList
+  );
+
+  const typeChangeFu = useCallback(
+    (value: string) => {
+      setAddInfoTop({ ...addInfoTop, outType: value });
+    },
+    [addInfoTop]
+  );
+
+  return (
+    <div className={styles.AddObject4}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow">出库管理</div>
+          <div className="splitStr">/</div>
+          <div className="breadTitRow active">
+            {urlParam.id ? "编辑" : "新增"}
+          </div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        {/* 上面的信息展示 */}
+        <div className="addInfoTop">
+          <div className="row">
+            <div>
+              <span className="bs">出库编号:</span>
+              <Input style={{ width: 300 }} value={addInfoTop.num} disabled />
+            </div>
+            <div>
+              <span className="bs">登记人员:</span>
+              <Input
+                style={{ width: 300 }}
+                value={addInfoTop.creatorName}
+                disabled
+              />
+            </div>
+            <div>
+              <span className="bs">出库类型:</span>
+              <Select
+                style={{ width: 300 }}
+                placeholder="请选择"
+                value={addInfoTop.outType}
+                onChange={typeChangeFu}
+                options={options}
+              />
+            </div>
+          </div>
+          <div className="rowAll">
+            <span>出库说明:</span>
+            <TextArea
+              value={addInfoTop.description}
+              onChange={(e) =>
+                setAddInfoTop({ ...addInfoTop, description: e.target.value })
+              }
+              rows={3}
+              placeholder="请输入"
+              showCount
+              maxLength={255}
+            />
+          </div>
+        </div>
+        {/* 下面的表格 */}
+        <div className="addTableBox">
+          <div className="addTableBox_Tit">
+            <div className="addTableBox_TitL">藏品信息</div>
+            <div className="addTableBox_TitR">
+              <Button onClick={() => addPageFu(null)}>添加</Button>
+              &emsp;
+              <Popconfirm
+                disabled={tableSelectList.length === 0}
+                title="确定删除吗?"
+                okText="确定"
+                cancelText="取消"
+                onConfirm={delTableListFu}
+              >
+                <Button disabled={tableSelectList.length === 0}>删除</Button>
+              </Popconfirm>
+            </div>
+          </div>
+
+          {/* 表格主体 */}
+          <div className="addTableBox_table">
+            <Table
+              size="small"
+              scroll={{ y: 355 }}
+              rowSelection={{
+                type: "checkbox",
+                ...rowSelection,
+              }}
+              dataSource={results}
+              columns={columns}
+              rowKey="id"
+              pagination={false}
+            />
+          </div>
+
+          {/* 返回按钮 */}
+          <div className="addTableBox_btn">
+            <Button type="primary" onClick={submitFu}>
+              提交
+            </Button>
+            &emsp;
+            <Button onClick={cancelFu}>返回</Button>
+          </div>
+        </div>
+      </div>
+      {/* 点击添加或者编辑出来的页面 */}
+      {addPage ? <GoodsAll colsePage={() => setAddPage(false)} /> : null}
+
+      {/* 点击查看出来的对话框 */}
+      {show ? (
+        <LookModal
+          id={lookIdRef.current}
+          show={show}
+          closeShow={() => setShow(false)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoAddObject4 = React.memo(AddObject4);
+
+export default MemoAddObject4;

+ 86 - 0
src/pages/ObjectSon/Object4/AuditObject4/index.module.scss

@@ -0,0 +1,86 @@
+.AuditObject4 {
+  :global {
+    .objectSonMain {
+      padding: 10px 30px;
+
+      .topTit {
+        font-size: 16px;
+        font-weight: 700;
+        color: var(--themeColor);
+        margin-bottom: 12px;
+      }
+
+      .topInfo {
+        .topInfoRow {
+          display: flex;
+
+          &>div {
+            width: 33.33%;
+            border: 1px solid #ccc;
+            height: 34px;
+            line-height: 32px;
+            display: flex;
+
+            .one {
+              font-weight: 700;
+              width: 80px;
+              text-align: right;
+            }
+          }
+        }
+
+        .topInfoTex {
+          cursor: pointer;
+          border: 1px solid #ccc;
+          padding: 5px 10px 4px;
+          display: -webkit-box;
+          overflow: hidden;
+          white-space: normal !important;
+          text-overflow: ellipsis;
+          word-wrap: break-word;
+          -webkit-line-clamp: 2;
+          -webkit-box-orient: vertical;
+
+          &>span {
+            font-weight: 700;
+          }
+        }
+
+      }
+
+      .goodsInfo {
+        .inputBox1 {
+          margin-bottom: 10px;
+          display: flex;
+          align-items: center;
+
+          .inputBoxTit {
+            font-weight: 700;
+            width: 90px;
+
+            &>span {
+              position: relative;
+              top: 3px;
+              color: #ff4d4f;
+            }
+          }
+
+          .inputBoxText {
+            width: calc(100% - 90px);
+          }
+        }
+
+        .inputBox2 {
+          align-items: flex-start;
+        }
+      }
+
+      .backBtn {
+        margin-top: 12px;
+        display: flex;
+        justify-content: center;
+      }
+
+    }
+  }
+}

+ 237 - 0
src/pages/ObjectSon/Object4/AuditObject4/index.tsx

@@ -0,0 +1,237 @@
+import BreadTit from "@/components/BreadTit";
+import ImageLazy from "@/components/ImageLazy";
+import LookModal from "@/components/LookObjTable/LookModal";
+import { RootState } from "@/store";
+import { auditObject4API, object4infoOutAPI } from "@/store/action/object4";
+import { statusObj } from "@/utils/dataChange";
+import history, { urlParameter } from "@/utils/history";
+import { Button, message, Select, Table } from "antd";
+import TextArea from "antd/es/input/TextArea";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import { useDispatch, useSelector } from "react-redux";
+import { useLocation } from "react-router-dom";
+import styles from "./index.module.scss";
+const { Option } = Select;
+
+function AuditObject4() {
+  const dispatch = useDispatch();
+
+  // 获取地址栏参数
+  const location = useLocation();
+  const urlParamRef = useRef<any>({});
+  useEffect(() => {
+    urlParamRef.current = urlParameter(location.search);
+    // console.log("地址栏参数", urlParamRef.current);
+  }, [location]);
+
+  const { info, list: tableList } = useSelector(
+    (state: RootState) => state.object4Store.lookInfo
+  );
+
+  // 审核结果筛选
+  const [value, setValue] = useState(3);
+  const valueChangeFu = (val: number) => {
+    setValue(val);
+  };
+  // 审核说明
+  const [value2, setValue2] = useState("");
+
+  const getInfo = useCallback(async () => {
+    const id = urlParamRef.current.id;
+    const res1 = await object4infoOutAPI(id);
+    const info = res1.data.entity;
+    const list = res1.data.child;
+    info.statusTxt = statusObj[info.status];
+    dispatch({ type: "object4/getLookInfo", payload: { info, list } });
+  }, [dispatch]);
+
+  useEffect(() => {
+    getInfo();
+  }, [getInfo]);
+
+  // 控制弹窗的显示隐藏
+  const [show, setShow] = useState(false);
+  // 点击表格里面的查看
+  const lookIdRef = useRef(-1);
+
+  const lookGoods = useCallback((id: number) => {
+    lookIdRef.current = id;
+    setShow(true);
+  }, []);
+
+  // 点击返回
+  const cancelFu = useCallback(() => {
+    history.push({
+      pathname: `/object/4`,
+      state: {
+        k: urlParamRef.current.k ? urlParamRef.current.k : "1",
+        d: urlParamRef.current.d,
+      },
+    });
+  }, []);
+
+  // 点击确定
+  const btnOkFu = useCallback(async () => {
+    const txt = value2.replaceAll(" ", "").replaceAll("\n", "");
+    if (txt === "") return message.warning("审核说明不能为空!");
+    const res: any = await auditObject4API({
+      id: Number(urlParamRef.current.id),
+      reason: value2,
+      status: value,
+    });
+    if (res.code === 0) {
+      message.success("操作成功!");
+      cancelFu();
+    }
+  }, [cancelFu, value, value2]);
+
+  // 表格格式
+  const columns = useMemo(() => {
+    const tempArr = [
+      {
+        title: "缩略图",
+        render: (item: any) => (
+          <ImageLazy width={120} height={70} src={item.thumb} />
+        ),
+      },
+      {
+        title: "藏品编号名称",
+        dataIndex: "dictNum",
+      },
+      {
+        title: "藏品编号",
+        render: (item: any) => (item.num ? item.num : "-"),
+      },
+      {
+        title: "藏品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "类别",
+        dataIndex: "dictGoodType",
+      },
+      {
+        title: "完残程度",
+        dataIndex: "complete",
+      },
+      {
+        title: "出库位置",
+        dataIndex: "outLocation",
+      },
+      {
+        title: "操作",
+        render: (item: any) => (
+          <>
+            <Button type="text" danger onClick={() => lookGoods(item.id)}>
+              查看
+            </Button>
+          </>
+        ),
+      },
+    ];
+
+    return tempArr;
+  }, [lookGoods]);
+
+  return (
+    <div className={styles.AuditObject4}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow">出库管理</div>
+          <div className="splitStr">/</div>
+          <div className="breadTitRow active">审核</div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        <div className="topTit">登记信息</div>
+        <div className="topInfo">
+          <div className="topInfoRow">
+            <div>
+              <div className="one">出库编号:</div>
+              <div>{info.num}</div>
+            </div>
+            <div>
+              <div className="one">出库类型:</div>
+              <div>{info.outType}</div>
+            </div>
+            <div>
+              <div className="one">登记人员:</div>
+              <div>{info.creatorName}</div>
+            </div>
+          </div>
+          <div className="topInfoTex" title={info.description}>
+            <span>出库说明:</span>
+            {info.description ? info.description : "-"}
+          </div>
+        </div>
+        <br />
+        <div className="topTit">藏品信息</div>
+        <div className="goodsInfo">
+          {/* 表格信息 */}
+          <Table
+            size="small"
+            scroll={{ y: 245 }}
+            dataSource={tableList}
+            columns={columns}
+            rowKey="id"
+            pagination={false}
+          />
+          <br />
+          <div className="inputBox1">
+            <div className="inputBoxTit">
+              <span>* </span>审核结果:
+            </div>
+            <Select
+              style={{ width: 150 }}
+              value={value}
+              onChange={(val) => valueChangeFu(val)}
+            >
+              <Option value={3}>通过</Option>
+              <Option value={2}>不通过</Option>
+            </Select>
+          </div>
+          <div className="inputBox1 inputBox2">
+            <div className="inputBoxTit">
+              <span>* </span>审核说明:
+            </div>
+            <div className="inputBoxText">
+              <TextArea
+                value={value2}
+                onChange={(e) => setValue2(e.target.value)}
+                rows={3}
+                placeholder="请输入"
+                showCount
+                maxLength={255}
+              />
+            </div>
+          </div>
+        </div>
+        <div className="backBtn">
+          <Button onClick={btnOkFu} type="primary">
+            提交
+          </Button>
+          &emsp;
+          <Button onClick={cancelFu}>返回</Button>
+        </div>
+      </div>
+      {/* 点击查看出来的对话框 */}
+      {show ? (
+        <LookModal
+          id={lookIdRef.current}
+          show={show}
+          closeShow={() => setShow(false)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoAuditObject4 = React.memo(AuditObject4);
+
+export default MemoAuditObject4;

+ 70 - 0
src/pages/ObjectSon/Object4/LookObject4/index.module.scss

@@ -0,0 +1,70 @@
+.LookObject4 {
+  :global {
+    .objectSonMain {
+      padding: 10px 30px;
+
+      .topTit {
+        font-size: 16px;
+        font-weight: 700;
+        color: var(--themeColor);
+        margin-bottom: 12px;
+        position: relative;
+
+      }
+
+      .topTit2 {
+        margin-bottom: 18px;
+
+        .titBtn {
+          position: absolute;
+          right: 5px;
+          top: 0px;
+        }
+      }
+
+      .topInfo {
+        .topInfoRow {
+          display: flex;
+
+          &>div {
+            width: 25%;
+            border: 1px solid #ccc;
+            height: 34px;
+            line-height: 32px;
+            display: flex;
+
+            .one {
+              font-weight: 700;
+              width: 80px;
+              text-align: right;
+            }
+          }
+        }
+
+        .topInfoTex {
+          cursor: pointer;
+          border: 1px solid #ccc;
+          padding: 5px 10px 4px;
+          display: -webkit-box;
+          overflow: hidden;
+          white-space: normal !important;
+          text-overflow: ellipsis;
+          word-wrap: break-word;
+          -webkit-line-clamp: 2;
+          -webkit-box-orient: vertical;
+
+          &>span {
+            font-weight: 700;
+          }
+        }
+
+      }
+
+      .backBtn {
+        margin-top: 12px;
+        display: flex;
+        justify-content: center;
+      }
+    }
+  }
+}

+ 262 - 0
src/pages/ObjectSon/Object4/LookObject4/index.tsx

@@ -0,0 +1,262 @@
+import AuthButton from "@/components/AuthButton";
+import BreadTit from "@/components/BreadTit";
+import ImageLazy from "@/components/ImageLazy";
+import LookModal from "@/components/LookObjTable/LookModal";
+import { RootState } from "@/store";
+import { object4infoOutAPI, returnObject4API } from "@/store/action/object4";
+import { statusObjCK } from "@/utils/dataChange";
+import history, { urlParameter } from "@/utils/history";
+import { Button, message, Popconfirm, Table } from "antd";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import { useDispatch, useSelector } from "react-redux";
+import { useLocation } from "react-router-dom";
+import styles from "./index.module.scss";
+function LookObject4() {
+  const dispatch = useDispatch();
+
+  // 获取地址栏参数
+  const location = useLocation();
+  const urlParamRef = useRef<any>({});
+  useEffect(() => {
+    urlParamRef.current = urlParameter(location.search);
+    // console.log("地址栏参数", urlParamRef.current);
+  }, [location]);
+
+  const getInfo = useCallback(async () => {
+    const id = urlParamRef.current.id;
+    const res1 = await object4infoOutAPI(id);
+    const info = res1.data.entity;
+    const list = res1.data.child;
+    info.statusTxt = statusObjCK[info.status];
+    dispatch({ type: "object4/getLookInfo", payload: { info, list } });
+  }, [dispatch]);
+
+  useEffect(() => {
+    getInfo();
+  }, [getInfo]);
+
+  const { info, list: tableList } = useSelector(
+    (state: RootState) => state.object4Store.lookInfo
+  );
+
+  // 点击返回
+  const cancelFu = () => {
+    history.push({
+      pathname: `/object/4`,
+      state: {
+        k: urlParamRef.current.k ? urlParamRef.current.k : "1",
+        d: urlParamRef.current.d,
+      },
+    });
+  };
+
+  // 控制弹窗的显示隐藏
+  const [show, setShow] = useState(false);
+  // 点击表格里面的查看
+  const lookIdRef = useRef(-1);
+
+  const lookGoods = useCallback((id: number) => {
+    lookIdRef.current = id;
+    setShow(true);
+  }, []);
+
+  // 表格格式
+  const columns = useMemo(() => {
+    const tempArr = [
+      {
+        title: "缩略图",
+        render: (item: any) => (
+          <ImageLazy width={120} height={70} src={item.thumb} />
+        ),
+      },
+      {
+        title: "藏品编号名称",
+        dataIndex: "dictNum",
+      },
+      {
+        title: "藏品编号",
+        render: (item: any) => (item.num ? item.num : "-"),
+      },
+      {
+        title: "藏品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "类别",
+        dataIndex: "dictGoodType",
+      },
+      {
+        title: "完残程度",
+        dataIndex: "complete",
+      },
+      {
+        title: "出库位置",
+        dataIndex: "outLocation",
+      },
+
+      {
+        title: "出库状态",
+        render: (item: any) =>
+          item.storageStatus === "out"
+            ? "待归还"
+            : item.storageStatus === "in"
+            ? "已归还"
+            : "-",
+      },
+      {
+        title: "操作",
+        render: (item: any) => (
+          <>
+            <Button type="text" danger onClick={() => lookGoods(item.id)}>
+              查看
+            </Button>
+          </>
+        ),
+      },
+    ];
+
+    return tempArr;
+  }, [lookGoods]);
+
+  // 选中的表格数据
+  const [tableSelectList, setTableSelectList] = useState([]);
+  // 表格的多选和禁选
+  const rowSelection = {
+    selectedRowKeys: tableSelectList,
+    onChange: (selectedRowKeys: any) => {
+      setTableSelectList(selectedRowKeys);
+    },
+    getCheckboxProps: (record: any) => ({
+      disabled: record.storageStatus === "in" || info.status !== 3, // 已归还的禁止选中
+    }),
+  };
+
+  // 点击归还
+  const returnGoodsFu = useCallback(async () => {
+    console.log("---------点击了归还", tableSelectList);
+    const obj = {
+      goodsIds: tableSelectList.join(","),
+      id: info.id,
+    };
+    const res: any = await returnObject4API(obj);
+    if (res.code === 0) {
+      message.success("归还成功!");
+      // 清空表格选中状态和数据
+      setTableSelectList([]);
+      getInfo();
+    }
+  }, [getInfo, info.id, tableSelectList]);
+
+  return (
+    <div className={styles.LookObject4}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow">出库管理</div>
+          <div className="splitStr">/</div>
+          <div className="breadTitRow active">
+            {info.status === 3 ? "查看-归还" : "查看"}
+          </div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        <div className="topTit">出库信息</div>
+        <div className="topInfo">
+          <div className="topInfoRow">
+            <div>
+              <div className="one">出库编号:</div>
+              <div>{info.num}</div>
+            </div>
+            <div>
+              <div className="one">出库人员:</div>
+              <div>{info.creatorName}</div>
+            </div>
+            <div>
+              <div className="one">出库类型:</div>
+              <div>{info.outType}</div>
+            </div>
+            <div>
+              <div className="one">审核结果:</div>
+              <div>{info.statusTxt}</div>
+            </div>
+          </div>
+          <div className="topInfoTex" title={info.description}>
+            <span>登记说明:</span>
+            {info.description ? info.description : "-"}
+          </div>
+          <div className="topInfoTex" title={info.reason}>
+            <span>审核说明:</span>
+            {info.reason ? info.reason : "-"}
+          </div>
+        </div>
+        <br />
+        <div className="topTit topTit2">
+          藏品信息
+          {info.status === 3 ? (
+            <div className="titBtn">
+              <Popconfirm
+                disabled={tableSelectList.length === 0}
+                title="确定归还吗?"
+                okText="确定"
+                cancelText="取消"
+                onConfirm={returnGoodsFu}
+              >
+                <AuthButton disabled={tableSelectList.length === 0}>
+                  归还
+                </AuthButton>
+              </Popconfirm>
+            </div>
+          ) : null}
+        </div>
+        <div className="goodsInfo">
+          {/* 表格信息 */}
+          <Table
+            size="small"
+            scroll={{ y: 360 }}
+            rowSelection={{
+              type: "checkbox",
+              ...rowSelection,
+            }}
+            dataSource={tableList}
+            columns={columns}
+            rowKey="id"
+            pagination={false}
+          />
+        </div>
+        <div className="backBtn">
+          {info.status === 2 ? (
+            <AuthButton
+              type="primary"
+              onClick={() =>
+                history.push(
+                  `/object/4/add?k=${urlParamRef.current.k}&d=${urlParamRef.current.d}&id=${urlParamRef.current.id}`
+                )
+              }
+            >
+              编辑
+            </AuthButton>
+          ) : null}
+          &emsp;
+          <Button onClick={cancelFu}>返回</Button>
+        </div>
+      </div>
+      {/* 点击查看出来的对话框 */}
+      {show ? (
+        <LookModal
+          id={lookIdRef.current}
+          show={show}
+          closeShow={() => setShow(false)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoLookObject4 = React.memo(LookObject4);
+
+export default MemoLookObject4;

+ 293 - 4
src/pages/ObjectSon/Object4/index.tsx

@@ -1,9 +1,298 @@
+import BreadTit from "@/components/BreadTit";
+import classNames from "classnames";
+import { useEffect, useMemo, useRef, useState } from "react";
 import styles from "./index.module.scss";
+import { Input, DatePicker, Table, Button, Popconfirm, message } from "antd";
+import AuthButton from "@/components/AuthButton";
+import history from "@/utils/history";
+import { useLocation } from "react-router-dom";
+import { useDispatch, useSelector } from "react-redux";
+import { RootState } from "@/store";
+import {
+  getObject4List,
+  getObject4ListNum,
+  object4DelAPI,
+} from "@/store/action/object4";
+
+const { RangePicker } = DatePicker;
+
 export default function Object4() {
-  
+  const dispatch = useDispatch();
+
+  // 获取顶部数量
+
+  useEffect(() => {
+    dispatch(getObject4ListNum());
+  }, [dispatch]);
+
+  // 顶部的状态改变了,统一管理,传到二级页码
+  const statusRef = useRef<null | number>(null);
+
+  const dataTit = useSelector(
+    (state: RootState) => state.object4Store.infoNum4
+  );
+
+  // 封装发送请求的函数
+  const getList = () => {
+    const data = {
+      ...tableSelect,
+      pageNum: pageNumRef.current,
+      status: statusRef.current,
+    };
+    dispatch(getObject4List(data));
+  };
+
+  // 获取地址栏参数
+  const location = useLocation();
+
+  const pageNumRef = useRef(1);
+
+  // 如果有参数 根据参数页码在次发送请求
+  useEffect(() => {
+    const urlParam = location.state || {};
+    setTableSelect({
+      ...tableSelect,
+      pageNum: Number(urlParam.k) ? Number(urlParam.k) : 1,
+      // eslint-disable-next-line eqeqeq
+      status: urlParam.d && urlParam.d != "null" ? Number(urlParam.d) : null,
+    });
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [location]);
+
+  // 顶部筛选
+  const [tableSelect, setTableSelect] = useState({
+    status: null as null | number,
+    searchKey: "",
+    startTime: "",
+    endTime: "",
+    pageSize: 10,
+    pageNum: 1,
+  });
+
+  // 当前页码统一
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+  }, [tableSelect.pageNum]);
+
+  // 顶部状态统一
+  useEffect(() => {
+    statusRef.current = tableSelect.status;
+  }, [tableSelect.status]);
+
+  // 防止返回的时候发送了2次请求来对应页码
+
+  const getListRef = useRef(-1);
+
+  useEffect(() => {
+    clearTimeout(getListRef.current);
+    getListRef.current = window.setTimeout(() => {
+      getList();
+    }, 100);
+
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [tableSelect]);
+
+  // 登记人员输入
+  const nameTime = useRef(-1);
+  const nameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime.current);
+    nameTime.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
+    }, 500);
+  };
+
+  // 时间选择器改变
+  const timeChange = (date: any, dateString: any) => {
+    let startTime = "";
+    let endTime = "";
+    if (dateString[0] && dateString[1]) {
+      startTime = dateString[0] + " 00:00:00";
+      endTime = dateString[1] + " 23:59:59";
+    }
+    setTableSelect({ ...tableSelect, startTime, endTime, pageNum: 1 });
+  };
+
+  // 点击新增或者编辑按钮
+  const addObject = (id?: any) => {
+    if (id)
+      history.push(
+        `/object/4/add?k=${pageNumRef.current}&d=${statusRef.current}&id=${id}`
+      );
+    else
+      history.push(
+        `/object/4/add?k=${pageNumRef.current}&d=${statusRef.current}`
+      );
+  };
+
+  // 点击删除按钮
+  const delOne = async (id: number) => {
+    const res: any = await object4DelAPI(id);
+    if (res.code === 0) {
+      message.success("删除成功!");
+      getList();
+      dispatch(getObject4ListNum());
+    }
+  };
+
+  // ---------关于表格
+
+  // 页码变化
+  const paginationChange = (pageNum: number, pageSize: number) => {
+    setTableSelect({ ...tableSelect, pageNum, pageSize });
+  };
+
+  const results = useSelector((state: RootState) => state.object4Store.info4);
+
+  const columns = useMemo(() => {
+    return [
+      {
+        title: "出库编号",
+        dataIndex: "num",
+      },
+      {
+        title: "登记人员",
+        dataIndex: "creatorName",
+      },
+      {
+        title: "出库说明",
+        render: (item: any) => (item.description ? item.description : "-"),
+      },
+      {
+        title: "登记日期",
+        dataIndex: "createTime",
+      },
+      {
+        title: "出库日期",
+        render: (item: any) => (item.day && item.status === 3 ? item.day : "-"),
+      },
+      {
+        title: "状态",
+        dataIndex: "statusTxt",
+      },
+
+      {
+        title: "操作",
+        render: (item: any) => (
+          <>
+            <Button
+              type="text"
+              danger
+              onClick={() =>
+                history.push(
+                  `/object/4/look?k=${pageNumRef.current}&d=${statusRef.current}&id=${item.id}`
+                )
+              }
+            >
+              {item.status === 3 ? "查看/归还" : "查看"}
+            </Button>
+
+            {item.status === 0 || item.status === 2 ? (
+              <AuthButton type="text" danger onClick={() => addObject(item.id)}>
+                编辑
+              </AuthButton>
+            ) : null}
+
+            {item.status === 1 ? (
+              <AuthButton
+                onClick={() =>
+                  history.push(
+                    `/object/4/audit?k=${pageNumRef.current}&d=${statusRef.current}&id=${item.id}`
+                  )
+                }
+                type="text"
+                danger
+              >
+                审核
+              </AuthButton>
+            ) : null}
+
+            {item.status === 0 || item.status === 2 ? (
+              <Popconfirm
+                title="确定删除吗?"
+                okText="确定"
+                cancelText="取消"
+                onConfirm={() => delOne(item.id)}
+              >
+                <AuthButton type="text" danger>
+                  删除
+                </AuthButton>
+              </Popconfirm>
+            ) : null}
+          </>
+        ),
+      },
+    ];
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, []);
+
   return (
-    <div className={styles.Object4}>
-      <h1>Object4</h1>
+    <div className={styles.Object1}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow active">出库管理</div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        {/* 顶部筛选 */}
+        <div className="objectSonMainTit">
+          {dataTit.map((v: any) => (
+            <div
+              key={v.id}
+              onClick={() =>
+                setTableSelect({ ...tableSelect, status: v.id, pageNum: 1 })
+              }
+              className={classNames(
+                v.id === tableSelect.status ? "active" : ""
+              )}
+            >
+              {v.name}({v.num})
+            </div>
+          ))}
+        </div>
+        <div className="objectSonMainTable">
+          {/* 表格数据筛选 */}
+          <div className="tableSelectBox">
+            <div className="row">
+              <span>登记人员:</span>
+              <Input
+                maxLength={10}
+                style={{ width: 150 }}
+                placeholder="请输入"
+                allowClear
+                onChange={(e) => nameChange(e)}
+              />
+            </div>
+            <div className="row">
+              <span>创建日期:</span>
+              <RangePicker onChange={timeChange} />
+            </div>
+            <div className="row">
+              <AuthButton type="primary" onClick={() => addObject()}>
+                申请出库
+              </AuthButton>
+            </div>
+          </div>
+
+          {/* 表格主体 */}
+          <div className="tableMain">
+            <Table
+              scroll={{ y: 428 }}
+              dataSource={results.list}
+              columns={columns}
+              rowKey="id"
+              pagination={{
+                showQuickJumper: true,
+                position: ["bottomCenter"],
+                showSizeChanger: true,
+                current: tableSelect.pageNum,
+                pageSize: tableSelect.pageSize,
+                total: results.total,
+                onChange: paginationChange,
+              }}
+            />
+          </div>
+        </div>
+      </div>
     </div>
-  )
+  );
 }

+ 96 - 0
src/pages/ObjectSon/Object5/AuditObject5/index.module.scss

@@ -0,0 +1,96 @@
+.AuditObject5 {
+  :global {
+    .objectSonMain {
+      padding: 10px 30px;
+
+      .topTit {
+        font-size: 16px;
+        font-weight: 700;
+        color: var(--themeColor);
+        margin-bottom: 12px;
+      }
+      .topTit2 {
+        position: relative;
+        margin-bottom: 18px;
+
+        .titBtn {
+          position: absolute;
+          right: 5px;
+          top: 0px;
+        }
+      }
+
+      .topInfo {
+        .topInfoRow {
+          display: flex;
+
+          &>div {
+            width: 50%;
+            border: 1px solid #ccc;
+            height: 34px;
+            line-height: 32px;
+            display: flex;
+
+            .one {
+              font-weight: 700;
+              width: 80px;
+              text-align: right;
+            }
+          }
+        }
+
+        .topInfoTex {
+          cursor: pointer;
+          border: 1px solid #ccc;
+          padding: 5px 10px 4px;
+          display: -webkit-box;
+          overflow: hidden;
+          white-space: normal !important;
+          text-overflow: ellipsis;
+          word-wrap: break-word;
+          -webkit-line-clamp: 2;
+          -webkit-box-orient: vertical;
+
+          &>span {
+            font-weight: 700;
+          }
+        }
+
+      }
+
+      .goodsInfo {
+        .inputBox1 {
+          margin-bottom: 10px;
+          display: flex;
+          align-items: center;
+
+          .inputBoxTit {
+            font-weight: 700;
+            width: 90px;
+
+            &>span {
+              position: relative;
+              top: 3px;
+              color: #ff4d4f;
+            }
+          }
+
+          .inputBoxText {
+            width: calc(100% - 90px);
+          }
+        }
+
+        .inputBox2 {
+          align-items: flex-start;
+        }
+      }
+
+      .backBtn {
+        margin-top: 12px;
+        display: flex;
+        justify-content: center;
+      }
+
+    }
+  }
+}

+ 263 - 0
src/pages/ObjectSon/Object5/AuditObject5/index.tsx

@@ -0,0 +1,263 @@
+import BreadTit from "@/components/BreadTit";
+import ImageLazy from "@/components/ImageLazy";
+import LookModal from "@/components/LookObjTable/LookModal";
+import { RootState } from "@/store";
+import { auditObject5API, object5infoOutAPI } from "@/store/action/object5";
+import { goodsChangeObj, statusObj } from "@/utils/dataChange";
+import history, { urlParameter } from "@/utils/history";
+import { Button, message, Select, Table } from "antd";
+import TextArea from "antd/es/input/TextArea";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import { useDispatch, useSelector } from "react-redux";
+import { useLocation } from "react-router-dom";
+import styles from "./index.module.scss";
+const { Option } = Select;
+
+function AuditObject5() {
+  const dispatch = useDispatch();
+
+  // 获取地址栏参数
+  const location = useLocation();
+  const urlParamRef = useRef<any>({});
+  useEffect(() => {
+    urlParamRef.current = urlParameter(location.search);
+    // console.log("地址栏参数", urlParamRef.current);
+  }, [location]);
+
+  const { info, list: tableList } = useSelector(
+    (state: RootState) => state.object5Store.lookInfo
+  );
+
+  // 审核结果筛选
+  const [value, setValue] = useState(3);
+  const valueChangeFu = (val: number) => {
+    setValue(val);
+  };
+  // 审核说明
+  const [value2, setValue2] = useState("");
+
+  const getInfo = useCallback(async () => {
+    const id = urlParamRef.current.id;
+    const res = await object5infoOutAPI(id);
+    const info = res.data;
+
+    // 表格信息的整理
+    const list = [] as any;
+    const oldData = JSON.parse(res.data.before_json);
+    const newData = JSON.parse(res.data.after_json);
+    console.log(123, oldData, newData);
+
+    for (const k in newData) {
+      if (k !== "fileIds" && k !== "fileIdsName") {
+        if (k === "size") {
+          const oldValArr = oldData[k].split(",");
+          const newValArr = oldData[k].split(",");
+          list.push({
+            label: goodsChangeObj[k],
+            oldVal: `通长:${oldValArr[0]}cm,通宽:${oldValArr[1]}cm,通高:${oldValArr[2]}cm`,
+            newVal: `通长:${newValArr[0]}cm,通宽:${newValArr[1]}cm,通高:${newValArr[2]}cm`,
+          });
+        } else {
+          list.push({
+            label: goodsChangeObj[k],
+            oldVal: oldData[k],
+            newVal: newData[k],
+          });
+        }
+      } else if (k === "fileIdsName") {
+        list.push({
+          label: "附件信息",
+          oldVal: oldData[k],
+          newVal: newData[k],
+        });
+      }
+    }
+    info.statusTxt = statusObj[info.status];
+    dispatch({ type: "object5/getLookInfo", payload: { info, list } });
+  }, [dispatch]);
+
+  useEffect(() => {
+    getInfo();
+  }, [getInfo]);
+
+  // 控制弹窗的显示隐藏
+  const [show, setShow] = useState(false);
+  // 点击表格里面的查看
+  const lookIdRef = useRef(-1);
+
+  const lookGoods = useCallback((id: number) => {
+    lookIdRef.current = id;
+    setShow(true);
+  }, []);
+
+  // 点击返回
+  const cancelFu = useCallback(() => {
+    history.push({
+      pathname: `/object/5`,
+      state: {
+        k: urlParamRef.current.k ? urlParamRef.current.k : "1",
+        d: urlParamRef.current.d,
+      },
+    });
+  }, []);
+
+  // 点击确定
+  const btnOkFu = useCallback(async () => {
+    const txt = value2.replaceAll(" ", "").replaceAll("\n", "");
+    if (txt === "") return message.warning("审核说明不能为空!");
+    const res: any = await auditObject5API({
+      id: Number(urlParamRef.current.id),
+      reason: value2,
+      status: value,
+    });
+    if (res.code === 0) {
+      message.success("操作成功!");
+      cancelFu();
+    }
+  }, [cancelFu, value, value2]);
+
+  // 表格格式
+  const columns = useMemo(() => {
+    const tempArr = [
+      {
+        title: "修改内容",
+        dataIndex: "label",
+      },
+      {
+        title: "修改前",
+        render: (item: any) => {
+          return item.label === "藏品图片" && item.oldVal ? (
+            <ImageLazy width={120} height={70} src={item.oldVal} />
+          ) : item.oldVal ? (
+            item.oldVal
+          ) : (
+            "-"
+          );
+        },
+      },
+      {
+        title: "修改后",
+        render: (item: any) => {
+          return item.label === "藏品图片" && item.newVal ? (
+            <ImageLazy width={120} height={70} src={item.newVal} />
+          ) : item.newVal ? (
+            item.newVal
+          ) : (
+            "-"
+          );
+        },
+      },
+    ];
+
+    return tempArr;
+  }, []);
+
+  return (
+    <div className={styles.AuditObject5}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow">藏品修改</div>
+          <div className="splitStr">/</div>
+          <div className="breadTitRow active">审核</div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        <div className="topTit">修改信息</div>
+        <div className="topInfo">
+          <div className="topInfoRow">
+            <div>
+              <div className="one">藏品名称:</div>
+              <div>{info.name}</div>
+            </div>
+            <div>
+              <div className="one">藏品编号:</div>
+              <div>{info.dictNum}</div>
+            </div>
+          </div>
+          <div className="topInfoRow">
+            <div>
+              <div className="one">登记人员:</div>
+              <div>{info.creatorName}</div>
+            </div>
+            <div>
+              <div className="one">创建日期:</div>
+              <div>{info.create_time}</div>
+            </div>
+          </div>
+        </div>
+        <br />
+        <div className="topTit topTit2">
+          修改记录
+          <div className="titBtn">
+            <Button onClick={() => lookGoods(info.goods_ids)}>查看</Button>
+          </div>
+        </div>
+        <div className="goodsInfo">
+          {/* 表格信息 */}
+          <Table
+            size="small"
+            scroll={{ y: 245 }}
+            dataSource={tableList}
+            columns={columns}
+            rowKey="label"
+            pagination={false}
+          />
+          <br />
+          <div className="inputBox1">
+            <div className="inputBoxTit">
+              <span>* </span>审核结果:
+            </div>
+            <Select
+              style={{ width: 150 }}
+              value={value}
+              onChange={(val) => valueChangeFu(val)}
+            >
+              <Option value={3}>通过</Option>
+              <Option value={2}>不通过</Option>
+            </Select>
+          </div>
+          <div className="inputBox1 inputBox2">
+            <div className="inputBoxTit">
+              <span>* </span>审核说明:
+            </div>
+            <div className="inputBoxText">
+              <TextArea
+                value={value2}
+                onChange={(e) => setValue2(e.target.value)}
+                rows={3}
+                placeholder="请输入"
+                showCount
+                maxLength={255}
+              />
+            </div>
+          </div>
+        </div>
+        <div className="backBtn">
+          <Button onClick={btnOkFu} type="primary">
+            提交
+          </Button>
+          &emsp;
+          <Button onClick={cancelFu}>返回</Button>
+        </div>
+      </div>
+      {/* 点击查看出来的对话框 */}
+      {show ? (
+        <LookModal
+          id={lookIdRef.current}
+          show={show}
+          closeShow={() => setShow(false)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoAuditObject5 = React.memo(AuditObject5);
+
+export default MemoAuditObject5;

+ 96 - 0
src/pages/ObjectSon/Object5/LookObject5/index.module.scss

@@ -0,0 +1,96 @@
+.LookObject5 {
+  :global {
+    .objectSonMain {
+      padding: 10px 30px;
+
+      .topTit {
+        font-size: 16px;
+        font-weight: 700;
+        color: var(--themeColor);
+        margin-bottom: 12px;
+      }
+      .topTit2 {
+        position: relative;
+        margin-bottom: 18px;
+
+        .titBtn {
+          position: absolute;
+          right: 5px;
+          top: 0px;
+        }
+      }
+
+      .topInfo {
+        .topInfoRow {
+          display: flex;
+
+          &>div {
+            width: 50%;
+            border: 1px solid #ccc;
+            height: 34px;
+            line-height: 32px;
+            display: flex;
+
+            .one {
+              font-weight: 700;
+              width: 80px;
+              text-align: right;
+            }
+          }
+        }
+
+        .topInfoTex {
+          cursor: pointer;
+          border: 1px solid #ccc;
+          padding: 5px 10px 4px;
+          display: -webkit-box;
+          overflow: hidden;
+          white-space: normal !important;
+          text-overflow: ellipsis;
+          word-wrap: break-word;
+          -webkit-line-clamp: 2;
+          -webkit-box-orient: vertical;
+
+          &>span {
+            font-weight: 700;
+          }
+        }
+
+      }
+
+      .goodsInfo {
+        .inputBox1 {
+          margin-bottom: 10px;
+          display: flex;
+          align-items: center;
+
+          .inputBoxTit {
+            font-weight: 700;
+            width: 90px;
+
+            &>span {
+              position: relative;
+              top: 3px;
+              color: #ff4d4f;
+            }
+          }
+
+          .inputBoxText {
+            width: calc(100% - 90px);
+          }
+        }
+
+        .inputBox2 {
+          align-items: flex-start;
+        }
+      }
+
+      .backBtn {
+        margin-top: 12px;
+        display: flex;
+        justify-content: center;
+      }
+
+    }
+  }
+}

+ 213 - 0
src/pages/ObjectSon/Object5/LookObject5/index.tsx

@@ -0,0 +1,213 @@
+import BreadTit from "@/components/BreadTit";
+import ImageLazy from "@/components/ImageLazy";
+import LookModal from "@/components/LookObjTable/LookModal";
+import { RootState } from "@/store";
+import { object5infoOutAPI } from "@/store/action/object5";
+import { goodsChangeObj, statusObj } from "@/utils/dataChange";
+import history, { urlParameter } from "@/utils/history";
+import { Button, Table } from "antd";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
+import { useDispatch, useSelector } from "react-redux";
+import { useLocation } from "react-router-dom";
+import styles from "./index.module.scss";
+
+function LookObject5() {
+  const dispatch = useDispatch();
+
+  // 获取地址栏参数
+  const location = useLocation();
+  const urlParamRef = useRef<any>({});
+  useEffect(() => {
+    urlParamRef.current = urlParameter(location.search);
+    // console.log("地址栏参数", urlParamRef.current);
+  }, [location]);
+
+  const { info, list: tableList } = useSelector(
+    (state: RootState) => state.object5Store.lookInfo
+  );
+
+  const getInfo = useCallback(async () => {
+    const id = urlParamRef.current.id;
+    const res = await object5infoOutAPI(id);
+    const info = res.data;
+
+    // 表格信息的整理
+    const list = [] as any;
+    const oldData = JSON.parse(res.data.before_json);
+    const newData = JSON.parse(res.data.after_json);
+    console.log(123, oldData, newData);
+
+    for (const k in newData) {
+      if (k !== "fileIds" && k !== "fileIdsName") {
+        if (k === "size") {
+          const oldValArr = oldData[k].split(",");
+          const newValArr = oldData[k].split(",");
+          list.push({
+            label: goodsChangeObj[k],
+            oldVal: `通长:${oldValArr[0]}cm,通宽:${oldValArr[1]}cm,通高:${oldValArr[2]}cm`,
+            newVal: `通长:${newValArr[0]}cm,通宽:${newValArr[1]}cm,通高:${newValArr[2]}cm`,
+          });
+        } else {
+          list.push({
+            label: goodsChangeObj[k],
+            oldVal: oldData[k],
+            newVal: newData[k],
+          });
+        }
+      } else if (k === "fileIdsName") {
+        list.push({
+          label: "附件信息",
+          oldVal: oldData[k],
+          newVal: newData[k],
+        });
+      }
+    }
+    info.statusTxt = statusObj[info.status];
+    dispatch({ type: "object5/getLookInfo", payload: { info, list } });
+  }, [dispatch]);
+
+  useEffect(() => {
+    getInfo();
+  }, [getInfo]);
+
+  // 控制弹窗的显示隐藏
+  const [show, setShow] = useState(false);
+  // 点击表格里面的查看
+  const lookIdRef = useRef(-1);
+
+  const lookGoods = useCallback((id: number) => {
+    lookIdRef.current = id;
+    setShow(true);
+  }, []);
+
+  // 点击返回
+  const cancelFu = useCallback(() => {
+    history.push({
+      pathname: `/object/5`,
+      state: {
+        k: urlParamRef.current.k ? urlParamRef.current.k : "1",
+        d: urlParamRef.current.d,
+      },
+    });
+  }, []);
+
+  // 表格格式
+  const columns = useMemo(() => {
+    const tempArr = [
+      {
+        title: "修改内容",
+        dataIndex: "label",
+      },
+      {
+        title: "修改前",
+        render: (item: any) => {
+          return item.label === "藏品图片" && item.oldVal ? (
+            <ImageLazy width={120} height={70} src={item.oldVal} />
+          ) : item.oldVal ? (
+            item.oldVal
+          ) : (
+            "-"
+          );
+        },
+      },
+      {
+        title: "修改后",
+        render: (item: any) => {
+          return item.label === "藏品图片" && item.newVal ? (
+            <ImageLazy width={120} height={70} src={item.newVal} />
+          ) : item.newVal ? (
+            item.newVal
+          ) : (
+            "-"
+          );
+        },
+      },
+    ];
+
+    return tempArr;
+  }, []);
+
+  return (
+    <div className={styles.LookObject5}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow">藏品修改</div>
+          <div className="splitStr">/</div>
+          <div className="breadTitRow active">查看</div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        <div className="topTit">修改信息</div>
+        <div className="topInfo">
+          <div className="topInfoRow">
+            <div>
+              <div className="one">藏品名称:</div>
+              <div>{info.name}</div>
+            </div>
+            <div>
+              <div className="one">藏品编号:</div>
+              <div>{info.dictNum}</div>
+            </div>
+          </div>
+          <div className="topInfoRow">
+            <div>
+              <div className="one">登记人员:</div>
+              <div>{info.creatorName}</div>
+            </div>
+            <div>
+              <div className="one">创建日期:</div>
+              <div>{info.create_time}</div>
+            </div>
+          </div>
+          <div className="topInfoTex">
+            <span>审核结果:</span>
+            {info.statusTxt}
+          </div>
+          <div className="topInfoTex" title={info.reason}>
+            <span>审核说明:</span>
+            {info.reason ? info.reason : "-"}
+          </div>
+        </div>
+        <br />
+        <div className="topTit topTit2">
+          修改记录
+          <div className="titBtn">
+            <Button onClick={() => lookGoods(info.goods_ids)}>查看</Button>
+          </div>
+        </div>
+        <div className="goodsInfo">
+          {/* 表格信息 */}
+          <Table
+            size="small"
+            scroll={{ y: 340 }}
+            dataSource={tableList}
+            columns={columns}
+            rowKey="label"
+            pagination={false}
+          />
+        </div>
+        <div className="backBtn">
+          <Button onClick={cancelFu}>返回</Button>
+        </div>
+      </div>
+      {/* 点击查看出来的对话框 */}
+      {show ? (
+        <LookModal
+          id={lookIdRef.current}
+          show={show}
+          closeShow={() => setShow(false)}
+        />
+      ) : null}
+    </div>
+  );
+}
+
+const MemoLookObject5 = React.memo(LookObject5);
+
+export default MemoLookObject5;

+ 294 - 4
src/pages/ObjectSon/Object5/index.tsx

@@ -1,9 +1,299 @@
+import BreadTit from "@/components/BreadTit";
+import classNames from "classnames";
+import { useEffect, useMemo, useRef, useState } from "react";
 import styles from "./index.module.scss";
+import { Input, DatePicker, Table, Button, Popconfirm, message } from "antd";
+import AuthButton from "@/components/AuthButton";
+import history from "@/utils/history";
+import { useLocation } from "react-router-dom";
+import { useDispatch, useSelector } from "react-redux";
+import { RootState } from "@/store";
+import {
+  getObject5List,
+  getObject5ListNum,
+  object5DelAPI,
+} from "@/store/action/object5";
+
+const { RangePicker } = DatePicker;
+
 export default function Object5() {
-  
+  const dispatch = useDispatch();
+
+  // 获取顶部数量
+
+  useEffect(() => {
+    dispatch(getObject5ListNum());
+  }, [dispatch]);
+
+  // 顶部的状态改变了,统一管理,传到二级页码
+  const statusRef = useRef<null | number>(null);
+
+  const dataTit = useSelector(
+    (state: RootState) => state.object5Store.infoNum5
+  );
+
+  // 封装发送请求的函数
+  const getList = () => {
+    const data = {
+      ...tableSelect,
+      pageNum: pageNumRef.current,
+      status: statusRef.current,
+    };
+    dispatch(getObject5List(data));
+  };
+
+  // 获取地址栏参数
+  const location = useLocation();
+
+  const pageNumRef = useRef(1);
+
+  // 如果有参数 根据参数页码在次发送请求
+  useEffect(() => {
+    const urlParam = location.state || {};
+    setTableSelect({
+      ...tableSelect,
+      pageNum: Number(urlParam.k) ? Number(urlParam.k) : 1,
+      // eslint-disable-next-line eqeqeq
+      status: urlParam.d && urlParam.d != "null" ? Number(urlParam.d) : null,
+    });
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [location]);
+
+  // 顶部筛选
+  const [tableSelect, setTableSelect] = useState({
+    status: null as null | number,
+    searchKey: "",
+    startTime: "",
+    endTime: "",
+    pageSize: 10,
+    pageNum: 1,
+    name: "",
+  });
+
+  // 当前页码统一
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+  }, [tableSelect.pageNum]);
+
+  // 顶部状态统一
+  useEffect(() => {
+    statusRef.current = tableSelect.status;
+  }, [tableSelect.status]);
+
+  // 防止返回的时候发送了2次请求来对应页码
+
+  const getListRef = useRef(-1);
+
+  useEffect(() => {
+    clearTimeout(getListRef.current);
+    getListRef.current = window.setTimeout(() => {
+      getList();
+    }, 100);
+
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [tableSelect]);
+
+  // 登记人员输入
+  const nameTime = useRef(-1);
+  const nameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime.current);
+    nameTime.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
+    }, 500);
+  };
+
+  // 藏品名称输入
+  const nameTime2 = useRef(-1);
+  const nameChange2 = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime2.current);
+    nameTime2.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, name: e.target.value, pageNum: 1 });
+    }, 500);
+  };
+
+  // 时间选择器改变
+  const timeChange = (date: any, dateString: any) => {
+    let startTime = "";
+    let endTime = "";
+    if (dateString[0] && dateString[1]) {
+      startTime = dateString[0] + " 00:00:00";
+      endTime = dateString[1] + " 23:59:59";
+    }
+    setTableSelect({ ...tableSelect, startTime, endTime, pageNum: 1 });
+  };
+
+  // 点击删除按钮
+  const delOne = async (id: number) => {
+    const res: any = await object5DelAPI(id);
+    if (res.code === 0) {
+      message.success("删除成功!");
+      getList();
+      dispatch(getObject5ListNum());
+    }
+  };
+
+  // ---------关于表格
+
+  // 页码变化
+  const paginationChange = (pageNum: number, pageSize: number) => {
+    setTableSelect({ ...tableSelect, pageNum, pageSize });
+  };
+
+  const results = useSelector((state: RootState) => state.object5Store.info5);
+
+  const columns = useMemo(() => {
+    return [
+      {
+        title: "藏品编号名称",
+        dataIndex: "dictNum",
+      },
+      {
+        title: "藏品编号",
+        render: (item: any) => (item.num ? item.num : "-"),
+      },
+      {
+        title: "藏品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "登记人员",
+        dataIndex: "creatorName",
+      },
+      {
+        title: "创建日期",
+        dataIndex: "createTime",
+      },
+      {
+        title: "完成日期",
+        render: (item: any) => (item.day && item.status === 3 ? item.day : "-"),
+      },
+      {
+        title: "状态",
+        dataIndex: "statusTxt",
+      },
+
+      {
+        title: "操作",
+        render: (item: any) => (
+          <>
+            <Button
+              type="text"
+              danger
+              onClick={() =>
+                history.push(
+                  `/object/5/look?k=${pageNumRef.current}&d=${statusRef.current}&id=${item.id}`
+                )
+              }
+            >
+              查看
+            </Button>
+
+            {item.status === 1 ? (
+              <AuthButton
+                onClick={() =>
+                  history.push(
+                    `/object/5/audit?k=${pageNumRef.current}&d=${statusRef.current}&id=${item.id}`
+                  )
+                }
+                type="text"
+                danger
+              >
+                审核
+              </AuthButton>
+            ) : null}
+
+            {item.status === 0 || item.status === 2 ? (
+              <Popconfirm
+                title="确定删除吗?"
+                okText="确定"
+                cancelText="取消"
+                onConfirm={() => delOne(item.id)}
+              >
+                <AuthButton type="text" danger>
+                  删除
+                </AuthButton>
+              </Popconfirm>
+            ) : null}
+          </>
+        ),
+      },
+    ];
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, []);
+
   return (
-    <div className={styles.Object5}>
-      <h1>Object5</h1>
+    <div className={styles.Object1}>
+      <div className="breadTit">
+        <BreadTit>
+          <div className="breadTitRow active">藏品修改</div>
+        </BreadTit>
+      </div>
+      <div className="objectSonMain">
+        {/* 顶部筛选 */}
+        <div className="objectSonMainTit">
+          {dataTit.map((v: any) => (
+            <div
+              key={v.id}
+              onClick={() =>
+                setTableSelect({ ...tableSelect, status: v.id, pageNum: 1 })
+              }
+              className={classNames(
+                v.id === tableSelect.status ? "active" : ""
+              )}
+            >
+              {v.name}({v.num})
+            </div>
+          ))}
+        </div>
+        <div className="objectSonMainTable">
+          {/* 表格数据筛选 */}
+          <div className="tableSelectBox">
+            <div className="row">
+              <span>藏品名称:</span>
+              <Input
+                maxLength={10}
+                style={{ width: 150 }}
+                placeholder="请输入"
+                allowClear
+                onChange={(e) => nameChange2(e)}
+              />
+            </div>
+            <div className="row">
+              <span>登记人员:</span>
+              <Input
+                maxLength={10}
+                style={{ width: 150 }}
+                placeholder="请输入"
+                allowClear
+                onChange={(e) => nameChange(e)}
+              />
+            </div>
+            <div className="row">
+              <span>创建日期:</span>
+              <RangePicker onChange={timeChange} />
+            </div>
+          </div>
+
+          {/* 表格主体 */}
+          <div className="tableMain">
+            <Table
+              scroll={{ y: 428 }}
+              dataSource={results.list}
+              columns={columns}
+              rowKey="id"
+              pagination={{
+                showQuickJumper: true,
+                position: ["bottomCenter"],
+                showSizeChanger: true,
+                current: tableSelect.pageNum,
+                pageSize: tableSelect.pageSize,
+                total: results.total,
+                onChange: paginationChange,
+              }}
+            />
+          </div>
+        </div>
+      </div>
     </div>
-  )
+  );
 }

+ 88 - 0
src/store/action/object4.ts

@@ -0,0 +1,88 @@
+import { statusObjCK } from "@/utils/dataChange";
+import http from "@/utils/http";
+import { AppDispatch } from "..";
+
+/**
+ * 获取藏品登记列表信息
+ */
+export const getObject4List = (data: any) => {
+  return async (dispatch: AppDispatch) => {
+    // 获取列表数据
+    const res: any = await http.post("cms/out/pageList", data);
+    const list = res.data.records;
+    list.forEach((v: any) => {
+      v.statusTxt = statusObjCK[v.status];
+    });
+    const obj = {
+      list,
+      total: res.data.total,
+    };
+    dispatch({ type: "object4/getList", payload: obj });
+  };
+};
+
+/**
+ * 获取藏品登记列表顶部数字信息
+ */
+export const getObject4ListNum = () => {
+  return async (dispatch: AppDispatch) => {
+    // 获取统计数据
+    const res: any = await http.get("cms/out/countByStatus");
+
+    const data = [
+      { id: null, name: "全部", num: res.data.all ? res.data.all : 0 },
+      // { id: 0, name: "待办理", num: res.data[0] ? res.data[0] : 0 },
+      { id: 1, name: "待审核", num: res.data[1] ? res.data[1] : 0 },
+      { id: 2, name: "审核不通过", num: res.data[2] ? res.data[2] : 0 },
+      { id: 3, name: "待归还", num: res.data[3] ? res.data[3] : 0 },
+      { id: 4, name: "已归还", num: res.data[4] ? res.data[4] : 0 },
+    ];
+    dispatch({ type: "object4/getListNum", payload: data });
+  };
+};
+
+/**
+ * 删除外层表格数据
+ */
+export const object4DelAPI = (id: number) => {
+  return http.get(`cms/out/remove/${id}`);
+};
+
+/**
+ * 通过id获取信息
+ */
+export const object4infoOutAPI = (id: number) => {
+  return http.get(`cms/out/detail/${id}`);
+};
+
+/**
+ * 进新增页面发送请求
+ */
+export const object4AddAPI = (data?: any) => {
+  return http.post("cms/out/save", { ...data });
+};
+
+/**
+ * 点击新增或者编辑里面的添加按钮的所有藏品列表
+ */
+export const getGoodsListAllAPI = (val: any) => {
+  return async (dispatch: AppDispatch) => {
+    // 获取统计数据
+    const res: any = await http.get(`cms/out/goods/list?searchKey=${val}`);
+    dispatch({ type: "object4/setGoodsListAll", payload: res.data });
+  };
+};
+
+/**
+ * 审核入库信息
+ */
+export const auditObject4API = (data: any) => {
+  return http.post("cms/out/audit", data);
+};
+
+/**
+ * 出库查看页面的归还
+ */
+export const returnObject4API = (data: any) => {
+  return http.post("cms/out/goodsReturn", data);
+};

+ 65 - 0
src/store/action/object5.ts

@@ -0,0 +1,65 @@
+import { statusObj } from "@/utils/dataChange";
+import http from "@/utils/http";
+import { AppDispatch } from "..";
+
+/**
+ * 获取藏品登记列表信息
+ */
+export const getObject5List = (data: any) => {
+  return async (dispatch: AppDispatch) => {
+    // 获取列表数据
+    const res: any = await http.post("cms/edit/pageList", data);
+    const list = res.data.records;
+    list.forEach((v: any) => {
+      v.statusTxt = statusObj[v.status];
+    });
+    const obj = {
+      list,
+      total: res.data.total,
+    };
+    dispatch({ type: "object5/getList", payload: obj });
+  };
+};
+
+/**
+ * 获取藏品登记列表顶部数字信息
+ */
+export const getObject5ListNum = () => {
+  return async (dispatch: AppDispatch) => {
+    // 获取统计数据
+    const res: any = await http.get("cms/edit/countByStatus");
+    
+    const data = [
+      { id: null, name: "全部", num: res.data.all ? res.data.all : 0 },
+      // { id: 0, name: "待办理", num: res.data[0] ? res.data[0] : 0 },
+      { id: 1, name: "待审核", num: res.data[1] ? res.data[1] : 0 },
+      { id: 2, name: "审核不通过", num: res.data[2] ? res.data[2] : 0 },
+      { id: 3, name: "已完成", num: res.data[3] ? res.data[3] : 0 },
+    ];
+    dispatch({ type: "object5/getListNum", payload: data });
+  };
+};
+
+/**
+ * 删除外层表格数据
+ */
+export const object5DelAPI = (id: number) => {
+  return http.get(`cms/edit/remove/${id}`);
+};
+
+/**
+ * 通过id获取信息
+ */
+export const object5infoOutAPI = (id: number) => {
+  return http.get(`cms/edit/detail/${id}`);
+};
+
+
+
+/**
+ * 审核入库信息
+ */
+export const auditObject5API = (data: any) => {
+  return http.post("cms/edit/audit", data);
+};
+

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

@@ -3,6 +3,8 @@ import loginReducer from "./login";
 import object1Reducer from "./object1";
 import object2Reducer from "./object2";
 import object3Reducer from "./object3";
+import object4Reducer from "./object4";
+import object5Reducer from "./object5";
 import stores1Reducer from "./stores1";
 
 // 合并 reducer
@@ -11,6 +13,8 @@ const rootReducer = combineReducers({
   object1Store: object1Reducer,
   object2Store: object2Reducer,
   object3Store: object3Reducer,
+  object4Store: object4Reducer,
+  object5Store: object5Reducer,
   stores1Store: stores1Reducer,
 });
 

+ 61 - 0
src/store/reducer/object4.ts

@@ -0,0 +1,61 @@
+// 初始化状态应用注解
+const initState = {
+  // 表格数据
+  info4: {
+    list: [] as any,
+    total: 0,
+  },
+  // 表格顶部数字数据
+  infoNum4: [],
+  // 查看和审核的表格信息
+  lookInfo: {
+    info: {} as any,
+    list: [] as any,
+  },
+  // 新增或者编辑的藏品信息列表
+  goodsTableList: [] as any,
+  // 点击新增或者编辑里面的添加按钮的所有藏品列表
+  goodsAllList: [] as any,
+  // 新增和编辑页面出库类型下拉框
+  typeSelectList: [
+    { id: 1, label: "展览", value: "展览" },
+    { id: 2, label: "研究", value: "研究" },
+    { id: 3, label: "修复", value: "修复" },
+    { id: 4, label: "复制", value: "复制" },
+    { id: 5, label: "文创", value: "文创" },
+    { id: 6, label: "其他", value: "其他" },
+  ],
+};
+
+type LoginActionType =
+  | { type: "object4/getList"; payload: any }
+  | { type: "object4/getListNum"; payload: any }
+  | { type: "object4/getLookInfo"; payload: any }
+  | { type: "object4/getGoodsTableList"; payload: any }
+  | { type: "object4/setGoodsListAll"; payload: any };
+// 频道 reducer
+export default function object4Reducer(
+  state = initState,
+  action: LoginActionType
+) {
+  switch (action.type) {
+    // 表格数据1
+    case "object4/getList":
+      return { ...state, info4: action.payload };
+    // 表格顶部数字数据1
+    case "object4/getListNum":
+      return { ...state, infoNum4: action.payload };
+    // 查看和审核的表格数据
+    case "object4/getLookInfo":
+      return { ...state, lookInfo: action.payload };
+    // 新增或者编辑的藏品信息列表
+    case "object4/getGoodsTableList":
+      return { ...state, goodsTableList: action.payload };
+    // 点击新增或者编辑里面的添加按钮的所有藏品列表
+    case "object4/setGoodsListAll":
+      return { ...state, goodsAllList: action.payload };
+
+    default:
+      return state;
+  }
+}

+ 39 - 0
src/store/reducer/object5.ts

@@ -0,0 +1,39 @@
+// 初始化状态应用注解
+const initState = {
+  // 表格数据
+  info5: {
+    list: [] as any,
+    total: 0,
+  },
+  // 表格顶部数字数据
+  infoNum5: [],
+  // 查看和审核的详细信息
+  lookInfo: {
+    info:{},
+    list:[]
+  } as any,
+};
+
+type LoginActionType =
+  | { type: "object5/getList"; payload: any }
+  | { type: "object5/getListNum"; payload: any }
+  | { type: "object5/getLookInfo"; payload: any }
+// 频道 reducer
+export default function object5Reducer(
+  state = initState,
+  action: LoginActionType
+) {
+  switch (action.type) {
+    // 表格数据1
+    case "object5/getList":
+      return { ...state, info5: action.payload };
+    // 表格顶部数字数据1
+    case "object5/getListNum":
+      return { ...state, infoNum5: action.payload };
+    // 查看和审核的详细数据
+    case "object5/getLookInfo":
+      return { ...state, lookInfo: action.payload };
+    default:
+      return state;
+  }
+}

+ 10 - 1
src/utils/dataChange.ts

@@ -54,4 +54,13 @@ export const logTypeOpenObj = {
   out: "出库管理",
   move: "藏品移库",
   edit: "藏品修改",
-} as any;
+} as any;
+
+// 出库管理状态的筛选
+export const statusObjCK = {
+  0: "待办理", //草稿中
+  1: "待审核", //待审核
+  2: "审核不通过", //审核不通过
+  3: "待归还", //审核通过
+  4: "已归还", //审核通过
+} as any;