diff --git a/src/api/accounting/bankSlip.js b/src/api/accounting/bankSlip.js index c776f563..33edd64a 100644 --- a/src/api/accounting/bankSlip.js +++ b/src/api/accounting/bankSlip.js @@ -18,6 +18,15 @@ export function updateBankSlip(data) { }) } +// 关联会计凭证 +export function updateArrayBankSlip(data) { + return request({ + url: '/archives/bank-slip/update/array', + method: 'put', + data: data + }) +} + // 删除银行回单 export function deleteBankSlip(id) { return request({ diff --git a/src/views/accounting/bankSlip/index.vue b/src/views/accounting/bankSlip/index.vue index e44c2c8d..371f27fb 100644 --- a/src/views/accounting/bankSlip/index.vue +++ b/src/views/accounting/bankSlip/index.vue @@ -673,12 +673,12 @@ width="800px" append-to-body > - + - + @@ -719,6 +719,7 @@ import { exportBankSlipExcel, downloadXml, getBankSlipPageTime, + updateArrayBankSlip, } from "@/api/accounting/bankSlip"; import { getAccessToken, getTenantId } from "@/utils/auth"; import { listUser } from "@/api/system/user"; @@ -735,10 +736,8 @@ export default { optType: undefined, // 遮罩层 loading: true, - // 多个禁用 - multiple: true, // 非多个禁用 - multiple1: true, + multiple: true, // 导出遮罩层 exportLoading: false, // 显示搜索条件 @@ -813,6 +812,10 @@ export default { // 表单参数 form: {}, form1: {}, + PZform: { + voucherId: undefined, + voucherNum: undefined, + }, // 表单校验 rules: { staffName: [{ required: true, message: "请选择", trigger: "blur" }], @@ -1143,28 +1146,24 @@ export default { }, // 多选框选中数据 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; - } - this.multiple1 = !selection.length; + this.multiple = !selection.length; }, //关联凭证 handleGLPZ() { - this.form.voucherId = null; this.open2 = true; - console.log(this.form); + this.PZform = { + voucherId: undefined, + voucherNum: undefined, + }; }, submitForm2() { - this.$refs["form"].validate((valid) => { + this.$refs["PZform"].validate((valid) => { if (!valid) { return; } - updateBankSlip(this.form).then((response) => { + const data = { id: this.ids, voucherId: this.PZform.voucherId }; + updateArrayBankSlip(data).then((response) => { this.$modal.msgSuccess("关联成功"); this.open2 = false; this.multiple = true; @@ -1176,9 +1175,9 @@ export default { this.$refs.VoucherSelect.showFlag = true; }, onVoucherSelected(obj) { - console.log(obj); if (obj != undefined && obj != null) { - this.form.voucherId = obj.id; + this.PZform.voucherId = obj.id; + this.PZform.voucherNum = obj.voucherNum; } }, }, diff --git a/src/views/accounting/invoices/index.vue b/src/views/accounting/invoices/index.vue index 9d9b9de4..31a7971f 100644 --- a/src/views/accounting/invoices/index.vue +++ b/src/views/accounting/invoices/index.vue @@ -1177,7 +1177,6 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - console.log(selection); this.ids = selection.map((item) => item.id); this.multiple = !selection.length; }, @@ -1383,7 +1382,6 @@ export default { this.$refs.VoucherSelect.showFlag = true; }, onVoucherSelected(obj) { - console.log(obj); if (obj != undefined && obj != null) { this.PZform.voucherId = obj.id; this.PZform.voucherNum = obj.voucherNum;