|
|
|
@ -935,6 +935,7 @@
|
|
|
|
|
'changePage',
|
|
|
|
|
'GetData',
|
|
|
|
|
'GetDefault',
|
|
|
|
|
'SetOCR',
|
|
|
|
|
])
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
details: {
|
|
|
|
@ -1270,7 +1271,7 @@
|
|
|
|
|
EDISloading.value = false
|
|
|
|
|
EDIUloading.value = false
|
|
|
|
|
// 未完成
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '发送成功', duration: 3 })
|
|
|
|
|
handleModelCancel()
|
|
|
|
|
} else {
|
|
|
|
@ -1410,7 +1411,7 @@
|
|
|
|
|
VgmSend(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
// notification.open({ message: '发送中..' })
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: 'VGM发送成功', duration: 3 })
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1424,7 +1425,7 @@
|
|
|
|
|
SendXHZ({ id: id.value })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
// notification.loading({ message: '发送中..' })
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '下货纸发送成功', duration: 3 })
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1459,7 +1460,7 @@
|
|
|
|
|
function getLetterYard() {
|
|
|
|
|
LetterYard(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
initCabinFrom.value = { ...initCabinFrom.value, ...res.data }
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1473,7 +1474,7 @@
|
|
|
|
|
function getSampleBill() {
|
|
|
|
|
SampleBill(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
initCabinFrom.value = res.data
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1486,7 +1487,7 @@
|
|
|
|
|
function sampleBillPdf() {
|
|
|
|
|
SampleBillPdf(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
hsaBillPdf.value = true
|
|
|
|
|
billPdf.value = res.data.description
|
|
|
|
|
} else {
|
|
|
|
@ -1501,7 +1502,7 @@
|
|
|
|
|
function getVgmLink() {
|
|
|
|
|
LetterYard(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
initCabinFrom.value = { ...initCabinFrom.value, ...res.data }
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1514,7 +1515,7 @@
|
|
|
|
|
function FnTxxpLink() {
|
|
|
|
|
TxxpLink({ id: id.value })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
copyFun(res.data)
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
@ -1566,18 +1567,18 @@
|
|
|
|
|
const Bx = ref(0)
|
|
|
|
|
const By = ref(0)
|
|
|
|
|
const BCvData = ref([
|
|
|
|
|
{ name: '发货人', code: 'shipper' },
|
|
|
|
|
{ name: '收货人', code: 'consignee' },
|
|
|
|
|
{ name: '装货港', code: 'portload' },
|
|
|
|
|
{ name: '发货人', code: 'shipperContent' },
|
|
|
|
|
{ name: '收货人', code: 'consigneeContent' },
|
|
|
|
|
{ name: '装货港', code: 'loadPort' },
|
|
|
|
|
{ name: '目的地', code: 'destination' },
|
|
|
|
|
{ name: '唛头', code: 'marks' },
|
|
|
|
|
{ name: '货物描述', code: 'description' },
|
|
|
|
|
{ name: '包装', code: 'kindpkgs' },
|
|
|
|
|
// { name: '包装', code: 'kindPkgs' },
|
|
|
|
|
{ name: '件数', code: 'pkgs' },
|
|
|
|
|
{ name: '尺寸', code: 'cbm' },
|
|
|
|
|
{ name: '尺码', code: 'cbm' },
|
|
|
|
|
{ name: '毛重', code: 'kgs' },
|
|
|
|
|
{ name: '卸货港', code: 'portdischarge' },
|
|
|
|
|
{ name: '通知人', code: 'notifyparty' },
|
|
|
|
|
{ name: '卸货港', code: 'dischargePort' },
|
|
|
|
|
{ name: '通知人', code: 'notifyPartyContent' },
|
|
|
|
|
])
|
|
|
|
|
function FnClickCvBox(data) {
|
|
|
|
|
let details = { ...props.details }
|
|
|
|
@ -1597,7 +1598,6 @@
|
|
|
|
|
} else {
|
|
|
|
|
details[data.code] = details[data.code] + Rdata.value
|
|
|
|
|
}
|
|
|
|
|
// details[data.code] = details[data.code] + Rdata.value
|
|
|
|
|
CvBoxType.value = false
|
|
|
|
|
BCvData.value.forEach((item, index) => {
|
|
|
|
|
if (item.code == data.code) {
|
|
|
|
@ -1605,29 +1605,30 @@
|
|
|
|
|
BCvData.value.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
emit('SetOCR', details)
|
|
|
|
|
}
|
|
|
|
|
function mouseup(e) {
|
|
|
|
|
flag.value = false
|
|
|
|
|
// if (imgSrc.value && width.value != 0 && height.value != 0) {
|
|
|
|
|
GetOcrText({
|
|
|
|
|
fileName: fileName.value,
|
|
|
|
|
x: x.value,
|
|
|
|
|
y: y.value,
|
|
|
|
|
w: width.value,
|
|
|
|
|
h: height.value,
|
|
|
|
|
scale: scale.value,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
Rdata.value = res.data
|
|
|
|
|
Bx.value = x.value + width.value
|
|
|
|
|
By.value = y.value + height.value
|
|
|
|
|
CvBoxType.value = true
|
|
|
|
|
})
|
|
|
|
|
// }
|
|
|
|
|
if (imgSrc.value && width.value != 0 && height.value != 0) {
|
|
|
|
|
GetOcrText({
|
|
|
|
|
fileName: fileName.value,
|
|
|
|
|
x: x.value,
|
|
|
|
|
y: y.value,
|
|
|
|
|
w: width.value,
|
|
|
|
|
h: height.value,
|
|
|
|
|
scale: scale.value,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
Rdata.value = res.data
|
|
|
|
|
Bx.value = x.value + width.value
|
|
|
|
|
By.value = y.value + height.value
|
|
|
|
|
CvBoxType.value = true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function mousemove(e) {
|
|
|
|
|
// if (imgSrc.value) {
|
|
|
|
|
drawRect(e)
|
|
|
|
|
// }
|
|
|
|
|
if (imgSrc.value) {
|
|
|
|
|
drawRect(e)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function drawRect(e) {
|
|
|
|
|
if (flag.value) {
|
|
|
|
@ -1648,14 +1649,14 @@
|
|
|
|
|
}
|
|
|
|
|
function mousedown(e) {
|
|
|
|
|
myCanvas.value.getContext('2d').clearRect(0, 0, myCanvas.value.width, myCanvas.value.height)
|
|
|
|
|
// if (imgSrc.value) {
|
|
|
|
|
flag.value = true
|
|
|
|
|
x.value = e.offsetX // 鼠标落下时的X
|
|
|
|
|
y.value = e.offsetY // 鼠标落下时的Y
|
|
|
|
|
CvBoxType.value = false
|
|
|
|
|
width.value = 0
|
|
|
|
|
height.value = 0
|
|
|
|
|
// }
|
|
|
|
|
if (imgSrc.value) {
|
|
|
|
|
flag.value = true
|
|
|
|
|
x.value = e.offsetX // 鼠标落下时的X
|
|
|
|
|
y.value = e.offsetY // 鼠标落下时的Y
|
|
|
|
|
CvBoxType.value = false
|
|
|
|
|
width.value = 0
|
|
|
|
|
height.value = 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function copyFun(data) {
|
|
|
|
@ -1672,9 +1673,6 @@
|
|
|
|
|
}
|
|
|
|
|
function uploadFile(file) {
|
|
|
|
|
const formData = new FormData()
|
|
|
|
|
formData.append('file', file.file)
|
|
|
|
|
// formData.append('bookingId', id.value)
|
|
|
|
|
const type = file.file.type
|
|
|
|
|
let Did: any = id.value
|
|
|
|
|
if (route.query.isCopy) {
|
|
|
|
|
Did = 0
|
|
|
|
@ -1682,15 +1680,23 @@
|
|
|
|
|
if (!id.value) {
|
|
|
|
|
Did = 0
|
|
|
|
|
}
|
|
|
|
|
formData.append('LinkId', Did)
|
|
|
|
|
formData.append('TypeCode', 'other')
|
|
|
|
|
formData.append('TypeName', '其他')
|
|
|
|
|
|
|
|
|
|
formData.append('file', file.file)
|
|
|
|
|
|
|
|
|
|
const type = file.file.type
|
|
|
|
|
|
|
|
|
|
UploadOcrFile({
|
|
|
|
|
data: formData,
|
|
|
|
|
parameter: { LinkId: Did, TypeCode: 'other', TypeName: '其他' },
|
|
|
|
|
// parameter: { LinkId: Did, TypeCode: 'other', TypeName: '其他' },
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
fileName.value = res.data.ocrFileName
|
|
|
|
|
if (Did == 0) {
|
|
|
|
|
emit('ocrUpflie', res.data.uploadFileName)
|
|
|
|
|
}
|
|
|
|
|
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` }),
|
|
|
|
@ -1716,7 +1722,7 @@
|
|
|
|
|
function handleCancelCabin() {
|
|
|
|
|
cabinLoad.value = true
|
|
|
|
|
CancelAllocationSlot(props.details.id).then((res) => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '取消成功', duration: 3 })
|
|
|
|
|
emit('handleSetCtnList')
|
|
|
|
|
} else {
|
|
|
|
|