feat: 薪税管理批次表格增加绩效工资列

前端 BatchTab.tsx:
- 表头增加绩效工资列
- 表体渲染 performanceSalary 单元格
- 绩效工资加入可编辑字段列表

后端 payroll2.routes.ts:
- updateEntrySchema 增加 performanceSalary 字段
- 更新 entry 时接受前端传来的 performanceSalary 值
This commit is contained in:
freedakgmail
2026-08-19 07:24:09 +08:00
parent 1f90ac5021
commit aa39b37f7b
2 changed files with 8 additions and 5 deletions
+4 -2
View File
@@ -702,7 +702,7 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
// 可编辑的输入项字段
const editableFields = isBonus
? ['bonus']
: ['baseSalary', 'overtimePay', 'allowance', 'deduction', 'bonus', 'socialEmp', 'housingEmp', 'socialOrg', 'housingOrg']
: ['baseSalary', 'performanceSalary', 'overtimePay', 'allowance', 'deduction', 'bonus', 'socialEmp', 'housingEmp', 'socialOrg', 'housingOrg']
// 点击单元格进入编辑
const startEdit = (employeeId: string, field: string, currentValue: number) => {
@@ -720,7 +720,7 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
if (!entry) { setEditCell(null); return }
const data: any = {}
// 输入项字段一起提交
const inputFields = isBonus ? ['bonus'] : ['baseSalary', 'overtimePay', 'allowance', 'deduction', 'bonus']
const inputFields = isBonus ? ['bonus'] : ['baseSalary', 'performanceSalary', 'overtimePay', 'allowance', 'deduction', 'bonus']
inputFields.forEach(f => {
data[f] = f === field ? numValue : entry[f]
})
@@ -1176,6 +1176,7 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
<th className="py-2 px-2"></th>
<th className="py-2 px-2"></th>
<th className="py-2 px-2 text-right"></th>
<th className="py-2 px-2 text-right"></th>
<th className="py-2 px-2 text-right"></th>
<th className="py-2 px-2 text-right"></th>
{isBonus && <th className="py-2 px-2 text-right"></th>}
@@ -1228,6 +1229,7 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
})()}
</td>
{renderCell(entry, 'baseSalary')}
{renderCell(entry, 'performanceSalary')}
{renderCell(entry, 'overtimePay')}
{renderCell(entry, 'allowance')}
{renderCell(entry, 'bonus')}