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] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86=E4=BF=AE?= =?UTF-8?q?=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 @@