From 9cd215f04e8e41565a8d38f45becce4a728e7849 Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Thu, 23 Dec 2021 17:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tools/UserMenu.vue | 2 +- .../modules/ExpenditureContractModule.vue | 65 +++++++++---------- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index e645d64..e2d134e 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -4,7 +4,7 @@ - + {{ nickname() | ellipsis(15) }} diff --git a/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue b/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue index a3e61e5..dd670b9 100644 --- a/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue +++ b/src/views/contractManagement/expenditureContract/modules/ExpenditureContractModule.vue @@ -246,7 +246,7 @@ - 提交 + 保存 取消 @@ -444,44 +444,37 @@ export default { } this.form.validateFields((err, values) => { if (!err) { - const that = this - this.$confirm({ - title: '确认提交?', - content: '提交后将给存档人发送提醒消息', - onOk: function () { - that.confirmLoading = true - if (that.installmentList && that.installmentList.length > 0) { - let formData = {} - formData.installment = that.installmentList - formData.contract = Object.assign(that.model, values) - console.log('表单提交数据', formData) - let url = '' - if (!that.model.id) { - url = that.url.add - } else { - url = that.url.edit - } - postAction(url, formData).then(res => { - if (res.success) { - that.contractId = res.result.id - that.$message.success(res.message) - // 跳转至支出合同list页面 - that.$router.push({ - path: '/contractManagement/ExpenditureContract' - }) - } else { - that.$message.warning(res.message) - } - }).finally(() => { - setTimeout(() => { - that.confirmLoading = false - }, 1000) + this.confirmLoading = true + if (this.installmentList && this.installmentList.length > 0) { + let formData = {} + formData.installment = this.installmentList + formData.contract = Object.assign(this.model, values) + console.log('表单提交数据', formData) + let url = '' + if (!this.model.id) { + url = this.url.add + } else { + url = this.url.edit + } + postAction(url, formData).then(res => { + if (res.success) { + this.contractId = res.result.id + this.$message.success(res.message) + // 跳转至支出合同list页面 + this.$router.push({ + path: '/contractManagement/ExpenditureContract' }) } else { - that.confirmLoading = false + this.$message.warning(res.message) } - } - }) + }).finally(() => { + setTimeout(() => { + this.confirmLoading = false + }, 1000) + }) + } else { + that.confirmLoading = false + } } else { this.confirmLoading = false }