Просмотр исходного кода

fix: 企业小程序 Dashboard 分配人才列表使用真实薪资数据

- 后端 TalentItemSchema 添加 salary 字段
- CompanyService.getRecentAllocations 返回薪资数据
- 前端删除硬编码的 4500,使用 API 返回的实际薪资

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 недель назад
Родитель
Сommit
a37e6f6769

+ 4 - 0
allin-packages/company-module/src/schemas/company-statistics.schema.ts

@@ -91,6 +91,10 @@ export const TalentItemSchema = z.object({
   orderName: z.string().nullable().openapi({
     description: '订单名称',
     example: '2024年第一季度用工订单'
+  }),
+  salary: z.coerce.number().nullable().openapi({
+    description: '个人薪资',
+    example: 5000
   })
 }).openapi('TalentItem');
 

+ 2 - 1
allin-packages/company-module/src/services/company.service.ts

@@ -340,7 +340,8 @@ export class CompanyService extends GenericCrudService<Company> {
         joinDate: talent.joinDate || new Date(),
         workStatus: talent.workStatus,
         orderId: talent.orderId,
-        orderName: talent.order?.orderName
+        orderName: talent.order?.orderName,
+        salary: talent.salaryDetail
       }))
     };
   }

+ 1 - 1
mini/package.json

@@ -1,6 +1,6 @@
 {
   "name": "mini",
-  "version": "0.0.48",
+  "version": "0.0.49",
   "private": true,
   "description": "",
   "templateInfo": {

+ 1 - 1
mini/src/pages/yongren/dashboard/index.tsx

@@ -97,7 +97,7 @@ const Dashboard: React.FC = () => {
       disabilityLevel: talent.disabilityLevel || '未知等级',
       status,
       joinDate,
-      salary: 4500, // 暂时使用默认薪资
+      salary: talent.salary || 0,
       progress: 75   // 暂时使用默认进度
     }
   }