|
|
@ -413,6 +413,10 @@
|
|
|
|
<a-button type="primary" @click="removeModel" :loading="DelLoading" v-if="['initCabin'].includes(modelType)">
|
|
|
|
<a-button type="primary" @click="removeModel" :loading="DelLoading" v-if="['initCabin'].includes(modelType)">
|
|
|
|
删除
|
|
|
|
删除
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
|
|
|
|
|
<template v-if="modelType === 'initCabin'"></template>
|
|
|
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(2)" :loading="downLoadLoading">EXCEL</a-button>
|
|
|
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(1)" :loading="downLoadLoading">PDF</a-button>
|
|
|
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(3)" :loading="downLoadLoading">PDF</a-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</a-modal>
|
|
|
|
</a-modal>
|
|
|
@ -511,7 +515,8 @@ import {
|
|
|
|
BookingOrderOcrGetText,
|
|
|
|
BookingOrderOcrGetText,
|
|
|
|
BookingOrderPrintTemplateList,
|
|
|
|
BookingOrderPrintTemplateList,
|
|
|
|
DownloadBookingOrClosingEDI,
|
|
|
|
DownloadBookingOrClosingEDI,
|
|
|
|
DeleteLetterYard
|
|
|
|
DeleteLetterYard,
|
|
|
|
|
|
|
|
LetterYardPdf
|
|
|
|
} from '@/api/modular/main/BookingLedger'
|
|
|
|
} from '@/api/modular/main/BookingLedger'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
@ -601,7 +606,8 @@ export default {
|
|
|
|
BCvData: [],
|
|
|
|
BCvData: [],
|
|
|
|
Rdata: '',
|
|
|
|
Rdata: '',
|
|
|
|
scale: '1.5',
|
|
|
|
scale: '1.5',
|
|
|
|
PrintType: '1'
|
|
|
|
PrintType: '1',
|
|
|
|
|
|
|
|
downLoadLoading: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -1216,6 +1222,31 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addChild() {
|
|
|
|
addChild() {
|
|
|
|
this.$emit('addSedList')
|
|
|
|
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: '下载失败' })
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|