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/productionDispatching/index.vue | 37 +++++++++++++++++++++++--------------
1 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/src/views/productionManagement/productionDispatching/index.vue b/src/views/productionManagement/productionDispatching/index.vue
index c28b062..d27b2dd 100644
--- a/src/views/productionManagement/productionDispatching/index.vue
+++ b/src/views/productionManagement/productionDispatching/index.vue
@@ -13,7 +13,7 @@
/>
<span class="search_title ml10">椤圭洰鍚嶇О锛�</span>
<el-input
- v-model="searchForm.customerName"
+ v-model="searchForm.projectName"
style="width: 240px"
placeholder="璇疯緭鍏�"
@change="handleQuery"
@@ -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,16 +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: {
- 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"),
+ customerName: "",
+ projectName: "",
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -189,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>
--
Gitblit v1.9.3