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

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) {
return request({

@ -673,12 +673,12 @@
width="800px"
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-col :span="14">
<el-form-item label="会计凭证" prop="voucherId">
<el-form-item label="会计凭证">
<el-input
v-model="form.voucherId"
v-model="PZform.voucherNum"
placeholder="请选择凭证"
readonly
>
@ -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;
}
},
},

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

Loading…
Cancel
Save