临时提交

dev
lilu 2 years ago
parent 959c463776
commit c725aebfca

@ -351,8 +351,7 @@ export function VgmSend(parameter) {
export function LetterYard(parameter) { export function LetterYard(parameter) {
return axios({ return axios({
url: '/BookingOrder/LetterYard?bookingId=' + parameter, url: '/BookingOrder/LetterYard?bookingId=' + parameter,
method: 'get', method: 'get'
params: parameter
}) })
} }
@ -615,3 +614,11 @@ export function LetterYardPdf(parameter) {
params: parameter params: parameter
}) })
} }
export function SendTrace(parameter) {
return axios({
url: '/BookingOrder/SendTrace',
method: 'post',
data: parameter
})
}

@ -894,10 +894,10 @@ export default {
// this.getVoynoinner() // this.getVoynoinner()
// // this.getVoynoinner() // // this.getVoynoinner()
// // this.getLanename() // // this.getLanename()
// this.getUserList('sale') this.getUserList('sale')
// this.getUserList('op') this.getUserList('op')
// this.getUserList('doc') this.getUserList('doc')
// this.getUserList('custservice') this.getUserList('custservice')
if (this.details.etd) { if (this.details.etd) {
this.etdWeek = this.getWeek(this.details.etd) this.etdWeek = this.getWeek(this.details.etd)
} }

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

@ -85,6 +85,7 @@
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div> <div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div> <div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div> <div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div>
<!-- <div class="nav" @click="openModel('trace')"> <i class="iconfont icon-yunshu1"></i>运踪订阅</div> -->
</div> </div>
</template> </template>
<template #tools> <template #tools>

Loading…
Cancel
Save