chenlei 2 months ago
parent
commit
5a9f77dfb2

BIN
public/templates/10.docx


BIN
public/templates/13.docx


BIN
public/templates/14.docx


BIN
public/templates/6.docx


+ 2 - 2
src/pages/C_goodsManage/C22goodEdit/C22look/index.tsx

@@ -18,7 +18,7 @@ import { statusObj } from '@/utils/tableData'
 import X3auditInfo from '@/pages/X_stock/X3auditInfo'
 import ZupFileTable from '@/components/ZupFileTable'
 import { C22infoBtnFu } from '../data'
-import { EXbtnFu } from '@/utils/EXBtn'
+// import { EXbtnFu } from '@/utils/EXBtn'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import ZflowTable from '@/components/ZflowTable'
 import { GoodFileType } from '@/components/Z3upFiles'
@@ -308,7 +308,7 @@ function C22look() {
               </Button>
             ) : null}
 
-            {EXbtnFu(topInfo)}
+            {/* {EXbtnFu(topInfo)} */}
 
             {C22infoBtnFu(topInfo)['审批'] ? (
               <Button type='primary' onClick={toAuditFu}>

+ 2 - 2
src/pages/D_storeManage/D3staff/constants.ts

@@ -3,7 +3,7 @@ import { D3StaffSearchType, ID3StaffParams } from './types'
 import { sonTypeNameObj, statusObj } from '@/utils/tableData'
 
 export const D3STAFF_PARAM_ROWS2: D3StaffSearchType[] = [
-  { name: '发起人', key: 'creatorName', type: '输入框' },
+  { name: '发起人', key: 'userName', type: '输入框' },
   { name: '发起日期范围', key: 'date', type: '日期选择' },
   { name: '申请状态', key: 'status', type: '下拉框', data: selectObj['流程申请状态'] },
   { name: '选择角色', key: 'userType', type: '下拉框', data: selectObj['角色'] }
@@ -32,7 +32,7 @@ export const DEFAULT_D3STAFF_PARAMS: ID3StaffParams = {
   pageNum: 1,
   pageSize: 10,
   num: '',
-  creatorName: '',
+  userName: '',
   deptName: '',
   status: '',
   userType: ''

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

@@ -15,6 +15,7 @@ import { D3_APIList } from '@/store/action/D3staff'
 import { filterEmptyStrings } from '@/utils/objects'
 import { selectObj } from '@/utils/select'
 import { D2_APIgetList } from '@/store/action/D2storSet'
+import dayjs from 'dayjs'
 
 const { RangePicker } = DatePicker
 
@@ -82,7 +83,8 @@ function D3staff() {
               <RangePicker
                 format='YYYY-MM-DD'
                 allowClear={true}
-                onChange={(e, dateStrings) => setFormData({ ...formData, [item.key]: dateStrings })}
+                value={formData[item.key] as undefined}
+                onChange={e => setFormData({ ...formData, [item.key]: e })}
               />
             ) : (
               <Cascader

+ 1 - 1
src/pages/D_storeManage/D3staff/types.ts

@@ -20,7 +20,7 @@ export interface ID3StaffParams {
   date?: string[]
   userType: string
   status: string
-  creatorName: string
+  userName: string
   deptName: string
   sonTypeName?: SON_TYPE_NAME
   storageInId?: string

+ 4 - 2
src/pages/D_storeManage/D5moveStor/D5edit/index.tsx

@@ -474,7 +474,9 @@ function D5edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_RELOCATION])}
+        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+          EXPORT_WORD_ENUM.COLLECTION_RELOCATION
+        ])}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -491,7 +493,7 @@ function D5edit() {
         <Button onClick={() => infoPageBackFu('/moveStor')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

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

@@ -517,9 +517,11 @@ function D6edit() {
         ) : null}
 
         {EXbtnFu(topInfo, [
-          EXPORT_WORD_ENUM.SUB_PUT_BACK,
-          EXPORT_WORD_ENUM.HALL_PUT_BACK,
-          EXPORT_WORD_ENUM.BORROW
+          topInfo.sonTypeName === '1'
+            ? EXPORT_WORD_ENUM.SUB_PUT_BACK
+            : topInfo.sonTypeName === '2'
+            ? EXPORT_WORD_ENUM.HALL_PUT_BACK
+            : EXPORT_WORD_ENUM.BORROW
         ])}
 
         {btnFlagFu2(topInfo)['删除'] ? (

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

@@ -301,7 +301,9 @@ function D7edit() {
           </Button>
         ) : null}
 
-        {EXbtnFu(topInfo, [EXPORT_WORD_ENUM.COLLECTION_INVENTORY])}
+        {EXbtnFu({ ...topInfo, sonNum: storageIdArr.find(i => i.id === topInfo.storageId)?.num }, [
+          EXPORT_WORD_ENUM.COLLECTION_INVENTORY
+        ])}
 
         {btnFlagFu2(topInfo)['删除'] ? (
           <MyPopconfirm
@@ -318,7 +320,7 @@ function D7edit() {
         <Button onClick={() => infoPageBackFu('/check')}>返回</Button>
       </>
     )
-  }, [delFu, lookBtnFu, lookJumpFu, topInfo])
+  }, [delFu, lookBtnFu, lookJumpFu, storageIdArr, topInfo])
 
   // 申请记录
   const [auditsShow, setAuditsShow] = useState(false)

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

@@ -12,6 +12,7 @@ import { D7_APIdel, D7_APIList } from '@/store/action/D7check'
 import { filterEmptyStrings } from '@/utils/objects'
 import { MessageFu } from '@/utils/message'
 import { statusObj } from '@/utils/tableData'
+import dayjs from 'dayjs'
 
 const { RangePicker } = DatePicker
 
@@ -60,7 +61,8 @@ function D7check() {
               <RangePicker
                 format='YYYY-MM-DD'
                 allowClear={true}
-                onChange={(e, dateStrings) => setFormData({ ...formData, [item.key]: dateStrings })}
+                value={formData[item.key] as undefined}
+                onChange={e => setFormData({ ...formData, [item.key]: e })}
               />
             ) : (
               <Cascader
@@ -114,13 +116,19 @@ function D7check() {
 
   // 封装发送请求的函数
   const getListFu = useCallback(() => {
-    const { date, ...rest } = formDataRef.current
+    const { date, date2, ...rest } = formDataRef.current
     if (Array.isArray(date) && date.length) {
       // @ts-ignore
       rest.startTime = dayjs(date[0]).format('YYYY-MM-DD') + ' 00:00:00'
       // @ts-ignore
       rest.endTime = dayjs(date[1]).format('YYYY-MM-DD') + ' 23:59:59'
     }
+    if (Array.isArray(date2) && date2.length) {
+      // @ts-ignore
+      rest.businessTimeStart = dayjs(date2[0]).format('YYYY-MM-DD') + ' 00:00:00'
+      // @ts-ignore
+      rest.businessTimeEnd = dayjs(date2[1]).format('YYYY-MM-DD') + ' 23:59:59'
+    }
     formDataOldRef.current = rest
     dispatch(D7_APIList(filterEmptyStrings(rest)))
   }, [dispatch])

+ 2 - 2
src/pages/F_exhibition/F1exhibition/types.ts

@@ -26,8 +26,8 @@ export interface IF1exhibitionParams {
 }
 
 export enum F1_SON_TYPE_NAME_ENUM {
-  TEMP = 1,
-  FIXED = 2
+  TEMP = '1',
+  FIXED = '2'
 }
 
 export enum F1_SON_TYPE_ENUM {

+ 25 - 6
src/utils/exportTemplates.ts

@@ -16,6 +16,7 @@ import dayjs from 'dayjs'
 import { D7CEHCK_COLLECTION_RESULT_OPTIONS } from '@/pages/D_storeManage/D7check/constants'
 import { exportTempExcel, getImageBase64Extension } from './exportExcelUtils'
 import { selectObj } from './select'
+import { MEDIA_TYPES } from '@/pages/C_goodsManage/C21wealth/constants'
 
 export enum EXPORT_WORD_ENUM {
   /** 借用藏品点交凭证 */
@@ -447,8 +448,12 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       good.source && (good.source = resJiLianFu(good.source))
       good.dictAgeFirst && (good.dictAgeFirst = resJiLianFu(good.dictAgeFirst))
       good.qualityUnit && (good.qualityUnit = resJiLianFu(good.qualityUnit))
-      if (good.sizeUnit || good.quality)
-        good.size = good.sizeUnit ? myTableTransferSize(good) : good.quality + good.qualityUnit
+      if (good.sizeUnit || good.quality) {
+        const arr: string[] = []
+        if (good.sizeUnit) arr.push(myTableTransferSize(good))
+        if (good.quality) arr.push(good.quality + good.qualityUnit)
+        good.size = arr.join('、')
+      }
     }
   } else {
     temp.goods = []
@@ -515,11 +520,18 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       }
       break
     case EXPORT_WORD_ENUM.FORM_FOR_DIGITAL:
+      const __date = dayjs(temp.createTime)
+
       temp = {
         ...temp,
-        year: date.format('YYYY'),
-        month: date.format('MM'),
-        day: date.format('DD')
+        effect: resJiLianFu(temp.effect),
+        sonTypeName: MEDIA_TYPES.filter(media => temp.sonTypeName.split(',').includes(media.value))
+          .map(media => media.label)
+          .join(','),
+        year2: date.format('YYYY'),
+        year: __date.format('YYYY'),
+        month: __date.format('MM'),
+        day: __date.format('DD')
       }
       break
     case EXPORT_WORD_ENUM.SUB_PUT_IN:
@@ -533,6 +545,7 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       }
       break
     case EXPORT_WORD_ENUM.COLLECTION_RELOCATION:
+      console.log(temp.goods)
       temp = {
         ...temp,
         year: date.format('YYYY'),
@@ -586,7 +599,13 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       break
     case EXPORT_WORD_ENUM.RELIC_REPAIR_LIST:
     case EXPORT_WORD_ENUM.COLLECTION_CURRENT_STATUS:
-      temp.rtf = removeHtmlTags(JSON.parse(temp.rtf).txtArr[0].txt)
+      const ___date = dayjs(temp.date)
+      temp = {
+        ...temp,
+        year: ___date.format('YYYY'),
+        page,
+        rtf: removeHtmlTags(JSON.parse(temp.rtf).txtArr[0].txt)
+      }
       break
     case EXPORT_WORD_ENUM.COLLECTION_LIST:
       temp.goods.push({