莳松-行政管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-oa-manage-web/src/views/Finance/Salary/index.vue

101 lines
2.6 KiB

9 months ago
<template>
<div>
9 months ago
<el-form :model="searchForm" inline @submit.prevent>
9 months ago
<el-form-item>
9 months ago
<el-input
v-model="searchForm.name"
placeholder="请输入员工姓名"
9 months ago
clearable
9 months ago
@keyup.enter="handleQuery"
/>
9 months ago
</el-form-item>
<el-form-item>
9 months ago
<el-radio-group v-model="searchForm.status" @change="handleQuery">
9 months ago
<el-radio :label="0"> 在职 </el-radio>
<el-radio :label="1"> 离职 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
9 months ago
<el-button @click="handleQuery" v-hasPermi="['finance:salary:search']">搜索</el-button>
9 months ago
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border stripe>
<el-table-column type="index" width="50" />
9 months ago
<el-table-column label="员工姓名" prop="name" />
<el-table-column label="职位" prop="post" />
<el-table-column label="手机号码" prop="mobile" />
<el-table-column label="在职状态">
<template #default="{ row }">
{{ ['在职', '离职'][row.status] }}
</template>
</el-table-column>
9 months ago
<el-table-column label="操作">
<template #default="scope">
9 months ago
<el-button
type="primary"
link
@click="openForm(scope.row)"
v-hasPermi="['finance:salary:set']"
>
工资条设置
</el-button>
9 months ago
</template>
</el-table-column>
</el-table>
<Pagination
:total="total"
v-model:page="searchForm.pageNo"
v-model:limit="searchForm.pageSize"
@pagination="getList"
/>
<DialogSalary ref="salaryDialogRef" @success="getList" />
</div>
</template>
<script name="EmployeeList" setup>
9 months ago
import DialogSalary from './Comp/DialogSalary.vue'
9 months ago
// import * as SalaryApi from '@/api/finance/salary'
import { getEmployeePage } from '@/api/pers/employee'
9 months ago
import { removeNullField } from '@/utils'
9 months ago
const searchForm = ref({
name: undefined,
status: 0,
pageNo: 1,
pageSize: 20
})
9 months ago
onMounted(() => {
handleQuery()
})
9 months ago
/** 搜索按钮操作 */
const handleQuery = () => {
searchForm.value.pageNo = 1
getList()
}
const loading = ref(false)
const tableList = ref([])
const total = ref(0)
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
9 months ago
const data = await getEmployeePage(removeNullField(searchForm.value))
9 months ago
tableList.value = data.list
total.value = data.total
9 months ago
} finally {
loading.value = false
}
}
const salaryDialogRef = ref()
function openForm(row) {
salaryDialogRef.value.open(row)
}
</script>
<style lang="scss" scoped></style>