| | |
| | | @input="row.hourlySalary = parseNum(row.hourlySalary)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="加班时长" |
| | | minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input :model-value="formatHours(row.overtimeHours)" |
| | | placeholder="0.00" |
| | | size="small" |
| | | disabled /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="加班工资" |
| | | minWidth="110"> |
| | | <template #default="{ row }"> |
| | | <el-input v-model.number="row.overtimePay" |
| | | type="number" |
| | | placeholder="0" |
| | | size="small" |
| | | @input="handleOvertimePayInput(row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="其他收入" |
| | | minWidth="110"> |
| | | <template #default="{ row }"> |
| | |
| | | return isNaN(n) ? 0 : n; |
| | | } |
| | | |
| | | // 加班时长按小时展示,固定两位小数 |
| | | function formatHours(v) { |
| | | return parseNum(v).toFixed(2); |
| | | } |
| | | |
| | | function parseNullableNum(v) { |
| | | if (v === "" || v == null) return null; |
| | | const n = Number(v); |
| | |
| | | basicSalary: 0, |
| | | pieceSalary: 0, |
| | | hourlySalary: 0, |
| | | overtimeHours: 0, |
| | | overtimePay: 0, |
| | | otherIncome: 0, |
| | | socialPersonal: 0, |
| | | fundPersonal: 0, |
| | |
| | | basicSalary: parseNum(source?.basicSalary ?? fallback.basicSalary), |
| | | pieceSalary: parseNum(source?.pieceSalary ?? fallback.pieceSalary), |
| | | hourlySalary: parseNum(source?.hourlySalary ?? fallback.hourlySalary), |
| | | overtimeHours: parseNum(source?.overtimeHours ?? fallback.overtimeHours), |
| | | overtimePay: parseNum(source?.overtimePay ?? fallback.overtimePay), |
| | | otherIncome: parseNum(source?.otherIncome ?? fallback.otherIncome), |
| | | socialPersonal: parseNum(source?.socialPersonal ?? fallback.socialPersonal), |
| | | fundPersonal: parseNum(source?.fundPersonal ?? fallback.fundPersonal), |
| | |
| | | basicSalary: parseNum(row.basicSalary), |
| | | pieceSalary: parseNum(row.pieceSalary), |
| | | hourlySalary: parseNum(row.hourlySalary), |
| | | overtimePay: parseNum(row.overtimePay), |
| | | otherIncome: parseNum(row.otherIncome), |
| | | otherDeduct: parseNum(row.otherDeduct), |
| | | socialSupplementAmount: parseNullableNum(row.socialSupplementAmount), |
| | |
| | | const handleSalaryInput = row => { |
| | | row.basicSalary = parseNum(row.basicSalary); |
| | | row.otherIncome = parseNum(row.otherIncome); |
| | | requestEmployeeRecalculate(row); |
| | | }; |
| | | |
| | | // 加班工资(手填):重新计算应发工资、个税和实发工资 |
| | | const handleOvertimePayInput = row => { |
| | | row.overtimePay = parseNum(row.overtimePay); |
| | | requestEmployeeRecalculate(row); |
| | | }; |
| | | |
| | |
| | | basicSalary: parseNum(e.basicSalary), |
| | | pieceSalary: parseNum(e.pieceSalary), |
| | | hourlySalary: parseNum(e.hourlySalary), |
| | | overtimeHours: parseNum(e.overtimeHours), |
| | | overtimePay: parseNum(e.overtimePay), |
| | | otherIncome: parseNum(e.otherIncome), |
| | | socialPersonal: parseNum(e.socialPersonal), |
| | | fundPersonal: parseNum(e.fundPersonal), |