|
|
|
@ -1,44 +1,63 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="operation-area">
|
|
|
|
|
<a-button v-repeat v-if="urlParams.source == 'edit' || taskType == 202" type="link" @click="openModel('bookingSpace')">
|
|
|
|
|
<a-button v-repeat v-if="source == 'edit' || taskType == 202" type="link" @click="openModel('bookingSpace')">
|
|
|
|
|
<span class="iconfont icon-gongdanqueren"></span>
|
|
|
|
|
订舱
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('cutOff')">
|
|
|
|
|
<a-button v-if="source == 'edit' || taskType == 206" type="link" @click="openModel('cutOff')">
|
|
|
|
|
<span class="iconfont icon-lanjie"></span>
|
|
|
|
|
截单
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('trace')">
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="您当前未选择服务项目,是否继续操作?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="openModel('vgm')"
|
|
|
|
|
>
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link">
|
|
|
|
|
<span class="iconfont icon-lanjie"></span>
|
|
|
|
|
VGM
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" @click="openModel('trace')">
|
|
|
|
|
<span class="iconfont icon-dingwei"></span>
|
|
|
|
|
运踪
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" @click="openPreOrderFun">
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" @click="openPreOrderFun">
|
|
|
|
|
<span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>
|
|
|
|
|
舱单
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('paper')">
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" @click="openModel('paper')">
|
|
|
|
|
<span class="iconfont icon-touzijilu"></span>
|
|
|
|
|
下货纸
|
|
|
|
|
</a-button>
|
|
|
|
|
<Divider v-if="urlParams.source == 'edit'" type="vertical" />
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit' || taskType == 204" type="link" @click="FnOpBusinessYard">
|
|
|
|
|
<Divider v-if="source == 'edit'" type="vertical" />
|
|
|
|
|
<a-button v-if="source == 'edit' || taskType == 204" type="link" @click="FnOpBusinessYard">
|
|
|
|
|
<span class="iconfont icon-a-fahuodaifahuo"></span>
|
|
|
|
|
场站入货
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" @click="FnOpBusinessTruck">
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" @click="FnOpBusinessTruck">
|
|
|
|
|
<span class="iconfont icon-yunshu1"></span>
|
|
|
|
|
派车信息
|
|
|
|
|
</a-button>
|
|
|
|
|
<Divider v-if="urlParams.source == 'edit'" type="vertical" />
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="FnTxxpLink">
|
|
|
|
|
<Divider v-if="source == 'edit'" type="vertical" />
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" v-repeat @click="FnTxxpLink">
|
|
|
|
|
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
|
|
|
|
|
提箱小票
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="ShowOCR">
|
|
|
|
|
<span class="iconfont icon-OCR"></span>
|
|
|
|
|
OCR
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="handleSubmitTelex">
|
|
|
|
|
<a-upload
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
accept=".pdf"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
name="file"
|
|
|
|
|
:customRequest="uploadFile"
|
|
|
|
|
>
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" v-repeat @click="ShowOCR">
|
|
|
|
|
<span class="iconfont icon-OCR"></span>
|
|
|
|
|
OCR
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-upload>
|
|
|
|
|
<a-button v-if="source == 'edit'" type="link" v-repeat @click="handleSubmitTelex">
|
|
|
|
|
<span class="iconfont icon-lunchuan"></span>
|
|
|
|
|
船司电放
|
|
|
|
|
</a-button>
|
|
|
|
@ -803,34 +822,36 @@
|
|
|
|
|
@close="OcrOnClose"
|
|
|
|
|
class="OCRBox"
|
|
|
|
|
>
|
|
|
|
|
<a-row justify="end" :style="{ width: '100%', marginTop: '5px' }">
|
|
|
|
|
<a-col :span="6" :offset="18">
|
|
|
|
|
<span>缩放比例:</span>
|
|
|
|
|
<a-select size="small" v-model:value="scale" style="width: 120px">
|
|
|
|
|
<a-select-option value="1.0">100%</a-select-option>
|
|
|
|
|
<a-select-option value="1.2">120%</a-select-option>
|
|
|
|
|
<a-select-option value="1.5">150%</a-select-option>
|
|
|
|
|
<a-select-option value="2.0">200%</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-spin :spinning="uloading">
|
|
|
|
|
<a-row justify="end" :style="{ width: '100%', marginTop: '5px' }">
|
|
|
|
|
<a-col :span="6" :offset="18">
|
|
|
|
|
<span>缩放比例:</span>
|
|
|
|
|
<a-select size="small" v-model:value="scale" style="width: 120px">
|
|
|
|
|
<a-select-option value="1.0">100%</a-select-option>
|
|
|
|
|
<a-select-option value="1.2">120%</a-select-option>
|
|
|
|
|
<a-select-option value="1.5">150%</a-select-option>
|
|
|
|
|
<a-select-option value="2.0">200%</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
|
|
<canvas
|
|
|
|
|
class="CV"
|
|
|
|
|
id="myCanvas"
|
|
|
|
|
ref="myCanvas"
|
|
|
|
|
width="893"
|
|
|
|
|
height="1262"
|
|
|
|
|
@mousedown="mousedown"
|
|
|
|
|
@mouseup="mouseup"
|
|
|
|
|
@mousemove="mousemove"
|
|
|
|
|
:style="{ backgroundImage: `url(${imgSrc})` }"
|
|
|
|
|
></canvas>
|
|
|
|
|
<ul class="CvBox" v-if="CvBoxType" :style="{ left: `${Bx}px`, top: `${By}px` }">
|
|
|
|
|
<li v-for="item in BCvData" :key="item.name" @click="FnClickCvBox(item)">{{
|
|
|
|
|
item.name
|
|
|
|
|
}}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<canvas
|
|
|
|
|
class="CV"
|
|
|
|
|
id="myCanvas"
|
|
|
|
|
ref="myCanvas"
|
|
|
|
|
width="893"
|
|
|
|
|
height="1262"
|
|
|
|
|
@mousedown="mousedown"
|
|
|
|
|
@mouseup="mouseup"
|
|
|
|
|
@mousemove="mousemove"
|
|
|
|
|
:style="{ backgroundImage: `url(${imgSrc})` }"
|
|
|
|
|
></canvas>
|
|
|
|
|
<ul class="CvBox" v-if="CvBoxType" :style="{ left: `${Bx}px`, top: `${By}px` }">
|
|
|
|
|
<li v-for="item in BCvData" :key="item.name" @click="FnClickCvBox(item)">{{
|
|
|
|
|
item.name
|
|
|
|
|
}}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-drawer>
|
|
|
|
|
<!-- 运踪弹窗 -->
|
|
|
|
|
<a-modal
|
|
|
|
@ -910,7 +931,7 @@
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const urlParams = route.query
|
|
|
|
|
const source = route.query.source || 'edit'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import { columns, searchFormSchema } from './operationAreaColumns'
|
|
|
|
@ -948,7 +969,7 @@
|
|
|
|
|
},
|
|
|
|
|
// 任务类型
|
|
|
|
|
taskType: {
|
|
|
|
|
type: [String || Number]
|
|
|
|
|
type: Number
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// =============
|
|
|
|
@ -1169,7 +1190,7 @@
|
|
|
|
|
}
|
|
|
|
|
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
|
|
|
|
|
// 订舱
|
|
|
|
|
if (type === 'bookingSpace') {
|
|
|
|
|
if (type === 'bookingSpace' || type === 'cutOff') {
|
|
|
|
|
const id = props.details.forwarderId
|
|
|
|
|
// 根据订舱代理id获取往来单位参数
|
|
|
|
|
GetClientParamListById({ id }).then(res => {
|
|
|
|
@ -1179,8 +1200,14 @@
|
|
|
|
|
})
|
|
|
|
|
if (Email.length) {
|
|
|
|
|
const ids = []
|
|
|
|
|
if (props.details.saleId) ids.push(props.details.saleId)
|
|
|
|
|
if (props.details.operatorId) ids.push(props.details.operatorId)
|
|
|
|
|
if (type === 'bookingSpace') {
|
|
|
|
|
if (props.details.saleId) ids.push(props.details.saleId)
|
|
|
|
|
if (props.details.operatorId) ids.push(props.details.operatorId)
|
|
|
|
|
}
|
|
|
|
|
if (type === 'cutOff') {
|
|
|
|
|
if (props.details.saleId) ids.push(props.details.doc)
|
|
|
|
|
if (props.details.operatorId) ids.push(props.details.operatorId)
|
|
|
|
|
}
|
|
|
|
|
// 发送邮件
|
|
|
|
|
emailModal.value.init(ids, props.details)
|
|
|
|
|
} else {
|
|
|
|
@ -1249,42 +1276,56 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EDISloading.value = true
|
|
|
|
|
CheckAndInitVOLTAEdi(data).then((res) => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
voltaForm.value = res.data.extra
|
|
|
|
|
voltaFlag.value = true
|
|
|
|
|
if (res.data.msg) {
|
|
|
|
|
notification.warning({ message: res.data.msg, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
if (!voltaForm.value.notifySecondAddr) {
|
|
|
|
|
voltaForm.value.notifySecondAddr = ''
|
|
|
|
|
}
|
|
|
|
|
if (!voltaForm.value.notifySecondName) {
|
|
|
|
|
voltaForm.value.notifySecondName = ''
|
|
|
|
|
}
|
|
|
|
|
voltaData.value = res.data.extra.contaList
|
|
|
|
|
EDISloading.value = false
|
|
|
|
|
if (modelType.value === 'bookingSpace') {
|
|
|
|
|
// 订舱
|
|
|
|
|
if (type == 'save') {
|
|
|
|
|
// 保存EDI文件
|
|
|
|
|
EDISloading.value = true
|
|
|
|
|
downloadBookingOrEDI(type)
|
|
|
|
|
} else {
|
|
|
|
|
// this.$message.error(res.message)
|
|
|
|
|
if (modelType.value === 'bookingSpace') {
|
|
|
|
|
bookingModelFrom.sendType = 'B'
|
|
|
|
|
} else if (modelType.value === 'cutOff') {
|
|
|
|
|
bookingModelFrom.sendType = 'E'
|
|
|
|
|
}
|
|
|
|
|
bookingModelFrom.send = type === 'send'
|
|
|
|
|
bookingModelFrom.orderNo = props.details.mblno
|
|
|
|
|
bookingModelFrom.id = props.id
|
|
|
|
|
if (type == 'save') {
|
|
|
|
|
// 保存EDI文件
|
|
|
|
|
EDISloading.value = true
|
|
|
|
|
downloadBookingOrEDI(type)
|
|
|
|
|
// 上传EDI
|
|
|
|
|
EDIUloading.value = true
|
|
|
|
|
sendBookingOrEDI(type)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 截单
|
|
|
|
|
CheckAndInitVOLTAEdi(data).then((res) => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
voltaForm.value = res.data.extra
|
|
|
|
|
voltaFlag.value = true
|
|
|
|
|
if (res.data.msg) {
|
|
|
|
|
notification.warning({ message: res.data.msg, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
if (!voltaForm.value.notifySecondAddr) {
|
|
|
|
|
voltaForm.value.notifySecondAddr = ''
|
|
|
|
|
}
|
|
|
|
|
if (!voltaForm.value.notifySecondName) {
|
|
|
|
|
voltaForm.value.notifySecondName = ''
|
|
|
|
|
}
|
|
|
|
|
voltaData.value = res.data.extra.contaList
|
|
|
|
|
EDISloading.value = false
|
|
|
|
|
} else {
|
|
|
|
|
// 上传EDI
|
|
|
|
|
EDIUloading.value = true
|
|
|
|
|
sendBookingOrEDI(type)
|
|
|
|
|
// this.$message.error(res.message)
|
|
|
|
|
if (modelType.value === 'bookingSpace') {
|
|
|
|
|
bookingModelFrom.sendType = 'B'
|
|
|
|
|
} else if (modelType.value === 'cutOff') {
|
|
|
|
|
bookingModelFrom.sendType = 'E'
|
|
|
|
|
}
|
|
|
|
|
bookingModelFrom.send = type === 'send'
|
|
|
|
|
bookingModelFrom.orderNo = props.details.mblno
|
|
|
|
|
bookingModelFrom.id = props.id
|
|
|
|
|
if (type == 'save') {
|
|
|
|
|
// 保存EDI文件
|
|
|
|
|
EDISloading.value = true
|
|
|
|
|
downloadBookingOrEDI(type)
|
|
|
|
|
} else {
|
|
|
|
|
// 上传EDI
|
|
|
|
|
EDIUloading.value = true
|
|
|
|
|
sendBookingOrEDI(type)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function sendBookingOrEDI(type) {
|
|
|
|
|
SendBookingOrClosingEDI(bookingModelFrom)
|
|
|
|
@ -1581,6 +1622,34 @@
|
|
|
|
|
{ name: '卸货港', code: 'dischargePort' },
|
|
|
|
|
{ name: '通知人', code: 'notifyPartyContent' },
|
|
|
|
|
])
|
|
|
|
|
// function uploadFile(file) {
|
|
|
|
|
// const formData = new FormData()
|
|
|
|
|
// formData.append('file', file.file)
|
|
|
|
|
// // formData.append('bookingId', id.value)
|
|
|
|
|
// const type = file.file.type
|
|
|
|
|
// let id = id.value
|
|
|
|
|
// if (route.query.isCopy) {
|
|
|
|
|
// id = 0
|
|
|
|
|
// }
|
|
|
|
|
// if (!id.value) {
|
|
|
|
|
// id = 0
|
|
|
|
|
// }
|
|
|
|
|
// BookingOrderOcrUpFile({ data: formData, parameter: { bookingId: id } }).then((res) => {
|
|
|
|
|
// if (res.success) {
|
|
|
|
|
// fileName.value = res.data.ocrFileName
|
|
|
|
|
// if (id == 0) {
|
|
|
|
|
// emit('ocrUpflie', res.data.uploadFileName)
|
|
|
|
|
// }
|
|
|
|
|
// BookingOrderOcrGetImg({ fileName: fileName.value, scale: scale.value }).then((res) => {
|
|
|
|
|
// imgSrc.value = window.URL.createObjectURL(
|
|
|
|
|
// new Blob([res], { type: `${type};chartset=UTF-8` }),
|
|
|
|
|
// )
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
function FnClickCvBox(data) {
|
|
|
|
|
let details = { ...props.details }
|
|
|
|
|
const Arr = ['pkgs', 'cbm', 'kgs', 'portdischarge', 'destination', 'kindpkgs']
|
|
|
|
@ -1621,6 +1690,7 @@
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
Rdata.value = res.data
|
|
|
|
|
Bx.value = x.value + width.value
|
|
|
|
|
console.log(Bx)
|
|
|
|
|
By.value = y.value + height.value
|
|
|
|
|
CvBoxType.value = true
|
|
|
|
|
})
|
|
|
|
@ -1688,26 +1758,25 @@
|
|
|
|
|
formData.append('file', file.file)
|
|
|
|
|
|
|
|
|
|
const type = file.file.type
|
|
|
|
|
|
|
|
|
|
uloading.value = true
|
|
|
|
|
UploadOcrFile({
|
|
|
|
|
data: formData,
|
|
|
|
|
// parameter: { LinkId: Did, TypeCode: 'other', TypeName: '其他' },
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
uloading.value = false
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
fileName.value = res.data
|
|
|
|
|
// if (Did == 0) {
|
|
|
|
|
// emit('ocrUpflie', res.data.uploadFileName)
|
|
|
|
|
// }
|
|
|
|
|
GetOcrImg({ fileName: fileName.value, scale: scale.value }).then((res) => {
|
|
|
|
|
imgSrc.value = window.URL.createObjectURL(
|
|
|
|
|
new Blob([res], { type: `${type};chartset=UTF-8` }),
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
uloading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const uloading = ref(false)
|
|
|
|
|
function ShowOCR() {
|
|
|
|
|
if (OcrVisible.value) {
|
|
|
|
|
OcrOnClose()
|
|
|
|
@ -1860,5 +1929,31 @@
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.operation-area {
|
|
|
|
|
margin: 8px -10px;
|
|
|
|
|
span {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.OCRBox {
|
|
|
|
|
.ant-drawer-body {
|
|
|
|
|
position: relative;
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
.CvBox {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100px;
|
|
|
|
|
border: 1px solid #f0f0f0;
|
|
|
|
|
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
|
|
|
|
|
padding: 0;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
li {
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
list-style-type: none;
|
|
|
|
|
padding: 3px 0;
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #f0f0f0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|