From 8a41610887828df030fefa02da292e6211a5b2b7 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Fri, 26 May 2023 17:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=87=BA=E5=BA=93=E7=94=B3?= =?UTF-8?q?=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chukubanli/chukushenqingAdd.vue | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue b/anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue index 249669a65a..87c6332a85 100644 --- a/anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue +++ b/anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue @@ -604,28 +604,34 @@ export default { this.$message({ showClose: true, type: 'error', message: '车辆信息表不能为空' }) return } - this.$confirm('是否确定提交该业务', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.$refs['dataForm'].validate((valid) => { - if (valid) { - this.createBtn = true - this.formobj.procInsId = this.formobj.procInstId - submitInfo(this.formobj).then((response) => { - if (response.success) { - this.$message({ showClose: true, type: 'success', message: '提交成功' }) - this.handleReturn('true') - } else { - this.createBtn = false - } - }).catch(e => { - this.createBtn = false + if (this.formobj.discountLeave.length > 0 && this.formobj.carList.length > 0) { + for (var i = 0; i < this.formobj.discountLeave.length; i++) { + if (this.formobj.discountLeave[i].discountLeaveNum != 0) { + this.$confirm('存在未赠送的套餐,是否需要赠送', '提示', { + confirmButtonText: '否', + cancelButtonText: '是', + type: 'warning' + }).then(() => { + this.$refs['dataForm'].validate((valid) => { + if (valid) { + this.createBtn = true + this.formobj.procInsId = this.formobj.procInstId + submitInfo(this.formobj).then((response) => { + if (response.success) { + this.$message({ showClose: true, type: 'success', message: '提交成功' }) + this.handleReturn('true') + } else { + this.createBtn = false + } + }).catch(e => { + this.createBtn = false + }) + } + }) }) } - }) - }) + } + } }, // 返回 handleReturn(isreload) {