| | |
| | | <el-descriptions :column="3" border> |
| | | <el-descriptions-item label="工资主题">{{ auditData?.salaryTitle || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工资月份">{{ auditData?.salaryMonth || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工作日天数">{{ auditData?.monthWorkDays ?? '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="工资总额">¥ {{ formatMoney(auditData?.totalSalary) }}</el-descriptions-item> |
| | | <el-descriptions-item label="支付银行">{{ auditData?.payBank || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核人">{{ auditData?.auditUserName || '-' }}</el-descriptions-item> |
| | |
| | | <div v-else> |
| | | <el-table :data="employeeList" border max-height="300" style="width: 100%"> |
| | | <el-table-column prop="staffName" label="员工姓名" width="100" /> |
| | | <el-table-column prop="entryDate" label="入司日期" width="110" /> |
| | | <el-table-column prop="deptName" label="部门" width="120" /> |
| | | <el-table-column prop="basicSalary" label="基本工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.basicSalary) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="pieceSalary" label="计件工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.pieceSalary) }}</template> |
| | | <el-table-column prop="attendanceBonus" label="全勤奖" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.attendanceBonus) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="hourlySalary" label="计时工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.hourlySalary) }}</template> |
| | | <el-table-column prop="dailySalary" label="日计工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.dailySalary) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="workDays" label="出勤天数" width="90" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.workDays, 0) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="conversionRatio" label="效益" width="90" align="right"> |
| | | <template #default="{ row }">{{ formatRate(row.conversionRatio) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="monthTimeTotal" label="月时间合计" width="110" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.monthTimeTotal, 2) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="otherIncome" label="其他收入" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.otherIncome) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="personalLeave" label="事假" width="80" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.personalLeave, 0) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="sickLeave" label="病假" width="80" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.sickLeave, 0) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="bereavementLeave" label="丧假" width="80" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.bereavementLeave, 0) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="marriageLeave" label="婚假" width="80" align="right"> |
| | | <template #default="{ row }">{{ formatNumber(row.marriageLeave, 0) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="allowance" label="津贴" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.allowance) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="socialPersonal" label="社保个人" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.socialPersonal) }}</template> |
| | |
| | | <el-table-column prop="fundPersonal" label="公积金个人" width="120" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.fundPersonal) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="otherDeduct" label="其他支出" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.otherDeduct) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="socialSupplementAmount" label="社保补缴" width="110" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.socialSupplementAmount) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="salaryTax" label="工资个税" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.salaryTax) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="grossSalary" label="应发工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.grossSalary) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="deductSalary" label="应扣工资" width="100" align="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.deductSalary) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="netSalary" label="实发工资" width="100" align="right" fixed="right"> |
| | | <template #default="{ row }">¥ {{ formatMoney(row.netSalary) }}</template> |
| | |
| | | return num.toFixed(2); |
| | | }; |
| | | |
| | | const formatNumber = (value, digits = 2) => { |
| | | const num = Number(value) || 0; |
| | | return num.toFixed(digits); |
| | | }; |
| | | |
| | | const formatRate = (value) => { |
| | | const num = Number(value) || 0; |
| | | return num.toFixed(4); |
| | | }; |
| | | |
| | | // 计算工资总额 |
| | | const totalSalary = computed(() => { |
| | | return employeeList.value.reduce((sum, e) => { |
| | |
| | | if (row?.staffSalaryDetailList && Array.isArray(row.staffSalaryDetailList)) { |
| | | employeeList.value = row.staffSalaryDetailList.map((e) => ({ |
| | | staffName: e.staffName ?? "", |
| | | entryDate: e.entryDate ?? "", |
| | | deptName: e.deptName ?? "", |
| | | basicSalary: Number(e.basicSalary) || 0, |
| | | attendanceBonus: Number(e.attendanceBonus) || 0, |
| | | dailySalary: Number(e.dailySalary) || (Number(e.workDays) > 0 ? (Number(e.basicSalary) / Number(e.workDays)) : 0), |
| | | workDays: Number(e.workDays) || 0, |
| | | pieceSalary: Number(e.pieceSalary) || 0, |
| | | hourlySalary: Number(e.hourlySalary) || 0, |
| | | otherIncome: Number(e.otherIncome) || 0, |
| | | personalLeave: Number(e.personalLeave) || 0, |
| | | sickLeave: Number(e.sickLeave) || 0, |
| | | bereavementLeave: Number(e.bereavementLeave) || 0, |
| | | marriageLeave: Number(e.marriageLeave) || 0, |
| | | allowance: Number(e.allowance) || 0, |
| | | socialPersonal: Number(e.socialPersonal) || 0, |
| | | fundPersonal: Number(e.fundPersonal) || 0, |
| | | otherDeduct: Number(e.otherDeduct) || 0, |
| | | socialSupplementAmount: Number(e.socialSupplementAmount) || 0, |
| | | salaryTax: Number(e.salaryTax) || 0, |
| | | grossSalary: Number(e.grossSalary) || 0, |
| | | deductSalary: Number(e.deductSalary) || 0, |
| | | netSalary: Number(e.netSalary) || 0, |
| | | monthTimeTotal: Number(e.monthTimeTotal) || 0, |
| | | conversionRatio: Number(e.conversionRatio) || 0, |
| | | })); |
| | | } else { |
| | | console.log('没有找到员工明细数据'); |
| | |
| | | :deep(.el-descriptions__label) { |
| | | width: 100px; |
| | | } |
| | | </style> |
| | | </style> |