From 74e3cc02785686464a7c935b5eaffcd033fa83e4 Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Tue, 10 Oct 2023 17:25:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A4=E6=AC=BE=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=AE=A4=E6=AC=BE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.js | 2 + src/views/accounting/bankSlip/index.vue | 53 +++++++++++++++++++------ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/utils/dict.js b/src/utils/dict.js index 4ea6c05d..5294adea 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -143,6 +143,8 @@ export const DICT_TYPE = { BORROW_STATUS: 'borrow_status', //会计凭证类型 ACCOUNTING_VOUCHER_TYPE: 'accounting_voucher_type', + //银行回单认款状态 + BANK_CONFIRM_STATUS: 'bank_confirm_status', } diff --git a/src/views/accounting/bankSlip/index.vue b/src/views/accounting/bankSlip/index.vue index 23470e89..3e9abf81 100644 --- a/src/views/accounting/bankSlip/index.vue +++ b/src/views/accounting/bankSlip/index.vue @@ -234,9 +234,21 @@ size="mini" type="text" icon="el-icon-s-check" + v-if=" + scope.row.subscriptionStatus == 0 || + scope.row.subscriptionStatus == null + " @click="handleComfirm(scope.row)" >认款 + 取消认款 + - + @@ -676,7 +683,9 @@ export default { form: {}, form1: {}, // 表单校验 - rules: {}, + rules: { + staffName: [{ required: true, message: "请选择", trigger: "blur" }], + }, fileList: [], // 文件列表 uploadUrl: process.env.VUE_APP_BASE_API + "/admin-api/archives/flow/upload", // 上传地址地址 @@ -794,6 +803,7 @@ export default { id: undefined, staffId: undefined, staffName: undefined, + subscriptionStatus: undefined, }; this.resetForm("form"); }, @@ -838,13 +848,32 @@ export default { this.form1.staffName = val.username; }, submitForm2() { - console.log(this.form1); - updateBankSlip(this.form1).then((response) => { - this.$modal.msgSuccess("认款成功"); - this.open2 = false; - this.getList(); + this.form1.subscriptionStatus = 1; + this.$refs["form1"].validate((valid) => { + if (!valid) { + return; + } + updateBankSlip(this.form1).then((response) => { + this.$modal.msgSuccess("认款成功"); + this.open2 = false; + this.getList(); + }); }); }, + /** 取消认款按钮操作 */ + handleUnComfirm(val) { + this.reset(); + const data = { id: val.id, subscriptionStatus: 0 }; + this.$modal + .confirm('是否确认取消银行回单编号为"' + val.id + '"的认款?') + .then(function () { + updateBankSlip(data).then((response) => {}); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("取消成功"); + }); + }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate((valid) => {