evo-Financial-vue/src/views/finance/financeStatistics/index.vue
andy c77d12b9ef 开放平台管理
异常通知管理
2026-09-29 08:58:41 +08:00

170 lines
4.7 KiB
Vue

<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工资月份" prop="month">
<el-date-picker clearable
v-model="queryParams.month"
type="month"
value-format="yyyy-MM"
placeholder="请选择工资月份">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="statisticsList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工资月份" align="center" prop="month" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.month, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="统计人数" align="center" prop="number" />
<el-table-column label="审核状态" align="center" prop="status" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
v-hasPermi="['finance:financeStatistics:detail']"
>查看详情</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status ==='待审核'"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['finance:financeStatistics:remove']"
>删除</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status ==='待审核'"
icon="el-icon-check"
@click="handleComfirm(scope.row)"
v-hasPermi="['finance:financeStatistics:confirm']"
>确认发放</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listStatistics, delStatistics, confirmStatistics } from "@/api/finance/financeStatistics";
export default {
name: "FinanceStatistics",
data() {
return {
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工资统计表格数据
statisticsList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
month: null,
},
// 表单参数
form: {},
// 表单校验
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询工资统计列表 */
getList() {
this.loading = true;
listStatistics(this.queryParams).then(response => {
this.statisticsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
month: null,
number: null,
status: null,
remarks: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除工资统计月份为"' + row.month + '"的数据项?').then(function() {
return delStatistics(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleComfirm(row) {
this.$modal.confirm('确发放工资统计月份为"' + row.month + '"的数据项?确认后, 无法恢复').then(function() {
return confirmStatistics(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleDetail(row){
this.$router.push({
path: "/finance/financeDetail",
query: {
month:row.month
}
})
}
}
};
</script>