From cddbeb27d1cc223736a149584a6d73520fe82d5d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 06 二月 2026 17:18:06 +0800
Subject: [PATCH] 公司 1.采购台账加一个附件功能
---
src/views/procurementManagement/procurementLedger/index.vue | 40 +++++++++++++++++++++++++++++++++++-----
1 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index b4320ca..9f62ddf 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -151,7 +151,7 @@
<el-table-column
fixed="right"
label="鎿嶄綔"
- min-width="150"
+ min-width="200"
align="center"
>
<template #default="scope">
@@ -160,17 +160,26 @@
type="primary"
size="small"
@click="openForm('edit', scope.row)"
- :disabled="scope.row.recorderName !== userStore.nickName"
- >缂栬緫</el-button
+ :disabled="scope.row.recorderName !== userStore.nickName"
>
+ 缂栬緫
+ </el-button>
+ <el-button
+ link
+ type="primary"
+ size="small"
+ @click="openAttachmentDialog(scope.row)"
+ >
+ 闄勪欢
+ </el-button>
<el-button
link
type="success"
size="small"
@click="showQRCode(scope.row)"
- >鐢熸垚浜岀淮鐮�</el-button
>
-
+ 鐢熸垚浜岀淮鐮�
+ </el-button>
</template>
</el-table-column>
</el-table>
@@ -769,6 +778,7 @@
</div>
</template>
</el-dialog>
+ <FileList ref="fileListRef" />
</div>
</template>
@@ -798,6 +808,7 @@
} from "@/api/procurementManagement/procurementLedger.js";
import useFormData from "@/hooks/useFormData.js";
import QRCode from "qrcode";
+import FileList from "@/views/salesManagement/salesLedger/fileList.vue";
const { proxy } = getCurrentInstance();
const tableData = ref([]);
const productData = ref([]);
@@ -815,6 +826,7 @@
});
const total = ref(0);
const fileList = ref([]);
+const fileListRef = ref(null);
import useUserStore from "@/store/modules/user";
import { modelList, productTreeList } from "@/api/basicData/product.js";
import dayjs from "dayjs";
@@ -1247,6 +1259,24 @@
});
}
};
+
+// 鎵撳紑闄勪欢鍒楄〃瀵硅瘽妗�
+const openAttachmentDialog = (row) => {
+ if (!row?.id) {
+ proxy.$modal.msgWarning("鏃犳硶鑾峰彇璇ヨ鏁版嵁鐨処D");
+ return;
+ }
+ getPurchaseById({ id: row.id, type: 2 }).then((res) => {
+ const files = res.salesLedgerFiles || [];
+ if (!files.length) {
+ proxy.$modal.msgWarning("鏆傛棤闄勪欢");
+ return;
+ }
+ if (fileListRef.value && typeof fileListRef.value.open === "function") {
+ fileListRef.value.open(files);
+ }
+ });
+};
// 鍏抽棴浜у搧寮规
const closeProductDia = () => {
proxy.resetForm("productFormRef");
--
Gitblit v1.9.3