From c17ceb3288a67e75a4c423ac8d390a7caef5e85a Mon Sep 17 00:00:00 2001 From: lilu Date: Wed, 21 Dec 2022 17:47:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=86=E5=8D=95=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/sedOperationArea.vue | 96 ++++++++++++++++++- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue b/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue index 775ecc6..fea54e3 100644 --- a/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/sedOperationArea.vue @@ -4,12 +4,47 @@
- +
+ + + +
+
+

默认打印格式为pdf,如需其他格式请选择

+

+ 打印格式: + + pdf + xlsx + docx + +

+
+ + + ·{{ item.typeName }} + + +
+
+ From a40ca2231fd4261fe3d1cc22265971eee5929611 Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 22 Dec 2022 11:10:23 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modular/main/BookingLedger.js | 9 ++++- .../detail/modules/basicInfo.vue | 7 ++-- .../detail/modules/operationArea.vue | 35 +++++++++++++++++-- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index f71a9e0..74657bc 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -606,4 +606,11 @@ export function BookingOrderPrintTemplateList(parameter) { params: parameter }) } -// + +export function LetterYardPdf(parameter) { + return axios({ + url: '/BookingOrder/LetterYardPdf', + method: 'get', + params: parameter + }) +} diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index 86fcdb8..22024c7 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -1040,7 +1040,7 @@ export default { // 内部航次 - start getVoynoinner(name = '') { - console.log('暂无接口', name, this.voynoinnerData, this.voynoinnerDataArr) + // console.log('暂无接口', name, this.voynoinnerData, this.voynoinnerDataArr) }, voynoinnerSelect(value) { this.details.voynoinner = value @@ -1053,7 +1053,7 @@ export default { // 航线 - start getLanename(name = '') { - console.log('暂无接口', name, this.lanenameData, this.lanenameDataArr) + // console.log('暂无接口', name, this.lanenameData, this.lanenameDataArr) }, lanenameSelect(value) { this.details.lanename = value @@ -1301,6 +1301,9 @@ export default { .table-no-data { text-align: center; } +/deep/ .date-box{ + padding-top: 7px; +} // .ant-calendar-picker-input{ // padding: 0 4px; diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue index 2cb6c35..4615d92 100644 --- a/src/views/main/BookingLedger/detail/modules/operationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue @@ -413,6 +413,10 @@ 删除 + + EXCEL + PDF + PDF @@ -511,7 +515,8 @@ import { BookingOrderOcrGetText, BookingOrderPrintTemplateList, DownloadBookingOrClosingEDI, - DeleteLetterYard + DeleteLetterYard, + LetterYardPdf } from '@/api/modular/main/BookingLedger' export default { @@ -601,7 +606,8 @@ export default { BCvData: [], Rdata: '', scale: '1.5', - PrintType: '1' + PrintType: '1', + downLoadLoading: false } }, mounted() { @@ -1216,6 +1222,31 @@ export default { }, addChild() { this.$emit('addSedList') + }, + downLoadFile(type) { + this.downLoadLoading = true + LetterYardPdf({ + bookingId: this.id, + type: type + }) + .then(res => { + this.downLoadLoading = false + this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' })) + const fname = '放舱打印' // 下载文件的名字 + const link = document.createElement('a') + link.href = this.pdfUrl + link.setAttribute('download', fname) + document.body.appendChild(link) + link.click() + if (res.message) { + this.$message.error(res.message) + } + }) + .catch(() => { + this.downLoadLoading = false + this.$message.destroy() + this.$message.success({ content: '下载失败' }) + }) } } } From 8b5956ad1938c7aa06716fb51dbb2a3f77c4f3ac Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 22 Dec 2022 11:51:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/mailingInfo.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index d32fe49..93a97ac 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -35,6 +35,7 @@
{ - if (!arr.includes(item.title)) { + if (item.title && !arr.includes(item.title)) { arr.push(item.title) } }) @@ -740,7 +746,7 @@ export default { if (this.consigneeData) { const arr = [] this.consigneeData.map((item, index) => { - if (!arr.includes(item.title)) { + if (item.title && !arr.includes(item.title)) { arr.push(item.title) } }) @@ -753,7 +759,7 @@ export default { if (this.notifyData) { const arr = [] this.notifyData.map((item, index) => { - if (!arr.includes(item.title)) { + if (item.title && !arr.includes(item.title)) { arr.push(item.title) } }) @@ -983,6 +989,8 @@ export default { this.shippername = value const index = this.shipperDataArr.indexOf(value) this.details.shipper = this.shipperData[index].content + this.showShipper = this.details.shipper + this.$forceUpdate() }, shipperChange(value) { this.getTemplate(value, 'shipper') @@ -992,6 +1000,7 @@ export default { this.consigneename = value const index = this.consigneeDataArr.indexOf(value) this.details.consignee = this.consigneeData[index].content + this.showConsignee = this.details.consignee }, consigneeChange(value) { this.getTemplate(value, 'consignee') @@ -1001,6 +1010,7 @@ export default { this.notifypartyname = value const index = this.notifyDataArr.indexOf(value) this.details.notifyparty = this.notifyData[index].content + this.showNotifier = this.details.notifyparty }, notifyChange(value) { this.getTemplate(value, 'notify') From 5e74f9f7aab9eabac018945b7cada080ad0e5da7 Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 22 Dec 2022 12:03:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=8E=BB=E6=8E=89console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/detail/modules/mailingInfo.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 93a97ac..1ce115d 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -1068,7 +1068,6 @@ export default { .then(res => { if (res.code === 200) { this[`${type}Data`] = res.data - console.log('== 装货港/收货地 ==', type, this[`${type}Data`]) this.$forceUpdate() } }) @@ -1415,7 +1414,6 @@ export default { }, textareaChange (e, type) { this.details[type] = e.target.value - console.log(type, this.details[type]) } } }