From 665cabbba2808eb58f14bbc90d9532d843a29ccc Mon Sep 17 00:00:00 2001
From: MO <448233645@qq.com>
Date: Mon, 9 Oct 2023 16:44:46 +0800
Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=9B=9E=E5=8D=95=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=85=83=E6=95=B0=E6=8D=AE=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/accounting/bankSlip.js | 10 +
src/views/accounting/bankSlip/index.vue | 441 ++++++++++++++++--------
2 files changed, 315 insertions(+), 136 deletions(-)
diff --git a/src/api/accounting/bankSlip.js b/src/api/accounting/bankSlip.js
index 30f8a2d5..589f6d31 100644
--- a/src/api/accounting/bankSlip.js
+++ b/src/api/accounting/bankSlip.js
@@ -52,3 +52,13 @@ export function exportBankSlipExcel(query) {
responseType: 'blob'
})
}
+
+// 下载元数据
+export function downloadXml(query) {
+ return request({
+ url: '/archives/bank-slip/downloadXml',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
\ No newline at end of file
diff --git a/src/views/accounting/bankSlip/index.vue b/src/views/accounting/bankSlip/index.vue
index aa0c7c12..66da0f1a 100644
--- a/src/views/accounting/bankSlip/index.vue
+++ b/src/views/accounting/bankSlip/index.vue
@@ -134,6 +134,17 @@
>导出
+
+ 下载元数据
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 请选择字典生成
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -394,6 +530,7 @@ import {
getBankSlip,
getBankSlipPage,
exportBankSlipExcel,
+ downloadXml,
} from "@/api/accounting/bankSlip";
export default {
@@ -415,6 +552,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ open1: false,
// 查询参数
queryParams: {
pageNo: 1,
@@ -460,6 +598,7 @@ export default {
archiveId: null,
archiveState: null,
password: null,
+ inputPassword: null,
},
// 表单参数
form: {},
@@ -486,6 +625,10 @@ export default {
this.open = false;
this.reset();
},
+ /** 取消按钮 */
+ cancel1() {
+ this.open1 = false;
+ },
/** 表单重置 */
reset() {
this.form = {
@@ -582,6 +725,32 @@ export default {
});
});
},
+ //下载元数据
+ handleDownloadData() {
+ this.open1 = true;
+ this.queryParams.inputPassword = null;
+ },
+ submitForm1() {
+ this.$refs["queryForm"].validate((valid) => {
+ if (!valid) {
+ return;
+ }
+ // 处理查询参数
+ let params = { ...this.queryParams };
+ downloadXml(params)
+ .then((response) => {
+ console.log(response.size);
+ if (response.size == 39) {
+ this.$modal.msgError("密码错误");
+ return false;
+ } else {
+ this.$download.excel(response, "发票元数据.xml");
+ this.open1 = false;
+ }
+ })
+ .catch(() => {});
+ });
+ },
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;