dev
张同海 2 years ago
parent 668369d657
commit ada22c86cb

@ -257,8 +257,14 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.orderUrl.urlVgm" />
<span style="margin-left:7px;"><i class="iconfont icon-fuzhi2"><!--复制--></i></span>
<a-input
style="width:1000px !important; text-align: left;"
:allowClear="true"
v-model="initCabinFrom.orderUrl.urlVgm"
/>
<span style="margin-left:7px;"
><i class="iconfont icon-fuzhi2"><!--复制--></i></span
>
</div>
</a-form-item>
</a-col>
@ -384,7 +390,11 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.remark" />
<a-input
style="width:1000px !important; text-align: left;"
:allowClear="true"
v-model="initCabinFrom.remark"
/>
</div>
</a-form-item>
</a-col>
@ -400,12 +410,7 @@
<template slot="footer">
<a-button @click="saveModel" :loading="SaveLoading">保存</a-button>
<a-button type="primary" @click="sendModel" :loading="SendLoading">发送</a-button>
<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>
</template>
@ -430,7 +435,7 @@
<a-row class="PrintMainBox">
<a-col
v-for="(item, index) in templateType"
:key="item.id"
:key="item.typeCode"
@click="FnCilckTemplateType(item.typeCode)"
class="items"
:span="11"
@ -603,6 +608,7 @@ export default {
this.BCvData = [...this.CvData]
// this.templateType = this.$options.filters['dictData']('booking_template_type')
BookingOrderPrintTemplateList().then(res => {
console.log(res.data)
this.templateType = res.data
})
// if (this.id) {
@ -829,41 +835,45 @@ export default {
}
},
sendBookingOrEDI(type) {
SendBookingOrClosingEDI(this.bookingModelFrom).then(res => {
//
if (res.success) {
this.$message.success('发送成功')
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
this.EDISloading = false
this.EDIUloading = false
}).catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
SendBookingOrClosingEDI(this.bookingModelFrom)
.then(res => {
//
if (res.success) {
this.$message.success('发送成功')
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
this.EDISloading = false
this.EDIUloading = false
})
.catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
},
downloadBookingOrEDI(type) {
DownloadBookingOrClosingEDI(this.bookingModelFrom).then(res => {
if (res.message) {
this.$message.error(res.message)
return false
}
const pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' }))
const fname = `${this.details.mblno} - ${this.modelType === 'bookingSpace' ? '订舱' : '截单'}Edi` //
const link = document.createElement('a')
link.href = pdfUrl
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
this.handleModelCancel()
this.EDISloading = false
this.EDIUloading = false
}).catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
DownloadBookingOrClosingEDI(this.bookingModelFrom)
.then(res => {
if (res.message) {
this.$message.error(res.message)
return false
}
const pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'text/plain;charset=utf-8' }))
const fname = `${this.details.mblno} - ${this.modelType === 'bookingSpace' ? '订舱' : '截单'}Edi` //
const link = document.createElement('a')
link.href = pdfUrl
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
this.handleModelCancel()
this.EDISloading = false
this.EDIUloading = false
})
.catch(() => {
this.EDISloading = false
this.EDIUloading = false
})
},
handleModelCancel() {
this.modelType = ''
@ -1066,18 +1076,18 @@ export default {
debugger
this.DelLoading = true
DeleteLetterYard(this.id)
.then(res => {
if (res.success) {
this.$message.success('删除成功')
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
this.DelLoading = false
})
.catch(() => {
this.DelLoading = false
})
.then(res => {
if (res.success) {
this.$message.success('删除成功')
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
this.DelLoading = false
})
.catch(() => {
this.DelLoading = false
})
} else if (this.modelType === 'vgmlink') {
// VGM
console.log('暂无接口')
@ -1195,12 +1205,12 @@ export default {
}
</script>
<style lang="less" scoped>
.vgm-info{
.vgm-info {
padding-top: 0px;
.ant-form-item{
.ant-form-item {
margin-bottom: 0px;
}
}
}
.OCRBox {
/deep/.ant-drawer-body {
padding: 0 !important;
@ -1398,6 +1408,7 @@ export default {
}
}
.PrintMainBox {
width: 100%;
max-height: 50vh;
overflow-y: auto;
margin-top: 5px;

Loading…
Cancel
Save