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 { }