diff --git a/src/views/accounting/bankSlip/index.vue b/src/views/accounting/bankSlip/index.vue index cee847cd..e022a6f1 100644 --- a/src/views/accounting/bankSlip/index.vue +++ b/src/views/accounting/bankSlip/index.vue @@ -156,6 +156,17 @@ >下载元数据 + + 关联凭证 + - - + + 取 消 + + + + + + + + + + + + + + + + + @@ -623,14 +679,20 @@ import { } from "@/api/accounting/bankSlip"; import { getAccessToken, getTenantId } from "@/utils/auth"; import { listUser } from "@/api/system/user"; +import VoucherSelect from "@/components/VoucherSelect/single.vue"; export default { name: "BankSlip", - components: { UploadBankSlip: () => import("@/components/UploadBankSlip") }, + components: { + UploadBankSlip: () => import("@/components/UploadBankSlip"), + VoucherSelect, + }, data() { return { // 遮罩层 loading: true, + // 多个禁用 + multiple: true, // 导出遮罩层 exportLoading: false, // 显示搜索条件 @@ -989,6 +1051,45 @@ export default { }) .catch(() => {}); }, + // 多选框选中数据 + handleSelectionChange(selection) { + console.log(selection); + this.ids = selection.map((item) => item.id); + if (selection.length == 1) { + this.multiple = false; + this.form = selection[0]; + } else { + this.multiple = true; + } + }, + //关联凭证 + handleGLPZ() { + this.form.voucherId = null; + this.open2 = true; + console.log(this.form); + }, + submitForm2() { + this.$refs["form"].validate((valid) => { + if (!valid) { + return; + } + updateBankSlip(this.form).then((response) => { + this.$modal.msgSuccess("关联成功"); + this.open2 = false; + this.multiple = true; + this.getList(); + }); + }); + }, + handleSelectVoucher() { + this.$refs.VoucherSelect.showFlag = true; + }, + onVoucherSelected(obj) { + console.log(obj); + if (obj != undefined && obj != null) { + this.form.voucherId = obj.id; + } + }, }, };