|
@@ -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({
|