|
@@ -7,11 +7,12 @@ import {
|
|
arrangeImages,
|
|
arrangeImages,
|
|
calcTablePages,
|
|
calcTablePages,
|
|
getExcelColumnLetter,
|
|
getExcelColumnLetter,
|
|
|
|
+ getImageUrlsFromHtml,
|
|
ITEMPLATE,
|
|
ITEMPLATE,
|
|
numberToChinese,
|
|
numberToChinese,
|
|
removeHtmlTags
|
|
removeHtmlTags
|
|
} from './exportWordUtils'
|
|
} from './exportWordUtils'
|
|
-import { myTableTransferSize } from '@/components/MyTable'
|
|
|
|
|
|
+import { getDesensitizeTxt, myTableTransferSize } from '@/components/MyTable'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import { D7CEHCK_COLLECTION_RESULT_OPTIONS } from '@/pages/D_storeManage/D7check/constants'
|
|
import { D7CEHCK_COLLECTION_RESULT_OPTIONS } from '@/pages/D_storeManage/D7check/constants'
|
|
import { exportTempExcel, getImageBase64Extension } from './exportExcelUtils'
|
|
import { exportTempExcel, getImageBase64Extension } from './exportExcelUtils'
|
|
@@ -494,9 +495,7 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
case EXPORT_WORD_ENUM.COLLECTION_INVENTORY:
|
|
case EXPORT_WORD_ENUM.COLLECTION_INVENTORY:
|
|
temp = {
|
|
temp = {
|
|
...temp,
|
|
...temp,
|
|
- year: date.format('YYYY'),
|
|
|
|
- month: date.format('MM'),
|
|
|
|
- day: date.format('DD')
|
|
|
|
|
|
+ sonNum2: dayjs(temp.date).format('YYYY') + temp.num
|
|
}
|
|
}
|
|
temp.goods.forEach((i: any) => {
|
|
temp.goods.forEach((i: any) => {
|
|
i.checker = i.cusForm[`${i.id}-checker`]
|
|
i.checker = i.cusForm[`${i.id}-checker`]
|
|
@@ -538,16 +537,14 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
temp = {
|
|
temp = {
|
|
...temp,
|
|
...temp,
|
|
sonSource: resJiLianFu(temp.sonSource),
|
|
sonSource: resJiLianFu(temp.sonSource),
|
|
- createTime: dayjs(temp.createTime).format('YYYY年MM月DD日')
|
|
|
|
|
|
+ sonNum2: dayjs(temp.date).format('YYYY') + temp.num,
|
|
|
|
+ date: dayjs(temp.date).format('YYYY年MM月DD日')
|
|
}
|
|
}
|
|
break
|
|
break
|
|
case EXPORT_WORD_ENUM.COLLECTION_RELOCATION:
|
|
case EXPORT_WORD_ENUM.COLLECTION_RELOCATION:
|
|
- console.log(temp.goods)
|
|
|
|
temp = {
|
|
temp = {
|
|
...temp,
|
|
...temp,
|
|
- year: date.format('YYYY'),
|
|
|
|
- month: date.format('MM'),
|
|
|
|
- day: date.format('DD'),
|
|
|
|
|
|
+ sonNum2: dayjs(temp.date).format('YYYY') + temp.num,
|
|
date: dayjs(temp.date).format('YYYY年MM月DD日')
|
|
date: dayjs(temp.date).format('YYYY年MM月DD日')
|
|
}
|
|
}
|
|
break
|
|
break
|
|
@@ -591,17 +588,25 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
members: memberss.map((i: any) => i.name),
|
|
members: memberss.map((i: any) => i.name),
|
|
companys: memberss.map((i: any) => i.remark || '空'),
|
|
companys: memberss.map((i: any) => i.remark || '空'),
|
|
idCards: memberss.map((i: any) => i.papers || '空'),
|
|
idCards: memberss.map((i: any) => i.papers || '空'),
|
|
- phones: memberss.map((i: any) => i.phone || '空')
|
|
|
|
|
|
+ phones: memberss.map((i: any) => (i.phone ? getDesensitizeTxt(i.phone) : '空'))
|
|
}
|
|
}
|
|
break
|
|
break
|
|
case EXPORT_WORD_ENUM.RELIC_REPAIR_LIST:
|
|
case EXPORT_WORD_ENUM.RELIC_REPAIR_LIST:
|
|
case EXPORT_WORD_ENUM.COLLECTION_CURRENT_STATUS:
|
|
case EXPORT_WORD_ENUM.COLLECTION_CURRENT_STATUS:
|
|
const ___date = dayjs(temp.date)
|
|
const ___date = dayjs(temp.date)
|
|
|
|
+ const rtf = JSON.parse(temp.rtf).txtArr[0].txt
|
|
|
|
+ const stack = []
|
|
|
|
+ try {
|
|
|
|
+ for (const url of getImageUrlsFromHtml(rtf)) {
|
|
|
|
+ stack.push(await getBase64Sync(url))
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {}
|
|
temp = {
|
|
temp = {
|
|
...temp,
|
|
...temp,
|
|
year: ___date.format('YYYY'),
|
|
year: ___date.format('YYYY'),
|
|
page,
|
|
page,
|
|
- rtf: removeHtmlTags(JSON.parse(temp.rtf).txtArr[0].txt)
|
|
|
|
|
|
+ rtf: removeHtmlTags(rtf),
|
|
|
|
+ imgs: stack
|
|
}
|
|
}
|
|
break
|
|
break
|
|
case EXPORT_WORD_ENUM.COLLECTION_LIST:
|
|
case EXPORT_WORD_ENUM.COLLECTION_LIST:
|