chenlei 1 miesiąc temu
rodzic
commit
dfbe04179d

BIN
public/templates/1.docx


BIN
public/templates/2.docx


BIN
public/templates/7.docx


BIN
public/templates/9.docx


+ 3 - 1
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -192,7 +192,9 @@ function F1edit() {
         snapsTemp.forEach((v: any) => {
           const { cusForm, ...obj } = JSON.parse(v.snap || '{}')
           if (obj.id) obj.id2 = v.id
-          const temp: any = {}
+          const temp: any = {
+            ...cusForm
+          }
           if (cusForm) {
             if (cusForm[`${v.goodsId}-lendDate`]) {
               temp[`${v.goodsId}-lendDate`] = dayjs(cusForm[`${v.goodsId}-lendDate`])

+ 1 - 1
src/pages/Y_goodsDetails/Y2look/index.tsx

@@ -59,7 +59,7 @@ function Y2look() {
           {
             thumb: info.thumb
           },
-          ...res[0].data.filter((i: any) => i.type === 'img')
+          ...(res[0].data?.filter((i: any) => i.type === 'img') || [])
         ]
       })
     })

+ 10 - 1
src/utils/exportTemplates.ts

@@ -486,12 +486,16 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
       }
       break
     case EXPORT_WORD_ENUM.SUB_PUT_BACK:
-      console.log(temp)
       temp = {
         ...temp,
         num: dayjs(temp.date).format('YYYY') + temp.num,
         date: dayjs(temp.date).format('YYYY年MM月DD日')
       }
+      temp.goods.forEach((i: any) => {
+        if (i.numName !== '藏品总登记号') {
+          i.num = ''
+        }
+      })
       break
     case EXPORT_WORD_ENUM.COLLECTION_INVENTORY:
       temp = {
@@ -595,6 +599,11 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
         imgs: stack2
       }
 
+      if (temp.numName !== '藏品总登记号') {
+        temp.num2 = temp.num
+        temp.num = ''
+      }
+
       if (type === EXPORT_WORD_ENUM.COLLECTION_ARCHIVES) {
         temp.imagePages = await arrangeImages(temp.imagePages)
       } else if (temp.thumb) {