From 2cb77a3487b8c5da6fe02f3c1018dcf70f73d29a Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期一, 19 十月 2026 10:25:22 +0800
Subject: [PATCH] feat(hrm): 社保公积金方案新增大病医疗/长期护理(输入支持两位小数)

---
 src/views/hrm/salary/social-security-scheme/data.ts |   94 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/src/views/hrm/salary/social-security-scheme/data.ts b/src/views/hrm/salary/social-security-scheme/data.ts
index 2e363b8..9a14da2 100644
--- a/src/views/hrm/salary/social-security-scheme/data.ts
+++ b/src/views/hrm/salary/social-security-scheme/data.ts
@@ -16,6 +16,18 @@
   };
 }
 
+/** 鏍煎紡鍖栨瘮渚嬭緭鍏ワ紙鏄剧ず涓や綅灏忔暟锛屽 0.50%锛� */
+function createRatioFormatter2() {
+  return {
+    formatter: (value: number) =>
+      value !== undefined && value !== null ? `${(value * 100).toFixed(2)}%` : '',
+    parser: (value: string) => {
+      const num = parseFloat(value.replace('%', ''));
+      return isNaN(num) ? 0 : num / 100;
+    },
+  };
+}
+
 /** 鏂板/淇敼绀句繚鍏Н閲戞柟妗堢殑琛ㄥ崟 */
 export function useFormSchema(): VbenFormSchema[] {
   return [
@@ -200,6 +212,76 @@
         ...createRatioFormatter(0.001),
       },
     },
+    // 澶х梾鍖荤枟
+    {
+      fieldName: 'divider_serious_illness',
+      label: '澶х梾鍖荤枟',
+      component: 'Divider',
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'seriousIllnessCompanyRatio',
+      label: '浼佷笟姣斾緥',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '浼佷笟缂寸撼姣斾緥',
+        min: 0,
+        max: 1,
+        step: 0.0001,
+        precision: 4,
+        style: { width: '100%' },
+        ...createRatioFormatter2(),
+      },
+    },
+    {
+      fieldName: 'seriousIllnessPersonalRatio',
+      label: '涓汉姣斾緥',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '涓汉缂寸撼姣斾緥',
+        min: 0,
+        max: 1,
+        step: 0.0001,
+        precision: 4,
+        style: { width: '100%' },
+        ...createRatioFormatter2(),
+      },
+    },
+    // 闀挎湡鎶ょ悊
+    {
+      fieldName: 'divider_long_term_care',
+      label: '闀挎湡鎶ょ悊',
+      component: 'Divider',
+      formItemClass: 'col-span-2',
+    },
+    {
+      fieldName: 'longTermCareCompanyRatio',
+      label: '浼佷笟姣斾緥',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '浼佷笟缂寸撼姣斾緥',
+        min: 0,
+        max: 1,
+        step: 0.0001,
+        precision: 4,
+        style: { width: '100%' },
+        ...createRatioFormatter2(),
+      },
+    },
+    {
+      fieldName: 'longTermCarePersonalRatio',
+      label: '涓汉姣斾緥',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '涓汉缂寸撼姣斾緥',
+        min: 0,
+        max: 1,
+        step: 0.0001,
+        precision: 4,
+        style: { width: '100%' },
+        ...createRatioFormatter2(),
+      },
+    },
     // 鍏Н閲�
     {
       fieldName: 'divider_housing',
@@ -307,6 +389,18 @@
       slots: { default: 'housingFundPersonalRatio' },
     },
     {
+      field: 'seriousIllnessPersonalRatio',
+      title: '澶х梾鍖荤枟(涓汉)',
+      width: 120,
+      slots: { default: 'seriousIllnessPersonalRatio' },
+    },
+    {
+      field: 'longTermCarePersonalRatio',
+      title: '闀挎湡鎶ょ悊(涓汉)',
+      width: 120,
+      slots: { default: 'longTermCarePersonalRatio' },
+    },
+    {
       field: 'status',
       title: '鐘舵��',
       width: 80,

--
Gitblit v1.9.3