From c15270d076083d0d91c731496070112120d7e5ba Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 18 八月 2025 10:06:33 +0800
Subject: [PATCH] yys 优化导入导出
---
src/utils/util.js | 17 ++++++++++++++++-
src/views/lavorissue/ledger/index.vue | 34 +++++++++++++++++++++++++++++++++-
2 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/src/utils/util.js b/src/utils/util.js
index fd3ef75..be08cc1 100644
--- a/src/utils/util.js
+++ b/src/utils/util.js
@@ -1,4 +1,6 @@
//闃叉姈
+import dayjs from "dayjs";
+
export function debounce(fn) {
console.log(1)
let t = null //鍙細鎵ц涓�娆�
@@ -103,4 +105,17 @@
}
export function filterArr(arr) {
return arr.filter(item => item.flag !== false);
- }
\ No newline at end of file
+ }
+
+ export function getCurrentMonth () {
+ let month = dayjs().month() + 1
+ if (month <= 3) {
+ return '1';
+ } else if (month <= 6) {
+ return '2';
+ } else if (month <= 9) {
+ return '3';
+ } else if (month <= 12) {
+ return '4';
+ }
+}
\ No newline at end of file
diff --git a/src/views/lavorissue/ledger/index.vue b/src/views/lavorissue/ledger/index.vue
index 6441247..13b9cf5 100644
--- a/src/views/lavorissue/ledger/index.vue
+++ b/src/views/lavorissue/ledger/index.vue
@@ -1,6 +1,17 @@
<template>
<div class="app-container">
<el-form :model="filters" :inline="true">
+ <el-form-item label="鍙戞斁瀛e害:" prop="season">
+ <el-select
+ style="width: 200px;"
+ @change="handleQuery"
+ v-model="filters.season"
+ placeholder="璇烽�夋嫨"
+ :clearable="false"
+ >
+ <el-option :label="item.label" :value="item.value" v-for="(item,index) in jidu" :key="value" />
+ </el-select>
+ </el-form-item>
<el-form-item label="鍛樺伐鍚嶇О:">
<el-input
v-model="filters.staffName"
@@ -68,6 +79,7 @@
import { ElMessageBox, ElMessage } from "element-plus";
import dayjs from "dayjs";
import FilesDia from "./filesDia.vue";
+import { getCurrentMonth } from "@/utils/util"
// 琛ㄦ牸澶氶�夋閫変腑椤�
const multipleList = ref([]);
@@ -89,6 +101,7 @@
listPage,
{
staffName: '',
+ season: getCurrentMonth(),
},
[
{
@@ -153,6 +166,25 @@
},
]
);
+
+const jidu = ref([
+ {
+ value: '1',
+ label: '绗竴瀛e害'
+ },
+ {
+ value: '2',
+ label: '绗簩瀛e害'
+ },
+ {
+ value: '3',
+ label: '绗笁瀛e害'
+ },
+ {
+ value: '4',
+ label: '绗洓瀛e害'
+ }
+])
// 澶氶�夊悗鍋氫粈涔�
const handleSelectionChange = (selectionList) => {
@@ -231,7 +263,7 @@
type: "warning",
})
.then(() => {
- proxy.download(`/lavorIssue/export`, {}, "鍔充繚鍙拌处.xlsx");
+ proxy.download(`/lavorIssue/exportCopy`, {season: filters.season}, "鍔充繚鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3