chenlei 1 개월 전
부모
커밋
97e50beabe
32개의 변경된 파일272개의 추가작업 그리고 97개의 파일을 삭제
  1. BIN
      public/templates/1.docx
  2. BIN
      public/templates/16.docx
  3. BIN
      public/templates/2.docx
  4. BIN
      public/templates/3.docx
  5. BIN
      public/templates/7.docx
  6. BIN
      public/templates/9.docx
  7. 1 1
      src/components/MyTable/index.tsx
  8. 9 2
      src/components/ZRichTexts/index.tsx
  9. 15 15
      src/pages/A3_ledger/A32Routing/index.tsx
  10. 21 14
      src/pages/A_workbench/A1dataSta/components/Tab1/index.tsx
  11. 20 1
      src/pages/C_goodsManage/C21wealth/C21edit/index.tsx
  12. 16 1
      src/pages/D_storeManage/D2storSet/D2edit.tsx
  13. 1 1
      src/pages/D_storeManage/D3staff/index.tsx
  14. 1 0
      src/pages/D_storeManage/D4impStor/index.tsx
  15. 3 2
      src/pages/D_storeManage/D6putsStor/D6edit/index.tsx
  16. 23 5
      src/pages/D_storeManage/D7check/D7edit/index.tsx
  17. 18 3
      src/pages/D_storeManage/D7check/components/StocktakingModal/index.tsx
  18. 5 5
      src/pages/D_storeManage/D7check/constants.tsx
  19. 2 2
      src/pages/D_storeManage/D7check/index.tsx
  20. 11 0
      src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx
  21. 8 4
      src/pages/F_exhibition/F1exhibition/F1edit/index.tsx
  22. 9 5
      src/pages/Layout/index.tsx
  23. 1 1
      src/pages/Login/index.tsx
  24. 6 0
      src/pages/Y_goodsDetails/Y2look/index.module.scss
  25. 34 20
      src/pages/Y_goodsDetails/Y2look/index.tsx
  26. 7 1
      src/pages/Z_system/Z5role/Z5edit.tsx
  27. 7 0
      src/store/action/C1ledger.ts
  28. 7 0
      src/store/action/C21wealth.ts
  29. 7 0
      src/store/action/D7check.ts
  30. 36 11
      src/utils/exportTemplates.ts
  31. 2 2
      src/utils/select.ts
  32. 2 1
      src/utils/tableData.ts

BIN
public/templates/1.docx


BIN
public/templates/16.docx


BIN
public/templates/2.docx


BIN
public/templates/3.docx


BIN
public/templates/7.docx


BIN
public/templates/9.docx


+ 1 - 1
src/components/MyTable/index.tsx

@@ -46,7 +46,7 @@ export interface MyTableMethods {
 }
 
 export const myTableTransferSize = (item: any) => {
-  let danWei = resJiLianFu(item.sizeUnit, ' ')
+  let danWei = isNaN(item.sizeUnit) ? item.sizeUnit : resJiLianFu(item.sizeUnit, ' ')
 
   let txt1 = item.sizeL ? `通长${item.sizeL}` : ''
   let txt2 = item.sizeW ? `通宽${item.sizeW}` : ''

+ 9 - 2
src/components/ZRichTexts/index.tsx

@@ -37,10 +37,11 @@ type Props = {
   myUrl: string //上传的api地址
   isOne?: boolean //只显示单个富文本
   upAudioBtnNone?: boolean //是否能上传无障碍音频
+  params?: Record<string, string | number> //一些上传的其它参数
 }
 
 function ZRichTexts(
-  { check, dirCode, isLook, myUrl, isOne = false, upAudioBtnNone = false }: Props,
+  { check, dirCode, isLook, myUrl, isOne = false, upAudioBtnNone = false, params }: Props,
   ref: any
 ) {
   const [sectionArr, setSectionArr] = useState<SectionArrType[]>([
@@ -115,6 +116,12 @@ function ZRichTexts(
         fd.append('dirCode', dirCode)
         fd.append('file', filesInfo)
 
+        if (params) {
+          Object.keys(params).forEach(key => {
+            fd.append(key, `${params[key]}`)
+          })
+        }
+
         e.target.value = ''
 
         try {
@@ -138,7 +145,7 @@ function ZRichTexts(
         }
       }
     },
-    [dirCode, myUrl, sectionArr]
+    [dirCode, myUrl, params, sectionArr]
   )
 
   // 让父组件调用的 回显 富文本

+ 15 - 15
src/pages/A3_ledger/A32Routing/index.tsx

@@ -19,7 +19,7 @@ import store from '@/store'
 import A32table from './A32table'
 import { selectObj } from '@/utils/select'
 import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
-import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportTemplates'
+// import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportTemplates'
 
 function A32Routing() {
   const dispatch = useDispatch()
@@ -233,20 +233,20 @@ function A32Routing() {
     [formData, txtChangeFu]
   )
 
-  const deriveFu2 = useCallback(async () => {
-    const obj = {
-      ...formDataOldRef.current,
-      pageNum: 1,
-      pageSize: 99999
-    }
-    obj[treeKey.current as 'name'] = treeAc!
+  // const deriveFu2 = useCallback(async () => {
+  //   const obj = {
+  //     ...formDataOldRef.current,
+  //     pageNum: 1,
+  //     pageSize: 99999
+  //   }
+  //   obj[treeKey.current as 'name'] = treeAc!
 
-    const res = await A32_APIgetList(obj, true)
+  //   const res = await A32_APIgetList(obj, true)
 
-    if (res.code === 0) {
-      exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_LEDGER, { collects: res.data.records })
-    }
-  }, [treeAc])
+  //   if (res.code === 0) {
+  //     exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_LEDGER, { collects: res.data.records })
+  //   }
+  // }, [treeAc])
 
   // 点击导出
   const deriveFu = useCallback(async () => {
@@ -353,10 +353,10 @@ function A32Routing() {
           <Button type='primary' onClick={deriveFu} disabled={!treeAc}>
             批量导出
           </Button>
-          &emsp;
+          {/* &emsp;
           <Button type='primary' onClick={deriveFu2} disabled={!treeAc}>
             导出藏品总账
-          </Button>
+          </Button> */}
           &emsp;
           <Button danger={advanced} onClick={() => advancedFu(!advanced)}>
             {advanced ? '收起' : ''}高级搜索

+ 21 - 14
src/pages/A_workbench/A1dataSta/components/Tab1/index.tsx

@@ -73,20 +73,27 @@ export const A1Tab1: FC = () => {
       }
     })
 
-    curRes &&
-      setCurYearData([
-        {
-          ...curRes,
-          id: 1
-        }
-      ])
-    prevRes &&
-      setPrevYearData([
-        {
-          ...prevRes,
-          id: 1
-        }
-      ])
+    setCurYearData(
+      curRes
+        ? [
+            {
+              ...curRes,
+              id: 1
+            }
+          ]
+        : []
+    )
+
+    setPrevYearData(
+      prevRes
+        ? [
+            {
+              ...prevRes,
+              id: 1
+            }
+          ]
+        : []
+    )
     setAddData([_addData])
   }, [curYear])
 

+ 20 - 1
src/pages/C_goodsManage/C21wealth/C21edit/index.tsx

@@ -22,6 +22,7 @@ import { EXbtnFu } from '@/utils/EXBtn'
 import {
   C21_APIcreate,
   C21_APIdel,
+  C21_APIDownloadBatchZip,
   C21_APIgetInfo,
   C21_APIsaveApply,
   C21_APIsaveAudit,
@@ -198,6 +199,15 @@ function C21edit() {
   // 打开侧边栏
   const [cathet, setCathet] = useState(0)
 
+  const downloadBatchZip = async (ids: (string | number)[]) => {
+    const { data } = await C21_APIDownloadBatchZip(ids)
+    const a = document.createElement('a')
+    const arr = data.split('/')
+    a.href = baseUrlTempOne + data
+    a.download = arr[arr.length - 1]
+    a.click()
+  }
+
   const startBtn = useMemo(() => {
     return [
       {
@@ -226,6 +236,9 @@ function C21edit() {
               <Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
                 查看
               </Button>
+              <Button size='small' type='text' onClick={() => downloadBatchZip([item.id])}>
+                下载资源
+              </Button>
               {['3', '4'].includes(key) ? null : (
                 <MyPopconfirm
                   txtK='删除'
@@ -401,7 +414,7 @@ function C21edit() {
             <div className='D4rowrr'>
               {topInfo.num && (
                 <Cascader
-                  defaultValue={topInfo.effect.split(',')}
+                  defaultValue={topInfo.effect ? topInfo.effect.split(',') : undefined}
                   disabled={['3', '4'].includes(key)}
                   options={cascaderObjFu()['附件用途']}
                   onChange={e => setTopInfo({ ...topInfo, effect: e ? e.join(',') : '' })}
@@ -447,6 +460,9 @@ function C21edit() {
             <div className='D4rowrr'>
               <ZRichTexts
                 check={false}
+                params={{
+                  moduleId: topInfo.id
+                }}
                 dirCode='wealth'
                 myUrl='cms/orderIn/upload'
                 isLook={['3', '4'].includes(key)}
@@ -463,6 +479,9 @@ function C21edit() {
           <div className='D4Tit2'>
             <div className='D4Tit2ll'>藏品清单</div>
             <div className='D4Tit2rr'>
+              <Button type='primary' onClick={() => downloadBatchZip(snaps.map(i => i.id))}>
+                下载所有资源
+              </Button>
               {['3', '4'].includes(key) ? null : (
                 <>
                   <Button

+ 16 - 1
src/pages/D_storeManage/D2storSet/D2edit.tsx

@@ -1,6 +1,6 @@
 import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
-import { Button, Form, FormInstance, Input, Modal, Radio, Select } from 'antd'
+import { Button, Form, FormInstance, Input, InputNumber, Modal, Radio, Select } from 'antd'
 import TextArea from 'antd/es/input/TextArea'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { useDispatch, useSelector } from 'react-redux'
@@ -181,6 +181,21 @@ function D2edit({ sId, succToLookFu, closeFu, isLook }: Props) {
             </Radio.Group>
           </Form.Item>
 
+          <Form.Item
+            label='排序值'
+            name='sort'
+            initialValue={999}
+            rules={[{ required: true, message: '请输入排序值' }]}
+          >
+            <InputNumber
+              readOnly={isLook}
+              min={0}
+              max={999}
+              style={{ width: '100%' }}
+              placeholder='请输入1-999的数字。数字越小,排序越靠前'
+            />
+          </Form.Item>
+
           {/* 确定和取消按钮 */}
           <br />
           <Form.Item wrapperCol={{ offset: 9, span: 16 }}>

+ 1 - 1
src/pages/D_storeManage/D3staff/index.tsx

@@ -223,7 +223,7 @@ function D3staff() {
           show: true,
           arr: [
             { key: 'num', txt: '业务编号' },
-            { key: 'name', txt: '入库时间' },
+            { key: 'date', txt: '入库时间' },
             { key: 'sonTypeName', txt: '入库人员' },
             { key: 'reason', txt: '入库事由' },
             { key: 'storageName', txt: '相关库房' },

+ 1 - 0
src/pages/D_storeManage/D4impStor/index.tsx

@@ -189,6 +189,7 @@ function D4impStor() {
           ],
           data: res.data.records.map((v: FourTableType) => ({
             ...v,
+            date: v.date.split(' ')[0],
             status: statusObj[v.status as 1]
           }))
         }

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

@@ -347,6 +347,7 @@ function D6edit() {
           <DatePicker
             placeholder={['3', '4'].includes(key) ? '(空)' : '请选择'}
             disabled={['3', '4'].includes(key)}
+            disabledDate={current => current && current > dayjs().endOf('day')}
             allowClear={true}
             value={item.date ? dayjs(item.date) : null}
             onChange={e =>
@@ -516,7 +517,7 @@ function D6edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [
+        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
           topInfo.sonTypeName === '1'
             ? EXPORT_WORD_ENUM.SUB_PUT_BACK
             : topInfo.sonTypeName === '2'
@@ -539,7 +540,7 @@ function D6edit() {
         <Button onClick={() => infoPageBackFu('/putsStor')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

+ 23 - 5
src/pages/D_storeManage/D7check/D7edit/index.tsx

@@ -14,6 +14,7 @@ import {
   D7_APIcreate,
   D7_APIdel,
   D7_APIgetInfo,
+  D7_APIrevocation,
   D7_APIsaveApply,
   D7_APIsaveAudit,
   D7_APIsaveCreate,
@@ -184,7 +185,7 @@ function D7edit() {
             goodsId: i.id,
             id: i.id2 ? i.id2 : null,
             orderId: topInfo.id,
-            statusCheck: tableValues[`${i.id}-statusCheck`],
+            tempStatus: tableValues[`${i.id}-statusCheck`],
             snap: JSON.stringify({
               ...i,
               cusForm: tableValues
@@ -218,7 +219,7 @@ function D7edit() {
 
   // 查看的按钮创建-提交-撤回
   const lookBtnFu = useCallback(
-    async (val: '创建' | '提交') => {
+    async (val: '创建' | '提交' | '撤回') => {
       const tableValues = tableRef.current?.form.getFieldsValue()
       const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
       // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
@@ -231,7 +232,7 @@ function D7edit() {
           goodsId: i.id,
           id: i.id2 ? i.id2 : null,
           orderId: topInfo.id,
-          statusCheck: tableValues[`${i.id}-statusCheck`],
+          tempStatus: tableValues[`${i.id}-statusCheck`],
           snap: JSON.stringify({
             ...i,
             cusForm: tableValues
@@ -240,7 +241,12 @@ function D7edit() {
         rtf: JSON.stringify(rtf1.val || '')
       }
 
-      const res = val === '创建' ? await D7_APIsaveCreate(obj) : await D7_APIsaveApply(obj)
+      const res =
+        val === '创建'
+          ? await D7_APIsaveCreate(obj)
+          : val === '提交'
+          ? await D7_APIsaveApply(obj)
+          : await D7_APIrevocation(id)
 
       if (res.code === 0) {
         if (sollrDom.current) sollrDom.current.scrollTop = 0
@@ -248,7 +254,7 @@ function D7edit() {
         getInfoFu()
       }
     },
-    [getInfoFu, topInfo, collectionList]
+    [topInfo, collectionList, id, getInfoFu]
   )
 
   // 查看模式点击删除
@@ -284,6 +290,18 @@ function D7edit() {
           </Button>
         ) : null}
 
+        {btnFlagFu2(topInfo)['撤回'] ? (
+          <MyPopconfirm
+            txtK='撤回'
+            onConfirm={() => lookBtnFu('撤回')}
+            Dom={
+              <Button type='primary' danger>
+                撤回
+              </Button>
+            }
+          />
+        ) : null}
+
         {btnFlagFu2(topInfo)['审批'] ? (
           <Button type='primary' onClick={() => lookJumpFu('审批')}>
             审批

+ 18 - 3
src/pages/D_storeManage/D7check/components/StocktakingModal/index.tsx

@@ -3,6 +3,9 @@ import { D7_APIGoodList } from '@/store/action/D7check'
 import { MessageFu } from '@/utils/message'
 import { InputNumber, Modal, Radio } from 'antd'
 import { FC, useCallback, useEffect, useState } from 'react'
+import { D7CEHCK_COLLECTION_RESULT_OPTIONS } from '../../constants'
+import { D7CHECK_COLLECTION_RESULT_ENUM } from '../../types'
+import { isNumber } from 'lodash'
 
 export interface StocktakingModalProps {
   visible: boolean
@@ -60,7 +63,7 @@ export const StocktakingModal: FC<StocktakingModalProps> = ({
 
     switch (curIndex) {
       case STOCKTAKING_TYPES.NUM:
-        if (!min || !max) {
+        if (!isNumber(min) || !isNumber(max)) {
           MessageFu.warning('请填写最小值和最大值')
           return
         }
@@ -73,7 +76,8 @@ export const StocktakingModal: FC<StocktakingModalProps> = ({
         stack = checkedList
         break
     }
-    onOk(stack)
+    // 过滤待盘点的藏品
+    onOk(stack.filter(i => i.statusStorage !== D7CHECK_COLLECTION_RESULT_ENUM.PENDING))
     setVisible(false)
   }
 
@@ -131,6 +135,12 @@ export const StocktakingModal: FC<StocktakingModalProps> = ({
         <MyTable
           rowSelection={{
             type: 'checkbox',
+            getCheckboxProps: record => {
+              return {
+                name: record.name,
+                disabled: record.statusStorage === D7CHECK_COLLECTION_RESULT_ENUM.PENDING
+              }
+            },
             onChange: (selectedRowKeys: React.Key[], selectedRows: any[]) => {
               setCheckedList(selectedRows)
             }
@@ -141,7 +151,12 @@ export const StocktakingModal: FC<StocktakingModalProps> = ({
             ['txt', '藏品编号', 'num'],
             ['txt', '藏品名称', 'name'],
             ['ping', '数量', 'pcs', 'pcsUnit'],
-            ['txt', '库存状态', 'statusStorage']
+            [
+              'txtChange',
+              '库存状态',
+              'statusStorage',
+              D7CEHCK_COLLECTION_RESULT_OPTIONS.map(v => v.label)
+            ]
           ]}
           list={list}
         />

+ 5 - 5
src/pages/D_storeManage/D7check/constants.tsx

@@ -14,18 +14,18 @@ export const DEFAULT_D7CHECK_PARAMS: ID7CheckParams = {
 }
 
 export const D7CHECK_PARAM_ROWS: D7CheckSearchType[] = [
-  { name: '移库日期范围', key: 'date2', type: '日期选择' },
-  { name: '移库单编号', key: 'num', type: '输入框' },
+  { name: '盘点日期范围', key: 'date2', type: '日期选择' },
+  { name: '盘点单编号', key: 'num', type: '输入框' },
   { name: '发起部门', key: 'deptName', type: '输入框' },
   { name: '发起人', key: 'userName', type: '输入框' },
   { name: '发起日期范围', key: 'date', type: '日期选择' },
-  { name: '申请状态', key: 'status', type: '下拉框', data: selectObj['流程申请状态'] },
+  { name: '申请状态', key: 'status', type: '下拉框', data: selectObj['申请状态'] },
   { name: '选择角色', key: 'userType', type: '下拉框', data: selectObj['角色'] }
 ]
 
 export const D7CHECK_TABLE_COLUMNS = [
-  ['dateRes', '移库日期', 'date'],
-  ['txt', '移库单编号', 'num'],
+  ['dateRes', '盘点日期', 'date'],
+  ['txt', '盘点单编号', 'num'],
   ['txt', '分库缩写', 'sonNum'],
   ['txt', '发起部门', 'deptName'],
   ['txt', '发起人', 'creatorName'],

+ 2 - 2
src/pages/D_storeManage/D7check/index.tsx

@@ -206,8 +206,8 @@ function D7check() {
           name: '藏品盘点',
           show: true,
           arr: [
-            { key: 'date', txt: '移库日期' },
-            { key: 'num', txt: '移库单编号' },
+            { key: 'date', txt: '盘点日期' },
+            { key: 'num', txt: '盘点单编号' },
             { key: 'sonNum', txt: '分库缩写' },
             { key: 'deptName', txt: '发起部门' },
             { key: 'creatorName', txt: '发起人' },

+ 11 - 0
src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx

@@ -200,6 +200,17 @@ function E3edit() {
 
         const obj = {
           ...topInfo,
+          snaps: [
+            {
+              goodsId: topInfo.goodsIds,
+              id: topInfo.id,
+              snap: JSON.stringify({
+                reason: topInfo.reason,
+                date: topInfo.date,
+                sonUser: topInfo.sonUser
+              })
+            }
+          ],
           rtf: JSON.stringify(rtf1.val || ''),
           fileIds: filesRes.join(',')
         }

+ 8 - 4
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -188,19 +188,20 @@ function F1edit() {
         snapsTemp.forEach((v: any) => {
           const { cusForm, ...obj } = JSON.parse(v.snap || '{}')
           if (obj.id) obj.id2 = v.id
+          const temp: any = {}
           if (cusForm) {
             if (cusForm[`${v.goodsId}-lendDate`]) {
-              cusForm[`${v.goodsId}-lendDate`] = dayjs(cusForm[`${v.goodsId}-lendDate`])
+              temp[`${v.goodsId}-lendDate`] = dayjs(cusForm[`${v.goodsId}-lendDate`])
             }
             if (cusForm[`${v.goodsId}-expectedReturnDate`]) {
-              cusForm[`${v.goodsId}-expectedReturnDate`] = dayjs(
+              temp[`${v.goodsId}-expectedReturnDate`] = dayjs(
                 cusForm[`${v.goodsId}-expectedReturnDate`]
               )
             }
             if (cusForm[`${v.goodsId}-returnDate`]) {
-              cusForm[`${v.goodsId}-returnDate`] = dayjs(cusForm[`${v.goodsId}-returnDate`])
+              temp[`${v.goodsId}-returnDate`] = dayjs(cusForm[`${v.goodsId}-returnDate`])
             }
-            tableRef.current?.form.setFieldsValue(cusForm)
+            tableRef.current?.form.setFieldsValue(temp)
           }
 
           arrTemp.push(obj)
@@ -392,6 +393,9 @@ function F1edit() {
             goodsId: v.id,
             id: v.id2 ? v.id2 : null,
             orderId: topInfo.id,
+            returnDate: tableValues[`${v.id}-returnDate`]
+              ? tableValues[`${v.id}-returnDate`].format('YYYY-MM-DD')
+              : undefined,
             snap: JSON.stringify({
               ...v,
               cusForm: tableValues

+ 9 - 5
src/pages/Layout/index.tsx

@@ -152,10 +152,13 @@ function Layout() {
       })
 
       // 是管理员
-      if (userInfo.isAdmin === 1) {
-        // push角色管理
-        isOkIdArr.push(9900)
-      }
+      // if (userInfo.isAdmin === 1) {
+      //   // push角色管理
+      //   isOkIdArr.push(9900)
+      // }
+
+      // 说需要显示全部列表
+      isOkIdArr.push(9900)
 
       //  手动打开一些页面
       // ;[9800, 9801, 9802, 9803].forEach(v => {
@@ -325,7 +328,8 @@ function Layout() {
                 <div
                   key={v2.id}
                   hidden={
-                    v2.id >= 9901 || ((getTokenInfo().user || {}).isAdmin !== 1 && v2.id === 9900)
+                    v2.id >= 9901
+                    // v2.id >= 9901 || ((getTokenInfo().user || {}).isAdmin !== 1 && v2.id === 9900)
                   }
                   className={classNames('layoutLRowBoxRow', pathAcFu(v2.path) ? 'active' : '')}
                   ref={pathAcFu(v2.path) ? sroolRef : null}

+ 1 - 1
src/pages/Login/index.tsx

@@ -81,7 +81,7 @@ export default function Login() {
     } else if (res.code === -1 && res.msg === '验证码有误') {
       LoginGetCodeFu()
     } else if (res.code === 3014) {
-      MessageFu.warning('账号不存在或密码错误,请联系管理员!')
+      MessageFu.warning('用户名或密码错误')
     }
   }, [LoginGetCodeFu, code, passWord, userName])
 

+ 6 - 0
src/pages/Y_goodsDetails/Y2look/index.module.scss

@@ -2,7 +2,13 @@
   background-color: #fff;
   border-radius: 10px;
   padding: 24px;
+
   :global {
+    .pageTitle {
+      display: flex;
+      align-items: center;
+      gap: 20px;
+    }
     .Y2top {
       display: flex;
       justify-content: space-between;

+ 34 - 20
src/pages/Y_goodsDetails/Y2look/index.tsx

@@ -3,13 +3,13 @@ import styles from './index.module.scss'
 import { useParams } from 'react-router-dom'
 import { Y1tabArr, Y1TabArrType } from '../Y1cathet/Y1main'
 import classNames from 'classnames'
-import { Button, Dropdown, MenuProps } from 'antd'
+import { Button, Dropdown, MenuProps, Tag } from 'antd'
 import Y11com from '../Y1cathet/Y11com'
 import Y22com from '../Y1cathet/Y22com'
 import Y33com from '../Y1cathet/Y33com'
 import Y44com from '../Y1cathet/Y44com'
 import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
-import { API_getInfoLogList, API_goodsInfo } from '@/store/action/C1ledger'
+import { API_getGoodsLedger, API_goodsInfo } from '@/store/action/C1ledger'
 import { EXPORT_WORD_ENUM, exportWordHandler } from '@/utils/exportTemplates'
 import { API_goodFileList } from '@/store/action/C2files'
 import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
@@ -20,10 +20,12 @@ import { statusStorageObj } from '@/utils/tableData'
 import { useSelector } from 'react-redux'
 import { RootState } from '@/store'
 import NoPower from '@/components/NoPower'
+import { selectObj } from '@/utils/select'
 
 function Y2look() {
   // 获取权限数据
   const goodsInfoPower = useSelector((state: RootState) => state.A0Layout.goodsInfoPower)
+  const downImg = useSelector((state: RootState) => state.A0Layout.downImg)
 
   const { id: sId } = useParams<any>()
 
@@ -37,27 +39,34 @@ function Y2look() {
   }, [])
 
   const handleExport = async () => {
-    const res = await API_goodFileList(sId)
-    exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_ARCHIVES, {
-      ...info,
-      imagePages: [
-        {
-          thumb: info.thumb
-        },
-        ...res.data.filter((i: any) => i.type === 'img')
-      ]
+    Promise.all([API_goodFileList(sId), API_getGoodsLedger(sId)]).then(res => {
+      exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_ARCHIVES, {
+        ...info,
+        records: res[1].data
+          .filter((i: any) => i.type === 'JD')
+          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+        repairs: res[1].data
+          .filter((i: any) => i.type === 'XF')
+          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+        status: res[1].data
+          .filter((i: any) => i.type === 'XZ')
+          .map((i: any) => ({ ...i, ...JSON.parse(i.snap) })),
+        imagePages: [
+          {
+            thumb: info.thumb
+          },
+          ...res[0].data.filter((i: any) => i.type === 'img')
+        ]
+      })
     })
   }
   const handleExport2 = async () => {
-    const res = await API_getInfoLogList({
-      typeName: '藏品鉴定',
-      pageNum: 1,
-      pageSize: 999,
-      goodsId: sId
-    })
+    const res = await API_getGoodsLedger(sId)
     exportWordHandler(EXPORT_WORD_ENUM.COLLECTION_CARD, {
       ...info,
-      records: res.data.records
+      records: res.data
+        .filter((i: any) => i.type === 'JD')
+        .map((i: any) => ({ ...i, ...JSON.parse(i.snap) }))
     })
   }
 
@@ -211,7 +220,12 @@ function Y2look() {
 
   return (
     <div className={styles.Y2look}>
-      <div className='pageTitle'>藏品详情</div>
+      <div className='pageTitle'>
+        藏品详情
+        {info.statusStorage > 0 && (
+          <Tag>{selectObj['库存状态'].find(i => i.value === info.statusStorage)?.label}</Tag>
+        )}
+      </div>
       <div className='Y2top'>
         <div className='Y2topll'>
           {Y1tabArr.map(v => (
@@ -308,7 +322,7 @@ function Y2look() {
             )
           ) : null}
           {tabAc === '藏品附件' ? (
-            goodsInfoPower.includes('goodsPage3') ? (
+            goodsInfoPower.includes('goodsPage3') || downImg['可见'] ? (
               <Y33com sId={sId} isLook={true} info={info} setImgCover={() => getInfoFu(sId)} />
             ) : (
               <NoPower />

+ 7 - 1
src/pages/Z_system/Z5role/Z5edit.tsx

@@ -278,7 +278,12 @@ function Z5edit({ sId, closeFu, addTableFu, editTableFu }: Props) {
                   onChange={e => {
                     if (goodsIdArr.includes(v.key))
                       setGoodsIdArr(goodsIdArr.filter(c => c !== v.key))
-                    else setGoodsIdArr([...goodsIdArr, v.key])
+                    else {
+                      setGoodsIdArr([...goodsIdArr, v.key])
+                      if (v.key === 'goodsPage3') {
+                        setScopeGoodsFile(1)
+                      }
+                    }
                   }}
                 >
                   {v.name}
@@ -328,6 +333,7 @@ function Z5edit({ sId, closeFu, addTableFu, editTableFu }: Props) {
             <div className='Z5eboxrr'>
               <div>
                 <Radio.Group
+                  disabled={goodsIdArr.includes('goodsPage3')}
                   value={scopeGoodsFile}
                   onChange={e => setScopeGoodsFile(e.target.value)}
                   options={[

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

@@ -64,3 +64,10 @@ export const API_setGoodsCover = (data: any) => {
 export const API_getGoodsStorage = () => {
   return http.get('cms/print/goods/storage')
 }
+
+/**
+ * 总账-藏品
+ */
+export const API_getGoodsLedger = (goodId: number | string) => {
+  return http.get(`cms/print/goods/ledger/${goodId}`)
+}

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

@@ -67,3 +67,10 @@ export const C21_APIsaveApply = (data: any) => {
 export const C21_APIsaveAudit = (data: any) => {
   return http.post('cms/orderZy/audit', data)
 }
+
+/**
+ * 批量下载-根据藏品id下载藏品附件
+ */
+export const C21_APIDownloadBatchZip = (ids: (string | number)[]) => {
+  return http.post('cms/goodsFile/downloadBatchZip', ids)
+}

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

@@ -71,3 +71,10 @@ export const D7_APIsaveApply = (data: any) => {
 export const D7_APIsaveAudit = (data: any) => {
   return http.post('cms/orderCheck/audit', data)
 }
+
+/**
+ * 出库-撤回订单
+ */
+export const D7_APIrevocation = (id: number) => {
+  return http.get(`cms/orderCheck/revocation/${id}`)
+}

+ 36 - 11
src/utils/exportTemplates.ts

@@ -481,15 +481,16 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
         ...temp,
         year: date.format('YYYY'),
         group: numberToChinese(temp.goods.length),
-        page: numberToChinese(page)
+        page: numberToChinese(page),
+        date: dayjs(temp.date).format('YYYY-MM-DD')
       }
       break
     case EXPORT_WORD_ENUM.SUB_PUT_BACK:
+      console.log(temp)
       temp = {
         ...temp,
-        year: date.format('YYYY'),
-        month: date.format('MM'),
-        day: date.format('DD')
+        num: dayjs(temp.date).format('YYYY') + temp.num,
+        date: dayjs(temp.date).format('YYYY年MM月DD日')
       }
       break
     case EXPORT_WORD_ENUM.COLLECTION_INVENTORY:
@@ -559,24 +560,45 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       break
     case EXPORT_WORD_ENUM.COLLECTION_ARCHIVES:
     case EXPORT_WORD_ENUM.COLLECTION_CARD:
-      console.log(temp)
+      const rtf2 = temp.rtf ? JSON.parse(temp.rtf).txtArr[0].txt : ''
+      const stack2 = []
+      for (const url of getImageUrlsFromHtml(rtf2)) {
+        stack2.push(await getBase64Sync(url))
+      }
       temp = {
         ...temp,
         year: date.format('YYYY'),
         month: date.format('MM'),
         day: date.format('DD'),
+        createTime: dayjs(temp.createTime).format('YYYY-MM-DD'),
         size: myTableTransferSize(temp),
-        quality: temp?.qualityDictScope ? resJiLianFu(temp.qualityDictScope) : '',
+        quality: temp.quality + temp.qualityUnit,
         deptName: (temp.records || []).length ? temp.records[0].deptName : '',
         recordDate: (temp.records || []).length ? temp.records[0].createTime : '',
+        dictTexture: resJiLianFu(temp.dictTexture3),
         records: (temp.records || []).map(
           (item: any) =>
-            `[${temp.dictLevel}],[${item.createTime}][${item.deptName}][${item.creatorName}]意见。`
-        )
+            `[${item.dictLevel}],[${item.date.split(' ')[0]}][${item.deptName}][${
+              item.creatorName
+            }]意见。`
+        ),
+        repairs: (temp.repairs || []).map(
+          (item: any) =>
+            `[${item.txt1}],[${item.txt2}],[${item.date.split(' ')[0]}][${item.authUnit}]交修。`
+        ),
+        status: (temp.status || []).map(
+          (item: any) => `[${item.reason}],[${item.date.split(' ')[0]}][${item.sonUser}]登记。`
+        ),
+        source: resJiLianFu(temp.source),
+        rtf: removeHtmlTags(rtf2),
+        preserveState: resJiLianFu(temp.preserveState),
+        imgs: stack2
       }
 
       if (type === EXPORT_WORD_ENUM.COLLECTION_ARCHIVES) {
         temp.imagePages = await arrangeImages(temp.imagePages)
+      } else if (temp.thumb) {
+        temp.thumb = await getBase64Sync(temp.thumb)
       }
       break
     case EXPORT_WORD_ENUM.OUTSIDER_FORM:
@@ -807,7 +829,7 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
         worksheet.getCell('A1').value = {
           richText: [
             { font: { size: 20, name: '黑体' }, text: '馆藏品注销凭证 ' },
-            { font: { size: 11 }, text: '(编号:             ) ' }
+            { font: { size: 11 }, text: `(编号:${temp.num}) ` }
           ]
         }
         worksheet.getRow(1).height = 60
@@ -817,7 +839,7 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
             vertical: 'middle'
           }
         }
-        worksheet.insertRow(2, [date.format('YYYY年MM月DD日')])
+        worksheet.insertRow(2, [dayjs(temp.createTime).format('YYYY年MM月DD日')])
         worksheet.mergeCells('A2:K2')
         worksheet.getRow(2).height = 30
         worksheet.getCell('A2').style = {
@@ -831,7 +853,10 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
           }
         }
         worksheet.insertRow(3, [
-          `现将藏品_${temp.goods.length}_件注销,清单开列如下,本凭证连同附页全份共______页(含附件)`
+          // @ts-ignore
+          `现将藏品_${
+            temp.goods.length - 1
+          }_件注销,清单开列如下,本凭证连同附页全份共___页(含附件)`
         ])
         worksheet.mergeCells('A3:K3')
         worksheet.getRow(3).height = 30

+ 2 - 2
src/utils/select.ts

@@ -80,8 +80,8 @@ export const selectObj = {
     { value: '4', label: '标本' }
   ],
   展览状态: [
-    { value: '6', label: '外部借展' },
-    { value: '5', label: '内部借展' }
+    { value: '6', label: '外展' },
+    { value: '5', label: '内展' }
   ],
   流程申请状态: [
     { value: 2, label: '待审批' },

+ 2 - 1
src/utils/tableData.ts

@@ -254,7 +254,8 @@ export const D2tableC = [
   ['txt', '分库缩写', 'num'],
   ['txt', '仓库负责人', 'managerUser'],
   ['text', '仓库说明', 'description', 100],
-  ['txtChange', '仓库状态', 'enable', { 0: '禁用', 1: '启用' }]
+  ['txtChange', '仓库状态', 'enable', { 0: '禁用', 1: '启用' }],
+  ['txt', '排序', 'sort']
 ]
 
 export const D2tableCSon = [