From baddb052ccd4a91ef1881ba663e6a4e55b05f4fb Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 14 十月 2026 15:51:55 +0800
Subject: [PATCH] feat(hrm): 社保公积金方案表单加「适用部门」与默认缴费基数,修比例输入精度

---
 src/views/mes/qc/ipqc/index.vue |   80 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 78 insertions(+), 2 deletions(-)

diff --git a/src/views/mes/qc/ipqc/index.vue b/src/views/mes/qc/ipqc/index.vue
index 832a85a..2c80419 100644
--- a/src/views/mes/qc/ipqc/index.vue
+++ b/src/views/mes/qc/ipqc/index.vue
@@ -2,15 +2,27 @@
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { MesQcIpqcApi } from '#/api/mes/qc/ipqc';
 
+import { ref } from 'vue';
+
 import { Page, useVbenModal } from '@vben/common-ui';
-import { MesQcStatusEnum } from '@vben/constants';
+import { MesQcStatusEnum, MesQcTypeEnum } from '@vben/constants';
+import { downloadFileFromBlobPart } from '@vben/utils';
 
 import { Button, message } from 'ant-design-vue';
 
 import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
-import { deleteIpqc, exportIpqc, getIpqcPage } from '#/api/mes/qc/ipqc';
+import { exportProductWord } from '#/api/mes/qc/indicatorresult';
+import {
+  deleteIpqc,
+  exportIpqc,
+  getIpqcPage,
+  importIpqc,
+  importIpqcTemplate,
+} from '#/api/mes/qc/ipqc';
 import { $t } from '#/locales';
 import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue';
+import QcImportFormModal from '#/views/mes/qc/components/import-form-modal.vue';
+import QcReportPrint from '#/views/mes/qc/components/qc-report-print.vue';
 
 import { useGridColumns, useGridFormSchema } from './data';
 import Form from './modules/form.vue';
@@ -25,9 +37,50 @@
   destroyOnClose: true,
 });
 
+const printRef = ref<InstanceType<typeof QcReportPrint> | null>(null);
+
+const [ImportModal, importModalApi] = useVbenModal({
+  connectedComponent: QcImportFormModal,
+  destroyOnClose: true,
+});
+
 /** 鍒锋柊琛ㄦ牸 */
 function handleRefresh() {
   gridApi.query();
+}
+
+/** 鎵撳嵃妫�楠屾姤鍛� */
+async function handlePrint(row: MesQcIpqcApi.Ipqc) {
+  await printRef.value?.print(row.id!, MesQcTypeEnum.IPQC);
+}
+
+/** 瀵煎嚭浜у搧妫�楠屽崟 Word锛堢焊璐ㄦ楠屽崟鐗堝紡锛屽垽瀹氱粨璁哄甫鍑烘楠岀粨鏋滐級 */
+async function handleExportProductWord(row: MesQcIpqcApi.Ipqc) {
+  const blob = await exportProductWord(row.id!, MesQcTypeEnum.IPQC);
+  downloadFileFromBlobPart({
+    fileName: `浜у搧妫�楠屽崟-${row.code ?? row.id}.docx`,
+    source: blob,
+  });
+}
+
+/** 鎵归噺瀵煎叆杩囩▼妫�楠屽崟 */
+function handleImport() {
+  importModalApi
+    .setData({
+      title: '鎵归噺瀵煎叆杩囩▼妫�楠屽崟',
+      templateApi: importIpqcTemplate,
+      importApi: importIpqc,
+      fileName: '杩囩▼妫�楠屽崟瀵煎叆妯℃澘.xls',
+      hints: [
+        '浠呭厑璁稿鍏� xls銆亁lsx 鏍煎紡鏂囦欢锛涘繀濉垪锛氭楠屽崟鍚嶇О銆佷骇鍝佺墿鏂欑紪鐮併�佹壒鍙枫�佸悎鏍煎搧鏁伴噺銆佷笉鍚堟牸鍝佹暟閲忋��',
+        '銆屼骇鍝佺墿鏂欑紪鐮併�嶉渶涓庛�岀墿鏂欑鐞嗐�嶄腑鐨勭紪鐮佸畬鍏ㄤ竴鑷达紱銆屾壒鍙枫�嶄负蹇呭~锛屼笉鍏佽涓虹┖銆�',
+        '銆屾楠岀被鍨嬨�嶆寜瀛楀吀鍚嶇О濉啓锛堣嚜鍒跺伐搴忔楠� / 棣栨 / 宸℃ / 鑷 / 鎴愬搧妫�楠岋級锛涖�屾娴嬬粨鏋溿�嶆寜瀛楀吀鍚嶇О濉啓锛堟牎楠岄�氳繃 / 鏍¢獙涓嶉�氳繃锛夈��',
+        '鍚堟牸鍝佹暟閲� + 涓嶅悎鏍煎搧鏁伴噺 蹇呴』绛変簬銆屾娴嬫暟閲忋�嶏紙鐣欑┖鏃惰嚜鍔ㄥ彇涓よ�呬箣鍜岋級锛涘伐搴� + 鏂欏簾 + 鍏朵粬搴熷搧 涔嬪拰涓嶅緱瓒呰繃涓嶅悎鏍煎搧鏁伴噺銆�',
+        '銆岃川妫�鏂规銆嶅~鏂规鍚嶇О锛岀暀绌哄垯鎸夌墿鏂欒嚜鍔ㄥ尮閰� IPQC 鏂规锛涖�屾娴嬩汉鍛樸�嶇暀绌哄彇褰撳墠鐧诲綍鐢ㄦ埛锛涖�屾娴嬫棩鏈熴�嶅彲鐣欑┖銆�',
+        '閫愯瀵煎叆锛屽け璐ヨ涓嶅奖鍝嶆垚鍔熻锛涘鍏ュ悗鐨勬楠屽崟涓恒�屽緟妫�楠屻�嶇姸鎬侊紝鍙湪鍒楄〃涓户缁紪杈戙�佸綍鍏ユ娴嬬粨鏋溿��',
+      ],
+    })
+    .open();
 }
 
 /** 鍒涘缓杩囩▼妫�楠屽崟 */
@@ -106,6 +159,8 @@
   <Page auto-content-height>
     <FormModal @success="handleRefresh" />
     <ExportRangeModal />
+    <QcReportPrint ref="printRef" />
+    <ImportModal @success="handleRefresh" />
     <Grid table-title="杩囩▼妫�楠屽崟鍒楄〃">
       <template #toolbar-tools>
         <TableAction
@@ -116,6 +171,13 @@
               icon: ACTION_ICON.ADD,
               auth: ['mes:qc-ipqc:create'],
               onClick: handleCreate,
+            },
+            {
+              label: '鎵归噺瀵煎叆',
+              type: 'primary',
+              icon: ACTION_ICON.UPLOAD,
+              auth: ['mes:qc-ipqc:import'],
+              onClick: handleImport,
             },
             {
               label: $t('ui.actionTitle.export'),
@@ -156,6 +218,20 @@
               },
             },
             {
+              label: '鎵撳嵃鎶ュ憡',
+              type: 'link',
+              icon: 'ant-design:printer-outlined',
+              auth: ['mes:qc-ipqc:query'],
+              onClick: handlePrint.bind(null, row),
+            },
+            {
+              label: '瀵煎嚭浜у搧妫�楠屽崟',
+              type: 'link',
+              icon: 'ant-design:file-word-outlined',
+              auth: ['mes:qc-ipqc:query'],
+              onClick: handleExportProductWord.bind(null, row),
+            },
+            {
               label: $t('common.detail'),
               type: 'link',
               icon: ACTION_ICON.VIEW,

--
Gitblit v1.9.3