From bcec818e9e4ce22a1162c99da8a29ad4ceb87813 Mon Sep 17 00:00:00 2001
From: MO <448233645@qq.com>
Date: Sat, 7 Oct 2023 16:11:29 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=B3=E8=81=94=E5=87=AD=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/accounting/invoices/index.vue | 111 +++++++++++++++++++++---
src/views/accounting/other/index.vue | 27 +++---
src/views/accounting/voucher/index.vue | 80 ++++++++++-------
3 files changed, 166 insertions(+), 52 deletions(-)
diff --git a/src/views/accounting/invoices/index.vue b/src/views/accounting/invoices/index.vue
index 49ef18e9..9b83ce10 100644
--- a/src/views/accounting/invoices/index.vue
+++ b/src/views/accounting/invoices/index.vue
@@ -134,6 +134,17 @@
>下载元数据
+
+ 关联凭证
+
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -707,6 +747,7 @@ import {
downloadXml,
getInvoicesPageTime,
} from "@/api/accounting/invoices";
+import { getVoucherPage } from "@/api/accounting/voucher";
import { listData } from "@/api/system/dict/data";
import { getAccessToken } from "@/utils/auth";
@@ -717,6 +758,8 @@ export default {
return {
// 遮罩层
loading: true,
+ // 多个禁用
+ multiple: true,
// 导出遮罩层
exportLoading: false,
downloadLoading: false,
@@ -733,6 +776,7 @@ export default {
// 是否显示弹出层
open: false,
open1: false,
+ open2: false,
accountingType: "in",
fileList: [],
time: null,
@@ -820,6 +864,9 @@ export default {
{ required: true, message: "密码不能为空", trigger: "blur" },
],
},
+ rules1: {
+ voucherId: [{ required: true, message: "请选择凭证", trigger: "blur" }],
+ },
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
@@ -843,10 +890,12 @@ export default {
invoiceStateOptions: [], //发票状态
inOrOutOptions: [], //发票进销项
qrCheckCodeOptions: [], //发票二维码查验状态
+ kjpzOptions: [], //会计凭证
};
},
created() {
this.getList();
+ this.getKJPZ();
this.handleInitList();
},
@@ -892,7 +941,8 @@ export default {
this.total = response.data.total;
this.loading = false;
});
- } /** 查询列表2 */,
+ },
+ /** 查询列表2 */
getList2() {
this.loading = true;
// 执行查询
@@ -902,6 +952,7 @@ export default {
this.loading = false;
});
},
+
handleOneMonth() {
this.time = 1;
this.getList2();
@@ -914,6 +965,12 @@ export default {
this.time = 12;
this.getList2();
},
+ //获取会计凭证
+ getKJPZ() {
+ getVoucherPage().then((res) => {
+ this.kjpzOptions = res.data.list || [];
+ });
+ },
//获取字典数据
handleInitList() {
// 获取发票类型
@@ -980,6 +1037,10 @@ export default {
cancel1() {
this.open1 = false;
},
+ /** 取消按钮 */
+ cancel2() {
+ this.open2 = false;
+ },
/** 表单重置 */
reset() {
this.form = {
@@ -1057,8 +1118,14 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
+ console.log(selection);
this.ids = selection.map((item) => item.id);
- this.multiple = !selection.length;
+ if (selection.length == 1) {
+ this.multiple = false;
+ } else {
+ this.multiple = true;
+ }
+ this.form = selection[0];
},
/** 新增按钮操作 */
handleAdd() {
@@ -1130,6 +1197,24 @@ export default {
})
.catch(() => {});
},
+ //关联凭证
+ handleGLPZ() {
+ this.open2 = true;
+ this.form.voucherId = null;
+ },
+ submitForm2() {
+ this.$refs["form"].validate((valid) => {
+ if (!valid) {
+ return;
+ }
+ updateInvoices(this.form).then((response) => {
+ this.$modal.msgSuccess("关联成功");
+ this.open2 = false;
+ this.multiple = true;
+ this.getList();
+ });
+ });
+ },
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
@@ -1181,19 +1266,25 @@ export default {
submitFileForm() {
this.$refs.upload.submit();
},
+ //下载元数据
handleDownloadData() {
this.open1 = true;
this.queryParams.inputPassword = null;
},
submitForm1() {
- // 处理查询参数
- let params = { ...this.queryParams };
- downloadXml(params)
- .then((response) => {
- this.$download.excel(response, "发票元数据.xml");
- this.open1 = false;
- })
- .catch(() => {});
+ this.$refs["queryForm"].validate((valid) => {
+ if (!valid) {
+ return;
+ }
+ // 处理查询参数
+ let params = { ...this.queryParams };
+ downloadXml(params)
+ .then((response) => {
+ this.$download.excel(response, "发票元数据.xml");
+ this.open1 = false;
+ })
+ .catch(() => {});
+ });
},
},
};
diff --git a/src/views/accounting/other/index.vue b/src/views/accounting/other/index.vue
index cbfe7228..0e8512f9 100644
--- a/src/views/accounting/other/index.vue
+++ b/src/views/accounting/other/index.vue
@@ -88,11 +88,13 @@
-
-
-
-
-
+
+
+
+ {{ scope.row.fileUrl }}
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Date: Sat, 7 Oct 2023 16:32:12 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=83=E6=95=B0?=
=?UTF-8?q?=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/book.js | 10 ++++
src/api/accounting/report.js | 10 ++++
src/views/accounting/book/index.vue | 70 +++++++++++++++++++++++++++
src/views/accounting/report/index.vue | 70 +++++++++++++++++++++++++++
4 files changed, 160 insertions(+)
diff --git a/src/api/accounting/book.js b/src/api/accounting/book.js
index ba63f6af..f0626d6b 100644
--- a/src/api/accounting/book.js
+++ b/src/api/accounting/book.js
@@ -53,3 +53,13 @@ export function exportAccountingBookExcel(query) {
responseType: 'blob'
})
}
+
+// 下载元数据
+export function downloadXml(query) {
+ return request({
+ url: '/archives/accounting-book/downloadXml',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
\ No newline at end of file
diff --git a/src/api/accounting/report.js b/src/api/accounting/report.js
index 0fdefb91..a9da0a98 100644
--- a/src/api/accounting/report.js
+++ b/src/api/accounting/report.js
@@ -52,3 +52,13 @@ export function exportAccountingReportExcel(query) {
responseType: 'blob'
})
}
+
+// 下载元数据
+export function downloadXml(query) {
+ return request({
+ url: '/archives/accounting-report/downloadXml',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/src/views/accounting/book/index.vue b/src/views/accounting/book/index.vue
index d37a322e..f17ffe8b 100644
--- a/src/views/accounting/book/index.vue
+++ b/src/views/accounting/book/index.vue
@@ -60,6 +60,16 @@
>导出
+
+ 下载元数据
+
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -245,6 +285,7 @@ import {
deleteAccountingBook,
getAccountingBookPage,
exportAccountingBookExcel,
+ downloadXml,
} from "@/api/accounting/book";
import { getAccessToken } from "@/utils/auth";
import { getOrganizationPage } from "@/api/setting/organization";
@@ -271,6 +312,7 @@ export default {
fileList2: [],
// 是否显示弹出层
open: false,
+ open1: false,
// 查询参数
queryParams: {
pageNo: 1,
@@ -281,6 +323,7 @@ export default {
type: null,
year: null,
period: null,
+ inputPassword: null,
},
// 表单参数
form: {},
@@ -293,6 +336,9 @@ export default {
period: [
{ required: true, message: "请输入会计期间", trigger: "blur" },
],
+ inputPassword: [
+ { required: true, message: "密码不能为空", trigger: "blur" },
+ ],
},
uploadUrl:
process.env.VUE_APP_BASE_API +
@@ -347,6 +393,10 @@ export default {
this.open = false;
this.reset();
},
+ /** 取消按钮 */
+ cancel1() {
+ this.open1 = false;
+ },
/** 表单重置 */
reset() {
this.form = {
@@ -387,6 +437,26 @@ 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) => {
+ this.$download.excel(response, "会计账簿元数据.xml");
+ this.open1 = false;
+ })
+ .catch(() => {});
+ });
+ },
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
diff --git a/src/views/accounting/report/index.vue b/src/views/accounting/report/index.vue
index 950f120b..57a1b80c 100644
--- a/src/views/accounting/report/index.vue
+++ b/src/views/accounting/report/index.vue
@@ -69,6 +69,16 @@
>导出
+
+ 下载元数据
+
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -251,6 +291,7 @@ import {
getAccountingReport,
getAccountingReportPage,
exportAccountingReportExcel,
+ downloadXml,
} from "@/api/accounting/report";
import { getAccessToken } from "@/utils/auth";
import { getOrganizationPage } from "@/api/setting/organization";
@@ -277,6 +318,7 @@ export default {
fileList2: [],
// 是否显示弹出层
open: false,
+ open1: false,
// 查询参数
queryParams: {
pageNo: 1,
@@ -295,6 +337,7 @@ export default {
archiveState: null,
deptId: null,
deptName: null,
+ inputPassword: null,
},
// 表单参数
form: {},
@@ -307,6 +350,9 @@ export default {
period: [
{ required: true, message: "请输入会计期间", trigger: "blur" },
],
+ inputPassword: [
+ { required: true, message: "密码不能为空", trigger: "blur" },
+ ],
},
uploadUrl:
process.env.VUE_APP_BASE_API +
@@ -338,6 +384,10 @@ export default {
this.open = false;
this.reset();
},
+ /** 取消按钮 */
+ cancel1() {
+ this.open1 = false;
+ },
/** 表单重置 */
reset() {
this.form = {
@@ -371,6 +421,26 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
+ //下载元数据
+ 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) => {
+ this.$download.excel(response, "会计账簿元数据.xml");
+ this.open1 = false;
+ })
+ .catch(() => {});
+ });
+ },
/** 新增按钮操作 */
handleAdd() {
this.reset();