员工补贴页面修改

master
wanglei 7 months ago
parent 9b80e71b7e
commit 5221df8714

@ -42,3 +42,13 @@ export function delButieEmplyee(id) {
method: 'delete' method: 'delete'
}) })
} }
// 查询员工补贴 列表
export function listSummary(query) {
return request({
url: '/pay/butieEmplyee/summary',
method: 'get',
params: query
})
}

@ -1,134 +1,151 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="租户id" prop="tenantId">
<el-input
v-model="queryParams.tenantId"
placeholder="请输入租户id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="补贴id" prop="butieId">
<el-input
v-model="queryParams.butieId"
placeholder="请输入补贴id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工id" prop="employeeId">
<el-input
v-model="queryParams.employeeId"
placeholder="请输入员工id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="补贴扣减金额" prop="money">
<el-input
v-model="queryParams.money"
placeholder="请输入补贴扣减金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年月日期" prop="date">
<el-input
v-model="queryParams.date"
placeholder="请输入年月日期"
clearable
@keyup.enter.native="handleQuery"
/>
</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-row :gutter="10" class="mb8"> <div class="company" v-if="!$store.state.user.tenantId">
<el-col :span="1.5"> <el-input
<el-button style="width: 200px"
type="primary" placeholder="公司名称"
plain size="small"
icon="el-icon-plus" prefix-icon="el-icon-search"
size="mini" v-model="gsInfo.tenantName"
@click="handleAdd" @keyup.enter.native="getGsInfoList">
v-hasPermi="['pay:butieEmplyee:add']" </el-input>
>新增</el-button> <div class="cp-content" style="width: 200px">
</el-col> <div :class="gsInfo.active_id===item.id?'cp-item active':'cp-item'" @click="changCompany(item.id)" v-for="item in gsInfo.list">{{ item.name }}</div>
<el-col :span="1.5"> </div>
<el-button </div>
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['pay:butieEmplyee:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['pay:butieEmplyee:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['pay:butieEmplyee:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="butieEmplyeeList" @selection-change="handleSelectionChange"> <div :class="$store.state.user.tenantId?'content-all':'content'">
<el-table-column type="selection" width="55" align="center" /> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-table-column label="主键ID" align="center" prop="id" v-if="true"/> <el-form-item label="租户id" prop="tenantId">
<el-table-column label="租户id" align="center" prop="tenantId" /> <el-input
<el-table-column label="补贴id" align="center" prop="butieId" /> v-model="queryParams.tenantId"
<el-table-column label="员工id" align="center" prop="employeeId" /> placeholder="请输入租户id"
<el-table-column label="补贴扣减金额" align="center" prop="money" /> clearable
<el-table-column label="年月日期" align="center" prop="date" /> @keyup.enter.native="handleQuery"
<el-table-column label="备注" align="center" prop="remark" /> />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> </el-form-item>
<template slot-scope="scope"> <el-form-item label="补贴id" prop="butieId">
<el-input
v-model="queryParams.butieId"
placeholder="请输入补贴id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工id" prop="employeeId">
<el-input
v-model="queryParams.employeeId"
placeholder="请输入员工id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="补贴扣减金额" prop="money">
<el-input
v-model="queryParams.money"
placeholder="请输入补贴扣减金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年月日期" prop="date">
<el-input
v-model="queryParams.date"
placeholder="请输入年月日期"
clearable
@keyup.enter.native="handleQuery"
/>
</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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button <el-button
type="primary"
plain
icon="el-icon-plus"
size="mini" size="mini"
type="text" @click="handleAdd"
v-hasPermi="['pay:butieEmplyee:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['pay:butieEmplyee:edit']" v-hasPermi="['pay:butieEmplyee:edit']"
>修改</el-button> >修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button <el-button
size="mini" type="danger"
type="text" plain
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['pay:butieEmplyee:remove']" v-hasPermi="['pay:butieEmplyee:remove']"
>删除</el-button> >删除</el-button>
</template> </el-col>
</el-table-column> <el-col :span="1.5">
</el-table> <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['pay:butieEmplyee:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="butieEmplyeeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键ID" align="center" prop="id" v-if="true"/>
<el-table-column label="租户id" align="center" prop="tenantId" />
<el-table-column label="补贴id" align="center" prop="butieId" />
<el-table-column label="员工id" align="center" prop="employeeId" />
<el-table-column label="补贴扣减金额" align="center" prop="money" />
<el-table-column label="年月日期" align="center" prop="date" />
<el-table-column label="备注" align="center" prop="remark" />
<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-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['pay:butieEmplyee:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['pay:butieEmplyee:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
</div>
<!-- 添加或修改补贴和员工联系对话框 --> <!-- 添加或修改补贴和员工联系对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@ -161,12 +178,19 @@
</template> </template>
<script> <script>
import { listButieEmplyee, getButieEmplyee, delButieEmplyee, addButieEmplyee, updateButieEmplyee } from "@/api/pay/butieEmplyee"; import { listSummary, getButieEmplyee, delButieEmplyee, addButieEmplyee, updateButieEmplyee } from "@/api/pay/butieEmplyee";
import { listTenant } from "@/api/pay/tenant";
export default { export default {
name: "ButieEmplyee", name: "ButieEmplyee",
data() { data() {
return { return {
//
gsInfo:{
tenantName:'',
active_id:this.$store.state.user.tenantId,
list:[]
},
// loading // loading
buttonLoading: false, buttonLoading: false,
// //
@ -226,13 +250,38 @@ export default {
}; };
}, },
created() { created() {
this.getList(); if (!this.$store.state.user.tenantId) {
this.getGsInfoList()
}else {
this.gsInfo.active_id = this.$store.state.user.tenantId
this.getList();
}
}, },
methods: { methods: {
//
getGsInfoList(){
listTenant({ name: this.gsInfo.tenantName }).then(response => {
if(response.rows.length>0){
this.gsInfo.list = response.rows;
this.gsInfo.active_id = this.gsInfo.list[0].id
this.getList()
}else{
this.$alert(`没有查到相关公司,暂无数据!`, `提示`, {
type: 'warning'
});
}
});
},
//
changCompany(id){
this.gsInfo.active_id = id
this.getList()
},
/** 查询补贴和员工联系列表 */ /** 查询补贴和员工联系列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listButieEmplyee(this.queryParams).then(response => { this.queryParams.tenantId = this.gsInfo.active_id;
listSummary(this.queryParams).then(response => {
this.butieEmplyeeList = response.rows; this.butieEmplyeeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -343,3 +392,43 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss">
.app-container {
display: flex;
.company {
border-radius: 5px;
width: 230px;
height: calc(100vh - 115px);
overflow-y: auto;
.cp-content {
margin-top: 20px;
.cp-item {
cursor: pointer;
padding: 6px 10px 6px 5px;
color: #424242;
font-size: 14px;
&:hover {
background: #f6f6f6;
}
}
.active{
background: #edf6ff;
}
}
}
.content{
padding-left: 15px;
width: calc(100% - 250px);
.el-button--medium {
padding: 2px 0px;
}
}
.content-all{
width: 100%;
.el-button--medium {
padding: 2px 0px;
}
}
}
</style>

Loading…
Cancel
Save