diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index 9554c3a..9089b76 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -607,4 +607,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/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index d32fe49..1ce115d 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') @@ -1058,7 +1068,6 @@ export default { .then(res => { if (res.code === 200) { this[`${type}Data`] = res.data - console.log('== 装货港/收货地 ==', type, this[`${type}Data`]) this.$forceUpdate() } }) @@ -1405,7 +1414,6 @@ export default { }, textareaChange (e, type) { this.details[type] = e.target.value - console.log(type, this.details[type]) } } } diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue index dbef0c7..69f02cf 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() { @@ -1238,6 +1244,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: '下载失败' }) + }) } } } 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 }} + + +
+
+