chenlei il y a 4 jours
Parent
commit
94344bbce7

+ 9 - 1
src/components/MyTable/form.tsx

@@ -239,7 +239,7 @@ const MyTable = forwardRef<MyTableMethods, MyTableProps>(
           custom: (item: any) => {
             return (
               <Form.Item noStyle name={`${item.id}-${v[2]}`} initialValue={item[v[2]]}>
-                {v[3].render(readOnly)}
+                {v[3].render(readOnly, item)}
               </Form.Item>
             )
           },
@@ -250,6 +250,14 @@ const MyTable = forwardRef<MyTableMethods, MyTableProps>(
             const endLen = v[3]?.endLen || 4
 
             return getDesensitizeTxt(txt, frontLen, endLen)
+          },
+          select: (item: any) => {
+            let txt = isNull
+            const data = v[3]
+            const id = item[v[2]]
+            const obj = data.find((v: any) => v.value === id)
+            if (obj) txt = obj.label
+            return txt
           }
         }
 

+ 2 - 2
src/pages/Fstorehouse/F1inStorage/F1edit/index.tsx

@@ -75,7 +75,7 @@ function F1editContent() {
   useEffect(() => {
     if (!info?.storageId || !allWarehouseList.length) return
     const opt = warehouseOptions.find((o: any) => o.value === info.storageId)
-    if (opt && selectStorage?.value !== info.storageId) {
+    if (opt) {
       setSelectStorage(opt)
       F1_APIgetShelfList({ storageId: info.storageId }).then(res => {
         setShelfList(
@@ -86,7 +86,7 @@ function F1editContent() {
         )
       })
     }
-  }, [info?.storageId, allWarehouseList.length, warehouseOptions, selectStorage?.value])
+  }, [info?.storageId, allWarehouseList.length, warehouseOptions])
 
   const verifyBackFu = (info: any) => {
     if (!selectStorage) return { flag: true, txt: '请选择入库库房' }

+ 10 - 6
src/pages/Fstorehouse/F3outStorage/F3edit/index.tsx

@@ -15,7 +15,7 @@ import { F1_APIgetStorageList } from '@/store/action/Fstorehouse/F1inStorage'
 const rowArr = rowArrTemp('出库')
 
 function F3editContent() {
-  const { info } = useInfo() as { info: any }
+  const { info, setSnapsFu } = useInfo() as { info: any; setSnapsFu: (snaps: any[]) => void }
   const { key } = useParams<any>()
   const canEdit = useMemo(() => ['1', '2'].includes(key), [key])
   const sonGoodsListRef = useRef<any>(null)
@@ -29,9 +29,13 @@ function F3editContent() {
     }))
   }, [allWarehouseList])
 
-  const handleStorageChange = useCallback(async (value: string, option: any) => {
-    setSelectStorage(option)
-  }, [])
+  const handleStorageChange = useCallback(
+    async (value: string, option: any) => {
+      setSelectStorage(option)
+      setSnapsFu([])
+    },
+    [setSnapsFu]
+  )
 
   const getStorageList = useCallback(async () => {
     const res = await F1_APIgetStorageList()
@@ -45,10 +49,10 @@ function F3editContent() {
   useEffect(() => {
     if (!info?.storageId || !allWarehouseList.length) return
     const opt = warehouseOptions.find((o: any) => o.value === info.storageId)
-    if (opt && selectStorage?.value !== info.storageId) {
+    if (opt) {
       setSelectStorage(opt)
     }
-  }, [info?.storageId, allWarehouseList.length, warehouseOptions, selectStorage?.value])
+  }, [info?.storageId, allWarehouseList.length, warehouseOptions])
 
   const getExtraData = (info: any, snaps: any[]) => {
     return {

+ 5 - 0
src/pages/Fstorehouse/F4check/F4edit/components/index.module.scss

@@ -0,0 +1,5 @@
+.newPcsInconsistent {
+  :global(.ant-input-number-input) {
+    color: #ff4d4f !important;
+  }
+}

+ 112 - 0
src/pages/Fstorehouse/F4check/F4edit/components/index.tsx

@@ -0,0 +1,112 @@
+import { Modal, Input, Button, InputNumber } from 'antd'
+import { useState, useEffect } from 'react'
+import classNames from 'classnames'
+import styles from './index.module.scss'
+
+export function NewPcsCell({
+  value,
+  onChange,
+  item,
+  readOnly
+}: {
+  value?: number
+  onChange?: (v: number | null) => void
+  item: any
+  readOnly: boolean
+}) {
+  const beforePcs = item?.pcs ?? ''
+  const afterPcs = value ?? item?.newPcs ?? ''
+  const isInconsistent = String(afterPcs) !== String(beforePcs)
+  return (
+    <InputNumber
+      min={0}
+      placeholder='非负整数'
+      className={classNames(isInconsistent && styles.newPcsInconsistent)}
+      style={{ width: '100%' }}
+      value={value}
+      onChange={onChange}
+      disabled={readOnly}
+    />
+  )
+}
+
+export function PdRemarkCell({
+  value,
+  onChange,
+  item,
+  readOnly,
+  onOpen
+}: {
+  value?: string
+  onChange?: (v: string) => void
+  item: any
+  readOnly: boolean
+  onOpen: (val: string, onChange: (v: string) => void) => void
+}) {
+  const val = value ?? item?.pdRemark ?? ''
+  const displayTxt = readOnly ? '查看' : '填写'
+  return (
+    <div>
+      <input type='hidden' value={val} onChange={e => onChange?.(e.target.value)} />
+
+      {!val && readOnly ? (
+        '(空)'
+      ) : (
+        <Button type='text' size='small' onClick={() => item && onOpen(val, v => onChange?.(v))}>
+          {displayTxt}
+        </Button>
+      )}
+    </div>
+  )
+}
+
+export function PdRemarkModal({
+  open,
+  value,
+  readOnly,
+  onOk,
+  onCancel
+}: {
+  open: boolean
+  value: string
+  readOnly: boolean
+  onOk: (val: string) => void
+  onCancel: () => void
+}) {
+  const [inputVal, setInputVal] = useState('')
+  useEffect(() => {
+    if (open) setInputVal(value)
+  }, [open, value])
+  return (
+    <Modal
+      title='盘点备注'
+      open={open}
+      onOk={() => onOk(inputVal)}
+      onCancel={onCancel}
+      destroyOnClose
+      footer={
+        readOnly
+          ? null
+          : [
+              <Button key='cancel' onClick={onCancel}>
+                取消
+              </Button>,
+              <Button key='ok' type='primary' onClick={() => onOk(inputVal)}>
+                确定
+              </Button>
+            ]
+      }
+    >
+      <Input.TextArea
+        value={inputVal}
+        disabled={readOnly}
+        onChange={e => setInputVal(e.target.value)}
+        placeholder='请填写内容'
+        maxLength={500}
+        rows={4}
+        showCount
+        style={{ marginBottom: 20 }}
+      />
+    </Modal>
+  )
+}

+ 16 - 0
src/pages/Fstorehouse/F4check/F4edit/index.module.scss

@@ -0,0 +1,16 @@
+.F4edit {
+  :global {
+    .F4editStorage {
+      width: 100%;
+      border-top: 1px solid #ccc;
+      padding: 15px;
+      display: flex;
+      align-items: center;
+      gap: 15px;
+    }
+    .F4editStorageTitle {
+      font-weight: 700;
+      font-size: 18px;
+    }
+  }
+}

+ 302 - 0
src/pages/Fstorehouse/F4check/F4edit/index.tsx

@@ -0,0 +1,302 @@
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { useHistory, useParams } from 'react-router-dom'
+import styles from './index.module.scss'
+import EditTop from '@/pages/Zother/EditTop'
+import EditBtn from '@/pages/Zother/EditBtn'
+import { InfoProvider, useInfo } from '@/pages/Zother/InfoContext'
+import { rowArrTemp } from '@/pages/Zother/data'
+import SonGoodsList from '@/pages/Zother/SonGoodsList'
+import { F1_APIgetStorageList, F1API_obj } from '@/store/action/Fstorehouse/F1inStorage'
+import { Button, Dropdown, MenuProps, Select } from 'antd'
+import { selectObj } from '@/utils/dataChange'
+import FileArchive from '@/pages/Zother/FileArchive'
+import { F4_APIgetClueList, F4API_obj } from '@/store/action/Fstorehouse/F4check'
+import { NewPcsCell, PdRemarkCell, PdRemarkModal } from './components'
+import MyTable from '@/components/MyTable'
+import { GoodsType } from '@/pages/Zother/SonGoodsList/data'
+import { openLink } from '@/utils/history'
+
+const rowArr = rowArrTemp('入库')
+const registerMenu: MenuProps['items'] = [
+  {
+    key: 'accident',
+    label: '事故登记'
+  },
+  {
+    key: 'actuality',
+    label: '现状登记'
+  },
+  {
+    key: 'repair',
+    label: '修复登记'
+  }
+]
+
+function F1editContent() {
+  const history = useHistory()
+  const { info, setSnapsFu } = useInfo() as { info: any; setSnapsFu: (snaps: any[]) => void }
+  const { key } = useParams<any>()
+  const canEdit = useMemo(() => ['1', '2'].includes(key), [key])
+  const isLook = useMemo(() => ['4'].includes(key), [key])
+  const sonGoodsListRef = useRef<any>(null)
+  const [selectStorage, setSelectStorage] = useState<any>(null)
+  const [allWarehouseList, setAllWarehouseList] = useState<any[]>([])
+  const warehouseOptions = useMemo(() => {
+    return allWarehouseList.map((i: any) => ({
+      label: i.name,
+      value: i.id,
+      managerUser: i.managerUser
+    }))
+  }, [allWarehouseList])
+  const [remarkModal, setRemarkModal] = useState<{
+    open: boolean
+    item: any
+    value: string
+    onChange: (v: string) => void
+  } | null>(null)
+
+  const handleStorageChange = useCallback(
+    async (value: string, option: any) => {
+      setSelectStorage(option)
+      setSnapsFu([])
+    },
+    [setSnapsFu]
+  )
+
+  const getStorageList = useCallback(async () => {
+    const res = await F1_APIgetStorageList()
+    setAllWarehouseList(res.data.records)
+  }, [])
+
+  useEffect(() => {
+    getStorageList()
+  }, [getStorageList])
+
+  useEffect(() => {
+    if (!info?.storageId || !allWarehouseList.length) return
+    const opt = warehouseOptions.find((o: any) => o.value === info.storageId)
+    if (opt) {
+      setSelectStorage(opt)
+    }
+  }, [info?.storageId, allWarehouseList.length, warehouseOptions])
+
+  const verifyBackFu = (info: any) => {
+    if (!selectStorage) return { flag: true, txt: '请选择入库库房' }
+    const form = sonGoodsListRef.current?.tableRef?.current?.form
+    if (!form) return { flag: true, txt: '请添加藏品' }
+    const values = form.getFieldsValue()
+    const snaps = sonGoodsListRef.current?.snaps ?? []
+    const hasEmptyStorage = snaps.some(
+      (snap: any) => typeof values[`${snap.id}-newPcs`] !== 'number'
+    )
+    if (hasEmptyStorage) return { flag: true, txt: '请填写盘点后数量' }
+    return { flag: false, txt: '' }
+  }
+
+  const getExtraData = (info: any, snaps: any[]) => {
+    const form = sonGoodsListRef.current?.tableRef?.current?.form
+    const values = form?.getFieldsValue() ?? {}
+    const snapsArr = snaps.map((v: any) => {
+      const flag = v.pageType === 'clue' && !v.clueId
+      return {
+        goodId: v.isNew || flag ? null : v.id,
+        orderId: info.id,
+        storageInId: selectStorage?.value ?? null,
+        snap: JSON.stringify({
+          ...v,
+          id: v.isNew || flag ? null : v.id,
+          newPcs: values[`${v.id}-newPcs`] ?? v.newPcs,
+          pdRemark: values[`${v.id}-pdRemark`] ?? v.pdRemark
+        })
+      }
+    })
+    return {
+      storageId: selectStorage?.value ?? undefined,
+      snaps: snapsArr
+    }
+  }
+
+  const customTableLastBtn = useMemo(() => {
+    return isLook ? (
+      <Dropdown
+        menu={{
+          items: registerMenu,
+          style: { width: 100 },
+          onClick: ({ key }) => {
+            history.push(`/${key}_edit/1/null?pId=${info.id}`)
+          }
+        }}
+        placement='bottom'
+      >
+        <Button size='small' type='text'>
+          盘点登记
+        </Button>
+      </Dropdown>
+    ) : null
+  }, [history, info.id, isLook])
+
+  return (
+    <div className={styles.F4edit} id='editBox'>
+      <div className='editMain'>
+        {/* 顶部 */}
+        <EditTop
+          pageTxt='藏品盘点'
+          rowArr={rowArr}
+          APIobj={F1API_obj}
+          fileUpInfo={{ myUrl: 'cms/orderSite/check/upload', dirCode: 'check' }}
+        />
+
+        <div className='F4editStorage'>
+          <p className='F4editStorageTitle'>*盘点库房</p>
+          <Select
+            style={{ width: 200 }}
+            options={warehouseOptions}
+            placeholder='请选择'
+            value={selectStorage?.value}
+            onChange={handleStorageChange}
+            disabled={!canEdit}
+          />
+          {selectStorage?.managerUser && (
+            <p className='F4editStorageManager'>库房负责人:{selectStorage.managerUser}</p>
+          )}
+        </div>
+
+        {/* 藏品清单 */}
+        <SonGoodsList
+          ref={sonGoodsListRef}
+          label={canEdit ? '盘点计划' : '盘点结果'}
+          needEdit={true}
+          btnTxt='选择藏品'
+          addShow={false}
+          goodsSonTable={[
+            ['txt', '库房位置', 'siteLoc'],
+            ['txt', '藏品登记号', 'num'],
+            ['img', '封面', 'thumb'],
+            ['txtCTag', '藏品标签', 'tagDictId'],
+            ['txt', '藏品名称', 'name'],
+            ['select', '级别', 'level', selectObj['藏品级别']],
+            ['txtC', '类别', 'typeDictId'],
+            ['txtC', '年代', 'ageDictId'],
+            ['txtC', '质地', 'textureDictId'],
+            ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
+            ['ping', '盘点前数量', 'pcs', 'pcsUnitDictId'],
+            [
+              'custom',
+              '*盘点后数量',
+              'newPcs',
+              {
+                render(readOnly?: boolean, item?: any) {
+                  return <NewPcsCell item={item} readOnly={!!readOnly} />
+                }
+              }
+            ],
+            [
+              'custom',
+              '盘点备注',
+              'pdRemark',
+              {
+                render(readOnly?: boolean, item?: any) {
+                  return (
+                    <PdRemarkCell
+                      item={item}
+                      readOnly={!!readOnly}
+                      onOpen={(val, onChange) => {
+                        setRemarkModal({
+                          open: true,
+                          item,
+                          value: val,
+                          onChange
+                        })
+                      }}
+                    />
+                  )
+                }
+              }
+            ]
+          ]}
+          fileUpInfo={{ myUrl: 'cms/orderSite/check/upload', dirCode: 'checkGoods' }}
+          selectApi={F4_APIgetClueList}
+          isClueSelect={false}
+          clueShowBtnDisabled={!selectStorage?.value}
+          selectGoodsParams={{
+            storageId: selectStorage?.value
+          }}
+          tableLastWidth={150}
+          customTableLastBtn={customTableLastBtn}
+        />
+
+        <div
+          className='F4editStorage'
+          style={{ flexDirection: 'column', alignItems: 'flex-start' }}
+        >
+          <p className='F4editStorageTitle'>盘点登记</p>
+          <MyTable
+            classKey='SonGoodsList'
+            list={[]}
+            columnsTemp={[
+              ['txt', '业务类型', 'num'],
+              ['txt', '申请编号', 'num'],
+              ['txt', '发起部门', 'deptName'],
+              ['txt', '发起人', 'creatorName'],
+              ['txt', '发起日期', 'date'],
+              ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
+            ]}
+            lastBtn={[
+              {
+                title: '操作',
+                render: (item: GoodsType) => {
+                  return (
+                    <Button
+                      size='small'
+                      type='text'
+                      onClick={() => openLink(`/goodsLook/${item.id}`)}
+                    >
+                      查看
+                    </Button>
+                  )
+                }
+              }
+            ]}
+            pagingInfo={false}
+          />
+        </div>
+
+        {/* 附件归档 */}
+        <FileArchive />
+
+        {/* 盘点备注弹窗 */}
+        <PdRemarkModal
+          readOnly={!canEdit}
+          open={!!remarkModal}
+          value={remarkModal?.value ?? ''}
+          onOk={val => {
+            remarkModal?.onChange(val)
+            setRemarkModal(null)
+          }}
+          onCancel={() => setRemarkModal(null)}
+        />
+
+        {/* 底部按钮 */}
+        <EditBtn
+          path='/check'
+          APIobj={F4API_obj}
+          checkListTxt='请添加藏品'
+          verifyBackFu={verifyBackFu}
+          getExtraData={getExtraData}
+        />
+      </div>
+    </div>
+  )
+}
+
+function F1edit() {
+  return (
+    <InfoProvider>
+      <F1editContent />
+    </InfoProvider>
+  )
+}
+
+const MemoF1edit = React.memo(F1edit)
+
+export default MemoF1edit

+ 118 - 1
src/pages/Fstorehouse/F4check/index.tsx

@@ -1,9 +1,126 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { RootState } from '@/store'
+import { F1_APIgetStorageList } from '@/store/action/Fstorehouse/F1inStorage'
+import { useSelector } from 'react-redux'
+import { useHistory } from 'react-router-dom'
+import TableList from '@/pages/Zother/TableList'
+import { tableListAuditBtnFu } from '@/utils/authority'
+import { selectObj } from '@/utils/dataChange'
+import { checkTableC } from '@/utils/tableData'
+import { Button } from 'antd'
+import { baseFormData } from '@/pages/Zother/data'
+import { F4_APIgetList } from '@/store/action/Fstorehouse/F4check'
+
+const F4baseFormData = baseFormData()
+
 function F4check() {
+  const tableListRef = useRef<any>(null)
+  const history = useHistory()
+  // 从仓库拿数据
+  const tableInfo = useSelector((state: RootState) => state.F4check.tableInfo)
+  const [allWarehouseList, setAllWarehouseList] = useState<any[]>([])
+  const warehouseOptions = useMemo(() => {
+    return allWarehouseList.map((i: any) => ({
+      label: i.name,
+      value: i.id
+    }))
+  }, [allWarehouseList])
+
+  const dataExport = () => {
+    console.log('数据导出了')
+  }
+
+  const getStorageList = async () => {
+    const res = await F1_APIgetStorageList()
+    setAllWarehouseList(res.data.records)
+  }
+
+  const tableBtnFu = useCallback(
+    (id: number | null, key: string) => {
+      history.push(`/check_edit/${key}/${id}`)
+    },
+    [history]
+  )
+
+  useEffect(() => {
+    getStorageList()
+  }, [])
+
   return (
     <div className={styles.F4check}>
       <div className='pageTitle'>藏品盘点</div>
+
+      <TableList
+        ref={tableListRef}
+        baseFormData={F4baseFormData}
+        getListAPI={F4_APIgetList}
+        pageKey='position'
+        tableInfo={tableInfo}
+        columnsTemp={checkTableC}
+        rightBtnWidth={340}
+        yHeight={585}
+        searchDom={[
+          {
+            type: 'time',
+            key: ['startTime', 'endTime'],
+            placeholder: `盘点日期`
+          },
+          {
+            type: 'select',
+            key: 'storageId',
+            placeholder: `相关库房`,
+            options: warehouseOptions
+          },
+          {
+            type: 'input',
+            key: 'searchKey',
+            placeholder: `请输入申请编号、发起人或藏品编号`
+          },
+          {
+            type: 'time',
+            key: ['businessStartTime', 'businessEndTime'],
+            placeholder: `发起日期`
+          },
+          {
+            type: 'select',
+            key: 'status',
+            placeholder: `申请状态`,
+            options: selectObj['藏品入库申请状态']
+          }
+        ]}
+        storyTableListToprr={({ clickSearch, resetSelectFu }) => (
+          <>
+            <Button type='primary' ghost onClick={() => tableBtnFu(null, '1')}>
+              发起申请
+            </Button>
+            <Button type='primary' onClick={dataExport}>
+              数据导出
+            </Button>
+            <Button type='primary' onClick={clickSearch}>
+              查询
+            </Button>
+            <Button onClick={resetSelectFu}>重置</Button>
+          </>
+        )}
+        storyTableLastBtn={[
+          {
+            title: '操作',
+            render: (item: any) => (
+              <>
+                <Button type='text' onClick={() => tableBtnFu(item.id, '4')}>
+                  查看
+                </Button>
+                {tableListAuditBtnFu(item) ? (
+                  <Button size='small' type='text' onClick={() => tableBtnFu(item.id, '3')}>
+                    审批
+                  </Button>
+                ) : null}
+              </>
+            )
+          }
+        ]}
+      />
     </div>
   )
 }

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

@@ -376,5 +376,11 @@ export const routerSon: RouterTypeRow[] = [
     name: '藏品出库-详情页',
     path: '/outStorage_edit/:key/:id',
     Com: React.lazy(() => import('../Fstorehouse/F3outStorage/F3edit'))
+  },
+  {
+    id: 1040,
+    name: '藏品盘点-详情页',
+    path: '/check_edit/:key/:id',
+    Com: React.lazy(() => import('../Fstorehouse/F4check/F4edit'))
   }
 ]

+ 12 - 3
src/pages/Zother/SonGoodsList/index.tsx

@@ -39,6 +39,9 @@ type Props = {
   // 选择列表按钮是否禁用
   clueShowBtnDisabled?: boolean
   selectGoodsParams?: any
+  label?: string
+  customTableLastBtn?: React.ReactNode
+  tableLastWidth?: number
 }
 
 function SonGoodsList(
@@ -53,7 +56,10 @@ function SonGoodsList(
     goodsSonTable,
     customRightBtn,
     clueShowBtnDisabled,
-    selectGoodsParams
+    selectGoodsParams,
+    label = '藏品清单',
+    customTableLastBtn,
+    tableLastWidth
   }: Props,
   ref: any
 ) {
@@ -73,6 +79,7 @@ function SonGoodsList(
     return [
       {
         title: '操作',
+        width: tableLastWidth,
         render: (item: GoodsType) => {
           return (
             <>
@@ -96,12 +103,13 @@ function SonGoodsList(
                   />
                 </>
               )}
+              {customTableLastBtn ? customTableLastBtn : null}
             </>
           )
         }
       }
     ]
-  }, [addShow, isLook, setSnapsFu, snaps])
+  }, [tableLastWidth, isLook, addShow, customTableLastBtn, setSnapsFu, snaps])
 
   // 从征集线索中添加
   const [clueShow, setClueShow] = useState(false)
@@ -114,7 +122,7 @@ function SonGoodsList(
   return (
     <div className={styles.SonGoodsList}>
       <div className='EdTit'>
-        <div>藏品清单</div>
+        <div>{label}</div>
         {isLook ? (
           <div></div>
         ) : (
@@ -141,6 +149,7 @@ function SonGoodsList(
             columnsTemp={goodsSonTable || goodsSonTableC()}
             lastBtn={tableLastBtn}
             pagingInfo={false}
+            readOnly={isLook}
           />
         ) : (
           <MyTable

+ 46 - 0
src/store/action/Fstorehouse/F4check.ts

@@ -0,0 +1,46 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+import { APIbase } from '../layout'
+
+/**
+ * 藏品盘点 - 分页列表
+ */
+export const F4_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/orderSite/check/page', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+
+      dispatch({ type: 'F4/getList', payload: obj })
+    }
+  }
+}
+
+export const F4API_obj = {
+  创建订单: () => APIbase('get', 'cms/orderSite/check/create'),
+  获取详情: (id: number) => APIbase('get', `cms/orderSite/check/detail/${id}`),
+  草稿: (data: any) => APIbase('post', `cms/orderSite/check/saveDraft`, data),
+  发起: (data: any) => APIbase('post', `cms/orderSite/check/saveApply`, data),
+  重新发起: (id: number) => APIbase('get', `cms/orderSite/check/reissue/${id}`),
+  审批: (data: any) => APIbase('post', `cms/orderSite/check/audit`, data),
+  撤回: (id: number) => APIbase('get', `cms/orderSite/check/revocation/${id}`),
+  删除: (id: number) => APIbase('get', `cms/orderSite/check/remove/${id}`)
+}
+
+/**
+ * 藏品总账列表-分页
+ */
+export const F4_APIgetClueList = (data: any) => {
+  return http.post('cms/orderSite/check/goodPage', data)
+}
+
+/**
+ * 盘点登记-列表
+ * type: SG-事故登记 XZ-现状登记 XF-修复登记
+ */
+export const F4_APIgetRelatedOrderList = (num: string, type: 'SG' | 'XZ' | 'XF') => {
+  return http.get(`cms/orderSite/check/relatedOrderByNum/${num}/${type}`)
+}

+ 28 - 0
src/store/reducer/Fstorehouse/F4check.ts

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

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

@@ -16,6 +16,7 @@ import E2story from './Eculture/E2story'
 import G1accident from './Gmaintain/G1accident'
 import F1inStorage from './Fstorehouse/F1inStorage'
 import F3outStorage from './Fstorehouse/F3outStorage'
+import F4check from './Fstorehouse/F4check'
 import I1storageSet from './Isystem/I1storageSet'
 import I2dict from './Isystem/I2dict'
 import I3numSet from './Isystem/I3numSet'
@@ -43,7 +44,7 @@ const rootReducer = combineReducers({
 
   F1inStorage,
   F3outStorage,
-
+  F4check,
   I1storageSet,
   I2dict,
   I3numSet,

+ 11 - 0
src/utils/tableData.ts

@@ -191,3 +191,14 @@ export const GI4tableC = [
   ['text', '备注', 'remark', 50],
   ['txt', '编辑人', 'creatorName']
 ]
+
+// 藏品盘点
+export const checkTableC = [
+  ['txt', '盘点日期', 'createTime'],
+  ['txt', '盘点库房', 'storageName'],
+  ['txt', '申请编号', 'num'],
+  ['txt', '发起部门', 'deptName'],
+  ['txt', '发起人', 'creatorName'],
+  ['txt', '发起日期', 'date'],
+  ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
+]