From 388b07c38e88e618c4332f07b96994516dc04207 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 22 四月 2026 17:36:43 +0800
Subject: [PATCH] 首页质量统计bug修改
---
src/views/salesManagement/salesLedger/index.vue | 29 ++++++++++++++++++++++++-----
1 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 083d3db..f2033ac 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -118,8 +118,8 @@
</el-button>
<template #dropdown>
<el-dropdown-menu>
- <el-dropdown-item command="notShipped">鏈彂璐�</el-dropdown-item>
- <el-dropdown-item command="shipped">宸插彂璐�</el-dropdown-item>
+ <el-dropdown-item command="notShipped">鏈嚭搴�</el-dropdown-item>
+ <el-dropdown-item command="shipped">宸插嚭搴�</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@@ -158,7 +158,7 @@
style="width: 100%"
:summary-method="summarizeMainTable"
@expand-change="expandChange"
- height="calc(100vh - 18.5em)">
+ height="calc(100vh - 22em)">
<el-table-column align="center"
type="selection"
width="55"
@@ -2908,7 +2908,15 @@
notShipped: "/sales/ledger/salesHistory/notShippingImport",
shipped: "/sales/ledger/salesHistory/shippingImport",
};
-
+ const HISTORY_IMPORT_TEMPLATE_URL_MAP = {
+ notShipped: "/sales/ledger/salesHistory/notShippingImportTemplate",
+ shipped: "/sales/ledger/salesHistory/shippingImportTemplate",
+ };
+ const HISTORY_IMPORT_TEMPLATE_FILE_NAME_MAP = {
+ notShipped: "閿�鍞彂璐у巻鍙叉暟鎹鍏ユā鏉�-鏈彂璐�.xlsx",
+ shipped: "閿�鍞彂璐у巻鍙叉暟鎹鍏ユā鏉�-宸插彂璐�.xlsx",
+ };
+ const currentImportCommand = ref("default");
const changeDaterange = value => {
if (value) {
searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
@@ -3875,18 +3883,29 @@
};
// 瀵煎叆
const handleImport = () => {
+ currentImportCommand.value = "default";
openImportDialog("瀵煎叆閿�鍞彴璐�", "/sales/ledger/import");
};
// 鍘嗗彶杩佺Щ
const handleHistoryImportCommand = command => {
const url = HISTORY_IMPORT_URL_MAP[command];
if (!url) return;
- const title = command === "shipped" ? "鍘嗗彶杩佺Щ-宸插彂璐�" : "鍘嗗彶杩佺Щ-鏈彂璐�";
+ currentImportCommand.value = command;
+ const title = command === "shipped" ? "鍘嗗彶杩佺Щ-宸插嚭搴�" : "鍘嗗彶杩佺Щ-鏈嚭搴�";
openImportDialog(title, url);
};
// 涓嬭浇瀵煎叆妯℃澘
const downloadTemplate = () => {
+ const command = currentImportCommand.value;
+ if (command && command !== "default") {
+ const templateUrl = HISTORY_IMPORT_TEMPLATE_URL_MAP[command];
+ const fileName = HISTORY_IMPORT_TEMPLATE_FILE_NAME_MAP[command];
+ if (templateUrl) {
+ proxy.download(templateUrl, {}, fileName || "閿�鍞彂璐у巻鍙叉暟鎹鍏ユā鏉�.xlsx");
+ return;
+ }
+ }
proxy.download("/sales/ledger/exportTemplate", {}, "閿�鍞彴璐﹀鍏ユā鏉�.xlsx");
};
const onClose = () => {
--
Gitblit v1.9.3