shaogen1995 4 месяцев назад
Родитель
Сommit
fc93392518

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

@@ -214,3 +214,10 @@ textarea {
   height: 100%;
   text-align: center;
 }
+.D1GtNum {
+  cursor: pointer;
+  text-decoration: underline;
+}
+.D1GtNumAc {
+  color: var(--themeColor);
+}

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

@@ -340,3 +340,16 @@ textarea {
   height: 100%;
   text-align: center;
 }
+
+// 打开侧边栏高亮
+.D1GtNum {
+  cursor: pointer;
+  text-decoration: underline;
+  // &:hover {
+  //   color: var(--themeColor);
+  // }
+}
+
+.D1GtNumAc {
+  color: var(--themeColor);
+}

+ 2 - 0
src/pages/B_enterTibet/B3flowTable/index.module.scss

@@ -9,6 +9,8 @@
       font-weight: 700;
       padding-left: 18px;
       margin-bottom: 24px;
+      border-bottom: 1px solid #ccc;
+      padding-bottom: 15px;
     }
   }
 }

+ 6 - 0
src/pages/B_enterTibet/B3flowTable/index.tsx

@@ -6,6 +6,12 @@ import { Button } from 'antd'
 import { B3FtableC } from '@/utils/tableData'
 import X2lookText from '@/pages/X_stock/X2lookText'
 
+// type Props = {
+//   // 待完善 看看需不需要区分页面(在自己组件里面发请求 还是外面发了传进来)
+//   // pageSta: string
+//   // key:1=入馆 2=入藏 3-登记 4-删除 5-入库 6-出库
+// }
+
 function B3flowTable() {
   const { key, id } = useParams<any>()
 

+ 2 - 2
src/pages/B_enterTibet/B3goodsTable/B3GaddNow/index.tsx

@@ -9,7 +9,7 @@ import { openGoodsInfoFu } from '@/utils/history'
 type Props = {
   closeFu: () => void
   nowSta: { key: string; id: string }
-  // key:1=入馆 2=入藏 3-登记 4-删除 5-入库
+  // key:1=入馆 2=入藏 3-登记 4-删除 5-入库 6-出库
 }
 
 function B3GaddNow({ nowSta, closeFu }: Props) {
@@ -36,7 +36,7 @@ function B3GaddNow({ nowSta, closeFu }: Props) {
         )
       },
       {
-        title: '编号类型',
+        title: '藏品编号',
         render: (item: any) => item.num || '(空)'
       }
     ]

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

@@ -29,7 +29,7 @@ function B3goodsTable({ pageSta }: Props, ref: any) {
   const startBtn = useMemo(() => {
     return [
       {
-        title: '编号类型',
+        title: '藏品编号',
         render: (item: any) => {
           return (
             <span

+ 79 - 0
src/pages/C_goodsManage/C1ledger/data.ts

@@ -0,0 +1,79 @@
+import { C1InputKeyType, TYpeC1Form, TYpeC1Form1, TYpeC1Form2 } from './type'
+
+export const C1baseFormData1: TYpeC1Form1 = {
+  aaaa: '',
+  bbbb: '',
+  cccc: '',
+  dddd: '',
+  eeee: '',
+  ffff: '',
+  gggg: '',
+  hhhh: '',
+  iiii: '',
+  jjjj: '',
+  kkkk: ''
+}
+
+export const C1baseFormData2: TYpeC1Form2 = {
+  llll: '',
+  mmmm: '',
+  nnnn: '',
+  oooo: '',
+  pppp: '',
+  qqqq: '',
+  rrrr: '',
+  ssss: '',
+  tttt: '',
+  uuuu: ''
+}
+
+export const C1baseFormData: TYpeC1Form = {
+  pageNum: 1,
+  pageSize: 10,
+
+  ...C1baseFormData1,
+
+  ...C1baseFormData2
+}
+
+export const C1InputKeyArr1: {
+  name: string
+  key: C1InputKeyType
+  type: '输入框' | '下拉框' | '级联'
+}[] = [
+  { name: '藏品总登记号', key: 'aaaa', type: '下拉框' },
+  { name: '藏品编号', key: 'bbbb', type: '输入框' },
+  { name: '藏品名称', key: 'cccc', type: '输入框' },
+  { name: '文物级别', key: 'dddd', type: '级联' },
+  { name: '文物类别', key: 'eeee', type: '级联' },
+  { name: '年代', key: 'ffff', type: '级联' },
+  { name: '质地', key: 'gggg', type: '级联' },
+  { name: '完残程度', key: 'hhhh', type: '级联' },
+  { name: '来源', key: 'iiii', type: '级联' },
+  { name: '入藏状态', key: 'jjjj', type: '下拉框' },
+  { name: '库存状态', key: 'kkkk', type: '下拉框' }
+]
+
+export const C1InputKeyArr2: {
+  name: string
+  key: C1InputKeyType
+  type: '输入框' | '下拉框' | '级联'
+}[] = [
+  { name: '分类号', key: 'llll', type: '输入框' },
+  { name: '档案编号', key: 'mmmm', type: '输入框' },
+  { name: '制档人', key: 'nnnn', type: '输入框' },
+  { name: '质量范围', key: 'oooo', type: '级联' },
+  { name: '入藏日期范围', key: 'pppp', type: '级联' }
+]
+
+export const C1InputKeyArr3: {
+  name: string
+  key: C1InputKeyType
+  type: '输入框' | '下拉框' | '级联'
+}[] = [
+  { name: '征集经过', key: 'qqqq', type: '输入框' },
+  { name: '铭记题跋', key: 'rrrr', type: '输入框' },
+  { name: '鉴藏印记', key: 'ssss', type: '输入框' },
+  { name: '著作书目', key: 'tttt', type: '输入框' },
+  { name: '流转经历', key: 'uuuu', type: '输入框' }
+]

+ 52 - 0
src/pages/C_goodsManage/C1ledger/index.module.scss

@@ -1,4 +1,56 @@
 .C1ledger {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px 24px 0;
   :global {
+    .C1top {
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 15px;
+      .C1topll {
+        display: flex;
+        & > div {
+          position: relative;
+          margin-right: 15px;
+          display: flex;
+          align-items: center;
+          position: relative;
+          & > span {
+            position: absolute;
+            top: -18px;
+            left: 0;
+            pointer-events: none;
+          }
+        }
+      }
+
+      .C1topllAll {
+        width: 100%;
+        & > div {
+          width: 8%;
+          .ant-input {
+            width: 100%;
+          }
+          .ant-select {
+            width: 100%;
+          }
+        }
+      }
+    }
+
+    .C1top2 {
+      height: 40px;
+      align-items: center;
+      .C1topll {
+        margin-top: 8px;
+        width: 980px;
+      }
+    }
+    .ant-select-selection-placeholder {
+      color: black !important;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 261 - 2
src/pages/C_goodsManage/C1ledger/index.tsx

@@ -1,10 +1,269 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { Button, Cascader, Input, Select } from 'antd'
+import {
+  C1InputKeyArr1,
+  C1InputKeyArr2,
+  C1InputKeyArr3,
+  C1baseFormData,
+  C1baseFormData2
+} from './data'
+import { C1InputKeyType } from './type'
+import history, { openGoodsInfoFu } from '@/utils/history'
+import MyTable from '@/components/MyTable'
+import { C1tableC } from '@/utils/tableData'
+import classNames from 'classnames'
+import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
+
 function C1ledger() {
+  const [formData, setFormData] = useState(C1baseFormData)
+  const formDataRef = useRef(C1baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    console.log('发送请求', formDataRef.current)
+  }, [])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: C1InputKeyType) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData(C1baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+  // 待完善 各种参数 接口
+
+  const tableLastBtn = useMemo(() => {
+    //   看状态和账号角色显示按钮 待完善
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          return (
+            <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
+              查看
+            </Button>
+          )
+        }
+      }
+    ]
+  }, [])
+
+  // 高级搜索的切换
+  const [advanced, setAdvanced] = useState(false)
+
+  // 点击收起高级搜索
+  const advancedFu = useCallback(
+    (flag: boolean) => {
+      setAdvanced(flag)
+      if (!flag) {
+        setFormData({ ...formData, ...C1baseFormData2 })
+      }
+    },
+    [formData]
+  )
+
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '藏品编号',
+        render: (item: any) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num}
+            </span>
+          )
+        }
+      }
+    ]
+  }, [cathet])
+
   return (
     <div className={styles.C1ledger}>
       <div className='pageTitle'>藏品总账</div>
-      <p>待开发</p>
+      {/* 第一行 */}
+      <div className='C1top'>
+        <div className='C1topll C1topllAll'>
+          {C1InputKeyArr1.map(item => (
+            <div key={item.name}>
+              <span>{item.name}:</span>
+
+              {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
+              {item.type === '输入框' ? (
+                <Input
+                  placeholder='请输入'
+                  maxLength={30}
+                  value={formData[item.key]}
+                  onChange={e => txtChangeFu(e.target.value, item.key)}
+                />
+              ) : null}
+
+              {item.type === '级联' ? (
+                <Cascader
+                  changeOnSelect
+                  options={[]}
+                  placeholder='全部'
+                  // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                  allowClear={false}
+                />
+              ) : null}
+            </div>
+          ))}
+        </div>
+      </div>
+
+      {/* 第二行 */}
+      <div className='C1top C1top2'>
+        {advanced ? (
+          <div className='C1topll'>
+            {C1InputKeyArr2.map(item => (
+              <div key={item.name}>
+                <span>{item.name}:</span>
+
+                {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
+                {item.type === '输入框' ? (
+                  <Input
+                    placeholder='请输入'
+                    maxLength={30}
+                    value={formData[item.key]}
+                    onChange={e => txtChangeFu(e.target.value, item.key)}
+                  />
+                ) : null}
+
+                {item.type === '级联' ? (
+                  <Cascader
+                    changeOnSelect
+                    options={[]}
+                    placeholder='全部'
+                    // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                    allowClear={false}
+                  />
+                ) : null}
+              </div>
+            ))}
+          </div>
+        ) : (
+          <div className='C1topll'></div>
+        )}
+
+        <div className='C1toprr'>
+          <Button danger={advanced} onClick={() => advancedFu(!advanced)}>
+            {advanced ? '收起' : ''}高级搜索
+          </Button>
+          &emsp;
+          <Button type='primary'>批量导出</Button>&emsp;
+          <Button type='primary' onClick={() => history.push('/register_edit/1/null/3')}>
+            藏品登记
+          </Button>
+        </div>
+      </div>
+
+      {/* 第三行 */}
+      <div className='C1top C1top2'>
+        {advanced ? (
+          <div className='C1topll'>
+            {C1InputKeyArr3.map(item => (
+              <div key={item.name}>
+                <span>{item.name}:</span>
+
+                {item.type === '下拉框' ? <Select placeholder='全部' /> : null}
+                {item.type === '输入框' ? (
+                  <Input
+                    placeholder='请输入'
+                    maxLength={30}
+                    value={formData[item.key]}
+                    onChange={e => txtChangeFu(e.target.value, item.key)}
+                  />
+                ) : null}
+
+                {item.type === '级联' ? (
+                  <Cascader
+                    changeOnSelect
+                    options={[]}
+                    placeholder='全部'
+                    // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                    allowClear={false}
+                  />
+                ) : null}
+              </div>
+            ))}
+          </div>
+        ) : (
+          <div className='C1topll'></div>
+        )}
+        <div className='C1toprr'>
+          <Button type='primary' onClick={clickSearch}>
+            查询
+          </Button>
+          &emsp;
+          <Button type='primary' onClick={resetSelectFu}>
+            重置
+          </Button>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={540}
+        list={[{ id: 66, thumb: '', num: 'xxx' }]}
+        columnsTemp={C1tableC}
+        lastBtn={tableLastBtn}
+        startBtn={startBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={0}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
+
+      {/* 打开侧边栏 */}
+      <Y1cathet sId={cathet} closeFu={() => setCathet(0)} />
     </div>
   )
 }

+ 33 - 0
src/pages/C_goodsManage/C1ledger/type.d.ts

@@ -0,0 +1,33 @@
+export type C1InputKeyType = keyof TYpeC1Form
+
+export interface TYpeC1Form extends TYpeC1Form1, TYpeC1Form2 {
+  pageSize: number
+  pageNum: number
+}
+
+export interface TYpeC1Form1 {
+  aaaa: string
+  bbbb: string
+  cccc: string
+  dddd: string
+  eeee: string
+  ffff: string
+  gggg: string
+  hhhh: string
+  iiii: string
+  jjjj: string
+  kkkk: string
+}
+
+export interface TYpeC1Form2 {
+  llll: string
+  mmmm: string
+  nnnn: string
+  oooo: string
+  pppp: string
+  qqqq: string
+  rrrr: string
+  ssss: string
+  tttt: string
+  uuuu: string
+}

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

@@ -91,7 +91,7 @@ function D1goods({ lookData }: Props) {
   const startBtn = useMemo(() => {
     return [
       {
-        title: '编号类型',
+        title: '藏品编号',
         render: (item: any) => {
           return (
             <span

+ 8 - 4
src/pages/D_storeManage/D4impStor/D4edit/index.module.scss

@@ -81,6 +81,10 @@
             top: 3px;
           }
         }
+        .D4row3 {
+          position: relative;
+          top: 4px;
+        }
 
         .D4rowFull {
           width: 100%;
@@ -107,10 +111,6 @@
         .D1GtNumAc {
           color: var(--themeColor);
         }
-
-        .ant-table-cell {
-          padding: 8px !important;
-        }
       }
     }
 
@@ -122,5 +122,9 @@
         margin-right: 20px;
       }
     }
+
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 4 - 6
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -18,7 +18,7 @@ import X1setStoreLocS from '@/pages/X_stock/X1setStoreLocS'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import B3flowTable from '@/pages/B_enterTibet/B3flowTable'
 
-const pageTitTxtObj = {
+export const pageTitTxtObj = {
   1: '新增',
   2: '编辑',
   3: '审批',
@@ -87,7 +87,7 @@ function D4edit() {
   const startBtn = useMemo(() => {
     return [
       {
-        title: '编号类型',
+        title: '藏品编号',
         render: (item: any) => {
           return (
             <span
@@ -242,9 +242,7 @@ function D4edit() {
           ))}
 
           <div className='D4row'>
-            <div className='D4rowll'>
-              <span> * </span>相关出库单:
-            </div>
+            <div className='D4rowll'>相关出库单:</div>
             <div className='D4rowrr'>
               <Select disabled={['3', '4'].includes(key)} placeholder='请搜索出库单编码' />
             </div>
@@ -319,7 +317,7 @@ function D4edit() {
               <Select disabled={['3', '4'].includes(key)} placeholder='请选择' />
             </div>
           </div>
-          <div className='D4row'>
+          <div className='D4row D4row3'>
             <div className='D4rowll'>库房负责人:</div>
             <div className='D4rowrr'>这是一段文本</div>
           </div>

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

@@ -1,4 +1,135 @@
 .D6edit {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 15px 24px 0px;
   :global {
+    .D6Tit {
+      font-size: 18px;
+      font-weight: 700;
+      padding-bottom: 10px;
+      padding-left: 18px;
+      border-bottom: 1px solid #ccc;
+      margin-bottom: 17px;
+      color: var(--themeColor);
+      .ant-btn {
+        margin-left: 15px;
+        pointer-events: none;
+      }
+    }
+    .D6Tit2 {
+      margin-top: 24px;
+      display: flex;
+      justify-content: space-between;
+      border-bottom: 1px solid #ccc;
+      margin-bottom: 20px;
+      .D6Tit2ll {
+        font-size: 18px;
+        font-weight: 700;
+        padding-left: 18px;
+        margin-bottom: 17px;
+        color: var(--themeColor);
+      }
+      .D6Tit2rr {
+        position: relative;
+        z-index: 2;
+        .ant-btn {
+          margin-left: 15px;
+        }
+      }
+    }
+
+    .D6main {
+      width: 100%;
+      height: calc(100% - 70px);
+      overflow-y: auto;
+      padding-bottom: 40px;
+
+      .D6rowAll {
+        display: flex;
+        justify-content: space-between;
+        align-items: self-start;
+        font-size: 16px;
+        flex-wrap: wrap;
+        .D6row {
+          width: 48%;
+          display: flex;
+          align-items: center;
+          margin-bottom: 20px;
+          .D6rowll {
+            width: 124px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d4f;
+            }
+          }
+          .D6rowrr {
+            width: calc(100% - 124px);
+            .ant-input-affix-wrapper {
+              width: 300px;
+            }
+            .ant-select {
+              width: 300px;
+            }
+          }
+        }
+        .D6row2 {
+          align-items: self-start;
+          .D6rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+        .D6row3 {
+          position: relative;
+          top: 4px;
+        }
+
+        .D6rowFull {
+          width: 100%;
+          margin-top: -20px;
+          align-items: self-start;
+          margin-bottom: 0;
+          .D6rowll {
+            position: relative;
+            top: 3px;
+          }
+        }
+      }
+
+      // 藏品清单
+      .D6googsBox {
+        padding-right: 20px;
+        .D1GtNum {
+          cursor: pointer;
+          text-decoration: underline;
+          // &:hover {
+          //   color: var(--themeColor);
+          // }
+        }
+
+        .D1GtNumAc {
+          color: var(--themeColor);
+        }
+      }
+    }
+
+    .D6btn {
+      position: absolute;
+      bottom: 20px;
+      left: 134px;
+      .ant-btn {
+        margin-right: 20px;
+      }
+    }
+
+    // 相关入库单
+    .D6_4tableBox {
+      margin-top: 24px;
+    }
+
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 435 - 2
src/pages/D_storeManage/D6putsStor/D6edit/index.tsx

@@ -1,9 +1,442 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { pageTitTxtObj } from '../../D4impStor/D4edit'
+import { useParams } from 'react-router-dom'
+import { Button, Cascader, DatePicker, Input, Radio, Select } from 'antd'
+import { B3aForm1 } from '@/pages/B_enterTibet/B3_4page/B3edit/data'
+import dayjs from 'dayjs'
+import Z3upFiles from '@/components/Z3upFiles'
+import ZRichTexts from '@/components/ZRichTexts'
+import { MessageFu } from '@/utils/message'
+import history, { openGoodsInfoFu } from '@/utils/history'
+import B3GaddNow from '@/pages/B_enterTibet/B3goodsTable/B3GaddNow'
+import MyTable from '@/components/MyTable'
+import classNames from 'classnames'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { D4tableC, D6goodsTableC } from '@/utils/tableData'
+import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
+import X3auditInfo from '@/pages/X_stock/X3auditInfo'
+import B3flowTable from '@/pages/B_enterTibet/B3flowTable'
+
 function D6edit() {
+  const { key, id } = useParams<any>()
+  // key:1 新增 2编辑 3审批 4查看
+
+  // 滚到顶部
+  const sollrDom = useRef<HTMLDivElement>(null)
+
+  useEffect(() => {
+    console.log('key:', key)
+
+    if (sollrDom.current) sollrDom.current.scrollTop = 0
+  }, [key])
+
+  const pageTitTxt = useMemo(() => {
+    return Reflect.get(pageTitTxtObj, key)
+  }, [key])
+
+  // 上传附件的ref
+  const filesRef = useRef<any>(null)
+  // const filesRes = filesRef.current.filesIdRes();
+
+  // 富文本的ref
+  const ZRichTextRef = useRef<any>(null)
+
+  // 审批意见的ref
+  const ZAuditRef = useRef<any>(null)
+
+  // 设置富文本
+  //  ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf))
+
+  // 新增的底部按钮点击
+  const btnClickFu = useCallback((val: number) => {
+    const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
+    console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
+
+    const rtf2 = ZAuditRef.current?.resData()
+    console.log('审批信息富文本', rtf2)
+
+    // if (1 + 1 === 2) return
+
+    if (val === 2) {
+      // 存草稿 当前页保存 不跳转
+      MessageFu.success('草稿保存成功')
+    } else {
+      // 跳到详情页
+      history.push(`/putsStor_edit/4/999`)
+    }
+  }, [])
+
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+
+  const timeChange = useCallback((e: any) => {
+    console.log(123, e)
+  }, [])
+
+  // 是否归还 单选框
+  const [bbbb, setBBBB] = useState(0)
+
+  const [huanTime, setHuanTime] = useState('')
+
+  // 是否归还 选择 否 的时候  清空预计归还日期
+  useEffect(() => {
+    if (!bbbb) setHuanTime('')
+  }, [bbbb])
+
+  // 点击新增
+  const [nowSta, setNowSta] = useState({ key: '', id: '' })
+
+  // 审批的sta
+  const [auditSta, setAuDitSta] = useState('')
+
+  // 查看模式下的按钮 待完善
+  const lookBtn = useMemo(() => {
+    return (
+      <>
+        <Button type='primary'>创建</Button>
+        <Button type='primary'>提交</Button>
+        <MyPopconfirm
+          txtK='撤回'
+          onConfirm={() => {}}
+          Dom={
+            <Button type='primary' danger>
+              撤回
+            </Button>
+          }
+        />
+
+        <Button type='primary'>审批</Button>
+        <Button type='primary'>编辑</Button>
+        <Button type='primary'>重新提交</Button>
+        <Button type='primary'>导出</Button>
+        <MyPopconfirm
+          txtK='删除'
+          onConfirm={() => {}}
+          Dom={
+            <Button type='primary' danger>
+              删除
+            </Button>
+          }
+        />
+        <Button onClick={() => history.push('/putsStor')}>返回</Button>
+      </>
+    )
+  }, [])
+
+  // ----------------表格的逻辑
+  // 点击删除
+  const delTableFu = useCallback(async (id: number) => {}, [])
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '藏品编号',
+        render: (item: any) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num}
+            </span>
+          )
+        }
+      }
+    ]
+  }, [cathet])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '出库位置',
+        render: (item: any) => (
+          <Cascader
+            disabled={['3', '4'].includes(key)}
+            options={[
+              { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
+              { value: '其他', label: '其他' }
+            ]}
+            placeholder='请选择'
+            // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+            allowClear={false}
+          />
+        )
+      },
+      {
+        title: '操作',
+        render: (item: any) => {
+          return (
+            <>
+              <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
+                查看
+              </Button>
+              {['3', '4'].includes(key) ? null : (
+                <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+              )}
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, key])
+
+  const tableLastBtn2 = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          return (
+            <Button
+              size='small'
+              type='text'
+              onClick={() => {
+                window.open(`/#/impStor_edit/4/${item.id}`, '_blank')
+              }}
+            >
+              查看
+            </Button>
+          )
+        }
+      }
+    ]
+  }, [])
+
   return (
     <div className={styles.D6edit}>
-      <h1>D6edit</h1>
+      <div className='pageTitle'>出库-{pageTitTxt}</div>
+
+      <div className='D6main' ref={sollrDom}>
+        {['3'].includes(key) ? (
+          <X3auditInfo auditSta={auditSta} auditStaFu={val => setAuDitSta(val)} ref={ZAuditRef} />
+        ) : null}
+
+        {/* 表单字段、附件等 */}
+        <div className='D6Tit'>
+          {/* 待完善 */}
+          申请信息
+          <Button type='dashed'>草稿</Button>
+        </div>
+
+        <div className='D6rowAll'>
+          <div className='D6row'>
+            <div className='D6rowll'>
+              <span> * </span>申请名称:
+            </div>
+            <div className='D6rowrr'>
+              <Input
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+
+          <div className='D6row'>
+            <div className='D6rowll'>
+              <span> * </span>业务类型:
+            </div>
+            <div className='D6rowrr'>
+              <Cascader
+                disabled={['3', '4'].includes(key)}
+                options={[
+                  { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
+                  { value: '其他', label: '其他' }
+                ]}
+                changeOnSelect
+                placeholder='请选择'
+                // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                allowClear={false}
+              />
+            </div>
+          </div>
+
+          {B3aForm1.map(v => (
+            <div className='D6row' key={v.name}>
+              <div className='D6rowll'>{v.name}:</div>
+              <div className='D6rowrr'>
+                这是一段文本
+                {['3', '4'].includes(key) && v.name === '发起人'
+                  ? ' - 查看和审批后面显示创建时间'
+                  : ''}
+              </div>
+            </div>
+          ))}
+
+          <div className='D6row'>
+            <div className='D6rowll'>
+              <span> * </span>是否归还:
+            </div>
+            <div className='D6rowrr'>
+              <Radio.Group
+                disabled={['3', '4'].includes(key)}
+                value={bbbb}
+                onChange={e => setBBBB(e.target.value)}
+                options={[
+                  { value: 1, label: '是' },
+                  { value: 0, label: '否' }
+                ]}
+              />
+            </div>
+          </div>
+
+          <div className='D6row'>
+            <div className='D6rowll'>{bbbb ? <span> * </span> : null} 预计归还日期:</div>
+            <div className='D6rowrr'>
+              <DatePicker
+                disabled={['3', '4'].includes(key) || bbbb === 0}
+                allowClear={false}
+                value={huanTime ? dayjs(huanTime) : null}
+                onChange={e => setHuanTime(dayjs(e).format('YYYY-MM-DD'))}
+              />
+            </div>
+          </div>
+
+          <div className='D6row'>
+            <div className='D6rowll'>
+              <span> * </span>业务日期:
+            </div>
+            <div className='D6rowrr'>
+              <DatePicker
+                disabled={['3', '4'].includes(key)}
+                allowClear={false}
+                value={dayjs()}
+                onChange={timeChange}
+              />
+            </div>
+          </div>
+          <div className='D6row'>
+            <div className='D6rowll'>原因事由:</div>
+            <div className='D6rowrr'>
+              <Input
+                readOnly={['3', '4'].includes(key)}
+                placeholder='请输入内容'
+                maxLength={30}
+                showCount
+              />
+            </div>
+          </div>
+
+          <div className='D6row D6row2'>
+            <div className='D6rowll'>附件:</div>
+            <div className='D6rowrr'>
+              <Z3upFiles
+                max={10}
+                isLook={['3', '4'].includes(key)}
+                ref={filesRef}
+                fileCheck={false}
+                dirCode={'xxxxxxx'}
+                myUrl='xxxxxxxxxxxx'
+                lookData={[]}
+                size={500}
+              />
+            </div>
+          </div>
+
+          <div className='D6row D6rowFull'>
+            <div className='D6rowll'>备注:</div>
+            <div className='D6rowrr'>
+              <ZRichTexts
+                check={false}
+                dirCode={'xxxxxxxx'}
+                isLook={['3', '4'].includes(key)}
+                ref={ZRichTextRef}
+                myUrl='xxxxxxxxxx'
+                isOne={true}
+                upAudioBtnNone={true}
+              />
+            </div>
+          </div>
+        </div>
+
+        <div className='D6Tit'>库房信息</div>
+        <div className='D6rowAll'>
+          <div className='D6row'>
+            <div className='D6rowll'>
+              <span> * </span>出库库房:
+            </div>
+            <div className='D6rowrr'>
+              {/* 待完善 从库房设置列表里面选择 --根据选择刷新下面的藏品清单列表*/}
+              <Select disabled={['3', '4'].includes(key)} placeholder='请选择' />
+            </div>
+          </div>
+          <div className='D6row D6row3'>
+            <div className='D6rowll'>库房负责人:</div>
+            <div className='D6rowrr'>这是一段文本</div>
+          </div>
+        </div>
+
+        {/* 藏品清单 */}
+        <div className='D6googsBox'>
+          <div className='D6Tit2'>
+            <div className='D6Tit2ll'>藏品清单</div>
+            <div className='D6Tit2rr'>
+              {['3', '4'].includes(key) ? null : (
+                <Button type='primary' onClick={() => setNowSta({ key: '6', id })}>
+                  新增
+                </Button>
+              )}
+            </div>
+          </div>
+
+          {/* 表格 */}
+          <MyTable
+            list={[{ id: 99, thumb: '', num: '一段编号_可点击' }]}
+            columnsTemp={D6goodsTableC}
+            startBtn={startBtn}
+            lastBtn={tableLastBtn}
+            pagingInfo={false}
+          />
+        </div>
+
+        {/* 相关入库单 */}
+
+        {/* 通过后端数据,没有入库单的隐藏 */}
+
+        {key === '4' ? (
+          <div className='D6_4tableBox'>
+            <div className='D6Tit'>相关入库单</div>
+            <MyTable
+              list={[{ id: 77, thumb: '' }]}
+              columnsTemp={D4tableC}
+              lastBtn={tableLastBtn2}
+              pagingInfo={false}
+            />
+          </div>
+        ) : null}
+
+        {/* 申请流程 */}
+        {['3', '4'].includes(key) ? <B3flowTable /> : null}
+      </div>
+
+      {/* 底部按钮 */}
+      <div className='D6btn'>
+        {key === '4' ? (
+          lookBtn
+        ) : (
+          <>
+            <Button type='primary' onClick={() => btnClickFu(1)}>
+              {key === '1' ? '创建' : '保存'}
+            </Button>
+
+            {key === '1' ? (
+              <Button type='primary' onClick={() => btnClickFu(2)}>
+                存草稿
+              </Button>
+            ) : null}
+
+            <MyPopconfirm txtK='取消' onConfirm={() => history.push('/putsStor')} />
+          </>
+        )}
+      </div>
+
+      {/* 打开侧边栏 */}
+      <Y1cathet sId={cathet} closeFu={() => setCathet(0)} />
+      {/* 新增弹窗 */}
+      {nowSta.id ? (
+        <B3GaddNow nowSta={nowSta} closeFu={() => setNowSta({ key: '', id: '' })} />
+      ) : null}
     </div>
   )
 }

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

@@ -60,12 +60,12 @@ const tabLeftArr: RouterType = [
     id: 3,
     name: '藏品管理',
     son: [
-      // {
-      //   id: 310,
-      //   name: '藏品总账',
-      //   path: '/ledger',
-      //   Com: React.lazy(() => import('../C_goodsManage/C1ledger'))
-      // },
+      {
+        id: 310,
+        name: '藏品总账',
+        path: '/ledger',
+        Com: React.lazy(() => import('../C_goodsManage/C1ledger'))
+      },
       // {
       //   id: 320,
       //   name: '藏品附件',

+ 1 - 1
src/pages/Y_goodsDetails/Y1cathet/Y44com.tsx

@@ -102,7 +102,7 @@ function Y44com({ isLook }: Props) {
   // 点击查看 新窗口打开
   const lookPage = useCallback((id: number) => {
     // 根据业务类型打开不同的新页面 待完善
-    window.open('/#/entering_look/1/1', '_blank')
+    window.open('/#/entering_edit/4/1/1', '_blank')
   }, [])
 
   const tableLastBtn = useMemo(() => {

+ 27 - 3
src/utils/tableData.ts

@@ -17,7 +17,7 @@
 // 待完善
 export const B3eTableC = [
   ['img', '封面图', 'thumb'],
-  ['txt', '藏品编号', 'description'],
+  ['txt', '编号类型', 'description'],
   ['txt', '藏品名称', 'description'],
   ['txt', '文物级别', 'description'],
   ['txt', '文物类别', 'description'],
@@ -39,7 +39,7 @@ export const B3FtableC = [
 // 待完善
 export const D1GtableC = [
   ['img', '封面图', 'thumb'],
-  ['txt', '藏品编号', 'userName'],
+  ['txt', '编号类型', 'userName'],
   ['txt', '藏品名称', 'userName'],
   ['txt', '数量', 'userName'],
   ['txt', '库存状态', 'userName'],
@@ -61,6 +61,21 @@ export const B3tableC = [
 ]
 
 // 待完善
+export const C1tableC = [
+  ['img', '封面图', 'thumb'],
+  ['txt', '编号类型', 'xxx'],
+  ['txt', '藏品名称', 'xxx'],
+  ['txt', '文物级别', 'xxx'],
+  ['txt', '文物类别', 'xxx'],
+  ['txt', '年代', 'xxx'],
+  ['txt', '质地', 'xxx'],
+  ['txt', '完残程度', 'xxx'],
+  ['txt', '来源', 'xxx'],
+  ['txt', '入藏状态', 'xxx'],
+  ['txt', '库存状态', 'xxx']
+]
+
+// 待完善
 export const D1tableC = [
   ['txt', '区域名称', 'name1'],
   ['txt', '排架', 'userName'],
@@ -113,7 +128,16 @@ export const D6tableC = [
 // 待完善
 export const D4goodsTableC = [
   ['img', '封面图', 'thumb'],
-  ['txt', '藏品编号', 'userName'],
+  ['txt', '编号类型', 'userName'],
+  ['txt', '藏品名称', 'userName'],
+  ['txt', '数量', 'userName'],
+  ['txt', '库存状态', 'userName']
+]
+
+// 待完善
+export const D6goodsTableC = [
+  ['img', '封面图', 'thumb'],
+  ['txt', '编号类型', 'userName'],
   ['txt', '藏品名称', 'userName'],
   ['txt', '数量', 'userName'],
   ['txt', '库存状态', 'userName']