Compare commits
10
Commits
943093ed5e
..
zgs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3609558042 | ||
|
|
a570dde8b7 | ||
|
|
1ff292a3d8 | ||
|
|
a7f1d11435 | ||
|
|
b57cdf35a2 | ||
|
|
dd56481b52 | ||
|
|
4cb9f7cd67 | ||
|
|
d351368ba4 | ||
|
|
b6645238fd | ||
|
|
aad82d10a2 |
@@ -49,12 +49,13 @@ export function getNonGroupUsers() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加/修改组内人员角色
|
// 更新组内用户角色
|
||||||
export function updateGroupUserRole(groupId, userid, role) {
|
export const updateGroupUserRole = (data) => {
|
||||||
return service({
|
return service({
|
||||||
url: `/group/${groupId}/user/${userid}/role/${role}`,
|
url: '/group/user',
|
||||||
method: "post",
|
method: 'post',
|
||||||
});
|
data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取组内人员列表
|
// 获取组内人员列表
|
||||||
@@ -98,10 +99,11 @@ export function updateUserSalaryConfig(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 添加用户到组
|
// 添加用户到组
|
||||||
export function addUserToGroup(groupId, userid, role) {
|
export function addUserToGroup(data) {
|
||||||
return service({
|
return service({
|
||||||
url: `/group/${groupId}/user/${userid}/role/${role}`,
|
url: '/group/user',
|
||||||
method: 'post'
|
method: 'post',
|
||||||
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import request from './request'
|
||||||
|
|
||||||
|
// 获取最低工资配置
|
||||||
|
export function getMinimumWageConfig() {
|
||||||
|
return request({
|
||||||
|
url: '/config',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新最低工资配置
|
||||||
|
export function updateMinimumWageConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/config',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
+2
-2
@@ -10,13 +10,13 @@ const errorCode = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 肖星越服务
|
// 肖星越服务
|
||||||
const url = "https://paystubs.vip.cpolar.top";
|
// const url = "http://192.168.31.182:8088";
|
||||||
|
|
||||||
// 袁永军测试服务
|
// 袁永军测试服务
|
||||||
// const url = "https://crm-test.scdswj.cn/prod-api";
|
// const url = "https://crm-test.scdswj.cn/prod-api";
|
||||||
|
|
||||||
// 正式环境
|
// 正式环境
|
||||||
// const url = "https://paystubs.vip.cpolar.top";
|
const url = "https://payroll.scdswj.cn/prod-api";
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: url,
|
baseURL: url,
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -35,7 +35,7 @@ export default {
|
|||||||
mounted(el, binding) {
|
mounted(el, binding) {
|
||||||
const { value } = binding
|
const { value } = binding
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
||||||
const userRole = userInfo.role || 0
|
const userRole = userInfo.roles || 0
|
||||||
|
|
||||||
// 如果没有权限配置,默认显示
|
// 如果没有权限配置,默认显示
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-icon class="icon-style" id="collapseIcon" @click="changeShrinkage">
|
<!-- <el-icon class="icon-style" id="collapseIcon" @click="changeShrinkage">
|
||||||
<component :is="!isCollapse ? 'Fold' : 'Expand'"></component>
|
<component :is="!isCollapse ? 'Fold' : 'Expand'"></component>
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
<el-breadcrumb separator="/" id="breadcrumb">
|
<el-breadcrumb separator="/" id="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="index">
|
<el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="index">
|
||||||
<span class="no-redirect" v-if="index === breadcrumbList.length - 1" :style="{ color: themeConfig.footColor }">{{ item.meta.name }}</span>
|
<span class="no-redirect" v-if="index === breadcrumbList.length - 1" :style="{ color: themeConfig.footColor }">{{
|
||||||
<span class="redirect" v-else @click="handleRedirect(item.path)" :style="{ color: themeConfig.footColor }">{{ item.meta.name }}</span>
|
item.meta.name }}</span>
|
||||||
|
<span class="redirect" v-else @click="handleRedirect(item.path)" :style="{ color: themeConfig.footColor }">{{
|
||||||
|
item.meta.name }}</span>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</template>
|
</template>
|
||||||
@@ -19,7 +21,7 @@ const route = useRoute();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const breadcrumbList = ref([]);
|
const breadcrumbList = ref([]);
|
||||||
const isCollapse = ref(false);
|
const isCollapse = ref(true);
|
||||||
const globalStore = useStore();
|
const globalStore = useStore();
|
||||||
const themeConfig = store.getters.themeConfig;
|
const themeConfig = store.getters.themeConfig;
|
||||||
const initBreadcrumbList = () => {
|
const initBreadcrumbList = () => {
|
||||||
@@ -49,13 +51,16 @@ watch(
|
|||||||
// color: #97a8be;
|
// color: #97a8be;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.redirect {
|
.redirect {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #97a8be;
|
color: #97a8be;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-style {
|
.icon-style {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<template v-for="subItem in menuList" :key="subItem.path">
|
<template v-for="subItem in menuList" :key="subItem.path">
|
||||||
<el-menu-item v-if="!subItem.children" :index="subItem.url" :route="subItem.url">
|
<el-menu-item v-if="!subItem.children" :index="subItem.url" :route="subItem.url">
|
||||||
<el-icon>
|
<!-- <el-icon>
|
||||||
<component :is="subItem.icon"></component>
|
<component :is="subItem.icon"></component>
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
<span>{{ subItem.title }}</span>
|
<span>{{ subItem.title }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<!--有多级菜单-->
|
<!--有多级菜单-->
|
||||||
<el-sub-menu v-if="subItem.children" :key="subItem.url" :index="subItem.url">
|
<el-sub-menu v-if="subItem.children" :key="subItem.url" :index="subItem.url">
|
||||||
<template #title>
|
<template #title>
|
||||||
<el-icon>
|
<!-- <el-icon>
|
||||||
<component :is="subItem.icon"></component>
|
<component :is="subItem.icon"></component>
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
<span> {{ subItem.title }}</span>
|
<span> {{ subItem.title }}</span>
|
||||||
</template>
|
</template>
|
||||||
<!--递归组件,把遍历的值传回子组件,完成递归调用-->
|
<!--递归组件,把遍历的值传回子组件,完成递归调用-->
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="guide" class="menu" :style="{
|
<div id="guide" class="menu" :style="{
|
||||||
width: store.getters.isCollapse == true ? '' : '200px',
|
width: '200px',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
color: themeConfig.textColor,
|
color: themeConfig.textColor,
|
||||||
}">
|
}">
|
||||||
<div class="logo" v-if="!store.getters.isCollapse">
|
<div class="logo">
|
||||||
<img src="../../assets/logo.png" alt="" style="margin-right: 5px" /> BIG CUTE
|
<img src="../../assets/logo2.jpg" alt="" style="margin-right: 5px" /> 工资核算系统
|
||||||
</div>
|
|
||||||
<div class="logo" v-else>
|
|
||||||
<img src="../../assets/logo.png" alt="" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-scrollbar style="height: 100%">
|
<el-scrollbar style="height: 100%">
|
||||||
<el-menu :default-active="activeMenu" :router="true" :collapse="store.getters.isCollapse"
|
<el-menu :default-active="activeMenu" :router="true" :collapse="false" :collapse-transition="false"
|
||||||
:collapse-transition="false" :unique-opened="true" :background-color="themeConfig.backgroundColor"
|
:unique-opened="true" :background-color="themeConfig.backgroundColor" :text-color="themeConfig.textColor"
|
||||||
:text-color="themeConfig.textColor" :active-text-color="themeConfig.primary">
|
:active-text-color="themeConfig.primary">
|
||||||
<menuItems :menuList="menuList"></menuItems>
|
<menuItems :menuList="menuList"></menuItems>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
@@ -46,7 +44,7 @@ const themeConfig = store.getters.themeConfig;
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
const menuTable = generateMenu(routerList, userInfo.role)
|
const menuTable = generateMenu(routerList, userInfo.roles)
|
||||||
// 获取本地菜单表渲染
|
// 获取本地菜单表渲染
|
||||||
menuList.value = menuTable;
|
menuList.value = menuTable;
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@ import "@kangc/v-md-editor/lib/theme/style/vuepress.css";
|
|||||||
import VConsole from "vconsole";
|
import VConsole from "vconsole";
|
||||||
import authDirective from './directives/auth'
|
import authDirective from './directives/auth'
|
||||||
// 或者使用配置参数来初始化,详情见文档
|
// 或者使用配置参数来初始化,详情见文档
|
||||||
const vConsole = new VConsole({ theme: "dark" });
|
// const vConsole = new VConsole({ theme: "dark" });
|
||||||
VMdEditor.use(vuepressTheme);
|
// VMdEditor.use(vuepressTheme);
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
// 小图标引用
|
// 小图标引用
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 递归处理路由列表生成菜单数据
|
// 递归处理路由列表生成菜单数据
|
||||||
export const generateMenu = (routes, userRole) => {
|
export const generateMenu = (routes, userRoles) => {
|
||||||
const menuList = [];
|
const menuList = [];
|
||||||
|
|
||||||
// 递归处理路由
|
// 递归处理路由
|
||||||
@@ -7,9 +7,16 @@ export const generateMenu = (routes, userRole) => {
|
|||||||
// 检查路由是否需要权限验证
|
// 检查路由是否需要权限验证
|
||||||
if (route.meta && route.meta.requiresAuth) {
|
if (route.meta && route.meta.requiresAuth) {
|
||||||
// 检查用户角色是否有权限访问
|
// 检查用户角色是否有权限访问
|
||||||
if (route.meta.roles && !route.meta.roles.includes(userRole)) {
|
if (route.meta.roles) {
|
||||||
return null;
|
const hasPermission = userRoles.some(role =>
|
||||||
|
route.meta.roles.includes(Number(role))
|
||||||
|
);
|
||||||
|
if (!hasPermission) {
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const menuItem = {
|
const menuItem = {
|
||||||
title: route.meta.name,
|
title: route.meta.name,
|
||||||
@@ -61,7 +68,7 @@ export const generateMenu = (routes, userRole) => {
|
|||||||
|
|
||||||
// 使用示例
|
// 使用示例
|
||||||
/*
|
/*
|
||||||
const userRole = 2; // 用户角色
|
const userRoles = [2]; // 用户角色
|
||||||
const menuList = generateMenu(routerList, userRole);
|
const menuList = generateMenu(routerList, userRoles);
|
||||||
console.log(menuList);
|
console.log(menuList);
|
||||||
*/
|
*/
|
||||||
@@ -141,6 +141,18 @@ const routerList = [
|
|||||||
icon: "Notebook",
|
icon: "Notebook",
|
||||||
roles: [3] // 只有财务角色可以访问
|
roles: [3] // 只有财务角色可以访问
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/config',
|
||||||
|
name: 'MinimumWageConfig',
|
||||||
|
component: () => import('../views/payroll/config/index.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '当地最低工资查询',
|
||||||
|
name: "当地最低工资查询",
|
||||||
|
requiresAuth: true,
|
||||||
|
icon: "Notebook",
|
||||||
|
roles: [3] // 只有财务角色可以访问
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="primary" size="small" @click="handleAdd" v-auth="'group:add'">添加组别</el-button>
|
<el-button type="primary" size="small" @click="handleAdd" v-if="canAdd">添加组别</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
{{ scope.row.createTime || "暂无" }}
|
{{ scope.row.createTime || "暂无" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="180" fixed="right" align="center" v-if="userRole === 2">
|
<el-table-column label="操作" width="180" fixed="right" align="center" v-if="canEdit || canDelete">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" link size="small" @click.stop="handleEdit(scope.row)"
|
<el-button type="primary" link size="small" @click.stop="handleEdit(scope.row)"
|
||||||
v-auth="'group:edit'">编辑</el-button>
|
v-if="canEdit">编辑</el-button>
|
||||||
<el-button type="danger" link size="small" @click.stop="handleDelete(scope.row)"
|
<el-button type="danger" link size="small" @click.stop="handleDelete(scope.row)"
|
||||||
v-auth="'group:delete'">删除</el-button>
|
v-if="canDelete">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="primary" size="small" @click="handleAddUser" v-auth="'member:add'">添加成员</el-button>
|
<el-button type="primary" size="small" @click="handleAddUser" v-if="canAddMember">添加成员</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -64,39 +64,45 @@
|
|||||||
<!-- 组内人员列表 -->
|
<!-- 组内人员列表 -->
|
||||||
<div class="user-section">
|
<div class="user-section">
|
||||||
<el-table :data="groupUsers" style="width: 100%" height="calc(100vh - 280px)" border stripe>
|
<el-table :data="groupUsers" style="width: 100%" height="calc(100vh - 280px)" border stripe>
|
||||||
<el-table-column label="头像" align="center">
|
<el-table-column label="头像" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-avatar :size="40" :src="scope.row.avatar" />
|
<el-avatar :size="40" :src="scope.row.avatar" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="姓名" show-overflow-tooltip />
|
<el-table-column prop="name" label="姓名" show-overflow-tooltip />
|
||||||
<el-table-column label="角色" align="center">
|
<el-table-column label="角色" align="center" width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="userRole === 2">
|
<template v-if="canManageRole">
|
||||||
<el-select v-model="scope.row.role" placeholder="选择角色" size="small"
|
<el-select v-model="scope.row.roles" placeholder="选择角色" size="small" multiple
|
||||||
@change="(value) => handleRoleChange(scope.row, value)">
|
@change="(value) => handleRoleChange(scope.row, value)">
|
||||||
<el-option label="普通员工" :value="0" />
|
<el-option label="普通员工" value="0" />
|
||||||
<el-option label="部门主管" :value="1" />
|
<el-option label="部门主管" value="1" />
|
||||||
<el-option label="综合部" :value="2" />
|
<el-option label="综合部" value="2" />
|
||||||
<el-option label="财务部" :value="3" />
|
<el-option label="财务部" value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-tag :type="getRoleTagType(scope.row.role)">
|
<div class="role-tags">
|
||||||
{{ getRoleName(scope.row.role) }}
|
<el-tag v-for="role in scope.row.roles" :key="role" :type="getRoleTagType(role)"
|
||||||
|
class="role-tag">
|
||||||
|
{{ getRoleName(role) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="220" fixed="right" align="center"
|
<el-table-column label="操作" width="140" fixed="right" align="center"
|
||||||
v-if="userRole === 2 || userRole === 3">
|
v-if="canViewSalary || canRemoveUser">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="userRole === 3">
|
<template v-if="canViewSalary">
|
||||||
<el-button type="primary" link size="small" @click="handleViewSalary(scope.row)"
|
<el-button type="primary" link size="small" @click="handleViewSalary(scope.row)">
|
||||||
v-auth="'member:salary'">查看工资配置</el-button>
|
查看工资配置
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button type="danger" link size="small" @click="handleRemoveUser(scope.row)"
|
<el-button type="danger" link size="small" @click="handleRemoveUser(scope.row)"
|
||||||
v-auth="'member:delete'">移除</el-button>
|
v-if="canRemoveUser">
|
||||||
|
移除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -203,7 +209,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import {
|
import {
|
||||||
getGroupList,
|
getGroupList,
|
||||||
@@ -296,7 +302,21 @@ const groupRules = {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
const userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
||||||
const userRole = userInfo.role || 0
|
const userRoles = userInfo.roles || []
|
||||||
|
|
||||||
|
// 检查是否有权限
|
||||||
|
const hasPermission = (requiredRoles) => {
|
||||||
|
return userRoles.some(role => requiredRoles.includes(Number(role)))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按钮权限判断
|
||||||
|
const canAdd = computed(() => hasPermission([2])) // 角色1和2可以添加
|
||||||
|
const canEdit = computed(() => hasPermission([2])) // 角色1和2可以编辑
|
||||||
|
const canDelete = computed(() => hasPermission([2])) // 只有角色1可以删除
|
||||||
|
const canManageRole = computed(() => hasPermission([2])) // 只有角色2可以管理角色
|
||||||
|
const canViewSalary = computed(() => hasPermission([3])) // 只有角色3可以查看工资
|
||||||
|
const canRemoveUser = computed(() => hasPermission([2])) // 只有角色2可以删除成员
|
||||||
|
const canAddMember = computed(() => hasPermission([2])) // 只有角色2可以添加成员
|
||||||
|
|
||||||
// 获取组别列表
|
// 获取组别列表
|
||||||
const fetchGroupList = async () => {
|
const fetchGroupList = async () => {
|
||||||
@@ -355,14 +375,14 @@ const handleMemberSearch = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改成员角色
|
// 修改角色变更处理函数
|
||||||
const handleRoleChange = async (user, role) => {
|
const handleRoleChange = async (user, roles) => {
|
||||||
try {
|
try {
|
||||||
const res = await updateGroupUserRole(
|
const res = await updateGroupUserRole({
|
||||||
currentGroup.value.groupId,
|
groupId: currentGroup.value.groupId,
|
||||||
user.userid,
|
userid: user.userid,
|
||||||
role
|
roles: roles
|
||||||
);
|
});
|
||||||
if (res.errcode === 0) {
|
if (res.errcode === 0) {
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo")) || {}
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo")) || {}
|
||||||
@@ -376,11 +396,6 @@ const handleRoleChange = async (user, role) => {
|
|||||||
ElMessage.error("修改失败");
|
ElMessage.error("修改失败");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const gotoLogin = () => {
|
|
||||||
sessionStorage.removeItem("token");
|
|
||||||
sessionStorage.removeItem("userInfo");
|
|
||||||
router.push("/login");
|
|
||||||
};
|
|
||||||
|
|
||||||
// 移除成员
|
// 移除成员
|
||||||
const handleRemoveUser = async (user) => {
|
const handleRemoveUser = async (user) => {
|
||||||
@@ -557,7 +572,11 @@ const fetchNonGroupUsers = async () => {
|
|||||||
// 添加用户到组
|
// 添加用户到组
|
||||||
const handleAddToGroup = async (user) => {
|
const handleAddToGroup = async (user) => {
|
||||||
try {
|
try {
|
||||||
const res = await addUserToGroup(currentGroup.value.groupId, user.userid, 0); // 默认角色为普通员工
|
const res = await addUserToGroup({
|
||||||
|
groupId: currentGroup.value.groupId,
|
||||||
|
userid: user.userid,
|
||||||
|
roles: ["0"] // 默认角色为普通员工
|
||||||
|
});
|
||||||
if (res.errcode === 0) {
|
if (res.errcode === 0) {
|
||||||
ElMessage.success("添加成功");
|
ElMessage.success("添加成功");
|
||||||
addUserDialogVisible.value = false;
|
addUserDialogVisible.value = false;
|
||||||
@@ -598,10 +617,10 @@ const handleSearch = () => {
|
|||||||
// 获取角色名称
|
// 获取角色名称
|
||||||
const getRoleName = (role) => {
|
const getRoleName = (role) => {
|
||||||
const roleMap = {
|
const roleMap = {
|
||||||
0: '普通员工',
|
"0": '普通员工',
|
||||||
1: '部门主管',
|
"1": '部门主管',
|
||||||
2: '综合部',
|
"2": '综合部',
|
||||||
3: '财务部'
|
"3": '财务部'
|
||||||
}
|
}
|
||||||
return roleMap[role] || '未知角色'
|
return roleMap[role] || '未知角色'
|
||||||
}
|
}
|
||||||
@@ -609,10 +628,10 @@ const getRoleName = (role) => {
|
|||||||
// 获取角色标签类型
|
// 获取角色标签类型
|
||||||
const getRoleTagType = (role) => {
|
const getRoleTagType = (role) => {
|
||||||
const typeMap = {
|
const typeMap = {
|
||||||
0: 'info',
|
"0": 'info',
|
||||||
1: 'success',
|
"1": 'success',
|
||||||
2: 'warning',
|
"2": 'warning',
|
||||||
3: 'danger'
|
"3": 'danger'
|
||||||
}
|
}
|
||||||
return typeMap[role] || 'info'
|
return typeMap[role] || 'info'
|
||||||
}
|
}
|
||||||
@@ -621,6 +640,12 @@ const getRoleTagType = (role) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchGroupList();
|
fetchGroupList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const gotoLogin = () => {
|
||||||
|
sessionStorage.removeItem("token");
|
||||||
|
sessionStorage.removeItem("userInfo");
|
||||||
|
router.push("/login");
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -909,4 +934,15 @@ onMounted(() => {
|
|||||||
border-top: 1px solid var(--el-border-color-light);
|
border-top: 1px solid var(--el-border-color-light);
|
||||||
background-color: var(--el-bg-color);
|
background-color: var(--el-bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.role-tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.role-tag {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,208 @@
|
|||||||
|
<template>
|
||||||
|
<div class="minimum-wage-config">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span class="title">当地最低工资配置</span>
|
||||||
|
<el-tag type="info" size="small">仅财务人员可操作</el-tag>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form :model="formData" :rules="rules" ref="formRef" label-width="120px" class="wage-form">
|
||||||
|
<el-form-item label="最低工资标准" prop="minimumWage">
|
||||||
|
<el-input-number v-model="formData.minimumWage" :min="0" :precision="2" :step="100"
|
||||||
|
:controls-position="'right'" @change="handleWageChange" class="wage-input" />
|
||||||
|
<span class="unit">元/月</span>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSubmit" :loading="loading">
|
||||||
|
保存修改
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { getMinimumWageConfig, updateMinimumWageConfig } from '../../../api/payroll'
|
||||||
|
|
||||||
|
const formRef = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
const formData = ref({
|
||||||
|
minimumWage: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
minimumWage: [
|
||||||
|
{ required: true, message: '请输入最低工资标准', trigger: 'blur' },
|
||||||
|
{ type: 'number', min: 0, message: '最低工资不能小于0', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
effectiveDate: [
|
||||||
|
{ required: true, message: '请选择生效日期', trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取最低工资配置
|
||||||
|
const fetchConfig = async () => {
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
const response = await getMinimumWageConfig()
|
||||||
|
// 处理后端返回的数据格式
|
||||||
|
if (response && response.errcode === 0 && response.result) {
|
||||||
|
formData.value = {
|
||||||
|
minimumWage: Number(response.result.recordValue) || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('获取最低工资配置失败')
|
||||||
|
console.error('获取配置失败:', error)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交修改
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if (!formRef.value) return
|
||||||
|
|
||||||
|
try {
|
||||||
|
await formRef.value.validate()
|
||||||
|
loading.value = true
|
||||||
|
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
'确定要修改最低工资标准吗?',
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// 只传递recordValue参数
|
||||||
|
const submitData = {
|
||||||
|
recordValue: formData.value.minimumWage.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
await updateMinimumWageConfig(submitData)
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
} catch (error) {
|
||||||
|
if (error !== 'cancel') {
|
||||||
|
ElMessage.error('修改失败')
|
||||||
|
console.error('修改失败:', error)
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
if (!formRef.value) return
|
||||||
|
formRef.value.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 工资变化时的处理
|
||||||
|
const handleWageChange = (value) => {
|
||||||
|
console.log('工资值变化:', value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 禁用过去的日期
|
||||||
|
const disablePastDates = (time) => {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
fetchConfig()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.minimum-wage-config {
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
min-height: calc(100vh - 120px);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-card {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.minimum-wage-config {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-card {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
width: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wage-input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header .title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wage-form {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wage-input {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #606266;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input-number .el-input__wrapper) {
|
||||||
|
padding-right: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-textarea__inner) {
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button) {
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button + .el-button) {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,24 +5,14 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span class="title">工资条列表</span>
|
<span class="title">工资条列表</span>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<el-date-picker
|
<el-date-picker v-model="dateRange" type="month" placeholder="选择月份" :default-time="defaultTime"
|
||||||
v-model="dateRange"
|
:shortcuts="dateShortcuts" @change="handleDateChange" style="width: 200px; margin-right: 8px;" />
|
||||||
type="month"
|
<el-input v-model="searchKeyword" placeholder="请输入姓名搜索" clearable @input="handleSearch"
|
||||||
placeholder="选择月份"
|
style="width: 200px; margin-right: 8px;">
|
||||||
:default-time="defaultTime"
|
|
||||||
:shortcuts="dateShortcuts"
|
|
||||||
@change="handleDateChange"
|
|
||||||
style="width: 200px; margin-right: 8px;"
|
|
||||||
/>
|
|
||||||
<el-input
|
|
||||||
v-model="searchKeyword"
|
|
||||||
placeholder="请输入姓名搜索"
|
|
||||||
clearable
|
|
||||||
@input="handleSearch"
|
|
||||||
style="width: 200px; margin-right: 8px;"
|
|
||||||
>
|
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<el-icon><Search /></el-icon>
|
<el-icon>
|
||||||
|
<Search />
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button type="success" @click="handleBatchShowToEmployee">批量展示给员工</el-button>
|
<el-button type="success" @click="handleBatchShowToEmployee">批量展示给员工</el-button>
|
||||||
@@ -30,24 +20,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="payrollList" style="width: 100%" height="calc(100vh - 280px)" border stripe :header-cell-style="{
|
||||||
:data="payrollList"
|
|
||||||
style="width: 100%"
|
|
||||||
height="calc(100vh - 280px)"
|
|
||||||
border
|
|
||||||
stripe
|
|
||||||
:header-cell-style="{
|
|
||||||
background: '#f5f7fa',
|
background: '#f5f7fa',
|
||||||
color: '#606266',
|
color: '#606266',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
padding: '12px 0'
|
padding: '12px 0'
|
||||||
}"
|
}" :cell-style="{
|
||||||
:cell-style="{
|
|
||||||
padding: '8px 0'
|
padding: '8px 0'
|
||||||
}"
|
}" @selection-change="handleSelectionChange">
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="头像" width="80" align="center" fixed="left">
|
<el-table-column label="头像" width="80" align="center" fixed="left">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -105,12 +86,14 @@
|
|||||||
{{ formatMoney(scope.row.grossPaySummary) }}
|
{{ formatMoney(scope.row.grossPaySummary) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="annualPerformanceDeduction" label="年度绩效扣款" width="120" align="right" show-overflow-tooltip>
|
<el-table-column prop="annualPerformanceDeduction" label="年度绩效扣款" width="120" align="right"
|
||||||
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatMoney(scope.row.annualPerformanceDeduction) }}
|
{{ formatMoney(scope.row.annualPerformanceDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="monthlyPerformanceDeduction" label="月度绩效扣款" width="120" align="right" show-overflow-tooltip>
|
<el-table-column prop="monthlyPerformanceDeduction" label="月度绩效扣款" width="120" align="right"
|
||||||
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatMoney(scope.row.monthlyPerformanceDeduction) }}
|
{{ formatMoney(scope.row.monthlyPerformanceDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -130,7 +113,8 @@
|
|||||||
{{ formatMoney(scope.row.lateEarlyDeduction) }}
|
{{ formatMoney(scope.row.lateEarlyDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missedCheckInOutDeduction" label="签到签退扣款" width="120" align="right" show-overflow-tooltip>
|
<el-table-column prop="missedCheckInOutDeduction" label="签到签退扣款" width="120" align="right"
|
||||||
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatMoney(scope.row.missedCheckInOutDeduction) }}
|
{{ formatMoney(scope.row.missedCheckInOutDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -155,7 +139,8 @@
|
|||||||
{{ formatMoney(scope.row.basicPensionDeduction) }}
|
{{ formatMoney(scope.row.basicPensionDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="unemploymentInsuranceDeduction" label="失业保险" width="120" align="right" show-overflow-tooltip>
|
<el-table-column prop="unemploymentInsuranceDeduction" label="失业保险" width="120" align="right"
|
||||||
|
show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatMoney(scope.row.unemploymentInsuranceDeduction) }}
|
{{ formatMoney(scope.row.unemploymentInsuranceDeduction) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -197,20 +182,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="180" fixed="right" align="center">
|
<el-table-column label="操作" width="180" fixed="right" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button type="primary" link size="small" @click="handleEdit(scope.row)">
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="success" link size="small" @click="handleShowToEmployee(scope.row)">
|
||||||
type="success"
|
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
@click="handleShowToEmployee(scope.row)"
|
|
||||||
>
|
|
||||||
展示给员工
|
展示给员工
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -218,44 +193,24 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
|
||||||
v-model:current-page="currentPage"
|
:total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
|
||||||
v-model:page-size="pageSize"
|
@current-change="handleCurrentChange" />
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
:total="total"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 修改工资条对话框 -->
|
<!-- 修改工资条对话框 -->
|
||||||
<div class="edit-payroll-dialog">
|
<div class="edit-payroll-dialog">
|
||||||
<el-dialog
|
<el-dialog v-model="editDialogVisible" title="修改工资条" width="900px">
|
||||||
v-model="editDialogVisible"
|
|
||||||
title="修改工资条"
|
|
||||||
width="900px"
|
|
||||||
>
|
|
||||||
<div class="edit-form">
|
<div class="edit-form">
|
||||||
<el-form
|
<el-form ref="editFormRef" :model="editForm" :rules="editRules" label-width="140px">
|
||||||
ref="editFormRef"
|
|
||||||
:model="editForm"
|
|
||||||
:rules="editRules"
|
|
||||||
label-width="140px"
|
|
||||||
>
|
|
||||||
<!-- 仅保留可编辑字段 -->
|
<!-- 仅保留可编辑字段 -->
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-title">违纪扣款</div>
|
<div class="section-title">违纪扣款</div>
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-form-item label="违纪扣款" prop="violationDeduction">
|
<el-form-item label="违纪扣款" prop="violationDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.violationDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.violationDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -263,49 +218,24 @@
|
|||||||
<div class="section-title">社保公积金</div>
|
<div class="section-title">社保公积金</div>
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-form-item label="基本养老保险" prop="basicPensionDeduction">
|
<el-form-item label="基本养老保险" prop="basicPensionDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.basicPensionDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.basicPensionDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="失业保险" prop="unemploymentInsuranceDeduction">
|
<el-form-item label="失业保险" prop="unemploymentInsuranceDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.unemploymentInsuranceDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.unemploymentInsuranceDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="基本医疗保险" prop="basicMedicalDeduction">
|
<el-form-item label="基本医疗保险" prop="basicMedicalDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.basicMedicalDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.basicMedicalDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="补充医疗保险" prop="medicalDeductionAmount">
|
<el-form-item label="补充医疗保险" prop="medicalDeductionAmount">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.medicalDeductionAmount" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.medicalDeductionAmount"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="住房公积金" prop="housingFundDeduction">
|
<el-form-item label="住房公积金" prop="housingFundDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.housingFundDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.housingFundDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -313,22 +243,12 @@
|
|||||||
<div class="section-title">其他扣款</div>
|
<div class="section-title">其他扣款</div>
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-form-item label="个人所得税" prop="individualTaxDeduction">
|
<el-form-item label="个人所得税" prop="individualTaxDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.individualTaxDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.individualTaxDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="其他扣款" prop="otherDeduction">
|
<el-form-item label="其他扣款" prop="otherDeduction">
|
||||||
<el-input-number
|
<el-input-number v-model="editForm.otherDeduction" :precision="2" :step="100" :min="0"
|
||||||
v-model="editForm.otherDeduction"
|
controls-position="right" />
|
||||||
:precision="2"
|
|
||||||
:step="100"
|
|
||||||
:min="0"
|
|
||||||
controls-position="right"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -358,7 +278,7 @@ import {
|
|||||||
|
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
// if (userInfo.role !== 3) {
|
// if (userInfo.roles !== 3) {
|
||||||
// ElMessage.error("您没有权限访问此页面");
|
// ElMessage.error("您没有权限访问此页面");
|
||||||
// window.history.back();
|
// window.history.back();
|
||||||
// }
|
// }
|
||||||
@@ -879,14 +799,17 @@ onMounted(() => {
|
|||||||
|
|
||||||
:deep(.el-form-item) {
|
:deep(.el-form-item) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input-number {
|
.el-input-number {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
|
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
padding-right: 40px;
|
padding-right: 40px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,10 +226,6 @@ const formatMoney = (value) => {
|
|||||||
|
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
// if (userInfo.role !== 3) {
|
|
||||||
// ElMessage.error("您没有权限访问此页面");
|
|
||||||
// window.history.back();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const attendanceList = ref([]);
|
const attendanceList = ref([]);
|
||||||
|
|||||||
@@ -278,10 +278,7 @@ import {
|
|||||||
|
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
// if (userInfo.role !== 2) {
|
|
||||||
// ElMessage.error("您没有权限访问此页面");
|
|
||||||
// window.history.back();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const attendanceList = ref([]);
|
const attendanceList = ref([]);
|
||||||
|
|||||||
@@ -133,11 +133,11 @@
|
|||||||
<el-dialog v-model="performanceDialogVisible" title="修改绩效" width="500px">
|
<el-dialog v-model="performanceDialogVisible" title="修改绩效" width="500px">
|
||||||
<el-form ref="performanceFormRef" :model="performanceForm" label-width="100px" :rules="performanceRules">
|
<el-form ref="performanceFormRef" :model="performanceForm" label-width="100px" :rules="performanceRules">
|
||||||
<el-form-item label="年度绩效" prop="annualPerformance">
|
<el-form-item label="年度绩效" prop="annualPerformance">
|
||||||
<el-input-number v-model="performanceForm.annualPerformance" :min="0" :max="100" :precision="1" :step="0.5"
|
<el-input-number v-model="performanceForm.annualPerformance" :min="0" :max="100" :precision="2" :step="0.5"
|
||||||
style="width: 200px" />
|
style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="月度绩效" prop="monthlyPerformance">
|
<el-form-item label="月度绩效" prop="monthlyPerformance">
|
||||||
<el-input-number v-model="performanceForm.monthlyPerformance" :min="0" :max="100" :precision="1" :step="0.5"
|
<el-input-number v-model="performanceForm.monthlyPerformance" :min="0" :max="100" :precision="2" :step="0.5"
|
||||||
style="width: 200px" />
|
style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -165,10 +165,7 @@ import {
|
|||||||
|
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
// if (userInfo.role !== 2) {
|
|
||||||
// ElMessage.error("您没有权限访问此页面");
|
|
||||||
// window.history.back();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const attendanceList = ref([]);
|
const attendanceList = ref([]);
|
||||||
|
|||||||
@@ -164,10 +164,7 @@ import {
|
|||||||
|
|
||||||
// 权限检查
|
// 权限检查
|
||||||
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
||||||
// if (userInfo.role !== 2) {
|
|
||||||
// ElMessage.error("您没有权限访问此页面");
|
|
||||||
// window.history.back();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const attendanceList = ref([]);
|
const attendanceList = ref([]);
|
||||||
|
|||||||
Reference in New Issue
Block a user