shaogen1995 4 months ago
parent
commit
16b0820aa2
36 changed files with 1099 additions and 147 deletions
  1. 1 1
      src/pages/B_enterTibet/B3_4page/B3edit/main.tsx
  2. 0 1
      src/pages/B_enterTibet/B3goodsTable/B3GaddNew/index.tsx
  3. 5 5
      src/pages/C_goodsManage/C2files/index.tsx
  4. 14 4
      src/pages/D_storeManage/D1storage/D1Loc/index.tsx
  5. 3 0
      src/pages/D_storeManage/D1storage/D1goods/index.module.scss
  6. 42 27
      src/pages/D_storeManage/D1storage/D1goods/index.tsx
  7. 4 4
      src/pages/D_storeManage/D1storage/D1goods/type.d.ts
  8. 12 7
      src/pages/D_storeManage/D1storage/index.tsx
  9. 2 0
      src/pages/D_storeManage/D1storage/type.d.ts
  10. 37 7
      src/pages/D_storeManage/D4impStor/D4edit/index.tsx
  11. 70 33
      src/pages/D_storeManage/D4impStor/index.tsx
  12. 6 3
      src/pages/D_storeManage/D4impStor/type.d.ts
  13. 3 3
      src/pages/D_storeManage/D6putsStor/index.tsx
  14. 7 7
      src/pages/Layout/data.ts
  15. 7 6
      src/pages/Y_goodsDetails/Y1cathet/Y33com.tsx
  16. 1 5
      src/pages/Y_goodsDetails/Y2look/Y33setType.tsx
  17. 1 2
      src/pages/Z_system/Z1dict/Z1add.tsx
  18. 4 4
      src/pages/Z_system/Z1dict/index.tsx
  19. 221 0
      src/pages/Z_system/Z3flowSet/Z3edit/Z3addPro.tsx
  20. 114 0
      src/pages/Z_system/Z3flowSet/Z3edit/index.module.scss
  21. 190 0
      src/pages/Z_system/Z3flowSet/Z3edit/index.tsx
  22. 23 0
      src/pages/Z_system/Z3flowSet/data.ts
  23. 13 0
      src/pages/Z_system/Z3flowSet/index.module.scss
  24. 135 3
      src/pages/Z_system/Z3flowSet/index.tsx
  25. 0 0
      src/pages/Z_system/Z3flowSet/type.d.ts
  26. 3 2
      src/pages/Z_system/Z4organization/Z4add.tsx
  27. 5 1
      src/pages/Z_system/Z4organization/index.tsx
  28. 7 0
      src/store/action/D1storage.ts
  29. 39 0
      src/store/action/D4impStor.ts
  30. 34 0
      src/store/action/Z3flowSet.ts
  31. 28 0
      src/store/reducer/D4impStor.ts
  32. 25 0
      src/store/reducer/Z3flowSet.ts
  33. 4 0
      src/store/reducer/index.ts
  34. 12 12
      src/utils/history.ts
  35. 20 10
      src/utils/select.ts
  36. 7 0
      src/utils/tableData.ts

+ 1 - 1
src/pages/B_enterTibet/B3_4page/B3edit/main.tsx

@@ -62,8 +62,8 @@ function B3editMain({ pageSta }: Props) {
     // pageKey 1 2 3 4 入馆 入藏 登记 删除
   }, [creatFu, getInfoFu, id, key])
 
+  // key改变的时候,滚动到顶部
   const scrollTopFu = useCallback(() => {
-    // key改变的时候,滚动到顶部  并且更新数据
     const dom = document.querySelector('#B3aTop') as HTMLDivElement
     if (dom) dom.scrollTop = 0
   }, [])

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

@@ -176,7 +176,6 @@ function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
             value={item.type}
             onChange={e => tableFu('type', item.id, e)}
             options={selectObj['附件类型']}
-            fieldNames={{ label: 'name', value: 'key' }}
           />
         )
       },

+ 5 - 5
src/pages/C_goodsManage/C2files/index.tsx

@@ -181,13 +181,13 @@ function C2files() {
       {/* 第一行 */}
       <div className='C2top'>
         <div className='C2topll'>
-          {[{ name: '全部', key: '' }, ...selectObj['附件类型']].map(v => (
+          {[{ label: '全部', value: '' }, ...selectObj['附件类型']].map(v => (
             <Button
-              key={v.name}
-              onClick={() => setBtnAc(v.name)}
-              type={btnAc === v.name ? 'primary' : 'default'}
+              key={v.value}
+              onClick={() => setBtnAc(v.value)}
+              type={btnAc === v.value ? 'primary' : 'default'}
             >
-              {v.name}
+              {v.value}
             </Button>
           ))}
         </div>

+ 14 - 4
src/pages/D_storeManage/D1storage/D1Loc/index.tsx

@@ -3,11 +3,11 @@ import styles from './index.module.scss'
 import { Button, Checkbox } from 'antd'
 import MyTable from '@/components/MyTable'
 import { D1tableC } from '@/utils/tableData'
-import { D1siteListType } from '../type'
+import { D1canType, D1siteListType } from '../type'
 import { D1_APIgetSiteList } from '@/store/action/D1storage'
 
 type Props = {
-  lookFu: (val: string[]) => void
+  lookFu: (val: D1canType) => void
   TreeDom: React.ReactNode
   tableId: number
 }
@@ -19,9 +19,19 @@ function D1Loc({ lookFu, TreeDom, tableId }: Props) {
     return [
       {
         title: '相关藏品',
-        render: (item: any) => {
+        render: (item: D1siteListType) => {
           return (
-            <Button size='small' type='text' onClick={() => lookFu(['1', '2', '3', '4', '5'])}>
+            <Button
+              size='small'
+              type='text'
+              onClick={() =>
+                lookFu({
+                  layer1: item.layer1,
+                  layer2: item.layer2,
+                  layer3: item.layer3
+                })
+              }
+            >
               查看
             </Button>
           )

+ 3 - 0
src/pages/D_storeManage/D1storage/D1goods/index.module.scss

@@ -16,6 +16,9 @@
           z-index: 10;
         }
       }
+      .ant-select-selection-placeholder {
+        color: black;
+      }
     }
     .D1Gmain {
       margin-top: 15px;

+ 42 - 27
src/pages/D_storeManage/D1storage/D1goods/index.tsx

@@ -8,24 +8,29 @@ import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import { openGoodsInfoFu } from '@/utils/history'
 import classNames from 'classnames'
 import { selectObj } from '@/utils/select'
+import { D1_APIgetGoodsList } from '@/store/action/D1storage'
+import { D1canType } from '../type'
 
 const baseFormData: TypeD1Gform = {
   pageSize: 10,
   pageNum: 1,
-  aaaa: '',
-  bbbb: '',
-  cccc: '',
-  dddd: ''
+  numName: null,
+  num: '',
+  name: '',
+  statusStorage: null
 }
-// 待完善 没有接入后端
 
 type Props = {
-  lookData: string[]
+  lookData: D1canType
+  TreeDom: React.ReactNode
+  tableId: number
 }
 
-function D1goods({ lookData }: Props) {
+function D1goods({ lookData, TreeDom, tableId }: Props) {
+  const siteCan = useRef({} as D1canType)
+
   useEffect(() => {
-    console.log('获取参数', lookData)
+    if (lookData.layer1) siteCan.current = lookData
   }, [lookData])
 
   const [formData, setFormData] = useState(baseFormData)
@@ -46,10 +51,22 @@ function D1goods({ lookData }: Props) {
     }, 50)
   }, [formData])
 
+  // 待完善 没有数据
+  const [table, setTable] = useState([])
+
   // 封装发送请求的函数
-  const getListFu = useCallback(() => {
-    console.log('发送请求', formDataRef.current)
-  }, [])
+  const getListFu = useCallback(async () => {
+    const res = await D1_APIgetGoodsList({
+      ...formDataRef.current,
+      storageId: tableId,
+      ...siteCan.current,
+      pageNum: 1,
+      pageSize: 99999
+    })
+    if (res.code === 0) {
+      setTable(res.data.records)
+    }
+  }, [tableId])
 
   useEffect(() => {
     getListFu()
@@ -57,7 +74,7 @@ function D1goods({ lookData }: Props) {
 
   // 输入框的改变
   const txtChangeFu = useCallback(
-    (txt: string, key: 'bbbb' | 'cccc') => {
+    (txt: string, key: 'num' | 'name') => {
       setFormData({
         ...formData,
         [key]: txt
@@ -68,6 +85,7 @@ function D1goods({ lookData }: Props) {
 
   // 点击重置
   const resetSelectFu = useCallback(() => {
+    siteCan.current = {} as D1canType
     setFormData(baseFormData)
     setTimeout(() => {
       setTimeKey(Date.now())
@@ -129,8 +147,9 @@ function D1goods({ lookData }: Props) {
           <Select
             options={selectObj['藏品编号类型']}
             style={{ width: 160 }}
-            value={formData.aaaa}
-            onChange={e => setFormData({ ...formData, aaaa: e })}
+            value={formData.numName}
+            placeholder='全部'
+            onChange={e => setFormData({ ...formData, numName: e })}
           />
         </div>
 
@@ -139,8 +158,8 @@ function D1goods({ lookData }: Props) {
           <Input
             placeholder='请输入内容'
             maxLength={30}
-            value={formData.bbbb}
-            onChange={e => txtChangeFu(e.target.value, 'bbbb')}
+            value={formData.num}
+            onChange={e => txtChangeFu(e.target.value, 'num')}
           />
         </div>
 
@@ -149,8 +168,8 @@ function D1goods({ lookData }: Props) {
           <Input
             placeholder='请输入内容'
             maxLength={30}
-            value={formData.cccc}
-            onChange={e => txtChangeFu(e.target.value, 'cccc')}
+            value={formData.name}
+            onChange={e => txtChangeFu(e.target.value, 'name')}
           />
         </div>
 
@@ -159,8 +178,9 @@ function D1goods({ lookData }: Props) {
           <Select
             options={selectObj['库存状态']}
             style={{ width: 160 }}
-            value={formData.dddd}
-            onChange={e => setFormData({ ...formData, dddd: e })}
+            value={formData.statusStorage}
+            placeholder='全部'
+            onChange={e => setFormData({ ...formData, statusStorage: e })}
           />
         </div>
 
@@ -174,17 +194,12 @@ function D1goods({ lookData }: Props) {
       </div>
 
       <div className='D1Gmain'>
-        <div className='D1Gmainll'>
-          {1 + 1 === 2 ? <div className='D1null'>暂无数据</div> : '树列表'}
-        </div>
+        {TreeDom}
         <div className='D1Gmainrr'>
           {/* 表格 */}
           <MyTable
             yHeight={666}
-            list={[
-              { id: 99, thumb: '', num: '一段编号_可点击' },
-              { id: 199, thumb: '', num: '一段编号_可点击' }
-            ]}
+            list={table}
             columnsTemp={D1GtableC}
             startBtn={startBtn}
             lastBtn={tableLastBtn}

+ 4 - 4
src/pages/D_storeManage/D1storage/D1goods/type.d.ts

@@ -1,8 +1,8 @@
 export type TypeD1Gform = {
   pageNum: number
   pageSize: number
-  aaaa: string
-  bbbb: string
-  cccc: string
-  dddd: string
+  numName: string | null
+  num: string
+  name: string
+  statusStorage: number | null
 }

+ 12 - 7
src/pages/D_storeManage/D1storage/index.tsx

@@ -6,6 +6,7 @@ import D1goods from './D1goods'
 import { filterTreeByName } from '@/utils/history'
 import { TypeZ1dict } from '@/pages/Z_system/Z1dict/type'
 import { D1_APIgetTree } from '@/store/action/D1storage'
+import { D1canType } from './type'
 
 type TypeTopBtn = '按库位查看' | '按藏品查看'
 
@@ -15,7 +16,7 @@ function D1storage() {
   const [topAc, setTopAc] = useState<TypeTopBtn>('按库位查看')
 
   // 库位传递参数给藏品
-  const lookData = useRef<string[]>([])
+  const lookData = useRef({} as D1canType)
 
   // 有关树------
   const [loding, setLoding] = useState(false)
@@ -71,7 +72,11 @@ function D1storage() {
       return data.map(item => {
         const strTitle = ((item.num ? item.num + ' - ' : '') + item.name) as string
 
-        const index = strTitle.indexOf(value)
+        const strTitleD = strTitle.toUpperCase()
+
+        const valueD = value.toUpperCase()
+
+        const index = strTitleD.indexOf(valueD)
 
         const beforeStr = strTitle.substring(0, index)
         const afterStr = strTitle.slice(index + value.length)
@@ -83,9 +88,7 @@ function D1storage() {
               {afterStr}
             </span>
           ) : (
-            <span key={item.id} className='hiddenTree'>
-              {strTitle}
-            </span>
+            <span key={item.id}>{strTitle}</span>
           )
         if (item.children) {
           return { title, key: item.id, children: loop(item.children) }
@@ -144,7 +147,7 @@ function D1storage() {
         {topBtnArr.map(v => (
           <Button
             onClick={() => {
-              lookData.current = []
+              lookData.current = {} as D1canType
               setTopAc(v)
             }}
             key={v}
@@ -165,7 +168,9 @@ function D1storage() {
             tableId={acShu}
           />
         ) : null}
-        {topAc === '按藏品查看' ? <D1goods lookData={lookData.current} /> : null}
+        {topAc === '按藏品查看' ? (
+          <D1goods TreeDom={TreeDom} tableId={acShu} lookData={lookData.current} />
+        ) : null}
       </div>
     </div>
   )

+ 2 - 0
src/pages/D_storeManage/D1storage/type.d.ts

@@ -12,3 +12,5 @@ export type D1siteListType = {
   storageId: number
   updateTime: string
 }
+
+export type D1canType = { layer1: number; layer2: number; layer3: number }

+ 37 - 7
src/pages/D_storeManage/D4impStor/D4edit/index.tsx

@@ -12,11 +12,13 @@ import { MessageFu } from '@/utils/message'
 import MyTable from '@/components/MyTable'
 import classNames from 'classnames'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
-import { D4goodsTableC } from '@/utils/tableData'
+import { D4goodsTableC, statusObj } from '@/utils/tableData'
 import B3GaddNow from '@/pages/B_enterTibet/B3goodsTable/B3GaddNow'
 import X1setStoreLocS from '@/pages/X_stock/X1setStoreLocS'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import B3flowTable from '@/pages/B_enterTibet/B3flowTable'
+import { D4_APIcreate, D4_APIgetInfo } from '@/store/action/D4impStor'
+import { FourTableType } from '@/pages/B_enterTibet/B3_4page/type'
 
 export const pageTitTxtObj = {
   1: '新增',
@@ -32,11 +34,35 @@ function D4edit() {
   // 滚到顶部
   const sollrDom = useRef<HTMLDivElement>(null)
 
+  // 顶部数据
+  const [topInfo, setTopInfo] = useState({} as FourTableType)
+
+  // 创建订单
+  const creatFu = useCallback(async () => {
+    const res = await D4_APIcreate()
+    if (res.code === 0) {
+      setTopInfo(res.data)
+    }
+  }, [])
+
+  // 获取详情
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await D4_APIgetInfo(id)
+    if (res.code === 0) {
+      setTopInfo(res.data)
+
+      // 设置藏品清单数据
+
+      // goodsTableRef.current?.setData(res.data.goods || [])
+    }
+  }, [])
+
   useEffect(() => {
-    console.log('key:', key)
+    if (key === '1') creatFu()
+    else getInfoFu(id)
 
     if (sollrDom.current) sollrDom.current.scrollTop = 0
-  }, [key])
+  }, [creatFu, getInfoFu, id, key])
 
   // 上传附件的ref
   const filesRef = useRef<any>(null)
@@ -187,8 +213,8 @@ function D4edit() {
       <div className='D4main' ref={sollrDom}>
         {['3'].includes(key) ? (
           <X3auditInfo
-            dirCode='待完善'
-            myUrl='待完善'
+            dirCode='D4impStor'
+            myUrl='cms/orderIn/upload'
             auditSta={auditSta}
             auditStaFu={val => setAuDitSta(val)}
             ref={ZAuditRef}
@@ -197,9 +223,10 @@ function D4edit() {
 
         {/* 表单字段、附件等 */}
         <div className='D4Tit'>
-          {/* 待完善 */}
           申请信息
-          <Button type='dashed'>草稿</Button>
+          {key === '1' ? null : (
+            <Button type='dashed'>{Reflect.get(statusObj, topInfo.status)}</Button>
+          )}
         </div>
         <div className='D4rowAll'>
           <div className='D4row'>
@@ -208,6 +235,8 @@ function D4edit() {
             </div>
             <div className='D4rowrr'>
               <Input
+                value={topInfo.name}
+                onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
                 readOnly={['3', '4'].includes(key)}
                 placeholder='请输入内容'
                 maxLength={30}
@@ -219,6 +248,7 @@ function D4edit() {
           <div className='D4row'>
             <div className='D4rowll'>
               <span> * </span>业务类型:
+              {/* 待完善业务类型字段 */}
             </div>
             <div className='D4rowrr'>
               <Cascader

+ 70 - 33
src/pages/D_storeManage/D4impStor/index.tsx

@@ -1,15 +1,22 @@
 import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
 import { Button, DatePicker, Input, Select } from 'antd'
-import { TypeD4Form } from './type'
+import { TypeD4Form, TypeD4list } from './type'
 import { B3_4inputKeyArr, D3InputKeyType } from '@/pages/B_enterTibet/B3_4page'
 import dayjs from 'dayjs'
 import MyTable from '@/components/MyTable'
 import { D4tableC } from '@/utils/tableData'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import history from '@/utils/history'
+import history, { btnFlagFu } from '@/utils/history'
+import { selectObj } from '@/utils/select'
+import { useDispatch, useSelector } from 'react-redux'
+import { D2_APIgetList } from '@/store/action/D2storSet'
+import { RootState } from '@/store'
+import { D4_APIdel, D4_APIgetList } from '@/store/action/D4impStor'
+import { MessageFu } from '@/utils/message'
 const { RangePicker } = DatePicker
 
+// 后端筛选字段 待完善
 const baseFormData: TypeD4Form = {
   pageSize: 10,
   pageNum: 1,
@@ -19,14 +26,21 @@ const baseFormData: TypeD4Form = {
   dddd: '',
   startTime: '',
   endTime: '',
-  eeee: '',
-  ffff: '',
-  gggg: ''
+  eeee: null,
+  ffff: null,
+  gggg: null
 }
 
-// 没有接入后端 待完善
-
 function D4impStor() {
+  const dispatch = useDispatch()
+
+  // 获取入库库房下拉框 - 库房设置列表
+  useEffect(() => {
+    dispatch(D2_APIgetList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const { list } = useSelector((state: RootState) => state.D2storSet.tableInfo)
+
   const [formData, setFormData] = useState(baseFormData)
   const formDataRef = useRef(baseFormData)
 
@@ -61,8 +75,8 @@ function D4impStor() {
 
   // 封装发送请求的函数
   const getListFu = useCallback(() => {
-    console.log('发送请求', formDataRef.current)
-  }, [])
+    dispatch(D4_APIgetList(formDataRef.current))
+  }, [dispatch])
 
   useEffect(() => {
     getListFu()
@@ -101,34 +115,50 @@ function D4impStor() {
   // 点击删除
   const delTableFu = useCallback(
     async (id: number) => {
-      getListFu()
+      const res = await D4_APIdel(id)
+      if (res.code === 0) {
+        MessageFu.success('删除成功')
+        getListFu()
+      }
     },
     [getListFu]
   )
 
   // 点击操作按钮
-  const tableBtnFu = useCallback((key: string, id: number) => {
+  const tableBtnFu = useCallback((id: number, key: string) => {
     history.push(`/impStor_edit/${key}/${id}`)
   }, [])
 
   const tableLastBtn = useMemo(() => {
-    //   看状态和账号角色显示按钮 待完善
     return [
       {
         title: '操作',
-        render: (item: any) => {
-          return (
+        render: (item: TypeD4list) => {
+          let obj = btnFlagFu(item)
+          return !Object.values(obj).some(Boolean) ? (
+            '-'
+          ) : (
             <>
-              <Button size='small' type='text' onClick={() => tableBtnFu('2', item.id)}>
-                编辑
-              </Button>
-              <Button size='small' type='text' onClick={() => tableBtnFu('3', item.id)}>
-                审批
-              </Button>
-              <Button size='small' type='text' onClick={() => tableBtnFu('4', item.id)}>
-                查看
-              </Button>
-              <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+              {obj['编辑'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '2')}>
+                  编辑
+                </Button>
+              ) : null}
+
+              {obj['审批'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '3')}>
+                  审批
+                </Button>
+              ) : null}
+              {obj['查看'] ? (
+                <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '4')}>
+                  查看
+                </Button>
+              ) : null}
+
+              {obj['删除'] ? (
+                <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+              ) : null}
             </>
           )
         }
@@ -136,6 +166,9 @@ function D4impStor() {
     ]
   }, [delTableFu, tableBtnFu])
 
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.D4impStor.tableInfo)
+
   return (
     <div className={styles.D4impStor}>
       <div className='pageTitle'>入库</div>
@@ -176,21 +209,23 @@ function D4impStor() {
           <div>
             <span>申请状态:</span>
             <Select
-              placeholder='请选择'
+              allowClear={true}
+              placeholder='全部'
               style={{ width: 150 }}
               value={formData.eeee}
               onChange={e => setFormData({ ...formData, eeee: e })}
-              options={[{ value: '', label: '全部' }]}
+              options={selectObj['申请状态'].filter(v => v.label !== '待盘点')}
             />
           </div>
 
           <div>
             <span>选择角色:</span>
             <Select
+              allowClear={true}
               style={{ width: 150 }}
-              placeholder='请选择'
-              options={[]}
-              fieldNames={{ value: 'id', label: 'roleName' }}
+              placeholder='全部'
+              options={selectObj['角色']}
+              // fieldNames={{ value: 'id', label: 'roleName' }}
               value={formData.ffff}
               onChange={e => setFormData({ ...formData, ffff: e })}
             />
@@ -200,11 +235,13 @@ function D4impStor() {
             <span>入库库房:</span>
             {/* 拿库房设置的列表 */}
             <Select
-              placeholder='请选择'
+              allowClear={true}
+              placeholder='全部'
               style={{ width: 150 }}
               value={formData.gggg}
               onChange={e => setFormData({ ...formData, gggg: e })}
-              options={[{ value: '', label: '全部' }]}
+              fieldNames={{ value: 'id', label: 'name' }}
+              options={list}
             />
           </div>
         </div>
@@ -219,12 +256,12 @@ function D4impStor() {
       {/* 表格 */}
       <MyTable
         yHeight={610}
-        list={[{ id: 66 }]}
+        list={tableInfo.list}
         columnsTemp={D4tableC}
         lastBtn={tableLastBtn}
         pageNum={formData.pageNum}
         pageSize={formData.pageSize}
-        total={0}
+        total={tableInfo.total}
         onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
       />
     </div>

+ 6 - 3
src/pages/D_storeManage/D4impStor/type.d.ts

@@ -7,7 +7,10 @@ export type TypeD4Form = {
   dddd: string
   startTime: string
   endTime: string
-  eeee: string
-  ffff: string
-  gggg: string
+  eeee: null | number
+  ffff: null | string
+  gggg: null | number
 }
+
+// 待完善
+export type TypeD4list = any

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

@@ -19,9 +19,9 @@ const baseFormData: TypeD4Form = {
   dddd: '',
   startTime: '',
   endTime: '',
-  eeee: '',
-  ffff: '',
-  gggg: ''
+  eeee: null,
+  ffff: null,
+  gggg: null
 }
 
 // 没有接入后端 待完善

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

@@ -21,7 +21,7 @@ const tabLeftArr: RouterType = [
       {
         id: 130,
         name: '流程管理444',
-        path: '/flow',
+        path: '/process',
         Com: React.lazy(() => import('../A_workbench/A3flow'))
       }
     ]
@@ -211,12 +211,12 @@ const tabLeftArr: RouterType = [
         path: '/numRule',
         Com: React.lazy(() => import('../Z_system/Z2numRule'))
       },
-      // {
-      //   id: 730,
-      //   name: '流程设置',
-      //   path: '/flowSet',
-      //   Com: React.lazy(() => import('../Z_system/Z3flowSet'))
-      // },
+      {
+        id: 730,
+        name: '流程设置',
+        path: '/flowSet',
+        Com: React.lazy(() => import('../Z_system/Z3flowSet'))
+      },
 
       {
         id: 740,

+ 7 - 6
src/pages/Y_goodsDetails/Y1cathet/Y33com.tsx

@@ -92,7 +92,8 @@ function Y33com({ isLook, sId }: Props) {
       },
       {
         title: '附件类型',
-        render: (item: GoodFileType) => selectObj['附件类型'].find(v => v.key === item.type)?.name
+        render: (item: GoodFileType) =>
+          selectObj['附件类型'].find(v => v.value === item.type)?.label
       },
       {
         title: '附件用途',
@@ -177,13 +178,13 @@ function Y33com({ isLook, sId }: Props) {
     <div className='Y33com'>
       <div className='Y33top'>
         <div className='Y33topll'>
-          {[{ name: '全部', key: '' }, ...selectObj['附件类型']].map(v => (
+          {[{ label: '全部', value: '' }, ...selectObj['附件类型']].map(v => (
             <Button
-              key={v.key}
-              onClick={() => setBtnAc(v.key)}
-              type={btnAc === v.key ? 'primary' : 'default'}
+              key={v.value}
+              onClick={() => setBtnAc(v.value)}
+              type={btnAc === v.value ? 'primary' : 'default'}
             >
-              {v.name}
+              {v.label}
             </Button>
           ))}
         </div>

+ 1 - 5
src/pages/Y_goodsDetails/Y2look/Y33setType.tsx

@@ -90,11 +90,7 @@ function Y33setType({ info, closeFu, succFu }: Props) {
           autoComplete='off'
         >
           <Form.Item label='类型' name='type' rules={[{ required: true, message: '请输入类型!' }]}>
-            <Select
-              options={selectObj['附件类型']}
-              fieldNames={{ label: 'name', value: 'key' }}
-              placeholder='请选择'
-            />
+            <Select options={selectObj['附件类型']} placeholder='请选择' />
           </Form.Item>
 
           <Form.Item label='用途' name='effect'>

+ 1 - 2
src/pages/Z_system/Z1dict/Z1add.tsx

@@ -38,6 +38,7 @@ function Z1add({ addInfo, addFu, closeFu, isNoAcIds }: Props) {
     setAcCardInfo(addInfo.acInfo)
 
     let ids: string[] | null = addInfo.acInfo.id ? [addInfo.acInfo.id] : null
+
     if (addInfo.acInfo.ancestor) ids = [...addInfo.acInfo.ancestor.split(','), addInfo.acInfo.id]
 
     let idsRes = ids
@@ -52,8 +53,6 @@ function Z1add({ addInfo, addFu, closeFu, isNoAcIds }: Props) {
       idsRes = idsRes.filter((v, i) => i > 2)
     }
 
-    // console.log(123, idsRes)
-
     setParentIdArr(idsRes)
   }, [addInfo.acInfo, addInfo.txt])
 

+ 4 - 4
src/pages/Z_system/Z1dict/index.tsx

@@ -96,8 +96,10 @@ function Z1dict() {
 
       return data.map(item => {
         const strTitle = ((item.num ? item.num + ' ' : '') + item.name) as string
+        const strTitleD = strTitle.toUpperCase()
 
-        const index = strTitle.indexOf(value)
+        const valueD = value.toUpperCase()
+        const index = strTitleD.indexOf(valueD)
 
         const beforeStr = strTitle.substring(0, index)
         const afterStr = strTitle.slice(index + value.length)
@@ -109,9 +111,7 @@ function Z1dict() {
               {afterStr}
             </span>
           ) : (
-            <span key={item.id} className='hiddenTree'>
-              {strTitle}
-            </span>
+            <span key={item.id}>{strTitle}</span>
           )
         if (item.children) {
           return { title, key: item.id, children: loop(item.children) }

+ 221 - 0
src/pages/Z_system/Z3flowSet/Z3edit/Z3addPro.tsx

@@ -0,0 +1,221 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Cascader, Input, InputNumber, Modal, Radio, Select } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { Z3_APIgetProInfo } from '@/store/action/Z3flowSet'
+import { UserTableListType } from '@/types'
+import { useDispatch, useSelector } from 'react-redux'
+import { Z5_APIgetList } from '@/store/action/Z5role'
+import { RootState } from '@/store'
+import { D4_APIgetTree } from '@/store/action/Z4organization'
+import { MessageFu } from '@/utils/message'
+const { SHOW_CHILD } = Cascader
+
+const baseFormData = {
+  id: -1,
+  name: '',
+  type: '',
+  sort: 999
+}
+
+type Props = {
+  sId: number
+  closeFu: () => void
+  succFu: () => void
+  userList: UserTableListType[]
+}
+
+function Z3addPro({ sId, closeFu, succFu, userList }: Props) {
+  const dispatch = useDispatch()
+  // 获取角色列表
+  const { list: roleList } = useSelector((state: RootState) => state.Z5role.tableInfo)
+
+  // 获取部门树列表
+  const { treeData } = useSelector((state: RootState) => state.Z4organization)
+
+  const [form, setForm] = useState(baseFormData)
+
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await Z3_APIgetProInfo(id)
+    if (res.code === 0) {
+      console.log(123, res)
+      // 待完善回显 多元数组
+    }
+  }, [])
+
+  useEffect(() => {
+    dispatch(Z5_APIgetList({ pageNum: 1, pageSize: 99999 }))
+
+    dispatch(D4_APIgetTree())
+
+    if (sId > 0) getInfoFu(sId)
+    else {
+      setForm({ ...baseFormData, type: 'user' })
+    }
+  }, [dispatch, getInfoFu, sId])
+
+  const formChange = useCallback(
+    (key: 'name' | 'type' | 'sort', val: any) => {
+      setForm({
+        ...form,
+        [key]: val
+      })
+    },
+    [form]
+  )
+
+  const [idsArr1, setIdsArr1] = useState<string[]>([])
+  const [idsArr2, setIdsArr2] = useState<string[]>([])
+  const [idsArr3, setIdsArr3] = useState<string[][]>([])
+
+  // 点击提交
+  const btnOk = useCallback(async () => {
+    if (!form.name) return MessageFu.warning('请输入节点名称')
+    if (!form.sort) return MessageFu.warning('请输入正整数排序值')
+
+    console.log('xxxxxxxx', idsArr3)
+
+    const id1 = (idsArr1 || []).join(',')
+
+    if (form.type === 'user' && !id1) return MessageFu.warning('请选择指定用户')
+
+    const id2 = (idsArr2 || []).join(',')
+
+    if (form.type === 'role' && !id2) return MessageFu.warning('请选择角色')
+
+    const id3 = (idsArr3 || [[]]).map(arr => arr.slice(-1)[0]).join(',')
+    // .flat().join(',')
+    // .map(arr => arr.slice(-1)[0]).join(',');
+    // 待完善 和后端沟通 需要把id的
+    // 还需要多一个字段存json数据回显
+
+    if (form.type === 'dept' && !id3) return MessageFu.warning('请选择部门')
+
+    const obj = {
+      ...form,
+      xxxxx: form.type === 'user' ? id1 : form.type === 'role' ? id2 : id3
+    }
+
+    console.log(123, obj)
+  }, [form, idsArr1, idsArr2, idsArr3])
+
+  return (
+    <Modal
+      wrapClassName={styles.Z3addPro}
+      destroyOnClose
+      open={true}
+      title={sId > 0 ? '编辑' : '新增'}
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='Z3aRow'>
+        <div className='Z3aRowll'>
+          <span> * </span> 节点名称:
+        </div>
+        <div className='Z3aRowrr'>
+          <Input
+            placeholder='请输入内容'
+            maxLength={10}
+            showCount
+            value={form.name}
+            onChange={e => formChange('name', e.target.value.trim())}
+          />
+        </div>
+      </div>
+
+      <div className='Z3aRow'>
+        <div className='Z3aRowll'>
+          <span> * </span> 办理人:
+        </div>
+        <div className='Z3aRowrr'>
+          <Radio.Group
+            value={form.type}
+            onChange={e => formChange('type', e.target.value)}
+            options={[
+              { value: 'user', label: '指定用户' },
+              { value: 'role', label: '按角色' },
+              { value: 'dept', label: '按部门主管' }
+            ]}
+          />
+        </div>
+      </div>
+
+      <div className='Z3aRow'>
+        <div className='Z3aRowll'></div>
+
+        <div className='Z3aRowrr' hidden={form.type !== 'user'}>
+          <Select
+            showSearch={false}
+            mode='multiple'
+            allowClear
+            style={{ width: '100%' }}
+            placeholder='请选择'
+            value={idsArr1}
+            onChange={value => setIdsArr1(value)}
+            options={userList}
+            fieldNames={{ value: 'id', label: 'realName' }}
+          />
+        </div>
+        <div className='Z3aRowrr' hidden={form.type !== 'role'}>
+          <Select
+            showSearch={false}
+            mode='multiple'
+            allowClear
+            style={{ width: '100%' }}
+            placeholder='请选择'
+            value={idsArr2}
+            onChange={value => setIdsArr2(value)}
+            options={roleList}
+            fieldNames={{ value: 'id', label: 'roleName' }}
+          />
+        </div>
+
+        <div className='Z3aRowrr' hidden={form.type !== 'dept'}>
+          <Cascader
+            placeholder='请选择'
+            style={{ width: '100%' }}
+            options={treeData}
+            value={idsArr3}
+            onChange={e => setIdsArr3(e as string[][])}
+            multiple
+            maxTagCount='responsive'
+            showCheckedStrategy={SHOW_CHILD}
+            fieldNames={{ value: 'id', label: 'name', children: 'children' }}
+          />
+        </div>
+      </div>
+
+      <div className='Z3aRow'>
+        <div className='Z3aRowll'>
+          <span> * </span> 排序值:
+        </div>
+        <div className='Z3aRowrr'>
+          <InputNumber
+            min={1}
+            max={999}
+            precision={0}
+            placeholder='请输入'
+            value={form.sort}
+            onChange={e => formChange('sort', e)}
+          />
+          <div className='fromRowTit'>
+            请输入1~999的数字。数字越小,排序越靠前。数字相同时,更新发布的内容排在前面
+          </div>
+        </div>
+      </div>
+
+      <div className='Z3aBtn'>
+        <Button type='primary' onClick={btnOk}>
+          提交
+        </Button>
+        &emsp;
+        <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+      </div>
+    </Modal>
+  )
+}
+
+const MemoZ3addPro = React.memo(Z3addPro)
+
+export default MemoZ3addPro

+ 114 - 0
src/pages/Z_system/Z3flowSet/Z3edit/index.module.scss

@@ -0,0 +1,114 @@
+.Z3edit {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 2;
+  background-color: #fff;
+  border-radius: 10px;
+  :global {
+    .Z3main {
+      width: 100%;
+      height: 100%;
+      overflow-y: auto;
+      padding: 24px;
+      .Z3RowBox {
+        display: flex;
+        flex-wrap: wrap;
+        font-size: 16px;
+        .Z3row {
+          width: 43.8%;
+          margin-bottom: 20px;
+          display: flex;
+          .Z3row1 {
+            width: 100px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d4f;
+            }
+          }
+          .Z3row1_2 {
+            position: relative;
+            top: 4px;
+          }
+          .Z3row2 {
+            width: calc(100% - 100px);
+          }
+        }
+        .Z3row2 {
+          flex-direction: column;
+          justify-content: space-around;
+          .Z3rowhh {
+            width: 100%;
+            display: flex;
+          }
+        }
+      }
+
+      // 审批
+      .Z3audBox {
+        margin-top: 20px;
+        padding-left: 20px;
+        width: 87.8%;
+        .Z3aTit {
+          font-size: 16px;
+          font-weight: 700;
+          margin-bottom: 15px;
+        }
+      }
+    }
+    .Z3btn {
+      position: absolute;
+      top: 50%;
+      right: 5%;
+      transform: translateY(-50%);
+      z-index: 10;
+    }
+  }
+}
+
+// 环节的新增/编辑弹窗
+.Z3addPro {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+
+    .ant-modal {
+      width: 800px !important;
+    }
+    .ant-modal-body {
+      border-top: 1px solid #ccc;
+      .Z3aRow {
+        margin-top: 20px;
+        display: flex;
+        align-items: center;
+        .Z3aRowll {
+          width: 90px;
+          text-align: right;
+          font-weight: 700;
+          & > span {
+            color: #ff4d4f;
+          }
+        }
+        .Z3aRowrr {
+          width: calc(100% - 90px);
+          position: relative;
+          .fromRowTit {
+            position: absolute;
+            left: 100px;
+            top: 5px;
+            color: #999;
+            font-size: 12px;
+          }
+        }
+      }
+      .Z3aBtn {
+        margin-top: 30px;
+        text-align: center;
+      }
+    }
+  }
+}

+ 190 - 0
src/pages/Z_system/Z3flowSet/Z3edit/index.tsx

@@ -0,0 +1,190 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Z3_APIgetInfo } from '@/store/action/Z3flowSet'
+import { Z3tableType } from '../data'
+import { Button, Radio, Select } from 'antd'
+import TextArea from 'antd/es/input/TextArea'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { useDispatch, useSelector } from 'react-redux'
+import { getUserListAPI } from '@/store/action/Z6user'
+import { RootState } from '@/store'
+import { MessageFu } from '@/utils/message'
+import MyTable from '@/components/MyTable'
+import Z3addPro from './Z3addPro'
+
+type Props = {
+  sId: number
+  closeFu: () => void
+  succFu: () => void
+}
+
+function Z3edit({ sId, closeFu, succFu }: Props) {
+  // 获取用户列表
+  const dispatch = useDispatch()
+
+  useEffect(() => {
+    dispatch(getUserListAPI({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const { list: userList } = useSelector((state: RootState) => state.Z6user.tableInfo)
+
+  const [info, setInfo] = useState({} as Z3tableType)
+
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await Z3_APIgetInfo(id)
+    if (res.code === 0) {
+      setInfo(res.data)
+    }
+
+    // 待完善
+    // const res2 = await Z3_APIgetProList(id)
+    // if (res2.code === 0) {
+    //   console.log(123, res2)
+    // }
+  }, [])
+
+  useEffect(() => {
+    getInfoFu(sId)
+  }, [getInfoFu, sId])
+
+  const formChange = useCallback(
+    (key: 'enabled' | 'remark' | 'isCopy' | 'copyUserIds', val: any) => {
+      setInfo({
+        ...info,
+        [key]: val
+      })
+    },
+    [info]
+  )
+
+  // 点击确定
+  const btnOk = useCallback(async () => {
+    let copyUserIds: any = info.copyUserIds
+    copyUserIds = copyUserIds ? copyUserIds.join(',') : ''
+
+    const obj = {
+      ...info,
+      copyUserIds
+    }
+
+    if (info.isCopy === 1) {
+      if (!copyUserIds) return MessageFu.warning('请选择抄送对象')
+    } else obj.copyUserIds = ''
+
+    console.log('pppp', obj)
+  }, [info])
+
+  // 环节的新增和编辑
+  const [proId, setProId] = useState(0)
+
+  return (
+    <div className={styles.Z3edit}>
+      <div className='Z3main'>
+        <div className='Z3RowBox'>
+          <div className='Z3row'>
+            <div className='Z3row1'>流程类型:</div>
+            <div className='Z3row2'>{info.typeKey}</div>
+          </div>
+          <div className='Z3row'>
+            <div className='Z3row1'>流程名称:</div>
+            <div className='Z3row2'>{info.name}</div>
+          </div>
+
+          <div className='Z3row Z3row2'>
+            <div className='Z3rowhh'>
+              <div className='Z3row1'>
+                <span> * </span> 流程状态:
+              </div>
+              <div className='Z3row2'>
+                <Radio checked={info.enabled === 1} onClick={() => formChange('enabled', 1)}>
+                  启用
+                </Radio>
+                &emsp;
+                <Radio checked={info.enabled === 0} onClick={() => formChange('enabled', 0)}>
+                  禁用
+                </Radio>
+              </div>
+            </div>
+
+            <div className='Z3rowhh'>
+              <div className='Z3row1'>
+                <span> * </span> 抄送规则:
+              </div>
+              <div className='Z3row2'>
+                <Radio checked={info.isCopy === 0} onClick={() => formChange('isCopy', 0)}>
+                  无需抄送
+                </Radio>
+                &emsp;
+                <Radio checked={info.isCopy === 1} onClick={() => formChange('isCopy', 1)}>
+                  完成时抄送
+                </Radio>
+              </div>
+            </div>
+          </div>
+
+          <div className='Z3row'>
+            <div className='Z3row1'>流程说明:</div>
+            <div className='Z3row2'>
+              <TextArea
+                maxLength={500}
+                showCount
+                placeholder='请输入内容'
+                value={info.remark}
+                onChange={e => formChange('remark', e.target.value)}
+              />
+            </div>
+          </div>
+
+          <div className='Z3row' hidden={info.isCopy === 0}>
+            <div className='Z3row1 Z3row1_2'>
+              <span> * </span> 抄送对象:
+            </div>
+            <div className='Z3row2'>
+              <Select
+                showSearch={false}
+                mode='multiple'
+                allowClear
+                style={{ width: '100%' }}
+                placeholder='请选择'
+                value={info.copyUserIds ? info.copyUserIds.split(',') : []}
+                onChange={value => formChange('copyUserIds', value)}
+                options={userList}
+                fieldNames={{ value: 'id', label: 'realName' }}
+              />
+            </div>
+          </div>
+        </div>
+
+        {/* 审批环节 */}
+        <div className='Z3audBox'>
+          <div className='Z3aTit'>
+            审批环节:&emsp;
+            <Button type='primary' onClick={() => setProId(-1)}>
+              新增
+            </Button>
+          </div>
+
+          {/* 表格 */}
+          <MyTable list={[]} columnsTemp={[]} lastBtn={[]} pagingInfo={false} />
+        </div>
+      </div>
+
+      {/* 右侧按钮 */}
+      <div className='Z3btn'>
+        <Button type='primary' onClick={btnOk}>
+          保存
+        </Button>
+        <br />
+        <br />
+        <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+      </div>
+      {proId ? (
+        <Z3addPro sId={proId} closeFu={() => setProId(0)} succFu={() => {}} userList={userList} />
+      ) : null}
+    </div>
+  )
+}
+
+const MemoZ3edit = React.memo(Z3edit)
+
+export default MemoZ3edit

+ 23 - 0
src/pages/Z_system/Z3flowSet/data.ts

@@ -0,0 +1,23 @@
+// export type Z3formTypeType = '' | '入藏管理' | ' 藏品管理' | ' 库存管理' | ' 藏品保管' | ' 展览管理'
+
+export type Z3formType = {
+  enabled: null | 0 | 1
+  name: string
+  type: string | null
+}
+
+export type Z3tableType = {
+  copyUserIds: string
+  createTime: string
+  creatorId?: any
+  creatorName: string
+  enabled: number
+  id: number
+  isCopy: number
+  name: string
+  process?: any
+  remark: string
+  type: string
+  typeKey: string
+  updateTime: string
+}

+ 13 - 0
src/pages/Z_system/Z3flowSet/index.module.scss

@@ -1,4 +1,17 @@
 .Z3flowSet {
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px;
+  position: relative;
   :global {
+    .Z3top {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 15px;
+      .ant-select-selection-placeholder {
+        color: black;
+      }
+    }
   }
 }

+ 135 - 3
src/pages/Z_system/Z3flowSet/index.tsx

@@ -1,10 +1,142 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { Z3formType, Z3tableType } from './data'
+import { useDispatch, useSelector } from 'react-redux'
+import { Z3_APIgetList } from '@/store/action/Z3flowSet'
+import { RootState } from '@/store'
+import { Button, Input, Select } from 'antd'
+import { selectObj } from '@/utils/select'
+import MyTable from '@/components/MyTable'
+import { Z3tableC } from '@/utils/tableData'
+import Z3edit from './Z3edit'
+
+const Z3baseFormData: Z3formType = {
+  enabled: null,
+  name: '',
+  type: null
+}
+
 function Z3flowSet() {
+  const dispatch = useDispatch()
+
+  const [formData, setFormData] = useState(Z3baseFormData)
+  const formDataRef = useRef(Z3baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    dispatch(Z3_APIgetList(formDataRef.current))
+  }, [dispatch])
+
+  // 从仓库中获取数据
+  const { tableList } = useSelector((state: RootState) => state.Z3flowSet)
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: 'name') => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData(Z3baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: Z3tableType) => {
+          return (
+            <Button size='small' type='text' onClick={() => setEditId(item.id)}>
+              编辑
+            </Button>
+          )
+        }
+      }
+    ]
+  }, [])
+
+  // 点击编辑
+  const [editId, setEditId] = useState(0)
+
   return (
     <div className={styles.Z3flowSet}>
-      <div className='pageTitle'>流程设置</div>
-      <p>待开发</p>
+      <div className='pageTitle'>流程设置{editId ? '-编辑' : ''}</div>
+      <div className='Z3top'>
+        <div className='Z3topll'>
+          流程设置:
+          <Select
+            allowClear={true}
+            placeholder='全部'
+            style={{ width: 200 }}
+            value={formData.type}
+            onChange={e => setFormData({ ...formData, type: e })}
+            options={selectObj['流程类型']}
+          />
+          &emsp; 流程名称:
+          <Input
+            placeholder='请输入流程名称'
+            style={{ width: 200 }}
+            maxLength={30}
+            value={formData.name}
+            onChange={e => txtChangeFu(e.target.value, 'name')}
+          />
+          &emsp;启用状态:
+          <Select
+            allowClear={true}
+            placeholder='全部'
+            style={{ width: 200 }}
+            value={formData.enabled}
+            onChange={e => setFormData({ ...formData, enabled: e })}
+            options={selectObj['启用状态']}
+          />
+        </div>
+        <div className='Z3toprr'>
+          <Button type='primary' onClick={clickSearch}>
+            查询
+          </Button>
+          &emsp;<Button onClick={resetSelectFu}>重置</Button>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        yHeight={680}
+        list={tableList}
+        columnsTemp={Z3tableC}
+        lastBtn={tableLastBtn}
+        pagingInfo={false}
+        widthSet={{ remark: 700 }}
+      />
+
+      {editId ? <Z3edit sId={editId} closeFu={() => setEditId(0)} succFu={getListFu} /> : null}
     </div>
   )
 }

+ 0 - 0
src/pages/Z_system/Z3flowSet/type.d.ts


+ 3 - 2
src/pages/Z_system/Z4organization/Z4add.tsx

@@ -36,6 +36,7 @@ function Z4add({ addInfo, addFu, closeFu }: Props) {
     setAcCardInfo(addInfo.acInfo)
 
     let ids: string[] | null = addInfo.acInfo.id ? [addInfo.acInfo.id] : null
+
     if (addInfo.acInfo.ancestor) ids = [...addInfo.acInfo.ancestor.split(','), addInfo.acInfo.id]
 
     let idsRes = ids
@@ -103,11 +104,11 @@ function Z4add({ addInfo, addFu, closeFu }: Props) {
         if (!parentId && !ancestor) {
           ancestor = '0'
           parentId = '0'
-        } else ancestor = ancestor + '0,'
+        } else ancestor = '0,' + ancestor
       } else {
         // 编辑
         if (!ancestor) ancestor = '0'
-        else ancestor = ancestor + '0,'
+        else ancestor = '0,' + ancestor
       }
 
       const obj = {

+ 5 - 1
src/pages/Z_system/Z4organization/index.tsx

@@ -175,13 +175,17 @@ function Z4organization() {
 
                   <div className='Z4mr2Row'>
                     <div className='Z4mr2Row1'>部门说明:</div>
-                    <div className='Z4mr2Row2'>{rightData.description}</div>
+                    <div className='Z4mr2Row2'>{rightData.description || '(空)'}</div>
                   </div>
 
                   <div className='Z4mr2Row'>
                     <div className='Z4mr2Row1'>层级:</div>
                     <div>{rightData.level}</div>
                   </div>
+                  {/* <div className='Z4mr2Row'>
+                    <div className='Z4mr2Row1'>id:</div>
+                    <div>{rightData.id}</div>
+                  </div> */}
 
                   <div className='Z4mr2Row'>
                     <div className='Z4mr2Row1'>排序值:</div>

+ 7 - 0
src/store/action/D1storage.ts

@@ -13,3 +13,10 @@ export const D1_APIgetTree = () => {
 export const D1_APIgetSiteList = (id: number) => {
   return http.get(`cms/site/page/${id}`)
 }
+
+/**
+ * 分库管理 - 按藏品查看-列表
+ */
+export const D1_APIgetGoodsList = (data: any) => {
+  return http.post('cms/site/goods/page', data)
+}

+ 39 - 0
src/store/action/D4impStor.ts

@@ -0,0 +1,39 @@
+import http from '@/utils/http'
+import { AppDispatch } from '..'
+/**
+ * 入库 - 获取分页列表
+ */
+export const D4_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/orderIn/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'D4/getList', payload: obj })
+    }
+  }
+}
+
+/**
+ * 入库-删除
+ */
+export const D4_APIdel = (id: number) => {
+  return http.get(`cms/orderIn/remove/${id}`)
+}
+
+/**
+ * 入库-创建订单
+ */
+export const D4_APIcreate = () => {
+  return http.get('cms/orderIn/create')
+}
+
+/**
+ * 入库-获取详情
+ */
+export const D4_APIgetInfo = (id: number) => {
+  return http.get(`cms/orderIn/detail/${id}`)
+}

+ 34 - 0
src/store/action/Z3flowSet.ts

@@ -0,0 +1,34 @@
+import http from '@/utils/http'
+import { AppDispatch } from '..'
+/**
+ * 流程设置 - 获取分页列表
+ */
+export const Z3_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/flow/getList', data)
+    if (res.code === 0) {
+      dispatch({ type: 'Z3/getList', payload: res.data })
+    }
+  }
+}
+
+/**
+ * 流程设置-获取详情
+ */
+export const Z3_APIgetInfo = (id: number) => {
+  return http.get(`cms/flow/detail/${id}`)
+}
+
+/**
+ * 流程设置- 环节 - 列表
+ */
+export const Z3_APIgetProList = (id: number) => {
+  return http.get(`cms/flow/process/getList/${id}`)
+}
+
+/**
+ * 流程设置- 环节-获取详情
+ */
+export const Z3_APIgetProInfo = (id: number) => {
+  return http.get(`cms/flow/process/${id}`)
+}

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

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

+ 25 - 0
src/store/reducer/Z3flowSet.ts

@@ -0,0 +1,25 @@
+import { Z3tableType } from '@/pages/Z_system/Z3flowSet/data'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableList: [] as Z3tableType[]
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'Z3/getList'
+  payload: Z3tableType[]
+}
+
+// reducer
+export default function userReducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'Z3/getList':
+      return { ...state, tableList: action.payload }
+
+    default:
+      return state
+  }
+}

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

@@ -5,8 +5,10 @@ import { combineReducers } from 'redux'
 import A0Layout from './layout'
 import FourAll from './FourAll'
 import D2storSet from './D2storSet'
+import D4impStor from './D4impStor'
 import Z1dict from './Z1dict'
 import Z2numRule from './Z2numRule'
+import Z3flowSet from './Z3flowSet'
 import Z4organization from './Z4organization'
 import Z5role from './Z5role'
 import Z6user from './Z6user'
@@ -17,8 +19,10 @@ const rootReducer = combineReducers({
   A0Layout,
   FourAll,
   D2storSet,
+  D4impStor,
   Z1dict,
   Z2numRule,
+  Z3flowSet,
   Z4organization,
   Z5role,
   Z6user,

+ 12 - 12
src/utils/history.ts

@@ -242,17 +242,17 @@ export const btnFlagFu2 = (item: FourTableType) => {
   }
   if (Reflect.get(obj, status)) Reflect.get(obj, status)()
 
-  return flagObj
+  // return flagObj
   // 待完善
-  // return {
-  //   创建: true,
-  //   提交: true,
-  //   撤回: true,
-  //   审批: true,
-  //   编辑: true,
-  //   重新提交: true,
-  //   导出: true,
-  //   删除: true,
-  //   盘点: true
-  // }
+  return {
+    创建: true,
+    提交: true,
+    撤回: true,
+    审批: true,
+    编辑: true,
+    重新提交: true,
+    导出: true,
+    删除: true,
+    盘点: true
+  }
 }

+ 20 - 10
src/utils/select.ts

@@ -7,11 +7,10 @@ export const selectObj = {
     { value: 4, label: '已完成' },
     { value: 5, label: '待盘点' }
   ],
-  // 待完善
   角色: [
-    { value: '我发起的', label: '我发起的' },
-    { value: '我审批的', label: '我审批的' },
-    { value: '抄送我的', label: '抄送我的' }
+    { value: 1, label: '我发起的' },
+    { value: 2, label: '我审批的' },
+    { value: 3, label: '抄送我的' }
   ],
   藏品编号类型: [
     { value: '藏品总登记号', label: '藏品总登记号' },
@@ -39,11 +38,22 @@ export const selectObj = {
     { value: '未定级', label: '未定级' }
   ],
   附件类型: [
-    { name: '图像', key: 'img' },
-    { name: '3D', key: 'model' },
-    { name: '音频', key: 'audio' },
-    { name: '视频', key: 'video' },
-    { name: '文档', key: 'doc' },
-    { name: '其他', key: 'other' }
+    { value: 'img', label: '图像' },
+    { value: 'model', label: '3D' },
+    { value: 'audio', label: '音频' },
+    { value: 'video', label: '视频' },
+    { value: 'doc', label: '文档' },
+    { value: 'other', label: '其他' }
+  ],
+  流程类型: [
+    { value: '入藏管理', label: '入藏管理' },
+    { value: '藏品管理', label: '藏品管理' },
+    { value: '库存管理', label: '库存管理' },
+    { value: '藏品保管', label: '藏品保管' },
+    { value: '展览管理', label: '展览管理' }
+  ],
+  启用状态: [
+    { value: 1, label: '启用' },
+    { value: 0, label: '禁用' }
   ]
 }

+ 7 - 0
src/utils/tableData.ts

@@ -215,6 +215,13 @@ export const Z2tableC = [
   ['txt', '起始流水编号', 'length']
 ]
 
+export const Z3tableC = [
+  ['txt', '流程类型', 'typeKey'],
+  ['txt', '流程名称', 'name'],
+  ['text', '流程说明', 'remark', 50],
+  ['txtChange', '状态', 'enabled', { 0: '禁用', 1: '启用' }]
+]
+
 export const Z5tableC = [
   ['txt', '角色名称', 'roleName'],
   ['text', '角色说明', 'roleDesc', 50],