|
|
|
@ -33,8 +33,8 @@
|
|
|
|
|
<button @click="openModel('paper')">
|
|
|
|
|
<span class="iconfont icon-zhizhishu" style="font-size:18px;"></span>下货纸
|
|
|
|
|
</button>
|
|
|
|
|
<button>
|
|
|
|
|
<span class="iconfont icon-yunshu1" @click="openModel('trace')" style="font-size:18px;"></span>运踪订阅
|
|
|
|
|
<button @click="openModel('trace')">
|
|
|
|
|
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>运踪订阅
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-list more-view-2">
|
|
|
|
@ -417,9 +417,9 @@
|
|
|
|
|
删除
|
|
|
|
|
</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>
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(2, 'EXCEL')" :loading="downLoadEXCELLoading">EXCEL</a-button>
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(1, 'PDF')" :loading="downLoadPDFLoading">PDF</a-button>
|
|
|
|
|
<a-button type="primary" @click="downLoadFile(3, 'DOCX')" :loading="downLoadDOCXLoading">DOCX</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
@ -497,33 +497,32 @@
|
|
|
|
|
<!-- OCR抽屉 end -->
|
|
|
|
|
|
|
|
|
|
<!-- 运踪弹窗 start -->
|
|
|
|
|
<a-modal width="50vw" :maskClosable="false" v-model="PrintModalVisible" title="打印">
|
|
|
|
|
<template slot="footer"> <span></span> </template>
|
|
|
|
|
<div class="PrintMain">
|
|
|
|
|
<div class="PrintTitle">
|
|
|
|
|
<p>默认打印格式为<span>pdf</span>,如需其他格式请选择</p>
|
|
|
|
|
<p>
|
|
|
|
|
打印格式:
|
|
|
|
|
<a-radio-group v-model="PrintType" name="radioGroup">
|
|
|
|
|
<a-radio value="1">pdf</a-radio>
|
|
|
|
|
<a-radio value="2">xlsx</a-radio>
|
|
|
|
|
<a-radio value="3">docx</a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<a-row class="PrintMainBox">
|
|
|
|
|
<a-col
|
|
|
|
|
v-for="(item, index) in templateType"
|
|
|
|
|
:key="item.typeCode"
|
|
|
|
|
@click="FnCilckTemplateType(item.typeCode)"
|
|
|
|
|
class="items"
|
|
|
|
|
:span="11"
|
|
|
|
|
:offset="index % 2 == 0 ? 0 : 1"
|
|
|
|
|
<a-modal width="50vw" :maskClosable="false" v-model="traceModalVisible" title="运踪订阅">
|
|
|
|
|
<div class="trace-box">
|
|
|
|
|
<a-form>
|
|
|
|
|
<a-row :gutter="16">
|
|
|
|
|
<a-col :span="24" class="book-model-box">
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="请选择订阅内容"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<span>·</span>{{ item.typeName }}
|
|
|
|
|
<a-radio-group
|
|
|
|
|
class="trace-check"
|
|
|
|
|
v-model="traceValue"
|
|
|
|
|
name="checkboxgroup"
|
|
|
|
|
:options="traceOptions"
|
|
|
|
|
@change="onTraceChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
|
<a-button type="primary" @click="traceSend">订阅</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 运踪弹窗 end -->
|
|
|
|
|
</div>
|
|
|
|
@ -550,7 +549,8 @@ import {
|
|
|
|
|
BookingOrderPrintTemplateList,
|
|
|
|
|
DownloadBookingOrClosingEDI,
|
|
|
|
|
DeleteLetterYard,
|
|
|
|
|
LetterYardPdf
|
|
|
|
|
LetterYardPdf,
|
|
|
|
|
SendTrace
|
|
|
|
|
} from '@/api/modular/main/BookingLedger'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -641,7 +641,15 @@ export default {
|
|
|
|
|
Rdata: '',
|
|
|
|
|
scale: '1.5',
|
|
|
|
|
PrintType: '1',
|
|
|
|
|
downLoadLoading: false
|
|
|
|
|
downLoadEXCELLoading: false,
|
|
|
|
|
downLoadPDFLoading: false,
|
|
|
|
|
downLoadDOCXLoading: false,
|
|
|
|
|
traceOptions: [
|
|
|
|
|
{ label: '起运港', value: '1' },
|
|
|
|
|
{ label: '目的港', value: '2' }
|
|
|
|
|
],
|
|
|
|
|
traceValue: '',
|
|
|
|
|
traceModalVisible: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -840,12 +848,15 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
},
|
|
|
|
|
openModel(type) {
|
|
|
|
|
debugger
|
|
|
|
|
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
|
|
|
|
|
// 订舱 / 截单
|
|
|
|
|
this.modelType = type
|
|
|
|
|
this.bookingModelvisible = true
|
|
|
|
|
} else if (['vgm', 'paper'].includes(type)) {
|
|
|
|
|
this.openDialog(type)
|
|
|
|
|
} else if (type === 'trace') {
|
|
|
|
|
this.traceModalVisible = true
|
|
|
|
|
}
|
|
|
|
|
if (['initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
|
|
|
|
|
this.initCabinFrom = {
|
|
|
|
@ -872,6 +883,7 @@ export default {
|
|
|
|
|
} else if (type === 'vgmlink') {
|
|
|
|
|
this.getVgmLink()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
emnuHeader(type) {
|
|
|
|
|
let title = ''
|
|
|
|
@ -1191,6 +1203,7 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
this.getLetterYard()
|
|
|
|
|
this.SaveLoading = false
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -1282,15 +1295,29 @@ export default {
|
|
|
|
|
addChild() {
|
|
|
|
|
this.$emit('addSedList')
|
|
|
|
|
},
|
|
|
|
|
downLoadFile(type) {
|
|
|
|
|
this.downLoadLoading = true
|
|
|
|
|
downLoadFile(type, type2) {
|
|
|
|
|
let _this = this
|
|
|
|
|
if (!this.id || !this.initCabinFrom.id) {
|
|
|
|
|
this.$message.error('请先保存数据')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
this[`downLoad${type2}Loading`] = 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' }))
|
|
|
|
|
// eslint-disable-next-line no-use-before-define
|
|
|
|
|
_this[`downLoad${type2}Loading`] = false
|
|
|
|
|
let fileType = ''
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
fileType = 'application/pdf'
|
|
|
|
|
} else if (type === 2) {
|
|
|
|
|
fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
|
|
} else if (type === 3) {
|
|
|
|
|
fileType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
|
|
|
|
}
|
|
|
|
|
this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: `${fileType};charset=utf-8` }))
|
|
|
|
|
const fname = '放舱打印' // 下载文件的名字
|
|
|
|
|
const link = document.createElement('a')
|
|
|
|
|
link.href = this.pdfUrl
|
|
|
|
@ -1302,10 +1329,50 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.downLoadLoading = false
|
|
|
|
|
this[`downLoad${type2}Loading`] = false
|
|
|
|
|
this.$message.destroy()
|
|
|
|
|
this.$message.success({ content: '下载失败' })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onTraceChange (values) {
|
|
|
|
|
console.log(this.traceValue)
|
|
|
|
|
},
|
|
|
|
|
traceSend () {
|
|
|
|
|
if (!this.traceValue) {
|
|
|
|
|
this.$message.error('请选择订阅内容')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
let query = {}
|
|
|
|
|
if (this.traceValue === '1') {
|
|
|
|
|
// 起运港
|
|
|
|
|
query = {
|
|
|
|
|
businessId: this.$route.query.id,
|
|
|
|
|
mblno: this.details.mblno,
|
|
|
|
|
yard: this.details.yard,
|
|
|
|
|
yardCode: this.details.yardid,
|
|
|
|
|
isBook: false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
query = {
|
|
|
|
|
businessId: this.$route.query.id,
|
|
|
|
|
mblno: this.details.mblno,
|
|
|
|
|
carrierid: this.details.carrierid,
|
|
|
|
|
carrier: this.details.carrier,
|
|
|
|
|
isBook: true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SendTrace([query])
|
|
|
|
|
.then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
const tip = `${ this.traceValue === '1' ? '起运港' : '目的港'}订阅成功`
|
|
|
|
|
this.$message.success(tip)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.success(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1614,4 +1681,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.trace-box{
|
|
|
|
|
padding: 20px 0;
|
|
|
|
|
}
|
|
|
|
|
.trace-check{
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|