From 954077c8167ac5a1ecd1bdf1996c0699d22eaca8 Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Fri, 22 Sep 2023 18:03:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=9A=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/accounting/report.js | 54 ++++ src/views/accounting/report/index.vue | 373 ++++++++++++++++++++++++++ 2 files changed, 427 insertions(+) create mode 100644 src/api/accounting/report.js create mode 100644 src/views/accounting/report/index.vue diff --git a/src/api/accounting/report.js b/src/api/accounting/report.js new file mode 100644 index 00000000..0fdefb91 --- /dev/null +++ b/src/api/accounting/report.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建会计报表 +export function createAccountingReport(data) { + return request({ + url: '/archives/accounting-report/create', + method: 'post', + data: data + }) +} + +// 更新会计报表 +export function updateAccountingReport(data) { + return request({ + url: '/archives/accounting-report/update', + method: 'put', + data: data + }) +} + +// 删除会计报表 +export function deleteAccountingReport(id) { + return request({ + url: '/archives/accounting-report/delete?id=' + id, + method: 'delete' + }) +} + +// 获得会计报表 +export function getAccountingReport(id) { + return request({ + url: '/archives/accounting-report/get?id=' + id, + method: 'get' + }) +} + +// 获得会计报表分页 +export function getAccountingReportPage(query) { + return request({ + url: '/archives/accounting-report/page', + method: 'get', + params: query + }) +} + +// 导出会计报表 Excel +export function exportAccountingReportExcel(query) { + return request({ + url: '/archives/accounting-report/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/views/accounting/report/index.vue b/src/views/accounting/report/index.vue new file mode 100644 index 00000000..ba7571cb --- /dev/null +++ b/src/views/accounting/report/index.vue @@ -0,0 +1,373 @@ + + + From 4192e681c0f11e12f4ecaf2a13b6c29efd122ea6 Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Fri, 22 Sep 2023 18:04:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common/index.js | 9 + src/components/UploadImgPdf/index.vue | 151 ++++++++++------ src/components/UploadInvoice/index.vue | 221 +++++++++++++++++++++++ src/views/accounting/book/index.vue | 45 +++-- src/views/accounting/invoices/index.vue | 35 +++- src/views/bs/invoice/components/form.vue | 179 ++++++++++++------ 6 files changed, 514 insertions(+), 126 deletions(-) create mode 100644 src/components/UploadInvoice/index.vue diff --git a/src/api/common/index.js b/src/api/common/index.js index 811c79db..ba7f73d6 100644 --- a/src/api/common/index.js +++ b/src/api/common/index.js @@ -16,4 +16,13 @@ export function uploadFileApi(data) { method: 'post', data: data }) +} + +// 文件上传 +export function uploadInvoiceApi(data) { + return request({ + url: '/accounting/invoices/identify', + method: 'post', + data: data + }) } \ No newline at end of file diff --git a/src/components/UploadImgPdf/index.vue b/src/components/UploadImgPdf/index.vue index e2ba2b7e..76cd0ff6 100644 --- a/src/components/UploadImgPdf/index.vue +++ b/src/components/UploadImgPdf/index.vue @@ -1,17 +1,48 @@ - \ No newline at end of file + diff --git a/src/components/UploadInvoice/index.vue b/src/components/UploadInvoice/index.vue new file mode 100644 index 00000000..3d48e152 --- /dev/null +++ b/src/components/UploadInvoice/index.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/views/accounting/book/index.vue b/src/views/accounting/book/index.vue index 94dd1497..74bca118 100644 --- a/src/views/accounting/book/index.vue +++ b/src/views/accounting/book/index.vue @@ -10,20 +10,25 @@ label-width="68px" > - + value-format="yyyy" + type="year" + placeholder="请选择会计年度" + > + - + format="M月" + value-format="M" + type="month" + placeholder="请选择会计期间" + > + - + + + @@ -220,7 +231,6 @@ -
- + --> + + + + + + 发票信息 @@ -567,7 +577,7 @@ import { getAccessToken } from "@/utils/auth"; export default { name: "Invoices", - components: {}, + components: { UploadInvoice: () => import("@/components/UploadInvoice") }, data() { return { // 遮罩层 @@ -585,6 +595,7 @@ export default { // 是否显示弹出层 open: false, accountingType: "in", + fileList: [], // 查询参数 queryParams: { pageNo: 1, @@ -678,6 +689,16 @@ export default { }, methods: { + // 上传文件事件 + handleImg(list) { + this.fileList = list; + this.reset(); + }, + handleScan(form) { + const num = form.duplicateMark.toString(); + this.form = form; + this.form.duplicateMark = num; + }, /** * 文件预览 * @param fileUrl @@ -841,6 +862,7 @@ export default { this.reset(); this.open = true; this.title = "添加发票"; + this.fileList = []; }, /** 修改按钮操作 */ handleUpdate(row) { @@ -918,3 +940,10 @@ export default { }, }; + + diff --git a/src/views/bs/invoice/components/form.vue b/src/views/bs/invoice/components/form.vue index cb5598ca..760d4b9d 100644 --- a/src/views/bs/invoice/components/form.vue +++ b/src/views/bs/invoice/components/form.vue @@ -1,22 +1,32 @@