chenlei hai 1 mes
pai
achega
1099af4a64

+ 2 - 2
public/index.html

@@ -12,8 +12,8 @@
 
     <script>
       // 域名地址
-      // const baseUrlTempOne = 'https://sit-yiwubwg.4dage.com'
-      const baseUrlTempOne = 'http://192.168.20.61:8096'
+      const baseUrlTempOne = 'https://sit-yiwubwg.4dage.com'
+      // const baseUrlTempOne = 'http://192.168.20.61:8096'
 
       // 钉钉模式
       const isDingTemp = false

BIN=BIN
public/templates/3.docx


+ 42 - 37
src/pages/A_workbench/A1dataSta/components/Tab2/index.tsx

@@ -113,6 +113,7 @@ export const A1Tab2: FC = () => {
           '调出',
           '拨出',
           '其他减少',
+          '合计',
           '提陈',
           '在陈',
           '退陈',
@@ -120,6 +121,10 @@ export const A1Tab2: FC = () => {
           '借出',
           '在借',
           '退还',
+          '合计',
+          '原出',
+          '新出',
+          '收回',
           '合计'
         ]
         worksheet.addRow([
@@ -137,20 +142,24 @@ export const A1Tab2: FC = () => {
         worksheet.addRow(line2)
         worksheet.addRow(['', '', '征购', '捐赠', '移交', '上交', '调拨'])
         worksheet.mergeCells('A1:A3')
+        worksheet.getCell('M1').value = `${curYear}年${QUARTER_MAP[quarter]}库存数`
         worksheet.getCell('A1').value = '项目/类目/类别'
         worksheet.mergeCells('C1:I1')
         worksheet.mergeCells('J1:L1')
-        worksheet.getCell('M1').value = '陈列'
-        worksheet.mergeCells('M1:P1')
-        worksheet.getCell('Q1').value = '借出'
-        worksheet.mergeCells('Q1:T1')
+        worksheet.getCell('N1').value = '陈列'
+        worksheet.mergeCells('N1:Q1')
+        worksheet.getCell('R1').value = '借出'
+        worksheet.mergeCells('R1:U1')
+        worksheet.getCell('V1').value = '其他出库'
+        worksheet.mergeCells('V1:Y1')
         worksheet.mergeCells('B2:B3')
         worksheet.mergeCells('C2:G2')
         worksheet.mergeCells('H2:H3')
+        worksheet.getCell('Z1').value = '备注'
+        worksheet.mergeCells('Z1:Z3')
         worksheet.getRow(1).height = 60
         line2.forEach((_, index) => {
           if (index < 8) return
-          console.log(getExcelColumnLetter(index))
           worksheet.mergeCells(`${getExcelColumnLetter(index)}2:${getExcelColumnLetter(index)}3`)
         })
         list.forEach(i => {
@@ -167,6 +176,7 @@ export const A1Tab2: FC = () => {
             '',
             i.reduceBaChu,
             i.reduceOther,
+            '',
             i.cl1,
             i.cl2,
             i.cl3,
@@ -181,7 +191,7 @@ export const A1Tab2: FC = () => {
           worksheet.getColumn(index + 1).width = width
         })
       },
-      [3 + list.length, 20]
+      [3 + list.length, 26]
     )
   }
 
@@ -355,38 +365,33 @@ export const A1Tab2: FC = () => {
                 dataIndex: 'jcTotal'
               }
             ]
+          },
+          {
+            title: '其他出库',
+            children: [
+              {
+                title: '原出',
+                render: () => '-'
+              },
+              {
+                title: '新出',
+                render: () => '-'
+              },
+              {
+                title: '收回',
+                render: () => '-'
+              },
+              {
+                title: '合计',
+                render: () => '-'
+              }
+            ]
+          },
+          {
+            title: '备注',
+            align: 'center',
+            render: () => '-'
           }
-          // {
-          //   title: '其他出库',
-          //   children: [
-          //     {
-          //       title: '原出',
-          //       dataIndex: 'a'
-          //     },
-          //     {
-          //       title: '新出',
-          //       dataIndex: 'b'
-          //     },
-          //     {
-          //       title: '收回',
-          //       dataIndex: 'c'
-          //     },
-          //     {
-          //       title: '合计',
-          //       dataIndex: 'c'
-          //     }
-          //   ]
-          // },
-          // {
-          //   title: '备注',
-          //   dataIndex: 'remark',
-          //   align: 'center',
-          //   onCell: (_, index) => {
-          //     if (index === 0) return { rowSpan: 2 }
-          //     if (index === 1) return { rowSpan: 0 }
-          //     return {}
-          //   }
-          // }
         ]}
         bordered
         dataSource={list}

+ 9 - 8
src/pages/A_workbench/A1dataSta/components/Tab3/index.tsx

@@ -122,20 +122,21 @@ export const A1Tab3: FC = () => {
     }, new Map<string, number>())
 
     temp = temp.map(item => {
-      const matchedKey = [...countMap].find(([key, num]) => {
+      const temp: any = {}
+      const matchedKey = [...countMap].filter(([key, num]) => {
         const [dictLevel] = key.split('_')
         return dictLevel === item.level || dictLevel === item.custom
       })
 
-      if (matchedKey) {
-        const [key, num] = matchedKey
+      for (const matched of matchedKey) {
+        const [key, num] = matched
         const dictType = key.split('_')[1]
-        return {
-          ...item,
-          [dictType]: num
-        }
+        temp[dictType] = num
+      }
+      return {
+        ...item,
+        ...temp
       }
-      return item
     })
 
     setList(temp)

+ 1 - 1
src/pages/D_storeManage/D8cancel/D8edit/index.tsx

@@ -252,7 +252,7 @@ function D8edit() {
             <Button
               size='small'
               type='text'
-              onClick={() => openGoodsInfoFu(item.id, 19, '', topInfo.id)}
+              onClick={() => openGoodsInfoFu(item.id, 320, '', topInfo.id)}
             >
               查看
             </Button>

+ 5 - 0
src/utils/exportTemplates.ts

@@ -489,6 +489,11 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
         page: numberToChinese(page),
         date: dayjs(temp.date).format('YYYY-MM-DD')
       }
+      temp.goods.forEach((i: any) => {
+        if (i.numName !== '藏品总登记号') {
+          i.num = ''
+        }
+      })
       break
     case EXPORT_WORD_ENUM.SUB_PUT_BACK:
       temp = {