From 14f694d913698b5e04b09f6e6df789cbd1102937 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 14:17:42 +0800
Subject: [PATCH] 生产管控-添加导出功能
---
src/views/productionManagement/productionReporting/index.vue | 12 ++---
src/views/productionManagement/productionOrder/index.vue | 12 +----
src/views/productionManagement/productionDispatching/index.vue | 32 ++++++++++------
src/views/productionManagement/operationScheduling/index.vue | 26 ++++++++++---
4 files changed, 48 insertions(+), 34 deletions(-)
diff --git a/src/views/productionManagement/operationScheduling/index.vue b/src/views/productionManagement/operationScheduling/index.vue
index 983101f..082b782 100644
--- a/src/views/productionManagement/operationScheduling/index.vue
+++ b/src/views/productionManagement/operationScheduling/index.vue
@@ -32,6 +32,7 @@
<div style="text-align: right" class="mb10">
<el-button type="primary" @click="openForm">宸ュ簭鎺掍骇</el-button>
<el-button type="danger" @click="handleDelete" plain>鍙栨秷鎺掍骇</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</div>
<PIMTable
rowKey="id"
@@ -60,12 +61,9 @@
searchForm: {
staffName: "",
status: 1,
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -250,6 +248,22 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/salesLedger/scheduling/exportTwo", {}, "宸ュ簭鎺掍骇.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getList();
});
diff --git a/src/views/productionManagement/productionDispatching/index.vue b/src/views/productionManagement/productionDispatching/index.vue
index 5aebfc3..d27b2dd 100644
--- a/src/views/productionManagement/productionDispatching/index.vue
+++ b/src/views/productionManagement/productionDispatching/index.vue
@@ -27,6 +27,7 @@
</div>
<div>
<el-button type="primary" @click="openForm('add')">鐢熶骇娲惧伐</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
<div class="table_list">
@@ -51,17 +52,15 @@
import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue";
import dayjs from "dayjs";
import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
+import { ElMessageBox } from "element-plus";
const data = reactive({
searchForm: {
customerName: "",
projectName: "",
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -190,13 +189,22 @@
})
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/salesLedger/scheduling/exportOne", {}, "鐢熶骇娲惧伐.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
onMounted(() => {
- searchForm.value.entryDate = [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ]
- searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD")
- searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD")
getList();
});
</script>
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index e65fd3b..bce7a87 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -119,9 +119,9 @@
searchForm: {
customerName: "",
projectName: "",
- entryDate: [], // 褰曞叆鏃ユ湡
- entryDateStart: '',
- entryDateEnd: '',
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -177,12 +177,6 @@
};
onMounted(() => {
- searchForm.value.entryDate = [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ]
- searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD")
- searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD")
getList();
});
</script>
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index 3ceae74..42a0c4f 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -31,6 +31,7 @@
<div class="table_list">
<div style="text-align: right" class="mb10">
<el-button type="primary" @click="openForm('add')">鐢熶骇鎶ュ伐</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</div>
<PIMTable
rowKey="id"
@@ -148,12 +149,9 @@
const data = reactive({
searchForm: {
staffName: "",
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -416,7 +414,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 1}, "浜哄憳鍏ヨ亴.xlsx");
+ proxy.download("/salesLedger/work/export", {}, "鐢熶骇鎶ュ伐.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3