银行回单支持批量关联凭证

main
mo 1 year ago
parent f9fc84c4f5
commit fe075407e7

@ -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) { export function deleteBankSlip(id) {
return request({ return request({

@ -673,12 +673,12 @@
width="800px" width="800px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="140px"> <el-form ref="PZform" :model="PZform" :rules="rules" label-width="140px">
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item label="会计凭证" prop="voucherId"> <el-form-item label="会计凭证">
<el-input <el-input
v-model="form.voucherId" v-model="PZform.voucherNum"
placeholder="请选择凭证" placeholder="请选择凭证"
readonly readonly
> >
@ -719,6 +719,7 @@ import {
exportBankSlipExcel, exportBankSlipExcel,
downloadXml, downloadXml,
getBankSlipPageTime, getBankSlipPageTime,
updateArrayBankSlip,
} from "@/api/accounting/bankSlip"; } from "@/api/accounting/bankSlip";
import { getAccessToken, getTenantId } from "@/utils/auth"; import { getAccessToken, getTenantId } from "@/utils/auth";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
@ -735,10 +736,8 @@ export default {
optType: undefined, optType: undefined,
// //
loading: true, loading: true,
//
multiple: true,
// //
multiple1: true, multiple: true,
// //
exportLoading: false, exportLoading: false,
// //
@ -813,6 +812,10 @@ export default {
// //
form: {}, form: {},
form1: {}, form1: {},
PZform: {
voucherId: undefined,
voucherNum: undefined,
},
// //
rules: { rules: {
staffName: [{ required: true, message: "请选择", trigger: "blur" }], staffName: [{ required: true, message: "请选择", trigger: "blur" }],
@ -1143,28 +1146,24 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.id); this.ids = selection.map((item) => item.id);
if (selection.length == 1) { this.multiple = !selection.length;
this.multiple = false;
this.form = selection[0];
} else {
this.multiple = true;
}
this.multiple1 = !selection.length;
}, },
// //
handleGLPZ() { handleGLPZ() {
this.form.voucherId = null;
this.open2 = true; this.open2 = true;
console.log(this.form); this.PZform = {
voucherId: undefined,
voucherNum: undefined,
};
}, },
submitForm2() { submitForm2() {
this.$refs["form"].validate((valid) => { this.$refs["PZform"].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
updateBankSlip(this.form).then((response) => { const data = { id: this.ids, voucherId: this.PZform.voucherId };
updateArrayBankSlip(data).then((response) => {
this.$modal.msgSuccess("关联成功"); this.$modal.msgSuccess("关联成功");
this.open2 = false; this.open2 = false;
this.multiple = true; this.multiple = true;
@ -1176,9 +1175,9 @@ export default {
this.$refs.VoucherSelect.showFlag = true; this.$refs.VoucherSelect.showFlag = true;
}, },
onVoucherSelected(obj) { onVoucherSelected(obj) {
console.log(obj);
if (obj != undefined && obj != null) { if (obj != undefined && obj != null) {
this.form.voucherId = obj.id; this.PZform.voucherId = obj.id;
this.PZform.voucherNum = obj.voucherNum;
} }
}, },
}, },

@ -1177,7 +1177,6 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.id); this.ids = selection.map((item) => item.id);
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -1383,7 +1382,6 @@ export default {
this.$refs.VoucherSelect.showFlag = true; this.$refs.VoucherSelect.showFlag = true;
}, },
onVoucherSelected(obj) { onVoucherSelected(obj) {
console.log(obj);
if (obj != undefined && obj != null) { if (obj != undefined && obj != null) {
this.PZform.voucherId = obj.id; this.PZform.voucherId = obj.id;
this.PZform.voucherNum = obj.voucherNum; this.PZform.voucherNum = obj.voucherNum;

Loading…
Cancel
Save