From 3dadba22d0435b314db5b06f64d326518acec407 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 30 一月 2026 14:24:09 +0800
Subject: [PATCH] 生成核算增加日期搜索
---
src/views/productionManagement/productionCosting/index.vue | 40 +++++++++++++++++++++++-----------------
1 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index fe8d781..67167c7 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -49,7 +49,7 @@
:column="tableColumn"
:tableData="tableData"
:page="page1"
- :tableLoading="tableLoading"
+ :tableLoading="tableLoading1"
style="margin-right: 20px;"
@pagination="pagination1"
></PIMTable>
@@ -172,13 +172,10 @@
schedulingUserName: "",
salesContractNo: "",
dateType: "day",
- dateRange: undefined,
- 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"),
+ dateRange: dayjs().format("YYYY-MM-DD"),
+ entryDate: dayjs().format("YYYY-MM-DD"),
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -217,11 +214,14 @@
const params = { ...searchForm.value, ...page };
salesLedgerProductionAccountingList(params).then((res) => {
- tableLoading.value = false;
const records = res.data.records || [];
leftTableData.value = records;
page.total = res.data.total || 0;
- });
+ }).finally(() => {
+ tableLoading.value = false;
+ })
+
+
};
@@ -229,10 +229,11 @@
tableLoading1.value = true;
const params = { ...page1, ...searchForm.value };
salesLedgerProductionAccountingListProductionDetails(params).then((res) => {
- tableLoading1.value = false;
tableData.value = res.data.records || [];;
page1.total = res.data.total || 0;
- });
+ }).finally(() => {
+ tableLoading1.value = false;
+ })
};
// 鏋勫缓宸︿晶姹囨�诲彴璐︼紙鎸夌敓浜т汉姹囨�讳骇閲忋�佸伐璧勭瓑锛�
@@ -259,12 +260,17 @@
};
// 宸︿晶鏃�/鏈堝垏鎹�
-const handleDateTypeChange = () => {
+const handleDateTypeChange = (value) => {
// 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
- searchForm.value.dateRange = undefined;
- searchForm.value.entryDate = undefined;
- searchForm.value.entryDateStart = undefined;
- searchForm.value.entryDateEnd = undefined;
+ if (value === "day") {
+ searchForm.value.entryDate = dayjs().format("YYYY-MM-DD");
+ searchForm.value.dateRange = searchForm.value.entryDate
+ } else {
+ searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD");
+ searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD");
+ searchForm.value.dateRange = [searchForm.value.entryDateStart, searchForm.value.entryDateEnd]
+ }
+
reloadData()
};
--
Gitblit v1.9.3