|
|
@ -1,17 +1,21 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form :model="searchForm" ref="searchFormRef" inline> |
|
|
|
<el-form :model="searchForm" ref="searchFormRef" inline @submit.prevent> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="searchForm.employeeName" placeholder="员工姓名" /> |
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="searchForm.name" |
|
|
|
|
|
|
|
placeholder="员工姓名" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
@keyup.enter="handleSearch" |
|
|
|
|
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker |
|
|
|
v-model="searchForm.month" |
|
|
|
v-model="searchForm.yearmonth" |
|
|
|
type="month" |
|
|
|
type="month" |
|
|
|
placeholder="年月" |
|
|
|
placeholder="年月" |
|
|
|
format="YYYY-MM" |
|
|
|
|
|
|
|
value-format="YYYY-MM" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
@change="handleSearch" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
@ -66,26 +70,26 @@ |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.allowanceSalary" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.allowanceSalary }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="提成" min-width="90px"> |
|
|
|
<el-table-column label="提成" min-width="90px"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.percentageSalary" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.percentageSalary }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="奖金" min-width="90px"> |
|
|
|
<el-table-column label="奖金" min-width="90px"> |
|
|
@ -105,13 +109,13 @@ |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.fullWorkSalary" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.fullWorkSalary }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="其他" min-width="90px"> |
|
|
|
<el-table-column label="其他" min-width="90px"> |
|
|
@ -127,7 +131,7 @@ |
|
|
|
<span v-else> {{ row.extraSalary }}</span> |
|
|
|
<span v-else> {{ row.extraSalary }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="小计" min-width="90px" /> |
|
|
|
<el-table-column label="小计" prop="salaryTotal" min-width="90px" /> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应扣工资" align="center"> |
|
|
|
<el-table-column label="应扣工资" align="center"> |
|
|
|
<el-table-column label="绩效" min-width="90px"> |
|
|
|
<el-table-column label="绩效" min-width="90px"> |
|
|
@ -147,13 +151,13 @@ |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.leaveDayDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.leaveDayDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column min-width="90px"> |
|
|
|
<el-table-column min-width="90px"> |
|
|
@ -163,39 +167,39 @@ |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.absenceDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.absenceDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="旷工" min-width="90px"> |
|
|
|
<el-table-column label="旷工" min-width="90px"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.skipWorkDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.skipWorkDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="违纪" min-width="90px"> |
|
|
|
<el-table-column label="违纪" min-width="90px"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.breachDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.breachDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="公积金" min-width="90px"> |
|
|
|
<el-table-column label="公积金" min-width="90px"> |
|
|
@ -228,31 +232,31 @@ |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.taxDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.taxDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="其他" min-width="90px"> |
|
|
|
<el-table-column label="其他" min-width="90px"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-input-number |
|
|
|
<el-input-number |
|
|
|
v-if="row.edit" |
|
|
|
v-if="row.edit" |
|
|
|
v-model="row.jbgz" |
|
|
|
v-model="row.extraDeduct" |
|
|
|
:min="0" |
|
|
|
:min="0" |
|
|
|
:controls="false" |
|
|
|
:controls="false" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
style="width: 65px" |
|
|
|
style="width: 65px" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span v-else> {{ row.jbgz }}</span> |
|
|
|
<span v-else> {{ row.extraDeduct }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="小计" min-width="90px" /> |
|
|
|
<el-table-column label="小计" prop="deductTotal" min-width="90px" /> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="实发工资" fixed="right" width="90" /> |
|
|
|
<el-table-column label="实发工资" prop="gantSalary" fixed="right" width="90" /> |
|
|
|
<el-table-column label="操作" fixed="right" width="200"> |
|
|
|
<el-table-column label="操作" fixed="right" width="200"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
@ -288,38 +292,66 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Pagination |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
v-model:page="searchForm.pageNo" |
|
|
|
|
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
|
|
|
|
@pagination="getList" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<DialogCreateSalary ref="createSalaryRef" @success="getList" /> |
|
|
|
<DialogCreateSalary ref="createSalaryRef" @success="getList" /> |
|
|
|
|
|
|
|
<DialogSalaryImport ref="importSalaryRef" @success="getList" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="SalarySlip"> |
|
|
|
<script setup name="SalarySlip"> |
|
|
|
import DialogCreateSalary from './Comp/DialogCreateSalary.vue' |
|
|
|
import DialogCreateSalary from './Comp/DialogCreateSalary.vue' |
|
|
|
const searchForm = ref({}) |
|
|
|
import DialogSalaryImport from './Comp/DialogSalaryImport.vue' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { removeNullField } from '@/utils' |
|
|
|
|
|
|
|
import * as SalaryApi from '@/api/home/salary.js' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
|
|
|
|
name: undefined, |
|
|
|
|
|
|
|
yearmonth: undefined, |
|
|
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
|
|
pageSize: 50 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
handleSearch() |
|
|
|
handleSearch() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function handleSearch() { |
|
|
|
function handleSearch() { |
|
|
|
searchForm.value.pageNO = 1 |
|
|
|
searchForm.value.pageNo = 1 |
|
|
|
getList() |
|
|
|
getList() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const loading = ref(false) |
|
|
|
const loading = ref(false) |
|
|
|
const tableList = ref([]) |
|
|
|
const tableList = ref([]) |
|
|
|
const total = ref(0) |
|
|
|
const total = ref(0) |
|
|
|
function getList() { |
|
|
|
async function getList() { |
|
|
|
tableList.value = [ |
|
|
|
loading.value = true |
|
|
|
{ |
|
|
|
try { |
|
|
|
yearmonth: '2024-06', |
|
|
|
let params = { |
|
|
|
id: 1, |
|
|
|
...searchForm.value |
|
|
|
children: [ |
|
|
|
} |
|
|
|
{ id: 11, name: '张三' }, |
|
|
|
if (params.yearmonth) { |
|
|
|
{ id: 12, name: '李四' } |
|
|
|
params = { |
|
|
|
] |
|
|
|
...params, |
|
|
|
|
|
|
|
year: new Date(params.yearmonth).getFullYear(), |
|
|
|
|
|
|
|
month: new Date(params.yearmonth).getMonth() + 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const data = await SalaryApi.getSalaryPage(removeNullField(params)) |
|
|
|
|
|
|
|
tableList.value = data.list |
|
|
|
|
|
|
|
total.value = data.total |
|
|
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
console.log(err) |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
total.value = 0 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const createSalaryRef = ref() |
|
|
|
const createSalaryRef = ref() |
|
|
@ -327,7 +359,10 @@ function craeteSalary() { |
|
|
|
createSalaryRef.value.open() |
|
|
|
createSalaryRef.value.open() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function importHistorySalary() {} |
|
|
|
const importSalaryRef = ref() |
|
|
|
|
|
|
|
function importHistorySalary() { |
|
|
|
|
|
|
|
importSalaryRef.value.open() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function spanMethod({ row, columnIndex }) { |
|
|
|
function spanMethod({ row, columnIndex }) { |
|
|
|
if (row.children && row.children.length > 0) { |
|
|
|
if (row.children && row.children.length > 0) { |
|
|
|