Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -14,7 +14,7 @@ const isDark = useDark()
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
console.log(isDark.value)
|
console.log(isDark.value)
|
||||||
if (!isDark.value) {
|
if (isDark.value) {
|
||||||
useSettingsStore().toggleTheme()
|
useSettingsStore().toggleTheme()
|
||||||
}
|
}
|
||||||
handleThemeStyle(useSettingsStore().theme)
|
handleThemeStyle(useSettingsStore().theme)
|
||||||
|
|||||||
44
gear-ui3/src/api/oa/attendancePieceDetail.js
Normal file
44
gear-ui3/src/api/oa/attendancePieceDetail.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询考勤计件明细 - 记录具体工件的数量和单价信息列表
|
||||||
|
export function listAttendancePieceDetail(query) {
|
||||||
|
return request({
|
||||||
|
url: '/oa/attendancePieceDetail/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询考勤计件明细 - 记录具体工件的数量和单价信息详细
|
||||||
|
export function getAttendancePieceDetail(detailId) {
|
||||||
|
return request({
|
||||||
|
url: '/oa/attendancePieceDetail/' + detailId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增考勤计件明细 - 记录具体工件的数量和单价信息
|
||||||
|
export function addAttendancePieceDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/oa/attendancePieceDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改考勤计件明细 - 记录具体工件的数量和单价信息
|
||||||
|
export function updateAttendancePieceDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/oa/attendancePieceDetail',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除考勤计件明细 - 记录具体工件的数量和单价信息
|
||||||
|
export function delAttendancePieceDetail(detailId) {
|
||||||
|
return request({
|
||||||
|
url: '/oa/attendancePieceDetail/' + detailId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="applications-wrapper">
|
<div class="applications-wrapper" :class="{ 'dark': isDark }">
|
||||||
<!-- 一、业务功能区:常用应用 -->
|
<!-- 一、业务功能区:常用应用 -->
|
||||||
<div class="business-area">
|
<div class="business-area">
|
||||||
<!-- 常用应用标题栏 -->
|
<!-- 常用应用标题栏 -->
|
||||||
@@ -129,6 +129,7 @@
|
|||||||
import { getRouters } from '@/api/menu'
|
import { getRouters } from '@/api/menu'
|
||||||
import { More } from '@element-plus/icons-vue'
|
import { More } from '@element-plus/icons-vue'
|
||||||
import { useStorage } from '@vueuse/core'
|
import { useStorage } from '@vueuse/core'
|
||||||
|
import { useDark } from '@vueuse/core'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AllApplications',
|
name: 'AllApplications',
|
||||||
@@ -159,6 +160,12 @@ export default {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
const isDark = useDark()
|
||||||
|
return {
|
||||||
|
isDark
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
// 1. 初始化菜单数据
|
// 1. 初始化菜单数据
|
||||||
this.fetchMenus()
|
this.fetchMenus()
|
||||||
@@ -254,75 +261,91 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/* 外层容器统一样式:深色背景 */
|
/* 外层容器统一样式:亮色背景(默认) */
|
||||||
.applications-wrapper {
|
.applications-wrapper {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
|
||||||
|
|
||||||
/* 一、常用应用区域样式 */
|
/* 亮色主题变量 */
|
||||||
.business-area {
|
--color-text-primary: #111827;
|
||||||
|
--color-text-secondary: #4b5563;
|
||||||
|
--color-text-tertiary: #6b7280;
|
||||||
|
|
||||||
|
--color-bg-primary: #ffffff;
|
||||||
|
--color-bg-secondary: #f8f9fa;
|
||||||
|
--color-bg-tertiary: #e9ecef;
|
||||||
|
--color-bg-card: #ffffff;
|
||||||
|
--color-bg-icon: #eee;
|
||||||
|
|
||||||
|
--color-border-primary: #dee2e6;
|
||||||
|
|
||||||
|
--shadow-card: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
|
||||||
|
--shadow-card-hover: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
--shadow-app-item: 0 2px 4px rgba(0, 0, 0, 0.08);
|
||||||
|
|
||||||
|
/* 一、常用应用区域样式 */
|
||||||
|
.business-area {
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 常用应用标题栏 */
|
/* 常用应用标题栏 */
|
||||||
.business-area-header {
|
.business-area-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.business-area-title {
|
.business-area-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-btn {
|
.edit-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
background: #2C2C3C;
|
background: var(--color-bg-primary);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #3A3A4A;
|
background: var(--color-bg-secondary);
|
||||||
color: #F9FAFB;
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* 常用应用列表 */
|
/* 常用应用列表 */
|
||||||
.business-modules {
|
.business-modules {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(6, 1fr);
|
grid-template-columns: repeat(6, 1fr);
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.business-module {
|
.business-module {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: #2C2C3C;
|
background: var(--color-bg-card);
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
|
box-shadow: var(--shadow-card);
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.3);
|
box-shadow: var(--shadow-card-hover);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
background: #3A3A4A;
|
background: var(--color-bg-secondary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.business-module-icon {
|
.business-module-icon {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -331,46 +354,46 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
background: #374151; /* 可根据图标色调整背景 */
|
background: var(--color-bg-icon);
|
||||||
|
|
||||||
:deep(svg) {
|
:deep(svg) {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #FFFFFF;
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.business-module-title {
|
.business-module-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 二、全部应用区域样式 */
|
/* 二、全部应用区域样式 */
|
||||||
.all-applications-container {
|
.all-applications-container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: #1E1E2E;
|
background: var(--color-bg-card);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 应用列表网格 */
|
/* 应用列表网格 */
|
||||||
.app-grid {
|
.app-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 应用卡片 */
|
/* 应用卡片 */
|
||||||
.app-item {
|
.app-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -379,19 +402,19 @@ export default {
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
width: 160px;
|
width: 160px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
background-color: #2C2C3C;
|
background-color: var(--color-bg-primary);
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: var(--shadow-app-item);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
box-shadow: var(--shadow-card-hover);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
background-color: #3A3A4A;
|
background-color: var(--color-bg-secondary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* 应用图标容器 */
|
/* 应用图标容器 */
|
||||||
.app-icon-wrapper {
|
.app-icon-wrapper {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -399,40 +422,36 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
background-color: #374151;
|
background-color: var(--color-bg-icon);
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.3s ease;
|
||||||
|
|
||||||
.app-item:hover & {
|
|
||||||
background-color: #4B5563;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.app-icon {
|
.app-icon {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #F3F4F6;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 应用名称 */
|
/* 应用名称 */
|
||||||
.app-name {
|
.app-name {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 三点菜单 */
|
/* 三点菜单 */
|
||||||
.app-actions {
|
.app-actions {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 8px;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-item:hover .app-actions {
|
.app-item:hover .app-actions {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions-icon {
|
.actions-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@@ -440,11 +459,11 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 三、设置弹窗样式 */
|
/* 三、设置弹窗样式 */
|
||||||
.dialog-mask {
|
.dialog-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -455,186 +474,205 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-dialog {
|
.setting-dialog {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
background: #2C2C3C;
|
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
background: var(--color-bg-card);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-header {
|
.dialog-header {
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
border-bottom: 1px solid #3A3A4A;
|
border-bottom: 1px solid var(--color-border-primary);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-header h3 {
|
.dialog-header h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-btn {
|
.close-btn {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #9CA3AF;
|
color: var(--color-text-tertiary);
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #F9FAFB;
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.dialog-content {
|
.dialog-content {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: #2C2C3C;
|
background: var(--color-bg-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 空状态提示 */
|
/* 空状态提示 */
|
||||||
.empty-tip {
|
.empty-tip {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
color: #9CA3AF;
|
color: var(--color-text-tertiary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background: #374151;
|
background: var(--color-bg-tertiary);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 常用应用编辑列表 */
|
/* 常用应用编辑列表 */
|
||||||
.module-list {
|
.module-list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-item {
|
.module-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
border-bottom: 1px solid #3A3A4A;
|
border-bottom: 1px solid var(--color-border-primary);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-info {
|
.module-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-index {
|
.module-index {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #374151;
|
background: var(--color-bg-tertiary);
|
||||||
color: #E5E7EB;
|
color: var(--color-text-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-name {
|
.module-name {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-actions {
|
.module-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 弹窗底部按钮 */
|
/* 弹窗底部按钮 */
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
border-top: 1px solid #3A3A4A;
|
border-top: 1px solid var(--color-border-primary);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
background: #2C2C3C;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.cancel-btn, .confirm-btn {
|
.cancel-btn, .confirm-btn {
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
background: #374151;
|
background: var(--color-bg-tertiary);
|
||||||
color: #E5E7EB;
|
color: var(--color-text-secondary);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #4B5563;
|
background: var(--color-bg-secondary);
|
||||||
color: #F9FAFB;
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
background: #3B82F6;
|
background: #3b82f6;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #2563eb;
|
background: #2563eb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 四、Element组件样式穿透调整 */
|
/* 四、Element组件样式穿透调整 */
|
||||||
:deep(.el-tabs__header) {
|
:deep(.el-tabs__header) {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__nav-wrap::after) {
|
:deep(.el-tabs__nav-wrap::after) {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: #3A3A4A;
|
background-color: var(--color-border-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__item) {
|
:deep(.el-tabs__item) {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #9CA3AF;
|
color: var(--color-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__item.is-active) {
|
:deep(.el-tabs__item.is-active) {
|
||||||
color: #E5E7EB;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-dropdown-menu) {
|
:deep(.el-dropdown-menu) {
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
background-color: #2C2C3C;
|
background-color: var(--color-bg-card);
|
||||||
border: 1px solid #3A3A4A;
|
border: 1px solid var(--color-border-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-dropdown-item) {
|
:deep(.el-dropdown-item) {
|
||||||
padding: 6px 16px;
|
padding: 6px 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-secondary);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #3A3A4A;
|
background-color: var(--color-bg-secondary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-button) {
|
:deep(.el-button) {
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
color: #E5E7EB;
|
color: var(--color-text-secondary);
|
||||||
background-color: #374151;
|
background-color: var(--color-bg-tertiary);
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #4B5563;
|
background-color: var(--color-bg-secondary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.applications-wrapper.dark {
|
||||||
|
/* 暗色主题变量 */
|
||||||
|
--color-text-primary: #e5e7eb;
|
||||||
|
--color-text-secondary: #e5e7eb;
|
||||||
|
--color-text-tertiary: #9ca3af;
|
||||||
|
|
||||||
|
--color-bg-primary: #1e1e2e;
|
||||||
|
--color-bg-secondary: #2c2c3c;
|
||||||
|
--color-bg-tertiary: #3a3a4a;
|
||||||
|
--color-bg-card: #2c2c3c;
|
||||||
|
--color-bg-icon: #4b5563;
|
||||||
|
|
||||||
|
--color-border-primary: #3a3a4a;
|
||||||
|
|
||||||
|
--shadow-card: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
--shadow-card-hover: 0 4px 16px 0 rgba(0, 0, 0, 0.4);
|
||||||
|
--shadow-app-item: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -40,7 +40,8 @@ const realSrc = computed(() => {
|
|||||||
if (isExternal(real_src)) {
|
if (isExternal(real_src)) {
|
||||||
return real_src
|
return real_src
|
||||||
}
|
}
|
||||||
return import.meta.env.VITE_APP_BASE_API + real_src
|
// return import.meta.env.VITE_APP_BASE_API + real_src
|
||||||
|
return realSrc
|
||||||
})
|
})
|
||||||
|
|
||||||
const realSrcList = computed(() => {
|
const realSrcList = computed(() => {
|
||||||
@@ -53,7 +54,7 @@ const realSrcList = computed(() => {
|
|||||||
if (isExternal(item)) {
|
if (isExternal(item)) {
|
||||||
return srcList.push(item)
|
return srcList.push(item)
|
||||||
}
|
}
|
||||||
return srcList.push(import.meta.env.VITE_APP_BASE_API + item)
|
return srcList.push(item)
|
||||||
})
|
})
|
||||||
return srcList
|
return srcList
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const props = defineProps({
|
|||||||
// 上传接口地址
|
// 上传接口地址
|
||||||
action: {
|
action: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "/common/upload"
|
default: "/system/oss/upload"
|
||||||
},
|
},
|
||||||
// 上传携带的参数
|
// 上传携带的参数
|
||||||
data: {
|
data: {
|
||||||
@@ -117,7 +117,7 @@ watch(() => props.modelValue, val => {
|
|||||||
fileList.value = list.map(item => {
|
fileList.value = list.map(item => {
|
||||||
if (typeof item === "string") {
|
if (typeof item === "string") {
|
||||||
if (item.indexOf(baseUrl) === -1 && !isExternal(item)) {
|
if (item.indexOf(baseUrl) === -1 && !isExternal(item)) {
|
||||||
item = { name: baseUrl + item, url: baseUrl + item }
|
item = { name: item, url: item }
|
||||||
} else {
|
} else {
|
||||||
item = { name: item, url: item }
|
item = { name: item, url: item }
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,8 @@ function handleExceed() {
|
|||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
function handleUploadSuccess(res, file) {
|
function handleUploadSuccess(res, file) {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uploadList.value.push({ name: res.fileName, url: res.fileName })
|
console.log(res, '上传成功')
|
||||||
|
uploadList.value.push({ name: res.data.fileName, url: res.data.url })
|
||||||
uploadedSuccessfully()
|
uploadedSuccessfully()
|
||||||
} else {
|
} else {
|
||||||
number.value--
|
number.value--
|
||||||
@@ -223,7 +224,7 @@ function listToString(list, separator) {
|
|||||||
separator = separator || ","
|
separator = separator || ","
|
||||||
for (let i in list) {
|
for (let i in list) {
|
||||||
if (undefined !== list[i].url && list[i].url.indexOf("blob:") !== 0) {
|
if (undefined !== list[i].url && list[i].url.indexOf("blob:") !== 0) {
|
||||||
strs += list[i].url.replace(baseUrl, "") + separator
|
strs += list[i].url + separator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return strs != "" ? strs.substr(0, strs.length - 1) : ""
|
return strs != "" ? strs.substr(0, strs.length - 1) : ""
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
||||||
*/
|
*/
|
||||||
sideTheme: 'theme-dark',
|
sideTheme: 'theme-light',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否系统布局配置
|
* 是否系统布局配置
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login" :class="{ 'dark': isDark }">
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<div class="login-right">
|
<div class="login-right">
|
||||||
<img :src="RightImage" alt="" class="right-img" />
|
<img :src="RightImage" alt="" class="right-img" />
|
||||||
@@ -55,7 +55,9 @@ import { encrypt, decrypt } from "@/utils/jsencrypt"
|
|||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import useProductStore from '@/store/modules/product'
|
import useProductStore from '@/store/modules/product'
|
||||||
import RightImage from '@/assets/images/right.png'
|
import RightImage from '@/assets/images/right.png'
|
||||||
import LogoImage from '@/assets/logo/logo.png'
|
import { useDark } from "@vueuse/core"
|
||||||
|
|
||||||
|
const isDark = useDark()
|
||||||
|
|
||||||
const title = import.meta.env.VITE_APP_TITLE
|
const title = import.meta.env.VITE_APP_TITLE
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@@ -152,66 +154,81 @@ getCookie()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
// 亮色主题(默认)
|
||||||
.login {
|
.login {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #1a1a1a;
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
/* 亮色主题变量 */
|
||||||
|
--color-bg-primary: #f5f7fa;
|
||||||
|
--color-bg-form: #ffffff;
|
||||||
|
--color-bg-input: #f0f2f5;
|
||||||
|
--color-border-input: #dcdfe6;
|
||||||
|
--color-text-primary: #303133;
|
||||||
|
--color-text-secondary: #606266;
|
||||||
|
--color-text-placeholder: #909399;
|
||||||
|
--color-btn-primary: #409eff;
|
||||||
|
--color-btn-primary-hover: #66b1ff;
|
||||||
|
|
||||||
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #ebebeb;
|
color: var(--color-text-primary);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-img {
|
.right-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-img {
|
.logo-img {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// height: 60%;
|
|
||||||
width: 60%;
|
width: 60%;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
background: #333333;
|
background: var(--color-bg-input);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid #444444;
|
border: 1px solid var(--color-border-input);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
color: #ebebeb;
|
color: var(--color-text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
flex: 3;
|
flex: 3;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #292929;
|
background: var(--color-bg-form);
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
input::placeholder {
|
||||||
|
color: var(--color-text-placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,23 +236,23 @@ getCookie()
|
|||||||
height: 39px;
|
height: 39px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.login-right {
|
.login-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
|
|
||||||
flex: 4;
|
flex: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-tip {
|
.login-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
float: right;
|
float: right;
|
||||||
@@ -244,23 +261,61 @@ getCookie()
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: var(--color-text-secondary);
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Element组件样式调整 */
|
||||||
|
:deep(.el-checkbox__label) {
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button--primary) {
|
||||||
|
background-color: var(--color-btn-primary);
|
||||||
|
border-color: var(--color-btn-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button--primary:hover) {
|
||||||
|
background-color: var(--color-btn-primary-hover);
|
||||||
|
border-color: var(--color-btn-primary-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.link-type) {
|
||||||
|
color: var(--color-btn-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暗色主题
|
||||||
|
.login.dark {
|
||||||
|
/* 暗色主题变量 - 覆盖亮色变量 */
|
||||||
|
--color-bg-primary: #1a1a1a;
|
||||||
|
--color-bg-form: #292929;
|
||||||
|
--color-bg-input: #333333;
|
||||||
|
--color-border-input: #444444;
|
||||||
|
--color-text-primary: #ebebeb;
|
||||||
|
--color-text-secondary: #bfbfbf;
|
||||||
|
--color-text-placeholder: #999999;
|
||||||
|
--color-btn-primary: #409eff;
|
||||||
|
--color-btn-primary-hover: #66b1ff;
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="Money"
|
icon="Money"
|
||||||
@click="handlePay(scope.row)"
|
@click="handlePay(scope.row)"
|
||||||
|
v-if="scope.row.balanceAmount > 0"
|
||||||
>付款</el-button>
|
>付款</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="Money"
|
icon="Money"
|
||||||
@click="handleReceive(scope.row)"
|
@click="handleReceive(scope.row)"
|
||||||
|
v-if="scope.row.balanceAmount > 0"
|
||||||
>收款</el-button>
|
>收款</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="80px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="80px">
|
||||||
<el-form-item label="用户ID" prop="userId">
|
<el-form-item label="薪酬类型" prop="paymentType">
|
||||||
|
<el-radio-group v-model="queryParams.paymentType" @change="getList">
|
||||||
|
<el-radio-button label="hourly">计时</el-radio-button>
|
||||||
|
<el-radio-button label="piecework">计件</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户" prop="userId">
|
||||||
<user-select v-model="queryParams.userId" />
|
<user-select v-model="queryParams.userId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="记录日期" prop="recordDate">
|
<el-form-item label="记录日期" prop="recordDate">
|
||||||
@@ -95,7 +101,13 @@
|
|||||||
<span>{{ parseTime(scope.row.endTime, '{h}:{i}') }}</span>
|
<span>{{ parseTime(scope.row.endTime, '{h}:{i}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="时长(小时)" align="center" prop="durationHour" />
|
<el-table-column label="时长(小时)" align="center" prop="durationHour" v-if="queryParams.paymentType === 'hourly'"/>
|
||||||
|
<el-table-column label="计件数量" align="center" prop="pieceCount" v-if="queryParams.paymentType === 'piecework'">
|
||||||
|
<template #default="scope">
|
||||||
|
<span @click="handlePieceCount(scope.row)" style="color: #409EFF; cursor: pointer;">{{ scope.row.pieceCount }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="薪酬" align="center" prop="wage" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -158,9 +170,21 @@
|
|||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时长(小时)" prop="durationHour">
|
<el-form-item label="薪酬类型" prop="paymentType" style="width: 100%;">
|
||||||
|
<el-radio-group v-model="form.paymentType" >
|
||||||
|
<el-radio-button label="hourly">计时</el-radio-button>
|
||||||
|
<el-radio-button label="piecework">计件</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时长(小时)" prop="durationHour" style="width: 100%;" v-if="form.paymentType === 'hourly'">
|
||||||
<el-input-number v-model="form.durationHour" placeholder="请输入时长(小时)" />
|
<el-input-number v-model="form.durationHour" placeholder="请输入时长(小时)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="计件数量" prop="pieceCount" style="width: 100%;" v-if="form.paymentType === 'piecework'">
|
||||||
|
<el-input-number v-model="form.pieceCount" placeholder="请输入计件数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="薪酬" prop="wage">
|
||||||
|
<el-input v-model="form.wage" placeholder="请输入薪酬" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -172,13 +196,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 计件详情 -->
|
||||||
|
<el-dialog title="计件详情" v-model="pieceDetailOpen" width="1000px" append-to-body>
|
||||||
|
<AttendancePieceDetail :recordId="form.recordId" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="AttendanceRecord">
|
<script setup name="AttendanceRecord">
|
||||||
import UserSelect from '@/components/UserSelect'
|
import UserSelect from '@/components/UserSelect'
|
||||||
|
import AttendancePieceDetail from './detail.vue'
|
||||||
import { listAttendanceRecord, getAttendanceRecord, delAttendanceRecord, addAttendanceRecord, updateAttendanceRecord } from "@/api/oa/attendanceRecord";
|
import { listAttendanceRecord, getAttendanceRecord, delAttendanceRecord, addAttendanceRecord, updateAttendanceRecord } from "@/api/oa/attendanceRecord";
|
||||||
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -198,10 +229,12 @@ const single = ref(true);
|
|||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
const pieceDetailOpen = ref(false);
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
paymentType: 'hourly', // 薪酬类型: hourly(计时),piecework(计件)
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
@@ -268,7 +301,10 @@ function reset() {
|
|||||||
updateTime: null,
|
updateTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
delFlag: null,
|
delFlag: null,
|
||||||
remark: null
|
remark: null,
|
||||||
|
wage: null,
|
||||||
|
paymentType: queryParams.value.paymentType,
|
||||||
|
pieceCount: null
|
||||||
};
|
};
|
||||||
proxy.resetForm("attendanceRecordRef");
|
proxy.resetForm("attendanceRecordRef");
|
||||||
}
|
}
|
||||||
@@ -374,5 +410,12 @@ function handleExport() {
|
|||||||
}, `attendanceRecord_${new Date().getTime()}.xlsx`)
|
}, `attendanceRecord_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handlePieceCount(row) {
|
||||||
|
// 获取计件详情
|
||||||
|
console.log(row);
|
||||||
|
pieceDetailOpen.value = true;
|
||||||
|
form.value.recordId = row.recordId;
|
||||||
|
}
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
259
gear-ui3/src/views/peoples/attendance/components/detail.vue
Normal file
259
gear-ui3/src/views/peoples/attendance/components/detail.vue
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="attendancePieceDetailList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="工件编码" align="center" prop="workpieceCode" />
|
||||||
|
<el-table-column label="工件名称" align="center" prop="workpieceName" />
|
||||||
|
<el-table-column label="工件数量" align="center" prop="pieceQuantity" />
|
||||||
|
<el-table-column label="单位单价" align="center" prop="unitPrice" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改考勤计件明细 - 记录具体工件的数量和单价信息对话框 -->
|
||||||
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="attendancePieceDetailRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="工件编码" prop="workpieceCode">
|
||||||
|
<el-input v-model="form.workpieceCode" placeholder="请输入工件编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工件名称" prop="workpieceName">
|
||||||
|
<el-input v-model="form.workpieceName" placeholder="请输入工件名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工件数量" prop="pieceQuantity">
|
||||||
|
<el-input v-model="form.pieceQuantity" placeholder="请输入工件数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位单价" prop="unitPrice">
|
||||||
|
<el-input v-model="form.unitPrice" placeholder="请输入单位单价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="AttendancePieceDetail">
|
||||||
|
import { listAttendancePieceDetail, getAttendancePieceDetail, delAttendancePieceDetail, addAttendancePieceDetail, updateAttendancePieceDetail } from "@/api/oa/attendancePieceDetail";
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const attendancePieceDetailList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
recordId: {
|
||||||
|
required: true,
|
||||||
|
type: [String, Number],
|
||||||
|
default: undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const formatterTime = (time) => {
|
||||||
|
return proxy.parseTime(time, '{y}-{m}-{d}')
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
recordId: props.recordId,
|
||||||
|
workpieceCode: undefined,
|
||||||
|
workpieceName: undefined,
|
||||||
|
pieceQuantity: undefined,
|
||||||
|
unitPrice: undefined,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(props.recordId, (newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
queryParams.value.recordId = newVal;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
}, { immediate: true });
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询考勤计件明细 - 记录具体工件的数量和单价信息列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
listAttendancePieceDetail(queryParams.value).then(response => {
|
||||||
|
attendancePieceDetailList.value = response.rows;
|
||||||
|
total.value = response.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
detailId: null,
|
||||||
|
recordId: props.recordId,
|
||||||
|
workpieceCode: null,
|
||||||
|
workpieceName: null,
|
||||||
|
pieceQuantity: null,
|
||||||
|
unitPrice: null,
|
||||||
|
createTime: null,
|
||||||
|
createBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
delFlag: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
proxy.resetForm("attendancePieceDetailRef");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.detailId);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加考勤计件明细 - 记录具体工件的数量和单价信息";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
loading.value = true
|
||||||
|
reset();
|
||||||
|
const _detailId = row.detailId || ids.value
|
||||||
|
getAttendancePieceDetail(_detailId).then(response => {
|
||||||
|
loading.value = false;
|
||||||
|
form.value = response.data;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改考勤计件明细 - 记录具体工件的数量和单价信息";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["attendancePieceDetailRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.detailId != null) {
|
||||||
|
updateAttendancePieceDetail(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
}).finally(() => {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addAttendancePieceDetail(form.value).then(response => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
}).finally(() => {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const _detailIds = row.detailId || ids.value;
|
||||||
|
proxy.$modal.confirm('是否确认删除考勤计件明细 - 记录具体工件的数量和单价信息编号为"' + _detailIds + '"的数据项?').then(function() {
|
||||||
|
loading.value = true;
|
||||||
|
return delAttendancePieceDetail(_detailIds);
|
||||||
|
}).then(() => {
|
||||||
|
loading.value = true;
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
}).finally(() => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
function handleExport() {
|
||||||
|
proxy.download('oa/attendancePieceDetail/export', {
|
||||||
|
...queryParams.value
|
||||||
|
}, `attendancePieceDetail_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
||||||
@@ -50,6 +50,11 @@
|
|||||||
<el-table-column label="产品名称" align="center" prop="productName" />
|
<el-table-column label="产品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="负责人" align="center" prop="owner" />
|
<el-table-column label="负责人" align="center" prop="owner" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
|
<el-table-column label="样品图" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<ImagePreview :src="scope.row.image" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="BOM" align="center">
|
<el-table-column label="BOM" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<BomInfoMini :bomId="scope.row.bomId" />
|
<BomInfoMini :bomId="scope.row.bomId" />
|
||||||
@@ -81,6 +86,9 @@
|
|||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="样品图" prop="">
|
||||||
|
<ImageUpload v-model="form.image" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="产品分类" prop="categoryId">
|
<el-form-item label="产品分类" prop="categoryId">
|
||||||
<!-- <el-tree-select v-model="form.categoryId" :data="categoryList" :props="defaultProps" /> -->
|
<!-- <el-tree-select v-model="form.categoryId" :data="categoryList" :props="defaultProps" /> -->
|
||||||
<el-select v-model="form.categoryId" placeholder="请选择产品分类">
|
<el-select v-model="form.categoryId" placeholder="请选择产品分类">
|
||||||
|
|||||||
Reference in New Issue
Block a user