shaogen1995 преди 3 месеца
родител
ревизия
8faf185ced

+ 167 - 0
src/assets/styles/base.css

@@ -221,3 +221,170 @@ textarea {
 .D1GtNumAc {
   color: var(--themeColor);
 }
+.Y1info {
+  width: 100%;
+  margin-top: 5px;
+  height: calc(100% - 35px);
+  font-size: 16px;
+  padding: 15px;
+  overflow-y: auto;
+}
+.Y1info .Y1tit {
+  font-size: 18px;
+  padding-left: 15px;
+  font-weight: 700;
+  position: relative;
+  margin-bottom: 15px;
+  color: var(--themeColor);
+}
+.Y1info .Y1tit::before {
+  position: absolute;
+  left: 0px;
+  top: 50%;
+  transform: translateY(-50%);
+  content: '';
+  width: 6px;
+  height: 18px;
+  background-color: var(--themeColor);
+}
+.Y1info .Y1row {
+  width: 100%;
+  display: flex;
+  margin-bottom: 10px;
+}
+.Y1info .Y1row .Y1rowll {
+  width: 120px;
+  text-align: right;
+  font-weight: 700;
+}
+.Y1info .Y1row .Y1rowrr {
+  width: calc(100% - 120px);
+  word-wrap: break-word;
+  max-height: 130px;
+  overflow-y: auto;
+  white-space: pre-wrap;
+}
+.Y1info .Y1rowZ .Y1z1 {
+  margin-bottom: 20px;
+  display: flex;
+  justify-content: space-between;
+}
+.Y1info .Y1rowZ .Y1z1 .Y1rowZll {
+  width: 48%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.Y1info .Y1rowZ .Y1z1 .Y1rowZrr {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 48%;
+}
+.Y1info .Y1rowZ .Y1z2 {
+  margin-bottom: 20px;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+  width: 100%;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 {
+  margin-bottom: 10px;
+  width: 48%;
+  display: flex;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r11 {
+  width: 120px;
+  text-align: right;
+  font-weight: 700;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r11long {
+  width: 132px;
+  position: relative;
+  left: -6px;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1 .y1z2_1r12 {
+  width: calc(100% - 120px);
+  word-wrap: break-word;
+  max-height: 130px;
+  overflow-y: auto;
+  white-space: pre-wrap;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1Full {
+  width: 100%;
+}
+.Y1info .Y1rowZ .Y1z2 .y1z2_1 .y1z2_1row1Full .y1z2_1r12 {
+  max-height: 1000px;
+}
+.Y1info .Y22com .Y22sta {
+  font-weight: 700;
+  font-size: 18px;
+  margin-bottom: 20px;
+}
+.Y1info .Y22com .Y22No {
+  font-size: 16px;
+  letter-spacing: 4px;
+  height: 200px;
+  display: flex;
+  align-items: center;
+}
+.Y1info .Y22com .Y22Info {
+  width: 800px;
+  border: 1px solid #ccc;
+  border-bottom: none;
+}
+.Y1info .Y22com .Y22Info .Y22row {
+  display: flex;
+  align-items: center;
+}
+.Y1info .Y22com .Y22Info .Y22row > div {
+  width: 200px;
+  text-align: center;
+  padding: 8px 4px;
+  border-bottom: 1px solid #ccc;
+}
+.Y1info .Y22com .Y22Info .Y22row > div:nth-of-type(2) {
+  width: 600px;
+}
+.Y1info .Y22com .Y22Info .Y22row1 {
+  background-color: #eaeaea;
+}
+.Y1info .Y22com .Y22Info .Y22rowNo {
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  border-bottom: 1px solid #ccc;
+}
+.Y1info .Y33com .Y33top {
+  margin-bottom: 20px;
+  display: flex;
+  justify-content: space-around;
+}
+.Y1info .Y33com .Y33top .ant-btn {
+  margin-right: 15px;
+}
+.Y1info .Y33com .Y33no {
+  font-size: 16px;
+  letter-spacing: 4px;
+  height: 200px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.C22revampBox {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 100;
+  padding: 30px;
+  background-color: rgba(0, 0, 0, 0.6);
+}
+.C22revampBox > div {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}

+ 185 - 0
src/assets/styles/base.less

@@ -353,3 +353,188 @@ textarea {
 .D1GtNumAc {
   color: var(--themeColor);
 }
+
+// 侧边栏藏品详情
+.Y1info {
+  width: 100%;
+  margin-top: 5px;
+  height: calc(100% - 35px);
+  font-size: 16px;
+  padding: 15px;
+  overflow-y: auto;
+  .Y1tit {
+    font-size: 18px;
+    padding-left: 15px;
+    font-weight: 700;
+    position: relative;
+    margin-bottom: 15px;
+    color: var(--themeColor);
+    &::before {
+      position: absolute;
+      left: 0px;
+      top: 50%;
+      transform: translateY(-50%);
+      content: '';
+      width: 6px;
+      height: 18px;
+      background-color: var(--themeColor);
+    }
+  }
+
+  .Y1row {
+    width: 100%;
+    display: flex;
+    margin-bottom: 10px;
+    .Y1rowll {
+      width: 120px;
+      text-align: right;
+      font-weight: 700;
+    }
+    .Y1rowrr {
+      width: calc(100% - 120px);
+      word-wrap: break-word;
+      max-height: 130px;
+      overflow-y: auto;
+      white-space: pre-wrap;
+    }
+  }
+
+  // ------------------------档案信息
+  .Y1rowZ {
+    .Y1z1 {
+      margin-bottom: 20px;
+      display: flex;
+      justify-content: space-between;
+      .Y1rowZll {
+        width: 48%;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+      }
+      .Y1rowZrr {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        width: 48%;
+      }
+    }
+
+    .Y1z2 {
+      margin-bottom: 20px;
+      .y1z2_1 {
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: space-between;
+        width: 100%;
+        .y1z2_1row1 {
+          margin-bottom: 10px;
+          width: 48%;
+          display: flex;
+          .y1z2_1r11 {
+            width: 120px;
+            text-align: right;
+            font-weight: 700;
+          }
+          .y1z2_1r11long {
+            width: 132px;
+            position: relative;
+            left: -6px;
+          }
+          .y1z2_1r12 {
+            width: calc(100% - 120px);
+            word-wrap: break-word;
+            max-height: 130px;
+            overflow-y: auto;
+            white-space: pre-wrap;
+          }
+        }
+        .y1z2_1row1Full {
+          width: 100%;
+          .y1z2_1r12 {
+            max-height: 1000px;
+          }
+        }
+      }
+    }
+  }
+
+  // ------------------------库存信息
+  .Y22com {
+    .Y22sta {
+      font-weight: 700;
+      font-size: 18px;
+      margin-bottom: 20px;
+    }
+    .Y22No {
+      font-size: 16px;
+      letter-spacing: 4px;
+      height: 200px;
+      display: flex;
+      align-items: center;
+    }
+    .Y22Info {
+      width: 800px;
+      border: 1px solid #ccc;
+      border-bottom: none;
+      .Y22row {
+        display: flex;
+        align-items: center;
+        & > div {
+          width: 200px;
+          text-align: center;
+          padding: 8px 4px;
+          border-bottom: 1px solid #ccc;
+          &:nth-of-type(2) {
+            width: 600px;
+          }
+        }
+      }
+      .Y22row1 {
+        background-color: #eaeaea;
+      }
+      .Y22rowNo {
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        border-bottom: 1px solid #ccc;
+      }
+    }
+  }
+
+  // ------------------------藏品附件
+  .Y33com {
+    .Y33top {
+      margin-bottom: 20px;
+      display: flex;
+      justify-content: space-around;
+      .ant-btn {
+        margin-right: 15px;
+      }
+    }
+    .Y33no {
+      font-size: 16px;
+      letter-spacing: 4px;
+      height: 200px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+}
+
+// 点击藏品编辑
+.C22revampBox {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 100;
+  padding: 30px;
+  background-color: rgba(0, 0, 0, 0.6);
+  & > div {
+    position: relative;
+    width: 100%;
+    height: 100%;
+  }
+}

+ 1 - 2
src/components/ZGaddNow/index.tsx

@@ -220,8 +220,7 @@ function ZGaddNow({
       open={true}
       title={
         <div className='B3Gtit'>
-          <div>选择藏品</div>{' '}
-          {register ? <div>不选中则清空外层表单数据</div> : <div>已选中 {resNum} 条</div>}
+          <div>选择藏品</div> {register ? <div></div> : <div>已选中 {resNum} 条</div>}
         </div>
       }
       footer={

+ 8 - 1
src/pages/B_enterTibet/B2identify/B2edit/index.tsx

@@ -43,6 +43,7 @@ function B2edit() {
 
   // 藏品清单快照数据
   const [snaps, setSnaps] = useState<C1GoodType[]>([])
+  const delSnapIdsRef = useRef<number[]>([])
 
   const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
 
@@ -83,7 +84,11 @@ function B2edit() {
               {['3', '4'].includes(key) ? null : (
                 <MyPopconfirm
                   txtK='删除'
-                  onConfirm={() => setSnaps(snaps.filter(v => v.id !== item.id))}
+                  onConfirm={() => {
+                    if (item.id2 && !delSnapIdsRef.current.includes(item.id2))
+                      delSnapIdsRef.current.push(item.id2)
+                    setSnaps(snaps.filter(v => v.id !== item.id))
+                  }}
                 />
               )}
             </>
@@ -167,6 +172,7 @@ function B2edit() {
         const obj = {
           ...topInfo,
           goodsIds: snaps.map(v => v.id).join(','),
+          delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
           snaps: snaps.map(v => ({
             goodsId: v.id,
             id: v.id2 ? v.id2 : null,
@@ -206,6 +212,7 @@ function B2edit() {
       const obj = {
         ...topInfo,
         goodsIds: snaps.map(v => v.id).join(','),
+        delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
         snaps: snaps.map(v => ({
           goodsId: v.id,
           id: v.id2 ? v.id2 : null,

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

@@ -14,6 +14,12 @@
       padding-bottom: 10px;
       border-bottom: 1px solid #ccc;
       .AddGtitLL {
+        & > span {
+          font-size: 18px;
+          font-weight: 700;
+          color: var(--themeColor);
+          margin-right: 15px;
+        }
         .ant-btn {
           margin-right: 20px;
         }

+ 52 - 38
src/pages/C_goodsManage/C1register/AddGoods/index.tsx

@@ -46,16 +46,18 @@ type Props = {
   closeFu: () => void
   nowSta: { key: string; id: string }
   isEdit: boolean //藏品编辑模块
+  editSnap?: C1GoodType //藏品模块属于新增还是编辑
   succFu: (
     obj: C1GoodType,
     type: '新增' | '编辑',
     sta: '存草稿' | '提交',
     flieNew?: GoodFileType[],
-    fileOld?: GoodFileType[]
+    fileOld?: GoodFileType[],
+    oldInfo?: C1GoodType
   ) => void
 }
 
-function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
+function AddGoods({ nowSta, closeFu, succFu, isEdit, editSnap }: Props) {
   // 制档日期 / 制档人
   const [txtArr, setTxtArr] = useState([getTokenInfo().user.realName, dayjs().format('YYYY-MM-DD')])
 
@@ -63,38 +65,41 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
   const objOld = useRef<any>({})
 
   // 编辑进来获取详情
-  const getInfo = useCallback(async (id: number) => {
-    const res = await API_goodsInfo(id)
-    if (res.code === 0) {
-      // 藏品编辑信息保存
-      objOld.current = { ...res.data }
-
-      // dateMaking inGoodsDate 2个日期需要格式处理一下
-      const obj = { ...res.data }
-      if (obj.dateMaking) obj.dateMaking = dayjs(obj.dateMaking)
-      if (obj.inGoodsDate) obj.inGoodsDate = dayjs(obj.inGoodsDate)
-
-      setTxtArr([obj.creatorName, dayjs(obj.createTime).format('YYYY-MM-DD')])
-
-      cascaderChArr.forEach(v => {
-        if (obj[v]) obj[v] = obj[v].split(',')
-      })
-      FormBoxRef.current?.setFieldsValue(obj)
-
-      // 设置封面图
-      // ZupThumbRef.current?.setFileComFileFu({
-      //   fileName: '',
-      //   filePath: obj.thumbPc,
-      //   thumb: obj.thumb
-      // })
-
-      // 设置富文本
-      if (obj.rtf) ZRichTextRef.current?.ritxtShowFu(JSON.parse(obj.rtf))
-
-      // 设置附件
-      setTable(obj.file || [])
-    }
-  }, [])
+  const getInfo = useCallback(
+    async (id: number) => {
+      const res = await API_goodsInfo(id)
+      if (res.code === 0) {
+        // 藏品编辑信息保存
+        objOld.current = { ...res.data }
+
+        // dateMaking inGoodsDate 2个日期需要格式处理一下
+        const obj = editSnap && editSnap.id ? { ...editSnap } : { ...res.data }
+        if (obj.dateMaking) obj.dateMaking = dayjs(obj.dateMaking)
+        if (obj.inGoodsDate) obj.inGoodsDate = dayjs(obj.inGoodsDate)
+
+        setTxtArr([obj.creatorName, dayjs(obj.createTime).format('YYYY-MM-DD')])
+
+        cascaderChArr.forEach(v => {
+          if (obj[v]) obj[v] = obj[v].split(',')
+        })
+        FormBoxRef.current?.setFieldsValue(obj)
+
+        // 设置封面图
+        // ZupThumbRef.current?.setFileComFileFu({
+        //   fileName: '',
+        //   filePath: obj.thumbPc,
+        //   thumb: obj.thumb
+        // })
+
+        // 设置富文本
+        if (obj.rtf) ZRichTextRef.current?.ritxtShowFu(JSON.parse(obj.rtf))
+
+        // 设置附件
+        setTable(obj.file || [])
+      }
+    },
+    [editSnap]
+  )
 
   useEffect(() => {
     if (nowSta.id !== 'null') {
@@ -333,8 +338,15 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
         if (flag) return MessageFu.warning('未修改藏品信息')
 
         // -----------藏品编辑模块进来---------------
-        MessageFu.success('编辑成功')
-        succFu(obj, '编辑', staTxt.current as '提交', table || [], objOld.current.file || [])
+        MessageFu.success(`${staTxt.current}成功`)
+        succFu(
+          obj,
+          '编辑',
+          staTxt.current as '提交',
+          table || [],
+          objOld.current.file || [],
+          objOld.current
+        )
         closeFu()
       } else {
         // 藏品登记模块
@@ -372,6 +384,8 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
     <div className={styles.AddGoods}>
       <div className='AddGtit'>
         <div className='AddGtitLL'>
+          {isEdit ? <span>藏品修改{editSnap ? '-编辑' : '-新增'}</span> : null}
+
           {['基本信息', '附属信息', '附件信息'].map(v => (
             <Button
               onClick={() => setTabTxt(v)}
@@ -902,7 +916,7 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
                 lookData={[]}
                 size={500}
                 noShowList={true}
-                fileRes={obj => setTable([obj, ...table])}
+                fileRes={obj => setTable([...table, obj])}
               />
             </div>
 
@@ -924,7 +938,7 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit }: Props) {
             <Button type='primary' onClick={() => btnOk('提交')}>
               提交
             </Button>
-            {nowSta.id === 'null' ? (
+            {(nowSta.id === 'null' || isEdit) && !editSnap ? (
               <>
                 &emsp;
                 <Button type='primary' onClick={() => btnOk('存草稿')}>

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

@@ -1,4 +1,101 @@
 .C1look {
+  background-color: #fff;
+  border-radius: 10px;
+  padding-top: 15px;
   :global {
+    .C1lBox {
+      padding: 0 24px;
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .C1Tit {
+        font-size: 18px;
+        font-weight: 700;
+        padding-bottom: 10px;
+        padding-left: 18px;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 17px;
+        color: var(--themeColor);
+        position: relative;
+        .C1TitRR {
+          position: absolute;
+          z-index: 20;
+          right: 0;
+          top: 0;
+          font-size: 14px;
+          .ant-btn {
+            pointer-events: auto;
+          }
+        }
+        .ant-btn {
+          margin-left: 15px;
+          pointer-events: none;
+        }
+      }
+      .C1Tit2 {
+        margin-top: 24px;
+      }
+
+      .C1main {
+        margin-top: -20px;
+      }
+
+      .C1rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .C1row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          min-height: 32px;
+          .C1rowll {
+            width: 110px;
+            text-align: right;
+            font-weight: 700;
+          }
+          .C1rowrr {
+            width: calc(100% - 110px);
+          }
+        }
+      }
+
+      .C1Good {
+        position: relative;
+        z-index: 10;
+        margin: 15px 0 -10px;
+
+        .ant-btn {
+          pointer-events: auto;
+          margin-left: 0px;
+          margin-right: 15px;
+        }
+      }
+
+      .Y1info {
+        margin-top: 0;
+        height: auto;
+        .ant-table-cell {
+          padding: 8px !important;
+        }
+        .ant-table-body {
+          height: auto !important;
+        }
+      }
+      border-bottom: 1px solid #ccc;
+    }
+    .C1lBtn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
   }
 }

+ 276 - 2
src/pages/C_goodsManage/C1register/C1look/index.tsx

@@ -1,9 +1,283 @@
-import React from 'react'
+import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { useParams } from 'react-router-dom'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import {
+  FourAPI_audit,
+  FourAPI_del,
+  FourAPI_getInfo,
+  FourAPI_revocation,
+  FourAPI_saveApply
+} from '@/store/action/FourAll'
+import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import { Button } from 'antd'
+import { statusObj } from '@/utils/tableData'
+import history, { openGoodsInfoFu } from '@/utils/history'
+import Y11com from '@/pages/Y_goodsDetails/Y1cathet/Y11com'
+import Y33com from '@/pages/Y_goodsDetails/Y1cathet/Y33com'
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+import { API_goodsInfo } from '@/store/action/C1ledger'
+import ZupFileTable from '@/components/ZupFileTable'
+import ZflowTable from '@/components/ZflowTable'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { MessageFu } from '@/utils/message'
+import { EXbtnFu } from '@/utils/EXBtn'
+import { C22infoBtnFu } from '../../C22goodEdit/data'
 function C1look() {
+  const { key, id } = useParams<any>()
+  // key: 3审批 4查看
+  // 滚到顶部
+  const sollrDom = useRef<HTMLDivElement>(null)
+
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  const [info, setInfo] = useState({} as C1GoodType)
+
+  // 获取详情
+  const getInfoFu = useCallback(async () => {
+    const res = await FourAPI_getInfo('3', id)
+    if (res.code === 0) {
+      const data = res.data
+      setTopInfo(data)
+      if (data.goodsIds) {
+        const res2 = await API_goodsInfo(data.goodsIds)
+        if (res2.code === 0) {
+          setInfo(res2.data)
+        }
+      }
+    }
+  }, [id])
+
+  useEffect(() => {
+    getInfoFu()
+  }, [getInfoFu])
+
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+
+  // 申请记录
+  const [auditsShow, setAuditsShow] = useState(false)
+
+  // 藏品详情的信息
+  const [goodType, setGoodType] = useState('藏品信息')
+
+  // 点击编辑
+  const editBtnFu = useCallback(() => {
+    MessageFu.success('已跳转至编辑页面')
+    history.push(`/register?id=${id}`)
+  }, [id])
+
+  // 点击提交
+  const btnOkFu = useCallback(async () => {
+    const res = await FourAPI_saveApply('3', topInfo)
+    if (res.code === 0) {
+      MessageFu.success('提交成功')
+      history.push('/goodEdit')
+    }
+  }, [topInfo])
+
+  // 点击删除
+  const delFu = useCallback(async () => {
+    const res = await FourAPI_del('3', id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/cancel')
+    }
+  }, [id])
+
+  // 点击撤回
+  const cheHuiFu = useCallback(async () => {
+    // 撤回-该状态 刷新当前页
+    const res = await FourAPI_revocation('3', id)
+    if (res.code === 0) {
+      MessageFu.success('撤回成功')
+      if (sollrDom.current) sollrDom.current.scrollTop = 0
+      getInfoFu()
+    }
+  }, [getInfoFu, id])
+
+  // 点击审批
+  const auditFu = useCallback(async () => {
+    // console.log('审批信息富文本', rtf2)
+    if (!auditSta) {
+      if (sollrDom.current) sollrDom.current.scrollTop = 0
+      return MessageFu.warning('请选择审批结果')
+    }
+    const rtf2 = ZAuditRef.current?.resData()
+
+    const res = await FourAPI_audit('3', {
+      orderId: topInfo.id,
+      rtfOpinion: rtf2,
+      status: auditSta === '同意' ? 1 : 2
+    })
+
+    if (res.code === 0) {
+      MessageFu.success('提交成功')
+      history.push(`/goodEdit`)
+    }
+  }, [auditSta, topInfo.id])
+
   return (
     <div className={styles.C1look}>
-      <h1>C1look</h1>
+      <div className='pageTitle'>藏品登记-{Reflect.get(pageTitTxtObj, key)}</div>
+
+      {/* 主体 */}
+      <div className='C1lBox' ref={sollrDom}>
+        <div className='C1Tit'>
+          申请信息
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
+        </div>
+
+        {topInfo.id ? (
+          <div className='C1rowAll'>
+            <div className='C1row'>
+              <div className='C1rowll'>业务单号:</div>
+              <div className='C1rowrr'>{topInfo.num}</div>
+            </div>
+
+            <div className='C1row'>
+              <div className='C1rowll'>业务名称:</div>
+              <div className='C1rowrr'>{topInfo.name}</div>
+            </div>
+
+            <div className='C1row'>
+              <div className='C1rowll'>发起人:</div>
+              <div className='C1rowrr'>{topInfo.creatorName + ' - ' + topInfo.createTime}</div>
+            </div>
+
+            <div className='C1row'>
+              <div className='C1rowll'>发起部门:</div>
+              <div className='C1rowrr'>{topInfo.deptName}</div>
+            </div>
+          </div>
+        ) : null}
+
+        <div className='C1main'>
+          {['3'].includes(key) ? (
+            <X3auditInfo
+              titHide={true}
+              dirCode='C1register'
+              myUrl='cms/register/upload'
+              auditSta={auditSta}
+              auditStaFu={val => setAuDitSta(val)}
+              ref={ZAuditRef}
+            />
+          ) : null}
+        </div>
+
+        <div className='C1Tit C1Tit2'>
+          藏品详情
+          <div className='C1TitRR'>
+            更多操作请在详情页中进行
+            <Button type='primary' onClick={() => openGoodsInfoFu(Number(topInfo.goodsIds))}>
+              查看详情
+            </Button>
+          </div>
+          <div className='C1Good'>
+            {['藏品信息', '藏品附件'].map(v => (
+              <Button
+                onClick={() => setGoodType(v)}
+                key={v}
+                type={v === goodType ? 'primary' : 'default'}
+              >
+                {v}
+              </Button>
+            ))}
+          </div>
+        </div>
+
+        {info.id ? (
+          <div className='Y1info'>
+            {goodType === '藏品信息' ? <Y11com info={info} /> : null}
+            {goodType === '藏品附件' ? <Y33com sId={info.id} /> : null}
+          </div>
+        ) : null}
+
+        {/* 附件归档 */}
+        {topInfo.status === 4 ? (
+          <ZupFileTable
+            listTemp={topInfo.filing || []}
+            dirCode='C1register'
+            myUrl='cms/register/upload'
+            fromData={{ moduleId: topInfo.id }}
+          />
+        ) : null}
+      </div>
+
+      {/* 底部按钮 */}
+      <div className='C1lBtn'>
+        {['3', '4'].includes(key) && topInfo.audits && topInfo.audits.length ? (
+          <Button type='primary' onClick={() => setAuditsShow(true)}>
+            申请记录
+          </Button>
+        ) : null}
+
+        {/* 能进审批页,点审批按钮的必定有权限 */}
+        {key === '3' ? (
+          C22infoBtnFu(topInfo)['审批'] ? (
+            <Button type='primary' onClick={auditFu}>
+              提交
+            </Button>
+          ) : null
+        ) : (
+          <>
+            {C22infoBtnFu(topInfo)['编辑'] ? (
+              <Button type='primary' onClick={editBtnFu}>
+                编辑
+              </Button>
+            ) : null}
+            {C22infoBtnFu(topInfo)['提交'] ? (
+              <Button type='primary' onClick={btnOkFu}>
+                提交
+              </Button>
+            ) : null}
+
+            {C22infoBtnFu(topInfo)['重新提交'] ? (
+              <Button type='primary' onClick={btnOkFu}>
+                重新提交
+              </Button>
+            ) : null}
+
+            {EXbtnFu(topInfo)}
+
+            {C22infoBtnFu(topInfo)['撤回'] ? (
+              <MyPopconfirm
+                txtK='撤回'
+                onConfirm={() => cheHuiFu()}
+                Dom={
+                  <Button type='primary' danger>
+                    撤回
+                  </Button>
+                }
+              />
+            ) : null}
+
+            {C22infoBtnFu(topInfo)['删除'] ? (
+              <MyPopconfirm
+                txtK='删除'
+                onConfirm={() => delFu()}
+                Dom={
+                  <Button type='primary' danger>
+                    删除
+                  </Button>
+                }
+              />
+            ) : null}
+          </>
+        )}
+      </div>
+
+      {/* 申请流程 */}
+      {auditsShow ? (
+        <ZflowTable tableArr={topInfo.audits || []} closeFu={() => setAuditsShow(false)} />
+      ) : null}
     </div>
   )
 }

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

@@ -25,7 +25,7 @@ function C1register() {
   // 藏品清单快照数据1对1-把本身的id存起来
   const snapsIdRef = useRef(0)
 
-  // 藏品登记/藏品编辑、进来创建订单
+  // 藏品登记 进来创建订单
   const createFu = useCallback(async () => {
     const res = await FourAPI_create('3')
     if (res.code === 0) {

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

@@ -0,0 +1,85 @@
+.C22look {
+  background-color: #fff;
+  border-radius: 10px;
+  padding-top: 15px;
+  :global {
+    .C22lBox {
+      padding: 0 24px;
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .C22Tit {
+        font-size: 18px;
+        font-weight: 700;
+        padding-bottom: 10px;
+        padding-left: 18px;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 17px;
+        color: var(--themeColor);
+        position: relative;
+        .C22TitRR {
+          position: absolute;
+          z-index: 20;
+          right: 0;
+          top: 0;
+          font-size: 14px;
+          .ant-btn {
+            pointer-events: auto;
+          }
+        }
+        .ant-btn {
+          margin-left: 15px;
+          pointer-events: none;
+        }
+      }
+      .C22Tit2 {
+        width: 1200px;
+        margin-top: 24px;
+      }
+      .C22table {
+        width: 1200px;
+        .ant-table-cell {
+          padding: 8px !important;
+        }
+      }
+
+      .C22main {
+        margin-top: -20px;
+      }
+
+      .C22rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .C22row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          min-height: 32px;
+          .C22rowll {
+            width: 110px;
+            text-align: right;
+            font-weight: 700;
+          }
+          .C22rowrr {
+            width: calc(100% - 110px);
+          }
+        }
+      }
+      border-bottom: 1px solid #ccc;
+    }
+    .C22lBtn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
+  }
+}

+ 360 - 0
src/pages/C_goodsManage/C22goodEdit/C22look/index.tsx

@@ -0,0 +1,360 @@
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { useParams } from 'react-router-dom'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import {
+  C6_APIdel,
+  C6_APIgetInfo,
+  C6_APIrevocation,
+  C6_APIsaveApply,
+  C6_APIsaveAudit
+} from '@/store/action/C6edit'
+import { MessageFu } from '@/utils/message'
+import C22revamp, { OldNewType } from '../C22revamp'
+import history, { openGoodsInfoFu, textFu } from '@/utils/history'
+import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
+import { Button } from 'antd'
+import { statusObj } from '@/utils/tableData'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import ZupFileTable from '@/components/ZupFileTable'
+import { C22infoBtnFu } from '../data'
+import { EXbtnFu } from '@/utils/EXBtn'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import ZflowTable from '@/components/ZflowTable'
+import { GoodFileType } from '@/components/Z3upFiles'
+import { baseURL } from '@/utils/http'
+import ImageLazy from '@/components/ImageLazy'
+import X2lookText from '@/pages/X_stock/X2lookText'
+import MyTable from '@/components/MyTable'
+function C22look() {
+  const { key, id } = useParams<any>()
+  // key: 3审批 4查看
+
+  // 滚到顶部
+  const sollrDom = useRef<HTMLDivElement>(null)
+
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  // 获取详情
+  const getInfoFu = useCallback(async () => {
+    const res = await C6_APIgetInfo(id)
+    if (res.code === 0) {
+      const data = res.data
+      setTopInfo(data)
+      if (data.snaps && data.snaps.length) {
+        const info = JSON.parse(data.snaps[0].snap)
+        setOldNewArr(info.pageShow)
+      }
+    }
+  }, [id])
+
+  useEffect(() => {
+    getInfoFu()
+  }, [getInfoFu])
+
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+
+  // 申请记录
+  const [auditsShow, setAuditsShow] = useState(false)
+
+  // 点击编辑
+  const editBtnFu = useCallback(() => {
+    setIsEdit(true)
+  }, [])
+
+  // 点击提交
+  const btnOkFu = useCallback(async () => {
+    const res = await C6_APIsaveApply(topInfo)
+    if (res.code === 0) {
+      MessageFu.success('提交成功')
+      history.push('/goodEdit')
+    }
+  }, [topInfo])
+
+  // 点击删除
+  const delFu = useCallback(async () => {
+    const res = await C6_APIdel(id)
+    if (res.code === 0) {
+      MessageFu.success('删除成功')
+      history.push('/goodEdit')
+    }
+  }, [id])
+
+  // 点击撤回
+  const cheHuiFu = useCallback(async () => {
+    // 撤回-该状态 刷新当前页
+    const res = await C6_APIrevocation(id)
+    if (res.code === 0) {
+      MessageFu.success('撤回成功')
+      if (sollrDom.current) sollrDom.current.scrollTop = 0
+      getInfoFu()
+    }
+  }, [getInfoFu, id])
+
+  // 点击审批
+  const auditFu = useCallback(async () => {
+    // console.log('审批信息富文本', rtf2)
+    if (!auditSta) {
+      if (sollrDom.current) sollrDom.current.scrollTop = 0
+      return MessageFu.warning('请选择审批结果')
+    }
+    const rtf2 = ZAuditRef.current?.resData()
+
+    const res = await C6_APIsaveAudit({
+      orderId: topInfo.id,
+      rtfOpinion: rtf2,
+      status: auditSta === '同意' ? 1 : 2
+    })
+
+    if (res.code === 0) {
+      MessageFu.success('提交成功')
+      history.push(`/goodEdit`)
+    }
+  }, [auditSta, topInfo.id])
+
+  const [isEdit, setIsEdit] = useState(false)
+
+  //查看富文本信息
+  const [look, setLook] = useState('')
+
+  // 新旧附件信息对比
+  const [oldNewArr, setOldNewArr] = useState<OldNewType[]>([])
+
+  // 编辑明细 表格
+
+  const tableLastBtn2Fu = useCallback((item: OldNewType, key: 'qian' | 'hou') => {
+    if (item.name === '备注') {
+      if (textFu(item[key] as string)) {
+        return (
+          <Button size='small' type='text' onClick={() => setLook(textFu(item[key] as string))}>
+            查看
+          </Button>
+        )
+      } else return '-'
+    } else if (item.name === '附件信息') {
+      let arr = item[key] as GoodFileType[]
+
+      return arr.length
+        ? arr.map((v: any, i: number) => (
+            <a key={v.id} href={baseURL + v.filePath} download target='_blank' rel='noreferrer'>
+              {v.fileName}
+              {i < arr!.length - 1 ? ',' : ''}
+            </a>
+          ))
+        : '-'
+    } else if (item.name === '封面图') {
+      const info: any = item[key]
+
+      return (
+        <div className='tableImgAuto'>
+          <ImageLazy
+            width={60}
+            height={60}
+            srcBig={info.thumbPc || info.filePath}
+            src={info.thumb}
+          />
+        </div>
+      )
+    } else return item[key] || '(空)'
+  }, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '编辑项',
+        render: (item: OldNewType) =>
+          ['封面图', '附件信息', '备注'].includes(item.name) ? (
+            <span className='C6tab2Tit'>{item.name}</span>
+          ) : (
+            item.name
+          )
+      },
+      {
+        title: '编辑前',
+        render: (item: OldNewType) => tableLastBtn2Fu(item, 'qian')
+      },
+      {
+        title: '编辑后',
+        render: (item: OldNewType) => tableLastBtn2Fu(item, 'hou')
+      }
+    ]
+  }, [tableLastBtn2Fu])
+
+  return (
+    <div className={styles.C22look}>
+      <div className='pageTitle'>藏品编辑-{Reflect.get(pageTitTxtObj, key)}</div>
+
+      {/* 主体 */}
+      <div className='C22lBox' ref={sollrDom}>
+        <div className='C22Tit'>
+          申请信息
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
+        </div>
+        {topInfo.id ? (
+          <div className='C22rowAll'>
+            <div className='C22row'>
+              <div className='C22rowll'>业务单号:</div>
+              <div className='C22rowrr'>{topInfo.num}</div>
+            </div>
+
+            <div className='C22row'>
+              <div className='C22rowll'>业务名称:</div>
+              <div className='C22rowrr'>{topInfo.name}</div>
+            </div>
+
+            <div className='C22row'>
+              <div className='C22rowll'>发起人:</div>
+              <div className='C22rowrr'>{topInfo.creatorName + ' - ' + topInfo.createTime}</div>
+            </div>
+
+            <div className='C22row'>
+              <div className='C22rowll'>发起部门:</div>
+              <div className='C22rowrr'>{topInfo.deptName}</div>
+            </div>
+          </div>
+        ) : null}
+
+        <div className='C22main'>
+          {['3'].includes(key) ? (
+            <X3auditInfo
+              titHide={true}
+              dirCode='C22orderEdit'
+              myUrl='cms/orderEdit/upload'
+              auditSta={auditSta}
+              auditStaFu={val => setAuDitSta(val)}
+              ref={ZAuditRef}
+            />
+          ) : null}
+        </div>
+
+        <div className='C22Tit C22Tit2'>
+          修改明细
+          <div className='C22TitRR'>
+            <Button type='primary' onClick={() => openGoodsInfoFu(Number(topInfo.goodsIds))}>
+              藏品详情
+            </Button>
+          </div>
+        </div>
+
+        <div className='C22table'>
+          {/* 表格 */}
+          <MyTable
+            rowKey='name'
+            list={oldNewArr}
+            columnsTemp={[]}
+            lastBtn={tableLastBtn}
+            pagingInfo={false}
+          />
+        </div>
+
+        {/* 附件归档 */}
+        {topInfo.status === 4 ? (
+          <ZupFileTable
+            listTemp={topInfo.filing || []}
+            dirCode='C22orderEdit'
+            myUrl='cms/orderEdit/upload'
+            fromData={{ moduleId: topInfo.id }}
+          />
+        ) : null}
+      </div>
+
+      {/* 底部按钮 */}
+      <div className='C22lBtn'>
+        {['3', '4'].includes(key) && topInfo.audits && topInfo.audits.length ? (
+          <Button type='primary' onClick={() => setAuditsShow(true)}>
+            申请记录
+          </Button>
+        ) : null}
+
+        {/* 能进审批页,点审批按钮的必定有权限 */}
+        {key === '3' ? (
+          C22infoBtnFu(topInfo)['审批'] ? (
+            <Button type='primary' onClick={auditFu}>
+              提交
+            </Button>
+          ) : null
+        ) : (
+          <>
+            {C22infoBtnFu(topInfo)['编辑'] ? (
+              <Button type='primary' onClick={editBtnFu}>
+                编辑
+              </Button>
+            ) : null}
+            {C22infoBtnFu(topInfo)['提交'] ? (
+              <Button type='primary' onClick={btnOkFu}>
+                提交
+              </Button>
+            ) : null}
+
+            {C22infoBtnFu(topInfo)['重新提交'] ? (
+              <Button type='primary' onClick={btnOkFu}>
+                重新提交
+              </Button>
+            ) : null}
+
+            {EXbtnFu(topInfo)}
+
+            {C22infoBtnFu(topInfo)['撤回'] ? (
+              <MyPopconfirm
+                txtK='撤回'
+                onConfirm={() => cheHuiFu()}
+                Dom={
+                  <Button type='primary' danger>
+                    撤回
+                  </Button>
+                }
+              />
+            ) : null}
+
+            {C22infoBtnFu(topInfo)['删除'] ? (
+              <MyPopconfirm
+                txtK='删除'
+                onConfirm={() => delFu()}
+                Dom={
+                  <Button type='primary' danger>
+                    删除
+                  </Button>
+                }
+              />
+            ) : null}
+          </>
+        )}
+      </div>
+
+      {/* 申请流程 */}
+      {auditsShow ? (
+        <ZflowTable tableArr={topInfo.audits || []} closeFu={() => setAuditsShow(false)} />
+      ) : null}
+
+      {/* 在点编辑 在打开编辑弹窗 */}
+      {isEdit ? (
+        <div className='C22revampBox'>
+          <C22revamp
+            upTableFu={() => {
+              if (sollrDom.current) sollrDom.current.scrollTop = 0
+              getInfoFu()
+            }}
+            goodsId={Number(topInfo.goodsIds)}
+            sId={id}
+            closeFu={() => setIsEdit(false)}
+            type='编辑'
+          />
+        </div>
+      ) : null}
+
+      {/* 查看富文本 */}
+      {look ? <X2lookText closeFu={() => setLook('')} text={look} /> : null}
+    </div>
+  )
+}
+
+const MemoC22look = React.memo(C22look)
+
+export default MemoC22look

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

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

+ 210 - 0
src/pages/C_goodsManage/C22goodEdit/C22revamp/index.tsx

@@ -0,0 +1,210 @@
+import React, { useCallback, useEffect, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import {
+  C6_APIcreate,
+  C6_APIgetInfo,
+  C6_APIsaveApply,
+  C6_APIsaveDraft
+} from '@/store/action/C6edit'
+import AddGoods from '../../C1register/AddGoods'
+import { GoodFileType } from '@/components/Z3upFiles'
+import {
+  ArrKeyType,
+  Y11infoArr1,
+  Y11infoArr2,
+  Y11infoArr3,
+  Y11infoArr4,
+  Y11infoArr5
+} from '@/pages/Y_goodsDetails/Y1cathet/data'
+import history from '@/utils/history'
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
+
+export type OldNewType = {
+  name: string
+  qian: string | GoodFileType[]
+  hou: string | GoodFileType[]
+  key: string
+}
+
+const oldNewTxtArr: ArrKeyType = [
+  ...Y11infoArr1,
+  ...Y11infoArr2,
+  ...Y11infoArr3,
+  ...Y11infoArr4,
+  ...Y11infoArr5,
+  {
+    name: '封面图',
+    key: 'thumb',
+    backFu: info => {
+      return { thumb: info.thumb, thumbPc: info.thumbPc }
+    }
+  }
+]
+
+type Props = {
+  goodsId: number
+  sId?: number
+  closeFu: () => void
+  type: '新增' | '编辑'
+  upTableFu?: () => void
+}
+
+function C22revamp({ goodsId, closeFu, type, sId, upTableFu }: Props) {
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  // 藏品清单快照数据1对1-把本身的id存起来
+  const snapsIdRef = useRef(0)
+
+  // 快照的最新对象信息
+  const [snapsNewObj, setSnapsNewObj] = useState({} as C1GoodType)
+
+  // 藏品修改 进来创建订单
+  const createFu = useCallback(async () => {
+    const res = await C6_APIcreate()
+    if (res.code === 0) {
+      setTopInfo(res.data)
+    }
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(async (id: string) => {
+    const res = await C6_APIgetInfo(Number(id))
+    if (res.code === 0) {
+      const data = res.data
+      setTopInfo(data)
+      if (data.snaps && data.snaps.length) {
+        const info = data.snaps[0]
+        snapsIdRef.current = info.id
+        const newObj = JSON.parse(info.snap)
+        setSnapsNewObj(newObj.newObj)
+      }
+    }
+  }, [])
+
+  useEffect(() => {
+    if (type === '新增') createFu()
+    else getInfoFu(sId! + '')
+  }, [createFu, getInfoFu, sId, type])
+
+  return (
+    <div className={styles.C22revamp}>
+      {topInfo.id ? (
+        <AddGoods
+          editSnap={snapsNewObj && snapsNewObj.id ? snapsNewObj : undefined}
+          closeFu={() => closeFu()}
+          nowSta={{ key: '藏品修改', id: goodsId + '' }}
+          isEdit={true}
+          succFu={async (newObj, _, sta, fileNewTemp, fileOldTemp, objOld) => {
+            const arrRes: OldNewType[] = []
+
+            oldNewTxtArr.forEach(v => {
+              const oldInfo = objOld!
+              let oldTxt: any = oldInfo[v.key]
+              let newTxt = newObj[v.key] as string
+
+              if (
+                (oldTxt || newTxt) &&
+                oldTxt !== newTxt &&
+                v.name !== '制档日期' &&
+                v.name !== '制档人'
+              ) {
+                if (v.backFu && v.name !== '备注') oldTxt = v.backFu(oldInfo)
+                if (v.backFu && v.name !== '备注') newTxt = v.backFu(newObj)
+
+                arrRes.push({
+                  name: v.name,
+                  qian: oldTxt,
+                  hou: newTxt,
+                  key: v.key
+                })
+              }
+            })
+
+            // 附件信息的对比
+
+            const fileOld = fileOldTemp || []
+            const fileNew = fileNewTemp || []
+
+            const fileOldIds = fileOld.map(v => v.id).join('')
+
+            const fileNewIds = fileNew.map(v => v.id).join('')
+
+            if (fileOldIds !== fileNewIds) {
+              arrRes.push({
+                name: '附件信息',
+                qian: fileOld.map(
+                  v =>
+                    ({
+                      id: v.id,
+                      fileName: v.fileName,
+                      filePath: v.filePath
+                    } as GoodFileType)
+                ),
+                hou: fileNew.map(
+                  v =>
+                    ({
+                      id: v.id,
+                      fileName: v.fileName,
+                      filePath: v.filePath
+                    } as GoodFileType)
+                ),
+                key: 'fileIds'
+              })
+            }
+
+            const houObj: any = {}
+            houObj['id'] = newObj.id
+
+            arrRes.forEach(v => {
+              if (v.key === 'fileIds') {
+                const fileArr = (v.hou || []) as GoodFileType[]
+                houObj['fileIds'] = fileArr.map(c => c.id).join(',')
+              } else if (v.key === 'thumb') {
+                const thumbObj: any = v.hou
+                houObj['thumb'] = thumbObj.thumb
+                houObj['thumbPc'] = thumbObj.thumbPc
+              } else houObj[v.key] = v.hou
+            })
+
+            // console.log(16546, arrRes, sta, houObj)
+
+            const obj2 = {
+              ...topInfo,
+              goodsIds: newObj.id + '',
+              snaps: [
+                {
+                  goodsId: newObj.id,
+                  id: snapsIdRef.current ? snapsIdRef.current : null,
+                  orderId: topInfo.id,
+                  snap: JSON.stringify({
+                    pageShow: arrRes,
+                    newObj: { ...newObj, file: fileNewTemp },
+                    rear: houObj
+                  })
+                }
+              ]
+            }
+
+            // console.log('pppp', JSON.parse(obj2.snaps[0].snap))
+            const res = sta === '存草稿' ? await C6_APIsaveDraft(obj2) : await C6_APIsaveApply(obj2)
+
+            if (res.code === 0) {
+              if (type === '新增') history.push('/goodEdit')
+              else if (upTableFu) upTableFu()
+            }
+
+            // setTopInfo({ ...topInfo, tempGoodsJson: newObj })
+
+            // setOldNewArr(arrRes)
+          }}
+        />
+      ) : null}
+    </div>
+  )
+}
+
+const MemoC22revamp = React.memo(C22revamp)
+
+export default MemoC22revamp

+ 49 - 0
src/pages/C_goodsManage/C22goodEdit/data.ts

@@ -49,6 +49,7 @@ export const C22tableBtnFu = (item: FourTableType) => {
   const arr3 = (currentAuditUserIds || '').split(',').map(v => Number(v))
   // 历史审批人
   const arr4 = (auditUserIds || '').split(',').map(v => Number(v))
+
   // 抄送人
   const arr5 = (copyUserIds || '').split(',').map(v => Number(v))
 
@@ -98,3 +99,51 @@ export const C22tableBtnFu = (item: FourTableType) => {
 
   return flagObj
 }
+
+// 详情页 特有的按钮
+type C22tableBtnTxtType2 = '编辑' | '提交' | '删除' | '撤回' | '审批' | '重新提交'
+
+export const C22infoBtnFu = (item: FourTableType) => {
+  //申请单状态     申请人id      当前节点审批人
+  const { status, creatorId, currentAuditUserIds } = item
+
+  let flagObj: { [K in C22tableBtnTxtType2]: boolean } = {
+    编辑: false,
+    提交: false,
+    删除: false,
+    撤回: false,
+    审批: false,
+    重新提交: false
+  }
+  const myId = (getTokenInfo().user || { id: 0 }).id
+
+  //  当前节点审批人
+  const arr3 = (currentAuditUserIds || '').split(',').map(v => Number(v))
+  const obj = {
+    1: () => {
+      // 草稿
+      // 我是申请人(提交人)
+      if (creatorId === myId) flagObj['编辑'] = flagObj['提交'] = flagObj['删除'] = true
+    },
+    6: () => {
+      //待提交
+      // 我是申请人
+      if (creatorId === myId) flagObj['提交'] = flagObj['编辑'] = flagObj['删除'] = true
+    },
+    2: () => {
+      //待审批
+      // 我是申请人
+      if (creatorId === myId) flagObj['撤回'] = true
+      // 当前审批人有我 =》审批
+      if (arr3.includes(myId)) flagObj['审批'] = true
+    },
+    3: () => {
+      //审批不通过
+      // 我是申请人
+      if (creatorId === myId) flagObj['编辑'] = flagObj['重新提交'] = true
+    }
+  }
+  if (Reflect.get(obj, status)) Reflect.get(obj, status)()
+
+  return flagObj
+}

+ 24 - 4
src/pages/C_goodsManage/C22goodEdit/index.tsx

@@ -17,6 +17,7 @@ import { FourAPI_revocation } from '@/store/action/FourAll'
 import history from '@/utils/history'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
+import C22revamp from './C22revamp'
 const { RangePicker } = DatePicker
 
 function C22goodEdit() {
@@ -107,12 +108,12 @@ function C22goodEdit() {
   )
 
   // 点击编辑
-  const editBtnFu = useCallback((id: number, type: string) => {
+  const editBtnFu = useCallback((id: number, type: string, goodId: string) => {
     if (type === 'DJ') history.push(`/register?id=${id}`)
-    else history.push(`/goodEdit_edit/2/${id}`)
+    else setIsEdit({ goodId, id })
   }, [])
 
-  // 点击 编辑2 查看4 审批3
+  // 点击 查看4 审批3
   const tableBtnFu = useCallback((id: number, key: '3' | '4', type: string) => {
     let url = type === 'DJ' ? `/register_edit/${key}/${id}` : `/goodEdit_edit/${key}/${id}`
     history.push(url)
@@ -130,7 +131,11 @@ function C22goodEdit() {
           ) : (
             <>
               {obj['编辑'] ? (
-                <Button size='small' type='text' onClick={() => editBtnFu(item.id, item.type)}>
+                <Button
+                  size='small'
+                  type='text'
+                  onClick={() => editBtnFu(item.id, item.type, item.goodsIds)}
+                >
                   编辑
                 </Button>
               ) : null}
@@ -253,6 +258,9 @@ function C22goodEdit() {
     }
   }, [])
 
+  // 点击藏品编辑的编辑按钮(修改)
+  const [isEdit, setIsEdit] = useState({} as { goodId: string; id: number })
+
   return (
     <div className={styles.C22goodEdit}>
       <div className='pageTitle'>藏品编辑</div>
@@ -366,6 +374,18 @@ function C22goodEdit() {
 
       {/* 打开侧边栏 */}
       <Y1cathet sId={cathet} closeFu={() => setCathet(0)} />
+
+      {isEdit.id ? (
+        <div className='C22revampBox'>
+          <C22revamp
+            upTableFu={getListFu}
+            goodsId={Number(isEdit.goodId)}
+            sId={isEdit.id}
+            closeFu={() => setIsEdit({} as { goodId: string; id: number })}
+            type='编辑'
+          />
+        </div>
+      ) : null}
     </div>
   )
 }

+ 8 - 1
src/pages/E_goodsStorage/E4repair/E4edit/index.tsx

@@ -42,6 +42,7 @@ function E4edit() {
 
   // 藏品清单快照数据
   const [snaps, setSnaps] = useState<C1GoodType[]>([])
+  const delSnapIdsRef = useRef<number[]>([])
 
   const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
 
@@ -164,6 +165,7 @@ function E4edit() {
           rtf: JSON.stringify(rtf1.val || ''),
           fileIds: filesRes.join(','),
           goodsIds: snaps.map(v => v.id).join(','),
+          delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
           snaps: snaps.map(v => ({
             goodsId: v.id,
             id: v.id2 ? v.id2 : null,
@@ -270,7 +272,11 @@ function E4edit() {
             {['3', '4'].includes(key) ? null : (
               <MyPopconfirm
                 txtK='删除'
-                onConfirm={() => setSnaps(snaps.filter(v => v.id !== item.id))}
+                onConfirm={() => {
+                  if (item.id2 && !delSnapIdsRef.current.includes(item.id2))
+                    delSnapIdsRef.current.push(item.id2)
+                  setSnaps(snaps.filter(v => v.id !== item.id))
+                }}
               />
             )}
           </>
@@ -301,6 +307,7 @@ function E4edit() {
         rtf: JSON.stringify(rtf1.val || ''),
         fileIds: filesRes.join(','),
         goodsIds: snaps.map(v => v.id).join(','),
+        delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
         snaps: snaps.map(v => ({
           goodsId: v.id,
           id: v.id2 ? v.id2 : null,

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

@@ -381,5 +381,11 @@ export const routerSon: RouterTypeRow[] = [
     name: '藏品登记-审批/查看',
     path: '/register_edit/:key/:id',
     Com: React.lazy(() => import('../C_goodsManage/C1register/C1look'))
+  },
+  {
+    id: 17,
+    name: '藏品编辑-审批/查看',
+    path: '/goodEdit_edit/:key/:id',
+    Com: React.lazy(() => import('../C_goodsManage/C22goodEdit/C22look'))
   }
 ]

+ 3 - 2
src/pages/X_stock/X3auditInfo/index.tsx

@@ -10,9 +10,10 @@ type Props = {
   ref: any
   dirCode: string
   myUrl: string
+  titHide?: boolean
 }
 
-function X3auditInfo({ auditSta, auditStaFu, dirCode, myUrl }: Props, ref: any) {
+function X3auditInfo({ auditSta, auditStaFu, dirCode, myUrl, titHide }: Props, ref: any) {
   // 富文本的ref
   const TextRef = useRef<any>(null)
 
@@ -30,7 +31,7 @@ function X3auditInfo({ auditSta, auditStaFu, dirCode, myUrl }: Props, ref: any)
 
   return (
     <div className={styles.X3auditInfo}>
-      <div className='x3Top'>
+      <div className='x3Top' hidden={titHide}>
         审批信息
         {/* <Button type='dashed'>待审批</Button> */}
       </div>

+ 0 - 166
src/pages/Y_goodsDetails/Y1cathet/index.module.scss

@@ -41,172 +41,6 @@
           }
         }
       }
-      .Y1info {
-        width: 100%;
-        margin-top: 5px;
-        height: calc(100% - 35px);
-        font-size: 16px;
-        padding: 15px;
-        overflow-y: auto;
-        .Y1tit {
-          font-size: 18px;
-          padding-left: 15px;
-          font-weight: 700;
-          position: relative;
-          margin-bottom: 15px;
-          color: var(--themeColor);
-          &::before {
-            position: absolute;
-            left: 0px;
-            top: 50%;
-            transform: translateY(-50%);
-            content: '';
-            width: 6px;
-            height: 18px;
-            background-color: var(--themeColor);
-          }
-        }
-
-        .Y1row {
-          width: 100%;
-          display: flex;
-          margin-bottom: 10px;
-          .Y1rowll {
-            width: 120px;
-            text-align: right;
-            font-weight: 700;
-          }
-          .Y1rowrr {
-            width: calc(100% - 120px);
-            word-wrap: break-word;
-            max-height: 130px;
-            overflow-y: auto;
-            white-space: pre-wrap;
-          }
-        }
-
-        // ------------------------档案信息
-        .Y1rowZ {
-          .Y1z1 {
-            margin-bottom: 20px;
-            display: flex;
-            justify-content: space-between;
-            .Y1rowZll {
-              width: 48%;
-              display: flex;
-              flex-direction: column;
-              justify-content: center;
-            }
-            .Y1rowZrr {
-              display: flex;
-              justify-content: center;
-              align-items: center;
-              width: 48%;
-            }
-          }
-
-          .Y1z2 {
-            margin-bottom: 20px;
-            .y1z2_1 {
-              display: flex;
-              flex-wrap: wrap;
-              justify-content: space-between;
-              width: 100%;
-              .y1z2_1row1 {
-                margin-bottom: 10px;
-                width: 48%;
-                display: flex;
-                .y1z2_1r11 {
-                  width: 120px;
-                  text-align: right;
-                  font-weight: 700;
-                }
-                .y1z2_1r11long {
-                  width: 132px;
-                  position: relative;
-                  left: -6px;
-                }
-                .y1z2_1r12 {
-                  width: calc(100% - 120px);
-                  word-wrap: break-word;
-                  max-height: 130px;
-                  overflow-y: auto;
-                  white-space: pre-wrap;
-                }
-              }
-              .y1z2_1row1Full {
-                width: 100%;
-                .y1z2_1r12 {
-                  max-height: 1000px;
-                }
-              }
-            }
-          }
-        }
-
-        // ------------------------库存信息
-        .Y22com {
-          .Y22sta {
-            font-weight: 700;
-            font-size: 18px;
-            margin-bottom: 20px;
-          }
-          .Y22No {
-            font-size: 16px;
-            letter-spacing: 4px;
-            height: 200px;
-            display: flex;
-            align-items: center;
-          }
-          .Y22Info {
-            width: 800px;
-            border: 1px solid #ccc;
-            border-bottom: none;
-            .Y22row {
-              display: flex;
-              align-items: center;
-              & > div {
-                width: 200px;
-                text-align: center;
-                padding: 8px 4px;
-                border-bottom: 1px solid #ccc;
-                &:nth-of-type(2) {
-                  width: 600px;
-                }
-              }
-            }
-            .Y22row1 {
-              background-color: #eaeaea;
-            }
-            .Y22rowNo {
-              height: 40px;
-              line-height: 40px;
-              text-align: center;
-              border-bottom: 1px solid #ccc;
-            }
-          }
-        }
-
-        // ------------------------藏品附件
-        .Y33com {
-          .Y33top {
-            margin-bottom: 20px;
-            display: flex;
-            justify-content: space-around;
-            .ant-btn {
-              margin-right: 15px;
-            }
-          }
-          .Y33no {
-            font-size: 16px;
-            letter-spacing: 4px;
-            height: 200px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-          }
-        }
-      }
     }
   }
 }

+ 15 - 1
src/pages/Y_goodsDetails/Y2look/index.tsx

@@ -16,6 +16,7 @@ import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportWordTemplates
 import { API_goodFileList } from '@/store/action/C2files'
 import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
 import { MessageFu } from '@/utils/message'
+import C22revamp from '@/pages/C_goodsManage/C22goodEdit/C22revamp'
 
 function Y2look() {
   const { id: sId } = useParams<any>()
@@ -53,7 +54,11 @@ function Y2look() {
     let arr: MenuProps['items'] = [
       {
         key: '1',
-        label: <span className='Y2xia'>编辑</span>
+        label: (
+          <span className='Y2xia' onClick={() => setIsEdit(true)}>
+            编辑
+          </span>
+        )
       },
       {
         key: '2',
@@ -126,6 +131,9 @@ function Y2look() {
     [getInfoFu, sId]
   )
 
+  // 点击藏品编辑(修改)
+  const [isEdit, setIsEdit] = useState(false)
+
   return (
     <div className={styles.Y2look}>
       <div className='pageTitle'>藏品详情</div>
@@ -178,6 +186,12 @@ function Y2look() {
           {tabAc === '藏品日志' ? <Y44com sId={sId} isLook={true} /> : null}
         </div>
       ) : null}
+
+      {isEdit ? (
+        <div className='C22revampBox'>
+          <C22revamp goodsId={sId} closeFu={() => setIsEdit(false)} type='新增' />
+        </div>
+      ) : null}
     </div>
   )
 }