|
|
|
@ -30,18 +30,22 @@
|
|
|
|
|
派车信息
|
|
|
|
|
</a-button>
|
|
|
|
|
<Divider type="vertical" />
|
|
|
|
|
<a-button type="link" @click="FnTxxpLink">
|
|
|
|
|
<a-button type="link" v-repeat @click="FnTxxpLink">
|
|
|
|
|
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
|
|
|
|
|
提箱小票
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button type="link" @click="ShowOCR">
|
|
|
|
|
<a-button type="link" v-repeat @click="ShowOCR">
|
|
|
|
|
<span class="iconfont icon-OCR"></span>
|
|
|
|
|
OCR
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button type="link" @click="handleSubmitTelex">
|
|
|
|
|
<a-button type="link" v-repeat @click="handleSubmitTelex">
|
|
|
|
|
<span class="iconfont icon-lunchuan"></span>
|
|
|
|
|
船司电放
|
|
|
|
|
</a-button>
|
|
|
|
|
<!-- 场站入货 -->
|
|
|
|
|
<OpBusinessYardDetails :businessId="details.id" @register="OYregisterModal" />
|
|
|
|
|
<!-- 派车信息 -->
|
|
|
|
|
<OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" />
|
|
|
|
|
<!-- <a-card
|
|
|
|
|
:bordered="false"
|
|
|
|
|
:bodyStyle="{
|
|
|
|
@ -234,25 +238,20 @@
|
|
|
|
|
@cancel="handleModelCancel"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="['bookingSpace', 'cutOff'].includes(modelType)">
|
|
|
|
|
<a-form>
|
|
|
|
|
<a-row :gutter="16">
|
|
|
|
|
<a-col :span="24">
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="文件功能"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
layout="vertical"
|
|
|
|
|
class="ant-form-file"
|
|
|
|
|
>
|
|
|
|
|
<a-radio-group v-model:value="bookingModelFrom.fileRole">
|
|
|
|
|
<a-radio :style="radioStyle" :value="9"> 原始 </a-radio>
|
|
|
|
|
<a-radio :disabled="forwarderFlag" :style="radioStyle" :value="1"> 更新 </a-radio>
|
|
|
|
|
<a-radio :disabled="forwarderFlag" :style="radioStyle" :value="5"> 退舱 </a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<a-form
|
|
|
|
|
layout="vertical"
|
|
|
|
|
class="ds-form-detail"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="文件功能"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<a-radio-group v-model:value="bookingModelFrom.fileRole">
|
|
|
|
|
<a-radio :value="9"> 原始 </a-radio>
|
|
|
|
|
<a-radio :disabled="forwarderFlag" :value="1"> 更新 </a-radio>
|
|
|
|
|
<a-radio :disabled="forwarderFlag" :value="5"> 退舱 </a-radio>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="['initCabin', 'ladingBill', 'vgmlink'].includes(modelType)">
|
|
|
|
@ -878,48 +877,47 @@
|
|
|
|
|
}}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</a-drawer>
|
|
|
|
|
<!-- OCR抽屉 end -->
|
|
|
|
|
<!-- 运踪弹窗 start -->
|
|
|
|
|
<!-- 运踪弹窗 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
width="50vw"
|
|
|
|
|
width="500px"
|
|
|
|
|
class="ds-modal-small"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
v-model:visible="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
|
|
|
|
|
>
|
|
|
|
|
<a-checkbox-group
|
|
|
|
|
class="trace-check"
|
|
|
|
|
v-model:value="traceValue"
|
|
|
|
|
name="checkboxgroup"
|
|
|
|
|
:options="traceOptions"
|
|
|
|
|
@change="onTraceChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<a-form
|
|
|
|
|
ref=traceRef
|
|
|
|
|
class="ds-detail-form"
|
|
|
|
|
layout="vertical"
|
|
|
|
|
:model="traceForm"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="请选择订阅内容"
|
|
|
|
|
name="traceValue"
|
|
|
|
|
>
|
|
|
|
|
<a-checkbox-group
|
|
|
|
|
class="trace-check"
|
|
|
|
|
v-model:value="traceForm.traceValue"
|
|
|
|
|
:options="traceOptions"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button type="primary" @click="traceSend">订阅</a-button>
|
|
|
|
|
<a-button @click="traceModalVisible = false">关闭</a-button>
|
|
|
|
|
<a-button :loading="tloading" type="primary" @click="traceSend">订阅</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 运踪弹窗 end -->
|
|
|
|
|
<!-- 预配舱单 -->
|
|
|
|
|
<pre-order ref="RefpreOrder" :details="details" @frompre="frompre" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import preOrder from './preOrder.vue'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 场站入货组件
|
|
|
|
|
import OpBusinessYardDetails from './Letter/OpBusinessYardDetails.vue'
|
|
|
|
|
// 派车信息组件
|
|
|
|
|
import OpBusinessTruckDetails from './Letter/OpBusinessTruckDetails.vue'
|
|
|
|
|
import {
|
|
|
|
|
GetOpenPrintModuleList,
|
|
|
|
|
GetOpenPrintTemplateList,
|
|
|
|
@ -951,7 +949,7 @@
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import { columns, searchFormSchema } from './operationAreaColumns'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
const emit = defineEmits([
|
|
|
|
@ -984,13 +982,22 @@
|
|
|
|
|
// =============
|
|
|
|
|
const id = ref(route.query.id)
|
|
|
|
|
const spinning = ref(false)
|
|
|
|
|
const templateType = ref<any>([])
|
|
|
|
|
const PrintModalVisible = ref(false)
|
|
|
|
|
const forwarderFlag = ref(false)
|
|
|
|
|
const modelType = ref('')
|
|
|
|
|
const bookingModelvisible = ref(false)
|
|
|
|
|
const bookingModelconfirm = ref(false)
|
|
|
|
|
|
|
|
|
|
// 表单校验规则
|
|
|
|
|
const rules = {
|
|
|
|
|
traceValue: [
|
|
|
|
|
{
|
|
|
|
|
type: 'array',
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择订阅内容',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
const initCabinFrom = ref({
|
|
|
|
|
toName: '',
|
|
|
|
|
attn: '',
|
|
|
|
@ -1286,9 +1293,11 @@
|
|
|
|
|
bookingModelFrom.orderNo = props.details.mblno
|
|
|
|
|
bookingModelFrom.id = route.query.id
|
|
|
|
|
if (type == 'save') {
|
|
|
|
|
// 保存EDI文件
|
|
|
|
|
EDISloading.value = true
|
|
|
|
|
downloadBookingOrEDI(type)
|
|
|
|
|
} else {
|
|
|
|
|
// 上传EDI
|
|
|
|
|
EDIUloading.value = true
|
|
|
|
|
sendBookingOrEDI(type)
|
|
|
|
|
}
|
|
|
|
@ -1300,23 +1309,11 @@
|
|
|
|
|
.then((res) => {
|
|
|
|
|
EDISloading.value = false
|
|
|
|
|
EDIUloading.value = false
|
|
|
|
|
console.log(res)
|
|
|
|
|
// 未完成
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '发送成功', duration: 3 })
|
|
|
|
|
createMessage.success('发送成功!')
|
|
|
|
|
handleModelCancel()
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({
|
|
|
|
|
content: () =>
|
|
|
|
|
h(
|
|
|
|
|
'p',
|
|
|
|
|
{
|
|
|
|
|
style: {
|
|
|
|
|
whiteSpace: 'pre-wrap',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
res.message,
|
|
|
|
|
),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -1365,54 +1362,54 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const traceModalVisible = ref(false)
|
|
|
|
|
const traceValue = ref([])
|
|
|
|
|
const traceOptions = reactive([
|
|
|
|
|
// 运踪弹窗部分
|
|
|
|
|
const traceForm = reactive({
|
|
|
|
|
traceValue: []
|
|
|
|
|
})
|
|
|
|
|
const traceOptions = [
|
|
|
|
|
{ label: '起运港', value: '1' },
|
|
|
|
|
{ label: '目的港', value: '2' },
|
|
|
|
|
])
|
|
|
|
|
// 运踪选择 Change
|
|
|
|
|
function onTraceChange() {
|
|
|
|
|
console.log(traceValue.value)
|
|
|
|
|
}
|
|
|
|
|
{ label: '目的港', value: '2' }
|
|
|
|
|
]
|
|
|
|
|
const traceRef = ref(null)
|
|
|
|
|
const tloading = ref(false)
|
|
|
|
|
// 订阅运踪
|
|
|
|
|
function traceSend() {
|
|
|
|
|
if (!traceValue.value) {
|
|
|
|
|
notification.error({ message: '请选择订阅内容', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (traceValue.value.includes('1') && (!props.details.yard || !props.details.yardId)) {
|
|
|
|
|
notification.error({ message: '请选择场站', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (traceValue.value.includes('2') && (!props.details.carrierId || !props.details.carrier)) {
|
|
|
|
|
notification.error({ message: '请选择船公司', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const query = {
|
|
|
|
|
businessId: route.query.id,
|
|
|
|
|
mblno: props.details.mblno,
|
|
|
|
|
yard: traceValue.value.includes('1') ? props.details.yard : '',
|
|
|
|
|
yardCode: traceValue.value.includes('1') ? props.details.yardid : '',
|
|
|
|
|
carrierid: traceValue.value.includes('2') ? props.details.carrierid : '',
|
|
|
|
|
carrier: traceValue.value.includes('2') ? props.details.carrier : '',
|
|
|
|
|
isBook: !!traceValue.value.includes('2'),
|
|
|
|
|
}
|
|
|
|
|
SendTrace([query])
|
|
|
|
|
.then((res) => {
|
|
|
|
|
traceRef.value.validate().then(() => {
|
|
|
|
|
console.log(props.details.yardId)
|
|
|
|
|
if (traceForm.traceValue.includes('1') && !props.details.yardId) {
|
|
|
|
|
return createMessage.warning('请选择场站!')
|
|
|
|
|
}
|
|
|
|
|
if (traceForm.traceValue.includes('2') && !props.details.carrierId) {
|
|
|
|
|
return createMessage.warning('请选择船公司!')
|
|
|
|
|
}
|
|
|
|
|
const query = {
|
|
|
|
|
businessId: route.query.id,
|
|
|
|
|
mblno: props.details.mblno,
|
|
|
|
|
yard: traceForm.traceValue.includes('1') ? props.details.yard : '',
|
|
|
|
|
yardCode: traceForm.traceValue.includes('1') ? props.details.yardId : '',
|
|
|
|
|
carrierId: traceForm.traceValue.includes('2') ? props.details.carrierId : '',
|
|
|
|
|
carrier: traceForm.traceValue.includes('2') ? props.details.carrier : '',
|
|
|
|
|
isBook: !!traceForm.traceValue.includes('2')
|
|
|
|
|
}
|
|
|
|
|
tloading.value = true
|
|
|
|
|
SendTrace([query]).then((res) => {
|
|
|
|
|
tloading.value = false
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
const tip = `订阅成功`
|
|
|
|
|
notification.success({ message: tip, duration: 3 })
|
|
|
|
|
createMessage.success('订阅成功!')
|
|
|
|
|
traceModalVisible.value = false
|
|
|
|
|
traceValue.value = []
|
|
|
|
|
traceForm.traceValue = []
|
|
|
|
|
} else {
|
|
|
|
|
notification.warning({ message: res.message, duration: 3 })
|
|
|
|
|
traceModalVisible.value = false
|
|
|
|
|
traceValue.value = []
|
|
|
|
|
traceForm.traceValue = []
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
tloading.value = false
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log('error', error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 打开对话框 VGM
|
|
|
|
|
function openDialog(type) {
|
|
|
|
@ -1425,6 +1422,7 @@
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '温馨提示',
|
|
|
|
|
content: content,
|
|
|
|
|
class: 'ds-modal-small',
|
|
|
|
|
onOk() {
|
|
|
|
|
if (type === 'vgm') {
|
|
|
|
|
vgmSend()
|
|
|
|
@ -1432,19 +1430,15 @@
|
|
|
|
|
FnsendXHZ()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onCancel() {},
|
|
|
|
|
class: 'test',
|
|
|
|
|
onCancel() {}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 发送 VGM
|
|
|
|
|
function vgmSend() {
|
|
|
|
|
VgmSend(id.value)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
// notification.open({ message: '发送中..' })
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: 'VGM发送成功', duration: 3 })
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
createMessage.success('VGM发送成功!')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
@ -1454,11 +1448,8 @@
|
|
|
|
|
function FnsendXHZ() {
|
|
|
|
|
SendXHZ({ id: id.value })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
// notification.loading({ message: '发送中..' })
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '下货纸发送成功', duration: 3 })
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
createMessage.success('下货纸发送成功!')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
@ -1547,8 +1538,6 @@
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
copyFun(res.data)
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
@ -1695,7 +1684,7 @@
|
|
|
|
|
copyInput.setAttribute('value', data)
|
|
|
|
|
copyInput.select()
|
|
|
|
|
document.execCommand('Copy', false, null)
|
|
|
|
|
notification.success({ message: '复制成功', duration: 3 })
|
|
|
|
|
createMessage.success('复制成功!')
|
|
|
|
|
copyInput.remove()
|
|
|
|
|
}
|
|
|
|
|
function beforeUpload(file) {
|
|
|
|
@ -1868,8 +1857,7 @@
|
|
|
|
|
const RefpreOrder = ref()
|
|
|
|
|
function openPreOrderFun() {
|
|
|
|
|
if (!id.value) {
|
|
|
|
|
notification.error({ message: '请先保存主单', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
return createMessage.warning('请先保存主单!')
|
|
|
|
|
}
|
|
|
|
|
RefpreOrder.value.init()
|
|
|
|
|
}
|
|
|
|
|