diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts
index c92994d..817fbad 100644
--- a/src/utils/ruoyi.ts
+++ b/src/utils/ruoyi.ts
@@ -74,6 +74,11 @@ export const formatPrice = (price, show = true) => {
const fixedNum = num.toFixed(4);
const [integer, decimal] = fixedNum.split('.');
+ // 检查小数部分是否为0
+ if (decimal === '0000') {
+ return `${integer}.00`;
+ }
+
// 千分位处理
const formattedInteger = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
diff --git a/src/views/enterpriseLarge/digitalizationScreen/components/header.vue b/src/views/enterpriseLarge/digitalizationScreen/components/header.vue
index 56c3916..fe3f97e 100644
--- a/src/views/enterpriseLarge/digitalizationScreen/components/header.vue
+++ b/src/views/enterpriseLarge/digitalizationScreen/components/header.vue
@@ -23,7 +23,7 @@
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
- :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
+ :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }"
>
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -39,7 +39,7 @@

-
管理系统
+
管理系统
@@ -89,7 +89,7 @@ const emit = defineEmits(['changePage']);
const safetyDay = ref
(0);
const weatherList = ref([]);
const timer = ref(0);
-const offsetY = ref(0);
+const offsetY = ref(0);
const curIndex = ref(0);
const transition = ref('transform 0.5s ease');
const pendingPause = ref(false);
@@ -119,7 +119,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) {
const setWeatherScroll = () => {
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
- offsetY.value = curIndex.value * 60;
+ offsetY.value = curIndex.value * 2;
if (curIndex.value === weatherList.value.length - 1) {
setTimeout(() => {
@@ -232,13 +232,13 @@ onUnmounted(() => {
.title > div:first-child {
/* 第一个子元素的样式 */
- font-size: 38px;
+ font-size: 2vw;
letter-spacing: 0.1em;
}
.title > div:last-child {
/* 最后一个子元素的样式 */
- font-size: 14px;
+ font-size: 1vw;
}
/* 顶部栏容器:Flex 水平布局 + 垂直居中 */
@@ -260,22 +260,25 @@ onUnmounted(() => {
align-items: center;
.weather-list {
- height: 60px;
+ height: 2vw;
overflow: hidden;
.weather-item {
- height: 60px;
- line-height: 60px;
+ height: 2vw;
display: flex;
align-items: center;
+ justify-content: center;
+ // padding: 10px 0;
+ // box-sizing: border-box;
+ font-size: 0.8vw;
& > div:last-child {
margin-left: 10px;
}
img {
- width: 50px;
- height: 50px;
+ width: 3vw;
+ height: 3vw;
}
}
}
@@ -305,10 +308,12 @@ onUnmounted(() => {
/* 右侧区域(管理系统):图标 + 文字水平排列 */
.right-section {
+ width: 5.5vw;
display: flex;
align-items: center;
+ justify-content: center;
font-family: 'AlimamaShuHeiTi', sans-serif;
- font-size: 20px;
+ font-size: 1vw;
cursor: pointer;
}
diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue
index 43938b3..1b7bdad 100644
--- a/src/views/formalities/formalitiesAreConsolidated/index.vue
+++ b/src/views/formalities/formalitiesAreConsolidated/index.vue
@@ -93,11 +93,18 @@
-
+
- {{ scope.row.formalitiesName }}
+ {{ scope.row.formalitiesName }}
diff --git a/src/views/largeScreen/components/header.vue b/src/views/largeScreen/components/header.vue
index 02848cf..fc782ac 100644
--- a/src/views/largeScreen/components/header.vue
+++ b/src/views/largeScreen/components/header.vue
@@ -23,7 +23,7 @@
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
- :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
+ :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }"
>
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -79,7 +79,7 @@ const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
// 天气轮播相关变量
-const weatherList = ref([]);
+const weatherList = ref([]);
const offsetY = ref(0);
const curIndex = ref(0);
const transition = ref('transform 0.5s ease');
@@ -103,7 +103,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) {
const setWeatherScroll = () => {
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
- offsetY.value = curIndex.value * 60; // 每个天气项高度60px,需和样式一致
+ offsetY.value = curIndex.value * 2; // 每个天气项高度60px,需和样式一致
// 轮播到最后一项时,无缝衔接回第一项
if (curIndex.value === weatherList.value.length - 1) {
@@ -160,7 +160,7 @@ const getWeatherData = async () => {
weatherList.value = res.data;
// 处理每一天的天气(白天/夜晚切换图标和状态)
- weatherList.value.forEach((item) => {
+ weatherList.value.forEach((item: any) => {
const isDay = judgeDayOrNight(item.sunRise, item.sunSet);
item.status = isDay ? item.dayStatus : item.nightStatus;
item.icon = isDay ? item.dayIcon : item.nightIcon;
@@ -250,13 +250,13 @@ onUnmounted(() => {
.title > div:first-child {
/* 第一个子元素的样式 */
- font-size: 38px;
+ font-size: 2vw;
letter-spacing: 0.1em;
}
.title > div:last-child {
/* 最后一个子元素的样式 */
- font-size: 14px;
+ font-size: 1vw;
}
/* 顶部栏容器:Flex 水平布局 + 垂直居中 */
@@ -278,22 +278,25 @@ onUnmounted(() => {
align-items: center;
.weather-list {
- height: 60px;
+ height: 2vw;
overflow: hidden;
.weather-item {
- height: 60px;
- line-height: 60px;
+ height: 2vw;
display: flex;
align-items: center;
+ justify-content: center;
+ // padding: 10px 0;
+ // box-sizing: border-box;
+ font-size: 0.8vw;
& > div:last-child {
margin-left: 10px;
}
img {
- width: 50px;
- height: 50px;
+ width: 3vw;
+ height: 3vw;
}
}
}
@@ -323,10 +326,12 @@ onUnmounted(() => {
/* 右侧区域(管理系统):图标 + 文字水平排列 */
.right-section {
+ width: 5.5vw;
display: flex;
align-items: center;
+ justify-content: center;
font-family: 'AlimamaShuHeiTi', sans-serif;
- font-size: 20px;
+ font-size: 1vw;
cursor: pointer;
}
diff --git a/src/views/project/attendance/index.vue b/src/views/project/attendance/index.vue
index 9d79f7f..b99239a 100644
--- a/src/views/project/attendance/index.vue
+++ b/src/views/project/attendance/index.vue
@@ -31,6 +31,7 @@
搜索
重置
+ 导出
@@ -234,6 +235,17 @@ const dialog = reactive({
details: false,
title: ''
});
+const now = new Date();
+
+// 获取年份(4位数字)
+const year = now.getFullYear();
+
+// 获取月份(注意:getMonth() 返回 0-11,需要 +1 转换为 1-12)
+const month = now.getMonth() + 1;
+
+// 格式化月份为两位数(不足两位补0),拼接成年月字符串
+const currentYearMonth = `${year}-${month.toString().padStart(2, '0')}`;
+
const echartsOption = ref({});
const initFormData: AttendanceForm = {
id: undefined,
@@ -260,7 +272,7 @@ const data = reactive>({
pageNum: 1,
pageSize: 10,
userName: undefined,
- clockDate: undefined,
+ clockDate: currentYearMonth,
clockStatus: undefined,
commuter: undefined,
projectId: currentProject.value?.id,
@@ -454,7 +466,19 @@ const init = () => {
handleQuery();
});
};
-
+const onExport = () => {
+ try {
+ console.log(queryParams.value.clockDate);
+ proxy?.download(
+ 'project/attendance/exportList',
+ { projectId: currentProject.value?.id, clockDate: queryParams.value.clockDate },
+ `考勤列表_${queryParams.value.clockDate}.xlsx`
+ );
+ } catch (error) {
+ ElMessage.error('导出失败,请重试');
+ console.error('文件导出错误:', error);
+ }
+};
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value?.id,
diff --git a/src/views/project/busSalaryDetails/component/detail.vue b/src/views/project/busSalaryDetails/component/detail.vue
new file mode 100644
index 0000000..db5d506
--- /dev/null
+++ b/src/views/project/busSalaryDetails/component/detail.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+ 员工工资考核记录详情
+
+
+
+
+
+ {{ scope.row.dateOfIssue + '-' + scope.row.working_date }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/project/busSalaryDetails/component/edit.vue b/src/views/project/busSalaryDetails/component/edit.vue
new file mode 100644
index 0000000..0d08744
--- /dev/null
+++ b/src/views/project/busSalaryDetails/component/edit.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ {{ (!formData.id || formData.id == 0 ? '添加' : '修改') + '员工工资考核记录' }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/project/busSalaryDetails/component/model.ts b/src/views/project/busSalaryDetails/component/model.ts
new file mode 100644
index 0000000..70b95a1
--- /dev/null
+++ b/src/views/project/busSalaryDetails/component/model.ts
@@ -0,0 +1,57 @@
+export interface BusSalaryDetailsTableColumns {
+ id:number
+ sfzNumber:string; // 身份证
+ name:string; // 户名
+ account:string; // 账户
+ sumDuration:number; // 当月总时长
+ salary:number; // 薪水(天)
+ dateOfIssue:string; // 发放年月
+ lister:string; // 制表人
+ createdAt:string; // 创建时间
+}
+
+
+export interface BusSalaryDetailsInfoData {
+ id:number|undefined; // 主键ID
+ sfzNumber:string|undefined; // 身份证
+ name:string|undefined; // 户名
+ account:string|undefined; // 账户
+ sumDuration:number|undefined; // 当月总时长
+ salary:number|undefined; // 薪水(天)
+ projectId:number|undefined; // 项目id
+ teamId:number|undefined; // 班组id
+ projectName:string|undefined; // 项目名称
+ teamName:string|undefined; // 班组名称
+ dateOfIssue:string|undefined; // 发放年月
+ lister:string|undefined; // 制表人
+ createdAt:string|undefined; // 创建时间
+ updatedAt:string|undefined; // 更新时间
+ deletedAt:string|undefined; // 删除时间
+}
+
+
+export interface BusSalaryDetailsTableDataState {
+ ids:any[];
+ tableData: {
+ data: Array;
+ total: number;
+ loading: boolean;
+ param: {
+ pageNum: number;
+ pageSize: number;
+ id: number|undefined;
+ sfzNumber: string|undefined;
+ projectId: number|undefined;
+ teamId: number|undefined;
+ dateRange: string[];
+ };
+ };
+}
+
+
+export interface BusSalaryDetailsEditState{
+ loading:boolean;
+ isShowDialog: boolean;
+ formData:BusSalaryDetailsInfoData;
+ rules: object;
+}
\ No newline at end of file
diff --git a/src/views/project/busSalaryDetails/index.vue b/src/views/project/busSalaryDetails/index.vue
new file mode 100644
index 0000000..227cbdb
--- /dev/null
+++ b/src/views/project/busSalaryDetails/index.vue
@@ -0,0 +1,563 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 批量删除
+
+ 导出员工工资表
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ (Number(scope.row.sumDuration) * Number(scope.row.salary)).toFixed(2) }}
+
+
+
+
+ {{ scope.row.createdAt }}
+
+
+
+
+ 详情
+ 导出工资表
+ 删除
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/projectLarge/ProjectScreen/components/header.vue b/src/views/projectLarge/ProjectScreen/components/header.vue
index a1e3eb2..b891b0d 100644
--- a/src/views/projectLarge/ProjectScreen/components/header.vue
+++ b/src/views/projectLarge/ProjectScreen/components/header.vue
@@ -23,7 +23,7 @@
v-for="(item, i) in weatherList"
:key="i"
class="weather-item"
- :style="{ transform: `translateY(-${offsetY}px)`, transition: transition }"
+ :style="{ transform: `translateY(-${offsetY}vw)`, transition: transition }"
>
{{ item.weather }}{{ item.tempMin }}°/{{ item.tempMax }}°
@@ -39,7 +39,7 @@

-
管理系统
+
管理系统
@@ -129,7 +129,7 @@ function judgeDayOrNight(sunRise: string, sunSet: string) {
const setWeatherScroll = () => {
curIndex.value += 1;
transition.value = 'transform 0.3s ease';
- offsetY.value = curIndex.value * 60;
+ offsetY.value = curIndex.value * 2;
if (curIndex.value === weatherList.value.length - 1) {
setTimeout(() => {
@@ -242,13 +242,13 @@ onUnmounted(() => {
.title > div:first-child {
/* 第一个子元素的样式 */
- font-size: 38px;
+ font-size: 2vw;
letter-spacing: 0.1em;
}
.title > div:last-child {
/* 最后一个子元素的样式 */
- font-size: 26px;
+ font-size: 1.5vw;
}
/* 顶部栏容器:Flex 水平布局 + 垂直居中 */
@@ -270,22 +270,23 @@ onUnmounted(() => {
align-items: center;
.weather-list {
- height: 60px;
+ height: 2vw;
overflow: hidden;
.weather-item {
- height: 60px;
- line-height: 60px;
+ height: 2vw;
display: flex;
align-items: center;
+ justify-content: center;
+ font-size: 0.8vw;
& > div:last-child {
margin-left: 10px;
}
img {
- width: 50px;
- height: 50px;
+ width: 3vw;
+ height: 3vw;
}
}
}
@@ -315,10 +316,12 @@ onUnmounted(() => {
/* 右侧区域(管理系统):图标 + 文字水平排列 */
.right-section {
+ width: 5.5vw;
display: flex;
align-items: center;
+ justify-content: center;
font-family: 'AlimamaShuHeiTi', sans-serif;
- font-size: 20px;
+ font-size: 1vw;
cursor: pointer;
}