feat: 薪税管理批次表格增加绩效工资列
前端 BatchTab.tsx: - 表头增加绩效工资列 - 表体渲染 performanceSalary 单元格 - 绩效工资加入可编辑字段列表 后端 payroll2.routes.ts: - updateEntrySchema 增加 performanceSalary 字段 - 更新 entry 时接受前端传来的 performanceSalary 值
This commit is contained in:
@@ -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')}
|
||||
|
||||
Reference in New Issue
Block a user