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 @@