From ada22c86cbbd4fb4d5e8d1d685097a811a76b7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Thu, 15 Dec 2022 12:00:34 +0800 Subject: [PATCH] 12/15 --- .../detail/modules/operationArea.vue | 127 ++++++++++-------- 1 file changed, 69 insertions(+), 58 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue index f730830..6a82fd5 100644 --- a/src/views/main/BookingLedger/detail/modules/operationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue @@ -257,8 +257,14 @@ has-feedback >
- - + +
@@ -384,7 +390,11 @@ has-feedback >
- +
@@ -400,12 +410,7 @@ @@ -430,7 +435,7 @@ { + console.log(res.data) this.templateType = res.data }) // if (this.id) { @@ -829,41 +835,45 @@ export default { } }, sendBookingOrEDI(type) { - SendBookingOrClosingEDI(this.bookingModelFrom).then(res => { - // 未完成 - if (res.success) { - this.$message.success('发送成功') - this.handleModelCancel() - } else { - this.$message.error(res.message) - } - this.EDISloading = false - this.EDIUloading = false - }).catch(() => { - this.EDISloading = false - this.EDIUloading = false - }) + SendBookingOrClosingEDI(this.bookingModelFrom) + .then(res => { + // 未完成 + if (res.success) { + this.$message.success('发送成功') + this.handleModelCancel() + } else { + this.$message.error(res.message) + } + this.EDISloading = false + this.EDIUloading = false + }) + .catch(() => { + this.EDISloading = false + this.EDIUloading = false + }) }, downloadBookingOrEDI(type) { - DownloadBookingOrClosingEDI(this.bookingModelFrom).then(res => { - if (res.message) { - this.$message.error(res.message) - return false - } - const pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' })) - const fname = `${this.details.mblno} - ${this.modelType === 'bookingSpace' ? '订舱' : '截单'}Edi` // 下载文件的名字 - const link = document.createElement('a') - link.href = pdfUrl - link.setAttribute('download', fname) - document.body.appendChild(link) - link.click() - this.handleModelCancel() - this.EDISloading = false - this.EDIUloading = false - }).catch(() => { - this.EDISloading = false - this.EDIUloading = false - }) + DownloadBookingOrClosingEDI(this.bookingModelFrom) + .then(res => { + if (res.message) { + this.$message.error(res.message) + return false + } + const pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' })) + const fname = `${this.details.mblno} - ${this.modelType === 'bookingSpace' ? '订舱' : '截单'}Edi` // 下载文件的名字 + const link = document.createElement('a') + link.href = pdfUrl + link.setAttribute('download', fname) + document.body.appendChild(link) + link.click() + this.handleModelCancel() + this.EDISloading = false + this.EDIUloading = false + }) + .catch(() => { + this.EDISloading = false + this.EDIUloading = false + }) }, handleModelCancel() { this.modelType = '' @@ -1066,18 +1076,18 @@ export default { debugger this.DelLoading = true DeleteLetterYard(this.id) - .then(res => { - if (res.success) { - this.$message.success('删除成功') - this.handleModelCancel() - } else { - this.$message.error(res.message) - } - this.DelLoading = false - }) - .catch(() => { - this.DelLoading = false - }) + .then(res => { + if (res.success) { + this.$message.success('删除成功') + this.handleModelCancel() + } else { + this.$message.error(res.message) + } + this.DelLoading = false + }) + .catch(() => { + this.DelLoading = false + }) } else if (this.modelType === 'vgmlink') { // VGM 链接 console.log('暂无接口') @@ -1195,12 +1205,12 @@ export default { }